mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
cpu: Move breakpoints field from CPU_COMMON to CPUState
Most targets were using offsetof(CPUFooState, breakpoints) to determine how much of CPUFooState to clear on reset. Use the next field after CPU_COMMON instead, if any, or sizeof(CPUFooState) otherwise. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
ff4700b05c
commit
f0c3c505a8
43 changed files with 94 additions and 73 deletions
|
@ -82,7 +82,7 @@ static void arm_cpu_reset(CPUState *s)
|
|||
|
||||
acc->parent_reset(s);
|
||||
|
||||
memset(env, 0, offsetof(CPUARMState, breakpoints));
|
||||
memset(env, 0, offsetof(CPUARMState, features));
|
||||
g_hash_table_foreach(cpu->cp_regs, cp_reg_reset, cpu);
|
||||
env->vfp.xregs[ARM_VFP_FPSID] = cpu->reset_fpsid;
|
||||
env->vfp.xregs[ARM_VFP_MVFR0] = cpu->mvfr0;
|
||||
|
|
|
@ -9061,8 +9061,8 @@ void gen_intermediate_code_internal_a64(ARMCPU *cpu,
|
|||
tcg_clear_temp_count();
|
||||
|
||||
do {
|
||||
if (unlikely(!QTAILQ_EMPTY(&env->breakpoints))) {
|
||||
QTAILQ_FOREACH(bp, &env->breakpoints, entry) {
|
||||
if (unlikely(!QTAILQ_EMPTY(&cs->breakpoints))) {
|
||||
QTAILQ_FOREACH(bp, &cs->breakpoints, entry) {
|
||||
if (bp->pc == dc->pc) {
|
||||
gen_exception_insn(dc, 0, EXCP_DEBUG);
|
||||
/* Advance PC so that clearing the breakpoint will
|
||||
|
|
|
@ -10733,8 +10733,8 @@ static inline void gen_intermediate_code_internal(ARMCPU *cpu,
|
|||
}
|
||||
#endif
|
||||
|
||||
if (unlikely(!QTAILQ_EMPTY(&env->breakpoints))) {
|
||||
QTAILQ_FOREACH(bp, &env->breakpoints, entry) {
|
||||
if (unlikely(!QTAILQ_EMPTY(&cs->breakpoints))) {
|
||||
QTAILQ_FOREACH(bp, &cs->breakpoints, entry) {
|
||||
if (bp->pc == dc->pc) {
|
||||
gen_exception_insn(dc, 0, EXCP_DEBUG);
|
||||
/* Advance PC so that clearing the breakpoint will
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue