Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* thread_db_get_info: cannot get thread info: generic error on fork()/execvp()
       [not found]     ` <44DF8D67.8090502@alex.org.uk>
@ 2006-08-30 16:28       ` Alex Bligh
  2006-08-30 18:14         ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Bligh @ 2006-08-30 16:28 UTC (permalink / raw)
  To: Alex Bligh; +Cc: gdb, Alex Bligh

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.

Alex


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: thread_db_get_info: cannot get thread info: generic error on fork()/execvp()
  2006-08-30 16:28       ` thread_db_get_info: cannot get thread info: generic error on fork()/execvp() Alex Bligh
@ 2006-08-30 18:14         ` Daniel Jacobowitz
  2006-08-31 10:30           ` Alex Bligh
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-08-30 18:14 UTC (permalink / raw)
  To: Alex Bligh; +Cc: gdb

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)
 	{


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: thread_db_get_info: cannot get thread info: generic error on  fork()/execvp()
  2006-08-30 18:14         ` Daniel Jacobowitz
@ 2006-08-31 10:30           ` Alex Bligh
  2006-08-31 12:20             ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Bligh @ 2006-08-31 10:30 UTC (permalink / raw)
  To: Alex Bligh, gdb; +Cc: Alex Bligh

Daniel,

Daniel Jacobowitz wrote:
> 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?

Yep. That fixes it, both on the test case, and on the real program.
I can now debug again. Woohoo! Thanks.

What's the chance of applying that in RCS and (ideally) providing
that and the previous thread fix so debugging as a backport to
the Ubuntu Dapper gdb.

Alex


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: thread_db_get_info: cannot get thread info: generic error on  fork()/execvp()
  2006-08-31 10:30           ` Alex Bligh
@ 2006-08-31 12:20             ` Daniel Jacobowitz
  2006-08-31 14:22               ` Alex Bligh
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-08-31 12:20 UTC (permalink / raw)
  To: Alex Bligh; +Cc: gdb

On Thu, Aug 31, 2006 at 11:30:33AM +0100, Alex Bligh wrote:
> What's the chance of applying that in RCS

Likely to happen soon.

> and (ideally) providing
> that and the previous thread fix so debugging as a backport to
> the Ubuntu Dapper gdb.

Obviously not our problem.  If you want fixes for Ubuntu, ask Ubuntu.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: thread_db_get_info: cannot get thread info: generic error on   fork()/execvp()
  2006-08-31 12:20             ` Daniel Jacobowitz
@ 2006-08-31 14:22               ` Alex Bligh
  2006-09-10 16:27                 ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Bligh @ 2006-08-31 14:22 UTC (permalink / raw)
  To: Alex Bligh, gdb; +Cc: Alex Bligh

Daniel Jacobowitz wrote:
> On Thu, Aug 31, 2006 at 11:30:33AM +0100, Alex Bligh wrote:
>> What's the chance of applying that in RCS
> 
> Likely to happen soon.

Thanks

>> and (ideally) providing
>> that and the previous thread fix so debugging as a backport to
>> the Ubuntu Dapper gdb.
> 
> Obviously not our problem.  If you want fixes for Ubuntu, ask Ubuntu.

OK will do. Would it be possible to drop the list (or me) a line with
the relevant RCS revisions in to fix this? I think there was an
earlier fix that needed to be applied as well (as per the PR).

Alex


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: thread_db_get_info: cannot get thread info: generic error on   fork()/execvp()
  2006-08-31 14:22               ` Alex Bligh
@ 2006-09-10 16:27                 ` Daniel Jacobowitz
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-09-10 16:27 UTC (permalink / raw)
  To: Alex Bligh; +Cc: gdb

On Thu, Aug 31, 2006 at 03:21:43PM +0100, Alex Bligh wrote:
> >>and (ideally) providing
> >>that and the previous thread fix so debugging as a backport to
> >>the Ubuntu Dapper gdb.
> >
> >Obviously not our problem.  If you want fixes for Ubuntu, ask Ubuntu.
> 
> OK will do. Would it be possible to drop the list (or me) a line with
> the relevant RCS revisions in to fix this? I think there was an
> earlier fix that needed to be applied as well (as per the PR).

This patch is:
  http://sourceware.org/ml/gdb-cvs/2006-09/msg00053.html

The other patch I was thinking of is probably this one:
  http://sourceware.org/ml/gdb-cvs/2006-07/msg00104.html

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-09-10 16:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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       ` thread_db_get_info: cannot get thread info: generic error on fork()/execvp() Alex Bligh
2006-08-30 18:14         ` Daniel Jacobowitz
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox