codeclimate

This commit is contained in:
defunct
2018-07-31 13:42:28 +00:00
parent c7985844a7
commit b0e0a1b456
5 changed files with 20 additions and 21 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ checks:
similar-code:
enabled: true
config:
threshold: 100
threshold: 200
identical-code:
enabled: true
config:
+7 -7
View File
@@ -205,13 +205,13 @@ class Armv7RegisterFile(RegisterFile):
flags allow writes of bool/{1, 0} but always read bools.
"""
super().__init__({'SB': 'R9',
'SL': 'R10',
'FP': 'R11',
'IP': 'R12',
'STACK': 'R13',
'SP': 'R13',
'LR': 'R14',
'PC': 'R15'})
'SL': 'R10',
'FP': 'R11',
'IP': 'R12',
'STACK': 'R13',
'SP': 'R13',
'LR': 'R14',
'PC': 'R15'})
self._regs = {}
# 32 bit registers
for reg_name in ('R0', 'R1', 'R2', 'R3', 'R4', 'R5', 'R6', 'R7', 'R8',
+7 -7
View File
@@ -6031,10 +6031,10 @@ class AMD64Cpu(X86Cpu):
Builds a CPU model.
:param memory: memory object for this CPU.
'''
super().__init__(AMD64RegFile(aliases={'PC': 'RIP', 'STACK': 'RSP', 'FRAME': 'RBP'},),
memory,
*args,
**kwargs)
super().__init__(AMD64RegFile(aliases={'PC': 'RIP', 'STACK': 'RSP', 'FRAME': 'RBP'}, ),
memory,
*args,
**kwargs)
def __str__(self):
'''
@@ -6142,9 +6142,9 @@ class I386Cpu(X86Cpu):
:param memory: memory object for this CPU.
'''
super().__init__(AMD64RegFile({'PC': 'EIP', 'STACK': 'ESP', 'FRAME': 'EBP'}),
memory,
*args,
**kwargs)
memory,
*args,
**kwargs)
def __str__(self):
'''
+4 -2
View File
@@ -936,7 +936,8 @@ class SDecree(Decree):
super().__setstate__(state)
def sys_receive(self, cpu, fd, buf, count, rx_bytes):
''' Symbolic version of Decree.sys_receive
'''
Symbolic version of Decree.sys_receive
'''
if issymbolic(fd):
logger.info("Ask to read from a symbolic file descriptor!!")
@@ -961,7 +962,8 @@ class SDecree(Decree):
return super().sys_receive(cpu, fd, buf, count, rx_bytes)
def sys_transmit(self, cpu, fd, buf, count, tx_bytes):
''' Symbolic version of Decree.sys_receive
'''
Symbolic version of Decree.sys_transmit
'''
if issymbolic(fd):
logger.info("Ask to write to a symbolic file descriptor!!")
+1 -4
View File
@@ -2447,10 +2447,7 @@ class SLinux(Linux):
self._constraints = ConstraintSet()
self.random = 0
self.symbolic_files = symbolic_files
super().__init__(programs,
argv=argv,
envp=envp,
disasm=disasm)
super().__init__(programs, argv=argv, envp=envp, disasm=disasm)
def _mk_proc(self, arch):
if arch in {'i386', 'armv7'}: