[Ltrace-devel] [PATCH v4] add library path to stack trace output when using -w

Petr Machata pmachata at redhat.com
Thu Oct 10 14:19:05 UTC 2013


I was about to apply this (and actually did, locally), but the
compilation fails on i386, so I won't push this.

> +		/* Verify that we can cast arch_addr_t to unw_word_t.  */

Actually, that we can safely cast arch_addr_t* to unw_word_t*.

> +			fprintf(options.output, " > %s(%s+0x%lx) [%p]\n",
> +					lib_name, fn_name, function_offset, ip);

0x%lx expects unsigned long argument, but on 32-bit systems,
function_offset is (typedef'd) unsigned int.  I think the reasonable
solution, now that we have the static assert up there, is to make
function_offset arch_addr_t as well, and replace 0x%lx with %p.

Thanks,
PM



More information about the Ltrace-devel mailing list