scripts: gdb.py: fix error messages

This commit is contained in:
Nicolas Schodet 2022-02-13 17:17:05 +01:00 committed by Piotr Esden-Tempski
parent de834264ab
commit 2dd3c7bae2
1 changed files with 2 additions and 2 deletions

View File

@ -188,11 +188,11 @@ class Target:
self.putpacket(b"g")
reply = self.getpacket()
if (reply == b'') or (reply[:1] == b'E'):
raise Exception('Error reading memory at 0x%08X' % addr)
raise Exception('Error reading target core registers')
try:
data = unhexify(reply)
except Exception:
raise Exception('Invalid response to memory read packet: %r' % reply)
raise Exception('Invalid response to registers read packet: %r' % reply)
ret = array.array('I',data)
return ret