2 Copyright © 2010-2012, The AROS Development Team. All rights reserved.
5 Desc: ARM CPU context parsing routines.
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"
21 char *FormatCPUContext(char *buffer
, struct ExceptionContext
*ctx
, struct ExecBase
*SysBase
)
23 VOID_FUNC dest
= buffer
? RAWFMTFUNC_STRING
: RAWFMTFUNC_SERIAL
;
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
,
36 APTR
UnwindFrame(APTR fp
, APTR
*caller
)