[all-commits] [llvm/llvm-project] a13669: [nfc] [lldb] Align `user_id_t` format to the curre...
Jan Kratochvil via All-commits
all-commits at lists.llvm.org
Fri Oct 30 08:51:15 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: a136699b2a989631f4fd84aa099fc1e731b493c2
https://github.com/llvm/llvm-project/commit/a136699b2a989631f4fd84aa099fc1e731b493c2
Author: Jan Kratochvil <jan.kratochvil at redhat.com>
Date: 2020-10-30 (Fri, 30 Oct 2020)
Changed paths:
M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
M lldb/test/Shell/SymbolFile/DWARF/DW_AT_low_pc-addrx.s
M lldb/test/Shell/SymbolFile/DWARF/array-sizes.s
M lldb/test/Shell/SymbolFile/DWARF/debug-types-address-ranges.s
M lldb/test/Shell/SymbolFile/DWARF/debug-types-dwarf5.s
M lldb/test/Shell/SymbolFile/DWARF/debug_ranges-missing-section.s
M lldb/test/Shell/SymbolFile/DWARF/debug_ranges.s
M lldb/test/Shell/SymbolFile/DWARF/debug_rnglists-dwo.s
M lldb/test/Shell/SymbolFile/DWARF/debug_rnglists.s
M lldb/test/Shell/SymbolFile/DWARF/dwarf5_locations.s
M lldb/test/Shell/SymbolFile/DWARF/dwp-debug-types.s
Log Message:
-----------
[nfc] [lldb] Align `user_id_t` format to the current `DIERef` format
Current user_id_t format is:
63{isDebugTypes} 62..32{dwo || 7fffffff}
31..0 {die_offset}
while current DIERef format is (I have made up the bit positions but the
field widths do match):
63{m_section==isDebugTypes} 62{m_dwo_num_valid} 61..32{m_dwo_num}
31..0 {m_die_offset}
Proposing to change user_id_t to:
63{isDebugTypes} 62{dwo_is_valid} 61..32{dwo; 0 if !valid}
31..0 {die_offset}
There is no benefit of having 31-bits wide dwo_num in user_id_t when it
gets converted to 30-bits width in DIERef.
This patch is for future DWZ patchset which extends the dwo_is_valid bit
into a 2-bit field (normal, DWO, DWZ, DWZcommon) so that both user_id_t
and DIERef can be changed then the same way.
It would be best to somehow unify user_id_t and DIERef but I do not plan
to do that. user_id_t should probably remain a number for the Python API
compatibility while there still needs to be some class with all the
methods to access it.
SymbolFileDWARF::GetDwpSymbolFile() and SymbolFileDWARF::GetDIE use
0x3fffffff for DWP but that does not clash:
formerly:
31bits32..62:0x7fffffff = normal unit / not any DWO
31bits32..62:0x3fffffff = DWP
31bits32..62:others = DWO unit number
after this patch:
bit62=0 30bits32..61:any = normal unit / not any DWO
bit62=1 30bits32..61:0x3fffffff = DWP
bit62=1 30bits32..61:others = DWO unit number
Differential Revision: https://reviews.llvm.org/D90413
More information about the All-commits
mailing list