Useful info for debugging

hexdump -C <file_name>. Displays ASCII value of the file. Very useful to debug errors while you are interested in a string value. Always enable a single breakpoint in a multithreaded application under GDB. This helps your execution flow stick to one single thread of execution (provided the breakpoint is unique). To access elements of an array, typecast the [...]


Rules for abort handling

An "Abort" is a special type of error in a system, usually injected by an external actor. In a multi-threaded application, managing abort requests becomes pain. I am sharing a few observations that could improve/minimize mistakes. Implement one single handler for abort requests Outside the handler, if a thread is going to wait, and abort [...]