From: Tim Newsome Date: Tue, 15 Mar 2016 23:15:53 +0000 (-0700) Subject: Minor cleanup. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9f0d9a40322b31c8630f3591d2bd2247929e0629;p=riscv-isa-sim.git Minor cleanup. --- diff --git a/riscv/gdbserver.cc b/riscv/gdbserver.cc index c83c83c..0b36421 100644 --- a/riscv/gdbserver.cc +++ b/riscv/gdbserver.cc @@ -91,7 +91,6 @@ gdbserver_t::gdbserver_t(uint16_t port, sim_t *sim) : client_fd(0), recv_buf(64 * 1024), send_buf(64 * 1024) { - // TODO: listen on socket socket_fd = socket(AF_INET, SOCK_STREAM, 0); if (socket_fd == -1) { fprintf(stderr, "failed to make socket: %s (%d)\n", strerror(errno), errno); @@ -403,8 +402,9 @@ void gdbserver_t::handle_register_read(const std::vector &packet) try { send(p->get_csr(n - REG_CSR0)); } catch(trap_t& t) { - // TODO, can we return error here, and update 'info reg all' to display - // it sensibly? + // It would be nicer to return an error here, but if you do that then gdb + // exits out of 'info registers all' as soon as it encounters a register + // that can't be read. send((reg_t) 0); } } else { diff --git a/tests/gdbserver-smoke.py b/tests/gdbserver-smoke.py index 306f6f2..51e8cc9 100755 --- a/tests/gdbserver-smoke.py +++ b/tests/gdbserver-smoke.py @@ -20,7 +20,7 @@ class DebugTest(unittest.TestCase): self.spike.wait() def test_turbostep(self): - """Single step until the program exits. TODO""" + """Single step a bunch of times.""" last_pc = None for _ in range(100): self.gdb.command("stepi")