Skip to content

Commit

Permalink
hilda_client: add place_future_breakpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed Jan 30, 2024
1 parent 9cad361 commit 7525dfa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ Here is a gist of methods you can access from `p`:
- Get the plist embedded inside the process' __LINKEDIT section.
- `bp`
- Add a breakpoint
- `place_future_breakpoint`
- Place a breakpoint on a function that will resolve in the future of the process lifecycle
- `show_hilda_breakpoints`
- Show existing breakpoints created by Hilda.
- `show_commands`
Expand Down
6 changes: 5 additions & 1 deletion hilda/hilda_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
from pathlib import Path
from typing import Any, List, Optional, Union

import IPython
import hexdump
import IPython
import lldb
from humanfriendly import prompts
from humanfriendly.terminal.html import html_to_ansi
Expand Down Expand Up @@ -591,6 +591,10 @@ def bp(self, address, callback=None, condition: str = None, forced=False, **opti
self.log_info(f'Breakpoint #{bp.id} has been set')
return bp

def place_future_breakpoint(self, symbol_name: str) -> None:
""" Place a breakpoint on a function that will resolve in the future of the process lifecycle """
self.lldb_handle_command(f'b {symbol_name}')

def bp_callback_router(self, frame, bp_loc, *_):
"""
Route the breakpoint callback the specific breakpoint callback.
Expand Down

0 comments on commit 7525dfa

Please sign in to comment.