hilda 2.0.3__py3-none-any.whl → 2.0.5__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 +2 -2
- hilda/cli.py +3 -4
- hilda/hilda_client.py +5 -5
- hilda/ipython_extensions/events.py +1 -1
- hilda/ipython_extensions/keybindings.py +2 -1
- hilda/launch_lldb.py +4 -5
- {hilda-2.0.3.dist-info → hilda-2.0.5.dist-info}/METADATA +1 -1
- {hilda-2.0.3.dist-info → hilda-2.0.5.dist-info}/RECORD +12 -12
- {hilda-2.0.3.dist-info → hilda-2.0.5.dist-info}/WHEEL +1 -1
- {hilda-2.0.3.dist-info → hilda-2.0.5.dist-info}/LICENSE +0 -0
- {hilda-2.0.3.dist-info → hilda-2.0.5.dist-info}/entry_points.txt +0 -0
- {hilda-2.0.3.dist-info → hilda-2.0.5.dist-info}/top_level.txt +0 -0
hilda/_version.py
CHANGED
hilda/cli.py
CHANGED
|
@@ -77,16 +77,15 @@ def cli_bare() -> None:
|
|
|
77
77
|
@click.option('--stderr', help='Redirect stderr to this file path')
|
|
78
78
|
@click.option('--cwd', help='Set the working directory for the process')
|
|
79
79
|
@click.option('--flags', type=click.INT, default=0, help='Launch flags (bitmask)')
|
|
80
|
-
@click.option('--stop-at-entry', is_flag=True, help='Stop the process at the entry point')
|
|
81
80
|
@startup_files_option
|
|
82
81
|
def launch(exec_path: str, argv: List[str], envp: List[str], stdin: Optional[Path],
|
|
83
82
|
stdout: Optional[Path], stderr: Optional[Path], cwd: Optional[Path], flags: Optional[int],
|
|
84
|
-
|
|
85
|
-
""" Attach to given process and start a lldb shell """
|
|
83
|
+
startup_files: List[str]) -> None:
|
|
84
|
+
""" Attach to a given process and start a lldb shell """
|
|
86
85
|
argv = list(argv)
|
|
87
86
|
envp = list(envp)
|
|
88
87
|
with create_hilda_client_using_launch(
|
|
89
|
-
exec_path, argv, envp, stdin, stdout, stderr, cwd, flags
|
|
88
|
+
exec_path, argv, envp, stdin, stdout, stderr, cwd, flags) as hilda_client:
|
|
90
89
|
hilda_client.interact(startup_files=startup_files)
|
|
91
90
|
|
|
92
91
|
|
hilda/hilda_client.py
CHANGED
|
@@ -58,6 +58,7 @@ GREETING = f"""
|
|
|
58
58
|
<b>Hilda has been successfully loaded! 😎
|
|
59
59
|
Usage:
|
|
60
60
|
<span style="color: magenta">p</span> Global to access all features.
|
|
61
|
+
<span style="color: magenta">F1</span> UI Show.
|
|
61
62
|
<span style="color: magenta">F7</span> Step Into.
|
|
62
63
|
<span style="color: magenta">F8</span> Step Over.
|
|
63
64
|
<span style="color: magenta">F9</span> Continue.
|
|
@@ -141,6 +142,7 @@ class HildaClient:
|
|
|
141
142
|
self.configs = Configs()
|
|
142
143
|
self._dynamic_env_loaded = False
|
|
143
144
|
self._symbols_loaded = False
|
|
145
|
+
self.globals: typing.MutableMapping[str, Any] = globals()
|
|
144
146
|
|
|
145
147
|
# the frame called within the context of the hit BP
|
|
146
148
|
self._bp_frame = None
|
|
@@ -1059,8 +1061,7 @@ class HildaClient:
|
|
|
1059
1061
|
ipython_config.InteractiveShellApp.exec_files = startup_files
|
|
1060
1062
|
self.log_debug(f'Startup files - {startup_files}')
|
|
1061
1063
|
|
|
1062
|
-
namespace = globals
|
|
1063
|
-
namespace.update(locals())
|
|
1064
|
+
namespace = self.globals
|
|
1064
1065
|
namespace['p'] = self
|
|
1065
1066
|
namespace['ui'] = self.ui_manager
|
|
1066
1067
|
namespace['cfg'] = self.configs
|
|
@@ -1075,11 +1076,10 @@ class HildaClient:
|
|
|
1075
1076
|
def __exit__(self, exc_type, exc_val, exc_tb) -> None:
|
|
1076
1077
|
self.detach()
|
|
1077
1078
|
|
|
1078
|
-
|
|
1079
|
-
def _add_global(name: str, value: Any, reserved_names=None):
|
|
1079
|
+
def _add_global(self, name: str, value: Any, reserved_names=None) -> None:
|
|
1080
1080
|
if reserved_names is None or name not in reserved_names:
|
|
1081
1081
|
# don't override existing symbols
|
|
1082
|
-
globals
|
|
1082
|
+
self.globals[name] = value
|
|
1083
1083
|
|
|
1084
1084
|
@staticmethod
|
|
1085
1085
|
def _get_saved_state_filename():
|
|
@@ -26,7 +26,7 @@ class HIEvents:
|
|
|
26
26
|
# we are only interested in names
|
|
27
27
|
continue
|
|
28
28
|
|
|
29
|
-
if node.id in locals() or node.id in globals
|
|
29
|
+
if node.id in locals() or node.id in self.hilda_client.globals or node.id in dir(builtins):
|
|
30
30
|
# That are undefined
|
|
31
31
|
continue
|
|
32
32
|
|
|
@@ -6,7 +6,8 @@ from prompt_toolkit.keys import Keys
|
|
|
6
6
|
def load_ipython_extension(ipython):
|
|
7
7
|
def register_keybindings():
|
|
8
8
|
hilda = ipython.user_ns['p']
|
|
9
|
-
keys_mapping = {Keys.
|
|
9
|
+
keys_mapping = {Keys.F1: hilda.ui_manager.show,
|
|
10
|
+
Keys.F7: hilda.step_into,
|
|
10
11
|
Keys.F8: hilda.step_over,
|
|
11
12
|
Keys.F9: lambda _: (hilda.log_info('Sending continue'), hilda.cont()),
|
|
12
13
|
Keys.F10: lambda _: (hilda.log_info('Sending stop'), hilda.stop())}
|
hilda/launch_lldb.py
CHANGED
|
@@ -127,13 +127,12 @@ class LLDBLaunch(LLDBListenerThread):
|
|
|
127
127
|
def __init__(self, exec_path: str, argv: Optional[List[str]] = None, envp: Optional[List[str]] = None,
|
|
128
128
|
stdin: Optional[str] = None,
|
|
129
129
|
stdout: Optional[str] = None, stderr: Optional[str] = None, wd: Optional[str] = None,
|
|
130
|
-
flags: Optional[int] = 0
|
|
130
|
+
flags: Optional[int] = 0):
|
|
131
131
|
self.exec_path = exec_path
|
|
132
132
|
self.stdout = stdout
|
|
133
133
|
self.stdin = stdin
|
|
134
134
|
self.stderr = stderr
|
|
135
135
|
self.flags = flags
|
|
136
|
-
self.stop_at_entry = stop_at_entry
|
|
137
136
|
self.argv = argv
|
|
138
137
|
self.envp = envp
|
|
139
138
|
self.working_directory = wd
|
|
@@ -149,7 +148,7 @@ class LLDBLaunch(LLDBListenerThread):
|
|
|
149
148
|
logger.debug(f'Lunching process {self.exec_path}')
|
|
150
149
|
return self.target.Launch(self.listener, self.argv, self.envp,
|
|
151
150
|
self.stdin, self.stdout, self.stderr, self.working_directory,
|
|
152
|
-
self.flags,
|
|
151
|
+
self.flags, True,
|
|
153
152
|
self.error)
|
|
154
153
|
|
|
155
154
|
|
|
@@ -170,8 +169,8 @@ def create_hilda_client_using_remote_attach(
|
|
|
170
169
|
def create_hilda_client_using_launch(
|
|
171
170
|
exec_path: str, argv: Optional[List] = None, envp: Optional[List] = None, stdin: Optional[str] = None,
|
|
172
171
|
stdout: Optional[str] = None, stderr: Optional[str] = None, wd: Optional[str] = None,
|
|
173
|
-
flags: Optional[int] = 0
|
|
174
|
-
lldb_t = LLDBLaunch(exec_path, argv, envp, stdin, stdout, stderr, wd, flags
|
|
172
|
+
flags: Optional[int] = 0) -> HildaClient:
|
|
173
|
+
lldb_t = LLDBLaunch(exec_path, argv, envp, stdin, stdout, stderr, wd, flags)
|
|
175
174
|
lldb_t.start()
|
|
176
175
|
return _get_hilda_client_from_sbdebugger(lldb_t.debugger)
|
|
177
176
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hilda
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.5
|
|
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,13 +3,13 @@ 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=
|
|
7
|
-
hilda/cli.py,sha256=
|
|
6
|
+
hilda/_version.py,sha256=c9ECwcDxjViIb83g7GooS0OXeVBD5xMtQN-qm5D--mA,411
|
|
7
|
+
hilda/cli.py,sha256=FQtOg1iFRtNdVVes_SchIoidOWAENhsLItwXBWCgWgc,3625
|
|
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=
|
|
12
|
-
hilda/launch_lldb.py,sha256=
|
|
11
|
+
hilda/hilda_client.py,sha256=UHCUQJclIS2qk81Jk1leDxdTwTuojA-sM9JaANfp120,45357
|
|
12
|
+
hilda/launch_lldb.py,sha256=sD-02HERIFQEYoPM9JrRfFOTjHE2QUt3L0pNgFsyAEQ,7186
|
|
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=Xyw7FucNVcu8NqhB0Gy-OjaN_2DmCywn6pjUEwyd1Hk,11760
|
|
@@ -17,8 +17,8 @@ hilda/objective_c_symbol.py,sha256=rJrnnQdro0st_3kEboOALHYxZhM19BLvqOEfZRtP7mA,8
|
|
|
17
17
|
hilda/registers.py,sha256=moGS9MXrfm8vmnqDKWZSg4wmZNydGUadui9uwEwzhsI,856
|
|
18
18
|
hilda/symbol.py,sha256=_TSQqFysRs82BFNGX9o_ZbkrwzSsWq3FiMbX92VKoPo,7200
|
|
19
19
|
hilda/symbols_jar.py,sha256=1GPgrbXdsxiirMufrWqVi-DHF9qDXgy_HMtWJD4dJuE,6447
|
|
20
|
-
hilda/ipython_extensions/events.py,sha256=
|
|
21
|
-
hilda/ipython_extensions/keybindings.py,sha256=
|
|
20
|
+
hilda/ipython_extensions/events.py,sha256=w_4V8FoJJMarWArEE8uzb2UXk1mqfslmI7XCyVb_XuE,1976
|
|
21
|
+
hilda/ipython_extensions/keybindings.py,sha256=kKArfRWyJ261ieUot4CVTGRmwbnixYtrpgiFCnBfDag,1013
|
|
22
22
|
hilda/ipython_extensions/magics.py,sha256=ULb63-OyIaWwvSfwRvEG_65ibaI2RTxeX8yPJK8pbc0,1300
|
|
23
23
|
hilda/objective_c/from_ns_to_json.m,sha256=5Ddl0UJLQXlDYwR_yjE4yZk1aOsJGxoy1oRnhZHPrTw,2847
|
|
24
24
|
hilda/objective_c/get_objectivec_class_by_module.m,sha256=DC8S8XaWsQSOJZWVWhATr98SZQobA3MmclLsBJGZTcU,704
|
|
@@ -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.
|
|
50
|
-
hilda-2.0.
|
|
51
|
-
hilda-2.0.
|
|
52
|
-
hilda-2.0.
|
|
53
|
-
hilda-2.0.
|
|
54
|
-
hilda-2.0.
|
|
49
|
+
hilda-2.0.5.dist-info/LICENSE,sha256=M-LVJ0AFAYB82eueyl8brh-QLPe-iLNVgbCi79-3TDo,1078
|
|
50
|
+
hilda-2.0.5.dist-info/METADATA,sha256=dsxLK-kf6vVpUeKhrT0vD0w3BkYs7GyotR-jIbOf5JI,23306
|
|
51
|
+
hilda-2.0.5.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
|
|
52
|
+
hilda-2.0.5.dist-info/entry_points.txt,sha256=9n3O3j6V3XnVR_GcFqCWNgRAbalfukTSW2WvghsLVmA,46
|
|
53
|
+
hilda-2.0.5.dist-info/top_level.txt,sha256=TVD7l1WkE1noT866YqPFhiQnjYCYZM5Xz54v_3EYpnI,11
|
|
54
|
+
hilda-2.0.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|