1 /* src/native/jvmti/cacaodbg.h - contains cacao specifics for debugging support
3 Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
4 C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5 E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6 J. Wenninger, Institut f. Computersprachen - TU Wien
8 This file is part of CACAO.
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2, or (at
13 your option) any later version.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 Contact: cacao@complang.tuwien.ac.at
27 Authors: Martin Platter
32 $Id: cacao.c,v 3.165 2006/01/03 23:44:38 twisti Exp $
39 #include "threads/native/threads.h"
40 #include "native/jvmti/jvmti.h"
41 #include "native/include/java_lang_String.h"
60 void** new_address_ptr;
61 jmethodID catch_method;
62 jlocation catch_location;
64 jobject protection_domain;
67 unsigned char* class_data;
68 jint* new_class_data_len;
69 unsigned char** new_class_data;
70 jvmtiAddrLocationMap* map;
79 void* addr; /* memory address */
80 long orig; /* original memory content */
93 void* breakpointhandler;
97 struct brkpts jvmtibrkpt;
98 } cacaodbgcommunication;
100 cacaodbgcommunication *dbgcom;
102 #if defined(ENABLE_THREADS)
103 struct _jrawMonitorID {
104 java_lang_String *name;
109 threadobject* cacaothreadobj;
113 struct _threadmap* map;
118 struct threadmap thmap;
122 /* constants where system breakpoints are stored in the breakpoint table */
123 #define SETTHREADOBJECTBRK 0 /* used for EVENT_THREAD_START */
124 #define BEGINUSERBRK 1 /* here is where the first user breakpoint is
128 bool jdwp; /* debugger via jdwp */
129 bool jvmti; /* jvmti agent */
131 char *transport, *agentarg; /* arguments for jdwp transport and agent load */
132 bool suspend; /* should the virtual machine suspend on startup? */
134 extern pthread_mutex_t dbgcomlock;
136 void setup_jdwp_thread(char* transport);
137 void cacaobreakpointhandler();
138 jvmtiEnv* new_jvmtienv();
139 void set_jvmti_phase(jvmtiPhase p);
140 void fireEvent(genericEventData* data);
142 void agentload(char* opt_arg, bool agentbypath, lt_dlhandle *handle, char **libname);
144 void addbrkpt(void* addr, jmethodID method, jlocation location);
145 void setsysbrkpt(int sysbrk, void* addr);
146 jvmtiError allthreads (jint * threads_count_ptr, threadobject *** threads_ptr);
147 jthread getcurrentthread();
152 * These are local overrides for various environment variables in Emacs.
153 * Please do not remove this and leave it at the end of the file, where
154 * Emacs will automagically detect them.
155 * ---------------------------------------------------------------------
158 * indent-tabs-mode: t