ida-domain 0.3.5.dev1__tar.gz → 0.3.6.dev1__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.
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/PKG-INFO +1 -1
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/__init__.py +1 -1
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/functions.py +13 -9
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain.egg-info/PKG-INFO +1 -1
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/pyproject.toml +1 -1
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/LICENSE +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/README.md +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/base.py +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/bytes.py +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/comments.py +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/database.py +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/entries.py +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/flowchart.py +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/heads.py +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/hooks.py +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/instructions.py +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/names.py +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/operands.py +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/segments.py +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/signature_files.py +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/strings.py +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/types.py +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain/xrefs.py +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain.egg-info/SOURCES.txt +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain.egg-info/dependency_links.txt +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain.egg-info/requires.txt +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/ida_domain.egg-info/top_level.txt +0 -0
- {ida_domain-0.3.5.dev1 → ida_domain-0.3.6.dev1}/setup.cfg +0 -0
|
@@ -186,11 +186,14 @@ class FunctionChunk:
|
|
|
186
186
|
"""True if is the function main chunk"""
|
|
187
187
|
|
|
188
188
|
|
|
189
|
-
class _LVarRefsVisitor(ida_hexrays.
|
|
190
|
-
"""Visitor to find references to a specific local variable in pseudocode.
|
|
189
|
+
class _LVarRefsVisitor(ida_hexrays.ctree_parentee_t):
|
|
190
|
+
"""Visitor to find references to a specific local variable in pseudocode.
|
|
191
|
+
|
|
192
|
+
Uses ctree_parentee_t which properly maintains parent information.
|
|
193
|
+
"""
|
|
191
194
|
|
|
192
195
|
def __init__(self, cfunc: Any, lvar_index: int):
|
|
193
|
-
super().__init__(
|
|
196
|
+
super().__init__()
|
|
194
197
|
self.cfunc = cfunc
|
|
195
198
|
self.lvar_index = lvar_index
|
|
196
199
|
self.refs: List[LocalVariableReference] = []
|
|
@@ -201,8 +204,11 @@ class _LVarRefsVisitor(ida_hexrays.ctree_visitor_t):
|
|
|
201
204
|
# Found any variable - check if it's our target
|
|
202
205
|
if expr.v.idx == self.lvar_index:
|
|
203
206
|
# Found a reference to our variable
|
|
204
|
-
|
|
205
|
-
|
|
207
|
+
# Use parent_expr() to get the parent expression
|
|
208
|
+
parent = self.parent_expr()
|
|
209
|
+
|
|
210
|
+
access_type = self._determine_access_type(expr, parent)
|
|
211
|
+
context = self._determine_context(expr, parent)
|
|
206
212
|
ea = expr.ea if expr.ea != BADADDR else None
|
|
207
213
|
|
|
208
214
|
# Extract line information
|
|
@@ -231,9 +237,8 @@ class _LVarRefsVisitor(ida_hexrays.ctree_visitor_t):
|
|
|
231
237
|
self.refs.append(ref)
|
|
232
238
|
return 0
|
|
233
239
|
|
|
234
|
-
def _determine_access_type(self, expr: Any) -> LocalVariableAccessType:
|
|
240
|
+
def _determine_access_type(self, expr: Any, parent: Any) -> LocalVariableAccessType:
|
|
235
241
|
"""Determine how the variable is being accessed."""
|
|
236
|
-
parent = expr.cexpr
|
|
237
242
|
if not parent:
|
|
238
243
|
return LocalVariableAccessType.READ
|
|
239
244
|
|
|
@@ -261,9 +266,8 @@ class _LVarRefsVisitor(ida_hexrays.ctree_visitor_t):
|
|
|
261
266
|
|
|
262
267
|
return LocalVariableAccessType.READ
|
|
263
268
|
|
|
264
|
-
def _determine_context(self, expr: Any) -> LocalVariableContext:
|
|
269
|
+
def _determine_context(self, expr: Any, parent: Any) -> LocalVariableContext:
|
|
265
270
|
"""Determine the context where the variable is used."""
|
|
266
|
-
parent = expr.cexpr
|
|
267
271
|
if not parent:
|
|
268
272
|
return LocalVariableContext.OTHER
|
|
269
273
|
|
|
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
|