hilda 3.2.0__tar.gz → 3.2.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.2.0 → hilda-3.2.1}/PKG-INFO +1 -1
  2. {hilda-3.2.0 → hilda-3.2.1}/hilda/_version.py +16 -3
  3. {hilda-3.2.0 → hilda-3.2.1}/hilda/breakpoints.py +2 -3
  4. {hilda-3.2.0 → hilda-3.2.1}/hilda/decorators.py +1 -0
  5. {hilda-3.2.0 → hilda-3.2.1}/hilda/hilda_client.py +4 -5
  6. {hilda-3.2.0 → hilda-3.2.1}/hilda/ipython_extensions/events.py +1 -1
  7. {hilda-3.2.0 → hilda-3.2.1}/hilda/objective_c_class.py +1 -1
  8. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/libmalloc.py +9 -9
  9. {hilda-3.2.0 → hilda-3.2.1}/hilda/symbol.py +2 -1
  10. {hilda-3.2.0 → hilda-3.2.1}/hilda/symbols.py +40 -24
  11. {hilda-3.2.0 → hilda-3.2.1}/hilda.egg-info/PKG-INFO +1 -1
  12. {hilda-3.2.0 → hilda-3.2.1}/tests/test_symbols/test_symbol_list.py +1 -7
  13. {hilda-3.2.0 → hilda-3.2.1}/.github/workflows/python-app.yml +0 -0
  14. {hilda-3.2.0 → hilda-3.2.1}/.github/workflows/python-publish.yml +0 -0
  15. {hilda-3.2.0 → hilda-3.2.1}/.gitignore +0 -0
  16. {hilda-3.2.0 → hilda-3.2.1}/.pre-commit-config.yaml +0 -0
  17. {hilda-3.2.0 → hilda-3.2.1}/LICENSE +0 -0
  18. {hilda-3.2.0 → hilda-3.2.1}/README.md +0 -0
  19. {hilda-3.2.0 → hilda-3.2.1}/gifs/.gitattributes +0 -0
  20. {hilda-3.2.0 → hilda-3.2.1}/gifs/ui.png +0 -0
  21. {hilda-3.2.0 → hilda-3.2.1}/gifs/xpc_print_message.gif +0 -0
  22. {hilda-3.2.0 → hilda-3.2.1}/hilda/__init__.py +0 -0
  23. {hilda-3.2.0 → hilda-3.2.1}/hilda/__main__.py +0 -0
  24. {hilda-3.2.0 → hilda-3.2.1}/hilda/cli.py +0 -0
  25. {hilda-3.2.0 → hilda-3.2.1}/hilda/common.py +0 -0
  26. {hilda-3.2.0 → hilda-3.2.1}/hilda/exceptions.py +0 -0
  27. {hilda-3.2.0 → hilda-3.2.1}/hilda/ipython_extensions/keybindings.py +0 -0
  28. {hilda-3.2.0 → hilda-3.2.1}/hilda/ipython_extensions/magics.py +0 -0
  29. {hilda-3.2.0 → hilda-3.2.1}/hilda/launch_lldb.py +0 -0
  30. {hilda-3.2.0 → hilda-3.2.1}/hilda/lldb_entrypoint.py +0 -0
  31. {hilda-3.2.0 → hilda-3.2.1}/hilda/lldb_importer.py +0 -0
  32. {hilda-3.2.0 → hilda-3.2.1}/hilda/objective_c/from_ns_to_json.m +0 -0
  33. {hilda-3.2.0 → hilda-3.2.1}/hilda/objective_c/get_objectivec_class_by_module.m +0 -0
  34. {hilda-3.2.0 → hilda-3.2.1}/hilda/objective_c/get_objectivec_class_description.m +0 -0
  35. {hilda-3.2.0 → hilda-3.2.1}/hilda/objective_c/get_objectivec_symbol_data.m +0 -0
  36. {hilda-3.2.0 → hilda-3.2.1}/hilda/objective_c/lsof.m +0 -0
  37. {hilda-3.2.0 → hilda-3.2.1}/hilda/objective_c/to_ns_from_json.m +0 -0
  38. {hilda-3.2.0 → hilda-3.2.1}/hilda/objective_c_symbol.py +0 -0
  39. {hilda-3.2.0 → hilda-3.2.1}/hilda/registers.py +0 -0
  40. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/__init__.py +0 -0
  41. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/boringssl.py +0 -0
  42. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/collections.py +0 -0
  43. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/dyld.py +0 -0
  44. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/fs_utils.py +0 -0
  45. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/mach/CFRunLoopServiceMachPort_hooks.py +0 -0
  46. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/mach/__init__.py +0 -0
  47. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/macho/__init__.py +0 -0
  48. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/macho/all_image_infos.py +0 -0
  49. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/macho/apple_version.py +0 -0
  50. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/macho/image_info.py +0 -0
  51. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/macho/macho.py +0 -0
  52. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/macho/macho_load_commands.py +0 -0
  53. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/remotepairingd.py +0 -0
  54. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/syslog.py +0 -0
  55. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/uuid.py +0 -0
  56. {hilda-3.2.0 → hilda-3.2.1}/hilda/snippets/xpc.py +0 -0
  57. {hilda-3.2.0 → hilda-3.2.1}/hilda/ui/colors.json +0 -0
  58. {hilda-3.2.0 → hilda-3.2.1}/hilda/ui/ui_manager.py +0 -0
  59. {hilda-3.2.0 → hilda-3.2.1}/hilda/ui/views.py +0 -0
  60. {hilda-3.2.0 → hilda-3.2.1}/hilda/watchpoints.py +0 -0
  61. {hilda-3.2.0 → hilda-3.2.1}/hilda.egg-info/SOURCES.txt +0 -0
  62. {hilda-3.2.0 → hilda-3.2.1}/hilda.egg-info/dependency_links.txt +0 -0
  63. {hilda-3.2.0 → hilda-3.2.1}/hilda.egg-info/entry_points.txt +0 -0
  64. {hilda-3.2.0 → hilda-3.2.1}/hilda.egg-info/requires.txt +0 -0
  65. {hilda-3.2.0 → hilda-3.2.1}/hilda.egg-info/top_level.txt +0 -0
  66. {hilda-3.2.0 → hilda-3.2.1}/pyproject.toml +0 -0
  67. {hilda-3.2.0 → hilda-3.2.1}/requirements.txt +0 -0
  68. {hilda-3.2.0 → hilda-3.2.1}/setup.cfg +0 -0
  69. {hilda-3.2.0 → hilda-3.2.1}/tests/__init__.py +0 -0
  70. {hilda-3.2.0 → hilda-3.2.1}/tests/conftest.py +0 -0
  71. {hilda-3.2.0 → hilda-3.2.1}/tests/test_hilda_client/test_from_ns.py +0 -0
  72. {hilda-3.2.0 → hilda-3.2.1}/tests/test_hilda_client/test_hilda_client.py +0 -0
  73. {hilda-3.2.0 → hilda-3.2.1}/tests/test_hilda_client/test_monitor.py +0 -0
  74. {hilda-3.2.0 → hilda-3.2.1}/tests/test_hilda_client/test_ns.py +0 -0
  75. {hilda-3.2.0 → hilda-3.2.1}/tests/test_hilda_client/test_registers.py +0 -0
  76. {hilda-3.2.0 → hilda-3.2.1}/tests/test_snippets/test_xpc.py +0 -0
  77. {hilda-3.2.0 → hilda-3.2.1}/tests/test_symbols/test_objective_c_class.py +0 -0
  78. {hilda-3.2.0 → hilda-3.2.1}/tests/test_symbols/test_objective_c_symbol.py +0 -0
  79. {hilda-3.2.0 → hilda-3.2.1}/tests/test_symbols/test_symbol.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hilda
