-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Revert "[dsymutil] Remove support for obfuscated bitcode" #85826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 43a2ec4.
@llvm/pr-subscribers-debuginfo Author: Andres Villegas (avillega) ChangesReverts llvm/llvm-project#85713 Since it is breaking Linux x64 builds. Patch is 40.26 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/85826.diff 30 Files Affected:
diff --git a/llvm/docs/CommandGuide/dsymutil.rst b/llvm/docs/CommandGuide/dsymutil.rst
index e3f2f33224b015..af9d7f16b36196 100644
--- a/llvm/docs/CommandGuide/dsymutil.rst
+++ b/llvm/docs/CommandGuide/dsymutil.rst
@@ -140,6 +140,10 @@ OPTIONS
(in bytes) to the linked dSYM. The table is sorted by the output size listing
the object files with the largest contribution first.
+.. option:: --symbol-map <bcsymbolmap>
+
+ Update the existing dSYMs inplace using symbol map specified.
+
.. option:: -s, --symtab
Dumps the symbol table found in *executable* or object file(s) and exits.
diff --git a/llvm/include/llvm/CodeGen/NonRelocatableStringpool.h b/llvm/include/llvm/CodeGen/NonRelocatableStringpool.h
index 4b8eed7bdb1b53..3dc0731f5a04ee 100644
--- a/llvm/include/llvm/CodeGen/NonRelocatableStringpool.h
+++ b/llvm/include/llvm/CodeGen/NonRelocatableStringpool.h
@@ -27,7 +27,10 @@ class NonRelocatableStringpool {
/// order.
using MapTy = StringMap<DwarfStringPoolEntry, BumpPtrAllocator>;
- NonRelocatableStringpool(bool PutEmptyString = false) {
+ NonRelocatableStringpool(
+ std::function<StringRef(StringRef Input)> Translator = nullptr,
+ bool PutEmptyString = false)
+ : Translator(Translator) {
if (PutEmptyString)
getEntry("");
}
@@ -56,6 +59,7 @@ class NonRelocatableStringpool {
MapTy Strings;
uint64_t CurrentEndOffset = 0;
unsigned NumEntries = 0;
+ std::function<StringRef(StringRef Input)> Translator;
};
/// Helper for making strong types.
diff --git a/llvm/include/llvm/DWARFLinker/Classic/DWARFStreamer.h b/llvm/include/llvm/DWARFLinker/Classic/DWARFStreamer.h
index e7a1a3cd838c22..bebdfd5e60257e 100644
--- a/llvm/include/llvm/DWARFLinker/Classic/DWARFStreamer.h
+++ b/llvm/include/llvm/DWARFLinker/Classic/DWARFStreamer.h
@@ -45,13 +45,16 @@ class DwarfStreamer : public DwarfEmitter {
public:
DwarfStreamer(DWARFLinkerBase::OutputFileType OutFileType,
raw_pwrite_stream &OutFile,
+ DWARFLinkerBase::TranslatorFuncTy Translator,
DWARFLinkerBase::MessageHandlerTy Warning)
- : OutFile(OutFile), OutFileType(OutFileType), WarningHandler(Warning) {}
+ : OutFile(OutFile), OutFileType(OutFileType), Translator(Translator),
+ WarningHandler(Warning) {}
virtual ~DwarfStreamer() = default;
static Expected<std::unique_ptr<DwarfStreamer>> createStreamer(
const Triple &TheTriple, DWARFLinkerBase::OutputFileType FileType,
- raw_pwrite_stream &OutFile, DWARFLinkerBase::MessageHandlerTy Warning);
+ raw_pwrite_stream &OutFile, DWARFLinkerBase::TranslatorFuncTy Translator,
+ DWARFLinkerBase::MessageHandlerTy Warning);
Error init(Triple TheTriple, StringRef Swift5ReflectionSegmentName);
@@ -292,6 +295,7 @@ class DwarfStreamer : public DwarfEmitter {
/// The output file we stream the linked Dwarf to.
raw_pwrite_stream &OutFile;
DWARFLinker::OutputFileType OutFileType = DWARFLinker::OutputFileType::Object;
+ std::function<StringRef(StringRef Input)> Translator;
uint64_t RangesSectionSize = 0;
uint64_t RngListsSectionSize = 0;
diff --git a/llvm/include/llvm/DWARFLinker/DWARFLinkerBase.h b/llvm/include/llvm/DWARFLinker/DWARFLinkerBase.h
index 70b25cf02df7f8..5c811b668f0a31 100644
--- a/llvm/include/llvm/DWARFLinker/DWARFLinkerBase.h
+++ b/llvm/include/llvm/DWARFLinker/DWARFLinkerBase.h
@@ -82,6 +82,7 @@ class DWARFLinkerBase {
std::function<void(const DWARFFile &File, llvm::StringRef Output)>;
using ObjectPrefixMapTy = std::map<std::string, std::string>;
using CompileUnitHandlerTy = function_ref<void(const DWARFUnit &Unit)>;
+ using TranslatorFuncTy = std::function<StringRef(StringRef)>;
using SwiftInterfacesMapTy = std::map<std::string, std::string>;
/// Type of output file.
enum class OutputFileType : uint8_t {
diff --git a/llvm/include/llvm/DWARFLinker/Parallel/DWARFLinker.h b/llvm/include/llvm/DWARFLinker/Parallel/DWARFLinker.h
index 8acc046d072493..5312712a4a5b81 100644
--- a/llvm/include/llvm/DWARFLinker/Parallel/DWARFLinker.h
+++ b/llvm/include/llvm/DWARFLinker/Parallel/DWARFLinker.h
@@ -123,7 +123,8 @@ class DWARFLinker : public DWARFLinkerBase {
/// Creates dwarf linker instance.
static std::unique_ptr<DWARFLinker>
- createLinker(MessageHandlerTy ErrorHandler, MessageHandlerTy WarningHandler);
+ createLinker(MessageHandlerTy ErrorHandler, MessageHandlerTy WarningHandler,
+ TranslatorFuncTy StringsTranslator = nullptr);
/// Set output DWARF handler. Result of linking DWARF is set of sections
/// containing final debug info. DWARFLinkerBase::link() pass generated
diff --git a/llvm/lib/CodeGen/NonRelocatableStringpool.cpp b/llvm/lib/CodeGen/NonRelocatableStringpool.cpp
index 26857c6a40889d..e8391afb8e3f8d 100644
--- a/llvm/lib/CodeGen/NonRelocatableStringpool.cpp
+++ b/llvm/lib/CodeGen/NonRelocatableStringpool.cpp
@@ -12,6 +12,8 @@
namespace llvm {
DwarfStringPoolEntryRef NonRelocatableStringpool::getEntry(StringRef S) {
+ if (Translator)
+ S = Translator(S);
auto I = Strings.insert({S, DwarfStringPoolEntry()});
auto &Entry = I.first->second;
if (I.second || !Entry.isIndexed()) {
@@ -26,6 +28,9 @@ DwarfStringPoolEntryRef NonRelocatableStringpool::getEntry(StringRef S) {
StringRef NonRelocatableStringpool::internString(StringRef S) {
DwarfStringPoolEntry Entry{nullptr, 0, DwarfStringPoolEntry::NotIndexed};
+ if (Translator)
+ S = Translator(S);
+
auto InsertResult = Strings.insert({S, Entry});
return InsertResult.first->getKey();
}
diff --git a/llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp b/llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
index 60f664ece7eef9..9b581a6c9ab774 100644
--- a/llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
+++ b/llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
@@ -2701,8 +2701,8 @@ Error DWARFLinker::link() {
// This Dwarf string pool which is used for emission. It must be used
// serially as the order of calling getStringOffset matters for
// reproducibility.
- OffsetsStringPool DebugStrPool(true);
- OffsetsStringPool DebugLineStrPool(false);
+ OffsetsStringPool DebugStrPool(StringsTranslator, true);
+ OffsetsStringPool DebugLineStrPool(StringsTranslator, false);
DebugDieValuePool StringOffsetPool;
// ODR Contexts for the optimize.
diff --git a/llvm/lib/DWARFLinker/Classic/DWARFStreamer.cpp b/llvm/lib/DWARFLinker/Classic/DWARFStreamer.cpp
index 8b31b5ead29ad0..6d522370e440d1 100644
--- a/llvm/lib/DWARFLinker/Classic/DWARFStreamer.cpp
+++ b/llvm/lib/DWARFLinker/Classic/DWARFStreamer.cpp
@@ -32,9 +32,10 @@ using namespace dwarf_linker::classic;
Expected<std::unique_ptr<DwarfStreamer>> DwarfStreamer::createStreamer(
const Triple &TheTriple, DWARFLinkerBase::OutputFileType FileType,
- raw_pwrite_stream &OutFile, DWARFLinkerBase::MessageHandlerTy Warning) {
+ raw_pwrite_stream &OutFile, DWARFLinkerBase::TranslatorFuncTy Translator,
+ DWARFLinkerBase::MessageHandlerTy Warning) {
std::unique_ptr<DwarfStreamer> Streamer =
- std::make_unique<DwarfStreamer>(FileType, OutFile, Warning);
+ std::make_unique<DwarfStreamer>(FileType, OutFile, Translator, Warning);
if (Error Err = Streamer->init(TheTriple, "__DWARF"))
return std::move(Err);
@@ -976,10 +977,11 @@ void DwarfStreamer::emitLineTableString(const DWARFDebugLine::Prologue &P,
switch (String.getForm()) {
case dwarf::DW_FORM_string: {
- StringRef Str = *StringVal;
- Asm->OutStreamer->emitBytes(Str.data());
+ StringRef TranslatedString =
+ (Translator) ? Translator(*StringVal) : *StringVal;
+ Asm->OutStreamer->emitBytes(TranslatedString.data());
Asm->emitInt8(0);
- LineSectionSize += Str.size() + 1;
+ LineSectionSize += TranslatedString.size() + 1;
} break;
case dwarf::DW_FORM_strp:
case dwarf::DW_FORM_line_strp: {
diff --git a/llvm/lib/DWARFLinker/Parallel/DWARFLinker.cpp b/llvm/lib/DWARFLinker/Parallel/DWARFLinker.cpp
index 31c7e867767a0f..ad8d28a643174a 100644
--- a/llvm/lib/DWARFLinker/Parallel/DWARFLinker.cpp
+++ b/llvm/lib/DWARFLinker/Parallel/DWARFLinker.cpp
@@ -15,6 +15,8 @@ using namespace dwarf_linker::parallel;
std::unique_ptr<DWARFLinker>
DWARFLinker::createLinker(MessageHandlerTy ErrorHandler,
- MessageHandlerTy WarningHandler) {
- return std::make_unique<DWARFLinkerImpl>(ErrorHandler, WarningHandler);
+ MessageHandlerTy WarningHandler,
+ TranslatorFuncTy StringsTranslator) {
+ return std::make_unique<DWARFLinkerImpl>(ErrorHandler, WarningHandler,
+ StringsTranslator);
}
diff --git a/llvm/lib/DWARFLinker/Parallel/DWARFLinkerGlobalData.h b/llvm/lib/DWARFLinker/Parallel/DWARFLinkerGlobalData.h
index 7ca81eb34f005e..38c261a8106fcd 100644
--- a/llvm/lib/DWARFLinker/Parallel/DWARFLinkerGlobalData.h
+++ b/llvm/lib/DWARFLinker/Parallel/DWARFLinkerGlobalData.h
@@ -21,6 +21,7 @@ class DWARFDie;
namespace dwarf_linker {
namespace parallel {
+using TranslatorFuncTy = std::function<StringRef(StringRef)>;
using MessageHandlerTy = std::function<void(
const Twine &Warning, StringRef Context, const DWARFDie *DIE)>;
@@ -94,6 +95,19 @@ class LinkingGlobalData {
/// Returns global string pool.
StringPool &getStringPool() { return Strings; }
+ /// Set translation function.
+ void setTranslator(TranslatorFuncTy Translator) {
+ this->Translator = Translator;
+ }
+
+ /// Translate specified string.
+ StringRef translateString(StringRef String) {
+ if (Translator)
+ return Translator(String);
+
+ return String;
+ }
+
/// Returns linking options.
const DWARFLinkerOptions &getOptions() const { return Options; }
@@ -147,6 +161,7 @@ class LinkingGlobalData {
protected:
llvm::parallel::PerThreadBumpPtrAllocator Allocator;
StringPool Strings;
+ TranslatorFuncTy Translator;
DWARFLinkerOptions Options;
MessageHandlerTy WarningHandler;
MessageHandlerTy ErrorHandler;
diff --git a/llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.cpp b/llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.cpp
index e68bf0c227a0a0..49b08997eb9c1c 100644
--- a/llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.cpp
+++ b/llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.cpp
@@ -20,9 +20,11 @@ using namespace dwarf_linker;
using namespace dwarf_linker::parallel;
DWARFLinkerImpl::DWARFLinkerImpl(MessageHandlerTy ErrorHandler,
- MessageHandlerTy WarningHandler)
+ MessageHandlerTy WarningHandler,
+ TranslatorFuncTy StringsTranslator)
: UniqueUnitID(0), DebugStrStrings(GlobalData),
DebugLineStrStrings(GlobalData), CommonSections(GlobalData) {
+ GlobalData.setTranslator(StringsTranslator);
GlobalData.setErrorHandler(ErrorHandler);
GlobalData.setWarningHandler(WarningHandler);
}
diff --git a/llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.h b/llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.h
index 597bb1b4da59a8..7c17c5b79c7c18 100644
--- a/llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.h
+++ b/llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.h
@@ -26,7 +26,8 @@ namespace parallel {
class DWARFLinkerImpl : public DWARFLinker {
public:
DWARFLinkerImpl(MessageHandlerTy ErrorHandler,
- MessageHandlerTy WarningHandler);
+ MessageHandlerTy WarningHandler,
+ TranslatorFuncTy StringsTranslator);
/// Add object file to be linked. Pre-load compile unit die. Call
/// \p OnCUDieLoaded for each compile unit die. If specified \p File
diff --git a/llvm/lib/DWARFLinker/Parallel/OutputSections.h b/llvm/lib/DWARFLinker/Parallel/OutputSections.h
index 0e1f2dae54bcc2..a21e4b2b75a503 100644
--- a/llvm/lib/DWARFLinker/Parallel/OutputSections.h
+++ b/llvm/lib/DWARFLinker/Parallel/OutputSections.h
@@ -253,7 +253,7 @@ struct SectionDescriptor : SectionDescriptorBase {
/// Emit specified inplace string value into the current section contents.
void emitInplaceString(StringRef String) {
- OS << String;
+ OS << GlobalData.translateString(String);
emitIntVal(0, 1);
}
diff --git a/llvm/lib/DWARFLinker/Parallel/StringEntryToDwarfStringPoolEntryMap.h b/llvm/lib/DWARFLinker/Parallel/StringEntryToDwarfStringPoolEntryMap.h
index f67536ef7a1a84..858f224777dba7 100644
--- a/llvm/lib/DWARFLinker/Parallel/StringEntryToDwarfStringPoolEntryMap.h
+++ b/llvm/lib/DWARFLinker/Parallel/StringEntryToDwarfStringPoolEntryMap.h
@@ -33,7 +33,7 @@ class StringEntryToDwarfStringPoolEntryMap {
DwarfStringPoolEntryWithExtString *DataPtr =
GlobalData.getAllocator()
.Allocate<DwarfStringPoolEntryWithExtString>();
- DataPtr->String = String->getKey();
+ DataPtr->String = GlobalData.translateString(String->getKey());
DataPtr->Index = DwarfStringPoolEntry::NotIndexed;
DataPtr->Offset = 0;
DataPtr->Symbol = nullptr;
diff --git a/llvm/test/tools/dsymutil/ARM/obfuscated.test b/llvm/test/tools/dsymutil/ARM/obfuscated.test
new file mode 100644
index 00000000000000..3443b8e634692b
--- /dev/null
+++ b/llvm/test/tools/dsymutil/ARM/obfuscated.test
@@ -0,0 +1,200 @@
+REQUIRES: system-darwin
+
+RUN: dsymutil --symbol-map %p/../Inputs/obfuscated.map %p/../Inputs/obfuscated.arm64 -f -o - \
+RUN: | llvm-dwarfdump -v - \
+RUN: | FileCheck %s
+
+RUN: dsymutil --accelerator=Pub --symbol-map %p/../Inputs/obfuscated.map %p/../Inputs/obfuscated.arm64 -f -o - \
+RUN: | llvm-dwarfdump -v - \
+RUN: | FileCheck --check-prefix=PUB %s
+
+RUN: dsymutil --symbol-map %p/../Inputs/obfuscated.map %p/../Inputs/obfuscated.arm64 -f -o - \
+RUN: | llvm-dwarfdump -v - \
+RUN: | FileCheck --check-prefix=NOHIDDEN %s
+
+RUN: dsymutil --symbol-map %p/../Inputs/obfuscated.2.map %p/../Inputs/obfuscated.2.arm64 -f -o - \
+RUN: | llvm-dwarfdump -v - \
+RUN: | FileCheck --check-prefix=NOHIDDEN %s
+
+// Run with plist and make sure dsymutil finds it.
+RUN: mkdir -p %t.dSYM/Contents/Resources/DWARF/
+RUN: mkdir -p %t.mapdir
+RUN: cp %p/../Inputs/obfuscated.arm64 %t.dSYM/Contents/Resources/DWARF/
+RUN: cp %p/../Inputs/E828A486-8433-3A5E-B6DB-A6294D28133D.plist %t.dSYM/Contents/Resources/
+RUN: cp %p/../Inputs/obfuscated.map %t.mapdir/506AA50A-6B26-3B37-86D2-DC6EBD57B720.bcsymbolmap
+RUN: dsymutil --symbol-map %t.mapdir %t.dSYM 2>&1 | FileCheck --check-prefix=OBFUSCATING %s
+
+// Run without plist and make sure dsymutil doesn't crash.
+RUN: rm %t.dSYM/Contents/Resources/E828A486-8433-3A5E-B6DB-A6294D28133D.plist
+RUN: dsymutil --symbol-map %t.mapdir %t.dSYM 2>&1 | FileCheck --check-prefix=NOTOBFUSCATING %s
+
+// ----------------------------------------
+// Repeat the same steps for --linker parallel.
+RUN: dsymutil --linker parallel --symbol-map %p/../Inputs/obfuscated.map %p/../Inputs/obfuscated.arm64 -f -o - \
+RUN: | llvm-dwarfdump -v - \
+RUN: | FileCheck %s
+
+RUN: dsymutil --linker parallel --accelerator=Pub --symbol-map %p/../Inputs/obfuscated.map %p/../Inputs/obfuscated.arm64 -f -o - \
+RUN: | llvm-dwarfdump -v - \
+RUN: | FileCheck --check-prefix=PUB %s
+
+RUN: dsymutil --linker parallel --symbol-map %p/../Inputs/obfuscated.map %p/../Inputs/obfuscated.arm64 -f -o - \
+RUN: | llvm-dwarfdump -v - \
+RUN: | FileCheck --check-prefix=NOHIDDEN %s
+
+RUN: dsymutil --linker parallel --symbol-map %p/../Inputs/obfuscated.2.map %p/../Inputs/obfuscated.2.arm64 -f -o - \
+RUN: | llvm-dwarfdump -v - \
+RUN: | FileCheck --check-prefix=NOHIDDEN %s
+
+// Run with plist and make sure dsymutil finds it.
+RUN: mkdir -p %t.dSYM/Contents/Resources/DWARF/
+RUN: mkdir -p %t.mapdir
+RUN: cp %p/../Inputs/obfuscated.arm64 %t.dSYM/Contents/Resources/DWARF/
+RUN: cp %p/../Inputs/E828A486-8433-3A5E-B6DB-A6294D28133D.plist %t.dSYM/Contents/Resources/
+RUN: cp %p/../Inputs/obfuscated.map %t.mapdir/506AA50A-6B26-3B37-86D2-DC6EBD57B720.bcsymbolmap
+RUN: dsymutil --linker parallel --symbol-map %t.mapdir %t.dSYM 2>&1 | FileCheck --check-prefix=OBFUSCATING %s
+
+// Run without plist and make sure dsymutil doesn't crash.
+RUN: rm %t.dSYM/Contents/Resources/E828A486-8433-3A5E-B6DB-A6294D28133D.plist
+RUN: dsymutil --linker parallel --symbol-map %t.mapdir %t.dSYM 2>&1 | FileCheck --check-prefix=NOTOBFUSCATING %s
+
+OBFUSCATING-NOT: not unobfuscating
+
+NOTOBFUSCATING: not unobfuscating
+
+NOHIDDEN-NOT: __hidden#
+
+CHECK: .debug_info contents:
+
+CHECK: DW_TAG_compile_unit [1] *
+CHECK: DW_AT_producer [DW_FORM_strp] ( {{.*}} "Apple LLVM version 7.0.0 (clang-700.2.38.2)")
+CHECK: DW_AT_name [DW_FORM_strp] ( {{.*}} "main.c")
+CHECK: DW_AT_comp_dir [DW_FORM_strp] ( {{.*}} "/Users/steven/dev/alpena/tests/src")
+CHECK: DW_TAG_subprogram [2]
+CHECK: DW_AT_name [DW_FORM_strp] ( {{.*}} "main")
+
+CHECK: DW_TAG_compile_unit [1] *
+CHECK: DW_AT_producer [DW_FORM_strp] ( {{.*}} "Apple LLVM version 7.0.0 (clang-700.2.38.2)")
+CHECK: DW_AT_name [DW_FORM_strp] ( {{.*}} "one.c")
+CHECK: DW_AT_comp_dir [DW_FORM_strp] ( {{.*}} "/Users/steven/dev/alpena/tests/src")
+CHECK: DW_TAG_subprogram [2]
+CHECK: DW_AT_name [DW_FORM_strp] ( {{.*}} "one")
+
+CHECK: DW_TAG_compile_unit [1] *
+CHECK: DW_AT_producer [DW_FORM_strp] ( {{.*}} "Apple LLVM version 7.0.0 (clang-700.2.38.2)")
+CHECK: DW_AT_name [DW_FORM_strp] ( {{.*}} "two.c")
+CHECK: DW_AT_comp_dir [DW_FORM_strp] ( {{.*}} "/Users/steven/dev/alpena/tests/src")
+CHECK: DW_TAG_subprogram [2]
+CHECK: DW_AT_name [DW_FORM_strp] ( {{.*}} "two")
+
+CHECK: DW_TAG_compile_unit [1] *
+CHECK: DW_AT_producer [DW_FORM_strp] ( {{.*}} "Apple LLVM version 7.0.0 (clang-700.2.38.2)")
+CHECK: DW_AT_name [DW_FORM_strp] ( {{.*}} "three.c")
+CHECK: DW_AT_comp_dir [DW_FORM_strp] ( {{.*}} "/Users/steven/dev/alpena/tests/src")
+CHECK: DW_TAG_subprogram [2]
+CHECK: DW_AT_name [DW_FORM_strp] ( {{.*}} "three")
+
+CHECK: DW_TAG_compile_unit [1] *
+CHECK: DW_AT_producer [DW_FORM_strp] ( {{.*}} "Apple LLVM version 7.0.0 (clang-700.2.38.2)")
+CHECK: DW_AT_name [DW_FORM_strp] ( {{.*}} "four.c")
+CHECK: DW_AT_stmt_list [DW_FORM_data4] (0x0000011e)
+CHECK: DW_AT_comp_dir [DW_FORM_strp] ( {{.*}} "/Users/steven/dev/alpena/tests/src")
+CHECK: DW_TAG_subprogram [2]
+CHECK: DW_AT_name [DW_FORM_strp] ( {{.*}} "four")
+
+CHECK: DW_TAG_compile_unit [1] *
+CHECK: DW_AT_producer [DW_FORM_strp] ( {{.*}} "Apple LLVM version 7.0.0 (clang-700.2.38.2)")
+CHECK: DW_AT_name [DW_FORM_strp] ( {{.*}} "five.c")
+CHECK: DW_AT_comp_dir [DW_FORM_strp] ( {{.*}} "/Users/steven/dev/alpena/tests/src")
+CHECK: DW_TAG_subprogram [2]
+CHECK: DW_AT_name [DW_FORM_strp] ( {{.*}} "five")
+
+CHECK: DW_TAG_compile_unit [1] *
+CHECK: DW_AT_producer [DW_FORM_strp] ( {{.*}} "Apple LLVM version 7.0.0 (clang-700.2.38.2)")
+CHECK: DW_AT_name [DW_FORM_strp] ( {{.*}} "six.c")
+CHECK: DW_AT_comp_dir [DW_FORM_strp] ( {{.*}} "/Users/steven/dev/alpena/tests/src")
+CHECK: DW_TAG_subprogram [2]
+CHECK: DW_AT_name [DW_FORM_strp] ( {{.*}} "six")
+
+CHECK: .debug_line contents:
+CHECK: file_names[ 1]:
+CHECK: name: "main.c"
+CHECK: dir_index: 0
+CHECK: mod_time: 0x00000000
+CHECK: file_names[ 1]:
+CHECK: name: "one.c"
+CHECK: dir_index: 0
+CHECK: mod_time: 0x00000000
+CHECK: length: 0x00000000
+CHECK: file_names[ 1]:
+CHECK: name: "two.c"
+CHECK: dir_index: 0
+CHECK: mod_time: 0x00000000
+CHECK: length: 0x00000000
+CHECK: file_names[ 1]:
+CHECK: name: "three.c"
+CHECK: dir_index: 0
+CHECK: mod_time: 0x00000000
+CHECK: length: 0x00000000
+CHECK: file_names[ 1]:
+CHECK: name: "four.c"
+CHECK: dir_index: 0
+CHECK: mod_time: 0x00000000
+CHECK: length: 0x00000000
+CHECK: file_names[ 1]:
+CHECK: name: "five.c"
+CHECK: dir_index: 0
+CHECK: mod_time: 0x00000000
+CHECK: length: 0x00000000
+CHECK: file_names[ 1]:
+CHECK: name: "six.c"
+CHECK: dir_index: 0
+CHECK: mod_time: 0x00000000
+CHECK: length: 0x00000000
+
+PUB: .debug_pubnames contents:
+PUB: length = 0x00000017, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000044
+PUB: 0x00000...
[truncated]
|
Thanks for the revert! |
chencha3
pushed a commit
to chencha3/llvm-project
that referenced
this pull request
Mar 23, 2024
Reverts llvm#85713 Since it is breaking Linux x64 builds.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverts #85713 Since it is breaking Linux x64 builds.