Change Log
Changes since Beta 2
JDI Interface Changes
- Changed IllegalArgumentException to NullPointerException where appropriate.
- Remove "sourceFile()". Add "sourceName()".
- In EventQueue, rename "waitEvent()" to "remove()".
- Fixed JDI and JDWP to handle the possibility of executable code within
interfaces. Location.declaringType() now returns a reference type.
ClassType.allLineLocations and locationsOfLine have been moved to
ReferenceType.
- Changed 'element' to 'component' in JDI so that we conform to the
JLS. This affects three methods in ArrayType.
- Separated classpath-specific methods from VirtualMachine
into a subinterface called PathSearchingVirtualMachine. Added
a new method to get the base directory so that relative
directories in the classpaths can be resolved.
- Changed all use of InternalError to com.sun.jdi.InternalException
for consistency.
- Throw new unchecked exception (InvalidRequestStateException)
on attempts to add a filter to an enabled event request.
- Throw NullPointerException (instead of silence) on null
class filters.
- Moved com.sun.jdi.spi into the implementation since it will not
be final in the initial release.
- Changed class filter semantics such that subtypes are included.
- Changed and added to JDI/JDWP versioning interfaces.
VM version and name have been added. JDI version methods have
been moved and renamed to avoid confusion and allow early access.
- Remove unused UserDefinedEvent and UserDefinedRequest.
JDWP Protocol Changes
- All locations reported across JDWP now include a tag
byte to identify the class as a true class or an interface.
- Removed JDWP flags for high priority packets and packet flushing since
these will not be implemented in the initial release.
Interface and other additions
- Add "modifiers()" on Accessible.
- Added EventSet.resume().
- Added new JDI thread status of NOT_STARTED.
- Added a raw command line LaunchingConnector to handle VMs which don't
support our VM-specific command line arguments.
- Added support for a "strict" mode of back-end operation. Strict mode allows us to run without any of the
workarounds we have in place for JVMDI implementation bugs.
- Internationalize the JDI.
- Per requirements of internationalization, make connector arguments
have types: int, boolean, string or choice.
- Add internationalized labels to arguments.
Bug Fixes
- Fixed intermittent test failure due to corrupted
suspend counts on front and back ends.
- Fixed regresion in EventQueue.remove(long).
- Fixed regression in suspend policy for frame events. The policy
is now correctly remembered and method entry events can suspend
threads.
- Allow compatible setting of array objects. A subtlety in the
class loading for arrays was resulting in a ClassNotLoadedException.
Array classes are often not loaded even if they are used widely
in a program. Relaxed type checking if the array class is not loaded.
We now allow sets as long as element classes are loaded.
- Fixed bug in JNI signature parsing. byte signatures were not always
recognized.
- Fixed bug where stale stack frames caused a target VM crash.
- Fixed leaks and improve caching.
- Fixed crash in back-end reference management after a
tracked VM object is garbage collected.
- Optimized step algorithm for cases where step events are
filtered by class.
- Fixed bug in handling strange line number tables as are found
in some local classes.
- Prevent applications from interfering with debugger
suspend/resume.
- Fixed back-end crash when attempting to get frames of
a zombie thread.
- Fixed back-end crash on StackFrame.getValues.
- Allow concurrent callers to EventQueue.remove() without returning null.
- Fixed toString in EventSet.
- Fixed bad native method exception in Location.lineNumber and elsewhere.
- Allow events to be requested for threads that have not yet
been started.
- Allow step to be requested for threads currently running.
- Fixed crash when back-end operates in client mode but no
connect address is given.
- Fixed 4228109: JPDA: MethodEntryEvent causing program to
terminate abnormally.Placed a ceiling (50K) on the back-end event queue to prevent out of memory situations when
there are many
events.
- Fixed method tracing with SUSPEND_NONE is very slow
and eventually throws an OutOfMemoryError.
- Fixed watchpoint bug which prevented watchpoints when the field was accessed/modified from a subclass.
- Handle non-started threads properly wrt suspend/resume.
- Fixed error recovery bugs in the shared memory transport.
- Changed back end event handling code to support pre-1.2.2 target VMs. This means we don't need to require
1.2.2 or later as originally planned. pre-1.2.2 target VMs will be buggy, but at least won't crash.
- Fixed back-end crash after ClassObjectReference.reflectedType was called.
- Added more error checking to back-end. Return error code when certain operations are attempted on unsuspended
threads.
- Fixed malloc contention hang by adding alternate malloc to the
back-end as the default allocator. Use regular CRT malloc and free by
specifying stdalloc=y in JDWP options.
- Fixed names of all threads and monitors in the back end to be prefixed with JDWP instead of JDI. Renamed internal
jdi* functions to jdwp* functions.
- Made connector names more consistent.
- Fixed 4237467: JDI: ReferenceType.allLineLocations throws bad AbsentInformationException
- Made
jdb
example more backward compatible with old jdb
.
Returned jdb
to "run" semantics.
Changes since Beta 1
JDI Interface Changes
- ReferenceType.sourceFile and Location.sourceFile have been renamed
to ReferenceType.sourceName and Location.sourceName
- Type.typeName has been renamed Type.name
- EventQueue.waitEvent has been renamed EventQueue.remove
- ReferenceType.classesForName has been renamed ReferenceType.classesByName
- IncompatibleThreadStateException has been added to the throws clause
on several methods in ThreadReference and elsewhere. For these additions,
it is thrown to indicate that the operation is not available on a thread
because it has terminated.
Interface and other additions
- New, easier execution of
jdb
and javadt
.
- Added VirtualMachine methods to access major and minor version numbers.
- Threads suspended by an event can be properly stopped and
interrupted.
- Debugging multiple VMs simultaneously is now supported.
VMMismatchException has been added to diagnose attempts to mix
mirrors from different VMs.
- It is now possible to attach, detach, then reattach a
debugger to the same VM.
- Thread status information is now accurate for threads which
have been suspended after reporting an event.
- A shared memory debugger transport has been added to the Win32
implementation. It is now the default transport mechanism, but
sockets remain available for connecting to remote machines.
- Better toString methods on many mirrors.
- Added VMOutOfMemoryException so that out of memory condition in
the target VM can be distinguished from out of memory in the debugger VM.
- Made Connector.Argument serializable.
- Improved step operation and performance in cases where no line number
information is available.
- Added NativeMethodException for operations that are not valid for native
methods.
- Added ThreadReference.suspendCount
- Added location information to method entry and exit events.
Bug Fixes
- Fixed NullPointerException in ClassLoaderReferenceImpl.definedClasses()
- Fixed bad IllegalArgumentException calling Method.returnType() for
void methods.
- Fixed socket address parsing to allow a port number alone in
configuring ListeningConectors.
- Fixed crash when method events are requested with a suspend
policy other than SUSPEND_NONE.
- Fixed bug preventing invokes in any event-reporting thread other than
the most recent one.
- Fixed various bugs in handling frames with no line number
info.
- Fixed bug in counted events and added checks for illegal
count values.
- Fixed target VM crash after debugger attach fails.
- Worked around questionable line number info generated by
javac.
- Fixed concurrency bugs in ObjectReference.enableCollection and
disableCollection.
- Fixed hang in target VM when started with suspend=n
- Fixed bugs in several operations when attempted with subclasses
ObjectReference.
- Fixed serious synchronization bug in the socket transport which
could result in corrupted packets.
- Fixed missing exception for invalid threads in
ObjectReference.invokeMethod.
- Added missing constructor to VMDisconnectedException
- Fixed rare crash when cancelling certain step event requests.
- Fixed target VM crash when attempting a thread operation on a zombie
thread.
- Fixed incorrect behavior in the timed version of EventQueue.waitEvent
- Fixed NullPointerException in setting local variables to null and
an internal error when setting locals to objects of certain common types.
- Fixed incorrectly reported step depth and size for step event requests
- Fixed hang if a JDI method is called as the target VM is exiting.
- Fixed missing exception on certain out-of-bounds conditions on array
element gets and sets.
- Fixed target VM crash sometime after a ReferenceType.classObject call.
- Underlying event handling infrastructure of example GUI debugger
overhauled: Uses EventSets, handles Watchpoints, etc.
Changes since Early Access
Some of the changes since Early Access (in no particular order):
- Method invocation and instance creation.
- Revamp of reference management.
- All JDI methods now implemented.
- Add type checking on Object values.
- Much error handling clean-up.
- Added example GUI debugger.
- JDWP now formally specified and mechanically generated.
- Add EventRequests, which control event propagation.
- Move stepping to EventRequest model.
- Divide JDI into five packages.
- Add pluggable Transports and Connects.
- Added VirtualMachineManager to JDI to manage connections to multiple target VMs
- Add attaching and Just-In-Time connections.
- Remove VM interrupted model, replace with suspend/resume model.
- Add VM disconnected event and exception.
- Remove all dependencies on Sun VM interface.
- Add VoidValue and VoidType to JDI.
- Add VirtualMachine.classpath() and bootclasspath() to JDI.
- Add VirtualMachine.exit() to JDI.
- Add VMStartEvent to the JDI.
- Renamed ThreadEndEvent to ThreadDeathEvent for consistency.
- JDI exceptions overhaul
- JDI Location now consistently only in executable code.
- Changed back end library name from jdi to jdwp. Now -runjdwp: ...
- Removed run command from
jdb
. Auto started. Use "cont".
- Add optional queries for monitor information to JDI.
- Add ClassLoaderReference to JDI.
- Add JDI queries for the type of variables, fields, and array elements
(available only if the appropriate class has been loaded).
- Add JDI queries to distinguish constructors and static initializers
from other methods.
- Add source line queries to ClassType.
- Make treatment of null objects more consistent.
- Docs, much bug fixing, etc.