Example #1
0
int
dwarf_get_types(Dwarf_Debug dbg,
		Dwarf_Type ** types,
		Dwarf_Signed * ret_type_count, Dwarf_Error * error)
{
    int res;

    res =
       _dwarf_load_section(dbg,
		           dbg->de_debug_typenames_index,
			   &dbg->de_debug_typenames,
			   error);
    if (res != DW_DLV_OK) {
	return res;
    }

    return _dwarf_internal_get_pubnames_like_data(dbg, dbg->de_debug_typenames, dbg->de_debug_typenames_size, (Dwarf_Global **) types,	/* type 
																	   punning,
																	   Dwarf_Type 
																	   is never
																	   a
																	   completed 
																	   type */
						  ret_type_count,
						  error,
						  DW_DLA_TYPENAME_CONTEXT,
						  DW_DLE_DEBUG_TYPENAMES_LENGTH_BAD,
						  DW_DLE_DEBUG_TYPENAMES_VERSION_ERROR);

}
Example #2
0
int
dwarf_get_vars(Dwarf_Debug dbg,
    Dwarf_Var ** vars,
    Dwarf_Signed * ret_var_count, Dwarf_Error * error)
{
    int res = _dwarf_load_section(dbg, &dbg->de_debug_varnames,error);
    if (res != DW_DLV_OK) {
        return res;
    }
    if (!dbg->de_debug_abbrev.dss_size) {
        return (DW_DLV_NO_ENTRY);
    }

    return _dwarf_internal_get_pubnames_like_data(dbg, 
        dbg->de_debug_varnames.dss_data, 
        dbg->de_debug_varnames.dss_size, 
        (Dwarf_Global **) vars, /* Type punning for sections 
            with identical format. */
        ret_var_count,
        error,
        DW_DLA_VAR_CONTEXT,
        DW_DLA_VAR,
        DW_DLE_DEBUG_VARNAMES_LENGTH_BAD,
        DW_DLE_DEBUG_VARNAMES_VERSION_ERROR);
}
Example #3
0
int
dwarf_get_pubtypes(Dwarf_Debug dbg,
    Dwarf_Type ** types,
    Dwarf_Signed * ret_type_count, Dwarf_Error * error)
{
    int res = _dwarf_load_section(dbg, &dbg->de_debug_pubtypes,error);
    if (res != DW_DLV_OK) {
        return res;
    }
    if (!dbg->de_debug_pubtypes.dss_size) {
        return (DW_DLV_NO_ENTRY);
    }


    return _dwarf_internal_get_pubnames_like_data(dbg,
        dbg->de_debug_pubtypes.dss_data,
        dbg->de_debug_pubtypes.dss_size,
        (Dwarf_Global **) types, /* Type punning for sections
            with identical format. */
        ret_type_count, error,
        DW_DLA_PUBTYPES_CONTEXT,
        DW_DLA_GLOBAL, /* We don't have DW_DLA_PUBTYPES,
            so use DW_DLA_GLOBAL. */
        DW_DLE_DEBUG_PUBTYPES_LENGTH_BAD,
        DW_DLE_DEBUG_PUBTYPES_VERSION_ERROR);
}
Example #4
0
int
dwarf_get_globals(Dwarf_Debug dbg,
    Dwarf_Global ** globals,
    Dwarf_Signed * return_count, Dwarf_Error * error)
{
    int res = _dwarf_load_section(dbg, &dbg->de_debug_pubnames,error);
    if (res != DW_DLV_OK) {
        return res = 0;
    }
    if (!dbg->de_debug_pubnames.dss_size) {
        return (DW_DLV_NO_ENTRY);
    }


    return _dwarf_internal_get_pubnames_like_data(dbg,
        dbg->de_debug_pubnames.dss_data,
        dbg->de_debug_pubnames.dss_size,
        globals,
        return_count,
        error,
        DW_DLA_GLOBAL_CONTEXT,
        DW_DLA_GLOBAL,
        DW_DLE_PUBNAMES_LENGTH_BAD,
        DW_DLE_PUBNAMES_VERSION_ERROR);

}
Example #5
0
int
dwarf_get_globals (
    Dwarf_Debug		dbg,
    Dwarf_Global	**globals,
    Dwarf_Signed       *return_count,
    Dwarf_Error		*error
)
{


	return _dwarf_internal_get_pubnames_like_data(
		dbg,
		dbg->de_debug_pubnames,
		dbg->de_debug_pubnames_size,
		globals,
		return_count,
		error,
		DW_DLA_GLOBAL_CONTEXT,
		DW_DLE_PUBNAMES_LENGTH_BAD,
		DW_DLE_PUBNAMES_VERSION_ERROR);

}