[PATCH] D131224: [objdump] Find debug information with Build ID/debuginfod.
Daniel Thornburgh via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 23 12:00:15 PDT 2022
mysterymath added inline comments.
================
Comment at: llvm/lib/Object/BuildID.cpp:1
+#include "llvm/Object/BuildID.h"
+
----------------
phosek wrote:
> This file is missing the copyright header.
Wow whoops. Done.
================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:1272-1283
+static bool hasDebugInfo(const ObjectFile &Obj) {
+ // For now, only ELF DWARF sections are checked.
+ if (!Obj.isELF())
+ return true;
+ return any_of(Obj.sections(), [](SectionRef Sec) {
+ Expected<StringRef> Name = Sec.getName();
+ if (Name)
----------------
phosek wrote:
> Could this be added as a method to `ObjectFile`?
Done, and this also made it obvious that there's already a reliable isDebugSection to base this off of.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131224/new/
https://reviews.llvm.org/D131224
More information about the llvm-commits
mailing list