debug gdb by gdb
Doug Evans
dje@google.com
Sat Sep 15 00:21:00 GMT 2012
On Tue, Sep 11, 2012 at 2:36 AM, John Smith <horserivers@gmail.com> wrote:
> hi,
>
> i am try to debug gdb by gdb , and a problem confused me
> , here it is : how can i send command to the debugged gdb
> process which is the child process of top-gdb ?
>
> as you know ,when I type command to the command line , this
> command will always be send to top-gdb , and how to send
> command to the child gdb dynamicly?
>
>
> thanks!
This all works rather well (depending on what you mean by "dynamically").
gdb developers do it regularly. :-)
bash$ cd $build/gdb
bash$ gdb gdb
[...]
(top-gdb) r -nx hello
[...]
(gdb) r
Starting program: /home/dje/hello
Hello.
[Inferior 1 (process 9905) exited normally]
(gdb) i
(top-gdb) c
(gdb) quit
(top-gdb) quit
bash$
Do you have something specific that is not working?
Note that above I show how to get back to top-gdb from the child gdb
without terminating the child gdb using "i" or "info" without
arguments. See gdb-gdb.gdb for how this is done.
More information about the Gdb
mailing list