Add better handling for exceptions originating in execution controllers under LLDB (#2488)

pull/2524/head
Matt. 1 year ago committed by GitHub
parent 3f206ad31d
commit 3a34bbb6d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -351,14 +351,29 @@ def run(startup: List[str] | None = None, debug: bool = False) -> None:
# At this point, the last command might've queued up some execution
# control procedures for us to chew on. Run them now.
coroutine_fail_warn = False
for process, coroutine in dbg.controllers:
assert driver.has_process()
assert driver.process.GetUniqueID() == process.process.GetUniqueID()
driver.run_coroutine(coroutine)
try:
driver.run_coroutine(coroutine)
except Exception:
# We treat exceptions coming from the execution controllers the
# same way we treat exceptions coming from commands.
pwndbg.exception.handle()
coroutine_fail_warn = True
dbg.controllers.clear()
if coroutine_fail_warn:
print(
message.warn(
"Exceptions occurred execution controller processing. Debugging will likely be unreliable going forward."
)
)
break
def make_pty() -> Tuple[str, int]:
"""

Loading…
Cancel
Save