blob: 9b0e0ab2afe49ef92ac5403c7abf6bf7ad10b8dc [file] [log] [blame]
Chris Lattner24943d22010-06-08 16:52:24 +00001//===-- CommandObjectDisassemble.h ------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef liblldb_CommandObjectDisassemble_h_
11#define liblldb_CommandObjectDisassemble_h_
12
13// C Includes
14// C++ Includes
15// Other libraries and framework includes
16// Project includes
17#include "lldb/Interpreter/CommandObject.h"
Jim Ingham84cdc152010-06-15 19:49:27 +000018#include "lldb/Interpreter/Options.h"
Chris Lattner24943d22010-06-08 16:52:24 +000019
20namespace lldb_private {
21
22//-------------------------------------------------------------------------
23// CommandObjectDisassemble
24//-------------------------------------------------------------------------
25
26class CommandObjectDisassemble : public CommandObject
27{
28public:
29 class CommandOptions : public Options
30 {
31 public:
32
33 CommandOptions ();
34
35 virtual
36 ~CommandOptions ();
37
38 virtual Error
39 SetOptionValue (int option_idx, const char *option_arg);
40
41 void
42 ResetOptionValues ();
43
44 const lldb::OptionDefinition*
45 GetDefinitions ();
46
47 bool show_mixed; // Show mixed source/assembly
48 bool show_bytes;
49 uint32_t num_lines_context;
50 bool raw;
51 std::string m_func_name;
Jim Ingham34e9a982010-06-15 18:47:14 +000052 lldb::addr_t m_start_addr;
53 lldb::addr_t m_end_addr;
Chris Lattner24943d22010-06-08 16:52:24 +000054 static lldb::OptionDefinition g_option_table[];
55 };
56
Greg Clayton238c0a12010-09-18 01:14:36 +000057 CommandObjectDisassemble (CommandInterpreter &interpreter);
Chris Lattner24943d22010-06-08 16:52:24 +000058
59 virtual
60 ~CommandObjectDisassemble ();
61
62 virtual
63 Options *
64 GetOptions ()
65 {
66 return &m_options;
67 }
68
69 virtual bool
Greg Clayton238c0a12010-09-18 01:14:36 +000070 Execute (Args& command,
Chris Lattner24943d22010-06-08 16:52:24 +000071 CommandReturnObject &result);
72
73protected:
74 CommandOptions m_options;
75
Chris Lattner24943d22010-06-08 16:52:24 +000076};
77
78} // namespace lldb_private
79
80#endif // liblldb_CommandObjectDisassemble_h_