This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] new command: 'maintenance info lines'
- From: Josef Ezra <jezra at emc dot com>
- To: Fernando Nasser <fnasser at redhat dot com>
- Cc: Michael Snyder <msnyder at redhat dot com>, gdb-patches at sources dot redhat dot com
- Date: Thu, 26 Sep 2002 09:51:20 -0400
- Subject: Re: [RFA] new command: 'maintenance info lines'
- References: <02ea01c1e6eb$65f850c0$ad219fa8@lss.emc.com> <3CBEFC88.37807AEF@redhat.com> <3D08D15E.7030805@emc.com> <3D08DB87.A8119A1D@redhat.com> <3D0E39E6.5060701@emc.com> <3D0FA3CD.5681BF89@redhat.com> <3D789AF5.4020406@subdimension.com> <3D921C02.9020906@redhat.com>
Fernando Nasser wrote:
The maintenance commands are to be used to debug (or test) GDB only.
We could say you'd be dumping the line table but that is hardly what
is being done and we don't have a real need for that anyway.
well, WE have a real need for this command (is there a wrong way to use
gdb?). but we sure don't need it to maintain gdb.
If you really want to use a CLI command, you need to add a set/show
variable to request that the source lines are included in the
'disassemble' command output.
do you mean something like:
(gdb) set disassem dump-source-or-something 1
(gdb) disassemble main
Dump of assembler code for function main:
Line ../gdb/main.c:757
0x50ce4 <main>: save %sp, -120, %sp
0x50ce8 <main+4>: std %i0, [ %fp + -24 ]
0x50cec <main+8>: sethi %hi(0x50000), %o0
0x50cf0 <main+12>: or %o0, 0x16c, %o0 ! 0x5016c <captured_main>
0x50cf4 <main+16>: sethi %hi(0x2a7c00), %o2
Line ../gdb/main.c:759
0x50cf8 <main+20>: add %fp, -24, %o1
0x50cfc <main+24>: or %o2, 0x3c0, %o2
0x50d00 <main+28>: call 0xb2374 <catch_errors>
0x50d04 <main+32>: mov 6, %o3
Line ../gdb/main.c:775
0x50d08 <main+36>: ret
0x50d0c <main+40>: restore %g0, 0, %o0
End of assembler dump.
that would be a great solution for our needs. how about setting the
dump-source to 1 to show line location, and 2 to try presenting the
actual source lines (like mixed list and disassemble)
The newer disassembler code that handles mixed output is still in the
MI subdirectory (and in an older form in the gdbtk subdir) but it is
intended to replace the one in printcmd.c. It shouldn't be too
difficult and you can always ask if you have any doubts.
?? please explain
thanks - jezra