hilda 1.3.0__tar.gz → 1.4.2__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 (74) hide show
  1. {hilda-1.3.0 → hilda-1.4.2}/PKG-INFO +12 -2
  2. {hilda-1.3.0 → hilda-1.4.2}/README.md +11 -1
  3. {hilda-1.3.0 → hilda-1.4.2}/hilda/_version.py +2 -2
  4. {hilda-1.3.0 → hilda-1.4.2}/hilda/hilda_client.py +14 -5
  5. {hilda-1.3.0 → hilda-1.4.2}/hilda/ui/views.py +4 -2
  6. {hilda-1.3.0 → hilda-1.4.2}/hilda.egg-info/PKG-INFO +12 -2
  7. {hilda-1.3.0 → hilda-1.4.2}/.github/workflows/python-app.yml +0 -0
  8. {hilda-1.3.0 → hilda-1.4.2}/.github/workflows/python-publish.yml +0 -0
  9. {hilda-1.3.0 → hilda-1.4.2}/.gitignore +0 -0
  10. {hilda-1.3.0 → hilda-1.4.2}/LICENSE +0 -0
  11. {hilda-1.3.0 → hilda-1.4.2}/gifs/.gitattributes +0 -0
  12. {hilda-1.3.0 → hilda-1.4.2}/gifs/ui.png +0 -0
  13. {hilda-1.3.0 → hilda-1.4.2}/gifs/xpc_print_message.gif +0 -0
  14. {hilda-1.3.0 → hilda-1.4.2}/hilda/__init__.py +0 -0
  15. {hilda-1.3.0 → hilda-1.4.2}/hilda/__main__.py +0 -0
  16. {hilda-1.3.0 → hilda-1.4.2}/hilda/common.py +0 -0
  17. {hilda-1.3.0 → hilda-1.4.2}/hilda/exceptions.py +0 -0
  18. {hilda-1.3.0 → hilda-1.4.2}/hilda/hilda_ascii_art.html +0 -0
  19. {hilda-1.3.0 → hilda-1.4.2}/hilda/launch_lldb.py +0 -0
  20. {hilda-1.3.0 → hilda-1.4.2}/hilda/lldb_entrypoint.py +0 -0
  21. {hilda-1.3.0 → hilda-1.4.2}/hilda/objective_c/from_ns_to_json.m +0 -0
  22. {hilda-1.3.0 → hilda-1.4.2}/hilda/objective_c/get_objectivec_class_by_module.m +0 -0
  23. {hilda-1.3.0 → hilda-1.4.2}/hilda/objective_c/get_objectivec_class_description.m +0 -0
  24. {hilda-1.3.0 → hilda-1.4.2}/hilda/objective_c/get_objectivec_symbol_data.m +0 -0
  25. {hilda-1.3.0 → hilda-1.4.2}/hilda/objective_c/lsof.m +0 -0
  26. {hilda-1.3.0 → hilda-1.4.2}/hilda/objective_c/to_ns_from_json.m +0 -0
  27. {hilda-1.3.0 → hilda-1.4.2}/hilda/objective_c_class.py +0 -0
  28. {hilda-1.3.0 → hilda-1.4.2}/hilda/objective_c_symbol.py +0 -0
  29. {hilda-1.3.0 → hilda-1.4.2}/hilda/registers.py +0 -0
  30. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/__init__.py +0 -0
  31. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/boringssl.py +0 -0
  32. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/collections.py +0 -0
  33. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/dyld.py +0 -0
  34. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/fs_utils.py +0 -0
  35. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/mach/CFRunLoopServiceMachPort_hooks.py +0 -0
  36. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/mach/__init__.py +0 -0
  37. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/macho/__init__.py +0 -0
  38. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/macho/all_image_infos.py +0 -0
  39. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/macho/apple_version.py +0 -0
  40. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/macho/image_info.py +0 -0
  41. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/macho/macho.py +0 -0
  42. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/macho/macho_load_commands.py +0 -0
  43. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/remotepairingd.py +0 -0
  44. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/syslog.py +0 -0
  45. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/uuid.py +0 -0
  46. {hilda-1.3.0 → hilda-1.4.2}/hilda/snippets/xpc.py +0 -0
  47. {hilda-1.3.0 → hilda-1.4.2}/hilda/symbol.py +0 -0
  48. {hilda-1.3.0 → hilda-1.4.2}/hilda/symbols_jar.py +0 -0
  49. {hilda-1.3.0 → hilda-1.4.2}/hilda/ui/colors.json +0 -0
  50. {hilda-1.3.0 → hilda-1.4.2}/hilda/ui/ui_manager.py +0 -0
  51. {hilda-1.3.0 → hilda-1.4.2}/hilda.egg-info/SOURCES.txt +0 -0
  52. {hilda-1.3.0 → hilda-1.4.2}/hilda.egg-info/dependency_links.txt +0 -0
  53. {hilda-1.3.0 → hilda-1.4.2}/hilda.egg-info/entry_points.txt +0 -0
  54. {hilda-1.3.0 → hilda-1.4.2}/hilda.egg-info/requires.txt +0 -0
  55. {hilda-1.3.0 → hilda-1.4.2}/hilda.egg-info/top_level.txt +0 -0
  56. {hilda-1.3.0 → hilda-1.4.2}/pyproject.toml +0 -0
  57. {hilda-1.3.0 → hilda-1.4.2}/requirements.txt +0 -0
  58. {hilda-1.3.0 → hilda-1.4.2}/setup.cfg +0 -0
  59. {hilda-1.3.0 → hilda-1.4.2}/tests/__init__.py +0 -0
  60. {hilda-1.3.0 → hilda-1.4.2}/tests/__main__.py +0 -0
  61. {hilda-1.3.0 → hilda-1.4.2}/tests/conftest.py +0 -0
  62. {hilda-1.3.0 → hilda-1.4.2}/tests/hilda_tests.py +0 -0
  63. {hilda-1.3.0 → hilda-1.4.2}/tests/lldb_entrypoint.py +0 -0
  64. {hilda-1.3.0 → hilda-1.4.2}/tests/test_hilda_client/test_from_ns.py +0 -0
  65. {hilda-1.3.0 → hilda-1.4.2}/tests/test_hilda_client/test_hilda_client.py +0 -0
  66. {hilda-1.3.0 → hilda-1.4.2}/tests/test_hilda_client/test_monitor.py +0 -0
  67. {hilda-1.3.0 → hilda-1.4.2}/tests/test_hilda_client/test_ns.py +0 -0
  68. {hilda-1.3.0 → hilda-1.4.2}/tests/test_hilda_client/test_rebind_symbols.py +0 -0
  69. {hilda-1.3.0 → hilda-1.4.2}/tests/test_hilda_client/test_registers.py +0 -0
  70. {hilda-1.3.0 → hilda-1.4.2}/tests/test_snippets/test_xpc.py +0 -0
  71. {hilda-1.3.0 → hilda-1.4.2}/tests/test_symbols/test_objective_c_class.py +0 -0
  72. {hilda-1.3.0 → hilda-1.4.2}/tests/test_symbols/test_objective_c_symbol.py +0 -0
  73. {hilda-1.3.0 → hilda-1.4.2}/tests/test_symbols/test_symbol.py +0 -0
  74. {hilda-1.3.0 → hilda-1.4.2}/tests/test_symbols/test_symbols_jar.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hilda
