diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-06-30 12:11:54 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2021-06-30 12:11:54 +0100 |
commit | 280c57ff58f8cb7c70d47ffbfeb446ca9b562c96 (patch) | |
tree | 5de97dd6cba8f139cef2b2b72bfe54c3a3d256c4 /binutils/dwarf.c | |
parent | d8b04da736be0c8781e1067ee26e06fdd3b4c63c (diff) | |
download | gdb-280c57ff58f8cb7c70d47ffbfeb446ca9b562c96.zip gdb-280c57ff58f8cb7c70d47ffbfeb446ca9b562c96.tar.gz gdb-280c57ff58f8cb7c70d47ffbfeb446ca9b562c96.tar.bz2 |
Fix signedness of def_cfa_sf and def_cfa_offset_sf
* dwarf.c (display_debug_frames): Both DW_CFA_def_cfa_sf
and DW_CFA_def_cfa_offset_sf have a signed offset.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r-- | binutils/dwarf.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c index a57f0da..a61f099 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -9432,19 +9432,21 @@ display_debug_frames (struct dwarf_section *section, case DW_CFA_def_cfa_sf: READ_ULEB (fc->cfa_reg, start, block_end); - READ_ULEB (fc->cfa_offset, start, block_end); - fc->cfa_offset = fc->cfa_offset * fc->data_factor; + READ_SLEB (l, start, block_end); + l *= fc->data_factor; + fc->cfa_offset = l; fc->cfa_exp = 0; if (! do_debug_frames_interp) - printf (" DW_CFA_def_cfa_sf: %s ofs %d\n", - regname (fc->cfa_reg, 0), (int) fc->cfa_offset); + printf (" DW_CFA_def_cfa_sf: %s ofs %ld\n", + regname (fc->cfa_reg, 0), (long) l); break; case DW_CFA_def_cfa_offset_sf: - READ_ULEB (fc->cfa_offset, start, block_end); - fc->cfa_offset *= fc->data_factor; + READ_SLEB (l, start, block_end); + l *= fc->data_factor; + fc->cfa_offset = l; if (! do_debug_frames_interp) - printf (" DW_CFA_def_cfa_offset_sf: %d\n", (int) fc->cfa_offset); + printf (" DW_CFA_def_cfa_offset_sf: %ld\n", (long) l); break; case DW_CFA_MIPS_advance_loc8: |