[lldb-dev] [Bug 24928] New: Evaluating expression returning an std::shared_ptr<T> fails
via lldb-dev
lldb-dev at lists.llvm.org
Thu Sep 24 11:04:36 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24928
Bug ID: 24928
Summary: Evaluating expression returning an std::shared_ptr<T>
fails
Product: lldb
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: lldb-dev at lists.llvm.org
Reporter: tberghammer at google.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Compile the following code with the following command on Linux x86_64: "clang++
-g -std=c++11 main.cpp", then set a breakpoint on the marked line and evaluate
the expression "foo(sp)" while stopped at the breakpoint.
Expected behavior is to display the result of the expression, but lldb returns
with the following error message:
call to a function 'std::__shared_ptr<int,
__gnu_cxx::_Lock_policy>::~__shared_ptr()'
('_ZNSt12__shared_ptrIiN9__gnu_cxx12_Lock_policyEED2Ev') that is not present in
the target
Tested on Linux x86_64 with clang-3.5 and gcc-4.8.4
#include <memory>
std::shared_ptr<int> foo(const std::shared_ptr<int>& sp) {
return sp;
}
int main() {
std::shared_ptr<int> sp = std::make_shared<int>(42);
auto sp2 = foo(sp);
return 0; // Break here and run "expression foo(sp)"
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150924/070c206f/attachment.html>
More information about the lldb-dev
mailing list