From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 925 invoked by alias); 3 Sep 2009 22:52:37 -0000 Received: (qmail 915 invoked by uid 22791); 3 Sep 2009 22:52:36 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Sep 2009 22:52:32 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 3547A2BAB88 for ; Thu, 3 Sep 2009 18:52:30 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id njaLVOLuvSbt for ; Thu, 3 Sep 2009 18:52:30 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 028002BAB4A for ; Thu, 3 Sep 2009 18:52:30 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id D9879F589A; Thu, 3 Sep 2009 15:52:19 -0700 (PDT) Date: Thu, 03 Sep 2009 22:52:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: Re: RFC: Mark outer frames Message-ID: <20090903225219.GA1266@adacore.com> References: <20090828213237.GA9175@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090828213237.GA9175@caradoc.them.org> User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00099.txt.bz2 > This patch was originally for an entirely different problem, namely, > the dreaded "Value is not active" error. What happens with that is > that we connect to some target, and we're in the middle of its startup > code before there's a stack frame. No unwinder thinks we have a way > out of this frame, so nothing returns a valid this_id. So the frame > id is null_frame_id - which is overloaded to mean 'unknown id' and > 'no frame at all'. The value checks are using it one way and the > unwinder is using it the other. I just started looking at PR/9786: info frame: generates an error when remote debugging Basically, on x86: (gdb) target rem :4444 Remote debugging using :4444 0xb7f6d840 in _start () from /lib/ld-linux.so.2 (gdb) info frame Stack level 0, frame at 0x0: eip = 0xb7f6d840 in _start; saved eip /[...]/findvar.c:304: internal-error: value_of_register_lazy: Assertion `frame_id_p (get_frame_id (frame))' failed. This is the same issue as above, I believe, and your patch fixes the issue too. After applying it, I get: (gdb) info frame Stack level 0, frame at 0x0: eip = 0xb7f6d840 in _start; saved eip 0xb7f6d840 Outermost frame: unwinder did not report frame ID Arglist at unknown address. Locals at unknown address, Previous frame's sp in esp So, should we apply you patch? (we don't have time for much else except trying to see if we could plug that particular hole with a temporary, localized, patch... -- Joel