gdbstub.c (29c343a463450f1aa15609014fb87a0472403d70) | gdbstub.c (893ca916c0b9432d46fc16f84c8d3b605a58c843) |
---|---|
1/* 2 * ARM gdb server stub 3 * 4 * Copyright (c) 2003-2005 Fabrice Bellard 5 * Copyright (c) 2013 SUSE LINUX Products GmbH 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public --- 310 unchanged lines hidden (view full) --- 319 g_string_append_printf(s, "<!DOCTYPE target SYSTEM \"gdb-target.dtd\">"); 320 g_string_append_printf(s, "<feature name=\"org.qemu.gdb.arm.sys.regs\">"); 321 g_hash_table_foreach(cpu->cp_regs, arm_register_sysreg_for_xml, ¶m); 322 g_string_append_printf(s, "</feature>"); 323 cpu->dyn_sysreg_xml.desc = g_string_free(s, false); 324 return cpu->dyn_sysreg_xml.num; 325} 326 | 1/* 2 * ARM gdb server stub 3 * 4 * Copyright (c) 2003-2005 Fabrice Bellard 5 * Copyright (c) 2013 SUSE LINUX Products GmbH 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public --- 310 unchanged lines hidden (view full) --- 319 g_string_append_printf(s, "<!DOCTYPE target SYSTEM \"gdb-target.dtd\">"); 320 g_string_append_printf(s, "<feature name=\"org.qemu.gdb.arm.sys.regs\">"); 321 g_hash_table_foreach(cpu->cp_regs, arm_register_sysreg_for_xml, ¶m); 322 g_string_append_printf(s, "</feature>"); 323 cpu->dyn_sysreg_xml.desc = g_string_free(s, false); 324 return cpu->dyn_sysreg_xml.num; 325} 326 |
327#ifdef CONFIG_TCG |
|
327typedef enum { 328 M_SYSREG_MSP, 329 M_SYSREG_PSP, 330 M_SYSREG_PRIMASK, 331 M_SYSREG_CONTROL, 332 M_SYSREG_BASEPRI, 333 M_SYSREG_FAULTMASK, 334 M_SYSREG_MSPLIM, --- 141 unchanged lines hidden (view full) --- 476 477 g_string_append_printf(s, "</feature>"); 478 cpu->dyn_m_secextreg_xml.desc = g_string_free(s, false); 479 cpu->dyn_m_secextreg_xml.num = base_reg - orig_base_reg; 480 481 return cpu->dyn_m_secextreg_xml.num; 482} 483#endif | 328typedef enum { 329 M_SYSREG_MSP, 330 M_SYSREG_PSP, 331 M_SYSREG_PRIMASK, 332 M_SYSREG_CONTROL, 333 M_SYSREG_BASEPRI, 334 M_SYSREG_FAULTMASK, 335 M_SYSREG_MSPLIM, --- 141 unchanged lines hidden (view full) --- 477 478 g_string_append_printf(s, "</feature>"); 479 cpu->dyn_m_secextreg_xml.desc = g_string_free(s, false); 480 cpu->dyn_m_secextreg_xml.num = base_reg - orig_base_reg; 481 482 return cpu->dyn_m_secextreg_xml.num; 483} 484#endif |
485#endif /* CONFIG_TCG */ |
|
484 485const char *arm_gdb_get_dynamic_xml(CPUState *cs, const char *xmlname) 486{ 487 ARMCPU *cpu = ARM_CPU(cs); 488 489 if (strcmp(xmlname, "system-registers.xml") == 0) { 490 return cpu->dyn_sysreg_xml.desc; 491 } else if (strcmp(xmlname, "sve-registers.xml") == 0) { --- 64 unchanged lines hidden (view full) --- 556 if (cpu_isar_feature(aa32_mve, cpu) && tcg_enabled()) { 557 gdb_register_coprocessor(cs, mve_gdb_get_reg, mve_gdb_set_reg, 558 1, "arm-m-profile-mve.xml", 0); 559 } 560 gdb_register_coprocessor(cs, arm_gdb_get_sysreg, arm_gdb_set_sysreg, 561 arm_gen_dynamic_sysreg_xml(cs, cs->gdb_num_regs), 562 "system-registers.xml", 0); 563 | 486 487const char *arm_gdb_get_dynamic_xml(CPUState *cs, const char *xmlname) 488{ 489 ARMCPU *cpu = ARM_CPU(cs); 490 491 if (strcmp(xmlname, "system-registers.xml") == 0) { 492 return cpu->dyn_sysreg_xml.desc; 493 } else if (strcmp(xmlname, "sve-registers.xml") == 0) { --- 64 unchanged lines hidden (view full) --- 558 if (cpu_isar_feature(aa32_mve, cpu) && tcg_enabled()) { 559 gdb_register_coprocessor(cs, mve_gdb_get_reg, mve_gdb_set_reg, 560 1, "arm-m-profile-mve.xml", 0); 561 } 562 gdb_register_coprocessor(cs, arm_gdb_get_sysreg, arm_gdb_set_sysreg, 563 arm_gen_dynamic_sysreg_xml(cs, cs->gdb_num_regs), 564 "system-registers.xml", 0); 565 |
566#ifdef CONFIG_TCG |
|
564 if (arm_feature(env, ARM_FEATURE_M) && tcg_enabled()) { 565 gdb_register_coprocessor(cs, 566 arm_gdb_get_m_systemreg, arm_gdb_set_m_systemreg, 567 arm_gen_dynamic_m_systemreg_xml(cs, cs->gdb_num_regs), 568 "arm-m-system.xml", 0); 569#ifndef CONFIG_USER_ONLY 570 if (arm_feature(env, ARM_FEATURE_M_SECURITY)) { 571 gdb_register_coprocessor(cs, 572 arm_gdb_get_m_secextreg, arm_gdb_set_m_secextreg, 573 arm_gen_dynamic_m_secextreg_xml(cs, cs->gdb_num_regs), 574 "arm-m-secext.xml", 0); 575 } 576#endif 577 } | 567 if (arm_feature(env, ARM_FEATURE_M) && tcg_enabled()) { 568 gdb_register_coprocessor(cs, 569 arm_gdb_get_m_systemreg, arm_gdb_set_m_systemreg, 570 arm_gen_dynamic_m_systemreg_xml(cs, cs->gdb_num_regs), 571 "arm-m-system.xml", 0); 572#ifndef CONFIG_USER_ONLY 573 if (arm_feature(env, ARM_FEATURE_M_SECURITY)) { 574 gdb_register_coprocessor(cs, 575 arm_gdb_get_m_secextreg, arm_gdb_set_m_secextreg, 576 arm_gen_dynamic_m_secextreg_xml(cs, cs->gdb_num_regs), 577 "arm-m-secext.xml", 0); 578 } 579#endif 580 } |
581#endif /* CONFIG_TCG */ |
|
578} | 582} |