Re: Debugging gdb with gdb

Daniel Jacobowitz
2002-02-01T17:26:26Z

On Fri, Feb 01, 2002 at 04:25:15PM +0000, Salman Khilji wrote:
> I am running gdb under gdb.
>
> Lets assume gdb starts mygdb. I issue the run command in (gdb) without
> setting any breakpoints anywhere. mygdb comes up and the prompt now says
> (mygdb) instead of (gdb). I want to put a break point somewhere inside the
> mygdb code---not the program that mygdb is going to debug. However if I
> issue the break command, the break point is going to be set in the program
> that (mygdb) is going to debug---not in mygdb itself.
>
> 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.

Hit control-C at the (mygdb) prompt, and it should stop on the parent
GDB.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer