Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Smith John <baseboy126@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: How to debug gdb using gdb ?
Date: Tue, 07 Aug 2012 14:22:00 -0000	[thread overview]
Message-ID: <20120807142141.GA8073@host2.jankratochvil.net> (raw)
In-Reply-To: <CA+zazRVEWjmAhfoXO4vG6rX5Eiry_Un6AF26pE8D+jbZei5iLg@mail.gmail.com>

On Tue, 07 Aug 2012 16:18:01 +0200, Smith John wrote:
>    but  how can I send  command  to  the  debugged  gdb procedure
> which is children  process  ,

I find most easy to make child GDB non-interactive.  So that you do not have
to re-enter the exact commands to reproduce the problem each time.  Therefore
use -ex (or -x) for the child GDB:

gdb -ex 'b breakpoint.c:9152' -ex r --args ./gdb ~/t/try5 -ex 'b display' -ex r -ex up -ex b -ex 'info b' -ex 'p/x $pc' -ex 'info line *$pc' -ex 'set confirm no' -ex q -q


Regards,
Jan


      parent reply	other threads:[~2012-08-07 14:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-07 14:18 Smith John
2012-08-07 14:21 ` Tom Emerson
2012-08-07 14:22 ` Jan Kratochvil [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=20120807142141.GA8073@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=baseboy126@gmail.com \
    --cc=gdb@sourceware.org \
    /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