[Lldb-commits] [PATCH] D134043: [lldb] Log when we cannot find an equivalent for a gdb register type
David Spickett via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 20 02:27:08 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGec3e290502db: [lldb] Log when we cannot find an equivalent for a gdb register type (authored by DavidSpickett).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134043/new/
https://reviews.llvm.org/D134043
Files:
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Index: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ 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());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134043.461520.patch
Type: text/x-patch
Size: 2775 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220920/a749f591/attachment.bin>
More information about the lldb-commits
mailing list