http://llvm.org/bugs/show_bug.cgi?id=16826
Bug ID: 16826 Summary: BOOL output in debugger is misleading, because of a hidden cast Product: lldb Version: 3.2 Hardware: PC OS: MacOS X Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: lldb-dev@cs.uiuc.edu Reporter: riazri...@gmail.com Classification: Unclassified In the debugger, if I break after this line of source `BOOL myBOOL=(BOOL)2;` I can inspect the value of myBOOL: (lldb)p myBOOL (BOOL) $0 = YES However, myBOOL is not YES and the debugger knows it (lldb)p myBOOL==YES (bool) $1 = false The debugger represents BOOL with YES/NO but obviously this is insufficient in the case of BOOL which can also take values 2..256. I believe the debugger is performing a (bool) cast: (lldb)p (bool)myBOOL (BOOL) $3 = YES Instead it should perform a (signed char) cast: (lldb)p (signed char)myBOOL (signed char) $4 = '\x02' And ideally it could also show these values as YES and NO only in the case where '\x01' or '\0' are returned. -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ lldb-dev mailing list lldb-dev@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev