Tell gdb we can handle large packets.
authorTim Newsome <tim@sifive.com>
Wed, 11 May 2016 02:29:17 +0000 (19:29 -0700)
committerTim Newsome <tim@sifive.com>
Mon, 23 May 2016 19:12:13 +0000 (12:12 -0700)
This speeds up downloads to 93KB/s, which is starting to get usable.

riscv/gdbserver.cc
riscv/processor.cc
tests/gdbserver.py

index 14e7fcae029bc34ce2561b8ca8608d1c7ebd681b..033795096fbd419be78482a8279e1fe591131152 100644 (file)
@@ -1459,6 +1459,7 @@ void gdbserver_t::handle_query(const std::vector<uint8_t> &packet)
         send("swbreak+;");
       }
     }
+    send("PacketSize=131072;");
     return end_packet();
   }
 
index 3b5b3130db03bcd6db70b0c49f9771d9fc508cd6..652d7c988c1c4cb75e5a1b03539c7d6474a50e5e 100644 (file)
@@ -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)
index 5be657485e82d1ac89eaf29f10f346285247580c..0cdd060ce299fde25319ce63c8cc6296ebd13a94 100755 (executable)
@@ -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)