Dwarves Archive on lore.kernel.org
 help / color / Atom feed
From: Bart Trojanowski <bart-LIbhotJ4rFdeoWH0uzbU5w@public.gmane.org>
To: dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: extracting data access from functions
Date: Tue, 27 Jan 2009 10:11:25 -0500
Message-ID: <20090127151124.GA18307@jukie.net> (raw)

I am trying to do some data mining on a large code base.  I would like
to generate a list of structure members accessed by certain functions.

After studying the examples in the pahole.git tree, I am able to walk
the dwarves structures down to the right tags.  However, I am not sure
how to make the next step.

For example, given

void foo(struct s *s)
        ... s->var ...

I would like to have a tool that reports foo accessing s->var.

Is that possible with the DWARF debug tags?  Maybe using elftools?  I am
trying to avoid the temptation of parsing the C code in perl :)

Thanks in advance.


				WebSig: http://www.jukie.net/~bart/sig/
To unsubscribe from this list: send the line "unsubscribe dwarves" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-27 15:11 Bart Trojanowski [this message]
     [not found] ` <20090127151124.GA18307-LIbhotJ4rFdeoWH0uzbU5w@public.gmane.org>
2009-01-27 15:27   ` Arnaldo Carvalho de Melo
     [not found]     ` <20090127152724.GB27308-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2009-01-27 15:52       ` Bart Trojanowski
     [not found]         ` <20090127155221.GD18307-LIbhotJ4rFdeoWH0uzbU5w@public.gmane.org>
2009-01-27 16:01           ` Arnaldo Carvalho de Melo
     [not found]             ` <20090127160133.GB15877-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2009-01-27 16:26               ` Bart Trojanowski
     [not found]                 ` <20090127162633.GF18307-LIbhotJ4rFdeoWH0uzbU5w@public.gmane.org>
2009-01-27 23:07                   ` Roland McGrath

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:

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

  git send-email \
    --in-reply-to=20090127151124.GA18307@jukie.net \
    --to=bart-libhotj4rfdeowh0uzbu5w@public.gmane.org \
    --cc=dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Dwarves Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dwarves/0 dwarves/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dwarves dwarves/ https://lore.kernel.org/dwarves \
	public-inbox-index dwarves

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git