Skip to content

Commit b75b9d8

Browse files
committed
[lldb] Correct function names in ProcessGDBRemote::ParseFlagsFields log messages
This has to be specified in the string because otherwise we'd get the lambda's name, and I incorrectly used the name of the calling function here.
1 parent 2b804f8 commit b75b9d8

File tree

1 file changed

+33
-29
lines changed

1 file changed

+33
-29
lines changed

lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4189,63 +4189,67 @@ static std::vector<RegisterFlags::Field> ParseFlagsFields(XMLNode flags_node,
41894189
// Note that XML in general requires that each of these attributes only
41904190
// appears once, so we don't have to handle that here.
41914191
if (attr_name == "name") {
4192-
LLDB_LOG(log,
4193-
"ProcessGDBRemote::ParseFlags Found field node name \"{0}\"",
4194-
attr_value.data());
4192+
LLDB_LOG(
4193+
log,
4194+
"ProcessGDBRemote::ParseFlagsFields Found field node name \"{0}\"",
4195+
attr_value.data());
41954196
name = attr_value;
41964197
} else if (attr_name == "start") {
41974198
unsigned parsed_start = 0;
41984199
if (llvm::to_integer(attr_value, parsed_start)) {
41994200
if (parsed_start > max_start_bit) {
4200-
LLDB_LOG(
4201-
log,
4202-
"ProcessGDBRemote::ParseFlags Invalid start {0} in field node, "
4203-
"cannot be > {1}",
4204-
parsed_start, max_start_bit);
4201+
LLDB_LOG(log,
4202+
"ProcessGDBRemote::ParseFlagsFields Invalid start {0} in "
4203+
"field node, "
4204+
"cannot be > {1}",
4205+
parsed_start, max_start_bit);
42054206
} else
42064207
start = parsed_start;
42074208
} else {
4208-
LLDB_LOG(log,
4209-
"ProcessGDBRemote::ParseFlags Invalid start \"{0}\" in "
4210-
"field node",
4211-
attr_value.data());
4209+
LLDB_LOG(
4210+
log,
4211+
"ProcessGDBRemote::ParseFlagsFields Invalid start \"{0}\" in "
4212+
"field node",
4213+
attr_value.data());
42124214
}
42134215
} else if (attr_name == "end") {
42144216
unsigned parsed_end = 0;
42154217
if (llvm::to_integer(attr_value, parsed_end))
42164218
if (parsed_end > max_start_bit) {
4217-
LLDB_LOG(
4218-
log,
4219-
"ProcessGDBRemote::ParseFlags Invalid end {0} in field node, "
4220-
"cannot be > {1}",
4221-
parsed_end, max_start_bit);
4219+
LLDB_LOG(log,
4220+
"ProcessGDBRemote::ParseFlagsFields Invalid end {0} in "
4221+
"field node, "
4222+
"cannot be > {1}",
4223+
parsed_end, max_start_bit);
42224224
} else
42234225
end = parsed_end;
42244226
else {
4225-
LLDB_LOG(
4226-
log,
4227-
"ProcessGDBRemote::ParseFlags Invalid end \"{0}\" in field node",
4228-
attr_value.data());
4227+
LLDB_LOG(log,
4228+
"ProcessGDBRemote::ParseFlagsFields Invalid end \"{0}\" in "
4229+
"field node",
4230+
attr_value.data());
42294231
}
42304232
} else if (attr_name == "type") {
42314233
// Type is a known attribute but we do not currently use it and it is
42324234
// not required.
42334235
} else {
4234-
LLDB_LOG(log,
4235-
"ProcessGDBRemote::ParseFlags Ignoring unknown attribute "
4236-
"\"{0}\" in field node",
4237-
attr_name.data());
4236+
LLDB_LOG(
4237+
log,
4238+
"ProcessGDBRemote::ParseFlagsFields Ignoring unknown attribute "
4239+
"\"{0}\" in field node",
4240+
attr_name.data());
42384241
}
42394242

42404243
return true; // Walk all attributes of the field.
42414244
});
42424245

42434246
if (name && start && end) {
42444247
if (*start > *end) {
4245-
LLDB_LOG(log,
4246-
"ProcessGDBRemote::ParseFlags Start {0} > end {1} in field "
4247-
"\"{2}\", ignoring",
4248-
*start, *end, name->data());
4248+
LLDB_LOG(
4249+
log,
4250+
"ProcessGDBRemote::ParseFlagsFields Start {0} > end {1} in field "
4251+
"\"{2}\", ignoring",
4252+
*start, *end, name->data());
42494253
} else {
42504254
fields.push_back(RegisterFlags::Field(name->str(), *start, *end));
42514255
}

0 commit comments

Comments
 (0)