agent/src/share/native/sadis.c
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
hotspot-8003348 Cdiff agent/src/share/native/sadis.c
agent/src/share/native/sadis.c
Print this page
8003348: SA can not read core file on OS X
*** 1,7 ****
/*
! * Copyright (c) 2012, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2012, 2013, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 46,56 ****
--- 46,59 ----
#else
#include <string.h>
#include <dlfcn.h>
+
+ #ifndef __APPLE__
#include <link.h>
+ #endif
#endif
#include <limits.h>
#include <stdio.h>
*** 107,119 ****
jclass disclass,
jstring jrepath_s,
jstring libname_s) {
uintptr_t func = 0;
const char* error_message = NULL;
- const char* java_home;
jboolean isCopy;
- uintptr_t *handle = NULL;
const char * jrepath = (*env)->GetStringUTFChars(env, jrepath_s, &isCopy); // like $JAVA_HOME/jre/lib/sparc/
const char * libname = (*env)->GetStringUTFChars(env, libname_s, &isCopy);
char buffer[128];
--- 110,120 ----
*** 165,175 ****
unsigned char* start, uintptr_t length,
void* (*event_callback)(void*, const char*, void*),
void* event_stream,
int (*printf_callback)(void*, const char*, ...),
void* printf_stream,
! const char* options);
/* container for call back state when decoding instructions */
typedef struct {
JNIEnv* env;
jobject dis;
--- 166,177 ----
unsigned char* start, uintptr_t length,
void* (*event_callback)(void*, const char*, void*),
void* event_stream,
int (*printf_callback)(void*, const char*, ...),
void* printf_stream,
! const char* options,
! int newline);
/* container for call back state when decoding instructions */
typedef struct {
JNIEnv* env;
jobject dis;
*** 279,289 ****
startPc + end - start,
(unsigned char*)start,
end - start,
&event_to_env, (void*) &denv,
&printf_to_env, (void*) &denv,
! options);
/* cleanup */
(*env)->ReleaseByteArrayElements(env, code, start, JNI_ABORT);
(*env)->ReleaseStringUTFChars(env, options_s, options);
}
--- 281,291 ----
startPc + end - start,
(unsigned char*)start,
end - start,
&event_to_env, (void*) &denv,
&printf_to_env, (void*) &denv,
! options, 0 /* newline */);
/* cleanup */
(*env)->ReleaseByteArrayElements(env, code, start, JNI_ABORT);
(*env)->ReleaseStringUTFChars(env, options_s, options);
}
agent/src/share/native/sadis.c
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File