llvm-project/lldb/source/Target
Sean Callanan 4740a734bb Added the "frame diagnose" command and use its output to make crash info better.
When a process stops due to a crash, we get the crashing instruction and the
crashing memory location (if there is one).  From the user's perspective it is
often unclear what the reason for the crash is in a symbolic sense.

To address this, I have added new fuctionality to StackFrame to parse the 
disassembly and reconstruct the sequence of dereferneces and offsets that were
applied to a known variable (or fuction retrn value) to obtain the invalid
pointer.

This makes use of enhancements in the disassembler, as well as new information
provided by the DWARF expression infrastructure, and is exposed through a
"frame diagnose" command.  It is also used to provide symbolic information, when
available, in the event of a crash.

The algorithm is very rudimentary, and it needs a bunch of work, including
  - better parsing for assembly, preferably with help from LLVM
  - support for non-Apple platforms
  - cleanup of the algorithm core, preferably to make it all work in terms of
    Operands instead of register/offset pairs
  - improvement of the GetExpressioPath() logic to make prettier expression
    paths, and
  - better handling of vtables.
I welcome all suggestios, improvements, and testcases.

llvm-svn: 280692
2016-09-06 04:48:36 +00:00
..
ABI.cpp Add new ABI callback to provide fallback unwind register locations 2016-04-14 14:25:20 +00:00
CMakeLists.txt Add StructuredData plugin type; showcase with new DarwinLog feature 2016-08-19 04:21:48 +00:00
CPPLanguageRuntime.cpp Move more functionality from the LanguageRuntimes to the Languages. 2015-09-02 01:59:14 +00:00
ExecutionContext.cpp second pass over removal of Mutex and Condition 2016-05-19 05:13:57 +00:00
FileAction.cpp Delete Host/windows/win32.h 2016-08-09 23:06:08 +00:00
InstrumentationRuntime.cpp [InstrumentationRuntime] Refactor the API (Part 2/N) (NFCI) 2016-08-11 17:28:37 +00:00
InstrumentationRuntimeStopInfo.cpp LLDB AddressSanitizer instrumentation runtime plugin, breakpint on error and report data extraction 2014-10-10 23:43:03 +00:00
JITLoader.cpp Fix Clang-tidy modernize-use-nullptr warnings; other minor fixes. 2016-02-18 00:10:17 +00:00
JITLoaderList.cpp remove use of Mutex in favour of std::{,recursive_}mutex 2016-05-18 01:59:10 +00:00
Language.cpp second pass over removal of Mutex and Condition 2016-05-19 05:13:57 +00:00
LanguageRuntime.cpp Fix Clang-tidy modernize-use-nullptr warnings; other minor fixes. 2016-02-18 00:10:17 +00:00
Memory.cpp Typo corrections identified by codespell 2016-07-19 15:28:02 +00:00
MemoryHistory.cpp Fix Clang-tidy modernize-use-nullptr warnings; other minor fixes. 2016-02-18 00:10:17 +00:00
ObjCLanguageRuntime.cpp Now that SymbolFileDWARF supports having types in completely separate .pcm file with "-fmodules -gmodules", each SymbolFileDWARF can reference module DWARF info by looking in other DWARF files. Then if you have 1000 .o files that each reference one or more .pcm files in their debug info, a simple Module::FindTypes(...) call can end up searching the same .pcm file over and over and over. Now all internal FindTypes methods in classes (ModuleList, Module, SymbolFile) now take an extra argument: 2016-02-10 21:28:13 +00:00
OperatingSystem.cpp Fix Clang-tidy modernize-use-nullptr warnings; other minor fixes. 2016-02-18 00:10:17 +00:00
PathMappingList.cpp Change the PathMappingList::FindFile to use FileSpec API's 2016-08-23 17:13:33 +00:00
Platform.cpp Add StructuredData plugin type; showcase with new DarwinLog feature 2016-08-19 04:21:48 +00:00
Process.cpp Added the "frame diagnose" command and use its output to make crash info better. 2016-09-06 04:48:36 +00:00
ProcessInfo.cpp Delete Host/windows/win32.h 2016-08-09 23:06:08 +00:00
ProcessLaunchInfo.cpp Generalize child process monitoring functions 2016-05-11 16:59:04 +00:00
Queue.cpp Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Target; other minor fixes. 2016-02-18 18:52:47 +00:00
QueueItem.cpp Correctly add the QueueID to a pending block's extended thread backtrace thread. 2014-03-10 08:42:03 +00:00
QueueList.cpp second pass over removal of Mutex and Condition 2016-05-19 05:13:57 +00:00
RegisterContext.cpp [LLVM][MIPS] Fix FPU Size Based on Dynamic FR. 2016-08-01 13:45:51 +00:00
SectionLoadHistory.cpp remove use of Mutex in favour of std::{,recursive_}mutex 2016-05-18 01:59:10 +00:00
SectionLoadList.cpp remove use of Mutex in favour of std::{,recursive_}mutex 2016-05-18 01:59:10 +00:00
StackFrame.cpp Added the "frame diagnose" command and use its output to make crash info better. 2016-09-06 04:48:36 +00:00
StackFrameList.cpp second pass over removal of Mutex and Condition 2016-05-19 05:13:57 +00:00
StackID.cpp Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Target; other minor fixes. 2016-02-18 18:52:47 +00:00
StopInfo.cpp Added the "frame diagnose" command and use its output to make crash info better. 2016-09-06 04:48:36 +00:00
StructuredDataPlugin.cpp Add StructuredData plugin type; showcase with new DarwinLog feature 2016-08-19 04:21:48 +00:00
SystemRuntime.cpp Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Target; other minor fixes. 2016-02-18 18:52:47 +00:00
Target.cpp Delete Host/windows/win32.h 2016-08-09 23:06:08 +00:00
TargetList.cpp Delete Host/windows/win32.h 2016-08-09 23:06:08 +00:00
Thread.cpp Implementation "step out" plans shouldn't gather the return value. 2016-08-23 17:55:21 +00:00
ThreadCollection.cpp Add missing #include for linux. 2016-06-10 23:53:06 +00:00
ThreadList.cpp second pass over removal of Mutex and Condition 2016-05-19 05:13:57 +00:00
ThreadPlan.cpp Delete Host/windows/win32.h 2016-08-09 23:06:08 +00:00
ThreadPlanBase.cpp Improve logging a bit by printing the exception or signal type description. 2014-02-27 19:35:12 +00:00
ThreadPlanCallFunction.cpp Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in some files in source/Target/. 2015-12-15 01:33:19 +00:00
ThreadPlanCallFunctionUsingABI.cpp Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in some files in source/Target/. 2015-12-15 01:33:19 +00:00
ThreadPlanCallOnFunctionExit.cpp Add StructuredData plugin type; showcase with new DarwinLog feature 2016-08-19 04:21:48 +00:00
ThreadPlanCallUserExpression.cpp Add a DiagnosticManager replace error streams in the expression parser. 2016-03-19 00:03:59 +00:00
ThreadPlanPython.cpp Delete Host/windows/win32.h 2016-08-09 23:06:08 +00:00
ThreadPlanRunToAddress.cpp Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in some files in source/Target/. 2015-12-15 01:33:19 +00:00
ThreadPlanShouldStopHere.cpp Remove a should have been deleted extra assignment to a variable. 2016-05-19 22:22:57 +00:00
ThreadPlanStepInRange.cpp Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in some files in source/Target/. 2015-12-15 01:33:19 +00:00
ThreadPlanStepInstruction.cpp The SetStopInfo from a Mach Exception was setting the stop 2016-02-03 19:45:31 +00:00
ThreadPlanStepOut.cpp Remove unused variables. 2016-08-31 20:03:14 +00:00
ThreadPlanStepOverBreakpoint.cpp Move lldb-log.cpp to core/Logging.cpp 2015-03-18 18:20:42 +00:00
ThreadPlanStepOverRange.cpp Some code that is sanity checking stepping out back out from one inlined 2016-07-29 18:09:12 +00:00
ThreadPlanStepRange.cpp Now that there are no cycles that cause leaks in the disassembler/instruction classes, we can get rid of the FIXME lines that were working around this issue. 2016-06-07 23:19:00 +00:00
ThreadPlanStepThrough.cpp LLDB help content has accumulated over time without a recent attempt to 2016-07-14 22:03:10 +00:00
ThreadPlanStepUntil.cpp Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in some files in source/Target/. 2015-12-15 01:33:19 +00:00
ThreadPlanTracer.cpp Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in some files in source/Target/. 2015-12-15 01:33:19 +00:00
ThreadSpec.cpp Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in some files in source/Target/. 2015-12-15 01:33:19 +00:00
UnixSignals.cpp [NFC] Darwin llgs support from Week of Code 2016-09-04 00:18:56 +00:00
UnwindAssembly.cpp Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Target; other minor fixes. 2016-02-18 18:52:47 +00:00