Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
dwarf_DST_dump.cxx File Reference
#include <stdio.h>
#include <cmplrs/rcodes.h>
#include "dwarf_DST.h"
#include "dwarf_DST_dump.h"
#include "errors.h"
Include dependency graph for dwarf_DST_dump.cxx:

Go to the source code of this file.

Defines

#define USE_DST_INTERNALS
#define DST_DUMP_LINELENGTH   1024
#define DST_TMP_BUF_LENGTH   256
#define DST_CHARS_DO_FIT(n)   (n <= (DST_DUMP_LINELENGTH - next_char - 5))
#define DST_ASSERT(truth, msg)   Is_True(truth, (msg))

Functions

static void DST_write_line (void)
static void DST_line_overflow (void)
static void DST_nput_char (size_t n, const char c)
static void DST_put_string (const char *c)
static void DST_put_idx (DST_IDX i)
static void DST_put_st_id (INT32 level, INT32 index)
static void DST_put_string_attribute (const char *at_name, DST_STR_IDX istr)
static void DST_put_idx_attribute (const char *at_name, DST_IDX i, BOOL is_type)
static void DST_put_hex64_attribute (const char *at_name, UINT64 num)
static void DST_put_INT32_attribute (const char *at_name, INT32 num)
static void DST_put_UINT32_attribute (const char *at_name, UINT32 num)
static void DST_put_INT64_attribute (const char *at_name, INT64 num)
static void DST_put_UINT64_attribute (const char *at_name, UINT64 num)
static void DST_put_inline_attribute (const char *at_name, DST_inline inlin)
static void DST_put_virtuality_attribute (const char *at_name, DST_virtuality virtuality)
static void DST_put_language_attribute (const char *at_name, DST_language lang_code)
static void DST_put_id_case_attribute (const char *at_name, DST_identifier_case id_case)
static void DST_put_decl (USRCPOS decl)
static void DST_put_assoc (const char *at_name, DST_flag flag, DST_ASSOC_INFO assoc)
static void DST_put_const_attribute (const char *at_name, DST_CONST_VALUE cval)
static void DST_put_compile_unit (DST_flag flag, DST_COMPILE_UNIT *attr)
static void DST_put_subprogram (DST_flag flag, DST_SUBPROGRAM *attr)
static void DST_put_inlined_subroutine (DST_flag flag, DST_INLINED_SUBROUTINE *attr)
static void DST_put_entry_point (DST_flag flag, DST_ENTRY_POINT *attr)
static void DST_put_common_block (DST_flag flag, DST_COMMON_BLOCK *attr)
static void DST_put_common_inclusion (DST_flag flag, DST_COMMON_INCL *attr)
static void DST_put_lexical_block (DST_flag flag, DST_LEXICAL_BLOCK *attr)
static void DST_put_label (DST_flag flag, DST_LABEL *attr)
static void DST_put_variable (DST_flag flag, DST_VARIABLE *attr)
static void DST_put_formal_parameter (DST_flag flag, DST_FORMAL_PARAMETER *attr)
static void DST_put_unspecified_parameters (DST_flag flag, DST_UNSPECIFIED_PARAMETERS *attr)
static void DST_put_basetype (DST_flag flag, DST_BASETYPE *attr)
static void DST_put_const_type (DST_flag flag, DST_CONST_TYPE *attr)
static void DST_put_constant (DST_flag flag, DST_CONSTANT *attr)
static void DST_put_volatile_type (DST_flag flag, DST_VOLATILE_TYPE *attr)
static void DST_put_pointer_type (DST_flag flag, DST_POINTER_TYPE *attr)
static void DST_put_reference_type (DST_flag flag, DST_REFERENCE_TYPE *attr)
static void DST_put_typedef (DST_flag flag, DST_TYPEDEF *attr)
static void DST_put_array_type (DST_flag flag, DST_ARRAY_TYPE *attr)
static void DST_put_subrange_type (DST_flag flag, DST_SUBRANGE_TYPE *attr)
static void DST_put_string_type (DST_flag flag, DST_STRING_TYPE *attr)
static void DST_put_structure_type (DST_flag flag, DST_STRUCTURE_TYPE *attr)
static void DST_put_class_type (DST_flag flag, DST_CLASS_TYPE *attr)
static void DST_put_union_type (DST_flag flag, DST_UNION_TYPE *attr)
static void DST_put_member (DST_flag flag, DST_MEMBER *attr)
static void DST_put_inheritance (DST_flag flag, DST_INHERITANCE *attr)
static void DST_put_template_type_param (DST_flag flag, DST_TEMPLATE_TYPE_PARAMETER *attr)
static void DST_put_template_value_param (DST_flag flag, DST_TEMPLATE_VALUE_PARAMETER *attr)
static void DST_put_enumeration_type (DST_flag flag, DST_ENUMERATION_TYPE *attr)
static void DST_put_enumerator (DST_flag flag, DST_ENUMERATOR *attr)
static void DST_put_subroutine_type (DST_flag flag, DST_SUBROUTINE_TYPE *attr)
static INT32 DST_dump_info (INT32 indentation, DST_DW_tag tag, DST_flag flag, DST_ATTR_IDX iattr, DST_INFO_IDX iinfo)
static void DST_dump_include_dirs (DST_DIR_IDX dir_idx, INT32 indentation)
static void DST_dump_files (DST_FILE_IDX file_idx, INT32 indentation)
static void DST_dump_block_kind (DST_BLOCK_KIND k)
void DST_dump (DST_DIR_IDX incl_dirs, DST_FILE_IDX files, DST_INFO_IDX compile_unit)
void Dump_DST (FILE *f)
void DST_set_dump_filename (char *file_name)

