This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


2011-10-28  Ian Lance Taylor  <>

	* dwarf.c (display_debug_frames): If do_debug_frames_interp,
	DW_CFA_restore goes to DW_CFA_undefined, not DW_CFA_unreferenced.

? doc/
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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]