Skip to content

Commit 1bf92c9

Browse files
escape format variables in log message
1 parent abfa266 commit 1bf92c9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ static bool PrintDemangledArgumentList(Stream &s, const SymbolContext &sc) {
378378
if (!info_or_err) {
379379
LLDB_LOG_ERROR(
380380
GetLog(LLDBLog::Language), info_or_err.takeError(),
381-
"Failed to handle ${function.basename} frame-format variable: {0}");
381+
"Failed to handle ${{function.basename}} frame-format variable: {0}");
382382
return false;
383383
}
384384
auto [demangled_name, info] = *info_or_err;
@@ -1917,7 +1917,7 @@ bool CPlusPlusLanguage::HandleFrameFormatVariable(
19171917
if (!scope_or_err) {
19181918
LLDB_LOG_ERROR(
19191919
GetLog(LLDBLog::Language), scope_or_err.takeError(),
1920-
"Failed to handle ${function.scope} frame-format variable: {0}");
1920+
"Failed to handle ${{function.scope}} frame-format variable: {0}");
19211921
return false;
19221922
}
19231923

@@ -1931,7 +1931,7 @@ bool CPlusPlusLanguage::HandleFrameFormatVariable(
19311931
if (!name_or_err) {
19321932
LLDB_LOG_ERROR(
19331933
GetLog(LLDBLog::Language), name_or_err.takeError(),
1934-
"Failed to handle ${function.basename} frame-format variable: {0}");
1934+
"Failed to handle ${{function.basename}} frame-format variable: {0}");
19351935
return false;
19361936
}
19371937

@@ -1945,7 +1945,7 @@ bool CPlusPlusLanguage::HandleFrameFormatVariable(
19451945
if (!template_args_or_err) {
19461946
LLDB_LOG_ERROR(GetLog(LLDBLog::Language),
19471947
template_args_or_err.takeError(),
1948-
"Failed to handle ${function.template-arguments} "
1948+
"Failed to handle ${{function.template-arguments}} "
19491949
"frame-format variable: {0}");
19501950
return false;
19511951
}
@@ -1982,7 +1982,7 @@ bool CPlusPlusLanguage::HandleFrameFormatVariable(
19821982
auto return_rhs_or_err = GetDemangledReturnTypeRHS(sc);
19831983
if (!return_rhs_or_err) {
19841984
LLDB_LOG_ERROR(GetLog(LLDBLog::Language), return_rhs_or_err.takeError(),
1985-
"Failed to handle ${function.return-right} frame-format "
1985+
"Failed to handle ${{function.return-right}} frame-format "
19861986
"variable: {0}");
19871987
return false;
19881988
}
@@ -1995,7 +1995,7 @@ bool CPlusPlusLanguage::HandleFrameFormatVariable(
19951995
auto return_lhs_or_err = GetDemangledReturnTypeLHS(sc);
19961996
if (!return_lhs_or_err) {
19971997
LLDB_LOG_ERROR(GetLog(LLDBLog::Language), return_lhs_or_err.takeError(),
1998-
"Failed to handle ${function.return-left} frame-format "
1998+
"Failed to handle ${{function.return-left}} frame-format "
19991999
"variable: {0}");
20002000
return false;
20012001
}
@@ -2009,7 +2009,7 @@ bool CPlusPlusLanguage::HandleFrameFormatVariable(
20092009
if (!quals_or_err) {
20102010
LLDB_LOG_ERROR(
20112011
GetLog(LLDBLog::Language), quals_or_err.takeError(),
2012-
"Failed to handle ${function.qualifiers} frame-format variable: {0}");
2012+
"Failed to handle ${{function.qualifiers}} frame-format variable: {0}");
20132013
return false;
20142014
}
20152015

@@ -2022,7 +2022,7 @@ bool CPlusPlusLanguage::HandleFrameFormatVariable(
20222022
if (!suffix_or_err) {
20232023
LLDB_LOG_ERROR(
20242024
GetLog(LLDBLog::Language), suffix_or_err.takeError(),
2025-
"Failed to handle ${function.suffix} frame-format variable: {0}");
2025+
"Failed to handle ${{function.suffix}} frame-format variable: {0}");
20262026
return false;
20272027
}
20282028

0 commit comments

Comments
 (0)