The FreeRADIUS server $Id: f3670dba8951ca10eb4948feb3dc3db9423a334f $
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
xcoff.c File Reference
#include "config.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "backtrace.h"
#include "internal.h"
+ Include dependency graph for xcoff.c:

Go to the source code of this file.

Data Structures

struct  __attribute__
 
struct  __attribute__.x_auxtype
 
struct  __attribute__.x_block
 
struct  __attribute__.x_fcn
 
union  __attribute__.x_file
 
struct  __attribute__.x_file._x
 
struct  b_ar_fl_hdr
 
struct  b_ar_hdr
 
struct  b_xcoff_filhdr
 
struct  b_xcoff_lineno
 
union  b_xcoff_lineno.l_addr
 
struct  b_xcoff_scnhdr
 
struct  dwsect_info
 
struct  xcoff_fileline_data
 
struct  xcoff_func
 
struct  xcoff_func_vector
 
struct  xcoff_incl
 
struct  xcoff_incl_vector
 
struct  xcoff_symbol
 
struct  xcoff_syminfo_data
 

Macros

#define AIAMAGBIG   "<bigaf>\n"
 
#define AUXESZ   18
 
#define C_BINCL   108 /* Beginning of include file. */
 
#define C_EINCL   109 /* End of include file. */
 
#define C_EXT   2 /* External symbol. */
 
#define C_FCN   101 /* Beginning or end of function. */
 
#define C_FILE   103 /* Source file name. */
 
#define C_HIDEXT   107 /* Unnamed external symbol. */
 
#define C_WEAKEXT   111 /* Weak external symbol. */
 
#define F_SHROBJ   0x2000 /* File is a shared object. */
 
#define FILNMLEN   14
 
#define ISFCN(x)   ((x) & 0x0020)
 
#define LINESZ   12
 
#define SSUBTYP_DWABREV   0x60000 /* DWARF abbreviation section. */
 
#define SSUBTYP_DWARNGE   0x50000 /* DWARF aranges section. */
 
#define SSUBTYP_DWINFO   0x10000 /* DWARF info section. */
 
#define SSUBTYP_DWLINE   0x20000 /* DWARF line-number section. */
 
#define SSUBTYP_DWRNGES   0x80000 /* DWARF ranges section. */
 
#define SSUBTYP_DWSTR   0x70000 /* DWARF strings section. */
 
#define STYP_DWARF   0x10 /* DWARF debugging section. */
 
#define STYP_OVRFLO   0x8000 /* Line-number field overflow section. */
 
#define STYP_TEXT   0x20 /* Executable text (code) section. */
 
#define SYMESZ   18
 
#define SYMNMLEN   8
 
#define XCOFF_AIX_TEXTBASE   0x100000000ul
 
#define XCOFF_MAGIC   0767
 

Functions

int backtrace_initialize (struct backtrace_state *state, const char *filename ATTRIBUTE_UNUSED, int descriptor, backtrace_error_callback error_callback, void *data, fileline *fileline_fn)
 
static int xcoff_add (struct backtrace_state *state, int descriptor, off_t offset, struct libbacktrace_base_address base_address, backtrace_error_callback error_callback, void *data, fileline *fileline_fn, int *found_sym, int exe)
 
static void xcoff_add_syminfo_data (struct backtrace_state *state, struct xcoff_syminfo_data *xdata)
 
static int xcoff_fileline (struct backtrace_state *state, uintptr_t pc, backtrace_full_callback callback, backtrace_error_callback error_callback, void *data)
 
static int xcoff_func_compare (const void *v1, const void *v2)
 
static int xcoff_func_search (const void *vkey, const void *ventry)
 
static int xcoff_incl_compare (const void *v1, const void *v2)
 
static int xcoff_incl_search (const void *vkey, const void *ventry)
 
static int xcoff_initialize_fileline (struct backtrace_state *state, struct libbacktrace_base_address base_address, const b_xcoff_scnhdr *sects, const b_xcoff_syment *syms, size_t nsyms, const unsigned char *strtab, size_t strtab_size, const unsigned char *linenos, size_t linenos_size, uint64_t lnnoptr0, backtrace_error_callback error_callback, void *data)
 
