qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	qemu-devel@nongnu.org, laurent@vivier.eu
Subject: Re: [PATCH 4/4] target/m68k: implement m68k "any instruction" trace mode
Date: Fri, 21 May 2021 08:56:13 -0500	[thread overview]
Message-ID: <cf9e840a-385e-fa7c-b0b8-14998940a616@linaro.org> (raw)
In-Reply-To: <20210519142917.16693-5-mark.cave-ayland@ilande.co.uk>

On 5/19/21 9:29 AM, Mark Cave-Ayland wrote:
> The m68k trace mode is controlled by the top 2 bits in the SR register. Implement
> the m68k "any instruction" trace mode where bit T1=1 and bit T0=0 in which the CPU
> generates an EXCP_TRACE exception (vector 9 or offset 0x24) after executing each
> instruction.
> 
> This functionality is used by the NetBSD kernel debugger to allow single-stepping
> on m68k architectures.
> 
> Signed-off-by: Mark Cave-Ayland<mark.cave-ayland@ilande.co.uk>
> ---
>   target/m68k/cpu.h       |  8 ++++++++
>   target/m68k/translate.c | 27 ++++++++++++++++++++-------
>   2 files changed, 28 insertions(+), 7 deletions(-)

It wouldn't be difficult to handle 'trace on change of flow' as well, if you 
wanted.  But this is certainly good.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


  reply	other threads:[~2021-05-21 13:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 14:29 [PATCH 0/4] target/m68k: implement m68k "any instruction" trace mode Mark Cave-Ayland
2021-05-19 14:29 ` [PATCH 1/4] target/m68k: introduce is_singlestepping() function Mark Cave-Ayland
2021-05-21 13:51   ` Richard Henderson
2021-05-19 14:29 ` [PATCH 2/4] target/m68k: call gen_raise_exception() directly if single-stepping in gen_jmp_tb() Mark Cave-Ayland
2021-05-21 13:52   ` Richard Henderson
2021-05-19 14:29 ` [PATCH 3/4] target/m68k: introduce gen_singlestep_exception() function Mark Cave-Ayland
2021-05-21 13:52   ` Richard Henderson
2021-05-19 14:29 ` [PATCH 4/4] target/m68k: implement m68k "any instruction" trace mode Mark Cave-Ayland
2021-05-21 13:56   ` Richard Henderson [this message]
2021-05-26 18:46 ` [PATCH 0/4] " Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf9e840a-385e-fa7c-b0b8-14998940a616@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=laurent@vivier.eu \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).