aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/framestate.c9
-rw-r--r--sysdeps/generic/unwind-dw2.c16
2 files changed, 13 insertions, 12 deletions
diff --git a/sysdeps/generic/framestate.c b/sysdeps/generic/framestate.c
index 31f86034ee..20d9d4596e 100644
--- a/sysdeps/generic/framestate.c
+++ b/sysdeps/generic/framestate.c
@@ -1,5 +1,5 @@
/* __frame_state_for unwinder helper function wrapper.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2001.
@@ -20,16 +20,11 @@
#include <dlfcn.h>
#include <stdlib.h>
+#define STATIC static
#define __frame_state_for fallback_frame_state_for
#include <unwind-dw2.c>
#undef __frame_state_for
-struct frame_state * fallback_frame_state_for (void *, struct frame_state *)
-#ifdef _LIBC
- attribute_hidden
-#endif
- ;
-
typedef struct frame_state * (*framesf)(void *pc, struct frame_state *);
struct frame_state *__frame_state_for (void *pc,
struct frame_state *frame_state);
diff --git a/sysdeps/generic/unwind-dw2.c b/sysdeps/generic/unwind-dw2.c
index ca0299468f..3a53156621 100644
--- a/sysdeps/generic/unwind-dw2.c
+++ b/sysdeps/generic/unwind-dw2.c
@@ -1,5 +1,5 @@
/* DWARF2 exception handling and frame unwind runtime interface routines.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,1999,2000,2001,2003 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -783,7 +783,7 @@ execute_cfa_program (const unsigned char *insn_ptr,
fs->regs.reg[reg].loc.reg = reg2;
}
break;
-
+
case DW_CFA_remember_state:
{
struct frame_state_reg_info *new_rs;
@@ -852,7 +852,7 @@ execute_cfa_program (const unsigned char *insn_ptr,
fs->regs.reg[reg].how = REG_SAVED_OFFSET;
fs->regs.reg[reg].loc.offset = offset;
break;
-
+
case DW_CFA_def_cfa_sf:
insn_ptr = read_uleb128 (insn_ptr, &ptrtmp);
fs->cfa_reg = ptrtmp;
@@ -971,12 +971,18 @@ typedef struct frame_state
char saved[DWARF_FRAME_REGISTERS+1];
} frame_state;
+#ifndef STATIC
+# define STATIC
+#endif
+
+STATIC
struct frame_state * __frame_state_for (void *, struct frame_state *);
/* Called from pre-G++ 3.0 __throw to find the registers to restore for
a given PC_TARGET. The caller should allocate a local variable of
`struct frame_state' and pass its address to STATE_IN. */
+STATIC
struct frame_state *
__frame_state_for (void *pc_target, struct frame_state *state_in)
{
@@ -1037,7 +1043,7 @@ uw_update_context_1 (struct _Unwind_Context *context, _Unwind_FrameState *fs)
/* Special handling here: Many machines do not use a frame pointer,
and track the CFA only through offsets from the stack pointer from
one frame to the next. In this case, the stack pointer is never
- stored, so it has no saved address in the context. What we do
+ stored, so it has no saved address in the context. What we do
have is the CFA from the previous stack frame. */
if (context->reg[fs->cfa_reg] == NULL)
cfa = context->cfa;
@@ -1106,7 +1112,7 @@ uw_update_context (struct _Unwind_Context *context, _Unwind_FrameState *fs)
/* Fill in CONTEXT for top-of-stack. The only valid registers at this
level will be the return address and the CFA. */
-
+
#define uw_init_context(CONTEXT) \
do { \
/* Do any necessary initialization to access arbitrary stack frames. \