# gdbserver.c File Reference

Provide an interface to gdb's remote serial protocol. More...

Go to the source code of this file.

## Functions

void | gdb_interact (GdbComm_T *comm, int port, int debug_on)

## Detailed Description

Provide an interface to gdb's remote serial protocol.

This module allows a program to be used by gdb as a remote target. The remote target and gdb communicate via gdb's remote serial protocol. The protocol is documented in the gdb manual and will not be repeated here.

Hitting Ctrl-c in gdb can be used to interrupt the remote target while it is processing instructions and return control back to gdb.

Issuing a 'signal SIGxxx' command from gdb will send the signal to the remote target via a "continue with signal" packet. The target will process and interpret the signal, but not pass it on to the AVR program running in the target since it really makes no sense to do so. In some circumstances, it may make sense to use the gdb signal mechanism as a way to initiate some sort of external stimulus to be passed on to the virtual hardware system.

Signals from gdb which are processed have the following meanings:

- `SIGHUP` Initiate a reset of the target. (Simulates a hardware reset)

Definition in file gdbserver.c.

## Function Documentation

void gdb_interact | ( | GdbComm_T * | comm,
|  | int | port,
|  | int | debug_on |
| ) |  |  |

Start interacting with gdb.

Parameters:

  | comm | A previously initialized simulator comm
  | port | Port which server will listen for connections on.
  | debug_on | Turn on gdb debug diagnostic messages.

Start a tcp server socket on localhost listening for connections on the given port. Once a connection is established, enter an infinite loop and process command requests from gdb using the remote serial protocol. Only a single connection is allowed at a time.

Definition at line 1320 of file gdbserver.c.

References avr_error, signal_has_occurred(), signal_watch_start(), and signal_watch_stop().

Automatically generated by Doxygen 1.5.5 on 7 Nov 2008.