My version of gdb is linked against my system python, but I am currently working with a special debug build of python. Hence, gdb fails to launch correctly, with errors like this:
$ gdb
gdb: Symbol `_Py_ZeroStruct' has different size in shared object, consider re-linking
gdb: Symbol `PyBool_Type' has different size in shared object, consider re-linking
gdb: Symbol `_Py_NotImplementedStruct' has different size in shared object, consider re-linking
gdb: Symbol `PyFloat_Type' has different size in shared object, consider re-linking
gdb: Symbol `_Py_TrueStruct' has different size in shared object, consider re-linking
gdb: Symbol `_Py_NoneStruct' has different size in shared object, consider re-linking
Segmentation fault
...or maybe errors like this:
gdb: symbol lookup error: gdb: undefined symbol: PyUnicodeUCS4_FromEncodedObject
How can I use gdb even though a non-system version of Python exists on my LD_LIBRARY_PATH?