Skip to content

Commit

Permalink
sysemu/hvf: Use vaddr for hvf_arch_[insert|remove]_hw_breakpoint
Browse files Browse the repository at this point in the history
Changes the signature of the target-defined functions for
inserting/removing hvf hw breakpoints. The address and length arguments
are now of vaddr type, which both matches the type used internally in
accel/hvf/hvf-all.c and makes the api target-agnostic.

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230807155706.9580-5-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
Anton Johansson authored and rth7680 committed Aug 24, 2023
1 parent b8a6eb1 commit d447a62
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions include/sysemu/hvf.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ int hvf_sw_breakpoints_active(CPUState *cpu);

int hvf_arch_insert_sw_breakpoint(CPUState *cpu, struct hvf_sw_breakpoint *bp);
int hvf_arch_remove_sw_breakpoint(CPUState *cpu, struct hvf_sw_breakpoint *bp);
int hvf_arch_insert_hw_breakpoint(target_ulong addr, target_ulong len,
int type);
int hvf_arch_remove_hw_breakpoint(target_ulong addr, target_ulong len,
int type);
int hvf_arch_insert_hw_breakpoint(vaddr addr, vaddr len, int type);
int hvf_arch_remove_hw_breakpoint(vaddr addr, vaddr len, int type);
void hvf_arch_remove_all_hw_breakpoints(void);

/*
Expand Down
4 changes: 2 additions & 2 deletions target/arm/hvf/hvf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2063,7 +2063,7 @@ int hvf_arch_remove_sw_breakpoint(CPUState *cpu, struct hvf_sw_breakpoint *bp)
return 0;
}

int hvf_arch_insert_hw_breakpoint(target_ulong addr, target_ulong len, int type)
int hvf_arch_insert_hw_breakpoint(vaddr addr, vaddr len, int type)
{
switch (type) {
case GDB_BREAKPOINT_HW:
Expand All @@ -2077,7 +2077,7 @@ int hvf_arch_insert_hw_breakpoint(target_ulong addr, target_ulong len, int type)
}
}

int hvf_arch_remove_hw_breakpoint(target_ulong addr, target_ulong len, int type)
int hvf_arch_remove_hw_breakpoint(vaddr addr, vaddr len, int type)
{
switch (type) {
case GDB_BREAKPOINT_HW:
Expand Down
4 changes: 2 additions & 2 deletions target/i386/hvf/hvf.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,12 +690,12 @@ int hvf_arch_remove_sw_breakpoint(CPUState *cpu, struct hvf_sw_breakpoint *bp)
return -ENOSYS;
}

int hvf_arch_insert_hw_breakpoint(target_ulong addr, target_ulong len, int type)
int hvf_arch_insert_hw_breakpoint(vaddr addr, vaddr len, int type)
{
return -ENOSYS;
}

int hvf_arch_remove_hw_breakpoint(target_ulong addr, target_ulong len, int type)
int hvf_arch_remove_hw_breakpoint(vaddr addr, vaddr len, int type)
{
return -ENOSYS;
}
Expand Down

0 comments on commit d447a62

Please sign in to comment.