[maemo-developers] About debugging a maemo application using gdb inside scratchbox

From: ext-swetha.swetha at nokia.com ext-swetha.swetha at nokia.com
Date: Thu Mar 15 13:20:40 EET 2007

I have been trying to use gdb to debug a maemo application, maemo_hello
inside scratchbox for armel target and have been encountering some
problems while doing the same. I did the following to run gdb and debug
the application :

First, I opened two scratchbox prompts (say sbox1 and sbox2). In the
first prompt sbox1, I gave the following command to start the gdb

> qemu -g maemo_hello     (where maemo_hello is the application name)

Then in the prompt sbox2, I started gdb by typing 

> gdb

This gave the gdb prompt. I typed the following commands at the gdb
prompt to start debugging the application(Messages  displayed after
typing each command are also given below) :-

(gdb) file ./maemo_hello
Reading symbols from /home/swetha/maemo_hello-1.0/maemo_hello...done.
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
0x400826e0 in ?? ()

Now, when I set a breakpoint using break statement at any line and later
run the program by typing 'cont', the following happens,

(gdb) break main
Breakpoint 1 at 0x89e0: file maemo_hello.c, line 6.
(gdb) cont

Breakpoint 1, main (argc=0, argv=0x426d3000) at maemo_hello.c:6
6           {
(gdb) step
12                    gtk_init(&argc,&argv);

Now when I try to continue stepping throught the code by again typing
'step' at the gdb prompt, I get the following message :

(gdb) step
Watchdog has expired. Target detached.

After this message I am able to debug using gdb only after I restart the
server. I checked the Watchdog value using 'show watchdog' and found
that it was set to 0 (zero) which I read was used for infinite time

Can you please let me know why this is happening? How do I avoid this
watchdog expiration problem? 

Thanks & Regards,
Swetha R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20070315/b011efc8/attachment.htm 
More information about the maemo-developers mailing list