Replies: 2 comments
-
As an alternative to (1) something similar to |
Beta Was this translation helpful? Give feedback.
-
If you haven't seen it yet, I suggest reading the libtock section of libtock-rs' Overview page. In retrospect we should probably add the following sentence:
I do think that adding an With respect to adding string-printing functionality to the LowLevelDebug syscall API: I don't think that is a good fit. I developed LowLevelDebug at a time when I was trying to get relocation working. Printing a string was not possible because pointers were not working. That's why I implemented LowLevelDebug: Console, which is normally the debugging tool you would use, wasn't available. LowLevelDebug was never intended to be a part of production Tock systems, only a debugging tool to use when nothing else works. Currently, the Console driver is the correct place to output debug messages. That said, maybe having a separate output stream for error messages is sensible (Unix has stdout and stderr, after all). I'm not sure if that is worth the extra code size + RAM usage, though, for a system as lightweight as Tock. It depends on the use case of course, so making that an optional feature seems reasonable (for users who want it). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently the
libtock-rs
only supports two types of panic handlers, solely based whether or not it is compiled withdebug-assertions
enabled. In both cases it is writing alert code vialldb
and in case ofdebug-assertions
it attempts to print panic message on the console.I think it would be beneficial to have more flexibility here, for that two things seem to be necessary:
in the
libtock_rs/Cargo.toml
and correspondingly in
libtock_rs/src/lib
:LowLevelDebug
to allow printing an arbitrary-formatted string. This is to let the custom panic handler to output the panic data on a dedicated debug channel in case it is different from theConsole
one.Does it make sense? If it does, I have a half-baked patch I could submit as a PR.
Beta Was this translation helpful? Give feedback.
All reactions