This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH COMMITTED: Fix readelf --debug=frames-interp with DW_CFA_restore
- From: Ian Lance Taylor <iant at google dot com>
- To: binutils at sourceware dot org
- Date: Fri, 28 Oct 2011 11:30:14 -0700
- Subject: PATCH COMMITTED: Fix readelf --debug=frames-interp with DW_CFA_restore
When using readelf --debug=frames-interp, if the code saw a
DW_CFA_restore, and the register was not mentioned in the CIE, it would
be dropped from the table entirely. This led to confusing output in
which not all columns were listed and the ones that were sometimes
showed the wrong value. This patch fixes the problem in the obvious
way. I didn't see any tests for this functionality, and I didn't add
any. Committed to mainline as obvious.
Ian
2011-10-28 Ian Lance Taylor <iant@google.com>
* dwarf.c (display_debug_frames): If do_debug_frames_interp,
DW_CFA_restore goes to DW_CFA_undefined, not DW_CFA_unreferenced.
? doc/binutils.info
Index: dwarf.c
===================================================================
RCS file: /cvs/src/src/binutils/dwarf.c,v
retrieving revision 1.103
diff -u -p -r1.103 dwarf.c
--- dwarf.c 24 Oct 2011 14:28:02 -0000 1.103
+++ dwarf.c 28 Oct 2011 18:21:57 -0000
@@ -5110,6 +5110,9 @@ display_debug_frames (struct dwarf_secti
{
fc->col_type[opa] = cie->col_type[opa];
fc->col_offset[opa] = cie->col_offset[opa];
+ if (do_debug_frames_interp
+ && fc->col_type[opa] == DW_CFA_unreferenced)
+ fc->col_type[opa] = DW_CFA_undefined;
}
break;