[Lldb-commits] [PATCH] D73303: [lldb/Target] Add Assert StackFrame Recognizer
Frederic Riss via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 5 13:21:37 PST 2020
friss added inline comments.
================
Comment at: lldb/source/API/SBThread.cpp:328-329
if (stop_info_sp) {
- const char *stop_desc = stop_info_sp->GetDescription();
+ const char *stop_desc =
+ exe_ctx.GetThreadPtr()->GetStopDescription().data();
if (stop_desc) {
----------------
This is wrong. `GetStopDescription()` returns a temporary `std::string`. `stop_desc` will be a dangling pointer on the next line. Just make `stop_desc` a `std::string` and call `.data()` below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73303/new/
https://reviews.llvm.org/D73303
More information about the lldb-commits
mailing list