diff options
author | emaste <emaste@FreeBSD.org> | 2015-07-04 01:02:43 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2015-07-04 01:02:43 +0000 |
commit | cea4c167517a0678c7dbf92a0324088dcbac1035 (patch) | |
tree | 02de7f7c9d5a08ae1c4d3b4c98a565ff96cd52e6 /contrib/llvm/tools/lldb/source/Target/Thread.cpp | |
parent | 1756896fd2b99ede7ebeb8019d4004bdfeed3bbe (diff) | |
parent | 8037fa4ee916fa20b3c63cbf531f4ee7e1c76138 (diff) | |
download | FreeBSD-src-cea4c167517a0678c7dbf92a0324088dcbac1035.zip FreeBSD-src-cea4c167517a0678c7dbf92a0324088dcbac1035.tar.gz |
Update LLDB snapshot to upstream r241361
Notable upstream commits (upstream revision in parens):
- Add a JSON producer to LLDB (228636)
- Don't crash on bad DWARF expression (228729)
- Add support of DWARFv3 DW_OP_form_tls_address (231342)
- Assembly profiler for MIPS64 (232619)
- Handle FreeBSD/arm64 core files (233273)
- Read/Write register for MIPS64 (233685)
- Rework LLDB system initialization (233758)
- SysV ABI for aarch64 (236098)
- MIPS software single stepping (236696)
- FreeBSD/arm live debugging support (237303)
- Assembly profiler for mips32 (237420)
- Parse function name from DWARF DW_AT_abstract_origin (238307)
- Improve LLDB prompt handling (238313)
- Add real time signals support to FreeBSDSignals (238316)
- Fix race in IOHandlerProcessSTDIO (238423)
- MIPS64 Branch instruction emulation for SW single stepping (238820)
- Improve OSType initialization in elf object file's arch_spec (239148)
- Emulation of MIPS64 floating-point branch instructions (239996)
- ABI Plugin for MIPS32 (239997)
- ABI Plugin for MIPS64 (240123)
- MIPS32 branch emulation and single stepping (240373)
- Improve instruction emulation based stack unwinding on ARM (240533)
- Add branch emulation to aarch64 instruction emulator (240769)
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Target/Thread.cpp')
-rw-r--r-- | contrib/llvm/tools/lldb/source/Target/Thread.cpp | 60 |
1 files changed, 33 insertions, 27 deletions
diff --git a/contrib/llvm/tools/lldb/source/Target/Thread.cpp b/contrib/llvm/tools/lldb/source/Target/Thread.cpp index b532d8d..29ba86a 100644 --- a/contrib/llvm/tools/lldb/source/Target/Thread.cpp +++ b/contrib/llvm/tools/lldb/source/Target/Thread.cpp @@ -7,19 +7,20 @@ // //===----------------------------------------------------------------------===// -#include "lldb/lldb-python.h" - -#include "lldb/lldb-private-log.h" #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/Log.h" +#include "lldb/Core/FormatEntity.h" #include "lldb/Core/State.h" #include "lldb/Core/Stream.h" #include "lldb/Core/StreamString.h" #include "lldb/Core/RegularExpression.h" #include "lldb/Host/Host.h" #include "lldb/Interpreter/OptionValueFileSpecList.h" +#include "lldb/Interpreter/OptionValueProperties.h" +#include "lldb/Interpreter/Property.h" #include "lldb/Symbol/Function.h" +#include "lldb/Target/ABI.h" #include "lldb/Target/DynamicLoader.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/ObjCLanguageRuntime.h" @@ -66,8 +67,8 @@ g_properties[] = { "step-in-avoid-nodebug", OptionValue::eTypeBoolean, true, true, NULL, NULL, "If true, step-in will not stop in functions with no debug information." }, { "step-out-avoid-nodebug", OptionValue::eTypeBoolean, true, false, NULL, NULL, "If true, when step-in/step-out/step-over leave the current frame, they will continue to step out till they come to a function with " "debug information. Passing a frame argument to step-out will override this option." }, - { "step-avoid-regexp", OptionValue::eTypeRegex , true , REG_EXTENDED, "^std::", NULL, "A regular expression defining functions step-in won't stop in." }, - { "step-avoid-libraries", OptionValue::eTypeFileSpecList , true , REG_EXTENDED, NULL, NULL, "A list of libraries that source stepping won't stop in." }, + { "step-avoid-regexp", OptionValue::eTypeRegex , true , 0, "^std::", NULL, "A regular expression defining functions step-in won't stop in." }, + { "step-avoid-libraries", OptionValue::eTypeFileSpecList , true , 0, NULL, NULL, "A list of libraries that source stepping won't stop in." }, { "trace-thread", OptionValue::eTypeBoolean, false, false, NULL, NULL, "If true, this thread will single-step and log execution." }, { NULL , OptionValue::eTypeInvalid, false, 0 , NULL, NULL, NULL } }; @@ -654,11 +655,6 @@ Thread::SetupForResume () // telling the current plan it will resume, since we might change what the current // plan is. -// StopReason stop_reason = lldb::eStopReasonInvalid; -// StopInfoSP stop_info_sp = GetStopInfo(); -// if (stop_info_sp.get()) -// stop_reason = stop_info_sp->GetStopReason(); -// if (stop_reason == lldb::eStopReasonBreakpoint) lldb::RegisterContextSP reg_ctx_sp (GetRegisterContext()); if (reg_ctx_sp) { @@ -724,7 +720,7 @@ Thread::ShouldResume (StateType resume_state) // the target, 'cause that slows down single stepping. So assume that if we got to the point where // we're about to resume, and we haven't yet had to fetch the stop reason, then it doesn't need to know // about the fact that we are resuming... - const uint32_t process_stop_id = GetProcess()->GetStopID(); + const uint32_t process_stop_id = GetProcess()->GetStopID(); if (m_stop_info_stop_id == process_stop_id && (m_stop_info_sp && m_stop_info_sp->IsValid())) { @@ -1210,7 +1206,7 @@ Thread::GetReturnValueObject () ValueObjectSP return_valobj_sp; return_valobj_sp = m_completed_plan_stack[i]->GetReturnValueObject(); if (return_valobj_sp) - return return_valobj_sp; + return return_valobj_sp; } } return ValueObjectSP(); @@ -1226,7 +1222,7 @@ Thread::GetExpressionVariable () ClangExpressionVariableSP expression_variable_sp; expression_variable_sp = m_completed_plan_stack[i]->GetExpressionVariable(); if (expression_variable_sp) - return expression_variable_sp; + return expression_variable_sp; } } return ClangExpressionVariableSP(); @@ -2033,7 +2029,7 @@ Thread::DumpUsingSettingsFormat (Stream &strm, uint32_t frame_idx) StackFrameSP frame_sp; SymbolContext frame_sc; - if (frame_idx != LLDB_INVALID_INDEX32) + if (frame_idx != LLDB_INVALID_FRAME_ID) { frame_sp = GetStackFrameAtIndex (frame_idx); if (frame_sp) @@ -2043,13 +2039,17 @@ Thread::DumpUsingSettingsFormat (Stream &strm, uint32_t frame_idx) } } - const char *thread_format = exe_ctx.GetTargetRef().GetDebugger().GetThreadFormat(); + const FormatEntity::Entry *thread_format = exe_ctx.GetTargetRef().GetDebugger().GetThreadFormat(); assert (thread_format); - Debugger::FormatPrompt (thread_format, - frame_sp ? &frame_sc : NULL, - &exe_ctx, - NULL, - strm); + + FormatEntity::Format(*thread_format, + strm, + frame_sp ? &frame_sc : NULL, + &exe_ctx, + NULL, + NULL, + false, + false); } void @@ -2202,8 +2202,7 @@ Thread::GetDescription (Stream &strm, lldb::DescriptionLevel level, bool print_j strm.Printf("\n"); StructuredData::ObjectSP thread_info = GetExtendedInfo(); - StructuredData::ObjectSP stop_info = m_stop_info_sp->GetExtendedInfo(); - + if (print_json_thread || print_json_stopinfo) { if (thread_info && print_json_thread) @@ -2211,13 +2210,17 @@ Thread::GetDescription (Stream &strm, lldb::DescriptionLevel level, bool print_j thread_info->Dump (strm); strm.Printf("\n"); } - - if (stop_info && print_json_stopinfo) + + if (print_json_stopinfo && m_stop_info_sp) { - stop_info->Dump (strm); - strm.Printf("\n"); + StructuredData::ObjectSP stop_info = m_stop_info_sp->GetExtendedInfo(); + if (stop_info) + { + stop_info->Dump (strm); + strm.Printf("\n"); + } } - + return true; } @@ -2310,7 +2313,10 @@ Thread::GetUnwinder () case llvm::Triple::arm: case llvm::Triple::aarch64: case llvm::Triple::thumb: + case llvm::Triple::mips: + case llvm::Triple::mipsel: case llvm::Triple::mips64: + case llvm::Triple::mips64el: case llvm::Triple::ppc: case llvm::Triple::ppc64: case llvm::Triple::hexagon: |