3
- Version: 3.2.0
3
+ Version: 3.2.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>
@@ -1,7 +1,14 @@
1
1
  # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
3
 
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
5
12
 
6
13
  TYPE_CHECKING = False
7
14
  if TYPE_CHECKING:
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
9
16
  from typing import Union
10
17
 
11
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
12
20
  else:
13
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
14
23
 
15
24
  version: str
16
25
  __version__: str
17
26
  __version_tuple__: VERSION_TUPLE
18
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
19
30
 
20
- __version__ = version = '3.2.0'
21
- __version_tuple__ = version_tuple = (3, 2, 0)
31
+ __version__ = version = '3.2.1'
32
+ __version_tuple__ = version_tuple = (3, 2, 1)
33
+
34
+ __commit_id__ = commit_id = 'g44204a25f'
@@ -157,7 +157,7 @@ class HildaBreakpoint:
157
157
  # A single breakpoint may be related to several locations (addresses)
158
158
  locations = self.locations
159
159
  if len(locations) == 0:
160
- result += f'\tNo locations\n'
160
+ result += '\tNo locations\n'
161
161
  for location in self.locations:
162
162
  result += f'\tLocation {location}\n'
163
163
 
@@ -363,14 +363,13 @@ class BreakpointList:
363
363
  :param frame: LLDB frame
