Skip to content

Adopt 10 open upstream eclipse.jdt.debug fixes and enhancements - #25

Merged
hsoliwal merged 20 commits into
masterfrom
m3/upstream-prs-20261116
Nov 16, 2026
Merged

hsoliwal merged 20 commits into
masterfrom
m3/upstream-prs-20261116

Conversation

@hsoliwal

@hsoliwal hsoliwal commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Brings 10 open upstream eclipse-jdt/eclipse.jdt.debug PRs into the fork. Each one is ready for review upstream (not a draft) and green on upstream CI.

Conflicts with fork work were resolved by reading both sides. Java files were merged member by member, keyed by signature. Where the fork had only re-formatted code, upstream's change wins; where the fork had added behaviour, both are kept. Bundle-Version bumps take the higher version. Upstream's Java 22 unnamed variables were renamed to the fork's Java 21 form (unused).

Verification (tree loss guard over all 10 PRs):

  • No fork path dropped, and every upstream PR path is present.
  • The only differences from upstream PR content are the Java 21 rename, in 1 file(s), each confirmed to be exactly that rename.
  • The changed Java files parse at Java 21.

Correction: this description was first published with an empty PR list. A path bug in the landing script also meant only part of the loss guard ran before the merge. The full loss guard above was run afterwards on the merged result.

SougandhS and others added 20 commits September 24, 2026 15:46
Allow a breakpoint to suspend only after a configured dependency
breakpoint has been hit. Dependency breakpoints can optionally continue
execution on their first hit and enable dependent breakpoints
afterwards.
Module uses the JDK 25's built-in java.lang.classfile API for
SMAP/SourceDebugExtension injection. The Classfile API always supports
its own JDK's class format, removing the need to update an ASM version
ceiling for each new Java release. The existing
org.eclipse.jdt.launching.javaagent module (ASM-based) is unchanged and
continues to be used for debuggees running below Java 25."
MultipleConnectionsTest checks for a free socket in @before,
then tries to connect at this socket during tests. This can fail
if the socket is meanwhile in use. So retry several times,
to try to avoid such failures in CI jobs and I-builds.

In addition, constant waiting is removed from the test case.

Fixes: eclipse-jdt#1037
Introduce a new debugger operation that allows users to step out of the
current loop, conditional statement, or nested code block. The operation
uses run-to-line to identify the first executable line after the
enclosing block and is available through the keyboard shortcut
(Shift+F7), toolbar, and debug context menus.

Fixes eclipse-jdt#966
When a classpath container has no runtime classpath entry resolver, it is
resolved by JavaRuntime.computeDefaultContainerEntries. Project entries
of the container were resolved with excludeTestCode only, ignoring their
without_test_code attribute, so the test code of such a project (its test
output folders and test-only dependencies) was put on the runtime
classpath even though the entry says test code must not be visible.

