From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23121 invoked by alias); 18 Mar 2006 18:46:33 -0000 Received: (qmail 23109 invoked by uid 22791); 18 Mar 2006 18:46:32 -0000 X-Spam-Check-By: sourceware.org Received: from xproxy.gmail.com (HELO xproxy.gmail.com) (66.249.82.196) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 18 Mar 2006 18:46:31 +0000 Received: by xproxy.gmail.com with SMTP id s7so696113wxc for ; Sat, 18 Mar 2006 10:46:29 -0800 (PST) Received: by 10.70.105.5 with SMTP id d5mr755025wxc; Sat, 18 Mar 2006 10:46:29 -0800 (PST) Received: by 10.70.126.10 with HTTP; Sat, 18 Mar 2006 10:46:29 -0800 (PST) Message-ID: <8f2776cb0603181046x6145eeblc856015b07d3dc91@mail.gmail.com> Date: Sun, 19 Mar 2006 17:24:00 -0000 From: "Jim Blandy" To: "Der Herr Hofrat" Subject: Re: tracepoint implementation question Cc: gdb@sources.redhat.com In-Reply-To: <200603191024.k2JAOGh02932@hofr.at> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200603191024.k2JAOGh02932@hofr.at> 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/msg00142.txt.bz2 Actually, I think the problem you're running into is that the debugging information in your executable is using Dwarf location expressions to describe where the variables live, and the tracepoint code isn't using the supplied functions to translate between Dwarf location expressions and tracepoint bytecodes. "Symbol class 21" is LOC_COMPUTED_ARG; the tracepoint code ought to be calling the 'tracepoint_var_ref' function in the symbol's 'struct symbol_ops' structure. Probably we need a new function gen_trace_for_symbol in ax-gdb.c, analogous to gen_trace_for_expr.=20 Depending on the exact expression at hand, dwarf2_tracepoint_var_ref may need to be expanded. You're right, to some extent this indicates a lack of active maintenance. When the tracepoint code was written, few variables used Dwarf expressions; now it is much more common. Could you post the result of running 'readelf -wi' on your test program (the one with 'someint' in it)? (If the output is very large, put it on the web and post a link.)