<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 28, 2016 at 6:09 PM Jason Molenda via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org">lldb-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="gmail_msg">
+#include "x86AssemblyInspectionEngine.h"<br class="gmail_msg">
+<br class="gmail_msg">
+#include "llvm-c/Disassembler.h"<br class="gmail_msg">
+<br class="gmail_msg">
+#include "lldb/Core/Address.h"<br class="gmail_msg">
+#include "lldb/Symbol/UnwindPlan.h"<br class="gmail_msg">
+#include "lldb/Target/RegisterContext.h"<br class="gmail_msg">
+#include "lldb/Target/UnwindAssembly.h"<br class="gmail_msg">
+<br class="gmail_msg">
+using namespace lldb_private;<br class="gmail_msg">
+using namespace lldb;<br class="gmail_msg">
+<br class="gmail_msg">
+x86AssemblyInspectionEngine::x86AssemblyInspectionEngine(const ArchSpec &arch)<br class="gmail_msg">
+ : m_cur_insn(nullptr), m_machine_ip_regnum(LLDB_INVALID_REGNUM),<br class="gmail_msg">
+ m_machine_sp_regnum(LLDB_INVALID_REGNUM),<br class="gmail_msg">
+ m_machine_fp_regnum(LLDB_INVALID_REGNUM),<br class="gmail_msg">
+ m_lldb_ip_regnum(LLDB_INVALID_REGNUM),<br class="gmail_msg">
+ m_lldb_sp_regnum(LLDB_INVALID_REGNUM),<br class="gmail_msg">
+ m_lldb_fp_regnum(LLDB_INVALID_REGNUM),<br class="gmail_msg"></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+<br class="gmail_msg">
+ m_reg_map(), m_arch(arch), m_cpu(k_cpu_unspecified), m_wordsize(-1),<br class="gmail_msg">
+ m_register_map_initialized(false), m_disasm_context() {<br class="gmail_msg"></blockquote><div><div>You may or may not wish to take advantage of this, but since C++11 you can initialize class members in the header file. So you could write:</div><div><br></div><div>uint32_t m_lldb_fp_regnum = LLDB_INVALID_REGNUM;</div><div><br></div><div>etc. This makes the constructors look a lot nicer, especially when you have multiple overloads that all end up doing the same ugly initialization.</div></div></div></div>