hilda 3.2.2__tar.gz → 3.4.0__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.
- {hilda-3.2.2 → hilda-3.4.0}/.github/workflows/python-app.yml +1 -1
- {hilda-3.2.2 → hilda-3.4.0}/PKG-INFO +1 -1
- {hilda-3.2.2 → hilda-3.4.0}/hilda/_version.py +3 -3
- {hilda-3.2.2 → hilda-3.4.0}/hilda/launch_lldb.py +0 -9
- {hilda-3.2.2 → hilda-3.4.0}/hilda/objective_c_class.py +6 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/macho/macho_load_commands.py +8 -1
- {hilda-3.2.2 → hilda-3.4.0}/hilda/symbols.py +0 -6
- {hilda-3.2.2 → hilda-3.4.0}/hilda/watchpoints.py +5 -1
- {hilda-3.2.2 → hilda-3.4.0}/hilda.egg-info/PKG-INFO +1 -1
- {hilda-3.2.2 → hilda-3.4.0}/tests/conftest.py +1 -1
- {hilda-3.2.2 → hilda-3.4.0}/tests/test_symbols/test_objective_c_symbol.py +1 -0
- {hilda-3.2.2 → hilda-3.4.0}/.github/workflows/python-publish.yml +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/.gitignore +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/.pre-commit-config.yaml +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/LICENSE +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/README.md +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/gifs/.gitattributes +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/gifs/ui.png +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/gifs/xpc_print_message.gif +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/__init__.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/__main__.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/breakpoints.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/cli.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/common.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/decorators.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/exceptions.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/hilda_client.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/ipython_extensions/events.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/ipython_extensions/keybindings.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/ipython_extensions/magics.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/lldb_entrypoint.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/lldb_importer.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/objective_c/from_ns_to_json.m +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/objective_c/get_objectivec_class_by_module.m +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/objective_c/get_objectivec_class_description.m +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/objective_c/get_objectivec_symbol_data.m +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/objective_c/lsof.m +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/objective_c/to_ns_from_json.m +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/objective_c_symbol.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/registers.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/__init__.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/boringssl.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/collections.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/dyld.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/fs_utils.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/libmalloc.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/mach/CFRunLoopServiceMachPort_hooks.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/mach/__init__.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/macho/__init__.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/macho/all_image_infos.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/macho/apple_version.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/macho/image_info.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/macho/macho.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/remotepairingd.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/syslog.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/uuid.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/snippets/xpc.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/symbol.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/ui/colors.json +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/ui/ui_manager.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda/ui/views.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda.egg-info/SOURCES.txt +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda.egg-info/dependency_links.txt +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda.egg-info/entry_points.txt +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda.egg-info/requires.txt +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/hilda.egg-info/top_level.txt +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/pyproject.toml +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/requirements.txt +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/setup.cfg +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/tests/__init__.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/tests/test_hilda_client/test_from_ns.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/tests/test_hilda_client/test_hilda_client.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/tests/test_hilda_client/test_monitor.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/tests/test_hilda_client/test_ns.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/tests/test_hilda_client/test_registers.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/tests/test_snippets/test_xpc.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/tests/test_symbols/test_objective_c_class.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/tests/test_symbols/test_symbol.py +0 -0
- {hilda-3.2.2 → hilda-3.4.0}/tests/test_symbols/test_symbol_list.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hilda
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.4.0
|
|
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.
|
|
32
|
-
__version_tuple__ = version_tuple = (3,
|
|
31
|
+
__version__ = version = '3.4.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (3, 4, 0)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'gea3a2d801'
|
|
@@ -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
|
|
|
@@ -3,6 +3,7 @@ import time
|
|
|
3
3
|
from collections import UserList, namedtuple
|
|
4
4
|
from dataclasses import dataclass, field
|
|
5
5
|
from functools import partial
|
|
6
|
+
from pathlib import Path
|
|
6
7
|
from typing import Any, Optional
|
|
7
8
|
|
|
8
9
|
from objc_types_decoder.decode import decode as decode_type
|
|
@@ -296,6 +297,11 @@ class Class:
|
|
|
296
297
|
yield sup
|
|
297
298
|
sup = sup.super
|
|
298
299
|
|
|
300
|
+
@property
|
|
301
|
+
def bundle_path(self) -> Path:
|
|
302
|
+
return Path(self._client.symbols.objc_getClass('NSBundle')
|
|
303
|
+
.objc_call('bundleForClass:', self._class_object).objc_call('bundlePath').py())
|
|
304
|
+
|
|
299
305
|
def _load_class_data(self, data: dict):
|
|
300
306
|
self._class_object = self._client.symbol(data['address'])
|
|
301
307
|
self.super = Class(self._client, data['super']) if data['super'] else None
|
|
@@ -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(
|
|
@@ -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,
|
|
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
|
+
Version: 3.4.0
|
|
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>
|
|
@@ -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
|
|
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
|