use the override options if specified
[AROS.git] / arch / armeb-all / exec / alert_cpu.c
blobfd1c4b47ac155edcbb4deb27644dd1909628980b
1 /*
2 Copyright © 2010-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: ARM CPU context parsing routines.
6 Lang: english
7 */
9 #include <exec/rawfmt.h>
10 #include <proto/exec.h>
12 #include "exec_intern.h"
13 #include "exec_util.h"
15 static const char *gpr_fmt = "R0=0x%08lx R1=0x%08lx R2 =0x%08lx R3 =0x%08lx\n"
16 "R4=0x%08lx R5=0x%08lx R6 =0x%08lx R7 =0x%08lx\n"
17 "R8=0x%08lx R9=0x%08lx R10=0x%08lx R11=0x%08lx\n"
18 "IP=0x%08lx SP=0x%08lx LR =0x%08lx PC =0x%08lx\n"
19 "CPSR=0x%08lx";
21 char *FormatCPUContext(char *buffer, struct ExceptionContext *ctx, struct ExecBase *SysBase)
23 VOID_FUNC dest = buffer ? RAWFMTFUNC_STRING : RAWFMTFUNC_SERIAL;
24 char *buf;
26 buf = NewRawDoFmt(gpr_fmt, dest, buffer,
27 ctx->r[0], ctx->r[1], ctx->r[2] , ctx->r[3] ,
28 ctx->r[4], ctx->r[5], ctx->r[6] , ctx->r[7] ,
29 ctx->r[8], ctx->r[9], ctx->r[10], ctx->r[11],
30 ctx->ip , ctx->sp , ctx->lr , ctx->pc ,
31 ctx->cpsr);
33 return buf - 1;
36 APTR UnwindFrame(APTR fp, APTR *caller)
38 APTR *frame = fp;
40 *caller = frame[0];
41 return frame[-1];