1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-12-23 03:53:43 +01:00

Fix some test failures on x86_64 on distros with small default stacks.

This commit is contained in:
Arun Sharma 2010-03-10 21:13:26 -08:00
parent 46ea10680d
commit 24112f6d9b

View file

@ -48,14 +48,17 @@ typedef RETSIGTYPE (*sighandler_t) (int);
int verbose;
int num_errors;
/* These variables are global because they
* cause the signal stack to overflow */
char buf[512], name[256];
unw_cursor_t cursor;
ucontext_t uc;
static void
do_backtrace (void)
{
char buf[512], name[256];
unw_word_t ip, sp, off;
unw_cursor_t cursor;
unw_proc_info_t pi;
unw_context_t uc;
int ret;
if (verbose)
@ -182,6 +185,8 @@ sighandler (int signal, void *siginfo, void *context)
# endif
#elif UNW_TARGET_X86
printf (" @ %lx", (unsigned long) uc->uc_mcontext.gregs[REG_EIP]);
#elif UNW_TARGET_X86_64
printf (" @ %lx", (unsigned long) uc->uc_mcontext.gregs[REG_RIP]);
#endif
printf ("\n");
}