hilda 3.3.0__tar.gz → 3.4.1__tar.gz

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.
Files changed (79) hide show
  1. {hilda-3.3.0 → hilda-3.4.1}/.github/workflows/python-app.yml +1 -1
  2. {hilda-3.3.0 → hilda-3.4.1}/PKG-INFO +1 -1
  3. {hilda-3.3.0 → hilda-3.4.1}/hilda/_version.py +3 -3
  4. {hilda-3.3.0 → hilda-3.4.1}/hilda/launch_lldb.py +0 -9
  5. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/macho/macho_load_commands.py +8 -1
  6. {hilda-3.3.0 → hilda-3.4.1}/hilda/symbols.py +1 -7
  7. {hilda-3.3.0 → hilda-3.4.1}/hilda/watchpoints.py +5 -1
  8. {hilda-3.3.0 → hilda-3.4.1}/hilda.egg-info/PKG-INFO +1 -1
  9. {hilda-3.3.0 → hilda-3.4.1}/tests/conftest.py +1 -1
  10. {hilda-3.3.0 → hilda-3.4.1}/tests/test_symbols/test_objective_c_symbol.py +1 -0
  11. {hilda-3.3.0 → hilda-3.4.1}/.github/workflows/python-publish.yml +0 -0
  12. {hilda-3.3.0 → hilda-3.4.1}/.gitignore +0 -0
  13. {hilda-3.3.0 → hilda-3.4.1}/.pre-commit-config.yaml +0 -0
  14. {hilda-3.3.0 → hilda-3.4.1}/LICENSE +0 -0
  15. {hilda-3.3.0 → hilda-3.4.1}/README.md +0 -0
  16. {hilda-3.3.0 → hilda-3.4.1}/gifs/.gitattributes +0 -0
  17. {hilda-3.3.0 → hilda-3.4.1}/gifs/ui.png +0 -0
  18. {hilda-3.3.0 → hilda-3.4.1}/gifs/xpc_print_message.gif +0 -0
  19. {hilda-3.3.0 → hilda-3.4.1}/hilda/__init__.py +0 -0
  20. {hilda-3.3.0 → hilda-3.4.1}/hilda/__main__.py +0 -0
  21. {hilda-3.3.0 → hilda-3.4.1}/hilda/breakpoints.py +0 -0
  22. {hilda-3.3.0 → hilda-3.4.1}/hilda/cli.py +0 -0
  23. {hilda-3.3.0 → hilda-3.4.1}/hilda/common.py +0 -0
  24. {hilda-3.3.0 → hilda-3.4.1}/hilda/decorators.py +0 -0
  25. {hilda-3.3.0 → hilda-3.4.1}/hilda/exceptions.py +0 -0
  26. {hilda-3.3.0 → hilda-3.4.1}/hilda/hilda_client.py +0 -0
  27. {hilda-3.3.0 → hilda-3.4.1}/hilda/ipython_extensions/events.py +0 -0
  28. {hilda-3.3.0 → hilda-3.4.1}/hilda/ipython_extensions/keybindings.py +0 -0
  29. {hilda-3.3.0 → hilda-3.4.1}/hilda/ipython_extensions/magics.py +0 -0
  30. {hilda-3.3.0 → hilda-3.4.1}/hilda/lldb_entrypoint.py +0 -0
  31. {hilda-3.3.0 → hilda-3.4.1}/hilda/lldb_importer.py +0 -0
  32. {hilda-3.3.0 → hilda-3.4.1}/hilda/objective_c/from_ns_to_json.m +0 -0
  33. {hilda-3.3.0 → hilda-3.4.1}/hilda/objective_c/get_objectivec_class_by_module.m +0 -0
  34. {hilda-3.3.0 → hilda-3.4.1}/hilda/objective_c/get_objectivec_class_description.m +0 -0
  35. {hilda-3.3.0 → hilda-3.4.1}/hilda/objective_c/get_objectivec_symbol_data.m +0 -0
  36. {hilda-3.3.0 → hilda-3.4.1}/hilda/objective_c/lsof.m +0 -0
  37. {hilda-3.3.0 → hilda-3.4.1}/hilda/objective_c/to_ns_from_json.m +0 -0
  38. {hilda-3.3.0 → hilda-3.4.1}/hilda/objective_c_class.py +0 -0
  39. {hilda-3.3.0 → hilda-3.4.1}/hilda/objective_c_symbol.py +0 -0
  40. {hilda-3.3.0 → hilda-3.4.1}/hilda/registers.py +0 -0
  41. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/__init__.py +0 -0
  42. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/boringssl.py +0 -0
  43. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/collections.py +0 -0
  44. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/dyld.py +0 -0
  45. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/fs_utils.py +0 -0
  46. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/libmalloc.py +0 -0
  47. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/mach/CFRunLoopServiceMachPort_hooks.py +0 -0
  48. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/mach/__init__.py +0 -0
  49. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/macho/__init__.py +0 -0
  50. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/macho/all_image_infos.py +0 -0
  51. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/macho/apple_version.py +0 -0
  52. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/macho/image_info.py +0 -0
  53. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/macho/macho.py +0 -0
  54. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/remotepairingd.py +0 -0
  55. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/syslog.py +0 -0
  56. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/uuid.py +0 -0
  57. {hilda-3.3.0 → hilda-3.4.1}/hilda/snippets/xpc.py +0 -0
  58. {hilda-3.3.0 → hilda-3.4.1}/hilda/symbol.py +0 -0
  59. {hilda-3.3.0 → hilda-3.4.1}/hilda/ui/colors.json +0 -0
  60. {hilda-3.3.0 → hilda-3.4.1}/hilda/ui/ui_manager.py +0 -0
  61. {hilda-3.3.0 → hilda-3.4.1}/hilda/ui/views.py +0 -0
  62. {hilda-3.3.0 → hilda-3.4.1}/hilda.egg-info/SOURCES.txt +0 -0
  63. {hilda-3.3.0 → hilda-3.4.1}/hilda.egg-info/dependency_links.txt +0 -0
  64. {hilda-3.3.0 → hilda-3.4.1}/hilda.egg-info/entry_points.txt +0 -0
  65. {hilda-3.3.0 → hilda-3.4.1}/hilda.egg-info/requires.txt +0 -0
  66. {hilda-3.3.0 → hilda-3.4.1}/hilda.egg-info/top_level.txt +0 -0
  67. {hilda-3.3.0 → hilda-3.4.1}/pyproject.toml +0 -0
  68. {hilda-3.3.0 → hilda-3.4.1}/requirements.txt +0 -0
  69. {hilda-3.3.0 → hilda-3.4.1}/setup.cfg +0 -0
  70. {hilda-3.3.0 → hilda-3.4.1}/tests/__init__.py +0 -0
  71. {hilda-3.3.0 → hilda-3.4.1}/tests/test_hilda_client/test_from_ns.py +0 -0
  72. {hilda-3.3.0 → hilda-3.4.1}/tests/test_hilda_client/test_hilda_client.py +0 -0
  73. {hilda-3.3.0 → hilda-3.4.1}/tests/test_hilda_client/test_monitor.py +0 -0
  74. {hilda-3.3.0 → hilda-3.4.1}/tests/test_hilda_client/test_ns.py +0 -0
  75. {hilda-3.3.0 → hilda-3.4.1}/tests/test_hilda_client/test_registers.py +0 -0
  76. {hilda-3.3.0 → hilda-3.4.1}/tests/test_snippets/test_xpc.py +0 -0
  77. {hilda-3.3.0 → hilda-3.4.1}/tests/test_symbols/test_objective_c_class.py +0 -0
  78. {hilda-3.3.0 → hilda-3.4.1}/tests/test_symbols/test_symbol.py +0 -0
  79. {hilda-3.3.0 → hilda-3.4.1}/tests/test_symbols/test_symbol_list.py +0 -0