static int xcoff_initialize_syminfo (struct backtrace_state *state, struct libbacktrace_base_address base_address, const b_xcoff_syment *syms, size_t nsyms, const unsigned char *strtab, size_t strtab_size, backtrace_error_callback error_callback, void *data, struct xcoff_syminfo_data *sdata)
 
static int xcoff_lookup_pc (struct backtrace_state *state ATTRIBUTE_UNUSED, struct xcoff_fileline_data *fdata, uintptr_t pc, backtrace_full_callback callback, backtrace_error_callback error_callback ATTRIBUTE_UNUSED, void *data, int *found)
 
static int xcoff_nodebug (struct backtrace_state *state ATTRIBUTE_UNUSED, uintptr_t pc ATTRIBUTE_UNUSED, backtrace_full_callback callback ATTRIBUTE_UNUSED, backtrace_error_callback error_callback, void *data)
 
static void xcoff_nosyms (struct backtrace_state *state ATTRIBUTE_UNUSED, uintptr_t addr ATTRIBUTE_UNUSED, backtrace_syminfo_callback callback ATTRIBUTE_UNUSED, backtrace_error_callback error_callback, void *data)
 
static int xcoff_symbol_compare (const void *v1, const void *v2)
 
static int xcoff_symbol_search (const void *vkey, const void *ventry)
 
static void xcoff_syminfo (struct backtrace_state *state ATTRIBUTE_UNUSED, uintptr_t addr, backtrace_syminfo_callback callback, backtrace_error_callback error_callback ATTRIBUTE_UNUSED, void *data)
 
static const char * xcoff_symname (const b_xcoff_syment *asym, const unsigned char *strtab, size_t strtab_size)
 

Data Structure Documentation

◆ __attribute__

struct __attribute__

Definition at line 165 of file xcoff.c.

+ Collaboration diagram for __attribute__:
Data Fields
bfd_auth_t auth
uint8_t auth_len
unsigned int auth_present: 1
uint8_t auth_type
unsigned int control_plane_independent: 1
unsigned int demand: 1
uint32_t desired_min_tx_interval
uint8_t detect_multi
unsigned int diag: 5
uint8_t digest[MD5_DIGEST_LENGTH]
unsigned int final: 1
uint8_t key_id
uint8_t length
uint32_t min_echo_rx_interval
unsigned int multipoint: 1
uint32_t my_disc
uint8_t n_numaux
uint32_t n_offset_
uint8_t n_sclass
int16_t n_scnum
uint16_t n_type
uint64_t n_value
uint8_t password[16]
unsigned int poll: 1
uint32_t required_min_rx_interval
uint8_t reserved
uint32_t sequence_no
unsigned int state: 2
unsigned int version: 3
struct __attribute__.x_auxtype x_auxtype
struct __attribute__.x_block x_block
struct __attribute__.x_fcn x_fcn
union __attribute__.x_file x_file
uint32_t your_disc

◆ __attribute__.x_auxtype

struct __attribute__.x_auxtype

Definition at line 228 of file xcoff.c.

Data Fields
uint8_t pad[AUXESZ-1]
uint8_t x_auxtype

◆ __attribute__.x_block

struct __attribute__.x_block

Definition at line 201 of file xcoff.c.

Data Fields
uint32_t x_lnno

◆ __attribute__.x_fcn

struct __attribute__.x_fcn

Definition at line 222 of file xcoff.c.

Data Fields
uint32_t x_endndx
uint32_t x_fsize
uint64_t x_lnnoptr

◆ __attribute__.x_file

union __attribute__.x_file

Definition at line 205 of file xcoff.c.

Data Fields
struct __attribute__.x_file._x _x
char x_fname[FILNMLEN]

◆ __attribute__.x_file._x

struct __attribute__.x_file._x

Definition at line 207 of file xcoff.c.

Data Fields
char pad[FILNMLEN-8]
uint8_t x_ftype
uint32_t x_offset
uint32_t x_zeroes

◆ b_ar_fl_hdr

struct b_ar_fl_hdr

Definition at line 272 of file xcoff.c.

