aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2021-10-07 17:50:33 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2021-10-11 14:07:03 +0100
commit3a480f1e35b7e22a3ca6309dae8f665c8dacd104 (patch)
treec9277dbb6fa1bbb1b033a3a1ab0026b8d1a57452 /opcodes
parentba7c18a48457d949df1f817c46482c5a09ac627d (diff)
downloadgdb-3a480f1e35b7e22a3ca6309dae8f665c8dacd104.zip
gdb-3a480f1e35b7e22a3ca6309dae8f665c8dacd104.tar.gz
gdb-3a480f1e35b7e22a3ca6309dae8f665c8dacd104.tar.bz2
z80/disassembler: call memory_error_func when appropriate
If a call to the read_memory_func fails then we should call the memory_error_func to notify the user of the disassembler of the address that was a problem. Without this GDB will report all memory errors as being at address 0x0. opcodes/ChangeLog: * z80-dis.c (fetch_data): Call memory_error_func if the read_memory_func call fails.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/z80-dis.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/opcodes/z80-dis.c b/opcodes/z80-dis.c
index 0e7a312..f62861c 100644
--- a/opcodes/z80-dis.c
+++ b/opcodes/z80-dis.c
@@ -95,6 +95,8 @@ fetch_data (struct buffer *buf, disassemble_info * info, int n)
n, info);
if (r == 0)
buf->n_fetch += n;
+ else
+ info->memory_error_func (r, buf->base + buf->n_fetch, info);
return !r;
}