Skip to content

Commit cb6da86

Browse files
committed
Update workflow
1 parent bc8bd60 commit cb6da86

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

.github/workflows/test-on-pr-ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
matrix:
22-
python-version: ["3.10", "3.11", "3.12"]
22+
python-version: ["3.10", "3.11", "3.12", "3.13"]
2323

2424
steps:
2525
- uses: actions/checkout@v4

.github/workflows/test-on-pr-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
timeout-minutes: 10
2121
strategy:
2222
matrix:
23-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
23+
python-version: ["3.10", "3.11", "3.12", "3.13"]
2424

2525
steps:
2626
- uses: actions/checkout@v4

ptrlib/debugger/unix/debug.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def pid(self) -> int:
8686
def _attach_direct(self):
8787
self._gdb = unix_process()(["gdb", "-q", "-p", str(self._pid)])
8888
self._gdb.recvuntil(GDB_ATTACH_MSG)
89-
init_msg = self._gdb.recvuntil(self._gdb_prompt, lookahead=True)
89+
init_msg = self._gdb.recvuntil(self._gdb_prompt, consume=False)
9090
if GDB_PTRACE_ERROR in init_msg:
9191
raise PermissionError(f"Cannot attach pid={self._pid}")
9292

@@ -98,7 +98,7 @@ def _attach_with_sudo(self):
9898

9999
init_msg = b''
100100
for _ in range(3):
101-
init_msg = self._gdb.recvuntil([CUSTOM_SUDO_PROMPT] + self._gdb_prompt, lookahead=True)
101+
init_msg = self._gdb.recvuntil([CUSTOM_SUDO_PROMPT] + self._gdb_prompt, consume=False)
102102
if CUSTOM_SUDO_PROMPT.encode() in init_msg:
103103
# Password is required (The user does not set NOPASSWD in sudoers)
104104
self._gdb.sendlineafter(CUSTOM_SUDO_PROMPT, getpass.getpass(CUSTOM_SUDO_PROMPT))
@@ -171,8 +171,7 @@ def execute(self,
171171
return result
172172

173173
self.gdb.after(self._gdb_prompt).sendline(command)
174-
# TODO: self._gdb.before(self._gdb_prompt).lastline() to keep color sequence
175-
result = self.gdb.recvuntil(self._gdb_prompt, drop=True, lookahead=True)
174+
result = self.gdb.recvuntil(self._gdb_prompt, drop=True, consume=False)
176175
# Remove ANSI escape sequences aggressively
177176
result = CTRL_RE.sub(b'', ANSI_RE.sub(b'', result)).decode().strip()
178177
if resume:

0 commit comments

Comments
 (0)