📄 ecoff.h
字号:
#define RNDX_BITS1_RFD_LITTLE ((unsigned int) 0x0F)#define RNDX_BITS1_RFD_SH_LEFT_LITTLE 8#define RNDX_BITS1_INDEX_BIG ((unsigned int) 0x0F)#define RNDX_BITS1_INDEX_SH_LEFT_BIG 16#define RNDX_BITS2_INDEX_SH_LEFT_BIG 8#define RNDX_BITS3_INDEX_SH_LEFT_BIG 0#define RNDX_BITS1_INDEX_LITTLE ((unsigned int) 0xF0)#define RNDX_BITS1_INDEX_SH_LITTLE 4#define RNDX_BITS2_INDEX_SH_LEFT_LITTLE 4#define RNDX_BITS3_INDEX_SH_LEFT_LITTLE 12/* Auxiliary symbol information external record */union aux_ext { struct tir_ext a_ti; struct rndx_ext a_rndx; unsigned char a_dnLow[4]; unsigned char a_dnHigh[4]; unsigned char a_isym[4]; unsigned char a_iss[4]; unsigned char a_width[4]; unsigned char a_count[4];};#define AUX_GET_ANY(bigend, ax, field) \ ((bigend) ? bfd_getb32 ((ax)->field) : bfd_getl32 ((ax)->field))#define AUX_GET_DNLOW(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_dnLow)#define AUX_GET_DNHIGH(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_dnHigh)#define AUX_GET_ISYM(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_isym)#define AUX_GET_ISS(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_iss)#define AUX_GET_WIDTH(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_width)#define AUX_GET_COUNT(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_count)#define AUX_PUT_ANY(bigend, val, ax, field) \ ((bigend) \ ? (bfd_putb32 ((bfd_vma) (val), (ax)->field), 0) \ : (bfd_putl32 ((bfd_vma) (val), (ax)->field), 0))#define AUX_PUT_DNLOW(bigend, val, ax) \ AUX_PUT_ANY ((bigend), (val), (ax), a_dnLow)#define AUX_PUT_DNHIGH(bigend, val, ax) \ AUX_PUT_ANY ((bigend), (val), (ax), a_dnHigh)#define AUX_PUT_ISYM(bigend, val, ax) \ AUX_PUT_ANY ((bigend), (val), (ax), a_isym)#define AUX_PUT_ISS(bigend, val, ax) \ AUX_PUT_ANY ((bigend), (val), (ax), a_iss)#define AUX_PUT_WIDTH(bigend, val, ax) \ AUX_PUT_ANY ((bigend), (val), (ax), a_width)#define AUX_PUT_COUNT(bigend, val, ax) \ AUX_PUT_ANY ((bigend), (val), (ax), a_count)/********************** SYMBOLS **********************//* For efficiency, gdb deals directly with the unswapped symbolic information (that way it only takes the time to swap information that it really needs to read). gdb originally retrieved the information directly from the BFD backend information, but that strategy, besides being sort of ugly, does not work for MIPS ELF, which also uses ECOFF debugging information. This structure holds pointers to the (mostly) unswapped symbolic information. */struct ecoff_debug_info{ /* The swapped ECOFF symbolic header. */ HDRR symbolic_header; /* Pointers to the unswapped symbolic information. Note that the pointers to external structures point to different sorts of information on different ECOFF targets. The ecoff_debug_swap structure provides the sizes of the structures and the functions needed to swap the information in and out. These pointers are all pointers to arrays, not single structures. They will be NULL if there are no instances of the relevant structure. These fields are also used by the assembler to output ECOFF debugging information. */ unsigned char *line; PTR external_dnr; /* struct dnr_ext */ PTR external_pdr; /* struct pdr_ext */ PTR external_sym; /* struct sym_ext */ PTR external_opt; /* struct opt_ext */ union aux_ext *external_aux; char *ss; char *ssext; PTR external_fdr; /* struct fdr_ext */ PTR external_rfd; /* struct rfd_ext */ PTR external_ext; /* struct ext_ext */ /* These fields are used when linking. They may disappear at some point. */ char *ssext_end; PTR external_ext_end; /* When linking, this field holds a mapping from the input FDR numbers to the output numbers, and is used when writing out the external symbols. It is NULL if no mapping is required. */ RFDT *ifdmap; /* The swapped FDR information. Currently this is never NULL, but code using this structure should probably double-check in case this changes in the future. This is a pointer to an array, not a single structure. */ FDR *fdr; /* When relaxing MIPS embedded PIC code, we may need to adjust symbol values when they are output. This is a linked list of structures indicating how values should be adjusted. There is no requirement that the entries be in any order, or that they not overlap. This field is normally NULL, in which case no adjustments need to be made. */ struct ecoff_value_adjust *adjust;};/* This structure describes how to adjust symbol values when outputting MIPS embedded PIC code. These adjustments only apply to the internal symbols, as the external symbol values will come from the hash table and have already been adjusted. */struct ecoff_value_adjust{ /* Next entry on adjustment list. */ struct ecoff_value_adjust *next; /* Starting VMA of adjustment. This is the VMA in the ECOFF file, not the offset from the start of the section. Thus it should indicate a particular section. */ bfd_vma start; /* Ending VMA of adjustment. */ bfd_vma end; /* Adjustment. This should be added to the value of the symbol, or FDR. This is zero for the last entry in the array. */ long adjust;};/* These structures are used by the ECOFF find_nearest_line function. */struct ecoff_fdrtab_entry{ /* Base address in .text of this FDR. */ bfd_vma base_addr; FDR *fdr;};struct ecoff_find_line{ /* Allocated memory to hold function and file names. */ char *find_buffer; /* FDR table, sorted by address: */ long fdrtab_len; struct ecoff_fdrtab_entry *fdrtab; /* Cache entry for most recently found line information. The sect field is NULL if this cache does not contain valid information. */ struct { asection *sect; bfd_vma start; bfd_vma stop; const char *filename; const char *functionname; unsigned int line_num; } cache;};/********************** SWAPPING **********************//* The generic ECOFF code needs to be able to swap debugging information in and out in the specific format used by a particular ECOFF implementation. This structure provides the information needed to do this. */struct ecoff_debug_swap{ /* Symbol table magic number. */ int sym_magic; /* Alignment of debugging information. E.g., 4. */ bfd_size_type debug_align; /* Sizes of external symbolic information. */ bfd_size_type external_hdr_size; bfd_size_type external_dnr_size; bfd_size_type external_pdr_size; bfd_size_type external_sym_size; bfd_size_type external_opt_size; bfd_size_type external_fdr_size; bfd_size_type external_rfd_size; bfd_size_type external_ext_size; /* Functions to swap in external symbolic data. */ void (*swap_hdr_in) PARAMS ((bfd *, PTR, HDRR *)); void (*swap_dnr_in) PARAMS ((bfd *, PTR, DNR *)); void (*swap_pdr_in) PARAMS ((bfd *, PTR, PDR *)); void (*swap_sym_in) PARAMS ((bfd *, PTR, SYMR *)); void (*swap_opt_in) PARAMS ((bfd *, PTR, OPTR *)); void (*swap_fdr_in) PARAMS ((bfd *, PTR, FDR *)); void (*swap_rfd_in) PARAMS ((bfd *, PTR, RFDT *)); void (*swap_ext_in) PARAMS ((bfd *, PTR, EXTR *)); void (*swap_tir_in) PARAMS ((int, const struct tir_ext *, TIR *)); void (*swap_rndx_in) PARAMS ((int, const struct rndx_ext *, RNDXR *)); /* Functions to swap out external symbolic data. */ void (*swap_hdr_out) PARAMS ((bfd *, const HDRR *, PTR)); void (*swap_dnr_out) PARAMS ((bfd *, const DNR *, PTR)); void (*swap_pdr_out) PARAMS ((bfd *, const PDR *, PTR)); void (*swap_sym_out) PARAMS ((bfd *, const SYMR *, PTR)); void (*swap_opt_out) PARAMS ((bfd *, const OPTR *, PTR)); void (*swap_fdr_out) PARAMS ((bfd *, const FDR *, PTR)); void (*swap_rfd_out) PARAMS ((bfd *, const RFDT *, PTR)); void (*swap_ext_out) PARAMS ((bfd *, const EXTR *, PTR)); void (*swap_tir_out) PARAMS ((int, const TIR *, struct tir_ext *)); void (*swap_rndx_out) PARAMS ((int, const RNDXR *, struct rndx_ext *)); /* Function to read symbol data and set up pointers in ecoff_debug_info structure. The section argument is used for ELF, not straight ECOFF. */ bfd_boolean (*read_debug_info) PARAMS ((bfd *, asection *, struct ecoff_debug_info *));};#endif /* ! defined (ECOFF_H) */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -