Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I go overkill on the debugger flags:

    -g -g3 -ggdb -gdwarf-4
Being able to debug C-macros has improved my life!

    (gdb) info macro Py_TYPE 
    Defined at Include/object.h:117
      included at Include/pytime.h:6
      included at Include/Python.h:65
      included at Parser/myreadline.c:12
    #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)


Isn't -g3 sufficient ? ("Level 3 includes extra information, such as all the macro definitions present in the program. Some debuggers support macro expansion when you use -g3."). [Note: I found -g3 to be extremely costly, but I guess everything has a cost...]


Costly in what sense? Compilation time? Binary size?


Binary size! (in my base separated .dbg files were HUGE, compared to the .so files). I don't think it has any impact on performances however (especially as the debug information is put in a separate ELF section, either in a separate file, or mapped but "cold" [ie. not live in memory as the runtime does not touch it])




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: