In Xcode 7.2. Trying to use "View Memory Of" and it seems to be not working quite right. Is this feature broken?
If I "View Memory Of _bytes" of an NSData object, it tries to tell me that the memory location is "0x0". But if I get that same memory pointer by making a new expression using the accessor method (remember, same result, same memory location), I get the legitimate memory dump.
For example
View Memory Of - *_bytes or *(0x7fc7a103e000)
https://www.evernote.com/l/ACDBGun0yxFOWKI423c3e3QgVUks5vOlC3EB/image.png
Results in a view of memory 0x0. Completely useless and wrong.
So I create a custom expression for the same variable and then View Memory Of *theResult.bytes, or *(0x7fc7a103e000)
https://www.evernote.com/l/ACBm6RPZRmJD_6nYadVRdUBSlemEVWYyys4B/image.png
and that shows me exactly what the former "View Memory of" should have shown me, the memory at the location specified.
So thinking, well, maybe it is because it says (void*) and someone thought that showing "void" would be "accurate" to show 0x0 (which is after all "void" of any useful information). Lets try and make a custom type and debugger-type-cast it to something not void?
So I tell Xcode to view as a "Custom Type..." (debugger typecasting of sorts)
https://www.evernote.com/l/ACCC9Gwhgh1Lb41JvKqR-Cxbh2I6iL3UwtsB/image.png
and in the "Custom Type" it offers:
(void*)theResult->_bytes
https://www.evernote.com/l/ACAlyVYDjY5Gw4WUertgpRvDAdy5OU9ph3EB/image.png
and I think "ok, lets start with a known quantity, something that Xcode likes... and I press "Done"...
But wait! Xcode call's its own offering an error!
https://www.evernote.com/l/ACB6m0pylXlB6LUEev4rTXa04nPjsgVNjBIB/image.png
XCode produced an invalid expression... Hmm...
Am I looking at this incorrectly or is the "View Memory Of" all botched up in Xcode? It seems sort of basic And in fact, the more I try "View Memory Of", the more I notice it does not work or produce any useful results in most cases... Sometimes it points to inexplicable garbage, other times 0x0.