xlate_pro_add_reg_info(3E)

xlate_pro_add_reg_info - Adds register change information

As shipped in IRIX 6.5.7. Last changed in IRIX 6.5.5.

NAME
     xlate_pro_add_reg_info - Adds register change information

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

     int xlate_pro_add_reg_info(xlate_table_pro pro_table_ptr,
       Dwarf_Small op,
       Dwarf_Unsigned val1,
       Dwarf_Unsigned val2
     );

IMPLEMENTATION
     IRIX systems

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)
     usually) can use the registers for its own purposes.  pro_table_ptr
     must be a valid open producer translate table handle.

     op      Pass in a frame operation code in the set allowed.  An example
             is DW_CFA_offset_extended.  Makes no difference if op is an
             extended op code or not.

     val1    Value whose meaning depends on op.

     val2    Value whose meaning depends on op.

     A typical use for pixie would be to first set the CFA using
     DW_CFA_offset_extended.  Name the register or location to use as a
     base address.  Then set up a rule for each particular register using,
     for example, DW_CFA_offset orDW_CFA_offset_extended, giving the
     particular offset of the shadow register value.  The following is an
     example:

          result = xlate_pro_add_reg_info(pro_table_ptr,
            DW_CFA_def_cfa,
             DW_FRAME_REG8, /* r8 is our base reg */
             0);
          result = xlate_pro_add_reg_info(pro_table_ptr,
            DW_CFA_offset_extended,
             DW_FRAME_REG31, /* r31 usurped by pixie */
             r31_offset);
          result = xlate_pro_add_reg_info(pro_table_ptr,
            DW_CFA_offset_extended,
             DW_FRAME_REG17, /* r17 usurped by pixie */
             r17_offset);

THREAD SAFETY
     The xlate functions are thread safe.  This means that if distinct
     xlate_table_con and xlate_table_pro handles are used in distinct
     threads to call xlate functions simultaneously in multiple threads,
     the threads will not interfere.

     However, using a particular xlate_table_con handle or a particular
     xlate_table_pro handle to call xlate functions simultaneously in
     multiple threads is not supported and may cause unpredictable results.

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 through the pointer arguments which would return
     values on successful call (values might have been changed through
     these pointers but any such changes are not meaningful).

     The following error codes may be returned:

     XLATE_TB_STATUS_INVALID_TABLE
             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 by pro_table_ptr.

     XLATE_TB_STATUS_ADD_TOO_LATE
             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
             The register number passed in will not fit using the
             particular op used in the call.

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

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

SEE ALSO
     xlate_pro_init(3e), xlate_pro_finish(3e)

     xlate(4)

     libelfutil(5)

     DWARF Debugging Information Format (Version 2)

     This man page is available only online.