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


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


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