[Lldb-commits] [lldb] [lldb][AIX] Support for XCOFF Sections (PR #131304)
Dhruv Srivastava via lldb-commits
lldb-commits at lists.llvm.org
Thu May 8 01:52:19 PDT 2025
https://github.com/DhruvSrivastavaX updated https://github.com/llvm/llvm-project/pull/131304
>From 106e137fea7d4b420ce3d97a8df16c3a91400997 Mon Sep 17 00:00:00 2001
From: Dhruv-Srivastava <dhruv.srivastava at ibm.com>
Date: Fri, 14 Mar 2025 02:51:21 -0500
Subject: [PATCH 1/4] Support for XCOFF Sections
---
.../ObjectFile/XCOFF/ObjectFileXCOFF.cpp | 153 +++++++++++++-----
1 file changed, 114 insertions(+), 39 deletions(-)
diff --git a/lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp b/lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp
index b54d43c5dd737..0dd9126468923 100644
--- a/lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp
@@ -190,50 +190,125 @@ void ObjectFileXCOFF::ParseSymtab(Symtab &lldb_symtab) {}
bool ObjectFileXCOFF::IsStripped() { return false; }
-void ObjectFileXCOFF::CreateSections(SectionList &unified_section_list) {}
-
-void ObjectFileXCOFF::Dump(Stream *s) {}
-
-ArchSpec ObjectFileXCOFF::GetArchitecture() {
- ArchSpec arch_spec =
- ArchSpec(eArchTypeXCOFF, XCOFF::TCPU_PPC64, LLDB_INVALID_CPUTYPE);
- return arch_spec;
+void ObjectFileXCOFF::CreateSections(SectionList &unified_section_list) {
+
+ if (m_sections_up)
+ return;
+ m_sections_up = std::make_unique<SectionList>();
+ ModuleSP module_sp(GetModule());
+ if (module_sp) {
+ std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
+
+ ModuleSP module_sp(GetModule());
+ for (auto sIdx = m_binary->section_begin(); sIdx != m_binary->section_end();
+ ++sIdx) {
+ llvm::Expected<llvm::StringRef> name =
+ m_binary->getSectionName(sIdx->getRawDataRefImpl());
+ if (!name) {
+ llvm::Error err = name.takeError();
+ }
+ llvm::StringRef sect_name = *name;
+ ConstString const_sect_name(sect_name);
+ int sect_index = sIdx->getIndex(), idx = 1;
+ llvm::Expected<llvm::object::DataRefImpl> section =
+ m_binary->getSectionByNum(sect_index);
+ if (!section) {
+ llvm::Error err = section.takeError();
+ }
+ llvm::object::DataRefImpl dataref = section.get();
+ const llvm::object::XCOFFSectionHeader64 *sectionPtr =
+ reinterpret_cast<const llvm::object::XCOFFSectionHeader64 *>(
+ dataref.p);
+
+ SectionType section_type = lldb::eSectionTypeOther;
+ if (sectionPtr->Flags & XCOFF::STYP_TEXT)
+ section_type = eSectionTypeCode;
+ if (sectionPtr->Flags & XCOFF::STYP_DATA)
+ section_type = eSectionTypeData;
+ if (sectionPtr->Flags & XCOFF::STYP_BSS)
+ section_type = eSectionTypeZeroFill;
+ if (sectionPtr->Flags & XCOFF::STYP_DWARF) {
+ SectionType section_type =
+ llvm::StringSwitch<SectionType>(sect_name)
+ .Case(".dwinfo", eSectionTypeDWARFDebugInfo)
+ .Case(".dwline", eSectionTypeDWARFDebugLine)
+ .Case(".dwabrev", eSectionTypeDWARFDebugAbbrev)
+ .Default(eSectionTypeInvalid);
+
+ if (section_type == eSectionTypeInvalid)
+ section_type = lldb::eSectionTypeOther;
+ }
+ SectionSP section_sp(new Section(
+ module_sp, // Module to which this section belongs
+ this, // Object file to which this section belongs
+ idx++, // Section ID is the 1 based section index.
+ const_sect_name, // Name of this section
+ section_type,
+ sectionPtr->VirtualAddress, // File VM address == addresses as
+ // they are found in the object file
+ sectionPtr->SectionSize, // VM size in bytes of this section
+ sectionPtr->FileOffsetToRawData, // Offset to the data for this
+ // section in the file
+ sectionPtr->SectionSize, // Size in bytes of this section as found in
+ // the file
+ 0, // FIXME: alignment
+ sectionPtr->Flags)); // Flags for this section
+
+ uint32_t permissions = 0;
+ permissions |= ePermissionsReadable;
+ if (sectionPtr->Flags & (XCOFF::STYP_DATA | XCOFF::STYP_BSS))
+ permissions |= ePermissionsWritable;
+ if (sectionPtr->Flags & XCOFF::STYP_TEXT)
+ permissions |= ePermissionsExecutable;
+ section_sp->SetPermissions(permissions);
+
+ m_sections_up->AddSection(section_sp);
+ unified_section_list.AddSection(section_sp);
+ }
+ }
}
+ void ObjectFileXCOFF::Dump(Stream * s) {}
-UUID ObjectFileXCOFF::GetUUID() { return UUID(); }
+ ArchSpec ObjectFileXCOFF::GetArchitecture() {
+ ArchSpec arch_spec =
+ ArchSpec(eArchTypeXCOFF, XCOFF::TCPU_PPC64, LLDB_INVALID_CPUTYPE);
+ return arch_spec;
+ }
-uint32_t ObjectFileXCOFF::GetDependentModules(FileSpecList &files) { return 0; }
+ UUID ObjectFileXCOFF::GetUUID() { return UUID(); }
-ObjectFile::Type ObjectFileXCOFF::CalculateType() {
- if (m_binary->fileHeader64()->Flags & XCOFF::F_EXEC)
- return eTypeExecutable;
- else if (m_binary->fileHeader64()->Flags & XCOFF::F_SHROBJ)
- return eTypeSharedLibrary;
- return eTypeUnknown;
-}
+ uint32_t ObjectFileXCOFF::GetDependentModules(FileSpecList & files) {
+ return 0;
+ }
-ObjectFile::Strata ObjectFileXCOFF::CalculateStrata() { return eStrataUnknown; }
+ ObjectFile::Type ObjectFileXCOFF::CalculateType() {
+ if (m_binary->fileHeader64()->Flags & XCOFF::F_EXEC)
+ return eTypeExecutable;
+ else if (m_binary->fileHeader64()->Flags & XCOFF::F_SHROBJ)
+ return eTypeSharedLibrary;
+ return eTypeUnknown;
+ }
-lldb::WritableDataBufferSP
-ObjectFileXCOFF::MapFileDataWritable(const FileSpec &file, uint64_t Size,
- uint64_t Offset) {
- return FileSystem::Instance().CreateWritableDataBuffer(file.GetPath(), Size,
- Offset);
-}
+ ObjectFile::Strata ObjectFileXCOFF::CalculateStrata() {
+ return eStrataUnknown;
+ }
-ObjectFileXCOFF::ObjectFileXCOFF(const lldb::ModuleSP &module_sp,
- DataBufferSP data_sp,
- lldb::offset_t data_offset,
- const FileSpec *file,
- lldb::offset_t file_offset,
- lldb::offset_t length)
- : ObjectFile(module_sp, file, file_offset, length, data_sp, data_offset) {
- if (file)
- m_file = *file;
-}
+ lldb::WritableDataBufferSP ObjectFileXCOFF::MapFileDataWritable(
+ const FileSpec &file, uint64_t Size, uint64_t Offset) {
+ return FileSystem::Instance().CreateWritableDataBuffer(file.GetPath(), Size,
+ Offset);
+ }
+
+ ObjectFileXCOFF::ObjectFileXCOFF(
+ const lldb::ModuleSP &module_sp, DataBufferSP data_sp,
+ lldb::offset_t data_offset, const FileSpec *file,
+ lldb::offset_t file_offset, lldb::offset_t length)
+ : ObjectFile(module_sp, file, file_offset, length, data_sp, data_offset) {
+ if (file)
+ m_file = *file;
+ }
-ObjectFileXCOFF::ObjectFileXCOFF(const lldb::ModuleSP &module_sp,
- DataBufferSP header_data_sp,
- const lldb::ProcessSP &process_sp,
- addr_t header_addr)
- : ObjectFile(module_sp, process_sp, header_addr, header_data_sp) {}
+ ObjectFileXCOFF::ObjectFileXCOFF(
+ const lldb::ModuleSP &module_sp, DataBufferSP header_data_sp,
+ const lldb::ProcessSP &process_sp, addr_t header_addr)
+ : ObjectFile(module_sp, process_sp, header_addr, header_data_sp) {}
>From 9c06cd5204c3a78a74947fd8c18c741d701e5d8d Mon Sep 17 00:00:00 2001
From: Dhruv-Srivastava <dhruv.srivastava at ibm.com>
Date: Fri, 14 Mar 2025 06:15:58 -0500
Subject: [PATCH 2/4] format fix
---
.../ObjectFile/XCOFF/ObjectFileXCOFF.cpp | 74 +++++++++----------
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp b/lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp
index 0dd9126468923..eebf6a3a657a5 100644
--- a/lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp
@@ -267,48 +267,48 @@ void ObjectFileXCOFF::CreateSections(SectionList &unified_section_list) {
}
}
}
- void ObjectFileXCOFF::Dump(Stream * s) {}
+void ObjectFileXCOFF::Dump(Stream *s) {}
- ArchSpec ObjectFileXCOFF::GetArchitecture() {
- ArchSpec arch_spec =
- ArchSpec(eArchTypeXCOFF, XCOFF::TCPU_PPC64, LLDB_INVALID_CPUTYPE);
- return arch_spec;
- }
+ArchSpec ObjectFileXCOFF::GetArchitecture() {
+ ArchSpec arch_spec =
+ ArchSpec(eArchTypeXCOFF, XCOFF::TCPU_PPC64, LLDB_INVALID_CPUTYPE);
+ return arch_spec;
+}
- UUID ObjectFileXCOFF::GetUUID() { return UUID(); }
+UUID ObjectFileXCOFF::GetUUID() { return UUID(); }
- uint32_t ObjectFileXCOFF::GetDependentModules(FileSpecList & files) {
- return 0;
- }
+uint32_t ObjectFileXCOFF::GetDependentModules(FileSpecList &files) { return 0; }
- ObjectFile::Type ObjectFileXCOFF::CalculateType() {
- if (m_binary->fileHeader64()->Flags & XCOFF::F_EXEC)
- return eTypeExecutable;
- else if (m_binary->fileHeader64()->Flags & XCOFF::F_SHROBJ)
- return eTypeSharedLibrary;
- return eTypeUnknown;
- }
+ObjectFile::Type ObjectFileXCOFF::CalculateType() {
+ if (m_binary->fileHeader64()->Flags & XCOFF::F_EXEC)
+ return eTypeExecutable;
+ else if (m_binary->fileHeader64()->Flags & XCOFF::F_SHROBJ)
+ return eTypeSharedLibrary;
+ return eTypeUnknown;
+}
- ObjectFile::Strata ObjectFileXCOFF::CalculateStrata() {
- return eStrataUnknown;
- }
+ObjectFile::Strata ObjectFileXCOFF::CalculateStrata() { return eStrataUnknown; }
- lldb::WritableDataBufferSP ObjectFileXCOFF::MapFileDataWritable(
- const FileSpec &file, uint64_t Size, uint64_t Offset) {
- return FileSystem::Instance().CreateWritableDataBuffer(file.GetPath(), Size,
- Offset);
- }
+lldb::WritableDataBufferSP
+ObjectFileXCOFF::MapFileDataWritable(const FileSpec &file, uint64_t Size,
+ uint64_t Offset) {
+ return FileSystem::Instance().CreateWritableDataBuffer(file.GetPath(), Size,
+ Offset);
+}
- ObjectFileXCOFF::ObjectFileXCOFF(
- const lldb::ModuleSP &module_sp, DataBufferSP data_sp,
- lldb::offset_t data_offset, const FileSpec *file,
- lldb::offset_t file_offset, lldb::offset_t length)
- : ObjectFile(module_sp, file, file_offset, length, data_sp, data_offset) {
- if (file)
- m_file = *file;
- }
+ObjectFileXCOFF::ObjectFileXCOFF(const lldb::ModuleSP &module_sp,
+ DataBufferSP data_sp,
+ lldb::offset_t data_offset,
+ const FileSpec *file,
+ lldb::offset_t file_offset,
+ lldb::offset_t length)
+ : ObjectFile(module_sp, file, file_offset, length, data_sp, data_offset) {
+ if (file)
+ m_file = *file;
+}
- ObjectFileXCOFF::ObjectFileXCOFF(
- const lldb::ModuleSP &module_sp, DataBufferSP header_data_sp,
- const lldb::ProcessSP &process_sp, addr_t header_addr)
- : ObjectFile(module_sp, process_sp, header_addr, header_data_sp) {}
+ObjectFileXCOFF::ObjectFileXCOFF(const lldb::ModuleSP &module_sp,
+ DataBufferSP header_data_sp,
+ const lldb::ProcessSP &process_sp,
+ addr_t header_addr)
+ : ObjectFile(module_sp, process_sp, header_addr, header_data_sp) {}
>From edb54c3ff6a63c97b4c1d46b046abde981109f40 Mon Sep 17 00:00:00 2001
From: Dhruv-Srivastava <dhruv.srivastava at ibm.com>
Date: Thu, 3 Apr 2025 01:56:56 -0500
Subject: [PATCH 3/4] Test case modification
---
lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp | 5 +++--
lldb/test/Shell/ObjectFile/XCOFF/basic-info.yaml | 3 +++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp b/lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp
index eebf6a3a657a5..179b26df612a0 100644
--- a/lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp
@@ -200,6 +200,7 @@ void ObjectFileXCOFF::CreateSections(SectionList &unified_section_list) {
std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
ModuleSP module_sp(GetModule());
+ int idx = 0;
for (auto sIdx = m_binary->section_begin(); sIdx != m_binary->section_end();
++sIdx) {
llvm::Expected<llvm::StringRef> name =
@@ -209,7 +210,7 @@ void ObjectFileXCOFF::CreateSections(SectionList &unified_section_list) {
}
llvm::StringRef sect_name = *name;
ConstString const_sect_name(sect_name);
- int sect_index = sIdx->getIndex(), idx = 1;
+ int sect_index = sIdx->getIndex();
llvm::Expected<llvm::object::DataRefImpl> section =
m_binary->getSectionByNum(sect_index);
if (!section) {
@@ -241,7 +242,7 @@ void ObjectFileXCOFF::CreateSections(SectionList &unified_section_list) {
SectionSP section_sp(new Section(
module_sp, // Module to which this section belongs
this, // Object file to which this section belongs
- idx++, // Section ID is the 1 based section index.
+ ++idx, // Section ID is the 1 based section index.
const_sect_name, // Name of this section
section_type,
sectionPtr->VirtualAddress, // File VM address == addresses as
diff --git a/lldb/test/Shell/ObjectFile/XCOFF/basic-info.yaml b/lldb/test/Shell/ObjectFile/XCOFF/basic-info.yaml
index 3c0037db36dbb..e5cc9d0bc5063 100644
--- a/lldb/test/Shell/ObjectFile/XCOFF/basic-info.yaml
+++ b/lldb/test/Shell/ObjectFile/XCOFF/basic-info.yaml
@@ -7,6 +7,9 @@
# CHECK: Stripped: false
# CHECK: Type: executable
# CHECK: Strata: unknown
+# CHECK: Name: .text
+# CHECK-NEXT: code
+# CHECK-NEXT: r-x
--- !XCOFF
FileHeader:
>From a480048b60c4bf8510fdd28821d4d8146515bf61 Mon Sep 17 00:00:00 2001
From: DhruvSrivastavaX <dhruv.srivastava at ibm.com>
Date: Thu, 8 May 2025 03:51:32 -0500
Subject: [PATCH 4/4] Modified to sections64 and test case
---
.../ObjectFile/XCOFF/ObjectFileXCOFF.cpp | 116 +++++++-----------
.../Shell/ObjectFile/XCOFF/basic-info.yaml | 86 ++++++++++++-
2 files changed, 128 insertions(+), 74 deletions(-)
diff --git a/lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp b/lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp
index 179b26df612a0..59156bda948c6 100644
--- a/lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp
@@ -191,83 +191,59 @@ void ObjectFileXCOFF::ParseSymtab(Symtab &lldb_symtab) {}
bool ObjectFileXCOFF::IsStripped() { return false; }
void ObjectFileXCOFF::CreateSections(SectionList &unified_section_list) {
-
if (m_sections_up)
return;
+
m_sections_up = std::make_unique<SectionList>();
ModuleSP module_sp(GetModule());
- if (module_sp) {
- std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-
- ModuleSP module_sp(GetModule());
- int idx = 0;
- for (auto sIdx = m_binary->section_begin(); sIdx != m_binary->section_end();
- ++sIdx) {
- llvm::Expected<llvm::StringRef> name =
- m_binary->getSectionName(sIdx->getRawDataRefImpl());
- if (!name) {
- llvm::Error err = name.takeError();
- }
- llvm::StringRef sect_name = *name;
- ConstString const_sect_name(sect_name);
- int sect_index = sIdx->getIndex();
- llvm::Expected<llvm::object::DataRefImpl> section =
- m_binary->getSectionByNum(sect_index);
- if (!section) {
- llvm::Error err = section.takeError();
- }
- llvm::object::DataRefImpl dataref = section.get();
- const llvm::object::XCOFFSectionHeader64 *sectionPtr =
- reinterpret_cast<const llvm::object::XCOFFSectionHeader64 *>(
- dataref.p);
-
- SectionType section_type = lldb::eSectionTypeOther;
- if (sectionPtr->Flags & XCOFF::STYP_TEXT)
- section_type = eSectionTypeCode;
- if (sectionPtr->Flags & XCOFF::STYP_DATA)
- section_type = eSectionTypeData;
- if (sectionPtr->Flags & XCOFF::STYP_BSS)
- section_type = eSectionTypeZeroFill;
- if (sectionPtr->Flags & XCOFF::STYP_DWARF) {
- SectionType section_type =
- llvm::StringSwitch<SectionType>(sect_name)
- .Case(".dwinfo", eSectionTypeDWARFDebugInfo)
- .Case(".dwline", eSectionTypeDWARFDebugLine)
- .Case(".dwabrev", eSectionTypeDWARFDebugAbbrev)
- .Default(eSectionTypeInvalid);
-
- if (section_type == eSectionTypeInvalid)
- section_type = lldb::eSectionTypeOther;
- }
- SectionSP section_sp(new Section(
- module_sp, // Module to which this section belongs
- this, // Object file to which this section belongs
- ++idx, // Section ID is the 1 based section index.
- const_sect_name, // Name of this section
- section_type,
- sectionPtr->VirtualAddress, // File VM address == addresses as
- // they are found in the object file
- sectionPtr->SectionSize, // VM size in bytes of this section
- sectionPtr->FileOffsetToRawData, // Offset to the data for this
- // section in the file
- sectionPtr->SectionSize, // Size in bytes of this section as found in
- // the file
- 0, // FIXME: alignment
- sectionPtr->Flags)); // Flags for this section
-
- uint32_t permissions = 0;
- permissions |= ePermissionsReadable;
- if (sectionPtr->Flags & (XCOFF::STYP_DATA | XCOFF::STYP_BSS))
- permissions |= ePermissionsWritable;
- if (sectionPtr->Flags & XCOFF::STYP_TEXT)
- permissions |= ePermissionsExecutable;
- section_sp->SetPermissions(permissions);
-
- m_sections_up->AddSection(section_sp);
- unified_section_list.AddSection(section_sp);
+
+ if (!module_sp)
+ return;
+
+ std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
+
+ const auto §ions = m_binary->sections64();
+ int idx = 0;
+ for (size_t i = 0; i < sections.size(); ++i) {
+ const llvm::object::XCOFFSectionHeader64 §ion = sections[i];
+
+ ConstString const_sect_name(section.Name);
+
+ SectionType section_type = lldb::eSectionTypeOther;
+ if (section.Flags & XCOFF::STYP_TEXT)
+ section_type = eSectionTypeCode;
+ else if (section.Flags & XCOFF::STYP_DATA)
+ section_type = eSectionTypeData;
+ else if (section.Flags & XCOFF::STYP_BSS)
+ section_type = eSectionTypeZeroFill;
+ else if (section.Flags & XCOFF::STYP_DWARF) {
+ section_type = llvm::StringSwitch<SectionType>(section.Name)
+ .Case(".dwinfo", eSectionTypeDWARFDebugInfo)
+ .Case(".dwline", eSectionTypeDWARFDebugLine)
+ .Case(".dwabrev", eSectionTypeDWARFDebugAbbrev)
+ .Default(eSectionTypeInvalid);
+
+ if (section_type == eSectionTypeInvalid)
+ section_type = lldb::eSectionTypeOther;
}
+
+ SectionSP section_sp(new Section(
+ module_sp, this, ++idx, const_sect_name, section_type,
+ section.VirtualAddress, section.SectionSize,
+ section.FileOffsetToRawData, section.SectionSize, 0, section.Flags));
+
+ uint32_t permissions = ePermissionsReadable;
+ if (section.Flags & (XCOFF::STYP_DATA | XCOFF::STYP_BSS))
+ permissions |= ePermissionsWritable;
+ if (section.Flags & XCOFF::STYP_TEXT)
+ permissions |= ePermissionsExecutable;
+
+ section_sp->SetPermissions(permissions);
+ m_sections_up->AddSection(section_sp);
+ unified_section_list.AddSection(section_sp);
}
}
+
void ObjectFileXCOFF::Dump(Stream *s) {}
ArchSpec ObjectFileXCOFF::GetArchitecture() {
diff --git a/lldb/test/Shell/ObjectFile/XCOFF/basic-info.yaml b/lldb/test/Shell/ObjectFile/XCOFF/basic-info.yaml
index e5cc9d0bc5063..17ff2f31c2fff 100644
--- a/lldb/test/Shell/ObjectFile/XCOFF/basic-info.yaml
+++ b/lldb/test/Shell/ObjectFile/XCOFF/basic-info.yaml
@@ -8,13 +8,31 @@
# CHECK: Type: executable
# CHECK: Strata: unknown
# CHECK: Name: .text
-# CHECK-NEXT: code
-# CHECK-NEXT: r-x
+# CHECK-NEXT: Type: code
+# CHECK-NEXT: Permissions: r-x
+# CHECK: Name: .data
+# CHECK-NEXT: Type: data
+# CHECK-NEXT: Permissions: rw-
+# CHECK: Name: .bss
+# CHECK-NEXT: Type: zero-fill
+# CHECK-NEXT: Permissions: rw-
+# CHECK: Name: .loader
+# CHECK-NEXT: Type: regular
+# CHECK-NEXT: Permissions: r--
+# CHECK: Name: .dwline
+# CHECK-NEXT: Type: dwarf-line
+# CHECK-NEXT: Permissions: r--
+# CHECK: Name: .dwinfo
+# CHECK-NEXT: Type: dwarf-info
+# CHECK-NEXT: Permissions: r--
+# CHECK: Name: .dwabrev
+# CHECK-NEXT: Type: dwarf-abbrev
+# CHECK-NEXT: Permissions: r--
--- !XCOFF
FileHeader:
MagicNumber: 0x1F7
- NumberOfSections: 1
+ NumberOfSections: 7
CreationTime: 000000000
Flags: 0x0002
Sections:
@@ -25,6 +43,66 @@ Sections:
FileOffsetToLineNumbers: 0x0
NumberOfLineNumbers: 0x0
Flags: [ STYP_TEXT ]
- SectionData: E8C20000E94204
+ SectionData: E8C20000
+ - Name: .data
+ Address: 0x1100008D2
+ Size: 0x2AE
+ FileOffsetToData: 0x8D2
+ FileOffsetToRelocations: 0x132E
+ FileOffsetToLineNumbers: 0x0
+ NumberOfRelocations: 0x22
+ NumberOfLineNumbers: 0x0
+ Flags: [ STYP_DATA ]
+ SectionData: ''
+ - Name: .bss
+ Address: 0x110000B80
+ Size: 0x28
+ FileOffsetToData: 0x0
+ FileOffsetToRelocations: 0x0
+ FileOffsetToLineNumbers: 0x0
+ NumberOfRelocations: 0x0
+ NumberOfLineNumbers: 0x0
+ Flags: [ STYP_BSS ]
+ SectionData: ''
+ - Name: .loader
+ Address: 0x0
+ Size: 0x413
+ FileOffsetToData: 0xB80
+ FileOffsetToRelocations: 0x0
+ FileOffsetToLineNumbers: 0x0
+ NumberOfRelocations: 0x0
+ NumberOfLineNumbers: 0x0
+ Flags: [ STYP_LOADER ]
+ SectionData: 00000001
+ - Name: .dwline
+ Address: 0x0
+ Size: 0x9C
+ FileOffsetToData: 0xF94
+ FileOffsetToRelocations: 0x150A
+ FileOffsetToLineNumbers: 0x0
+ NumberOfRelocations: 0x5
+ NumberOfLineNumbers: 0x0
+ Flags: [ STYP_DWARF ]
+ SectionData: FFFFFFFF
+ - Name: .dwinfo
+ Address: 0x0
+ Size: 0xDD
+ FileOffsetToData: 0x1030
+ FileOffsetToRelocations: 0x1550
+ FileOffsetToLineNumbers: 0x0
+ NumberOfRelocations: 0x6
+ NumberOfLineNumbers: 0x0
+ Flags: [ STYP_DWARF ]
+ SectionData: FFFFFFFF
+ - Name: .dwabrev
+ Address: 0x0
+ Size: 0x43
+ FileOffsetToData: 0x110E
+ FileOffsetToRelocations: 0x0
+ FileOffsetToLineNumbers: 0x0
+ NumberOfRelocations: 0x0
+ NumberOfLineNumbers: 0x0
+ Flags: [ STYP_DWARF ]
+ SectionData: 01110125
StringTable: {}
...
More information about the lldb-commits
mailing list