LoginSignup
1
1

More than 5 years have passed since last update.

[メモ] lldb で変数を見られない原因はAddress Sanitizerかも

Last updated at Posted at 2018-10-12

現象

  • lldbでローカル変数のpoとかexprしようとすると error: <EXPR>:3:1: error: use of unresolved identifier 'hogehoge' とエラーが出る

  • Xcode の Variables View でもちゃんとアドレスが表示されず、右クリックしてPrint Description of "hogehoge" したときもエラーが出る

なおった方法

schemeのAddress Sanitizerをoffにするとなおりました。(Edit scheme... → Run → Diagnostics → Address Sanitizer)

(そういえばしばらく前にAddress Sanitizerを含めいくつかデバッグ用の設定をonにしたxcodeprojをコミットしていた。犯人を探していたら犯人は私だった。)

今回関係なかった方法

  • optimization を off にする → 既にoffになっていた
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1