* src/threads/Makefile.am: Added mutex.h.
[cacao.git] / src / native / jvmti / dbg.h
index 6313e1364a13840d6a19e357d350c4da59c10da0..5c9bc127a03a5fb29adf016249f13570d13d4aed 100644 (file)
 
    Author: Martin Platter
 
-   Changes:             
-
-   
-   $Id: dbg.h 4357 2006-01-22 23:33:38Z twisti $
+   Changes:
 
 */
 
 /* at the moment linux/i386 is the only plattform available */
 #if defined(__LINUX__)  && defined (__I386__)
-#include <sys/ptrace.h>
-
-#define TRACEME ptrace(PTRACE_TRACEME, 0, 0, 0)
-#define GETREGS(pid, regs) ptrace(PTRACE_GETREGS, pid, 0, &regs)
-#define GETMEM(pid, addr) ptrace(PTRACE_PEEKDATA, pid, (caddr_t) addr, 0)
-#define ENABLEBRK(pid,ins,addr) ptrace(PTRACE_POKEDATA, pid, (caddr_t) addr, (ins & ~0x000000FF) | 0xcc)
-#define CONT(pid) ptrace(PTRACE_CONT, pid, 0, 0)
-#define DISABLEBRK(pid,ins,addr) ptrace(PTRACE_POKEDATA, pid, (caddr_t) addr, ins)
-#define GETIP(pid,ip) ptrace(PTRACE_GETREGS, pid, 0, &regs); \
-                      ip=regs.eip;
-#define SETIP(pid,ip) ip=regs.eip; \
-                      ptrace(PTRACE_SETREGS, pid, 0, &regs); 
+
+#ifndef _DBG_H
+#define _DBG_H
+
+#define TRAPINS 0xcc /* opcode for brk */
+#define TRAP __asm__("int3") 
+
+#endif
 #endif
 
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ */