예제 #1
0
    def check_stop_reason(self):
        matched = lldbplatformutil.match_android_device(self.getArchitecture(), valid_api_levels=list(range(1, 16+1)))
        if matched:
            # On android until API-16 the abort() call ended in a sigsegv instead of in a sigabrt
            stop_reason = 'stop reason = signal SIGSEGV'
        else:
            stop_reason = 'stop reason = signal SIGABRT'

        # The stop reason of the thread should be an abort signal or exception.
        self.expect("thread list", STOPPED_DUE_TO_ASSERT,
            substrs = ['stopped',
                       stop_reason])

        return stop_reason
예제 #2
0
    def check_stop_reason(self):
        matched = lldbplatformutil.match_android_device(self.getArchitecture(), valid_api_levels=list(range(1, 16+1)))
        if matched:
            # On android until API-16 the abort() call ended in a sigsegv instead of in a sigabrt
            stop_reason = 'stop reason = signal SIGSEGV'
        else:
            stop_reason = 'stop reason = signal SIGABRT'

        # The stop reason of the thread should be an abort signal or exception.
        self.expect("thread list", STOPPED_DUE_TO_ASSERT,
            substrs = ['stopped',
                       stop_reason])

        return stop_reason
예제 #3
0
파일: decorators.py 프로젝트: sas/lldb
 def is_host_incompatible_with_remote(self):
     host_arch = self.getLldbArchitecture()
     host_platform = lldbplatformutil.getHostPlatform()
     target_arch = self.getArchitecture()
     target_platform = 'darwin' if self.platformIsDarwin() else self.getPlatform()
     if not (target_arch == 'x86_64' and host_arch ==
             'i386') and host_arch != target_arch:
         return "skipping because target %s is not compatible with host architecture %s" % (
             target_arch, host_arch)
     if target_platform != host_platform:
         return "skipping because target is %s but host is %s" % (
             target_platform, host_platform)
     if lldbplatformutil.match_android_device(target_arch):
         return "skipping because target is android"
     return None
예제 #4
0
    def check_stop_reason(self):
        matched = lldbplatformutil.match_android_device(
            self.getArchitecture(), valid_api_levels=list(range(1, 16 + 1)))
        if matched:
            # On android until API-16 the abort() call ended in a sigsegv
            # instead of in a sigabrt
            stop_reason = 'signal SIGSEGV'
        else:
            stop_reason = 'signal SIGABRT'

        target = self.dbg.GetTargetAtIndex(0)
        process = target.GetProcess()
        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)

        pattern = "stop reason = (" + stop_reason + "|hit program assert)"

        # The stop reason of the thread should be an abort signal or exception.
        self.expect("thread list", STOPPED_DUE_TO_ASSERT,
                    patterns=[pattern],
                    substrs=['stopped'])

        return pattern
예제 #5
0
파일: decorators.py 프로젝트: Aj0Ay/lldb
 def impl(obj):
     result = lldbplatformutil.match_android_device(obj.getArchitecture(), valid_archs=archs, valid_api_levels=api_levels)
     return reason if result else None