Fix cut and paste bug.
[riscv-tests.git] / debug / gdbserver.py
index 8a6e87439a124f9835ba8b81f8cea43ee505276f..263dbd6e82bc5542d0ba724397af43c15cd5182f 100755 (executable)
@@ -41,14 +41,14 @@ def gdb(
     if parsed.gdb:
         gdb = testlib.Gdb(parsed.gdb)
     else:
-        gdb =  testlib.Gdb()
+        gdb = testlib.Gdb()
 
-    if (binary):
-        gdb.command("file %s" % self.binary)
-    if (target):
+    if binary:
+        gdb.command("file %s" % binary)
+    if target:
         gdb.command("set arch riscv:rv%d" % target.xlen)
         gdb.command("set remotetimeout %d" % target.timeout_sec)
-    if (port):
+    if port:
         gdb.command("target extended-remote localhost:%d" % port)
 
     return gdb