From: Jim Ingham <jingham@apple.com>
To: gdb-patches@sources.redhat.com
Subject: [patch] Fix to processing end of function stab in dbxread.c
Date: Wed, 10 Jul 2002 19:08:00 -0000 [thread overview]
Message-ID: <10111A6F-9473-11D6-AD3A-00039379E320@apple.com> (raw)
Index: dbxread.c
===================================================================
RCS file: /cvs/src/src/gdb/dbxread.c,v
retrieving revision 1.33
diff -c -w -r1.33 dbxread.c
*** dbxread.c 10 May 2002 07:32:50 -0000 1.33
--- dbxread.c 11 Jul 2002 01:58:29 -0000
***************
Hi, all...
Fred added an extra record_line call which closes off the last SLINE in
a function when we come across the end of function N_FUN stab. This
was a good thing, but unfortunately, he used function_start_offset,
which on most systems is just the offset to the TEXT section (the
exception being Solaris, where is actually is the real function start).
He really meant to use last_function_start, which is the real address
of the last N_FUN stab seen.
I also fixed the comment before sline_found_in_function to accord with
its current usage, since the old comment is wrong. We set
sline_found_in_function = 0 at the same time we set
last_function_start, but then we set it to 1 when we see the FIRST
SLINE in a function, but last_function_start is still good after that.
And nobody ever checks it to see if they should use last_function_start
or not...
*** 2761,2768 ****
static CORE_ADDR last_function_start;
/* If this is nonzero, we've seen an N_SLINE since the start of the
current
! function. Initialized to nonzero to assure that
last_function_start
! is never used uninitialized. */
static int sline_found_in_function = 1;
/* If this is nonzero, we've seen a non-gcc N_OPT symbol for this
source
--- 2761,2768 ----
static CORE_ADDR last_function_start;
/* If this is nonzero, we've seen an N_SLINE since the start of the
current
! function. We use this to tell us to move the first sline to the
beginning
! of the function regardless of what its given value is. */
static int sline_found_in_function = 1;
/* If this is nonzero, we've seen a non-gcc N_OPT symbol for this
source
***************
*** 2799,2805 ****
{
/* This N_FUN marks the end of a function. This closes off
the
current block. */
! record_line (current_subfile, 0, function_start_offset +
valu);
within_function = 0;
new = pop_context ();
--- 2799,2805 ----
{
/* This N_FUN marks the end of a function. This closes off
the
current block. */
! record_line (current_subfile, 0, last_function_start + valu);
within_function = 0;
new = pop_context ();
Jim
--
Jim Ingham jingham@apple.com
Developer Tools - gdb
Apple Computer
next reply other threads:[~2002-07-11 2:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-10 19:08 Jim Ingham [this message]
2002-07-11 2:42 ` Daniel Jacobowitz
2002-07-11 11:42 ` Jim Ingham
2002-07-11 11:52 ` Daniel Jacobowitz
2002-07-11 16:40 ` Jim Ingham
2002-07-12 10:46 ` Daniel Jacobowitz
2002-07-12 11:03 ` Jim Ingham
2003-02-18 15:41 ` Elena Zannoni
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=10111A6F-9473-11D6-AD3A-00039379E320@apple.com \
--to=jingham@apple.com \
--cc=gdb-patches@sources.redhat.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