All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] target/m68k: implement m68k "any instruction" trace mode
@ 2021-05-19 14:29 Mark Cave-Ayland
  2021-05-19 14:29 ` [PATCH 1/4] target/m68k: introduce is_singlestepping() function Mark Cave-Ayland
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Mark Cave-Ayland @ 2021-05-19 14:29 UTC (permalink / raw)
  To: qemu-devel, laurent

This patchset implements the m68k "any instruction" tracing mode which is used
by the NetBSD kernel debugger to implement single-stepping. It is based upon
reading through the M68000 PRM and looking at how the ARM target handles both
gdbstub and architectural single-step exceptions.

With this patchset it becomes possible to single-step the NetBSD kernel using
the in-built kernel debugger:

Stopped in pid 0.1 (system) at  netbsd:cpu_Debugger+0x6:        unlk    a6
db> s
Stopped in pid 0.1 (system) at  netbsd:cpu_Debugger+0x8:        rts
db> 
Stopped in pid 0.1 (system) at  netbsd:main+0x2c:       jsr     kernel_lock_init
        [addr:0x1a38f6 ]
db> 
Stopped in pid 0.1 (system) at  netbsd:kernel_lock_init:        linkw   a6,#0
db> 
Stopped in pid 0.1 (system) at  netbsd:kernel_lock_init+0x4:    clrb    kernel_l
ock     [addr:0x33f400 ]
db> 
Stopped in pid 0.1 (system) at  netbsd:kernel_lock_init+0xa:    clrb    kernel_l
ock_dodebug     [addr:0x35b48c ]
db> 
Stopped in pid 0.1 (system) at  netbsd:kernel_lock_init+0x10:   unlk    a6
db> 
Stopped in pid 0.1 (system) at  netbsd:kernel_lock_init+0x12:   rts
db> c
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
[   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
[   1.0000000]     2018, 2019, 2020 The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 9.1 (GENERIC) #0: Sun Oct 18 19:24:30 UTC 2020
... etc ...


Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

[q800-macos-upstream patchset series: 2]

Mark Cave-Ayland (4):
  target/m68k: introduce is_singlestepping() function
  target/m68k: call gen_raise_exception() directly if single-stepping in
    gen_jmp_tb()
  target/m68k: introduce gen_singlestep_exception() function
  target/m68k: implement m68k "any instruction" trace mode

 target/m68k/cpu.h       |  8 +++++++
 target/m68k/translate.c | 51 ++++++++++++++++++++++++++++++++++-------
 2 files changed, 51 insertions(+), 8 deletions(-)

-- 
2.20.1



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-05-26 18:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-05-26 18:46 ` [PATCH 0/4] " Laurent Vivier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.