teak-llvm/lldb/packages/Python/lldbsuite/test/functionalities
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
..
abbreviation *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
alias
apropos_with_process *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
archives *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
asan [Test-Suite] Fix all the sanitizer tests to be based on compiler capabilities 2016-11-10 19:16:17 +00:00
attach_resume *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
avoids-fd-leak *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
backticks *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
breakpoint These test cases don't test different debug info formats. 2016-10-06 17:01:00 +00:00
command_history *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
command_regex *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
command_script *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
command_script_alias *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
command_script_immediate_output *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
command_source *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
completion Clean up the stop printing header lines. 2016-11-08 20:36:40 +00:00
conditional_break *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
darwin_log xfail TestDarwinLogBasic.py for i386 macOS 2016-10-06 18:25:54 +00:00
data-formatter Display the pointer value in the libstdc++ unique_ptr summary 2016-11-09 10:42:29 +00:00
dead-strip *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
disassembly *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
dynamic_value_child_count *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
embedded_interpreter Clean up the stop printing header lines. 2016-11-08 20:36:40 +00:00
exec xfail TestExec.py on macOS i386 2016-10-06 19:12:05 +00:00
expr-doesnt-deadlock *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
fat_archives convert TestFatArchives.py over to no-debug-info test 2016-09-27 17:17:21 +00:00
format *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
frame_var_scope Fix an issue where frame variable -s <varname> would not show the scope even though the user asked for it 2016-10-26 19:17:49 +00:00
frame-diagnose xfail TestDiagnoseDereferenceFunctionReturn.py on macOS i386 2016-10-06 19:04:58 +00:00
inferior-assert *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
inferior-changed *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
inferior-crashing *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
inline-stepping *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
jitloader_gdb *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
launch_with_shellexpand *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
llvm *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
load_unload add stop column highlighting support 2016-09-21 20:13:14 +00:00
longjmp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
memory Fixup the xfail situation on Windows. 2016-10-05 20:47:17 +00:00
multidebugger_commands *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
nested_alias *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
non-overlapping-index-variable-i *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
nosucharch *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
object-file *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
paths *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
platform *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
plugins [Test Suite] Pull generateSource into lldbtest 2016-10-31 04:48:19 +00:00
postmortem Patch for lldb bug 26322 “core load hangs” 2016-11-24 08:56:37 +00:00
process_attach change ProcessAttach test to no-debug-info 2016-11-01 18:50:34 +00:00
process_group *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
process_launch *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
process_save_core *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ptr_refs *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
recursion *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
register Test for YMMRegisters. 2016-11-03 08:35:55 +00:00
rerun *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
return-value Added a bugreport tracking the failure to get float return values 2016-10-11 19:29:25 +00:00
set-data *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
signal *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
single-quote-in-filename-to-lldb *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
step-avoids-no-debug *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
stop-hook *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
target_command *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
testid add a simple test case to validate test id() 2016-10-03 22:49:13 +00:00
thread Fix "thread step until" handling of multiple line inputs. 2016-11-18 22:06:10 +00:00
tsan [Test-Suite] Fix all the sanitizer tests to be based on compiler capabilities 2016-11-10 19:16:17 +00:00
tty This test was failing because /bin/ls is no longer debuggable on OS X. 2016-10-11 00:35:41 +00:00
type_completion *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
type_lookup Add support to the ObjC type scavenger for finding types via debug info 2016-11-03 17:25:27 +00:00
unwind [LLDB][MIPS] Fix TestEhFrameUnwind.py for MIPS 2016-09-09 10:20:08 +00:00
value_md5_crash *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
watchpoint Fix SBWatchpoint::SetEnabled to send an event. 2016-11-02 01:06:42 +00:00