aboutsummaryrefslogtreecommitdiff
path: root/debug
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2016-12-09 09:25:03 -0800
committerTim Newsome <tim@sifive.com>2016-12-09 09:25:03 -0800
commitc5b99270af1deed953ac856b7b5bf3e5f84dd9e6 (patch)
treecb5b0f2e9b4de8146459b0ede71f69069b15732b /debug
parentb0e409142ae6984ce1f25126c66ee755c5fe3da1 (diff)
downloadriscv-tests-c5b99270af1deed953ac856b7b5bf3e5f84dd9e6.zip
riscv-tests-c5b99270af1deed953ac856b7b5bf3e5f84dd9e6.tar.gz
riscv-tests-c5b99270af1deed953ac856b7b5bf3e5f84dd9e6.tar.bz2
Add test of compare-sections command.
Diffstat (limited to 'debug')
-rwxr-xr-xdebug/gdbserver.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/debug/gdbserver.py b/debug/gdbserver.py
index d236a97..000b52c 100755
--- a/debug/gdbserver.py
+++ b/debug/gdbserver.py
@@ -271,6 +271,16 @@ class DebugTest(GdbTest):
assertIn("_exit", output)
assertEqual(self.gdb.p("status"), expected_result)
+class DebugCompareSections(DebugTest):
+ def test(self):
+ output = self.gdb.command("compare-sections")
+ matched = 0
+ for line in output.splitlines():
+ if line.startswith("Section"):
+ assert line.endswith("matched.")
+ matched += 1
+ assertGreater(matched, 1)
+
class DebugFunctionCall(DebugTest):
def test(self):
self.gdb.b("main:start")