364
364
  :param bp_loc: LLDB breakpoint location
365
365
  """
366
- nonlocal regs, expr, retval, stop, bt, cmd, force_return, name
366
+ nonlocal name
367
367
  bp = bp_loc.GetBreakpoint()
368
368
  symbol = hilda.symbol(hilda.frame.addr.GetLoadAddress(hilda.target))
369
369
  thread = hilda.thread
370
370
  printed_name = name if name is not None else str(symbol.lldb_address)
371
371
 
372
372
  def format_value(fmt: Union[str, Callable], value: Symbol) -> str:
373
- nonlocal hilda
374
373
  if callable(fmt):
375
374
  return fmt(hilda, value)
376
375
  formatters = {
@@ -1,5 +1,6 @@
1
1
  from hilda.breakpoints import WhereType
2
2
  from hilda.lldb_importer import lldb
3
+
3
4
  p = lldb.hilda_client
4
5
 
5
6
 
@@ -10,7 +10,7 @@ import sys
10
10
  import time
11
11
  import typing
12
12
  from collections import namedtuple
13
- from contextlib import contextmanager, suppress
13
+ from contextlib import contextmanager
14
14
  from dataclasses import dataclass, field
15
15
  from datetime import datetime, timezone
16
16
  from functools import cached_property, wraps
@@ -30,10 +30,9 @@ from traitlets.config import Config
30
30
  from hilda import objective_c_class
31
31
  from hilda.breakpoints import BreakpointList, HildaBreakpoint, WhereType
32
32
  from hilda.common import CfSerializable, selection_prompt
33
- from hilda.exceptions import AccessingMemoryError, AccessingRegisterError, AddingLldbSymbolError, \
34
- ConvertingFromNSObjectError, ConvertingToNsObjectError, CreatingObjectiveCSymbolError, \
35
- DisableJetsamMemoryChecksError, EvaluatingExpressionError, HildaException, InvalidThreadIndexError, \
36
- SymbolAbsentError
33
+ from hilda.exceptions import AccessingMemoryError, AccessingRegisterError, ConvertingFromNSObjectError, \
34
+ ConvertingToNsObjectError, CreatingObjectiveCSymbolError, DisableJetsamMemoryChecksError, \
35
+ EvaluatingExpressionError, HildaException, InvalidThreadIndexError, SymbolAbsentError
37
36
  from hilda.ipython_extensions.keybindings import get_keybindings
38
37
  from hilda.lldb_importer import lldb
39
38
  from hilda.objective_c_symbol import ObjectiveCSymbol
@@ -3,7 +3,7 @@ import builtins
3
3
 
4
4
  from IPython.terminal.interactiveshell import TerminalInteractiveShell
5
5
 
6
- from hilda.exceptions import EvaluatingExpressionError, SymbolAbsentError
6
+ from hilda.exceptions import EvaluatingExpressionError
7
7
  from hilda.hilda_client import HildaClient
8
8
  from hilda.lldb_importer import lldb
9
9
 
@@ -3,7 +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 typing import Any, Iterator, Optional
6
+ from typing import Any, Optional
7
7
 
8
8
  from objc_types_decoder.decode import decode as decode_type
9
9
  from objc_types_decoder.decode import decode_with_tail
@@ -93,15 +93,15 @@ class NanoV2Arena:
93
93
  def __init__(self, arena_base_addr):
94
94
  self.nanov2_arena_struct = Struct(
95
95
  # Note that this only parses 1 CPU memblock (1MB). Modify it to be 64.
96
- *[\
97
- f"blocks_{idx}" / Array(self.blocks_per_size[idx], \
98
- Struct('content' / \
99
- Array(self.slots_per_size[idx], \
100
- Struct('Q' / Bytes(self.size_per_slot[idx]) \
101
- )\
102
- )\
103
- ))\
104
- for idx in range(len(self.blocks_per_size))\
96
+ *[
97
+ f"blocks_{idx}" / Array(self.blocks_per_size[idx],
98
+ Struct('content' /
99
+ Array(self.slots_per_size[idx],
100
+ Struct('Q' / Bytes(self.size_per_slot[idx])
101
+ )
102
+ )
103
+ ))
104
+ for idx in range(len(self.blocks_per_size))
105
105
  ]
106
106
  )
107
107
  self.arena_struct = self.nanov2_arena_struct.parse_stream(arena_base_addr)
@@ -49,7 +49,8 @@ class Symbol(int):
49
49
  'disass', 'po', 'objc_call']
50
50
 
51
51
  @classmethod
52
- def create(cls, value: int, client, lldb_symbol: Optional[lldb.SBSymbol] = None, lldb_address: Optional[lldb.SBAddress] = None, lldb_type: Optional[int] = None) -> None:
52
+ def create(cls, value: int, client, lldb_symbol: Optional[lldb.SBSymbol] = None,
53
+ lldb_address: Optional[lldb.SBAddress] = None, lldb_type: Optional[int] = None) -> None:
53
54
  """
