Skip to content

Commit db7d0a8

Browse files
authored
Merge pull request #8478 from jasonmolenda/cp/dont-reset-unwindtable-when-adding-symbol-file-20230725
[lldb] Don't clear a Module's UnwindTable when adding a SymbolFile (llvm#86603)
2 parents 3493c19 + ed7d095 commit db7d0a8

File tree

2 files changed

+1
-33
lines changed

2 files changed

+1
-33
lines changed

lldb/source/Core/Module.cpp

+1-6
Original file line numberDiff line numberDiff line change
@@ -1371,9 +1371,9 @@ void Module::SectionFileAddressesChanged() {
13711371

13721372
UnwindTable &Module::GetUnwindTable() {
13731373
if (!m_unwind_table) {
1374-
m_unwind_table.emplace(*this);
13751374
if (!m_symfile_spec)
13761375
SymbolLocator::DownloadSymbolFileAsync(GetUUID());
1376+
m_unwind_table.emplace(*this);
13771377
}
13781378
return *m_unwind_table;
13791379
}
@@ -1491,15 +1491,10 @@ void Module::SetSymbolFileFileSpec(const FileSpec &file) {
14911491
// one
14921492
obj_file->ClearSymtab();
14931493

1494-
// Clear the unwind table too, as that may also be affected by the
1495-
// symbol file information.
1496-
m_unwind_table.reset();
1497-
14981494
// The symbol file might be a directory bundle ("/tmp/a.out.dSYM")
14991495
// instead of a full path to the symbol file within the bundle
15001496
// ("/tmp/a.out.dSYM/Contents/Resources/DWARF/a.out"). So we need to
15011497
// check this
1502-
15031498
if (FileSystem::Instance().IsDirectory(file)) {
15041499
std::string new_path(file.GetPath());
15051500
std::string old_path(obj_file->GetFileSpec().GetPath());

lldb/test/Shell/SymbolFile/target-symbols-add-unwind.test

-27
This file was deleted.

0 commit comments

Comments
 (0)