Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Jerome Guitton <guitton@act-europe.fr>
Cc: Mark Kettenis <kettenis@chello.nl>,
	gdb-patches@sources.redhat.com,
	Michael Chastain <mec.gnu@mindspring.com>
Subject: Re: [RFA] x86 - jump instruction after the prologue
Date: Sun, 08 Aug 2004 21:36:00 -0000	[thread overview]
Message-ID: <20040808213614.GA20400@nevyn.them.org> (raw)
In-Reply-To: <20040512113101.GA1996@act-europe.fr>

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  <dan@debian.org>

	* 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."
 }
 


  reply	other threads:[~2004-08-08 21:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-19 17:32 Jerome Guitton
2004-04-27 16:37 ` Jerome Guitton
2004-04-29 16:24   ` Mark Kettenis
2004-04-29 16:29     ` Jerome Guitton
2004-05-10 20:48     ` Daniel Jacobowitz
2004-05-12 10:31       ` Jerome Guitton
2004-08-08 21:36         ` Daniel Jacobowitz [this message]
2004-08-08 21:46           ` Michael Chastain
2004-08-08 22:07           ` Mark Kettenis
2004-08-08 22:15             ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040808213614.GA20400@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=guitton@act-europe.fr \
    --cc=kettenis@chello.nl \
    --cc=mec.gnu@mindspring.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox