aboutsummaryrefslogtreecommitdiff
path: root/gdb/opencl-lang.c
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2021-07-18 21:36:24 +0100
committerPedro Alves <pedro@palves.net>2021-09-23 18:58:51 +0100
commit9b8efa2cd14410cb23d8873fd8f0665155569523 (patch)
treeb90d4c90d8042717225e856a441c7209f05bb01e /gdb/opencl-lang.c
parentc80e29dba968beca5eee7210d2030d27fe7790c3 (diff)
downloadgdb-9b8efa2cd14410cb23d8873fd8f0665155569523.zip
gdb-9b8efa2cd14410cb23d8873fd8f0665155569523.tar.gz
gdb-9b8efa2cd14410cb23d8873fd8f0665155569523.tar.bz2
Test that frame info/IDs are stable/consistent
This adds a testcase that tests that the unwinder produces consistent frame info and frame IDs by making sure that "info frame" shows the same result when stopped at a function (level == 0), compared to when we find the same frame in the stack at a level > 0. E.g., on x86-64, right after running to main, we see: (gdb) info frame Stack level 0, frame at 0x7fffffffd340: rip = 0x555555555168 in main (gdb.base/backtrace.c:41); saved rip = 0x7ffff7dd90b3 source language c. Arglist at 0x7fffffffd330, args: Locals at 0x7fffffffd330, Previous frame's sp is 0x7fffffffd340 Saved registers: rbp at 0x7fffffffd330, rip at 0x7fffffffd338 (gdb) and then after continuing to a function called by main, and selecting the "main" frame again, we see: (gdb) info frame Stack level 3, frame at 0x7fffffffd340: rip = 0x555555555172 in main (gdb.base/backtrace.c:41); saved rip = 0x7ffff7dd90b3 caller of frame at 0x7fffffffd330 source language c. Arglist at 0x7fffffffd330, args: Locals at 0x7fffffffd330, Previous frame's sp is 0x7fffffffd340 Saved registers: rbp at 0x7fffffffd330, rip at 0x7fffffffd338 (gdb) The only differences should be in the stack level, the 'rip = ' address, and the presence of the "caller of frame at" info. All the rest should be the same. If it isn't, it probably means that the frame base, the frame ID, etc. aren't stable & consistent. The testcase exercises both the DWARF and the heuristic unwinders, using "maint set dwarf unwinder on/off". Tested on {x86-64 -m64, x86-64 -m32, Aarch64, Power8} GNU/Linux. Change-Id: I795001c82cc70d543d197415e3f80ce5dc7f3452
Diffstat (limited to 'gdb/opencl-lang.c')
0 files changed, 0 insertions, 0 deletions