On Target Debugging using BlueTooth
8 Jun 2004 - 18:26
Keywords :

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

symbol-file //c/symbian/7.0s/series60_v20/epoc32/release/armi/udeb/aaa.sym
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

  1. you should have a utility called FExplorer or else you can download and install it on your target.
  2. through this utility go to : c:\system\programs\gdbstub.exe
  3. check for 2 .dll files in c:\system\libs\ : gdbseal.dll and gdbseng.dll
  4. start the gdbstub.exe in the phone.
  5. 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.

GNU gdb 4.17-psion-98r2
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.

Starting program:
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

Tutorial posted June 8th, 2004 by chandrashekarbs

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Submitted by hanson (not verified) on Tue, 2004-06-15 12:39.

Has anyone figured out how to debug an server application?

Submitted by Anonymous on Thu, 2004-06-17 22:03.

hi u can use gdb commands for debuging the client and server applications by loading the .sym file of client and server in command prompt and putting break points and alternating the .sym file which makes u enable of u r breakpoints. and continue

Submitted by owcs (not verified) on Tue, 2004-09-07 07:21.

hi all,

anyone has any ideas as to why running gdbstub.exe on the 3650 causes the phone to reboot?

thanks, owcs


Submitted by Anonymous on Tue, 2005-04-26 15:44.

Symbian Sucks MetroTrk is giving me this "Not Found" dialog on P900 and thats all...

Submitted by Marco Castellani (not verified) on Tue, 2004-06-29 11:01.

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


Submitted by Johan Kotlinski (not verified) on Fri, 2005-03-18 15:02.

A good idea might be searching for "ircomm" in regedit and edit manually.

Submitted by Leonardo Seccia (not verified) on Thu, 2005-04-07 12:14.

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.


Submitted by Gary (not verified) on Wed, 2004-07-14 00:07.

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


Submitted by Anonymous on Wed, 2004-07-14 00:41.

Figured it out. Needed to use the latest and greatest gdbstub that comes with the series60 v2.1 SDK. I was using a 2.0 version.

Submitted by Anonymous on Fri, 2004-07-23 23:50.

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


Submitted by Anonymous on Wed, 2004-09-01 11:09.

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.


Submitted by Anonymous on Wed, 2004-09-01 16:37.

hi

which step the CFG file is getting created


Submitted by Anonymous on Tue, 2004-10-05 15:18.

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


Submitted by Anonymous on Thu, 2004-10-14 14:38.

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


Submitted by Bobby (not verified) on Tue, 2004-10-12 11:18.

How about used USB to debuging?

Is any idea?



copyright 2003-2009 NewLC SARL