aboutsummaryrefslogtreecommitdiff
path: root/target/avr/cpu.c
diff options
context:
space:
mode:
authorMichael Rolnik <mrolnik@gmail.com>2020-01-26 18:52:23 +0100
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-07-10 17:58:32 +0200
commit12b35405476fa7f733538ec6bb3ffc91129c0555 (patch)
tree30ff87f9f99d7cbca08c8cbe0d3f23cf05fb6c9c /target/avr/cpu.c
parent3fa28dd6cf848c5f7fddba84a6d7789027c58a25 (diff)
target/avr: CPU class: Add GDB support
This includes GDB hooks for reading from wnd wrtiting to AVR registers, and xml register definition file as well. [AM: Split a larger AVR introduction patch into logical units] Suggested-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com> Co-developed-by: Michael Rolnik <mrolnik@gmail.com> Co-developed-by: Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by: Michael Rolnik <mrolnik@gmail.com> Signed-off-by: Sarah Harris <S.E.Harris@kent.ac.uk> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com> Acked-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> [thuth: Fixed avr_cpu_gdb_read_register() parameter] Signed-off-by: Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-7-huth@tuxfamily.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'target/avr/cpu.c')
-rw-r--r--target/avr/cpu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/avr/cpu.c b/target/avr/cpu.c
index be06875225..05dd5551c7 100644
--- a/target/avr/cpu.c
+++ b/target/avr/cpu.c
@@ -210,4 +210,8 @@ static void avr_cpu_class_init(ObjectClass *oc, void *data)
cc->disas_set_info = avr_cpu_disas_set_info;
cc->tcg_initialize = avr_cpu_tcg_init;
cc->synchronize_from_tb = avr_cpu_synchronize_from_tb;
+ cc->gdb_read_register = avr_cpu_gdb_read_register;
+ cc->gdb_write_register = avr_cpu_gdb_write_register;
+ cc->gdb_num_core_regs = 35;
+ cc->gdb_core_xml_file = "avr-cpu.xml";
}