Skip to main content
7 events
when toggle format what by license comment
Nov 4, 2019 at 17:07 comment added Barmar @MooseBoys Do you really think the OP was limiting the scope of the question to a debugger application, rather than debugging techniques in general?
Nov 4, 2019 at 4:45 comment added MooseBoys I'm not sure that "you can never write bug-free code" leads to "you must use a debugger", unless you're using an extremely broad definition of the word. I've worked on platforms that had no debugger whatsoever, and had to use print statements over serial, patterns on LEDs, or even oscilloscope readouts to diagnose and fix bugs.
Nov 2, 2019 at 18:09 comment added Jean-Baptiste Yunès I would add that the only thing that can avoid debugging would be a constructive mathematical proof of the algorithm and the use of certified tools and hardware. If not, then bugs are unavoidable.
Nov 2, 2019 at 11:55 comment added Christophe @Ruslan of course ! I've put them in the same paragraph since both are about resource management, but the "that ...memory management" clause was for the smart pointers only. Sorry for the ambiguity.
Nov 2, 2019 at 11:41 comment added Ruslan And don't forget that RAII is not only about memory management: there's tons of resource types you want to automatically release in the correct order, for which in C you would have to resort to the goto ladder of manual unwinding. Example of such resources: interrupt flag, mutexes, states of peripherals. A good example of what you get rid of with RAII (the goto ladder) can be seen in this function in a Linux driver.
Nov 1, 2019 at 17:40 history edited Christophe CC BY-SA 4.0
added 181 characters in body
Nov 1, 2019 at 17:23 history answered Christophe CC BY-SA 4.0