[PATCH] D21503: [llvm-dwarfdump] - Teach dwarfdump to dump gdb-index section.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 02:34:15 PDT 2016


grimar added a comment.

Thanks for review, Davide ! My comments below.


================
Comment at: include/llvm/DebugInfo/DIContext.h:130
@@ -129,2 +129,3 @@
+  DIDT_GdbIndex,
 };
 
----------------
davide wrote:
> Unsorted?
Fixed.

================
Comment at: include/llvm/DebugInfo/DWARF/DWARFContext.h:46
@@ -44,2 +45,3 @@
   std::unique_ptr<DWARFUnitIndex> TUIndex;
+  std::unique_ptr<DWARFGdbIndex> GdbIndex;
   std::unique_ptr<DWARFDebugAbbrev> Abbrev;
----------------
davide wrote:
> Ditto.
Fixed.

================
Comment at: include/llvm/DebugInfo/DWARF/DWARFContext.h:156
@@ -153,1 +155,3 @@
 
+  const DWARFGdbIndex &getGdbIndex();
+
----------------
davide wrote:
> You can probably group with the other get*Index()
Fixed.

================
Comment at: lib/DebugInfo/DWARF/DWARFGdbIndex.cpp:12
@@ +11,3 @@
+#include "llvm/Support/Format.h"
+#include "llvm/Support/raw_ostream.h"
+
----------------
davide wrote:
> This include is dead (I think).
You right. Removed.

================
Comment at: lib/DebugInfo/DWARF/DWARFGdbIndex.cpp:22
@@ +21,3 @@
+               CuList.size())
+     << '\n';
+  uint32_t I = 0;
----------------
davide wrote:
> I may be wrong, but this seems formatted weirdly. Did you clang-format the patch?
Yes, this file is formatted. What I noticed that clang-formatting is uncommon for this tool. But I guess we want it for new code.

================
Comment at: lib/DebugInfo/DWARF/DWARFGdbIndex.cpp:137
@@ +136,3 @@
+
+  // The symbol table.This is an open - addressed hash table.The size of the
+  // hash table is always a power of 2.
----------------
davide wrote:
> Space after dot. Also, open addressed (without the --) maybe?
Fixed. "open - addressed" was taken from documentation (https://sourceware.org/gdb/onlinedocs/gdb/Index-Section-Format.html), I do not know is better.


http://reviews.llvm.org/D21503





More information about the llvm-commits mailing list