3
- Version: 1.3.0
3
+ Version: 1.4.2
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.
@@ -284,6 +284,15 @@ Here is a gist of methods you can access from `p`:
284
284
  - `unwind`
285
285
  - Unwind the stack (useful when get_evaluation_unwind() == False)
286
286
 
287
+ ## Magic functions
288
+
289
+ Sometimes accessing the python API can be tiring, so we added some magic functions to help you out!
290
+
291
+ - `%objc <className>`
292
+ - Equivalent to: `className = p.objc_get_class(className)`
293
+ - `%fbp <filename> <addressInHex>`
294
+ - Equivalent to: `p.file_symbol(addressInHex, filename).bp()`
295
+
287
296
  ## UI Configuration
288
297
 
289
298
  Hilda contains minimal UI for examining the target state.
@@ -507,7 +516,8 @@ NSDictionary = p.objc_get_class('NSDictionary')
507
516
  d = NSDictionary.new()
508
517
 
509
518
  # Or you can use the IPython magic function
510
- %objc NSDictionary
519
+ %objc
520
+ NSDictionary
511
521
  ```
512
522
 
513
523
  This is possible only since `NSDictionary` is exported. In case it is not, you must call `objc_get_class()` explicitly.
@@ -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.2'
16
+ __version_tuple__ = version_tuple = (1, 4, 2)
@@ -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')
@@ -1022,6 +1030,7 @@ class HildaClient:
1022
1030
  """IPython.get_ipython().events.register('pre_run_cell', self._ipython_run_cell_hook)""",
1023
1031
  MAGIC_FUNCTIONS,
1024
1032
  ]
1033
+ config.BaseIPythonApplication.profile = 'hilda'
1025
1034
  namespace = globals()
1026
1035
  namespace.update(locals())
1027
1036
  namespace['p'] = self
@@ -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.2
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.
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