aboutsummaryrefslogtreecommitdiff
path: root/debug/programs
AgeCommit message (Collapse)AuthorFilesLines
2018-10-05Make HwWatchpoint test fail on incorrect result.hw_watchpointTim Newsome1-1/+1
Also tiny cleanups, making pylint happy.
2018-10-03Added tests for hw and sw watchpointscgsfv1-0/+17
2018-09-13Put debug test stack in data instead of textTim Newsome1-0/+1
2018-04-27debug: add missing align directive on trap_entrytrap_entry_align-1Megan Wachs1-0/+1
2018-02-09Test resuming from a trigger.resume_from_triggerTim Newsome1-10/+3
2017-11-27Rename sbadaddr to satpAndrew Waterman1-3/+3
2017-09-19Merge pull request #76 from riscv/multicoreTim Newsome2-13/+20
Add interrupts to MulticoreRunHaltStepiTest.
2017-09-19Forgot to commit this earlier.Tim Newsome1-0/+20
Fixes #77.
2017-09-18Add interrupts to MulticoreRunHaltStepiTest.Tim Newsome2-13/+20
Just to hammer on anything at once, and hopefully catch weird interactions if they exist.
2017-09-14Test debugging code with interrupts.Tim Newsome3-4/+34
2017-09-01Add some infrastructure for multicore tests.Tim Newsome2-8/+30
When compiling, define the number of harts. This means we only need to allocate a lot of stack if there are a lot of harts.
2017-08-28Forgot to add this file.Tim Newsome1-0/+81
2017-08-28WIP multicore testing.Tim Newsome1-7/+36
2017-08-28Make the debug tests aware of multicore.Tim Newsome2-12/+7
Targets now contain an array of harts. When running a regular test, one hart is selected to run the test on while the remaining harts are parked in a safe infinite loop. There's currently only one test that tests multicore behavior, but there could be more. The infrastructure should be able to support heterogeneous multicore, but I don't have a target like that to test with.
2017-07-20Add back code to clean up triggers in entry.STim Newsome1-0/+9
Then for targets that can't handle this because they don't implement hmode, add a target setting that allows that to be specified.
2017-07-03Don't clear triggers during execution.Tim Newsome1-9/+0
This shouldn't affect triggers set by the debugger, because running code can't change those. When it does affect them, it breaks Hwbp1 which sets the breakpoint before running the program.
2017-06-27Tolerate missing misa register.Tim Newsome1-1/+7
At least in the test programs. There are other places where this causes trouble as well.
2017-06-22Add basic multicore test.Tim Newsome1-33/+36
2017-06-20Smoketest multicore.Tim Newsome2-9/+40
When connecting to gdb, select a random thread and use that for the current test. Also replace infinite_loop with something that will later allow smoketesting of more than one thread.
2017-06-15Test 64-bit addressing.Tim Newsome2-9/+4
The spike64 target now links all test programs at 0x7fff_ffff_ffff_0000. Also a minor change to log file naming so that 'make all' works again. I'll fix this better later.
2017-05-16Link the infinate loop at 0x10000000Palmer Dabbelt1-0/+0
Spike appears to have a problem geterating DTS at 0x80000000.
2017-05-16Link in encoding.h instead of providing a path to itPalmer Dabbelt5-4/+5
2017-04-18debug: Don't halt out of reset. It's unrealistic. Use a program which loops ↵Megan Wachs2-0/+14
(actually it just gets an exception anyway).
2017-04-14debug: checkpoint of trying to get simulation tests workingMegan Wachs2-2/+17
2017-03-29Prohibit relaxing the initial gp generationPalmer Dabbelt1-0/+3
I've added an additional linker relaxation that relaxes two instruction pc-relative sequences to one instruction gp relative sequences when possible. This sequence now optimizes the initial gp generation to mv gp, gp which is obviously bogus. The fix is to disable relaxations when setting up gp, preventing the linker from relaxing away this setup code.
2017-03-29Change the global pointer symbol to __global_pointer$Palmer Dabbelt1-1/+1
This changed a while ago in binutils.
2016-12-27Use compressed code if the target supports it.Tim Newsome2-2/+7
The main change was to read misa before running any other test. If misa indicates C is supported, then use compressed code. This required changing some tests, mostly to ensure correct alignment. The single step test also needs to know the correct addresses to step through in compressed code. Only print at most 1000 lines from each log file.
2016-12-07Use XLEN macro for these sources as well.Tim Newsome3-4/+4
All tests pass on spike32 and spike64 again.
2016-12-07Use our own XLEN macro.Tim Newsome1-1/+1
Relying on something that the compiler automatically sets is apparently not reliable.
2016-12-06avoid non-standard predefined macrosAndrew Waterman4-6/+6
2016-09-29Update dmode test to match spec.Tim Newsome1-33/+53
M-mode writes to triggers with dmode set are now ignored instead of raising an exception. Also added -f/--fail-fast option to gdbserver.
2016-09-29Clear triggers during entry.Tim Newsome1-0/+9
If the last test leaves some triggers set they should be cleaned up.
2016-09-02Fix/add to instant trigger tests.Tim Newsome1-1/+3
2016-09-01Add some immediate trigger tests.Tim Newsome1-6/+6
2016-09-01Create TriggerTest.Tim Newsome1-0/+97
2016-08-16Simplify test_function_call.Tim Newsome1-0/+18
Now it doesn't rely on malloc, which can be tricky to get to work in and of itself.
2016-07-28Add tests for virtual priv register.Tim Newsome1-0/+11
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-07-19Add 32-bit support.Tim Newsome1-1/+9
2016-07-19I think I've finally got malloc working right.Tim Newsome2-5/+8
Now gdb can call functions and change strings.
2016-07-19Make variables local again, now that gdb is "fixed."Tim Newsome1-6/+2
2016-07-19Add test for gdb function calls.Tim Newsome2-0/+602
2016-07-18Test step over invalid instruction.Tim Newsome1-7/+14
2016-07-18Add explicit test for stepping over branches/jumps.Tim Newsome1-0/+17
2016-07-18Make tests work with broken 32-bit compiler.Tim Newsome1-2/+6
Apparently the 32-bit compiler doesn't generate good enough debug info for gdb to know what function we're in, which also means it doesn't know where the local variables in those functions are stored.
2016-07-18Add simple register tests.Tim Newsome1-30/+31
Make the RegsTest case a bit more comprehensible.
2016-07-18Add block test.Tim Newsome2-2/+2
2016-07-18All tests pass with spike now.Tim Newsome3-4/+139
I did comment out a couple.
2016-07-18Made some progress towards working with spike.Tim Newsome4-55/+85
I'm writing all the tests so they should just work on real hardware, too.
2016-07-18WIP on debug testing.Tim Newsome6-0/+181
./gdbserver.py --m2gl_m2s --openocd "$HOME/SiFive/openocd/src/openocd -s $HOME/SiFive/openocd/tcl" -- RegsTest.test_write_gprs doesn't fail in a completely crazy way.