Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / libjava / classpath / gnu / classpath / jdwp / JdwpConstants.java
blobf38774d622e62e6a69a5144d8e562cbcd4b54852
1 /* JdwpConstants.java -- Constants defined by JDWP 1.4 specification
2 Copyright (C) 2005 Free Software Foundation
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 02110-1301 USA.
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 terms of your choice, provided that you also meet, for each linked
32 independent module, the terms and conditions of the license of that
33 module. An independent module is a module which is not derived from
34 or based on this library. If you modify this library, you may extend
35 this exception to your version of the library, but you are not
36 obligated to do so. If you do not wish to do so, delete this
37 exception statement from your version. */
40 package gnu.classpath.jdwp;
42 /**
43 * Constants defined by JDWP specification.
45 * @author Keith Seitz (keiths@redhat.com)
47 public class JdwpConstants
49 public static final class Version
51 public static final int MAJOR = 1;
52 public static final int MINOR = 4;
55 ////////////////////////////////////////
56 // Commands/Sets //
57 ////////////////////////////////////////
59 public static final class CommandSet
61 public static final class VirtualMachine
63 public static final byte CS_VALUE = 1;
65 // commands
66 public static final byte VERSION = 1;
67 public static final byte CLASSES_BY_SIGNATURE = 2;
68 public static final byte ALL_CLASSES = 3;
69 public static final byte ALL_THREADS = 4;
70 public static final byte TOP_LEVEL_THREAD_GROUPS = 5;
71 public static final byte DISPOSE = 6;
72 public static final byte IDSIZES = 7;
73 public static final byte SUSPEND = 8;
74 public static final byte RESUME = 9;
75 public static final byte EXIT = 10;
76 public static final byte CREATE_STRING = 11;
77 public static final byte CAPABILITIES = 12;
78 public static final byte CLASS_PATHS = 13;
79 public static final byte DISPOSE_OBJECTS = 14;
80 public static final byte HOLD_EVENTS = 15;
81 public static final byte RELEASE_EVENTS = 16;
82 public static final byte CAPABILITIES_NEW = 17;
83 public static final byte REDEFINE_CLASSES = 18;
84 public static final byte SET_DEFAULT_STRATUM = 19;
85 public static final byte ALL_CLASSES_WITH_GENERIC = 20;
88 public static final class ReferenceType
90 public static final byte CS_VALUE = 2;
92 // commands
93 public static final byte SIGNATURE= 1;
94 public static final byte CLASS_LOADER= 2;
95 public static final byte MODIFIERS = 3;
96 public static final byte FIELDS = 4;
97 public static final byte METHODS = 5;
98 public static final byte GET_VALUES = 6;
99 public static final byte SOURCE_FILE = 7;
100 public static final byte NESTED_TYPES = 8;
101 public static final byte STATUS = 9;
102 public static final byte INTERFACES= 10;
103 public static final byte CLASS_OBJECT = 11;
104 public static final byte SOURCE_DEBUG_EXTENSION = 12;
105 public static final byte SIGNATURE_WITH_GENERIC = 13;
106 public static final byte FIELDS_WITH_GENERIC = 14;
107 public static final byte METHODS_WITH_GENERIC = 15;
110 public static final class ClassType
112 public static final byte CS_VALUE = 3;
114 // commands
115 public static final byte SUPERCLASS = 1;
116 public static final byte SET_VALUES = 2;
117 public static final byte INVOKE_METHOD = 3;
118 public static final byte NEW_INSTANCE = 4;
121 public static final class ArrayType
123 public static final byte CS_VALUE = 4;
125 // commands
126 public static final byte NEW_INSTANCE = 1;
129 public static final class InterfaceType
131 public static final byte CS_VALUE = 5;
133 // commands
136 public static final class Method
138 public static final byte CS_VALUE = 6;
140 // commands
141 public static final byte LINE_TABLE = 1;
142 public static final byte VARIABLE_TABLE = 2;
143 public static final byte BYTE_CODES = 3;
144 public static final byte IS_OBSOLETE = 4;
145 public static final byte VARIABLE_TABLE_WITH_GENERIC = 5;
148 public static final class Field
150 public static final byte CS_VALUE = 8;
152 // commands
155 public static final class ObjectReference
157 public static final byte CS_VALUE = 9;
159 // commands
160 public static final byte REFERENCE_TYPE = 1;
161 public static final byte GET_VALUES = 2;
162 public static final byte SET_VALUES = 3;
163 public static final byte MONITOR_INFO = 5;
164 public static final byte INVOKE_METHOD = 6;
165 public static final byte DISABLE_COLLECTION = 7;
166 public static final byte ENABLE_COLLECTION = 8;
167 public static final byte IS_COLLECTED = 9;
170 public static final class StringReference
172 public static final byte CS_VALUE = 10;
174 // commands
175 public static final byte VALUE = 1;
178 public static final class ThreadReference
180 public static final byte CS_VALUE = 11;
182 // commands
183 public static final byte NAME = 1;
184 public static final byte SUSPEND = 2;
185 public static final byte RESUME = 3;
186 public static final byte STATUS = 4;
187 public static final byte THREAD_GROUP = 5;
188 public static final byte FRAMES = 6;
189 public static final byte FRAME_COUNT = 7;
190 public static final byte OWNED_MONITORS = 8;
191 public static final byte CURRENT_CONTENDED_MONITOR = 9;
192 public static final byte STOP = 10;
193 public static final byte INTERRUPT = 11;
194 public static final byte SUSPEND_COUNT = 12;
197 public static final class ThreadGroupReference
199 public static final byte CS_VALUE = 12;
201 // commands
202 public static final byte NAME = 1;
203 public static final byte PARENT = 2;
204 public static final byte CHILDREN = 3;
207 public static final class ArrayReference
209 public static final byte CS_VALUE = 13;
211 // commands
212 public static final byte LENGTH = 1;
213 public static final byte GET_VALUES = 2;
214 public static final byte SET_VALUES = 3;
217 public static final class ClassLoaderReference
219 public static final byte CS_VALUE = 14;
221 // commands
222 public static final byte VISIBLE_CLASSES = 1;
225 public static final class EventRequest
227 public static final byte CS_VALUE = 15;
229 // commands
230 public static final byte SET = 1;
231 public static final byte CLEAR = 2;
232 public static final byte CLEAR_ALL_BREAKPOINTS = 3;
235 public static final class StackFrame
237 public static final byte CS_VALUE = 16;
239 // commands
240 public static final byte GET_VALUES = 1;
241 public static final byte SET_VALUES = 2;
242 public static final byte THIS_OBJECT = 3;
243 public static final byte POP_FRAMES = 4;
246 public static final class ClassObjectReference
248 public static final byte CS_VALUE = 17;
250 // commands
251 public static final byte REFLECTED_TYPE = 1;
254 public static final int MAXIMUM = ClassObjectReference.CS_VALUE;
256 public static final class Event
258 public static final byte CS_VALUE = 64;
260 // commands
261 public static final byte COMPOSITE = 100;
265 ////////////////////////////////////////
266 // Constants //
267 ////////////////////////////////////////
270 * Error constants
272 public static final class Error
275 * No error has occurred
277 public static final short NONE = 0;
280 * Passed thread is null, is not a valid thread or has exited
282 public static final short INVALID_THREAD = 10;
285 * Thread group invalid
287 public static final short INVALID_THREAD_GROUP = 11;
290 * Invalid priority
292 public static final short INVALID_PRIORITY = 12;
295 * Specified thread has not been suspended by an event
297 public static final short THREAD_NOT_SUSPENDED = 13;
300 * Thread already suspended
302 public static final short THREAD_SUSPENDED = 14;
305 * Reference type has been unloaded and garbage collected
307 public static final short INVALID_OBJECT = 20;
310 * Invalid class
312 public static final short INVALID_CLASS = 21;
315 * Class has been loaded but not yet prepared
317 public static final short CLASS_NOT_PREPARED = 22;
320 * Invalid method
322 public static final short INVALID_METHODID = 23;
325 * Invalid location
327 public static final short INVALID_LOCATION = 24;
330 * Invalid field
332 public static final short INVALID_FIELDID = 25;
335 * Invaliid frame
337 public static final short INVALID_FRAMEID = 30;
340 * There are no more Java or JNI frames on the call stack
342 public static final short NO_MORE_FRAMES = 31;
345 * Information about the frame is not available
347 public static final short OPAQUE_FRAME = 32;
350 * Operation can only be performed on current frame
352 public static final short NOT_CURRENT_FRAME = 33;
355 * Variable is not an appropriate type for the function used
357 public static final short TYPE_MISMATCH = 34;
360 * Invalid slot
362 public static final short INVALID_SLOT = 35;
365 * Item already set
367 public static final short DUPLICATE = 40;
370 * Desired element not found
372 public static final short NOT_FOUND = 41;
375 * Invalid monitor
377 public static final short INVALID_MONITOR = 50;
380 * Thread doesn't own the monitor
382 public static final short NOT_MONITOR_OWNER = 51;
385 * Call has been interrupted before completion
387 public static final short INTERRUPT = 52;
390 * Virtual machine attempted to read a class file and determined that
391 * the file is malformed or otherwise cannot be interpreted as a class
392 * file
394 public static final short INVALID_CLASS_FORMAT = 60;
397 * Circularity has been detected while initializing a class
399 public static final short CIRCULAR_CLASS_DEFINITION = 61;
402 * Verifier detected that a class file, though well formed, contained
403 * some sort of internal inconsistency or security problem
405 public static final short FAILS_VERIFICATION = 62;
408 * Adding methods has not been implemented
410 public static final short ADD_METHOD_NOT_IMPLEMENTED = 63;
413 * Schema change has not been implemented
415 public static final short SCHEMA_CHANGE_NOT_IMPLEMENTED = 64;
418 * State of the thread has been modified and is now inconsistent
420 public static final short INVALID_TYPESTATE = 65;
423 * A direct superclass is different for the new class version, or the set
424 * of directly implemented interfaces is different and
425 * <code>canUnrestrictedlyRedefineClasses</code> is false
427 public static final short HIERARCHY_CHANGE_NOT_IMPLEMENTED = 66;
430 * New class version does not declare a method declared in the old
431 * class version and <code>canUnrestrictedlyRedefineClasses</code>
432 * is false
434 public static final short DELETE_METHOD_NOT_IMPLEMENTED = 67;
437 * Class file has a version number not supported by this VM
439 public static final short UNSUPPORTED_VERSION = 68;
442 * Class name defined in the new class file is different from the name
443 * in the old class object
445 public static final short NAMES_DONT_MATCH = 69;
448 * New class version has different modifiers and
449 * <code>canUnrestrictedlyRedefineClasses</code> is false
451 public static final short CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED = 70;
454 * A method in the new class version has different modifiers than its
455 * counterpart in the old class version and
456 * <code>canUnrestrictedlyRedefineClasses</code> is false.
458 public static final short METHOD_MODIFIERS_CHANGE_NOT_IMPLEMENTED = 71;
461 * Functionality is not implemented in this virtual machine
463 public static final short NOT_IMPLEMENTED = 99;
466 * Invalid pointer
468 public static final short NULL_POINTER = 100;
471 * Desired information is not available
473 public static final short ABSENT_INFORMATION = 101;
476 * Specified event type id is not recognized
478 public static final short INVALID_EVENT_TYPE = 102;
481 * Illegal argument
483 public static final short ILLEGAL_ARGUMENT = 103;
486 * The function needed to allocate memory and no more memory was
487 * available for allocation
489 public static final short OUT_OF_MEMORY = 110;
492 * Debugging has not been enabled in this virtual machine. JVMDI cannot
493 * be used
495 public static final short ACCESS_DENIED = 111;
498 * The virtual machine is not running
500 public static final short VM_DEAD = 112;
503 * An unexpected internal error has occurred
505 public static final short INTERNAL = 113;
508 * The thread being used to call this function is not attached to the
509 * virtual machine. Calls must be made from attached threads.
511 public static final short UNATTACHED_THREAD = 115;
514 * Invalid object type id or class tag
516 public static final short INVALID_TAG = 500;
519 * Previous invoke not complete
521 public static final short ALREADY_INVOKING = 502;
524 * Invalid index
526 public static final short INVALID_INDEX = 503;
529 * Invalid length
531 public static final short INVALID_LENGTH = 504;
534 * Invalid string
536 public static final short INVALID_STRING = 506;
539 * Invalid class loader
541 public static final short INVALID_CLASS_LOADER = 507;
544 * Invalid array
546 public static final short INVALID_ARRAY = 508;
549 * Unable to load the transport
551 public static final short TRANSPORT_LOAD = 509;
554 * Unablie to initialize the transport
556 public static final short TRANSPORT_INIT = 510;
559 * Method is native
561 public static final short NATIVE_METHOD = 511;
564 * Invalid count
566 public static final short INVALID_COUNT = 512;
570 * EventKind constants
572 public static final class EventKind
574 public static final byte SINGLE_STEP = 1;
575 public static final byte BREAKPOINT = 2;
576 public static final byte FRAME_POP = 3;
577 public static final byte EXCEPTION = 4;
578 public static final byte USER_DEFINED = 5;
579 public static final byte THREAD_START = 6;
580 public static final byte THREAD_END = 7;
581 public static final byte CLASS_PREPARE = 8;
582 public static final byte CLASS_UNLOAD = 9;
583 public static final byte CLASS_LOAD = 10;
584 public static final byte FIELD_ACCESS = 20;
585 public static final byte FIELD_MODIFICATION = 21;
586 public static final byte EXCEPTION_CATCH = 30;
587 public static final byte METHOD_ENTRY = 40;
588 public static final byte METHOD_EXIT = 41;
589 public static final byte VM_INIT = 90;
590 public static final byte VM_DEATH = 99;
591 public static final byte VM_DISCONNECTED = 100;
593 public static final byte VM_START = VM_INIT;
594 public static final byte THREAD_DEATH = THREAD_END;
598 * ModKind constants (event filters)
600 public static final class ModKind
603 * Limit the requested event to be reported at most once after a
604 * given number of occurrences. May be used with any event.
606 public static final byte COUNT = 1;
609 * Conditional on expression
611 public static final byte CONDITIONAL = 2;
614 * Restricts reported events to those in the given thread.
615 * May be used with any event except for class unload.
617 public static final byte THREAD_ONLY = 3;
620 * For class prepare events, restricts generated events
621 * to be the preparation of the given reference type and any
622 * subtypes.
624 * For other events, restricts the generated events to those where
625 * location is in the given reference type or any of its subtypes.
627 * An event will be generated for any location in a reference type
628 * that can be safely cast to the given reference type.
630 * May be used with any event except class unload, thread start,
631 * and thread end.
633 public static final byte CLASS_ONLY = 4;
636 * Restricts reported events to those for classes whose name matches
637 * the given restricted regular expression.
639 * For class prepare events, the prepared class name is matched.
640 * For class unload events, the unloaded class name is matched.
641 * For other events, the class name of the event's location is matched.
643 * May be used with any event except thread start and thread end.
645 public static final byte CLASS_MATCH = 5;
648 * Restricts reported events to those for classes whose name does not
649 * match the given restricted regular expression.
651 * For class prepare events, the prepared class name is matched.
652 * For class unload events, the unloaded class name is matched.
653 * For other events, the class name of the event's location is matched.
655 * May be used with any event except thread start and thread end.
657 public static final byte CLASS_EXCLUDE = 6;
660 * Restricts reported events to those that occur at the given location.
662 * May be used with breakpoint, field access, field modification, step,
663 * and exception event kinds.
665 public static final byte LOCATION_ONLY = 7;
668 * Restricts reported exceptions by their class and whether they are
669 * caught or uncaught.
671 * May be used with exception event kinds only.
673 public static final byte EXCEPTION_ONLY = 8;
676 * Restricts reported events to those that occur for a given field.
678 * May be used with field access and field modification event kinds only.
680 public static final byte FIELD_ONLY = 9;
683 * Restricts reported step events to those which satisfy depth and
684 * size constraints.
686 * May be used with step event kinds only.
688 public static final byte STEP = 10;
691 * Restricts reported events to those whose active 'this' object is
692 * the given object. Match value is the null object for static methods.
694 * May be used with any event except class prepare, class unload,
695 * thread start, and thread end.
697 public static final byte INSTANCE_ONLY = 11;
701 * ThreadStatus constants
703 public static final class ThreadStatus
705 public static final int ZOMBIE = 0;
706 public static final int RUNNING = 1;
707 public static final int SLEEPING = 2;
708 public static final int MONITOR = 3;
709 public static final int WAIT = 4;
713 * SuspendStatus constants
715 public static final class SuspendStatus
717 public static final byte SUSPENDED = 1;
721 * ClassStatus constants
723 public static final class ClassStatus
725 public static final int VERIFIED = 1;
726 public static final int PREPARED = 2;
727 public static final int INITIALIZED = 4;
728 public static final int ERROR = 8;
732 * TypeTag constants
734 public static final class TypeTag
736 public static final byte CLASS = 1;
737 public static final byte INTERFACE = 2;
738 public static final byte ARRAY = 3;
742 * Tag constants
744 public static final class Tag
747 * Array object (objectID size)
749 public static final byte ARRAY = '[';
752 * Byte value (1 byte)
754 public static final byte BYTE = 'B';
757 * Character value (2 bytes)
759 public static final byte CHAR = 'C';
762 * Object (objectID size)
764 public static final byte OBJECT = 'L';
767 * Float value (4 bytes)
769 public static final byte FLOAT = 'F';
772 * Double value (8 bytes)
774 public static final byte DOUBLE = 'D';
777 * Int value (4 bytes)
779 public static final byte INT = 'I';
782 * Long value (8 bytes)
784 public static final byte LONG = 'J';
787 * Short value (2 bytes)
789 public static final byte SHORT = 'S';
792 * Void value (no bytes)
794 public static final byte VOID = 'V';
797 * Boolean value (1 byte)
799 public static final byte BOOLEAN = 'Z';
802 * String object (objectID size)
804 public static final byte STRING = 's';
807 * Thread object (objectID size)
809 public static final byte THREAD = 't';
812 * ThreadGroup object (objectID size)
814 public static final byte THREAD_GROUP = 'g';
817 * ClassLoader object (objectID size)
819 public static final byte CLASS_LOADER = 'l';
822 * Class object object (objectID size)
824 public static final byte CLASS_OBJECT = 'c';
828 * StepDepth constants
830 public static final class StepDepth
833 * Step into any method calls that occur before the end of the step
835 public static final int INTO = 0;
838 * Step over any method calls that occur before the end of the step
840 public static final int OVER = 1;
843 * Step out of the current method
845 public static final int OUT = 2;
849 * StepSize constants
851 public static final class StepSize
854 * Step by the minimum possible amount (often a bytecode instruction)
856 public static final int MIN = 0;
859 * Step to the next source line unless there is no line number information,
860 * in which case MIN step is done instead
862 public static final int LINE = 1;
866 * SuspendPolicy constants
868 public static final class SuspendPolicy
871 * Suspend no threads when this event is encountered
873 public static final byte NONE = 0;
876 * Suspend the event thread when this event is encountered
878 public static final byte EVENT_THREAD = 1;
881 * Suspend all threads when this event is encountered
883 public static final byte ALL = 2;
887 * InvokeOptions flag constants
889 public static final class InvokeOptions
892 * otherwise, all threads started
894 public static final int INVOKE_SINGLE_THREADED = 0x1;
897 * otherwise, normal virtual invoke (instance methods only)
899 public static final int INVOKE_NONVIRTUAL = 0x2;