diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2020-10-30 16:43:45 +0100 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2020-10-30 16:50:52 +0100 |
commit | a136699b2a989631f4fd84aa099fc1e731b493c2 (patch) | |
tree | f1b7551811ede3016ae3dbd27dce649df3050e01 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | |
parent | 1943b7f15dc28c07f6cabda492bc15fb870fde06 (diff) | |
download | llvm-a136699b2a989631f4fd84aa099fc1e731b493c2.zip llvm-a136699b2a989631f4fd84aa099fc1e731b493c2.tar.gz llvm-a136699b2a989631f4fd84aa099fc1e731b493c2.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
0 files changed, 0 insertions, 0 deletions