prism2.device: Compiler delint
[AROS.git] / arch / m68k-all / debug / debug_gdb.c
blob7372a95d74dcb52c5502c1ea9cf8c344b7c4d7c2
1 /*
2 Copyright © 2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Initialize the debug interface
6 Lang: english
7 */
9 #include <aros/symbolsets.h>
11 #include <proto/exec.h>
13 #ifdef AROS_MODULES_DEBUG
14 typedef ULONG size_t;
15 /* 'malloc' and 'free' are needed for GDB's strcmp(), which is
16 * used by the 'loadseg' method of the .gdbinit of AROS
18 void *malloc(ULONG size)
20 size_t *mem;
22 size = (size + sizeof(size_t) - 1) & ~(sizeof(size_t) - 1);
24 mem = AllocMem(size, -1);
25 *(mem++) = size;
26 return mem;
29 void free(void *ptr)
31 size_t *mem = ptr;
33 mem--;
34 FreeMem(mem, mem[0]);
36 #endif