Variables

static char line_buffer [DST_DUMP_LINELENGTH]
static char tmp_buffer [DST_TMP_BUF_LENGTH]
static UINT32 next_char
static FILE * dumpf = NULL
static char * dumpf_name = NULL
static BOOL end_of_line = FALSE

Define Documentation

#define DST_ASSERT (   truth,
  msg 
)    Is_True(truth, (msg))

Definition at line 64 of file dwarf_DST_dump.cxx.

Referenced by DST_dump(), and DST_write_line().

#define DST_CHARS_DO_FIT (   n)    (n <= (DST_DUMP_LINELENGTH - next_char - 5))

Definition at line 54 of file dwarf_DST_dump.cxx.

Referenced by DST_nput_char(), and DST_put_string().

#define DST_DUMP_LINELENGTH   1024

Definition at line 47 of file dwarf_DST_dump.cxx.

#define DST_TMP_BUF_LENGTH   256

Definition at line 48 of file dwarf_DST_dump.cxx.

Definition at line 42 of file dwarf_DST_dump.cxx.


Function Documentation

static void DST_dump_block_kind ( DST_BLOCK_KIND  k) [static]

Definition at line 1162 of file dwarf_DST_dump.cxx.

References DST_file_names_block, DST_file_scope_block, DST_include_dirs_block, DST_local_scope_block, DST_macro_info_block, and DST_put_string().

Referenced by DST_dump().

Here is the call graph for this function:

static void DST_dump_include_dirs ( DST_DIR_IDX  dir_idx,
INT32  indentation 
) [static]
static INT32 DST_dump_info ( INT32  indentation,
DST_DW_tag  tag,
DST_flag  flag,
DST_ATTR_IDX  iattr,
DST_INFO_IDX  iinfo 
) [static]

Definition at line 939 of file dwarf_DST_dump.cxx.

References DST_ATTR_IDX_TO_PTR, DST_nput_char(), DST_put_array_type(), DST_put_basetype(), DST_put_class_type(), DST_put_common_block(), DST_put_common_inclusion(), DST_put_compile_unit(), DST_put_const_type(), DST_put_constant(), DST_put_entry_point(), DST_put_enumeration_type(), DST_put_enumerator(), DST_put_formal_parameter(), DST_put_idx(), DST_put_inheritance(), DST_put_inlined_subroutine(), DST_put_INT32_attribute(), DST_put_label(), DST_put_lexical_block(), DST_put_member(), DST_put_pointer_type(), DST_put_reference_type(), DST_put_string(), DST_put_string_type(), DST_put_structure_type(), DST_put_subprogram(), DST_put_subrange_type(), DST_put_subroutine_type(), DST_put_template_type_param(), DST_put_template_value_param(), DST_put_typedef(), DST_put_union_type(), DST_put_unspecified_parameters(), DST_put_variable(), DST_put_volatile_type(), DST_write_line(), DW_TAG_array_type, DW_TAG_base_type, DW_TAG_class_type, DW_TAG_common_block, DW_TAG_common_inclusion, DW_TAG_compile_unit, DW_TAG_const_type, DW_TAG_constant, DW_TAG_entry_point, DW_TAG_enumeration_type, DW_TAG_enumerator, DW_TAG_formal_parameter, DW_TAG_inheritance, DW_TAG_inlined_subroutine, DW_TAG_label, DW_TAG_lexical_block, DW_TAG_member, DW_TAG_pointer_type, DW_TAG_reference_type, DW_TAG_string_type, DW_TAG_structure_type, DW_TAG_subprogram, DW_TAG_subrange_type, DW_TAG_subroutine_type, DW_TAG_template_type_param, DW_TAG_template_value_param, DW_TAG_typedef, DW_TAG_union_type, DW_TAG_unspecified_parameters, DW_TAG_variable, DW_TAG_volatile_type, exit(), and RC_INTERNAL_ERROR.

Referenced by DST_dump().

Here is the call graph for this function:

static void DST_line_overflow ( void  ) [static]

Definition at line 90 of file dwarf_DST_dump.cxx.

References end_of_line, line_buffer, next_char, and TRUE.

Referenced by DST_nput_char(), and DST_put_string().

static void DST_put_basetype ( DST_flag  flag,
DST_BASETYPE attr 
) [static]

Definition at line 661 of file dwarf_DST_dump.cxx.

References DST_BASETYPE_byte_size, DST_BASETYPE_encoding, DST_FORMAL_PARAMETER_name, DST_put_INT32_attribute(), DST_put_string(), and DST_put_string_attribute().

Referenced by DST_dump_info().

Here is the call graph for this function:

static void DST_put_common_block ( DST_flag  flag,
DST_COMMON_BLOCK attr 
) [static]

Definition at line 508 of file dwarf_DST_dump.cxx.

References DST_ENTRY_POINT_name, DST_ENTRY_POINT_st, DST_put_assoc(), DST_put_string(), and DST_put_string_attribute().

Referenced by DST_dump_info().

Here is the call graph for this function:

static void DST_put_common_inclusion ( DST_flag  flag,
DST_COMMON_INCL attr 
) [static]

Definition at line 516 of file dwarf_DST_dump.cxx.

References DST_COMMON_INCL_com_blk, DST_COMMON_INCL_decl, DST_put_decl(), DST_put_idx_attribute(), DST_put_string(), and TRUE.

Referenced by DST_dump_info().

Here is the call graph for this function:

static void DST_put_const_type ( DST_flag  flag,
DST_CONST_TYPE attr 
) [static]

Definition at line 671 of file dwarf_DST_dump.cxx.

References DST_CONST_TYPE_type, DST_put_idx_attribute(), DST_put_string(), and TRUE.

Referenced by DST_dump_info().

Here is the call graph for this function:

static void DST_put_entry_point ( DST_flag  flag,
DST_ENTRY_POINT attr 
) [static]
static void DST_put_enumerator ( DST_flag  flag,
DST_ENUMERATOR attr 
) [static]

