From 91a4f8114dad884b19081f09e6fe17ea2820ec52 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Tue, 10 May 2016 19:29:17 -0700 Subject: [PATCH] Tell gdb we can handle large packets. This speeds up downloads to 93KB/s, which is starting to get usable. --- riscv/gdbserver.cc | 1 + riscv/processor.cc | 2 +- tests/gdbserver.py | 2 +- 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 &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 \n") fd.write("uint32_t length = %d;\n" % length) -- 2.30.2