-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue with deep site-sensitive calls
- Loading branch information
Showing
13 changed files
with
132 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TODO: Add support for filtering based on variable name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TODO: Add support for filtering based on variable name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from dynapyt.analyses.BaseAnalysis import BaseAnalysis | ||
from dynapyt.instrument.filters import only | ||
|
||
|
||
class TestAnalysis(BaseAnalysis): | ||
@only(patterns=["foo"]) | ||
def post_call(self, dyn_ast: str, iid: int, result, call, pos_args, kw_args): | ||
print(f"post call of {call}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<class 'filters.super.program.X'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class X: | ||
def __getattribute__(self, name: str): | ||
res = super().__getattribute__(name) | ||
return res | ||
|
||
|
||
x = X() | ||
print(x.__class__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from dynapyt.analyses.BaseAnalysis import BaseAnalysis | ||
|
||
|
||
class TestAnalysis(BaseAnalysis): | ||
def begin_execution(self) -> None: | ||
print("begin execution") | ||
|
||
def pre_call(self, dyn_ast: str, iid: int, function, pos_args, kw_args) -> None: | ||
print(f"pre call of {function.__name__}") | ||
|
||
def binary_operation(self, dyn_ast, iid, op, left, right, result): | ||
print(f"binary operation {left} {op} {right} = {result}") | ||
|
||
def end_execution(self) -> None: | ||
print("end execution") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
begin execution | ||
pre call of B | ||
pre call of __init__ | ||
pre call of f | ||
pre call of f | ||
binary operation 1 Add 2 = 3 | ||
pre call of len | ||
pre call of len | ||
binary operation 14 Add 14 = 28 | ||
end execution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
class A: | ||
def __init__(self): | ||
self.a = 1 | ||
|
||
def f(self): | ||
return self.a | ||
|
||
|
||
class B(A): | ||
def __init__(self): | ||
super().__init__() | ||
self.b = 2 | ||
|
||
def f(self): | ||
return super().f() + self.b | ||
|
||
|
||
b = B() | ||
b.f() | ||
|
||
c = len(locals()) + len(globals()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,2 @@ | ||
pree call of deferred_error | ||
pree call of ValueError | ||
pree call of new | ||
pree call of DeferredError | ||
pree call of print | ||
OK | ||
# Exception: Some error text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters