diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/sparc-tdep.c | 13 |
2 files changed, 12 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 131ec93..ce9cef5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-09-21 Tom Tromey <tromey@adacore.com> + + * sparc-tdep.c (sparc32_skip_prologue): Use + skip_prologue_using_sal. + 2020-09-19 Tom Tromey <tom@tromey.com> * symfile.c (add_section_size_callback): Remove. diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index e9636cd..8417a47 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -1127,18 +1127,19 @@ static CORE_ADDR sparc32_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc) { struct symtab_and_line sal; - CORE_ADDR func_start, func_end; + CORE_ADDR func_addr; struct sparc_frame_cache cache; /* This is the preferred method, find the end of the prologue by using the debugging information. */ - if (find_pc_partial_function (start_pc, NULL, &func_start, &func_end)) + + if (find_pc_partial_function (start_pc, NULL, &func_addr, NULL)) { - sal = find_pc_line (func_start, 0); + CORE_ADDR post_prologue_pc + = skip_prologue_using_sal (gdbarch, func_addr); - if (sal.end < func_end - && start_pc <= sal.end) - return sal.end; + if (post_prologue_pc != 0) + return std::max (start_pc, post_prologue_pc); } start_pc = sparc_analyze_prologue (gdbarch, start_pc, 0xffffffffUL, &cache); |