diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-stack.c | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-stack.exp | 8 |
3 files changed, 11 insertions, 5 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a049ac3..d123a3a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca> + * gdb.mi/mi-stack.exp (test_stack_frame_listing): Use + mi_continue_to_line. + * gdb.mi/mi-stack.c (callee4): Add comment. + +2018-04-07 Simon Marchi <simon.marchi@polymtl.ca> + * gdb.mi/mi-stack.exp: Fix indentation. 2018-04-07 Simon Marchi <simon.marchi@ericsson.com> diff --git a/gdb/testsuite/gdb.mi/mi-stack.c b/gdb/testsuite/gdb.mi/mi-stack.c index e45fee6..9bc118e 100644 --- a/gdb/testsuite/gdb.mi/mi-stack.c +++ b/gdb/testsuite/gdb.mi/mi-stack.c @@ -24,7 +24,7 @@ int callee4 (void) { - int A=1; + int A=1; /* callee4 begin */ int B=2; int C; int D[3] = {0, 1, 2}; diff --git a/gdb/testsuite/gdb.mi/mi-stack.exp b/gdb/testsuite/gdb.mi/mi-stack.exp index 315b4ac..fcb74e2 100644 --- a/gdb/testsuite/gdb.mi/mi-stack.exp +++ b/gdb/testsuite/gdb.mi/mi-stack.exp @@ -46,8 +46,8 @@ proc test_stack_frame_listing {} { global mi_gdb_prompt global hex fullname_syntax srcfile - set line_callee4_head [gdb_get_line_number "callee4 ("] - set line_callee4_body [expr $line_callee4_head + 2] + set callee4_begin [gdb_get_line_number "callee4 begin"] + mi_continue_to_line $callee4_begin "continue to callee4 begin" # Obtain a stack trace # Tests: @@ -56,7 +56,7 @@ proc test_stack_frame_listing {} { # -stack-list-frames 1 3 # -stack-info-frame mi_gdb_test "231-stack-list-frames" \ - "231\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*${srcfile}\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$line_callee4_body\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4\",addr=\"$hex\",func=\"main\",.*\}\\\]" \ + "231\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*${srcfile}\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$callee4_begin\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4\",addr=\"$hex\",func=\"main\",.*\}\\\]" \ "stack frame listing" mi_gdb_test "232-stack-list-frames 1 1" \ "232\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\}\\\]" \ @@ -70,7 +70,7 @@ proc test_stack_frame_listing {} { "stack frame listing wrong" mi_gdb_test "235-stack-info-frame" \ - "235\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*${srcfile}\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$line_callee4_body\"\}" \ + "235\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*${srcfile}\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$callee4_begin\"\}" \ "selected frame listing" mi_gdb_test "236-stack-list-frames 1 300" \ |