From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22776 invoked by alias); 9 Jul 2009 00:21:32 -0000 Received: (qmail 22765 invoked by uid 22791); 9 Jul 2009 00:21:32 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from shell4.bayarea.net (HELO shell4.bayarea.net) (209.128.82.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Jul 2009 00:21:23 +0000 Received: (qmail 9027 invoked from network); 8 Jul 2009 17:21:21 -0700 Received: from 209-128-106-254.bayarea.net (HELO redwood.eagercon.com) (209.128.106.254) by shell4.bayarea.net with SMTP; 8 Jul 2009 17:21:19 -0700 Message-ID: <4A5537F3.1020100@eagercon.com> Date: Thu, 09 Jul 2009 00:21:00 -0000 From: Michael Eager User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Michael Snyder CC: "gdb@sourceware.org" Subject: Re: Debugging gdb under gdb References: <4A55313B.8000006@eagercon.com> <4A553291.8040904@vmware.com> In-Reply-To: <4A553291.8040904@vmware.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00062.txt.bz2 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