Changeset View
Standalone View
packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
Show All 31 Lines | def inferior_abort_received(self): | ||||
lldbutil.get_signal_number('SIGABRT')) | lldbutil.get_signal_number('SIGABRT')) | ||||
@debugserver_test | @debugserver_test | ||||
def test_inferior_abort_received_debugserver(self): | def test_inferior_abort_received_debugserver(self): | ||||
self.init_debugserver_test() | self.init_debugserver_test() | ||||
self.build() | self.build() | ||||
self.inferior_abort_received() | self.inferior_abort_received() | ||||
@skipIfWindows # No signal is sent on Windows. | |||||
labath: Do you have any plans for changing this? Given that windows does not support signals, maybe it… | |||||
Not Done ReplyInline ActionsI'd like to hear your thoughts on this... If the idea is for the signal number to stay zero, then the comment shouldn't say "for now" but instead say something to the effect that abort() does not cause a signal to be raised on windows because windows doesn't have signals. If the idea is to change this later, then I'd like to understand how/why. labath: I'd like to hear your thoughts on this...
If the idea is for the signal number to stay zero… | |||||
Not Done ReplyInline ActionsI think the signal number can just stay zero (treated as invalid) unless there is any strategy that will There will be several slight difference(worth mentioning) by always filling with zero signo (1) In remote debugging case, T* packet is to detail the stopped reason for a thread. On Linux, thread #1, name = 'a.out', stop reason = signal SIGSEGV: invalid address (fault address: 0x0) On Windows, (2) The GDB remote serial protocol does have several signals related packets, Such packets won't be available on Windows. The continuation of a stopped thread relies on how https://docs.microsoft.com/en-us/windows/desktop/debug/exception-dispatching In this python test case, if a segfault happens, the EXCEPTION_ACCESS_VIOLATION (0xc0000005) is raised. Hui: I think the signal number can just stay zero (treated as invalid) unless there is any strategy… | |||||
Not Done ReplyInline Actions
That sounds like the right thing to report, as that is what actually happened.
Yeah, I think lldb-server on windows should just not support these packets (return an error or something). I don't know if there is a concept of "injecting" exceptions on windows, but if there is, we can have a discussion later on how to implement that. So overall I think skipping this test is the right thing to do. I just think the message giving the reason could be a bit better. Maybe just "abort() does not send a signal on windows" ? labath: > thread #1, name = 'a.out', stop reason = Exception 0xc0000005 encountered at address… | |||||
@llgs_test | @llgs_test | ||||
# std::abort() on <= API 16 raises SIGSEGV - b.android.com/179836 | # std::abort() on <= API 16 raises SIGSEGV - b.android.com/179836 | ||||
@expectedFailureAndroid(api_levels=list(range(16 + 1))) | @expectedFailureAndroid(api_levels=list(range(16 + 1))) | ||||
def test_inferior_abort_received_llgs(self): | def test_inferior_abort_received_llgs(self): | ||||
self.init_llgs_test() | self.init_llgs_test() | ||||
self.build() | self.build() | ||||
self.inferior_abort_received() | self.inferior_abort_received() |
Do you have any plans for changing this? Given that windows does not support signals, maybe it should stay 0...