qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH-for-8.0 2/4] gdbstub: Use vaddr type for generic insert/remov


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH-for-8.0 2/4] gdbstub: Use vaddr type for generic insert/remove_breakpoint() API
Date: Wed, 7 Dec 2022 19:17:15 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.1

On 7/12/22 19:08, Fabiano Rosas wrote:
Philippe Mathieu-Daudé <philmd@linaro.org> writes:

Both insert/remove_breakpoint() handlers are used in system and
user emulation. We can not use the 'hwaddr' type on user emulation,
we have to use 'vaddr' which is defined as "wide enough to contain
any #target_ulong virtual address".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  gdbstub/internals.h        | 6 ++++--
  include/sysemu/accel-ops.h | 6 +++---
  2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/gdbstub/internals.h b/gdbstub/internals.h
index eabb0341d1..b23999f951 100644
--- a/gdbstub/internals.h
+++ b/gdbstub/internals.h
@@ -9,9 +9,11 @@
  #ifndef _INTERNALS_H_
  #define _INTERNALS_H_
+#include "exec/cpu-common.h"
+
  bool gdb_supports_guest_debug(void);
-int gdb_breakpoint_insert(CPUState *cs, int type, hwaddr addr, hwaddr len);
-int gdb_breakpoint_remove(CPUState *cs, int type, hwaddr addr, hwaddr len);
+int gdb_breakpoint_insert(CPUState *cs, int type, vaddr addr, vaddr len);
+int gdb_breakpoint_remove(CPUState *cs, int type, vaddr addr, vaddr len);

Now we should be able to remove the "exec/hwaddr.h" include from
gdbstub.c
Yes. And you made me notice I didn't commit the changes in gdbstub/{system,user}.c...



reply via email to

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