How do you use GDB to debug GDB

J.T. Conklin jtc@redback.com
Wed Mar 21 15:59:00 GMT 2001


>>>>> "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



More information about the Gdb mailing list