From: Jan Kratochvil Date: Tue, 19 Jan 2010 08:00:39 +0000 (+0000) Subject: gdb/testsuite/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dd322c54e38c0e14cae188ba88c07f1679d5a790;p=binutils-gdb.git gdb/testsuite/ * gdb.mi/mi-break.exp (set line_callme_head, set line_callme_body): New. (test_ignore_count): Declare line_callme_body global. (run to breakpoint with ignore count): Use line_callme_body. * gdb.mi/mi-cli.exp (set line_main_head, set line_main_body) (set line_main_hello, set line_main_return): Reindent. (set line_callee4_head, set line_callee4_body, set line_callee4_next): New. (continue to callee4): Use line_callee4_body. (check *stopped from CLI command): Use line_callee4_next. * gdb.mi/mi2-cli.exp (set line_main_head, set line_main_body) (set line_main_hello, set line_main_return): Reindent. (set line_callee4_head, set line_callee4_body): New. (continue to callee4): Use line_callee4_body. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4d6b55acb33..9c3dc8084c0 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,19 @@ +2010-01-19 Jan Kratochvil + + * gdb.mi/mi-break.exp (set line_callme_head, set line_callme_body): New. + (test_ignore_count): Declare line_callme_body global. + (run to breakpoint with ignore count): Use line_callme_body. + * gdb.mi/mi-cli.exp (set line_main_head, set line_main_body) + (set line_main_hello, set line_main_return): Reindent. + (set line_callee4_head, set line_callee4_body, set line_callee4_next): + New. + (continue to callee4): Use line_callee4_body. + (check *stopped from CLI command): Use line_callee4_next. + * gdb.mi/mi2-cli.exp (set line_main_head, set line_main_body) + (set line_main_hello, set line_main_return): Reindent. + (set line_callee4_head, set line_callee4_body): New. + (continue to callee4): Use line_callee4_body. + 2010-01-18 Tom Tromey PR c++/9680: diff --git a/gdb/testsuite/gdb.mi/mi-break.exp b/gdb/testsuite/gdb.mi/mi-break.exp index 1064f130eb2..93d605c8b00 100644 --- a/gdb/testsuite/gdb.mi/mi-break.exp +++ b/gdb/testsuite/gdb.mi/mi-break.exp @@ -56,6 +56,8 @@ set line_callee1_head [gdb_get_line_number "callee1 ("] set line_callee1_body [expr $line_callee1_head + 2] set line_main_head [gdb_get_line_number "main ("] set line_main_body [expr $line_main_head + 2] +set line_callme_head [gdb_get_line_number "callme ("] +set line_callme_body [expr $line_callme_head + 2] set fullname "fullname=\"${fullname_syntax}${srcfile}\"" @@ -152,6 +154,7 @@ proc test_rbreak_creation_and_listing {} { proc test_ignore_count {} { global mi_gdb_prompt + global line_callme_body mi_gdb_test "-break-insert -i 1 callme" \ "\\^done.*ignore=\"1\".*" \ @@ -159,7 +162,7 @@ proc test_ignore_count {} { mi_run_cmd - mi_expect_stop "breakpoint-hit" "callme" "\{name=\"i\",value=\"2\"\}" ".*basics.c" "52" \ + mi_expect_stop "breakpoint-hit" "callme" "\{name=\"i\",value=\"2\"\}" ".*basics.c" $line_callme_body \ {"" "disp=\"keep\"" } "run to breakpoint with ignore count" } diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp index 4ab2a2067a2..92fceff9f98 100644 --- a/gdb/testsuite/gdb.mi/mi-cli.exp +++ b/gdb/testsuite/gdb.mi/mi-cli.exp @@ -63,10 +63,13 @@ mi_gdb_test "-interpreter-exec console \"file $binfile\"" \ mi_run_to_main -set line_main_head [gdb_get_line_number "main ("] -set line_main_body [expr $line_main_head + 2] -set line_main_hello [gdb_get_line_number "Hello, World!"] -set line_main_return [expr $line_main_hello + 2] +set line_main_head [gdb_get_line_number "main ("] +set line_main_body [expr $line_main_head + 2] +set line_main_hello [gdb_get_line_number "Hello, World!"] +set line_main_return [expr $line_main_hello + 2] +set line_callee4_head [gdb_get_line_number "callee4 ("] +set line_callee4_body [expr $line_callee4_head + 2] +set line_callee4_next [expr $line_callee4_body + 1] mi_gdb_test "-interpreter-exec console \"set args foobar\"" \ {\^done} \ @@ -97,7 +100,7 @@ mi_gdb_test "-interpreter-exec console \"list\"" \ ".*\~\"$line_main_body\[\\\\t \]*callee1.*;\\\\n\".*\\^done" \ "-interpreter-exec console \"list\"" -mi_execute_to "exec-continue" "breakpoint-hit" "callee4" "" ".*basics.c" "28" \ +mi_execute_to "exec-continue" "breakpoint-hit" "callee4" "" ".*basics.c" $line_callee4_body \ { "" "disp=\"keep\"" } "continue to callee4" # NOTE: cagney/2003-02-03: Not yet. @@ -155,7 +158,7 @@ if {$async} { set reason "" } -mi_execute_to "interpreter-exec console step" $reason "callee4" "" ".*basics.c" "29" \ +mi_execute_to "interpreter-exec console step" $reason "callee4" "" ".*basics.c" $line_callee4_next \ "" "check *stopped from CLI command" # NOTE: cagney/2003-02-03: Not yet. diff --git a/gdb/testsuite/gdb.mi/mi2-cli.exp b/gdb/testsuite/gdb.mi/mi2-cli.exp index 46055ec690d..cf1eadb6945 100644 --- a/gdb/testsuite/gdb.mi/mi2-cli.exp +++ b/gdb/testsuite/gdb.mi/mi2-cli.exp @@ -63,10 +63,12 @@ mi_gdb_test "-interpreter-exec console \"file $binfile\"" \ mi_run_to_main -set line_main_head [gdb_get_line_number "main ("] -set line_main_body [expr $line_main_head + 2] -set line_main_hello [gdb_get_line_number "Hello, World!"] -set line_main_return [expr $line_main_hello + 2] +set line_main_head [gdb_get_line_number "main ("] +set line_main_body [expr $line_main_head + 2] +set line_main_hello [gdb_get_line_number "Hello, World!"] +set line_main_return [expr $line_main_hello + 2] +set line_callee4_head [gdb_get_line_number "callee4 ("] +set line_callee4_body [expr $line_callee4_head + 2] mi_gdb_test "-interpreter-exec console \"set args foobar\"" \ {\^done} \ @@ -97,7 +99,7 @@ mi_gdb_test "-interpreter-exec console \"list\"" \ ".*\~\"$line_main_body\[\\\\t \]*callee1.*;\\\\n\".*\\^done" \ "-interpreter-exec console \"list\"" -mi_execute_to "exec-continue" "breakpoint-hit" "callee4" "" ".*basics.c" "28" \ +mi_execute_to "exec-continue" "breakpoint-hit" "callee4" "" ".*basics.c" $line_callee4_body \ { "" "disp=\"keep\"" } \ "continue to callee4"