Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
Licensed under the Apache License, Version 2.0 ("the License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
Definition in file jvmutil.c.
#include "arch.h"
#include "jvmcfg.h"
#include "cfmacros.h"
#include "classfile.h"
#include "attribute.h"
#include "jvm.h"
#include "linkage.h"
#include "util.h"
Go to the source code of this file.
Debug message verbosity utilities for sysDbgMsg(). | |||||||||||||
Set and get an integer value that determines the number of debug messages that get displayed by sysDbgMsg(). When sysDbgMsg() is inserted into the code of a function, a verbosity level is its first parameter. The higher the number, the more verbose the debug output becomes, up to level DMLMAX. The lower the number, the less it is displayed at run time, down to DMLMIN. At level DMLOFF, only vital diagnostic messages are displayed. The rest are suppressed. This value is heuristically applied by the developer as to the importance of that information in various development and testing situations. The importance of the situation defaults to DMLDEFAULT at compile time and may be changed at run time with the -Xdebug_level command line parameter.
| |||||||||||||
jvm_debug_level_enum | jvmutil_get_dml () | ||||||||||||
Get current debug message level. | |||||||||||||
rvoid | jvmutil_set_dml (jvm_debug_level_enum level) | ||||||||||||
Set current debug message level. | |||||||||||||
Stack dump utilities. | |||||||||||||
Print contents of a thread's stack to standard error. Several forms are available that provide various amounts of stack frame detail. The most verbose also shows local variables in the stack frame.
* Exception in thread "main" java.lang.NullPointerException at Testit.sub1(Testit.java:9) at Testit.main(Testit.java:23) | |||||||||||||
rvoid | jvmutil_print_error_stack (jvm_thread_index thridx) | ||||||||||||
Print basic stack frame summary reporting an error versus an exception. | |||||||||||||
static rvoid | jvmutil_print_errtype_stack (jvm_thread_index thridx, rchar *errtype) | ||||||||||||
Common print basic stack frame summary showing error type. | |||||||||||||
rvoid | jvmutil_print_exception_stack (jvm_thread_index thridx) | ||||||||||||
Print basic stack frame summary reporting an exception versus an error. | |||||||||||||
rvoid | jvmutil_print_stack (jvm_thread_index thridx, rchar *pheader) | ||||||||||||
Print basic stack frame summary only. | |||||||||||||
static rvoid | jvmutil_print_stack_common (jvm_thread_index thridx, rchar *pheader, rboolean showdetails, rboolean showlocals) | ||||||||||||
Common function to perform final output from all stack print utilities. | |||||||||||||
rvoid | jvmutil_print_stack_details (jvm_thread_index thridx, rchar *pheader) | ||||||||||||
Print stack frame with some details. | |||||||||||||
rvoid | jvmutil_print_stack_locals (jvm_thread_index thridx, rchar *pheader) | ||||||||||||
Print stack frame with details and local variables. | |||||||||||||
Functions | |||||||||||||
static void | jvmutil_c_dummy (void) | ||||||||||||
Variables | |||||||||||||
static char * | jvmutil_c_copyright = "\0" "$URL: https://svn.apache.org/path/name/jvmutil.c $ $Id: jvmutil.c 0 09/28/2005 dlydick $" " " "Copyright 2005 The Apache Software Foundation or its licensors, as applicable." |
|
|
|
Set current debug message level.
Definition at line 96 of file jvmutil.c. References rjvm::debug_message_level, and pjvm. Referenced by argv_init(). |
|
Get current debug message level. Parameters: rvoid
Definition at line 113 of file jvmutil.c. References rjvm::debug_message_level, and pjvm. Referenced by sysDbgMsg(). |
|
Common function to perform final output from all stack print utilities.
< References
Definition at line 172 of file jvmutil.c. References attribute_info_dup::ai, attribute_find_in_class_by_enum(), ClassFile::attributes, CHECK_FINAL_STACK_FRAME_GENERIC, CLASS_OBJECT_LINKAGE, CLASSNAME_EXTERNAL_DELIMITER_CHAR, CONSTANT_CP_DEFAULT_INDEX, CP1_NAME_STRLEN, CP_THIS_STRLEN, FIRST_STACK_FRAME, fprintfLocalStderr(), GET_FP, jvm_attribute_index_bad, JVMREG_STACK_PC_CLSIDX_OFFSET, JVMREG_STACK_PC_MTHIDX_OFFSET, LOCAL_SOURCEFILE_ATTRIBUTE, NEXT_STACK_FRAME_GENERIC, PTR_CP1_NAME_STRNAME, PTR_CP_THIS_STRNAME, rnull, rtrue, STACK, and ClassFile::this_class. Referenced by jvmutil_print_stack(), jvmutil_print_stack_details(), and jvmutil_print_stack_locals(). |
|
Print basic stack frame summary only.
Definition at line 284 of file jvmutil.c. References jvmutil_print_stack_common(), and rfalse. Referenced by jvmutil_print_errtype_stack(), object_run_method(), opcode_load_run_throwable(), and opcode_run(). |
|
Print stack frame with some details.
Definition at line 295 of file jvmutil.c. References jvmutil_print_stack_common(), rfalse, and rtrue. |
|
Print stack frame with details and local variables.
Definition at line 307 of file jvmutil.c. References jvmutil_print_stack_common(), and rtrue. |
|
Common print basic stack frame summary showing error type. < Convenient size for any stdio msg Definition at line 319 of file jvmutil.c. References CLASS_OBJECT_LINKAGE, CP1_NAME_STRLEN, GET_FP, HEAP_FREE_DATA, HEAP_GET_DATA, JVMCFG_STDIO_BFR, JVMREG_STACK_PC_CLSIDX_OFFSET, jvmutil_print_stack(), PTR_CP1_NAME_STRNAME, rfalse, sprintfLocal(), STACK, ClassFile::this_class, and THREAD. Referenced by jvmutil_print_error_stack(), and jvmutil_print_exception_stack(). |
|
Print basic stack frame summary reporting an error versus an exception.
Definition at line 358 of file jvmutil.c. References jvmutil_print_errtype_stack(). |
|
Print basic stack frame summary reporting an exception versus an error.
Definition at line 370 of file jvmutil.c. References jvmutil_print_errtype_stack(). |
|
|