aboutsummaryrefslogtreecommitdiff
path: root/lldb/source
diff options
context:
space:
mode:
authorDaniel Thornburgh <dthorn@google.com>2024-05-22 15:56:33 -0500
committerGitHub <noreply@github.com>2024-05-22 13:56:33 -0700
commitc93a67038dcc1adeafa74e105fba02714732097a (patch)
treefd3b5df20ee06ff810d7632757b6c68281c14e95 /lldb/source
parent1529ec085a31e60fa4de0bed27a5ba88b1a7d7fa (diff)
downloadllvm-c93a67038dcc1adeafa74e105fba02714732097a.zip
llvm-c93a67038dcc1adeafa74e105fba02714732097a.tar.gz
llvm-c93a67038dcc1adeafa74e105fba02714732097a.tar.bz2
Revert "[lldb] Added Debuginfod tests and fixed a couple issues" (#93094)
Reverts llvm/llvm-project#92572 due to Fuchsia CI breakages (using CLI tools in tests that weren't necessarily built).
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/API/SBDebugger.cpp13
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp38
-rw-r--r--lldb/source/Plugins/SymbolLocator/CMakeLists.txt7
-rw-r--r--lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp29
4 files changed, 21 insertions, 66 deletions
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index 6e19a68..7ef0d6e 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -776,9 +776,6 @@ SBStructuredData SBDebugger::GetBuildConfiguration() {
*config_up, "xml", XMLDocument::XMLEnabled(),
"A boolean value that indicates if XML support is enabled in LLDB");
AddBoolConfigEntry(
- *config_up, "curl", LLVM_ENABLE_CURL,
- "A boolean value that indicates if CURL support is enabled in LLDB");
- AddBoolConfigEntry(
*config_up, "curses", LLDB_ENABLE_CURSES,
"A boolean value that indicates if curses support is enabled in LLDB");
AddBoolConfigEntry(
@@ -1727,20 +1724,20 @@ SBDebugger::LoadTraceFromFile(SBError &error,
void SBDebugger::RequestInterrupt() {
LLDB_INSTRUMENT_VA(this);
-
+
if (m_opaque_sp)
- m_opaque_sp->RequestInterrupt();
+ m_opaque_sp->RequestInterrupt();
}
void SBDebugger::CancelInterruptRequest() {
LLDB_INSTRUMENT_VA(this);
-
+
if (m_opaque_sp)
- m_opaque_sp->CancelInterruptRequest();
+ m_opaque_sp->CancelInterruptRequest();
}
bool SBDebugger::InterruptRequested() {
LLDB_INSTRUMENT_VA(this);
-
+
if (m_opaque_sp)
return m_opaque_sp->InterruptRequested();
return false;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index df9704e..f6f15272 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -4381,38 +4381,26 @@ const std::shared_ptr<SymbolFileDWARFDwo> &SymbolFileDWARF::GetDwpSymbolFile() {
FileSpecList search_paths = Target::GetDefaultDebugFileSearchPaths();
ModuleSpec module_spec;
module_spec.GetFileSpec() = m_objfile_sp->GetFileSpec();
- FileSpec dwp_filespec;
for (const auto &symfile : symfiles.files()) {
module_spec.GetSymbolFileSpec() =
FileSpec(symfile.GetPath() + ".dwp", symfile.GetPathStyle());
LLDB_LOG(log, "Searching for DWP using: \"{0}\"",
module_spec.GetSymbolFileSpec());
- dwp_filespec =
+ FileSpec dwp_filespec =
PluginManager::LocateExecutableSymbolFile(module_spec, search_paths);
if (FileSystem::Instance().Exists(dwp_filespec)) {
- break;
- }
- }
- if (!FileSystem::Instance().Exists(dwp_filespec)) {
- LLDB_LOG(log, "No DWP file found locally");
- // Fill in the UUID for the module we're trying to match for, so we can
- // find the correct DWP file, as the Debuginfod plugin uses *only* this
- // data to correctly match the DWP file with the binary.
- module_spec.GetUUID() = m_objfile_sp->GetUUID();
- dwp_filespec =
- PluginManager::LocateExecutableSymbolFile(module_spec, search_paths);
- }
- if (FileSystem::Instance().Exists(dwp_filespec)) {
- LLDB_LOG(log, "Found DWP file: \"{0}\"", dwp_filespec);
- DataBufferSP dwp_file_data_sp;
- lldb::offset_t dwp_file_data_offset = 0;
- ObjectFileSP dwp_obj_file = ObjectFile::FindPlugin(
- GetObjectFile()->GetModule(), &dwp_filespec, 0,
- FileSystem::Instance().GetByteSize(dwp_filespec), dwp_file_data_sp,
- dwp_file_data_offset);
- if (dwp_obj_file) {
- m_dwp_symfile = std::make_shared<SymbolFileDWARFDwo>(
- *this, dwp_obj_file, DIERef::k_file_index_mask);
+ LLDB_LOG(log, "Found DWP file: \"{0}\"", dwp_filespec);
+ DataBufferSP dwp_file_data_sp;
+ lldb::offset_t dwp_file_data_offset = 0;
+ ObjectFileSP dwp_obj_file = ObjectFile::FindPlugin(
+ GetObjectFile()->GetModule(), &dwp_filespec, 0,
+ FileSystem::Instance().GetByteSize(dwp_filespec), dwp_file_data_sp,
+ dwp_file_data_offset);
+ if (dwp_obj_file) {
+ m_dwp_symfile = std::make_shared<SymbolFileDWARFDwo>(
+ *this, dwp_obj_file, DIERef::k_file_index_mask);
+ break;
+ }
}
}
if (!m_dwp_symfile) {
diff --git a/lldb/source/Plugins/SymbolLocator/CMakeLists.txt b/lldb/source/Plugins/SymbolLocator/CMakeLists.txt
index 3367022..ca96962 100644
--- a/lldb/source/Plugins/SymbolLocator/CMakeLists.txt
+++ b/lldb/source/Plugins/SymbolLocator/CMakeLists.txt
@@ -1,10 +1,5 @@
-# Order matters here: the first symbol locator prevents further searching.
-# For DWARF binaries that are both stripped and split, the Default plugin
-# will return the stripped binary when asked for the ObjectFile, which then
-# prevents an unstripped binary from being requested from the Debuginfod
-# provider.
-add_subdirectory(Debuginfod)
add_subdirectory(Default)
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_subdirectory(DebugSymbols)
endif()
+add_subdirectory(Debuginfod)
diff --git a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
index f296e65..b5fe35d 100644
--- a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
+++ b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
@@ -44,24 +44,6 @@ llvm::StringRef SymbolVendorELF::GetPluginDescriptionStatic() {
"executables.";
}
-// If this is needed elsewhere, it can be exported/moved.
-static bool IsDwpSymbolFile(const lldb::ModuleSP &module_sp,
- const FileSpec &file_spec) {
- DataBufferSP dwp_file_data_sp;
- lldb::offset_t dwp_file_data_offset = 0;
- // Try to create an ObjectFile from the file_spec.
- ObjectFileSP dwp_obj_file = ObjectFile::FindPlugin(
- module_sp, &file_spec, 0, FileSystem::Instance().GetByteSize(file_spec),
- dwp_file_data_sp, dwp_file_data_offset);
- // The presence of a debug_cu_index section is the key identifying feature of
- // a DWP file. Make sure we don't fill in the section list on dwp_obj_file
- // (by calling GetSectionList(false)) as this function could be called before
- // we may have all the symbol files collected and available.
- return dwp_obj_file && ObjectFileELF::classof(dwp_obj_file.get()) &&
- dwp_obj_file->GetSectionList(false)->FindSectionByType(
- eSectionTypeDWARFDebugCuIndex, false);
-}
-
// CreateInstance
//
// Platforms can register a callback to use when creating symbol vendors to
@@ -105,15 +87,8 @@ SymbolVendorELF::CreateInstance(const lldb::ModuleSP &module_sp,
FileSpecList search_paths = Target::GetDefaultDebugFileSearchPaths();
FileSpec dsym_fspec =
PluginManager::LocateExecutableSymbolFile(module_spec, search_paths);
- if (!dsym_fspec || IsDwpSymbolFile(module_sp, dsym_fspec)) {
- // If we have a stripped binary or if we got a DWP file, we should prefer
- // symbols in the executable acquired through a plugin.
- ModuleSpec unstripped_spec =
- PluginManager::LocateExecutableObjectFile(module_spec);
- if (!unstripped_spec)
- return nullptr;
- dsym_fspec = unstripped_spec.GetFileSpec();
- }
+ if (!dsym_fspec)
+ return nullptr;
DataBufferSP dsym_file_data_sp;
lldb::offset_t dsym_file_data_offset = 0;