From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13991 invoked by alias); 7 Nov 2004 17:16:00 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 13968 invoked from network); 7 Nov 2004 17:15:58 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 7 Nov 2004 17:15:58 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CQqdx-0002OE-MM; Sun, 07 Nov 2004 12:15:57 -0500 Date: Mon, 08 Nov 2004 00:19:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: gcc@gcc.gnu.org, binutils@sources.redhat.com, echristo@redhat.com, seufer@csv.ica.uni-stuttgart.de, gdb@sources.redhat.com Subject: Re: Mixing 32-bit and 64-bit DWARF2/3 sections Message-ID: <20041107171557.GA9121@nevyn.them.org> Mail-Followup-To: Mark Kettenis , gcc@gcc.gnu.org, binutils@sources.redhat.com, echristo@redhat.com, seufer@csv.ica.uni-stuttgart.de, gdb@sources.redhat.com References: <200411071428.iA7ES7Fx003013@elgar.sibelius.xs4all.nl> <20041107153144.GA7039@nevyn.them.org> <200411071628.iA7GSfwL022610@elgar.sibelius.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200411071628.iA7GSfwL022610@elgar.sibelius.xs4all.nl> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-11/txt/msg00060.txt.bz2 On Sun, Nov 07, 2004 at 05:28:41PM +0100, Mark Kettenis wrote: > Date: Sun, 7 Nov 2004 10:31:44 -0500 > From: Daniel Jacobowitz > > On Sun, Nov 07, 2004 at 03:28:07PM +0100, Mark Kettenis wrote: > > Currently GDB barfs when you use it on an executable that contains > > compilation units that mix 32-bit and 64-bit DWARF sections. Looking > > at the (latest?) DWARF3 draft it doesn't seem to be unreasonable that > > it does so: > > > > "The 32-bit and 64-bit DWARF format conventions must not be > > intermixed within a single compilation unit." > > I'd read that as saying that GDB should support what you describe. > This isn't mixing them within a single compilation unit. What falls > down? > > No I'm really talking about mixing 32-bit and 64-bit DWARF format > within the same compilation unit. In the case of OpenBSD/mips64 GCC > generates a 32-bit .debug_info section and .file directives that > contain the line info. These .file directives are then converted by > gas into 64-bit .debug_line sections. > > When GDB reads these it dumps core. I'm working on patches to fix > this, but I'm not yet completely satisfied with them. Ah! I understand now, thanks. I think GDB should complain noisily about this. One nice fix to this in gas would be for it to detect the format of .debug_info and match it when generating .debug_line. Another would be to add command line options for 32-bit and 64-bit .debug_line and make GCC instruct it on which to use - that's a bit more complicated to implement. -- Daniel Jacobowitz