aboutsummaryrefslogtreecommitdiffstats
path: root/include/lldb/Target
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2013-11-06 16:48:53 +0000
committerEd Maste <emaste@FreeBSD.org>2013-11-06 16:48:53 +0000
commitf21a844f60ae6c74fcf1fddca32461acce3c1ee0 (patch)
tree56d79f94966870db1cecd65a7264510a25fd1cba /include/lldb/Target
parent37d22554be9f5a677dad2a95b7ef22fe59c66a8a (diff)
downloadsrc-f21a844f60ae6c74fcf1fddca32461acce3c1ee0.tar.gz
src-f21a844f60ae6c74fcf1fddca32461acce3c1ee0.zip
Import lldb as of SVN r194122vendor/lldb/lldb-r194122
Sponsored by: DARPA, AFRL
Notes
Notes: svn path=/vendor/lldb/dist/; revision=257752 svn path=/vendor/lldb/lldb-r194122/; revision=257753; tag=vendor/lldb/lldb-r194122
Diffstat (limited to 'include/lldb/Target')
-rw-r--r--include/lldb/Target/DynamicLoader.h20
-rw-r--r--include/lldb/Target/ExecutionContext.h3
-rw-r--r--include/lldb/Target/Platform.h363
-rw-r--r--include/lldb/Target/Process.h40
-rw-r--r--include/lldb/Target/RegisterContext.h5
-rw-r--r--include/lldb/Target/StackFrame.h368
-rw-r--r--include/lldb/Target/StackFrameList.h3
-rw-r--r--include/lldb/Target/StackID.h7
-rw-r--r--include/lldb/Target/SystemRuntime.h174
-rw-r--r--include/lldb/Target/Target.h92
-rw-r--r--include/lldb/Target/Thread.h38
-rw-r--r--include/lldb/Target/ThreadPlanCallFunction.h8
-rw-r--r--include/lldb/Target/ThreadPlanStepOverRange.h2
13 files changed, 1053 insertions, 70 deletions
diff --git a/include/lldb/Target/DynamicLoader.h b/include/lldb/Target/DynamicLoader.h
index 6b76e5891ae8..272f64f33113 100644
--- a/include/lldb/Target/DynamicLoader.h
+++ b/include/lldb/Target/DynamicLoader.h
@@ -224,6 +224,26 @@ public:
return false;
}
+ //------------------------------------------------------------------
+ /// Retrieves the per-module TLS block for a given thread.
+ ///
+ /// @param[in] module
+ /// The module to query TLS data for.
+ ///
+ /// @param[in] thread
+ /// The specific thread to query TLS data for.
+ ///
+ /// @return
+ /// If the given thread has TLS data allocated for the
+ /// module, the address of the TLS block. Otherwise
+ /// LLDB_INVALID_ADDRESS is returned.
+ //------------------------------------------------------------------
+ virtual lldb::addr_t
+ GetThreadLocalData (const lldb::ModuleSP module, const lldb::ThreadSP thread)
+ {
+ return LLDB_INVALID_ADDRESS;
+ }
+
protected:
//------------------------------------------------------------------
// Member variables.
diff --git a/include/lldb/Target/ExecutionContext.h b/include/lldb/Target/ExecutionContext.h
index de5fe14934a7..4038e70b0c56 100644
--- a/include/lldb/Target/ExecutionContext.h
+++ b/include/lldb/Target/ExecutionContext.h
@@ -461,6 +461,9 @@ public:
uint32_t
GetAddressByteSize() const;
+
+ lldb::ByteOrder
+ GetByteOrder() const;
//------------------------------------------------------------------
/// Returns a pointer to the target object.
diff --git a/include/lldb/Target/Platform.h b/include/lldb/Target/Platform.h
index b0a07946e74e..93cd67d66659 100644
--- a/include/lldb/Target/Platform.h
+++ b/include/lldb/Target/Platform.h
@@ -22,6 +22,7 @@
#include "lldb/Core/ArchSpec.h"
#include "lldb/Core/ConstString.h"
#include "lldb/Core/PluginInterface.h"
+#include "lldb/Interpreter/Options.h"
#include "lldb/Host/Mutex.h"
namespace lldb_private {
@@ -459,6 +460,15 @@ namespace lldb_private {
virtual lldb::BreakpointSP
SetThreadCreationBreakpoint (Target &target);
+ //------------------------------------------------------------------
+ // Given a target, find the local SDK directory if one exists on the
+ // current host.
+ //------------------------------------------------------------------
+ virtual lldb_private::ConstString
+ GetSDKDirectory (lldb_private::Target &target)
+ {
+ return lldb_private::ConstString();
+ }
const std::string &
GetRemoteURL () const
@@ -542,9 +552,249 @@ namespace lldb_private {
return false;
}
+ virtual uint32_t
+ MakeDirectory (const std::string &path,
+ mode_t mode)
+ {
+ return UINT32_MAX;
+ }
+
+ // this need not be virtual: the core behavior is in
+ // MakeDirectory(std::string,mode_t)
+ uint32_t
+ MakeDirectory (const FileSpec &spec,
+ mode_t mode);
+
+ virtual lldb::user_id_t
+ OpenFile (const FileSpec& file_spec,
+ uint32_t flags,
+ mode_t mode,
+ Error &error)
+ {
+ return UINT64_MAX;
+ }
+
+ virtual bool
+ CloseFile (lldb::user_id_t fd,
+ Error &error)
+ {
+ return false;
+ }
+
+ virtual lldb::user_id_t
+ GetFileSize (const FileSpec& file_spec)
+ {
+ return UINT64_MAX;
+ }
+
+ virtual uint64_t
+ ReadFile (lldb::user_id_t fd,
+ uint64_t offset,
+ void *dst,
+ uint64_t dst_len,
+ Error &error)
+ {
+ error.SetErrorStringWithFormat ("Platform::ReadFile() is not supported in the %s platform", GetName().GetCString());
+ return -1;
+ }
+
+ virtual uint64_t
+ WriteFile (lldb::user_id_t fd,
+ uint64_t offset,
+ const void* src,
+ uint64_t src_len,
+ Error &error)
+ {
+ error.SetErrorStringWithFormat ("Platform::ReadFile() is not supported in the %s platform", GetName().GetCString());
+ return -1;
+ }
+
+ virtual Error
+ PutFile (const FileSpec& source,
+ const FileSpec& destination,
+ uint32_t uid = UINT32_MAX,
+ uint32_t gid = UINT32_MAX);
+
virtual size_t
GetEnvironment (StringList &environment);
+ virtual Error
+ GetFile (const FileSpec& source,
+ const FileSpec& destination);
+
+ virtual bool
+ GetFileExists (const lldb_private::FileSpec& file_spec);
+
+ virtual uint32_t
+ GetFilePermissions (const lldb_private::FileSpec &file_spec,
+ Error &error)
+ {
+ error.SetErrorStringWithFormat ("Platform::GetFilePermissions() is not supported in the %s platform", GetName().GetCString());
+ return 0;
+ }
+
+ virtual bool
+ GetSupportsRSync ()
+ {
+ return m_supports_rsync;
+ }
+
+ virtual void
+ SetSupportsRSync(bool flag)
+ {
+ m_supports_rsync = flag;
+ }
+
+ virtual const char*
+ GetRSyncOpts ()
+ {
+ return m_rsync_opts.c_str();
+ }
+
+ virtual void
+ SetRSyncOpts (const char* opts)
+ {
+ m_rsync_opts.assign(opts);
+ }
+
+ virtual const char*
+ GetRSyncPrefix ()
+ {
+ return m_rsync_prefix.c_str();
+ }
+
+ virtual void
+ SetRSyncPrefix (const char* prefix)
+ {
+ m_rsync_prefix.assign(prefix);
+ }
+
+ virtual bool
+ GetSupportsSSH ()
+ {
+ return m_supports_ssh;
+ }
+
+ virtual void
+ SetSupportsSSH(bool flag)
+ {
+ m_supports_ssh = flag;
+ }
+
+ virtual const char*
+ GetSSHOpts ()
+ {
+ return m_ssh_opts.c_str();
+ }
+
+ virtual void
+ SetSSHOpts (const char* opts)
+ {
+ m_ssh_opts.assign(opts);
+ }
+
+ virtual bool
+ GetIgnoresRemoteHostname ()
+ {
+ return m_ignores_remote_hostname;
+ }
+
+ virtual void
+ SetIgnoresRemoteHostname(bool flag)
+ {
+ m_ignores_remote_hostname = flag;
+ }
+
+ virtual lldb_private::OptionGroupOptions *
+ GetConnectionOptions (CommandInterpreter& interpreter)
+ {
+ return NULL;
+ }
+
+ virtual lldb_private::Error
+ RunShellCommand (const char *command, // Shouldn't be NULL
+ const char *working_dir, // Pass NULL to use the current working directory
+ int *status_ptr, // Pass NULL if you don't want the process exit status
+ int *signo_ptr, // Pass NULL if you don't want the signal that caused the process to exit
+ std::string *command_output, // Pass NULL if you don't want the command output
+ uint32_t timeout_sec); // Timeout in seconds to wait for shell program to finish
+
+ virtual void
+ SetLocalCacheDirectory (const char* local);
+
+ virtual const char*
+ GetLocalCacheDirectory ();
+
+ virtual std::string
+ GetPlatformSpecificConnectionInformation()
+ {
+ return "";
+ }
+
+ virtual bool
+ CalculateMD5 (const FileSpec& file_spec,
+ uint64_t &low,
+ uint64_t &high);
+
+ virtual int32_t
+ GetResumeCountForLaunchInfo (ProcessLaunchInfo &launch_info)
+ {
+ return 1;
+ }
+
+ //------------------------------------------------------------------
+ /// Locate a queue name given a thread's qaddr
+ ///
+ /// On a system using libdispatch ("Grand Central Dispatch") style
+ /// queues, a thread may be associated with a GCD queue or not,
+ /// and a queue may be associated with multiple threads.
+ /// The process/thread must provide a way to find the "dispatch_qaddr"
+ /// for each thread, and from that dispatch_qaddr this Platform method
+ /// will locate the queue name and provide that.
+ ///
+ /// @param[in] process
+ /// A process is required for reading memory.
+ ///
+ /// @param[in] dispatch_qaddr
+ /// The dispatch_qaddr for this thread.
+ ///
+ /// @return
+ /// The name of the queue, if there is one. An empty string
+ /// means that this thread is not associated with a dispatch
+ /// queue.
+ //------------------------------------------------------------------
+ virtual std::string
+ GetQueueNameForThreadQAddress (Process *process, lldb::addr_t dispatch_qaddr)
+ {
+ return "";
+ }
+
+ //------------------------------------------------------------------
+ /// Locate a queue ID given a thread's qaddr
+ ///
+ /// On a system using libdispatch ("Grand Central Dispatch") style
+ /// queues, a thread may be associated with a GCD queue or not,
+ /// and a queue may be associated with multiple threads.
+ /// The process/thread must provide a way to find the "dispatch_qaddr"
+ /// for each thread, and from that dispatch_qaddr this Platform method
+ /// will locate the queue ID and provide that.
+ ///
+ /// @param[in] process
+ /// A process is required for reading memory.
+ ///
+ /// @param[in] dispatch_qaddr
+ /// The dispatch_qaddr for this thread.
+ ///
+ /// @return
+ /// The queue_id for this thread, if this thread is associated
+ /// with a dispatch queue. Else LLDB_INVALID_QUEUE_ID is returned.
+ //------------------------------------------------------------------
+ virtual lldb::queue_id_t
+ GetQueueIDForThreadQAddress (Process *process, lldb::addr_t dispatch_qaddr)
+ {
+ return LLDB_INVALID_QUEUE_ID;
+ }
+
protected:
bool m_is_host;
// Set to true when we are able to actually set the OS version while
@@ -569,7 +819,14 @@ namespace lldb_private {
IDToNameMap m_gid_map;
size_t m_max_uid_name_len;
size_t m_max_gid_name_len;
-
+ bool m_supports_rsync;
+ std::string m_rsync_opts;
+ std::string m_rsync_prefix;
+ bool m_supports_ssh;
+ std::string m_ssh_opts;
+ bool m_ignores_remote_hostname;
+ std::string m_local_cache_directory;
+
const char *
GetCachedUserName (uint32_t uid)
{
@@ -750,6 +1007,110 @@ namespace lldb_private {
private:
DISALLOW_COPY_AND_ASSIGN (PlatformList);
};
+
+ class OptionGroupPlatformRSync : public lldb_private::OptionGroup
+ {
+ public:
+ OptionGroupPlatformRSync ();
+
+ virtual
+ ~OptionGroupPlatformRSync ();
+
+ virtual lldb_private::Error
+ SetOptionValue (CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value);
+
+ void
+ OptionParsingStarting (CommandInterpreter &interpreter);
+
+ const lldb_private::OptionDefinition*
+ GetDefinitions ();
+
+ virtual uint32_t
+ GetNumDefinitions ();
+
+ // Options table: Required for subclasses of Options.
+
+ static lldb_private::OptionDefinition g_option_table[];
+
+ // Instance variables to hold the values for command options.
+
+ bool m_rsync;
+ std::string m_rsync_opts;
+ std::string m_rsync_prefix;
+ bool m_ignores_remote_hostname;
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OptionGroupPlatformRSync);
+ };
+
+ class OptionGroupPlatformSSH : public lldb_private::OptionGroup
+ {
+ public:
+ OptionGroupPlatformSSH ();
+
+ virtual
+ ~OptionGroupPlatformSSH ();
+
+ virtual lldb_private::Error
+ SetOptionValue (CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value);
+
+ void
+ OptionParsingStarting (CommandInterpreter &interpreter);
+
+ virtual uint32_t
+ GetNumDefinitions ();
+
+ const lldb_private::OptionDefinition*
+ GetDefinitions ();
+
+ // Options table: Required for subclasses of Options.
+
+ static lldb_private::OptionDefinition g_option_table[];
+
+ // Instance variables to hold the values for command options.
+
+ bool m_ssh;
+ std::string m_ssh_opts;
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OptionGroupPlatformSSH);
+ };
+
+ class OptionGroupPlatformCaching : public lldb_private::OptionGroup
+ {
+ public:
+ OptionGroupPlatformCaching ();
+
+ virtual
+ ~OptionGroupPlatformCaching ();
+
+ virtual lldb_private::Error
+ SetOptionValue (CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value);
+
+ void
+ OptionParsingStarting (CommandInterpreter &interpreter);
+
+ virtual uint32_t
+ GetNumDefinitions ();
+
+ const lldb_private::OptionDefinition*
+ GetDefinitions ();
+
+ // Options table: Required for subclasses of Options.
+
+ static lldb_private::OptionDefinition g_option_table[];
+
+ // Instance variables to hold the values for command options.
+
+ std::string m_cache_dir;
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OptionGroupPlatformCaching);
+ };
+
} // namespace lldb_private
#endif // liblldb_Platform_h_
diff --git a/include/lldb/Target/Process.h b/include/lldb/Target/Process.h
index ef89a1eb1418..aa7b5edc5af1 100644
--- a/include/lldb/Target/Process.h
+++ b/include/lldb/Target/Process.h
@@ -10,9 +10,10 @@
#ifndef liblldb_Process_h_
#define liblldb_Process_h_
+#include "lldb/Host/Config.h"
+
// C Includes
#include <limits.h>
-#include <spawn.h>
// C++ Includes
#include <list>
@@ -239,6 +240,12 @@ public:
return m_arch;
}
+ void
+ SetArchitecture (ArchSpec arch)
+ {
+ m_arch = arch;
+ }
+
lldb::pid_t
GetProcessID () const
{
@@ -475,11 +482,13 @@ public:
bool
Open (int fd, const char *path, bool read, bool write);
+#ifndef LLDB_DISABLE_POSIX
static bool
- AddPosixSpawnFileAction (posix_spawn_file_actions_t *file_actions,
+ AddPosixSpawnFileAction (void *file_actions,
const FileAction *info,
Log *log,
Error& error);
+#endif
int
GetFD () const
@@ -777,7 +786,8 @@ public:
ConvertArgumentsForLaunchingInShell (Error &error,
bool localhost,
bool will_debug,
- bool first_arg_is_full_shell_command);
+ bool first_arg_is_full_shell_command,
+ int32_t num_resumes);
void
SetMonitorProcessCallback (Host::MonitorChildProcessCallback callback,
@@ -1358,9 +1368,7 @@ class Process :
{
friend class ThreadList;
friend class ClangFunction; // For WaitForStateChangeEventsPrivate
-friend class CommandObjectProcessLaunch;
friend class ProcessEventData;
-friend class CommandObjectBreakpointCommand;
friend class StopInfo;
public:
@@ -1749,7 +1757,7 @@ public:
error.SetErrorStringWithFormat("error: %s does not support loading core files.", GetPluginName().GetCString());
return error;
}
-
+
//------------------------------------------------------------------
/// Get the dynamic loader plug-in for this process.
///
@@ -1763,6 +1771,16 @@ public:
GetDynamicLoader ();
//------------------------------------------------------------------
+ /// Get the system runtime plug-in for this process.
+ ///
+ /// @return
+ /// Returns a pointer to the SystemRuntime plugin for this Process
+ /// if one is available. Else returns NULL.
+ //------------------------------------------------------------------
+ virtual SystemRuntime *
+ GetSystemRuntime ();
+
+ //------------------------------------------------------------------
/// Attach to an existing process using the process attach info.
///
/// This function is not meant to be overridden by Process
@@ -3308,8 +3326,11 @@ public:
lldb::StateType
GetNextEvent (lldb::EventSP &event_sp);
+ // Returns the process state when it is stopped. If specified, event_sp_ptr
+ // is set to the event which triggered the stop. If wait_always = false,
+ // and the process is already stopped, this function returns immediately.
lldb::StateType
- WaitForProcessToStop (const TimeValue *timeout, lldb::EventSP *event_sp_ptr = NULL);
+ WaitForProcessToStop (const TimeValue *timeout, lldb::EventSP *event_sp_ptr = NULL, bool wait_always = true);
lldb::StateType
WaitForStateChangedEvents (const TimeValue *timeout, lldb::EventSP &event_sp);
@@ -3656,6 +3677,7 @@ protected:
std::unique_ptr<DynamicLoader> m_dyld_ap;
std::unique_ptr<DynamicCheckerFunctions> m_dynamic_checkers_ap; ///< The functions used by the expression parser to validate data that expressions use.
std::unique_ptr<OperatingSystem> m_os_ap;
+ std::unique_ptr<SystemRuntime> m_system_runtime_ap;
UnixSignals m_unix_signals; /// This is the current signal set for this process.
lldb::ABISP m_abi_sp;
lldb::InputReaderSP m_process_input_reader;
@@ -3711,10 +3733,10 @@ protected:
void
ResumePrivateStateThread ();
- static void *
+ static lldb::thread_result_t
PrivateStateThread (void *arg);
- void *
+ lldb::thread_result_t
RunPrivateStateThread ();
void
diff --git a/include/lldb/Target/RegisterContext.h b/include/lldb/Target/RegisterContext.h
index dd0e73fc7eb3..7da462700110 100644
--- a/include/lldb/Target/RegisterContext.h
+++ b/include/lldb/Target/RegisterContext.h
@@ -123,12 +123,17 @@ public:
const RegisterInfo *
GetRegisterInfoByName (const char *reg_name, uint32_t start_idx = 0);
+ const RegisterInfo *
+ GetRegisterInfo (uint32_t reg_kind, uint32_t reg_num);
+
uint64_t
GetPC (uint64_t fail_value = LLDB_INVALID_ADDRESS);
bool
SetPC (uint64_t pc);
+ bool SetPC (Address addr);
+
uint64_t
GetSP (uint64_t fail_value = LLDB_INVALID_ADDRESS);
diff --git a/include/lldb/Target/StackFrame.h b/include/lldb/Target/StackFrame.h
index 877bd8ce661b..e7b57cd26ac9 100644
--- a/include/lldb/Target/StackFrame.h
+++ b/include/lldb/Target/StackFrame.h
@@ -26,9 +26,21 @@
namespace lldb_private {
+/// @class StackFrame StackFrame.h "lldb/Target/StackFrame.h"
+///
+/// @brief This base class provides an interface to stack frames.
+///
+/// StackFrames may have a Canonical Frame Address (CFA) or not.
+/// A frame may have a plain pc value or it may have a pc value + stop_id
+/// to indicate a specific point in the debug session so the correct section
+/// load list is used for symbolication.
+///
+/// Local variables may be available, or not. A register context may be
+/// available, or not.
+
class StackFrame :
- public std::enable_shared_from_this<StackFrame>,
- public ExecutionContextScope
+ public ExecutionContextScope,
+ public std::enable_shared_from_this<StackFrame>
{
public:
enum ExpressionPathOption
@@ -39,14 +51,72 @@ public:
eExpressionPathOptionsNoSyntheticArrayRange = (1u << 3),
eExpressionPathOptionsAllowDirectIVarAccess = (1u << 4)
};
+
//------------------------------------------------------------------
- // Constructors and Destructors
+ /// Construct a StackFrame object without supplying a RegisterContextSP.
+ ///
+ /// This is the one constructor that doesn't take a RegisterContext
+ /// parameter. This ctor may be called when creating a history StackFrame;
+ /// these are used if we've collected a stack trace of pc addresses at
+ /// some point in the past. We may only have pc values. We may have pc
+ /// values and the stop_id when the stack trace was recorded. We may have a
+ /// CFA, or more likely, we won't.
+ ///
+ /// @param [in] thread_sp
+ /// The Thread that this frame belongs to.
+ ///
+ /// @param [in] frame_idx
+ /// This StackFrame's frame index number in the Thread. If inlined stack
+ /// frames are being created, this may differ from the concrete_frame_idx
+ /// which is the frame index without any inlined stack frames.
+ ///
+ /// @param [in] concrete_frame_idx
+ /// The StackFrame's frame index number in the Thread without any inlined
+ /// stack frames being included in the index.
+ ///
+ /// @param [in] cfa
+ /// The Canonical Frame Address (this terminology from DWARF) for this
+ /// stack frame. The CFA for a stack frame does not change over the
+ /// span of the stack frame's existence. It is often the value of the
+ /// caller's stack pointer before the call instruction into this frame's
+ /// function. It is usually not the same as the frame pointer register's
+ /// value.
+ ///
+ /// @param [in] cfa_is_valid
+ /// A history stack frame may not have a CFA value collected. We want to
+ /// distinguish between "no CFA available" and a CFA of
+ /// LLDB_INVALID_ADDRESS.
+ ///
+ /// @param [in] pc
+ /// The current pc value of this stack frame.
+ ///
+ /// @param [in] stop_id
+ /// The stop_id which should be used when looking up symbols for the pc value,
+ /// if appropriate. This argument is ignored if stop_id_is_valid is false.
+ ///
+ /// @param [in] stop_id_is_valid
+ /// If the stop_id argument provided is not needed for this StackFrame, this
+ /// should be false. If this is a history stack frame and we know the stop_id
+ /// when the pc value was collected, that stop_id should be provided and this
+ /// will be true.
+ ///
+ /// @param [in] is_history_frame
+ /// If this is a historical stack frame -- possibly without CFA or registers or
+ /// local variables -- then this should be set to true.
+ ///
+ /// @param [in] sc_ptr
+ /// Optionally seed the StackFrame with the SymbolContext information that has
+ /// already been discovered.
//------------------------------------------------------------------
StackFrame (const lldb::ThreadSP &thread_sp,
lldb::user_id_t frame_idx,
lldb::user_id_t concrete_frame_idx,
lldb::addr_t cfa,
+ bool cfa_is_valid,
lldb::addr_t pc,
+ uint32_t stop_id,
+ bool stop_id_is_valid,
+ bool is_history_frame,
const SymbolContext *sc_ptr);
StackFrame (const lldb::ThreadSP &thread_sp,
@@ -76,21 +146,103 @@ public:
StackID&
GetStackID();
+ //------------------------------------------------------------------
+ /// Get an Address for the current pc value in this StackFrame.
+ ///
+ /// May not be the same as the actual PC value for inlined stack frames.
+ ///
+ /// @return
+ /// The Address object set to the current PC value.
+ //------------------------------------------------------------------
const Address&
GetFrameCodeAddress();
-
- void
+
+ //------------------------------------------------------------------
+ /// Change the pc value for a given thread.
+ ///
+ /// Change the current pc value for the frame on this thread.
+ ///
+ /// @param[in] pc
+ /// The load address that the pc will be set to.
+ ///
+ /// @return
+ /// true if the pc was changed. false if this failed -- possibly
+ /// because this frame is not a live StackFrame.
+ //------------------------------------------------------------------
+ bool
ChangePC (lldb::addr_t pc);
+ //------------------------------------------------------------------
+ /// Provide a SymbolContext for this StackFrame's current pc value.
+ ///
+ /// The StackFrame maintains this SymbolContext and adds additional information
+ /// to it on an as-needed basis. This helps to avoid different functions
+ /// looking up symbolic information for a given pc value multple times.
+ ///
+ /// @params [in] resolve_scope
+ /// Flags from the SymbolContextItem enumerated type which specify what
+ /// type of symbol context is needed by this caller.
+ ///
+ /// @return
+ /// A SymbolContext reference which includes the types of information
+ /// requested by resolve_scope, if they are available.
+ //------------------------------------------------------------------
const SymbolContext&
GetSymbolContext (uint32_t resolve_scope);
+ //------------------------------------------------------------------
+ /// Return the Canonical Frame Address (DWARF term) for this frame.
+ ///
+ /// The CFA is typically the value of the stack pointer register before
+ /// the call invocation is made. It will not change during the lifetime
+ /// of a stack frame. It is often not the same thing as the frame pointer
+ /// register value.
+ ///
+ /// Live StackFrames will always have a CFA but other types of frames may
+ /// not be able to supply one.
+ ///
+ /// @param [out] value
+ /// The address of the CFA for this frame, if available.
+ ///
+ /// @param [out] error_ptr
+ /// If there is an error determining the CFA address, this may contain a
+ /// string explaining the failure.
+ ///
+ /// @return
+ /// Returns true if the CFA value was successfully set in value. Some
+ /// frames may be unable to provide this value; they will return false.
+ //------------------------------------------------------------------
bool
GetFrameBaseValue(Scalar &value, Error *error_ptr);
+ //------------------------------------------------------------------
+ /// Get the current lexical scope block for this StackFrame, if possible.
+ ///
+ /// If debug information is available for this stack frame, return a
+ /// pointer to the innermost lexical Block that the frame is currently
+ /// executing.
+ ///
+ /// @return
+ /// A pointer to the current Block. NULL is returned if this can
+ /// not be provided.
+ //------------------------------------------------------------------
Block *
GetFrameBlock ();
+ //------------------------------------------------------------------
+ /// Get the RegisterContext for this frame, if possible.
+ ///
+ /// Returns a shared pointer to the RegisterContext for this stack frame.
+ /// Only a live StackFrame object will be able to return a RegisterContext -
+ /// callers must be prepared for an empty shared pointer being returned.
+ ///
+ /// Even a live StackFrame RegisterContext may not be able to provide all
+ /// registers. Only the currently executing frame (frame 0) can reliably
+ /// provide every register in the register context.
+ ///
+ /// @return
+ /// The RegisterContext shared point for this frame.
+ //------------------------------------------------------------------
lldb::RegisterContextSP
GetRegisterContext ();
@@ -100,73 +252,237 @@ public:
return m_reg_context_sp;
}
+ //------------------------------------------------------------------
+ /// Retrieve the list of variables that are in scope at this StackFrame's pc.
+ ///
+ /// A frame that is not live may return an empty VariableList for a given
+ /// pc value even though variables would be available at this point if
+ /// it were a live stack frame.
+ ///
+ /// @param[in] get_file_globals
+ /// Whether to also retrieve compilation-unit scoped variables
+ /// that are visisble to the entire compilation unit (e.g. file
+ /// static in C, globals that are homed in this CU).
+ ///
+ /// @return
+ /// A pointer to a list of variables.
+ //------------------------------------------------------------------
VariableList *
GetVariableList (bool get_file_globals);
+ //------------------------------------------------------------------
+ /// Retrieve the list of variables that are in scope at this StackFrame's pc.
+ ///
+ /// A frame that is not live may return an empty VariableListSP for a
+ /// given pc value even though variables would be available at this point
+ /// if it were a live stack frame.
+ ///
+ /// @param[in] get_file_globals
+ /// Whether to also retrieve compilation-unit scoped variables
+ /// that are visisble to the entire compilation unit (e.g. file
+ /// static in C, globals that are homed in this CU).
+ ///
+ /// @return
+ /// A pointer to a list of variables.
+ //------------------------------------------------------------------
lldb::VariableListSP
GetInScopeVariableList (bool get_file_globals);
- // See ExpressionPathOption enumeration for "options" values
+ //------------------------------------------------------------------
+ /// Create a ValueObject for a variable name / pathname, possibly
+ /// including simple dereference/child selection syntax.
+ ///
+ /// @param[in] var_expr
+ /// The string specifying a variable to base the VariableObject off
+ /// of.
+ ///
+ /// @param[in] use_dynamic
+ /// Whether the correct dynamic type of an object pointer should be
+ /// determined before creating the object, or if the static type is
+ /// sufficient. One of the DynamicValueType enumerated values.
+ ///
+ /// @param[in] options
+ /// An unsigned integer of flags, values from StackFrame::ExpressionPathOption
+ /// enum.
+ /// @param[in] var_sp
+ /// A VariableSP that will be set to the variable described in the
+ /// var_expr path.
+ ///
+ /// @param[in] error
+ /// Record any errors encountered while evaluating var_expr.
+ ///
+ /// @return
+ /// A shared pointer to the ValueObject described by var_expr.
+ //------------------------------------------------------------------
lldb::ValueObjectSP
- GetValueForVariableExpressionPath (const char *var_expr,
- lldb::DynamicValueType use_dynamic,
+ GetValueForVariableExpressionPath (const char *var_expr,
+ lldb::DynamicValueType use_dynamic,
uint32_t options,
lldb::VariableSP &var_sp,
Error &error);
+ //------------------------------------------------------------------
+ /// Determine whether this StackFrame has debug information available or not
+ ///
+ /// @return
+ // true if debug information is available for this frame (function,
+ // compilation unit, block, etc.)
+ //------------------------------------------------------------------
bool
HasDebugInformation ();
+ //------------------------------------------------------------------
+ /// Return the disassembly for the instructions of this StackFrame's function
+ /// as a single C string.
+ ///
+ /// @return
+ // C string with the assembly instructions for this function.
+ //------------------------------------------------------------------
const char *
Disassemble ();
+ //------------------------------------------------------------------
+ /// Print a description for this frame using the frame-format formatter settings.
+ ///
+ /// @param [in] strm
+ /// The Stream to print the description to.
+ ///
+ /// @param [in] frame_marker
+ /// Optional string that will be prepended to the frame output description.
+ //------------------------------------------------------------------
void
- DumpUsingSettingsFormat (Stream *strm);
-
+ DumpUsingSettingsFormat (Stream *strm, const char *frame_marker = NULL);
+
+ //------------------------------------------------------------------
+ /// Print a description for this frame using a default format.
+ ///
+ /// @param [in] strm
+ /// The Stream to print the description to.
+ ///
+ /// @param [in] show_frame_index
+ /// Whether to print the frame number or not.
+ ///
+ /// @param [in] show_fullpaths
+ /// Whether to print the full source paths or just the file base name.
+ //------------------------------------------------------------------
void
Dump (Stream *strm, bool show_frame_index, bool show_fullpaths);
-
+
+ //------------------------------------------------------------------
+ /// Print a description of this stack frame and/or the source context/assembly
+ /// for this stack frame.
+ ///
+ /// @param[in] strm
+ /// The Stream to send the output to.
+ ///
+ /// @param[in] show_frame_info
+ /// If true, print the frame info by calling DumpUsingSettingsFormat().
+ ///
+ /// @param[in] show_source
+ /// If true, print source or disassembly as per the user's settings.
+ ///
+ /// @param[in] frame_marker
+ /// Passed to DumpUsingSettingsFormat() for the frame info printing.
+ ///
+ /// @return
+ /// Returns true if successful.
+ //------------------------------------------------------------------
+ bool
+ GetStatus (Stream &strm,
+ bool show_frame_info,
+ bool show_source,
+ const char *frame_marker = NULL);
+
+ //------------------------------------------------------------------
+ /// Query whether this frame is a concrete frame on the call stack,
+ /// or if it is an inlined frame derived from the debug information
+ /// and presented by the debugger.
+ ///
+ /// @return
+ /// true if this is an inlined frame.
+ //------------------------------------------------------------------
bool
IsInlined ();
+ //------------------------------------------------------------------
+ /// Query this frame to find what frame it is in this Thread's StackFrameList.
+ ///
+ /// @return
+ /// StackFrame index 0 indicates the currently-executing function. Inline
+ /// frames are included in this frame index count.
+ //------------------------------------------------------------------
uint32_t
GetFrameIndex () const;
+ //------------------------------------------------------------------
+ /// Query this frame to find what frame it is in this Thread's StackFrameList,
+ /// not counting inlined frames.
+ ///
+ /// @return
+ /// StackFrame index 0 indicates the currently-executing function. Inline
+ /// frames are not included in this frame index count; their concrete
+ /// frame index will be the same as the concrete frame that they are
+ /// derived from.
+ //------------------------------------------------------------------
uint32_t
GetConcreteFrameIndex () const
{
return m_concrete_frame_index;
}
-
+
+ //------------------------------------------------------------------
+ /// Create a ValueObject for a given Variable in this StackFrame.
+ ///
+ /// @params [in] variable_sp
+ /// The Variable to base this ValueObject on
+ ///
+ /// @params [in] use_dynamic
+ /// Whether the correct dynamic type of the variable should be
+ /// determined before creating the ValueObject, or if the static type
+ /// is sufficient. One of the DynamicValueType enumerated values.
+ ///
+ /// @return
+ // A ValueObject for this variable.
+ //------------------------------------------------------------------
lldb::ValueObjectSP
GetValueObjectForFrameVariable (const lldb::VariableSP &variable_sp, lldb::DynamicValueType use_dynamic);
+ //------------------------------------------------------------------
+ /// Add an arbitrary Variable object (e.g. one that specifics a global or static)
+ /// to a StackFrame's list of ValueObjects.
+ ///
+ /// @params [in] variable_sp
+ /// The Variable to base this ValueObject on
+ ///
+ /// @params [in] use_dynamic
+ /// Whether the correct dynamic type of the variable should be
+ /// determined before creating the ValueObject, or if the static type
+ /// is sufficient. One of the DynamicValueType enumerated values.
+ ///
+ /// @return
+ // A ValueObject for this variable.
+ //------------------------------------------------------------------
lldb::ValueObjectSP
TrackGlobalVariable (const lldb::VariableSP &variable_sp, lldb::DynamicValueType use_dynamic);
-
+
//------------------------------------------------------------------
// lldb::ExecutionContextScope pure virtual functions
//------------------------------------------------------------------
virtual lldb::TargetSP
CalculateTarget ();
-
+
virtual lldb::ProcessSP
CalculateProcess ();
-
+
virtual lldb::ThreadSP
CalculateThread ();
-
+
virtual lldb::StackFrameSP
CalculateStackFrame ();
- virtual void
+ void
CalculateExecutionContext (ExecutionContext &exe_ctx);
-
- bool
- GetStatus (Stream &strm,
- bool show_frame_info,
- bool show_source);
-
+
protected:
friend class StackFrameList;
@@ -175,7 +491,7 @@ protected:
void
UpdateCurrentFrameFromPreviousFrame (StackFrame &prev_frame);
-
+
void
UpdatePreviousFrameFromCurrentFrame (StackFrame &curr_frame);
@@ -196,6 +512,10 @@ private:
Flags m_flags;
Scalar m_frame_base;
Error m_frame_base_error;
+ bool m_cfa_is_valid; // Does this frame have a CFA? Different from CFA == LLDB_INVALID_ADDRESS
+ uint32_t m_stop_id;
+ bool m_stop_id_is_valid; // Does this frame have a stop_id? Use it when referring to the m_frame_code_addr.
+ bool m_is_history_frame;
lldb::VariableListSP m_variable_list_sp;
ValueObjectList m_variable_list_value_objects; // Value objects for each variable in m_variable_list_sp
StreamString m_disassembly;
diff --git a/include/lldb/Target/StackFrameList.h b/include/lldb/Target/StackFrameList.h
index b2689d0391e9..2680be3e5a68 100644
--- a/include/lldb/Target/StackFrameList.h
+++ b/include/lldb/Target/StackFrameList.h
@@ -88,7 +88,8 @@ public:
uint32_t first_frame,
uint32_t num_frames,
bool show_frame_info,
- uint32_t num_frames_with_source);
+ uint32_t num_frames_with_source,
+ const char *frame_marker = NULL);
protected:
diff --git a/include/lldb/Target/StackID.h b/include/lldb/Target/StackID.h
index 7e713c73d972..75ad8ab38903 100644
--- a/include/lldb/Target/StackID.h
+++ b/include/lldb/Target/StackID.h
@@ -110,13 +110,18 @@ public:
protected:
friend class StackFrame;
-
+
void
SetPC (lldb::addr_t pc)
{
m_pc = pc;
}
+ void
+ SetCFA (lldb::addr_t cfa)
+ {
+ m_cfa = cfa;
+ }
//------------------------------------------------------------------
// Classes that inherit from StackID can see and modify these
diff --git a/include/lldb/Target/SystemRuntime.h b/include/lldb/Target/SystemRuntime.h
new file mode 100644
index 000000000000..6c0a4205d5f2
--- /dev/null
+++ b/include/lldb/Target/SystemRuntime.h
@@ -0,0 +1,174 @@
+//===-- SystemRuntime.h -----------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_SystemRuntime_h_
+#define liblldb_SystemRuntime_h_
+
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
+#include <vector>
+
+#include "lldb/lldb-public.h"
+#include "lldb/Core/ConstString.h"
+#include "lldb/Core/ModuleList.h"
+#include "lldb/Core/PluginInterface.h"
+#include "lldb/lldb-private.h"
+
+
+namespace lldb_private {
+
+//----------------------------------------------------------------------
+/// @class SystemRuntime SystemRuntime.h "lldb/Target/SystemRuntime.h"
+/// @brief A plug-in interface definition class for system runtimes.
+///
+/// The system runtime plugins can collect information from the system
+/// libraries during a Process' lifetime and provide information about
+/// how objects/threads were originated.
+///
+/// For instance, a system runtime plugin use a breakpoint when threads
+/// are created to record the backtrace of where that thread was created.
+/// Later, when backtracing the created thread, it could extend the backtrace
+/// to show where it was originally created from.
+///
+/// The plugin will insert its own breakpoint when Created and start collecting
+/// information. Later when it comes time to augment a Thread, it can be
+/// asked to provide that information.
+///
+//----------------------------------------------------------------------
+
+class SystemRuntime :
+ public PluginInterface
+{
+public:
+ //------------------------------------------------------------------
+ /// Find a system runtime plugin for a given process.
+ ///
+ /// Scans the installed SystemRuntime plugins and tries to find
+ /// an instance that can be used to track image changes in \a
+ /// process.
+ ///
+ /// @param[in] process
+ /// The process for which to try and locate a system runtime
+ /// plugin instance.
+ //------------------------------------------------------------------
+ static SystemRuntime*
+ FindPlugin (Process *process);
+
+ //------------------------------------------------------------------
+ /// Construct with a process.
+ // -----------------------------------------------------------------
+ SystemRuntime(lldb_private::Process *process);
+
+ //------------------------------------------------------------------
+ /// Destructor.
+ ///
+ /// The destructor is virtual since this class is designed to be
+ /// inherited by the plug-in instance.
+ //------------------------------------------------------------------
+ virtual
+ ~SystemRuntime();
+
+ //------------------------------------------------------------------
+ /// Called after attaching to a process.
+ ///
+ /// Allow the SystemRuntime plugin to execute some code after attaching
+ /// to a process.
+ //------------------------------------------------------------------
+ virtual void
+ DidAttach ();
+
+ //------------------------------------------------------------------
+ /// Called after launching a process.
+ ///
+ /// Allow the SystemRuntime plugin to execute some code after launching
+ /// a process.
+ //------------------------------------------------------------------
+ virtual void
+ DidLaunch();
+
+ //------------------------------------------------------------------
+ /// Called when modules have been loaded in the process.
+ ///
+ /// Allow the SystemRuntime plugin to enable logging features in the
+ /// system runtime libraries.
+ //------------------------------------------------------------------
+ virtual void
+ ModulesDidLoad(lldb_private::ModuleList &module_list);
+
+
+ //------------------------------------------------------------------
+ /// Return a list of thread origin extended backtraces that may
+ /// be available.
+ ///
+ /// A System Runtime may be able to provide a backtrace of when this
+ /// thread was originally created. Furthermore, it may be able to
+ /// provide that extended backtrace for different styles of creation.
+ /// On a system with both pthreads and libdispatch, aka Grand Central
+ /// Dispatch, queues, the system runtime may be able to provide the
+ /// pthread creation of the thread and it may also be able to provide
+ /// the backtrace of when this GCD queue work block was enqueued.
+ /// The caller may request these different origins by name.
+ ///
+ /// The names will be provided in the order that they are most likely
+ /// to be requested. For instance, a most natural order may be to
+ /// request the GCD libdispatch queue origin. If there is none, then
+ /// request the pthread origin.
+ ///
+ /// @return
+ /// A vector of ConstStrings with names like "pthread" or "libdispatch".
+ /// An empty vector may be returned if no thread origin extended
+ /// backtrace capabilities are available.
+ //------------------------------------------------------------------
+ virtual std::vector<ConstString>
+ GetExtendedBacktraceTypes ();
+
+ //------------------------------------------------------------------
+ /// Return a Thread which shows the origin of this thread's creation.
+ ///
+ /// This likely returns a HistoryThread which shows how thread was
+ /// originally created (e.g. "pthread" type), or how the work that
+ /// is currently executing on it was originally enqueued (e.g.
+ /// "libdispatch" type).
+ ///
+ /// There may be a chain of thread-origins; it may be informative to
+ /// the end user to query the returned ThreadSP for its origins as
+ /// well.
+ ///
+ /// @param [in] thread
+ /// The thread to examine.
+ ///
+ /// @param [in] type
+ /// The type of thread origin being requested. The types supported
+ /// are returned from SystemRuntime::GetExtendedBacktraceTypes.
+ ///
+ /// @return
+ /// A ThreadSP which will have a StackList of frames. This Thread will
+ /// not appear in the Process' list of current threads. Normal thread
+ /// operations like stepping will not be available. This is a historical
+ /// view thread and may be only useful for showing a backtrace.
+ ///
+ /// An empty ThreadSP will be returned if no thread origin is available.
+ //------------------------------------------------------------------
+ virtual lldb::ThreadSP
+ GetExtendedBacktrace (lldb::ThreadSP thread, ConstString type);
+
+protected:
+ //------------------------------------------------------------------
+ // Member variables.
+ //------------------------------------------------------------------
+ Process *m_process;
+private:
+ DISALLOW_COPY_AND_ASSIGN (SystemRuntime);
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_SystemRuntime_h_
diff --git a/include/lldb/Target/Target.h b/include/lldb/Target/Target.h
index 87fa57b3a299..1c90ea6f15eb 100644
--- a/include/lldb/Target/Target.h
+++ b/include/lldb/Target/Target.h
@@ -184,11 +184,13 @@ public:
static const uint32_t default_timeout = 500000;
EvaluateExpressionOptions() :
m_execution_policy(eExecutionPolicyOnlyWhenNeeded),
+ m_language (lldb::eLanguageTypeUnknown),
m_coerce_to_id(false),
m_unwind_on_error(true),
m_ignore_breakpoints (false),
m_keep_in_memory(false),
m_run_others(true),
+ m_debug(false),
m_use_dynamic(lldb::eNoDynamicValues),
m_timeout_usec(default_timeout)
{}
@@ -206,6 +208,19 @@ public:
return *this;
}
+ lldb::LanguageType
+ GetLanguage() const
+ {
+ return m_language;
+ }
+
+ EvaluateExpressionOptions&
+ SetLanguage(lldb::LanguageType language)
+ {
+ m_language = language;
+ return *this;
+ }
+
bool
DoesCoerceToId () const
{
@@ -297,13 +312,28 @@ public:
return *this;
}
+ bool
+ GetDebug() const
+ {
+ return m_debug;
+ }
+
+ EvaluateExpressionOptions&
+ SetDebug(bool b)
+ {
+ m_debug = b;
+ return *this;
+ }
+
private:
ExecutionPolicy m_execution_policy;
+ lldb::LanguageType m_language;
bool m_coerce_to_id;
bool m_unwind_on_error;
bool m_ignore_breakpoints;
bool m_keep_in_memory;
bool m_run_others;
+ bool m_debug;
lldb::DynamicValueType m_use_dynamic;
uint32_t m_timeout_usec;
};
@@ -503,26 +533,30 @@ public:
CreateBreakpoint (const FileSpecList *containingModules,
const FileSpec &file,
uint32_t line_no,
- LazyBool check_inlines = eLazyBoolCalculate,
- LazyBool skip_prologue = eLazyBoolCalculate,
- bool internal = false);
+ LazyBool check_inlines,
+ LazyBool skip_prologue,
+ bool internal,
+ bool request_hardware);
// Use this to create breakpoint that matches regex against the source lines in files given in source_file_list:
lldb::BreakpointSP
CreateSourceRegexBreakpoint (const FileSpecList *containingModules,
const FileSpecList *source_file_list,
RegularExpression &source_regex,
- bool internal = false);
+ bool internal,
+ bool request_hardware);
// Use this to create a breakpoint from a load address
lldb::BreakpointSP
CreateBreakpoint (lldb::addr_t load_addr,
- bool internal = false);
+ bool internal,
+ bool request_hardware);
// Use this to create Address breakpoints:
lldb::BreakpointSP
CreateBreakpoint (Address &addr,
- bool internal = false);
+ bool internal,
+ bool request_hardware);
// Use this to create a function breakpoint by regexp in containingModule/containingSourceFiles, or all modules if it is NULL
// When "skip_prologue is set to eLazyBoolCalculate, we use the current target
@@ -531,8 +565,9 @@ public:
CreateFuncRegexBreakpoint (const FileSpecList *containingModules,
const FileSpecList *containingSourceFiles,
RegularExpression &func_regexp,
- LazyBool skip_prologue = eLazyBoolCalculate,
- bool internal = false);
+ LazyBool skip_prologue,
+ bool internal,
+ bool request_hardware);
// Use this to create a function breakpoint by name in containingModule, or all modules if it is NULL
// When "skip_prologue is set to eLazyBoolCalculate, we use the current target
@@ -542,11 +577,12 @@ public:
const FileSpecList *containingSourceFiles,
const char *func_name,
uint32_t func_name_type_mask,
- LazyBool skip_prologue = eLazyBoolCalculate,
- bool internal = false);
+ LazyBool skip_prologue,
+ bool internal,
+ bool request_hardware);
lldb::BreakpointSP
- CreateExceptionBreakpoint (enum lldb::LanguageType language, bool catch_bp, bool throw_bp, bool internal = false);
+ CreateExceptionBreakpoint (enum lldb::LanguageType language, bool catch_bp, bool throw_bp, bool internal);
// This is the same as the func_name breakpoint except that you can specify a vector of names. This is cheaper
// than a regular expression breakpoint in the case where you just want to set a breakpoint on a set of names
@@ -557,23 +593,26 @@ public:
const char *func_names[],
size_t num_names,
uint32_t func_name_type_mask,
- LazyBool skip_prologue = eLazyBoolCalculate,
- bool internal = false);
+ LazyBool skip_prologue,
+ bool internal,
+ bool request_hardware);
lldb::BreakpointSP
CreateBreakpoint (const FileSpecList *containingModules,
const FileSpecList *containingSourceFiles,
const std::vector<std::string> &func_names,
uint32_t func_name_type_mask,
- LazyBool skip_prologue = eLazyBoolCalculate,
- bool internal = false);
+ LazyBool skip_prologue,
+ bool internal,
+ bool request_hardware);
// Use this to create a general breakpoint:
lldb::BreakpointSP
CreateBreakpoint (lldb::SearchFilterSP &filter_sp,
lldb::BreakpointResolverSP &resolver_sp,
- bool internal = false);
+ bool internal,
+ bool request_hardware);
// Use this to create a watchpoint:
lldb::WatchpointSP
@@ -696,11 +735,14 @@ public:
ModulesDidLoad (ModuleList &module_list);
void
- ModulesDidUnload (ModuleList &module_list);
+ ModulesDidUnload (ModuleList &module_list, bool delete_locations);
void
SymbolsDidLoad (ModuleList &module_list);
+ void
+ ClearModules();
+
//------------------------------------------------------------------
/// Gets the module for the main executable.
///
@@ -1095,21 +1137,7 @@ public:
{
return m_suppress_stop_hooks;
}
-
- bool
- SetSuppressSyntheticValue (bool suppress)
- {
- bool old_value = m_suppress_synthetic_value;
- m_suppress_synthetic_value = suppress;
- return old_value;
- }
-
- bool
- GetSuppressSyntheticValue ()
- {
- return m_suppress_synthetic_value;
- }
-
+
// StopHookSP &
// GetStopHookByIndex (size_t index);
//
diff --git a/include/lldb/Target/Thread.h b/include/lldb/Target/Thread.h
index e4e532e4b331..7dac37caa200 100644
--- a/include/lldb/Target/Thread.h
+++ b/include/lldb/Target/Thread.h
@@ -339,6 +339,12 @@ public:
return NULL;
}
+ virtual lldb::queue_id_t
+ GetQueueID ()
+ {
+ return LLDB_INVALID_QUEUE_ID;
+ }
+
virtual const char *
GetQueueName ()
{
@@ -377,7 +383,10 @@ public:
Error
ReturnFromFrame (lldb::StackFrameSP frame_sp, lldb::ValueObjectSP return_value_sp, bool broadcast = false);
-
+
+ Error
+ JumpToLine (const FileSpec &file, uint32_t line, bool can_leave_function, std::string *warnings = NULL);
+
virtual lldb::StackFrameSP
GetFrameWithStackID (const StackID &stack_id)
{
@@ -452,6 +461,33 @@ public:
DumpUsingSettingsFormat (Stream &strm, uint32_t frame_idx);
//------------------------------------------------------------------
+ /// Retrieves the per-thread data area.
+ /// Most OSs maintain a per-thread pointer (e.g. the FS register on
+ /// x64), which we return the value of here.
+ ///
+ /// @return
+ /// LLDB_INVALID_ADDRESS if not supported, otherwise the thread
+ /// pointer value.
+ //------------------------------------------------------------------
+ virtual lldb::addr_t
+ GetThreadPointer ();
+
+ //------------------------------------------------------------------
+ /// Retrieves the per-module TLS block for a thread.
+ ///
+ /// @param[in] module
+ /// The module to query TLS data for.
+ ///
+ /// @return
+ /// If the thread has TLS data allocated for the
+ /// module, the address of the TLS block. Otherwise
+ /// LLDB_INVALID_ADDRESS is returned.
+ //------------------------------------------------------------------
+ virtual lldb::addr_t
+ GetThreadLocalData (const lldb::ModuleSP module);
+
+
+ //------------------------------------------------------------------
// Thread Plan Providers:
// This section provides the basic thread plans that the Process control
// machinery uses to run the target. ThreadPlan.h provides more details on
diff --git a/include/lldb/Target/ThreadPlanCallFunction.h b/include/lldb/Target/ThreadPlanCallFunction.h
index d747706c6393..7b8efb60b880 100644
--- a/include/lldb/Target/ThreadPlanCallFunction.h
+++ b/include/lldb/Target/ThreadPlanCallFunction.h
@@ -136,7 +136,13 @@ public:
virtual bool
RestoreThreadState();
-
+
+ virtual void
+ ThreadDestroyed ()
+ {
+ m_takedown_done = true;
+ }
+
protected:
void ReportRegisterState (const char *message);
diff --git a/include/lldb/Target/ThreadPlanStepOverRange.h b/include/lldb/Target/ThreadPlanStepOverRange.h
index de9e66829dc7..2cb5288272ea 100644
--- a/include/lldb/Target/ThreadPlanStepOverRange.h
+++ b/include/lldb/Target/ThreadPlanStepOverRange.h
@@ -41,6 +41,8 @@ protected:
private:
+ bool IsEquivalentContext(const SymbolContext &context);
+
bool m_first_resume;
DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepOverRange);