diff options
Diffstat (limited to 'src/debug')
-rw-r--r-- | src/debug/break.c | 2 | ||||
-rw-r--r-- | src/debug/gdbrsp/utils.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/debug/break.c b/src/debug/break.c index 1d4c2d3..fac3f08 100644 --- a/src/debug/break.c +++ b/src/debug/break.c @@ -124,6 +124,8 @@ virt_t get_raw_breakpoint_prev_addr(const raw_breakpoint *bp) default: + result = VMPA_NO_VIRTUAL; + found = false; for (i = 0; i < bp->count && !found; i++) diff --git a/src/debug/gdbrsp/utils.c b/src/debug/gdbrsp/utils.c index 8c4cb8a..f1f1c85 100644 --- a/src/debug/gdbrsp/utils.c +++ b/src/debug/gdbrsp/utils.c @@ -85,7 +85,7 @@ bool read_fixed_byte(const char *data, size_t len, uint8_t *byte) len = MIN(2, len); - for (i = 0, iter = data; i < len && result; i++, iter++) + for (i = 0, iter = data; i < len; i++, iter++) { switch (*iter) { @@ -107,6 +107,9 @@ bool read_fixed_byte(const char *data, size_t len, uint8_t *byte) } + if (!result) + break; + if (i == 0) *byte = (nibble << 4); else |