[PATCH 4/5] Support backtracing through elfutils (#70746)

Jan Kratochvil jan.kratochvil at redhat.com
Wed Oct 30 06:41:14 CET 2013


On Wed, 30 Oct 2013 00:25:11 +0100, Peter Hutterer wrote:
> +static int
> +getmodules_callback(Dwfl_Module *module,
> +                    void **userdata,
> +                    const char *module_name,
> +                    Dwarf_Addr module_low_addr, void *arg)
> +{
> +    struct getmodules_callback_arg *cbarg = arg;
> +    cbarg->name = dwfl_module_addrname(module, (GElf_Addr)cbarg->addr);

It was found in my example code on 32-bit hosts this causes:
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

->
       cbarg->name = dwfl_module_addrname(module, (GElf_Addr)(uintptr_t)cbarg->addr);


> +    return cbarg->name ? DWARF_CB_ABORT : DWARF_CB_OK;
> +}


Thanks,
Jan


More information about the xorg-devel mailing list