From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8571 invoked by alias); 18 Mar 2006 10:18:45 -0000 Received: (qmail 8561 invoked by uid 22791); 18 Mar 2006 10:18:44 -0000 X-Spam-Check-By: sourceware.org Received: from chello212017098056.surfer.at (HELO hofr.at) (212.17.98.56) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 18 Mar 2006 10:18:42 +0000 Received: (from root@localhost) by hofr.at (8.10.2/Hofrat's Mail Service V2.2.8bet6-test1) id k2JAOGh02932 for gdb@sources.redhat.com; Sun, 19 Mar 2006 11:24:16 +0100 From: Der Herr Hofrat Message-Id: <200603191024.k2JAOGh02932@hofr.at> Subject: tracepoint implementation question To: gdb@sources.redhat.com Date: Sat, 18 Mar 2006 11:19:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00138.txt.bz2 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