qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 7/9] gdbstub: Make get cpu and hex conversion functions no


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v5 7/9] gdbstub: Make get cpu and hex conversion functions non-internal
Date: Thu, 27 Jun 2024 08:19:05 +0200
User-agent: Mozilla Thunderbird

On 27/6/24 08:10, Philippe Mathieu-Daudé wrote:
On 27/6/24 06:13, Gustavo Romero wrote:
Make the gdb_first_attached_cpu and gdb_hextomem non-internal so they
are not confined to use only in gdbstub.c.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
  gdbstub/internals.h        | 2 --
  include/exec/gdbstub.h     | 5 +++++
  include/gdbstub/commands.h | 6 ++++++
  3 files changed, 11 insertions(+), 2 deletions(-)


diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h
index 1bd2c4ec2a..77e5ec9a5b 100644
--- a/include/exec/gdbstub.h
+++ b/include/exec/gdbstub.h
@@ -135,4 +135,9 @@ void gdb_set_stop_cpu(CPUState *cpu);
  /* in gdbstub-xml.c, generated by scripts/feature_to_c.py */
  extern const GDBFeature gdb_static_features[];
+/**
+ * Return the first attached CPU
+ */
+CPUState *gdb_first_attached_cpu(void);

Alex, it seems dubious to expose the API like that.

IMHO GdbCmdHandler should take a GDBRegisterState argument,
then this would become:

   CPUState *gdb_first_attached_cpu(GDBRegisterState *s);

(With GDBRegisterState typedef being forward-declared).

That said, this can be done as another series on top...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]