Expand description

An implementation of the server side of the GDB Remote Serial Protocol – the protocol used by GDB and LLDB to talk to remote targets.

This library attempts to hide many of the protocol warts from server implementations. It is also mildly opinionated, in that it implements certain features itself and requires users of the library to conform. For example, it unconditionally implements the multiprocess and non-stop modes.

§Protocol Documentation

Structs§

  • A descriptor for a breakpoint. The particular implementation technique of the breakpoint, hardware or software, is handled elsewhere.
  • Target-specific bytecode.
  • Host file permissions.
  • Host flags for opening files.
  • A descriptor for a region of memory.
  • A thread identifier. In the RSP this is just a numeric handle that is passed across the wire. It needn’t correspond to any real thread or process id (though obviously it may be more convenient when it does).
  • A descriptor for a watchpoint. The particular semantics of the watchpoint (watching memory for read or write access) are addressed elsewhere.

Enums§

  • An error as returned by a Handler method.
  • Errno values for Host I/O operations.
  • Part of a process id.
  • The qAttached packet lets the client distinguish between attached and created processes, so that it knows whether to send a detach request when disconnecting.
  • Defines target for the set_current_thread command.
  • All signals that GDB define. These are cross-platform numbers.
  • The possible reasons for a thread to stop.
  • Symbol lookup response.
  • vCont commands
  • The name of certain vCont features to be addressed when queried for which are supported.

Traits§

  • TODO: doc
  • This trait should be implemented by servers. Methods in the trait generally default to returning Error::Unimplemented; but some exceptions are noted below. Methods that must be implemented in order for the server to work at all do not have a default implementation.

Functions§

  • Read gdbserver packets from reader and call methods on handler to handle them and write responses to writer.

Type Aliases§

  • The result type for host I/O operations. Return error if the operation in question is not implemented. Otherwise, the success type indicates whether the operation succeeded, with HostErrno values for failure.