aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-03-26 23:30:12 +0000
committerTom Tromey <tromey@redhat.com>2009-03-26 23:30:12 +0000
commit56ef84b1f160a25c6f41c0778192f2642d250624 (patch)
tree372db62586a820f70111c4d1f627f32656d59be6 /gdb/breakpoint.c
parenta5321aa4d5bcbe30b94819727445a506e4fbe4b1 (diff)
downloadgdb-56ef84b1f160a25c6f41c0778192f2642d250624.zip
gdb-56ef84b1f160a25c6f41c0778192f2642d250624.tar.gz
gdb-56ef84b1f160a25c6f41c0778192f2642d250624.tar.bz2
gdb
* breakpoint.c (resolve_sal_pc): Preserve original line number when skipping prologue. gdb/testsuite Update for change to prologue skipping: * gdb.mi/mi2-simplerun.exp: Update. * gdb.mi/mi2-break.exp: Update. * gdb.mi/mi-simplerun.exp: Update. * gdb.mi/mi-break.exp: Update. * gdb.base/ending-run.exp: Update.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 7ffdf77..b0cdfb3 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -5765,7 +5765,12 @@ resolve_sal_pc (struct symtab_and_line *sal)
/* If this SAL corresponds to a breakpoint inserted using
a line number, then skip the function prologue if necessary. */
if (sal->explicit_line)
- skip_prologue_sal (sal);
+ {
+ /* Preserve the original line number. */
+ int saved_line = sal->line;
+ skip_prologue_sal (sal);
+ sal->line = saved_line;
+ }
}
if (sal->section == 0 && sal->symtab != NULL)