summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/unwind-dw2.c
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-11-07 02:43:04 +0000
committerkan <kan@FreeBSD.org>2003-11-07 02:43:04 +0000
commitb09448931ae541a7a60fd1cf0ebac14b627fba69 (patch)
tree980c917e2cc50183c4d566d9a0f9a1c818e6a6cd /contrib/gcc/unwind-dw2.c
parentdc227ec3ae9a56f16c472206f51e4838bb53a644 (diff)
downloadFreeBSD-src-b09448931ae541a7a60fd1cf0ebac14b627fba69.zip
FreeBSD-src-b09448931ae541a7a60fd1cf0ebac14b627fba69.tar.gz
Gcc 3.3.3 20031106.
Diffstat (limited to 'contrib/gcc/unwind-dw2.c')
-rw-r--r--contrib/gcc/unwind-dw2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/gcc/unwind-dw2.c b/contrib/gcc/unwind-dw2.c
index 6d7219e..0e59c7b 100644
--- a/contrib/gcc/unwind-dw2.c
+++ b/contrib/gcc/unwind-dw2.c
@@ -62,7 +62,7 @@ struct _Unwind_Context
};
/* Byte size of every register managed by these routines. */
-static unsigned char dwarf_reg_size_table[DWARF_FRAME_REGISTERS];
+static unsigned char dwarf_reg_size_table[DWARF_FRAME_REGISTERS+1];
/* The result of interpreting the frame unwind info for a frame.
@@ -171,7 +171,7 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index)
_Unwind_Word
_Unwind_GetCFA (struct _Unwind_Context *context)
{
- return (_Unwind_Ptr) context->cfa;
+ return (_Unwind_Word) context->cfa;
}
/* Overwrite the saved value for register REG in CONTEXT with VAL. */
@@ -929,6 +929,9 @@ uw_frame_state_for (struct _Unwind_Context *context, _Unwind_FrameState *fs)
context->args_size = 0;
context->lsda = 0;
+ if (context->ra == 0)
+ return _URC_END_OF_STACK;
+
fde = _Unwind_Find_FDE (context->ra - 1, &context->bases);
if (fde == NULL)
{
OpenPOWER on IntegriCloud