Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
runtime
提交
f1e131a4
R
runtime
项目概览
dotNET Platform
/
runtime
大约 1 年 前同步成功
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
runtime
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
f1e131a4
编写于
10月 05, 2020
作者:
M
monojenkins
提交者:
GitHub
10月 05, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[sdb] Add support for function pointers. (#42936)
Co-authored-by:
N
vargaz
<
vargaz@users.noreply.github.com
>
上级
8cb35183
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
3 deletion
+13
-3
src/mono/mono/mini/debugger-agent.c
src/mono/mono/mini/debugger-agent.c
+5
-2
src/mono/mono/mini/interp/interp.c
src/mono/mono/mini/interp/interp.c
+8
-1
未找到文件。
src/mono/mono/mini/debugger-agent.c
浏览文件 @
f1e131a4
...
...
@@ -5439,7 +5439,8 @@ buffer_add_value_full (Buffer *buf, MonoType *t, void *addr, MonoDomain *domain,
case
MONO_TYPE_U
:
/* Treat it as a vtype */
goto
handle_vtype
;
case
MONO_TYPE_PTR
:
{
case
MONO_TYPE_PTR
:
case
MONO_TYPE_FNPTR
:
{
gssize
val
=
*
(
gssize
*
)
addr
;
buffer_add_byte
(
buf
,
t
->
type
);
...
...
@@ -5683,6 +5684,7 @@ decode_value_internal (MonoType *t, int type, MonoDomain *domain, guint8 *addr,
!
(
type
==
VALUE_TYPE_ID_FIXED_ARRAY
)
&&
!
(
t
->
type
==
MONO_TYPE_U
&&
type
==
MONO_TYPE_VALUETYPE
)
&&
!
(
t
->
type
==
MONO_TYPE_PTR
&&
type
==
MONO_TYPE_I8
)
&&
!
(
t
->
type
==
MONO_TYPE_FNPTR
&&
type
==
MONO_TYPE_I8
)
&&
!
(
t
->
type
==
MONO_TYPE_GENERICINST
&&
type
==
MONO_TYPE_VALUETYPE
)
&&
!
(
t
->
type
==
MONO_TYPE_VALUETYPE
&&
type
==
MONO_TYPE_OBJECT
))
{
char
*
name
=
mono_type_full_name
(
t
);
...
...
@@ -5733,6 +5735,7 @@ decode_value_internal (MonoType *t, int type, MonoDomain *domain, guint8 *addr,
*
(
guint64
*
)
addr
=
decode_long
(
buf
,
&
buf
,
limit
);
break
;
case
MONO_TYPE_PTR
:
case
MONO_TYPE_FNPTR
:
/* We send these as I8, so we get them back as such */
g_assert
(
type
==
MONO_TYPE_I8
);
*
(
gssize
*
)
addr
=
decode_long
(
buf
,
&
buf
,
limit
);
...
...
@@ -8003,7 +8006,7 @@ type_commands_internal (int command, MonoClass *klass, MonoDomain *domain, guint
// FIXME: Can't decide whenever a class represents a byref type
if
(
FALSE
)
b
|=
(
1
<<
0
);
if
(
type
->
type
==
MONO_TYPE_PTR
)
if
(
type
->
type
==
MONO_TYPE_PTR
||
type
->
type
==
MONO_TYPE_FNPTR
)
b
|=
(
1
<<
1
);
if
(
!
type
->
byref
&&
(((
type
->
type
>=
MONO_TYPE_BOOLEAN
)
&&
(
type
->
type
<=
MONO_TYPE_R8
))
||
(
type
->
type
==
MONO_TYPE_I
)
||
(
type
->
type
==
MONO_TYPE_U
)))
b
|=
(
1
<<
2
);
...
...
src/mono/mono/mini/interp/interp.c
浏览文件 @
f1e131a4
...
...
@@ -793,6 +793,7 @@ stackval_from_data (MonoType *type, stackval *result, const void *data, gboolean
result
->
data
.
nati
=
*
(
mono_i
*
)
data
;
return
;
case
MONO_TYPE_PTR
:
case
MONO_TYPE_FNPTR
:
result
->
data
.
p
=
*
(
gpointer
*
)
data
;
return
;
case
MONO_TYPE_U4
:
...
...
@@ -916,7 +917,8 @@ stackval_to_data (MonoType *type, stackval *val, void *data, gboolean pinvoke)
mono_gc_wbarrier_generic_store_internal
(
p
,
val
->
data
.
o
);
return
;
}
case
MONO_TYPE_PTR
:
{
case
MONO_TYPE_PTR
:
case
MONO_TYPE_FNPTR
:
{
gpointer
*
p
=
(
gpointer
*
)
data
;
*
p
=
val
->
data
.
p
;
return
;
...
...
@@ -987,6 +989,7 @@ stackval_to_data_addr (MonoType *type, stackval *val)
case
MONO_TYPE_OBJECT
:
case
MONO_TYPE_ARRAY
:
case
MONO_TYPE_PTR
:
case
MONO_TYPE_FNPTR
:
return
&
val
->
data
.
p
;
case
MONO_TYPE_VALUETYPE
:
if
(
m_class_is_enumtype
(
type
->
data
.
klass
))
...
...
@@ -1216,6 +1219,7 @@ static InterpMethodArguments* build_args_from_sig (MonoMethodSignature *sig, Int
case
MONO_TYPE_I
:
case
MONO_TYPE_U
:
case
MONO_TYPE_PTR
:
case
MONO_TYPE_FNPTR
:
case
MONO_TYPE_SZARRAY
:
case
MONO_TYPE_CLASS
:
case
MONO_TYPE_OBJECT
:
...
...
@@ -1284,6 +1288,7 @@ static InterpMethodArguments* build_args_from_sig (MonoMethodSignature *sig, Int
case
MONO_TYPE_I
:
case
MONO_TYPE_U
:
case
MONO_TYPE_PTR
:
case
MONO_TYPE_FNPTR
:
case
MONO_TYPE_SZARRAY
:
case
MONO_TYPE_CLASS
:
case
MONO_TYPE_OBJECT
:
...
...
@@ -1347,6 +1352,7 @@ static InterpMethodArguments* build_args_from_sig (MonoMethodSignature *sig, Int
case
MONO_TYPE_I
:
case
MONO_TYPE_U
:
case
MONO_TYPE_PTR
:
case
MONO_TYPE_FNPTR
:
case
MONO_TYPE_SZARRAY
:
case
MONO_TYPE_CLASS
:
case
MONO_TYPE_OBJECT
:
...
...
@@ -1709,6 +1715,7 @@ dump_stackval (GString *str, stackval *s, MonoType *type)
case
MONO_TYPE_OBJECT
:
case
MONO_TYPE_ARRAY
:
case
MONO_TYPE_PTR
:
case
MONO_TYPE_FNPTR
:
case
MONO_TYPE_I
:
case
MONO_TYPE_U
:
g_string_append_printf
(
str
,
"[%p] "
,
s
->
data
.
p
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录