Tim Newsome
6ef848928a
Software breakpoints sort of work.
10 years ago
Tim Newsome
850e745dcf
Use fence.i in Debug ROM.
This replaces a hack that just disabled all of the icache.
10 years ago
Tim Newsome
ee96c255f1
Fix off-by-two in general read registers.
Now the exit test passes!
10 years ago
Tim Newsome
f9e7a3f1e1
Walk page tables to translate addresses.
10 years ago
Tim Newsome
75b54e90a9
Turn operation into a queue,
in preparation for address translation.
10 years ago
Tim Newsome
6a48baf806
Remove unused code.
Add some debug printfs, which I'll be wanting for at least a little
while.
10 years ago
Tim Newsome
113ea7930b
Save/restore mstatus, too.
Also read DCSR, which will be useful to figure out why we halted.
10 years ago
Tim Newsome
7112906ab9
Ignore more files.
10 years ago
Tim Newsome
6791bfeb57
Properly read s0/s1.
10 years ago
Tim Newsome
fdc92ba2c5
Add dret.
10 years ago
Tim Newsome
19f33802a1
Implement memory writes.
10 years ago
Tim Newsome
8e418f9e54
Implement single memory read access.
Prevent unaligned accesses in memory read.
Also change how exceptions in Debug Mode are signaled.
10 years ago
Tim Newsome
cb73c085a2
Properly save/restore dpc, mcause, mbadaddr.
Also clear dcsr.cause when leaving Debug Mode so future traps go where
they should.
10 years ago
Tim Newsome
784fea2bbe
Exceptions in Debug Mode, stay in Debug Mode.
Now things don't blow up when reading a non-existent CSR.
10 years ago
Tim Newsome
47f64aaf95
Remove debug printfs.
10 years ago
Tim Newsome
990c6c4809
Have Debug memory kind of working again.
Debug exception -> ROM -> RAM -> ROM, then something goes wrong.
10 years ago
Tim Newsome
57ff1b6595
Read FP registers, and general CSRs*
*) Only works if you read CSRs that actually exist.
10 years ago
Tim Newsome
901541c2ec
Continue works well enough for DebugTest.test_exit
10 years ago
Tim Newsome
f7f2623753
Fix race using fence.
10 years ago
Tim Newsome
54bd259cd5
Refactor how we track in-progress operations.
I think the functionality is unchanged.
10 years ago
Tim Newsome
7baa7795ba
gdb can attach and read the PC:
(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)
10 years ago
Tim Newsome
ffe4998fe5
processor_t unfriends gdbserver_t.
10 years ago
Tim Newsome
f470ee81e1
Correctly read PC on halt.
10 years ago
Tim Newsome
8d457d5148
Fix store to clear debug interrupt.
10 years ago
Tim Newsome
d999dfc0d4
Add debug_module bus device.
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.
10 years ago
Tim Newsome
191671a201
ROM -> RAM -> ROM, waiting for debug int.
10 years ago
Tim Newsome
78332ffbaf
Make sure to translate Debug RAM addresses also.
10 years ago
Tim Newsome
df640b0cac
Jump to the correct (temporary) Debug RAM address.
10 years ago
Tim Newsome
7facb16039
Clean up how Debug ROM is included.
I'm not thrilled about including a static copy in so many cc files, and
making the compiler throw it out. But without really grokking the
Makefile this is the best it's going to be.
10 years ago
Tim Newsome
6835847f47
Can jump to and execute Debug ROM.
Connect with gdb, and the core will jump to Debug ROM and start
executing it. Then it crashes when it jumps to 0x400 because Debug RAM
isn't implemented (and doesn't live there anyway, for now).
10 years ago
Tim Newsome
ddc061f0fb
Check in compiled debug ROM.
Not everybody will have a cross-compiled toolchain set up when they
build spike.
10 years ago
Tim Newsome
d20be46eb4
When gdb connects, jump to Debug ROM and segfault.
10 years ago
Tim Newsome
ae566cba20
Add debug rom code.
10 years ago
Tim Newsome
576d311ad6
Gutting direct-access gdb.
10 years ago
Tim Newsome
5d1fb6b8c4
Add writing to DCSR, DPC, DSCRATCH.
Make those 3 CSRs writable.
10 years ago
Tim Newsome
cdf3116b6e
Actually run the ebreak test.
10 years ago
Tim Newsome
d6d23ae847
Only halt on ebreak if a debugger is attached.
10 years ago
Tim Newsome
8571c8791a
Test ebreak without gdb.
Currently this test fails.
10 years ago
Tim Newsome
fce39bd572
Document attaching with gdb.
10 years ago
Tim Newsome
d1d8863086
Add --gdb-port
It's necessary to be able to run multiple spikes at once on the same
box.
10 years ago
Tim Newsome
c57bdaa033
Do a better job checking CSR functionality.
10 years ago
Tim Newsome
bce01a9ed6
Rename gdbserver-smoke.py to gdbserver.py.
It's not really a smoketest anymore.
10 years ago
Tim Newsome
4efefcf5fe
Test 'info registers all' as well as 'info all-registers'
10 years ago
Tim Newsome
9f0d9a4032
Minor cleanup.
10 years ago
Tim Newsome
0cc52e8e5d
Update regnum handling to match gdb CSR changes.
10 years ago
Tim Newsome
77a51e91f8
Forgot to add this source.
10 years ago
Tim Newsome
0bf3e0b2bf
Treat warnings as errors.
The code compiles cleanly right now. Let's keep it that way.
10 years ago
Tim Newsome
daa39a2204
Implement register writes.
10 years ago
Tim Newsome
0ba84e9c8e
Properly clean up spike.
10 years ago
Tim Newsome
64f7d791b7
Implement reading of CSRs.
10 years ago