diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2010-03-26 19:41:50 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2010-03-26 19:41:50 +0000 |
commit | 059acae734f523c828d8fef009eb851cdd0d4dc1 (patch) | |
tree | 114e025ed97b2ef1faa087d52eba01a5ce33ecab /gdb/linespec.c | |
parent | 4a811a977fd05801bf2e4dca29e775ab6345de63 (diff) | |
download | gdb-059acae734f523c828d8fef009eb851cdd0d4dc1.zip gdb-059acae734f523c828d8fef009eb851cdd0d4dc1.tar.gz gdb-059acae734f523c828d8fef009eb851cdd0d4dc1.tar.bz2 |
* breakpoint.c (expand_line_sal_maybe): Always call skip_prologue_sal.
(skip_prologue_sal): Remove local definition.
(resolve_sal_pc): Remove now unnecessary code.
* linespec.c (minsym_found): Call skip_prologue_sal.
* symtab.c (find_function_start_pc): Remove.
(find_function_start_sal): Extract prologue skipping into ...
(skip_prologue_sal): ... this new function. Handle code both
with and without debug info. Respect SAL's explicit_pc and
explicit_line flags. Inline old find_function_start_pc.
* symtab.h (find_function_start_pc): Remove.
(skip_prologue_sal): Add prototype.
Diffstat (limited to 'gdb/linespec.c')
-rw-r--r-- | gdb/linespec.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c index ec4d569..c5ea28a 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -1956,26 +1956,7 @@ minsym_found (int funfirstline, struct minimal_symbol *msymbol) values.sals[0] = find_pc_sect_line (pc, NULL, 0); if (funfirstline) - { - struct symtab_and_line sal; - - values.sals[0].pc = find_function_start_pc (gdbarch, - values.sals[0].pc, - values.sals[0].section); - - sal = find_pc_sect_line (values.sals[0].pc, values.sals[0].section, 0); - - /* Check if SKIP_PROLOGUE left us in mid-line, and the next - line is still part of the same function. If there is no - line information here, sal.pc will be the passed in PC. */ - if (sal.pc != values.sals[0].pc - && (lookup_minimal_symbol_by_pc_section (values.sals[0].pc, - values.sals[0].section) - == lookup_minimal_symbol_by_pc_section (sal.end, - values.sals[0].section))) - /* Recalculate the line number (might not be N+1). */ - values.sals[0] = find_pc_sect_line (sal.end, values.sals[0].section, 0); - } + skip_prologue_sal (&values.sals[0]); values.nelts = 1; return values; |