[PATCH] D34177: [DWARF] Partial verification for .apple_names accelerator table in llvm-dwarfdump output.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 13 16:36:44 PDT 2017


aprantl added a comment.

In https://reviews.llvm.org/D34177#779723, @probinson wrote:

> In https://reviews.llvm.org/D34177#779712, @aprantl wrote:
>
> > In https://reviews.llvm.org/D34177#779664, @probinson wrote:
> >
> > > I understand that DWARFAcceleratorTable already exists and you are building on that, but I have to wonder how much (if any) of this can be leveraged for the actual DWARF v5 standard's .debug_names section.  (I haven't looked at any of this stuff yet; the accelerator table is pretty far down my list of v5 features to look at.)  If the answer is "not much" then maybe it ought to be renamed DWARFAppleNamesTable instead.
> >
> >
> > The DWARF v5 accelerator table is a direct evolution of the Apple accelerator table, so it is quite possible that we can share some of the implementation. Form a cursory glance it looks like at least the accessors for the hash table (bucket count, ...) are similar enough that they can share a common interface. We probably can't make that call until someone actually sits down and comes up with a design for how to implement the DWARF 5 accelerator tables, though. How about we revisit this question then? Hopefully this won't be too far out into the future.
>
>
> Thanks for the info, if there's a reasonable chance to make it reasonably common then I'm happy to leave the naming as is for now.


And it is totally possible that



================
Comment at: include/llvm/DebugInfo/DWARF/DWARFVerifier.h:103
+  ///
+  /// @return True if the .apple_names verifies successfully, false otherwise.
+  bool handleAppleNames();
----------------
side-note: We generally use `\return` over `@return`. You might want to update this in the entire file in a separate commit.


================
Comment at: lib/DebugInfo/DWARF/DWARFVerifier.cpp:291
+  if (!AppleNames.extract()) {
+    OS << "error: cannot extract .apple_names accelerator table\n";
+    return false;
----------------
General question: Should error messages be printed to errs() (or rather a separate error stream passed to DWARFVerifier)?
This is a pre-existing problem with the other checks, too, so it doesn't need to be fixed in this patch.


https://reviews.llvm.org/D34177





More information about the llvm-commits mailing list