aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2016-05-10 19:29:17 -0700
committerTim Newsome <tim@sifive.com>2016-05-23 12:12:13 -0700
commit91a4f8114dad884b19081f09e6fe17ea2820ec52 (patch)
tree312275523c074e9a5d9127d73632c00dc215fc57
parent9a5ad6994b3986e59c7365d22f91e86e60317f8a (diff)
downloadspike-91a4f8114dad884b19081f09e6fe17ea2820ec52.zip
spike-91a4f8114dad884b19081f09e6fe17ea2820ec52.tar.gz
spike-91a4f8114dad884b19081f09e6fe17ea2820ec52.tar.bz2
Tell gdb we can handle large packets.
This speeds up downloads to 93KB/s, which is starting to get usable.
-rw-r--r--riscv/gdbserver.cc1
-rw-r--r--riscv/processor.cc2
-rwxr-xr-xtests/gdbserver.py2
3 files changed, 3 insertions, 2 deletions
diff --git a/riscv/gdbserver.cc b/riscv/gdbserver.cc
index 14e7fca..0337950 100644
--- a/riscv/gdbserver.cc
+++ b/riscv/gdbserver.cc
@@ -1459,6 +1459,7 @@ void gdbserver_t::handle_query(const std::vector<uint8_t> &packet)
send("swbreak+;");
}
}
+ send("PacketSize=131072;");
return end_packet();
}
diff --git a/riscv/processor.cc b/riscv/processor.cc
index 3b5b313..652d7c9 100644
--- a/riscv/processor.cc
+++ b/riscv/processor.cc
@@ -204,7 +204,7 @@ void processor_t::enter_debug_mode(uint8_t cause)
set_privilege(PRV_M);
state.dpc = state.pc;
state.pc = DEBUG_ROM_START;
- debug = true; // TODO
+ //debug = true; // TODO
}
void processor_t::take_trap(trap_t& t, reg_t epc)
diff --git a/tests/gdbserver.py b/tests/gdbserver.py
index 5be6574..0cdd060 100755
--- a/tests/gdbserver.py
+++ b/tests/gdbserver.py
@@ -160,7 +160,7 @@ class RegsTest(unittest.TestCase):
class DownloadTest(unittest.TestCase):
def setUp(self):
- length = 2**16
+ length = 2**20
fd = file("data.c", "w")
fd.write("#include <stdint.h>\n")
fd.write("uint32_t length = %d;\n" % length)