LLDB pointer + size --> ??
LLDB pointer + size --> ??
- Subject: LLDB pointer + size --> ??
- From: Roland King <email@hidden>
- Date: Sat, 05 May 2012 18:01:04 +0800
Debugging with LLDB today.
buf is a uint8_t*
bufLen is a size_t
below is the output from a debug session using the immediate window of LLDB. Is there a very good reason I'm totally missing why printing 'buf + 176' gives me the pointer I would expect (ie the one one past the end of the buffer) but printing 'buf + bufLen', when bufLen is 176 gives me a totally different pointer, one which doesn't make sense to me? I messed around to see if there was an obvious relationship between the right pointer and the wrong one but I couldn't find it. If not, I'll file a bug. This on 4.3.2
(lldb) p buf
(unsigned char *) $81 = 0x0681fc40
(lldb) p bufLen
(size_t) $82 = 176
(lldb) p buf + bufLen
(unsigned char *) $83 = 0x29147310 // where's this?
(lldb) p buf + 176
(unsigned char *) $84 = 0x0681fcf0 // That makes sense
(lldb) p buf + $82
(unsigned char *) $85 = 0x29147310 // using the $82 result gives me the same odd answer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden