[Lldb-commits] [PATCH] D32022: Fix backtrace of noreturn functions situated at the end of a module
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 13 08:51:16 PDT 2017
labath created this revision.
When a call instruction is the last instruction in a function, the
backtrace PC will point past the end of the function. We already had
special code to handle that, but we did not handle the case where the PC
ends up outside of the bounds of the module containing the function,
which is a situation that occured in TestNoreturnUnwind on android for
some arch/compiler combinations.
I fix this by adding an argument to Address resolution code which states
that we are ok with addresses pointing to the end of a module/section to
resolve to that module/section.
I create a reproducible test case for this situation by hand-crafting an
executable which has a noreturn function at the end of a module.
https://reviews.llvm.org/D32022
Files:
include/lldb/Core/Address.h
include/lldb/Core/Section.h
include/lldb/Target/SectionLoadList.h
packages/Python/lldbsuite/test/functionalities/unwind/noreturn/main.c
packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/TestNoReturnModuleEnd.py
packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/a.o
packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/a.s
packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/test.core
packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/test.out
source/Core/Address.cpp
source/Core/Section.cpp
source/Plugins/Process/Utility/RegisterContextLLDB.cpp
source/Target/SectionLoadList.cpp
source/Target/StackFrame.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32022.95139.patch
Type: text/x-patch
Size: 12167 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170413/4631d388/attachment.bin>
More information about the lldb-commits
mailing list