54
55
  Create a Symbol object.
55
56
  :param value: Symbol address.
@@ -1,10 +1,11 @@
1
- import shlex
2
1
  import json
3
2
  import re
3
+ import shlex
4
4
  from itertools import chain
5
- from tqdm import tqdm
6
5
  from tempfile import NamedTemporaryFile
7
- from typing import Tuple, Optional, Union, Iterator
6
+ from typing import Iterator, Optional, Tuple, Union
7
+
8
+ from tqdm import tqdm
8
9
 
9
10
  from hilda.exceptions import SymbolAbsentError
10
11
  from hilda.lldb_importer import lldb
@@ -47,10 +48,12 @@ class SymbolList:
47
48
  def __len__(self) -> int:
48
49
  return sum(1 for _ in self)
49
50
 
50
- def __contains__(self, address_or_name_or_id_or_symbol: Union[int, str, HildaSymbolId, lldb.SBSymbol, Symbol]) -> bool:
51
+ def __contains__(self,
52
+ address_or_name_or_id_or_symbol: Union[int, str, HildaSymbolId, lldb.SBSymbol, Symbol]) -> bool:
51
53
  return self.get(address_or_name_or_id_or_symbol) is not None
52
54
 
53
- def __getitem__(self, address_or_name_or_id_or_symbol: Union[int, str, HildaSymbolId, lldb.SBSymbol, Symbol]) -> Symbol:
55
+ def __getitem__(self,
56
+ address_or_name_or_id_or_symbol: Union[int, str, HildaSymbolId, lldb.SBSymbol, Symbol]) -> Symbol:
54
57
  """
55
58
  Get a symbol by address or name or ID (or the symbol itself, though it usually makes little sense)
56
59
 
@@ -62,7 +65,8 @@ class SymbolList:
62
65
  # raise KeyError(address_or_name_or_id_or_symbol)
63
66
  return symbol
64
67
 
65
- def __delitem__(self, address_or_name_or_id_or_symbol: Union[int, str, HildaSymbolId, lldb.SBSymbol, Symbol]) -> None:
68
+ def __delitem__(self,
69
+ address_or_name_or_id_or_symbol: Union[int, str, HildaSymbolId, lldb.SBSymbol, Symbol]) -> None:
66
70
  """
67
71
  Remove a symbol (unless this is the global symbol list - see remove())
68
72
 
@@ -79,7 +83,8 @@ class SymbolList:
79
83
  def __str__(self) -> str:
80
84
  return repr(self)
81
85
 
