diff options
author | Tim Newsome <tim@sifive.com> | 2022-07-14 10:07:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-14 10:07:00 -0700 |
commit | e114167d0eb188d15c161f0a87ea2a01961a937c (patch) | |
tree | e5a514ac22ead3b63279d3f40d74ebcc615aaed0 | |
parent | 56c2471e90d3d574765ea6aa5ca1c53a98f99acb (diff) | |
download | riscv-tests-e114167d0eb188d15c161f0a87ea2a01961a937c.zip riscv-tests-e114167d0eb188d15c161f0a87ea2a01961a937c.tar.gz riscv-tests-e114167d0eb188d15c161f0a87ea2a01961a937c.tar.bz2 |
Only run SemihostingFileio on single hart systems. (#404)
I don't have time to fix the bug right now, and nobody has run into the
bug yet in any case.
-rwxr-xr-x | debug/gdbserver.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/debug/gdbserver.py b/debug/gdbserver.py index abda953..492ee83 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -975,6 +975,17 @@ class Semihosting(GdbSingleHartTest): assertIn("Do re mi fa so la ti do!", log) class SemihostingFileio(Semihosting): + def early_applicable(self): + # Semihosting file i/o doesn't work right when there are multiple harts + # in SMP mode, and the semihosting call comes from a hart other than the + # first one. + # The problem is that semihosting_common_fileio_info() is called only + # for the first target in an SMP list. Either the caller needs to be + # made aware of SMP targets, or that function needs to walk the list + # itself. (Or maybe we need to make a separate function just for RISC-V + # that does that.) + return len(self.target.harts) == 1 + def setup(self): self.gdb.command("monitor foreach t [target names] { " "targets $t; arm semihosting_fileio enable }") |