llvm-project/llvm/lib/DebugInfo/CodeView
Reid Kleckner 9ea2c01264 [codeview] Emit S_FRAMEPROC and use S_DEFRANGE_FRAMEPOINTER_REL
Summary:
Before this change, LLVM would always describe locals on the stack as
being relative to some specific register, RSP, ESP, EBP, ESI, etc.
Variables in stack memory are pretty common, so there is a special
S_DEFRANGE_FRAMEPOINTER_REL symbol for them. This change uses it to
reduce the size of our debug info.

On top of the size savings, there are cases on 32-bit x86 where local
variables are addressed from ESP, but ESP changes across the function.
Unlike in DWARF, there is no FPO data to describe the stack adjustments
made to push arguments onto the stack and pop them off after the call,
which makes it hard for the debugger to find the local variables in
frames further up the stack.

To handle this, CodeView has a special VFRAME register, which
corresponds to the $T0 variable set by our FPO data in 32-bit.  Offsets
to local variables are instead relative to this value.

This is part of PR38857.

Reviewers: hans, zturner, javed.absar

Subscribers: aprantl, hiraditya, JDevlieghere, llvm-commits

Differential Revision: https://reviews.llvm.org/D52217

llvm-svn: 343543
2018-10-01 21:59:45 +00:00
..
AppendingTypeTableBuilder.cpp Split TypeTableBuilder into two classes. 2017-11-30 18:39:50 +00:00
CMakeLists.txt [PDB] Add native reading support for UDT / class types. 2018-09-21 22:36:04 +00:00
CVSymbolVisitor.cpp Remove redundant includes from lib/DebugInfo. 2017-12-13 21:30:49 +00:00
CVTypeVisitor.cpp Remove redundant includes from lib/DebugInfo. 2017-12-13 21:30:49 +00:00
CodeViewError.cpp [DebugInfo] Common behavior for error types 2018-08-31 17:41:58 +00:00
CodeViewRecordIO.cpp [codeview] Fix YAML for LF_TYPESERVER2 by hoisting PDB_UniqueId 2017-07-17 23:59:44 +00:00
ContinuationRecordBuilder.cpp Fix non assert build warnings. 2017-11-28 18:50:08 +00:00
DebugChecksumsSubsection.cpp [Codeview/PDB] Rename some methods for clarity. 2018-03-22 17:37:28 +00:00
DebugCrossExSubsection.cpp
DebugCrossImpSubsection.cpp llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
DebugFrameDataSubsection.cpp [PDB] Write FPO Data to the PDB. 2018-09-11 22:35:01 +00:00
DebugInlineeLinesSubsection.cpp
DebugLinesSubsection.cpp
DebugStringTableSubsection.cpp llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
DebugSubsection.cpp
DebugSubsectionRecord.cpp
DebugSubsectionVisitor.cpp
DebugSymbolRVASubsection.cpp
DebugSymbolsSubsection.cpp
EnumTables.cpp [codeview] Decode and dump FP regs from S_FRAMEPROC records 2018-09-11 22:00:50 +00:00
Formatters.cpp [codeview] Fix YAML for LF_TYPESERVER2 by hoisting PDB_UniqueId 2017-07-17 23:59:44 +00:00
GlobalTypeTableBuilder.cpp [CodeView] Micro-optimizations to speed up type merging. 2018-01-30 17:12:04 +00:00
LLVMBuild.txt
LazyRandomTypeCollection.cpp Teach llvm-pdbutil to dump types from object files. 2017-12-05 23:58:18 +00:00
Line.cpp
MergingTypeTableBuilder.cpp [CodeView] Add support for content hashing CodeView type records. 2017-12-05 23:08:58 +00:00
RecordName.cpp [CodeView] Minimal support for S_UNAMESPACE records 2018-07-31 19:15:50 +00:00
RecordSerialization.cpp [PDB] Improve GSI hash table dumping for publics and globals 2017-07-26 00:40:36 +00:00
SimpleTypeSerializer.cpp [CodeView] Refactor / Rewrite TypeSerializer and TypeTableBuilder. 2017-11-28 18:33:17 +00:00
StringsAndChecksums.cpp [llvm-pdbutil] Support dumping CodeView from object files. 2017-09-01 20:06:56 +00:00
SymbolDumper.cpp [codeview] Decode and dump FP regs from S_FRAMEPROC records 2018-09-11 22:00:50 +00:00
SymbolRecordMapping.cpp [codeview] Emit S_FRAMEPROC and use S_DEFRANGE_FRAMEPOINTER_REL 2018-10-01 21:59:45 +00:00
SymbolSerializer.cpp [PDB] Serialize records into a stack-allocated buffer. 2017-08-21 20:17:19 +00:00
TypeDumpVisitor.cpp Fix line endings (CR/LF -> LF) introduced by rL329613 2018-04-10 00:09:15 +00:00
TypeHashing.cpp Resubmit [pdb] Change /DEBUG:GHASH to emit 8 byte hashes." 2018-05-17 22:55:15 +00:00
TypeIndex.cpp
TypeIndexDiscovery.cpp [CodeView] Minimal support for S_UNAMESPACE records 2018-07-31 19:15:50 +00:00
TypeRecordHelpers.cpp [PDB] Add native reading support for UDT / class types. 2018-09-21 22:36:04 +00:00
TypeRecordMapping.cpp Fix line endings (CR/LF -> LF) introduced by rL329613 2018-04-10 00:09:15 +00:00
TypeStreamMerger.cpp [DebugInfo] Common behavior for error types 2018-08-31 17:41:58 +00:00
TypeTableCollection.cpp Remove redundant includes from lib/DebugInfo. 2017-12-13 21:30:49 +00:00