This is the mail archive of the 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: What about add a interface to output the assembly codes follow inferior execution

On Tue, Mar 3, 2009 at 9:30 PM, teawater <> wrote:
> Thanks Eli.
> I think "show-opcodes" is very good. ?:)
> Hui
> - Show quoted text -
> On Wed, Mar 4, 2009 at 12:08, Eli Zaretskii <> wrote:
>>> Date: Wed, 4 Mar 2009 10:28:48 +0800
>>> From: teawater <>
>>> Cc: gdb ml <>
>>> When exec-disassemble is on,
>>> If the $pc doesn't have the line message, gdb will output the assembly
>>> code for $pc.
>>> If the $pc has the line message, gdb will output the assembly codes of
>>> this line.
>> I think this is a useful feature, but we need a better name for it.
>> Something like show-opcodes, for example.

Thanks for explaining it more clearly.

Having another word for "disassembly" seems clumsy though. ["apropos
opcodes" doesn't print anything today]
Plus to a new user the intent of the option is a bit vague.
"disassemble-next-line" ? [that has a lot to type to become
unambiguous, but it's not something the user would presumably type
often, if not in .gdbinit or some such]

Also, the user might want to set a limit on the number of lines of
disassembly displayed.
If cut short gdb could print "[output cut short due to `set
dissemble-next-line-max 10']" (or some such).

For debugging optimized code, maybe it'd be nice if gdb determined
there were more (discontiguous) lines of disassembly to display for
the current source line and notified the user (by printing
"discontiguous source line" or some such) before and/or after the

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