/*
* 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 "EventRequestImpl.h"
#include "eventHandler.h"
#include "inStream.h"
#include "outStream.h"
#include "stepControl.h"
/**
* Take JDWP "modifiers" (which are JDI explicit filters, like
* addCountFilter(), and implicit filters, like the LocationOnly
* filter that goes with breakpoints) and add them as filters
* (eventFilter) to the HandlerNode (eventHandler).
*/
static jdwpError
{
int i;
for (i = 0; i < filterCount; ++i) {
break;
switch (modifier) {
break;
break;
}
break;
break;
}
break;
break;
}
break;
break;
break;
break;
break;
}
break;
break;
break;
}
break;
break;
}
break;
break;
break;
break;
}
break;
break;
}
char *pattern;
break;
pattern));
break;
}
char *pattern;
break;
break;
}
break;
break;
break;
break;
}
char *sourceNamePattern;
break;
}
break;
}
default:
break;
}
break;
}
return serror;
}
/**
* This is the back-end implementation for enabling
* (what are at the JDI level) EventRequests.
*
* Allocate the event request handler (eventHandler).
* Add any filters (explicit or implicit).
* Install the handler.
* Return the handlerID which is used to map subsequent
* events to the EventRequest that created it.
*/
static jboolean
{
if (inStream_error(in)) {
return JNI_TRUE;
}
if (inStream_error(in)) {
return JNI_TRUE;
}
if (inStream_error(in)) {
return JNI_TRUE;
}
if (ei == 0) {
return JNI_TRUE;
}
if (ei == EI_VM_INIT) {
/*
* VM is already initialized so there's no need to install a handler
* for this event. However we need to allocate a requestID to send in
* the reply to the debugger.
*/
} else {
return JNI_TRUE;
}
} else {
node->needReturnValue = 0;
}
}
}
}
} else {
(void)eventHandler_free(node);
}
return JNI_TRUE;
}
/**
* This is the back-end implementation for disabling
* (what are at the JDI level) EventRequests.
*/
static jboolean
{
if (inStream_error(in)) {
return JNI_TRUE;
}
if (inStream_error(in)) {
return JNI_TRUE;
}
if (ei == 0) {
/* NOTE: Clear command not yet spec'ed to return INVALID_EVENT_TYPE */
return JNI_TRUE;
}
if (error != JVMTI_ERROR_NONE) {
}
return JNI_TRUE;
}
static jboolean
{
if (error != JVMTI_ERROR_NONE) {
}
return JNI_TRUE;
}
,(void *)setCommand
,(void *)clearCommand
,(void *)clearAllBreakpoints};