From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29995 invoked by alias); 19 Mar 2006 17:24:29 -0000 Received: (qmail 29983 invoked by uid 22791); 19 Mar 2006 17:24:28 -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; Sun, 19 Mar 2006 17:24:26 +0000 Received: by xproxy.gmail.com with SMTP id t15so697851wxc for ; Sun, 19 Mar 2006 09:24:24 -0800 (PST) Received: by 10.70.100.15 with SMTP id x15mr1364819wxb; Sun, 19 Mar 2006 09:24:24 -0800 (PST) Received: by 10.70.126.10 with HTTP; Sun, 19 Mar 2006 09:24:24 -0800 (PST) Message-ID: <8f2776cb0603190924s5f16150ejae5f16d1e5b6009d@mail.gmail.com> Date: Mon, 20 Mar 2006 06:38:00 -0000 From: "Jim Blandy" To: "Der Herr Hofrat" Subject: Re: tracepoint implementation question Cc: gdb@sources.redhat.com In-Reply-To: <200603201711.k2KHB3A16730@hofr.at> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <8f2776cb0603181046x6145eeblc856015b07d3dc91@mail.gmail.com> <200603201711.k2KHB3A16730@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/msg00144.txt.bz2 On 3/20/06, Der Herr Hofrat wrote: > 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 Okay, here's the entry for 'someint': <2><1ae9>: Abbrev Number: 32 (DW_TAG_formal_parameter) DW_AT_name : someint=09 DW_AT_decl_file : 1=09 DW_AT_decl_line : 6=09 DW_AT_type : <1b0b>=09 DW_AT_location : 2 byte block: 91 8 (DW_OP_fbreg: 8) (Quick DWARF intro: the info is a tree; the first number in at the top is the nesting level, so each <2> is the child of the most recent preceding <1>, etc. The <1ae9> is the offset of this entry in the debug data; entries point to others by their offset. So if you find the entry at <1b0b>, you'll find someint's type.) DW_AT_location describes the variable's location, and it is using a DWARF expression, as I guessed. That's why the tracepoint code dosen't know what to do with it. It's a pretty simple expression, though, and one that the existing dwarf2_tracepoint_var_ref code would handle. > 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 GD= B ? > The tracepoint implementation I should do is intended for release under G= PL > so I would like to get it clean from the start. The file gdb/CONTRIBUTE explains how to contribute to GDB. The only thing I'd add is that it's best to work against the current GDB sources: http://sourceware.org/gdb/current/ I've also been finding quilt really handy for breaking a large patch into small, separable units: http://savannah.nongnu.org/projects/quilt