Showing posts with label gdb. Show all posts
Showing posts with label gdb. Show all posts

Sunday, 14 April 2013

Tidbits

Another quick post, along the lines of "what have I been up to"?
  • Investigating the debugging issues with gdb + Qt Creator (see here). Basically, a debugging session in Qt Creator will start a second thread on my app to load the executable's image and the required DLLs. However, sometimes, this thread doesn't exit, and the debugging session will inevitably switch to it, due to a SIGTRAP signal, and it will all eventually die with a SIGSEV.
  • Installing Sysinternal tools, Windows Performance Toolkit and VerySleepy. I've performed some captures with xperf, and took a look at the results with WPA. MS's documentation for this is less than stellar, and I recommend Bruce Dawson's blog for some high-quality info about WPF. My next step will be getting a better understanding of how these tools get the debug symbols, especially VerySleepy and gcc (mingw) symbols.
  • Fooling around with an algorithm for the Game of Life. I'm not expecting to come up with anything that competes with Hashlife, just something that I can compare with a brute-force implementation and see how it fares.
  • I've also been experimenting with Qt Designer. I won't get started on layout managers, otherwise I might just "never stop, never stop, never stop, never stop". I'll just say that I really miss C++ Builder. Hell, even good old WinForms was more intuitive. Still, this is what I have right now, and I'll be damned if I won't make it do what I want, instead of what it seems to think it should be doing based on the value of a few properties and the interaction those properties create, when spread out over a couple dozen widgets, and a few nested layout managers. Ugh!
Anyway, I've put testing the builds and my libsh2/boost::asio experience on hold for a bit, since both will get some mileage out of what I learn about Qt GUIs from these experiences with Qt Designer.

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.