< prev index next >
src/jdk.jdwp.agent/share/native/libjdwp/debugLoop.c
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -115,10 +115,12 @@
*/
jdwpCmdPacket *cmd = &p.type.cmd;
PacketInputStream in;
PacketOutputStream out;
CommandHandler func;
+ const char *cmdSetName;
+ const char *cmdName;
/* Should reply be sent to sender.
* For error handling, assume yes, since
* only VM/exit does not reply
*/
@@ -135,13 +137,13 @@
/* Initialize the input and output streams */
inStream_init(&in, p);
outStream_initReply(&out, inStream_id(&in));
- LOG_MISC(("Command set %d, command %d", cmd->cmdSet, cmd->cmd));
-
- func = debugDispatch_getHandler(cmd->cmdSet,cmd->cmd);
+ func = debugDispatch_getHandler(cmd->cmdSet, cmd->cmd, &cmdSetName, &cmdName);
+ LOG_MISC(("Command set %s(%d), command %s(%d)",
+ cmdSetName, cmd->cmdSet, cmdName, cmd->cmd));
if (func == NULL) {
/* we've never heard of this, so I guess we
* haven't implemented it.
* Handle gracefully for future expansion
* and platform / vendor expansion.
@@ -227,13 +229,17 @@
ERROR_MESSAGE(("Received jdwpPacket with flags != 0x%d (actual=0x%x) when a jdwpCmdPacket was expected.",
JDWPTRANSPORT_FLAGS_NONE, packet.type.cmd.flags));
shouldListen = JNI_FALSE;
notifyTransportError();
} else {
+ const char *cmdSetName;
+ const char *cmdName;
cmd = &packet.type.cmd;
- LOG_MISC(("Command set %d, command %d", cmd->cmdSet, cmd->cmd));
+ debugDispatch_getHandler(cmd->cmdSet, cmd->cmd, &cmdSetName, &cmdName);
+ LOG_MISC(("Command set %s(%d), command %s(%d)",
+ cmdSetName, cmd->cmdSet, cmdName, cmd->cmd));
/*
* FIXME! We need to deal with high priority
* packets and queue flushes!
*/
< prev index next >