コード例 #1
0
ファイル: frame.py プロジェクト: mrg123/hhvm
 def frame_locals(self):
     try:
         func = self.ar['m_func']
         argptr = self.ar.cast(T('HPHP::TypedValue').pointer())
         nargs = func['m_paramCounts'] >> 1
         shared = rawptr(func['m_shared'])
         num_loc = shared['m_numLocals']
         if num_loc < nargs or num_loc - nargs > 64:
             return None
         argptr -= nargs
         locals = []
         i = nargs
         while i < num_loc:
             argptr -= 1
             try:
                 name = idxs.indexed_string_map_at(shared['m_localNames'],
                                                   i)
                 name = strinfo(name)['data']
             except:
                 name = "unnamed_" + str(i)
             i += 1
             locals.append(SymValueWrapper(name, argptr.dereference()))
         return locals
     except:
         return None
コード例 #2
0
ファイル: frame.py プロジェクト: mrg123/hhvm
 def __init__(self, fobj, regs):
     super(JittedFrameDecorator, self).__init__(fobj)
     self.regs = regs
     frame = self.inferior_frame()
     self.ar = frame.read_register(self.regs['fp']).cast(
         T('HPHP::ActRec').pointer())
     self.args = []
     try:
         func = self.ar['m_func']
         shared = rawptr(func['m_shared'])
         argptr = self.ar.cast(T('HPHP::TypedValue').pointer())
         nargs = func['m_paramCounts'] >> 1
         if nargs > 64:
             return None
         args = []
         i = 0
         while i < nargs:
             argptr -= 1
             try:
                 name = idxs.indexed_string_map_at(shared['m_localNames'],
                                                   i)
                 name = strinfo(name)['data']
             except:
                 name = "arg_" + str(i)
             i += 1
             args.append(SymValueWrapper(name, argptr.dereference()))
         self.args = args
     except:
         pass
コード例 #3
0
        def __next__(self):
            if self.cur == self.end:
                raise StopIteration

            decl_props = self.cls['m_declProperties']

            name = idx.indexed_string_map_at(decl_props, self.cur)['m_name']
            val = idx.object_data_at(self.obj, name)

            self.cur = self.cur + 1

            if val is None:
                val = '<unknown>'

            return (str(deref(name)), val)
コード例 #4
0
        def __next__(self):
            if self.cur == self.end:
                raise StopIteration

            decl_props = self.cls['m_declProperties']

            name = idx.indexed_string_map_at(decl_props, self.cur)['m_name']
            val = idx.object_data_at(self.obj, name)

            self.cur = self.cur + 1

            if val is None:
                val = '<unknown>'

            return (str(deref(name)), val)
コード例 #5
0
ファイル: pretty.py プロジェクト: zjsxwc/hhvm
        def __next__(self):
            if self.cur == self.end:
                raise StopIteration

            decl_props = self.cls['m_declProperties']

            try:
                name = idx.indexed_string_map_at(decl_props, self.cur)['name']
            except gdb.MemoryError:
                name = '<invalid>'

            try:
                val = idx.object_data_at(self.obj, self.cur)
            except gdb.MemoryError:
                val = '<unknown>'

            self.cur = self.cur + 1

            return (str(deref(name)), val)
コード例 #6
0
ファイル: pretty.py プロジェクト: 292388900/hhvm
        def __next__(self):
            if self.cur == self.end:
                raise StopIteration

            decl_props = self.cls['m_declProperties']

            try:
                name = idx.indexed_string_map_at(decl_props, self.cur)['m_name']
                try:
                    val = idx.object_data_at(self.obj, name)
                except gdb.MemoryError:
                    val = None
            except gdb.MemoryError:
                name = '<invalid>'

            self.cur = self.cur + 1

            if val is None:
                val = '<unknown>'

            return (str(deref(name)), val)