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

When I restart gdb and try to set a breakpoint on main() in the usual
way, here's what happens:

(sb2-emulate-gdb) br main
Breakpoint 1 at 0x80489a9
(sb2-emulate-gdb) run
Starting program: /home/nhooey/code/fun/testTable/testTable
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x80489a0: Input/output error.
Cannot insert breakpoint -4.
Temporarily disabling shared library breakpoints:
breakpoint #-4
### The program runs, but no breakpoint is caught

Does anyone know why this isn't working?

I just installed Scratchbox 2 with the maemo-sdk-installer.py script yesterday.

I'm using gcc (GCC) 3.4.4 (release) (CodeSourcery ARM 2005q3-2).

I'm in the diablo4.1.2_i386 target.

Thanks,

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

Reply via email to