[PATCH] D70394: [DWARF] Add an api to get "interpreted" location lists
Pavel Labath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 06:48:58 PST 2019
labath marked 4 inline comments as done.
labath added inline comments.
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFAddressRange.h:59
+ const DWARFAddressRange &RHS) {
+ return std::tie(LHS.LowPC, LHS.HighPC) == std::tie(RHS.LowPC, RHS.HighPC);
+}
----------------
Ideally I'd have both this and the operator< above also compare the section index, but I did not want to do that in the same patch.
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFLocationExpression.h:32-37
+inline bool operator==(const DWARFLocationExpression &L,
+ const DWARFLocationExpression &R) {
+ return L.Range == R.Range && L.Expr == R.Expr;
+}
+
+raw_ostream &operator<<(raw_ostream &OS, const DWARFLocationExpression &Loc);
----------------
These, and other random operators the patch is adding, are to make sure one can make sense of the gtest output when the tests fail.
================
Comment at: llvm/lib/ObjectYAML/DWARFEmitter.cpp:318
+ virtual void onStartCompileUnit(DWARFYAML::Unit &CU) {
+ Length = CU.Version >= 5 ? 8 : 7;
+ }
----------------
This doesn't take type units into account, but then the whole of DWARFEmitter does not handle type units AFAICT.
================
Comment at: llvm/test/tools/llvm-dwarfdump/X86/statistics-dwo.test:83-84
CHECK: "call site entries":7
-CHECK: "scope bytes total":2817
-CHECK: "scope bytes covered":506
+CHECK: "scope bytes total":2702
+CHECK: "scope bytes covered":1160
CHECK: "total function size":594
----------------
I haven't checked if these numbers are fully correct, but they should definitely be *more* correct then before, as the code previously did not handle split dwarf location lists at all.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70394/new/
https://reviews.llvm.org/D70394
More information about the llvm-commits
mailing list