#include "debug.h"#include <signal.h>#include <kio.h>Include dependency graph for debug.c:
Go to the source code of this file.
Functions | |
| void | set_mem_fault_trap () |
| void | debuglog (int level, char *msg) |
| print debug messages. More... | |
| int | hex2digit (int digit) |
| converts an ascii hex digit to a number. More... | |
| char | digit2hex (int digit) |
| convert number NIB to a hex digit. More... | |
| unsigned char * | mem2hex (unsigned char *mem, unsigned char *buf, int count, int may_fault) |
| converts a memory block to hex and stores it in buf. More... | |
| unsigned char * | hex2mem (unsigned char *buf, unsigned char *mem, int count, int may_fault) |
| Convert the hex array pointed to by buf into binary to be placed in mem. More... | |
| int | hex2int (char **ptr, int *intValue) |
| while we find nice hex chars, build an int. More... | |
| void | getpacket (unsigned char *buffer) |
| Scan for the sequence $<data>#<checksum>. More... | |
| void | putpacket (unsigned char *buffer) |
| Send the packet in buffer. More... | |
| void | gdb_event_loop (int sigval, unsigned long *registers) |
| This is the gdb event loop waiting for GDB commands. More... | |
| ingroup GDBDEBUG *int | computeSignal (int tt) |
| Convert the hardware trap type code to a unix signal number. More... | |
| void | set_debug_traps () |
| char * | make_return_packet (int val) |
| make a return packet. More... | |
| char * | gdb_read_registers () |
| g - read registers. More... | |
| char * | gdb_write_registers (char *regs) |
| G - write registers. More... | |
| char * | gdb_read_memory (long addr, int nbytes) |
| m - read memory. More... | |
| char * | gdb_write_memory (long addr, int nbytes, char *mem) |
| M write memory. More... | |
| char * | gdb_continue (int sig, long addr) |
| c - continue at address. More... | |
| char * | gdb_step (int sig, long addr) |
| s - step instruction(s). More... | |
| char * | gdb_kill () |
| k - kill program. More... | |
| char * | gdb_last_signal (int val) |
| ? - last signal. More... | |
| char * | gdb_baudrate (int baud) |
| b - change baud rate. More... | |
| char * | gdb_dump_state () |
| T - dump state. More... | |
| char * | gdb_detach () |
| D - host requests a detach. More... | |
| char * | gdb_set_thread (int cmd, int tid) |
| H - set thread. More... | |
| char * | gdb_read_reg (int reg) |
| p - read one register. More... | |
| char * | gdb_write_reg (int reg, long val) |
| P - write one register. More... | |
| char * | gdb_exited () |
| W - process exited. More... | |
| char * | gdb_terminated () |
| X - process terminated. More... | |
| char * | gdb_hex (char *str, int nbytes) |
| O - hex encoding. More... | |
| char * | gdb_thread_alive (int tid) |
| A - tread alive request. More... | |
| char * | gdb_extended () |
| ! - extended protocol. More... | |
| char * | gdb_debug () |
| d - toggle gdb stub diagnostics. More... | |
| char * | gdb_toggle () |
| d - toggle gdb stub. More... | |
| char * | gdb_reset () |
| r - reset target. More... | |
| char * | gdb_search (long addr, long pat, long mask) |
| t - search backwards. More... | |
| char * | gdb_get_query (char *query) |
| q - general get query. More... | |
| char * | gdb_set (char *query) |
| Q - general set query. More... | |
Variables | |
| char | packet_in_buf [BUFMAX] |
| packet buffer for debug.c. More... | |
| char | packet_out_buf [BUFMAX] |
| packet buffer for debug.c. More... | |
| int | packet_index |
| packet index for debug.c. More... | |
| volatile int | mem_err = 0 |
| int | remote_debug = 0 |
| int | initialized = 0 |
| trap_info | hard_trap_info [] |
This file contains a debug interface to a gdb connected to a terminal. It has never been tested since we have the BDM, but it came with the newlib and looked like a very good idea at that time.
Definition in file debug.c.
|
|
Convert the hardware trap type code to a unix signal number.
Definition at line 513 of file debug.c. References trap_info::signo, and trap_info::tt. |
|
|
Definition at line 528 of file debug.c. References _LIBC_outbyte, DEBUG, default_trap_hook, exception_handler, initialized, print, trap_info::signo, and trap_info::tt. |
|
|
packet buffer for debug.c.
Definition at line 67 of file debug.c. Referenced by gdb_event_loop. |
|
|
packet index for debug.c.
|
|
|
packet buffer for debug.c.
Definition at line 68 of file debug.c. Referenced by gdb_event_loop, gdb_last_signal, gdb_read_memory, and make_return_packet. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002