Data Fields
char fl_freeoff[20]
char fl_fstmoff[20]
char fl_gst64off[20]
char fl_gstoff[20]
char fl_magic[8]
char fl_memoff[20]

◆ b_ar_hdr

struct b_ar_hdr

Definition at line 283 of file xcoff.c.

Data Fields
char ar_date[12]
char ar_gid[12]
char ar_mode[12]
char ar_name[2]
char ar_namlen[4]
char ar_nxtmem[20]
char ar_prvmem[20]
char ar_size[20]
char ar_uid[12]

◆ b_xcoff_filhdr

struct b_xcoff_filhdr

Definition at line 75 of file xcoff.c.

Data Fields
uint16_t f_flags
uint16_t f_magic
uint16_t f_nscns
uint32_t f_nsyms
uint16_t f_opthdr
uint64_t f_symptr
uint32_t f_timdat

◆ b_xcoff_lineno

struct b_xcoff_lineno

Definition at line 250 of file xcoff.c.

Data Fields
union b_xcoff_lineno.l_addr l_addr
uint32_t l_lnno

◆ b_xcoff_lineno.l_addr

union b_xcoff_lineno.l_addr

Definition at line 251 of file xcoff.c.

Data Fields
uint64_t l_paddr
uint32_t l_symndx

◆ b_xcoff_scnhdr

struct b_xcoff_scnhdr

Definition at line 112 of file xcoff.c.

Data Fields
char name[8]
uint32_t s_flags
uint64_t s_lnnoptr
uint32_t s_nlnno
uint32_t s_nreloc
uint64_t s_paddr
uint64_t s_relptr
uint64_t s_scnptr
uint64_t s_size
uint64_t s_vaddr

◆ dwsect_info

struct dwsect_info

Definition at line 393 of file xcoff.c.

Data Fields
const unsigned char * data
off_t offset
size_t size

◆ xcoff_fileline_data

struct xcoff_fileline_data

Definition at line 375 of file xcoff.c.

+ Collaboration diagram for xcoff_fileline_data:
Data Fields
struct libbacktrace_base_address base_address
struct xcoff_func_vector func_vec
struct xcoff_incl_vector incl_vec
const unsigned char * linenos
size_t linenos_size
uint64_t lnnoptr0
struct xcoff_fileline_data * next

◆ xcoff_func

struct xcoff_func

Definition at line 344 of file xcoff.c.

Data Fields
const char * filename
int lnno
uintptr_t lnnoptr
const char * name
uintptr_t pc
uintptr_t sect_base
size_t size

◆ xcoff_func_vector

struct xcoff_func_vector

Definition at line 365 of file xcoff.c.

+ Collaboration diagram for xcoff_func_vector:
Data Fields
size_t count
struct backtrace_vector vec

◆ xcoff_incl

struct xcoff_incl

Definition at line 322 of file xcoff.c.

Data Fields
uintptr_t begin
uintptr_t end
const char * filename

◆ xcoff_incl_vector

struct xcoff_incl_vector

Definition at line 334 of file xcoff.c.

+ Collaboration diagram for xcoff_incl_vector:
Data Fields
size_t count
struct backtrace_vector vec

◆ xcoff_symbol

struct xcoff_symbol

Definition at line 298 of file xcoff.c.

Data Fields
uintptr_t address
const char * name
size_t size

◆ xcoff_syminfo_data

struct xcoff_syminfo_data

Definition at line 310 of file xcoff.c.

+ Collaboration diagram for xcoff_syminfo_data:
Data Fields
size_t count
struct xcoff_syminfo_data * next
struct xcoff_symbol * symbols

Macro Definition Documentation

◆ AIAMAGBIG

#define AIAMAGBIG   "<bigaf>\n"

Definition at line 270 of file xcoff.c.

◆ AUXESZ

#define AUXESZ   18

Definition at line 190 of file xcoff.c.

◆ C_BINCL

#define C_BINCL   108 /* Beginning of include file. */

Definition at line 182 of file xcoff.c.

◆ C_EINCL

#define C_EINCL   109 /* End of include file. */

Definition at line 183 of file xcoff.c.

◆ C_EXT

