hilda 1.3.0__py3-none-any.whl → 1.4.1__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 = '1.3.0'
16
- __version_tuple__ = version_tuple = (1, 3, 0)
15
+ __version__ = version = '1.4.1'
16
+ __version_tuple__ = version_tuple = (1, 4, 1)
hilda/hilda_client.py CHANGED
@@ -61,6 +61,7 @@ Have a nice flight ✈️! Starting an IPython shell...
61
61
  """
62
62
 
63
63
  MAGIC_FUNCTIONS = """
64
+ import shlex
64
65
  from IPython.core.magic import register_line_magic, needs_local_scope
65
66
 
66
67
  @register_line_magic
@@ -69,15 +70,22 @@ def objc(line, local_ns=None):
69
70
  p = local_ns['p']
70
71
  className = line.strip()
71
72
  if not className:
72
- print("Error: className is required.")
73
+ p.log_error("Error: className is required.")
73
74
  return
74
75
  try:
75
- # Assuming `p.objc_get_class` is a method you have defined or imported
76
- # Replace `p` with the correct reference to where `objc_get_class` is defined
77
76
  local_ns[className] = p.objc_get_class(className)
78
- p.log_info(f"{className} class loaded successfully.")
77
+ p.log_info(f'{className} class loaded successfully')
79
78
  except Exception:
