From 6b37567ac291dc3e3654102d190f1c75b65b4279 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 26 Feb 2003 21:41:18 +0000 Subject: [PATCH] 2003-02-26 Jeff Johnston From Elena Zannoni * dbxread.c (process_one_symbol): Only record line 0 if one or more sline entries have been seen for the function. --- gdb/ChangeLog | 6 ++++++ gdb/dbxread.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 837d914..df2cb2f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2003-02-26 Jeff Johnston + + From Elena Zannoni + * dbxread.c (process_one_symbol): Only record line 0 if one or + more sline entries have been seen for the function. + 2003-02-26 Michael Chastain * configure: Regenerate with autoconf 000227. diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 11d038e..d813553 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -2831,7 +2831,13 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name, break; } - record_line (current_subfile, 0, last_function_start + valu); + /* The following check is added before recording line 0 at + end of function so as to handle hand-generated stabs + which may have an N_FUN stabs at the end of the function, but + no N_SLINE stabs. */ + if (sline_found_in_function) + record_line (current_subfile, 0, last_function_start + valu); + within_function = 0; new = pop_context (); -- 2.7.4