The GNU tools can’t debug an application running on the handheld. You only have POSE available to you. To debug:
Compile and link your application with the
Run POSE and load your application.
Run an intermediary application called gdbplug , which communicates via TCP/IP to GDB. It communicates with POSE using a POSE debugging protocol. See http://www.tiac.net/users/thomas/pilot-gdbplug.html for documentation and the latest version.
In a separate DOS window, run:
gdbplug -port 2000 -enable
Run GDB. Pass as a command-line argument your linked file, not the PRC (if your application is foo, pass foo as the parameter, not foo.prc):
Within GDB, specify the PalmPilot as a target by executing:
target pilot localhost:2000
Within POSE, start your application. GDB stops at the first line.
Here are the most important commands that GDB supports:
Use the print command to look at the values of variables. Here’s an example:
print *myStructPtr, theString, myOtherStruct.x
Prints a stack crawl, showing each function in the stack, including parameter names and values.
Single-steps, stepping into functions.
Single-steps, stepping over functions.
Continues running the program until it reaches a breakpoint, causes an error, or exits.
Sets a breakpoint. You can break at a function:
Or you can set a breakpoint ...