From: Jim Blandy <jimb@redhat.com>
To: Mark Kettenis <kettenis@gnu.org>
Cc: ezannoni@redhat.com, gdb-patches@sources.redhat.com
Subject: Re: [RFA] Don't apply line-number tweaks for non-GCC compilers
Date: Tue, 09 Nov 2004 19:54:00 -0000 [thread overview]
Message-ID: <vt2d5ym7qao.fsf@zenia.home> (raw)
In-Reply-To: <200411091315.iA9DFrdB090647@elgar.sibelius.xs4all.nl>
For what it's worth, this change implements the suggestion I made.
Mark Kettenis <kettenis@gnu.org> writes:
> Date: Wed, 20 Oct 2004 00:15:02 +0200 (CEST)
> From: Mark Kettenis <mark.kettenis@xs4all.nl>
>
> Ping!
>
> - GDB's stabs reader tweaks line number information, in a way that's
> not appropriate for non-GCC stabs. Mark Kettenis posted a patch,
> and I suggested a revision; I think that's where it stands.
>
> http://sources.redhat.com/ml/gdb-patches/2004-09/msg00234.html
>
> I had a follow-up patch, but I lost it when I accidentally did an rm
> -rf of my GDB working directory. Anyway, here's a new one that
> implements Jim's suggestion. OK?
>
> I'd really like to check this in on the new release branch too, since
> I promised to fix this a long time ago.
>
> Mark
>
>
> Index: ChangeLog
> from Mark Kettenis <kettenis@gnu.org>
>
> * dbxread.c (process_one_symbol): Do not adjust address of first
> N_SLINE stab for a function for code generated by non-GCC
> compilers.
>
>
> Index: dbxread.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/dbxread.c,v
> retrieving revision 1.74
> diff -u -p -r1.74 dbxread.c
> --- dbxread.c 11 Sep 2004 10:24:46 -0000 1.74
> +++ dbxread.c 19 Oct 2004 20:45:53 -0000
> @@ -2927,11 +2927,26 @@ process_one_symbol (int type, int desc,
> /* Relocate for dynamic loading and for ELF acc fn-relative syms. */
> valu += function_start_offset;
>
> - /* If this is the first SLINE note in the function, record it at
> - the start of the function instead of at the listed location. */
> + /* GCC 2.95.3 emits the first N_SLINE stab somwehere in the
> + middle of the prologue instead of right at the start of the
> + function. To deal with this we record the address for the
> + first N_SLINE stab to be the start of the function instead of
> + the listed location. We really shouldn't to this. When
> + compiling with optimization, this first N_SLINE stab might be
> + optimized away. Other (non-GCC) compilers don't emit this
> + stab at all. There is no real harm in having an extra
> + numbered line, although it can be a bit annoying for the
> + user. However, it totally screws up our testsuite.
> +
> + So for now, keep adjusting the address of the first N_SLINE
> + stab, but only for code compiled with GCC. */
> +
> if (within_function && sline_found_in_function == 0)
> {
> - record_line (current_subfile, desc, last_function_start);
> + if (processing_gcc_compilation == 2)
> + record_line (current_subfile, desc, last_function_start);
> + else
> + record_line (current_subfile, desc, valu);
> sline_found_in_function = 1;
> }
> else
next prev parent reply other threads:[~2004-11-09 19:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-10 22:15 PATCH: Step down from maintainerships Jim Blandy
[not found] ` <16752 dot 3082 dot 255249 dot 837515 at localhost dot redhat dot com>
2004-10-15 17:51 ` Elena Zannoni
2004-10-17 19:59 ` Jim Blandy
2004-10-19 19:43 ` Jim Blandy
2004-10-19 22:14 ` [RFA] Don't apply line-number tweaks for non-GCC compilers Mark Kettenis
2004-10-19 22:15 ` Mark Kettenis
2004-11-09 13:16 ` Mark Kettenis
2004-11-09 19:54 ` Jim Blandy [this message]
2004-11-18 22:38 ` Mark Kettenis
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=vt2d5ym7qao.fsf@zenia.home \
--to=jimb@redhat.com \
--cc=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@gnu.org \
/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