[Lldb-commits] [PATCH] D74252: Fix+re-enable Assert StackFrame Recognizer
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 7 13:12:47 PST 2020
mib accepted this revision.
mib added a comment.
This revision is now accepted and ready to land.
Originally, when I implemented the patch and tested it on linux, the symbol on the abort frame was (__GI___assert_fail) on my machine.
In D73303#1846281 <https://reviews.llvm.org/D73303#1846281>, @labath wrote:
> Since the failure reason was not very obvious from the bot message, I took a quick look, and to save you the trouble of reproducing this, here's what I found:
>
> The reason the new test failed was because the symbols you are searching for (`__GI_raise`, `__GI___assert_fail`) are private libc symbols which are only available if you happen to have debug info for the system libc installed. If you don't, these will show up as `raise` and `__assert_fail`, respectively.
This is why I thought I'd need to support both.
Otherwise, LGTM!
Thanks for investigating the issue.
================
Comment at: lldb/source/Target/AssertFrameRecognizer.cpp:19-38
/// Checkes if the module containing a symbol has debug info.
///
/// \param[in] target
/// The target containing the module.
/// \param[in] module_spec
/// The module spec that should contain the symbol.
/// \param[in] symbol_name
----------------
In this case, we can also remove this.
================
Comment at: lldb/source/Target/AssertFrameRecognizer.cpp:63-64
module_spec = FileSpec("libc.so.6");
symbol_name = "__GI_raise";
if (!ModuleHasDebugInfo(target, module_spec, symbol_name))
symbol_name = "raise";
----------------
And also this if global bindings are preferred.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74252/new/
https://reviews.llvm.org/D74252
More information about the lldb-commits
mailing list