aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.threads/pending-step.exp
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2025-08-19 01:08:06 -0700
committerIndu Bhagat <indu.bhagat@oracle.com>2025-08-19 01:08:06 -0700
commit09292f4ae2ccb46130652f6b310ee7a5227326d3 (patch)
treebef73761e23cdbd853bb9cb82e119dbe5cdfa347 /gdb/testsuite/gdb.threads/pending-step.exp
parent7e432e93f8aaa14368476cf5eae9d55c18a266fb (diff)
downloadbinutils-master.zip
binutils-master.tar.gz
binutils-master.tar.bz2
binutils: dwarf: fix display of large cfa_offsetHEADmaster
eh_frame textual dump was not correct when the cfa_offset is a large value. The reason is that the dumping code generally assumes the cfa_offset is an 'int'. cfa_offset values can be updated by various DWARF opcodes, like: - DW_CFA_def_cfa, DW_CFA_def_cfa_offset which bring unsigned leb128 cfa_offset - DW_CFA_def_cfa_sf, DW_CFA_def_cfa_offset_sf which bring signed leb128 cfa_offset Internally, the routines in dwarf.c keep the value as 'uint64_t cfa_offset'. That size of the datatype is expected to work for most of the real-world cases. Care, however, needs to be taken when it comes to the signedness of the value. Fix the buggy behavior by adding an additional field to track whether the value of cfa_offset is signed or unsigned and display accordingly for "frames-interp" output. The display of cfa_offset had issues in both "frames-interp" output (objdump -WF or do_debug_frames_interp) and the "frames" output. Add two new tests: cfi-common-10.s uses a large positive cfa_offset (with "frames output), and cfi-x86_64-2.s uses a negative cfa_offset (with "frames-interp" output). ChangeLog: * binutils/dwarf.c (frame_display_row): Update format string based on signedness. (display_debug_frames): Track signedness. Also fix display of cfa_offset using PRIu64 or PRId64 as applicable. * gas/testsuite/gas/cfi/cfi.exp: Add two new tests. * gas/testsuite/gas/cfi/cfi-common-10.d: New test. * gas/testsuite/gas/cfi/cfi-common-10.s: New test. * gas/testsuite/gas/cfi/cfi-x86_64-2.d: New test. * gas/testsuite/gas/cfi/cfi-x86_64-2.s: New test.
Diffstat (limited to 'gdb/testsuite/gdb.threads/pending-step.exp')
0 files changed, 0 insertions, 0 deletions