Debugger and Identifier

There's probably some obvious reason, but why do I get a different result for the last one!? 

  1. (lldb) p t[Identifier("alpha")].isVoid()
  2. (bool) $36 = true
  3. (lldb) p t["alpha"].isVoid()
  4. (bool) $37 = true
  5. (lldb) p property
  6. (const juce::Identifier) $38 = {
  7.   name = {
  8.     text = (data = "alpha")
  9.   }
  10. }
  11. (lldb) p t[property].isVoid()
  12. (bool) $41 = false

No idea! It should all be calling the same method, can't see why that'd happen.

Do all attempts use the same string pool?  Perhaps the debugger is creating a new StringPool instance for the newly instantiated Identifiers, or maybe there are shared libs involved in your setup?  I'm guessing a bit here but I've ran into problems with Identifiers when playing around with shared/dynamic libs.

I did a couple tests and there doesn't seem to be an issue with the debugger here..which makes sense I suppose.

If you haven't already done so you could check out the memory addresses:


p Identifier("alpha")

and/or just compare for equality

p property == Identifier("alpha")

I couldn't see why it was happening either.   I thought I was going mad :)

Anyway, I've fixed the underlying problem I was trying to debug (this behaviour was a side issue).  

Graeme - if I get a chance I'll have a look at that.  That's definitely the right avenue to explore

Thank you both!