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.
This commit is contained in:
Jan Kratochvil 2010-01-19 08:00:39 +00:00
parent f6ebfac085
commit dd322c54e3
4 changed files with 36 additions and 12 deletions

View file

@ -1,3 +1,19 @@
2010-01-19 Jan Kratochvil <jan.kratochvil@redhat.com>
* 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 <tromey@redhat.com> 2010-01-18 Tom Tromey <tromey@redhat.com>
PR c++/9680: PR c++/9680:

View file

@ -56,6 +56,8 @@ set line_callee1_head [gdb_get_line_number "callee1 ("]
set line_callee1_body [expr $line_callee1_head + 2] set line_callee1_body [expr $line_callee1_head + 2]
set line_main_head [gdb_get_line_number "main ("] set line_main_head [gdb_get_line_number "main ("]
set line_main_body [expr $line_main_head + 2] 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}\"" set fullname "fullname=\"${fullname_syntax}${srcfile}\""
@ -152,6 +154,7 @@ proc test_rbreak_creation_and_listing {} {
proc test_ignore_count {} { proc test_ignore_count {} {
global mi_gdb_prompt global mi_gdb_prompt
global line_callme_body
mi_gdb_test "-break-insert -i 1 callme" \ mi_gdb_test "-break-insert -i 1 callme" \
"\\^done.*ignore=\"1\".*" \ "\\^done.*ignore=\"1\".*" \
@ -159,7 +162,7 @@ proc test_ignore_count {} {
mi_run_cmd 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" {"" "disp=\"keep\"" } "run to breakpoint with ignore count"
} }

View file

@ -67,6 +67,9 @@ set line_main_head [gdb_get_line_number "main ("]
set line_main_body [expr $line_main_head + 2] set line_main_body [expr $line_main_head + 2]
set line_main_hello [gdb_get_line_number "Hello, World!"] set line_main_hello [gdb_get_line_number "Hello, World!"]
set line_main_return [expr $line_main_hello + 2] 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\"" \ mi_gdb_test "-interpreter-exec console \"set args foobar\"" \
{\^done} \ {\^done} \
@ -97,7 +100,7 @@ mi_gdb_test "-interpreter-exec console \"list\"" \
".*\~\"$line_main_body\[\\\\t \]*callee1.*;\\\\n\".*\\^done" \ ".*\~\"$line_main_body\[\\\\t \]*callee1.*;\\\\n\".*\\^done" \
"-interpreter-exec console \"list\"" "-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" { "" "disp=\"keep\"" } "continue to callee4"
# NOTE: cagney/2003-02-03: Not yet. # NOTE: cagney/2003-02-03: Not yet.
@ -155,7 +158,7 @@ if {$async} {
set reason "" 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" "" "check *stopped from CLI command"
# NOTE: cagney/2003-02-03: Not yet. # NOTE: cagney/2003-02-03: Not yet.

View file

@ -67,6 +67,8 @@ set line_main_head [gdb_get_line_number "main ("]
set line_main_body [expr $line_main_head + 2] set line_main_body [expr $line_main_head + 2]
set line_main_hello [gdb_get_line_number "Hello, World!"] set line_main_hello [gdb_get_line_number "Hello, World!"]
set line_main_return [expr $line_main_hello + 2] 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\"" \ mi_gdb_test "-interpreter-exec console \"set args foobar\"" \
{\^done} \ {\^done} \
@ -97,7 +99,7 @@ mi_gdb_test "-interpreter-exec console \"list\"" \
".*\~\"$line_main_body\[\\\\t \]*callee1.*;\\\\n\".*\\^done" \ ".*\~\"$line_main_body\[\\\\t \]*callee1.*;\\\\n\".*\\^done" \
"-interpreter-exec console \"list\"" "-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\"" } \ { "" "disp=\"keep\"" } \
"continue to callee4" "continue to callee4"