* Debugging gdb under gdb
@ 2009-07-08 23:52 Michael Eager
2009-07-09 0:02 ` Michael Snyder
2009-07-09 15:29 ` Jan Kratochvil
0 siblings, 2 replies; 5+ messages in thread
From: Michael Eager @ 2009-07-08 23:52 UTC (permalink / raw)
To: gdb
Hi --
When I try to run a test gdb under gdb, the host gdb hangs.
The hang occurs when the test gdb is executing pex_unix_exec_child().
As soon as the test gdb executes fork(), the host gdb hangs.
I've tried all of the permutations of follow-fork-mode
and detach-on-fork, with no luck. The host neither follows
the parent nor the child processes.
The host gdb is "GNU gdb Fedora (6.8-32.fc10)".
Suggestions?
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Debugging gdb under gdb
2009-07-08 23:52 Debugging gdb under gdb Michael Eager
@ 2009-07-09 0:02 ` Michael Snyder
2009-07-09 0:21 ` Michael Eager
2009-07-09 15:29 ` Jan Kratochvil
1 sibling, 1 reply; 5+ messages in thread
From: Michael Snyder @ 2009-07-09 0:02 UTC (permalink / raw)
To: Michael Eager; +Cc: gdb
Michael Eager wrote:
> Hi --
>
> When I try to run a test gdb under gdb, the host gdb hangs.
>
> The hang occurs when the test gdb is executing pex_unix_exec_child().
> As soon as the test gdb executes fork(), the host gdb hangs.
> I've tried all of the permutations of follow-fork-mode
> and detach-on-fork, with no luck. The host neither follows
> the parent nor the child processes.
>
> The host gdb is "GNU gdb Fedora (6.8-32.fc10)".
>
> Suggestions?
Are you stepping or continuing when this occurs?
There is a point, somewhere around where gdb is forking the child,
where stepping always hangs for me. I don't remember exactly where.
I work around it by setting a breakpoint somewhere just after, and
continuing.
It's been a while since I've done this... but see if that helps.
Michael
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Debugging gdb under gdb
2009-07-09 0:02 ` Michael Snyder
@ 2009-07-09 0:21 ` Michael Eager
0 siblings, 0 replies; 5+ messages in thread
From: Michael Eager @ 2009-07-09 0:21 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb
Michael Snyder wrote:
> Michael Eager wrote:
>> Hi --
>>
>> When I try to run a test gdb under gdb, the host gdb hangs.
>>
>> The hang occurs when the test gdb is executing pex_unix_exec_child().
>> As soon as the test gdb executes fork(), the host gdb hangs.
>> I've tried all of the permutations of follow-fork-mode
>> and detach-on-fork, with no luck. The host neither follows
>> the parent nor the child processes.
>>
>> The host gdb is "GNU gdb Fedora (6.8-32.fc10)".
>>
>> Suggestions?
>
> Are you stepping or continuing when this occurs?
>
> There is a point, somewhere around where gdb is forking the child,
> where stepping always hangs for me. I don't remember exactly where.
> I work around it by setting a breakpoint somewhere just after, and
> continuing.
I've tried both stepping and continuing. I set breakpoints in
the code shared between parent & child (where it checks the pid)
and also on both paths. None of the breakpoints are hit.
The host gdb also hangs when there are no breakpoints set and
I just run the test gdb.
> It's been a while since I've done this... but see if that helps.
The call to pex_unix_exec_child() is in find_charset_names().
My workaround is to have the host gdb force a return from
find_charset_names() in the test gdb, so it never tries to
do a fork().
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Debugging gdb under gdb
2009-07-08 23:52 Debugging gdb under gdb Michael Eager
2009-07-09 0:02 ` Michael Snyder
@ 2009-07-09 15:29 ` Jan Kratochvil
2009-07-09 16:05 ` Michael Eager
1 sibling, 1 reply; 5+ messages in thread
From: Jan Kratochvil @ 2009-07-09 15:29 UTC (permalink / raw)
To: Michael Eager; +Cc: gdb
On Thu, 09 Jul 2009 01:52:27 +0200, Michael Eager wrote:
> When I try to run a test gdb under gdb, the host gdb hangs.
...
> The host gdb is "GNU gdb Fedora (6.8-32.fc10)".
From the GDB version assuming you did hit a Fedora kernel problem tracked at:
https://bugzilla.redhat.com/show_bug.cgi?id=486564
It is fixed in Fedora-11 kernels, Fedora-10 will get a backport - or may
already got one). From my experience Fedora-11 kernels also work fine with
Fedora-10 OS (but be sure to have /usr/bin/rpm from the latest Fedora-10
update before installing any Fedora-11 package)
Sorry,
Jan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Debugging gdb under gdb
2009-07-09 15:29 ` Jan Kratochvil
@ 2009-07-09 16:05 ` Michael Eager
0 siblings, 0 replies; 5+ messages in thread
From: Michael Eager @ 2009-07-09 16:05 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb
Jan Kratochvil wrote:
> On Thu, 09 Jul 2009 01:52:27 +0200, Michael Eager wrote:
>> When I try to run a test gdb under gdb, the host gdb hangs.
> ...
>> The host gdb is "GNU gdb Fedora (6.8-32.fc10)".
>
>>From the GDB version assuming you did hit a Fedora kernel problem tracked at:
> https://bugzilla.redhat.com/show_bug.cgi?id=486564
>
> It is fixed in Fedora-11 kernels, Fedora-10 will get a backport - or may
> already got one). From my experience Fedora-11 kernels also work fine with
> Fedora-10 OS (but be sure to have /usr/bin/rpm from the latest Fedora-10
> update before installing any Fedora-11 package)
Thanks for the info.
I'll hope for a kernel-2.6.30 backport to F10, or maybe I'll build it myself.
I'm still recovering from the trauma of upgrading from Fedora 8.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-07-09 16:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-08 23:52 Debugging gdb under gdb Michael Eager
2009-07-09 0:02 ` Michael Snyder
2009-07-09 0:21 ` Michael Eager
2009-07-09 15:29 ` Jan Kratochvil
2009-07-09 16:05 ` Michael Eager
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox