teak-llvm/lldb/packages/Python/lldbsuite/test
Howard Hellyer 1a2ac9bda5 Patch for lldb bug 26322 “core load hangs”
Summary:
This patch changes the way ProcessElfCore.cpp handles signal information.
The patch changes ProcessElfCore.cpp to use the signal from si_signo in SIGINFO notes in preference to the value of cursig in PRSTATUS notes. The value from SIGINFO seems to be more thread specific. The value from PRSTATUS is usually the same for all threads even if only one thread received a signal.
If it cannot find any SIGINFO blocks it reverts to the old behaviour and uses the value from cursig in PRSTATUS. If after that no thread appears to have been stopped it forces the status of the first thread to be SIGSTOP to prevent lldb hanging waiting for any thread from the core file to change state.

The order is:
- If one or more threads have a non-zero si_signo in SIGINFO that will be used.
- If no threads had a SIGINFO block with a non-zero si_signo set all threads signals to the value in cursig in their PRSTATUS notes.
- If no thread has a signal set to a non-zero value set the signal for only the first thread to SIGSTOP.


This resolves two issues. The first was identified in bug 26322, the second became apparent while investigating this problem and looking at the signal values reported for each thread via “thread list”.

Firstly lldb is able to load core dumps generated by gcore where each thread has a SIGINFO note containing a signal number but cursig in the PRSTATUS block for each thread is 0.

Secondly if a SIGINFO note was found the “thread list” command will no longer show the same signal number for all threads. At the moment if a process crashes, for example with SIGILL, all threads will show “stop reason = signal SIGILL”. With this patch only the thread that executed the illegal instruction shows that stop reason. The other threads show “stop reason = signal 0”.

Reviewers: jingham, clayborg

Subscribers: sas, labath, lldb-commits

Differential Revision: https://reviews.llvm.org/D26676

llvm-svn: 287858
2016-11-24 08:56:37 +00:00
..
android/platform *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
api [Test Suite] Pull generateSource into lldbtest 2016-10-31 04:48:19 +00:00
arm_emulation *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
attic *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
benchmarks *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
driver/batch_mode *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
example *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
expression_command Don't access the process in expressions w/o checking that 2016-11-03 23:42:09 +00:00
functionalities Patch for lldb bug 26322 “core load hangs” 2016-11-24 08:56:37 +00:00
help One more cleanup to lldb version printing 2016-11-14 22:43:08 +00:00
issue_verification test infra: clear file-charged issues on rerun of file 2016-10-01 00:17:08 +00:00
lang Mark xfail TestNamespaceDefinitions for arm/aarch64 targets 2016-11-11 10:00:53 +00:00
linux Remove an ancient XFAIL from TestBuiltinTrap 2016-09-26 13:50:06 +00:00
logging *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
macosx xfail TestQueues on macOS 2016-10-06 21:07:45 +00:00
make Re-landing a cleaned up implementation of r284550 2016-10-20 18:01:19 +00:00
plugins *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
python_api [LLDB][MIPS] All tests get errors in dotest after this test. 2016-10-10 10:47:53 +00:00
settings add stop column highlighting support 2016-09-21 20:13:14 +00:00
source-manager add stop column highlighting support 2016-09-21 20:13:14 +00:00
terminal *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
test_runner added Linux support for test timeout sampling 2016-09-26 20:25:47 +00:00
tools xfail TestMiSyntax.py's test_lldbmi_output_grammar on macOS 2016-10-18 15:15:24 +00:00
types *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
warnings/uuid *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
__init__.py Get rid of global variables in dotest.py 2015-12-08 01:15:30 +00:00
.categories Move lldb/test to lldb/packages/Python/lldbsuite/test. 2015-10-28 17:43:26 +00:00
bench-history Move lldb/test to lldb/packages/Python/lldbsuite/test. 2015-10-28 17:43:26 +00:00
bench.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
concurrent_base.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
configuration.py Improvements to testing blacklist 2016-10-04 18:48:00 +00:00
crashinfo.c Move lldb/test to lldb/packages/Python/lldbsuite/test. 2015-10-28 17:43:26 +00:00
darwin_log.py add availability check to DarwinLog event tests 2016-09-16 03:07:14 +00:00
decorators.py Disable sanitizer tests on Windows. 2016-11-12 16:56:13 +00:00
dosep.py test infra: clear file-charged issues on rerun of file 2016-10-01 00:17:08 +00:00
dotest_args.py [Test Suite] Allow overriding codesign identity 2016-10-21 22:13:55 +00:00
dotest.py [Test-Suite] Speculative fix for darwin bots 2016-10-31 22:06:52 +00:00
lldb_pylint_helper.py Updated lldb_pylint_helper to work with recent Python package changes. 2015-11-10 20:01:33 +00:00
lldbbench.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldbcurses.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldbinline.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldbpexpect.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldbplatform.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldbplatformutil.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldbtest_config.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldbtest.py Don't allow direct access to StreamString's internal buffer. 2016-11-16 21:15:24 +00:00
lldbutil.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lock.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Makefile Move lldb/test to lldb/packages/Python/lldbsuite/test. 2015-10-28 17:43:26 +00:00
README-TestSuite Centralize the handling of attach permissions on linux in tests 2016-01-11 10:24:50 +00:00
redo.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
test_categories.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
test_result.py Improvements to testing blacklist 2016-10-04 18:48:00 +00:00