From 986fb7dd6375783b9f492a215dd9d767575cdb7c Mon Sep 17 00:00:00 2001 From: charlet Date: Tue, 15 Nov 2005 13:54:25 +0000 Subject: 2005-11-14 Matthew Gingell Olivier Hainque * tb-gcc.c (trace_callback): Work around problem with _Unwind_GetIP on ia64 HP-UX. * tracebak.c (ia64 configuration): Enable _Unwind_Backtrace driven tracebacks on ia64 HP-UX and provide explanatory comment. Enable backtraces on ia64 GNU/Linux. (x86 configuration): Bump FRAME_LEVEL to 1 to ensure we retrieve a real base pointer from builtin_frame_address. Adjust BASE_SKIP accordingly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106964 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/tb-gcc.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'gcc/ada/tb-gcc.c') diff --git a/gcc/ada/tb-gcc.c b/gcc/ada/tb-gcc.c index 0fe923e53f8..1a3566ec379 100644 --- a/gcc/ada/tb-gcc.c +++ b/gcc/ada/tb-gcc.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 2004 Ada Core Technologies, Inc * + * Copyright (C) 2004-2005, AdaCore * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -54,10 +54,21 @@ typedef struct { * trace_callback * ******************/ +#if defined (__ia64__) && defined (__hpux__) +#include +#endif + static _Unwind_Reason_Code trace_callback (struct _Unwind_Context * uw_context, uw_data_t * uw_data) { - void * pc = (void *) _Unwind_GetIP (uw_context); + void * pc; + +#if defined (__ia64__) && defined (__hpux__) + /* Work around problem with _Unwind_GetIP on ia64 HP-UX. */ + uwx_get_reg ((struct uwx_env *) uw_context, UWX_REG_IP, (uint64_t *) &pc); +#else + pc = (void *) _Unwind_GetIP (uw_context); +#endif if (uw_data->n_frames_skipped < uw_data->n_frames_to_skip) { -- cgit v1.2.1