From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27133 invoked by alias); 3 Jun 2002 23:41:12 -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 27108 invoked from network); 3 Jun 2002 23:41:08 -0000 Received: from unknown (HELO branoic) (66.19.120.49) by sources.redhat.com with SMTP; 3 Jun 2002 23:41:08 -0000 Received: from drow by branoic with local (Exim 3.35 #1 (Debian)) id 17F1Rb-0000ak-00; Mon, 03 Jun 2002 19:40:59 -0400 Date: Mon, 03 Jun 2002 16:41:00 -0000 From: Daniel Jacobowitz To: "H . J . Lu" Cc: Jakub Jelinek , echristo@redhat.com, binutils@sources.redhat.com, GDB , gcc-patches@gcc.gnu.org Subject: Re: PATCH: Use stabs for Linux/mips (Re: binutils is broken on ELF/MIPS) Message-ID: <20020603234058.GA2262@branoic.them.org> Mail-Followup-To: "H . J . Lu" , Jakub Jelinek , echristo@redhat.com, binutils@sources.redhat.com, GDB , gcc-patches@gcc.gnu.org References: <20020602224240.A17723@lucon.org> <20020602230331.A18107@lucon.org> <20020602231016.A18236@lucon.org> <20020603141808.GA24114@branoic.them.org> <20020603092959.A27426@lucon.org> <20020603104131.A28590@lucon.org> <20020603115703.A29881@lucon.org> <20020604003246.C20867@sunsite.ms.mff.cuni.cz> <20020603153716.A1294@lucon.org> <20020603162527.A2073@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020603162527.A2073@lucon.org> User-Agent: Mutt/1.3.28i X-SW-Source: 2002-06/txt/msg00031.txt.bz2 On Mon, Jun 03, 2002 at 04:25:27PM -0700, H . J . Lu wrote: > On Mon, Jun 03, 2002 at 03:37:16PM -0700, H . J . Lu wrote: > > On Tue, Jun 04, 2002 at 12:32:46AM +0200, Jakub Jelinek wrote: > > > On Mon, Jun 03, 2002 at 11:57:03AM -0700, H . J . Lu wrote: > > > > On Mon, Jun 03, 2002 at 10:41:31AM -0700, H . J . Lu wrote: > > > > > > > > > > Jakub, I believe your patch > > > > > > > > > > http://sources.redhat.com/ml/binutils/2001-11/msg00580.html > > > > > > > > > > breaks ELF/MIPS since it didn't modify ELF/MIPS to support relocating > > > > > STT_SECTION sym in SHF_MERGE section. As the result, the ELF/MIPS > > > > > linker generates incorrect debug information. Could you please look > > > > > into it? > > > > > > > > > > BTW, I don't know if ELF/MIPS is the only broken target. > > > > > > > > > > Thanks. > > > > > > > > > > > > > > > > > > This patch makes gdb 5.2 happy. However, I have no ideas if it is > > > > correct. Could someone please take a look? > > > > > > If looks fine to me, if it works, I'm all for it. > > > > > > > I was wrong to say gdb 5.2 was happy. It didn't complain now. But > > I still can't debug Linux/mipsel binaries compled with gcc 3.1.1. > > > > > > It turned out gas doesn't support dwarf debug info for Linux/mipsel > at all. ".file" and ".loc" don't do much for dwarf. Since no much > has been done for dwarf on Linux/mipsel, I am submitting this > patch to use stabs instead of DWARF on Linux/mipsel. Please don't. I'd rather turn off COFF debugging for Linux/mipsel, which I suggested the last time this came up (about a year ago). There's no good reason it won't work if we hook the DWARF-2 handlers up instead of the COFF ones - probably should tie that to MIPS_STAB_ELF. > 2002-01-12 H.J. Lu > > * config/mips/linux.h (PREFERRED_DEBUGGING_TYPE): Set to > DBX_DEBUG. > > --- gcc/config/mips/linux.h.stabs Fri Jan 11 09:30:08 2002 > +++ gcc/config/mips/linux.h Sat Jan 12 10:50:10 2002 > @@ -289,3 +289,7 @@ void FN () \ > it. */ > #undef ASM_OUTPUT_REG_PUSH > #undef ASM_OUTPUT_REG_POP > + > +/* Use stabs instead of DWARF debug format. */ > +#undef PREFERRED_DEBUGGING_TYPE > +#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer