Fix tests to work in multi-gdb mode.
authorTim Newsome <tim@sifive.com>
Fri, 29 Sep 2017 20:20:30 +0000 (13:20 -0700)
committerTim Newsome <tim@sifive.com>
Fri, 29 Sep 2017 20:20:30 +0000 (13:20 -0700)
commit49fc83aa23045abee5d396ef5a9d96b80c03178d
treeed08e848af4aa837d690860b7e87fe3000b69891
parentb9957ef9690dc83c684e113294b068fe676b468a
Fix tests to work in multi-gdb mode.

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.
14 files changed:
debug/Makefile
debug/gdbserver.py
debug/targets.py
debug/targets/RISC-V/spike-1.cfg [new file with mode: 0644]
debug/targets/RISC-V/spike-2.cfg [new file with mode: 0644]
debug/targets/RISC-V/spike-rtos.cfg
debug/targets/RISC-V/spike.cfg [deleted file]
debug/targets/RISC-V/spike32-2-rtos.py [new file with mode: 0644]
debug/targets/RISC-V/spike32-2.py
debug/targets/RISC-V/spike32.py
debug/targets/RISC-V/spike64-2-rtos.py [new file with mode: 0644]
debug/targets/RISC-V/spike64-2.py
debug/targets/RISC-V/spike64.py
debug/testlib.py