[Lldb-commits] [PATCH] D9404: Expression evaluation, a new ThreadPlanCallFunctionNoJIT for executing a function call on target via register manipulation

Jim Ingham jingham at apple.com
Thu Jul 9 10:15:25 PDT 2015


For my part that looks great.

Jim

> On Jul 9, 2015, at 10:03 AM, Ewan Crawford <ewan at codeplay.com> wrote:
> 
> EwanCrawford updated this revision to Diff 29343.
> EwanCrawford added a comment.
> 
> To address that final point of not doing any code execution at all for certain targets. I used the CanJIT() idea to create a similar CanInterpretFunctionCalls() member function of Process.
> This means that we can just pass the value of the m_can_interpret_function_calls variable to CanInterpret() instead of the Arch or execution context.
> 
> Since interpreting function calls is a special case for hexagon right now the value defaults to false, and is only set to true by the hexagon dynamic loader.
> 
> In the future though when more targets support this feature, CanInterpretFunctionCalls() would be enabled by default and then specifically disabled by targets. 
> Using the example of the OSX kernel, which can't do any code execution, the patch explicitly sets jitting and interpreting function calls to false in the dynamic loader using an added CanRunCode() function.
> 
> 
> Repository:
>  rL LLVM
> 
> http://reviews.llvm.org/D9404
> 
> Files:
>  include/lldb/Expression/IRInterpreter.h
>  include/lldb/Expression/IRMemoryMap.h
>  include/lldb/Target/ABI.h
>  include/lldb/Target/Process.h
>  include/lldb/Target/ThreadPlanCallFunction.h
>  include/lldb/Target/ThreadPlanCallFunctionUsingABI.h
>  lldb.xcodeproj/project.pbxproj
>  source/Expression/ClangExpressionParser.cpp
>  source/Expression/ClangUserExpression.cpp
>  source/Expression/IRInterpreter.cpp
>  source/Expression/IRMemoryMap.cpp
>  source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp
>  source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
>  source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
>  source/Target/CMakeLists.txt
>  source/Target/Process.cpp
>  source/Target/ThreadPlanCallFunction.cpp
>  source/Target/ThreadPlanCallFunctionUsingABI.cpp
>  test/expression_command/call-function/TestCallUserDefinedFunction.py
>  test/expression_command/call-function/main.cpp
> 
> <D9404.29343.patch>





More information about the lldb-commits mailing list