2010-06-09 00:52:24 +08:00
|
|
|
//===-- CommandObjectExpression.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_CommandObjectExpression_h_
|
|
|
|
#define liblldb_CommandObjectExpression_h_
|
|
|
|
|
|
|
|
// C Includes
|
|
|
|
// C++ Includes
|
|
|
|
// Other libraries and framework includes
|
|
|
|
// Project includes
|
|
|
|
#include "lldb/Interpreter/CommandObject.h"
|
2011-10-25 14:44:01 +08:00
|
|
|
#include "lldb/Interpreter/OptionGroupFormat.h"
|
2013-01-10 04:12:53 +08:00
|
|
|
#include "lldb/Interpreter/OptionGroupValueObjectDisplay.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/Target/ExecutionContext.h"
|
|
|
|
|
|
|
|
namespace lldb_private {
|
|
|
|
|
2012-06-09 05:56:10 +08:00
|
|
|
class CommandObjectExpression : public CommandObjectRaw
|
2010-06-09 00:52:24 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2011-10-25 14:44:01 +08:00
|
|
|
class CommandOptions : public OptionGroup
|
2010-06-09 00:52:24 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2011-10-25 14:44:01 +08:00
|
|
|
CommandOptions ();
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandOptions ();
|
|
|
|
|
2011-10-25 14:44:01 +08:00
|
|
|
virtual uint32_t
|
|
|
|
GetNumDefinitions ();
|
|
|
|
|
|
|
|
virtual const OptionDefinition*
|
2010-06-09 00:52:24 +08:00
|
|
|
GetDefinitions ();
|
2011-10-25 14:44:01 +08:00
|
|
|
|
|
|
|
virtual Error
|
|
|
|
SetOptionValue (CommandInterpreter &interpreter,
|
|
|
|
uint32_t option_idx,
|
|
|
|
const char *option_value);
|
|
|
|
|
|
|
|
virtual void
|
|
|
|
OptionParsingStarting (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
// Options table: Required for subclasses of Options.
|
|
|
|
|
2011-03-25 05:19:54 +08:00
|
|
|
static OptionDefinition g_option_table[];
|
2010-11-06 03:25:48 +08:00
|
|
|
bool unwind_on_error;
|
2013-01-15 10:47:48 +08:00
|
|
|
bool ignore_breakpoints;
|
2010-06-09 00:52:24 +08:00
|
|
|
bool show_types;
|
|
|
|
bool show_summary;
|
2012-10-17 05:41:58 +08:00
|
|
|
uint32_t timeout;
|
|
|
|
bool try_all_threads;
|
2010-06-09 00:52:24 +08:00
|
|
|
};
|
|
|
|
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectExpression (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectExpression ();
|
|
|
|
|
|
|
|
virtual
|
|
|
|
Options *
|
|
|
|
GetOptions ();
|
|
|
|
|
|
|
|
protected:
|
2012-06-09 05:56:10 +08:00
|
|
|
virtual bool
|
|
|
|
DoExecute (const char *command,
|
|
|
|
CommandReturnObject &result);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
static size_t
|
|
|
|
MultiLineExpressionCallback (void *baton,
|
2010-06-23 09:19:29 +08:00
|
|
|
InputReader &reader,
|
2010-06-09 00:52:24 +08:00
|
|
|
lldb::InputReaderAction notification,
|
|
|
|
const char *bytes,
|
|
|
|
size_t bytes_len);
|
|
|
|
|
|
|
|
bool
|
2010-08-13 08:42:30 +08:00
|
|
|
EvaluateExpression (const char *expr,
|
2011-06-14 04:20:29 +08:00
|
|
|
Stream *output_stream,
|
|
|
|
Stream *error_stream,
|
2010-08-13 08:42:30 +08:00
|
|
|
CommandReturnObject *result = NULL);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
2011-10-25 14:44:01 +08:00
|
|
|
OptionGroupOptions m_option_group;
|
|
|
|
OptionGroupFormat m_format_options;
|
2013-01-10 04:12:53 +08:00
|
|
|
OptionGroupValueObjectDisplay m_varobj_options;
|
2011-10-25 14:44:01 +08:00
|
|
|
CommandOptions m_command_options;
|
2010-06-09 00:52:24 +08:00
|
|
|
uint32_t m_expr_line_count;
|
|
|
|
std::string m_expr_lines; // Multi-line expression support
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace lldb_private
|
|
|
|
|
|
|
|
#endif // liblldb_CommandObjectExpression_h_
|