diff options
| author | Greg Clayton <gclayton@fb.com> | 2025-03-04 14:35:42 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-04 14:35:42 -0800 |
| commit | 7b596ce362829281ea73b576774ce90bb212138d (patch) | |
| tree | cb2ea214e2cd4a6d3a578d84f99bebadbd57fbb6 /lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.cpp | |
| parent | ed5cd8d4642e6918bd64cae01cfe7056c6153da9 (diff) | |
[lldb] Fix ObjectFileJSON to section addresses. (#129648)
ObjectFileJSON sections didn't work, they were set to zero all of the
time. Fixed the bug and fixed the test to ensure it was testing real
values.
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.cpp')
| -rw-r--r-- | lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.cpp b/lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.cpp index ffbd87714242..8e90fac46f34 100644 --- a/lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.cpp +++ b/lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.cpp @@ -182,9 +182,16 @@ void ObjectFileJSON::CreateSections(SectionList &unified_section_list) { lldb::user_id_t id = 1; for (const auto §ion : m_sections) { auto section_sp = std::make_shared<Section>( - GetModule(), this, id++, ConstString(section.name), - section.type.value_or(eSectionTypeCode), 0, section.size.value_or(0), 0, - section.size.value_or(0), /*log2align*/ 0, /*flags*/ 0); + GetModule(), this, + /*sect_id=*/id++, + /*name=*/ConstString(section.name), + /*sect_type=*/section.type.value_or(eSectionTypeCode), + /*file_vm_addr=*/section.address.value_or(0), + /*vm_size=*/section.size.value_or(0), + /*file_offset=*/0, + /*file_size=*/0, + /*log2align=*/0, + /*flags=*/0); m_sections_up->AddSection(section_sp); unified_section_list.AddSection(section_sp); } |