@@ -16,7 +16,7 @@ jobs:
16
16
 
17
17
  strategy:
18
18
  matrix:
19
- python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13" ]
19
+ python-version: [ 3.9 ]
20
20
  os: [ macos-latest ]
21
21
 
22
22
  steps:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hilda
3
- Version: 3.3.0
3
+ Version: 3.4.1
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>
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '3.3.0'
32
- __version_tuple__ = version_tuple = (3, 3, 0)
31
+ __version__ = version = '3.4.1'
32
+ __version_tuple__ = version_tuple = (3, 4, 1)
33
33
 
34
- __commit_id__ = commit_id = 'g3f52b1753'
34
+ __commit_id__ = commit_id = 'g2ae9e5677'
@@ -61,14 +61,6 @@ class LLDBListenerThread(Thread, ABC):
61
61
  sys.stderr.write(stderr)
62
62
  stderr = self.process.GetSTDERR(1024)
63
63
 
64
- def _process_potential_watchpoint_event(self) -> None:
65
- stopped_threads = self._get_stopped_threads(lldb.eStopReasonWatchpoint)
66
- for thread in stopped_threads:
67
- watchpoint_id = thread.GetStopReasonDataAtIndex(0)
68
- frame = thread.GetFrameAtIndex(0)
69
- if lldb.hilda_client is not None:
70
- lldb.hilda_client.watchpoints._dispatch_watchpoint_callback(watchpoint_id, thread, frame)
71
-
72
64
  def _get_stopped_threads(self, reason: Optional[int] = None) -> list[lldb.SBThread]:
73
65
  if reason is None:
