This is the mail archive of the gdb@sources.redhat.com 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]

Re: How do you use GDB to debug GDB



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?


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