views:

170

answers:

1

I'm attempting to do some debugging in GDB for an iPhone app issue. When I mouse over a string variable to see the contents the console goes into an infinite scroll with the text "Unable to access variable ".

Any ideas on why this might be happening?

A: 

For future reference, there are several major causes:

  • Target-level optimization settings: there should be no optimization
  • Target-level strip symbols: symbols should not be stripped
  • Target-level level of debugging symbols: default or all symbols should be used
  • Per-file compiler flags (get-info on file, choose Debug tab): Make sure there are no optimization per-file settings as there is no way to specify in what configuration (debug or release) they should be used, so they're always used.

I go into more detail here.

Joshua Nozzi