From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Elizabeth Chastain To: 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: <200103192052.MAA08643@bosch.cygnus.com> X-SW-Source: 2001-03/msg00170.html Hello Stephen, This is how I do it: % 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've done this on both Unix/Linux and Cygwin gdb's. Cheers, Michael Elizabeth Chastain "love without fear"