# 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"