Subject: Re: KGDB?
To: None <port-sparc@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: port-sparc
Date: 02/17/1995 18:54:41
>> Also, single stepping doesn't work.  (Yes, I know that single
>> stepping machine instructions on the sparc isn't easy to implement.)
> i though it wasn't possible at all...  ?

It can be done, sort of - you have to fake it by either putting a sparc
emulator into your debugger (which is quite hard in its full glory,
though you can make it somewhat easier on yourself by recognizing large
classes of instructions that can safely be allowed to execute
untouched), or figuring out every possible place flow control could go
after the current instruction and placing breakpoints at all of them.
A kernel debugger is particularly hard, largely because you have to
install your own trap vector table, both to field interrupts and
because if you want to execute an instruction that can trap under any
circumstance, you have to get out of the trap window and re-enable
traps before you can take a breakpoint trap.  (Trapping with traps
disabled causes an infamous "Watchdog reset!".)

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu