From a97a483ca8ec1399ae3eb210945a117512880581 Mon Sep 17 00:00:00 2001 From: Peter Schauer Date: Sat, 24 Feb 1996 20:32:48 +0000 Subject: * partial-stab.h (case N_FUN): Function symbols generated by SPARCworks cc have a meaningless zero value, do not update pst->textlow if the function symbol value is zero. * stabsread.c (define_symbol): Initialize SYMBOL_TYPE field for function prototype declaration symbols. --- gdb/ChangeLog | 9 +++++++++ gdb/partial-stab.h | 10 ++++++++-- gdb/stabsread.c | 4 ++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8eef4c6..830b400 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +Sat Feb 24 12:30:28 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * partial-stab.h (case N_FUN): Function symbols generated + by SPARCworks cc have a meaningless zero value, do not update + pst->textlow if the function symbol value is zero. + + * stabsread.c (define_symbol): Initialize SYMBOL_TYPE field + for function prototype declaration symbols. + Fri Feb 23 22:33:04 1996 Stu Grossman (grossman@critters.cygnus.com) * remote-e7000.c (e7000_load): New routine to download via the diff --git a/gdb/partial-stab.h b/gdb/partial-stab.h index b01eb1e..988ef0e 100644 --- a/gdb/partial-stab.h +++ b/gdb/partial-stab.h @@ -568,7 +568,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ the bounds created by N_SO symbols. If that's the case use the address of this function as the low bound for the partial symbol table. */ - if (pst->textlow == 0 || CUR_SYMBOL_VALUE < pst->textlow) + if (pst->textlow == 0 + || (CUR_SYMBOL_VALUE < pst->textlow + && CUR_SYMBOL_VALUE + != ANOFFSET (section_offsets, SECT_OFF_TEXT))) pst->textlow = CUR_SYMBOL_VALUE; #endif /* DBXREAD_ONLY */ ADD_PSYMBOL_TO_LIST (namestring, p - namestring, @@ -604,7 +607,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ the bounds created by N_SO symbols. If that's the case use the address of this function as the low bound for the partial symbol table. */ - if (pst->textlow == 0 || CUR_SYMBOL_VALUE < pst->textlow) + if (pst->textlow == 0 + || (CUR_SYMBOL_VALUE < pst->textlow + && CUR_SYMBOL_VALUE + != ANOFFSET (section_offsets, SECT_OFF_TEXT))) pst->textlow = CUR_SYMBOL_VALUE; #endif /* DBXREAD_ONLY */ ADD_PSYMBOL_TO_LIST (namestring, p - namestring, diff --git a/gdb/stabsread.c b/gdb/stabsread.c index dd0373b..b5cddf7 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -938,12 +938,12 @@ define_symbol (valu, string, desc, type, objfile) #endif /* !BELIEVE_PCC_PROMOTION. */ case 'P': - /* acc seems to use P to delare the prototypes of functions that + /* acc seems to use P to declare the prototypes of functions that are referenced by this file. gdb is not prepared to deal with this extra information. FIXME, it ought to. */ if (type == N_FUN) { - read_type (&p, objfile); + SYMBOL_TYPE (sym) = read_type (&p, objfile); goto process_prototype_types; } /*FALLTHROUGH*/ -- cgit v1.1