Hi Ian,
        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


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.


Thanks,

Balaji V. Iyer.



-----Original Message-----
From: Ian Lance Taylor [mailto:i...@google.com] 
Sent: Thursday, October 20, 2011 2:03 AM
To: Iyer, Balaji V
Cc: 'gcc@gcc.gnu.org'
Subject: Re: Getting DWARF codes from RTX

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

>       Is there a function (or a series of functions) in GCC using which I can 
> convert a register number (either in RTX or int) to DWARF code?

Are you looking for DWARF_FRAME_REGNUM?

If not, what do you mean by DWARF code?  Do you mean inside gcc, or in code 
compiled by gcc?  Please give an example.

Ian

Reply via email to