Definition at line 909 of file dwarf_DST_dump.cxx.

References DST_ENUMERATOR_cval, DST_ENUMERATOR_decl, DST_ENUMERATOR_name, DST_put_const_attribute(), DST_put_decl(), DST_put_string(), and DST_put_string_attribute().

Referenced by DST_dump_info().

Here is the call graph for this function:

static void DST_put_hex64_attribute ( const char *  at_name,
UINT64  num 
) [static]

Definition at line 208 of file dwarf_DST_dump.cxx.

References DST_put_string(), and tmp_buffer.

Referenced by DST_put_assoc().

Here is the call graph for this function:

static void DST_put_id_case_attribute ( const char *  at_name,
DST_identifier_case  id_case 
) [static]

Definition at line 331 of file dwarf_DST_dump.cxx.

References DST_nput_char(), DST_put_string(), DW_ID_case_insensitive, DW_ID_case_sensitive, DW_ID_down_case, and DW_ID_up_case.

Referenced by DST_put_compile_unit().

Here is the call graph for this function:

static void DST_put_idx ( DST_IDX  i) [static]

Definition at line 160 of file dwarf_DST_dump.cxx.

References DST_idx::block_idx, DST_idx::byte_idx, DST_put_string(), and tmp_buffer.

Referenced by DST_dump_files(), DST_dump_include_dirs(), DST_dump_info(), and DST_put_idx_attribute().

Here is the call graph for this function:

static void DST_put_inheritance ( DST_flag  flag,
DST_INHERITANCE attr 
) [static]

Definition at line 864 of file dwarf_DST_dump.cxx.

References DST_INHERITANCE_memb_loc, DST_INHERITANCE_type, DST_put_idx_attribute(), DST_put_INT32_attribute(), DST_put_string(), and TRUE.

Referenced by DST_dump_info().

Here is the call graph for this function:

static void DST_put_inline_attribute ( const char *  at_name,
DST_inline  inlin 
) [static]

Definition at line 251 of file dwarf_DST_dump.cxx.

References DST_nput_char(), DST_put_string(), DW_INL_declared_inlined, DW_INL_declared_not_inlined, DW_INL_inlined, and DW_INL_not_inlined.

Referenced by DST_put_subprogram().

Here is the call graph for this function:

static void DST_put_INT64_attribute ( const char *  at_name,
INT64  num 
) [static]

Definition at line 233 of file dwarf_DST_dump.cxx.

References DST_put_string(), and tmp_buffer.

Here is the call graph for this function:

static void DST_put_label ( DST_flag  flag,
DST_LABEL attr 
) [static]

Definition at line 534 of file dwarf_DST_dump.cxx.

References DST_LABEL_low_pc, DST_LABEL_name, DST_put_assoc(), DST_put_string(), and DST_put_string_attribute().

Referenced by DST_dump_info().

Here is the call graph for this function:

static void DST_put_language_attribute ( const char *  at_name,
DST_language  lang_code 
) [static]
static void DST_put_lexical_block ( DST_flag  flag,
DST_LEXICAL_BLOCK attr 
) [static]

Definition at line 524 of file dwarf_DST_dump.cxx.

References DST_LEXICAL_BLOCK_high_pc, DST_LEXICAL_BLOCK_low_pc, DST_LEXICAL_BLOCK_name, DST_put_assoc(), DST_put_string(), and DST_put_string_attribute().

Referenced by DST_dump_info().

Here is the call graph for this function:

static void DST_put_pointer_type ( DST_flag  flag,
DST_POINTER_TYPE attr 
) [static]
static void DST_put_reference_type ( DST_flag  flag,
DST_REFERENCE_TYPE attr 
) [static]
static void DST_put_st_id ( INT32  level,
INT32  index 
) [static]

Definition at line 167 of file dwarf_DST_dump.cxx.

References DST_put_string(), and tmp_buffer.

Referenced by DST_put_assoc().

