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
33 CommandOptions (CommandInterpreter &interpreter);
35 ~CommandOptions() override;
38 SetOptionValue(uint32_t option_idx, const char *option_arg) override;
41 OptionParsingStarting() override;
43 const OptionDefinition*
44 GetDefinitions() override;
49 return (plugin_name.empty() ? nullptr : plugin_name.c_str());
55 if (flavor_string.empty() || flavor_string == "default")
57 return flavor_string.c_str();
61 OptionParsingFinished() override;
63 bool show_mixed; // Show mixed source/assembly
65 uint32_t num_lines_context;
66 uint32_t num_instructions;
68 std::string func_name;
69 bool current_function;
70 lldb::addr_t start_addr;
71 lldb::addr_t end_addr;
74 std::string plugin_name;
75 std::string flavor_string;
77 bool some_location_specified; // If no location was specified, we'll select "at_pc". This should be set
78 // in SetOptionValue if anything the selects a location is set.
79 lldb::addr_t symbol_containing_addr;
80 static OptionDefinition g_option_table[];
83 CommandObjectDisassemble (CommandInterpreter &interpreter);
85 ~CommandObjectDisassemble() override;
95 DoExecute(Args& command,
96 CommandReturnObject &result) override;
98 CommandOptions m_options;
101 } // namespace lldb_private
103 #endif // liblldb_CommandObjectDisassemble_h_