4

arm 用に gdbserver 7.6 を次のようにコンパイルしました。

cd /gdb-7.6-src/gdb/gdbserver
./configure --target=arm-linux --host=arm-linux
make CC=/path/to/cross-compiler-gcc

次に、arm 用に gdb 7.6 を次のようにコンパイルしました。

cd /gdb-7.6-src/
./configure --target=arm-linux --prefix=/opt/gdb-arm/install/
make && make install

簡単なアプリケーションを次のようにコンパイルしました。

/path/to/cross-compiler-gcc hello.c -g -o hello

gdbserver とクロスコンパイルしたアプリケーションをボードにコピーしました。私のPC(x86-pc-linux)から次を実行します:

gdb hello
(gdb) set target-async on
(gdb) tvariable $c
(gdb) actions
>teval $c=$c+1
>end
(gdb) break main
(gdb) target remote <ipaddr>:<port>
[Thread 1585] #1 stopped.
0x40000800 in ?? ()
Cannot access memory at address 0x0
(gdb) continue &
(gdb) tstart
Target does not support this command.
(gdb) tstatus
Target does not support this command.

動作はtstartコマンドまでは「正常」です。アプリケーションを必要に応じてデバッグできますが、アプリのトレースを開始できません。

問題は、gdbserver は arm のトレースポイントをサポートするのか、それとも x86/amd_64 のみをサポートするのかということです。

4

1 に答える 1

0

私は同じことを検索していました.GDBオンラインドキュメントのwebdocで見つけたものは、現在どのArchでもサポートされていません.

詳細を確認してください: https://sourceware.org/gdb/onlinedocs/gdb/Tracepoints.html

引用:

この機能はリモート スタブに実装されています。ただし、この記事の執筆時点では、GDB で配布されるスタブはトレースポイントをサポートしていません。

于 2014-06-09T14:58:25.320 に答える