82
- def get(self, address_or_name_or_id_or_symbol: Union[int, str, HildaSymbolId, lldb.SBSymbol, Symbol]) -> Optional[Symbol]:
86
+ def get(self, address_or_name_or_id_or_symbol: Union[int, str, HildaSymbolId, lldb.SBSymbol, Symbol]) \
87
+ -> Optional[Symbol]:
83
88
  """
84
89
  Get a symbol by address or name or ID (or the symbol itself, though it usually makes little sense)
85
90
 
@@ -146,7 +151,8 @@ class SymbolList:
146
151
  else:
147
152
  self._symbols_by_name[name] = [sym_id]
148
153
 
149
- def add(self, value: Union[int, Symbol], symbol_name: Optional[str] = None, symbol_type: Optional[str] = None, symbol_size: Optional[int] = None) -> Symbol:
154
+ def add(self, value: Union[int, Symbol], symbol_name: Optional[str] = None, symbol_type: Optional[str] = None,
155
+ symbol_size: Optional[int] = None) -> Symbol:
150
156
  """
151
157
  Add a symbol.
152
158
  Returns existing symbol if a matching regular (i.e., non-anonymous) symbol exists.
@@ -158,8 +164,12 @@ class SymbolList:
158
164
  :return: The symbol
159
165
  """
160
166
  # Check if we already created the symbol
161
- if isinstance(value, Symbol) and (symbol_type, symbol_size) == (None, None) and value.lldb_symbol is not None and (
162
- symbol_name is None or symbol_name == value.lldb_name): # TODO: Is it an error to add again, providing the same name?
167
+ if (isinstance(value, Symbol) and
168
+ (symbol_type, symbol_size) == (None, None) and
169
+ value.lldb_symbol is not None and
170
+
171
+ # TODO: Is it an error to add again, providing the same name?
172
+ (symbol_name is None or symbol_name == value.lldb_name)):
163
173
  self._add(value.id, value)
164
174
  return value
165
175
 
@@ -179,7 +189,8 @@ class SymbolList:
179
189
 
180
190
  # Check if we can get a global symbol
181
191
  symbol_address = value
182
- global_symbol = self._global.get(symbol_address) if symbol_name is None else self._global.get((symbol_name, symbol_address))
192
+ global_symbol = self._global.get(symbol_address) if symbol_name is None else (
193
+ self._global.get((symbol_name, symbol_address)))
183
194
  if global_symbol is not None:
184
195
  if (symbol_type, symbol_size) != (None, None):
185
196
  raise ValueError()
@@ -204,7 +215,7 @@ class SymbolList:
204
215
  if name is not None and re.match(r'^[a-zA-Z0-9_]+$', name):
205
216
  ids = self._symbols_by_name[name]
206
217
  if len(ids) == 1:
207
- del ids[sym_id]
218
+ ids.remove(sym_id)
208
219
  else:
209
220
  del self._symbols_by_name[name]
210
221
 
@@ -253,7 +264,7 @@ class SymbolList:
253
264
  return self.add(address)
254
265
  value = self.get(attribute_name)
255
266
  if value is None:
256
- raise AttributeError(f"SymbolList object has no attribute '{attribute_name}'")
267
+ raise SymbolAbsentError(f"SymbolList object has no attribute '{attribute_name}'")
257
268
  return value
258
269
 
259
270
  def __dir__(self):
@@ -262,7 +273,8 @@ class SymbolList:
262
273
  # Return normal attributes and symbol names
263
274
  return chain(super().__dir__(), self._symbols_by_name.keys())
264
275
 
265
- def _get_lldb_symbol_from_name(self, name: str, address: Optional[int] = None) -> Optional[Tuple[lldb.SBSymbol, lldb.SBAddress, str, int, int]]:
276
+ def _get_lldb_symbol_from_name(self, name: str, address: Optional[int] = None) \
277
+ -> Optional[Tuple[lldb.SBSymbol, lldb.SBAddress, str, int, int]]:
266
278
  lldb_symbol_context_list = list(self._hilda.target.FindSymbols(name))
267
279
 
268
280
  for lldb_symbol_context in list(lldb_symbol_context_list):
@@ -273,10 +285,12 @@ class SymbolList:
273
285
 
274
286
  if address is not None:
275
287
  for lldb_symbol_context in list(lldb_symbol_context_list):
276
- lldb_symbol_context_address = lldb_symbol_context.symbol.GetStartAddress().GetLoadAddress(self._hilda.target)
288
+ lldb_symbol_context_address = lldb_symbol_context.symbol.GetStartAddress().GetLoadAddress(
289
+ self._hilda.target)
277
290
  if lldb_symbol_context_address != address:
278
291
  lldb_symbol_context_list.remove(lldb_symbol_context)
279
- self._hilda.log_debug(f'Ignoring symbol {name}@0x{lldb_symbol_context_address:016X} (beacause address is not 0x{address:016X})')
292
+ self._hilda.log_debug(f'Ignoring symbol {name}@0x{lldb_symbol_context_address:016X} '
293
+ f'(beacause address is not 0x{address:016X})')
280
294
 
281
295
  symbols = []
282
296
  for lldb_symbol_context in lldb_symbol_context_list:
@@ -302,7 +316,8 @@ class SymbolList:
302
316
 
303
317
  return symbols[0]
304
318
 
305
- def _get_lldb_symbol(self, value: Union[int, str, HildaSymbolId, Symbol, lldb.SBAddress, lldb.SBSymbol]) -> Optional[Tuple[lldb.SBSymbol, lldb.SBAddress, str, int, int]]:
319
+ def _get_lldb_symbol(self, value: Union[int, str, HildaSymbolId, Symbol, lldb.SBAddress, lldb.SBSymbol]) \
320
+ -> Optional[Tuple[lldb.SBSymbol, lldb.SBAddress, str, int, int]]:
306
321
  if isinstance(value, Symbol):
307
322
  symbol = value
308
323
  return self._get_lldb_symbol(symbol.id)
@@ -328,7 +343,8 @@ class SymbolList:
328
343
  return self._get_lldb_symbol_from_name(name)
329
344
  elif isinstance(value, lldb.SBAddress):
330
345
  lldb_address = value
331
- lldb_symbol_context = self._hilda.target.ResolveSymbolContextForAddress(lldb_address, lldb.eSymbolContextEverything)
346
+ lldb_symbol_context = self._hilda.target.ResolveSymbolContextForAddress(lldb_address,
347
+ lldb.eSymbolContextEverything)
332
348
  lldb_symbol = lldb_symbol_context.symbol
333
349
 
334
350
  address = lldb_address.GetLoadAddress(self._hilda.target)
@@ -353,11 +369,10 @@ class SymbolList:
353
369
 
354
370
  # Ignore symbols not having a useful type
355
371
  symbol_type = lldb_symbol.GetType()
356
- if symbol_type not in (
357
- lldb.eSymbolTypeCode,
358
- lldb.eSymbolTypeRuntime,
359
- lldb.eSymbolTypeData,
360
- lldb.eSymbolTypeObjCMetaClass):
372
+ if symbol_type not in (lldb.eSymbolTypeCode,
373
+ lldb.eSymbolTypeRuntime,
374
+ lldb.eSymbolTypeData,
375
+ lldb.eSymbolTypeObjCMetaClass):
361
376
  return None
362
377
 
363
378
  return (lldb_symbol, lldb_address, symbol_name, symbol_address, symbol_type)
@@ -391,7 +406,8 @@ class SymbolList:
391
406
  f'Failed to add symbol {symbol_name} to {lldb_module.file}'
392
407
  f' (symbol already exists {symbols_before})')
393
408
 
394
- result = self._hilda.lldb_handle_command(f'target symbols add {shlex.quote(symbols_file.name)}', capture_output=True)
409
+ result = self._hilda.lldb_handle_command(f'target symbols add {shlex.quote(symbols_file.name)}',
410
+ capture_output=True)
395
411
 
396
412
  # Verify command executed as expected
397
413
  if result is None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hilda
3
- Version: 3.2.0
3
+ Version: 3.2.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>
@@ -21,12 +21,6 @@ def test_iter(hilda_client):
21
21
  i += 1
22
22
 
23
23
 
24
- def test_inner_symbol_cache(hilda_client):
25
- l = list(hilda_client.symbols)
26
- names = set(symbol.id[0] for symbol in l if symbol.id[0] is not None)
27
- assert names == set(hilda_client.symbols._symbols_by_name.keys())
28
-
29
-
30
24
  def test_getitem(hilda_client):
31
25
  isdigit = hilda_client.symbols['isdigit']
32
26
  assert not isdigit(0x10)
@@ -45,7 +39,7 @@ def test_delitem(hilda_client):
45
39
  try:
46
40
  del symbols[isdigit]
47
41
  assert False
48
- except:
42
+ except: # noqa: E722
49
43
  pass
50
44
 
51
45
  assert 'isdigit' in hilda_client.symbols
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