/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include "util.h"
#include "transport.h"
#include "debugLoop.h"
#include "debugDispatch.h"
#include "standardHandlers.h"
#include "inStream.h"
#include "outStream.h"
#include "threadControl.h"
static void enqueue(jdwpPacket *p);
static void notifyTransportError(void);
struct PacketList {
};
static jboolean
{
return JNI_TRUE;
} else {
return JNI_FALSE;
}
}
static jboolean
{
return JNI_TRUE;
} else {
return JNI_FALSE;
}
}
void
debugLoop_initialize(void)
{
}
void
debugLoop_sync(void)
{
}
/*
* This is where all the work gets done.
*/
void
debugLoop_run(void)
{
jdwpPacket p;
/* Initialize all statics */
/* We may be starting a new connection after an error */
/* Okay, start reading cmds! */
while (shouldListen) {
if (!dequeue(&p)) {
break;
}
/*
* Its a reply packet.
*/
continue;
} else {
/*
* Its a cmd packet.
*/
/* Should reply be sent to sender.
* For error handling, assume yes, since
*/
/*
* For VirtualMachine.Resume commands we hold the resumeLock
* while executing and replying to the command. This ensures
* that a Resume after VM_DEATH will be allowed to complete
* before the thread posting the VM_DEATH continues VM
* termination.
*/
if (resumeCommand(cmd)) {
}
/* Initialize the input and output streams */
inStream_init(&in, p);
/* we've never heard of this, so I guess we
* haven't implemented it.
* Handle gracefully for future expansion
* and platform / vendor expansion.
*/
/* Protect the VM from calls while dead.
* VirtualMachine cmdSet quietly ignores some cmds
* after VM death, so, it sends it's own errors.
*/
} else {
/* Call the command handler */
}
/* Reply to the sender */
if (replyToSender) {
if (inStream_error(&in)) {
}
}
/*
* Release the resumeLock as the reply has been posted.
*/
if (resumeCommand(cmd)) {
}
}
}
/*
* Cut off the transport immediately. This has the effect of
* cutting off any events that the eventHelper thread might
* be trying to send.
*/
/* Reset for a new connection to this VM if it's still alive */
}
}
/* Command reader */
static void JNICALL
{
LOG_MISC(("Begin reader thread"));
while (shouldListen) {
/* I/O error or EOF */
} else {
/*
* FIXME! We need to deal with high priority
* packets and queue flushes!
*/
}
}
LOG_MISC(("End reader thread"));
}
/*
* The current system for queueing packets is highly
* inefficient, and should be rewritten! It'd be nice
* to avoid any additional memory allocations.
*/
static void
{
}
} else {
}
}
static jboolean
}
}
}
}
static void
notifyTransportError(void) {
}