#include "ac_gdb.H"Include dependency graph for ac_gdb.cpp:

Go to the source code of this file.
This file implements AC_GDB methods to support GDB communication protocol (see info gdb / "Remote Protocol"). The current implementation supports the following gdb commands:
.----------------.---------------------------------------.-----------------.
| Command | Function Description | Return value |
}----------------+---------------------------------------+-----------------{
| g | Return the value of the CPU registers | hex data or ENN |
| G | Set the value of the CPU registers | OK or ENN |
| | | |
| mAA..AA,LLLL | Read LLLL bytes at address AA..AA | hex data or ENN |
| MAA..AA,LLLL: | Write LLLL bytes at address AA.AA | OK or ENN |
| | | |
| c | Resume at current address | SNN (signal NN) |
| cAA..AA | Continue at address AA..AA | SNN |
| | | |
| s | Step one instruction | SNN |
| sAA..AA | Step one instruction from AA..AA | SNN |
| | | |
| k | kill | |
| | | |
| ZT,AA..AA,LLLL | Insert breakpoint or watchpoint | OK, ENN or '' |
| zT,AA..AA,LLLL | Remove breakpoint or watchpoint | OK, ENN or '' |
| | | |
| ? | What was the last sigval ? | SNN |
| | | |
| 0x03 | Control-C | |
`----------------'---------------------------------------'-----------------'
All commands and responses are sent with a packet which includes a checksum. A packet consists of
$<packet info>#<checksum>.
where packet info = characters representing the command or response checksum = two hex digits computed as modulo 256 sum of packet info
When a packet is received, it is first acknowledged with either '+' or '-' '+' indicates a successful transfer. '-' indicates a failed transfer.
This file is to be processor agnostic! Every code that depends on processor specific features must be handled in AC_GDB_Interface.
This code contains code from others, see the helper functions below for origin references and copyright notices. Those code lines come from Linux kernel and are under GNU-GPL.
// FIXME --- not yet supported
LICENSE: GNU GPL --- General Public License, version 2.0 or greater. See archc/COPYING for more information.
Gustavo Sverzut Barbieri <ra008849@ic.unicamp.br>
Joao Victor Andrade Neves <ra008951@ic.unicamp.br>
Rafael Dantas de Castro <ra009663@ic.unicamp.br>
Definition in file ac_gdb.cpp.
1.3.4