aboutsummaryrefslogtreecommitdiff
path: root/riscv/gdbserver.h
AgeCommit message (Collapse)AuthorFilesLines
2017-02-09Remove gdbserver support.Tim Newsome1-269/+0
Maybe some day we can bring it back, implementing direct access into registers and memory so it would be fast. That would be the way to usefully debug code running in spike, as opposed to the way that mirrors the actual debug design as it might be implemented in hardware.
2016-10-31Make reading/writing fpu regs work.Tim Newsome1-0/+1
Temporarily turn them on in mstatus if necessary.
2016-10-25Increase gdb receive buffer.Tim Newsome1-0/+1
Newer gdbs send larger memory write packets when downloading. Also improve error reporting when gdb sends packets that don't fit in the buffer.
2016-10-07Don't die when gdb thinks XLEN is 64 but it's 32.Tim Newsome1-0/+3
Instead, just give gdb what it asks for. Also when gdb does a register write, let the user know that it's likely misconfigured and tell them how to fix it. This is probably as well as issue #72 can be fixed in spike.
2016-08-31Save/restore tselect. Set dmode.Tim Newsome1-0/+2
2016-08-22Implement address and data triggers.Tim Newsome1-5/+38
So far I only have testcases for instruction and data address. Not implemented is the mechanism that lets the debugger prevent a user program from using triggers at all. I'll be adding that soonish. The critical path is unchanged, but my experimenting shows the simulation is slowed down about 8% by this code. Reducing the size of trigger_match() (which is never called during my benchmark) fixes that, but making it not be inlined has no effect. I suspect the slowdown comes from cache alignment or something similar, and on a different CPU or after more code changes the speed will come back.
2016-07-28Add support for virtual priv register. (#59)Tim Newsome1-0/+2
Users can use this register to inspect and change the privilege level of the core. It doesn't make any assumptions about the actual underlying debug mechanism (as opposed to having the user change DCSR directly, which may not exist in all debug implementations).
2016-06-27Make gdbserver code work with small Debug RAM.Tim Newsome1-5/+3
2016-06-27Support debugging 32-bit spike instances.Tim Newsome1-2/+49
2016-05-23Exceptions in Debug Mode don't update any regs.Tim Newsome1-4/+2
2016-05-23Make sure to fence.i after setting/clearing a swbpTim Newsome1-0/+1
This doesn't change anything since Debug ROM already executes a fence.i, but it will be more correct if that is no longer necessary.
2016-05-23Single step appears to work.Tim Newsome1-1/+1
2016-05-23Software breakpoints sort of work.Tim Newsome1-4/+1
2016-05-23Walk page tables to translate addresses.Tim Newsome1-0/+13
2016-05-23Turn operation into a queue,Tim Newsome1-10/+13
in preparation for address translation.
2016-05-23Save/restore mstatus, too.Tim Newsome1-0/+2
Also read DCSR, which will be useful to figure out why we halted.
2016-05-23Properly save/restore dpc, mcause, mbadaddr.Tim Newsome1-0/+6
Also clear dcsr.cause when leaving Debug Mode so future traps go where they should.
2016-05-23Refactor how we track in-progress operations.Tim Newsome1-24/+49
I think the functionality is unchanged.
2016-05-23gdb can attach and read the PC:Tim Newsome1-1/+6
(gdb) target remote localhost:1234 Remote debugging using localhost:1234 0x0000000000010178 in fib (n=0) at waste.c:1 1 unsigned int fib(unsigned int n) { (gdb)
2016-05-23Fix store to clear debug interrupt.Tim Newsome1-0/+1
2016-05-23Add debug_module bus device.Tim Newsome1-0/+8
This should replace the ROM hack I implemented earlier, but for now both exist together. Back to the point where gdb connects, core jumps to ROM->RAM->ROM.
2016-05-23ROM -> RAM -> ROM, waiting for debug int.Tim Newsome1-0/+3
2016-05-23Only halt on ebreak if a debugger is attached.Tim Newsome1-0/+2
2016-05-23Add --gdb-portTim Newsome1-1/+1
It's necessary to be able to run multiple spikes at once on the same box.
2016-05-23Implement register writes.Tim Newsome1-0/+1
2016-05-23Flush icache when using swbps and report to gdb.Tim Newsome1-0/+1
2016-05-23Software breakpoints seem to work.Tim Newsome1-0/+15
2016-05-23Looks like single step works.Tim Newsome1-5/+9
2016-05-23Implement binary memory write.Tim Newsome1-3/+7
Also set the simulation running again when gdb disconnects.
2016-05-23Now you can halt/continue from gdb.Tim Newsome1-1/+4
2016-05-23Register read looks sane now.Tim Newsome1-1/+8
2016-05-23gdb can now read spike memory.Tim Newsome1-2/+8
The endianness is wrong, but I think it might be that gdb doesn't have it right. Need to investigate what architecture gdb thinks it's debugging.
2016-05-23Hack to the point where gdb reads a register.Tim Newsome1-11/+18
2016-05-23Listen on a socket for gdb to connect to.Tim Newsome1-0/+70
So far it just listens, and gdb times out because it's not getting any messages back. Receive packets and verify their checksum.