diff options
author | Tom de Vries <tdevries@suse.de> | 2023-09-26 18:57:49 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-09-26 18:57:49 +0200 |
commit | 9373a4b8918683fa5dfdba707d1516dbfdeb9c62 (patch) | |
tree | 2d310c1a64eb2b5f97f33be5cc9bd613f7faac7e | |
parent | 54e053874dd91c96b0f70b6536147aa18b9ee305 (diff) | |
download | binutils-9373a4b8918683fa5dfdba707d1516dbfdeb9c62.zip binutils-9373a4b8918683fa5dfdba707d1516dbfdeb9c62.tar.gz binutils-9373a4b8918683fa5dfdba707d1516dbfdeb9c62.tar.bz2 |
[gdb/testsuite] Fix gdb.ada/mi_task_arg.exp with newer gcc
When running test-case gdb.ada/mi_task_arg.exp on openSUSE Tumbleweed using
gcc 13.2.1, I run into (layout adapted for readability):
...
-stack-list-arguments 1^M
^done,stack-args=[
frame={level="0",args=[]},
frame={level="1",args=[{name="<_task>",value="0x464820"},
{name="<_taskL>",value="129"}]},
frame={level="2",args=[{name="self_id",value="0x464840"}]},
frame={level="3",args=[]},
frame={level="4",args=[]}
]^M
(gdb) ^M
FAIL: gdb.ada/mi_task_arg.exp: -stack-list-arguments 1 (unexpected output)
...
On openSUSE Leap 15.4 with gcc 7.5.0 I get instead:
...
-stack-list-arguments 1^M
^done,stack-args=[
frame={level="0",args=[]},
frame={level="1",args=[{name="<_task>",value="0x444830"}]},
frame={level="2",args=[{name="self_id",value="0x444850"}]},
frame={level="3",args=[]},
frame={level="4",args=[]}]^M
(gdb) ^M
PASS: gdb.ada/mi_task_arg.exp: -stack-list-arguments 1
...
The difference in gdb output is due to difference in the dwarf generated by
the compiler, so I don't see a problem with gdb here.
Fix this by updating the test-case to accept this output.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
-rw-r--r-- | gdb/testsuite/gdb.ada/mi_task_arg.exp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.ada/mi_task_arg.exp b/gdb/testsuite/gdb.ada/mi_task_arg.exp index 1d84e43..747f3d3 100644 --- a/gdb/testsuite/gdb.ada/mi_task_arg.exp +++ b/gdb/testsuite/gdb.ada/mi_task_arg.exp @@ -44,7 +44,8 @@ if {![mi_runto "task_switch.break_me"]} { set frame0 "frame=\{level=\"0\",args=\\\[\\\]\}" # Frame for task_switch.caller set frame1_args "\{name=\"<_task>\",value=\"$hex\"\}" -set frame1 "frame=\{level=\"1\",args=\\\[$frame1_args\\\]\}" +set frame1_opt_args "\{name=\"<_taskL>\",value=\"$decimal\"\}" +set frame1 "frame=\{level=\"1\",args=\\\[${frame1_args}(,$frame1_opt_args)?\\\]\}" # Frame for system.tasking.stages.task_wrapper set frame2_args "(\{name=\"self_id\",value=\"($hex|<optimized out>)\"\})?" set frame2 "frame=\{level=\"2\",args=\\\[$frame2_args\\\]\}" |