Main Page

Functions
gdbserver.c File Reference

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

## § gdb_interact()

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.

Automatically generated by Doxygen 1.8.12 on Sun Apr 2 2017.