80
- p.log_error(f"Error loading class {className}")
79
+ p.log_error(f'Error loading class {className}')
80
+
81
+
82
+ @register_line_magic
83
+ @needs_local_scope
84
+ def fbp(line, local_ns=None):
85
+ p = local_ns['p']
86
+ module_name, address = shlex.split(line.strip())
87
+ address = int(address, 16)
88
+ p.file_symbol(address, module_name).bp()
81
89
  """
82
90
 
83
91
  SerializableSymbol = namedtuple('SerializableSymbol', 'address type_ filename')
hilda/ui/views.py CHANGED
@@ -179,11 +179,13 @@ class DisassemblyView(View):
179
179
  fmt_parts = []
180
180
  for inst in disass:
181
181
  load_addr = inst.addr.GetLoadAddress(self.hilda.target)
182
+ file_addr = inst.addr.GetFileAddress()
182
183
  base_name = style(inst.addr.module.file.basename, self.color_scheme.basename)
183
- addr = style(hex(load_addr), fg=self.color_scheme.address)
184
+ load_addr = style(hex(load_addr), fg=self.color_scheme.address)
185
+ file_addr = style(hex(file_addr), fg=self.color_scheme.address)
184
186
  mnemonic = style(inst.GetMnemonic(self.hilda.target), fg=self.color_scheme.mnemonic)
185
187
  operands = style(inst.GetOperands(self.hilda.target), fg=self.color_scheme.operands)
186
- fmt = f'{base_name}[{addr}]: {mnemonic} {operands}'
188
+ fmt = f'{base_name}[{load_addr}][{file_addr}]: {mnemonic} {operands}'
187
189
  if load_addr == self.hilda.frame.pc:
188
190
  fmt += f'{"<-- $pc":^50}'
189
191
  fmt_parts.append(fmt)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hilda
3
- Version: 1.3.0
3
+ Version: 1.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>
@@ -339,6 +339,15 @@ Here is a gist of methods you can access from `p`:
339
339
  - `unwind`
340
340
  - Unwind the stack (useful when get_evaluation_unwind() == False)
341
341
 
342
+ ## Magic functions
343
+
344
+ Sometimes accessing the python API can be tiring, so we added some magic functions to help you out!
345
+
346
+ - `%objc <className>`
347
+ - Equivalent to: `className = p.objc_get_class(className)`
348
+ - `%fbp <filename> <addressInHex>`
349
+ - Equivalent to: `p.file_symbol(addressInHex, filename).bp()`
350
+
342
351
  ## UI Configuration
343
352
 
344
353
  Hilda contains minimal UI for examining the target state.
@@ -562,7 +571,8 @@ NSDictionary = p.objc_get_class('NSDictionary')
562
571
  d = NSDictionary.new()
563
572
 
564
573
  # Or you can use the IPython magic function
565
- %objc NSDictionary
574
+ %objc
575
+ NSDictionary
566
576
  ```
567
577
 
568
578
  This is possible only since `NSDictionary` is exported. In case it is not, you must call `objc_get_class()` explicitly.
@@ -3,11 +3,11 @@ 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=TcX1OCjb1jBnD9cU9Kgidle_OjTv4btagSUIUAChiXU,58
6
- hilda/_version.py,sha256=HGwtpza1HCPtlyqElUvIyH97K44TO13CYiYVZNezQ1M,411
6
+ hilda/_version.py,sha256=oFZsPxoSsCY6D2DiWMSueNvMDRRQN5ssWrPdQtlLJ_o,411
7
7
  hilda/common.py,sha256=fxlVTyRP2AmKCnE6FdgnGJVoG-OBq7Tw6TrBQ_xgszI,194
8
8
  hilda/exceptions.py,sha256=K1mKQe4ules8-c8BT1Z9sna0e1Fv3POF2qEX-WXNKDY,1818
9
9
  hilda/hilda_ascii_art.html,sha256=-9YCjAKdGbjtdd6uoKrxkkcJq7j16r4dGka2bZ27b4o,120119
10
- hilda/hilda_client.py,sha256=74k8ShBL9slQCyWWkdKEtrQG_YsLCMPF_lpVjElsfLA,43264
10
+ hilda/hilda_client.py,sha256=Jo1KXl9Cq0goRb5rhGpobIVP9XQDPn46zpCtM-C_Hxg,43340
11
11
  hilda/launch_lldb.py,sha256=q6YtJigz8oLK8Cxk2SVpGcFwkHqm7uk5kMXgDQSZoG8,2638
12
12
  hilda/lldb_entrypoint.py,sha256=SVKmjDDShbN2l2EU_H03i_AVY9aTSQ18iVeBtQjDOn8,1003
13
13
  hilda/objective_c_class.py,sha256=FMWdNkZpVtlsxeLlcStEQsx9UX_MouOROBcaF5V6m0g,11597
@@ -40,10 +40,10 @@ hilda/snippets/macho/macho.py,sha256=X4NQZkO7VCcIMNuPs25ukiBrHM5Kj3UPMJzzeILfuyg
40
40
  hilda/snippets/macho/macho_load_commands.py,sha256=wGiw4-kgsVVvcOae9HlFNIE23praldGfZshwlwuSD1c,10740
41
41
  hilda/ui/colors.json,sha256=f-ITquY3IInQreviTy23JfmxfJrGM1_MivACf1GKGqM,262
42
42
  hilda/ui/ui_manager.py,sha256=BmzI1sBx0PYCQDlB9Al7wsTEAMJxaJ7NW0DS4C7g5-0,2265
43
- hilda/ui/views.py,sha256=Sd0y7I0iQ4HAWJNyDQ6LjvbEtJYolCaC2sAuPWs6-EE,7693
44
- hilda-1.3.0.dist-info/LICENSE,sha256=M-LVJ0AFAYB82eueyl8brh-QLPe-iLNVgbCi79-3TDo,1078
45
- hilda-1.3.0.dist-info/METADATA,sha256=cSf3Ewvb4uFd2LNJouPw172BrgOaJrPtCZdIc_waeXk,22091
46
- hilda-1.3.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
47
- hilda-1.3.0.dist-info/entry_points.txt,sha256=9n3O3j6V3XnVR_GcFqCWNgRAbalfukTSW2WvghsLVmA,46
48
- hilda-1.3.0.dist-info/top_level.txt,sha256=TVD7l1WkE1noT866YqPFhiQnjYCYZM5Xz54v_3EYpnI,11
49
- hilda-1.3.0.dist-info/RECORD,,
43
+ hilda/ui/views.py,sha256=1u_eZzw7wAEP1bm_-9nkqgGhMSX__woiUuoBgnsAKVM,7843
44
+ hilda-1.4.1.dist-info/LICENSE,sha256=M-LVJ0AFAYB82eueyl8brh-QLPe-iLNVgbCi79-3TDo,1078
45
+ hilda-1.4.1.dist-info/METADATA,sha256=frdPAvnqgbdAlUClcJ5diwrrpQ6Kz8Eb9FabYvRCdgg,22399
46
+ hilda-1.4.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
47
+ hilda-1.4.1.dist-info/entry_points.txt,sha256=9n3O3j6V3XnVR_GcFqCWNgRAbalfukTSW2WvghsLVmA,46
48
+ hilda-1.4.1.dist-info/top_level.txt,sha256=TVD7l1WkE1noT866YqPFhiQnjYCYZM5Xz54v_3EYpnI,11
49
+ hilda-1.4.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
File without changes