> Sorry, I wrote that really fast.
>
> I meant we could modify glibc's assert() to branch based on the value
> of __vcore_context to either user printf or ros_debug() depending on
> its value.
I ended up doing something similar to this. I kept our own assert for
any code that includes parlib headers - I like being able to drop a
breakpoint in the assert error case.
For printf, I overrode printf to call our own, which checks
in_vcore_context, but only printf is overriden. The others, e.g.
vprintf, are still glibcs. Our printf then calls either ros_vdebug or
vprintf. The only other tidbit that is missing is that we have some
printf specifiers used in glibc that I didn't put in ros_debug.
Barret