Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Symbian specific GDB command reference


Purpose

GNU Debugger (GDB) commands can be entered from the GDB command prompt, from the Insight GUI command console, or (in some cases) from the gdb initialisation file.

This document lists Symbian-specific GDB commands.


See also

[Top]


Command syntax

epoc-add-dll-symbol-file TargetName [ABI [Build [HostName]]]

Loads the symbol file for a DLL.

Note that the command symbol-file might be used to load an application's debugging information, while this command would be used to load the symbol file for its static engine DLL.

The command loads the symbol file epoc32/release/<ABI>/<Build>/<HostName>.sym and relocates it to the current location of the DLL on the target device. The location of the epoc32 tree is inferred from the main symbol file.

TargetName is the DLL name on the target device. See the first argument of RLibrary::Load() for and exact syntax. The ABI is one of ARMI, ARM4 or THUMB. By default the ABI used is the same as specified in the declaration of the main symbol file. Build is either UDEB or UREL — the default is UDEB. HostName is extracted from TargetName if it is not explicitly specified.

The command is optimised for the most common case: the DLL has the same ABI as the debuggee, the symbol file has the same root as the DLL (e.g. foobar.sym and foobar.dll) and the DLL binary is in the list of directories searched by RLibrary::Load(). In that case, the only argument needed is the DLL name without extension:

Example:

epoc-add-dll-symbol-file foo

Loads x:\some-epoc-root\epoc32\release\armi\udeb\foo.sym

epoc-exe-file FileName

Sets program to be started.

FileName is the path and filename of the file that GDB will start on the Symbian device when it receives the run command. The path to set is the actual location of the debuggee on the target device, not the location of the binary file in the host epoc32 tree.

Note:

  • This command tells GDB which program to start — it does not actually launch anything.

  • EPOC-style paths should be used, not Unix ones.

  • The GDB stub distinguishes between applications and executables using the file extension. It is therefore important that executables end with .exe and applications with .app. Note that it is possible to debug other types of DLL, however since these are loaded from either an application or .exe, they cannot be specified as the main executable.

Examples:

epoc-exe-file z:\system\programs\foobar.exe

epoc-exe-file z:\system\apps\word\word.app

epoc-print-des16 Descriptor

pd16 Descriptor

Prints information about the specified descriptor Descriptor. pd16 is the shorthand form of epoc-print-des16.

The GDB script epoc-des.ini must previously have been loaded into GDB using the source command.

Examples:

epoc-print-des16 bufC16

pd16 ptr16

rcopy Source-path Destination-path

Transfer files from the host computer to the target Symbian device.

Source-path is the full path and filename on the host computer of the file to be transferred. It may use either DOS or Unix-style file description. Destination-path is the path and filename of the file on the target device. It must be specified in DOS-style.

Examples:

rcopy //x/epoc32/release/armi/udeb/foo.app
    c:\system\apps\foobar\foo.app

rcopy x:\epoc32\release\armi\udeb\foo.app
    c:\system\apps\foobar\foo.app

target epoc comCommsPort

Sets the Symbian device as the current target and opens the serial port on comms port number CommsPort.

Example:

target epoc com1