Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gdb 设置跟踪点,但无法找到tfind显示的跟踪数据;目标无法找到请求的跟踪帧。”;_Gdb - Fatal编程技术网

Gdb 设置跟踪点,但无法找到tfind显示的跟踪数据;目标无法找到请求的跟踪帧。”;

Gdb 设置跟踪点,但无法找到tfind显示的跟踪数据;目标无法找到请求的跟踪帧。”;,gdb,Gdb,我在下面编写了一个非常小的程序来添加两个整数,只是为了检查跟踪点的使用情况 1 #include<stdio.h> 2 main(){ 3 int x,y,sum; 4 x = 3; 5 y = 4; 6 sum = x + y; 7 printf("sum = %d\n",sum); 8 } 在另一个终端上,我以以下方式运行gdb: $ gdb -ex 'target remote :1

我在下面编写了一个非常小的程序来添加两个整数,只是为了检查跟踪点的使用情况

1 #include<stdio.h>
2 main(){
3         int x,y,sum;
4         x = 3;
5         y = 4;
6         sum = x + y;
7         printf("sum = %d\n",sum);
8 }       
在另一个终端上,我以以下方式运行gdb:

$ gdb -ex 'target remote :10000' ./chk
然后执行以下步骤,如下所示:

(gdb) trace chk.c:6
Tracepoint 1 at 0x80483fd: file chk.c, line 6.

(gdb) passcount 1 1
Setting tracepoint 1's passcount to 1

(gdb) actions 1
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".

>collect $regs
>end
(gdb) tstart
(gdb) tstatus
Trace is running on the target.
Collected 0 trace frames.
Trace buffer has 5242880 bytes of 5242880 bytes free (0% full).
Trace will stop if GDB disconnects.
Not looking at any trace frame.

(gdb) tstop
(gdb) tfind
Target failed to find requested trace frame.

(gdb) tdump
warning: No current trace frame.
有人能告诉我为什么tstatus、tfind和tdump会给我这样的输出吗?这里的问题是什么?如何检查跟踪的值(我在这里以$regs的形式给出)

为什么tstatus、tfind和tdump会给我这样的输出

连接GDB时,低级(正在调试)进程将在
\u start
中停止(即尚未到达
main

使用
tstart
启动跟踪实验后,需要继续执行次跟踪,使其到达跟踪点,并自动停止跟踪(使用
continue
GDB命令)

相反,您将立即停止实验(使用
tstop
),这将导致空跟踪

为什么tstatus、tfind和tdump会给我这样的输出

连接GDB时,低级(正在调试)进程将在
\u start
中停止(即尚未到达
main

使用
tstart
启动跟踪实验后,需要继续执行次跟踪,使其到达跟踪点,并自动停止跟踪(使用
continue
GDB命令)

相反,您将立即停止实验(使用
tstop
),这将导致空跟踪

(gdb) trace chk.c:6
Tracepoint 1 at 0x80483fd: file chk.c, line 6.

(gdb) passcount 1 1
Setting tracepoint 1's passcount to 1

(gdb) actions 1
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".

>collect $regs
>end
(gdb) tstart
(gdb) tstatus
Trace is running on the target.
Collected 0 trace frames.
Trace buffer has 5242880 bytes of 5242880 bytes free (0% full).
Trace will stop if GDB disconnects.
Not looking at any trace frame.

(gdb) tstop
(gdb) tfind
Target failed to find requested trace frame.

(gdb) tdump
warning: No current trace frame.