From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18450 invoked by alias); 13 Feb 2007 19:33:27 -0000 Received: (qmail 18442 invoked by uid 22791); 13 Feb 2007 19:33:27 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 13 Feb 2007 19:33:20 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id 53ECD48D0D0; Tue, 13 Feb 2007 14:31:17 -0500 (EST) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07444-01-8; Tue, 13 Feb 2007 14:31:17 -0500 (EST) Received: from takamaka.act-europe.fr (unknown [70.71.0.212]) by nile.gnat.com (Postfix) with ESMTP id 0D67E48D0C6; Tue, 13 Feb 2007 14:31:17 -0500 (EST) Received: by takamaka.act-europe.fr (Postfix, from userid 1000) id CE92F34C099; Tue, 13 Feb 2007 11:32:22 -0800 (PST) Date: Wed, 14 Feb 2007 08:51:00 -0000 From: Joel Brobecker To: Mark Kettenis , Wiljan.Derks@zonnet.nl, gdb@sourceware.org Subject: Re: How to tell gdb about dlls using remote protocol Message-ID: <20070213193222.GB32195@adacore.com> References: <003f01c7457c$0f2d8090$9600000a@kamer> <20070131223113.GA15122@nevyn.them.org> <20070201175311.GG17864@adacore.com> <200702072214.l17MER45023107@brahms.sibelius.xs4all.nl> <20070207221644.GA26833@nevyn.them.org> <200702082114.l18LEbGk029498@brahms.sibelius.xs4all.nl> <20070208230033.GB4258@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070208230033.GB4258@nevyn.them.org> User-Agent: Mutt/1.4.2.2i 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: 2007-02/txt/msg00111.txt.bz2 > > else if (cache->pc == 0 && frame_pc_unwind (next_frame) != 0) > > > > What do you think of that? > > Can we actually check for a failure to find the start address? Using > pc == 0 is unfortunate - we keep encountering people who link code at > zero. The problem is in the way we designed frame_func_unwind: It returns zero if we couldn't find the function start, which cannot be differentiated from the case where the function actually starts at address zero (which I didn't think I would ever encounter). I think in the long term, we might want to adjust frame_func_unwind to return a be something like: int frame_func_unwind (struct frame_info *fi, CORE_ADDR *addr) The return value would be non-zero only if the function could be found. In the short-term, Mark's proposal seems a good way to make progress for little cost. > Oh, I guess there's no way; we already use the pc != 0 check in the > same function. Yep, same issue. -- Joel