gdbclient2
build/envsetup.shのgdbclientをコピーしてgdbclient2を作成する。
function gdbclient2() { 〜〜〜〜〜〜gdbclientと同じなので省略〜〜〜〜〜 echo >|"$OUT_ROOT/gdbclient.cmds" "set solib-absolute-prefix $OUT_SYMBOLS" echo >>"$OUT_ROOT/gdbclient.cmds" "set solib-search-path $OUT_SO_SYMBOLS:$OUT_SO_SYMBOLS/hw:$OUT_SO_SYMBOLS/ssl/engines:$OUT_SO_SYMBOLS/drm:$OUT_SO_SYMBOLS/egl:$OUT_SO_SYMBOLS/soundfx" ## echo >>"$OUT_ROOT/gdbclient.cmds" "target remote $PORT" echo >>"$OUT_ROOT/gdbclient.cmds" "" ## $ANDROID_TOOLCHAIN/$GDB -x "$OUT_ROOT/gdbclient.cmds" "$OUT_EXE_SYMBOLS/$EXE" else echo "Unable to determine build system output dir." fi }
$ . build/envsetup.sh $ lunch 12 $ setpaths $ adb root $ adb shell ps | grep system_server $ gdbclient2 app_process :5039 389 $ cp $ANDROID_PRODUCT_OUT/gdbclient.cmds $ANDROID_BUILD_TOP/.gdbinit
Eclipse起動
- File>New>Project>C++Project
- Project name:cpp_proj
- Project type:EmptyProject
- Finish
- Run>Debug Configurations
- Debugボタンをクリックする。
- Consoleからgdbコマンドを実行する。
- source ~/JB422R1/.gdbinit
その他 $ which arm-eabi-gdb /home/m_fujii/JB422R1/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gdb $ env | grep ANDROID_TOOLCHAIN ANDROID_TOOLCHAIN=/home/m_fujii/JB422R1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin