[PATCH] [dwarfdump] Pretty print location expressions and location lists
David Blaikie
dblaikie at gmail.com
Sun Feb 1 17:51:55 PST 2015
================
Comment at: include/llvm/DebugInfo/DWARFDebugLoc.h:80
@@ -69,1 +79,3 @@
+ void dump(raw_ostream &OS, const DWARFUnit *Unit,
+ unsigned Indent = 12) const;
};
----------------
12?
================
Comment at: include/llvm/DebugInfo/DWARFExpression.h:109
@@ +108,3 @@
+
+ bool operator==(const iterator &I) const {
+ return Expression == I.Expression && Offset == I.Offset;
----------------
operator overloads that can be non-members generally should be (to allow symmetric conversions on LHS and RHS) - could define it inline as a friend if that's useful.
================
Comment at: lib/DebugInfo/DWARFDebugLoc.cpp:34
@@ +33,3 @@
+ Unit->getAddressByteSize());
+ DWARFExpression(Data, Unit).Print(OS, false);
+ }
----------------
what's the boolean? ('false')
(could use a comment, maybe, or an enum, etc)
================
Comment at: test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll:12
@@ -11,2 +11,3 @@
; CHECK-NEXT: DW_AT_location
-; CHECK-NEXT: DW_AT_name {{.*}} "z_s"
+; CHECK-NOT: DW_TAG
+; CHECK: DW_AT_name {{.*}} "z_s"
----------------
Maybe CHECK-NOT: DW_{{TAG|AT}} ? I assume this was here so we didn't skip any extra attributes on this TAG.
================
Comment at: test/DebugInfo/X86/debug-loc-offset.ll:50
@@ -49,1 +49,3 @@
+; do not check the location stored here, as it will be offseted by the
+; compile unit's low_pc. The real check is below in the debug_loc section.
; CHECK-NOT: DW_TAG
----------------
Not sure I follow why the low_pc offset would be problematic - it'll always be zero in a single-CU file, right?
http://reviews.llvm.org/D6771
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list