diff options
author | John Gilmore <gnu@cygnus> | 1991-12-06 09:22:33 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1991-12-06 09:22:33 +0000 |
commit | 7b2a87cab2884bec54b51082e409c46f3d94d912 (patch) | |
tree | aca7073a4275c1ecdae29f7e2b55bc6fd39f7fcb /gdb | |
parent | 1cca172985962a849c34d4c676fe64ca7a27a772 (diff) | |
download | gdb-7b2a87cab2884bec54b51082e409c46f3d94d912.zip gdb-7b2a87cab2884bec54b51082e409c46f3d94d912.tar.gz gdb-7b2a87cab2884bec54b51082e409c46f3d94d912.tar.bz2 |
* symtab.c (decode_line_1): If SKIP_PROLOGUE leaves us in
mid-line, be more careful about possibly advancing to the next line.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarfread.c | 1 | ||||
-rw-r--r-- | gdb/symtab.c | 11 |
3 files changed, 15 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 456117e..977dbec 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Thu Dec 5 21:53:21 1991 John Gilmore (gnu at cygnus.com) + + * symtab.c (decode_line_1): If SKIP_PROLOGUE leaves us in + mid-line, be more careful about possibly advancing to the next line. + Thu Dec 5 18:59:51 1991 Michael Tiemann (tiemann at cygnus.com) * cplus-dem.c (cplus_demangle): Call `string_need' when diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c index b2dcd87..ab66d6f 100644 --- a/gdb/dwarfread.c +++ b/gdb/dwarfread.c @@ -1,4 +1,3 @@ - /* DWARF debugging format support for GDB. Copyright (C) 1991 Free Software Foundation, Inc. Written by Fred Fish at Cygnus Support, portions based on dbxread.c, diff --git a/gdb/symtab.c b/gdb/symtab.c index a03f758..cd5c289 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -2114,7 +2114,16 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line) /* Convex: no need to suppress code on first line, if any */ val.pc = pc; #else - val.pc = (val.end && val.pc != pc) ? val.end : pc; + /* If SKIP_PROLOGUE left us in mid-line, and the next line is still + part of the same function: + advance to next line, + recalculate its line number (might not be N+1). */ + if (val.pc != pc && val.end && + find_pc_misc_function (pc) == find_pc_misc_function (val.end)) { + pc = val.end; /* First pc of next line */ + val = find_pc_line (pc, 0); + } + val.pc = pc; #endif values.sals = (struct symtab_and_line *)xmalloc (sizeof (struct symtab_and_line)); values.sals[0] = val; |