hanchenye-llvm-project/lldb/source/Expression
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
..
CMakeLists.txt Add a DiagnosticManager replace error streams in the expression parser. 2016-03-19 00:03:59 +00:00
DWARFExpression.cpp Added the "frame diagnose" command and use its output to make crash info better. 2016-09-06 04:48:36 +00:00
DiagnosticManager.cpp Used llvm_unreached to quite a VC++ compiler warning. 2016-04-28 20:14:44 +00:00
Expression.cpp This patch makes Clang-independent base classes for all the expression types that lldb currently vends. 2015-09-15 21:13:50 +00:00
ExpressionSourceCode.cpp Add an "experimental" setting to disable injecting local variables into expressions. 2016-07-07 18:25:48 +00:00
ExpressionVariable.cpp Collect IRExecutionUnits as part of persistent expression state. 2016-03-21 22:23:38 +00:00
FunctionCaller.cpp Compilation can end up calling functions (e.g. to resolve indirect functions) so I added 2016-03-21 19:21:13 +00:00
IRDynamicChecks.cpp Add a DiagnosticManager replace error streams in the expression parser. 2016-03-19 00:03:59 +00:00
IRExecutionUnit.cpp [lldb] Use OrcMCJITReplacement rather than MCJIT as the underlying JIT for LLDB 2016-08-19 21:27:16 +00:00
IRInterpreter.cpp [LLDB] Added support for PHI nodes to IR interpreter 2016-05-12 20:00:53 +00:00
IRMemoryMap.cpp Fixed a problem in IRMemoryMap where the flag to zero out memory was ignored. 2016-06-09 22:22:40 +00:00
LLVMUserExpression.cpp [fix] Fixed a bug where const this would cause parser errors about $__lldb_expr. 2016-04-29 18:09:03 +00:00
Materializer.cpp Fixed a problem where we failed to get the size of an Objective-C type. 2016-08-18 17:45:50 +00:00
REPL.cpp Decoupled Options from CommandInterpreter. 2016-08-11 23:51:28 +00:00
UserExpression.cpp Breakpoint conditions were making result variables, which they should not do. 2016-04-12 17:17:35 +00:00
UtilityFunction.cpp UtilityFunction::MakeFunctionCaller uses the Error to report failure, 2016-04-26 19:46:39 +00:00