[Coco] Re: Question about SWI and the Kernel
Boisy G. Pitre
boisy at boisypitre.com
Tue Apr 5 22:20:52 EDT 2005
On Apr 5, 2005, at 1:42 PM, Jessie Oberreuter wrote:
>
>
> On Tue, 5 Apr 2005, Boisy G. Pitre wrote:
>
>> But this means I'll have to add krnlp3 and krnlp4 in my bootfile. I
>> never did like the way this was done. I am considering modifying
>> krnp2 to search and link for krnp3-krnp9, and remove the linking code
>> in each of the other krnp3-p4 modules. I know it would break the
>> "convention" and would limit the practical number to krnp9 (the way
>> it is now is a bit more robust), but it makes no sense to force the
>> use of previous kernel modules.
>>
>> Then again, I may just put F$Debug right into the kernel. We'll see.
>
> I've always disliked it as well. I don't have my manuals here at
> the office, but I'd rather suggest that kernel modules (or "additional
> kernel modules") get a different type attribute. Then boot can just
> walk the in-memory module directory and install each such module it
> finds. Not only does this save the "trial and error" link approach,
> but it also lets us give our kernel extensions meaningful names.
That's an interesting idea. The pros is that it will be faster than
the kernel doing sucessive os9 F$Links to find krnp4, krnp5, etc... The
downside is that we must define a new attribute bit or a new type,
something I would do with a bit of trepidation. There are some issues
to consider here.
I now have the NoICE debugger host on Windows talking happily on my
CoCo 3 and NitrOS-9. I can STEP instructions and watch the registers
change, set breakpoints and GO to them, etc. Very very nice.
The only thing that is hampering me at the moment is the fact that my
breakpoint instruction is 3 bytes (os9 F$Debug = $103F54). The NoICE
debugger is smart... it looks at conditional branch instructions as
special cases and sets TWO breakpoints, in a case like this:
F7E2 4C inca
F7E3 54 lsrb
F7E4 26FC bne $F7E2
F7E6 9709 sta 09
So it would set a breakpoint at F7E6 and F7E2 so that it would catch
either way the control of the processor goes. However, in using the 3
byte breakpoint, there's a problem. If NoICE were to put the bytes
$103F54 at offset $F7E2, the $54 would overwrite the $F7E4, which is
part of the bne instruction. So NoICE pops up a message that says:
"Multiple byte breakpoint would overlap the previous breakpoint"
This is a strong motivation for me to move to a single SWI instruction
as a means for entering debug mode. I'll entertain any thoughts anyone
else has.
--
Boisy G. Pitre
E-Mail: boisy at boisypitre.com
Mobile: (337) 781-3997
Web: www.boisypitre.com
More information about the Coco
mailing list