Re: How do you use GDB to debug GDB

J.T. Conklin
2001-03-21T15:59:00Z

>>>>> "Stephen" == Stephen Smith <ischis2@home.com> writes:
Stephen> I have a gdb debugger configured to for a remote target (host
Stephen> i686-pc-cygwin target=powerpc-motorola-elf). normally I run
Stephen> gdb as:
Stephen>
Stephen> powerpc-motorola-elf-gdb --command=C:/rti/bin/rtidbug.ini C:/examples/dll/main.exe
Stephen>
Stephen> Now I want to run the gdb against the above process.

On a UNIX system, you would first start a native GDB, and then use it
to run and debug the child GDB.

$ gdb /usr/local/bin/powerpc-motorola-elf-gdb
GDB is free software and you are ...
(gdb)

At this point, I typically install breakpoints where I think there the
problem lies. The .gdbinit file distributed with GDB sets breakpoints
and sets directory paths, etc.; thus creating an initial environment
that are likely to be useful debugging GDB.

Then run your child GDB.

(gdb) run --command=C:/rti/bin/rtidbug.ini C:/examples/dll/main.exe

I don't have experience with NT to know whether this will work there.

--jtc

--
J.T. Conklin
RedBack Networks