[lldb-dev] [Bug 23069] 'char' type treated incorrectly in expression evaluation when non default type is used

via lldb-dev lldb-dev at lists.llvm.org
Wed Jul 31 18:18:47 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=23069

Jonas Devlieghere <jdevlieghere at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #2 from Jonas Devlieghere <jdevlieghere at apple.com> ---
Oops, I was too fast. Indeed, it fails with `-funsigned-char`. 

(lldb) target create "/tmp/a.out"
Current executable set to '/tmp/a.out' (x86_64).
(lldb) b main.cpp:9
Breakpoint 1: where = a.out`main + 25 at main.cpp:9:3, address =
0x0000000100000fa9
(lldb) r
Process 33687 launched: '/tmp/a.out' (x86_64)
Process 33687 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x0000000100000fa9 a.out`main at main.cpp:9:3
   6      char c = 0;
   7      signed char sc = 0;
   8      unsigned char uc = 0;
-> 9      return 0; // Break here
   10   }
(lldb) expression foo(c)
(int) $0 = 3
(lldb) expression foo(sc)
(int) $1 = 2
(lldb) expression foo(c)
(int) $2 = 3

-- 
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/20190801/e4eaeac9/attachment.html>


More information about the lldb-dev mailing list