Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Nov 2019 02:18:45 +0000 (UTC)
From:      Brandon Bergren <bdragon@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r354272 - head/sys/powerpc/powerpc
Message-ID:  <201911030218.xA32IjPa081664@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdragon
Date: Sun Nov  3 02:18:45 2019
New Revision: 354272
URL: https://svnweb.freebsd.org/changeset/base/354272

Log:
  powerpc: Add display of raw instruction values to x/I in ddb.
  
  The "alternate format" character 'I' previously had the same behavior as
  the "display as an instruction" character 'i'. With this change, it will now
  prefix each disassembled instruction with the raw hex value.
  
  As PowerPC instructions are always 32 bits and always aligned, and there are
  no alternate modes that would affect instruction decoding or display, this
  seemed to me to be the obvious interpretation of "alternate format".
  
  Approved by: jhibbits (mentor)
  Differential Revision: https://reviews.freebsd.org/D22223

Modified:
  head/sys/powerpc/powerpc/db_disasm.c

Modified: head/sys/powerpc/powerpc/db_disasm.c
==============================================================================
--- head/sys/powerpc/powerpc/db_disasm.c	Sun Nov  3 02:17:35 2019	(r354271)
+++ head/sys/powerpc/powerpc/db_disasm.c	Sun Nov  3 02:18:45 2019	(r354272)
@@ -1073,6 +1073,8 @@ db_disasm(db_addr_t loc, bool extended)
 	int class;
 	instr_t opcode;
 	opcode = *(instr_t *)(loc);
+	if (extended)
+		db_printf("|%08x| ", opcode);
 	class = opcode >> 26;
 	(opcodes_base[class])(opcode, loc);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911030218.xA32IjPa081664>