This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] disassemble support start,+length format
> Date: Thu, 15 Apr 2010 10:14:32 -0700
> From: Nathan Froyd <froydnj@codesourcery.com>
> Cc: crquan@gmail.com, gdb-patches@sourceware.org, tromey@redhat.com, teawater@gmail.com, brobecker@adacore.com
>
> On Thu, Apr 15, 2010 at 08:08:26PM +0300, Eli Zaretskii wrote:
> > > +@smallexample
> > > +(gdb) disas /r main,+20
> > > +Dump of assembler code from 0x450670 to 0x450684:
> > > + 0x0000000000450670 <main+0>: 48 83 ec 28 sub $0x28,%rsp
> > > + 0x0000000000450674 <main+4>: 48 c7 04 24 00 00 00 00 movq $0x0,(%rsp)
> > > + 0x000000000045067c <main+12>: 89 3c 24 mov %edi,(%rsp)
> > > + 0x000000000045067f <main+15>: 48 89 e7 mov %rsp,%rdi
> > > + 0x0000000000450682 <main+18>: 48 c7 44 24 10 00 00 00 00 movq $0x0,0x10(%rsp)
> > > +End of assembler dump.
> > > +@end smallexample
> >
> > This is okay, but any line inside @smallexample block that is longer
> > than 72 characters will overflow the page margins in the printed
> > version of the manual. So could you perhaps select an example with
> > shorter lines?
>
> Disassembling x86 code, rather than x86-64 code, would help out quite a bit.
Right, but even in this example, only the 2 movq instructions present
a problem. The other instructions are okay.