From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8119 invoked by alias); 5 Feb 2007 21:21:24 -0000 Received: (qmail 8109 invoked by uid 22791); 5 Feb 2007 21:21:23 -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; Mon, 05 Feb 2007 21:21:16 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id 7CF3648CBCD; Mon, 5 Feb 2007 16:21:14 -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 13027-01-10; Mon, 5 Feb 2007 16:21:13 -0500 (EST) Received: from takamaka.act-europe.fr (unknown [70.71.0.212]) by nile.gnat.com (Postfix) with ESMTP id C8F5848CB9E; Mon, 5 Feb 2007 16:21:13 -0500 (EST) Received: by takamaka.act-europe.fr (Postfix, from userid 1000) id 672FF34C099; Mon, 5 Feb 2007 13:22:16 -0800 (PST) Date: Mon, 05 Feb 2007 21:21:00 -0000 From: Joel Brobecker To: Wiljan Derks Cc: Robert Dewar , gdb@sourceware.org, Mark Kettenis Subject: Re: How to tell gdb about dlls using remote protocol Message-ID: <20070205212216.GH17864@adacore.com> References: <20070201175311.GG17864@adacore.com> <20070201225437.GA13740@nevyn.them.org> <20070201230301.GM17864@adacore.com> <20070201235944.GA16114@nevyn.them.org> <45C2D80E.2050403@adacore.com> <20070202114312.GA15239@nevyn.them.org> <20070202165155.GS17864@adacore.com> <20070202165619.GA30801@nevyn.them.org> <20070202173456.GT17864@adacore.com> <000801c74965$087eca00$9600000a@kamer> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000801c74965$087eca00$9600000a@kamer> 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/msg00031.txt.bz2 Wiljan, > The patch of Joel is based on a procedure that checks if code is in a > known dll. I think you are slightly confused. The little patch that I suggested (and labeled untested) is not based on any previous patch. Have you tried it without making the modifications you suggest below? > For that reason, I modified the code so that I check if the pc is > inside one of the sections of the program. My other patch that you are refering to is the one that forces GDB to trust %ebp in frameless functions that live in DLLs. This change was to work-around a problem that is totally unrelated from the one you are trying to solve. To re-explain the logic behind the suggestion I posted here, when we don't find the function start address (as in your case), we don't parse the prologue. In this case, the current code will fallback on using the default value for cache->sp_offset, which is unlikely to be right. My suggestion instead is to trust the %ebp register, for which we have found that we get better results (on Windows). -- Joel