Cleaned up the Disassembler code a bit more. You can now request a disassembler
plugin by name on the command line for when there is more than one disassembler
plugin.
Taught the Opcode class to dump itself so that "disassembler -b" will dump
the bytes correctly for each opcode type. Modified all places that were passing
the opcode bytes buffer in so that the bytes could be displayed to just pass
in a bool that indicates if we should dump the opcode bytes since the opcode
now lives inside llvm_private::Instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128290 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectDisassemble.h b/source/Commands/CommandObjectDisassemble.h
index 4794ee5..91812af 100644
--- a/source/Commands/CommandObjectDisassemble.h
+++ b/source/Commands/CommandObjectDisassemble.h
@@ -44,6 +44,15 @@
const OptionDefinition*
GetDefinitions ();
+ const char *
+ GetPluginName ()
+ {
+ if (m_plugin_name.empty())
+ return NULL;
+ return m_plugin_name.c_str();
+ }
+
+
bool show_mixed; // Show mixed source/assembly
bool show_bytes;
uint32_t num_lines_context;
@@ -53,6 +62,7 @@
lldb::addr_t m_start_addr;
lldb::addr_t m_end_addr;
bool m_at_pc;
+ std::string m_plugin_name;
static OptionDefinition g_option_table[];
};