repo stringlengths 7 54 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1
value | code stringlengths 75 104k | code_tokens listlengths 20 28.4k | docstring stringlengths 1 46.3k | docstring_tokens listlengths 1 1.66k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1
value | summary stringlengths 4 350 | obf_code stringlengths 7.85k 764k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
angr/angr | angr/analyses/identifier/identify.py | Identifier._make_regs_symbolic | def _make_regs_symbolic(input_state, reg_list, project):
"""
converts an input state into a state with symbolic registers
:return: the symbolic state
"""
state = input_state.copy()
# overwrite all registers
for reg in reg_list:
state.registers.store(re... | python | def _make_regs_symbolic(input_state, reg_list, project):
"""
converts an input state into a state with symbolic registers
:return: the symbolic state
"""
state = input_state.copy()
# overwrite all registers
for reg in reg_list:
state.registers.store(re... | [
"def",
"_make_regs_symbolic",
"(",
"input_state",
",",
"reg_list",
",",
"project",
")",
":",
"state",
"=",
"input_state",
".",
"copy",
"(",
")",
"# overwrite all registers",
"for",
"reg",
"in",
"reg_list",
":",
"state",
".",
"registers",
".",
"store",
"(",
"... | converts an input state into a state with symbolic registers
:return: the symbolic state | [
"converts",
"an",
"input",
"state",
"into",
"a",
"state",
"with",
"symbolic",
"registers",
":",
"return",
":",
"the",
"symbolic",
"state"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/identifier/identify.py#L431-L444 | train | converts an input state into a state with symbolic registers
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/identifier/identify.py | Identifier.make_initial_state | def make_initial_state(project, stack_length):
"""
:return: an initial state with a symbolic stack and good options for rop
"""
initial_state = project.factory.blank_state(
add_options={options.AVOID_MULTIVALUED_READS, options.AVOID_MULTIVALUED_WRITES,
... | python | def make_initial_state(project, stack_length):
"""
:return: an initial state with a symbolic stack and good options for rop
"""
initial_state = project.factory.blank_state(
add_options={options.AVOID_MULTIVALUED_READS, options.AVOID_MULTIVALUED_WRITES,
... | [
"def",
"make_initial_state",
"(",
"project",
",",
"stack_length",
")",
":",
"initial_state",
"=",
"project",
".",
"factory",
".",
"blank_state",
"(",
"add_options",
"=",
"{",
"options",
".",
"AVOID_MULTIVALUED_READS",
",",
"options",
".",
"AVOID_MULTIVALUED_WRITES",... | :return: an initial state with a symbolic stack and good options for rop | [
":",
"return",
":",
"an",
"initial",
"state",
"with",
"a",
"symbolic",
"stack",
"and",
"good",
"options",
"for",
"rop"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/identifier/identify.py#L795-L812 | train | Creates an initial state with a symbolic stack and good options for rop
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/identifier/identify.py | Identifier.make_symbolic_state | def make_symbolic_state(project, reg_list, stack_length=80):
"""
converts an input state into a state with symbolic registers
:return: the symbolic state
"""
input_state = Identifier.make_initial_state(project, stack_length)
symbolic_state = input_state.copy()
# o... | python | def make_symbolic_state(project, reg_list, stack_length=80):
"""
converts an input state into a state with symbolic registers
:return: the symbolic state
"""
input_state = Identifier.make_initial_state(project, stack_length)
symbolic_state = input_state.copy()
# o... | [
"def",
"make_symbolic_state",
"(",
"project",
",",
"reg_list",
",",
"stack_length",
"=",
"80",
")",
":",
"input_state",
"=",
"Identifier",
".",
"make_initial_state",
"(",
"project",
",",
"stack_length",
")",
"symbolic_state",
"=",
"input_state",
".",
"copy",
"("... | converts an input state into a state with symbolic registers
:return: the symbolic state | [
"converts",
"an",
"input",
"state",
"into",
"a",
"state",
"with",
"symbolic",
"registers",
":",
"return",
":",
"the",
"symbolic",
"state"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/identifier/identify.py#L815-L829 | train | Converts an input state into a state with symbolic registers
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/congruency_check.py | CongruencyCheck.set_state_options | def set_state_options(self, left_add_options=None, left_remove_options=None, right_add_options=None, right_remove_options=None):
"""
Checks that the specified state options result in the same states over the next `depth` states.
"""
s_right = self.project.factory.full_init_state(
... | python | def set_state_options(self, left_add_options=None, left_remove_options=None, right_add_options=None, right_remove_options=None):
"""
Checks that the specified state options result in the same states over the next `depth` states.
"""
s_right = self.project.factory.full_init_state(
... | [
"def",
"set_state_options",
"(",
"self",
",",
"left_add_options",
"=",
"None",
",",
"left_remove_options",
"=",
"None",
",",
"right_add_options",
"=",
"None",
",",
"right_remove_options",
"=",
"None",
")",
":",
"s_right",
"=",
"self",
".",
"project",
".",
"fac... | Checks that the specified state options result in the same states over the next `depth` states. | [
"Checks",
"that",
"the",
"specified",
"state",
"options",
"result",
"in",
"the",
"same",
"states",
"over",
"the",
"next",
"depth",
"states",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/congruency_check.py#L26-L39 | train | Sets the state options of the current state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/congruency_check.py | CongruencyCheck.set_states | def set_states(self, left_state, right_state):
"""
Checks that the specified paths stay the same over the next `depth` states.
"""
simgr = self.project.factory.simulation_manager(right_state)
simgr.stash(to_stash='right')
simgr.active.append(left_state)
simgr.sta... | python | def set_states(self, left_state, right_state):
"""
Checks that the specified paths stay the same over the next `depth` states.
"""
simgr = self.project.factory.simulation_manager(right_state)
simgr.stash(to_stash='right')
simgr.active.append(left_state)
simgr.sta... | [
"def",
"set_states",
"(",
"self",
",",
"left_state",
",",
"right_state",
")",
":",
"simgr",
"=",
"self",
".",
"project",
".",
"factory",
".",
"simulation_manager",
"(",
"right_state",
")",
"simgr",
".",
"stash",
"(",
"to_stash",
"=",
"'right'",
")",
"simgr... | Checks that the specified paths stay the same over the next `depth` states. | [
"Checks",
"that",
"the",
"specified",
"paths",
"stay",
"the",
"same",
"over",
"the",
"next",
"depth",
"states",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/congruency_check.py#L41-L53 | train | Sets the states of the current tree to the given states. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/congruency_check.py | CongruencyCheck._validate_incongruency | def _validate_incongruency(self):
"""
Checks that a detected incongruency is not caused by translation backends having a different
idea of what constitutes a basic block.
"""
ot = self._throw
try:
self._throw = False
l.debug("Validating incongrue... | python | def _validate_incongruency(self):
"""
Checks that a detected incongruency is not caused by translation backends having a different
idea of what constitutes a basic block.
"""
ot = self._throw
try:
self._throw = False
l.debug("Validating incongrue... | [
"def",
"_validate_incongruency",
"(",
"self",
")",
":",
"ot",
"=",
"self",
".",
"_throw",
"try",
":",
"self",
".",
"_throw",
"=",
"False",
"l",
".",
"debug",
"(",
"\"Validating incongruency.\"",
")",
"if",
"(",
"\"UNICORN\"",
"in",
"self",
".",
"simgr",
... | Checks that a detected incongruency is not caused by translation backends having a different
idea of what constitutes a basic block. | [
"Checks",
"that",
"a",
"detected",
"incongruency",
"is",
"not",
"caused",
"by",
"translation",
"backends",
"having",
"a",
"different",
"idea",
"of",
"what",
"constitutes",
"a",
"basic",
"block",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/congruency_check.py#L102-L179 | train | Validate that a detected incongruency is not caused by translation backends having a different incongruency. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/congruency_check.py | CongruencyCheck.run | def run(self, depth=None):
"""
Checks that the paths in the specified path group stay the same over the next
`depth` bytes.
The path group should have a "left" and a "right" stash, each with a single
path.
"""
#pg_history = [ ]
if len(self.simgr.right) !=... | python | def run(self, depth=None):
"""
Checks that the paths in the specified path group stay the same over the next
`depth` bytes.
The path group should have a "left" and a "right" stash, each with a single
path.
"""
#pg_history = [ ]
if len(self.simgr.right) !=... | [
"def",
"run",
"(",
"self",
",",
"depth",
"=",
"None",
")",
":",
"#pg_history = [ ]",
"if",
"len",
"(",
"self",
".",
"simgr",
".",
"right",
")",
"!=",
"1",
"or",
"len",
"(",
"self",
".",
"simgr",
".",
"left",
")",
"!=",
"1",
":",
"self",
".",
"_... | Checks that the paths in the specified path group stay the same over the next
`depth` bytes.
The path group should have a "left" and a "right" stash, each with a single
path. | [
"Checks",
"that",
"the",
"paths",
"in",
"the",
"specified",
"path",
"group",
"stay",
"the",
"same",
"over",
"the",
"next",
"depth",
"bytes",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/congruency_check.py#L186-L259 | train | This method checks that the paths in the specified path group are the same over the next next. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/congruency_check.py | CongruencyCheck.compare_states | def compare_states(self, sl, sr):
"""
Compares two states for similarity.
"""
joint_solver = claripy.Solver()
# make sure the canonicalized constraints are the same
n_map, n_counter, n_canon_constraint = claripy.And(*sr.solver.constraints).canonicalize() #pylint:disable=... | python | def compare_states(self, sl, sr):
"""
Compares two states for similarity.
"""
joint_solver = claripy.Solver()
# make sure the canonicalized constraints are the same
n_map, n_counter, n_canon_constraint = claripy.And(*sr.solver.constraints).canonicalize() #pylint:disable=... | [
"def",
"compare_states",
"(",
"self",
",",
"sl",
",",
"sr",
")",
":",
"joint_solver",
"=",
"claripy",
".",
"Solver",
"(",
")",
"# make sure the canonicalized constraints are the same",
"n_map",
",",
"n_counter",
",",
"n_canon_constraint",
"=",
"claripy",
".",
"And... | Compares two states for similarity. | [
"Compares",
"two",
"states",
"for",
"similarity",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/congruency_check.py#L281-L342 | train | Compares two states for similarity. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/inspect.py | BP.check | def check(self, state, when):
"""
Checks state `state` to see if the breakpoint should fire.
:param state: The state.
:param when: Whether the check is happening before or after the event.
:return: A boolean representing whether the checkpoint should fire.
""... | python | def check(self, state, when):
"""
Checks state `state` to see if the breakpoint should fire.
:param state: The state.
:param when: Whether the check is happening before or after the event.
:return: A boolean representing whether the checkpoint should fire.
""... | [
"def",
"check",
"(",
"self",
",",
"state",
",",
"when",
")",
":",
"ok",
"=",
"self",
".",
"enabled",
"and",
"(",
"when",
"==",
"self",
".",
"when",
"or",
"self",
".",
"when",
"==",
"BP_BOTH",
")",
"if",
"not",
"ok",
":",
"return",
"ok",
"l",
".... | Checks state `state` to see if the breakpoint should fire.
:param state: The state.
:param when: Whether the check is happening before or after the event.
:return: A boolean representing whether the checkpoint should fire. | [
"Checks",
"state",
"state",
"to",
"see",
"if",
"the",
"breakpoint",
"should",
"fire",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/inspect.py#L138-L184 | train | Checks state to see if the breakpoint should fire. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/inspect.py | BP.fire | def fire(self, state):
"""
Trigger the breakpoint.
:param state: The state.
"""
if self.action is None or self.action == BP_IPDB:
import ipdb; ipdb.set_trace() #pylint:disable=F0401
elif self.action == BP_IPYTHON:
import IPython
shel... | python | def fire(self, state):
"""
Trigger the breakpoint.
:param state: The state.
"""
if self.action is None or self.action == BP_IPDB:
import ipdb; ipdb.set_trace() #pylint:disable=F0401
elif self.action == BP_IPYTHON:
import IPython
shel... | [
"def",
"fire",
"(",
"self",
",",
"state",
")",
":",
"if",
"self",
".",
"action",
"is",
"None",
"or",
"self",
".",
"action",
"==",
"BP_IPDB",
":",
"import",
"ipdb",
"ipdb",
".",
"set_trace",
"(",
")",
"#pylint:disable=F0401",
"elif",
"self",
".",
"actio... | Trigger the breakpoint.
:param state: The state. | [
"Trigger",
"the",
"breakpoint",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/inspect.py#L186-L201 | train | Trigger the breakpoint. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/inspect.py | SimInspector.action | def action(self, event_type, when, **kwargs):
"""
Called from within SimuVEX when events happens. This function checks all breakpoints registered for that event
and fires the ones whose conditions match.
"""
l.debug("Event %s (%s) firing...", event_type, when)
for k,v in ... | python | def action(self, event_type, when, **kwargs):
"""
Called from within SimuVEX when events happens. This function checks all breakpoints registered for that event
and fires the ones whose conditions match.
"""
l.debug("Event %s (%s) firing...", event_type, when)
for k,v in ... | [
"def",
"action",
"(",
"self",
",",
"event_type",
",",
"when",
",",
"*",
"*",
"kwargs",
")",
":",
"l",
".",
"debug",
"(",
"\"Event %s (%s) firing...\"",
",",
"event_type",
",",
"when",
")",
"for",
"k",
",",
"v",
"in",
"kwargs",
".",
"items",
"(",
")",... | Called from within SimuVEX when events happens. This function checks all breakpoints registered for that event
and fires the ones whose conditions match. | [
"Called",
"from",
"within",
"SimuVEX",
"when",
"events",
"happens",
".",
"This",
"function",
"checks",
"all",
"breakpoints",
"registered",
"for",
"that",
"event",
"and",
"fires",
"the",
"ones",
"whose",
"conditions",
"match",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/inspect.py#L232-L249 | train | Called from within SimuVEX when events happen. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/inspect.py | SimInspector.make_breakpoint | def make_breakpoint(self, event_type, *args, **kwargs):
"""
Creates and adds a breakpoint which would trigger on `event_type`. Additional arguments are passed to the
:class:`BP` constructor.
:return: The created breakpoint, so that it can be removed later.
"""
bp = BP... | python | def make_breakpoint(self, event_type, *args, **kwargs):
"""
Creates and adds a breakpoint which would trigger on `event_type`. Additional arguments are passed to the
:class:`BP` constructor.
:return: The created breakpoint, so that it can be removed later.
"""
bp = BP... | [
"def",
"make_breakpoint",
"(",
"self",
",",
"event_type",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"bp",
"=",
"BP",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"self",
".",
"add_breakpoint",
"(",
"event_type",
",",
"bp",
")",
"retur... | Creates and adds a breakpoint which would trigger on `event_type`. Additional arguments are passed to the
:class:`BP` constructor.
:return: The created breakpoint, so that it can be removed later. | [
"Creates",
"and",
"adds",
"a",
"breakpoint",
"which",
"would",
"trigger",
"on",
"event_type",
".",
"Additional",
"arguments",
"are",
"passed",
"to",
"the",
":",
"class",
":",
"BP",
"constructor",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/inspect.py#L251-L260 | train | Creates and adds a breakpoint which would trigger on event_type. Additional arguments are passed to the BP constructor. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/inspect.py | SimInspector.add_breakpoint | def add_breakpoint(self, event_type, bp):
"""
Adds a breakpoint which would trigger on `event_type`.
:param event_type: The event type to trigger on
:param bp: The breakpoint
:return: The created breakpoint.
"""
if event_type not in event_typ... | python | def add_breakpoint(self, event_type, bp):
"""
Adds a breakpoint which would trigger on `event_type`.
:param event_type: The event type to trigger on
:param bp: The breakpoint
:return: The created breakpoint.
"""
if event_type not in event_typ... | [
"def",
"add_breakpoint",
"(",
"self",
",",
"event_type",
",",
"bp",
")",
":",
"if",
"event_type",
"not",
"in",
"event_types",
":",
"raise",
"ValueError",
"(",
"\"Invalid event type %s passed in. Should be one of: %s\"",
"%",
"(",
"event_type",
",",
"\", \"",
".",
... | Adds a breakpoint which would trigger on `event_type`.
:param event_type: The event type to trigger on
:param bp: The breakpoint
:return: The created breakpoint. | [
"Adds",
"a",
"breakpoint",
"which",
"would",
"trigger",
"on",
"event_type",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/inspect.py#L264-L276 | train | Adds a breakpoint which would trigger on event_type. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/inspect.py | SimInspector.remove_breakpoint | def remove_breakpoint(self, event_type, bp=None, filter_func=None):
"""
Removes a breakpoint.
:param bp: The breakpoint to remove.
:param filter_func: A filter function to specify whether each breakpoint should be removed or not.
"""
if bp is None and filter_func is No... | python | def remove_breakpoint(self, event_type, bp=None, filter_func=None):
"""
Removes a breakpoint.
:param bp: The breakpoint to remove.
:param filter_func: A filter function to specify whether each breakpoint should be removed or not.
"""
if bp is None and filter_func is No... | [
"def",
"remove_breakpoint",
"(",
"self",
",",
"event_type",
",",
"bp",
"=",
"None",
",",
"filter_func",
"=",
"None",
")",
":",
"if",
"bp",
"is",
"None",
"and",
"filter_func",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"'remove_breakpoint(): You must specif... | Removes a breakpoint.
:param bp: The breakpoint to remove.
:param filter_func: A filter function to specify whether each breakpoint should be removed or not. | [
"Removes",
"a",
"breakpoint",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/inspect.py#L278-L296 | train | Removes a breakpoint from the cache. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/inspect.py | SimInspector.downsize | def downsize(self):
"""
Remove previously stored attributes from this plugin instance to save memory.
This method is supposed to be called by breakpoint implementors. A typical workflow looks like the following :
>>> # Add `attr0` and `attr1` to `self.state.inspect`
>>> self.sta... | python | def downsize(self):
"""
Remove previously stored attributes from this plugin instance to save memory.
This method is supposed to be called by breakpoint implementors. A typical workflow looks like the following :
>>> # Add `attr0` and `attr1` to `self.state.inspect`
>>> self.sta... | [
"def",
"downsize",
"(",
"self",
")",
":",
"for",
"k",
"in",
"inspect_attributes",
":",
"if",
"hasattr",
"(",
"self",
",",
"k",
")",
":",
"setattr",
"(",
"self",
",",
"k",
",",
"None",
")"
] | Remove previously stored attributes from this plugin instance to save memory.
This method is supposed to be called by breakpoint implementors. A typical workflow looks like the following :
>>> # Add `attr0` and `attr1` to `self.state.inspect`
>>> self.state.inspect(xxxxxx, attr0=yyyy, attr1=zzz... | [
"Remove",
"previously",
"stored",
"attributes",
"from",
"this",
"plugin",
"instance",
"to",
"save",
"memory",
".",
"This",
"method",
"is",
"supposed",
"to",
"be",
"called",
"by",
"breakpoint",
"implementors",
".",
"A",
"typical",
"workflow",
"looks",
"like",
"... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/inspect.py#L308-L323 | train | Remove previously stored attributes from this plugin instance to save memory. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/simos/userland.py | SimUserland.syscall | def syscall(self, state, allow_unsupported=True):
"""
Given a state, return the procedure corresponding to the current syscall.
This procedure will have .syscall_number, .display_name, and .addr set.
:param state: The state to get the syscall number from
:param all... | python | def syscall(self, state, allow_unsupported=True):
"""
Given a state, return the procedure corresponding to the current syscall.
This procedure will have .syscall_number, .display_name, and .addr set.
:param state: The state to get the syscall number from
:param all... | [
"def",
"syscall",
"(",
"self",
",",
"state",
",",
"allow_unsupported",
"=",
"True",
")",
":",
"abi",
"=",
"self",
".",
"syscall_abi",
"(",
"state",
")",
"if",
"state",
".",
"os_name",
"in",
"SYSCALL_CC",
"[",
"state",
".",
"arch",
".",
"name",
"]",
"... | Given a state, return the procedure corresponding to the current syscall.
This procedure will have .syscall_number, .display_name, and .addr set.
:param state: The state to get the syscall number from
:param allow_unsupported: Whether to return a "dummy" sycall instead of raisin... | [
"Given",
"a",
"state",
"return",
"the",
"procedure",
"corresponding",
"to",
"the",
"current",
"syscall",
".",
"This",
"procedure",
"will",
"have",
".",
"syscall_number",
".",
"display_name",
"and",
".",
"addr",
"set",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/simos/userland.py#L47-L78 | train | Given a state return the corresponding syscall. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/simos/userland.py | SimUserland.is_syscall_addr | def is_syscall_addr(self, addr):
"""
Return whether or not the given address corresponds to a syscall implementation.
"""
if self.kernel_base is None or addr < self.kernel_base:
return False
addr -= self.kernel_base
if addr % self.syscall_addr_alignment != 0... | python | def is_syscall_addr(self, addr):
"""
Return whether or not the given address corresponds to a syscall implementation.
"""
if self.kernel_base is None or addr < self.kernel_base:
return False
addr -= self.kernel_base
if addr % self.syscall_addr_alignment != 0... | [
"def",
"is_syscall_addr",
"(",
"self",
",",
"addr",
")",
":",
"if",
"self",
".",
"kernel_base",
"is",
"None",
"or",
"addr",
"<",
"self",
".",
"kernel_base",
":",
"return",
"False",
"addr",
"-=",
"self",
".",
"kernel_base",
"if",
"addr",
"%",
"self",
".... | Return whether or not the given address corresponds to a syscall implementation. | [
"Return",
"whether",
"or",
"not",
"the",
"given",
"address",
"corresponds",
"to",
"a",
"syscall",
"implementation",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/simos/userland.py#L86-L99 | train | Return whether or not the given address corresponds to a syscall implementation. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/simos/userland.py | SimUserland.syscall_from_addr | def syscall_from_addr(self, addr, allow_unsupported=True):
"""
Get a syscall SimProcedure from an address.
:param addr: The address to convert to a syscall SimProcedure
:param allow_unsupported: Whether to return a dummy procedure for an unsupported syscall instead of raising an
... | python | def syscall_from_addr(self, addr, allow_unsupported=True):
"""
Get a syscall SimProcedure from an address.
:param addr: The address to convert to a syscall SimProcedure
:param allow_unsupported: Whether to return a dummy procedure for an unsupported syscall instead of raising an
... | [
"def",
"syscall_from_addr",
"(",
"self",
",",
"addr",
",",
"allow_unsupported",
"=",
"True",
")",
":",
"if",
"not",
"self",
".",
"is_syscall_addr",
"(",
"addr",
")",
":",
"return",
"None",
"number",
"=",
"(",
"addr",
"-",
"self",
".",
"kernel_base",
")",... | Get a syscall SimProcedure from an address.
:param addr: The address to convert to a syscall SimProcedure
:param allow_unsupported: Whether to return a dummy procedure for an unsupported syscall instead of raising an
exception.
:return: The SimProcedure for the... | [
"Get",
"a",
"syscall",
"SimProcedure",
"from",
"an",
"address",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/simos/userland.py#L101-L122 | train | Get a syscall SimProcedure from an address. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/simos/userland.py | SimUserland.syscall_from_number | def syscall_from_number(self, number, allow_unsupported=True, abi=None):
"""
Get a syscall SimProcedure from its number.
:param number: The syscall number
:param allow_unsupported: Whether to return a "stub" syscall for unsupported numbers instead of throwing an error
... | python | def syscall_from_number(self, number, allow_unsupported=True, abi=None):
"""
Get a syscall SimProcedure from its number.
:param number: The syscall number
:param allow_unsupported: Whether to return a "stub" syscall for unsupported numbers instead of throwing an error
... | [
"def",
"syscall_from_number",
"(",
"self",
",",
"number",
",",
"allow_unsupported",
"=",
"True",
",",
"abi",
"=",
"None",
")",
":",
"abilist",
"=",
"self",
".",
"syscall_abis",
"if",
"abi",
"is",
"None",
"else",
"[",
"abi",
"]",
"if",
"self",
".",
"sys... | Get a syscall SimProcedure from its number.
:param number: The syscall number
:param allow_unsupported: Whether to return a "stub" syscall for unsupported numbers instead of throwing an error
:param abi: The name of the abi to use. If None, will assume that the ab... | [
"Get",
"a",
"syscall",
"SimProcedure",
"from",
"its",
"number",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/simos/userland.py#L124-L152 | train | Get a SimProcedure from its number. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/procedures/win32/VirtualAlloc.py | convert_prot | def convert_prot(prot):
"""
Convert from a windows memory protection constant to an angr bitmask
"""
# https://msdn.microsoft.com/en-us/library/windows/desktop/aa366786(v=vs.85).aspx
if prot & 0x10:
return 4
if prot & 0x20:
return 5
if prot & 0x40:
return 7
if pro... | python | def convert_prot(prot):
"""
Convert from a windows memory protection constant to an angr bitmask
"""
# https://msdn.microsoft.com/en-us/library/windows/desktop/aa366786(v=vs.85).aspx
if prot & 0x10:
return 4
if prot & 0x20:
return 5
if prot & 0x40:
return 7
if pro... | [
"def",
"convert_prot",
"(",
"prot",
")",
":",
"# https://msdn.microsoft.com/en-us/library/windows/desktop/aa366786(v=vs.85).aspx",
"if",
"prot",
"&",
"0x10",
":",
"return",
"4",
"if",
"prot",
"&",
"0x20",
":",
"return",
"5",
"if",
"prot",
"&",
"0x40",
":",
"return... | Convert from a windows memory protection constant to an angr bitmask | [
"Convert",
"from",
"a",
"windows",
"memory",
"protection",
"constant",
"to",
"an",
"angr",
"bitmask"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/win32/VirtualAlloc.py#L6-L27 | train | Convert a windows memory protection constant to an angr bitmask. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | LiveDefinitions.copy | def copy(self):
"""
Make a hard copy of `self`.
:return: A new LiveDefinition instance.
:rtype: angr.analyses.ddg.LiveDefinitions
"""
ld = LiveDefinitions()
ld._memory_map = self._memory_map.copy()
ld._register_map = self._register_map.copy()
ld.... | python | def copy(self):
"""
Make a hard copy of `self`.
:return: A new LiveDefinition instance.
:rtype: angr.analyses.ddg.LiveDefinitions
"""
ld = LiveDefinitions()
ld._memory_map = self._memory_map.copy()
ld._register_map = self._register_map.copy()
ld.... | [
"def",
"copy",
"(",
"self",
")",
":",
"ld",
"=",
"LiveDefinitions",
"(",
")",
"ld",
".",
"_memory_map",
"=",
"self",
".",
"_memory_map",
".",
"copy",
"(",
")",
"ld",
".",
"_register_map",
"=",
"self",
".",
"_register_map",
".",
"copy",
"(",
")",
"ld"... | Make a hard copy of `self`.
:return: A new LiveDefinition instance.
:rtype: angr.analyses.ddg.LiveDefinitions | [
"Make",
"a",
"hard",
"copy",
"of",
"self",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L137-L150 | train | Make a hard copy of self. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | LiveDefinitions.add_def | def add_def(self, variable, location, size_threshold=32):
"""
Add a new definition of variable.
:param SimVariable variable: The variable being defined.
:param CodeLocation location: Location of the varaible being defined.
:param int size_threshold: The maximum bytes to consider... | python | def add_def(self, variable, location, size_threshold=32):
"""
Add a new definition of variable.
:param SimVariable variable: The variable being defined.
:param CodeLocation location: Location of the varaible being defined.
:param int size_threshold: The maximum bytes to consider... | [
"def",
"add_def",
"(",
"self",
",",
"variable",
",",
"location",
",",
"size_threshold",
"=",
"32",
")",
":",
"new_defs_added",
"=",
"False",
"if",
"isinstance",
"(",
"variable",
",",
"SimRegisterVariable",
")",
":",
"if",
"variable",
".",
"reg",
"is",
"Non... | Add a new definition of variable.
:param SimVariable variable: The variable being defined.
:param CodeLocation location: Location of the varaible being defined.
:param int size_threshold: The maximum bytes to consider for the variable.
:return: True if the definition was new, False othe... | [
"Add",
"a",
"new",
"definition",
"of",
"variable",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L152-L194 | train | Adds a new definition of variable at location. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | LiveDefinitions.add_defs | def add_defs(self, variable, locations, size_threshold=32):
"""
Add a collection of new definitions of a variable.
:param SimVariable variable: The variable being defined.
:param iterable locations: A collection of locations where the variable was defined.
:param int size_thresh... | python | def add_defs(self, variable, locations, size_threshold=32):
"""
Add a collection of new definitions of a variable.
:param SimVariable variable: The variable being defined.
:param iterable locations: A collection of locations where the variable was defined.
:param int size_thresh... | [
"def",
"add_defs",
"(",
"self",
",",
"variable",
",",
"locations",
",",
"size_threshold",
"=",
"32",
")",
":",
"new_defs_added",
"=",
"False",
"for",
"loc",
"in",
"locations",
":",
"new_defs_added",
"|=",
"self",
".",
"add_def",
"(",
"variable",
",",
"loc"... | Add a collection of new definitions of a variable.
:param SimVariable variable: The variable being defined.
:param iterable locations: A collection of locations where the variable was defined.
:param int size_threshold: The maximum bytes to consider for the variable.
:return: True if an... | [
"Add",
"a",
"collection",
"of",
"new",
"definitions",
"of",
"a",
"variable",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L196-L212 | train | Adds a collection of new definitions of a variable. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | LiveDefinitions.kill_def | def kill_def(self, variable, location, size_threshold=32):
"""
Add a new definition for variable and kill all previous definitions.
:param SimVariable variable: The variable to kill.
:param CodeLocation location: The location where this variable is defined.
:param int size_thres... | python | def kill_def(self, variable, location, size_threshold=32):
"""
Add a new definition for variable and kill all previous definitions.
:param SimVariable variable: The variable to kill.
:param CodeLocation location: The location where this variable is defined.
:param int size_thres... | [
"def",
"kill_def",
"(",
"self",
",",
"variable",
",",
"location",
",",
"size_threshold",
"=",
"32",
")",
":",
"if",
"isinstance",
"(",
"variable",
",",
"SimRegisterVariable",
")",
":",
"if",
"variable",
".",
"reg",
"is",
"None",
":",
"l",
".",
"warning",... | Add a new definition for variable and kill all previous definitions.
:param SimVariable variable: The variable to kill.
:param CodeLocation location: The location where this variable is defined.
:param int size_threshold: The maximum bytes to consider for the variable.
:return: None | [
"Add",
"a",
"new",
"definition",
"for",
"variable",
"and",
"kill",
"all",
"previous",
"definitions",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L214-L247 | train | Add a new definition for variable and kill all previous definitions. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | LiveDefinitions.lookup_defs | def lookup_defs(self, variable, size_threshold=32):
"""
Find all definitions of the varaible
:param SimVariable variable: The variable to lookup for.
:param int size_threshold: The maximum bytes to consider for the variable. For example, if the variable is 100
... | python | def lookup_defs(self, variable, size_threshold=32):
"""
Find all definitions of the varaible
:param SimVariable variable: The variable to lookup for.
:param int size_threshold: The maximum bytes to consider for the variable. For example, if the variable is 100
... | [
"def",
"lookup_defs",
"(",
"self",
",",
"variable",
",",
"size_threshold",
"=",
"32",
")",
":",
"live_def_locs",
"=",
"set",
"(",
")",
"if",
"isinstance",
"(",
"variable",
",",
"SimRegisterVariable",
")",
":",
"if",
"variable",
".",
"reg",
"is",
"None",
... | Find all definitions of the varaible
:param SimVariable variable: The variable to lookup for.
:param int size_threshold: The maximum bytes to consider for the variable. For example, if the variable is 100
byte long, only the first `size_threshold` bytes are considered... | [
"Find",
"all",
"definitions",
"of",
"the",
"varaible"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L249-L287 | train | Returns a set of code locations where the variable is defined. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDGViewItem._to_viewitem | def _to_viewitem(self, prog_var):
"""
Convert a ProgramVariable instance to a DDGViewItem object.
:param ProgramVariable prog_var: The ProgramVariable object to convert.
:return: The converted DDGViewItem object.
:rtype: DDGViewIt... | python | def _to_viewitem(self, prog_var):
"""
Convert a ProgramVariable instance to a DDGViewItem object.
:param ProgramVariable prog_var: The ProgramVariable object to convert.
:return: The converted DDGViewItem object.
:rtype: DDGViewIt... | [
"def",
"_to_viewitem",
"(",
"self",
",",
"prog_var",
")",
":",
"return",
"DDGViewItem",
"(",
"self",
".",
"_ddg",
",",
"prog_var",
",",
"simplified",
"=",
"self",
".",
"_simplified",
")"
] | Convert a ProgramVariable instance to a DDGViewItem object.
:param ProgramVariable prog_var: The ProgramVariable object to convert.
:return: The converted DDGViewItem object.
:rtype: DDGViewItem | [
"Convert",
"a",
"ProgramVariable",
"instance",
"to",
"a",
"DDGViewItem",
"object",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L342-L351 | train | Converts a ProgramVariable instance to a DDGViewItem object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDGViewInstruction.definitions | def definitions(self):
"""
Get all definitions located at the current instruction address.
:return: A list of ProgramVariable instances.
:rtype: list
"""
defs = set()
if self._simplified:
graph = self._ddg.simplified_data_graph
else:
... | python | def definitions(self):
"""
Get all definitions located at the current instruction address.
:return: A list of ProgramVariable instances.
:rtype: list
"""
defs = set()
if self._simplified:
graph = self._ddg.simplified_data_graph
else:
... | [
"def",
"definitions",
"(",
"self",
")",
":",
"defs",
"=",
"set",
"(",
")",
"if",
"self",
".",
"_simplified",
":",
"graph",
"=",
"self",
".",
"_ddg",
".",
"simplified_data_graph",
"else",
":",
"graph",
"=",
"self",
".",
"_ddg",
".",
"data_graph",
"for",... | Get all definitions located at the current instruction address.
:return: A list of ProgramVariable instances.
:rtype: list | [
"Get",
"all",
"definitions",
"located",
"at",
"the",
"current",
"instruction",
"address",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L404-L423 | train | Returns a list of ProgramVariable instances that are located at the current instruction address. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG.pp | def pp(self):
"""
Pretty printing.
"""
# TODO: make it prettier
for src, dst, data in self.graph.edges(data=True):
print("%s <-- %s, %s" % (src, dst, data)) | python | def pp(self):
"""
Pretty printing.
"""
# TODO: make it prettier
for src, dst, data in self.graph.edges(data=True):
print("%s <-- %s, %s" % (src, dst, data)) | [
"def",
"pp",
"(",
"self",
")",
":",
"# TODO: make it prettier",
"for",
"src",
",",
"dst",
",",
"data",
"in",
"self",
".",
"graph",
".",
"edges",
"(",
"data",
"=",
"True",
")",
":",
"print",
"(",
"\"%s <-- %s, %s\"",
"%",
"(",
"src",
",",
"dst",
",",
... | Pretty printing. | [
"Pretty",
"printing",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L549-L555 | train | Pretty printing. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG.function_dependency_graph | def function_dependency_graph(self, func):
"""
Get a dependency graph for the function `func`.
:param func: The Function object in CFG.function_manager.
:returns: A networkx.DiGraph instance.
"""
if self._function_data_dependencies is None:
self._bu... | python | def function_dependency_graph(self, func):
"""
Get a dependency graph for the function `func`.
:param func: The Function object in CFG.function_manager.
:returns: A networkx.DiGraph instance.
"""
if self._function_data_dependencies is None:
self._bu... | [
"def",
"function_dependency_graph",
"(",
"self",
",",
"func",
")",
":",
"if",
"self",
".",
"_function_data_dependencies",
"is",
"None",
":",
"self",
".",
"_build_function_dependency_graphs",
"(",
")",
"if",
"func",
"in",
"self",
".",
"_function_data_dependencies",
... | Get a dependency graph for the function `func`.
:param func: The Function object in CFG.function_manager.
:returns: A networkx.DiGraph instance. | [
"Get",
"a",
"dependency",
"graph",
"for",
"the",
"function",
"func",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L584-L599 | train | Returns a dependency graph for the function func. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG.data_sub_graph | def data_sub_graph(self, pv, simplified=True, killing_edges=False, excluding_types=None):
"""
Get a subgraph from the data graph or the simplified data graph that starts from node pv.
:param ProgramVariable pv: The starting point of the subgraph.
:param bool simplified: When True, the s... | python | def data_sub_graph(self, pv, simplified=True, killing_edges=False, excluding_types=None):
"""
Get a subgraph from the data graph or the simplified data graph that starts from node pv.
:param ProgramVariable pv: The starting point of the subgraph.
:param bool simplified: When True, the s... | [
"def",
"data_sub_graph",
"(",
"self",
",",
"pv",
",",
"simplified",
"=",
"True",
",",
"killing_edges",
"=",
"False",
",",
"excluding_types",
"=",
"None",
")",
":",
"result",
"=",
"networkx",
".",
"MultiDiGraph",
"(",
")",
"result",
".",
"add_node",
"(",
... | Get a subgraph from the data graph or the simplified data graph that starts from node pv.
:param ProgramVariable pv: The starting point of the subgraph.
:param bool simplified: When True, the simplified data graph is used, otherwise the data graph is used.
:param bool killing_edges: Are killing... | [
"Get",
"a",
"subgraph",
"from",
"the",
"data",
"graph",
"or",
"the",
"simplified",
"data",
"graph",
"that",
"starts",
"from",
"node",
"pv",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L601-L647 | train | Get a subgraph of the data graph that starts from a given node pv. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG._construct | def _construct(self):
"""
Construct the data dependence graph.
We track the following types of dependence:
- (Intra-IRSB) temporary variable dependencies
- Register dependencies
- Memory dependencies, although it's very limited. See below.
We track the following... | python | def _construct(self):
"""
Construct the data dependence graph.
We track the following types of dependence:
- (Intra-IRSB) temporary variable dependencies
- Register dependencies
- Memory dependencies, although it's very limited. See below.
We track the following... | [
"def",
"_construct",
"(",
"self",
")",
":",
"worklist",
"=",
"[",
"]",
"worklist_set",
"=",
"set",
"(",
")",
"# Initialize the worklist",
"if",
"self",
".",
"_start",
"is",
"None",
":",
"# initial nodes are those nodes in CFG that has no in-degrees",
"for",
"n",
"... | Construct the data dependence graph.
We track the following types of dependence:
- (Intra-IRSB) temporary variable dependencies
- Register dependencies
- Memory dependencies, although it's very limited. See below.
We track the following types of memory access:
- (Intra-... | [
"Construct",
"the",
"data",
"dependence",
"graph",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L653-L791 | train | Constructs the data dependence graph. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG._track | def _track(self, state, live_defs, statements):
"""
Given all live definitions prior to this program point, track the changes, and return a new list of live
definitions. We scan through the action list of the new state to track the changes.
:param state: The input state at tha... | python | def _track(self, state, live_defs, statements):
"""
Given all live definitions prior to this program point, track the changes, and return a new list of live
definitions. We scan through the action list of the new state to track the changes.
:param state: The input state at tha... | [
"def",
"_track",
"(",
"self",
",",
"state",
",",
"live_defs",
",",
"statements",
")",
":",
"# Make a copy of live_defs",
"self",
".",
"_live_defs",
"=",
"live_defs",
".",
"copy",
"(",
")",
"action_list",
"=",
"list",
"(",
"state",
".",
"history",
".",
"rec... | Given all live definitions prior to this program point, track the changes, and return a new list of live
definitions. We scan through the action list of the new state to track the changes.
:param state: The input state at that program point.
:param live_defs: All live definition... | [
"Given",
"all",
"live",
"definitions",
"prior",
"to",
"this",
"program",
"point",
"track",
"the",
"changes",
"and",
"return",
"a",
"new",
"list",
"of",
"live",
"definitions",
".",
"We",
"scan",
"through",
"the",
"action",
"list",
"of",
"the",
"new",
"state... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L793-L853 | train | This method tracks the changes in a list of live definitions and returns a new list of live definitions. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG._def_lookup | def _def_lookup(self, variable): # pylint:disable=no-self-use
"""
This is a backward lookup in the previous defs. Note that, as we are using VSA, it is possible that `variable`
is affected by several definitions.
:param angr.analyses.ddg.LiveDefinitions live_defs:
... | python | def _def_lookup(self, variable): # pylint:disable=no-self-use
"""
This is a backward lookup in the previous defs. Note that, as we are using VSA, it is possible that `variable`
is affected by several definitions.
:param angr.analyses.ddg.LiveDefinitions live_defs:
... | [
"def",
"_def_lookup",
"(",
"self",
",",
"variable",
")",
":",
"# pylint:disable=no-self-use",
"prevdefs",
"=",
"{",
"}",
"for",
"code_loc",
"in",
"self",
".",
"_live_defs",
".",
"lookup_defs",
"(",
"variable",
")",
":",
"# Label edges with cardinality or actual sets... | This is a backward lookup in the previous defs. Note that, as we are using VSA, it is possible that `variable`
is affected by several definitions.
:param angr.analyses.ddg.LiveDefinitions live_defs:
The collection of live definitions.
:param SimVariable: The variable... | [
"This",
"is",
"a",
"backward",
"lookup",
"in",
"the",
"previous",
"defs",
".",
"Note",
"that",
"as",
"we",
"are",
"using",
"VSA",
"it",
"is",
"possible",
"that",
"variable",
"is",
"affected",
"by",
"several",
"definitions",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L855-L883 | train | This method is a backward lookup in the previous defs. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG._kill | def _kill(self, variable, code_loc): # pylint:disable=no-self-use
"""
Kill previous defs. addr_list is a list of normalized addresses.
"""
# Case 1: address perfectly match, we kill
# Case 2: a is a subset of the original address
# Case 3: a is a superset of the origina... | python | def _kill(self, variable, code_loc): # pylint:disable=no-self-use
"""
Kill previous defs. addr_list is a list of normalized addresses.
"""
# Case 1: address perfectly match, we kill
# Case 2: a is a subset of the original address
# Case 3: a is a superset of the origina... | [
"def",
"_kill",
"(",
"self",
",",
"variable",
",",
"code_loc",
")",
":",
"# pylint:disable=no-self-use",
"# Case 1: address perfectly match, we kill",
"# Case 2: a is a subset of the original address",
"# Case 3: a is a superset of the original address",
"# the previous definition is kil... | Kill previous defs. addr_list is a list of normalized addresses. | [
"Kill",
"previous",
"defs",
".",
"addr_list",
"is",
"a",
"list",
"of",
"normalized",
"addresses",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L885-L901 | train | Kill previous defs. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG._get_register_size | def _get_register_size(self, reg_offset):
"""
Get the size of a register.
:param int reg_offset: Offset of the register.
:return: Size in bytes.
:rtype: int
"""
# TODO: support registers that are not aligned
if reg_offset in self.project.arch.register_na... | python | def _get_register_size(self, reg_offset):
"""
Get the size of a register.
:param int reg_offset: Offset of the register.
:return: Size in bytes.
:rtype: int
"""
# TODO: support registers that are not aligned
if reg_offset in self.project.arch.register_na... | [
"def",
"_get_register_size",
"(",
"self",
",",
"reg_offset",
")",
":",
"# TODO: support registers that are not aligned",
"if",
"reg_offset",
"in",
"self",
".",
"project",
".",
"arch",
".",
"register_names",
":",
"reg_name",
"=",
"self",
".",
"project",
".",
"arch"... | Get the size of a register.
:param int reg_offset: Offset of the register.
:return: Size in bytes.
:rtype: int | [
"Get",
"the",
"size",
"of",
"a",
"register",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L903-L920 | train | Get the size of a register. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG._get_actual_addrs | def _get_actual_addrs(action, state):
"""
For memory actions, get a list of addresses it operates on.
:param SimAction action: The action object to work with.
:return: A list of addresses that are accessed with that action.
:rtype: list
"... | python | def _get_actual_addrs(action, state):
"""
For memory actions, get a list of addresses it operates on.
:param SimAction action: The action object to work with.
:return: A list of addresses that are accessed with that action.
:rtype: list
"... | [
"def",
"_get_actual_addrs",
"(",
"action",
",",
"state",
")",
":",
"if",
"action",
".",
"actual_addrs",
"is",
"None",
":",
"# For now, mem reads don't necessarily have actual_addrs set properly",
"try",
":",
"addr_list",
"=",
"{",
"state",
".",
"solver",
".",
"eval"... | For memory actions, get a list of addresses it operates on.
:param SimAction action: The action object to work with.
:return: A list of addresses that are accessed with that action.
:rtype: list | [
"For",
"memory",
"actions",
"get",
"a",
"list",
"of",
"addresses",
"it",
"operates",
"on",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L927-L948 | train | Get a list of addresses that are accessed with that action. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG._create_memory_variable | def _create_memory_variable(self, action, addr, addrs):
"""
Create a SimStackVariable or SimMemoryVariable based on action objects and its address.
:param SimAction action: The action to work with.
:param int addr: The address of the memory variable in creation.
:param l... | python | def _create_memory_variable(self, action, addr, addrs):
"""
Create a SimStackVariable or SimMemoryVariable based on action objects and its address.
:param SimAction action: The action to work with.
:param int addr: The address of the memory variable in creation.
:param l... | [
"def",
"_create_memory_variable",
"(",
"self",
",",
"action",
",",
"addr",
",",
"addrs",
")",
":",
"variable",
"=",
"None",
"if",
"len",
"(",
"addrs",
")",
"==",
"1",
"and",
"len",
"(",
"action",
".",
"addr",
".",
"tmp_deps",
")",
"==",
"1",
":",
"... | Create a SimStackVariable or SimMemoryVariable based on action objects and its address.
:param SimAction action: The action to work with.
:param int addr: The address of the memory variable in creation.
:param list addrs: A list of all addresses that the action was effective on.
... | [
"Create",
"a",
"SimStackVariable",
"or",
"SimMemoryVariable",
"based",
"on",
"action",
"objects",
"and",
"its",
"address",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L950-L971 | train | Create a SimStackVariable or SimMemoryVariable based on action objects and address. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG._data_graph_add_edge | def _data_graph_add_edge(self, src, dst, **edge_labels):
"""
Add an edge in the data dependence graph.
:param ProgramVariable src: Source node.
:param ProgramVariable dst: Destination node.
:param edge_labels: All labels associated with the edge.
:return: None
""... | python | def _data_graph_add_edge(self, src, dst, **edge_labels):
"""
Add an edge in the data dependence graph.
:param ProgramVariable src: Source node.
:param ProgramVariable dst: Destination node.
:param edge_labels: All labels associated with the edge.
:return: None
""... | [
"def",
"_data_graph_add_edge",
"(",
"self",
",",
"src",
",",
"dst",
",",
"*",
"*",
"edge_labels",
")",
":",
"if",
"src",
"in",
"self",
".",
"_data_graph",
"and",
"dst",
"in",
"self",
".",
"_data_graph",
"[",
"src",
"]",
":",
"return",
"self",
".",
"_... | Add an edge in the data dependence graph.
:param ProgramVariable src: Source node.
:param ProgramVariable dst: Destination node.
:param edge_labels: All labels associated with the edge.
:return: None | [
"Add",
"an",
"edge",
"in",
"the",
"data",
"dependence",
"graph",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L1299-L1314 | train | Adds an edge to the data dependence graph. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG._stmt_graph_add_edge | def _stmt_graph_add_edge(self, src, dst, **edge_labels):
"""
Add an edge in the statement dependence graph from a program location `src` to another program location `dst`.
:param CodeLocation src: Source node.
:param CodeLocation dst: Destination node.
:param edge_labels: All la... | python | def _stmt_graph_add_edge(self, src, dst, **edge_labels):
"""
Add an edge in the statement dependence graph from a program location `src` to another program location `dst`.
:param CodeLocation src: Source node.
:param CodeLocation dst: Destination node.
:param edge_labels: All la... | [
"def",
"_stmt_graph_add_edge",
"(",
"self",
",",
"src",
",",
"dst",
",",
"*",
"*",
"edge_labels",
")",
":",
"# Is that edge already in the graph ?",
"# If at least one is new, then we are not redoing the same path again",
"if",
"src",
"in",
"self",
".",
"_stmt_graph",
"an... | Add an edge in the statement dependence graph from a program location `src` to another program location `dst`.
:param CodeLocation src: Source node.
:param CodeLocation dst: Destination node.
:param edge_labels: All labels associated with the edge.
:returns: None | [
"Add",
"an",
"edge",
"in",
"the",
"statement",
"dependence",
"graph",
"from",
"a",
"program",
"location",
"src",
"to",
"another",
"program",
"location",
"dst",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L1316-L1331 | train | Adds an edge from a program location src to another program location dst. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG._stmt_graph_annotate_edges | def _stmt_graph_annotate_edges(self, edges_to_annotate, **new_labels):
"""
Add new annotations to edges in the statement dependence graph.
:param list edges_to_annotate: A list of edges to annotate.
:param new_labels: New labels to be added to those edges.
:returns: None
... | python | def _stmt_graph_annotate_edges(self, edges_to_annotate, **new_labels):
"""
Add new annotations to edges in the statement dependence graph.
:param list edges_to_annotate: A list of edges to annotate.
:param new_labels: New labels to be added to those edges.
:returns: None
... | [
"def",
"_stmt_graph_annotate_edges",
"(",
"self",
",",
"edges_to_annotate",
",",
"*",
"*",
"new_labels",
")",
":",
"graph",
"=",
"self",
".",
"graph",
"for",
"src",
",",
"dst",
"in",
"edges_to_annotate",
":",
"if",
"src",
"not",
"in",
"graph",
":",
"contin... | Add new annotations to edges in the statement dependence graph.
:param list edges_to_annotate: A list of edges to annotate.
:param new_labels: New labels to be added to those edges.
:returns: None | [
"Add",
"new",
"annotations",
"to",
"edges",
"in",
"the",
"statement",
"dependence",
"graph",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L1333-L1359 | train | Add new annotations to edges in the statement dependence graph. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG._simplify_data_graph | def _simplify_data_graph(self, data_graph): # pylint:disable=no-self-use
"""
Simplify a data graph by removing all temp variable nodes on the graph.
:param networkx.DiGraph data_graph: The data dependence graph to simplify.
:return: The simplified graph.
:rtype: networkx.MultiD... | python | def _simplify_data_graph(self, data_graph): # pylint:disable=no-self-use
"""
Simplify a data graph by removing all temp variable nodes on the graph.
:param networkx.DiGraph data_graph: The data dependence graph to simplify.
:return: The simplified graph.
:rtype: networkx.MultiD... | [
"def",
"_simplify_data_graph",
"(",
"self",
",",
"data_graph",
")",
":",
"# pylint:disable=no-self-use",
"graph",
"=",
"networkx",
".",
"MultiDiGraph",
"(",
"data_graph",
")",
"all_nodes",
"=",
"[",
"n",
"for",
"n",
"in",
"graph",
".",
"nodes",
"(",
")",
"if... | Simplify a data graph by removing all temp variable nodes on the graph.
:param networkx.DiGraph data_graph: The data dependence graph to simplify.
:return: The simplified graph.
:rtype: networkx.MultiDiGraph | [
"Simplify",
"a",
"data",
"graph",
"by",
"removing",
"all",
"temp",
"variable",
"nodes",
"on",
"the",
"graph",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L1361-L1394 | train | Simplify a data dependence graph by removing all temp variable nodes and linking them directly to the data nodes. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG._worklist_append | def _worklist_append(self, node_wrapper, worklist, worklist_set):
"""
Append a CFGNode and its successors into the work-list, and respect the call-depth limit
:param node_wrapper: The NodeWrapper instance to insert.
:param worklist: The work-list, which is a list.
:par... | python | def _worklist_append(self, node_wrapper, worklist, worklist_set):
"""
Append a CFGNode and its successors into the work-list, and respect the call-depth limit
:param node_wrapper: The NodeWrapper instance to insert.
:param worklist: The work-list, which is a list.
:par... | [
"def",
"_worklist_append",
"(",
"self",
",",
"node_wrapper",
",",
"worklist",
",",
"worklist_set",
")",
":",
"if",
"node_wrapper",
".",
"cfg_node",
"in",
"worklist_set",
":",
"# It's already in the work-list",
"return",
"worklist",
".",
"append",
"(",
"node_wrapper"... | Append a CFGNode and its successors into the work-list, and respect the call-depth limit
:param node_wrapper: The NodeWrapper instance to insert.
:param worklist: The work-list, which is a list.
:param worklist_set: A set of all CFGNodes that are inside the work-list, just for the ... | [
"Append",
"a",
"CFGNode",
"and",
"its",
"successors",
"into",
"the",
"work",
"-",
"list",
"and",
"respect",
"the",
"call",
"-",
"depth",
"limit"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L1396-L1452 | train | Append a CFGNode and its successors into the work - list and respect the call - depth limit. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG._build_function_dependency_graphs | def _build_function_dependency_graphs(self):
"""
Build dependency graphs for each function, and save them in self._function_data_dependencies.
"""
# This is a map between functions and its corresponding dependencies
self._function_data_dependencies = defaultdict(networkx.DiGraph... | python | def _build_function_dependency_graphs(self):
"""
Build dependency graphs for each function, and save them in self._function_data_dependencies.
"""
# This is a map between functions and its corresponding dependencies
self._function_data_dependencies = defaultdict(networkx.DiGraph... | [
"def",
"_build_function_dependency_graphs",
"(",
"self",
")",
":",
"# This is a map between functions and its corresponding dependencies",
"self",
".",
"_function_data_dependencies",
"=",
"defaultdict",
"(",
"networkx",
".",
"DiGraph",
")",
"# Group all dependencies first",
"bloc... | Build dependency graphs for each function, and save them in self._function_data_dependencies. | [
"Build",
"dependency",
"graphs",
"for",
"each",
"function",
"and",
"save",
"them",
"in",
"self",
".",
"_function_data_dependencies",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L1454-L1478 | train | Builds the function dependency graphs for each function and saves them in self. _function_data_dependencies. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG._filter_defs_at_call_sites | def _filter_defs_at_call_sites(self, defs):
"""
If we are not tracing into the function that are called in a real execution, we should properly filter the defs
to account for the behavior of the skipped function at this call site.
This function is a WIP. See TODOs inside.
:para... | python | def _filter_defs_at_call_sites(self, defs):
"""
If we are not tracing into the function that are called in a real execution, we should properly filter the defs
to account for the behavior of the skipped function at this call site.
This function is a WIP. See TODOs inside.
:para... | [
"def",
"_filter_defs_at_call_sites",
"(",
"self",
",",
"defs",
")",
":",
"# TODO: make definition killing architecture independent and calling convention independent",
"# TODO: use information from a calling convention analysis",
"filtered_defs",
"=",
"LiveDefinitions",
"(",
")",
"for"... | If we are not tracing into the function that are called in a real execution, we should properly filter the defs
to account for the behavior of the skipped function at this call site.
This function is a WIP. See TODOs inside.
:param defs:
:return: | [
"If",
"we",
"are",
"not",
"tracing",
"into",
"the",
"function",
"that",
"are",
"called",
"in",
"a",
"real",
"execution",
"we",
"should",
"properly",
"filter",
"the",
"defs",
"to",
"account",
"for",
"the",
"behavior",
"of",
"the",
"skipped",
"function",
"at... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L1484-L1508 | train | Filter out the defs that are not called at real execution. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG.find_definitions | def find_definitions(self, variable, location=None, simplified_graph=True):
"""
Find all definitions of the given variable.
:param SimVariable variable:
:param bool simplified_graph: True if you just want to search in the simplified graph instead of the normal
... | python | def find_definitions(self, variable, location=None, simplified_graph=True):
"""
Find all definitions of the given variable.
:param SimVariable variable:
:param bool simplified_graph: True if you just want to search in the simplified graph instead of the normal
... | [
"def",
"find_definitions",
"(",
"self",
",",
"variable",
",",
"location",
"=",
"None",
",",
"simplified_graph",
"=",
"True",
")",
":",
"if",
"simplified_graph",
":",
"graph",
"=",
"self",
".",
"simplified_data_graph",
"else",
":",
"graph",
"=",
"self",
".",
... | Find all definitions of the given variable.
:param SimVariable variable:
:param bool simplified_graph: True if you just want to search in the simplified graph instead of the normal
graph. Usually the simplified graph suffices for finding definitions of register
... | [
"Find",
"all",
"definitions",
"of",
"the",
"given",
"variable",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L1510-L1538 | train | Find all definitions of the given variable. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG.find_consumers | def find_consumers(self, var_def, simplified_graph=True):
"""
Find all consumers to the specified variable definition.
:param ProgramVariable var_def: The variable definition.
:param bool simplified_graph: True if we want to search in the simplified graph, False otherwise.
:retu... | python | def find_consumers(self, var_def, simplified_graph=True):
"""
Find all consumers to the specified variable definition.
:param ProgramVariable var_def: The variable definition.
:param bool simplified_graph: True if we want to search in the simplified graph, False otherwise.
:retu... | [
"def",
"find_consumers",
"(",
"self",
",",
"var_def",
",",
"simplified_graph",
"=",
"True",
")",
":",
"if",
"simplified_graph",
":",
"graph",
"=",
"self",
".",
"simplified_data_graph",
"else",
":",
"graph",
"=",
"self",
".",
"data_graph",
"if",
"var_def",
"n... | Find all consumers to the specified variable definition.
:param ProgramVariable var_def: The variable definition.
:param bool simplified_graph: True if we want to search in the simplified graph, False otherwise.
:return: A collection of all consumers to the specified variable definition.
... | [
"Find",
"all",
"consumers",
"to",
"the",
"specified",
"variable",
"definition",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L1541-L1578 | train | Find all consumers to the specified variable definition. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG.find_killers | def find_killers(self, var_def, simplified_graph=True):
"""
Find all killers to the specified variable definition.
:param ProgramVariable var_def: The variable definition.
:param bool simplified_graph: True if we want to search in the simplified graph, False otherwise.
:return: ... | python | def find_killers(self, var_def, simplified_graph=True):
"""
Find all killers to the specified variable definition.
:param ProgramVariable var_def: The variable definition.
:param bool simplified_graph: True if we want to search in the simplified graph, False otherwise.
:return: ... | [
"def",
"find_killers",
"(",
"self",
",",
"var_def",
",",
"simplified_graph",
"=",
"True",
")",
":",
"if",
"simplified_graph",
":",
"graph",
"=",
"self",
".",
"simplified_data_graph",
"else",
":",
"graph",
"=",
"self",
".",
"data_graph",
"if",
"var_def",
"not... | Find all killers to the specified variable definition.
:param ProgramVariable var_def: The variable definition.
:param bool simplified_graph: True if we want to search in the simplified graph, False otherwise.
:return: A collection of all killers to the specified variable definition.
:r... | [
"Find",
"all",
"killers",
"to",
"the",
"specified",
"variable",
"definition",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L1581-L1605 | train | Find all killers to the specified variable definition. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/ddg.py | DDG.find_sources | def find_sources(self, var_def, simplified_graph=True):
"""
Find all sources to the specified variable definition.
:param ProgramVariable var_def: The variable definition.
:param bool simplified_graph: True if we want to search in the simplified graph, False otherwise.
:return: ... | python | def find_sources(self, var_def, simplified_graph=True):
"""
Find all sources to the specified variable definition.
:param ProgramVariable var_def: The variable definition.
:param bool simplified_graph: True if we want to search in the simplified graph, False otherwise.
:return: ... | [
"def",
"find_sources",
"(",
"self",
",",
"var_def",
",",
"simplified_graph",
"=",
"True",
")",
":",
"if",
"simplified_graph",
":",
"graph",
"=",
"self",
".",
"simplified_data_graph",
"else",
":",
"graph",
"=",
"self",
".",
"data_graph",
"if",
"var_def",
"not... | Find all sources to the specified variable definition.
:param ProgramVariable var_def: The variable definition.
:param bool simplified_graph: True if we want to search in the simplified graph, False otherwise.
:return: A collection of all sources to the specified variable definition.
:r... | [
"Find",
"all",
"sources",
"to",
"the",
"specified",
"variable",
"definition",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/ddg.py#L1608-L1644 | train | Find all sources to the specified variable definition. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/engines/soot/expressions/newMultiArray.py | SimSootExpr_NewMultiArray.new_array | def new_array(state, element_type, size, default_value_generator=None):
"""
Allocates a new multi array in memory and returns the reference to the base.
"""
size_bounded = SimSootExpr_NewMultiArray._bound_multi_array_size(state, size)
# return the reference of the array base
... | python | def new_array(state, element_type, size, default_value_generator=None):
"""
Allocates a new multi array in memory and returns the reference to the base.
"""
size_bounded = SimSootExpr_NewMultiArray._bound_multi_array_size(state, size)
# return the reference of the array base
... | [
"def",
"new_array",
"(",
"state",
",",
"element_type",
",",
"size",
",",
"default_value_generator",
"=",
"None",
")",
":",
"size_bounded",
"=",
"SimSootExpr_NewMultiArray",
".",
"_bound_multi_array_size",
"(",
"state",
",",
"size",
")",
"# return the reference of the ... | Allocates a new multi array in memory and returns the reference to the base. | [
"Allocates",
"a",
"new",
"multi",
"array",
"in",
"memory",
"and",
"returns",
"the",
"reference",
"to",
"the",
"base",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/soot/expressions/newMultiArray.py#L21-L31 | train | Allocates a new multi array in memory and returns the reference to the base. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/concretization_strategies/__init__.py | SimConcretizationStrategy._min | def _min(self, memory, addr, **kwargs):
"""
Gets the minimum solution of an address.
"""
return memory.state.solver.min(addr, exact=kwargs.pop('exact', self._exact), **kwargs) | python | def _min(self, memory, addr, **kwargs):
"""
Gets the minimum solution of an address.
"""
return memory.state.solver.min(addr, exact=kwargs.pop('exact', self._exact), **kwargs) | [
"def",
"_min",
"(",
"self",
",",
"memory",
",",
"addr",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"memory",
".",
"state",
".",
"solver",
".",
"min",
"(",
"addr",
",",
"exact",
"=",
"kwargs",
".",
"pop",
"(",
"'exact'",
",",
"self",
".",
"_exac... | Gets the minimum solution of an address. | [
"Gets",
"the",
"minimum",
"solution",
"of",
"an",
"address",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/concretization_strategies/__init__.py#L21-L25 | train | Gets the minimum solution of an address. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/concretization_strategies/__init__.py | SimConcretizationStrategy._max | def _max(self, memory, addr, **kwargs):
"""
Gets the maximum solution of an address.
"""
return memory.state.solver.max(addr, exact=kwargs.pop('exact', self._exact), **kwargs) | python | def _max(self, memory, addr, **kwargs):
"""
Gets the maximum solution of an address.
"""
return memory.state.solver.max(addr, exact=kwargs.pop('exact', self._exact), **kwargs) | [
"def",
"_max",
"(",
"self",
",",
"memory",
",",
"addr",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"memory",
".",
"state",
".",
"solver",
".",
"max",
"(",
"addr",
",",
"exact",
"=",
"kwargs",
".",
"pop",
"(",
"'exact'",
",",
"self",
".",
"_exac... | Gets the maximum solution of an address. | [
"Gets",
"the",
"maximum",
"solution",
"of",
"an",
"address",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/concretization_strategies/__init__.py#L27-L31 | train | Gets the maximum solution of an address. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/concretization_strategies/__init__.py | SimConcretizationStrategy._any | def _any(self, memory, addr, **kwargs):
"""
Gets any solution of an address.
"""
return memory.state.solver.eval(addr, exact=kwargs.pop('exact', self._exact), **kwargs) | python | def _any(self, memory, addr, **kwargs):
"""
Gets any solution of an address.
"""
return memory.state.solver.eval(addr, exact=kwargs.pop('exact', self._exact), **kwargs) | [
"def",
"_any",
"(",
"self",
",",
"memory",
",",
"addr",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"memory",
".",
"state",
".",
"solver",
".",
"eval",
"(",
"addr",
",",
"exact",
"=",
"kwargs",
".",
"pop",
"(",
"'exact'",
",",
"self",
".",
"_exa... | Gets any solution of an address. | [
"Gets",
"any",
"solution",
"of",
"an",
"address",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/concretization_strategies/__init__.py#L33-L37 | train | Gets any solution of an address. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/concretization_strategies/__init__.py | SimConcretizationStrategy._eval | def _eval(self, memory, addr, n, **kwargs):
"""
Gets n solutions for an address.
"""
return memory.state.solver.eval_upto(addr, n, exact=kwargs.pop('exact', self._exact), **kwargs) | python | def _eval(self, memory, addr, n, **kwargs):
"""
Gets n solutions for an address.
"""
return memory.state.solver.eval_upto(addr, n, exact=kwargs.pop('exact', self._exact), **kwargs) | [
"def",
"_eval",
"(",
"self",
",",
"memory",
",",
"addr",
",",
"n",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"memory",
".",
"state",
".",
"solver",
".",
"eval_upto",
"(",
"addr",
",",
"n",
",",
"exact",
"=",
"kwargs",
".",
"pop",
"(",
"'exact'... | Gets n solutions for an address. | [
"Gets",
"n",
"solutions",
"for",
"an",
"address",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/concretization_strategies/__init__.py#L39-L43 | train | Evaluate the current state of the current solver. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/concretization_strategies/__init__.py | SimConcretizationStrategy._range | def _range(self, memory, addr, **kwargs):
"""
Gets the (min, max) range of solutions for an address.
"""
return (self._min(memory, addr, **kwargs), self._max(memory, addr, **kwargs)) | python | def _range(self, memory, addr, **kwargs):
"""
Gets the (min, max) range of solutions for an address.
"""
return (self._min(memory, addr, **kwargs), self._max(memory, addr, **kwargs)) | [
"def",
"_range",
"(",
"self",
",",
"memory",
",",
"addr",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"(",
"self",
".",
"_min",
"(",
"memory",
",",
"addr",
",",
"*",
"*",
"kwargs",
")",
",",
"self",
".",
"_max",
"(",
"memory",
",",
"addr",
","... | Gets the (min, max) range of solutions for an address. | [
"Gets",
"the",
"(",
"min",
"max",
")",
"range",
"of",
"solutions",
"for",
"an",
"address",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/concretization_strategies/__init__.py#L45-L49 | train | Gets the min max range of solutions for an address. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/concretization_strategies/__init__.py | SimConcretizationStrategy.concretize | def concretize(self, memory, addr):
"""
Concretizes the address into a list of values.
If this strategy cannot handle this address, returns None.
"""
if self._filter is None or self._filter(memory, addr):
return self._concretize(memory, addr) | python | def concretize(self, memory, addr):
"""
Concretizes the address into a list of values.
If this strategy cannot handle this address, returns None.
"""
if self._filter is None or self._filter(memory, addr):
return self._concretize(memory, addr) | [
"def",
"concretize",
"(",
"self",
",",
"memory",
",",
"addr",
")",
":",
"if",
"self",
".",
"_filter",
"is",
"None",
"or",
"self",
".",
"_filter",
"(",
"memory",
",",
"addr",
")",
":",
"return",
"self",
".",
"_concretize",
"(",
"memory",
",",
"addr",
... | Concretizes the address into a list of values.
If this strategy cannot handle this address, returns None. | [
"Concretizes",
"the",
"address",
"into",
"a",
"list",
"of",
"values",
".",
"If",
"this",
"strategy",
"cannot",
"handle",
"this",
"address",
"returns",
"None",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/concretization_strategies/__init__.py#L51-L57 | train | Concretizes the address into a list of values. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_utils.py | CFGUtils.find_merge_points | def find_merge_points(function_addr, function_endpoints, graph): # pylint:disable=unused-argument
"""
Given a local transition graph of a function, find all merge points inside, and then perform a
quasi-topological sort of those merge points.
A merge point might be one of the following... | python | def find_merge_points(function_addr, function_endpoints, graph): # pylint:disable=unused-argument
"""
Given a local transition graph of a function, find all merge points inside, and then perform a
quasi-topological sort of those merge points.
A merge point might be one of the following... | [
"def",
"find_merge_points",
"(",
"function_addr",
",",
"function_endpoints",
",",
"graph",
")",
":",
"# pylint:disable=unused-argument",
"merge_points",
"=",
"set",
"(",
")",
"for",
"node",
"in",
"graph",
".",
"nodes",
"(",
")",
":",
"if",
"graph",
".",
"in_de... | Given a local transition graph of a function, find all merge points inside, and then perform a
quasi-topological sort of those merge points.
A merge point might be one of the following cases:
- two or more paths come together, and ends at the same address.
- end of the current function
... | [
"Given",
"a",
"local",
"transition",
"graph",
"of",
"a",
"function",
"find",
"all",
"merge",
"points",
"inside",
"and",
"then",
"perform",
"a",
"quasi",
"-",
"topological",
"sort",
"of",
"those",
"merge",
"points",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_utils.py#L25-L50 | train | Given a local transition graph of a function find all merge points inside and then perform quasi - topological sort of those merge points. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_utils.py | CFGUtils.find_widening_points | def find_widening_points(function_addr, function_endpoints, graph): # pylint: disable=unused-argument
"""
Given a local transition graph of a function, find all widening points inside.
Correctly choosing widening points is very important in order to not lose too much information during static
... | python | def find_widening_points(function_addr, function_endpoints, graph): # pylint: disable=unused-argument
"""
Given a local transition graph of a function, find all widening points inside.
Correctly choosing widening points is very important in order to not lose too much information during static
... | [
"def",
"find_widening_points",
"(",
"function_addr",
",",
"function_endpoints",
",",
"graph",
")",
":",
"# pylint: disable=unused-argument",
"sccs",
"=",
"networkx",
".",
"strongly_connected_components",
"(",
"graph",
")",
"widening_addrs",
"=",
"set",
"(",
")",
"for"... | Given a local transition graph of a function, find all widening points inside.
Correctly choosing widening points is very important in order to not lose too much information during static
analysis. We mainly consider merge points that has at least one loop back edges coming in as widening points.
... | [
"Given",
"a",
"local",
"transition",
"graph",
"of",
"a",
"function",
"find",
"all",
"widening",
"points",
"inside",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_utils.py#L53-L84 | train | Given a local transition graph of a function find all widening points inside. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_utils.py | CFGUtils.reverse_post_order_sort_nodes | def reverse_post_order_sort_nodes(graph, nodes=None):
"""
Sort a given set of nodes in reverse post ordering.
:param networkx.DiGraph graph: A local transition graph of a function.
:param iterable nodes: A collection of nodes to sort.
:return: A list of sorted nodes.
:rt... | python | def reverse_post_order_sort_nodes(graph, nodes=None):
"""
Sort a given set of nodes in reverse post ordering.
:param networkx.DiGraph graph: A local transition graph of a function.
:param iterable nodes: A collection of nodes to sort.
:return: A list of sorted nodes.
:rt... | [
"def",
"reverse_post_order_sort_nodes",
"(",
"graph",
",",
"nodes",
"=",
"None",
")",
":",
"post_order",
"=",
"networkx",
".",
"dfs_postorder_nodes",
"(",
"graph",
")",
"if",
"nodes",
"is",
"None",
":",
"return",
"reversed",
"(",
"list",
"(",
"post_order",
"... | Sort a given set of nodes in reverse post ordering.
:param networkx.DiGraph graph: A local transition graph of a function.
:param iterable nodes: A collection of nodes to sort.
:return: A list of sorted nodes.
:rtype: list | [
"Sort",
"a",
"given",
"set",
"of",
"nodes",
"in",
"reverse",
"post",
"ordering",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_utils.py#L87-L105 | train | Sort a given set of nodes in reverse post ordering. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_utils.py | CFGUtils.quasi_topological_sort_nodes | def quasi_topological_sort_nodes(graph, nodes=None):
"""
Sort a given set of nodes from a graph based on the following rules:
# - if A -> B and not B -> A, then we have A < B
# - if A -> B and B -> A, then the ordering is undefined
Following the above rules gives us a quasi-top... | python | def quasi_topological_sort_nodes(graph, nodes=None):
"""
Sort a given set of nodes from a graph based on the following rules:
# - if A -> B and not B -> A, then we have A < B
# - if A -> B and B -> A, then the ordering is undefined
Following the above rules gives us a quasi-top... | [
"def",
"quasi_topological_sort_nodes",
"(",
"graph",
",",
"nodes",
"=",
"None",
")",
":",
"# fast path for single node graphs",
"if",
"graph",
".",
"number_of_nodes",
"(",
")",
"==",
"1",
":",
"return",
"graph",
".",
"nodes",
"(",
")",
"# make a copy to the graph ... | Sort a given set of nodes from a graph based on the following rules:
# - if A -> B and not B -> A, then we have A < B
# - if A -> B and B -> A, then the ordering is undefined
Following the above rules gives us a quasi-topological sorting of nodes in the graph. It also works for cyclic
... | [
"Sort",
"a",
"given",
"set",
"of",
"nodes",
"from",
"a",
"graph",
"based",
"on",
"the",
"following",
"rules",
":"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_utils.py#L108-L171 | train | This function sorts a given set of nodes in a given graph. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_utils.py | CFGUtils._append_scc | def _append_scc(graph, ordered_nodes, scc):
"""
Append all nodes from a strongly connected component to a list of ordered nodes and ensure the topological
order.
:param networkx.DiGraph graph: The graph where all nodes belong to.
:param list ordered_nodes: Ordered nodes.
... | python | def _append_scc(graph, ordered_nodes, scc):
"""
Append all nodes from a strongly connected component to a list of ordered nodes and ensure the topological
order.
:param networkx.DiGraph graph: The graph where all nodes belong to.
:param list ordered_nodes: Ordered nodes.
... | [
"def",
"_append_scc",
"(",
"graph",
",",
"ordered_nodes",
",",
"scc",
")",
":",
"# find the first node in the strongly connected component that is the successor to any node in ordered_nodes",
"loop_head",
"=",
"None",
"for",
"parent_node",
"in",
"reversed",
"(",
"ordered_nodes"... | Append all nodes from a strongly connected component to a list of ordered nodes and ensure the topological
order.
:param networkx.DiGraph graph: The graph where all nodes belong to.
:param list ordered_nodes: Ordered nodes.
:param iterable scc: A set of nodes that forms a ... | [
"Append",
"all",
"nodes",
"from",
"a",
"strongly",
"connected",
"component",
"to",
"a",
"list",
"of",
"ordered",
"nodes",
"and",
"ensure",
"the",
"topological",
"order",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_utils.py#L182-L212 | train | Append all nodes from a strongly connected component to a list of ordered nodes and ensure the topological sort order. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.mulpyplex | def mulpyplex(self, *stashes):
"""
Mulpyplex across several stashes.
:param stashes: the stashes to mulpyplex
:return: a mulpyplexed list of states from the stashes in question, in the specified order
"""
return mulpyplexer.MP(list(itertools.chain.from_iterable(self._st... | python | def mulpyplex(self, *stashes):
"""
Mulpyplex across several stashes.
:param stashes: the stashes to mulpyplex
:return: a mulpyplexed list of states from the stashes in question, in the specified order
"""
return mulpyplexer.MP(list(itertools.chain.from_iterable(self._st... | [
"def",
"mulpyplex",
"(",
"self",
",",
"*",
"stashes",
")",
":",
"return",
"mulpyplexer",
".",
"MP",
"(",
"list",
"(",
"itertools",
".",
"chain",
".",
"from_iterable",
"(",
"self",
".",
"_stashes",
"[",
"s",
"]",
"for",
"s",
"in",
"stashes",
")",
")",... | Mulpyplex across several stashes.
:param stashes: the stashes to mulpyplex
:return: a mulpyplexed list of states from the stashes in question, in the specified order | [
"Mulpyplex",
"across",
"several",
"stashes",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L144-L152 | train | Mulpyplex across several stashes. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.copy | def copy(self, deep=False): # pylint: disable=arguments-differ
"""
Make a copy of this simulation manager. Pass ``deep=True`` to copy all the states in it as well.
"""
simgr = SimulationManager(self._project,
stashes=self._copy_stashes(deep=deep),
... | python | def copy(self, deep=False): # pylint: disable=arguments-differ
"""
Make a copy of this simulation manager. Pass ``deep=True`` to copy all the states in it as well.
"""
simgr = SimulationManager(self._project,
stashes=self._copy_stashes(deep=deep),
... | [
"def",
"copy",
"(",
"self",
",",
"deep",
"=",
"False",
")",
":",
"# pylint: disable=arguments-differ",
"simgr",
"=",
"SimulationManager",
"(",
"self",
".",
"_project",
",",
"stashes",
"=",
"self",
".",
"_copy_stashes",
"(",
"deep",
"=",
"deep",
")",
",",
"... | Make a copy of this simulation manager. Pass ``deep=True`` to copy all the states in it as well. | [
"Make",
"a",
"copy",
"of",
"this",
"simulation",
"manager",
".",
"Pass",
"deep",
"=",
"True",
"to",
"copy",
"all",
"the",
"states",
"in",
"it",
"as",
"well",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L154-L165 | train | Make a copy of this simulation manager. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.use_technique | def use_technique(self, tech):
"""
Use an exploration technique with this SimulationManager.
Techniques can be found in :mod:`angr.exploration_techniques`.
:param tech: An ExplorationTechnique object that contains code to modify
this SimulationManager's behav... | python | def use_technique(self, tech):
"""
Use an exploration technique with this SimulationManager.
Techniques can be found in :mod:`angr.exploration_techniques`.
:param tech: An ExplorationTechnique object that contains code to modify
this SimulationManager's behav... | [
"def",
"use_technique",
"(",
"self",
",",
"tech",
")",
":",
"if",
"not",
"isinstance",
"(",
"tech",
",",
"ExplorationTechnique",
")",
":",
"raise",
"SimulationManagerError",
"# XXX: as promised",
"tech",
".",
"project",
"=",
"self",
".",
"_project",
"tech",
".... | Use an exploration technique with this SimulationManager.
Techniques can be found in :mod:`angr.exploration_techniques`.
:param tech: An ExplorationTechnique object that contains code to modify
this SimulationManager's behavior.
:type tech: ExplorationTechnique
... | [
"Use",
"an",
"exploration",
"technique",
"with",
"this",
"SimulationManager",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L171-L191 | train | Use an exploration technique with this SimulationManager. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.remove_technique | def remove_technique(self, tech):
"""
Remove an exploration technique from a list of active techniques.
:param tech: An ExplorationTechnique object.
:type tech: ExplorationTechnique
"""
if not isinstance(tech, ExplorationTechnique):
raise SimulationMan... | python | def remove_technique(self, tech):
"""
Remove an exploration technique from a list of active techniques.
:param tech: An ExplorationTechnique object.
:type tech: ExplorationTechnique
"""
if not isinstance(tech, ExplorationTechnique):
raise SimulationMan... | [
"def",
"remove_technique",
"(",
"self",
",",
"tech",
")",
":",
"if",
"not",
"isinstance",
"(",
"tech",
",",
"ExplorationTechnique",
")",
":",
"raise",
"SimulationManagerError",
"def",
"_is_overriden",
"(",
"name",
")",
":",
"return",
"getattr",
"(",
"tech",
... | Remove an exploration technique from a list of active techniques.
:param tech: An ExplorationTechnique object.
:type tech: ExplorationTechnique | [
"Remove",
"an",
"exploration",
"technique",
"from",
"a",
"list",
"of",
"active",
"techniques",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L193-L211 | train | Removes an exploration technique from a list of active techniques. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.explore | def explore(self, stash='active', n=None, find=None, avoid=None, find_stash='found', avoid_stash='avoid', cfg=None,
num_find=1, **kwargs):
"""
Tick stash "stash" forward (up to "n" times or until "num_find" states are found), looking for condition "find",
avoiding condition "avoi... | python | def explore(self, stash='active', n=None, find=None, avoid=None, find_stash='found', avoid_stash='avoid', cfg=None,
num_find=1, **kwargs):
"""
Tick stash "stash" forward (up to "n" times or until "num_find" states are found), looking for condition "find",
avoiding condition "avoi... | [
"def",
"explore",
"(",
"self",
",",
"stash",
"=",
"'active'",
",",
"n",
"=",
"None",
",",
"find",
"=",
"None",
",",
"avoid",
"=",
"None",
",",
"find_stash",
"=",
"'found'",
",",
"avoid_stash",
"=",
"'avoid'",
",",
"cfg",
"=",
"None",
",",
"num_find",... | Tick stash "stash" forward (up to "n" times or until "num_find" states are found), looking for condition "find",
avoiding condition "avoid". Stores found states into "find_stash' and avoided states into "avoid_stash".
The "find" and "avoid" parameters may be any of:
- An address to find
... | [
"Tick",
"stash",
"stash",
"forward",
"(",
"up",
"to",
"n",
"times",
"or",
"until",
"num_find",
"states",
"are",
"found",
")",
"looking",
"for",
"condition",
"find",
"avoiding",
"condition",
"avoid",
".",
"Stores",
"found",
"states",
"into",
"find_stash",
"an... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L217-L241 | train | Explore the current state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.run | def run(self, stash='active', n=None, until=None, **kwargs):
"""
Run until the SimulationManager has reached a completed state, according to
the current exploration techniques. If no exploration techniques that define a completion
state are being used, run until there is nothing left to ... | python | def run(self, stash='active', n=None, until=None, **kwargs):
"""
Run until the SimulationManager has reached a completed state, according to
the current exploration techniques. If no exploration techniques that define a completion
state are being used, run until there is nothing left to ... | [
"def",
"run",
"(",
"self",
",",
"stash",
"=",
"'active'",
",",
"n",
"=",
"None",
",",
"until",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"for",
"_",
"in",
"(",
"itertools",
".",
"count",
"(",
")",
"if",
"n",
"is",
"None",
"else",
"range",... | Run until the SimulationManager has reached a completed state, according to
the current exploration techniques. If no exploration techniques that define a completion
state are being used, run until there is nothing left to run.
:param stash: Operate on this stash
:param n: ... | [
"Run",
"until",
"the",
"SimulationManager",
"has",
"reached",
"a",
"completed",
"state",
"according",
"to",
"the",
"current",
"exploration",
"techniques",
".",
"If",
"no",
"exploration",
"techniques",
"that",
"define",
"a",
"completion",
"state",
"are",
"being",
... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L243-L263 | train | Runs the simulation manager until the current state is reached. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.complete | def complete(self):
"""
Returns whether or not this manager has reached a "completed" state.
"""
if not self._techniques:
return False
if not any(tech._is_overriden('complete') for tech in self._techniques):
return False
return self.completion_mode... | python | def complete(self):
"""
Returns whether or not this manager has reached a "completed" state.
"""
if not self._techniques:
return False
if not any(tech._is_overriden('complete') for tech in self._techniques):
return False
return self.completion_mode... | [
"def",
"complete",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"_techniques",
":",
"return",
"False",
"if",
"not",
"any",
"(",
"tech",
".",
"_is_overriden",
"(",
"'complete'",
")",
"for",
"tech",
"in",
"self",
".",
"_techniques",
")",
":",
"return... | Returns whether or not this manager has reached a "completed" state. | [
"Returns",
"whether",
"or",
"not",
"this",
"manager",
"has",
"reached",
"a",
"completed",
"state",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L265-L273 | train | Returns whether or not this manager has reached a completed state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.step | def step(self, stash='active', n=None, selector_func=None, step_func=None,
successor_func=None, until=None, filter_func=None, **run_args):
"""
Step a stash of states forward and categorize the successors appropriately.
The parameters to this function allow you to control everything... | python | def step(self, stash='active', n=None, selector_func=None, step_func=None,
successor_func=None, until=None, filter_func=None, **run_args):
"""
Step a stash of states forward and categorize the successors appropriately.
The parameters to this function allow you to control everything... | [
"def",
"step",
"(",
"self",
",",
"stash",
"=",
"'active'",
",",
"n",
"=",
"None",
",",
"selector_func",
"=",
"None",
",",
"step_func",
"=",
"None",
",",
"successor_func",
"=",
"None",
",",
"until",
"=",
"None",
",",
"filter_func",
"=",
"None",
",",
"... | Step a stash of states forward and categorize the successors appropriately.
The parameters to this function allow you to control everything about the stepping and
categorization process.
:param stash: The name of the stash to step (default: 'active')
:param selector_func: I... | [
"Step",
"a",
"stash",
"of",
"states",
"forward",
"and",
"categorize",
"the",
"successors",
"appropriately",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L275-L374 | train | Step a stash of states forward and categorize the successors appropriately. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.step_state | def step_state(self, state, successor_func=None, **run_args):
"""
Don't use this function manually - it is meant to interface with exploration techniques.
"""
try:
successors = self.successors(state, successor_func=successor_func, **run_args)
stashes = {None: succ... | python | def step_state(self, state, successor_func=None, **run_args):
"""
Don't use this function manually - it is meant to interface with exploration techniques.
"""
try:
successors = self.successors(state, successor_func=successor_func, **run_args)
stashes = {None: succ... | [
"def",
"step_state",
"(",
"self",
",",
"state",
",",
"successor_func",
"=",
"None",
",",
"*",
"*",
"run_args",
")",
":",
"try",
":",
"successors",
"=",
"self",
".",
"successors",
"(",
"state",
",",
"successor_func",
"=",
"successor_func",
",",
"*",
"*",
... | Don't use this function manually - it is meant to interface with exploration techniques. | [
"Don",
"t",
"use",
"this",
"function",
"manually",
"-",
"it",
"is",
"meant",
"to",
"interface",
"with",
"exploration",
"techniques",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L376-L396 | train | Return a dict of state and successors. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.successors | def successors(self, state, successor_func=None, **run_args):
"""
Don't use this function manually - it is meant to interface with exploration techniques.
"""
if successor_func is not None:
return successor_func(state, **run_args)
return self._project.factory.successo... | python | def successors(self, state, successor_func=None, **run_args):
"""
Don't use this function manually - it is meant to interface with exploration techniques.
"""
if successor_func is not None:
return successor_func(state, **run_args)
return self._project.factory.successo... | [
"def",
"successors",
"(",
"self",
",",
"state",
",",
"successor_func",
"=",
"None",
",",
"*",
"*",
"run_args",
")",
":",
"if",
"successor_func",
"is",
"not",
"None",
":",
"return",
"successor_func",
"(",
"state",
",",
"*",
"*",
"run_args",
")",
"return",... | Don't use this function manually - it is meant to interface with exploration techniques. | [
"Don",
"t",
"use",
"this",
"function",
"manually",
"-",
"it",
"is",
"meant",
"to",
"interface",
"with",
"exploration",
"techniques",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L414-L420 | train | Returns the set of successors for the given state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.prune | def prune(self, filter_func=None, from_stash='active', to_stash='pruned'):
"""
Prune unsatisfiable states from a stash.
This function will move all unsatisfiable states in the given stash into a different stash.
:param filter_func: Only prune states that match this filter.
:par... | python | def prune(self, filter_func=None, from_stash='active', to_stash='pruned'):
"""
Prune unsatisfiable states from a stash.
This function will move all unsatisfiable states in the given stash into a different stash.
:param filter_func: Only prune states that match this filter.
:par... | [
"def",
"prune",
"(",
"self",
",",
"filter_func",
"=",
"None",
",",
"from_stash",
"=",
"'active'",
",",
"to_stash",
"=",
"'pruned'",
")",
":",
"def",
"_prune_filter",
"(",
"state",
")",
":",
"to_prune",
"=",
"not",
"filter_func",
"or",
"filter_func",
"(",
... | Prune unsatisfiable states from a stash.
This function will move all unsatisfiable states in the given stash into a different stash.
:param filter_func: Only prune states that match this filter.
:param from_stash: Prune states from this stash. (default: 'active')
:param to_stash: P... | [
"Prune",
"unsatisfiable",
"states",
"from",
"a",
"stash",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L426-L449 | train | Moves all unsatisfiable states in a given stash into a different stash. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.move | def move(self, from_stash, to_stash, filter_func=None):
"""
Move states from one stash to another.
:param from_stash: Take matching states from this stash.
:param to_stash: Put matching states into this stash.
:param filter_func: Stash states that match this filter. Should b... | python | def move(self, from_stash, to_stash, filter_func=None):
"""
Move states from one stash to another.
:param from_stash: Take matching states from this stash.
:param to_stash: Put matching states into this stash.
:param filter_func: Stash states that match this filter. Should b... | [
"def",
"move",
"(",
"self",
",",
"from_stash",
",",
"to_stash",
",",
"filter_func",
"=",
"None",
")",
":",
"filter_func",
"=",
"filter_func",
"or",
"(",
"lambda",
"s",
":",
"True",
")",
"stash_splitter",
"=",
"lambda",
"states",
":",
"reversed",
"(",
"se... | Move states from one stash to another.
:param from_stash: Take matching states from this stash.
:param to_stash: Put matching states into this stash.
:param filter_func: Stash states that match this filter. Should be a function that takes
a state and returns True... | [
"Move",
"states",
"from",
"one",
"stash",
"to",
"another",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L461-L475 | train | Moves states from one stash to another. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.stash | def stash(self, filter_func=None, from_stash='active', to_stash='stashed'):
"""
Stash some states. This is an alias for move(), with defaults for the stashes.
:param filter_func: Stash states that match this filter. Should be a function that
takes a state and returns... | python | def stash(self, filter_func=None, from_stash='active', to_stash='stashed'):
"""
Stash some states. This is an alias for move(), with defaults for the stashes.
:param filter_func: Stash states that match this filter. Should be a function that
takes a state and returns... | [
"def",
"stash",
"(",
"self",
",",
"filter_func",
"=",
"None",
",",
"from_stash",
"=",
"'active'",
",",
"to_stash",
"=",
"'stashed'",
")",
":",
"return",
"self",
".",
"move",
"(",
"from_stash",
",",
"to_stash",
",",
"filter_func",
"=",
"filter_func",
")"
] | Stash some states. This is an alias for move(), with defaults for the stashes.
:param filter_func: Stash states that match this filter. Should be a function that
takes a state and returns True or False. (default: stash all states)
:param from_stash: Take matching states fro... | [
"Stash",
"some",
"states",
".",
"This",
"is",
"an",
"alias",
"for",
"move",
"()",
"with",
"defaults",
"for",
"the",
"stashes",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L477-L489 | train | Moves some states from one stash to another. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.unstash | def unstash(self, filter_func=None, to_stash='active', from_stash='stashed'):
"""
Unstash some states. This is an alias for move(), with defaults for the stashes.
:param filter_func: Unstash states that match this filter. Should be a function that
takes a state and r... | python | def unstash(self, filter_func=None, to_stash='active', from_stash='stashed'):
"""
Unstash some states. This is an alias for move(), with defaults for the stashes.
:param filter_func: Unstash states that match this filter. Should be a function that
takes a state and r... | [
"def",
"unstash",
"(",
"self",
",",
"filter_func",
"=",
"None",
",",
"to_stash",
"=",
"'active'",
",",
"from_stash",
"=",
"'stashed'",
")",
":",
"return",
"self",
".",
"move",
"(",
"from_stash",
",",
"to_stash",
",",
"filter_func",
"=",
"filter_func",
")"
... | Unstash some states. This is an alias for move(), with defaults for the stashes.
:param filter_func: Unstash states that match this filter. Should be a function that
takes a state and returns True or False. (default: unstash all states)
:param from_stash: take matching stat... | [
"Unstash",
"some",
"states",
".",
"This",
"is",
"an",
"alias",
"for",
"move",
"()",
"with",
"defaults",
"for",
"the",
"stashes",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L491-L503 | train | Unstash some states from one stash to another. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.drop | def drop(self, filter_func=None, stash='active'):
"""
Drops states from a stash. This is an alias for move(), with defaults for the stashes.
:param filter_func: Drop states that match this filter. Should be a function that takes
a state and returns True or False. (de... | python | def drop(self, filter_func=None, stash='active'):
"""
Drops states from a stash. This is an alias for move(), with defaults for the stashes.
:param filter_func: Drop states that match this filter. Should be a function that takes
a state and returns True or False. (de... | [
"def",
"drop",
"(",
"self",
",",
"filter_func",
"=",
"None",
",",
"stash",
"=",
"'active'",
")",
":",
"return",
"self",
".",
"move",
"(",
"stash",
",",
"self",
".",
"DROP",
",",
"filter_func",
"=",
"filter_func",
")"
] | Drops states from a stash. This is an alias for move(), with defaults for the stashes.
:param filter_func: Drop states that match this filter. Should be a function that takes
a state and returns True or False. (default: drop all states)
:param stash: Drop matching stat... | [
"Drops",
"states",
"from",
"a",
"stash",
".",
"This",
"is",
"an",
"alias",
"for",
"move",
"()",
"with",
"defaults",
"for",
"the",
"stashes",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L505-L516 | train | Drop states from a stash. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.apply | def apply(self, state_func=None, stash_func=None, stash='active', to_stash=None):
"""
Applies a given function to a given stash.
:param state_func: A function to apply to every state. Should take a state and return a state.
The returned state will take the place of ... | python | def apply(self, state_func=None, stash_func=None, stash='active', to_stash=None):
"""
Applies a given function to a given stash.
:param state_func: A function to apply to every state. Should take a state and return a state.
The returned state will take the place of ... | [
"def",
"apply",
"(",
"self",
",",
"state_func",
"=",
"None",
",",
"stash_func",
"=",
"None",
",",
"stash",
"=",
"'active'",
",",
"to_stash",
"=",
"None",
")",
":",
"to_stash",
"=",
"to_stash",
"or",
"stash",
"def",
"_stash_splitter",
"(",
"states",
")",
... | Applies a given function to a given stash.
:param state_func: A function to apply to every state. Should take a state and return a state.
The returned state will take the place of the old state. If the function
*doesn't* return a state, the old state wil... | [
"Applies",
"a",
"given",
"function",
"to",
"a",
"given",
"stash",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L518-L555 | train | Applies a given function to every state in a given stash. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.split | def split(self, stash_splitter=None, stash_ranker=None, state_ranker=None,
limit=8, from_stash='active', to_stash='stashed'):
"""
Split a stash of states into two stashes depending on the specified options.
The stash from_stash will be split into two stashes depending on the other... | python | def split(self, stash_splitter=None, stash_ranker=None, state_ranker=None,
limit=8, from_stash='active', to_stash='stashed'):
"""
Split a stash of states into two stashes depending on the specified options.
The stash from_stash will be split into two stashes depending on the other... | [
"def",
"split",
"(",
"self",
",",
"stash_splitter",
"=",
"None",
",",
"stash_ranker",
"=",
"None",
",",
"state_ranker",
"=",
"None",
",",
"limit",
"=",
"8",
",",
"from_stash",
"=",
"'active'",
",",
"to_stash",
"=",
"'stashed'",
")",
":",
"states",
"=",
... | Split a stash of states into two stashes depending on the specified options.
The stash from_stash will be split into two stashes depending on the other options
passed in. If to_stash is provided, the second stash will be written there.
stash_splitter overrides stash_ranker, which in turn overr... | [
"Split",
"a",
"stash",
"of",
"states",
"into",
"two",
"stashes",
"depending",
"on",
"the",
"specified",
"options",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L557-L602 | train | Splits a stash into two states. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager.merge | def merge(self, merge_func=None, merge_key=None, stash='active'):
"""
Merge the states in a given stash.
:param stash: The stash (default: 'active')
:param merge_func: If provided, instead of using state.merge, call this function with
the states as the... | python | def merge(self, merge_func=None, merge_key=None, stash='active'):
"""
Merge the states in a given stash.
:param stash: The stash (default: 'active')
:param merge_func: If provided, instead of using state.merge, call this function with
the states as the... | [
"def",
"merge",
"(",
"self",
",",
"merge_func",
"=",
"None",
",",
"merge_key",
"=",
"None",
",",
"stash",
"=",
"'active'",
")",
":",
"self",
".",
"prune",
"(",
"from_stash",
"=",
"stash",
")",
"to_merge",
"=",
"self",
".",
"_fetch_states",
"(",
"stash"... | Merge the states in a given stash.
:param stash: The stash (default: 'active')
:param merge_func: If provided, instead of using state.merge, call this function with
the states as the argument. Should return the merged state.
:param merge_key: If provided, sh... | [
"Merge",
"the",
"states",
"in",
"a",
"given",
"stash",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L610-L648 | train | Merge the states in a given stash. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | SimulationManager._merge_states | def _merge_states(self, states):
"""
Merges a list of states.
:param states: the states to merge
:returns SimState: the resulting state
"""
if self._hierarchy:
optimal, common_history, others = self._hierarchy.most_mergeable(states)
else:
... | python | def _merge_states(self, states):
"""
Merges a list of states.
:param states: the states to merge
:returns SimState: the resulting state
"""
if self._hierarchy:
optimal, common_history, others = self._hierarchy.most_mergeable(states)
else:
... | [
"def",
"_merge_states",
"(",
"self",
",",
"states",
")",
":",
"if",
"self",
".",
"_hierarchy",
":",
"optimal",
",",
"common_history",
",",
"others",
"=",
"self",
".",
"_hierarchy",
".",
"most_mergeable",
"(",
"states",
")",
"else",
":",
"optimal",
",",
"... | Merges a list of states.
:param states: the states to merge
:returns SimState: the resulting state | [
"Merges",
"a",
"list",
"of",
"states",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L684-L726 | train | Merges a list of states into a single state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_manager.py | ErrorRecord.debug | def debug(self):
"""
Launch a postmortem debug shell at the site of the error.
"""
try:
__import__('ipdb').post_mortem(self.traceback)
except ImportError:
__import__('pdb').post_mortem(self.traceback) | python | def debug(self):
"""
Launch a postmortem debug shell at the site of the error.
"""
try:
__import__('ipdb').post_mortem(self.traceback)
except ImportError:
__import__('pdb').post_mortem(self.traceback) | [
"def",
"debug",
"(",
"self",
")",
":",
"try",
":",
"__import__",
"(",
"'ipdb'",
")",
".",
"post_mortem",
"(",
"self",
".",
"traceback",
")",
"except",
"ImportError",
":",
"__import__",
"(",
"'pdb'",
")",
".",
"post_mortem",
"(",
"self",
".",
"traceback",... | Launch a postmortem debug shell at the site of the error. | [
"Launch",
"a",
"postmortem",
"debug",
"shell",
"at",
"the",
"site",
"of",
"the",
"error",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_manager.py#L787-L794 | train | Launch a postmortem debug shell at the site of the error. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/sim_variable.py | SimVariableSet.complement | def complement(self, other):
"""
Calculate the complement of `self` and `other`.
:param other: Another SimVariableSet instance.
:return: The complement result.
"""
s = SimVariableSet()
s.register_variables = self.register_variables - other.register_vari... | python | def complement(self, other):
"""
Calculate the complement of `self` and `other`.
:param other: Another SimVariableSet instance.
:return: The complement result.
"""
s = SimVariableSet()
s.register_variables = self.register_variables - other.register_vari... | [
"def",
"complement",
"(",
"self",
",",
"other",
")",
":",
"s",
"=",
"SimVariableSet",
"(",
")",
"s",
".",
"register_variables",
"=",
"self",
".",
"register_variables",
"-",
"other",
".",
"register_variables",
"s",
".",
"register_variable_offsets",
"=",
"self",... | Calculate the complement of `self` and `other`.
:param other: Another SimVariableSet instance.
:return: The complement result. | [
"Calculate",
"the",
"complement",
"of",
"self",
"and",
"other",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/sim_variable.py#L314-L328 | train | Calculate the complement of self and other. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/exploration_techniques/director.py | BaseGoal._get_cfg_node | def _get_cfg_node(cfg, state):
"""
Get the CFGNode object on the control flow graph given an angr state.
:param angr.analyses.CFGEmulated cfg: An instance of CFGEmulated.
:param angr.SimState state: The current state.
:return: A CFGNode instance if the node exists,... | python | def _get_cfg_node(cfg, state):
"""
Get the CFGNode object on the control flow graph given an angr state.
:param angr.analyses.CFGEmulated cfg: An instance of CFGEmulated.
:param angr.SimState state: The current state.
:return: A CFGNode instance if the node exists,... | [
"def",
"_get_cfg_node",
"(",
"cfg",
",",
"state",
")",
":",
"call_stack_suffix",
"=",
"state",
".",
"callstack",
".",
"stack_suffix",
"(",
"cfg",
".",
"context_sensitivity_level",
")",
"is_syscall",
"=",
"state",
".",
"history",
".",
"jumpkind",
"is",
"not",
... | Get the CFGNode object on the control flow graph given an angr state.
:param angr.analyses.CFGEmulated cfg: An instance of CFGEmulated.
:param angr.SimState state: The current state.
:return: A CFGNode instance if the node exists, or None if the node cannot be found.
:rtyp... | [
"Get",
"the",
"CFGNode",
"object",
"on",
"the",
"control",
"flow",
"graph",
"given",
"an",
"angr",
"state",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/exploration_techniques/director.py#L61-L76 | train | Get the CFGNode object on the control flow graph given an angr state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/exploration_techniques/director.py | BaseGoal._dfs_edges | def _dfs_edges(graph, source, max_steps=None):
"""
Perform a depth-first search on the given DiGraph, with a limit on maximum steps.
:param networkx.DiGraph graph: The graph to traverse.
:param Any source: The source to begin traversal.
:param int max_steps: ... | python | def _dfs_edges(graph, source, max_steps=None):
"""
Perform a depth-first search on the given DiGraph, with a limit on maximum steps.
:param networkx.DiGraph graph: The graph to traverse.
:param Any source: The source to begin traversal.
:param int max_steps: ... | [
"def",
"_dfs_edges",
"(",
"graph",
",",
"source",
",",
"max_steps",
"=",
"None",
")",
":",
"if",
"max_steps",
"is",
"None",
":",
"yield",
"networkx",
".",
"dfs_edges",
"(",
"graph",
",",
"source",
")",
"else",
":",
"steps_map",
"=",
"defaultdict",
"(",
... | Perform a depth-first search on the given DiGraph, with a limit on maximum steps.
:param networkx.DiGraph graph: The graph to traverse.
:param Any source: The source to begin traversal.
:param int max_steps: Maximum steps of the traversal, or None if not limiting steps.
... | [
"Perform",
"a",
"depth",
"-",
"first",
"search",
"on",
"the",
"given",
"DiGraph",
"with",
"a",
"limit",
"on",
"maximum",
"steps",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/exploration_techniques/director.py#L79-L112 | train | Perform a depth - first search on the given DiGraph and return an iterator of edges. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/exploration_techniques/director.py | ExecuteAddressGoal.check | def check(self, cfg, state, peek_blocks):
"""
Check if the specified address will be executed
:param cfg:
:param state:
:param int peek_blocks:
:return:
:rtype: bool
"""
# Get the current CFGNode from the CFG
node = self._get_cfg_node(cfg... | python | def check(self, cfg, state, peek_blocks):
"""
Check if the specified address will be executed
:param cfg:
:param state:
:param int peek_blocks:
:return:
:rtype: bool
"""
# Get the current CFGNode from the CFG
node = self._get_cfg_node(cfg... | [
"def",
"check",
"(",
"self",
",",
"cfg",
",",
"state",
",",
"peek_blocks",
")",
":",
"# Get the current CFGNode from the CFG",
"node",
"=",
"self",
".",
"_get_cfg_node",
"(",
"cfg",
",",
"state",
")",
"if",
"node",
"is",
"None",
":",
"# Umm it doesn't exist on... | Check if the specified address will be executed
:param cfg:
:param state:
:param int peek_blocks:
:return:
:rtype: bool | [
"Check",
"if",
"the",
"specified",
"address",
"will",
"be",
"executed"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/exploration_techniques/director.py#L128-L154 | train | Check if the specified address will be executed. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/exploration_techniques/director.py | CallFunctionGoal.check | def check(self, cfg, state, peek_blocks):
"""
Check if the specified function will be reached with certain arguments.
:param cfg:
:param state:
:param peek_blocks:
:return:
"""
# Get the current CFGNode
node = self._get_cfg_node(cfg, state)
... | python | def check(self, cfg, state, peek_blocks):
"""
Check if the specified function will be reached with certain arguments.
:param cfg:
:param state:
:param peek_blocks:
:return:
"""
# Get the current CFGNode
node = self._get_cfg_node(cfg, state)
... | [
"def",
"check",
"(",
"self",
",",
"cfg",
",",
"state",
",",
"peek_blocks",
")",
":",
"# Get the current CFGNode",
"node",
"=",
"self",
".",
"_get_cfg_node",
"(",
"cfg",
",",
"state",
")",
"if",
"node",
"is",
"None",
":",
"l",
".",
"error",
"(",
"\"Fail... | Check if the specified function will be reached with certain arguments.
:param cfg:
:param state:
:param peek_blocks:
:return: | [
"Check",
"if",
"the",
"specified",
"function",
"will",
"be",
"reached",
"with",
"certain",
"arguments",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/exploration_techniques/director.py#L206-L247 | train | Check if the function will be reached with certain arguments. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/exploration_techniques/director.py | CallFunctionGoal.check_state | def check_state(self, state):
"""
Check if the specific function is reached with certain arguments
:param angr.SimState state: The state to check
:return: True if the function is reached with certain arguments, False otherwise.
:rtype: bool
"""
if state.addr == ... | python | def check_state(self, state):
"""
Check if the specific function is reached with certain arguments
:param angr.SimState state: The state to check
:return: True if the function is reached with certain arguments, False otherwise.
:rtype: bool
"""
if state.addr == ... | [
"def",
"check_state",
"(",
"self",
",",
"state",
")",
":",
"if",
"state",
".",
"addr",
"==",
"self",
".",
"function",
".",
"addr",
":",
"arch",
"=",
"state",
".",
"arch",
"if",
"self",
".",
"_check_arguments",
"(",
"arch",
",",
"state",
")",
":",
"... | Check if the specific function is reached with certain arguments
:param angr.SimState state: The state to check
:return: True if the function is reached with certain arguments, False otherwise.
:rtype: bool | [
"Check",
"if",
"the",
"specific",
"function",
"is",
"reached",
"with",
"certain",
"arguments"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/exploration_techniques/director.py#L249-L263 | train | Checks if the specific function is reached with certain arguments. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/exploration_techniques/director.py | Director._peek_forward | def _peek_forward(self, simgr):
"""
Make sure all current basic block on each state shows up in the CFG. For blocks that are not in the CFG, start
CFG recovery from them with a maximum basic block depth of 100.
:param simgr:
:return:
"""
if self._cfg is None:
... | python | def _peek_forward(self, simgr):
"""
Make sure all current basic block on each state shows up in the CFG. For blocks that are not in the CFG, start
CFG recovery from them with a maximum basic block depth of 100.
:param simgr:
:return:
"""
if self._cfg is None:
... | [
"def",
"_peek_forward",
"(",
"self",
",",
"simgr",
")",
":",
"if",
"self",
".",
"_cfg",
"is",
"None",
":",
"starts",
"=",
"list",
"(",
"simgr",
".",
"active",
")",
"self",
".",
"_cfg_kb",
"=",
"KnowledgeBase",
"(",
"self",
".",
"project",
")",
"self"... | Make sure all current basic block on each state shows up in the CFG. For blocks that are not in the CFG, start
CFG recovery from them with a maximum basic block depth of 100.
:param simgr:
:return: | [
"Make",
"sure",
"all",
"current",
"basic",
"block",
"on",
"each",
"state",
"shows",
"up",
"in",
"the",
"CFG",
".",
"For",
"blocks",
"that",
"are",
"not",
"in",
"the",
"CFG",
"start",
"CFG",
"recovery",
"from",
"them",
"with",
"a",
"maximum",
"basic",
"... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/exploration_techniques/director.py#L434-L456 | train | This method is called by _peek_forward_state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/exploration_techniques/director.py | Director._load_fallback_states | def _load_fallback_states(self, pg):
"""
Load the last N deprioritized states will be extracted from the "deprioritized" stash and put to "active" stash.
N is controlled by 'num_fallback_states'.
:param SimulationManager pg: The simulation manager.
:return: None
"""
... | python | def _load_fallback_states(self, pg):
"""
Load the last N deprioritized states will be extracted from the "deprioritized" stash and put to "active" stash.
N is controlled by 'num_fallback_states'.
:param SimulationManager pg: The simulation manager.
:return: None
"""
... | [
"def",
"_load_fallback_states",
"(",
"self",
",",
"pg",
")",
":",
"# take back some of the deprioritized states",
"l",
".",
"debug",
"(",
"\"No more active states. Load some deprioritized states to 'active' stash.\"",
")",
"if",
"'deprioritized'",
"in",
"pg",
".",
"stashes",
... | Load the last N deprioritized states will be extracted from the "deprioritized" stash and put to "active" stash.
N is controlled by 'num_fallback_states'.
:param SimulationManager pg: The simulation manager.
:return: None | [
"Load",
"the",
"last",
"N",
"deprioritized",
"states",
"will",
"be",
"extracted",
"from",
"the",
"deprioritized",
"stash",
"and",
"put",
"to",
"active",
"stash",
".",
"N",
"is",
"controlled",
"by",
"num_fallback_states",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/exploration_techniques/director.py#L458-L471 | train | Load the last N deprioritized states from the deprioritized stash and put them to the active stash. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/exploration_techniques/director.py | Director._categorize_states | def _categorize_states(self, simgr):
"""
Categorize all states into two different groups: reaching the destination within the peek depth, and not
reaching the destination within the peek depth.
:param SimulationManager simgr: The simulation manager that contains states. All active st... | python | def _categorize_states(self, simgr):
"""
Categorize all states into two different groups: reaching the destination within the peek depth, and not
reaching the destination within the peek depth.
:param SimulationManager simgr: The simulation manager that contains states. All active st... | [
"def",
"_categorize_states",
"(",
"self",
",",
"simgr",
")",
":",
"past_active_states",
"=",
"len",
"(",
"simgr",
".",
"active",
")",
"# past_deprioritized_states = len(simgr.deprioritized)",
"for",
"goal",
"in",
"self",
".",
"_goals",
":",
"for",
"p",
"in",
"si... | Categorize all states into two different groups: reaching the destination within the peek depth, and not
reaching the destination within the peek depth.
:param SimulationManager simgr: The simulation manager that contains states. All active states (state belonging to "active" stash)
... | [
"Categorize",
"all",
"states",
"into",
"two",
"different",
"groups",
":",
"reaching",
"the",
"destination",
"within",
"the",
"peek",
"depth",
"and",
"not",
"reaching",
"the",
"destination",
"within",
"the",
"peek",
"depth",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/exploration_techniques/director.py#L473-L510 | train | Categorizes all states into two different groups. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/code_tagging.py | CodeTagging.has_xor | def has_xor(self):
"""
Detects if there is any xor operation in the function.
:return: Tags
"""
def _has_xor(expr):
return isinstance(expr, pyvex.IRExpr.Binop) and expr.op.startswith("Iop_Xor")
found_xor = False
for block in self._function.blocks:
... | python | def has_xor(self):
"""
Detects if there is any xor operation in the function.
:return: Tags
"""
def _has_xor(expr):
return isinstance(expr, pyvex.IRExpr.Binop) and expr.op.startswith("Iop_Xor")
found_xor = False
for block in self._function.blocks:
... | [
"def",
"has_xor",
"(",
"self",
")",
":",
"def",
"_has_xor",
"(",
"expr",
")",
":",
"return",
"isinstance",
"(",
"expr",
",",
"pyvex",
".",
"IRExpr",
".",
"Binop",
")",
"and",
"expr",
".",
"op",
".",
"startswith",
"(",
"\"Iop_Xor\"",
")",
"found_xor",
... | Detects if there is any xor operation in the function.
:return: Tags | [
"Detects",
"if",
"there",
"is",
"any",
"xor",
"operation",
"in",
"the",
"function",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/code_tagging.py#L36-L61 | train | Detects if there is any xor operation in the function. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/code_tagging.py | CodeTagging.has_bitshifts | def has_bitshifts(self):
"""
Detects if there is any bitwise operation in the function.
:return: Tags.
"""
def _has_bitshifts(expr):
if isinstance(expr, pyvex.IRExpr.Binop):
return expr.op.startswith("Iop_Shl") or expr.op.startswith("Iop_Shr") \
... | python | def has_bitshifts(self):
"""
Detects if there is any bitwise operation in the function.
:return: Tags.
"""
def _has_bitshifts(expr):
if isinstance(expr, pyvex.IRExpr.Binop):
return expr.op.startswith("Iop_Shl") or expr.op.startswith("Iop_Shr") \
... | [
"def",
"has_bitshifts",
"(",
"self",
")",
":",
"def",
"_has_bitshifts",
"(",
"expr",
")",
":",
"if",
"isinstance",
"(",
"expr",
",",
"pyvex",
".",
"IRExpr",
".",
"Binop",
")",
":",
"return",
"expr",
".",
"op",
".",
"startswith",
"(",
"\"Iop_Shl\"",
")"... | Detects if there is any bitwise operation in the function.
:return: Tags. | [
"Detects",
"if",
"there",
"is",
"any",
"bitwise",
"operation",
"in",
"the",
"function",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/code_tagging.py#L63-L92 | train | Detects if there is any bitwise operation in the function. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/keyed_region.py | KeyedRegion.merge | def merge(self, other, replacements=None):
"""
Merge another KeyedRegion into this KeyedRegion.
:param KeyedRegion other: The other instance to merge with.
:return: None
"""
# TODO: is the current solution not optimal enough?
for _, item in other._storage.items(... | python | def merge(self, other, replacements=None):
"""
Merge another KeyedRegion into this KeyedRegion.
:param KeyedRegion other: The other instance to merge with.
:return: None
"""
# TODO: is the current solution not optimal enough?
for _, item in other._storage.items(... | [
"def",
"merge",
"(",
"self",
",",
"other",
",",
"replacements",
"=",
"None",
")",
":",
"# TODO: is the current solution not optimal enough?",
"for",
"_",
",",
"item",
"in",
"other",
".",
"_storage",
".",
"items",
"(",
")",
":",
"# type: RegionObject",
"for",
"... | Merge another KeyedRegion into this KeyedRegion.
:param KeyedRegion other: The other instance to merge with.
:return: None | [
"Merge",
"another",
"KeyedRegion",
"into",
"this",
"KeyedRegion",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/keyed_region.py#L172-L188 | train | Merge another KeyedRegion into this one. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/keyed_region.py | KeyedRegion.replace | def replace(self, replacements):
"""
Replace variables with other variables.
:param dict replacements: A dict of variable replacements.
:return: self
"""
for old_var, new_var in replacements.items():
old_var_id = id(old_var)
... | python | def replace(self, replacements):
"""
Replace variables with other variables.
:param dict replacements: A dict of variable replacements.
:return: self
"""
for old_var, new_var in replacements.items():
old_var_id = id(old_var)
... | [
"def",
"replace",
"(",
"self",
",",
"replacements",
")",
":",
"for",
"old_var",
",",
"new_var",
"in",
"replacements",
".",
"items",
"(",
")",
":",
"old_var_id",
"=",
"id",
"(",
"old_var",
")",
"if",
"old_var_id",
"in",
"self",
".",
"_object_mapping",
":"... | Replace variables with other variables.
:param dict replacements: A dict of variable replacements.
:return: self | [
"Replace",
"variables",
"with",
"other",
"variables",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/keyed_region.py#L190-L205 | train | Replace variables with other variables. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/keyed_region.py | KeyedRegion.dbg_repr | def dbg_repr(self):
"""
Get a debugging representation of this keyed region.
:return: A string of debugging output.
"""
keys = self._storage.keys()
offset_to_vars = { }
for key in sorted(keys):
ro = self._storage[key]
variables = [ obj.obj... | python | def dbg_repr(self):
"""
Get a debugging representation of this keyed region.
:return: A string of debugging output.
"""
keys = self._storage.keys()
offset_to_vars = { }
for key in sorted(keys):
ro = self._storage[key]
variables = [ obj.obj... | [
"def",
"dbg_repr",
"(",
"self",
")",
":",
"keys",
"=",
"self",
".",
"_storage",
".",
"keys",
"(",
")",
"offset_to_vars",
"=",
"{",
"}",
"for",
"key",
"in",
"sorted",
"(",
"keys",
")",
":",
"ro",
"=",
"self",
".",
"_storage",
"[",
"key",
"]",
"var... | Get a debugging representation of this keyed region.
:return: A string of debugging output. | [
"Get",
"a",
"debugging",
"representation",
"of",
"this",
"keyed",
"region",
".",
":",
"return",
":",
"A",
"string",
"of",
"debugging",
"output",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/keyed_region.py#L207-L223 | train | Get a debugging representation of this keyed region. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/keyed_region.py | KeyedRegion.add_variable | def add_variable(self, start, variable):
"""
Add a variable to this region at the given offset.
:param int start:
:param SimVariable variable:
:return: None
"""
size = variable.size if variable.size is not None else 1
self.add_object(start, variable, si... | python | def add_variable(self, start, variable):
"""
Add a variable to this region at the given offset.
:param int start:
:param SimVariable variable:
:return: None
"""
size = variable.size if variable.size is not None else 1
self.add_object(start, variable, si... | [
"def",
"add_variable",
"(",
"self",
",",
"start",
",",
"variable",
")",
":",
"size",
"=",
"variable",
".",
"size",
"if",
"variable",
".",
"size",
"is",
"not",
"None",
"else",
"1",
"self",
".",
"add_object",
"(",
"start",
",",
"variable",
",",
"size",
... | Add a variable to this region at the given offset.
:param int start:
:param SimVariable variable:
:return: None | [
"Add",
"a",
"variable",
"to",
"this",
"region",
"at",
"the",
"given",
"offset",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/keyed_region.py#L225-L236 | train | Add a variable to this region at the given offset. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/keyed_region.py | KeyedRegion.add_object | def add_object(self, start, obj, object_size):
"""
Add/Store an object to this region at the given offset.
:param start:
:param obj:
:param int object_size: Size of the object
:return:
"""
self._store(start, obj, object_size, overwrite=False) | python | def add_object(self, start, obj, object_size):
"""
Add/Store an object to this region at the given offset.
:param start:
:param obj:
:param int object_size: Size of the object
:return:
"""
self._store(start, obj, object_size, overwrite=False) | [
"def",
"add_object",
"(",
"self",
",",
"start",
",",
"obj",
",",
"object_size",
")",
":",
"self",
".",
"_store",
"(",
"start",
",",
"obj",
",",
"object_size",
",",
"overwrite",
"=",
"False",
")"
] | Add/Store an object to this region at the given offset.
:param start:
:param obj:
:param int object_size: Size of the object
:return: | [
"Add",
"/",
"Store",
"an",
"object",
"to",
"this",
"region",
"at",
"the",
"given",
"offset",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/keyed_region.py#L238-L248 | train | Add an object to this region at the given offset. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/keyed_region.py | KeyedRegion.set_variable | def set_variable(self, start, variable):
"""
Add a variable to this region at the given offset, and remove all other variables that are fully covered by
this variable.
:param int start:
:param SimVariable variable:
:return: None
"""
size = variable.size ... | python | def set_variable(self, start, variable):
"""
Add a variable to this region at the given offset, and remove all other variables that are fully covered by
this variable.
:param int start:
:param SimVariable variable:
:return: None
"""
size = variable.size ... | [
"def",
"set_variable",
"(",
"self",
",",
"start",
",",
"variable",
")",
":",
"size",
"=",
"variable",
".",
"size",
"if",
"variable",
".",
"size",
"is",
"not",
"None",
"else",
"1",
"self",
".",
"set_object",
"(",
"start",
",",
"variable",
",",
"size",
... | Add a variable to this region at the given offset, and remove all other variables that are fully covered by
this variable.
:param int start:
:param SimVariable variable:
:return: None | [
"Add",
"a",
"variable",
"to",
"this",
"region",
"at",
"the",
"given",
"offset",
"and",
"remove",
"all",
"other",
"variables",
"that",
"are",
"fully",
"covered",
"by",
"this",
"variable",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/keyed_region.py#L250-L262 | train | Add a variable to this region at the given offset and remove all other variables that are fully covered by this variable. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/keyed_region.py | KeyedRegion.set_object | def set_object(self, start, obj, object_size):
"""
Add an object to this region at the given offset, and remove all other objects that are fully covered by this
object.
:param start:
:param obj:
:param object_size:
:return:
"""
self._store(start,... | python | def set_object(self, start, obj, object_size):
"""
Add an object to this region at the given offset, and remove all other objects that are fully covered by this
object.
:param start:
:param obj:
:param object_size:
:return:
"""
self._store(start,... | [
"def",
"set_object",
"(",
"self",
",",
"start",
",",
"obj",
",",
"object_size",
")",
":",
"self",
".",
"_store",
"(",
"start",
",",
"obj",
",",
"object_size",
",",
"overwrite",
"=",
"True",
")"
] | Add an object to this region at the given offset, and remove all other objects that are fully covered by this
object.
:param start:
:param obj:
:param object_size:
:return: | [
"Add",
"an",
"object",
"to",
"this",
"region",
"at",
"the",
"given",
"offset",
"and",
"remove",
"all",
"other",
"objects",
"that",
"are",
"fully",
"covered",
"by",
"this",
"object",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/keyed_region.py#L264-L275 | train | Add an object to this region at the given offset and remove all other objects that are fully covered by this object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/keyed_region.py | KeyedRegion.get_base_addr | def get_base_addr(self, addr):
"""
Get the base offset (the key we are using to index objects covering the given offset) of a specific offset.
:param int addr:
:return:
:rtype: int or None
"""
base_addr, container = self._get_container(addr)
if containe... | python | def get_base_addr(self, addr):
"""
Get the base offset (the key we are using to index objects covering the given offset) of a specific offset.
:param int addr:
:return:
:rtype: int or None
"""
base_addr, container = self._get_container(addr)
if containe... | [
"def",
"get_base_addr",
"(",
"self",
",",
"addr",
")",
":",
"base_addr",
",",
"container",
"=",
"self",
".",
"_get_container",
"(",
"addr",
")",
"if",
"container",
"is",
"None",
":",
"return",
"None",
"else",
":",
"return",
"base_addr"
] | Get the base offset (the key we are using to index objects covering the given offset) of a specific offset.
:param int addr:
:return:
:rtype: int or None | [
"Get",
"the",
"base",
"offset",
"(",
"the",
"key",
"we",
"are",
"using",
"to",
"index",
"objects",
"covering",
"the",
"given",
"offset",
")",
"of",
"a",
"specific",
"offset",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/keyed_region.py#L277-L290 | train | Get the base offset of a specific key. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/keyed_region.py | KeyedRegion.get_variables_by_offset | def get_variables_by_offset(self, start):
"""
Find variables covering the given region offset.
:param int start:
:return: A list of stack variables.
:rtype: set
"""
_, container = self._get_container(start)
if container is None:
return []
... | python | def get_variables_by_offset(self, start):
"""
Find variables covering the given region offset.
:param int start:
:return: A list of stack variables.
:rtype: set
"""
_, container = self._get_container(start)
if container is None:
return []
... | [
"def",
"get_variables_by_offset",
"(",
"self",
",",
"start",
")",
":",
"_",
",",
"container",
"=",
"self",
".",
"_get_container",
"(",
"start",
")",
"if",
"container",
"is",
"None",
":",
"return",
"[",
"]",
"else",
":",
"return",
"container",
".",
"inter... | Find variables covering the given region offset.
:param int start:
:return: A list of stack variables.
:rtype: set | [
"Find",
"variables",
"covering",
"the",
"given",
"region",
"offset",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/keyed_region.py#L292-L305 | train | Find variables covering the given region offset. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.