diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -4022,8 +4022,10 @@ if (!feature_node) return false; + Log *log(GetLog(GDBRLog::Process)); + feature_node.ForEachChildElementWithName( - "reg", [&target_info, ®isters](const XMLNode ®_node) -> bool { + "reg", [&target_info, ®isters, log](const XMLNode ®_node) -> bool { std::string gdb_group; std::string gdb_type; DynamicRegisterInfo::Register reg_info; @@ -4032,9 +4034,9 @@ // FIXME: we're silently ignoring invalid data here reg_node.ForEachAttribute([&target_info, &gdb_group, &gdb_type, - &encoding_set, &format_set, ®_info]( - const llvm::StringRef &name, - const llvm::StringRef &value) -> bool { + &encoding_set, &format_set, ®_info, + log](const llvm::StringRef &name, + const llvm::StringRef &value) -> bool { if (name == "name") { reg_info.name.SetString(value); } else if (name == "bitsize") { @@ -4091,10 +4093,10 @@ SplitCommaSeparatedRegisterNumberString( value, reg_info.invalidate_regs, 0); } else { - Log *log(GetLog(GDBRLog::Process)); LLDB_LOGF(log, - "ProcessGDBRemote::%s unhandled reg attribute %s = %s", - __FUNCTION__, name.data(), value.data()); + "ProcessGDBRemote::ParseRegisters unhandled reg " + "attribute %s = %s", + name.data(), value.data()); } return true; // Keep iterating through all attributes }); @@ -4116,6 +4118,12 @@ // them as vector (similarly to xmm/ymm) reg_info.format = eFormatVectorOfUInt8; reg_info.encoding = eEncodingVector; + } else { + LLDB_LOGF( + log, + "ProcessGDBRemote::ParseRegisters Could not determine lldb" + "format and encoding for gdb type %s", + gdb_type.c_str()); } } @@ -4133,7 +4141,6 @@ } if (reg_info.byte_size == 0) { - Log *log(GetLog(GDBRLog::Process)); LLDB_LOGF(log, "ProcessGDBRemote::%s Skipping zero bitsize register %s", __FUNCTION__, reg_info.name.AsCString());