Miasm2
 All Classes Namespaces Files Functions Variables Typedefs Properties Macros
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
miasm2.arch.x86.arch.bs_disp Class Reference
+ Inheritance diagram for miasm2.arch.x86.arch.bs_disp:
+ Collaboration diagram for miasm2.arch.x86.arch.bs_disp:

Public Member Functions

def divert
 
def __getattr__
 

Public Attributes

 args
 

Static Public Attributes

 prio = default_prio
 

Detailed Description

Definition at line 1350 of file arch.py.

Member Function Documentation

def miasm2.core.cpu.bs_divert.__getattr__ (   self,
  item 
)
inherited

Definition at line 512 of file cpu.py.

513  def __getattr__(self, item):
514  if item in self.__dict__:
515  return self.__dict__[item]
516  elif item in self.args:
517  return self.args.get(item)
518  else:
519  raise AttributeError
520 
def miasm2.arch.x86.arch.bs_disp.divert (   self,
  i,
  candidates 
)

Definition at line 1352 of file arch.py.

1353  def divert(self, i, candidates):
1354  out = []
1355  done = False
1356  for cls, name, bases, dct, fields in candidates:
1357  ndct = dict(dct)
1358  nfields = fields[:]
1359  if (admode_prefix(
1360  (dct['mode'], dct['opmode'], dct['admode'])) == 16):
1361  if 'mod' in dct and dct['mod'] == 0b00 and \
1362  'rm' in dct and dct['rm'] == 0b110:
1363  nfields[i] = bs(
1364  l=16, cls=(x86_16_ne,), fname=self.args['fname'])
1365  ndct[self.args['fname']] = True
1366  out.append((cls, ndct['name'], bases, ndct, nfields))
1367  continue
1368  elif 'mod' in dct and dct['mod'] == 0b01:
1369  nfields[i] = bs(
1370  l=8, cls=(x86_08_ne,), fname=self.args['fname'])
1371  ndct[self.args['fname']] = True
1372  out.append((cls, ndct['name'], bases, ndct, nfields))
1373  continue
1374  elif 'mod' in dct and dct['mod'] == 0b10:
1375  nfields[i] = bs(
1376  l=16, cls=(x86_16_ne,), fname=self.args['fname'])
1377  ndct[self.args['fname']] = True
1378  out.append((cls, ndct['name'], bases, ndct, nfields))
1379  continue
1380  else:
1381  if 'mod' in dct and dct['mod'] == 0b00 and \
1382  'rm' in dct and dct['rm'] == 0b101:
1383  nfields[i] = bs(
1384  l=32, cls=(x86_32_ne,), fname=self.args['fname'])
1385  ndct[self.args['fname']] = True
1386  out.append((cls, ndct['name'], bases, ndct, nfields))
1387  continue
1388  elif 'mod' in dct and dct['mod'] == 0b01:
1389  nfields[i] = bs(
1390  l=8, cls=(x86_08_ne,), fname=self.args['fname'])
1391  ndct[self.args['fname']] = True
1392  out.append((cls, ndct['name'], bases, ndct, nfields))
1393  continue
1394  elif 'mod' in dct and dct['mod'] == 0b10:
1395  nfields[i] = bs(
1396  l=32, cls=(x86_32_ne,), fname=self.args['fname'])
1397  ndct[self.args['fname']] = True
1398  out.append((cls, ndct['name'], bases, ndct, nfields))
1399  continue
1400 
1401  nfields[i] = None
1402  ndct[self.args['fname']] = None
1403  out.append((cls, ndct['name'], bases, ndct, nfields))
1404  return out
1405 

+ Here is the call graph for this function:

Member Data Documentation

miasm2.core.cpu.bs_divert.args
inherited

Definition at line 510 of file cpu.py.

miasm2.core.cpu.bs_divert.prio = default_prio
staticinherited

Definition at line 507 of file cpu.py.


The documentation for this class was generated from the following file: