qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 4/4] target/m68k: implement m68k "any instruction" trace mode


From: Richard Henderson
Subject: Re: [PATCH 4/4] target/m68k: implement m68k "any instruction" trace mode
Date: Fri, 21 May 2021 08:56:13 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

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 via email to

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