From 54e52265e21981a41ef297b0733bf2cb8eb9fc69 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Tue, 26 Feb 2008 08:14:11 +0000 Subject: * breakpoint.c (print_one_breakpoint_location): Revert Enb field to old format. Discard breakpoint address if shared library is unloaded. (breakpoint_1): Adjust formatting of table header accordingly. --- gdb/testsuite/ChangeLog | 13 ++++++++++++ gdb/testsuite/gdb.base/annota1.exp | 4 ++-- gdb/testsuite/gdb.base/annota3.exp | 4 ++-- gdb/testsuite/gdb.base/break.exp | 4 ++-- gdb/testsuite/gdb.base/condbreak.exp | 2 +- gdb/testsuite/gdb.base/pending.exp | 38 ++++++++++++++++++------------------ gdb/testsuite/gdb.base/sepdebug.exp | 4 ++-- gdb/testsuite/gdb.base/unload.exp | 4 ++-- gdb/testsuite/gdb.cp/ovldbreak.exp | 6 +++--- gdb/testsuite/gdb.mi/mi-pending.exp | 2 +- 10 files changed, 47 insertions(+), 34 deletions(-) (limited to 'gdb/testsuite') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 447707f..fafc303 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,16 @@ +2008-02-26 Vladimir Prus + + * gdb.base/annota1.exp: Adjust for 'info break' + format changes. + * gdb.base/annota3.exp: Likewise. + * gdb.base/break.exp: Likewise. + * gdb.base/condbreak.exp: Likewise. + * gdb.base/pending.exp: Likewise. + * gdb.base/sepdebug.exp: Likewise. + * gdb.base/unload.exp: Likewise. + * gdb.cp/ovldbreak.exp: Likewise. + * gdb.mi/mi-pending.exp: Likewise. + 2008-02-07 Doug Evans * gdb.cp/mb-inline.exp: New. diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp index e33aba6..522fdb4 100644 --- a/gdb/testsuite/gdb.base/annota1.exp +++ b/gdb/testsuite/gdb.base/annota1.exp @@ -117,9 +117,9 @@ gdb_expect { # send_gdb "info break\n" gdb_expect { - -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-headers\r\n\r\n\032\032field 0\r\nNum \r\n\032\032field 1\r\nType \r\n\032\032field 2\r\nDisp \r\n\032\032field 3\r\nEnb \r\n\032\032field 4\r\nAddress +\r\n\032\032field 5\r\nWhat\r\n\r\n\032\032breakpoints-table\r\n\r\n\032\032record\r\n\r\n\032\032field 0\r\n1 \r\n\032\032field 1\r\nbreakpoint \r\n\032\032field 2\r\nkeep \r\n\032\032field 3\r\ny \r\n\032\032field 4\r\n$hex +\r\n\032\032field 5\r\nin main at ${escapedsrcfile}:$main_line\r\n\r\n\032\032breakpoints-table-end\r\n$gdb_prompt$" \ + -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-headers\r\n\r\n\032\032field 0\r\nNum \r\n\032\032field 1\r\nType \r\n\032\032field 2\r\nDisp \r\n\032\032field 3\r\nEnb \r\n\032\032field 4\r\nAddress +\r\n\032\032field 5\r\nWhat\r\n\r\n\032\032breakpoints-table\r\n\r\n\032\032record\r\n\r\n\032\032field 0\r\n1 \r\n\032\032field 1\r\nbreakpoint \r\n\032\032field 2\r\nkeep \r\n\032\032field 3\r\ny \r\n\032\032field 4\r\n$hex +\r\n\032\032field 5\r\nin main at ${escapedsrcfile}:$main_line\r\n\r\n\032\032breakpoints-table-end\r\n$gdb_prompt$" \ {pass "breakpoint info"} - -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-headers\r\n\r\n\032\032field 0\r\nNum \r\n\032\032field 1\r\nType \r\n\032\032field 2\r\nDisp \r\n\032\032field 3\r\nEnb \r\n\032\032field 4\r\nAddress +\r\n\032\032field 5\r\nWhat\r\n\r\n\032\032breakpoints-table\r\n\r\n\032\032record\r\n\r\n\032\032field 0\r\n1 \r\n\032\032field 1\r\nbreakpoint \r\n\032\032field 2\r\nkeep \r\n\032\032field 3\r\ny \r\n\032\032field 4\r\n$hex +\r\n\032\032field 5\r\nin main at .*${srcfile}:$main_line\r\n\r\n\032\032breakpoints-table-end\r\n$gdb_prompt$" \ + -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-headers\r\n\r\n\032\032field 0\r\nNum \r\n\032\032field 1\r\nType \r\n\032\032field 2\r\nDisp \r\n\032\032field 3\r\nEnb \r\n\032\032field 4\r\nAddress +\r\n\032\032field 5\r\nWhat\r\n\r\n\032\032breakpoints-table\r\n\r\n\032\032record\r\n\r\n\032\032field 0\r\n1 \r\n\032\032field 1\r\nbreakpoint \r\n\032\032field 2\r\nkeep \r\n\032\032field 3\r\ny \r\n\032\032field 4\r\n$hex +\r\n\032\032field 5\r\nin main at .*${srcfile}:$main_line\r\n\r\n\032\032breakpoints-table-end\r\n$gdb_prompt$" \ { setup_xfail "*-*-*" 1270 fail "breakpoint info"} -re ".*$gdb_prompt$" { fail "breakpoint info" } diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3.exp index 7bb1fe8..2e0595c 100644 --- a/gdb/testsuite/gdb.base/annota3.exp +++ b/gdb/testsuite/gdb.base/annota3.exp @@ -127,8 +127,8 @@ gdb_expect { send_gdb "info break\n" gdb_expect_list "breakpoint info" "$gdb_prompt$" { "\r\n\032\032post-prompt\r\n" - "Num Type Disp Enb Address +What\r\n" - "1 breakpoint keep y 0x\[0-9a-zA-Z\]+ +in main at .*annota3.c:32\r\n" + "Num Type Disp Enb Address +What\r\n" + "1 breakpoint keep y 0x\[0-9a-zA-Z\]+ +in main at .*annota3.c:32\r\n" } diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp index 6da8203..0ec70c9 100644 --- a/gdb/testsuite/gdb.base/break.exp +++ b/gdb/testsuite/gdb.base/break.exp @@ -179,7 +179,7 @@ set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1] set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1] gdb_test "info break" \ - "Num Type\[ \]+Disp Enb Address\[ \]+What.* + "Num Type\[ \]+Disp Enb Address\[ \]+What.* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.* \[0-9\]+\[\t \]+breakpoint keep y.* in marker2 at .*$srcfile1:($bp_location8|$bp_location9).* \[0-9\]+\[\t \]+breakpoint keep y.* in factorial$proto at .*$srcfile:$bp_location7.* @@ -309,7 +309,7 @@ gdb_test "tbreak $srcfile:$bp_location11" "Breakpoint.*at.* file .*$srcfile, li # # check to see what breakpoints are set (temporary this time) # -gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\] +gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\] \[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$main_line.*\[\r\n\] \[0-9\]+\[\t \]+breakpoint del.*y.*in factorial$proto at .*$srcfile:$bp_location7.*\[\r\n\] \[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location1.*\[\r\n\] diff --git a/gdb/testsuite/gdb.base/condbreak.exp b/gdb/testsuite/gdb.base/condbreak.exp index 6f210dc..e76605c 100644 --- a/gdb/testsuite/gdb.base/condbreak.exp +++ b/gdb/testsuite/gdb.base/condbreak.exp @@ -125,7 +125,7 @@ if {$hp_aCC_compiler} { } gdb_test "info break" \ - "Num Type\[ \]+Disp Enb Address\[ \]+What.* + "Num Type\[ \]+Disp Enb Address\[ \]+What.* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location6.* \[0-9\]+\[\t \]+breakpoint keep y.* in marker1$marker1_proto at .*$srcfile1:($bp_location15|$bp_location16).* \[\t \]+stop only if \\(1==1\\).* diff --git a/gdb/testsuite/gdb.base/pending.exp b/gdb/testsuite/gdb.base/pending.exp index 464a395..bcca61e 100644 --- a/gdb/testsuite/gdb.base/pending.exp +++ b/gdb/testsuite/gdb.base/pending.exp @@ -71,8 +71,8 @@ gdb_test_multiple "break pendfunc1" "set pending breakpoint" { } gdb_test "info break" \ - "Num Type\[ \]+Disp Enb Address\[ \]+What.* -\[0-9\]+\[\t \]+breakpoint keep y\\(p\\).*PENDING.*pendfunc1.*" \ + "Num Type\[ \]+Disp Enb Address\[ \]+What.* +\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendfunc1.*" \ "single pending breakpoint info" # @@ -86,8 +86,8 @@ gdb_test "break main" \ "breakpoint function" gdb_test "info break" \ - "Num Type\[ \]+Disp Enb Address\[ \]+What.* -\[0-9\]+\[\t \]+breakpoint keep y\\(p\\).*PENDING.*pendfunc1.* + "Num Type\[ \]+Disp Enb Address\[ \]+What.* +\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendfunc1.* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline" \ "pending plus real breakpoint info" @@ -108,8 +108,8 @@ gdb_test_multiple "break pendfunc2" "Don't set pending breakpoint" { gdb_test "condition 1 k == 1" "" gdb_test "info break" \ - "Num Type\[ \]+Disp Enb Address\[ \]+What.* -\[0-9\]+\[\t \]+breakpoint keep y\\(p\\).*PENDING.*pendfunc1.* + "Num Type\[ \]+Disp Enb Address\[ \]+What.* +\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendfunc1.* \[\t \]+stop only if k == 1.* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline" \ "pending plus condition" @@ -121,8 +121,8 @@ gdb_test "info break" \ gdb_test "disable 1" "" gdb_test "info break" \ - "Num Type\[ \]+Disp Enb Address\[ \]+What.* -\[0-9\]+\[\t \]+breakpoint keep n\\(p\\).*PENDING.*pendfunc1.* + "Num Type\[ \]+Disp Enb Address\[ \]+What.* +\[0-9\]+\[\t \]+breakpoint keep n.*PENDING.*pendfunc1.* \[\t \]+stop only if k == 1.* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline" \ "pending disabled" @@ -134,8 +134,8 @@ gdb_test "commands 1\nprint k\nend" "" \ "Set commands for pending breakpoint" gdb_test "info break" \ - "Num Type\[ \]+Disp Enb Address\[ \]+What.* -\[0-9\]+\[\t \]+breakpoint keep n\\(p\\).*PENDING.*pendfunc1.* + "Num Type\[ \]+Disp Enb Address\[ \]+What.* +\[0-9\]+\[\t \]+breakpoint keep n.*PENDING.*pendfunc1.* \[\t \]+stop only if k == 1.* \[\t \]+print k.* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline" \ @@ -154,12 +154,12 @@ gdb_test_multiple "break pendshr.c:$bp2_loc if x > 3" "Set pending breakpoint 2" } gdb_test "info break" \ - "Num Type\[ \]+Disp Enb Address\[ \]+What.* -\[0-9\]+\[\t \]+breakpoint keep n\\(p\\).*PENDING.*pendfunc1.* + "Num Type\[ \]+Disp Enb Address\[ \]+What.* +\[0-9\]+\[\t \]+breakpoint keep n.*PENDING.*pendfunc1.* \[\t \]+stop only if k == 1.* \[\t \]+print k.* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.* -\[0-9\]+\[\t \]+breakpoint keep y\\(p\\).*PENDING.*pendshr.c:$bp2_loc if x > 3.*" \ +\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:$bp2_loc if x > 3.*" \ "multiple pending breakpoints" @@ -179,13 +179,13 @@ gdb_test {ignore $bpnum 2} "Will ignore next 2 crossings of breakpoint .*" \ "set ignore count on pending breakpoint 3" gdb_test "info break" \ - "Num Type\[ \]+Disp Enb Address\[ \]+What.* -\[0-9\]+\[\t \]+breakpoint keep n\\(p\\).*PENDING.*pendfunc1.* + "Num Type\[ \]+Disp Enb Address\[ \]+What.* +\[0-9\]+\[\t \]+breakpoint keep n.*PENDING.*pendfunc1.* \[\t \]+stop only if k == 1.* \[\t \]+print k.* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.* -\[0-9\]+\[\t \]+breakpoint keep y\\(p\\).*PENDING.*pendshr.c:$bp2_loc if x > 3.* -\[0-9\]+\[\t \]+breakpoint keep y\\(p\\).*PENDING.*pendshr.c:$bp3_loc.*ignore next 2 hits.*" \ +\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:$bp2_loc if x > 3.* +\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:$bp3_loc.*ignore next 2 hits.*" \ "multiple pending breakpoints 2" # @@ -253,7 +253,7 @@ gdb_test_multiple "break imaginary" "set imaginary pending breakpoint" { rerun_to_main gdb_test "info break" \ - "Num Type\[ \]+Disp Enb Address\[ \]+What.* + "Num Type\[ \]+Disp Enb Address\[ \]+What.* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.* -\[0-9\]+\[\t \]+breakpoint keep y\\(p\\).*PENDING.*imaginary.*" \ +\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*imaginary.*" \ "verify pending breakpoint after restart" diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp index cd0d504..54534c6 100644 --- a/gdb/testsuite/gdb.base/sepdebug.exp +++ b/gdb/testsuite/gdb.base/sepdebug.exp @@ -179,7 +179,7 @@ set bp_location8 [gdb_get_line_number "set breakpoint 8 here"] set bp_location9 [gdb_get_line_number "set breakpoint 9 here"] gdb_test "info break" \ - "Num Type\[ \]+Disp Enb Address\[ \]+What.* + "Num Type\[ \]+Disp Enb Address\[ \]+What.* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.* \[0-9\]+\[\t \]+breakpoint keep y.* in marker2 at .*$srcfile:($bp_location8|$bp_location9).* \[0-9\]+\[\t \]+breakpoint keep y.* in factorial at .*$srcfile:$bp_location7.* @@ -298,7 +298,7 @@ gdb_test "tbreak $srcfile:$bp_location11" "Breakpoint.*at.* file .*$srcfile, li # # check to see what breakpoints are set (temporary this time) # -gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\] +gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\] \[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$main_line.*\[\r\n\] \[0-9\]+\[\t \]+breakpoint del.*y.*in factorial at .*$srcfile:$bp_location7.*\[\r\n\] \[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location1.*\[\r\n\] diff --git a/gdb/testsuite/gdb.base/unload.exp b/gdb/testsuite/gdb.base/unload.exp index 55d5ff7..5ce1aaa 100644 --- a/gdb/testsuite/gdb.base/unload.exp +++ b/gdb/testsuite/gdb.base/unload.exp @@ -81,8 +81,8 @@ gdb_test_multiple "break shrfunc1" "set pending breakpoint" { } gdb_test "info break" \ - "Num Type\[ \]+Disp Enb Address\[ \]+What.* -\[0-9\]+\[\t \]+breakpoint keep y\\(p\\).*PENDING.*shrfunc1.*" \ + "Num Type\[ \]+Disp Enb Address\[ \]+What.* +\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*shrfunc1.*" \ "single pending breakpoint info" set unloadshr_line [gdb_get_line_number "unloadshr break" ${libsrcfile}] diff --git a/gdb/testsuite/gdb.cp/ovldbreak.exp b/gdb/testsuite/gdb.cp/ovldbreak.exp index 7e52ce5..5f66c6e 100644 --- a/gdb/testsuite/gdb.cp/ovldbreak.exp +++ b/gdb/testsuite/gdb.cp/ovldbreak.exp @@ -154,7 +154,7 @@ set_bp_overloaded "foo::overload1arg" "$menu_overload1arg" 13 13 110 # Verify the breakpoints. gdb_test "info break" \ - "Num Type\[\t \]+Disp Enb Address\[\t \]+What.* + "Num Type\[\t \]+Disp Enb Address\[\t \]+What.* \[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in main at.*$srcfile:49\r \[\t \]+breakpoint already hit 1 time\r \[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(char\\) at.*$srcfile:111\r @@ -212,7 +212,7 @@ gdb_expect { } gdb_test "info break" \ - "Num Type\[\t \]+Disp Enb Address\[\t \]+What.* + "Num Type\[\t \]+Disp Enb Address\[\t \]+What.* \[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in main at.*$srcfile:49\r \[\t \]+breakpoint already hit 1 time\r \[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(char\\) at.*$srcfile:111\r @@ -291,7 +291,7 @@ gdb_expect { } gdb_test "info break" \ - "Num Type\[\t \]+Disp Enb Address\[\t \]+What.* + "Num Type\[\t \]+Disp Enb Address\[\t \]+What.* \[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(double\\) at.*$srcfile:121\r \[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(float\\) at.*$srcfile:120\r \[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r diff --git a/gdb/testsuite/gdb.mi/mi-pending.exp b/gdb/testsuite/gdb.mi/mi-pending.exp index ff74bcb..51c7f16 100644 --- a/gdb/testsuite/gdb.mi/mi-pending.exp +++ b/gdb/testsuite/gdb.mi/mi-pending.exp @@ -64,7 +64,7 @@ if [target_info exists gdb_stub] { # Set pending breakpoint via MI mi_gdb_test "-break-insert -f pendfunc1" \ - ".*\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\\(p\\)\",addr=\"\",pending=\"pendfunc1\",times=\"0\"\}"\ + ".*\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",pending=\"pendfunc1\",times=\"0\"\}"\ "MI pending breakpoint on pendfunc1" mi_run_cmd -- cgit v1.1