From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7757 invoked by alias); 6 May 2003 00:12:24 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 7750 invoked from network); 6 May 2003 00:12:24 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 6 May 2003 00:12:24 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19Cq4b-0004gT-00; Mon, 05 May 2003 19:12:45 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19Cq48-0005J4-00; Mon, 05 May 2003 20:12:16 -0400 Date: Tue, 06 May 2003 00:12:00 -0000 From: Daniel Jacobowitz To: "J. Johnston" Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: dwarf2read.c patch Message-ID: <20030506001216.GA20285@nevyn.them.org> Mail-Followup-To: "J. Johnston" , gdb-patches@sources.redhat.com References: <3EB6E10A.50104@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3EB6E10A.50104@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-05/txt/msg00075.txt.bz2 On Mon, May 05, 2003 at 06:09:14PM -0400, J. Johnston wrote: > The following patch fixes a problem on ia64. In dwarf2read.c, > dwarf_decode_lines(), the function check_cu_functions() is called > to check for a specific scenario caused by gcc. > > The function takes an address and returns an address. In some > cases, it will return the lowpc value of the function rather than > the address that was input. > > On the ia64, this causes problems because the line table info spit > out by the compiler is often specified with relative addresses. > As well, ia64 addresses are special as they encode a slot number which goes > 0, 1, 2, then skips to the next quadword boundary. For example, > > 0x00, 0x01, 0x02, 0x10, 0x11, 0x12, 0x20, 0x21, 0x22, ... > > Addresses such as 0x0e or 0x0f are invalid and cause an error to > occur if, say, a breakpoint was attempted to be inserted there. > > Now, in dwarf_decode_lines(), if we update the address counter when we call > check_cu_functions(), adding relative offsets in subsequent entries often > results in > invalid addresses. > > This patch makes it so the check_cu_functions() call is only used to > alter the address passed to record_line(); the calculated address is left > untouched > so subsequent relative operations result in valid results. > > Tested on ia64 and x86. > > Ok to commit? I can't approve this, but I can say that that's certainly what I meant to do with the check_cu_functions. I feel really dumb for not noticing that I was corrupting the line state machine. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer