1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/lib/CodeGen/AsmPrinter
Peter Collingbourne 93adc422a8 hwasan: Add a tag_offset DWARF attribute to instrumented stack variables.
The goal is to improve hwasan's error reporting for stack use-after-return by
recording enough information to allow the specific variable that was accessed
to be identified based on the pointer's tag. Currently we record the PC and
lower bits of SP for each stack frame we create (which will eventually be
enough to derive the base tag used by the stack frame) but that's not enough
to determine the specific tag for each variable, which is the stack frame's
base tag XOR a value (the "tag offset") that is unique for each variable in
a function.

In IR, the tag offset is most naturally represented as part of a location
expression on the llvm.dbg.declare instruction. However, the presence of the
tag offset in the variable's actual location expression is likely to confuse
debuggers which won't know about tag offsets, and moreover the tag offset
is not required for a debugger to determine the location of the variable on
the stack, so at the DWARF level it is represented as an attribute so that
it will be ignored by debuggers that don't know about it.

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

llvm-svn: 363635
2019-06-17 23:39:41 +00:00
..
AccelTable.cpp Reapply: "DebugInfo: Emit only one kind of accelerated access/name table"" 2019-04-23 19:00:45 +00:00
AddressPool.cpp DebugInfo: Use assembly label arithmetic for address pool size for easier reading/editing 2019-01-24 03:27:57 +00:00
AddressPool.h DebugInfo: Use assembly label arithmetic for address pool size for easier reading/editing 2019-01-24 03:27:57 +00:00
ARMException.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AsmPrinter.cpp [Remarks][NFC] Move the serialization to lib/Remarks 2019-05-30 21:45:59 +00:00
AsmPrinterDwarf.cpp Add explicit dependencies on MCSection.h and MCDwarf.h to the .cpp 2019-04-12 07:40:01 +00:00
AsmPrinterInlineAsm.cpp [AsmPrinter] refactor to support %c w/ GlobalAddress' 2019-04-26 18:45:04 +00:00
ByteStreamer.h [DebugInfo] Introduce DW_OP_LLVM_convert 2019-03-19 13:16:28 +00:00
CMakeLists.txt Revert "[BTF] Add BTF DebugInfo" 2018-11-30 16:54:43 +00:00
CodeViewDebug.cpp Use fully qualified name when printing S_CONSTANT records 2019-06-13 22:53:43 +00:00
CodeViewDebug.h Emit global variables as S_CONSTANT records for codeview debug info. 2019-05-16 22:28:52 +00:00
DbgEntityHistoryCalculator.cpp [DebugInfo] Use FrameDestroy to extend stack locations to end-of-function 2019-06-13 10:03:17 +00:00
DebugHandlerBase.cpp Stop undef fragments from closing non-overlapping fragments 2019-05-28 13:23:25 +00:00
DebugLocEntry.h [DebugInfo] Move Value struct out of DebugLocEntry as DbgValueLoc (NFC) 2019-06-13 10:23:26 +00:00
DebugLocStream.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DebugLocStream.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DIE.cpp [DebugInfo] Introduce DW_OP_LLVM_convert 2019-03-19 13:16:28 +00:00
DIEHash.cpp [DebugInfo] Introduce DW_OP_LLVM_convert 2019-03-19 13:16:28 +00:00
DIEHash.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DIEHashAttributes.def
DwarfCFIException.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DwarfCompileUnit.cpp hwasan: Add a tag_offset DWARF attribute to instrumented stack variables. 2019-06-17 23:39:41 +00:00
DwarfCompileUnit.h DebugInfo: Emit only declarations (not whole definitions) of non-unit user defined types into type units 2019-04-24 18:09:44 +00:00
DwarfDebug.cpp [DebugInfo] Move Value struct out of DebugLocEntry as DbgValueLoc (NFC) 2019-06-13 10:23:26 +00:00
DwarfDebug.h [DebugInfo] Move Value struct out of DebugLocEntry as DbgValueLoc (NFC) 2019-06-13 10:23:26 +00:00
DwarfException.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DwarfExpression.cpp hwasan: Add a tag_offset DWARF attribute to instrumented stack variables. 2019-06-17 23:39:41 +00:00
DwarfExpression.h hwasan: Add a tag_offset DWARF attribute to instrumented stack variables. 2019-06-17 23:39:41 +00:00
DwarfFile.cpp DebugInfo: Split DWARF + gmlt + no-split-dwarf-inlining shouldn't emit anything to the .dwo file 2019-02-12 00:00:38 +00:00
DwarfFile.h [AsmPrinter] Delete unused RangeSpanList::addRange 2019-04-10 10:35:10 +00:00
DwarfStringPool.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DwarfStringPool.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DwarfUnit.cpp DebugInfo: Include enumerators in pubnames 2019-06-14 01:58:56 +00:00
DwarfUnit.h [DebugInfo] More strict debug range for stack variables 2019-06-10 08:41:06 +00:00
EHStreamer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
EHStreamer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ErlangGCPrinter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LLVMBuild.txt [Remarks] Add string deduplication using a string table 2019-04-24 00:06:24 +00:00
OcamlGCPrinter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WasmException.cpp [WebAssembly] Exception handling: Switch to the new proposal 2019-01-30 03:21:57 +00:00
WasmException.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WinCFGuard.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WinCFGuard.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WinException.cpp [AArch64][Windows] Compute function length correctly in unwind tables. 2019-05-03 00:10:45 +00:00
WinException.h [AArch64][Windows] Compute function length correctly in unwind tables. 2019-05-03 00:10:45 +00:00