11/*
2- * Copyright (c) 2019, 2021 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2019, 2022 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -279,7 +279,7 @@ public Void call() {
279279 if (holdEvents ) {
280280 heldEvents .add (stream );
281281 } else {
282- JDWP . LOGGER .fine (() -> "SENDING CLASS PREPARE EVENT FOR KLASS: " + klass .getNameAsString () + " WITH THREAD " + context .getThreadName (prepareThread ));
282+ debuggerController .fine (() -> "SENDING CLASS PREPARE EVENT FOR KLASS: " + klass .getNameAsString () + " WITH THREAD " + context .getThreadName (prepareThread ));
283283 connection .queuePacket (stream );
284284 }
285285 return null ;
@@ -320,7 +320,7 @@ public void breakpointHit(BreakpointInfo info, CallFrame frame, Object currentTh
320320 stream .writeLong (frame .getClassId ());
321321 stream .writeLong (frame .getMethodId ());
322322 stream .writeLong (frame .getCodeIndex ());
323- JDWP . LOGGER .fine (() -> "Sending breakpoint hit event in thread: " + context .getThreadName (currentThread ) + " with suspension policy: " + info .getSuspendPolicy ());
323+ debuggerController .fine (() -> "Sending breakpoint hit event in thread: " + context .getThreadName (currentThread ) + " with suspension policy: " + info .getSuspendPolicy ());
324324 if (holdEvents ) {
325325 heldEvents .add (stream );
326326 } else {
@@ -492,7 +492,7 @@ public void stepCompleted(SteppingInfo info, CallFrame currentFrame) {
492492 if (info .isPopFrames ()) {
493493 // send reply packet when "step" is completed
494494 PacketStream reply = new PacketStream ().replyPacket ().id (info .getRequestId ());
495- JDWP . LOGGER .fine (() -> "Sending pop frames reply packet" );
495+ debuggerController .fine (() -> "Sending pop frames reply packet" );
496496 if (holdEvents ) {
497497 heldEvents .add (reply );
498498 } else {
@@ -515,7 +515,7 @@ public void stepCompleted(SteppingInfo info, CallFrame currentFrame) {
515515 stream .writeLong (currentFrame .getMethodId ());
516516 long codeIndex = info .getStepOutBCI () != -1 ? info .getStepOutBCI () : currentFrame .getCodeIndex ();
517517 stream .writeLong (codeIndex );
518- JDWP . LOGGER .fine (() -> "Sending step completed event" );
518+ debuggerController .fine (() -> "Sending step completed event" );
519519
520520 if (holdEvents ) {
521521 heldEvents .add (stream );
@@ -548,7 +548,7 @@ private void sendMonitorContendedEnterEvent(MonitorEvent monitorEvent, CallFrame
548548 stream .writeLong (currentFrame .getMethodId ());
549549 long codeIndex = currentFrame .getCodeIndex ();
550550 stream .writeLong (codeIndex );
551- JDWP . LOGGER .fine (() -> "Sending monitor contended event" );
551+ debuggerController .fine (() -> "Sending monitor contended event" );
552552
553553 if (holdEvents ) {
554554 heldEvents .add (stream );
@@ -590,7 +590,7 @@ private void sendMonitorContendedEnteredEvent(MonitorEvent monitorEvent, CallFra
590590 stream .writeLong (currentFrame .getMethodId ());
591591 long codeIndex = currentFrame .getCodeIndex ();
592592 stream .writeLong (codeIndex );
593- JDWP . LOGGER .fine (() -> "Sending monitor contended entered event" );
593+ debuggerController .fine (() -> "Sending monitor contended entered event" );
594594
595595 if (holdEvents ) {
596596 heldEvents .add (stream );
@@ -634,7 +634,7 @@ public void sendMonitorWaitEvent(Object monitor, long timeout, RequestFilter fil
634634
635635 // timeout
636636 stream .writeLong (timeout );
637- JDWP . LOGGER .fine (() -> "Sending monitor wait event" );
637+ debuggerController .fine (() -> "Sending monitor wait event" );
638638
639639 if (holdEvents ) {
640640 heldEvents .add (stream );
@@ -711,7 +711,7 @@ private void sendMonitorWaitedEvent(Object monitor, boolean timedOut, RequestFil
711711
712712 // timeout
713713 stream .writeBoolean (timedOut );
714- JDWP . LOGGER .fine (() -> "Sending monitor wait event" );
714+ debuggerController .fine (() -> "Sending monitor wait event" );
715715
716716 if (holdEvents ) {
717717 heldEvents .add (stream );
@@ -852,7 +852,7 @@ public void threadStarted(Object thread) {
852852 stream .writeByte (RequestedJDWPEvents .THREAD_START );
853853 stream .writeInt (threadStartedRequestId );
854854 stream .writeLong (ids .getIdAsLong (thread ));
855- JDWP . LOGGER .fine (() -> "sending thread started event for thread: " + context .getThreadName (thread ));
855+ debuggerController .fine (() -> "sending thread started event for thread: " + context .getThreadName (thread ));
856856 if (holdEvents ) {
857857 heldEvents .add (stream );
858858 } else {
@@ -909,26 +909,26 @@ public boolean vmDied() {
909909 stream .writeByte (RequestedJDWPEvents .VM_DEATH );
910910 stream .writeInt (0 );
911911 // don't queue this packet, send immediately
912- connection .sendVMDied (stream );
912+ connection .sendVMDied (stream , debuggerController );
913913 return vmDeathSuspendPolicy != SuspendStrategy .NONE ;
914914 }
915915
916916 @ Override
917917 public void addClassUnloadRequestId (int id ) {
918918 // not implemented yet
919- JDWP . LOGGER .fine (() -> "class unload events not yet implemented!" );
919+ debuggerController .fine (() -> "class unload events not yet implemented!" );
920920 }
921921
922922 @ Override
923923 public void addThreadStartedRequestId (int id , byte suspendPolicy ) {
924- JDWP . LOGGER .fine (() -> "Adding thread start listener" );
924+ debuggerController .fine (() -> "Adding thread start listener" );
925925 this .threadStartedRequestId = id ;
926926 this .threadStartSuspendPolicy = suspendPolicy ;
927927 }
928928
929929 @ Override
930930 public void addThreadDiedRequestId (int id , byte suspendPolicy ) {
931- JDWP . LOGGER .fine (() -> "Adding thread death listener" );
931+ debuggerController .fine (() -> "Adding thread death listener" );
932932 this .threadDeathRequestId = id ;
933933 this .threadDeathSuspendPolicy = suspendPolicy ;
934934 }
0 commit comments