hilda 2.0.12__py3-none-any.whl → 2.0.13__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
hilda/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '2.0.12'
16
- __version_tuple__ = version_tuple = (2, 0, 12)
15
+ __version__ = version = '2.0.13'
16
+ __version_tuple__ = version_tuple = (2, 0, 13)
hilda/hilda_client.py CHANGED
@@ -125,9 +125,29 @@ def stop_is_needed(func: Callable):
125
125
  return wrapper
126
126
 
127
127
 
128
- class HildaClient:
129
- Breakpoint = namedtuple('Breakpoint', 'address options forced callback')
128
+ class HildaBreakpoint:
129
+ def __init__(self, hilda_client: 'HildaClient', lldb_breakpoint: lldb.SBBreakpoint,
130
+ address: Union[str, int], forced: bool = False, options: Optional[typing.Mapping] = None,
131
+ callback: Optional[Callable] = None) -> None:
132
+ self._hilda_client = hilda_client
133
+ self.address = address
134
+ self.forced = forced
135
+ self.options = options
136
+ self.callback = callback
137
+ self.lldb_breakpoint = lldb_breakpoint
138
+
139
+ def __repr__(self) -> str:
140
+ return (f'<{self.__class__.__name__} LLDB:{self.lldb_breakpoint} FORCED:{self.forced} OPTIONS:{self.options} '
141
+ f'CALLBACK:{self.callback}>')
142
+
143
+ def __str__(self) -> str:
144
+ return repr(self)
130
145
 
146
+ def remove(self) -> None:
147
+ self._hilda_client.remove_hilda_breakpoint(self.lldb_breakpoint.id)
148
+
149
+
150
+ class HildaClient:
131
151
  RETVAL_BIT_COUNT = 64
132
152
 
133
153
  def __init__(self, debugger: lldb.SBDebugger):
@@ -473,7 +493,7 @@ class HildaClient:
473
493
  with self.stopped():
474
494
  return self.evaluate_expression(call_expression)
475
495
 
476
- def monitor(self, address, condition: str = None, **options) -> lldb.SBBreakpoint:
496
+ def monitor(self, address, condition: str = None, **options) -> HildaBreakpoint:
477
497
  """
478
498
  Monitor every time a given address is called
479
499
 
@@ -613,7 +633,7 @@ class HildaClient:
613
633
  if remove_forced or not bp.forced:
614
634
  self.remove_hilda_breakpoint(bp_id)
615
635
 
616
- def remove_hilda_breakpoint(self, bp_id):
636
+ def remove_hilda_breakpoint(self, bp_id: int) -> None:
617
637
  """
618
638
  Remove a single breakpoint placed by Hilda
619
639
  :param bp_id: Breakpoint's ID
@@ -647,7 +667,7 @@ class HildaClient:
647
667
  print(highlight(entitlements, XmlLexer(), TerminalTrueColorFormatter()))
648
668
 
649
669
  def bp(self, address_or_name: Union[int, str], callback: Optional[Callable] = None, condition: str = None,
650
- forced=False, module_name: Optional[str] = None, **options) -> lldb.SBBreakpoint:
670
+ forced=False, module_name: Optional[str] = None, **options) -> HildaBreakpoint:
651
671
  """
652
672
  Add a breakpoint
653
673
  :param address_or_name:
@@ -676,15 +696,14 @@ class HildaClient:
676
696
  bp.SetCondition(condition)
677
697
 
678
698
  # add into Hilda's internal list of breakpoints
679
- self.breakpoints[bp.id] = HildaClient.Breakpoint(
680
- address=address_or_name, options=options, forced=forced, callback=callback
681
- )
699
+ self.breakpoints[bp.id] = HildaBreakpoint(self, bp, address=address_or_name, forced=forced, options=options,
700
+ callback=callback)
682
701
 
683
702
  if callback is not None:
684
703
  bp.SetScriptCallbackFunction('lldb.hilda_client.bp_callback_router')
685
704
 
686
705
  self.log_info(f'Breakpoint #{bp.id} has been set')
687
- return bp
706
+ return self.breakpoints[bp.id]
688
707
 
689
708
  def bp_callback_router(self, frame, bp_loc, *_):
690
709
  """
hilda/symbol.py CHANGED
@@ -139,10 +139,10 @@ class Symbol(int):
139
139
  def peek_str(self) -> str:
140
140
  return self._client.peek_str(self)
141
141
 
142
- def monitor(self, **args) -> lldb.SBBreakpoint:
142
+ def monitor(self, **args):
143
143
  return self._client.monitor(self, **args)
144
144
 
145
- def bp(self, callback=None, **args) -> lldb.SBBreakpoint:
145
+ def bp(self, callback=None, **args):
146
146
  return self._client.bp(self, callback, **args)
147
147
 
148
148
  def disass(self, size, **args) -> lldb.SBInstructionList:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hilda
3
- Version: 2.0.12
3
+ Version: 2.0.13
4
4
  Summary: LLDB wrapped and empowered by iPython's features
5
5
  Author-email: doronz88 <doron88@gmail.com>, matan <matan1008@gmail.com>, netanel cohen <netanelc305@protonmail.com>
6
6
  Maintainer-email: doronz88 <doron88@gmail.com>, matan <matan1008@gmail.com>, netanel cohen <netanelc305@protonmail.com>
@@ -3,19 +3,19 @@ gifs/ui.png,sha256=iaRwNZ9qVWUkUe2TJb_6VPsTu--7HrElA2duWiyZ-Oc,131
3
3
  gifs/xpc_print_message.gif,sha256=i5S8Y9bJm9n-NtOipFTAC8_jUR4uZCM4sOap_ccJX0k,939935
