Re: [PATCH v8 10/11] target/arm: gdbstub: Guard M-profile code with CONFIG_TCG

2023-03-13 Thread Philippe Mathieu-Daudé

On 9/3/23 21:14, Fabiano Rosas wrote:

This code is only relevant when TCG is present in the build. If we try
to build with --disable-tcg we currently get:

libqemu-aarch64-softmmu.fa.p/target_arm_gdbstub.c.o: in function
`m_sysreg_ptr': ../target/arm/gdbstub.c:356: undefined reference to
`arm_v7m_get_sp_ptr'

Signed-off-by: Fabiano Rosas 
---
  target/arm/gdbstub.c | 4 
  1 file changed, 4 insertions(+)


This patch should come before patches 5-6/11, or become
first of this series.

Reviewed-by: Philippe Mathieu-Daudé 




Re: [PATCH v8 10/11] target/arm: gdbstub: Guard M-profile code with CONFIG_TCG

2023-03-09 Thread Richard Henderson

On 3/9/23 12:14, Fabiano Rosas wrote:

This code is only relevant when TCG is present in the build. If we try
to build with --disable-tcg we currently get:

libqemu-aarch64-softmmu.fa.p/target_arm_gdbstub.c.o: in function
`m_sysreg_ptr': ../target/arm/gdbstub.c:356: undefined reference to
`arm_v7m_get_sp_ptr'

Signed-off-by: Fabiano Rosas
---
  target/arm/gdbstub.c | 4 
  1 file changed, 4 insertions(+)


Reviewed-by: Richard Henderson 


r~



[PATCH v8 10/11] target/arm: gdbstub: Guard M-profile code with CONFIG_TCG

2023-03-09 Thread Fabiano Rosas
This code is only relevant when TCG is present in the build. If we try
to build with --disable-tcg we currently get:

libqemu-aarch64-softmmu.fa.p/target_arm_gdbstub.c.o: in function
`m_sysreg_ptr': ../target/arm/gdbstub.c:356: undefined reference to
`arm_v7m_get_sp_ptr'

Signed-off-by: Fabiano Rosas 
---
 target/arm/gdbstub.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c
index 3f799f5d05..2ecc362ac2 100644
--- a/target/arm/gdbstub.c
+++ b/target/arm/gdbstub.c
@@ -322,6 +322,7 @@ static int arm_gen_dynamic_sysreg_xml(CPUState *cs, int 
base_reg)
 return cpu->dyn_sysreg_xml.num;
 }
 
+#ifdef CONFIG_TCG
 typedef enum {
 M_SYSREG_MSP,
 M_SYSREG_PSP,
@@ -479,6 +480,7 @@ static int arm_gen_dynamic_m_secextreg_xml(CPUState *cs, 
int orig_base_reg)
 return cpu->dyn_m_secextreg_xml.num;
 }
 #endif
+#endif /* CONFIG_TCG */
 
 const char *arm_gdb_get_dynamic_xml(CPUState *cs, const char *xmlname)
 {
@@ -553,6 +555,7 @@ void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu)
  arm_gen_dynamic_sysreg_xml(cs, cs->gdb_num_regs),
  "system-registers.xml", 0);
 
+#ifdef CONFIG_TCG
 if (arm_feature(env, ARM_FEATURE_M)) {
 gdb_register_coprocessor(cs,
 arm_gdb_get_m_systemreg, arm_gdb_set_m_systemreg,
@@ -567,4 +570,5 @@ void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu)
 }
 #endif
 }
+#endif
 }
-- 
2.35.3