This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add a new modifier /c to "disassemble" command to make it output binary code


> Date: Thu, 9 Jul 2009 15:00:32 -0700
> From: Doug Evans <dje@google.com>
> 
> On Wed, Jul 8, 2009 at 11:35 PM, Hui Zhu<teawater@gmail.com> wrote:
> > Hi,
> >
> > The objdump will output the binary code when it works but gdb not.
> > I make a patch to add a new modifier /c to "disassemble" command to
> > make it output binary code.
> > Please help me review it.
> 
> I like the idea.
> The option to objdump is --[no-]show-raw-insn.
> The word "raw" is the mnemonic I use to remember the option name.
> Hence I wonder if it would be easier for users to remember
> "disassemble /r" than "disassemble /c".
> [nit picky, I know]

Actually I think you have a point here.  The term "code" is horribly
overloaded, so I felt a bit uncomfortable with the fact that the newly
added argument to print_disassembly carried that name:

>>  static void
>>  print_disassembly (struct gdbarch *gdbarch, const char *name,
>> -		   CORE_ADDR low, CORE_ADDR high, int mixed)
>> +		   CORE_ADDR low, CORE_ADDR high, int mixed, int code)

If people agree with Doug and me that /r is better than /c, can the
code be changed to match this?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]