How do you use GDB to debug GDB
Fernando Nasser
fnasser@cygnus.com
Wed Mar 21 15:59:00 GMT 2001
Stephen Smith wrote:
>
> I have a gdb debugger configured to for a remote target (host i686-pc-cygwin target=powerpc-motorola-elf). normally I
> run gdb as:
>
> powerpc-motorola-elf-gdb --command=C:/rti/bin/rtidbug.ini C:/examples/dll/main.exe
>
> Now I want to run the gdb against the above process. Since I am running this in a Windows NT command shell I can't use
> gdb /usr/local/bin/powerpc-motorola-elf-gdb some_process_id
>
> Can someone help
>
Use the "ps -l" command. It will give you the Windows PID in addition to the Unix (Cygwin) one.
Start your "top" gdb in a separate shell. Use the command attach passing the Windows PID (as opposed to the Unix PID) of the other GDB.
You are now debugging your powerpc-motorola-elf-gdb
Good luck.
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
More information about the Gdb
mailing list