Better log messages, small user-visible info fixes
This commit is contained in:
@@ -22,7 +22,7 @@ typedef enum {
|
||||
IS_PUBLIC = 0x00000040, ///< public member of class
|
||||
} pst_fun_flags;
|
||||
|
||||
|
||||
/// @brief information about function
|
||||
typedef struct {
|
||||
char* name; ///< demangled name of the function. NULL if function name resolution failed
|
||||
char* file; ///< file name where the function is defined. NULL if library failed to get file name
|
||||
@@ -70,6 +70,7 @@ typedef enum {
|
||||
PARAM_TYPE_FUNCPTR = 0x04000000, ///< pointer to function
|
||||
} pst_param_flags;
|
||||
|
||||
/// @brief information about parameter
|
||||
typedef struct {
|
||||
char* name; ///< parameter's name
|
||||
char* type_name; ///< name of parameter's type
|
||||
|
||||
+2
-1
@@ -84,9 +84,10 @@ const pst_function_info* pst_get_function_info(pst_function* function);
|
||||
int pst_get_register(pst_function* function, int regno, unw_word_t* val);
|
||||
|
||||
/**
|
||||
* @brief Check memory range of process to validity (i.e. that process has access to this range)
|
||||
* @brief Check memory range of process for validity (i.e. that process has access to this range)
|
||||
* @param p pointer to start of range
|
||||
* @param size size of range to check
|
||||
* @return zero if range of memory pointed by 'p' is valid
|
||||
*/
|
||||
int pst_pointer_valid(void *p, uint32_t size);
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ bool call_site_handle_dwarf(pst_call_site* site, Dwarf_Die* child)
|
||||
pst_dwarf_expr_fini(&loc);
|
||||
pst_log(SEVERITY_DEBUG, " DW_AT_GNU_call_site_value:\"%s\" ==> 0x%lX", site->ctx->buff, param->value);
|
||||
} else {
|
||||
pst_log(SEVERITY_ERROR, "Failed to calculate DW_AT_location expression: %s", site->ctx->buff);
|
||||
pst_log(SEVERITY_WARNING, "Failed to calculate DW_AT_location expression: %s", site->ctx->buff);
|
||||
del_param(param);
|
||||
pst_dwarf_expr_fini(&loc);
|
||||
return false;
|
||||
|
||||
@@ -158,7 +158,7 @@ static bool handle_lexical_block(pst_function* fn, Dwarf_Die* result)
|
||||
pst_log(SEVERITY_DEBUG, "Skipping Lexical block tag 'DW_TAG_inlined_subroutine'");
|
||||
break;
|
||||
default:
|
||||
pst_log(SEVERITY_DEBUG, "Unknown Lexical block tag 0x%X", dwarf_tag(&child));
|
||||
pst_log(SEVERITY_WARNING, "Unknown Lexical block tag 0x%X", dwarf_tag(&child));
|
||||
break;
|
||||
}
|
||||
}while (dwarf_siblingof (&child, &child) == 0);
|
||||
@@ -372,7 +372,7 @@ bool function_handle_dwarf(pst_function * fn, Dwarf_Die* d)
|
||||
// Also handle:
|
||||
// DW_AT_inline
|
||||
default:
|
||||
pst_log(SEVERITY_DEBUG, "Unknown TAG of function: 0x%X", dwarf_tag(&result));
|
||||
pst_log(SEVERITY_WARNING, "Unknown TAG of function: 0x%X", dwarf_tag(&result));
|
||||
break;
|
||||
}
|
||||
} while(dwarf_siblingof(&result, &result) == 0);
|
||||
@@ -464,7 +464,7 @@ void pst_function_fini(pst_function* fn)
|
||||
clear(fn);
|
||||
|
||||
if(fn->frame) {
|
||||
// use free here because it was allocated out of our control by libdw
|
||||
// use free() here because it was allocated out of our control by libdw
|
||||
free(fn->frame);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
// not implemented operations
|
||||
static bool dw_op_notimpl(pst_dwarf_stack* stack, const dwarf_op_map* map, Dwarf_Word op1, Dwarf_Word op2)
|
||||
{
|
||||
pst_log(SEVERITY_WARNING, "Not implemented DWARF operation %s(0x%X)", map->op_name, map->op_num);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -423,7 +423,7 @@ bool parameter_handle_dwarf(pst_parameter* param, Dwarf_Die* result, pst_functio
|
||||
param->info.value = param->location.value;
|
||||
param->info.flags |= PARAM_HAS_VALUE;
|
||||
} else {
|
||||
pst_log(SEVERITY_ERROR, "Failed to calculate DW_AT_location expression: %s", param->ctx->buff);
|
||||
pst_log(SEVERITY_WARNING, "Failed to calculate DW_AT_location expression: %s", param->ctx->buff);
|
||||
}
|
||||
} else if(dwarf_hasattr(result, DW_AT_const_value)) {
|
||||
param->info.flags |= PARAM_CONST;
|
||||
|
||||
Reference in New Issue
Block a user