1 //===-- CommandObjectDisassemble.h ------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_CommandObjectDisassemble_h_
11 #define liblldb_CommandObjectDisassemble_h_
15 // Other libraries and framework includes
17 #include "lldb/Core/ArchSpec.h"
18 #include "lldb/Interpreter/CommandObject.h"
19 #include "lldb/Interpreter/Options.h"
21 namespace lldb_private {
23 //-------------------------------------------------------------------------
24 // CommandObjectDisassemble
25 //-------------------------------------------------------------------------
27 class CommandObjectDisassemble : public CommandObjectParsed
30 class CommandOptions : public Options
34 CommandOptions (CommandInterpreter &interpreter);
40 SetOptionValue (uint32_t option_idx, const char *option_arg);
43 OptionParsingStarting ();
45 const OptionDefinition*
51 if (plugin_name.empty())
53 return plugin_name.c_str();
59 if (flavor_string.empty() || flavor_string == "default")
61 return flavor_string.c_str();
65 OptionParsingFinished ();
67 bool show_mixed; // Show mixed source/assembly
69 uint32_t num_lines_context;
70 uint32_t num_instructions;
72 std::string func_name;
73 bool current_function;
74 lldb::addr_t start_addr;
75 lldb::addr_t end_addr;
78 std::string plugin_name;
79 std::string flavor_string;
81 bool some_location_specified; // If no location was specified, we'll select "at_pc". This should be set
82 // in SetOptionValue if anything the selects a location is set.
83 lldb::addr_t symbol_containing_addr;
84 static OptionDefinition g_option_table[];
87 CommandObjectDisassemble (CommandInterpreter &interpreter);
90 ~CommandObjectDisassemble ();
101 DoExecute (Args& command,
102 CommandReturnObject &result);
104 CommandOptions m_options;
108 } // namespace lldb_private
110 #endif // liblldb_CommandObjectDisassemble_h_