diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2025-04-04 16:33:40 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-04 16:33:40 -0700 |
| commit | 5271dead61dca30f4a6db0f0df8da00f8987449e (patch) | |
| tree | ebe210bf6f5533f4db10711e977bf6114e358679 /lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp | |
| parent | 6f34d03b3132a8286630f8496aa7dce9605e677b (diff) | |
[lldb] Add a {ObjectFile,SymbolFile}::GetObjectName method (#133370)
Add ObjectFile::GetObjectName and SymbolFile::GetObjectName to retrieve
the name of the object file, including the `.a` for static libraries.
We currently do something similar in CommandObjectTarget, but the code
for dumping this is a lot more involved than what's being offered by the
new method. We have options to print he full path, the base name, and
the directoy of the path and trim it to a specific width.
This is motivated by #133211, where Greg pointed out that the old code
would print the static archive (the .a file) rather than the actual
object file inside of it.
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp index ce351274b457..961c212e2e6d 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp @@ -727,12 +727,7 @@ void SymbolFileDWARFDebugMap::ForEachSymbolFile( Progress::kDefaultHighFrequencyReportTime); for (uint32_t oso_idx = 0; oso_idx < num_oso_idxs; ++oso_idx) { if (SymbolFileDWARF *oso_dwarf = GetSymbolFileByOSOIndex(oso_idx)) { - progress.Increment(oso_idx, oso_dwarf->GetObjectFile() - ? oso_dwarf->GetObjectFile() - ->GetFileSpec() - .GetFilename() - .GetString() - : ""); + progress.Increment(oso_idx, oso_dwarf->GetObjectName()); if (closure(*oso_dwarf) == IterationAction::Stop) return; } |
