Philippe Mathieu-Daudé <phi...@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é <phi...@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 > void gdb_breakpoint_remove_all(CPUState *cs); > > #endif /* _INTERNALS_H_ */ > diff --git a/include/sysemu/accel-ops.h b/include/sysemu/accel-ops.h > index 8cc7996def..30690c71bd 100644 > --- a/include/sysemu/accel-ops.h > +++ b/include/sysemu/accel-ops.h > @@ -10,7 +10,7 @@ > #ifndef ACCEL_OPS_H > #define ACCEL_OPS_H > > -#include "exec/hwaddr.h" > +#include "exec/cpu-common.h" > #include "qom/object.h" > > #define ACCEL_OPS_SUFFIX "-ops" > @@ -48,8 +48,8 @@ struct AccelOpsClass { > > /* gdbstub hooks */ > bool (*supports_guest_debug)(void); > - int (*insert_breakpoint)(CPUState *cpu, int type, hwaddr addr, hwaddr > len); > - int (*remove_breakpoint)(CPUState *cpu, int type, hwaddr addr, hwaddr > len); > + int (*insert_breakpoint)(CPUState *cpu, int type, vaddr addr, vaddr len); > + int (*remove_breakpoint)(CPUState *cpu, int type, vaddr addr, vaddr len); > void (*remove_all_breakpoints)(CPUState *cpu); > };