我正在尝试获取 GDB 跟踪,如另一个问题中所述。 为了完整起见,我在一个终端上运行:
$ gdbserver :1234 ./a.out
Process ./a.out created; pid = 13610
Listening on port 1234
另一位(客户):
$ gdb ./a.out
...
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Reading symbols from ./a.out...
(gdb) target remote :1234
Remote debugging using :1234
Reading /lib64/ld-linux-x86-64.so.2 from remote target...
warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
Reading /lib64/ld-linux-x86-64.so.2 from remote target...
Reading symbols from target:/lib64/ld-linux-x86-64.so.2...
Reading symbols from /usr/lib/debug/.build-id/45/87364908de169dec62ffa538170118c1c3a078.debug...
0x00007ffff7fd0100 in _start () from target:/lib64/ld-linux-x86-64.so.2
(gdb) trace 3
Tracepoint 1 at 0x555555555157: file ../test/main.cpp, line 3.
(gdb) b 9
Breakpoint 2 at 0x55555555519a: file ../test/main.cpp, line 9.
(gdb) actions 1
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".
>collect $regs,$args
>end
(gdb) tstart
(gdb) c
这就是它与其他问题的不同之处,当我想继续到 9 处的断点时,我收到错误:
Continuing.
Reading /lib/x86_64-linux-gnu/libc.so.6 from remote target...
Target returns error code '01'.
我尝试了整个实验没有跟踪点,并且继续命令工作正常。
当然,我尝试用谷歌搜索错误代码 01,但似乎很通用,所以我无法得出任何结论。知道可能出了什么问题吗?