aboutsummaryrefslogtreecommitdiff
path: root/debug/gdbserver.py
AgeCommit message (Collapse)AuthorFilesLines
2017-10-04Resurrect priv tests.Tim Newsome1-52/+51
2017-09-29Fix tests to work in multi-gdb mode.Tim Newsome1-12/+17
The Gdb class now can handle connecting to more than one gdb. It enumerates the harts across all connections, and when asked to select a hart, it transparently sends future gdb commands to the correct instance. Multicore tests still have to be aware of some differences. The main one is that when executing 'c' in RTOS mode, all harts resume, while in multi-gdb mode only the current one resumes. Additionally, gdb doesn't set breakpoints until 'c' is issued, so the hart where breakpoints are set needs to be resumed before other harts might see them.
2017-09-19Allow multiple reset vectors.Tim Newsome1-1/+1
Some boards have jumpers that control the reset vector, and forcing them one way or another is more annoying than dealing with it in software.
2017-09-18Add interrupts to MulticoreRunHaltStepiTest.Tim Newsome1-1/+8
Just to hammer on anything at once, and hopefully catch weird interactions if they exist.
2017-09-14Test debugging code with interrupts.Tim Newsome1-0/+43
2017-09-01Add some infrastructure for multicore tests.Tim Newsome1-1/+1
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-28Make MemTestBlock output a more descriptive error.Tim Newsome1-11/+15
2017-08-28Fix MemTest* after sloppy rebase.Tim Newsome1-2/+2
2017-08-28Rename test to MulticoreRunHaltStepiTest.Tim Newsome1-1/+1
2017-08-28WIP multicore testing.Tim Newsome1-5/+31
2017-08-28Make the debug tests aware of multicore.Tim Newsome1-46/+47
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-08-28Increase delay in UserInterrupt.Tim Newsome1-1/+1
When a machine is very loaded, otherwise it could happen that we send the interrupt before the resume has actually happened.
2017-08-13Make MemTest* catch reading too many words.Tim Newsome1-7/+6
For one of the test addresses, use the highest possible one to ensure that OpenOCD isn't secretly reading/writing more words than requested.
2017-07-31Fix the end of MulticoreTest.Tim Newsome1-30/+22
Now it actually confirms that we're talking to two different cores which have different values in their registers. Previously it could have been fooled if eg. the thread command was a nop.
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-18Check all PCs after reset.Tim Newsome1-1/+7
2017-07-06debug: Make the 'out of reset' tests actually apply resetmwachs51-0/+5
2017-06-26Move target definition into individual files.Tim Newsome1-1/+1
Instead of defining each target in targets.py, now each target gets its own .py file. This means people can easily keep their own target files around that they may not want to put into the main test source. As part of that, I removed the freedom-u500-sim target since I assume it's only used internally at SiFive. Added a few cleanups as well: * Update README examples, mostly --sim_cmd instead of --cmd. * Allow defining misa in a target, to skip running of ExamineTarget. * Rename target.target() to target.create(), which is less confusing. * Default --sim_cmd to `spike` * Got rid of `use_fpu`, instead looking at F or D in $misa.
2017-06-22Add basic multicore test.Tim Newsome1-1/+63
2017-06-05Make pylint happy.Tim Newsome1-1/+1
If we want we can start using print(), but if so let's consistently use it instead of piecemeal. See also https://stackoverflow.com/questions/28694380/pylint-says-unnecessary-parens-after-r-keyword
2017-05-17Shorten the debug testsPalmer Dabbelt1-4/+4
2017-05-15Disable the tests that touch PRIV, it's not implemented yetPalmer Dabbelt1-62/+63
2017-05-15Disable some failing tests for nowPalmer Dabbelt1-37/+40
2017-04-26Set FS before reading F registersPalmer Dabbelt1-0/+4
2017-04-17debug: Checkpoint restoring Spike functionalityMegan Wachs1-2/+2
2017-02-24Add assert to save me from myself.Tim Newsome1-1/+2
spike passes the download test, but needs a 15 minute timeout. That's too ridiculous to put in here, but 60s is reasonable.
2017-02-24Keep the DownloadTest source if the test fails.Tim Newsome1-14/+17
2017-01-02Increase delay in UserInterrupt.Tim Newsome1-1/+1
This makes the test pass reliably (10/10) against the Arty board. Previously it failed intermittently.
2016-12-27Use compressed code if the target supports it.Tim Newsome1-47/+12
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-13Fix WriteCsrs test.Tim Newsome1-2/+2
At some point the program changed to use a different register and this test was never updated. If $x1 pointed somewhere bad, that would result in an exception.
2016-12-09Add test of compare-sections command.Tim Newsome1-0/+10
2016-10-31Add basic floating point register test.Tim Newsome1-3/+19
2016-10-18Add framework to test OpenOCD directly.Tim Newsome1-291/+29
This took a lot of refactoring to make it look reasonable. There isn't actually any functional OpenOCD test yet. But a dummy test runs a command (and fails).
2016-10-13Add MemTestWriteInvalid.Tim Newsome1-1/+13
2016-10-03Add test for memory read from invalid address.Tim Newsome1-0/+10
2016-09-29Update dmode test to match spec.Tim Newsome1-13/+48
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-28Disable TriggerDmode while spike is changed.Tim Newsome1-0/+4
2016-09-20Minor tweaks to trigger tests for openocd.Tim Newsome1-10/+15
2016-09-15Rewrite debug testing.Tim Newsome1-233/+386
No longer use unittest. Now tests can return not_applicable if eg. a desired execution mode isn't implemented on a target. Also we do a better job killing spike processes when a test fails. Did a lot of code cleanup, partly by using pylint. Fix the Makefile so that if the test fails, 'make' actually fails too.
2016-09-02Fix/add to instant trigger tests.Tim Newsome1-5/+20
2016-09-01Add some immediate trigger tests.Tim Newsome1-0/+17
2016-09-01Create TriggerTest.Tim Newsome1-21/+39
2016-09-01Add test for address triggers.Tim Newsome1-1/+24
2016-09-01Remove "import ." notation.Tim Newsome1-1/+1
Doesn't work with Python 2.7.9 which is the default in latest Debian.
2016-08-22Add requirements.txt and reorder imports by type.Richard Xia1-1/+2
2016-08-22Use env shebang so for virtualenv compatibility.Tim Newsome1-1/+1
2016-08-16Fix missing setup in test_turbostep.Tim Newsome1-0/+2
2016-08-16Simplify test_function_call.Tim Newsome1-3/+2
Now it doesn't rely on malloc, which can be tricky to get to work in and of itself.
2016-08-15Add --32 and --64 options to gdbserver.py.Tim Newsome1-4/+17
2016-08-15Fix cut and paste bug.Tim Newsome1-5/+5
Also minor style changes.