Better log messages, small user-visible info fixes

This commit is contained in:
2020-05-26 22:51:06 +04:00
parent 786cfddc95
commit 5b96c0524e
6 changed files with 10 additions and 7 deletions
+1 -1
View File
@@ -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;
+3 -3
View File
@@ -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);
}
+1
View File
@@ -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;
}
+1 -1
View File
@@ -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;