Contents|Index|Previous|Next

Debugging on SPARC and SPARClite targets

gdb needs to know the following specifications to talk to your SPARC or Fujitsu SPARClite.

- Specifications for what you want to use such as target remote, gdb’s generic debugging protocol.
- Specifications for what serial device connects your host to your SPARC board (the first serial device available on your host is the default).
- Specifications for what speed to use over the serial device.

Use one of the following gdb commands to specify the connection to your SPARC target board.

target sparclite serial-device
To run a program on the board, start up gdb with the name of your program as the argument. To connect to the board, use the command target sparclite serial-device, where serial-device is the name of the serial port connected to the board. If the program has not already been downloaded to the board, you may use the load command to download it. For example, the following sequence connects to the target board through a serial port, and loads and runs a program called prog through the debugger.

    (gdb) target sparclite com1
    [SPARClite appears to be alive]
    breakinst () ../sparcl-stub.c:975
    975    }
    (gdb)  s
    main   ()   hello.c:50
    50      writez(1,   “Got to here\n”);
    (gdb)

target sparclite hostname: portnumber
You can specify a TCP/IP connection instead of a serial port, using the syntax, hostname: portnumber(assuming your sparclite board is connected so that this makes sense; for instance, to a serial line managed by a terminal concentrator).

gdb also supports set remotedebug n to allow you to see some debugging information about communications with the board by setting the variable, remotedebug.