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


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