Ticket #4203 clarification

Joel Sherrill joel at rtems.org
Fri Sep 3 01:35:57 UTC 2021


On Thu, Sep 2, 2021 at 8:01 PM zack leung <zakthertemsdev at gmail.com> wrote:
>
> Hello!
>
> 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?
>

Bringing this over from chat.

The methods are architecture specific and may be in score/cpu or
bsps/shared or a specific BSP (hope now there). For an example,
score/cpu/i386/cpu.c has an exception printer. It seems to be the one
cited as an example that could be improved. The thread id is printed
in decimal, not hex. The exception type is only printed as a number.
This could be turned into a number and exception name. The list of
exception number/names is in the manual for the architecture. For an
i386 or later, that should be in many places. There is only so much
information in the exception frame passed in, so just make it more
useful. If you look on other architectures for similar exception
printers, you may find some print RTEMS state. Perhaps that's common
info that could be printed by a shared subroutine.

For a manual, this is the grandparent for i386 info:

https://css.csail.mit.edu/6.858/2014/readings/i386.pdf

And yes, that is from 1986 and I think I have a paper copy that old.
But all x86 info should be essentially the same as what's presented in
there. There may be additions but that's the original root.

I wouldn't look actively at other architecture exception handlers. You
could easily get lost in the details of each architecture and
confused. Focus on the i386 first and how it could be better. For
example, taking the exception number of printing a string name so you
don't have to look it up. You find the list in the manual.

FWIW I think the PowerPC prints numbers also.

The name of the handler may be architecture specific. Hopefully
someone can point to some for other architectures. But a good solution
on x86 would be a good start.

--joel

--joel
> Thanks
>
> Zack
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list