[all-commits] [llvm/llvm-project] f44bee: [lldb] Fix the DWARF index cache when index is par...

Greg Clayton via All-commits all-commits at lists.llvm.org
Tue Dec 3 10:10:02 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f44bee78c471df8f0a258c656a921a082d7e836a
      https://github.com/llvm/llvm-project/commit/f44bee78c471df8f0a258c656a921a082d7e836a
  Author: Greg Clayton <gclayton at fb.com>
  Date:   2024-12-03 (Tue, 03 Dec 2024)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h
    A lldb/test/Shell/SymbolFile/DWARF/x86/dwp-index-cache.cpp

  Log Message:
  -----------
  [lldb] Fix the DWARF index cache when index is partial. (#118390)

The ManualDWARFIndex class can create a index cache if the LLDB index
cache is enabled. This used to save the index to the same file,
regardless of wether the cache was a full index (no .debug_names) or a
partial index (have .debug_names, but not all .o files were had
.debug_names). So we could end up saving an index cache that was
partial, and then later load that partial index as if it were a full
index if the user set the 'settings set
plugin.symbol-file.dwarf.ignore-file-indexes true'. This would cause us
to ignore the .debug_names section, and if the index cache was enabled,
we could end up loading the partial index as if it were a full DWARF
index.

This patch detects when the ManualDWARFIndex is being used with
.debug_names, and saves out a cache file with a suffix of "-full" or
"-partial" to avoid this issue.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list