diff options
author | Jim Ingham <jingham@apple.com> | 2010-11-30 02:22:11 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2010-11-30 02:22:11 +0000 |
commit | f48169bb4f4ff2921b3522fd7a4b8586f5473984 (patch) | |
tree | a3b94bf2e3539c728fa233eb3368280f302b14fe /lldb/source/Target/ThreadPlanCallUserExpression.cpp | |
parent | d4900a644ce3e5ff9e5c5acd4bd379ec45017d8d (diff) | |
download | bcm5719-llvm-f48169bb4f4ff2921b3522fd7a4b8586f5473984.tar.gz bcm5719-llvm-f48169bb4f4ff2921b3522fd7a4b8586f5473984.zip |
Moved the code in ClangUserExpression that set up & ran the thread plan with timeouts, and restarting with all threads into a utility function in Process. This required a bunch of renaming.
Added a ThreadPlanCallUserExpression that differs from ThreadPlanCallFunction in that it holds onto a shared pointer to its ClangUserExpression so that can't go away before the thread plan is done using it.
Fixed the stop message when you hit a breakpoint while running a user expression so it is more obvious what has happened.
llvm-svn: 120386
Diffstat (limited to 'lldb/source/Target/ThreadPlanCallUserExpression.cpp')
-rw-r--r-- | lldb/source/Target/ThreadPlanCallUserExpression.cpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/lldb/source/Target/ThreadPlanCallUserExpression.cpp b/lldb/source/Target/ThreadPlanCallUserExpression.cpp new file mode 100644 index 00000000000..fd022a26d55 --- /dev/null +++ b/lldb/source/Target/ThreadPlanCallUserExpression.cpp @@ -0,0 +1,59 @@ +//===-- ThreadPlanCallUserExpression.cpp ------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Target/ThreadPlanCallUserExpression.h" + +// C Includes +// C++ Includes +// Other libraries and framework includes +#include "llvm/Support/MachO.h" +// Project includes +#include "lldb/lldb-private-log.h" +#include "lldb/Breakpoint/Breakpoint.h" +#include "lldb/Breakpoint/BreakpointLocation.h" +#include "lldb/Core/Address.h" +#include "lldb/Core/Log.h" +#include "lldb/Core/Stream.h" +#include "lldb/Expression/ClangUserExpression.h" +#include "lldb/Target/LanguageRuntime.h" +#include "lldb/Target/Process.h" +#include "lldb/Target/RegisterContext.h" +#include "lldb/Target/StopInfo.h" +#include "lldb/Target/Target.h" +#include "lldb/Target/Thread.h" +#include "lldb/Target/ThreadPlanRunToAddress.h" + +using namespace lldb; +using namespace lldb_private; + +//---------------------------------------------------------------------- +// ThreadPlanCallUserExpression: Plan to call a single function +//---------------------------------------------------------------------- + +ThreadPlanCallUserExpression::ThreadPlanCallUserExpression (Thread &thread, + Address &function, + lldb::addr_t arg, + bool stop_other_threads, + bool discard_on_error, + lldb::addr_t *this_arg, + ClangUserExpression::ClangUserExpressionSP &user_expression_sp) : + ThreadPlanCallFunction (thread, function, arg, stop_other_threads, discard_on_error, this_arg), + m_user_expression_sp (user_expression_sp) +{ +} + +ThreadPlanCallUserExpression::~ThreadPlanCallUserExpression () +{ +} + +void +ThreadPlanCallUserExpression::GetDescription (Stream *s, lldb::DescriptionLevel level) +{ + ThreadPlanCallFunction::GetDescription (s, level); +} |