From 3dba1c9899d02d3dde715498124073c23638fd6f Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Tue, 24 Nov 2009 21:37:52 +0000 Subject: [PATCH] * breakpoint.c (expand_line_sal_maybe): Adjust adjust the SAL past the function prologue in the case where we were given only one SAL. --- gdb/ChangeLog | 6 ++++++ gdb/breakpoint.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 71a5bd4cb37..a1056d7d61b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2009-11-24 Joel Brobecker + + * breakpoint.c (expand_line_sal_maybe): Adjust adjust the SAL + past the function prologue in the case where we were given only + one SAL. + 2009-11-24 Pedro Alves * record.c (init_record_ops, init_record_core_ops): Actually diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 90d9247b361..8a6813cd866 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -6340,13 +6340,14 @@ expand_line_sal_maybe (struct symtab_and_line sal) if (expanded.nelts == 1) { - /* We had one sal, we got one sal. Without futher - processing, just return the original sal. */ + /* We had one sal, we got one sal. Return that sal, adjusting it + past the function prologue if necessary. */ xfree (expanded.sals); expanded.nelts = 1; expanded.sals = xmalloc (sizeof (struct symtab_and_line)); sal.pc = original_pc; expanded.sals[0] = sal; + skip_prologue_sal (&expanded.sals[0]); do_cleanups (old_chain); return expanded; } -- 2.30.2