public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: "Iyer\, Balaji V" <balaji.v.iyer@intel.com>
Cc: "'gcc\@gcc.gnu.org'" <gcc@gcc.gnu.org>
Subject: Re: Getting DWARF codes from RTX
Date: Thu, 20 Oct 2011 21:11:00 -0000	[thread overview]
Message-ID: <mcrlisfmss2.fsf@dhcp-172-18-216-180.mtv.corp.google.com> (raw)
In-Reply-To: <2950715866004049A240A2F9BB410E7315FB115F5C@azsmsx502.amr.corp.intel.com>	(Balaji V. Iyer's message of "Thu, 20 Oct 2011 06:53:31 -0700")

"Iyer, Balaji V" <balaji.v.iyer@intel.com> writes:

> 	What I want to do is to look at certain function calls and mark them with a special label and then create a table  with a specialized section with contains the label name, the function name (as ascii string) and then the dwarf code of the register (assuming the parameters can be passed in through registers, otherwise the stack address location) in which the parameters for the function is stored. (Please note that this is something that is customized for another package and I don't have much leeway on how to store this information)
>
> Eg.
>
> If you have:   
> some_func_call (x, y, z)
>
> We will have an assembly like this
>
> 	Set R1, x
> 	Set R2, y
> 	Set R3, z
> LABEL_X:                        <=== SOMETHING I PUT IN
> 	Call some_func_call
>
>
> In my data section I would have something like this:
>
> LABEL_X 
> some_func_call
> DW_OP_REG1, DW_OP_REG2, DW_OP_REG3

OK, I think I mostly understand all that.

> So, I need the equivalent dwarf code (in hex) for DW_OP_REG1, DW_OP_REG2 and DW_OP_REG3, so that a dwarf decoder can decode it correctly.

I'm not sure I understand that.  The code for DW_OP_reg1 is 0x51, as you
can see in include/dwarf2.h.  But I don't think that is what you mean.

It sounds like you might be asking for a way to get the DWARF
representation of the argument locations of the function call.  See
loc_descriptor in gcc/dwarf2out.c.

Ian

  parent reply	other threads:[~2011-10-20 18:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-20  5:43 Iyer, Balaji V
2011-10-20  8:13 ` Ian Lance Taylor
2011-10-20 14:41   ` Iyer, Balaji V
2011-10-20 18:59     ` Michael Eager
2011-10-20 21:11     ` Ian Lance Taylor [this message]
2011-10-20 22:46       ` Iyer, Balaji V
2011-10-21  6:09         ` Ian Lance Taylor

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=mcrlisfmss2.fsf@dhcp-172-18-216-180.mtv.corp.google.com \
    --to=iant@google.com \
    --cc=balaji.v.iyer@intel.com \
    --cc=gcc@gcc.gnu.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).