Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
Temporarily turn them on in mstatus if necessary.
|
|
Newer gdbs send larger memory write packets when downloading.
Also improve error reporting when gdb sends packets that don't fit in
the buffer.
|
|
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.
|
|
|
|
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.
|
|
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).
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
in preparation for address translation.
|
|
Also read DCSR, which will be useful to figure out why we halted.
|
|
Also clear dcsr.cause when leaving Debug Mode so future traps go where
they should.
|
|
I think the functionality is unchanged.
|
|
(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)
|
|
|
|
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.
|
|
|
|
|
|
It's necessary to be able to run multiple spikes at once on the same
box.
|
|
|
|
|
|
|
|
|
|
Also set the simulation running again when gdb disconnects.
|
|
|
|
|
|
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.
|
|
|
|
So far it just listens, and gdb times out because it's not getting any
messages back.
Receive packets and verify their checksum.
|