Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>
To: gdb@sourceware.cygnus.com
Cc: Eli Zaretskii <eliz@is.elta.co.il>
Subject: Re: Regressions problem (200 failures)
Date: Sat, 01 Apr 2000 00:00:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.10.10003021658190.11752-100000@acp3bf> (raw)

This is an answer to < 20000301123337B.mitchell@codesourcery.com >

[I've been pointed to this discussion by Eli Zaretskii, but I'm not on the
gdb mailing list, myself. I just read through it on the WWW archive. So
please, if you answer, Cc: to me, if possible. Thank you.]

The point raised in this discussion has, by coincidence, caused a similar
problem, with the DJGPP release version of GCC 2.95.2 and GDB 4.18. The
problem is that for very short functions (one, maybe two lines of actual
code, between the braces), gdb would not stop *at all* if you 'step' into
a function from outside, because of badly positioned line number debug
symbols.

Looking at the assembly generated by GCC, it turned out that the problem
lies in the way the function prologues and epilogues were written,
compared to earlier GCC releases. So, to answer one of the questions
raised in your discussion: to some extent, the prologue/epilogue have
indeed changed, since 1994. The whole method of outputting prologues has
been changed, since gcc-2.8.1, it seems, even though the typical set of
machine operations has stayed the same, for this platform. Originally,
prologues and epilogues were generated directly as assembly, by a
specialized function, i.e. they were not subject to RTL transformations.
Now, by default at least, they're generated as RTL, rather early in the
compilation, and subject to modification along with the 'real code'.

As to the question where the first line number label ought to be put, and
what line it should point, I think the behaviour of previous GCC/GDB
combinations was perfectly sane: the line number opcode is output right
after the prologue, and it points to the line the next machine instruction
originated from (initialization of an automatic variable, if present, an
executable statement otherwise). 

Opposed to this expected behaviour, gcc-2.95.2 outputs a line note
*before* the prologue (and one for the closing brace after the epilogue,
instead of before it, as it used to be). By disabling the RTL-style
prologue generating mechanism (undocumented GCC option
-mno-schedule-prologue), you get back the traditional behaviour.

Currently, the conclusion of discussion between me and Eli is that this
constitutes a bug in gcc-2.95.2. Wether or not that's still present in the
current snapshot remains to be checked. AFAICS, the GCC patch from Mark
Mitchell that caused all this hassle for your GDB testsuite meant to fix
that, but didn't work out as planned.

Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.



             reply	other threads:[~2000-04-01  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-01  0:00 Hans-Bernhard Broeker [this message]
     [not found] <200003021010.LAA13693@reisser.regent.e-technik.tu-muenchen.de>
     [not found] ` <20000302023420H.mitchell@codesourcery.com>
     [not found]   ` <200003021143.MAA14294@reisser.regent.e-technik.tu-muenchen.de>
2000-03-02  8:56     ` Mark Mitchell
     [not found]   ` <200003021246.e22CkWL00549@delius.kettenis.local>
2000-04-01  0:00     ` Mark Mitchell
2000-04-01  0:00     ` Peter.Schauer
  -- strict thread matches above, loose matches on Subject: below --
2000-03-01  9:49 Donn Terry
     [not found] ` <20000301123337B.mitchell@codesourcery.com>
2000-04-01  0:00   ` Jim Kingdon
2000-04-01  0:00 ` Donn Terry

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=Pine.LNX.4.10.10003021658190.11752-100000@acp3bf \
    --to=broeker@physik.rwth-aachen.de \
    --cc=eliz@is.elta.co.il \
    --cc=gdb@sourceware.cygnus.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