Many of the tracing tests fail when PIE is enabled in the compiler. Note that commit ba22ff8694e366fe5f27824566aae65fc6626841 ensures that PIE is disabled when running the tracing tests (due to Ubuntu/Debian defaulting GCC to PIE enabled). To reproduce the errors, on any system, do "s/nopie/pie/g" on .exp files for the following tests: * gdb.trace/backtrace.exp: * gdb.trace/circ.exp: * gdb.trace/collection.exp: * gdb.trace/ftrace.exp: * gdb.trace/mi-trace-unavailable.exp: * gdb.trace/mi-traceframe-changed.exp: * gdb.trace/qtro.exp: * gdb.trace/read-memory.exp: * gdb.trace/report.exp: * gdb.trace/tfile.exp: * gdb.trace/tfind.exp: * gdb.trace/unavailable.exp: Tests will fail due to being unable to find arguments on the stack frame. For example, variables are listed as "unavailable" here: (gdb) backtrace^M #0 gdb_recursion_test (depth=<unavailable>, q1=<unavailable>, q2=<unavailable>, q3=<unavailable>, q4=<unavailable>, q5=<unavailable>, q6=<unavailable>) at /work/alahay01/gdb-HEAD/build-aarch64/gdb/testsuite/../../../src/binutils-gdb/gdb/testsuite/gdb.trace/actions.c:69^M #1 0x0000aaaaaaaaad40 in gdb_c_test (parm=<unavailable>) at /work/alahay01/gdb-HEAD/build-aarch64/gdb/testsuite/../../../src/binutils-gdb/gdb/testsuite/gdb.trace/actions.c:113^M Backtrace stopped: previous frame identical to this frame (corrupt stack?)^M (gdb) FAIL: gdb.trace/backtrace.exp: 8.6: Backtrace, depth == 1, collect args and locals
Possible that this is just a consequence of enabling PIE, but we should figure out why. Equally might just be something missing in the trace code.