DEFAULT_INCLUDES =
AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
-I$(srcdir)/../libdw -I$(srcdir)/../libdwelf \
- -I$(srcdir)/../libdwfl -I$(srcdir)/../libasm -I../debuginfod
+ -I$(srcdir)/../libdwfl -I$(srcdir)/../libdwfl_stacktrace \
+ -I$(srcdir)/../libasm -I../debuginfod
AM_LDFLAGS = -Wl,-rpath-link,../libelf:../libdw $(STACK_USAGE_NO_ERROR)
#include "../libdwfl/libdwflP.h"
/* XXX: Private header needed for find_procfile, sysprof_init_dwfl,
sample_set_initial_registers. */
+#include ELFUTILS_HEADER(dwfl_stacktrace)
/*************************************
* Includes: sysprof data structures *
* Dwfl and statistics table for multiple processes *
****************************************************/
+Dwflst_Process_Tracker *tracker = NULL;
+
/* This echoes lib/dynamicsizehash.* with some necessary modifications. */
typedef struct
{
static const Dwfl_Callbacks sample_callbacks =
{
- .find_elf = dwfl_linux_proc_find_elf,
+ .find_elf = dwflst_tracker_linux_proc_find_elf,
.find_debuginfo = dwfl_standard_find_debuginfo,
.debuginfo_path = &debuginfo_path,
};
static const Dwfl_Callbacks sample_callbacks =
{
- .find_elf = dwfl_linux_proc_find_elf,
+ .find_elf = dwflst_tracker_linux_proc_find_elf,
.find_debuginfo = nop_find_debuginfo, /* work with CFI only */
};
cached = true;
goto reuse;
}
- dwfl = dwfl_begin (&sample_callbacks);
+ dwfl = dwflst_tracker_dwfl_begin (tracker);
int err = dwfl_linux_proc_report (dwfl, pid);
if (err < 0)
(void)maxframes;
#else
fprintf(stderr, "\n=== starting eu-stacktrace ===\n");
+ tracker = dwflst_tracker_begin (&sample_callbacks);
/* TODO: For now, code the processing loop for sysprof only; generalize later. */
assert (input_format == FORMAT_SYSPROF);
if (output_fd != -1)
close (output_fd);
+ dwflst_tracker_end (tracker);
+
return EXIT_OK;
}