@@ -122,7 +122,15 @@ constexpr Definition g_function_child_entries[] = {
122
122
Definition (" pc-offset" , EntryType::FunctionPCOffset),
123
123
Definition (" initial-function" , EntryType::FunctionInitial),
124
124
Definition (" changed" , EntryType::FunctionChanged),
125
- Definition (" is-optimized" , EntryType::FunctionIsOptimized)};
125
+ Definition (" is-optimized" , EntryType::FunctionIsOptimized),
126
+ Definition (" scope" , EntryType::FunctionScope),
127
+ Definition (" basename" , EntryType::FunctionBasename),
128
+ Definition (" template-arguments" , EntryType::FunctionTemplateArguments),
129
+ Definition (" formatted-arguments" , EntryType::FunctionFormattedArguments),
130
+ Definition (" return-left" , EntryType::FunctionReturnLeft),
131
+ Definition (" return-right" , EntryType::FunctionReturnRight),
132
+ Definition (" qualifiers" , EntryType::FunctionQualifiers),
133
+ };
126
134
127
135
constexpr Definition g_line_child_entries[] = {
128
136
Entry::DefinitionWithChildren (" file" , EntryType::LineEntryFile,
@@ -353,6 +361,13 @@ const char *FormatEntity::Entry::TypeToCString(Type t) {
353
361
ENUM_TO_CSTR (FunctionNameWithArgs);
354
362
ENUM_TO_CSTR (FunctionNameNoArgs);
355
363
ENUM_TO_CSTR (FunctionMangledName);
364
+ ENUM_TO_CSTR (FunctionScope);
365
+ ENUM_TO_CSTR (FunctionBasename);
366
+ ENUM_TO_CSTR (FunctionTemplateArguments);
367
+ ENUM_TO_CSTR (FunctionFormattedArguments);
368
+ ENUM_TO_CSTR (FunctionReturnLeft);
369
+ ENUM_TO_CSTR (FunctionReturnRight);
370
+ ENUM_TO_CSTR (FunctionQualifiers);
356
371
ENUM_TO_CSTR (FunctionAddrOffset);
357
372
ENUM_TO_CSTR (FunctionAddrOffsetConcrete);
358
373
ENUM_TO_CSTR (FunctionLineOffset);
@@ -1167,8 +1182,9 @@ static bool PrintFunctionNameWithArgs(Stream &s,
1167
1182
ExecutionContextScope *exe_scope =
1168
1183
exe_ctx ? exe_ctx->GetBestExecutionContextScope () : nullptr ;
1169
1184
1170
- const char *cstr =
1171
- sc.GetPossiblyInlinedFunctionName (Mangled::ePreferDemangled);
1185
+ const char *cstr = sc.GetPossiblyInlinedFunctionName ()
1186
+ .GetName (Mangled::ePreferDemangled)
1187
+ .AsCString ();
1172
1188
if (!cstr)
1173
1189
return false ;
1174
1190
@@ -1186,7 +1202,8 @@ static bool PrintFunctionNameWithArgs(Stream &s,
1186
1202
return true ;
1187
1203
}
1188
1204
1189
- static bool HandleFunctionNameWithArgs (Stream &s,const ExecutionContext *exe_ctx,
1205
+ static bool HandleFunctionNameWithArgs (Stream &s,
1206
+ const ExecutionContext *exe_ctx,
1190
1207
const SymbolContext &sc) {
1191
1208
Language *language_plugin = nullptr ;
1192
1209
bool language_plugin_handled = false ;
@@ -1711,8 +1728,9 @@ bool FormatEntity::Format(const Entry &entry, Stream &s,
1711
1728
return true ;
1712
1729
}
1713
1730
1714
- const char *name = sc->GetPossiblyInlinedFunctionName (
1715
- Mangled::NamePreference::ePreferDemangled);
1731
+ const char *name = sc->GetPossiblyInlinedFunctionName ()
1732
+ .GetName (Mangled::NamePreference::ePreferDemangled)
1733
+ .AsCString ();
1716
1734
if (!name)
1717
1735
return false ;
1718
1736
@@ -1743,8 +1761,10 @@ bool FormatEntity::Format(const Entry &entry, Stream &s,
1743
1761
return true ;
1744
1762
}
1745
1763
1746
- const char *name = sc->GetPossiblyInlinedFunctionName (
1747
- Mangled::NamePreference::ePreferDemangledWithoutArguments);
1764
+ const char *name =
1765
+ sc->GetPossiblyInlinedFunctionName ()
1766
+ .GetName (Mangled::NamePreference::ePreferDemangledWithoutArguments)
1767
+ .AsCString ();
1748
1768
if (!name)
1749
1769
return false ;
1750
1770
@@ -1753,19 +1773,38 @@ bool FormatEntity::Format(const Entry &entry, Stream &s,
1753
1773
return true ;
1754
1774
}
1755
1775
1776
+ case Entry::Type::FunctionScope:
1777
+ case Entry::Type::FunctionBasename:
1778
+ case Entry::Type::FunctionTemplateArguments:
1779
+ case Entry::Type::FunctionFormattedArguments:
1780
+ case Entry::Type::FunctionReturnRight:
1781
+ case Entry::Type::FunctionReturnLeft:
1782
+ case Entry::Type::FunctionQualifiers: {
1783
+ if (!sc->function )
1784
+ return false ;
1785
+
1786
+ Language *language_plugin =
1787
+ Language::FindPlugin (sc->function ->GetLanguage ());
1788
+ if (!language_plugin)
1789
+ return false ;
1790
+
1791
+ return language_plugin->HandleFrameFormatVariable (*sc, exe_ctx, entry.type ,
1792
+ s);
1793
+ }
1794
+
1756
1795
case Entry::Type::FunctionNameWithArgs: {
1757
1796
if (!sc)
1758
1797
return false ;
1759
1798
1760
1799
return HandleFunctionNameWithArgs (s, exe_ctx, *sc);
1761
1800
}
1762
-
1763
1801
case Entry::Type::FunctionMangledName: {
1764
1802
if (!sc)
1765
1803
return false ;
1766
1804
1767
- const char *name = sc->GetPossiblyInlinedFunctionName (
1768
- Mangled::NamePreference::ePreferMangled);
1805
+ const char *name = sc->GetPossiblyInlinedFunctionName ()
1806
+ .GetName (Mangled::NamePreference::ePreferMangled)
1807
+ .AsCString ();
1769
1808
if (!name)
1770
1809
return false ;
1771
1810
0 commit comments