Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
22169d41
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
22169d41
编写于
6月 28, 2013
作者:
A
Andreas Färber
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
gdbstub: Change gdb_register_coprocessor() argument to CPUState
Signed-off-by:
N
Andreas Färber
<
afaerber@suse.de
>
上级
eac8b355
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
18 addition
and
16 deletion
+18
-16
gdbstub.c
gdbstub.c
+3
-4
include/exec/gdbstub.h
include/exec/gdbstub.h
+1
-1
target-arm/helper.c
target-arm/helper.c
+4
-3
target-m68k/helper.c
target-m68k/helper.c
+2
-1
target-ppc/translate_init.c
target-ppc/translate_init.c
+8
-7
未找到文件。
gdbstub.c
浏览文件 @
22169d41
...
...
@@ -1906,11 +1906,10 @@ static int gdb_write_register(CPUState *cpu, uint8_t *mem_buf, int reg)
gdb reading a CPU register, and set_reg is gdb modifying a CPU register.
*/
void
gdb_register_coprocessor
(
CPU
ArchState
*
env
,
gdb_reg_cb
get_reg
,
gdb_reg_cb
set_reg
,
int
num_regs
,
const
char
*
xml
,
int
g_pos
)
void
gdb_register_coprocessor
(
CPU
State
*
cpu
,
gdb_reg_cb
get_reg
,
gdb_reg_cb
set_reg
,
int
num_regs
,
const
char
*
xml
,
int
g_pos
)
{
CPUState
*
cpu
=
ENV_GET_CPU
(
env
);
GDBRegisterState
*
s
;
GDBRegisterState
**
p
;
static
int
last_reg
=
NUM_CORE_REGS
;
...
...
include/exec/gdbstub.h
浏览文件 @
22169d41
...
...
@@ -26,7 +26,7 @@ void gdbserver_fork(CPUArchState *);
#endif
/* Get or set a register. Returns the size of the register. */
typedef
int
(
*
gdb_reg_cb
)(
CPUArchState
*
env
,
uint8_t
*
buf
,
int
reg
);
void
gdb_register_coprocessor
(
CPU
ArchState
*
env
,
void
gdb_register_coprocessor
(
CPU
State
*
cpu
,
gdb_reg_cb
get_reg
,
gdb_reg_cb
set_reg
,
int
num_regs
,
const
char
*
xml
,
int
g_pos
);
...
...
target-arm/helper.c
浏览文件 @
22169d41
...
...
@@ -1513,16 +1513,17 @@ ARMCPU *cpu_arm_init(const char *cpu_model)
void
arm_cpu_register_gdb_regs_for_features
(
ARMCPU
*
cpu
)
{
CPUState
*
cs
=
CPU
(
cpu
);
CPUARMState
*
env
=
&
cpu
->
env
;
if
(
arm_feature
(
env
,
ARM_FEATURE_NEON
))
{
gdb_register_coprocessor
(
env
,
vfp_gdb_get_reg
,
vfp_gdb_set_reg
,
gdb_register_coprocessor
(
cs
,
vfp_gdb_get_reg
,
vfp_gdb_set_reg
,
51
,
"arm-neon.xml"
,
0
);
}
else
if
(
arm_feature
(
env
,
ARM_FEATURE_VFP3
))
{
gdb_register_coprocessor
(
env
,
vfp_gdb_get_reg
,
vfp_gdb_set_reg
,
gdb_register_coprocessor
(
cs
,
vfp_gdb_get_reg
,
vfp_gdb_set_reg
,
35
,
"arm-vfp3.xml"
,
0
);
}
else
if
(
arm_feature
(
env
,
ARM_FEATURE_VFP
))
{
gdb_register_coprocessor
(
env
,
vfp_gdb_get_reg
,
vfp_gdb_set_reg
,
gdb_register_coprocessor
(
cs
,
vfp_gdb_get_reg
,
vfp_gdb_set_reg
,
19
,
"arm-vfp.xml"
,
0
);
}
}
...
...
target-m68k/helper.c
浏览文件 @
22169d41
...
...
@@ -121,10 +121,11 @@ M68kCPU *cpu_m68k_init(const char *cpu_model)
void
m68k_cpu_init_gdb
(
M68kCPU
*
cpu
)
{
CPUState
*
cs
=
CPU
(
cpu
);
CPUM68KState
*
env
=
&
cpu
->
env
;
if
(
m68k_feature
(
env
,
M68K_FEATURE_CF_FPU
))
{
gdb_register_coprocessor
(
env
,
fpu_gdb_get_reg
,
fpu_gdb_set_reg
,
gdb_register_coprocessor
(
cs
,
fpu_gdb_get_reg
,
fpu_gdb_set_reg
,
11
,
"cf-fp.xml"
,
18
);
}
/* TODO: Add [E]MAC registers. */
...
...
target-ppc/translate_init.c
浏览文件 @
22169d41
...
...
@@ -7804,8 +7804,8 @@ static int ppc_fixup_cpu(PowerPCCPU *cpu)
static
void
ppc_cpu_realizefn
(
DeviceState
*
dev
,
Error
**
errp
)
{
CPUState
*
cs
=
CPU
(
dev
);
PowerPCCPU
*
cpu
=
POWERPC_CPU
(
dev
);
CPUPPCState
*
env
=
&
cpu
->
env
;
PowerPCCPUClass
*
pcc
=
POWERPC_CPU_GET_CLASS
(
cpu
);
Error
*
local_err
=
NULL
;
#if !defined(CONFIG_USER_ONLY)
...
...
@@ -7849,15 +7849,15 @@ static void ppc_cpu_realizefn(DeviceState *dev, Error **errp)
init_ppc_proc
(
cpu
);
if
(
pcc
->
insns_flags
&
PPC_FLOAT
)
{
gdb_register_coprocessor
(
env
,
gdb_get_float_reg
,
gdb_set_float_reg
,
gdb_register_coprocessor
(
cs
,
gdb_get_float_reg
,
gdb_set_float_reg
,
33
,
"power-fpu.xml"
,
0
);
}
if
(
pcc
->
insns_flags
&
PPC_ALTIVEC
)
{
gdb_register_coprocessor
(
env
,
gdb_get_avr_reg
,
gdb_set_avr_reg
,
gdb_register_coprocessor
(
cs
,
gdb_get_avr_reg
,
gdb_set_avr_reg
,
34
,
"power-altivec.xml"
,
0
);
}
if
(
pcc
->
insns_flags
&
PPC_SPE
)
{
gdb_register_coprocessor
(
env
,
gdb_get_spe_reg
,
gdb_set_spe_reg
,
gdb_register_coprocessor
(
cs
,
gdb_get_spe_reg
,
gdb_set_spe_reg
,
34
,
"power-spe.xml"
,
0
);
}
...
...
@@ -7865,6 +7865,7 @@ static void ppc_cpu_realizefn(DeviceState *dev, Error **errp)
#if defined(PPC_DUMP_CPU)
{
CPUPPCState
*
env
=
&
cpu
->
env
;
const
char
*
mmu_model
,
*
excp_model
,
*
bus_model
;
switch
(
env
->
mmu_model
)
{
case
POWERPC_MMU_32B
:
...
...
@@ -8016,10 +8017,10 @@ static void ppc_cpu_realizefn(DeviceState *dev, Error **errp)
printf
(
" none
\n
"
);
printf
(
" Time-base/decrementer clock source: %s
\n
"
,
env
->
flags
&
POWERPC_FLAG_RTC_CLK
?
"RTC clock"
:
"bus clock"
);
dump_ppc_insns
(
env
);
dump_ppc_sprs
(
env
);
fflush
(
stdout
);
}
dump_ppc_insns
(
env
);
dump_ppc_sprs
(
env
);
fflush
(
stdout
);
#endif
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录