Tim Newsome
e67da00a37
Remove dependency on include file in my homedir.
10 years ago
Tim Newsome
8b176c4e96
Force gdb to not print entry values.
All of a sudden gdb decided to start printing them, which messed up the
breakpoint test. It would only print them in the test, not if I manually
ran the same commands. I'm sure it's my fault somehow, but this should
keep things consistent in the future.
10 years ago
Tim Newsome
c7643c32e0
mprv test now breaks like it's supposed to.
10 years ago
Tim Newsome
45fb0a0f0e
Deal with escapes that gdb sends in binary data.
10 years ago
Tim Newsome
9b8b9b69d0
Make -H halt the core right out of reset.
Added a test, too.
10 years ago
Tim Newsome
7e5c1b420d
Halt when gdb user hits ^C.
10 years ago
Tim Newsome
f3c39b00ca
Make sure to fence.i after setting/clearing a swbp
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.
10 years ago
Tim Newsome
76df045861
Implemented register writes.
All existing tests pass!
10 years ago
Tim Newsome
a950cdebb6
Fix reading CSRs.
10 years ago
Tim Newsome
dd233bc499
Single step appears to work.
10 years ago
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