Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Jim Blandy" <jimb@red-bean.com>
To: "Der Herr Hofrat" <der.herr@hofr.at>
Cc: gdb@sources.redhat.com
Subject: Re: tracepoint implementation question
Date: Mon, 20 Mar 2006 06:38:00 -0000	[thread overview]
Message-ID: <8f2776cb0603190924s5f16150ejae5f16d1e5b6009d@mail.gmail.com> (raw)
In-Reply-To: <200603201711.k2KHB3A16730@hofr.at>

On 3/20/06, Der Herr Hofrat <der.herr@hofr.at> 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	
     DW_AT_decl_file   : 1	
     DW_AT_decl_line   : 6	
     DW_AT_type        : <1b0b>	
     DW_AT_location    : 2 byte block: 91 8 	(DW_OP_fbreg: 8)

(Quick DWARF intro: the info is a tree; the first number in <angle
brackets> 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 GDB ?
> The tracepoint implementation I should do is intended for release under GPL
> 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


      reply	other threads:[~2006-03-19 17:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-18 11:19 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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8f2776cb0603190924s5f16150ejae5f16d1e5b6009d@mail.gmail.com \
    --to=jimb@red-bean.com \
    --cc=der.herr@hofr.at \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox