From 3d54e77c832b9611f175d68aec6bb1ea5cb4d1f9 Mon Sep 17 00:00:00 2001 From: netanelc305 Date: Wed, 26 Jul 2023 04:26:14 -0700 Subject: [PATCH] xpc: Add `disable_transaction_exit` --- hilda/snippets/xpc.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hilda/snippets/xpc.py b/hilda/snippets/xpc.py index 5c84afe..bae8a8c 100644 --- a/hilda/snippets/xpc.py +++ b/hilda/snippets/xpc.py @@ -54,6 +54,15 @@ def from_xpc_object(address: int): return lldb.hilda_client.from_ns(f'_CFXPCCreateCFObjectFromXPCObject({address})') +def disable_transaction_exit(): + """ + xpc_transaction_exit_clean will kill the process when transaction is done. + By patching this function the process will stay alive. + """ + hilda = lldb.hilda_client + hilda.symbols.xpc_transaction_exit_clean.poke_text('ret') + + def to_xpc_object(obj: object): """ Convert python object to XPC object.