OSDN Git Service

target/m68k: implement m68k "any instruction" trace mode
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Wed, 19 May 2021 14:29:17 +0000 (15:29 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Wed, 26 May 2021 18:45:18 +0000 (20:45 +0200)
commit5e50c6c72bf8575f124ec9397411f4a2ff0d0206
tree55651406bbf6c39962c5405995c00f1bd1b21a58
parent456a0e3b3c723d1d599d73920e98474ca9073386
target/m68k: implement m68k "any instruction" trace mode

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>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210519142917.16693-5-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
target/m68k/cpu.h
target/m68k/translate.c