#define C_EXT   2 /* External symbol. */

Definition at line 178 of file xcoff.c.

◆ C_FCN

#define C_FCN   101 /* Beginning or end of function. */

Definition at line 179 of file xcoff.c.

◆ C_FILE

#define C_FILE   103 /* Source file name. */

Definition at line 180 of file xcoff.c.

◆ C_HIDEXT

#define C_HIDEXT   107 /* Unnamed external symbol. */

Definition at line 181 of file xcoff.c.

◆ C_WEAKEXT

#define C_WEAKEXT   111 /* Weak external symbol. */

Definition at line 184 of file xcoff.c.

◆ F_SHROBJ

#define F_SHROBJ   0x2000 /* File is a shared object. */

Definition at line 89 of file xcoff.c.

◆ FILNMLEN

#define FILNMLEN   14

Definition at line 191 of file xcoff.c.

◆ ISFCN

#define ISFCN (   x)    ((x) & 0x0020)

Definition at line 186 of file xcoff.c.

◆ LINESZ

#define LINESZ   12

Definition at line 258 of file xcoff.c.

◆ SSUBTYP_DWABREV

#define SSUBTYP_DWABREV   0x60000 /* DWARF abbreviation section. */

Definition at line 134 of file xcoff.c.

◆ SSUBTYP_DWARNGE

#define SSUBTYP_DWARNGE   0x50000 /* DWARF aranges section. */

Definition at line 133 of file xcoff.c.

◆ SSUBTYP_DWINFO

#define SSUBTYP_DWINFO   0x10000 /* DWARF info section. */

Definition at line 131 of file xcoff.c.

◆ SSUBTYP_DWLINE

#define SSUBTYP_DWLINE   0x20000 /* DWARF line-number section. */

Definition at line 132 of file xcoff.c.

◆ SSUBTYP_DWRNGES

#define SSUBTYP_DWRNGES   0x80000 /* DWARF ranges section. */

Definition at line 136 of file xcoff.c.

◆ SSUBTYP_DWSTR

#define SSUBTYP_DWSTR   0x70000 /* DWARF strings section. */

Definition at line 135 of file xcoff.c.

◆ STYP_DWARF

#define STYP_DWARF   0x10 /* DWARF debugging section. */

Definition at line 127 of file xcoff.c.

◆ STYP_OVRFLO

#define STYP_OVRFLO   0x8000 /* Line-number field overflow section. */

Definition at line 129 of file xcoff.c.

◆ STYP_TEXT

#define STYP_TEXT   0x20 /* Executable text (code) section. */

Definition at line 128 of file xcoff.c.

◆ SYMESZ

#define SYMESZ   18

Definition at line 176 of file xcoff.c.

◆ SYMNMLEN

#define SYMNMLEN   8

Definition at line 140 of file xcoff.c.

◆ XCOFF_AIX_TEXTBASE

#define XCOFF_AIX_TEXTBASE   0x100000000ul

Definition at line 265 of file xcoff.c.

◆ XCOFF_MAGIC

#define XCOFF_MAGIC   0767

Definition at line 85 of file xcoff.c.

Function Documentation

◆ backtrace_initialize()

int backtrace_initialize ( struct backtrace_state state,
const char *filename  ATTRIBUTE_UNUSED,
int  descriptor,
backtrace_error_callback  error_callback,
void *  data,
fileline fileline_fn 
)

Definition at line 1565 of file xcoff.c.

+ Here is the call graph for this function:

◆ xcoff_add()

static int xcoff_add ( struct backtrace_state state,
int  descriptor,
off_t  offset,
struct libbacktrace_base_address  base_address,
backtrace_error_callback  error_callback,
void *  data,
fileline fileline_fn,
int *  found_sym,
int  exe 
)
static

Definition at line 1074 of file xcoff.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xcoff_add_syminfo_data()

static void xcoff_add_syminfo_data ( struct backtrace_state state,
struct xcoff_syminfo_data xdata 
)
static

Definition at line 465 of file xcoff.c.

+ Here is the caller graph for this function:

◆ xcoff_fileline()

static int xcoff_fileline ( struct backtrace_state state,
uintptr_t  pc,
backtrace_full_callback  callback,
backtrace_error_callback  error_callback,
void *  data 
)
static

Definition at line 815 of file xcoff.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xcoff_func_compare()

static int xcoff_func_compare ( const void *  v1,
const void *  v2 
)
static

Definition at line 654 of file xcoff.c.

+ Here is the caller graph for this function:

◆ xcoff_func_search()

static int xcoff_func_search ( const void *  vkey,
const void *  ventry 
)
static

Definition at line 670 of file xcoff.c.

+ Here is the caller graph for this function:

◆ xcoff_incl_compare()

static int xcoff_incl_compare ( const void *  v1,
const void *  v2 
)
static

Definition at line 689 of file xcoff.c.

+ Here is the caller graph for this function:

◆ xcoff_incl_search()

static int xcoff_incl_search ( const void *  vkey,
const void *  ventry 
)
static

Definition at line 705 of file xcoff.c.

+ Here is the caller graph for this function:

◆ xcoff_initialize_fileline()

static int xcoff_initialize_fileline ( struct backtrace_state state,
struct libbacktrace_base_address  base_address,
const b_xcoff_scnhdr sects,
const b_xcoff_syment *  syms,
size_t  nsyms,
const unsigned char *  strtab,
size_t  strtab_size,
const unsigned char *  linenos,
size_t  linenos_size,
uint64_t  lnnoptr0,
backtrace_error_callback  error_callback,
void *  data 
)
static

Definition at line 864 of file xcoff.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xcoff_initialize_syminfo()

static int xcoff_initialize_syminfo ( struct backtrace_state state,
struct libbacktrace_base_address  base_address,
const b_xcoff_syment *  syms,
size_t  nsyms,
const unsigned char *  strtab,
size_t  strtab_size,
backtrace_error_callback  error_callback,
void *  data,
struct xcoff_syminfo_data sdata 
)
static

Definition at line 588 of file xcoff.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xcoff_lookup_pc()

static int xcoff_lookup_pc ( struct backtrace_state *state  ATTRIBUTE_UNUSED,
struct xcoff_fileline_data fdata,
uintptr_t  pc,
backtrace_full_callback  callback,
backtrace_error_callback error_callback  ATTRIBUTE_UNUSED,
void *  data,
int *  found 
)
static

Definition at line 726 of file xcoff.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xcoff_nodebug()

static int xcoff_nodebug ( struct backtrace_state *state  ATTRIBUTE_UNUSED,
uintptr_t pc  ATTRIBUTE_UNUSED,
backtrace_full_callback callback  ATTRIBUTE_UNUSED,
backtrace_error_callback  error_callback,
void *  data 
)
static

Definition at line 406 of file xcoff.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xcoff_nosyms()

static void xcoff_nosyms ( struct backtrace_state *state  ATTRIBUTE_UNUSED,
uintptr_t addr  ATTRIBUTE_UNUSED,
backtrace_syminfo_callback callback  ATTRIBUTE_UNUSED,
backtrace_error_callback  error_callback,
void *  data 
)
static

Definition at line 419 of file xcoff.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xcoff_symbol_compare()

static int xcoff_symbol_compare ( const void *  v1,
const void *  v2 
)
static

Definition at line 430 of file xcoff.c.

+ Here is the caller graph for this function:

◆ xcoff_symbol_search()

static int xcoff_symbol_search ( const void *  vkey,
const void *  ventry 
)
static

Definition at line 446 of file xcoff.c.

+ Here is the caller graph for this function:

◆ xcoff_syminfo()

static void xcoff_syminfo ( struct backtrace_state *state  ATTRIBUTE_UNUSED,
uintptr_t  addr,
backtrace_syminfo_callback  callback,
backtrace_error_callback error_callback  ATTRIBUTE_UNUSED,
void *  data 
)
static

Definition at line 507 of file xcoff.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xcoff_symname()

static const char * xcoff_symname ( const b_xcoff_syment *  asym,
const unsigned char *  strtab,
size_t  strtab_size 
)
static

Definition at line 565 of file xcoff.c.

+ Here is the caller graph for this function: