From: "Iyer, Balaji V" <balaji.v.iyer@intel.com>
To: Ian Lance Taylor <iant@google.com>
Cc: "'gcc@gcc.gnu.org'" <gcc@gcc.gnu.org>
Subject: RE: Getting DWARF codes from RTX
Date: Thu, 20 Oct 2011 22:46:00 -0000 [thread overview]
Message-ID: <2950715866004049A240A2F9BB410E7315FB4D1C93@azsmsx502.amr.corp.intel.com> (raw)
In-Reply-To: <mcrlisfmss2.fsf@dhcp-172-18-216-180.mtv.corp.google.com>
Please see my comments embedded with "BVI>"
-----Original Message-----
From: Ian Lance Taylor [mailto:iant@google.com]
Sent: Thursday, October 20, 2011 2:18 PM
To: Iyer, Balaji V
Cc: 'gcc@gcc.gnu.org'
Subject: Re: Getting DWARF codes from RTX
"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.
BVI> Actually what I want is to have a way to go from the rtx value e.g (REG: SI 1 di) to 0x51
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.
BVI> I will look into the loc descriptor. Thank you!
Ian
Thanks,
Balaji V. Iyer.
next prev parent reply other threads:[~2011-10-20 18:38 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
2011-10-20 22:46 ` Iyer, Balaji V [this message]
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=2950715866004049A240A2F9BB410E7315FB4D1C93@azsmsx502.amr.corp.intel.com \
--to=balaji.v.iyer@intel.com \
--cc=gcc@gcc.gnu.org \
--cc=iant@google.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).