[Ltrace-devel] [PATCH] Add support for using elfutils as unwinder.
Andreas Schwab
schwab at linux-m68k.org
Fri Aug 8 14:23:03 UTC 2014
Mark Wielaard <mjw at redhat.com> writes:
> @@ -880,6 +889,59 @@ proc_add_library(struct process *proc, struct library *lib)
> debug(DEBUG_PROCESS, "added library %s@%p (%s) to %d",
> lib->soname, lib->base, lib->pathname, proc->pid);
>
> +#if defined(HAVE_LIBDW)
> + if (options.bt_depth > 0) {
> + /* Setup module tracking for libdwfl unwinding. */
> + struct process *leader = proc->leader;
> + Dwfl *dwfl = leader->dwfl;
> + if (dwfl == NULL) {
> + static const Dwfl_Callbacks proc_callbacks = {
> + .find_elf = dwfl_linux_proc_find_elf,
> + .find_debuginfo = dwfl_standard_find_debuginfo
> + };
> + dwfl = dwfl_begin(&proc_callbacks);
> + if (dwfl == NULL)
> + fprintf(stderr,
> + "Couldn't initialize libdwfl unwinding "
> + "for process %d: %s\n", leader->pid,
> + dwfl_errmsg (-1));
> + }
> +
> + if (dwfl != NULL) {
> + dwfl_report_begin_add(dwfl);
> + if (dwfl_report_elf(dwfl, lib->soname,
> + lib->pathname, -1,
> + (GElf_Addr) lib->base,
> + false) == NULL)
proc.c: In function 'proc_add_library':
proc.c:944:6: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
(GElf_Addr) lib->base,
^
Andreas.
--
Andreas Schwab, schwab at linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Ltrace-devel
mailing list