aboutsummaryrefslogtreecommitdiff
path: root/gdbstub/user.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdbstub/user.c')
-rw-r--r--gdbstub/user.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdbstub/user.c b/gdbstub/user.c
index 92663d9..e10988a 100644
--- a/gdbstub/user.c
+++ b/gdbstub/user.c
@@ -394,6 +394,23 @@ int gdb_target_memory_rw_debug(CPUState *cpu, hwaddr addr,
}
/*
+ * cpu helpers
+ */
+
+unsigned int gdb_get_max_cpus(void)
+{
+ CPUState *cpu;
+ unsigned int max_cpus = 1;
+
+ CPU_FOREACH(cpu) {
+ max_cpus = max_cpus <= cpu->cpu_index ? cpu->cpu_index + 1 : max_cpus;
+ }
+
+ return max_cpus;
+}
+
+
+/*
* Break/Watch point helpers
*/