⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 log.h

📁 This is a java virtual machine implement in c
💻 H
字号:
/*0001*//*
/*0002./ * Copyright (c) 1998-2001 Sun Microsystems, Inc. All Rights Reserved.
/*0003./ * 
/*0004./ * This software is the confidential and proprietary information of Sun
/*0005./ * Microsystems, Inc. ("Confidential Information").  You shall not
/*0006./ * disclose such Confidential Information and shall use it only in
/*0007./ * accordance with the terms of the license agreement you entered into
/*0008./ * with Sun.
/*0009./ * 
/*0010./ * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
/*0011./ * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
/*0012./ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
/*0013./ * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
/*0014./ * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
/*0015./ * THIS SOFTWARE OR ITS DERIVATIVES.
/*0016./ * 
/*0017./ */
/*0018*/
/*0019*//*=========================================================================
/*0020./ * SYSTEM:    KVM
/*0021./ * SUBSYSTEM: Profiling
/*0022./ * FILE:      log.h
/*0023./ * OVERVIEW:  Definitions for gathering and printing out diagnostic
/*0024./ *            virtual machine execution information at runtime.
/*0025./ * AUTHOR:    Daniel Blaukopf, based on code by Antero Taivalsaari
/*0026./ *            and Doug Simon
/*0027./ *=======================================================================*/
/*0028*/
/*0029*//*=========================================================================
/*0030./ * COMMENT: This file contains the declaration of a structure type, and
/*0031./ * an instance of it. This instance contains pointers to functions that
/*0032./ * are called for by other modules in the KVM in order to provide
/*0033./ * diagnostic information.
/*0034./ *=======================================================================*/
/*0035*/
/*0036*/#ifndef __log_h
/*0037*/#define __log_h
/*0038*/
/*0039*//*=========================================================================
/*0040./ * Logging makes use of the "fprintf" function, the first parameter of
/*0041./ * which is expected to be of type "LOGFILEPTR". If LOGFILEPTR has not
/*0042./ * already been defined for a platform (for example, the Palm source 
/*0043./ * defines it in machine_md.h) then we assume that logging will be to
/*0044./ * "stdout" using the C output routines. Thus, we define LOGFILEPTR
/*0045./ * appropriately below.
/*0046./ *=======================================================================*/
/*0047*/
/*0048*/#ifndef LOGFILEPTR
/*0049*/#define LOGFILEPTR FILE*
/*0050*/#endif
/*0051*/
/*0052*//*=========================================================================
/*0053./ * The following is the LogInterface structure, which contains pointers to
/*0054./ * the functions to be called for each type of logged event.
/*0055./ *=======================================================================*/
/*0056*/
/*0057*/struct KVMLogInterface_ {
/*0058*/
/*0059*//*=========================================================================
/*0060./* FUNCTION:      fprintf
/*0061./* TYPE:          instrumentation operation
/*0062./* OVERVIEW:      Record a text string. By default this function maps to
/*0063./*                the fprintf() function declared in <stdio.h>.
/*0064./*
/*0065./* INTERFACE:
/*0066./*   parameters:  as defined in <stdio.h>,
/*0067./*                stream: the output stream (note: defined as a LOGFILEPTR)
/*0068./*                format: the text and formatting information
/*0069./*                ...: optional arguments
/*0070./*   returns:     The number of characters written, or a negative value
/*0071./*                if an error was encountered.
/*0072./*=======================================================================*/
/*0073*/
/*0074*/    int (*fprintf) (LOGFILEPTR stream, const char *format, ...);
/*0075*/    
/*0076*//*=========================================================================
/*0077./* FUNCTION:      uncaughtException
/*0078./* TYPE:          instrumentation operation
/*0079./* OVERVIEW:      Record the fact than an exception was thrown, but
/*0080./*                no appropriate handler was found to handle it.
/*0081./* 
/*0082./* INTERFACE:
/*0083./*   parameters:  exception: the exception object
/*0084./*   returns:     <nothing>
/*0085./*=======================================================================*/
/*0086*/
/*0087*/    void (*uncaughtException)(THROWABLE_INSTANCE exception);
/*0088*/
/*0279*/}; /* end of struct KVMLogInterface_ */
/*0280*/
/*0281*/typedef struct KVMLogInterface_ *KVMLogInterface;
/*0282*/
/*0283*/extern const KVMLogInterface Log;
/*0284*/
/*0285*/#endif /* __log_h */
/*0286*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -