summaryrefslogtreecommitdiffstats
path: root/include/lldb/Interpreter/CommandObject.h
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2014-11-25 21:00:58 +0000
committeremaste <emaste@FreeBSD.org>2014-11-25 21:00:58 +0000
commit01ee1789d6aa7294e5966a97f8d29387f6f81699 (patch)
treec94307da318be46e5aeea1a325c1e91749506e4f /include/lldb/Interpreter/CommandObject.h
parent788502c6f6261e2d84ef85d1052b41a6c5be31b3 (diff)
downloadFreeBSD-src-01ee1789d6aa7294e5966a97f8d29387f6f81699.zip
FreeBSD-src-01ee1789d6aa7294e5966a97f8d29387f6f81699.tar.gz
Import LLDB as of upstream SVN r216948 (git 50f7fe44)
This corresponds with the branchpoint for the 3.5 release. A number of files not required for the FreeBSD build have been removed. Sponsored by: DARPA, AFRL
Diffstat (limited to 'include/lldb/Interpreter/CommandObject.h')
-rw-r--r--include/lldb/Interpreter/CommandObject.h33
1 files changed, 23 insertions, 10 deletions
diff --git a/include/lldb/Interpreter/CommandObject.h b/include/lldb/Interpreter/CommandObject.h
index 8544fd9..7bdf55a 100644
--- a/include/lldb/Interpreter/CommandObject.h
+++ b/include/lldb/Interpreter/CommandObject.h
@@ -269,7 +269,7 @@ public:
//
// Ensures a valid register context (from the selected frame if there
// is a frame in m_exe_ctx, or from the selected thread from m_exe_ctx)
- // is availble from m_exe_ctx prior to executing the command. If a
+ // is available from m_exe_ctx prior to executing the command. If a
// target doesn't exist or is invalid, the command will fail and
// CommandObject::GetInvalidRegContextDescription() will be returned as
// the error. CommandObject subclasses can override the virtual function
@@ -460,25 +460,37 @@ public:
return NULL;
}
- CommandOverrideCallback
- GetOverrideCallback () const
+ bool
+ HasOverrideCallback () const
{
- return m_command_override_callback;
+ return m_command_override_callback || m_deprecated_command_override_callback;
}
- void *
- GetOverrideCallbackBaton () const
+ void
+ SetOverrideCallback (lldb::CommandOverrideCallback callback, void *baton)
{
- return m_command_override_baton;
+ m_deprecated_command_override_callback = callback;
+ m_command_override_baton = baton;
}
-
+
void
- SetOverrideCallback (CommandOverrideCallback callback, void *baton)
+ SetOverrideCallback (lldb::CommandOverrideCallbackWithResult callback, void *baton)
{
m_command_override_callback = callback;
m_command_override_baton = baton;
}
+ bool
+ InvokeOverrideCallback (const char **argv, CommandReturnObject &result)
+ {
+ if (m_command_override_callback)
+ return m_command_override_callback(m_command_override_baton, argv, result);
+ else if (m_deprecated_command_override_callback)
+ return m_deprecated_command_override_callback(m_command_override_baton, argv);
+ else
+ return false;
+ }
+
virtual bool
Execute (const char *args_string, CommandReturnObject &result) = 0;
@@ -540,7 +552,8 @@ protected:
bool m_is_alias;
Flags m_flags;
std::vector<CommandArgumentEntry> m_arguments;
- CommandOverrideCallback m_command_override_callback;
+ lldb::CommandOverrideCallback m_deprecated_command_override_callback;
+ lldb::CommandOverrideCallbackWithResult m_command_override_callback;
void * m_command_override_baton;
// Helper function to populate IDs or ID ranges as the command argument data
OpenPOWER on IntegriCloud