def syscall_trace_cmd(mode, incl, excl):
    global pre_syscall, post_syscall, pids, pid_default
    if mode == "enter" or mode == "both":
        pre_syscall = 1
    else:
        pre_syscall = 0
    if mode == "exit" or mode == "both":
        post_syscall = 1
    else:
        post_syscall = 0
    pids = {}
    try:
        if incl:
            for k in incl.split(","): pids[int(k)] = 1
        if excl:
            for k in excl.split(","): pids[int(k)] = 0
    except:
        print "Bad pid list"
    if incl and excl:
        print "Redundant use of incl"
    if incl:
        pid_default = 0
    else:
        pid_default = 1