move printing of stack trace headers from library to user's program

This commit is contained in:
2020-04-25 09:09:55 +04:00
parent 3e72295ee9
commit 1825515ca0
2 changed files with 6 additions and 4 deletions
-2
View File
@@ -165,7 +165,6 @@ bool pst_handler_handle_dwarf(pst_handler* h)
const char* pst_print_pretty(pst_handler* h)
{
h->ctx.clean_print(&h->ctx);
h->ctx.print(&h->ctx, "DWARF-based stack trace information:\n");
uint32_t idx = 0;
for(pst_function* fn = pst_handler_next_function(h, NULL); fn; fn = pst_handler_next_function(h, fn)) {
h->ctx.print(&h->ctx, "[%-2u] ", idx); idx++;
@@ -188,7 +187,6 @@ Dwfl_Callbacks callbacks = {
const char* pst_print_simple(pst_handler* h)
{
h->ctx.clean_print(&h->ctx);
h->ctx.print(&h->ctx, "Simple unwind-based stack trace:\n");
uint32_t idx = 0;
for(pst_function* fn = pst_handler_next_function(h, NULL); fn; fn = pst_handler_next_function(h, fn)) {
h->ctx.print(&h->ctx, "[%-2u] ", idx);