Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/agent/src/os/bsd/StubDebuggerLocal.c
38833 views
/*1* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#include <stdlib.h>25#include <jni.h>2627#define CHECK_EXCEPTION_(value) if ((*env)->ExceptionOccurred(env)) { return value; }28#define CHECK_EXCEPTION if ((*env)->ExceptionOccurred(env)) { return;}29#define THROW_NEW_DEBUGGER_EXCEPTION_(str, value) { throw_new_debugger_exception(env, str); return value; }30#define THROW_NEW_DEBUGGER_EXCEPTION(str) { throw_new_debugger_exception(env, str); return;}3132static void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) {33(*env)->ThrowNew(env, (*env)->FindClass(env, "sun/jvm/hotspot/debugger/DebuggerException"), errMsg);34}3536/*37* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal38* Method: init039* Signature: ()V40*/41JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_init042(JNIEnv *env, jclass cls) {43}4445JNIEXPORT jint JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getAddressSize46(JNIEnv *env, jclass cls)47{48#ifdef _LP6449return 8;50#else51return 4;52#endif5354}5556/*57* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal58* Method: attach059* Signature: (I)V60*/61JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_attach0__I62(JNIEnv *env, jobject this_obj, jint jpid) {6364THROW_NEW_DEBUGGER_EXCEPTION("Can't attach to the process");65}6667/*68* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal69* Method: attach070* Signature: (Ljava/lang/String;Ljava/lang/String;)V71*/72JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_attach0__Ljava_lang_String_2Ljava_lang_String_273(JNIEnv *env, jobject this_obj, jstring execName, jstring coreName) {74THROW_NEW_DEBUGGER_EXCEPTION("Can't attach to the core file");75}7677/*78* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal79* Method: detach080* Signature: ()V81*/82JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_detach083(JNIEnv *env, jobject this_obj) {84}8586/*87* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal88* Method: lookupByName089* Signature: (Ljava/lang/String;Ljava/lang/String;)J90*/91JNIEXPORT jlong JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_lookupByName092(JNIEnv *env, jobject this_obj, jstring objectName, jstring symbolName) {93return 0;94}9596/*97* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal98* Method: lookupByAddress099* Signature: (J)Lsun/jvm/hotspot/debugger/cdbg/ClosestSymbol;100*/101JNIEXPORT jobject JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_lookupByAddress0102(JNIEnv *env, jobject this_obj, jlong addr) {103return 0;104}105106/*107* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal108* Method: readBytesFromProcess0109* Signature: (JJ)Lsun/jvm/hotspot/debugger/ReadResult;110*/111JNIEXPORT jbyteArray JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_readBytesFromProcess0112(JNIEnv *env, jobject this_obj, jlong addr, jlong numBytes) {113return 0;114}115116JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getThreadIntegerRegisterSet0117(JNIEnv *env, jobject this_obj, jint lwp_id) {118return 0;119}120121122