On May 28, 2009, at 9:24 AM, Westerberg Mika.1 (EXT-Nixu/Helsinki) wrote:


On May 27, 2009, at 6:02 PM, ext Neil Hooey wrote:

I wrote a very simple Qt program that works just fine. Here is the
source:

#include <QApplication>
#include <QPushButton>
int main(int argc, char* argv[]) {
  QApplication app(argc, argv);
  QPushButton button("Hello", &frame);
  button.resize(50, 50);
  button.move(100, 100);
  button.show();
  return app.exec();
}

When I try to debug it in gdb, setting a breakpoint in main in the way
that scratchbox-specific gdb instructs you to doesn't actually get
caught:

$ gdb ./qt-program
GNU gdb 6.8-debian blah blah blah
Welcome to scratchbox2 enabled gdb!
================================
Before starting target program you should run command 'sb2-prepare'
that sets breakpoint which is used to stop target before its main()
gets called.  After the breakpoint is hit, you are able to set
furtherbreakpoints and do normal debugging actions.
================================
(sb2-emulate-gdb) sb2-prepare
Function "_dl_debug_state" not defined.
Breakpoint 1 (_dl_debug_state) pending.
(sb2-emulate-gdb) run
Starting program: /home/nhooey/code/fun/testTable/testTable
QGtkStyle cannot be used together with the GTK_Qt engine.
Qt: Session management error: Could not open network socket
### The program runs, but no breakpoint is caught

It seems that gdb support in sb2 is broken again.  I was able to
reproduce the bug
here so I will start to investigate it right now.

Further investigation shows that gdb has been upgraded to version 6.8 which somehow (no glue yet) breaks sb2 debugging. Workaround is to downgrade gdb in rootstrap to this version:

http://repository.maemo.org/pool/diablo/free/g/gdb/gdb_6.6.dfsg-1+armel+osso1_i386.deb

Just download the file and run:

% sb2 -eR dpkg -i gdb_6.6.dfsg-1+armel+osso1_i386.deb

after this debugging hopefully works again.

We will continue investigation for the root-cause of this problem.

MW
_______________________________________________
Scratchbox-users mailing list
Scratchbox-users@lists.scratchbox.org
http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users

Reply via email to