3 ms·
Agree. Print debug with compartmentalized domain tracing using flow control to print or not print is the only way to debug live life safety embedded systems. 1
by yndoendo 6y ago
Agree. Print debug with compartmentalized domain tracing using flow control to print or not print is the only way to debug live life safety embedded systems.
1. Ability to prevent wasting resources on a system that does not need to be debugged.
2. Retain most print debug branches that were useful.
3. See how the internals are functioning on a live system with the issue that has yet to having a lab level proof.
- AnimalMuppet 6y agoEmbedded systems, where there are timing things going on, are an interesting special case. You can't just hit a breakpoint without (in the worst case) causing physical damage. It's even worse if it's multithreaded as well. If you hit a breakpoint, one thread stops and the others keep going, but they keep going in an environment where one thread is effectively dead (the one at the breakpoint). Everything is invalid from then on, in all threads. So breakpoint debugging is certain to be doomed. Print debugging is not doomed, but it's challenging. The problem is that the time to print out the message can change the timing, and therefore change what happens. It's not certain to do so, but it's something you always have to keep in the back of your mind: "What if this changed the sequence? What if what I'm seeing in the printouts isn't what I would see if the printouts weren't there?"