From: Doug Evans <xdje42@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guile-user@gnu.org,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
saugustine@google.com
Subject: Re: Fun with LD_PRELOAD
Date: Wed, 05 Feb 2014 18:21:00 -0000 [thread overview]
Message-ID: <CAP9bCMSbPVysubZuXvxNCYcMQAu=kvRm5Q7BpzicbsKJ_ESh_A@mail.gmail.com> (raw)
In-Reply-To: <8761ovp1hw.fsf@gnu.org>
On Tue, Feb 4, 2014 at 3:21 AM, Ludovic Courtès <ludo@gnu.org> wrote:
> Hi, Doug,
>
> Doug Evans <xdje42@gmail.com> skribis:
>
>> It's kinda useful to see the system call tracing amongst gdb's own
>> debug output, but my real goal is to explore ways of exercising gdb
>> that are otherwise harder to do.
>> With this I can script what happens when gdb does ptrace,waitpid,tkill,etc.
>> Whether this exploration yields anything useful ... TBD.
>
> Looks fun. So the main application would be to stress-test GDB and see
> if it misses signals sent to application threads right when GDB is about
> to stop them, for example, right?
Something like that.
For example, a colleague at Google tripped over a bug that requires a
specific timing to replicate. I don't have all the details at hand,
but I think I'm hitting the same assert.
infrun.c:1948: internal-error: resume: Assertion
`pc_in_thread_step_range (pc, tp)' failed.
AIUI, It happens, for example, when the user does a "next", and a
signal arrives on another thread while the thread being next'd has
stepped into a subroutine (thus requiring gdb to step out to implement
the semantics of "next"). I now have a simple repro (at least for the
assert I'm seeing), and it was very straightforward to write. It
involves tracking the PTRACE_SINGLESTEP being issued to one thread
(that implement "next") and at the right time send a signal to another
thread.
I've made it very easy to add more syscalls, and the wrapping
machinery itself is not gdb specific. Maybe it would be useful in
either apps, I don't know.
next prev parent reply other threads:[~2014-02-05 18:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-02 22:08 Doug Evans
2014-02-04 11:21 ` Ludovic Courtès
2014-02-05 18:21 ` Doug Evans [this message]
2014-02-05 19:11 ` Pedro Alves
2014-02-06 7:58 ` Doug Evans
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='CAP9bCMSbPVysubZuXvxNCYcMQAu=kvRm5Q7BpzicbsKJ_ESh_A@mail.gmail.com' \
--to=xdje42@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=guile-user@gnu.org \
--cc=ludo@gnu.org \
--cc=saugustine@google.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