[PATCH for-6.1 v5 08/15] hw/core: Introduce TCGCPUOps.debug_check_breakpoint

Richard Henderson posted 15 patches 3 years, 8 months ago
Maintainers: Marek Vasut <marex@denx.de>, Eduardo Habkost <ehabkost@redhat.com>, Stafford Horne <shorne@gmail.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Thomas Huth <thuth@redhat.com>, Taylor Simpson <tsimpson@quicinc.com>, Laurent Vivier <laurent@vivier.eu>, Greg Kurz <groug@kaod.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Yoshinori Sato <ysato@users.sourceforge.jp>, David Gibson <david@gibson.dropbear.id.au>, Alistair Francis <alistair.francis@wdc.com>, David Hildenbrand <david@redhat.com>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Cornelia Huck <cohuck@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Max Filippov <jcmvbkbc@gmail.com>, Bin Meng <bin.meng@windriver.com>, Michael Rolnik <mrolnik@gmail.com>, Peter Maydell <peter.maydell@linaro.org>, Palmer Dabbelt <palmer@dabbelt.com>, Artyom Tarasenko <atar4qemu@gmail.com>, Aurelien Jarno <aurelien@aurel32.net>, Chris Wulff <crwulff@gmail.com>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
There is a newer version of this series
[PATCH for-6.1 v5 08/15] hw/core: Introduce TCGCPUOps.debug_check_breakpoint
Posted by Richard Henderson 3 years, 8 months ago
New hook to return true when an architectural breakpoint is
to be recognized and false when it should be suppressed.

First use must wait until other pieces are in place.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 include/hw/core/tcg-cpu-ops.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/hw/core/tcg-cpu-ops.h b/include/hw/core/tcg-cpu-ops.h
index 72d791438c..eab27d0c03 100644
--- a/include/hw/core/tcg-cpu-ops.h
+++ b/include/hw/core/tcg-cpu-ops.h
@@ -88,6 +88,12 @@ struct TCGCPUOps {
      */
     bool (*debug_check_watchpoint)(CPUState *cpu, CPUWatchpoint *wp);
 
+    /**
+     * @debug_check_breakpoint: return true if the architectural
+     * breakpoint whose PC has matched should really fire.
+     */
+    bool (*debug_check_breakpoint)(CPUState *cpu);
+
     /**
      * @io_recompile_replay_branch: Callback for cpu_io_recompile.
      *
-- 
2.25.1


Re: [PATCH for-6.1 v5 08/15] hw/core: Introduce TCGCPUOps.debug_check_breakpoint
Posted by Philippe Mathieu-Daudé 3 years, 8 months ago
On 7/20/21 3:17 AM, Richard Henderson wrote:
> New hook to return true when an architectural breakpoint is
> to be recognized and false when it should be suppressed.
> 
> First use must wait until other pieces are in place.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  include/hw/core/tcg-cpu-ops.h | 6 ++++++
>  1 file changed, 6 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>