のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

Gdb

settings gdbclient

Gdb

adb shell ps | grep settings gdbclient app_process :5039 [pid]

AtomicString::remove

i=44 267 inline void deref() 268 { 269 if (m_refCount == s_refCountIncrement) { 270 delete this; <===== 271 return; 272 } 273 274 m_refCount -= s_refCountIncrement; 275 } 252 StringImpl::~StringImpl() 253 { 254 ASSERT(!isStatic()); 255 256…

delete gFontPlatformDataCache;

529 void FontCache::invalidate() 530 { 531 if (!gClients) { 532 ASSERT(!gFontPlatformDataCache); 533 return; 534 } 535 536 if (gFontPlatformDataCache) { 537 deleteAllValues(*gFontPlatformDataCache); 538 delete gFontPlatformDataCache; <====…

dddclient

dddclientコマンドの作成 envsetup.shの中からgdbclientの部分をコピー&ペーストする。 コマンド名をdddclientに変える。 スクリプトの1行を以下のように変える。 -gdbwrapper "$OUT_ROOT/gdbclient.cmds" "$OUT_EXE_SYMBOLS/$EXE" +ddd --debugger $ANDROI…

gdb tui コマンド

Gdb

25.2 TUIのキーバインド C-x a TUIモードに入ったり、離れたりします。 C-x 1 TUIのレイアウトをウィンドウ一つだけにします。 C-x 2 TUIのレイアウトを少なくとも二つのウィンドウにします。 C-x o アクティブウィンドウを変更します。 C-x s シングルキー…

webkit debug

gdbclient app_process :5039 browser

loadFontInfoLocked

$ adb root $ adb shell ps | grep system_server $ gdbclient app_process :5039 5078 (gdb) b SkFontHost::CreateTypeface (gdb) c (gdb) b SkFontHost::CreateTypeface (gdb) b SkFontHost::GetAdvancedTypefaceMetrics (gdb) b SkGlyphCache::lookupMetr…

gdbclient2

build/envsetup.shのgdbclientをコピーしてgdbclient2を作成する。 function gdbclient2() { 〜〜〜〜〜〜gdbclientと同じなので省略〜〜〜〜〜 echo >|"$OUT_ROOT/gdbclient.cmds" "set solib-absolute-prefix $OUT_SYMBOLS" echo >>"$OUT_ROOT/gdbclient.c…

android gdb debug

$ . build/envsetup.sh $ lunch 12 $ adb shell ps | grep system_server system 404 129 580772 62000 ffffffff 00000000 S system_server $ gdbclient app_process :5039 404 (app_processのPID)$cd ~/JB422R1/ <= 例 初期設定ファイル $cp ./out/target…

gdbinit

title

gdb show solib-search-path

(gdb)show solib-search-path The search path for loading non-absolute shared library symbol files is /home/m_fujii/B2G_nexus/B2G/gecko/objdir-gonk-debug/dist/bin: out/target/product/maguro/symbols/system/lib: out/target/product/maguro/symbo…

b2gプロセス

$ ./run-gdb.sh attach 43 GECKO_PATH = /home/m_fujii/B2G_emu/B2G/gecko B2G_DEBUG = 1 B2G_NOOPT = 1 GECKO_OBJDIR = /home/m_fujii/B2G_emu/B2G/gecko/objdir-gonk-debug Attached; pid = 43 Listening on port 11043 prebuilt/linux-x86/toolchain/arm-…

b2g(FirefoxOS) eclipseでデバッグする方法(その2) eclipseの準備

android gdb debug - のねの日記 コマンドラインのgdbclientの方法を応用し、eclipseでデバッグ - のねの日記 linuxでのgdbclientの使い方 - のねの日記eclipseを起動する。 AndroidのSDKからダウンロードする。 adt-bundle-linux-x86_64-20130219.zipをダウ…

b2g(FirefoxOS) eclipseでデバッグする方法(その1) gdbserverの起動

android gdb debug - のねの日記 コマンドラインのgdbclientの方法を応用し、eclipseでデバッグ - のねの日記 linuxでのgdbclientの使い方 - のねの日記 eclipse用のシンボリックリンクを作成する。 $ cd B2G $ ln -s run-gdb.sh ./run-eclipse.sh gdbserver…

b2g(FirefoxOS) run_gdb.sh attach pid の実行

$ adb shell b2g-ps * daemon not running. starting it now on port 5037 * * daemon started successfully * APPLICATION USER PID PPID VSIZE RSS WCHAN PC NAME b2g root 1472 1 226084 100056 ffffffff 40044140 S /system/b2g/b2g Usage app_1591 1591…

(FirefoxOS)b2g run-gdb.sh

B2G/run-gdb.sh B2G GitHub #!/bin/bash SCRIPT_NAME=$(basename $0) basename ファイル名からディレクトリや末尾の文字列を削除したものを返す . load-config.sh #!/bin/bash if [[ ! -n "$B2G_DIR" ]]; then B2G_DIR=$(cd `dirname $0`; pwd) fi . "$B2G_D…

b2g(FirefoxOS)のemulator.sh

B2G/run-emulator.sh GitHub #!/bin/bash # Get full path from where the script was executed, full path is needed to run emulator succesfully B2G_HOME=$(cd $(dirname $BASH_SOURCE); pwd) . $B2G_HOME/load-config.sh DEVICE=${DEVICE:-generic} TOO…

FirefoxOSのデバッグ

adbが使える。 deviceがofflineのままのときがあった。 $adb devices List of devices attached 016B7E95XXXXXXXX offline FirefoxOSを再起動したら、接続できるようになった。 monitor.batも使えた。 Debugging B2G using gdb

一つの共有ライブラリを、複数のアプリで使用する方法

($NDK_ROOT)\docs\PREBUILTS.htmlより引用 NDK Prebuilt library support: ----------------------------- Android NDK r5 introduced support for prebuilt libraries (shared and static), i.e. the ability to include and use, in your applications, pr…

コマンドラインのgdbclientの方法を応用し、eclipseでC言語のデバッグ

android gdb debug - のねの日記 コマンドラインのgdbclientの方法を応用し、eclipseでデバッグ - のねの日記 linuxでのgdbclientの使い方 - のねの日記 端末側 >adb shell $su #gdbserver :5039 --attach 1984 ※PID=1984とするeclipse側 C++のプロジェクト…

linuxでのgdbclientの使い方

android gdb debug - のねの日記 コマンドラインのgdbclientの方法を応用し、eclipseでデバッグ - のねの日記 linuxでのgdbclientの使い方 - のねの日記ソースをmakeした環境での話です。 gdbのコマンドを打ちたいとき。 PATHや環境変数の準備 . build/envse…

shared library handler failed to enable breakpoint

以下のようなことをやってみたけど、解決しなかった。 shared library handler failed to enable breakpoint これを D:\android-ndk-r7b\build\core\build-binary.mk(357): $(LOCAL_INSTALLED): $(LOCAL_BUILT_MODULE) clean-installed-binaries @$(HOST_ECH…

android C言語 ndk-gdbデバッグ方法のまとめ  How to debug Android C with ndk-gdb

Eclipseでandroid-ndk-r6のJNIをgdbを使ってデバッグする方法 - DRY(日本やアメリカで働くエンジニア日記) How C/C++ Debugging Works on Android | Android blog Using Eclipse for Android C/C++ Debugging | Android blog Sequoyah Project Androidでネ…

手動でgdb

$ ndk-gdb --verbose サーチパスがセットされていても、シンボルが読み込めていない。 (gdb) show solib-search-path .he search path for loading non-absolute shared library symbol files is ./obj/local/armeabi シンボルが読み込めていないときの例 (g…

gdbで"No symbol table is loaded."

*.soのフォルダ位置を確認する。 (gdb) shell ls AndroidManifest.xml assets bin gen jni libs res src (gdb) shell ls ./obj convert-dependencies.sh local (gdb) shell ls ./obj/local armeabi armeabi-v7a (gdb) shell ls ./obj/local/armeabi-v7a app…

ndk-gdbのエラーと治し方

★エラー1 cp: `./libs/armeabi-v7a/gdb.setup' を stat できません: No such file or directory jni/obj/local/armeabi-v7a/gdb.setup:4: Error in sourced command file: Remote communication error: Bad file descriptor. 上のコピーがうまくいかないと…

echo

$GDBCLIENT -x `native_path $GDBSETUP` ECHO[/android-ndk-r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-gdb -x obj/local/armeabi-v7a/gdb.setup] gdb -x obj/local/armeabi-v7a/gdb.setup

warning: shared library handler failed to enable breakpoint

warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. warning: shared library handler failed to enable breakpoint

ndk-gdb Strip --strip-unneeded

Install : libLsEngine.so => libs/armeabi-v7a/libMyLib.so mkdir -p app/libs/armeabi-v7a install -p app/obj/local/armeabi-v7a/libMyLib.so app/libs/armeabi-v7a/libMyLib.so arm-linux-androideabi-strip --strip-unneeded app/libs/armeabi-v7a/libM…

APP_OPTIM

Application.mk APP_ABI := armeabi armeabi-v7a APP_OPTIM := debug #APP_OPTIM := release$(ANDROID_NDK_BASE)/build/core/add-application.mkifeq ($(APP_OPTIM),debug) APP_CFLAGS := -O0 -g $(APP_CFLAGS) else APP_CFLAGS := -O2 -DNDEBUG -g $(APP_CF…