7#ifndef ZEPHYR_INCLUDE_DEBUG_GDBSTUB_H_
8#define ZEPHYR_INCLUDE_DEBUG_GDBSTUB_H_
11#define GDB_EXCEPTION_INVALID_INSTRUCTION 4UL
12#define GDB_EXCEPTION_BREAKPOINT 5UL
13#define GDB_EXCEPTION_MEMORY_FAULT 7UL
14#define GDB_EXCEPTION_DIVIDE_ERROR 8UL
15#define GDB_EXCEPTION_INVALID_MEMORY 11UL
16#define GDB_EXCEPTION_OVERFLOW 16UL
19#define GDB_MEM_REGION_NO_ACCESS 0UL
20#define GDB_MEM_REGION_READ BIT(0)
21#define GDB_MEM_REGION_WRITE BIT(1)
23#define GDB_MEM_REGION_RO \
26#define GDB_MEM_REGION_RW \
27 (GDB_MEM_REGION_READ | GDB_MEM_REGION_WRITE)
84 char *hex,
size_t hexlen);
const size_t gdb_mem_num_regions
Number of Memory Regions.
const struct gdb_mem_region gdb_mem_region_array[]
Memory region descriptions used for GDB memory access.
gdb_loop_state
State of the packet processing loop.
Definition gdbstub.h:47
@ GDB_LOOP_ERROR
Definition gdbstub.h:50
@ GDB_LOOP_CONTINUE
Definition gdbstub.h:49
@ GDB_LOOP_RECEIVING
Definition gdbstub.h:48
bool gdb_mem_can_write(const uintptr_t addr, const size_t len, uint8_t *align)
Check if a memory block can be written into.
size_t gdb_bin2hex(const uint8_t *buf, size_t buflen, char *hex, size_t hexlen)
Convert a binary array into string representation.
bool gdb_mem_can_read(const uintptr_t addr, const size_t len, uint8_t *align)
Check if a memory block can be read.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINTPTR_TYPE__ uintptr_t
Definition stdint.h:105
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Describe one memory region.
Definition gdbstub.h:30
uintptr_t end
End address of a memory region.
Definition gdbstub.h:35
uintptr_t start
Start address of a memory region.
Definition gdbstub.h:32
uint8_t alignment
Read/write alignment, 0 if using default alignment.
Definition gdbstub.h:41
uint16_t attributes
Memory region attributes.
Definition gdbstub.h:38