Escape "\" char in GDB console output

This commit is contained in:
Ivan Kravets
2019-10-24 17:34:49 +03:00
parent ed6c9a08ce
commit 70b484a2c2

View File

@ -33,7 +33,7 @@ class GDBBytesIO(BytesIO): # pylint: disable=too-few-public-methods
@staticmethod
def escape(text):
return re.sub(r"\\+", "\\\\", text)
return re.sub(r"\\+", "\\\\\\\\", text)
def write(self, text):
if "\n" in text: