From: Daniel Jacobowitz <drow@false.org>
To: Alex Bligh <alex@alex.org.uk>
Cc: gdb@sourceware.org
Subject: Re: thread_db_get_info: cannot get thread info: generic error on fork()/execvp()
Date: Wed, 30 Aug 2006 18:14:00 -0000 [thread overview]
Message-ID: <20060830181439.GA29333@nevyn.them.org> (raw)
In-Reply-To: <44F5BCAB.7050400@alex.org.uk>
On Wed, Aug 30, 2006 at 05:28:27PM +0100, Alex Bligh wrote:
> Hi,
>
> Now we have a pretty trivial test case to reproduce this problem,
> as per the 20 line program at the bottom of bug 2149,
> is there any chance at all of getting a fix? I currently
> can't debug my app at all because it suffers from this
> problem. I am willing to help in any way I can to debug
> this or test.
Well, I can reproduce the problem. I can see roughly what's wrong,
too. We still think we're attached to the old thread.
Could you try this patch?
--
Daniel Jacobowitz
CodeSourcery
2006-08-30 Daniel Jacobowitz <dan@codesourcery.com>
* infrun.c (handle_inferior_event): Context switch after fork
and exec events.
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.214
diff -u -p -r1.214 infrun.c
--- infrun.c 19 Aug 2006 03:19:00 -0000 1.214
+++ infrun.c 30 Aug 2006 18:13:51 -0000
@@ -1411,6 +1411,12 @@ handle_inferior_event (struct execution_
pending_follow.fork_event.parent_pid = PIDGET (ecs->ptid);
pending_follow.fork_event.child_pid = ecs->ws.value.related_pid;
+ if (!ptid_equal (ecs->ptid, inferior_ptid))
+ {
+ context_switch (ecs);
+ flush_cached_frames ();
+ }
+
stop_pc = read_pc ();
stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid, 0);
@@ -1469,6 +1475,12 @@ handle_inferior_event (struct execution_
ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
inferior_ptid = ecs->saved_inferior_ptid;
+ if (!ptid_equal (ecs->ptid, inferior_ptid))
+ {
+ context_switch (ecs);
+ flush_cached_frames ();
+ }
+
/* If no catchpoint triggered for this, then keep going. */
if (ecs->random_signal)
{
next prev parent reply other threads:[~2006-08-30 18:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060726214801.14303.qmail@sourceware.org>
[not found] ` <20060718124206.30754.qmail@sourceware.org>
[not found] ` <20060731130001.GA1823@nevyn.them.org>
[not found] ` <44DF8D67.8090502@alex.org.uk>
2006-08-30 16:28 ` Alex Bligh
2006-08-30 18:14 ` Daniel Jacobowitz [this message]
2006-08-31 10:30 ` Alex Bligh
2006-08-31 12:20 ` Daniel Jacobowitz
2006-08-31 14:22 ` Alex Bligh
2006-09-10 16:27 ` Daniel Jacobowitz
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=20060830181439.GA29333@nevyn.them.org \
--to=drow@false.org \
--cc=alex@alex.org.uk \
--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