Added a ClangUtilityFunction class that allows the
debugger to insert self-contained functions for use by
expressions (mainly for error-checking).

In order to support detecting whether a crash occurred
in one of these helpers -- currently our preferred way
of reporting that an error-check failed -- added a bit
of support for getting the extent of a JITted function
in addition to just its base.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112324 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpressionParser.cpp b/source/Expression/ClangExpressionParser.cpp
index 05c237a..7c4cc6a 100644
--- a/source/Expression/ClangExpressionParser.cpp
+++ b/source/Expression/ClangExpressionParser.cpp
@@ -369,7 +369,9 @@
 }
 
 Error
-ClangExpressionParser::MakeJIT (lldb::addr_t &func_addr, ExecutionContext &exe_ctx)
+ClangExpressionParser::MakeJIT (lldb::addr_t &func_addr, 
+                                lldb::addr_t &func_end, 
+                                ExecutionContext &exe_ctx)
 {
     Error err;
     
@@ -507,7 +509,10 @@
         (*pos).m_remote_addr = m_jit_mm->GetRemoteAddressForLocal ((*pos).m_local_addr);
     
         if (!(*pos).m_name.compare(m_expr.FunctionName()))
+        {
+            func_end = m_jit_mm->GetRemoteRangeForLocal ((*pos).m_local_addr).second;
             func_addr = (*pos).m_remote_addr;
+        }
     }
     
     err.Clear();