Exclude the test code of a contributed project when its entry has
without_test_code set, as is already done for project entries on the
build path itself (eclipse-jdt#327).

Fixes eclipse-jdt#1040
Provision installed JREs and execution environment defaults from an optional JSON/JSONC file selected by command line, system property or environment variable. Merge existing installations without removing user VMs, preserve rename notifications and contributed VM ownership, and validate configured names and paths. Leave behavior unchanged when no configuration file is selected.

Preserve effective source and Javadoc attachments, including case-sensitive URL changes, and allow explicitly empty VM arguments to clear persisted values. Skip runtimes with malformed Javadoc URLs without discarding valid configuration and reject unescaped control characters.

Cover parsing, merging, contributions, renames, invalid paths and labels, attachment updates, and execution environment override, fallback and compatibility behavior with regression tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…se-jdt#1056

For every ClassUnload event, VirtualMachineImpl.removeKnownRefType()
asked the target VM for the classes with the signature of the unloaded
class. To answer, the VM walks all of its loaded classes, so unloading
thousands of classes at once (e.g. a web application reload) kept the
JDWP agent of the target busy for minutes, and classes were not
unloaded meanwhile. The answer was of no use either: it never contains
the unloaded class, so its mirror stayed in the cache, while the mirror
of a still loaded class with the same name was removed.

Now the cached mirrors are indexed by signature and the unloaded class
is looked up in the cache only. A cached class with that signature is
removed only if the VM reports that it is no longer prepared, which is
a cheap request by reference type ID. This also covers the same unload
being reported more than once and classes with the same name loaded by
other class loaders. Mirrors returned by classesBySignature() are
indexed as well, and only the data of the unloaded mirror itself is
flushed, instead of scanning the whole cache for dependent types.

ClassUnloadEventTest covers the unload of a class known from a class
prepare event, of a class with a same-named class still loaded, and of
a class found by classesByName().

Fixes eclipse-jdt#1056

Assisted-by: Anthropic Claude (Claude Fable 5.2)
Remove tracked breakpoints by identity after their marker is deleted or
detached. Guard installation-count updates with markerExists() and clear
target and current-thread references even when request cleanup fails.

Continue removing remaining JDI requests after a deregistration
CoreException. Complete breakpoint-side filter and installation cleanup
before reporting the first failure, preserving later cleanup errors as
suppressed exceptions. Clear installed-target state independently of
plugin notification and remove all matching instance filters.

Retain the marker-deletion and detached-marker regression tests. Record
removals by identity in the global test listener and reject unexpected
error-log entries. Real-VM failure-path tests verify request deletion,
state on both sides, removal and installation notifications, repeated
removal, and reinstalling and hitting the very same breakpoint. Also
verify that a change-notification failure cannot mask the original
request-deregistration failure or skip the removal notification.

Addresses eclipse-jdt#55

Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
VirtualMachineImpl.redefineClasses() removed the mirrors of the
redefined types from the cache while it was building the request, that
is, before the VM handled the redefinition. A thread that asked for one
of those types in the meantime cached a new mirror, which could read
its methods before the redefinition and then stayed in the cache.

A standard HotSpot VM keeps the method IDs of a redefined class, so
this had no visible effect there. A VM with enhanced class redefinition
(DCEVM, e.g. the JetBrains Runtime with
-XX:+AllowEnhancedClassRedefinition) gives a changed method a new ID,
and reading the stack of a thread running the new code then failed with
"Got MethodID of ReferenceType that is not a member of the
ReferenceType" until the end of the debug session.

Now the mirrors are removed from the cache again once the VM has
answered the request, whether it succeeded or not.

Fixes eclipse-jdt#1059

Assisted-by: Anthropic Claude (Claude Fable 5.2)
Toggling a method exit breakpoint on the closing brace created the
breakpoint, but its annotation stayed on the method declaration line.
Place the marker on the closing brace for exit-only breakpoints, and on
the method line when entry is also enabled. Toggling on the closing
brace of an existing method breakpoint now switches its exit mode
instead of deleting it.
Resolved by recipe: 3 file(s); provenance index and policy recomputed.
Resolved by recipe: 3 file(s); provenance index and policy recomputed.
Resolved by recipe: 1 file(s); provenance index and policy recomputed.
Resolved by recipe: 0 file(s); provenance index and policy recomputed.
Resolved by recipe: 1 file(s); provenance index and policy recomputed.
Resolved by recipe: 1 file(s); provenance index and policy recomputed.
Resolved by recipe: 0 file(s); provenance index and policy recomputed.
Resolved by recipe: 2 file(s); provenance index and policy recomputed.
Resolved by recipe: 0 file(s); provenance index and policy recomputed.
Resolved by recipe: 0 file(s); provenance index and policy recomputed.
@hsoliwal
hsoliwal merged commit a0b5a8b into master Nov 16, 2026
@hsoliwal hsoliwal changed the title Adopt 0 open upstream eclipse.jdt.debug fixes and enhancements Adopt 10 open upstream eclipse.jdt.debug fixes and enhancements Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants