Skip to content

Commit

Permalink
Do not pass all command line arguments to get_operations
Browse files Browse the repository at this point in the history
  • Loading branch information
p-e-w committed Apr 17, 2016
1 parent 2009ab0 commit 31892f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions maybe/maybe.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def parse_argument(argument):
)


def get_operations(debugger, args, syscall_filters):
def get_operations(debugger, syscall_filters, verbose):
operations = []

while True:
Expand Down Expand Up @@ -92,9 +92,9 @@ def get_operations(debugger, args, syscall_filters):
if syscall and syscall_state.next_event == "exit":
# Syscall is about to be executed (just switched from "enter" to "exit")
if syscall.name in syscall_filters:
if args.verbose == 1:
if verbose == 1:
print(syscall.format())
elif args.verbose == 2:
elif verbose == 2:
print(T.bold(syscall.format()))

syscall_filter = syscall_filters[syscall.name]
Expand All @@ -112,7 +112,7 @@ def get_operations(debugger, args, syscall_filters):
# Substitute return value to make syscall appear to have succeeded
process.setreg(RETURN_VALUE_REGISTER, return_value)

elif args.verbose == 2:
elif verbose == 2:
print(syscall.format())

process.syscall()
Expand Down Expand Up @@ -207,7 +207,7 @@ def main(argv=sys.argv[1:]):
process.syscall()

try:
operations = get_operations(debugger, args, syscall_filters)
operations = get_operations(debugger, syscall_filters, args.verbose)
except Exception as error:
print(T.red("Error tracing process: %s." % error))
return 1
Expand Down

0 comments on commit 31892f3

Please sign in to comment.