diff options
author | Nick Clifton <nickc@redhat.com> | 2003-02-13 10:38:37 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-02-13 10:38:37 +0000 |
commit | 6de15b9e9d446dd61ef7f9b929cfc961388af626 (patch) | |
tree | 357aaf71a562df34f3d64ab92e901bd4a6f2dabc /binutils | |
parent | fe2c4142ca6172f1b95107438da47ed2cfc4eaf7 (diff) | |
download | gdb-6de15b9e9d446dd61ef7f9b929cfc961388af626.zip gdb-6de15b9e9d446dd61ef7f9b929cfc961388af626.tar.gz gdb-6de15b9e9d446dd61ef7f9b929cfc961388af626.tar.bz2 |
For N_SLINE only include function_start_offset if the symbol is within a
function; otherwise, the value is absolute.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 4 | ||||
-rw-r--r-- | binutils/stabs.c | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index ada0c4a..55db2d6 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -8,6 +8,10 @@ * debug.c (debug_record_variable): Handle global register variables. + * stabs.c (parse_stab): For N_SLINE only include + function_start_offset if the symbol is within a function; + otherwise, the value is absolute. + 2003-02-10 Nick Clifton <nickc@redhat.com> * readelf.c (decode_ARM_machine_flags): Handle the diff --git a/binutils/stabs.c b/binutils/stabs.c index 1ff4f6f..2611bc3 100644 --- a/binutils/stabs.c +++ b/binutils/stabs.c @@ -1,5 +1,5 @@ /* stabs.c -- Parse stabs debugging information - Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 + Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Written by Ian Lance Taylor <ian@cygnus.com>. @@ -176,8 +176,8 @@ static debug_type parse_stab_sun_floating_type static debug_type parse_stab_enum_type PARAMS ((PTR, const char **)); static debug_type parse_stab_struct_type - PARAMS ((PTR, struct stab_handle *, const char *, const char **, bfd_boolean, - const int *)); + PARAMS ((PTR, struct stab_handle *, const char *, const char **, + bfd_boolean, const int *)); static bfd_boolean parse_stab_baseclasses PARAMS ((PTR, struct stab_handle *, const char **, debug_baseclass **)); static bfd_boolean parse_stab_struct_fields @@ -222,7 +222,8 @@ static debug_type stab_find_tagged_type PARAMS ((PTR, struct stab_handle *, const char *, int, enum debug_type_kind)); static debug_type *stab_demangle_argtypes - PARAMS ((PTR, struct stab_handle *, const char *, bfd_boolean *, unsigned int)); + PARAMS ((PTR, struct stab_handle *, const char *, bfd_boolean *, + unsigned int)); /* Save a string in memory. */ @@ -610,7 +611,8 @@ parse_stab (dhandle, handle, type, desc, value, string) case N_SLINE: if (! debug_record_line (dhandle, desc, - value + info->function_start_offset)) + value + (info->within_function + ? info->function_start_offset : 0))) return FALSE; break; |