74
66
  stop_reasons = [
@@ -115,7 +107,6 @@ class LLDBListenerThread(Thread, ABC):
115
107
  elif state == lldb.eStateStopped and last_state == lldb.eStateRunning:
116
108
  logger.debug('Process Stopped')
117
109
  self._set_selected_thread_to_stopped_thread()
118
- self._process_potential_watchpoint_event()
119
110
 
120
111
  last_state = state
121
112
 
@@ -6,7 +6,9 @@ from hilda.snippets.macho.apple_version import version_t
6
6
  from hilda.symbol import SymbolFormatField
7
7
 
8
8
  # See: https://opensource.apple.com/source/xnu/xnu-7195.81.3/EXTERNAL_HEADERS/mach-o/loader.h
9
+ # And: https://github.com/blacktop/go-macho/blob/master/types/commands.go
9
10
  LC_REQ_DYLD = 0x80000000
11
+ LC_SEP = 0x8000000
10
12
 
11
13
  LOAD_COMMAND_TYPE = Enum(Int32ul,
12
14
  LC_SEGMENT=0x1,
@@ -62,7 +64,12 @@ LOAD_COMMAND_TYPE = Enum(Int32ul,
62
64
  LC_BUILD_VERSION=0x32,
63
65
  LC_DYLD_EXPORTS_TRIE=(0x33 | LC_REQ_DYLD),
64
66
  LC_DYLD_CHAINED_FIXUPS=(0x34 | LC_REQ_DYLD),
65
- LC_FILESET_ENTRY=(0x35 | LC_REQ_DYLD)
67
+ LC_FILESET_ENTRY=(0x35 | LC_REQ_DYLD),
68
+ LC_ATOM_INFO=0x36,
69
+ LC_FUNCTION_VARIANTS=0x37,
70
+ LC_FUNCTION_VARIANT_FIXUPS=0x38,
71
+ LC_TARGET_TRIPLE=0x39,
72
+ LC_SEP_CACHE_SLIDE=(0x1 | LC_SEP)
66
73
  )
67
74
 
68
75
 
@@ -277,12 +277,6 @@ class SymbolList:
277
277
  -> Optional[Tuple[lldb.SBSymbol, lldb.SBAddress, str, int, int]]:
278
278
  lldb_symbol_context_list = list(self._hilda.target.FindSymbols(name))
279
279
 
280
- for lldb_symbol_context in list(lldb_symbol_context_list):
281
- # Verify because FindSymbols finds `_Z3foov` when looking for `foo`
282
- if lldb_symbol_context.symbol.name != name:
283
- lldb_symbol_context_list.remove(lldb_symbol_context)
284
- self._hilda.log_debug(f'Ignoring symbol {lldb_symbol_context.symbol.name} (similar to {name})')
285
-
286
280
  if address is not None:
287
281
  for lldb_symbol_context in list(lldb_symbol_context_list):
288
282
  lldb_symbol_context_address = lldb_symbol_context.symbol.GetStartAddress().GetLoadAddress(
@@ -453,7 +447,7 @@ class SymbolList:
453
447
  arg_count = min(6, arg_count)
454
448
  options['expr'] = {f'$arg{i + 3}': 'po' for i in range(arg_count)}
455
449
  name = options.get('name', name)
456
- address.monitor(name=name, **options)
450
+ self._hilda.symbol(address).monitor(name=name, **options)
457
451
 
458
452
  # Filters
459
453
 
@@ -51,6 +51,9 @@ class HildaWatchpoint:
51
51
  @callback.setter
52
52
  def callback(self, callback: Optional[Callable]) -> None:
53
53
  self._callback = callback
54
+ # TODO: Figure out a way to add set this callback programmatically
55
+ self._hilda.lldb_handle_command(f'watchpoint command add -F '
56
+ f'lldb.hilda_client.watchpoints._dispatch_watchpoint_callback {self.id}')
54
57
 
55
58
  @property
56
59
  def condition(self) -> Optional[str]:
@@ -256,10 +259,11 @@ class WatchpointList:
256
259
  """
257
260
  return (wp for wp in self)
258
261
 
259
- def _dispatch_watchpoint_callback(self, watchpoint_id: int, _, frame) -> None:
262
+ def _dispatch_watchpoint_callback(self, frame, wp, internal_dict) -> None:
260
263
  """
261
264
  Route the watchpoint callback the specific watchpoint callback.
262
265
  """
266
+ watchpoint_id = wp.GetID()
263
267
  self._hilda._bp_frame = frame
264
268
  try:
265
269
  callback = self[watchpoint_id].callback
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hilda
3
- Version: 3.3.0
3
+ Version: 3.4.1
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,7 +3,7 @@ import pytest
3
3
  from hilda.hilda_client import HildaClient
4
4
  from hilda.launch_lldb import create_hilda_client_using_attach_by_name
5
5
 
6
- PROCESS = 'awdd'
6
+ PROCESS = 'remoted'
7
7
 
8
8
 
9
9
  @pytest.fixture(scope='function')
@@ -148,6 +148,7 @@ def test_symbol_str_recursive(hilda_client):
148
148
  assert '+ alloc;' in hilda_client.ns({1: 2, 3: 4}).objc_symbol._to_str(True)
149
149
 
150
150
 
151
+ @pytest.mark.skip('Not fully supported')
151
152
  def test_set_implementation(hilda_client):
152
153
  pid = hilda_client.symbols.getpid()
153
154
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes