From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: Michael Elizabeth Chastain Cc: gdb@sourceware.cygnus.com, ischis2@home.com Subject: Re: How do you use GDB to debug GDB Date: Wed, 21 Mar 2001 15:59:00 -0000 Message-id: References: <200103192052.MAA08643@bosch.cygnus.com> X-SW-Source: 2001-03/msg00185.html On Mon, 19 Mar 2001, Michael Elizabeth Chastain wrote: > % gdb powerpc-motorola-elf-gdb > (gdb) set prompt [top] > [top] set args --command=C:/rti/bin/rtidbug.ini C:/examples/dll/main.exe > [top] break help_command > [top] run > > The first command helps me keep track of which gdb I'm in. There is > a space at the end of the command: "set prompt [top] ". > > The second command tells the superior gdb what the arguments are for > the inferior gdb. This is the heart of what you want. Note that you > can re-run the inferior gdb and the arguments will repeat. > > The third line sets a convenient breakpoint in the superior gdb so that > you can bounce back up to it. I usually do "help foo" instead of "help" > for getting to the superior gdb, to reduce the screen output. > > The fourth line starts the inferior gdb with the arguments given on the > second line. I think this is important enough to go into the manual. If anyone has additional tricks pertginent to debugging GDB, please post them, and I will merge them all together. One thing puzzles me, though: why is the section "Debugging GDB with itself" in gdbint.texinfo instead of gdb.texinfo? Is there any reason not to move (or copy) it to gdb.texinfo? Can some of the elders please shed some light on this?