From: Tim Newsome Date: Fri, 28 Oct 2016 20:30:43 +0000 (-0700) Subject: Fix error message. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=210d50a01fed904e337755041f66b2816141f406;p=riscv-isa-sim.git Fix error message. It was erroneously complaining that gdb sent too much data even when it wasn't. --- diff --git a/riscv/gdbserver.cc b/riscv/gdbserver.cc index 16f59b2..dc60a3e 100644 --- a/riscv/gdbserver.cc +++ b/riscv/gdbserver.cc @@ -1712,10 +1712,10 @@ uint64_t gdbserver_t::consume_hex_number_le( else shift -= 4; } - if (shift >= xlen) { + if (shift > (xlen+4)) { fprintf(stderr, - "gdb sent too many data bytes. That means it thinks XLEN is greater than %d.\n" - "To fix that, tell gdb: set arch riscv:rv%d\n", + "gdb sent too many data bytes. That means it thinks XLEN is greater " + "than %d.\nTo fix that, tell gdb: set arch riscv:rv%d\n", xlen, xlen); } return value;