[Ltrace-devel] [PATCH] Add support for using elfutils as unwinder.

Petr Machata pmachata at redhat.com
Tue Aug 12 08:04:56 UTC 2014


Andreas Schwab <schwab at linux-m68k.org> writes:

> 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,

Does this patch help?

diff --git a/proc.c b/proc.c
index bf2a172..6ac37e6 100644
--- a/proc.c
+++ b/proc.c
@@ -944,7 +944,8 @@ proc_add_library(struct process *proc, struct library *lib)
 		dwfl_module =
 			dwfl_report_elf(dwfl, lib->soname,
 					lib->pathname, -1,
-					(GElf_Addr) lib->base,
+					/* XXX double cast */
+					(GElf_Addr) (uintptr_t) lib->base,
 					false);
 		if (dwfl_module == NULL)
 			fprintf(stderr,

Thank you,
PM



More information about the Ltrace-devel mailing list