diff options
author | Tom Tromey <tromey@redhat.com> | 2009-03-26 23:30:12 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2009-03-26 23:30:12 +0000 |
commit | 56ef84b1f160a25c6f41c0778192f2642d250624 (patch) | |
tree | 372db62586a820f70111c4d1f627f32656d59be6 /gdb | |
parent | a5321aa4d5bcbe30b94819727445a506e4fbe4b1 (diff) | |
download | gdb-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')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/breakpoint.c | 7 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/ending-run.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-break.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-simplerun.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi2-break.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi2-simplerun.exp | 4 |
8 files changed, 30 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 695b09b..9d5efa4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2009-03-26 Tom Tromey <tromey@redhat.com> + + * breakpoint.c (resolve_sal_pc): Preserve original line number + when skipping prologue. + 2009-03-26 Doug Evans <dje@google.com> * thread.c (inferior_thread) Remove "extern" in definition. 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) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 599ba76..d9b5555 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2009-03-26 Tom Tromey <tromey@redhat.com> + + 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. + 2009-03-26 Thiago Jung Bauermann <bauerman@br.ibm.com> * gdb.python/python-value.exp (test_value_in_inferior): Test diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp index 42b4577..cf33602 100644 --- a/gdb/testsuite/gdb.base/ending-run.exp +++ b/gdb/testsuite/gdb.base/ending-run.exp @@ -69,7 +69,7 @@ gdb_expect { gdb_test "b ending-run.c:1" ".*Breakpoint.*4.*" gdb_test "b ending-run.c:14" ".*Note.*also.*Breakpoint.*5.*" "b ending-run.c:14, two" gdb_test "cle ending-run.c:14" \ - ".*Deleted breakpoints 4 5.*" "Cleared 2 by line" + ".*Deleted breakpoint 5.*" "Cleared 2 by line" send_gdb "inf line ending-run.c:14\n" gdb_expect { @@ -77,7 +77,7 @@ gdb_expect { set line_nine $expect_out(1,string) gdb_test "b ending-run.c:14" ".*Breakpoint 6.*ending-run.c, line 14.*" gdb_test "b *$line_nine" ".*Note.*also.*Breakpoint 7.*" "Breakpoint 7 at *ending-run.c:14" - gdb_test "cle" ".*Deleted breakpoints 6 7.*" "Clear 2 by default" + gdb_test "cle" ".*Deleted breakpoints 4 6 7.*" "Clear 2 by default" } -re ".*$gdb_prompt $" { fail "need to fix test for new compile outcome" diff --git a/gdb/testsuite/gdb.mi/mi-break.exp b/gdb/testsuite/gdb.mi/mi-break.exp index 6ea59fc..0f91af7 100644 --- a/gdb/testsuite/gdb.mi/mi-break.exp +++ b/gdb/testsuite/gdb.mi/mi-break.exp @@ -85,11 +85,11 @@ proc test_tbreak_creation_and_listing {} { mi_create_breakpoint "-t basics.c:callee2" 2 del callee2 ".*basics.c" $line_callee2_body $hex \ "insert temp breakpoint at basics.c:callee2" - mi_create_breakpoint "-t basics.c:$line_callee3_head" 3 del callee3 ".*basics.c" $line_callee3_body $hex \ + mi_create_breakpoint "-t basics.c:$line_callee3_head" 3 del callee3 ".*basics.c" $line_callee3_head $hex \ "insert temp breakpoint at basics.c:\$line_callee3_head" # Getting the quoting right is tricky. That is "\"<file>\":$line_callee4_head" - mi_create_breakpoint "-t \"\\\"${srcfile}\\\":$line_callee4_head\"" 4 del callee4 ".*basics.c" $line_callee4_body $hex \ + mi_create_breakpoint "-t \"\\\"${srcfile}\\\":$line_callee4_head\"" 4 del callee4 ".*basics.c" $line_callee4_head $hex \ "insert temp breakpoint at \"<fullfilename>\":\$line_callee4_head" mi_gdb_test "666-break-list" \ diff --git a/gdb/testsuite/gdb.mi/mi-simplerun.exp b/gdb/testsuite/gdb.mi/mi-simplerun.exp index 654146a..14a1446 100644 --- a/gdb/testsuite/gdb.mi/mi-simplerun.exp +++ b/gdb/testsuite/gdb.mi/mi-simplerun.exp @@ -74,10 +74,10 @@ proc test_breakpoints_creation_and_listing {} { mi_create_breakpoint "basics.c:callee2" 2 keep callee2 ".*basics.c" $line_callee2_body $hex \ "insert breakpoint at basics.c:callee2" - mi_create_breakpoint "basics.c:$line_callee3_head" 3 keep callee3 ".*basics.c" $line_callee3_body $hex \ + mi_create_breakpoint "basics.c:$line_callee3_head" 3 keep callee3 ".*basics.c" $line_callee3_head $hex \ "insert breakpoint at basics.c:\$line_callee3_head" - mi_create_breakpoint "\"\\\"${srcfile}\\\":$line_callee4_head\"" 4 keep callee4 ".*basics.c" $line_callee4_body $hex \ + mi_create_breakpoint "\"\\\"${srcfile}\\\":$line_callee4_head\"" 4 keep callee4 ".*basics.c" $line_callee4_head $hex \ "insert breakpoint at \"<fullfilename>\":\$line_callee4_head" mi_gdb_test "204-break-list" \ diff --git a/gdb/testsuite/gdb.mi/mi2-break.exp b/gdb/testsuite/gdb.mi/mi2-break.exp index d08081a..7f43315 100644 --- a/gdb/testsuite/gdb.mi/mi2-break.exp +++ b/gdb/testsuite/gdb.mi/mi2-break.exp @@ -85,11 +85,11 @@ proc test_tbreak_creation_and_listing {} { mi_create_breakpoint "-t basics.c:callee2" 2 del callee2 ".*basics.c" $line_callee2_body $hex \ "insert temp breakpoint at basics.c:callee2" - mi_create_breakpoint "-t basics.c:$line_callee3_head" 3 del callee3 ".*basics.c" $line_callee3_body $hex \ + mi_create_breakpoint "-t basics.c:$line_callee3_head" 3 del callee3 ".*basics.c" $line_callee3_head $hex \ "insert temp breakpoint at basics.c:\$line_callee3_head" # Getting the quoting right is tricky. That is "\"<file>\":$line_callee4_head" - mi_create_breakpoint "-t \"\\\"${srcfile}\\\":$line_callee4_head\"" 4 del callee4 ".*basics.c" $line_callee4_body $hex \ + mi_create_breakpoint "-t \"\\\"${srcfile}\\\":$line_callee4_head\"" 4 del callee4 ".*basics.c" $line_callee4_head $hex \ "insert temp breakpoint at \"<fullfilename>\":\$line_callee4_head" mi_gdb_test "666-break-list" \ diff --git a/gdb/testsuite/gdb.mi/mi2-simplerun.exp b/gdb/testsuite/gdb.mi/mi2-simplerun.exp index eddb2ed..13443ee 100644 --- a/gdb/testsuite/gdb.mi/mi2-simplerun.exp +++ b/gdb/testsuite/gdb.mi/mi2-simplerun.exp @@ -74,10 +74,10 @@ proc test_breakpoints_creation_and_listing {} { mi_create_breakpoint "basics.c:callee2" 2 keep callee2 ".*basics.c" $line_callee2_body $hex \ "insert breakpoint at basics.c:callee2" - mi_create_breakpoint "basics.c:$line_callee3_head" 3 keep callee3 ".*basics.c" $line_callee3_body $hex \ + mi_create_breakpoint "basics.c:$line_callee3_head" 3 keep callee3 ".*basics.c" $line_callee3_head $hex \ "insert breakpoint at basics.c:\$line_callee3_head" - mi_create_breakpoint "\"\\\"${srcfile}\\\":$line_callee4_head\"" 4 keep callee4 ".*basics.c" $line_callee4_body $hex \ + mi_create_breakpoint "\"\\\"${srcfile}\\\":$line_callee4_head\"" 4 keep callee4 ".*basics.c" $line_callee4_head $hex \ "insert breakpoint at \"<fullfilename>\":\$line_callee4_head" mi_gdb_test "204-break-list" \ |