public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: John Smith <horserivers@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: debug gdb by gdb
Date: Sat, 15 Sep 2012 00:21:00 -0000	[thread overview]
Message-ID: <CADPb22Sb_ujK8dOp0g=vXGTLWW=fBW7UwZA0Ti14V7Sp3kSi3g@mail.gmail.com> (raw)
In-Reply-To: <CAJR88pjyN6g3rkNY2UKXgGNp-tE-n7MLCw8x+09J0w=JCOk9cQ@mail.gmail.com>

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.

      parent reply	other threads:[~2012-09-15  0:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11  9:36 John Smith
2012-09-11 10:15 ` naga raj
2012-09-15  0:21 ` Doug Evans [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADPb22Sb_ujK8dOp0g=vXGTLWW=fBW7UwZA0Ti14V7Sp3kSi3g@mail.gmail.com' \
    --to=dje@google.com \
    --cc=gdb@sourceware.org \
    --cc=horserivers@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).