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] |
Hi guys, This is the patch for the function to output assembly codes for next line. I this a rfc and doesn't include doc because we still a lot of thing is not decided. Such as the name, the behavior and maybe something else. I didn't add disassemble-next-line-max because I want output a warning this message is cut if the number is bigger than max. But make sure it's cut or not is not easy. And there is already a filter when output the assembly codes. So I think maybe we don't need it. Please send your comment. Thanks a lot. :) Thanks, Hui On Thu, Mar 5, 2009 at 10:41, teawater <teawater@gmail.com> wrote: > > Thanks guys, > > For the people that want extend disassemble: > Output assembly codes of next-line is just one part of this idea. > > We still have another part: > 1. Auto mode, output assembly codes only if there is not line message > for current pc. > For example: > (gdb) si > 0x080483ee ? ? ?24 ? ? ? ? ? ? ?b = printf ("a = %d b = %d c = %d\n", a, b, c); > (gdb) si > 0x080482d8 in printf@plt () > Current language: ?auto; currently asm > 0x080482d8 <printf@plt+0>: ? ? ?jmp ? ?*0x8049670 > (gdb) si > 0x080482de in printf@plt () > 0x080482de <printf@plt+6>: ? ? ?push ? $0x10 > > I think maybe is can be default option of gdb. ?Add it to display with itself? > > > 2. Output assembly codes number limit. > This idea form Doug: > 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). > > I think maybe it need output something like "This message is cut ... > you can set it with ...". > > > 3. Special for optimized code. > This idea form Doug too: > 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 > output. > > > > I think maybe is too much thing for disassemble. > > > > Thanks, > Hui > > > > On Thu, Mar 5, 2009 at 07:40, Tom Tromey <tromey@redhat.com> wrote: > >>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes: > > > >>> Right, I thought about something that begins with "disassemble", but > >>> didn't want to shoot our completion habits in the foot, since > >>> currently typing just "disas TAB" is all I need to get disassembly. > > > > Daniel> I agree we don't want to change that binding (I use it all the time). > > Daniel> But is it a problem? ?This would be under set, if I understand right. > > > > Yeah, this sounds reasonable to me. > > I'd prefer to have some word like "disassemble" in the parameter name. > > > > Tom > >
Attachment:
disassemble-next-line.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |