This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Debugging gdb with gdb
brobecker@ACT-Europe.FR wrote:
>
> > So the question is: How do I temporarily stop the target application in
> > gdb---set a break point in the target---then continue? This is useful in
> > GUI applications as well.
>
> FWIW, I debug GDB a bit differently: I start the inferior GDB in a
> terminal. I then run another GDB, and attach it to the inferior.
> The idea behind this is that I want to avoid mixing the I/O in the
> inferior with the commands I'm sending to GDB.
>
> For the GUI lovers, GVD facilitates this, because it offers a
> File->Attach menu, which will then present you with a list of process.
> Click, click, click, and you're attached...
>
> --
> Joel
FYI, I use also an other way :
In the top debugger (say GDB) I set a breakpoint on the function
undef_cmd_error() calls each time the user hits a wrong GDB command. So
when MYGDB is running, you hit a wrong command such as qwert and the GDB
top debugger will stop in undef_cmd_error(). You can then do all what
you want at the top GDB level inside MYGDB code.
Christophe
--
----------------------------------------------------------------------
| Christophe PLANAT | Embedded Systems Technology |
| Email : Christophe.Planat@st.com | STMicroelectronics |
| Phone : +33 04 76 92 68 82 | 850, rue Jean-Monnet |
| Fax : +33 04 76 92 50 94 | BP 16 - 38921 Crolles - France |
----------------------------------------------------------------------