|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T v
Length: 2615 (0xa37)
Types: TextFile
Names: »vartab.h«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
└─⟦3f75c1919⟧ »EurOpenD3/utils/decomp.tar.Z«
└─⟦510c4d5ee⟧
└─⟦this⟧ »decomp/vartab.h«
/*
* Module: vartab.h
*
* Author: J. Reuter
*
* This file contains data structures and constants used by vartab.c,
* responsible for all decompiler internal symbol management.
*/
/*
* types
*
* These types attributes are attached to all internal variable
* information. The type is used to generate suffexes for generated
* names, and to infer type conversions.
*
* The TYP* constants are defined in ops.h. Sources files including
* this file must first include ops.h.
*/
#define T_CHAR TYPB
#define T_SHORT TYPW
#define T_LONG TYPL
#define T_FLOAT TYPF
#define T_DOUBLE TYPD
#define T_FUNC TYPS
/*
* the following constants must be powers of two (bits) and must be
* distinct from the above type values
*/
/* type modifiers */
#define T_UNSIGNED 1
#define T_POINTER 16
/*
* classes
*
* These are the storage classes of static information. They are used
* to determine variable scoping (residence).
*/
#define C_TEXT 0
#define C_DATA 8
#define C_BSS 16
/*
* class modifiers
*
* C_WRITTEN is set for variables that are written. It is or'ed with
* T_UNSIGNED in the flag part of the tables, so the bits used must not
* conflict.
* C_STATIC is set for variables that have no global symbol table entry.
*/
#define C_WRITTEN 2
#define C_STATIC 4
/*
* variable table structures
*
* The following structures store variable information in chains kept
* sorted by 'address'.
*/
/*
* regtype is used to store register, local, and argument information.
*/
struct regtype {
int v_address; /* register number */
int type; /* variable type */
int flag; /* C_WRITTEN, T_UNSIGNED */
struct regtype *next; /* pointer to next regtype entry */
};
/*
* inttype stores private (static global) variables
*/
struct inttype {
address v_address; /* address of variable */
int type; /* variable type */
int flag; /* C_WRITTEN, T_UNSIGNED */
int class; /* variable class and modifiers */
int symbolnum; /* symbolnum from symbol table */
char *value_ptr; /* internal address of initialized value */
struct inttype *next; /* pointer to next entry */
};
/*
* exttype stores public (external) variables.
*/
struct exttype {
unsigned int symnum; /* symbol number from symbol table */
int type; /* variable type */
int offset; /* operand displacement value */
int flag; /* C_WRITTEN, T_UNSIGNED */
struct exttype *next; /* pointer to next entry */
};
/*
* declare the function types
*/
extern char *reg_sym();
extern char *loc_sym();
extern char *arg_sym();
extern char *int_sym();
extern char *ext_sym();