aboutsummaryrefslogtreecommitdiff
path: root/debug
diff options
context:
space:
mode:
Diffstat (limited to 'debug')
-rw-r--r--debug/testlib.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/debug/testlib.py b/debug/testlib.py
index c53ca04..682fd09 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -704,8 +704,9 @@ class Gdb:
self.active_child.sendline(command)
self.active_child.expect("\n", timeout=timeout)
self.active_child.expect(r"\(gdb\)", timeout=timeout)
+ output = self.active_child.before.decode("utf-8", errors="ignore")
ansi_escape = re.compile(r'\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])')
- return ansi_escape.sub('', self.active_child.before.strip().decode("utf-8", errors="ignore")).strip()
+ return ansi_escape.sub('', output).strip()
def interact(self):
"""Call this from a test at a point where you just want to interact with