<div dir="ltr"><div>Say i find an exception (ex format string printing a decimal.) How do I test that my improvement works? <br></div><div><br></div><div>Thanks <br></div><div>Zack<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 3 Sept 2021 at 01:36, Joel Sherrill <<a href="mailto:joel@rtems.org">joel@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Sep 2, 2021 at 8:01 PM zack leung <<a href="mailto:zakthertemsdev@gmail.com" target="_blank">zakthertemsdev@gmail.com</a>> wrote:<br>
><br>
> Hello!<br>
><br>
> I'd like to begin working on 4203. It involves improving the exception output I'd like to know how I spot exceptions that could be reported better by the system? How do I also know how do I test it and what BSPs i can test with only my computer Also joel told me The list of exception number/names is in the manual for the architecture. For an i386 or later, that should be in many places. Where do i find the documentation of the bsps?<br>
><br>
<br>
Bringing this over from chat.<br>
<br>
The methods are architecture specific and may be in score/cpu or<br>
bsps/shared or a specific BSP (hope now there). For an example,<br>
score/cpu/i386/cpu.c has an exception printer. It seems to be the one<br>
cited as an example that could be improved. The thread id is printed<br>
in decimal, not hex. The exception type is only printed as a number.<br>
This could be turned into a number and exception name. The list of<br>
exception number/names is in the manual for the architecture. For an<br>
i386 or later, that should be in many places. There is only so much<br>
information in the exception frame passed in, so just make it more<br>
useful. If you look on other architectures for similar exception<br>
printers, you may find some print RTEMS state. Perhaps that's common<br>
info that could be printed by a shared subroutine.<br>
<br>
For a manual, this is the grandparent for i386 info:<br>
<br>
<a href="https://css.csail.mit.edu/6.858/2014/readings/i386.pdf" rel="noreferrer" target="_blank">https://css.csail.mit.edu/6.858/2014/readings/i386.pdf</a><br>
<br>
And yes, that is from 1986 and I think I have a paper copy that old.<br>
But all x86 info should be essentially the same as what's presented in<br>
there. There may be additions but that's the original root.<br>
<br>
I wouldn't look actively at other architecture exception handlers. You<br>
could easily get lost in the details of each architecture and<br>
confused. Focus on the i386 first and how it could be better. For<br>
example, taking the exception number of printing a string name so you<br>
don't have to look it up. You find the list in the manual.<br>
<br>
FWIW I think the PowerPC prints numbers also.<br>
<br>
The name of the handler may be architecture specific. Hopefully<br>
someone can point to some for other architectures. But a good solution<br>
on x86 would be a good start.<br>
<br>
--joel<br>
<br>
--joel<br>
> Thanks<br>
><br>
> Zack<br>
> _______________________________________________<br>
> devel mailing list<br>
> <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div>