GDB tracing: No current trace frame -


i trying gdb tracepoints, can't data. start gdbserver following:

$ gdbserver :1234 ./a.out  process ./a.out created; pid = 13610 listening on port 1234 

i use following commands on client:

$ gdb ./a.out ... reading symbols /home/simark/src/test/a.out...done. (gdb) target remote :1234 remote debugging using :1234 reading symbols /lib64/ld-linux-x86-64.so.2...done. reading symbols /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.15.so...done. loaded symbols /lib64/ld-linux-x86-64.so.2 0x00007ffff7ddb6c0 in _start () /lib64/ld-linux-x86-64.so.2 (gdb) l 1   #include <stdio.h> 2   int foo(int a, int b) { 3       return + b + b; 4   } 5    6   int main() { 7       int n = foo(33, 4); 8       printf("%d\n", n); 9       return 0; 10  } (gdb) trace 3 tracepoint 1 @ 0x400526: file test.c, line 3. (gdb) b 9 breakpoint 2 @ 0x400563: file test.c, line 9. (gdb) actions 1 enter actions tracepoint 1, 1 per line. end line saying "end". >collect $regs,$args >end (gdb) tstart (gdb) c continuing.  breakpoint 2, main () @ test.c:9 9       return 0; (gdb) tstop (gdb) tdump warning: no current trace frame. (gdb) 

according examples saw on web, should have 1 event, because control passed on tracepoint. ideas why no data?

according examples saw on web, should have 1 event, because control passed on tracepoint.

you forgot tfind start before doing tdump. help tdump:

print collected @ current tracepoint. 

but not stopped @ tracepoint, stopped @ breakpoint#2.

the tfind start selects first trace frame in trace buffer.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -