Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
libXlate.h File Reference
#include <libelf.h>
#include <dwarf.h>
#include <libdwarf.h>
Include dependency graph for libXlate.h:

Go to the source code of this file.

Classes

struct  xlate_block_s
struct  xlate_reg_instr_s
struct  xlate_reg_instr2_s

Defines

#define _XLATE_TABLEKIND_DEF
#define XLATE_OPEN_STD_TABLE   0
#define XLATE_OPEN_DEBUG_TABLE   1
#define XLATE_ADDRESS_INPUT_NEW_ADDRESS   1
#define XLATE_ADDRESS_INPUT_OLD_ADDRESS   0
#define XLATE_PRO_STANDARD_SETUP   1
#define XLATE_PRO_DEBUG_SETUP   2
#define XLATE_TB_STATUS_NO_ERROR   0
#define XLATE_TB_STATUS_ALLOC_FAIL   -1
#define XLATE_TB_STATUS_NULL_TABLE   -2
#define XLATE_TB_STATUS_BAD_TABLEKIND   -3
#define XLATE_TB_STATUS_BAD_ADD_ADDR   -4
#define XLATE_TB_STATUS_RET_ADDR_NULL   -6
#define XLATE_TB_STATUS_NO_MORE_BLOCKS   -7
#define XLATE_TB_STATUS_NOT_YET_IMPLEMENT   -8
#define XLATE_TB_STATUS_NO_DEBUG   -9
#define XLATE_TB_STATUS_ALREADY_DONE   -10
#define XLATE_TB_STATUS_ADDR_UNALIGNED   -11
#define XLATE_TB_STATUS_RANGE_BAD   -12
#define XLATE_TB_STATUS_FSTAT_ERROR   -13
#define XLATE_TB_STATUS_MMAP_ERROR   -14
#define XLATE_TB_STATUS_BAD_VERSION   -15
#define XLATE_TB_STATUS_NULL_HEADER   -16
#define XLATE_TB_STATUS_NO_HEADER   -17
#define XLATE_TB_STATUS_BAD_FILE_SIZE   -18
#define XLATE_TB_STATUS_NEW_ADDR_ERROR   -19 /* unused */
#define XLATE_TB_STATUS_DECODE_ERROR   -20
#define XLATE_TB_STATUS_BAD_BLOCK_INDEX   -21
#define XLATE_TB_STATUS_UPPER_ADDR_BAD   -22
#define XLATE_TB_STATUS_TABLE_NOT_PO   -23
#define XLATE_TB_STATUS_MUNMAP_ERROR   -24
#define XLATE_TB_STATUS_ELF_IDENT_BAD   -25
#define XLATE_TB_STATUS_ELF_SHDR_BAD   -26
#define XLATE_TB_STATUS_NO_XLATE   -27
#define XLATE_TB_STATUS_NO_XLATE_DATA   -28
#define XLATE_TB_STATUS_XLATE_BAD   -29
#define XLATE_TB_STATUS_XLATE_DEBUG_BAD   -30
#define XLATE_TB_STATUS_ELF_VERSION_BAD   -31
#define XLATE_TB_STATUS_ELF_BEGIN_BAD   -32
#define XLATE_TB_STATUS_NOT_ELF   -33
#define XLATE_TB_STATUS_OLD_ADDR_ERROR   -34 /* unused */
#define XLATE_TB_STATUS_ADD_TOO_LATE   -35
#define XLATE_TB_STATUS_BAD_REG_VAL   -36
#define XLATE_TB_STATUS_BAD_REG_OP   -37
#define XLATE_TB_STATUS_BAD_FRAME_OP   -38
#define XLATE_TB_STATUS_NO_REG_INFO   -39
#define XLATE_TB_STATUS_SECTION_TOO_BIG   -42
#define XLATE_TB_STATUS_INVALID_TABLE   -43
#define XLATE_TB_STATUS_SECTION_TOO_SMALL   -44
#define XLATE_TB_STATUS_INCONSISTENT_64_BIT_INFO   -45
#define XLATE_TB_STATUS_NO_SUCH_ADDR_IN_TABLE   -46
#define XLATE_TB_STATUS_INVALID_BLOCK_INDEX   -47
#define XLATE_TB_STATUS_REG_REQUEST_BOGUS   -48
#define XLATE_TB_STATUS_PRO_CON_TABLE_MISMATCH   -59
#define XLATE_TB_STATUS_PRO_REQ_INVALID   -50
#define XLATE_TB_STATUS_BLOCK_REQ_SEQ_ERR   -51
#define XLATE_TB_STATUS_FRAME_RESTORE_INVALID   -52
#define XLATE_TB_STATUS_UNEQUAL_RANGE   -53
#define XLATE_TB_STATUS_INVALID_PO_INPUT   -54
#define XLATE_TB_STATUS_INVALID_SEQUENCE   -55
#define XLATE_TB_STATUS_ELF_EHDR_BAD   -56
#define XLATE_TB_STATUS_ELF_STRPTR_BAD   -57

Typedefs

typedef struct xlate_table_con_s * xlate_table_con
typedef struct xlate_table_pro_s * xlate_table_pro
typedef struct xlate_block_s xlate_block
typedef struct xlate_reg_instr_s xlate_reg_instr
typedef struct xlate_reg_instr2_s xlate_reg_instr2

Enumerations

enum  xlate_tablekind { xlate_tk_general, xlate_tk_preserve_size, xlate_tk_preserve_order }

Functions

int xlate_init_fd (int, int, xlate_table_con *)
int xlate_init_elf (Elf *, int, xlate_table_con *)
int xlate_named_init_fd (int, const char *, xlate_table_con *)
int xlate_named_init_elf (Elf *, const char *, xlate_table_con *)
int xlate_get_info (xlate_table_con, Elf64_Sxword *, Elf64_Addr *, Elf64_Addr *, Elf64_Addr *, Elf64_Addr *, Elf64_Addr *, Elf64_Addr *, Elf64_Xword *, int *, int *, int *, xlate_tablekind *, int *)
int xlate_address (xlate_table_con, int, Elf64_Addr, Elf64_Addr *, xlate_block *)
int xlate_get_reg_rule (xlate_table_con, Elf64_Addr, Elf32_Word, Elf32_Word *, Elf64_Xword *, Elf32_Word *)
int xlate_get_all_reg_rules (xlate_table_con, Elf64_Addr, Dwarf_Regtable *)
int xlate_expand_reg_info (xlate_table_con, Elf64_Xword *, xlate_reg_instr **)
int xlate_expand_reg_info2 (xlate_table_con, Elf64_Xword *, xlate_reg_instr2 **)
int xlate_finish (xlate_table_con)
int _xlate_fix_addresses_for_dso_movement (void *pxlate, unsigned long long len, unsigned long long movement)
int xlate_pro_init (xlate_table_pro *, xlate_tablekind, xlate_table_con, int)
int xlate_pro_add_info (xlate_table_pro, Elf64_Sxword, Elf64_Addr, Elf64_Addr, Elf32_Word, Elf32_Word)
int xlate_pro_add_reg_info (xlate_table_pro, Dwarf_Small, Dwarf_Unsigned, Dwarf_Unsigned)
int xlate_pro_add_range (xlate_table_pro, Elf64_Addr, Elf64_Xword, Elf64_Addr, Elf64_Xword)
int xlate_pro_disk_header (xlate_table_pro, int, Elf64_Xword *, Elf64_Xword *)
int xlate_pro_disk_next_block (xlate_table_pro, char **, Elf64_Xword *)
int xlate_pro_finish (xlate_table_pro)

Define Documentation

Definition at line 61 of file libXlate.h.

Definition at line 150 of file libXlate.h.

Definition at line 151 of file libXlate.h.

#define XLATE_OPEN_DEBUG_TABLE   1

Definition at line 117 of file libXlate.h.

#define XLATE_OPEN_STD_TABLE   0

Definition at line 116 of file libXlate.h.

#define XLATE_PRO_DEBUG_SETUP   2

Definition at line 273 of file libXlate.h.

#define XLATE_PRO_STANDARD_SETUP   1

Definition at line 272 of file libXlate.h.

#define XLATE_TB_STATUS_ADD_TOO_LATE   -35

Definition at line 333 of file libXlate.h.

Definition at line 307 of file libXlate.h.

#define XLATE_TB_STATUS_ALLOC_FAIL   -1

Definition at line 297 of file libXlate.h.

#define XLATE_TB_STATUS_ALREADY_DONE   -10

Definition at line 305 of file libXlate.h.

Definition at line 300 of file libXlate.h.

Definition at line 318 of file libXlate.h.

Definition at line 314 of file libXlate.h.

#define XLATE_TB_STATUS_BAD_FRAME_OP   -38

Definition at line 336 of file libXlate.h.

#define XLATE_TB_STATUS_BAD_REG_OP   -37

Definition at line 335 of file libXlate.h.

#define XLATE_TB_STATUS_BAD_REG_VAL   -36

Definition at line 334 of file libXlate.h.

Definition at line 299 of file libXlate.h.

#define XLATE_TB_STATUS_BAD_VERSION   -15

Definition at line 311 of file libXlate.h.

Definition at line 348 of file libXlate.h.

#define XLATE_TB_STATUS_DECODE_ERROR   -20

Definition at line 316 of file libXlate.h.

Definition at line 330 of file libXlate.h.

#define XLATE_TB_STATUS_ELF_EHDR_BAD   -56

Definition at line 353 of file libXlate.h.

Definition at line 322 of file libXlate.h.

#define XLATE_TB_STATUS_ELF_SHDR_BAD   -26

Definition at line 323 of file libXlate.h.

Definition at line 354 of file libXlate.h.

Definition at line 329 of file libXlate.h.

Definition at line 349 of file libXlate.h.

#define XLATE_TB_STATUS_FSTAT_ERROR   -13

Definition at line 309 of file libXlate.h.

Definition at line 342 of file libXlate.h.

Definition at line 344 of file libXlate.h.

Definition at line 351 of file libXlate.h.

Definition at line 352 of file libXlate.h.

Definition at line 340 of file libXlate.h.

#define XLATE_TB_STATUS_MMAP_ERROR   -14

Definition at line 310 of file libXlate.h.

#define XLATE_TB_STATUS_MUNMAP_ERROR   -24

Definition at line 321 of file libXlate.h.

#define XLATE_TB_STATUS_NEW_ADDR_ERROR   -19 /* unused */

Definition at line 315 of file libXlate.h.

#define XLATE_TB_STATUS_NO_DEBUG   -9

Definition at line 304 of file libXlate.h.

#define XLATE_TB_STATUS_NO_ERROR   0

Definition at line 296 of file libXlate.h.

#define XLATE_TB_STATUS_NO_HEADER   -17

Definition at line 313 of file libXlate.h.

Definition at line 302 of file libXlate.h.

#define XLATE_TB_STATUS_NO_REG_INFO   -39

Definition at line 337 of file libXlate.h.

Definition at line 343 of file libXlate.h.

#define XLATE_TB_STATUS_NO_XLATE   -27

Definition at line 324 of file libXlate.h.

Definition at line 325 of file libXlate.h.

#define XLATE_TB_STATUS_NOT_ELF   -33

Definition at line 331 of file libXlate.h.

Definition at line 303 of file libXlate.h.

#define XLATE_TB_STATUS_NULL_HEADER   -16

Definition at line 312 of file libXlate.h.

#define XLATE_TB_STATUS_NULL_TABLE   -2

Definition at line 298 of file libXlate.h.

#define XLATE_TB_STATUS_OLD_ADDR_ERROR   -34 /* unused */

Definition at line 332 of file libXlate.h.

Definition at line 346 of file libXlate.h.

Definition at line 347 of file libXlate.h.

#define XLATE_TB_STATUS_RANGE_BAD   -12

Definition at line 308 of file libXlate.h.

Definition at line 345 of file libXlate.h.

Definition at line 301 of file libXlate.h.

Definition at line 339 of file libXlate.h.

Definition at line 341 of file libXlate.h.

#define XLATE_TB_STATUS_TABLE_NOT_PO   -23

Definition at line 320 of file libXlate.h.

Definition at line 350 of file libXlate.h.

Definition at line 319 of file libXlate.h.

#define XLATE_TB_STATUS_XLATE_BAD   -29

Definition at line 326 of file libXlate.h.

Definition at line 327 of file libXlate.h.


Typedef Documentation

typedef struct xlate_block_s xlate_block
typedef struct xlate_table_con_s* xlate_table_con

Definition at line 96 of file libXlate.h.

typedef struct xlate_table_pro_s* xlate_table_pro

Definition at line 97 of file libXlate.h.


Enumeration Type Documentation

Enumerator:
xlate_tk_general 
xlate_tk_preserve_size 
xlate_tk_preserve_order 

Definition at line 62 of file libXlate.h.


Function Documentation

int _xlate_fix_addresses_for_dso_movement ( void *  pxlate,
unsigned long long  len,
unsigned long long  movement 
)
int xlate_address ( xlate_table_con  ,
int  ,
Elf64_Addr  ,
Elf64_Addr ,
xlate_block  
)
int xlate_get_info ( xlate_table_con  ,
Elf64_Sxword ,
Elf64_Addr ,
Elf64_Addr ,
Elf64_Addr ,
Elf64_Addr ,
Elf64_Addr ,
Elf64_Addr ,
Elf64_Xword ,
int *  ,
int *  ,
int *  ,
xlate_tablekind ,
int *   
)
int xlate_init_elf ( Elf *  ,
int  ,
xlate_table_con  
)
int xlate_init_fd ( int  ,
int  ,
xlate_table_con  
)
int xlate_named_init_elf ( Elf *  ,
const char *  ,
xlate_table_con  
)
int xlate_named_init_fd ( int  ,
const char *  ,
xlate_table_con  
)
int xlate_pro_disk_next_block ( xlate_table_pro  ,
char **  ,
Elf64_Xword  
)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines