Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #ifndef dwarf_DST_INCLUDED
00041 #define dwarf_DST_INCLUDED
00042
00043
00044 #ifdef _KEEP_RCS_ID
00045 #endif
00046
00047
00048
00049
00050
00051
00052
00053
00054 #define dwarf_DST_version 0x0
00055
00056
00057 #include "dwarf.h"
00058 #include "dwarf_DST_mem.h"
00059 #include "symtab_idx.h"
00060 #include "srcpos.h"
00061
00062 #ifdef __cplusplus
00063 extern "C" {
00064 #endif
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074 #define DST_no_flag 0x00000000
00075 #define DST_flag_external 0x00000001
00076 #define DST_flag_declaration 0x00000002
00077 #define DST_flag_prototyped 0x00000008
00078 #define DST_flag_memdef 0x00000010
00079 #define DST_flag_const 0x00000020
00080 #define DST_flag_automatic 0x00000040
00081 #define DST_flag_optional_parm 0x00000080
00082 #define DST_flag_variable_parm 0x00000100
00083 #define DST_flag_bitfield 0x00000200
00084 #define DST_flag_comm 0x00000400
00085 #define DST_flag_lb_cval 0x00000800
00086 #define DST_flag_ub_cval 0x00001000
00087 #define DST_flag_cval 0x00002000
00088 #define DST_flag_artificial 0x00004000
00089 #define DST_flag_deref 0x00008000
00090 #define DST_flag_base_deref 0x00010000
00091 #define DST_flag_count 0x00020000
00092 #define DST_flag_stride_1byte 0x00040000
00093 #define DST_flag_stride_2byte 0x00080000
00094 #define DST_flag_f90_pointer 0x00100000
00095 #define DST_flag_allocatable 0x00200000
00096 #define DST_flag_assumed_shape 0x00400000
00097 #define DST_flag_assumed_size 0x00800000
00098 #define DST_flag_assoc_fe 0x10000000
00099 #define DST_flag_assoc_be 0x20000000
00100 #define DST_flag_assoc_idx 0x40000000
00101
00102 #define DST_flag_info_mark 0x80000000
00103 #define DST_flag_static 0x100000000LL
00104 #define DST_flag_mask 0xffffffff
00105
00106 #define DST_SET_external(flag) (flag |= DST_flag_external)
00107 #define DST_SET_declaration(flag) (flag |= DST_flag_declaration)
00108 #define DST_SET_prototyped(flag) (flag |= DST_flag_prototyped)
00109 #define DST_SET_memdef(flag) (flag |= DST_flag_memdef)
00110 #define DST_SET_const(flag) (flag |= DST_flag_const)
00111 #define DST_SET_comm(flag) (flag |= DST_flag_comm)
00112 #define DST_SET_lb_cval(flag) (flag |= DST_flag_lb_cval)
00113 #define DST_SET_ub_cval(flag) (flag |= DST_flag_ub_cval)
00114 #define DST_SET_cval(flag) (flag |= DST_flag_cval)
00115 #define DST_SET_count(flag) (flag |= DST_flag_count)
00116 #define DST_SET_stride_1byte(flag) (flag |= DST_flag_stride_1byte)
00117 #define DST_SET_stride_2byte(flag) (flag |= DST_flag_stride_2byte)
00118 #define DST_SET_artificial(flag) (flag |= DST_flag_artificial)
00119 #define DST_SET_deref(flag) (flag |= DST_flag_deref)
00120 #define DST_SET_base_deref(flag) (flag |= DST_flag_base_deref)
00121 #define DST_SET_automatic(flag) (flag |= DST_flag_automatic)
00122 #define DST_SET_optional_parm(flag) (flag |= DST_flag_optional_parm)
00123 #define DST_SET_variable_parm(flag) (flag |= DST_flag_variable_parm)
00124 #define DST_SET_bitfield(flag) (flag |= DST_flag_bitfield)
00125 #define DST_SET_f90_pointer(flag) (flag |= DST_flag_f90_pointer)
00126 #define DST_SET_allocatable(flag) (flag |= DST_flag_allocatable)
00127 #define DST_SET_assumed_shape(flag) (flag |= DST_flag_assumed_shape)
00128 #define DST_SET_assumed_size(flag) (flag |= DST_flag_assumed_size)
00129 #define DST_SET_assoc_fe(flag) (flag |= DST_flag_assoc_fe)
00130 #define DST_SET_assoc_be(flag) (flag |= DST_flag_assoc_be)
00131 #define DST_SET_assoc_idx(flag) (flag |= DST_flag_assoc_idx)
00132 #define DST_SET_info_mark(flag) (flag |= DST_flag_info_mark)
00133 #define DST_SET_static(flag) (flag |= DST_flag_static)
00134
00135 #define DST_RESET_all(flag) (flag &= ~DST_flag_mask)
00136 #define DST_RESET_external(flag) (flag &= ~DST_flag_external)
00137 #define DST_RESET_declaration(flag) (flag &= ~DST_flag_declaration)
00138 #define DST_RESET_prototyped(flag) (flag &= ~DST_flag_prototyped)
00139 #define DST_RESET_memdef(flag) (flag &= ~DST_flag_memdef)
00140 #define DST_RESET_const(flag) (flag &= ~DST_flag_const)
00141 #define DST_RESET_comm(flag) (flag &= ~DST_flag_comm)
00142 #define DST_RESET_lb_cval(flag) (flag &= ~DST_flag_lb_cval)
00143 #define DST_RESET_ub_cval(flag) (flag &= ~DST_flag_ub_cval)
00144 #define DST_RESET_cval(flag) (flag &= ~DST_flag_cval)
00145 #define DST_RESET_count(flag) (flag &= ~DST_flag_count)
00146 #define DST_RESET_stride_1byte(flag) (flag &= ~DST_flag_stride_1byte)
00147 #define DST_RESET_stride_2byte(flag) (flag &= ~DST_flag_stride_2byte)
00148 #define DST_RESET_artificial(flag) (flag &= ~DST_flag_artificial)
00149 #define DST_RESET_deref(flag) (flag &= ~DST_flag_deref)
00150 #define DST_RESET_base_deref(flag) (flag &= ~DST_flag_base_deref)
00151 #define DST_RESET_automatic(flag) (flag &= ~DST_flag_automatic)
00152 #define DST_RESET_optional_parm(flag) (flag &= ~DST_flag_optional_parm)
00153 #define DST_RESET_variable_parm(flag) (flag &= ~DST_flag_variable_parm)
00154 #define DST_RESET_bitfield(flag) (flag &= ~DST_flag_bitfield)
00155 #define DST_RESET_f90_pointer(flag) (flag &= ~DST_flag_f90_pointer)
00156 #define DST_RESET_allocatable(flag) (flag &= ~DST_flag_allocatable)
00157 #define DST_RESET_assumed_shape(flag) (flag &= ~DST_flag_assumed_shape)
00158 #define DST_RESET_assumed_size(flag) (flag &= ~DST_flag_assumed_size)
00159 #define DST_RESET_assoc_fe(flag) (flag &= ~DST_flag_assoc_fe)
00160 #define DST_RESET_assoc_be(flag) (flag &= ~DST_flag_assoc_be)
00161 #define DST_RESET_assoc_idx(flag) (flag &= ~DST_flag_assoc_idx)
00162 #define DST_RESET_info_mark(flag) (flag &= ~DST_flag_info_mark)
00163 #define DST_RESET_static(flag) (flag &= ~DST_flag_static)
00164
00165 #define DST_IS_external(flag) (flag & DST_flag_external)
00166 #define DST_IS_declaration(flag) (flag & DST_flag_declaration)
00167 #define DST_IS_prototyped(flag) (flag & DST_flag_prototyped)
00168 #define DST_IS_memdef(flag) (flag & DST_flag_memdef)
00169 #define DST_IS_const(flag) (flag & DST_flag_const)
00170 #define DST_IS_comm(flag) (flag & DST_flag_comm)
00171 #define DST_IS_lb_cval(flag) (flag & DST_flag_lb_cval)
00172 #define DST_IS_ub_cval(flag) (flag & DST_flag_ub_cval)
00173 #define DST_IS_cval(flag) (flag & DST_flag_cval)
00174 #define DST_IS_count(flag) (flag & DST_flag_count)
00175 #define DST_IS_stride_1byte(flag) (flag & DST_flag_stride_1byte)
00176 #define DST_IS_stride_2byte(flag) (flag & DST_flag_stride_2byte)
00177 #define DST_IS_artificial(flag) (flag & DST_flag_artificial)
00178 #define DST_IS_deref(flag) (flag & DST_flag_deref)
00179 #define DST_IS_base_deref(flag) (flag & DST_flag_base_deref)
00180 #define DST_IS_automatic(flag) (flag & DST_flag_automatic)
00181 #define DST_IS_optional_parm(flag) (flag & DST_flag_optional_parm)
00182 #define DST_IS_variable_parm(flag) (flag & DST_flag_variable_parm)
00183 #define DST_IS_bitfield(flag) (flag & DST_flag_bitfield)
00184 #define DST_IS_f90_pointer(flag) (flag & DST_flag_f90_pointer)
00185 #define DST_IS_allocatable(flag) (flag & DST_flag_allocatable)
00186 #define DST_IS_assumed_shape(flag) (flag & DST_flag_assumed_shape)
00187 #define DST_IS_assumed_size(flag) (flag & DST_flag_assumed_size)
00188 #define DST_IS_assoc_fe(flag) (flag & DST_flag_assoc_fe)
00189 #define DST_IS_assoc_be(flag) (flag & DST_flag_assoc_be)
00190 #define DST_IS_assoc_idx(flag) (flag & DST_flag_assoc_idx)
00191 #define DST_IS_info_mark(flag) (flag & DST_flag_info_mark)
00192 #define DST_IS_static(flag) (flag & DST_flag_static)
00193
00194
00195
00196
00197 typedef UINT64 DST_flag;
00198 typedef UINT16 DST_DW_tag;
00199 typedef UINT8 DST_ATE_encoding;
00200 typedef UINT8 DST_addr_class;
00201 typedef UINT16 DST_language;
00202 typedef UINT16 DST_identifier_case;
00203 typedef UINT8 DST_inline;
00204 typedef UINT8 DST_virtuality;
00205 typedef UINT16 DST_vtable_elem_location;
00206
00207 typedef UINT8 DST_bitsize;
00208 typedef UINT64 DST_size_t;
00209 typedef INT64 DST_bounds_t;
00210 typedef void *DST_die_ptr;
00211
00212
00213
00214
00215
00216
00217 typedef DST_IDX DST_INFO_IDX;
00218 typedef DST_IDX DST_ATTR_IDX;
00219 typedef DST_IDX DST_FILE_IDX;
00220 typedef DST_IDX DST_DIR_IDX;
00221 typedef DST_IDX DST_MACR_IDX;
00222 typedef DST_IDX DST_STR_IDX;
00223
00224
00225
00226
00227
00228
00229 class ST;
00230
00231 typedef union DST_assoc_info
00232 {
00233 ST_IDX st_idx;
00234 ST *st_ptr;
00235 union
00236 {
00237 void *fe_ptr;
00238 UINTPS fe_uint;
00239 } st_u;
00240 } DST_ASSOC_INFO;
00241 #define DST_ASSOC_INFO_st_idx(p) ((p).st_idx)
00242 #define DST_ASSOC_INFO_st_level(p) (ST_IDX_level((p).st_idx))
00243 #define DST_ASSOC_INFO_st_index(p) (ST_IDX_index((p).st_idx))
00244 #define DST_ASSOC_INFO_st_ptr(p) ((p).st_ptr)
00245 #define DST_ASSOC_INFO_fe_ptr(p) ((p).st_u.fe_ptr)
00246
00247 #define pDST_ASSOC_INFO_st_idx(p) ((p)->st_idx)
00248 #define pDST_ASSOC_INFO_st_level(p) (ST_IDX_level((p)->st_idx))
00249 #define pDST_ASSOC_INFO_st_index(p) (ST_IDX_index((p)->st_idx))
00250 #define pDST_ASSOC_INFO_st_ptr(p) ((p)->st_ptr)
00251 #define pDST_ASSOC_INFO_fe_ptr(p) ((p)->st_u.fe_ptr)
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261 typedef enum DST_const_form
00262 {
00263 DST_FORM_STRING,
00264 DST_FORM_DATA1,
00265 DST_FORM_DATA2,
00266 DST_FORM_DATA4,
00267 DST_FORM_DATA8,
00268 DST_FORM_DATAC4,
00269 DST_FORM_DATAC8
00270 } DST_CONST_FORM;
00271
00272 typedef struct DST_const_value
00273 {
00274 DST_CONST_FORM form;
00275 union
00276 {
00277 DST_IDX form_string;
00278 UINT8 form_data1;
00279 UINT16 form_data2;
00280 UINT32 form_data4;
00281 UINT64 form_data8;
00282 struct {
00283 UINT32 form_crdata4;
00284 UINT32 form_cidata4;
00285 } cdata4;
00286 struct {
00287 UINT64 form_crdata8;
00288 UINT64 form_cidata8;
00289 } cdata8;
00290 } value;
00291 } DST_CONST_VALUE;
00292
00293 #define DST_CONST_VALUE_form(c) ((c).form)
00294 #define DST_CONST_VALUE_form_string(c) ((c).value.form_string)
00295 #define DST_CONST_VALUE_form_data1(c) ((c).value.form_data1)
00296 #define DST_CONST_VALUE_form_data2(c) ((c).value.form_data2)
00297 #define DST_CONST_VALUE_form_data4(c) ((c).value.form_data4)
00298 #define DST_CONST_VALUE_form_data8(c) ((c).value.form_data8)
00299 #define DST_CONST_VALUE_form_crdata4(c) ((c).value.cdata4.form_crdata4)
00300 #define DST_CONST_VALUE_form_cidata4(c) ((c).value.cdata4.form_cidata4)
00301 #define DST_CONST_VALUE_form_crdata8(c) ((c).value.cdata8.form_crdata8)
00302 #define DST_CONST_VALUE_form_cidata8(c) ((c).value.cdata8.form_cidata8)
00303
00304
00305
00306
00307
00308
00309 typedef struct DST_include_dir
00310 {
00311 DST_STR_IDX path;
00312 DST_DIR_IDX next;
00313 } DST_INCLUDE_DIR;
00314
00315 #define DST_INCLUDE_DIR_path(dir) ((dir)->path)
00316 #define DST_INCLUDE_DIR_next(dir) ((dir)->next)
00317
00318
00319
00320
00321
00322 typedef struct DST_file_name
00323 {
00324 DST_STR_IDX name;
00325 UINT16 dir;
00326 UINT64 size;
00327 UINT64 modt;
00328 DST_FILE_IDX next;
00329 } DST_FILE_NAME;
00330
00331 #define DST_FILE_NAME_name(f) ((f)->name)
00332 #define DST_FILE_NAME_dir(f) ((f)->dir)
00333 #define DST_FILE_NAME_size(f) ((f)->size)
00334 #define DST_FILE_NAME_modt(f) ((f)->modt)
00335 #define DST_FILE_NAME_next(f) ((f)->next)
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347 typedef struct DST_info
00348 {
00349 DST_DW_tag tag;
00350 DST_flag flag;
00351 DST_INFO_IDX sibling;
00352 DST_ATTR_IDX attributes;
00353 DST_die_ptr dieptr;
00354 } DST_INFO;
00355
00356 #define DST_INFO_tag(info) ((info)->tag)
00357 #define DST_INFO_flag(info) ((info)->flag)
00358 #define DST_INFO_sibling(info) ((info)->sibling)
00359 #define DST_INFO_attributes(info) ((info)->attributes)
00360 #define DST_INFO_dieptr(info) ((info)->dieptr)
00361
00362
00363
00364
00365
00366
00367 typedef struct DST_CHILDREN
00368 {
00369 DST_INFO_IDX first;
00370 DST_INFO_IDX last;
00371 } DST_CHILDREN;
00372
00373
00374
00375
00376
00377
00378 typedef struct DST_compile_unit
00379 {
00380 DST_STR_IDX name;
00381 DST_STR_IDX comp_dir;
00382 DST_STR_IDX producer;
00383 DST_language language;
00384 DST_identifier_case identifier_case;
00385 DST_CHILDREN child;
00386 } DST_COMPILE_UNIT;
00387
00388 #define DST_COMPILE_UNIT_name(attr) ((attr)->name)
00389 #define DST_COMPILE_UNIT_comp_dir(attr) ((attr)->comp_dir)
00390 #define DST_COMPILE_UNIT_producer(attr) ((attr)->producer)
00391 #define DST_COMPILE_UNIT_language(attr) ((attr)->language)
00392 #define DST_COMPILE_UNIT_identifier_case(attr) ((attr)->identifier_case)
00393 #define DST_COMPILE_UNIT_first_child(attr) ((attr)->child.first)
00394 #define DST_COMPILE_UNIT_last_child(attr) ((attr)->child.last)
00395
00396
00397
00398
00399
00400
00401 typedef struct DST_inlined_subroutine
00402 {
00403 DST_ASSOC_INFO low_pc;
00404 DST_ASSOC_INFO high_pc;
00405 DST_INFO_IDX abstract_origin;
00406 DST_CHILDREN child;
00407 USRCPOS decl;
00408 DST_STR_IDX abstract_name;
00409 } DST_INLINED_SUBROUTINE;
00410
00411 #define DST_INLINED_SUBROUTINE_low_pc(attr) ((attr)->low_pc)
00412 #define DST_INLINED_SUBROUTINE_high_pc(attr) ((attr)->high_pc)
00413 #define DST_INLINED_SUBROUTINE_abstract_origin(attr)\
00414 ((attr)->abstract_origin)
00415 #define DST_INLINED_SUBROUTINE_first_child(attr) ((attr)->child.first)
00416 #define DST_INLINED_SUBROUTINE_last_child(attr) ((attr)->child.last)
00417 #define DST_INLINED_SUBROUTINE_decl(attr) ((attr)->decl)
00418 #define DST_INLINED_SUBROUTINE_abstract_name(attr) ((attr)->abstract_name)
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429 typedef struct DST_subpr_decl
00430 {
00431 USRCPOS decl;
00432 DST_STR_IDX name;
00433 DST_STR_IDX linkage_name;
00434 DST_INFO_IDX type;
00435 DST_inline inlin;
00436 DST_virtuality virtuality;
00437 DST_vtable_elem_location vtable_elem_location;
00438 DST_CHILDREN child;
00439 DST_INFO_IDX origin;
00440 } DST_SUBPR_DECL;
00441
00442 typedef struct DST_subpr_def
00443 {
00444 USRCPOS decl;
00445 DST_STR_IDX name;
00446 DST_STR_IDX linkage_name;
00447 DST_STR_IDX pubname;
00448 DST_INFO_IDX type;
00449 DST_ASSOC_INFO st;
00450 DST_inline inlin;
00451 DST_virtuality virtuality;
00452 DST_vtable_elem_location vtable_elem_location;
00453 DST_INFO_IDX specification;
00454
00455 DST_CHILDREN child;
00456 DST_INFO_IDX origin;
00457 } DST_SUBPR_DEF;
00458
00459 typedef struct DST_subpr_memdef
00460 {
00461 USRCPOS decl;
00462 DST_INFO_IDX spec;
00463 DST_ASSOC_INFO st;
00464 DST_CHILDREN child;
00465 } DST_SUBPR_MEMDEF;
00466
00467
00468
00469
00470 typedef union DST_subprogram
00471 {
00472 DST_SUBPR_MEMDEF memdef;
00473 DST_SUBPR_DECL decl;
00474 DST_SUBPR_DEF def;
00475 } DST_SUBPROGRAM;
00476
00477 #define DST_SUBPROGRAM_memdef_decl(attr) ((attr)->memdef.decl)
00478 #define DST_SUBPROGRAM_memdef_spec(attr) ((attr)->memdef.spec)
00479 #define DST_SUBPROGRAM_memdef_st(attr) ((attr)->memdef.st)
00480 #define DST_SUBPROGRAM_memdef_first_child(attr) ((attr)->memdef.child.first)
00481 #define DST_SUBPROGRAM_memdef_last_child(attr) ((attr)->memdef.child.last)
00482
00483 #define DST_SUBPROGRAM_decl_decl(attr) ((attr)->decl.decl)
00484 #define DST_SUBPROGRAM_decl_name(attr) ((attr)->decl.name)
00485 #define DST_SUBPROGRAM_decl_linkage_name(attr) ((attr)->decl.linkage_name)
00486 #define DST_SUBPROGRAM_decl_type(attr) ((attr)->decl.type)
00487 #define DST_SUBPROGRAM_decl_inline(attr) ((attr)->decl.inlin)
00488 #define DST_SUBPROGRAM_decl_virtuality(attr) ((attr)->decl.virtuality)
00489 #define DST_SUBPROGRAM_decl_vtable_elem_location(attr) \
00490 ((attr)->decl.vtable_elem_location)
00491 #define DST_SUBPROGRAM_decl_first_child(attr) ((attr)->decl.child.first)
00492 #define DST_SUBPROGRAM_decl_last_child(attr) ((attr)->decl.child.last)
00493 #define DST_SUBPROGRAM_decl_origin(attr) ((attr)->decl.origin)
00494
00495 #define DST_SUBPROGRAM_def_decl(attr) ((attr)->def.decl)
00496 #define DST_SUBPROGRAM_def_name(attr) ((attr)->def.name)
00497 #define DST_SUBPROGRAM_def_linkage_name(attr) ((attr)->def.linkage_name)
00498 #define DST_SUBPROGRAM_def_pubname(attr) ((attr)->def.pubname)
00499 #define DST_SUBPROGRAM_def_type(attr) ((attr)->def.type)
00500 #define DST_SUBPROGRAM_def_st(attr) ((attr)->def.st)
00501 #define DST_SUBPROGRAM_def_inline(attr) ((attr)->def.inlin)
00502 #define DST_SUBPROGRAM_def_virtuality(attr) ((attr)->def.virtuality)
00503 #define DST_SUBPROGRAM_def_vtable_elem_location(attr) \
00504 ((attr)->def.vtable_elem_location)
00505 #define DST_SUBPROGRAM_def_specification(attr) ((attr)->def.specification)
00506 #define DST_SUBPROGRAM_def_first_child(attr) ((attr)->def.child.first)
00507 #define DST_SUBPROGRAM_def_last_child(attr) ((attr)->def.child.last)
00508 #define DST_SUBPROGRAM_def_clone_origin(attr) ((attr)->def.origin)
00509
00510
00511
00512
00513
00514 typedef struct DST_entry_point
00515 {
00516 USRCPOS decl;
00517 DST_STR_IDX name;
00518 DST_INFO_IDX type;
00519 DST_ASSOC_INFO st;
00520 DST_CHILDREN child;
00521 } DST_ENTRY_POINT;
00522
00523 #define DST_ENTRY_POINT_decl(attr) ((attr)->decl)
00524 #define DST_ENTRY_POINT_name(attr) ((attr)->name)
00525 #define DST_ENTRY_POINT_type(attr) ((attr)->type)
00526 #define DST_ENTRY_POINT_st(attr) ((attr)->st)
00527 #define DST_ENTRY_POINT_first_child(attr) ((attr)->child.first)
00528 #define DST_ENTRY_POINT_last_child(attr) ((attr)->child.last)
00529
00530
00531
00532
00533 typedef struct DST_common_block
00534 {
00535 DST_STR_IDX name;
00536 DST_ASSOC_INFO st;
00537 DST_CHILDREN child;
00538 } DST_COMMON_BLOCK;
00539
00540 #define DST_COMMON_BLOCK_name(attr) ((attr)->name)
00541 #define DST_COMMON_BLOCK_st(attr) ((attr)->st)
00542 #define DST_COMMON_BLOCK_first_child(attr) ((attr)->child.first)
00543 #define DST_COMMON_BLOCK_last_child(attr) ((attr)->child.last)
00544
00545
00546
00547
00548
00549 typedef struct DST_common_incl
00550 {
00551 USRCPOS decl;
00552 DST_INFO_IDX com_blk;
00553 } DST_COMMON_INCL;
00554
00555 #define DST_COMMON_INCL_decl(attr) ((attr)->decl)
00556 #define DST_COMMON_INCL_com_blk(attr) ((attr)->com_blk)
00557
00558
00559
00560
00561
00562 typedef struct DST_lexical_block
00563 {
00564 DST_STR_IDX name;
00565 DST_ASSOC_INFO low_pc;
00566 DST_ASSOC_INFO high_pc;
00567 DST_INFO_IDX abstract_origin;
00568 DST_CHILDREN child;
00569 } DST_LEXICAL_BLOCK;
00570
00571 #define DST_LEXICAL_BLOCK_name(attr) ((attr)->name)
00572 #define DST_LEXICAL_BLOCK_low_pc(attr) ((attr)->low_pc)
00573 #define DST_LEXICAL_BLOCK_high_pc(attr) ((attr)->high_pc)
00574 #define DST_LEXICAL_BLOCK_abstract_origin(attr) ((attr)->abstract_origin)
00575 #define DST_LEXICAL_BLOCK_first_child(attr) ((attr)->child.first)
00576 #define DST_LEXICAL_BLOCK_last_child(attr) ((attr)->child.last)
00577
00578
00579
00580
00581
00582
00583 typedef struct DST_label
00584 {
00585 DST_STR_IDX name;
00586 DST_ASSOC_INFO low_pc;
00587 DST_INFO_IDX abstract_origin;
00588 } DST_LABEL;
00589
00590 #define DST_LABEL_name(attr) ((attr)->name)
00591 #define DST_LABEL_low_pc(attr) ((attr)->low_pc)
00592 #define DST_LABEL_abstract_origin(attr) ((attr)->abstract_origin)
00593
00594
00595
00596
00597
00598
00599
00600 typedef struct DST_var_decl
00601 {
00602 USRCPOS decl;
00603 DST_STR_IDX name;
00604 DST_INFO_IDX type;
00605 DST_STR_IDX linkage_name;
00606 } DST_VAR_DECL;
00607
00608 typedef struct DST_var_def
00609 {
00610 USRCPOS decl;
00611 DST_STR_IDX name;
00612 DST_INFO_IDX type;
00613 DST_ASSOC_INFO st;
00614 UINT64 offs;
00615 DST_INFO_IDX specification;
00616
00617 DST_INFO_IDX abstract_origin;
00618 DST_INFO_IDX dopetype;
00619 DST_STR_IDX linkage_name;
00620 } DST_VAR_DEF;
00621
00622 typedef struct DST_var_const
00623 {
00624 USRCPOS decl;
00625 DST_STR_IDX name;
00626 DST_INFO_IDX type;
00627 DST_CONST_VALUE cval;
00628 } DST_VAR_CONST;
00629
00630 typedef struct DST_var_comm
00631 {
00632 USRCPOS decl;
00633 DST_STR_IDX name;
00634 DST_INFO_IDX type;
00635 DST_ASSOC_INFO st;
00636 UINT64 offs;
00637 DST_INFO_IDX dopetype;
00638 } DST_VAR_COMM;
00639
00640
00641 typedef struct DST_var_memdef
00642 {
00643 USRCPOS decl;
00644 DST_ASSOC_INFO st;
00645 DST_INFO_IDX spec;
00646 } DST_VAR_MEMDEF;
00647
00648
00649
00650
00651 typedef union DST_variable
00652 {
00653 DST_VAR_DECL decl;
00654 DST_VAR_DEF def;
00655 DST_VAR_CONST constant;
00656 DST_VAR_COMM comm;
00657 DST_VAR_MEMDEF memdef;
00658 } DST_VARIABLE;
00659
00660 #define DST_VARIABLE_decl_decl(attr) ((attr)->decl.decl)
00661 #define DST_VARIABLE_decl_name(attr) ((attr)->decl.name)
00662 #define DST_VARIABLE_decl_type(attr) ((attr)->decl.type)
00663 #define DST_VARIABLE_decl_linkage_name(attr) ((attr)->decl.linkage_name)
00664
00665 #define DST_VARIABLE_def_decl(attr) ((attr)->def.decl)
00666 #define DST_VARIABLE_def_name(attr) ((attr)->def.name)
00667 #define DST_VARIABLE_def_type(attr) ((attr)->def.type)
00668 #define DST_VARIABLE_def_st(attr) ((attr)->def.st)
00669 #define DST_VARIABLE_def_offs(attr) ((attr)->def.offs)
00670 #define DST_VARIABLE_def_specification(attr) ((attr)->def.specification)
00671 #define DST_VARIABLE_def_linkage_name(attr) ((attr)->def.linkage_name)
00672 #define DST_VARIABLE_def_abstract_origin(attr) ((attr)->def.abstract_origin)
00673 #define DST_VARIABLE_def_dopetype(attr) ((attr)->def.dopetype)
00674
00675 #define DST_VARIABLE_constant_decl(attr) ((attr)->constant.decl)
00676 #define DST_VARIABLE_constant_name(attr) ((attr)->constant.name)
00677 #define DST_VARIABLE_constant_type(attr) ((attr)->constant.type)
00678 #define DST_VARIABLE_constant_cval(attr) ((attr)->constant.cval)
00679
00680 #define DST_VARIABLE_comm_decl(attr) ((attr)->comm.decl)
00681 #define DST_VARIABLE_comm_name(attr) ((attr)->comm.name)
00682 #define DST_VARIABLE_comm_type(attr) ((attr)->comm.type)
00683 #define DST_VARIABLE_comm_st(attr) ((attr)->comm.st)
00684 #define DST_VARIABLE_comm_offs(attr) ((attr)->comm.offs)
00685 #define DST_VARIABLE_comm_dopetype(attr) ((attr)->comm.dopetype)
00686
00687 #define DST_VARIABLE_memdef_decl(attr) ((attr)->memdef.decl)
00688 #define DST_VARIABLE_memdef_st(attr) ((attr)->memdef.st)
00689 #define DST_VARIABLE_memdef_spec(attr) ((attr)->memdef.spec)
00690
00691
00692
00693
00694
00695
00696
00697
00698 typedef struct DST_formal_parameter
00699 {
00700 USRCPOS decl;
00701 DST_STR_IDX name;
00702 DST_INFO_IDX type;
00703 DST_ASSOC_INFO st;
00704 DST_INFO_IDX abstract_origin;
00705 DST_INFO_IDX default_val;
00706 DST_INFO_IDX dopetype;
00707 } DST_FORMAL_PARAMETER;
00708
00709 #define DST_FORMAL_PARAMETER_decl(attr) ((attr)->decl)
00710 #define DST_FORMAL_PARAMETER_name(attr) ((attr)->name)
00711 #define DST_FORMAL_PARAMETER_type(attr) ((attr)->type)
00712 #define DST_FORMAL_PARAMETER_st(attr) ((attr)->st)
00713 #define DST_FORMAL_PARAMETER_abstract_origin(attr) ((attr)->abstract_origin)
00714 #define DST_FORMAL_PARAMETER_default_val(attr) ((attr)->default_val)
00715 #define DST_FORMAL_PARAMETER_dopetype(attr) ((attr)->dopetype)
00716
00717
00718
00719
00720
00721 typedef struct DST_unspecified_parameters
00722 {
00723 USRCPOS decl;
00724 DST_INFO_IDX abstract_origin;
00725 } DST_UNSPECIFIED_PARAMETERS;
00726
00727 #define DST_UNSPECIFIED_PARAMETERS_decl(attr) ((attr)->decl)
00728 #define DST_UNSPECIFIED_PARAMETERS_abstract_origin(attr)\
00729 ((attr)->abstract_origin)
00730
00731
00732
00733
00734
00735
00736 typedef struct DST_const_def
00737 {
00738 USRCPOS decl;
00739 DST_STR_IDX name;
00740 DST_INFO_IDX type;
00741 DST_CONST_VALUE cval;
00742 } DST_CONST_DEF;
00743
00744 typedef struct DST_const_decl
00745 {
00746 USRCPOS decl;
00747 DST_INFO_IDX name;
00748 DST_INFO_IDX type;
00749 } DST_CONST_DECL;
00750
00751 typedef union DST_constant
00752 {
00753 DST_CONST_DECL decl;
00754 DST_CONST_DEF def;
00755 } DST_CONSTANT;
00756
00757 #define DST_CONSTANT_decl_decl(attr) ((attr)->decl.decl)
00758 #define DST_CONSTANT_decl_name(attr) ((attr)->decl.name)
00759 #define DST_CONSTANT_decl_type(attr) ((attr)->decl.type)
00760
00761 #define DST_CONSTANT_def_decl(attr) ((attr)->def.decl)
00762 #define DST_CONSTANT_def_name(attr) ((attr)->def.name)
00763 #define DST_CONSTANT_def_type(attr) ((attr)->def.type)
00764 #define DST_CONSTANT_def_cval(attr) ((attr)->def.cval)
00765
00766
00767
00768
00769
00770 typedef struct DST_basetype
00771 {
00772 DST_STR_IDX name;
00773 DST_ATE_encoding encoding;
00774 DST_size_t byte_size;
00775 } DST_BASETYPE;
00776
00777 #define DST_BASETYPE_name(attr) ((attr)->name)
00778 #define DST_BASETYPE_encoding(attr) ((attr)->encoding)
00779 #define DST_BASETYPE_byte_size(attr) ((attr)->byte_size)
00780
00781
00782
00783
00784
00785
00786 typedef struct DST_qualified_type
00787 {
00788 DST_INFO_IDX type;
00789 } DST_QUALIFIED_TYPE;
00790
00791 typedef DST_QUALIFIED_TYPE DST_CONST_TYPE;
00792 #define DST_CONST_TYPE_type(attr) ((attr)->type)
00793
00794
00795
00796
00797
00798
00799 typedef DST_QUALIFIED_TYPE DST_VOLATILE_TYPE;
00800 #define DST_VOLATILE_TYPE_type(attr) ((attr)->type)
00801
00802
00803
00804
00805
00806
00807 typedef struct DST_pointer_type
00808 {
00809 DST_INFO_IDX type;
00810
00811
00812 DST_addr_class address_class;
00813
00814
00815 DST_size_t byte_size;
00816
00817 } DST_POINTER_TYPE;
00818
00819 #define DST_POINTER_TYPE_type(attr) ((attr)->type)
00820 #define DST_POINTER_TYPE_address_class(attr) ((attr)->address_class)
00821 #define DST_POINTER_TYPE_byte_size(attr) ((attr)->byte_size)
00822
00823
00824
00825
00826
00827
00828 typedef DST_POINTER_TYPE DST_REFERENCE_TYPE;
00829
00830 #define DST_REFERENCE_TYPE_type(attr) ((attr)->type)
00831 #define DST_REFERENCE_TYPE_address_class(attr) ((attr)->address_class)
00832 #define DST_REFERENCE_TYPE_byte_size(attr) ((attr)->byte_size)
00833
00834
00835
00836
00837
00838
00839 typedef struct DST_typedef
00840 {
00841 USRCPOS decl;
00842 DST_STR_IDX name;
00843 DST_INFO_IDX type;
00844 DST_INFO_IDX abstract_origin;
00845 } DST_TYPEDEF;
00846
00847 #define DST_TYPEDEF_decl(attr) ((attr)->decl)
00848 #define DST_TYPEDEF_name(attr) ((attr)->name)
00849 #define DST_TYPEDEF_type(attr) ((attr)->type)
00850 #define DST_TYPEDEF_abstract_origin(attr) ((attr)->abstract_origin)
00851
00852
00853
00854
00855
00856
00857 typedef struct DST_array_type
00858 {
00859 USRCPOS decl;
00860 DST_STR_IDX name;
00861 DST_INFO_IDX type;
00862 DST_size_t byte_size;
00863 DST_INFO_IDX abstract_origin;
00864 DST_CHILDREN child;
00865 } DST_ARRAY_TYPE;
00866
00867 #define DST_ARRAY_TYPE_decl(attr) ((attr)->decl)
00868 #define DST_ARRAY_TYPE_name(attr) ((attr)->name)
00869 #define DST_ARRAY_TYPE_type(attr) ((attr)->type)
00870 #define DST_ARRAY_TYPE_byte_size(attr) ((attr)->byte_size)
00871 #define DST_ARRAY_TYPE_abstract_origin(attr) ((attr)->abstract_origin)
00872 #define DST_ARRAY_TYPE_first_child(attr) ((attr)->child.first)
00873 #define DST_ARRAY_TYPE_last_child(attr) ((attr)->child.last)
00874
00875
00876
00877
00878
00879
00880 typedef union
00881 {
00882 DST_bounds_t cval;
00883 DST_INFO_IDX ref;
00884 } DST_cval_ref;
00885
00886 typedef struct DST_subrange_type
00887 {
00888 DST_cval_ref lower;
00889 DST_cval_ref upper;
00890 DST_cval_ref stride;
00891 } DST_SUBRANGE_TYPE;
00892
00893 #define DST_SUBRANGE_TYPE_count(attr) ((attr)->upper.cval - (attr)->lower.cval + 1)
00894 #define DST_SUBRANGE_TYPE_lower_cval(attr) ((attr)->lower.cval)
00895 #define DST_SUBRANGE_TYPE_upper_cval(attr) ((attr)->upper.cval)
00896 #define DST_SUBRANGE_TYPE_lower_ref(attr) ((attr)->lower.ref)
00897 #define DST_SUBRANGE_TYPE_upper_ref(attr) ((attr)->upper.ref)
00898 #define DST_SUBRANGE_TYPE_stride_ref(attr) ((attr)->stride.ref)
00899
00900
00901
00902
00903
00904 typedef struct DST_string_type
00905 {
00906 USRCPOS decl;
00907 DST_STR_IDX name;
00908 DST_cval_ref len;
00909 } DST_STRING_TYPE;
00910
00911 #define DST_STRING_TYPE_decl(attr) ((attr)->decl)
00912 #define DST_STRING_TYPE_name(attr) ((attr)->name)
00913 #define DST_STRING_TYPE_len_cval(attr) ((attr)->len.cval)
00914 #define DST_STRING_TYPE_len_ref(attr) ((attr)->len.ref)
00915
00916
00917
00918
00919
00920 typedef struct DST_structure_type
00921 {
00922 USRCPOS decl;
00923 DST_STR_IDX name;
00924 DST_size_t byte_size;
00925 DST_INFO_IDX abstract_origin;
00926 DST_INFO_IDX inheritance;
00927 DST_CHILDREN child;
00928 } DST_STRUCTURE_TYPE;
00929
00930 #define DST_STRUCTURE_TYPE_decl(attr) ((attr)->decl)
00931 #define DST_STRUCTURE_TYPE_name(attr) ((attr)->name)
00932 #define DST_STRUCTURE_TYPE_byte_size(attr) ((attr)->byte_size)
00933 #define DST_STRUCTURE_TYPE_abstract_origin(attr) ((attr)->abstract_origin)
00934 #define DST_STRUCTURE_TYPE_inheritance(attr) ((attr)->inheritance)
00935 #define DST_STRUCTURE_TYPE_first_child(attr) ((attr)->child.first)
00936 #define DST_STRUCTURE_TYPE_last_child(attr) ((attr)->child.last)
00937
00938
00939
00940
00941
00942
00943 typedef DST_STRUCTURE_TYPE DST_UNION_TYPE;
00944
00945 #define DST_UNION_TYPE_decl(attr) ((attr)->decl)
00946 #define DST_UNION_TYPE_name(attr) ((attr)->name)
00947 #define DST_UNION_TYPE_byte_size(attr) ((attr)->byte_size)
00948 #define DST_UNION_TYPE_abstract_origin(attr) ((attr)->abstract_origin)
00949 #define DST_UNION_TYPE_inheritance(attr) ((attr)->inheritance)
00950 #define DST_UNION_TYPE_first_child(attr) ((attr)->child.first)
00951 #define DST_UNION_TYPE_last_child(attr) ((attr)->child.last)
00952
00953
00954
00955
00956
00957
00958 typedef DST_STRUCTURE_TYPE DST_CLASS_TYPE;
00959
00960 #define DST_CLASS_TYPE_decl(attr) ((attr)->decl)
00961 #define DST_CLASS_TYPE_name(attr) ((attr)->name)
00962 #define DST_CLASS_TYPE_byte_size(attr) ((attr)->byte_size)
00963 #define DST_CLASS_TYPE_abstract_origin(attr) ((attr)->abstract_origin)
00964 #define DST_CLASS_TYPE_inheritance(attr) ((attr)->inheritance)
00965 #define DST_CLASS_TYPE_first_child(attr) ((attr)->child.first)
00966 #define DST_CLASS_TYPE_last_child(attr) ((attr)->child.last)
00967
00968
00969
00970
00971
00972
00973 typedef struct DST_member
00974 {
00975 USRCPOS decl;
00976 DST_STR_IDX name;
00977 DST_INFO_IDX type;
00978 DST_size_t memb_loc;
00979
00980 DST_size_t byte_size;
00981 DST_bitsize bit_offset;
00982 DST_bitsize bit_size;
00983 DST_INFO_IDX dopetype;
00984 } DST_MEMBER;
00985
00986 #define DST_MEMBER_decl(attr) ((attr)->decl)
00987 #define DST_MEMBER_name(attr) ((attr)->name)
00988 #define DST_MEMBER_type(attr) ((attr)->type)
00989 #define DST_MEMBER_memb_loc(attr) ((attr)->memb_loc)
00990 #define DST_MEMBER_byte_size(attr) ((attr)->byte_size)
00991 #define DST_MEMBER_bit_offset(attr) ((attr)->bit_offset)
00992 #define DST_MEMBER_bit_size(attr) ((attr)->bit_size)
00993 #define DST_MEMBER_dopetype(attr) ((attr)->dopetype)
00994
00995
00996
00997
00998
00999
01000 typedef struct DST_inheritance
01001 {
01002 USRCPOS decl;
01003 DST_INFO_IDX type;
01004 DST_virtuality virtuality;
01005 DST_size_t memb_loc;
01006
01007 } DST_INHERITANCE;
01008
01009 #define DST_INHERITANCE_decl(attr) ((attr)->decl)
01010 #define DST_INHERITANCE_type(attr) ((attr)->type)
01011 #define DST_INHERITANCE_virtuality(attr) ((attr)->virtuality)
01012 #define DST_INHERITANCE_memb_loc(attr) ((attr)->memb_loc)
01013
01014
01015
01016
01017
01018
01019 typedef struct DST_template_type_parameter
01020 {
01021 USRCPOS decl;
01022 DST_STR_IDX name;
01023 DST_INFO_IDX type;
01024 } DST_TEMPLATE_TYPE_PARAMETER;
01025
01026 #define DST_TEMPLATE_TYPE_PARAMETER_decl(attr) ((attr)->decl)
01027 #define DST_TEMPLATE_TYPE_PARAMETER_name(attr) ((attr)->name)
01028 #define DST_TEMPLATE_TYPE_PARAMETER_type(attr) ((attr)->type)
01029
01030
01031
01032
01033
01034
01035 typedef struct DST_template_value_parameter
01036 {
01037 USRCPOS decl;
01038 DST_STR_IDX name;
01039 DST_INFO_IDX type;
01040 DST_CONST_VALUE cval;
01041 } DST_TEMPLATE_VALUE_PARAMETER;
01042
01043 #define DST_TEMPLATE_VALUE_PARAMETER_decl(attr) ((attr)->decl)
01044 #define DST_TEMPLATE_VALUE_PARAMETER_name(attr) ((attr)->name)
01045 #define DST_TEMPLATE_VALUE_PARAMETER_type(attr) ((attr)->type)
01046 #define DST_TEMPLATE_VALUE_PARAMETER_cval(attr) ((attr)->cval)
01047
01048
01049
01050
01051
01052
01053
01054
01055 typedef struct DST_enumeration_type
01056 {
01057 USRCPOS decl;
01058 DST_STR_IDX name;
01059 DST_size_t byte_size;
01060 DST_INFO_IDX abstract_origin;
01061 DST_CHILDREN child;
01062 } DST_ENUMERATION_TYPE;
01063
01064 #define DST_ENUMERATION_TYPE_decl(attr) ((attr)->decl)
01065 #define DST_ENUMERATION_TYPE_name(attr) ((attr)->name)
01066 #define DST_ENUMERATION_TYPE_byte_size(attr) ((attr)->byte_size)
01067 #define DST_ENUMERATION_TYPE_abstract_origin(attr) ((attr)->abstract_origin)
01068 #define DST_ENUMERATION_TYPE_first_child(attr) ((attr)->child.first)
01069 #define DST_ENUMERATION_TYPE_last_child(attr) ((attr)->child.last)
01070
01071
01072
01073
01074
01075 typedef struct DST_enumerator
01076 {
01077 USRCPOS decl;
01078 DST_STR_IDX name;
01079 DST_CONST_VALUE cval;
01080 } DST_ENUMERATOR;
01081
01082 #define DST_ENUMERATOR_decl(attr) ((attr)->decl)
01083 #define DST_ENUMERATOR_name(attr) ((attr)->name)
01084 #define DST_ENUMERATOR_cval(attr) ((attr)->cval)
01085
01086
01087
01088
01089
01090
01091
01092 typedef struct DST_subroutine_type
01093 {
01094 USRCPOS decl;
01095 DST_STR_IDX name;
01096 DST_INFO_IDX type;
01097 DST_INFO_IDX abstract_origin;
01098 DST_CHILDREN child;
01099 } DST_SUBROUTINE_TYPE;
01100
01101 #define DST_SUBROUTINE_TYPE_decl(attr) ((attr)->decl)
01102 #define DST_SUBROUTINE_TYPE_name(attr) ((attr)->name)
01103 #define DST_SUBROUTINE_TYPE_type(attr) ((attr)->type)
01104 #define DST_SUBROUTINE_TYPE_abstract_origin(attr) ((attr)->abstract_origin)
01105 #define DST_SUBROUTINE_TYPE_first_child(attr) ((attr)->child.first)
01106 #define DST_SUBROUTINE_TYPE_last_child(attr) ((attr)->child.last)
01107
01108
01109
01110
01111
01112 typedef struct DST_ptr_to_member_type
01113 {
01114 DST_STR_IDX name;
01115 DST_INFO_IDX type;
01116 DST_INFO_IDX class_type;
01117 } DST_PTR_TO_MEMBER_TYPE;
01118
01119 #define DST_PTR_TO_MEMBER_TYPE_name(attr) ((attr)->name)
01120 #define DST_PTR_TO_MEMBER_TYPE_type(attr) ((attr)->type)
01121 #define DST_PTR_TO_MEMBER_TYPE_class_type(attr) ((attr)->class_type)
01122
01123
01124
01125
01126
01127
01128
01129
01130
01131
01132 #define DST_IDX_TO_PTR(i, btype) ((btype *)DST_idx_to_string(i))
01133 #define DST_INFO_IDX_TO_PTR(i) ((DST_INFO *)DST_idx_to_string(i))
01134 #define DST_ATTR_IDX_TO_PTR(i, attr_struct) DST_IDX_TO_PTR(i, attr_struct)
01135 #define DST_FILE_IDX_TO_PTR(i) ((DST_FILE_NAME *)DST_idx_to_string(i))
01136 #define DST_DIR_IDX_TO_PTR(i) ((DST_INCLUDE_DIR *)DST_idx_to_string(i))
01137 #define DST_STR_IDX_TO_PTR(i) ((char *)DST_idx_to_string(i))
01138
01139
01140
01141
01142
01143
01144
01145
01146
01147
01148
01149
01150 extern DST_INFO_IDX DST_first_child(DST_INFO_IDX parent);
01151 extern DST_INFO_IDX DST_last_child(DST_INFO_IDX parent);
01152
01153
01154
01155
01156
01157
01158
01159 extern void
01160 DST_append_child(DST_INFO_IDX parent, DST_INFO_IDX child);
01161
01162
01163
01164
01165
01166
01167
01168
01169
01170
01171
01172
01173
01174
01175 extern void
01176 DST_preorder_visit(
01177 DST_INFO_IDX i,
01178 INT32 init_val,
01179 INT32 (*action)(INT32, DST_DW_tag, DST_flag, DST_ATTR_IDX, DST_INFO_IDX));
01180
01181
01182 #ifdef __cplusplus
01183 }
01184 #endif
01185 #endif
01186