[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 06/24] hw/core/cpu: Replace gdb_core_xml_file with gdb_co
From: |
Alex Bennée |
Subject: |
Re: [RFC PATCH 06/24] hw/core/cpu: Replace gdb_core_xml_file with gdb_core_feature |
Date: |
Mon, 14 Aug 2023 14:19:38 +0100 |
User-agent: |
mu4e 1.11.14; emacs 29.1.50 |
Akihiko Odaki <akihiko.odaki@daynix.com> writes:
> This is a tree-wide change to replace gdb_core_xml_file, the path to
> GDB XML file with gdb_core_feature, the pointer to GDBFeature. This
> also replaces the values assigned to gdb_num_core_regs with the
> num_regs member of GDBFeature where applicable to remove magic numbers.
>
> A following change will utilize additional information provided by
> GDBFeature to simplify XML file lookup.
re: other comment about assert(). Maybe gdb_find_static_feature() needs to
assert
success because:
Thread 1 "qemu-loongarch6" received signal SIGSEGV, Segmentation fault.
loongarch_cpu_class_init (c=<optimized out>, data=<optimized out>) at
../../target/loongarch/cpu.c:726
726 cc->gdb_num_core_regs = cc->gdb_core_feature->num_regs;
(gdb) p/x cc->gdb_core_feature
$1 = 0x0
(gdb) l
721 cc->disas_set_info = loongarch_cpu_disas_set_info;
722 cc->gdb_read_register = loongarch_cpu_gdb_read_register;
723 cc->gdb_write_register = loongarch_cpu_gdb_write_register;
724 cc->disas_set_info = loongarch_cpu_disas_set_info;
725 cc->gdb_core_feature =
gdb_find_static_feature("loongarch-base64.xml");
726 cc->gdb_num_core_regs = cc->gdb_core_feature->num_regs;
727 cc->gdb_stop_before_watchpoint = true;
728 cc->gdb_arch_name = loongarch_gdb_arch_name;
729
730 #ifdef CONFIG_TCG
--
Alex Bennée
Virtualisation Tech Lead @ Linaro