blob: a36ae88cb156d6e9cf0739338199913dfc86b3dd [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;
Jim Inghamaa3e3e12011-03-22 01:48:42 +000050 uint32_t num_instructions;
Chris Lattner24943d22010-06-08 16:52:24 +000051 bool raw;
52 std::string m_func_name;
Jim Ingham34e9a982010-06-15 18:47:14 +000053 lldb::addr_t m_start_addr;
54 lldb::addr_t m_end_addr;
Jim Inghamaa3e3e12011-03-22 01:48:42 +000055 bool m_at_pc;
Chris Lattner24943d22010-06-08 16:52:24 +000056 static lldb::OptionDefinition g_option_table[];
57 };
58
Greg Clayton238c0a12010-09-18 01:14:36 +000059 CommandObjectDisassemble (CommandInterpreter &interpreter);
Chris Lattner24943d22010-06-08 16:52:24 +000060
61 virtual
62 ~CommandObjectDisassemble ();
63
64 virtual
65 Options *
66 GetOptions ()
67 {
68 return &m_options;
69 }
70
71 virtual bool
Greg Clayton238c0a12010-09-18 01:14:36 +000072 Execute (Args& command,
Chris Lattner24943d22010-06-08 16:52:24 +000073 CommandReturnObject &result);
74
75protected:
76 CommandOptions m_options;
77
Chris Lattner24943d22010-06-08 16:52:24 +000078};
79
80} // namespace lldb_private
81
82#endif // liblldb_CommandObjectDisassemble_h_