Tuesday 26 March 2013

Qt Creator, gdb, and pretty printing

I'm a bit short on time, just a quick note.

When starting a gdb debugging session in Qt Creator on Windows, I was having errors about not being able to import the python module libstdcxx.v6.printers. Looking at gdbinit, I noticed it was using relative paths: sys.path.insert(0, '../share/gcc-4.7.2/python').

So, I've added some code to show the path and the current dir. According to the results, it should work. I've ran it from the command line, and it worked.

I've then changed it to this: sys.path.insert(0, '..\\share\\gcc-4.7.2\\python'). Shouldn't make any difference, but no harm in trying. Still not working on Qt Creator, but still working from the command line.

Finally, I've changed it to this: sys.path.insert(0, 'C:\\Dev\\Qt\\Qt5.0.1\\Tools\\MinGW\\share\\gcc-4.7.2\\python'), which is the absolute path on my system. And it finally worked!

What happened? No idea, but I won't look into it right now.

No comments:

Post a Comment