From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18342 invoked by alias); 8 Aug 2004 21:36:18 -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 18333 invoked from network); 8 Aug 2004 21:36:18 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 8 Aug 2004 21:36:18 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1BtvKx-0005aq-G3; Sun, 08 Aug 2004 17:36:15 -0400 Date: Sun, 08 Aug 2004 21:36:00 -0000 From: Daniel Jacobowitz To: Jerome Guitton Cc: Mark Kettenis , gdb-patches@sources.redhat.com, Michael Chastain Subject: Re: [RFA] x86 - jump instruction after the prologue Message-ID: <20040808213614.GA20400@nevyn.them.org> Mail-Followup-To: Jerome Guitton , Mark Kettenis , gdb-patches@sources.redhat.com, Michael Chastain References: <20040419173249.GA22201@act-europe.fr> <20040427163725.GA7319@act-europe.fr> <200404291624.i3TGO7PP003462@elgar.kettenis.dyndns.org> <20040510202721.GB15632@nevyn.them.org> <20040512113101.GA1996@act-europe.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040512113101.GA1996@act-europe.fr> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-08/txt/msg00274.txt.bz2 On Wed, May 12, 2004 at 01:31:01PM +0200, Jerome Guitton wrote: > Daniel Jacobowitz (drow@false.org): > > > Also, should we write i386-prologue.c in assembly to avoid this > > problem? That's what Fred did for SH to avoid a similar difficulty. > > Can't we compile this file without debug info? Yes indeed, and that fixes it. Background analysis of the problem: GCC uses the .loc directive to emit line number information when using dwarf2 and a recent GNU assembler. There is no way for GCC to force the emission of a DW_LNE_end_sequence marker, so the last .loc directive is assumed to continue until the end of the .text section, which includes all of the assembly functions in i386-prologue.c which are written out using asm(). I've made a note that gas should support a way to emit the EOS marker, and GCC should use it. Not hard to implement but I haven't got the time right now. In the mean time, this is a test of a prologue analyzer. Compiling it without debug information seems reasonable to me. Tested on i686-pc-linux-gnu, OK? -- Daniel Jacobowitz 2004-08-08 Daniel Jacobowitz * gdb.arch/i386-prologue.exp: Compile without debug information. Index: testsuite/gdb.arch/i386-prologue.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/i386-prologue.exp,v retrieving revision 1.8 diff -u -p -r1.8 i386-prologue.exp --- testsuite/gdb.arch/i386-prologue.exp 1 Aug 2004 14:28:51 -0000 1.8 +++ testsuite/gdb.arch/i386-prologue.exp 8 Aug 2004 21:31:57 -0000 @@ -44,7 +44,9 @@ if [istarget "i?86-*-cygwin*"] then { set additional_flags "additional_flags=-DSYMBOL_PREFIX=\"_\"" } -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } { +# Don't use "debug", so that we don't have line information for the assembly +# fragments. +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list $additional_flags]] != "" } { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." }