* 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-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>
PR c++/9680:
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}\""
proc test_ignore_count {} {
global mi_gdb_prompt
+ global line_callme_body
mi_gdb_test "-break-insert -i 1 callme" \
"\\^done.*ignore=\"1\".*" \
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"
}
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} \
".*\~\"$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.
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.
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} \
".*\~\"$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"