qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 32/36] gdbstub: Expose gdb_get_process() and gdb_get_first


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v3 32/36] gdbstub: Expose gdb_get_process() and gdb_get_first_cpu_in_process()
Date: Tue, 27 Jun 2023 22:59:16 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

On 27/6/23 18:09, Alex Bennée wrote:
From: Ilya Leoshkevich <iii@linux.ibm.com>

These functions will be needed by user-target.c in order to retrieve
the name of the executable.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230621203627.1808446-5-iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
  gdbstub/internals.h |  2 ++
  gdbstub/gdbstub.c   | 16 ++++++++--------
  2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/gdbstub/internals.h b/gdbstub/internals.h
index 33d21d6488..25e4d5eeaa 100644
--- a/gdbstub/internals.h
+++ b/gdbstub/internals.h
@@ -129,6 +129,8 @@ void gdb_read_byte(uint8_t ch);
   */
  bool gdb_got_immediate_ack(void);
  /* utility helpers */
+GDBProcess *gdb_get_process(uint32_t pid);
+CPUState *gdb_get_first_cpu_in_process(GDBProcess *process);

It would be nice to have documentation for public API.
Can be amended later, so:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

  CPUState *gdb_first_attached_cpu(void);
  void gdb_append_thread_id(CPUState *cpu, GString *buf);
  int gdb_get_cpu_index(CPUState *cpu);




reply via email to

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