forked from buserror/simavr
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport realtime behavior in GDB mode
- Loading branch information
1 parent
5616a10
commit e036e96
Showing
4 changed files
with
69 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#ifndef AVR_GDB_H | ||
#define AVR_GDB_H | ||
|
||
#include <stdint.h> | ||
|
||
#define WATCH_LIMIT (32) | ||
|
||
typedef struct { | ||
uint32_t len; /**< How many points are taken (points[0] .. points[len - 1]). */ | ||
struct { | ||
uint32_t addr; /**< Which address is watched. */ | ||
uint32_t size; /**< How large is the watched segment. */ | ||
uint32_t kind; /**< Bitmask of enum avr_gdb_watch_type values. */ | ||
} points[WATCH_LIMIT]; | ||
} avr_gdb_watchpoints_t; | ||
|
||
typedef struct avr_gdb_t { | ||
avr_t * avr; | ||
int listen; // listen socket | ||
int s; // current gdb connection | ||
|
||
avr_gdb_watchpoints_t breakpoints; | ||
avr_gdb_watchpoints_t watchpoints; | ||
|
||
// These are used by gdb's "info io_registers" command. | ||
|
||
uint16_t ior_base; | ||
uint8_t ior_count, mad; | ||
} avr_gdb_t; | ||
|
||
#endif |