Logo Search packages:      
Sourcecode: xemacs21-packages version File versions

jde::debugger::ObjectStore Class Reference

Inheritance diagram for jde::debugger::ObjectStore:


List of all members.

Detailed Description


The main function of this class is to keep a store of all the currently referenced objects. Any time jdebug sends an object ID across, it stores the ObjectReference itself in objectMap, mapped to the id that will identify this object. This id is the ObjectReference.uniqueID().

We need to do this because if we don't keep a link to the ObjectReference somewhere, it might get garbage collected, and the id used to identify it (ie the uniqueID) reused. If the user then requests info about that ID, he'll be sent information about the new object, which is obviously wrong.

When jde wants to know more about the object, it sends across the id, which is used to reference the ObjectReference in the Map

Since this is done with each object that's ever reported to jde, the list can get pretty huge, and needs to be refreshed from time to time. For this purpose, we maintain the variable maximumLimit.

Objects keep getting added to the list, until we reach maximumLimit. At this point, a notification is sent to the jde side requesting for a list of all the object references (ie, the ids) that it is currently interested in.

When this list is obtained, the objectMap is scanned and entries not in this list removed. maximumLimit is then set to 2 times the current size of the list, or the old maximumLimit, whichever is larger. This is to ensure we don't keep sending the request over and over again very frequently.

Note that we keep adding objects to the Map even after sending the notification to jde: any reducing the size of the list is only done when jde responds.

Note: Question: Should we disable garbage collection of objects in the debugee VM once we put their corresponding ObjectReference in the debugger VM in the objectstore? And maybe enable the gc once they're removed from the store? This way we'll never get the ObjectCollected exception, and we can use the object as long as its displayed on the emacs side. The only thing is, we'd need the emacs side to be pretty frequent about the list of things it is displaying so we don't encumber the debuggee VM too much with objects it's unable to collect.

Created: Thu Jul 29 10:38:06 1999

Amit Kumar

Definition at line 60 of file ObjectStore.java.

Public Member Functions

ObjectReference get (Object id)
 ObjectStore (DebuggeeProcess proc)
void put (ObjectReference ref)
void trim (List objectIDs)

Static Public Attributes

static final String ATTACH_SHMEM = "attach_shmem"
static final String ATTACH_SOCKET = "attach_socket"
static String BR = System.getProperty("line.separator")
static final String BREAK = "break"
static final String CANCEL_TRACE_CLASSES = "cancel_trace_classes"
static final String CANCEL_TRACE_METHODS = "cancel_trace_methods"
static final String CANCEL_TRACE_THREADS = "cancel_trace_threads"
static final String CLEAR = "clear"
static final String COMMAND_ERROR
static final String COMMAND_RESULT
static final String CONNECTED_TO_VM
static final String DEBUG
static final String ERROR
static final String EVALUATE = "evaluate"
static final String EVENT_BREAKPOINT_HIT
static final String EVENT_CLASS_PREPARE
static final String EVENT_CLASS_UNLOAD
static final String EVENT_EXCEPTION
static final String EVENT_METHOD_ENTRY
static final String EVENT_METHOD_EXIT
static final String EVENT_OTHER
static final String EVENT_STEP_COMPLETED
static final String EVENT_THREAD_DEATH
static final String EVENT_THREAD_START
static final String EVENT_VM_DEATH
static final String EVENT_VM_DISCONNECT
static final String EVENT_VM_START
static final String EVENT_WATCHPOINT_HIT
static final String EVENTSET
static final String EXIT = "exit"
static final String FINISH = "finish"
static final String GET_ARRAY = "get_array"
static final String GET_LOADED_CLASSES = "get_loaded_classes"
static final String GET_LOCALS = "get_locals"
static final String GET_OBJECT = "get_object"
static final String GET_OBJECT_MONITORS = "get_object_monitors"
static final String GET_PATH_INFORMATION = "get_path_information"
static final String GET_STRING = "get_string"
static final String GET_THREAD = "get_thread"
static final String GET_THREADS = "get_threads"
static final String INTERRUPT = "interrupt"
static final String INVALID
static final String JDE_BUG
static final String JDE_INIT_DEBUG_SESSION
static final String KILL_THREAD = "kill_thread"
static final String LAUNCH = "launch"
static final String LISTEN_SHMEM = "listen_shmem"
static final String LISTEN_SOCKET = "listen_socket"
static final String MESSAGE
static final String QUIT = "quit"
static final String REPORT_IDS_IN_USE
static final String RESUME = "resume"
static final String RUN = "run"
static final String SPEC_RESOLVED
static final String STEP = "step"
static final String SUSPEND = "suspend"
static final String TRACE_CLASSES = "trace_classes"
static final String TRACE_EXCEPTIONS = "trace_exceptions"
static final String TRACE_METHODS = "trace_methods"
static final String TRACE_THREADS = "trace_threads"
static final String WARNING
static final String WATCH = "watch"

Package Attributes

JDE jde = JDE.getJDE()
final DebuggeeProcess proc
final Integer procID

Private Attributes

long maximumLimit = 8
Map objectMap
boolean requestPending = false

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index