diff options
Diffstat (limited to 'lldb')
28 files changed, 93 insertions, 104 deletions
diff --git a/lldb/source/Core/ArchSpec.cpp b/lldb/source/Core/ArchSpec.cpp index a1fb65f0463..843e7484a08 100644 --- a/lldb/source/Core/ArchSpec.cpp +++ b/lldb/source/Core/ArchSpec.cpp @@ -1257,6 +1257,7 @@ cores_match (const ArchSpec::Core core1, const ArchSpec::Core core2, bool try_in return true; try_inverse = false; } + break; case ArchSpec::eCore_mips64: if (!enforce_exact_match) @@ -1267,6 +1268,7 @@ cores_match (const ArchSpec::Core core1, const ArchSpec::Core core2, bool try_in return true; try_inverse = false; } + break; case ArchSpec::eCore_mips64el: if (!enforce_exact_match) @@ -1277,6 +1279,7 @@ cores_match (const ArchSpec::Core core1, const ArchSpec::Core core2, bool try_in return true; try_inverse = false; } + break; case ArchSpec::eCore_mips64r2: case ArchSpec::eCore_mips64r3: diff --git a/lldb/source/Core/FastDemangle.cpp b/lldb/source/Core/FastDemangle.cpp index c46fb953dda..528f7f6bd88 100644 --- a/lldb/source/Core/FastDemangle.cpp +++ b/lldb/source/Core/FastDemangle.cpp @@ -2365,6 +2365,7 @@ private: Write('('); Write(m_read_ptr, m_read_end - m_read_ptr); Write(')'); + LLVM_FALLTHROUGH; case '\0': return true; default: diff --git a/lldb/source/Core/RegisterValue.cpp b/lldb/source/Core/RegisterValue.cpp index d4ba9989c6a..1e0a0abc783 100644 --- a/lldb/source/Core/RegisterValue.cpp +++ b/lldb/source/Core/RegisterValue.cpp @@ -239,16 +239,17 @@ RegisterValue::GetScalarValue (Scalar &scalar) const { case eTypeInvalid: break; case eTypeBytes: - { - switch (buffer.length) { - default: break; - case 1: scalar = *(const uint8_t *)buffer.bytes; return true; - case 2: scalar = *(const uint16_t *)buffer.bytes; return true; - case 4: scalar = *(const uint32_t *)buffer.bytes; return true; - case 8: scalar = *(const uint64_t *)buffer.bytes; return true; + switch (buffer.length) + { + default: break; + case 1: scalar = *(const uint8_t *)buffer.bytes; return true; + case 2: scalar = *(const uint16_t *)buffer.bytes; return true; + case 4: scalar = *(const uint32_t *)buffer.bytes; return true; + case 8: scalar = *(const uint64_t *)buffer.bytes; return true; + } } - } + break; case eTypeUInt8: case eTypeUInt16: case eTypeUInt32: diff --git a/lldb/source/Core/Scalar.cpp b/lldb/source/Core/Scalar.cpp index 4120d3263be..5a1ad37819d 100644 --- a/lldb/source/Core/Scalar.cpp +++ b/lldb/source/Core/Scalar.cpp @@ -2630,6 +2630,7 @@ Scalar::ExtractBitfield (uint32_t bit_size, case e_double: result = SignedBits ((uint64_t )m_float.convertToDouble(), msbit, lsbit); m_float = llvm::APFloat((double_t)result); + return true; case e_long_double: m_integer = m_float.bitcastToAPInt(); result = SignedBits (*m_integer.getRawData(), msbit, lsbit); diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 6b1a6c59063..a7cad8483c5 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -2797,6 +2797,7 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr, } expression_cstr++; // skip the - } + LLVM_FALLTHROUGH; case '.': // or fallthrough from -> { if (options.m_check_dot_vs_arrow_syntax && *expression_cstr == '.' && diff --git a/lldb/source/Expression/IRMemoryMap.cpp b/lldb/source/Expression/IRMemoryMap.cpp index 3dbdc5af6dc..6e6be310af8 100644 --- a/lldb/source/Expression/IRMemoryMap.cpp +++ b/lldb/source/Expression/IRMemoryMap.cpp @@ -784,6 +784,7 @@ IRMemoryMap::GetMemoryData (DataExtractor &extractor, lldb::addr_t process_addre return; } } + break; case eAllocationPolicyHostOnly: if (!allocation.m_data.GetByteSize()) { diff --git a/lldb/source/Host/common/SocketAddress.cpp b/lldb/source/Host/common/SocketAddress.cpp index c8b1687c378..1dc43ea6294 100644 --- a/lldb/source/Host/common/SocketAddress.cpp +++ b/lldb/source/Host/common/SocketAddress.cpp @@ -185,14 +185,12 @@ SocketAddress::GetIPAddress () const { case AF_INET: if (inet_ntop(GetFamily(), &m_socket_addr.sa_ipv4.sin_addr, str, sizeof(str))) - { return str; - } + break; case AF_INET6: if (inet_ntop(GetFamily(), &m_socket_addr.sa_ipv6.sin6_addr, str, sizeof(str))) - { return str; - } + break; } return ""; } diff --git a/lldb/source/Host/posix/FileSystem.cpp b/lldb/source/Host/posix/FileSystem.cpp index 1f2e7db0e1e..81a5ee9b54e 100644 --- a/lldb/source/Host/posix/FileSystem.cpp +++ b/lldb/source/Host/posix/FileSystem.cpp @@ -54,30 +54,32 @@ FileSystem::MakeDirectory(const FileSpec &file_spec, uint32_t file_permissions) switch (error.GetError()) { case ENOENT: - { - // Parent directory doesn't exist, so lets make it if we can - // Make the parent directory and try again - FileSpec parent_file_spec{file_spec.GetDirectory().GetCString(), false}; - error = MakeDirectory(parent_file_spec, file_permissions); - if (error.Fail()) - return error; - // Try and make the directory again now that the parent directory was made successfully - if (::mkdir(file_spec.GetCString(), file_permissions) == -1) { - error.SetErrorToErrno(); + // Parent directory doesn't exist, so lets make it if we can + // Make the parent directory and try again + FileSpec parent_file_spec{file_spec.GetDirectory().GetCString(), false}; + error = MakeDirectory(parent_file_spec, file_permissions); + if (error.Fail()) + return error; + // Try and make the directory again now that the parent directory was made successfully + if (::mkdir(file_spec.GetCString(), file_permissions) == -1) + { + error.SetErrorToErrno(); + } return error; } - } + break; case EEXIST: - { - if (file_spec.IsDirectory()) - return Error{}; // It is a directory and it already exists - } + { + if (file_spec.IsDirectory()) + return Error(); // It is a directory and it already exists + } + break; } } return error; } - return Error{"empty path"}; + return Error("empty path"); } Error diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index e31b3367720..c99ff594568 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -1625,6 +1625,7 @@ CommandInterpreter::PreprocessCommand (std::string &command) break; case eExpressionResultUnavailable: error.SetErrorStringWithFormat ("expression error fetching result for the expression '%s'", expr_str.c_str()); + break; case eExpressionCompleted: break; case eExpressionDiscarded: diff --git a/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp b/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp index 3b9b0f34607..24c4456ca04 100644 --- a/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp +++ b/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp @@ -843,6 +843,7 @@ ABIMacOSX_arm::RegisterIsVolatile (const RegisterInfo *reg_info) default: break; } + break; case '4': case '5': case '6': @@ -878,30 +879,14 @@ ABIMacOSX_arm::RegisterIsVolatile (const RegisterInfo *reg_info) break; case '2': - switch (name[2]) - { - case '\0': - return true; // s2 is volatile - default: - break; - } - break; - case '3': - switch (name[2]) - { - case '\0': - return true; // s3 is volatile - default: - break; - } case '4': case '5': case '6': case '7': case '8': case '9': - return name[2] == '\0'; // s4 - s9 are volatile + return name[2] == '\0'; // s2 - s9 are volatile default: break; @@ -926,7 +911,8 @@ ABIMacOSX_arm::RegisterIsVolatile (const RegisterInfo *reg_info) default: break; }; - case '0': + break; + case '0': case '2': case '3': return name[2] == '\0'; // q0-q3 are volatile diff --git a/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp b/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp index 0e6f9d663ae..94fa206d48b 100644 --- a/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp +++ b/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp @@ -670,6 +670,7 @@ ABIMacOSX_arm64::RegisterIsVolatile (const RegisterInfo *reg_info) case '3': // x30 aka lr treat as non-volatile if (name[2] == '0') return false; + break; default: return true; } diff --git a/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp b/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp index f317bf3a7c3..607be9abf2b 100644 --- a/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp +++ b/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp @@ -915,6 +915,7 @@ ABISysV_arm::RegisterIsVolatile (const RegisterInfo *reg_info) default: break; } + break; case '4': case '5': case '6': @@ -950,30 +951,14 @@ ABISysV_arm::RegisterIsVolatile (const RegisterInfo *reg_info) break; case '2': - switch (name[2]) - { - case '\0': - return true; // s2 is volatile - default: - break; - } - break; - case '3': - switch (name[2]) - { - case '\0': - return true; // s3 is volatile - default: - break; - } case '4': case '5': case '6': case '7': case '8': case '9': - return name[2] == '\0'; // s4 - s9 are volatile + return name[2] == '\0'; // s2 - s9 are volatile default: break; @@ -996,9 +981,11 @@ ABISysV_arm::RegisterIsVolatile (const RegisterInfo *reg_info) case '5': return true; // q10-q15 are volatile default: - break; - }; - case '0': + return false; + } + break; + + case '0': case '2': case '3': return name[2] == '\0'; // q0-q3 are volatile diff --git a/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp b/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp index bc6df235cb1..3b95889efa1 100644 --- a/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp +++ b/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp @@ -648,6 +648,7 @@ ABISysV_arm64::RegisterIsVolatile (const RegisterInfo *reg_info) case '3': // x30 (lr) and x31 (sp) treat as non-volatile if (name[2] == '0' || name[2] == '1') return false; + break; default: return true; // all volatile cases not handled above fall here. } diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp index 4d70a8cc695..63a3a85bacb 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp @@ -585,6 +585,7 @@ ClangModulesDeclVendorImpl::ForEachMacro(const ClangModulesDeclVendor::ModuleVec break; case clang::tok::TokenKind::raw_identifier: macro_expansion.append(ti->getRawIdentifier().str()); + break; default: macro_expansion.append(ti->getName()); break; diff --git a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp index 372ccf9b05f..ea67928280d 100644 --- a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp +++ b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp @@ -980,7 +980,7 @@ EmulateInstructionARM64::EmulateLDRSTRImm (const uint32_t opcode) if (!WriteRegister (context, ®_info_Rt, data_Rt)) return false; - + break; default: return false; } diff --git a/lldb/source/Plugins/Language/ObjC/Cocoa.cpp b/lldb/source/Plugins/Language/ObjC/Cocoa.cpp index aa6e476b613..cfc2064a834 100644 --- a/lldb/source/Plugins/Language/ObjC/Cocoa.cpp +++ b/lldb/source/Plugins/Language/ObjC/Cocoa.cpp @@ -531,6 +531,7 @@ lldb_private::formatters::NSNumberSummaryProvider (ValueObject& valobj, Stream& break; case 17: // 0B10001 data_location += 8; + LLVM_FALLTHROUGH; case 4: // 0B0100 value = process_sp->ReadUnsignedIntegerFromMemory(data_location, 8, 0, error); if (error.Fail()) diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp index cbf591c4b7c..6dd6582ff64 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -2486,7 +2486,7 @@ RenderScriptRuntime::SaveAllocation(Stream &strm, const uint32_t alloc_id, const // Write the file header size_t num_bytes = sizeof(AllocationDetails::FileHeader); if (log) - log->Printf("%s - writing File Header, 0x%" PRIx64 " bytes", __FUNCTION__, num_bytes); + log->Printf("%s - writing File Header, 0x%" PRIx64 " bytes", __FUNCTION__, (uint64_t)num_bytes); Error err = file.Write(&head, num_bytes); if (!err.Success()) @@ -2500,7 +2500,7 @@ RenderScriptRuntime::SaveAllocation(Stream &strm, const uint32_t alloc_id, const std::shared_ptr<uint8_t> element_header_buffer(new uint8_t[element_header_size]); if (element_header_buffer == nullptr) { - strm.Printf("Internal Error: Couldn't allocate %" PRIu64 " bytes on the heap", element_header_size); + strm.Printf("Internal Error: Couldn't allocate %" PRIu64 " bytes on the heap", (uint64_t)element_header_size); strm.EOL(); return false; } @@ -2510,7 +2510,7 @@ RenderScriptRuntime::SaveAllocation(Stream &strm, const uint32_t alloc_id, const // Write headers for allocation element type to file num_bytes = element_header_size; if (log) - log->Printf("%s - writing element headers, 0x%" PRIx64 " bytes.", __FUNCTION__, num_bytes); + log->Printf("%s - writing element headers, 0x%" PRIx64 " bytes.", __FUNCTION__, (uint64_t)num_bytes); err = file.Write(element_header_buffer.get(), num_bytes); if (!err.Success()) @@ -2523,7 +2523,7 @@ RenderScriptRuntime::SaveAllocation(Stream &strm, const uint32_t alloc_id, const // Write allocation data to file num_bytes = static_cast<size_t>(*alloc->size.get()); if (log) - log->Printf("%s - writing 0x%" PRIx64 " bytes", __FUNCTION__, num_bytes); + log->Printf("%s - writing 0x%" PRIx64 " bytes", __FUNCTION__, (uint64_t)num_bytes); err = file.Write(buffer.get(), num_bytes); if (!err.Success()) diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index 07c4be12717..7c75cc128ff 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -5120,6 +5120,7 @@ ObjectFileMachO::GetEntryPointAddress () start_address = text_segment_sp->GetFileAddress() + entryoffset; } } + break; default: break; diff --git a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp index c17ab7bf06e..83c9247f468 100644 --- a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp +++ b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp @@ -635,8 +635,7 @@ PlatformFreeBSD::GetSoftwareBreakpointTrapOpcode (Target &target, BreakpointSite return 0; } } - - // Fall through... + LLVM_FALLTHROUGH; default: return Platform::GetSoftwareBreakpointTrapOpcode(target, bp_site); } diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index eeeba4272da..6b0637a76e7 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -3138,35 +3138,33 @@ ProcessGDBRemote::DoAllocateMemory (size_t size, uint32_t permissions, Error &er Log *log (GetLogIfAnyCategoriesSet (LIBLLDB_LOG_PROCESS|LIBLLDB_LOG_EXPRESSIONS)); addr_t allocated_addr = LLDB_INVALID_ADDRESS; - LazyBool supported = m_gdb_comm.SupportsAllocDeallocMemory(); - switch (supported) + if (m_gdb_comm.SupportsAllocDeallocMemory() != eLazyBoolNo) { - case eLazyBoolCalculate: - case eLazyBoolYes: - allocated_addr = m_gdb_comm.AllocateMemory (size, permissions); - if (allocated_addr != LLDB_INVALID_ADDRESS || supported == eLazyBoolYes) - return allocated_addr; + allocated_addr = m_gdb_comm.AllocateMemory (size, permissions); + if (allocated_addr != LLDB_INVALID_ADDRESS || m_gdb_comm.SupportsAllocDeallocMemory() == eLazyBoolYes) + return allocated_addr; + } - case eLazyBoolNo: - // Call mmap() to create memory in the inferior.. - unsigned prot = 0; - if (permissions & lldb::ePermissionsReadable) - prot |= eMmapProtRead; - if (permissions & lldb::ePermissionsWritable) - prot |= eMmapProtWrite; - if (permissions & lldb::ePermissionsExecutable) - prot |= eMmapProtExec; - - if (InferiorCallMmap(this, allocated_addr, 0, size, prot, - eMmapFlagsAnon | eMmapFlagsPrivate, -1, 0)) - m_addr_to_mmap_size[allocated_addr] = size; - else - { - allocated_addr = LLDB_INVALID_ADDRESS; - if (log) - log->Printf ("ProcessGDBRemote::%s no direct stub support for memory allocation, and InferiorCallMmap also failed - is stub missing register context save/restore capability?", __FUNCTION__); - } - break; + if (m_gdb_comm.SupportsAllocDeallocMemory() == eLazyBoolNo) + { + // Call mmap() to create memory in the inferior.. + unsigned prot = 0; + if (permissions & lldb::ePermissionsReadable) + prot |= eMmapProtRead; + if (permissions & lldb::ePermissionsWritable) + prot |= eMmapProtWrite; + if (permissions & lldb::ePermissionsExecutable) + prot |= eMmapProtExec; + + if (InferiorCallMmap(this, allocated_addr, 0, size, prot, + eMmapFlagsAnon | eMmapFlagsPrivate, -1, 0)) + m_addr_to_mmap_size[allocated_addr] = size; + else + { + allocated_addr = LLDB_INVALID_ADDRESS; + if (log) + log->Printf ("ProcessGDBRemote::%s no direct stub support for memory allocation, and InferiorCallMmap also failed - is stub missing register context save/restore capability?", __FUNCTION__); + } } if (allocated_addr == LLDB_INVALID_ADDRESS) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp index ac73cdf3695..7847b7fbb90 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -277,6 +277,7 @@ DWARFASTParserClang::ParseTypeFromDWARF (const SymbolContext& sc, if (type_sp) return type_sp; + LLVM_FALLTHROUGH; case DW_TAG_base_type: case DW_TAG_pointer_type: case DW_TAG_reference_type: diff --git a/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp b/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp index 07e6c63f373..12e1e89c36b 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp @@ -346,7 +346,8 @@ DWARFMappedHash::Header::Read (const lldb_private::DWARFDataExtractor &data, case eAtomTypeTag: // DW_TAG value for the DIE hash_data.tag = (dw_tag_t)form_value.Unsigned (); - + break; + case eAtomTypeTypeFlags: // Flags from enum TypeFlags hash_data.type_flags = (uint32_t)form_value.Unsigned (); break; diff --git a/lldb/source/Symbol/ObjectFile.cpp b/lldb/source/Symbol/ObjectFile.cpp index 2ee3a634487..208f3f2ad6d 100644 --- a/lldb/source/Symbol/ObjectFile.cpp +++ b/lldb/source/Symbol/ObjectFile.cpp @@ -547,8 +547,6 @@ ObjectFile::ReadSectionData (const Section *section, DataExtractor& section_data // The object file now contains a full mmap'ed copy of the object file data, so just use this return MemoryMapSectionData (section, section_data); } - section_data.Clear(); - return 0; } size_t diff --git a/lldb/source/Symbol/Variable.cpp b/lldb/source/Symbol/Variable.cpp index 7856d6282d7..47f573dd742 100644 --- a/lldb/source/Symbol/Variable.cpp +++ b/lldb/source/Symbol/Variable.cpp @@ -828,6 +828,7 @@ PrivateAutoComplete (StackFrame *frame, word_complete); } } + break; default: break; } @@ -864,6 +865,7 @@ PrivateAutoComplete (StackFrame *frame, matches, word_complete); } + break; default: break; } diff --git a/lldb/source/Target/StackFrameList.cpp b/lldb/source/Target/StackFrameList.cpp index ed0a0e6d8f0..3f29c103011 100644 --- a/lldb/source/Target/StackFrameList.cpp +++ b/lldb/source/Target/StackFrameList.cpp @@ -187,6 +187,7 @@ StackFrameList::ResetCurrentInlinedDepth () break; } } + LLVM_FALLTHROUGH; default: { // Otherwise, we should set ourselves at the container of the inlining, so that the diff --git a/lldb/source/Utility/JSON.cpp b/lldb/source/Utility/JSON.cpp index 8b96a06e08e..7ad3232c564 100644 --- a/lldb/source/Utility/JSON.cpp +++ b/lldb/source/Utility/JSON.cpp @@ -445,6 +445,7 @@ JSONParser::GetToken (std::string &value) value = std::move(error.GetString()); return Token::Error; } + break; default: done = true; diff --git a/lldb/source/Utility/StringExtractorGDBRemote.cpp b/lldb/source/Utility/StringExtractorGDBRemote.cpp index 56df0be21ed..44bb1179363 100644 --- a/lldb/source/Utility/StringExtractorGDBRemote.cpp +++ b/lldb/source/Utility/StringExtractorGDBRemote.cpp @@ -227,7 +227,7 @@ StringExtractorGDBRemote::GetServerPacketType () const case 'j': if (PACKET_MATCHES("jSignalsInfo")) return eServerPacketType_jSignalsInfo; if (PACKET_MATCHES("jThreadsInfo")) return eServerPacketType_jThreadsInfo; - + break; case 'v': if (PACKET_STARTS_WITH("vFile:")) diff --git a/lldb/tools/lldb-server/lldb-gdbserver.cpp b/lldb/tools/lldb-server/lldb-gdbserver.cpp index dd163f2e84b..6ebf1fc2f44 100644 --- a/lldb/tools/lldb-server/lldb-gdbserver.cpp +++ b/lldb/tools/lldb-server/lldb-gdbserver.cpp @@ -473,6 +473,7 @@ main_gdbserver (int argc, char *argv[]) case 'U': // unnamed pipe if (optarg && optarg[0]) unnamed_pipe_fd = StringConvert::ToUInt32(optarg, -1); + break; case 'r': // Do nothing, native regs is the default these days |