Improve the x86_64 return value decoder to handle most structure returns.

Switch from GetReturnValue, which was hardly ever used, to GetReturnValueObject
which is much more convenient.
Return the "return value object" as a persistent variable if requested.

llvm-svn: 147157
This commit is contained in:
Jim Ingham
2011-12-22 19:12:40 +00:00
parent 6901c0de67
commit ef65160016
19 changed files with 897 additions and 277 deletions

View File

@@ -405,6 +405,7 @@ ClangFunction::GetThreadPlanToCallFunction (ExecutionContext &exe_ctx,
Address wrapper_address (NULL, func_addr);
ThreadPlan *new_plan = new ThreadPlanCallFunction (*thread,
wrapper_address,
ClangASTType(),
args_addr,
stop_others,
discard_on_error,
@@ -418,7 +419,8 @@ ClangFunction::FetchFunctionResults (ExecutionContext &exe_ctx, lldb::addr_t arg
{
// Read the return value - it is the last field in the struct:
// FIXME: How does clang tell us there's no return value? We need to handle that case.
// FIXME: Create our ThreadPlanCallFunction with the return ClangASTType, and then use GetReturnValueObject
// to fetch the value. That way we can fetch any values we need.
Process *process = exe_ctx.GetProcessPtr();
if (process == NULL)