dont try to convert the pixfmt while calculating the "shade"
[AROS.git] / arch / m68k-all / exec / alert_cpu.c
blob2f272129fd751bfabd93fdd2a3a9e1e981adc045
1 /*
2 Copyright © 2010-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: CPU context parsing routines. Dummy nonfunctional template.
6 See code in arch/i386/all/exec/alert_cpu.c for working example.
7 Lang: english
8 */
10 #include <string.h>
12 #include <exec/rawfmt.h>
14 #include "exec_intern.h"
15 #include "exec_util.h"
17 AROS_UFP3(UBYTE*, SegTrack,
18 AROS_UFPA(ULONG, Address, A0),
19 AROS_UFPA(ULONG*, SegNum, A1),
20 AROS_UFPA(ULONG*, Offset, A2));
22 struct SegSem
24 struct SignalSemaphore seg_Semaphore;
25 APTR seg_Find;
27 #define SEG_SEM "SegTracker"
29 char *FormatCPUContext(char *buffer, struct ExceptionContext *ctx, struct ExecBase *SysBase)
31 struct SegSem *segSem;
32 VOID_FUNC dest = buffer ? RAWFMTFUNC_STRING : RAWFMTFUNC_SERIAL;
33 char *buf;
35 RawDoFmt("D0: %08lx %08lx %08lx %08lx\n"
36 "D4: %08lx %08lx %08lx %08lx\n"
37 "A0: %08lx %08lx %08lx %08lx\n"
38 "A4: %08lx %08lx %08lx %08lx\n"
39 "SR: %04x\n"
40 "PC: %08lx", ctx, dest, buffer);
41 buf = buffer + strlen(buffer);
43 segSem = (struct SegSem *)FindSemaphore(SEG_SEM);
44 if (segSem) {
45 ULONG SegNum, SegOffset, SegList;
46 Forbid();
47 UBYTE *name = AROS_UFC3(UBYTE*, segSem->seg_Find,
48 AROS_UFCA(ULONG, ctx->pc, A0),
49 AROS_UFCA(ULONG*, &SegNum, A1),
50 AROS_UFCA(ULONG*, &SegOffset, A2));
51 if (name) {
52 AROS_UFC3(UBYTE*, segSem->seg_Find,
53 AROS_UFCA(ULONG, ctx->pc, A0),
54 AROS_UFCA(ULONG*, &SegList, A1),
55 AROS_UFCA(ULONG*, &SegList, A2));
56 buf = NewRawDoFmt("\nSegTracker: %s\nHunk %ld, Offset $%08lx, SegList $%08lx\n", dest, buf, name, SegNum, SegOffset, SegList);
58 Permit();
60 return buf - 1;
63 /* Unwind a single stack frame */
64 APTR UnwindFrame(APTR fp, APTR *caller)
66 return NULL;