< prev index next >

src/jdk.jdwp.agent/share/native/libjdwp/error_messages.c

Print this page


   1 /*
   2  * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 222 const char *
 223 eventText(int i)
 224 {
 225     switch ( i ) {
 226         CASE_RETURN_TEXT(EI_SINGLE_STEP)
 227         CASE_RETURN_TEXT(EI_BREAKPOINT)
 228         CASE_RETURN_TEXT(EI_FRAME_POP)
 229         CASE_RETURN_TEXT(EI_EXCEPTION)
 230         CASE_RETURN_TEXT(EI_THREAD_START)
 231         CASE_RETURN_TEXT(EI_THREAD_END)
 232         CASE_RETURN_TEXT(EI_CLASS_PREPARE)
 233         CASE_RETURN_TEXT(EI_CLASS_LOAD)
 234         CASE_RETURN_TEXT(EI_FIELD_ACCESS)
 235         CASE_RETURN_TEXT(EI_FIELD_MODIFICATION)
 236         CASE_RETURN_TEXT(EI_EXCEPTION_CATCH)
 237         CASE_RETURN_TEXT(EI_METHOD_ENTRY)
 238         CASE_RETURN_TEXT(EI_METHOD_EXIT)
 239         CASE_RETURN_TEXT(EI_VM_INIT)
 240         CASE_RETURN_TEXT(EI_VM_DEATH)
 241         CASE_RETURN_TEXT(EI_GC_FINISH)






 242         default: return "EVENT_unknown";
 243     }
 244 }
 245 
 246 /* Macro for case on switch, returns string for name. */
 247 #define CASE_RETURN_JDWP_ERROR_TEXT(name) case JDWP_ERROR(name): return #name;
 248 
 249 const char *
 250 jdwpErrorText(jdwpError serror)
 251 {
 252     switch ( serror ) {
 253         CASE_RETURN_JDWP_ERROR_TEXT(NONE)
 254         CASE_RETURN_JDWP_ERROR_TEXT(INVALID_THREAD)
 255         CASE_RETURN_JDWP_ERROR_TEXT(INVALID_THREAD_GROUP)
 256         CASE_RETURN_JDWP_ERROR_TEXT(INVALID_PRIORITY)
 257         CASE_RETURN_JDWP_ERROR_TEXT(THREAD_NOT_SUSPENDED)
 258         CASE_RETURN_JDWP_ERROR_TEXT(THREAD_SUSPENDED)
 259         CASE_RETURN_JDWP_ERROR_TEXT(INVALID_OBJECT)
 260         CASE_RETURN_JDWP_ERROR_TEXT(INVALID_CLASS)
 261         CASE_RETURN_JDWP_ERROR_TEXT(CLASS_NOT_PREPARED)


   1 /*
   2  * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 222 const char *
 223 eventText(int i)
 224 {
 225     switch ( i ) {
 226         CASE_RETURN_TEXT(EI_SINGLE_STEP)
 227         CASE_RETURN_TEXT(EI_BREAKPOINT)
 228         CASE_RETURN_TEXT(EI_FRAME_POP)
 229         CASE_RETURN_TEXT(EI_EXCEPTION)
 230         CASE_RETURN_TEXT(EI_THREAD_START)
 231         CASE_RETURN_TEXT(EI_THREAD_END)
 232         CASE_RETURN_TEXT(EI_CLASS_PREPARE)
 233         CASE_RETURN_TEXT(EI_CLASS_LOAD)
 234         CASE_RETURN_TEXT(EI_FIELD_ACCESS)
 235         CASE_RETURN_TEXT(EI_FIELD_MODIFICATION)
 236         CASE_RETURN_TEXT(EI_EXCEPTION_CATCH)
 237         CASE_RETURN_TEXT(EI_METHOD_ENTRY)
 238         CASE_RETURN_TEXT(EI_METHOD_EXIT)
 239         CASE_RETURN_TEXT(EI_VM_INIT)
 240         CASE_RETURN_TEXT(EI_VM_DEATH)
 241         CASE_RETURN_TEXT(EI_GC_FINISH)
 242         CASE_RETURN_TEXT(EI_FIBER_SCHEDULED)
 243         CASE_RETURN_TEXT(EI_FIBER_TERMINATED)
 244         CASE_RETURN_TEXT(EI_FIBER_MOUNT)
 245         CASE_RETURN_TEXT(EI_FIBER_UNMOUNT)
 246         CASE_RETURN_TEXT(EI_CONTINUATION_RUN)
 247         CASE_RETURN_TEXT(EI_CONTINUATION_YIELD)
 248         default: return "EVENT_unknown";
 249     }
 250 }
 251 
 252 /* Macro for case on switch, returns string for name. */
 253 #define CASE_RETURN_JDWP_ERROR_TEXT(name) case JDWP_ERROR(name): return #name;
 254 
 255 const char *
 256 jdwpErrorText(jdwpError serror)
 257 {
 258     switch ( serror ) {
 259         CASE_RETURN_JDWP_ERROR_TEXT(NONE)
 260         CASE_RETURN_JDWP_ERROR_TEXT(INVALID_THREAD)
 261         CASE_RETURN_JDWP_ERROR_TEXT(INVALID_THREAD_GROUP)
 262         CASE_RETURN_JDWP_ERROR_TEXT(INVALID_PRIORITY)
 263         CASE_RETURN_JDWP_ERROR_TEXT(THREAD_NOT_SUSPENDED)
 264         CASE_RETURN_JDWP_ERROR_TEXT(THREAD_SUSPENDED)
 265         CASE_RETURN_JDWP_ERROR_TEXT(INVALID_OBJECT)
 266         CASE_RETURN_JDWP_ERROR_TEXT(INVALID_CLASS)
 267         CASE_RETURN_JDWP_ERROR_TEXT(CLASS_NOT_PREPARED)


< prev index next >