[lldb-dev] [Bug 22875] New: unwind-on-error-in-expressions=false is broken
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 11 08:08:40 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=22875
Bug ID: 22875
Summary: unwind-on-error-in-expressions=false is broken
Product: lldb
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: lldb-dev at cs.uiuc.edu
Reporter: labath at google.com
Classification: Unclassified
Attempting to evaluate an expression with unwind-on-error-in-expressions=false
results in an lldb(llvm) assertion:
labath ~/ll/goog/lldb/test/expression_command/call-function $ cat main.cpp
#include <iostream>
#include <string>
struct Five
{
int number;
const char *name;
};
Five
returnsFive()
{
Five my_five = { 5, "five" };
return my_five;
}
int main (int argc, char const *argv[])
{
std::string str = "Hello world";
std::cout << str << std::endl;
std::cout << str.c_str() << std::endl;
Five main_five = returnsFive();
#if 0
print str
print str.c_str()
#endif
return 0; // Please test these expressions while stopped at this line:
}
labath ~/ll/goog/lldb/test/expression_command/call-function $ make
clang++ -std=c++11 -g -O0 -m64
-I/usr/local/google/home/labath/ll/goog/lldb/test/make/../../include -c -o
main.o main.cpp
clang++ main.o -g -O0 -m64
-I/usr/local/google/home/labath/ll/goog/lldb/test/make/../../include -o
"a.out"
labath ~/ll/goog/lldb/test/expression_command/call-function $
~/ll/goog/build/host/bin/lldb ./a.out -o "br set -l 27" -o "set set
target.process.unwind-on-error-in-expressions false" -o "pr la" -o "print str"
(lldb) target create "./a.out"
Current executable set to './a.out' (x86_64).
(lldb) br set -l 27
Breakpoint 1: where = a.out`main + 218 at main.cpp:27, address =
0x0000000000400cda
(lldb) set set target.process.unwind-on-error-in-expressions false
(lldb) pr la
Hello world
Hello world
Process 10135 stopped
* thread #1: tid = 10135, 0x0000000000400cda a.out`main(argc=1,
argv=0x00007fffffffdcc8) + 218 at main.cpp:27, name = 'a.out', stop reason =
breakpoint 1.1
frame #0: 0x0000000000400cda a.out`main(argc=1, argv=0x00007fffffffdcc8) +
218 at main.cpp:27
24 print str
25 print str.c_str()
26 #endif
-> 27 return 0; // Please test these expressions while stopped at this
line:
28 }
Process 10135 launched: './a.out' (x86_64)
(lldb) print str
lldb: /usr/local/google/home/labath/ll/goog/llvm/lib/IR/Metadata.cpp:252:
static llvm::ValueAsMetadata *llvm::ValueAsMetadata::get(llvm::Value *):
Assertion `V && "Unexpected null Value"' failed.
Aborted (core dumped)
--
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/20150311/a48caf4a/attachment.html>
More information about the lldb-dev
mailing list