• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: lldb 'print object' (po) prints pointer value if not object?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lldb 'print object' (po) prints pointer value if not object?


  • Subject: Re: lldb 'print object' (po) prints pointer value if not object?
  • From: Roland King <email@hidden>
  • Date: Wed, 23 Apr 2014 13:37:25 +0800

So if that is a tagged pointer then some of those bits represent the fact it's tagged (the LSB) and what type it is (who knows how many others, possibly the next 3), so if it is an NSNumber representing an integer, the value is shifted up some number of bits, past the tag bits, so the value wouldn't be 83, it might be 5 (>>4), or zero (>>8), or something else.

So going back to the original question, po returning 83 is probably not the right answer either way.

Might be the way 'po' is mapped to an underlying LLDB native 100 character long command?


On 23 Apr, 2014, at 1:28 pm, Jerry Krinock <email@hidden> wrote:

> Thank you, Quincey.  I’d read about tagged pointers, but being a high level guy, I guess I’ve never seen one in real life :))
>
> My example arose while debugging a crash.  There was *supposed* to be an object in rdi, but apparently it was deallocced and possibly replaced by an NSNumber whose value is 83.  So this is a variation on the case of finding a different object where your deallocced object had been.
>
> On 2014 Apr 22, at 22:04, Quincey Morris <email@hidden> wrote:
>
>> On Apr 22, 2014, at 22:00 , Roland King <email@hidden> wrote:
>>
>>> What do they do for all the even numbers then?
>>
>> I’m sorry, even numbers have been abolished. Didn’t you know?
>
> Let’s be nice.  Non-aligned *pointers* have indeed been abolished, as explained here…
>
> https://www.mikeash.com/pyblog/friday-qa-2012-07-27-lets-build-tagged-pointers.html
>
>
> _______________________________________________
> 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


 _______________________________________________
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


  • Follow-Ups:
    • Re: lldb 'print object' (po) prints pointer value if not object?
      • From: Quincey Morris <email@hidden>
References: 
 >lldb 'print object' (po) prints pointer value if not object? (From: Jerry Krinock <email@hidden>)
 >Re: lldb 'print object' (po) prints pointer value if not object? (From: Quincey Morris <email@hidden>)
 >Re: lldb 'print object' (po) prints pointer value if not object? (From: Roland King <email@hidden>)
 >Re: lldb 'print object' (po) prints pointer value if not object? (From: Quincey Morris <email@hidden>)
 >Re: lldb 'print object' (po) prints pointer value if not object? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: lldb 'print object' (po) prints pointer value if not object?
  • Next by Date: Re: lldb 'print object' (po) prints pointer value if not object?
  • Previous by thread: Re: lldb 'print object' (po) prints pointer value if not object?
  • Next by thread: Re: lldb 'print object' (po) prints pointer value if not object?
  • Index(es):
    • Date
    • Thread