Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* tracepoint implementation question
@ 2006-03-18 11:19 Der Herr Hofrat
  2006-03-19 17:24 ` Jim Blandy
  0 siblings, 1 reply; 4+ messages in thread
From: Der Herr Hofrat @ 2006-03-18 11:19 UTC (permalink / raw)
  To: gdb


HI !

 I'm playing with tracepoints and ran across a problem with the actions.

 I added the basic package handling as a set of dummy routines that basically
 print information for now only + a dummy handler that just prints when it
 got called. The test code on the target is:

void junk2(int *someint){
        int junk=1;
        printf("got %d (%d)\n",*someint,junk);
}

main(){
        int i=0;
        while(i<4){
                junk2(&i);
                sleep(1);
                i++;
        }
        return 0;
}


This basically is working

Host:
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
0x400007b0 in ?? ()
(gdb) symbol-file gdbserver/hello
Reading symbols from /root/tracepoints/gdb-6.3-tp1/gdb/gdbserver/hello...done.
(gdb) trace junk2
Tracepoint 1 at 0x80483df: file hello.c, line 8.
(gdb) actions
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".
> collect $regs
> end
(gdb) tstart
(gdb) c
Continuing.

Program exited normally.
(gdb)

Target:
received pkt (QTinit)
Q packet received (QTinit)
received pkt (QTDP:1:080483df:E:0:0-)
Q packet received (QTDP:1:080483df:E:0:0-)
tracepoint data (QTDP:1:080483df:E:0:0-)
tp request 1 at address 80483df (state: 1)
received pkt (QTDP:-1:080483df:R03FFFFFFFFFF)
Q packet received (QTDP:-1:080483df:R03FFFFFFFFFF)
tracepoint data (QTDP:-1:080483df:R03FFFFFFFFFF)
packet data tc 1: (R03FFFFFFFFFF)
continuation for tp 1 at address 80483df
received pkt (QTStart)
Q packet received (QTStart)
tracepoint start (QTStart)
received pkt (vCont?)
received pkt (vCont;c)
tp breakpoint triggert at 80483df
got 0 (1)
tp breakpoint triggert at 80483df
got 1 (1)
...

 Now I started adding the different actions and found that only 
 "collect $regs" seems to be supported/working on the host side.
 I get the register array and could now collect it in the handler 
 that is called - but if I try anything else like:

(gdb) actions 1
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".
> collect someint
> end
(gdb) tstart
someint: don't know symbol class 21
(gdb)

no packet is obviously sent to the target - the same for args

(gdb) actions 1
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".
> collect $args
> end
(gdb) tstart
warning: don't know how to trace local symbol someint
warning: No args found in scope.
(gdb)

The tracepoint is set but no information on the object to collect is sent
to the target.

Is there any docs on the details of tracepoints ? 
is this part of the gdb code actually actively maintained or am I wasting my 
time trying to get this to work ? 
Is there any further information on tracepoints available other than the 
protocol/packet spec - some sort of design doc ?

thx !
hofrat


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-03-19 17:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-18 11:19 tracepoint implementation question Der Herr Hofrat
2006-03-19 17:24 ` Jim Blandy
2006-03-20  6:18   ` Der Herr Hofrat
2006-03-20  6:38     ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox