is it possible to debug code on Nokia series 60 phones especially on the N-Gage?
In previous threads some people say it's possible others say it isn't. The docu says it is possible (» Symbian OS v6.1 Edition for C++ » Tools And Utilities » On-target Debugging using GDB Guide), but the gdbstub.sis could not be installed.
My program runs on the "simulator" fine, but it crashes on the phone. So the "simulator" is good for nothing.
I've bought an IR adapter as I couldn't figure out the right set of ini's for Bluetooth but I think Bluetooth is possible.
I can start my program running from GDB
I can't set breakpoints or more accurately, when I add the GDB command
break filename.cpp:12
To put a breakpoint at line 12 for the file it says something like
No source file named filename.cpp
I've tried various combinations of path specfication but no luck yet. This is bad because the debugger does not break in at kern exec 03 or whatever the exception message is, so I think I need to code an exceptionhandler then put a break point on it!
Hope you have some luck, and if anybody has any advice it would be much appreciated.
Cheers
Chris
Breakpoints for on target debugging
2004-03-05, 15:39#3
Did anyone manage to get this going on an N-Gage??
Using the info from newlc I have got debuging via IR link working after a fashion with a 7650 and possibly a 3650, they both fail to line up with source files but the symbol table seems to be ok.
BUT the N-Gage doesn't have IR, I've tried with Bluetooth but GDB won't recognise ports above comm4 and I think my BT adapter is comm5
Also of note using the 1.0 symbian sdk I could get the visual interface up for gdb by typing gdb alone. this doesn't work with the 1.2 sdk. This may not matter because am only certain I got someresults from the gdb command line "gdb -nw".
any gdb.ini or gdbstub.ini files would be of interest.
I've just retried this on an N-Gage and got the stub to start, I think.
Installed runstub.sis and gdbstub.sis from the Borland CBuilderX package. With the following steps:
Having uninstalled any previous version and checked for old versions of gdbstub.ini.
I installed both to phone memory, as I think these tools have problems if you cross drives.
Ignore the warnig about incompatibility with gdbstub
Did all that and when I ran Runstub and started gdbstub the bluetooth indicater came on.
Also starting gdb on my PC caused my N-Gage to ask if I wanted to accept an incoming connection.
I think my problems are down to serial port configurations now. Either baud rate, getting one between 1 and 4, OR the fact that my Belkin Bluetooth adapter assigns different ports for incoming and outgoing serial connections.
Hope the above is of some use, I think the results would be similar on a 3650 and may test that later but just for now I have my 3650 set up for IR debugging
After a lot of research and testing I was able to get n-gage target debugging with gdb working over bluetooth (linksys adapter). It wasn't easy to figure out but it does actually work in case anybody has doubts about this working. (Insight GUI works too)
Perhaps the hardest part is getting bluetooth setup on COM3/4 - I had to do some windows registry hacking to reconfigure from COM7/8 to the lower ports which was frightening but effective!
Thanks for everyone else who has provided advice...
as I understood you havent problems with installing gdbstub.SIS on Nokia 3650 and on N-Gage phone? I need to debug on 6.1 platform(SDK 1.2), but on my SX1 it is impossible to install this file - incompactibility error occurs.
it cannot be installed over the stupid USB cabel, which is delivered with phone, but it is not a problem, when copying the sis file over BT and install it from device. Oh my gods, I am so big imbecile, I lost two days with experimenting.... I am looking for scissors and i'll cut the cable into two pieces.
i do not know if you are aware of that, but NGage dev kit actually includes debugging jig+cables and software.
we have received it few weeks ago, but unfortunately cannot make NgageDbg symbian app to work - it brings the phone down with "MMC card corrupted" message.
:(
Yes, N-Gage SDK comes with its own debugging solution (different from GDB). I am not sure if you can use GDB to do it on N-Gage.
About the message "Memory card corrupted", I guess that's the message from Copy Protection. You have to copy nokia.dat from the N-Gage SDK to your root folder of your MMC.