diff options
author | Matthew Gingell <gingell@adacore.com> | 2005-11-15 14:54:25 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-11-15 14:54:25 +0100 |
commit | 748d8778ede2249ee70323886d36fcdd5c08248d (patch) | |
tree | 42a177a53177be2db515cfdae24464e13832f3a3 /gcc/ada/tb-gcc.c | |
parent | e1ac6e5b2140d274f5e37b948e3074a284c3c3e6 (diff) | |
download | gcc-748d8778ede2249ee70323886d36fcdd5c08248d.zip gcc-748d8778ede2249ee70323886d36fcdd5c08248d.tar.gz gcc-748d8778ede2249ee70323886d36fcdd5c08248d.tar.bz2 |
tb-gcc.c (trace_callback): Work around problem with _Unwind_GetIP on ia64 HP-UX.
2005-11-14 Matthew Gingell <gingell@adacore.com>
Olivier Hainque <hainque@adacore.com>
* 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.
From-SVN: r106964
Diffstat (limited to 'gcc/ada/tb-gcc.c')
-rw-r--r-- | gcc/ada/tb-gcc.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ada/tb-gcc.c b/gcc/ada/tb-gcc.c index 0fe923e..1a3566e 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 <uwx.h> +#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) { |