diff options
author | Jason Molenda <jmolenda@apple.com> | 2010-11-04 09:40:56 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2010-11-04 09:40:56 +0000 |
commit | fa19c3e7d677ed5130fafcc4dab52ef560237ade (patch) | |
tree | fa59a8f6e033063ad81fa39aa69379bac860e607 /lldb/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp | |
parent | 4b52007c35d28d321e1e1b1d6df09d9df5558788 (diff) | |
download | bcm5719-llvm-fa19c3e7d677ed5130fafcc4dab52ef560237ade.tar.gz bcm5719-llvm-fa19c3e7d677ed5130fafcc4dab52ef560237ade.zip |
Built the native unwinder with all the warnings c++-4.2 could muster;
fixed them. Added DISALLOW_COPY_AND_ASSIGN to classes that should
not be bitwise copied. Added default initializers for member
variables that weren't being initialized in the ctor. Fixed a few
shadowed local variable mistakes.
llvm-svn: 118240
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lldb/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp b/lldb/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp index e0f99d9255c..8521231e6e6 100644 --- a/lldb/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp +++ b/lldb/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp @@ -162,10 +162,15 @@ private: int m_wordsize; int m_cpu; + + DISALLOW_COPY_AND_ASSIGN (AssemblyParse_x86); }; AssemblyParse_x86::AssemblyParse_x86 (Target& target, Thread* thread, int cpu, AddressRange func) : - m_target (target), m_thread (thread), m_cpu(cpu), m_func_bounds(func) + m_target (target), m_thread (thread), m_cpu(cpu), m_func_bounds(func), + m_machine_ip_regnum (-1), m_machine_sp_regnum (-1), m_machine_fp_regnum (-1), + m_lldb_ip_regnum (-1), m_lldb_sp_regnum (-1), m_lldb_fp_regnum (-1), + m_wordsize (-1), m_cur_insn () { int *initialized_flag = NULL; m_lldb_ip_regnum = m_lldb_sp_regnum = m_lldb_fp_regnum = -1; @@ -519,7 +524,7 @@ AssemblyParse_x86::get_non_call_site_unwind_plan (UnwindPlan &unwind_plan) m_cur_insn = m_func_bounds.GetBaseAddress (); int current_func_text_offset = 0; int current_sp_bytes_offset_from_cfa = 0; - UnwindPlan::Row::RegisterLocation regloc; + UnwindPlan::Row::RegisterLocation initial_regloc; if (!m_cur_insn.IsValid()) { @@ -535,13 +540,13 @@ AssemblyParse_x86::get_non_call_site_unwind_plan (UnwindPlan &unwind_plan) row.SetCFAOffset (m_wordsize); // caller's stack pointer value before the call insn is the CFA address - regloc.SetIsCFAPlusOffset (0); - row.SetRegisterInfo (m_lldb_sp_regnum, regloc); + initial_regloc.SetIsCFAPlusOffset (0); + row.SetRegisterInfo (m_lldb_sp_regnum, initial_regloc); // saved instruction pointer can be found at CFA - wordsize. current_sp_bytes_offset_from_cfa = m_wordsize; - regloc.SetAtCFAPlusOffset (-current_sp_bytes_offset_from_cfa); - row.SetRegisterInfo (m_lldb_ip_regnum, regloc); + initial_regloc.SetAtCFAPlusOffset (-current_sp_bytes_offset_from_cfa); + row.SetRegisterInfo (m_lldb_ip_regnum, initial_regloc); unwind_plan.AppendRow (row); |