From: Tom Tromey <tromey@redhat.com>
To: Kevin Pouget <kevin.pouget@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Dejagnu testing issue
Date: Thu, 20 Oct 2011 15:04:00 -0000 [thread overview]
Message-ID: <m31uu7r9jo.fsf@fleche.redhat.com> (raw)
In-Reply-To: <CAPftXULqAZSLVrHf_FZcQtP4Lu4q5RW5N4bRVq3gVtGsBW8_+w@mail.gmail.com> (Kevin Pouget's message of "Thu, 20 Oct 2011 16:47:10 +0200")
>>>>> "Kevin" == Kevin Pouget <kevin.pouget@gmail.com> writes:
Kevin> how can I read a value from what GDB writes, and use it later to
Kevin> validate some tests.
Kevin> For instance, the pid:
Kevin> I know it's it "info inferiors" --> ".*process HERE .*", I would like
Kevin> to save it, and then do something like "detach", "attach $PID"
Kevin> (don't get me wrong, I know there are some alternatives to get the
Kevin> PID, but I really want to read it from a GDB command)
You can do it, with some difficulty, using gdb_test_multiple and
examining expect_out in your match. This is done in some places in the
code.
Kevin> By the way, is it a normal that I can't set a thread breakpoint this way:
>> break <somewhere> thread $_thread
>> Junk after thread keyword.
Kevin> (that would have bypassed the problem described above !)
Yes, the 'thread' modifier just takes an integer.
You can use eval though:
eval "break ... thread %d", $_thread
Tom
next prev parent reply other threads:[~2011-10-20 15:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-20 14:56 Kevin Pouget
2011-10-20 15:02 ` Jan Kratochvil
2011-10-20 15:04 ` Tom Tromey [this message]
2011-10-21 8:33 ` Kevin Pouget
2011-10-21 8:42 ` Jan Kratochvil
2011-10-24 9:15 ` Kevin Pouget
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=m31uu7r9jo.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=kevin.pouget@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