On Mon, 1 Jul 2019 at 14:26, Philippe Mathieu-Daudé <[email protected]> wrote: > > These routines are TCG specific. > > Signed-off-by: Philippe Mathieu-Daudé <[email protected]> > --- > target/arm/Makefile.objs | 2 +- > target/arm/cpu.c | 11 +- > target/arm/debug_helper.c | 334 ++++++++++++++++++++++++++++++++++++++ > target/arm/helper.c | 23 --- > target/arm/op_helper.c | 295 --------------------------------- > 5 files changed, 339 insertions(+), 326 deletions(-) > create mode 100644 target/arm/debug_helper.c
> --- a/target/arm/cpu.c > +++ b/target/arm/cpu.c > @@ -2566,7 +2566,6 @@ static void arm_cpu_class_init(ObjectClass *oc, void > *data) > cc->gdb_write_register = arm_cpu_gdb_write_register; > #ifndef CONFIG_USER_ONLY > cc->do_interrupt = arm_cpu_do_interrupt; > - cc->get_phys_page_attrs_debug = arm_cpu_get_phys_page_attrs_debug; > cc->asidx_from_attrs = arm_asidx_from_attrs; > cc->vmsd = &vmstate_arm_cpu; > cc->virtio_is_big_endian = arm_cpu_virtio_is_big_endian; > @@ -2578,19 +2577,17 @@ static void arm_cpu_class_init(ObjectClass *oc, void > *data) > cc->gdb_arch_name = arm_gdb_arch_name; > cc->gdb_get_dynamic_xml = arm_gdb_get_dynamic_xml; > cc->gdb_stop_before_watchpoint = true; > - cc->debug_excp_handler = arm_debug_excp_handler; > - cc->debug_check_watchpoint = arm_debug_check_watchpoint; > -#if !defined(CONFIG_USER_ONLY) > - cc->adjust_watchpoint_address = arm_adjust_watchpoint_address; > -#endif > - > cc->disas_set_info = arm_disas_set_info; > #ifdef CONFIG_TCG > cc->tcg_initialize = arm_translate_init; > cc->tlb_fill = arm_cpu_tlb_fill; > + cc->debug_excp_handler = arm_debug_excp_handler; > + cc->debug_check_watchpoint = arm_debug_check_watchpoint; > #if !defined(CONFIG_USER_ONLY) > cc->do_unaligned_access = arm_cpu_do_unaligned_access; > cc->do_transaction_failed = arm_cpu_do_transaction_failed; > + cc->adjust_watchpoint_address = arm_adjust_watchpoint_address; > + cc->get_phys_page_attrs_debug = arm_cpu_get_phys_page_attrs_debug; > #endif /* CONFIG_TCG && !CONFIG_USER_ONLY */ I don't think get_phys_page_attrs_debug is TCG specific -- anything that wants to do a virt-to-phys translation will use it, including for instance cpu_memory_rw_debug() or the monitor gva2gpa command. target/i386/cpu.c doesn't put its cc->get_phys_page_debug assignment inside a CONFIG_TCG ifdef. thanks -- PMM
