On Target Debugging using BlueTooth
1. Install gdbstub
Install gdbstub.sis on your phone. This file is installed by default by the Nokia SDK in the following directory:
Path: C:\Symbian\7.0s\Series60_v20\Epoc32\Release\armi\urel\.
2. Create gdbstub.ini
On the target you should create a folder C:\gdbstub. And in this folder using notepad in your PC, create a file gdbstub.ini file with following contents.
| General | Bluetooth |
|---|---|
| [COMMSERV] | [COMMSERV] |
| PDD=EUART%d | PDD=EUART1 |
| LDD=ECOMM | LDD=ECOMM |
| CSY=IRCOMM | CSY=BTCOMM |
| PORT=0 | PORT=0 |
| RATE=115200 | RATE=9600 |
3. Create the gdb.ini
On your PC create a directory in and only in c:\bbb and put the file gdb.ini in this folder. Gdb.ini file contents is
epoc-exec-file c:\system\apps\aaa\aaa.app
target epoc com3
break NewApplication
source //c/symbian/7.0s/shared/epoc32/gcc/share/epoc-des.ini
Replace all bbb and aaa with appropriate names
NOTE: Please check the port number which you are using in line 3 put the appropriate com number to it. Ex : infra = 2 , Bluetooth = 3
NOTE: com number will always be less than 4 and more than 1.
4. Compilation
The application to debug shall be built using armi udeb target:
abld build armi udeb
If this gives any error or warnings the just copy everything from epoc32/release/armi/urel to epoc32/release/armi/udeb.
5. Update the pkg file
Now go to your application xxx.pkg file and change all the path so that compiled code is taken from armi\udeb directory.
Then create the sis file and install it in your phone
6.Launching the debugger
- you should have a utility called FExplorer or else you can download and install it on your target.
- through this utility go to : c:\system\programs\gdbstub.exe
- check for 2 .dll files in c:\system\libs\ : gdbseal.dll and gdbseng.dll
- start the gdbstub.exe in the phone.
- in the Dos Shell of your PC, Go to the directory c:\bbb and run gdb.exe -nw
(gdb.exe will come with your Symbian SDK and make sure that it is included in the system path)
The following message should appear.
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or
Breakpoint 1 at 0x(some adress): file <your source file that contains
NewApplication>
gdb>
Then in the gdb prompt, type run. The following message should appear.
warning: Application started but no document specified.
The application may panic at some point if it is document based and if there is no existing default document.
Breakpoint 1 0x(some adress): file <your source file that contains
NewApplication>
Breakpoint 1, NewApplication ()
at file <your source file that contains NewApplication>
<some sourcecode>
Current language: auto; currently c++
Note : Check Symbian SDK documentation for more help on gdb commands.
Checklist
:
I Hardware:
1. PC
2. Compatible Bluetooth / InfraRed Adaptor
3. Symbian phone
II Software:
PC :
1. Symbian SDK (Available from Symbian/Nokia site for free)
2. VC++ 6.0
3. Bluetooth Driver (Available in the CD came with Bluetooth Adaptor)
4. gdb.ini
Symbian phone:
1. gdbstub.sis
2. gdbstub.ini
3. fexplorer.sis






Debugging a server application
> Debugging a server application
> Debugging a server application
hi all,
anyone has any ideas as to why running gdbstub.exe on the 3650 causes the phone to reboot?
thanks, owcs
> Debugging a server application
> On Target Debugging using BlueTooth
Hi Symbian guru,
anyone knows how to remap com port in windows XP.
I've tryed irComm to map IRDA device on com port, but it maps IRDA on COM6.
Tanks Marco
> On Target Debugging using BlueTooth
> On Target Debugging using BlueTooth
Try this... It works every single time for me...
For some reason, many applications will not see your IR/Bluetooth port unless it is mapped to one of the first COM ports (in the case of gdb is up to COM4 and in the case of ActiveSync is COM9).
First of all, I would disconnect any peripherals from your computer, such as phones, printers and any USB devices (including Bluetooth and IR dongles), to be left just with the mouse, the keyboard and the screen attached to your computer. Then, you need to open a Console window. (Start -> Run… -> “cmd” [OK]) Once opened, write the following: set DEVMGR_SHOW_NONPRESENT_DEVICES=1 and press [Enter] then write devmgmt.msc and press [Enter] again, and this will open “Device Manager”. Click on View -> Show hidden devices, and all the devices that are no longer present on your machine will appear with a semi transparent icon, delete each COM port that is not longer present and go to add/remove programs and uninstall IRComm. Then restart your computer, and once back on Windows, plug in your IR dongle, and reinstall IRComm. Now reconnect everything to your PC.
Good Luck and let us know whether it worked.
Does this work on 6600?
Any luck getting this to work on 6600? Works fine on my 3650, but when I try the same app on my 6600, I get the following error when trying to launch the app from gdb:
Failed to insert breakpoint at 0xFF87EB92 (error is 05)
This is using gdbstub from the Symbian 6.1 SDK. When I install gdbstub from the 7.0s SDK, I get the following error:
Debuggee panicked (USER 47) Program received signal SIGABRT, Aborted.
The app does not panic when launched normally, only from gdb.
Any ideas?
Thanks, Gary
it does work indeed
> On Target Debugging using BlueTooth
Has anyone tried it on Nokia 6600??
Since the UDEB dir. was empty I had to copy everything from UREL. But, the debug built application crashes without any error number. It just displays "App closed!"
thanks, Vikas
> On Target Debugging using BlueTooth
The gdb on Nokia 6600 runs with this error:
Cfg File read Bad option prefix: Fatal Error [Press any key]
What's wrong??? I've created cfg file exactly as written in this article.
> On Target Debugging using BlueTooth
hi
which step the CFG file is getting created
> On Target Debugging using BlueTooth
Hello I have the following problem when I try to debug remotely my application on a nokia 6600 via bluetooth:
gdb.exe freeze after displaying " Starting program:" after run command
the log file on the nokia ends with the following line: " ROM debugging low limit: 0x60000000"
Does anyone have an idea on the reason of this behaviour? Ste
> On Target Debugging using BlueTooth
HI
This may be due to link is not established between your target and host. pls try with different gdb.sis file if u find the borland version for symbian try that. or restart the phone .
good luck
Nokia 7610
How about used USB to debuging?
Is any idea?