8214120: [REDO] Fix sun.awt.nativedebug on X11 platforms
Reviewed-by: stuefe, ihse
This commit is contained in:
parent
60b32f222f
commit
a4fb817366
make/lib
src/java.desktop/share/native/common/awt/debug
@ -280,7 +280,7 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx), )
|
||||
common/font \
|
||||
#
|
||||
|
||||
LIBAWT_XAWT_EXCLUDES := medialib
|
||||
LIBAWT_XAWT_EXCLUDES := medialib debug
|
||||
|
||||
LIBAWT_XAWT_EXTRA_HEADER_DIRS := \
|
||||
$(LIBAWT_DEFAULT_HEADER_DIRS) \
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -33,7 +33,9 @@ enum {
|
||||
|
||||
static DASSERT_CALLBACK PfnAssertCallback = NULL;
|
||||
|
||||
void DAssert_Impl(const char *msg, const char * filename, int linenumber) {
|
||||
/* JNIEXPORT because this function is also called from libawt_xawt */
|
||||
JNIEXPORT void JNICALL
|
||||
DAssert_Impl(const char *msg, const char * filename, int linenumber) {
|
||||
if (PfnAssertCallback != NULL) {
|
||||
(*PfnAssertCallback)(msg, filename, linenumber);
|
||||
} else {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -54,7 +54,8 @@ extern "C" {
|
||||
/* prototype for assert function */
|
||||
typedef void (*DASSERT_CALLBACK)(const char * msg, const char * file, int line);
|
||||
|
||||
extern void DAssert_Impl(const char * msg, const char * file, int line);
|
||||
/* JNIEXPORT because this function is also called from libawt_xawt */
|
||||
JNIEXPORT void JNICALL DAssert_Impl(const char * msg, const char * file, int line);
|
||||
extern void DAssert_SetCallback( DASSERT_CALLBACK pfn );
|
||||
|
||||
#else /* DEBUG not defined */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -237,16 +237,20 @@ void DTrace_PrintImpl(const char * fmt, ...) {
|
||||
|
||||
/*
|
||||
* Called via DTRACE_PRINT macro. Outputs printf style formatted text.
|
||||
* JNIEXPORT because these functions are also called from libawt_xawt.
|
||||
*/
|
||||
void DTrace_VPrint( const char * file, int line, int argc, const char * fmt, va_list arglist ) {
|
||||
JNIEXPORT void JNICALL
|
||||
DTrace_VPrint( const char * file, int line, int argc, const char * fmt, va_list arglist ) {
|
||||
DASSERT(fmt != NULL);
|
||||
DTrace_VPrintImpl(fmt, arglist);
|
||||
}
|
||||
|
||||
/*
|
||||
* Called via DTRACE_PRINTLN macro. Outputs printf style formatted text with an automatic newline.
|
||||
* JNIEXPORT because these functions are also called from libawt_xawt.
|
||||
*/
|
||||
void DTrace_VPrintln( const char * file, int line, int argc, const char * fmt, va_list arglist ) {
|
||||
JNIEXPORT void JNICALL
|
||||
DTrace_VPrintln( const char * file, int line, int argc, const char * fmt, va_list arglist ) {
|
||||
DTrace_VPrintImpl(fmt, arglist);
|
||||
DTrace_PrintImpl("\n");
|
||||
}
|
||||
@ -254,10 +258,12 @@ void DTrace_VPrintln( const char * file, int line, int argc, const char * fmt, v
|
||||
/*
|
||||
* Called via DTRACE_ macros. If tracing is enabled at the given location, it enters
|
||||
* the trace mutex and invokes the callback function to output the trace.
|
||||
* JNIEXPORT because these functions are also called from libawt_xawt.
|
||||
*/
|
||||
void DTrace_PrintFunction( DTRACE_PRINT_CALLBACK pfn, dtrace_id * pFileTraceId, dtrace_id * pLineTraceId,
|
||||
const char * file, int line,
|
||||
int argc, const char * fmt, ... ) {
|
||||
JNIEXPORT void JNICALL
|
||||
DTrace_PrintFunction( DTRACE_PRINT_CALLBACK pfn, dtrace_id * pFileTraceId, dtrace_id * pLineTraceId,
|
||||
const char * file, int line,
|
||||
int argc, const char * fmt, ... ) {
|
||||
va_list arglist;
|
||||
|
||||
DASSERT(file != NULL);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -59,11 +59,12 @@ extern void DTrace_Shutdown();
|
||||
void DTrace_DisableMutex();
|
||||
extern void DTrace_VPrintImpl(const char * fmt, va_list arglist);
|
||||
extern void DTrace_PrintImpl(const char * fmt, ...);
|
||||
extern void DTrace_PrintFunction(DTRACE_PRINT_CALLBACK pfn, dtrace_id * pFileTraceId, dtrace_id * pTraceId, const char * file, int line, int argc, const char * fmt, ...);
|
||||
/* JNIEXPORT because these functions are also called from libawt_xawt */
|
||||
JNIEXPORT void JNICALL DTrace_PrintFunction(DTRACE_PRINT_CALLBACK pfn, dtrace_id * pFileTraceId, dtrace_id * pTraceId, const char * file, int line, int argc, const char * fmt, ...);
|
||||
|
||||
/* these functions are exported only for use in macros-- do not call them directly!!! */
|
||||
extern void DTrace_VPrint(const char * file, int line, int argc, const char * fmt, va_list arglist);
|
||||
extern void DTrace_VPrintln(const char * file, int line, int argc, const char * fmt, va_list arglist);
|
||||
JNIEXPORT void JNICALL DTrace_VPrint(const char * file, int line, int argc, const char * fmt, va_list arglist);
|
||||
JNIEXPORT void JNICALL DTrace_VPrintln(const char * file, int line, int argc, const char * fmt, va_list arglist);
|
||||
|
||||
/* each file includes this flag indicating module trace status */
|
||||
static dtrace_id _Dt_FileTraceId = UNDEFINED_TRACE_ID;
|
||||
|
Loading…
x
Reference in New Issue
Block a user