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"
|
2010-06-16 03:49:27 +08:00
|
|
|
#include "lldb/Interpreter/Options.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/Core/Language.h"
|
|
|
|
#include "lldb/Target/ExecutionContext.h"
|
|
|
|
|
|
|
|
namespace lldb_private {
|
|
|
|
|
|
|
|
class CommandObjectExpression : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
class CommandOptions : public Options
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2011-04-08 06:46:35 +08:00
|
|
|
CommandOptions (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandOptions ();
|
|
|
|
|
|
|
|
virtual Error
|
|
|
|
SetOptionValue (int option_idx, const char *option_arg);
|
|
|
|
|
|
|
|
void
|
|
|
|
ResetOptionValues ();
|
|
|
|
|
2011-03-25 05:19:54 +08:00
|
|
|
const OptionDefinition*
|
2010-06-09 00:52:24 +08:00
|
|
|
GetDefinitions ();
|
|
|
|
|
|
|
|
// Options table: Required for subclasses of Options.
|
|
|
|
|
2011-03-25 05:19:54 +08:00
|
|
|
static OptionDefinition g_option_table[];
|
2010-09-08 06:38:08 +08:00
|
|
|
//Language language;
|
2010-06-09 00:52:24 +08:00
|
|
|
lldb::Encoding encoding;
|
|
|
|
lldb::Format format;
|
|
|
|
bool debug;
|
2010-09-30 08:54:27 +08:00
|
|
|
bool print_object;
|
2010-11-06 03:25:48 +08:00
|
|
|
bool unwind_on_error;
|
2010-06-09 00:52:24 +08:00
|
|
|
bool show_types;
|
|
|
|
bool show_summary;
|
|
|
|
};
|
|
|
|
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectExpression (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectExpression ();
|
|
|
|
|
|
|
|
virtual
|
|
|
|
Options *
|
|
|
|
GetOptions ();
|
|
|
|
|
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
Execute (Args& command,
|
2010-06-09 00:52:24 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
WantsRawCommandString() { return true; }
|
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
ExecuteRawCommandString (const char *command,
|
2010-06-09 00:52:24 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
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,
|
|
|
|
Stream &output_stream,
|
|
|
|
Stream &error_stream,
|
|
|
|
CommandReturnObject *result = NULL);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
CommandOptions m_options;
|
|
|
|
ExecutionContext m_exe_ctx;
|
|
|
|
uint32_t m_expr_line_count;
|
|
|
|
std::string m_expr_lines; // Multi-line expression support
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace lldb_private
|
|
|
|
|
|
|
|
#endif // liblldb_CommandObjectExpression_h_
|