gdb/
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.mi / mi2-stack.exp
index 11f43cd2b3df6d7c6f207a2529d3c8638117b31f..50a95a1eb833907f02dc7d4d2438eb543a7b44a5 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2007
+# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -69,7 +69,7 @@ proc test_stack_frame_listing {} {
                 "stack frame listing 1 3"
 
     mi_gdb_test "234-stack-list-frames 1" \
-           "&.*234\\^error,msg=\"mi_cmd_stack_list_frames: Usage.*FRAME_LOW FRAME_HIGH.*\"" \
+           "234\\^error,msg=\"-stack-list-frames: Usage.*FRAME_LOW FRAME_HIGH.*\"" \
            "stack frame listing wrong"
 
     mi_gdb_test "235-stack-info-frame" \
@@ -120,7 +120,7 @@ proc test_stack_args_listing {} {
                 "stack args listing 1 1 3"
 
     mi_gdb_test "234-stack-list-arguments" \
-           "&.*234\\^error,msg=\"mi_cmd_stack_list_args: Usage.*PRINT_VALUES.*FRAME_LOW FRAME_HIGH.*\"" \
+           "234\\^error,msg=\"-stack-list-arguments: Usage.*PRINT_VALUES.*FRAME_LOW FRAME_HIGH.*\"" \
            "stack args listing wrong"
 
     mi_gdb_test "235-stack-list-arguments 1 1 300" \
@@ -151,7 +151,7 @@ proc test_stack_info_depth {} {
                 "stack info-depth 99"
 
     mi_gdb_test "231-stack-info-depth 99 99" \
-           "&.*231\\^error,msg=\"mi_cmd_stack_info_depth: Usage: .MAX_DEPTH.\"" \
+           "231\\^error,msg=\"-stack-info-depth: Usage: .MAX_DEPTH.\"" \
                 "stack info-depth wrong usage"
 }
 
@@ -173,13 +173,8 @@ proc test_stack_locals_listing {} {
 set line_callee4_return_0 [gdb_get_line_number "return 0;"]
 
 # step until A, B, C, D have some reasonable values.
-send_gdb "-exec-next 4\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*${srcfile}\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$line_callee4_return_0\"\}\r\n$mi_gdb_prompt$" {
-       pass "next's in callee4"
-    }
-    timeout { fail "next in callee4 (timeout)" }
-}
+mi_execute_to "exec-next 4" "end-stepping-range" "callee4" "" ".*${srcfile}" $line_callee4_return_0 ""\
+    "next's in callee4"
 
     mi_gdb_test "232-stack-list-locals 1" \
     "232\\^done,locals=\\\[\{name=\"A\",value=\"1\"\},\{name=\"B\",value=\"2\"\},\{name=\"C\",value=\"3\"\},\{name=\"D\",value=\"\\{0, 1, 2\\}\"\}\\\]" \
@@ -190,7 +185,7 @@ gdb_expect {
   "stack locals listing, simple types: names and values, complex type: names and types"
 
     mi_gdb_test "234-stack-list-locals" \
-           "&.*234\\^error,msg=\"mi_cmd_stack_list_locals: Usage.*PRINT_VALUES.*\"" \
+           "234\\^error,msg=\"-stack-list-locals: Usage.*PRINT_VALUES.*\"" \
            "stack locals listing wrong"
 
     mi_gdb_test "232-stack-select-frame 1" \
This page took 0.026221 seconds and 4 git commands to generate.