+2021-06-30 Richard Henderson <richard.henderson@linaro.org>
+
+ * dwarf.c (display_debug_frames): Both DW_CFA_def_cfa_sf
+ and DW_CFA_def_cfa_offset_sf have a signed offset.
+
2021-06-19 Alan Modra <amodra@gmail.com>
* dwarf.c (display_debug_lines_decoded): Use memcpy rather than
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: