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/Commands/CommandObjectDisassemble.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/Commands/CommandObjectDisassemble.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectDisassemble.cpp | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectDisassemble.cpp b/lldb/source/Commands/CommandObjectDisassemble.cpp index 63d893708a2..f5d7edd10fb 100644 --- a/lldb/source/Commands/CommandObjectDisassemble.cpp +++ b/lldb/source/Commands/CommandObjectDisassemble.cpp @@ -21,11 +21,19 @@ #include "lldb/Core/Disassembler.h" #include "lldb/Interpreter/Options.h" #include "lldb/Core/SourceManager.h" +#include "lldb/Core/Stream.h" #include "lldb/Target/StackFrame.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" +#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Thread.h" +#include "lldb/Symbol/FuncUnwinders.h" +#include "lldb/Symbol/UnwindPlan.h" +#include "lldb/Symbol/DWARFCallFrameInfo.h" +#include "lldb/Utility/ArchVolatileRegs.h" + #define DEFAULT_DISASM_BYTE_SIZE 32 using namespace lldb; @@ -252,7 +260,46 @@ CommandObjectDisassemble::Execute // The default action is to disassemble the current frame function. if (exe_ctx.frame) { - SymbolContext sc(exe_ctx.frame->GetSymbolContext(eSymbolContextFunction | eSymbolContextSymbol)); +// SymbolContext sc(exe_ctx.frame->GetSymbolContext(eSymbolContextFunction | eSymbolContextSymbol)); + SymbolContext sc(exe_ctx.frame->GetSymbolContext (eSymbolContextEverything)); + + ArchVolatileRegs *vr = ArchVolatileRegs::FindPlugin (exe_ctx.target->GetArchitecture()); + Address pc = exe_ctx.frame->GetFrameCodeAddress(); + FuncUnwindersSP fu = pc.GetModule()->GetObjectFile()->GetUnwindTable().GetFuncUnwindersContainingAddress (pc, sc); + if (fu != NULL) + { + + Address first_non_prologue_insn = fu->GetFirstNonPrologueInsn (*exe_ctx.target); + UnwindPlan *up = fu->GetUnwindPlanAtCallSite(); + Stream *s = &result.GetOutputStream(); + if (up) + { + s->Printf ("\nJSMDEBUG: unwind plan at call site (from eh_frame)\n"); + up->Dump (result.GetOutputStream(), &exe_ctx.frame->GetThread()); + } + else + { + result.GetOutputStream().Printf("No UnwindPlanAtCallSite available.\n"); + } + up = fu->GetUnwindPlanAtNonCallSite(exe_ctx.frame->GetThread()); + s->Printf ("\nJSMDEBUG: unwind plan at non-call site (from disassembly)\n"); + up->Dump (result.GetOutputStream(), &exe_ctx.frame->GetThread()); + + up = fu->GetUnwindPlanFastUnwind(exe_ctx.frame->GetThread()); + if (up) + { + s->Printf ("\nJSMDEBUG: fast unwind plan\n"); + up->Dump (result.GetOutputStream(), &exe_ctx.frame->GetThread()); + } + + up = fu->GetUnwindPlanArchitectureDefault(exe_ctx.frame->GetThread()); + if (up) + { + s->Printf ("\nJSMDEBUG: architectural default unwind plan\n"); + up->Dump (result.GetOutputStream(), &exe_ctx.frame->GetThread()); + } + } + if (sc.function) range = sc.function->GetAddressRange(); else if (sc.symbol && sc.symbol->GetAddressRangePtr()) |