aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.ada/mi_task_arg.exp
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2019-10-15 02:21:37 +0200
committerTom de Vries <tdevries@suse.de>2019-10-15 02:21:37 +0200
commitb7be2d03fb2f873e0db74c84846df97787fc0dc6 (patch)
tree4b357a28c1e2089107b10fe7de2dd2a3d5ef5a1d /gdb/testsuite/gdb.ada/mi_task_arg.exp
parent22cc288441cf216c516b03e06254e59945d4993a (diff)
downloadgdb-b7be2d03fb2f873e0db74c84846df97787fc0dc6.zip
gdb-b7be2d03fb2f873e0db74c84846df97787fc0dc6.tar.gz
gdb-b7be2d03fb2f873e0db74c84846df97787fc0dc6.tar.bz2
[gdb/testsuite] Fix gdb.ada/mi_task_arg.exp
On openSUSE Leap 15.1, we have: ... FAIL: gdb.ada/mi_task_arg.exp: -stack-list-arguments 1 (unexpected output) ... The problem is that the stack-list-arguments command prints a frame argument 'self_id' for function system.tasking.stages.task_wrapper: ... frame={level="2",args=[{name="self_id",value="0x12345678"}] ... where none (args=[]) is expected. The frame argument is in fact correct. The FAIL does not show for say, fedora 30, because there the executable uses the system.tasking.stages.task_wrapper from /lib64/libgnarl-9.so. Adding "additional_flags=-bargs additional_flags=-shared additional_flags=-largs" to the flags argument of gdb_compile_ada gives us the same PASS, but installing libada7-debuginfo gets us the same FAIL again. Fix the FAIL by allowing the 'self_id' argument. Tested on x86_64-linux. Change-Id: I5aee5856fa6aeb0cc78aa4fe69deecba5b00b77a
Diffstat (limited to 'gdb/testsuite/gdb.ada/mi_task_arg.exp')
-rw-r--r--gdb/testsuite/gdb.ada/mi_task_arg.exp8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.ada/mi_task_arg.exp b/gdb/testsuite/gdb.ada/mi_task_arg.exp
index 6c4156f..29fcb44 100644
--- a/gdb/testsuite/gdb.ada/mi_task_arg.exp
+++ b/gdb/testsuite/gdb.ada/mi_task_arg.exp
@@ -44,7 +44,13 @@ if ![mi_runto "task_switch.break_me"] then {
# Verify that "-stack-list-arguments" does not cause the debugger to
# crash when printing the arguments of frame 1 (due to the internally-
# generated argument "_task").
+# Frame for task_switch.break_me
+set frame0 "frame=\{level=\"0\",args=\\\[\\\]\}"
+# Frame for task_switch.caller
+set frame1 "frame=\{level=\"1\",args=\\\[\{name=\"<_task>\",value=\"$hex\"\}\\\]\}"
+# Frame for system.tasking.stages.task_wrapper
+set frame2 "frame=\{level=\"2\",args=\\\[(\{name=\"self_id\",value=\"$hex\"\})?\\\]\}"
mi_gdb_test "-stack-list-arguments 1" \
- "\\^done,stack-args=\\\[frame=\{level=\"0\",args=\\\[\\\]\},frame=\{level=\"1\",args=\\\[\{name=\"<_task>\",value=\"$hex\"\}\\\]\},frame=\{level=\"2\",args=\\\[\\\]\}.*" \
+ "\\^done,stack-args=\\\[$frame0,$frame1,$frame2,.*" \
"-stack-list-arguments 1"