Thursday 8 August 2013

LLVM をいじる

なんか、ぜんぜん gdb の break point がかからなくて。-v 付けてみたら、なんか長いオプションが。その長い option で fork exec しているわけね。それでは、break point に引っかからない。なので、その長い option で起動してやると良いようです。どれくらい長いかというと、

"/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name test1.c -pic-level 1 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 134.9 -v -coverage-file test1.o -resource-dir /usr/bin/../lib/clang/4.1 -fmodule-cache-path /var/tmp/clang-module-cache -fdebug-compilation-dir /Users/kono/src/device -ferror-limit 19 -fmessage-length 153 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties -fdiagnostics-show-option -fcolor-diagnostics -o test1.o -x c test/test1.c

これぐらい。

なんだけど、gdb で break point 掛けるたびに沈黙。

「ねぇ、そのノートPC、メモリどれくらい?」
「4GBです。」

あぁ、無理無理、全然無理だよ。4GB のメモリで LLVM を追いかけるとか無理無理です。だからといって、16GB なら楽勝ってわけでもないんだろうけど。もちろん、debug しなければ、そんなには食わないんですが。

それようの強力なマシンがあるんだから、そっちでやれば? ノートPCでやりたいのはわかるけど。

No comments: