RETURNCODE_KILL = -9 & 0xff
+NACL_SIGILL = 4
NACL_SIGTRAP = 5
NACL_SIGSEGV = 11
(1<<19) | (1<<18) | (1<<17) | (1<<16)) # GE bits
+def UsingQemu():
+ return SEL_LDR_COMMAND[0].endswith('/run_under_qemu_arm')
+
+
def DecodeRegs(reply):
defs = REG_DEFS[ARCH]
names = [reg_name for reg_name, reg_fmt in defs]
# Tell the process to continue, because it starts at the
# breakpoint set at its start address.
reply = connection.RspRequest('c')
- if ARCH == 'arm' or ARCH == 'mips32':
+ if ARCH == 'arm':
+ AssertReplySignal(reply, NACL_SIGILL)
+ elif ARCH == 'mips32':
# The process should have stopped on a BKPT instruction.
AssertReplySignal(reply, NACL_SIGTRAP)
else:
self.CheckReadOnlyRegisters(connection)
def test_jump_to_address_zero(self):
+ if UsingQemu():
+ # This test hangs under qemu-arm.
+ return
with LaunchDebugStub('test_jump_to_address_zero') as connection:
# Continue from initial breakpoint.
reply = connection.RspRequest('c')
# Skip past the single-byte HLT instruction.
regs[IP_REG[ARCH]] += 1
elif ARCH == 'arm':
- AssertReplySignal(stop_reply, NACL_SIGTRAP)
+ AssertReplySignal(stop_reply, NACL_SIGILL)
bundle_size = 16
assert regs['r15'] % bundle_size == 0, regs['r15']
regs['r15'] += bundle_size
return child_thread_id
def test_continuing_thread_with_others_suspended(self):
+ if UsingQemu():
+ # Suspending a running thread doesn't work under qemu-arm, so
+ # disable this test there.
+ return
with LaunchDebugStub('test_suspending_threads') as connection:
symbols = GetSymbols()
child_thread_id = self.WaitForTestThreadsToStart(connection, symbols)
child_thread_val)
def test_single_stepping_thread_with_others_suspended(self):
+ if UsingQemu():
+ # Suspending a running thread doesn't work under qemu-arm, so
+ # disable this test there.
+ return
with LaunchDebugStub('test_suspending_threads') as connection:
symbols = GetSymbols()
child_thread_id = self.WaitForTestThreadsToStart(connection, symbols)