aboutsummaryrefslogtreecommitdiffstats
path: root/source/Plugins/Process
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-06 20:14:12 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-06 20:14:12 +0000
commita4092fcbfb39b4d32a8e152a110d20132779d538 (patch)
tree37c84fe56b8ec43e3b08de27d76f53e259ddb0c7 /source/Plugins/Process
parentcce7c2b0d24e364b1907670cf6f843531e5fe052 (diff)
downloadsrc-a4092fcbfb39b4d32a8e152a110d20132779d538.tar.gz
src-a4092fcbfb39b4d32a8e152a110d20132779d538.zip
Vendor import of lldb trunk r291274:vendor/lldb/lldb-trunk-r291274
Notes
Notes: svn path=/vendor/lldb/dist/; revision=311542 svn path=/vendor/lldb/lldb-trunk-r291274/; revision=311543; tag=vendor/lldb/lldb-trunk-r291274
Diffstat (limited to 'source/Plugins/Process')
-rw-r--r--source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp3
-rw-r--r--source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp3
-rw-r--r--source/Plugins/Process/POSIX/CrashReason.cpp2
-rw-r--r--source/Plugins/Process/Utility/DynamicRegisterInfo.cpp2
-rw-r--r--source/Plugins/Process/Utility/RegisterContextLLDB.cpp12
-rw-r--r--source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp7
6 files changed, 11 insertions, 18 deletions
diff --git a/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index dae33f6257d1..a757bba70d16 100644
--- a/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -480,8 +480,7 @@ Error ProcessKDP::DoResume() {
default:
// The only valid thread resume states are listed above
- assert(!"invalid thread resume state");
- break;
+ llvm_unreachable("invalid thread resume state");
}
}
diff --git a/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp b/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
index 273e1966f3fc..9f594f35d70d 100644
--- a/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
+++ b/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
@@ -116,8 +116,7 @@ ThreadKDP::CreateRegisterContextForFrame(StackFrame *frame) {
new RegisterContextKDP_x86_64(*this, concrete_frame_idx));
break;
default:
- assert(!"Add CPU type support in KDP");
- break;
+ llvm_unreachable("Add CPU type support in KDP");
}
}
} else {
diff --git a/source/Plugins/Process/POSIX/CrashReason.cpp b/source/Plugins/Process/POSIX/CrashReason.cpp
index debdd7808e63..77d6e287486c 100644
--- a/source/Plugins/Process/POSIX/CrashReason.cpp
+++ b/source/Plugins/Process/POSIX/CrashReason.cpp
@@ -21,6 +21,7 @@ void AppendFaultAddr(std::string &str, lldb::addr_t addr) {
str += ss.str();
}
+#if defined(si_lower) && defined(si_upper)
void AppendBounds(std::string &str, lldb::addr_t lower_bound,
lldb::addr_t upper_bound, lldb::addr_t addr) {
llvm::raw_string_ostream stream(str);
@@ -37,6 +38,7 @@ void AppendBounds(std::string &str, lldb::addr_t lower_bound,
stream << ")";
stream.flush();
}
+#endif
CrashReason GetCrashReasonForSIGSEGV(const siginfo_t &info) {
assert(info.si_signo == SIGSEGV);
diff --git a/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp b/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
index 7c8c26047f85..75f7251fb108 100644
--- a/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
+++ b/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
@@ -167,7 +167,7 @@ DynamicRegisterInfo::SetRegisterInfo(const StructuredData::Dictionary &dict,
reg_info.byte_offset =
containing_reg_info->byte_offset + msbyte;
} else {
- assert(!"Invalid byte order");
+ llvm_unreachable("Invalid byte order");
}
} else {
if (msbit > max_bit)
diff --git a/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
index 3c33ddb335d6..ba84c40e9767 100644
--- a/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
+++ b/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
@@ -1053,8 +1053,7 @@ bool RegisterContextLLDB::ReadRegisterValueFromRegisterLocation(
case UnwindLLDB::RegisterLocation::eRegisterNotSaved:
break;
case UnwindLLDB::RegisterLocation::eRegisterSavedAtHostMemoryLocation:
- assert("FIXME debugger inferior function call unwind");
- break;
+ llvm_unreachable("FIXME debugger inferior function call unwind");
case UnwindLLDB::RegisterLocation::eRegisterSavedAtMemoryLocation: {
Error error(ReadRegisterValueFromMemory(
reg_info, regloc.location.target_memory_location, reg_info->byte_size,
@@ -1062,8 +1061,7 @@ bool RegisterContextLLDB::ReadRegisterValueFromRegisterLocation(
success = error.Success();
} break;
default:
- assert("Unknown RegisterLocation type.");
- break;
+ llvm_unreachable("Unknown RegisterLocation type.");
}
return success;
}
@@ -1097,8 +1095,7 @@ bool RegisterContextLLDB::WriteRegisterValueToRegisterLocation(
case UnwindLLDB::RegisterLocation::eRegisterNotSaved:
break;
case UnwindLLDB::RegisterLocation::eRegisterSavedAtHostMemoryLocation:
- assert("FIXME debugger inferior function call unwind");
- break;
+ llvm_unreachable("FIXME debugger inferior function call unwind");
case UnwindLLDB::RegisterLocation::eRegisterSavedAtMemoryLocation: {
Error error(WriteRegisterValueToMemory(
reg_info, regloc.location.target_memory_location, reg_info->byte_size,
@@ -1106,8 +1103,7 @@ bool RegisterContextLLDB::WriteRegisterValueToRegisterLocation(
success = error.Success();
} break;
default:
- assert("Unknown RegisterLocation type.");
- break;
+ llvm_unreachable("Unknown RegisterLocation type.");
}
return success;
}
diff --git a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index f9bbaef60215..b70f0903dbd5 100644
--- a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -2599,10 +2599,7 @@ size_t GDBRemoteCommunicationClient::GetCurrentThreadIDs(
thread_ids.push_back(1);
}
} else {
-#if defined(LLDB_CONFIGURATION_DEBUG)
-// assert(!"ProcessGDBRemote::UpdateThreadList() failed due to not getting the
-// sequence mutex");
-#else
+#if !defined(LLDB_CONFIGURATION_DEBUG)
Log *log(ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet(GDBR_LOG_PROCESS |
GDBR_LOG_PACKETS));
if (log)
@@ -3246,7 +3243,7 @@ GDBRemoteCommunicationClient::GetModulesInfo(
JSONObject::SP module_sp = std::make_shared<JSONObject>();
module_array_sp->AppendObject(module_sp);
module_sp->SetObject(
- "file", std::make_shared<JSONString>(module_file_spec.GetPath()));
+ "file", std::make_shared<JSONString>(module_file_spec.GetPath(false)));
module_sp->SetObject("triple",
std::make_shared<JSONString>(triple.getTriple()));
}