Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xlate_pro_add_reg_info(3E) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

libelfutil(5)

xlate(4)

xlate_pro_init(3e)

xlate_pro_finish(3e)



XLATEPROADDREGINFO(3E)                          XLATEPROADDREGINFO(3E)



NAME
     xlateproaddreginfo - add register change information

SYNOPSIS
     #include <elf.h>
     #include <libelf.h>
     #include <dwarf.h>
     #include <libdwarf.h>
     #include <cmplrs/xlate.h>
     #include <libXlate.h>

int xlateproaddreginfo(xlatetablepro protableptr,
DwarfSmall op,
DwarfUnsigned val1,
DwarfUnsigned val2
);
DESCRIPTION
xlate_pro_add_reg_info is used to put register information into the xlate
data stream. The register information normally specifies how a debugger
or other tool can get to registers which have been copied into shadow
register locations so a transforming tool (pixie(1) normally) can use the
registers for its own purposes. pro_table_ptr must be a valid open
producer translate table handle.
op Pass in an frame operation code in the set allowed. An example
is DW_CFA_offset_extended. Makes no difference if the op is an
extended op code or not (see section 6.4 of the DWARF document).
The arguments val1 and val2 are the "arguments" as described by
section 6.4.2 of the DWARF document.
val1 Is a value whose meaning depends on op . (see section 6.4 of the
DWARF document).
val2 Is a value whose meaning depends on op . (see section 6.4 of the
DWARF document).
A typical use for pixie would be to first set the CFA using
DW_CFA_offset_extended and naming the register or location to use as a
base address and then set up a rule for each particular register using,
for example, DW_CFA_offset orDW_CFA_offset_extended and giving the
particular offset of the shadow register value.
An example follows:
Page 1


XLATEPROADDREGINFO(3E)                          XLATEPROADDREGINFO(3E)



          result = xlateproaddreginfo(protableptr,
            DWCFAdefcfa,
             DWFRAMEREG8, /* r8 is our base reg */
             0);
          result = xlateproaddreginfo(protableptr,
            DWCFAoffsetextended,
             DWFRAMEREG31, /* r31 usurped by pixie */
             r31offset);
          result = xlateproaddreginfo(protableptr,
            DWCFAoffsetextended,
             DWFRAMEREG17, /* r17 usurped by pixie */
             r17offset);

FILES
     /usr/include/libXlate.h
     /usr/include/cmplrs/xlate.h
     /usr/include/elf.h
     /usr/include/dwarf.h
     /usr/include/libdwarf.h
     /usr/lib/libelfutil.a

DIAGNOSTICS
     Returns XLATE_TB_STATUS_NO_ERROR (0) on success.  In case of error, a
     negative number is returned indicating the error.  In case of error,
     nothing is returned thru the pointer arguments which would return values
     on successful call (values might have been changed thru these pointers
     but any such changes are not meaningful).

     Error codes that may be returned:

     XLATE_TB_STATUS_INVALID_TABLE
             means that the pro_table_ptr is not a valid open producer handle.
             Or it might mean there has been some malloc arena corruption or
             other application bug leading to overwriting of the first 4 bytes
             of the data pointed at by pro_table_ptr.

     XLATE_TB_STATUS_ADD_TOO_LATE
             means that the call has occurred after a call to
             xlate_pro_disk_header which is not allowed.  call
             xlate_pro_add_reg_info before calling xlate_pro_disk_header.

     XLATE_TB_STATUS_BAD_REG_VAL
             means that the register number passed in will not fit using the
             particular op used in the call.

     XLATE_TB_STATUS_ALLOC_FAIL
             means realloc(3) failed when adding the requested register
             operation.

     XLATE_TB_STATUS_BAD_REG_OP
             means the op passed in is not one of the set of frame operations
             supported by xlate_pro_add_reg_info.



                                                                        Page 2





XLATEPROADDREGINFO(3E)                          XLATEPROADDREGINFO(3E)



SEE ALSO
     libelfutil(5), xlate(4), xlate_pro_init(3e), xlate_pro_finish(3e) DWARF
     Debugging Information Format (Version 2)




















































                                                                        Page 3



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026