dw_handle DWENTRY DWString( dw_client cli, dw_loc_handle string_length, dw_size_t byte_size, const char * name, dw_addr_offset start_scope, uint flags ) { dw_handle new_hdl; abbrev_code abbrev; start_scope = start_scope; new_hdl = GetHandle( cli ); abbrev = string_length ? AB_STRING_WITH_LOC : AB_STRING; if( byte_size ) abbrev |= AB_BYTE_SIZE; emitCommonTypeInfo( cli, abbrev, name, flags ); /* AT_byte_size */ if( byte_size ) { InfoULEB128( cli, byte_size ); } /* AT_string_length */ if( string_length ) { EmitLocExpr( cli, DW_DEBUG_INFO, sizeof( uint_8), string_length ); } EndDIE( cli ); return( new_hdl ); }
void DWENTRY DWBeginStruct( dw_client cli, dw_handle struct_hdl, dw_size_t size, const char * name, dw_addr_offset start_scope, uint flags ) { abbrev_code abbrev; dw_st kind; start_scope = start_scope; SetHandleLocation( cli, struct_hdl ); kind = GetExtra( cli, struct_hdl )->structure.kind; switch( kind ){ case DW_ST_CLASS: abbrev = AB_CLASS_TYPE; break; case DW_ST_STRUCT: abbrev = AB_STRUCT_TYPE; break; case DW_ST_UNION: abbrev = AB_UNION_TYPE; break; } DestroyExtra( cli, struct_hdl ); abbrev |= AB_SIBLING | AB_START_REF; emitCommonTypeInfo( cli, abbrev , name, flags ); /* AT_byte_size */ InfoULEB128( cli, size ); EndDIE( cli ); StartChildren( cli ); }
dw_handle DWENTRY DWBeginArray( dw_client cli, dw_handle elt_type, uint stride_size, const char * name, dw_addr_offset start_scope, uint access_flags ) { dw_handle new_hdl; abbrev_code abbrev; start_scope = start_scope; new_hdl = GetHandle( cli ); _Validate( elt_type != 0 ); abbrev = AB_SIBLING; if( stride_size != 0 ) { abbrev |= AB_ARRAY_TYPE_WITH_STRIDE; } else { abbrev |= AB_ARRAY_TYPE; } emitCommonTypeInfo( cli, abbrev, name, access_flags ); /* AT_stride_size */ if( stride_size ) { InfoULEB128( cli, stride_size ); } EmitTypeRef( cli, elt_type ); EndDIE( cli ); StartChildren( cli ); return( new_hdl ); }
dw_handle DWENTRY DWAddBitField( dw_client cli, dw_handle field_hdl, dw_loc_handle loc, dw_size_t byte_size, uint bit_offset, uint bit_size, const char * name, uint flags ) { abbrev_code abbrev; dw_handle new_hdl; _Validate( field_hdl ); new_hdl = LabelNewHandle( cli ); abbrev = AB_BITFIELD; if( byte_size ) abbrev |= AB_BYTE_SIZE; StartDIE( cli, abbrev ); /* AT_accessibility */ EmitAccessFlags( cli, flags ); if( byte_size ) { /* AT_byte_size */ InfoULEB128( cli, byte_size ); } /* AT_bit_offset */ InfoULEB128( cli, bit_offset ); /* AT_bit_size */ InfoULEB128( cli, bit_size ); /* AT_artificial */ Info8( cli, (flags & DW_FLAG_ARTIFICIAL) != 0 ); if( name == NULL ) { name = ""; } /* AT_name */ InfoString( cli, name ); /* AT_data_member_location */ if( loc ) { EmitLocExpr( cli, DW_DEBUG_INFO, sizeof( uint_8), loc ); }else{ EmitLocExprNull( cli, DW_DEBUG_INFO, sizeof( uint_8) ); } /* AT_type */ EmitTypeRef( cli, field_hdl ); EndDIE( cli ); return( new_hdl ); }
void DWENTRY DWAddConstant( dw_client cli, dw_uconst value, const char * name ) { StartDIE( cli, AB_ENUMERATOR ); InfoULEB128( cli, value ); InfoString( cli, name ); EndDIE( cli ); }
void DWENTRY DWArrayDimension( dw_client cli, const dw_dim_info * dim_info ) { abbrev_code abbrev; abbrev = AB_ARRAY_BOUND; if( dim_info->index_type != 0 ) { abbrev |= AB_TYPE; } StartDIE( cli, abbrev ); if( dim_info->index_type != 0 ) { EmitTypeRef( cli, dim_info->index_type ); } /* AT_lower_bound */ InfoULEB128( cli, dim_info->lo_data ); /* AT_upper_bound */ InfoULEB128( cli, dim_info->hi_data ); EndDIE( cli ); }
dw_handle DWENTRY DWSimpleArray( dw_client cli, dw_handle elt_type, int elt_count ) { dw_handle new_hdl; abbrev_code abbrev; new_hdl = GetHandle( cli ); _Validate( elt_type != 0 ); abbrev = AB_SIMPLE_ARRAY_TYPE; StartDIE( cli, abbrev ); InfoULEB128( cli, elt_count ); EmitTypeRef( cli, elt_type ); EndDIE( cli ); return( new_hdl ); }
dw_handle DWENTRY DWBeginEnumeration( dw_client cli, dw_size_t byte_size, const char * name, dw_addr_offset start_scope, uint flags ) { dw_handle new_hdl; abbrev_code abbrev; start_scope = start_scope; new_hdl = GetHandle( cli ); abbrev = AB_ENUMERATION | AB_SIBLING; emitCommonTypeInfo( cli, abbrev, name, flags ); /* AT_byte_size */ InfoULEB128( cli, byte_size ); EndDIE( cli ); StartChildren( cli ); return( new_hdl ); }