Fix compilation warnings in unwind.c on 32-bit architectures.
On some architectures getuid is actually getuid32, so change the test
to use getpid instead of getuid.
* unwind.c (STACK_ENTRY_SYMBOL_FMT): Explicitly cast function_off_set
to unsigned long.
(queue_put_error): Change the 3rd argument's type to unsigned long.
* tests/stack-fcall.c (f1): Use getpid instead of getuid.
* tests/strace-k.test: Likewise.
int f1(int i)
{
- static uid_t (* volatile g)(void) = getuid;
+ static pid_t (* volatile g)(void) = getpid;
return g() + i;
}
$STRACE -h | grep '^-k' > /dev/null ||
skip_ 'strace -k is not available'
-args="-e getuid -k ./stack-fcall"
+args="-e getpid -k ./stack-fcall"
$STRACE $args > $LOG 2>&1 || {
cat $LOG
fail_ "$STRACE $args failed"
}
-expected='getuid f1 f0 main '
+expected='getpid f1 f0 main '
result=$(sed -n '1,/(main+0x[a-f0-9]\+) .*/ s/^.*(\([^+]\+\)+0x[a-f0-9]\+) .*/\1/p' $LOG |
tr '\n' ' ')
" > %s(%s+0x%lx) [0x%lx]\n", \
binary_filename, \
symbol_name, \
- function_off_set, \
+ (unsigned long) function_off_set, \
true_offset
#define STACK_ENTRY_NOSYMBOL_FMT \
" > %s() [0x%lx]\n", \
static void
queue_put_error(void *queue,
const char *error,
- unw_word_t ip)
+ unsigned long ip)
{
queue_put(queue, NULL, NULL, 0, ip, error);
}