Here is the call graph for this function:

static void DST_put_template_type_param ( DST_flag  flag,
DST_TEMPLATE_TYPE_PARAMETER attr 
) [static]

Definition at line 874 of file dwarf_DST_dump.cxx.

References DST_put_idx_attribute(), DST_put_string(), DST_put_string_attribute(), DST_TEMPLATE_TYPE_PARAMETER_name, DST_TEMPLATE_TYPE_PARAMETER_type, and TRUE.

Referenced by DST_dump_info().

Here is the call graph for this function:

static void DST_put_template_value_param ( DST_flag  flag,
DST_TEMPLATE_VALUE_PARAMETER attr 
) [static]

Definition at line 885 of file dwarf_DST_dump.cxx.

References DST_put_const_attribute(), DST_put_string(), DST_put_string_attribute(), DST_TEMPLATE_VALUE_PARAMETER_cval, and DST_TEMPLATE_VALUE_PARAMETER_name.

Referenced by DST_dump_info().

Here is the call graph for this function:

static void DST_put_typedef ( DST_flag  flag,
DST_TYPEDEF attr 
) [static]
static void DST_put_UINT32_attribute ( const char *  at_name,
UINT32  num 
) [static]

Definition at line 225 of file dwarf_DST_dump.cxx.

References DST_put_string(), and tmp_buffer.

Referenced by DST_dump_files(), DST_dump_include_dirs(), DST_put_const_attribute(), and DST_put_decl().

Here is the call graph for this function:

static void DST_put_UINT64_attribute ( const char *  at_name,
UINT64  num 
) [static]

Definition at line 241 of file dwarf_DST_dump.cxx.

References DST_put_string(), and tmp_buffer.

Referenced by DST_dump_files(), DST_put_const_attribute(), and DST_put_variable().

Here is the call graph for this function:

static void DST_put_unspecified_parameters ( DST_flag  flag,
DST_UNSPECIFIED_PARAMETERS attr 
) [static]

Definition at line 653 of file dwarf_DST_dump.cxx.

References DST_FORMAL_PARAMETER_decl, DST_put_decl(), and DST_put_string().

Referenced by DST_dump_info().

Here is the call graph for this function:

static void DST_put_virtuality_attribute ( const char *  at_name,
DST_virtuality  virtuality 
) [static]

Definition at line 274 of file dwarf_DST_dump.cxx.

References DST_nput_char(), DST_put_string(), DW_VIRTUALITY_none, DW_VIRTUALITY_pure_virtual, and DW_VIRTUALITY_virtual.

Referenced by DST_put_subprogram().

Here is the call graph for this function:

static void DST_put_volatile_type ( DST_flag  flag,
DST_VOLATILE_TYPE attr 
) [static]

Definition at line 689 of file dwarf_DST_dump.cxx.

References DST_put_idx_attribute(), DST_put_string(), DST_VOLATILE_TYPE_type, and TRUE.

Referenced by DST_dump_info().

Here is the call graph for this function:

void DST_set_dump_filename ( char *  file_name)

Definition at line 1250 of file dwarf_DST_dump.cxx.

References dumpf_name.

Referenced by cwh_dst_write().

static void DST_write_line ( void  ) [static]
void Dump_DST ( FILE *  f)

Definition at line 1238 of file dwarf_DST_dump.cxx.

References DST_dump(), DST_get_compile_unit(), DST_get_file_names(), DST_get_include_dirs(), dumpf, and NULL.

Referenced by ir_b2a().

Here is the call graph for this function:


Variable Documentation

FILE* dumpf = NULL [static]

Definition at line 59 of file dwarf_DST_dump.cxx.

Referenced by DST_dump(), DST_write_line(), and Dump_DST().

char* dumpf_name = NULL [static]

Definition at line 60 of file dwarf_DST_dump.cxx.

Referenced by DST_dump(), and DST_set_dump_filename().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines