I blogged about GCC command options for debugging https://kristerw.blogspot.se/2018/02/gcc-command-options-for-debugging-og.html