From 14086ed75d165b827b20de0101324bd8467d93c4 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Wed, 10 Feb 2016 02:12:42 +0000 Subject: Change lldb.value.__int__() so that it takes into account the signedness of the value being cast to return a Python number with the proper value The explicit APIs on SBValue obviously remain if one wants to be explicit in intent, or override this guess, but since __int__() has to pick one, an educated guess is definitely better than than always going to signed regardless Fixes rdar://24556976 llvm-svn: 260349 --- lldb/packages/Python/lldbsuite/test/python_api/value/main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lldb/packages/Python/lldbsuite/test/python_api/value/main.c') diff --git a/lldb/packages/Python/lldbsuite/test/python_api/value/main.c b/lldb/packages/Python/lldbsuite/test/python_api/value/main.c index a00795750de..2ebe3ad303c 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/value/main.c +++ b/lldb/packages/Python/lldbsuite/test/python_api/value/main.c @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// #include +#include // This simple program is to test the lldb Python API SBValue.GetChildAtIndex(). @@ -38,6 +39,9 @@ struct MyStruct int main (int argc, char const *argv[]) { + uint32_t uinthex = 0xE0A35F10; + int32_t sinthex = 0xE0A35F10; + int i; MyInt a = 12345; struct MyStruct s = { 11, 22 }; -- cgit v1.2.3