[Lldb-commits] [lldb] r331148 - Support reading section ".gnu_debugaltlink"
Author: jankratochvil Date: Sun Apr 29 12:47:48 2018 New Revision: 331148 URL: http://llvm.org/viewvc/llvm-project?rev=331148&view=rev Log: Support reading section ".gnu_debugaltlink" Differential revision: https://reviews.llvm.org/D40468 Added: lldb/trunk/lit/Modules/dwarf-gnu-debugaltlink.yaml Modified: lldb/trunk/include/lldb/Core/Section.h lldb/trunk/include/lldb/lldb-enumerations.h lldb/trunk/lit/Modules/build-id-case.yaml lldb/trunk/lit/Modules/compressed-sections.yaml lldb/trunk/source/Core/Section.cpp lldb/trunk/source/Expression/IRExecutionUnit.cpp lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp lldb/trunk/source/Symbol/ObjectFile.cpp lldb/trunk/tools/lldb-test/lldb-test.cpp Modified: lldb/trunk/include/lldb/Core/Section.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Section.h?rev=331148&r1=331147&r2=331148&view=diff == --- lldb/trunk/include/lldb/Core/Section.h (original) +++ lldb/trunk/include/lldb/Core/Section.h Sun Apr 29 12:47:48 2018 @@ -182,6 +182,8 @@ public: lldb::SectionType GetType() const { return m_type; } + const char *GetTypeAsCString() const; + lldb::SectionSP GetParent() const { return m_parent_wp.lock(); } bool IsThreadSpecific() const { return m_thread_specific; } Modified: lldb/trunk/include/lldb/lldb-enumerations.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=331148&r1=331147&r2=331148&view=diff == --- lldb/trunk/include/lldb/lldb-enumerations.h (original) +++ lldb/trunk/include/lldb/lldb-enumerations.h Sun Apr 29 12:47:48 2018 @@ -656,6 +656,7 @@ enum SectionType { eSectionTypeGoSymtab, eSectionTypeAbsoluteAddress, // Dummy section for symbols with absolute // address + eSectionTypeDWARFGNUDebugAltLink, eSectionTypeOther }; Modified: lldb/trunk/lit/Modules/build-id-case.yaml URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Modules/build-id-case.yaml?rev=331148&r1=331147&r2=331148&view=diff == --- lldb/trunk/lit/Modules/build-id-case.yaml (original) +++ lldb/trunk/lit/Modules/build-id-case.yaml Sun Apr 29 12:47:48 2018 @@ -5,6 +5,7 @@ # RUN: lldb-test module-sections %t/stripped.out | FileCheck %s # CHECK: Name: .debug_frame +# CHECK-NEXT: Type: dwarf-frame # CHECK-NEXT: VM size: 0 # CHECK-NEXT: File size: 8 Modified: lldb/trunk/lit/Modules/compressed-sections.yaml URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Modules/compressed-sections.yaml?rev=331148&r1=331147&r2=331148&view=diff == --- lldb/trunk/lit/Modules/compressed-sections.yaml (original) +++ lldb/trunk/lit/Modules/compressed-sections.yaml Sun Apr 29 12:47:48 2018 @@ -18,12 +18,14 @@ Sections: Content: deadbeefbaadf00d # CHECK: Name: .hello_elf +# CHECK-NEXT: Type: regular # CHECK-NEXT: VM size: 0 # CHECK-NEXT: File size: 28 # CHECK-NEXT: Data: # CHECK-NEXT: 20304050 60708090 # CHECK: Name: .bogus +# CHECK-NEXT: Type: regular # CHECK-NEXT: VM size: 0 # CHECK-NEXT: File size: 8 # CHECK-NEXT: Data: Added: lldb/trunk/lit/Modules/dwarf-gnu-debugaltlink.yaml URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Modules/dwarf-gnu-debugaltlink.yaml?rev=331148&view=auto == --- lldb/trunk/lit/Modules/dwarf-gnu-debugaltlink.yaml (added) +++ lldb/trunk/lit/Modules/dwarf-gnu-debugaltlink.yaml Sun Apr 29 12:47:48 2018 @@ -0,0 +1,25 @@ +# RUN: yaml2obj %s > %t +# RUN: lldb-test module-sections %t | FileCheck %s + +# CHECK: Name: .gnu_debugaltlink +# CHECK-NEXT: Type: dwarf-gnu-debugaltlink +# CHECK-NEXT: VM size: 0 +# CHECK-NEXT: File size: 8 + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data:ELFDATA2LSB + Type:ET_DYN + Machine: EM_X86_64 + Entry: 0x07A0 +Sections: + - Name:.debug_info +Type:SHT_PROGBITS +AddressAlign:0x0001 +Content: DEADBEEFBAADF00D + - Name:.gnu_debugaltlink +Type:SHT_PROGBITS +AddressAlign:0x0001 +Content: DEADBEEFBAADF00D +... Modified: lldb/trunk/source/Core/Section.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Section.cpp?rev=331148&r1=331147&r2=331148&view=diff
[Lldb-commits] [PATCH] D40468: DWZ 01/07: Support reading section ".gnu_debugaltlink"
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL331148: Support reading section ".gnu_debugaltlink" (authored by jankratochvil, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D40468?vs=144210&id=144494#toc Repository: rL LLVM https://reviews.llvm.org/D40468 Files: lldb/trunk/include/lldb/Core/Section.h lldb/trunk/include/lldb/lldb-enumerations.h lldb/trunk/lit/Modules/build-id-case.yaml lldb/trunk/lit/Modules/compressed-sections.yaml lldb/trunk/lit/Modules/dwarf-gnu-debugaltlink.yaml lldb/trunk/source/Core/Section.cpp lldb/trunk/source/Expression/IRExecutionUnit.cpp lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp lldb/trunk/source/Symbol/ObjectFile.cpp lldb/trunk/tools/lldb-test/lldb-test.cpp Index: lldb/trunk/lit/Modules/dwarf-gnu-debugaltlink.yaml === --- lldb/trunk/lit/Modules/dwarf-gnu-debugaltlink.yaml +++ lldb/trunk/lit/Modules/dwarf-gnu-debugaltlink.yaml @@ -0,0 +1,25 @@ +# RUN: yaml2obj %s > %t +# RUN: lldb-test module-sections %t | FileCheck %s + +# CHECK: Name: .gnu_debugaltlink +# CHECK-NEXT: Type: dwarf-gnu-debugaltlink +# CHECK-NEXT: VM size: 0 +# CHECK-NEXT: File size: 8 + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data:ELFDATA2LSB + Type:ET_DYN + Machine: EM_X86_64 + Entry: 0x07A0 +Sections: + - Name:.debug_info +Type:SHT_PROGBITS +AddressAlign:0x0001 +Content: DEADBEEFBAADF00D + - Name:.gnu_debugaltlink +Type:SHT_PROGBITS +AddressAlign:0x0001 +Content: DEADBEEFBAADF00D +... Index: lldb/trunk/lit/Modules/compressed-sections.yaml === --- lldb/trunk/lit/Modules/compressed-sections.yaml +++ lldb/trunk/lit/Modules/compressed-sections.yaml @@ -18,12 +18,14 @@ Content: deadbeefbaadf00d # CHECK: Name: .hello_elf +# CHECK-NEXT: Type: regular # CHECK-NEXT: VM size: 0 # CHECK-NEXT: File size: 28 # CHECK-NEXT: Data: # CHECK-NEXT: 20304050 60708090 # CHECK: Name: .bogus +# CHECK-NEXT: Type: regular # CHECK-NEXT: VM size: 0 # CHECK-NEXT: File size: 8 # CHECK-NEXT: Data: Index: lldb/trunk/lit/Modules/build-id-case.yaml === --- lldb/trunk/lit/Modules/build-id-case.yaml +++ lldb/trunk/lit/Modules/build-id-case.yaml @@ -5,6 +5,7 @@ # RUN: lldb-test module-sections %t/stripped.out | FileCheck %s # CHECK: Name: .debug_frame +# CHECK-NEXT: Type: dwarf-frame # CHECK-NEXT: VM size: 0 # CHECK-NEXT: File size: 8 Index: lldb/trunk/include/lldb/lldb-enumerations.h === --- lldb/trunk/include/lldb/lldb-enumerations.h +++ lldb/trunk/include/lldb/lldb-enumerations.h @@ -656,6 +656,7 @@ eSectionTypeGoSymtab, eSectionTypeAbsoluteAddress, // Dummy section for symbols with absolute // address + eSectionTypeDWARFGNUDebugAltLink, eSectionTypeOther }; Index: lldb/trunk/include/lldb/Core/Section.h === --- lldb/trunk/include/lldb/Core/Section.h +++ lldb/trunk/include/lldb/Core/Section.h @@ -182,6 +182,8 @@ lldb::SectionType GetType() const { return m_type; } + const char *GetTypeAsCString() const; + lldb::SectionSP GetParent() const { return m_parent_wp.lock(); } bool IsThreadSpecific() const { return m_thread_specific; } Index: lldb/trunk/tools/lldb-test/lldb-test.cpp === --- lldb/trunk/tools/lldb-test/lldb-test.cpp +++ lldb/trunk/tools/lldb-test/lldb-test.cpp @@ -213,6 +213,7 @@ assert(S); Printer.formatLine("Index: {0}", I); Printer.formatLine("Name: {0}", S->GetName().GetStringRef()); + Printer.formatLine("Type: {0}", S->GetTypeAsCString()); Printer.formatLine("VM size: {0}", S->GetByteSize()); Printer.formatLine("File size: {0}", S->GetFileSize()); Index: lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp === --- lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp +++ lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp @@ -134,7 +134,7 @@ eSectionTypeDWARFDebugMacInfo, eSectionTypeDWARFDebugPubNames, eSect