From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19877 invoked by alias); 19 Mar 2006 17:05:44 -0000 Received: (qmail 19868 invoked by uid 22791); 19 Mar 2006 17:05:43 -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; Sun, 19 Mar 2006 17:05:40 +0000 Received: (from root@localhost) by hofr.at (8.10.2/Hofrat's Mail Service V2.2.8bet6-test1) id k2KHB3A16730; Mon, 20 Mar 2006 18:11:03 +0100 From: Der Herr Hofrat Message-Id: <200603201711.k2KHB3A16730@hofr.at> Subject: Re: tracepoint implementation question In-Reply-To: <8f2776cb0603181046x6145eeblc856015b07d3dc91@mail.gmail.com> from Jim Blandy at "Mar 18, 2006 10:46:29 am" To: Jim Blandy Date: Mon, 20 Mar 2006 06:18:00 -0000 CC: gdb@sources.redhat.com 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/msg00143.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. > 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.) > Frist - thanks for the clarification - it would have taken me quite some time to figure that out. Second - the file is on the web at: http://dslab.lzu.edu.cn/hello.readelf If I write up thos functions (no idea yet how hard that will be and if I can actually do it), what would be the procedure to get these changes into GDB ? The tracepoint implementation I should do is intended for release under GPL so I would like to get it clean from the start. thx ! hofrat