[PATCH] D43838: [CodeView] Initial support for emitting S_THUNK32 symbols for compiler-generated thunk routines

Brock Wyma via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 15:59:42 PST 2018


bwyma created this revision.
bwyma added reviewers: rnk, zturner, smerritt.
Herald added a subscriber: hiraditya.

Compiler-generated thunk routines are currently emitted using S_GPROC32_ID symbols.  This causes Visual Studio to believe the thunk is user code, and when stepping into them Visual Studio opens a "Source Not Found" window because the thunk is correlated with source line zero (0).

By emitting these as S_THUNK32 symbols instead, Visual Studio will recognize these as compiler-generated thunks and step through them into the user code they call.

This initial support only handles standard thunk ordinals.


https://reviews.llvm.org/D43838

Files:
  llvm/include/llvm/IR/DebugInfoFlags.def
  llvm/include/llvm/IR/DebugInfoMetadata.h
  llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
  llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
  llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp
  llvm/test/DebugInfo/COFF/thunk.ll
  llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
  llvm/tools/clang/lib/CodeGen/CGDebugInfo.h
  llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43838.136165.patch
Type: text/x-patch
Size: 45024 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180227/21f232a2/attachment.bin>


More information about the llvm-commits mailing list