[coyotos-dev] Binary naming

Jonathan S. Shapiro shap at eros-os.com
Thu Apr 10 03:03:30 CDT 2008


I'm hitting a debugging annoyance.

In UNIX, processes are constructed from files, and the system can tell
you the binary file name. This is surprisingly useful, since you know
what to go disassemble when something goes wrong.

In EROS, I used a slot in the process state for a short string to serve
the same purpose. Actually, I initially had EROS mkimage emit a "map"
file for me, but it was much more convenient to just stick a short
string into the process state that the kernel could print out when
something went wrong.

This is mostly a bootstrap issue. Once you get far enough to have a
debugger, the need for this largely disappears.

In Coyotos, I can basically take two approaches here:

  1. Introduce a grand fallback keeper. All of the primal processes
     will specify this fallback process as their keeper. The fallback
     process has a (statically constructed) list of process name
     strings. When a primal process dies, it does a printf telling
     us what happened.

  2. Add space in the process structure for an 8 byte string or so
     that the kernel can print.

Anybody have a better idea?

shap



More information about the coyotos-dev mailing list