Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
13ca7af1
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
13ca7af1
编写于
4月 30, 2013
作者:
S
sla
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8013466: SA crashes when attaching to a process on OS X
Reviewed-by: coleenp, rbackman, minqi
上级
ce070a6e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
10 deletion
+12
-10
agent/src/os/bsd/MacosxDebuggerLocal.m
agent/src/os/bsd/MacosxDebuggerLocal.m
+12
-10
未找到文件。
agent/src/os/bsd/MacosxDebuggerLocal.m
浏览文件 @
13ca7af1
...
@@ -204,7 +204,7 @@ Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_lookupByName0(
...
@@ -204,7 +204,7 @@ Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_lookupByName0(
jstring objectName, jstring symbolName)
jstring objectName, jstring symbolName)
{
{
struct ps_prochandle* ph = get_proc_handle(env, this_obj);
struct ps_prochandle* ph = get_proc_handle(env, this_obj);
if (ph->core != NULL) {
if (ph
!= NULL && ph
->core != NULL) {
return lookupByNameIncore(env, ph, this_obj, objectName, symbolName);
return lookupByNameIncore(env, ph, this_obj, objectName, symbolName);
}
}
...
@@ -238,10 +238,13 @@ JNIEXPORT jobject JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_loo
...
@@ -238,10 +238,13 @@ JNIEXPORT jobject JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_loo
const char* sym = NULL;
const char* sym = NULL;
struct ps_prochandle* ph = get_proc_handle(env, this_obj);
struct ps_prochandle* ph = get_proc_handle(env, this_obj);
sym = symbol_for_pc(ph, (uintptr_t) addr, &offset);
if (ph != NULL && ph->core != NULL) {
if (sym == NULL) return 0;
sym = symbol_for_pc(ph, (uintptr_t) addr, &offset);
return (*env)->CallObjectMethod(env, this_obj, createClosestSymbol_ID,
if (sym == NULL) return 0;
return (*env)->CallObjectMethod(env, this_obj, createClosestSymbol_ID,
(*env)->NewStringUTF(env, sym), (jlong)offset);
(*env)->NewStringUTF(env, sym), (jlong)offset);
}
return 0;
}
}
/** called from Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_readBytesFromProcess0 */
/** called from Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_readBytesFromProcess0 */
...
@@ -279,7 +282,7 @@ Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_readBytesFromProcess0(
...
@@ -279,7 +282,7 @@ Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_readBytesFromProcess0(
jbyteArray array;
jbyteArray array;
struct ps_prochandle* ph = get_proc_handle(env, this_obj);
struct ps_prochandle* ph = get_proc_handle(env, this_obj);
if (ph->core != NULL) {
if (ph
!= NULL && ph
->core != NULL) {
return readBytesFromCore(env, ph, this_obj, addr, numBytes);
return readBytesFromCore(env, ph, this_obj, addr, numBytes);
}
}
...
@@ -394,9 +397,9 @@ bool fill_java_threads(JNIEnv* env, jobject this_obj, struct ps_prochandle* ph)
...
@@ -394,9 +397,9 @@ bool fill_java_threads(JNIEnv* env, jobject this_obj, struct ps_prochandle* ph)
/* For core file only, called from
/* For core file only, called from
* Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getThreadIntegerRegisterSet0
* Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getThreadIntegerRegisterSet0
*/
*/
jlongArray getThreadIntegerRegisterSetFromCore(JNIEnv *env, jobject this_obj, long lwp_id) {
jlongArray getThreadIntegerRegisterSetFromCore(JNIEnv *env, jobject this_obj, long lwp_id
, struct ps_prochandle* ph
) {
if (!_threads_filled) {
if (!_threads_filled) {
if (!fill_java_threads(env, this_obj,
get_proc_handle(env, this_obj)
)) {
if (!fill_java_threads(env, this_obj,
ph
)) {
throw_new_debugger_exception(env, "Failed to fill in threads");
throw_new_debugger_exception(env, "Failed to fill in threads");
return 0;
return 0;
} else {
} else {
...
@@ -409,7 +412,6 @@ jlongArray getThreadIntegerRegisterSetFromCore(JNIEnv *env, jobject this_obj, lo
...
@@ -409,7 +412,6 @@ jlongArray getThreadIntegerRegisterSetFromCore(JNIEnv *env, jobject this_obj, lo
jlongArray array;
jlongArray array;
jlong *regs;
jlong *regs;
struct ps_prochandle* ph = get_proc_handle(env, this_obj);
if (get_lwp_regs(ph, lwp_id, &gregs) != true) {
if (get_lwp_regs(ph, lwp_id, &gregs) != true) {
THROW_NEW_DEBUGGER_EXCEPTION_("get_thread_regs failed for a lwp", 0);
THROW_NEW_DEBUGGER_EXCEPTION_("get_thread_regs failed for a lwp", 0);
}
}
...
@@ -521,8 +523,8 @@ Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getThreadIntegerRegisterSet0(
...
@@ -521,8 +523,8 @@ Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getThreadIntegerRegisterSet0(
print_debug("getThreadRegisterSet0 called\n");
print_debug("getThreadRegisterSet0 called\n");
struct ps_prochandle* ph = get_proc_handle(env, this_obj);
struct ps_prochandle* ph = get_proc_handle(env, this_obj);
if (ph->core != NULL) {
if (ph
!= NULL && ph
->core != NULL) {
return getThreadIntegerRegisterSetFromCore(env, this_obj, thread_id);
return getThreadIntegerRegisterSetFromCore(env, this_obj, thread_id
, ph
);
}
}
kern_return_t result;
kern_return_t result;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录