summaryrefslogtreecommitdiff
path: root/lldb/source/Symbol/ObjectFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Symbol/ObjectFile.cpp')
-rw-r--r--lldb/source/Symbol/ObjectFile.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/lldb/source/Symbol/ObjectFile.cpp b/lldb/source/Symbol/ObjectFile.cpp
index 8a72b5fe6f67..6b552dd0c19e 100644
--- a/lldb/source/Symbol/ObjectFile.cpp
+++ b/lldb/source/Symbol/ObjectFile.cpp
@@ -1,4 +1,4 @@
-//===-- ObjectFile.cpp ------------------------------------------*- C++ -*-===//
+//===-- ObjectFile.cpp ----------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -47,8 +47,8 @@ ObjectFile::FindPlugin(const lldb::ModuleSP &module_sp, const FileSpec *file,
FileSpec archive_file;
ObjectContainerCreateInstance create_object_container_callback;
- const bool file_exists = FileSystem::Instance().Exists(*file);
if (!data_sp) {
+ const bool file_exists = FileSystem::Instance().Exists(*file);
// We have an object name which most likely means we have a .o file in
// a static archive (.a file). Try and see if we have a cached archive
// first without reading any data first
@@ -207,9 +207,11 @@ ObjectFileSP ObjectFile::FindPlugin(const lldb::ModuleSP &module_sp,
size_t ObjectFile::GetModuleSpecifications(const FileSpec &file,
lldb::offset_t file_offset,
lldb::offset_t file_size,
- ModuleSpecList &specs) {
- DataBufferSP data_sp =
- FileSystem::Instance().CreateDataBuffer(file.GetPath(), 512, file_offset);
+ ModuleSpecList &specs,
+ DataBufferSP data_sp) {
+ if (!data_sp)
+ data_sp = FileSystem::Instance().CreateDataBuffer(file.GetPath(), 512,
+ file_offset);
if (data_sp) {
if (file_size == 0) {
const lldb::offset_t actual_file_size =
@@ -367,6 +369,7 @@ AddressClass ObjectFile::GetAddressClass(addr_t file_addr) {
case eSectionTypeDWARFDebugStrDwo:
case eSectionTypeDWARFDebugStrOffsets:
case eSectionTypeDWARFDebugStrOffsetsDwo:
+ case eSectionTypeDWARFDebugTuIndex:
case eSectionTypeDWARFDebugTypes:
case eSectionTypeDWARFDebugTypesDwo:
case eSectionTypeDWARFAppleNames: