This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug server/17373] New: fast tracepoints with local variables captured - reported as "<unavailable>"
- From: "marc.dumais at ericsson dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 11 Sep 2014 13:48:34 +0000
- Subject: [Bug server/17373] New: fast tracepoints with local variables captured - reported as "<unavailable>"
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17373
Bug ID: 17373
Summary: fast tracepoints with local variables captured -
reported as "<unavailable>"
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: server
Assignee: unassigned at sourceware dot org
Reporter: marc.dumais at ericsson dot com
Created attachment 7780
--> https://sourceware.org/bugzilla/attachment.cgi?id=7780&action=edit
source of test program
Hi,
Capturing the value of local variables using fast tracepoints does not seem to
work, at least in my test program (neither in bulk or individually). They are
reported as "<unavailable>". Capturing the same local variables with normal
tracepoints works. In the example below I setup both a fast and a normal
tracepoint, in the same session.
OS: Ubuntu 12.04 AMD64
gdb version: compiled from master branch from 2014-09-10. Also reproduced with
gdb I built from source, release version 7.7 and 7.8
configure options: --with-python --enable-targets="i686-linux-gnu" --with-expat
I will attach to this bug the example program I used and the tracepoint data
file I generated from the session below.
How to reproduce:
Compiling test program (gcc 4.6.3)
gcc -O0 -g3 -Wall -c -o "long1.o" "long1.c"
gcc -L/var/tmp/gdb.7.8/lib/ -o "long1" long1.o -linproctrace
gdbserver:
LD_PRELOAD=/var/tmp/gdb.7.8/lib/libinproctrace.so
/var/tmp/gdb.7.8/bin/gdbserver :9999 /tmp/long/long1
gdb:
/var/tmp/gdb.7.8/bin/gdb /tmp/long/long1
GNU gdb (GDB) 7.8.0.20140910-cvs
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /tmp/long/long1...done.
(gdb) target extended-remote :9999
Remote debugging using :9999
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
0x00007ffff7ddb6b0 in ?? () from /lib64/ld-linux-x86-64.so.2
(gdb) b main
Breakpoint 1 at 0x4005f1: file long1.c, line 16.
(gdb) c
Continuing.
Breakpoint 1, main () at long1.c:16
16 test(10000);
(gdb) ftrace long1.c:10
Fast tracepoint 2 at 0x4005cb: file long1.c, line 10.
(gdb) actions
Enter actions for tracepoint 2, one per line.
End with a line saying just "end".
>collect $locals
>collect $args
>collect $_ret
>collect i
>collect j
>end
(gdb) trace long1.c:9
Tracepoint 3 at 0x4005b4: file long1.c, line 9.
(gdb) actions
Enter actions for tracepoint 3, one per line.
End with a line saying just "end".
>collect $locals
>collect $args
>collect $_ret
>collect i
>collect j
>end
(gdb) tstart
(gdb) c
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x00007ffff78cfdbd in nanosleep () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) tstop
(gdb) tfind
Found trace frame 0, tracepoint 3
#0 test (n=10000) at long1.c:9
9 printf("long1: count: %d\n",i);
(gdb) tdump
Data collected at tracepoint 3, trace frame 0:
i = 0
j = {1, 2, 3, 4}
n = 10000
i = 0
j = {1, 2, 3, 4}
(gdb) tfind
Found trace frame 1, tracepoint 2
10 sleep(1);
(gdb) tdump
Data collected at tracepoint 2, trace frame 1:
i = <unavailable>
j = <unavailable>
n = <unavailable>
i = <unavailable>
j = <unavailable>
(gdb) tfind
Found trace frame 2, tracepoint 3
9 printf("long1: count: %d\n",i);
(gdb) tdump
Data collected at tracepoint 3, trace frame 2:
i = 1
j = {1, 2, 3, 4}
n = 10000
i = 1
j = {1, 2, 3, 4}
(gdb) info tracepoints
Num Type Disp Enb Address What
2 fast tracepoint keep y 0x00000000004005cb in test at long1.c:10
collect $locals
collect $args
collect $_ret
collect i
collect j
installed on target
3 tracepoint keep y 0x00000000004005b4 in test at long1.c:9
collect $locals
collect $args
collect $_ret
collect i
collect j
installed on target
(gdb)
--
You are receiving this mail because:
You are on the CC list for the bug.