4
4
  hilda/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  hilda/__main__.py,sha256=KWRqvukK4wraxCMtvH5nO25mFXLO5aWXa7z_VfAtbO8,90
6
- hilda/_version.py,sha256=wKKYD5IMObJJDLFX_BDGQaUM94_UxVK7-QbMbwaWTy8,413
6
+ hilda/_version.py,sha256=03q6muYYEHl3bICYdLw7UcLk8T_DpKy5-BjpwZM00Nk,413
7
7
  hilda/cli.py,sha256=1-COYHseHcWPhuNXaf-SbAOum_iW4WkAp3K_YGa2Ero,3624
8
8
  hilda/common.py,sha256=VFtpOH9IRqbu6lONM6Hz-PxcdJfktgS3akJv5UCHO0s,523
9
9
  hilda/exceptions.py,sha256=8L1OvOqns4O4ieiH4YlrMbZkk_PvuyCq4UyqFAodkF8,2042
10
10
  hilda/hilda_ascii_art.html,sha256=-9YCjAKdGbjtdd6uoKrxkkcJq7j16r4dGka2bZ27b4o,120119
11
- hilda/hilda_client.py,sha256=Ae1ZxGK-nC4aZV59XjUSkBZvMgDvepHadoGR-7ApVSU,47187
11
+ hilda/hilda_client.py,sha256=N1vAjODqQaTcuLaD4uLPmpReyLyvZrVFCPQkz-LwJZ8,48027
12
12
  hilda/launch_lldb.py,sha256=ziRQd1LUz8URcJdV1mjjUs09Uo6NeO4TZfENPhan-3g,8038
13
13
  hilda/lldb_entrypoint.py,sha256=vTiClzfiTtjorlxEfIsI-W657KEGobx74qDhaZ8nPhM,1007
14
14
  hilda/lldb_importer.py,sha256=LrIQnigDG3wgmIPXya67oBlWubkDgV-rEpzfWNEYCoc,553
15
15
  hilda/objective_c_class.py,sha256=gdYpwSMW-unHII6VIzBBj65H3zGIbUfWSn9ACEMcJGQ,11735
16
16
  hilda/objective_c_symbol.py,sha256=oTyAlaPrxr2s6HFVPOvlsv0mk1xoadNEbP5kztloUQs,8378
17
17
  hilda/registers.py,sha256=moGS9MXrfm8vmnqDKWZSg4wmZNydGUadui9uwEwzhsI,856
18
- hilda/symbol.py,sha256=_A-ivRttf7f1Fxclj23pC807r08GQ1KwHvEXnyw7FT4,7517
18
+ hilda/symbol.py,sha256=BywATxg8SypKCWLRGrXSHgpM87G7PFgXuXOthWsKlaY,7475
19
19
  hilda/symbols_jar.py,sha256=Vqdv6iH92P6aSfcz5XiR0FbNRqKuUu48mi-GxvPr32w,6504
20
20
  hilda/ipython_extensions/events.py,sha256=w_4V8FoJJMarWArEE8uzb2UXk1mqfslmI7XCyVb_XuE,1976
21
21
  hilda/ipython_extensions/keybindings.py,sha256=Ai9wHCla6HhgZGGxc0UEOCYODcavyef_zzUC9A9GcTE,1081
@@ -46,9 +46,9 @@ hilda/snippets/macho/macho_load_commands.py,sha256=OsajG2xWuRwhYhj9f-lnUiNe43Yum
46
46
  hilda/ui/colors.json,sha256=f-ITquY3IInQreviTy23JfmxfJrGM1_MivACf1GKGqM,262
47
47
  hilda/ui/ui_manager.py,sha256=BmzI1sBx0PYCQDlB9Al7wsTEAMJxaJ7NW0DS4C7g5-0,2265
48
48
  hilda/ui/views.py,sha256=1u_eZzw7wAEP1bm_-9nkqgGhMSX__woiUuoBgnsAKVM,7843
49
- hilda-2.0.12.dist-info/LICENSE,sha256=M-LVJ0AFAYB82eueyl8brh-QLPe-iLNVgbCi79-3TDo,1078
50
- hilda-2.0.12.dist-info/METADATA,sha256=xZlIZJiSFApwaFeDhjS6birXJjHYDhn1vYGLOtDwz88,23377
51
- hilda-2.0.12.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
52
- hilda-2.0.12.dist-info/entry_points.txt,sha256=9n3O3j6V3XnVR_GcFqCWNgRAbalfukTSW2WvghsLVmA,46
53
- hilda-2.0.12.dist-info/top_level.txt,sha256=TVD7l1WkE1noT866YqPFhiQnjYCYZM5Xz54v_3EYpnI,11
54
- hilda-2.0.12.dist-info/RECORD,,
49
+ hilda-2.0.13.dist-info/LICENSE,sha256=M-LVJ0AFAYB82eueyl8brh-QLPe-iLNVgbCi79-3TDo,1078
50
+ hilda-2.0.13.dist-info/METADATA,sha256=vOG673zpKqn0isEEWRh5-gzxdft7ifO0gID7En_FxK0,23377
51
+ hilda-2.0.13.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
52
+ hilda-2.0.13.dist-info/entry_points.txt,sha256=9n3O3j6V3XnVR_GcFqCWNgRAbalfukTSW2WvghsLVmA,46
53
+ hilda-2.0.13.dist-info/top_level.txt,sha256=TVD7l1WkE1noT866YqPFhiQnjYCYZM5Xz54v_3EYpnI,11
54
+ hilda-2.0.13.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (73.0.1)
2
+ Generator: setuptools (74.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5