From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23767 invoked by alias); 3 Jun 2002 23:25:31 -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 23744 invoked from network); 3 Jun 2002 23:25:29 -0000 Received: from unknown (HELO sccrmhc01.attbi.com) (204.127.202.61) by sources.redhat.com with SMTP; 3 Jun 2002 23:25:29 -0000 Received: from ocean.lucon.org ([12.234.143.38]) by sccrmhc01.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020603232529.KFSX29266.sccrmhc01.attbi.com@ocean.lucon.org>; Mon, 3 Jun 2002 23:25:29 +0000 Received: by ocean.lucon.org (Postfix, from userid 1000) id EAD89125BB; Mon, 3 Jun 2002 16:25:27 -0700 (PDT) Date: Mon, 03 Jun 2002 16:25:00 -0000 From: "H . J . Lu" To: Jakub Jelinek , echristo@redhat.com Cc: binutils@sources.redhat.com, GDB , gcc-patches@gcc.gnu.org Subject: PATCH: Use stabs for Linux/mips (Re: binutils is broken on ELF/MIPS) Message-ID: <20020603162527.A2073@lucon.org> References: <20020603050906.GA19164@branoic.them.org> <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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020603153716.A1294@lucon.org>; from hjl@lucon.org on Mon, Jun 03, 2002 at 03:37:16PM -0700 X-SW-Source: 2002-06/txt/msg00030.txt.bz2 --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1343 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. H.J. --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="gcc-mips-stabs.patch" Content-length: 452 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 --GvXjxJ+pjyke8COw--