コード例 #1
0
    def invoke(self, arg, from_tty):
        arg = arg.split()
        current_runs = False
        size = 0

        try:

            alist, args = getopt.getopt(arg, 'cs:')

            for (field, val) in alist:

                if field in '-c':
                    current_runs = True

                if field in '-s':
                    size = int(val)

        except:
            print('[shadow] usage: jeruns [-cs]')
            print('[shadow] options:')
            print('[shadow]    -c           display current runs only')
            print('[shadow]    -s <size>    runs of the given size class only')
            print('[shadow] for example: jeruns -s 256 ')
            return

        shadow.dump_runs(dump_current_runs = current_runs, size_class = size)
コード例 #2
0
    def invoke(self, arg, from_tty):
        arg = arg.split()

        if len(arg) >= 1 and arg[0] == '-c':
            current_runs = true
        else:
            current_runs = false

        shadow.dump_runs(dump_current_runs = current_runs, \
                proc = self.proc)
コード例 #3
0
ファイル: gdb_driver.py プロジェクト: HackerTool/shadow
    def invoke(self, arg, from_tty):
        arg = arg.split()

        if len(arg) >= 1 and arg[0] == '-c':
            current_runs = true
        else:
            current_runs = false

        shadow.dump_runs(dump_current_runs = current_runs, \
                proc = self.proc)
コード例 #4
0
ファイル: pykd_driver.py プロジェクト: CENSUS/shadow
                if field in '-c':
                    current_runs = True

                if field in '-s':
                    size = int(val)

        except:

            print('[shadow] usage: jeruns [-cs]')
            print('[shadow] options:')
            print('[shadow]    -c           display current runs only')
            print('[shadow]    -s <size>    runs of the given size class only')
            print('[shadow] for example: jeruns -s 256 ')
            sys.exit()

        shadow.dump_runs(dump_current_runs = current_runs, size_class = size)

    elif sys.argv[1] == 'jebins':
        shadow.dump_bins()

    elif sys.argv[1] == 'nursery':
        shadow.dump_nursery()

    elif sys.argv[1] == 'jeregions':
        size_class = 0

        try:
            size_class = int(sys.argv[2])
        except:
            print('[shadow] usage: jeregions <size class>')
            print('[shadow] for example: jeregions 1024')
コード例 #5
0
                if field in '-c':
                    current_runs = true

                if field in '-s':
                    size = int(val)

        except:

            print('[shadow] usage: jeruns [-cs]')
            print('[shadow] options:')
            print('[shadow]    -c           display current runs only')
            print('[shadow]    -s <size>    runs of the given size class only')
            print('[shadow] for example: jeruns -s 256 ')
            sys.exit()

        shadow.dump_runs(dump_current_runs=current_runs, size_class=size)

    elif sys.argv[1] == 'jebins':
        shadow.dump_bins()

    elif sys.argv[1] == 'nursery':
        shadow.dump_nursery()

    elif sys.argv[1] == 'jeregions':
        size_class = 0

        try:
            size_class = int(sys.argv[2])
        except:
            print('[shadow] usage: jeregions <size class>')
            print('[shadow] for example: jeregions 1024')