[Lldb-commits] [PATCH] D61733: Breakpad: Generate unwind plans from STACK CFI records
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu May 9 07:20:38 PDT 2019
labath created this revision.
labath added reviewers: amccarth, clayborg, markmentovai.
Herald added a subscriber: aprantl.
This patch implements the GetUnwindPlan interface (added in the previous
patch) for SymbolFileBreakpad, and uses it to generate unwind plans from
STACK CFI records in breakpad files.
We first perform a light-weight parse of the breakpad in order to build
up a map of regions covered by the unwind info so that we can later jump
to the right record when we need to unwind a specific function.
The actual parsing is relatively straight-forward, as the STACK CFI records
are just another (text) form of the eh_frame unwind instructions, and
the same goes for lldb's UnwindPlans. The newly-introduced
PostfixExpression API is used to convert the breakpad postfix
expressions into DWARF. The generated dwarf expressions are stored in a
BumpPtrAllocator, as the UnwindPlan does not take ownership of the
expression data it references (usually this is static data in an object
file, so special ownership is needed).
At this moment the generated unwind plans aren't used in the actual
unwind machinery (only in the image show-unwind command), but that is
coming in a separate patch.
https://reviews.llvm.org/D61733
Files:
lit/SymbolFile/Breakpad/Inputs/stack-cfi-parsing.dmp
lit/SymbolFile/Breakpad/Inputs/stack-cfi-parsing.syms
lit/SymbolFile/Breakpad/stack-cfi-parsing.test
source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61733.198820.patch
Type: text/x-patch
Size: 12057 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190509/48151753/attachment.bin>
More information about the lldb-commits
mailing list