www.delorie.com/gnu/docs/gdb/gdb_168.html   search  
 
Buy the book!


Debugging with GDB

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

18.3.11 Tsqware Sparclet

GDB enables developers to debug tasks running on Sparclet targets from a Unix host. GDB uses code that runs on both the Unix host and on the Sparclet target. The program gdb is installed and executed on the Unix host.

remotetimeout args
GDB supports the option remotetimeout. This option is set by the user, and args represents the number of seconds GDB waits for responses.

When compiling for debugging, include the options `-g' to get debug information and `-Ttext' to relocate the program to where you wish to load it on the target. You may also want to add the options `-n' or `-N' in order to reduce the size of the sections. Example:

 
sparclet-aout-gcc prog.c -Ttext 0x12010000 -g -o prog -N

You can use objdump to verify that the addresses are what you intended:

 
sparclet-aout-objdump --headers --syms prog

Once you have set your Unix execution search path to find GDB, you are ready to run GDB. From your Unix host, run gdb (or sparclet-aout-gdb, depending on your installation).

GDB comes up showing the prompt:

 
(gdbslet)

18.3.11.1 Setting file to debug  Setting the file to debug
18.3.11.2 Connecting to Sparclet  
18.3.11.3 Sparclet download  
18.3.11.4 Running and debugging  


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003