@@ -122,7 +122,15 @@ constexpr Definition g_function_child_entries[] = {
122122 Definition (" pc-offset" , EntryType::FunctionPCOffset),
123123 Definition (" initial-function" , EntryType::FunctionInitial),
124124 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+ };
126134
127135constexpr Definition g_line_child_entries[] = {
128136 Entry::DefinitionWithChildren (" file" , EntryType::LineEntryFile,
@@ -352,6 +360,13 @@ const char *FormatEntity::Entry::TypeToCString(Type t) {
352360 ENUM_TO_CSTR (FunctionNameWithArgs);
353361 ENUM_TO_CSTR (FunctionNameNoArgs);
354362 ENUM_TO_CSTR (FunctionMangledName);
363+ ENUM_TO_CSTR (FunctionScope);
364+ ENUM_TO_CSTR (FunctionBasename);
365+ ENUM_TO_CSTR (FunctionTemplateArguments);
366+ ENUM_TO_CSTR (FunctionFormattedArguments);
367+ ENUM_TO_CSTR (FunctionReturnLeft);
368+ ENUM_TO_CSTR (FunctionReturnRight);
369+ ENUM_TO_CSTR (FunctionQualifiers);
355370 ENUM_TO_CSTR (FunctionAddrOffset);
356371 ENUM_TO_CSTR (FunctionAddrOffsetConcrete);
357372 ENUM_TO_CSTR (FunctionLineOffset);
@@ -1165,8 +1180,9 @@ static bool PrintFunctionNameWithArgs(Stream &s,
11651180 ExecutionContextScope *exe_scope =
11661181 exe_ctx ? exe_ctx->GetBestExecutionContextScope () : nullptr ;
11671182
1168- const char *cstr =
1169- sc.GetPossiblyInlinedFunctionName (Mangled::ePreferDemangled);
1183+ const char *cstr = sc.GetPossiblyInlinedFunctionName ()
1184+ .GetName (Mangled::ePreferDemangled)
1185+ .AsCString ();
11701186 if (!cstr)
11711187 return false ;
11721188
@@ -1184,7 +1200,8 @@ static bool PrintFunctionNameWithArgs(Stream &s,
11841200 return true ;
11851201}
11861202
1187- static bool HandleFunctionNameWithArgs (Stream &s,const ExecutionContext *exe_ctx,
1203+ static bool HandleFunctionNameWithArgs (Stream &s,
1204+ const ExecutionContext *exe_ctx,
11881205 const SymbolContext &sc) {
11891206 Language *language_plugin = nullptr ;
11901207 bool language_plugin_handled = false ;
@@ -1726,8 +1743,9 @@ bool FormatEntity::Format(const Entry &entry, Stream &s,
17261743 return true ;
17271744 }
17281745
1729- const char *name = sc->GetPossiblyInlinedFunctionName (
1730- Mangled::NamePreference::ePreferDemangled);
1746+ const char *name = sc->GetPossiblyInlinedFunctionName ()
1747+ .GetName (Mangled::NamePreference::ePreferDemangled)
1748+ .AsCString ();
17311749 if (!name)
17321750 return false ;
17331751
@@ -1758,8 +1776,10 @@ bool FormatEntity::Format(const Entry &entry, Stream &s,
17581776 return true ;
17591777 }
17601778
1761- const char *name = sc->GetPossiblyInlinedFunctionName (
1762- Mangled::NamePreference::ePreferDemangledWithoutArguments);
1779+ const char *name =
1780+ sc->GetPossiblyInlinedFunctionName ()
1781+ .GetName (Mangled::NamePreference::ePreferDemangledWithoutArguments)
1782+ .AsCString ();
17631783 if (!name)
17641784 return false ;
17651785
@@ -1768,19 +1788,38 @@ bool FormatEntity::Format(const Entry &entry, Stream &s,
17681788 return true ;
17691789 }
17701790
1791+ case Entry::Type::FunctionScope:
1792+ case Entry::Type::FunctionBasename:
1793+ case Entry::Type::FunctionTemplateArguments:
1794+ case Entry::Type::FunctionFormattedArguments:
1795+ case Entry::Type::FunctionReturnRight:
1796+ case Entry::Type::FunctionReturnLeft:
1797+ case Entry::Type::FunctionQualifiers: {
1798+ if (!sc->function )
1799+ return false ;
1800+
1801+ Language *language_plugin =
1802+ Language::FindPlugin (sc->function ->GetLanguage ());
1803+ if (!language_plugin)
1804+ return false ;
1805+
1806+ return language_plugin->HandleFrameFormatVariable (*sc, exe_ctx, entry.type ,
1807+ s);
1808+ }
1809+
17711810 case Entry::Type::FunctionNameWithArgs: {
17721811 if (!sc)
17731812 return false ;
17741813
17751814 return HandleFunctionNameWithArgs (s, exe_ctx, *sc);
17761815 }
1777-
17781816 case Entry::Type::FunctionMangledName: {
17791817 if (!sc)
17801818 return false ;
17811819
1782- const char *name = sc->GetPossiblyInlinedFunctionName (
1783- Mangled::NamePreference::ePreferMangled);
1820+ const char *name = sc->GetPossiblyInlinedFunctionName ()
1821+ .GetName (Mangled::NamePreference::ePreferMangled)
1822+ .AsCString ();
17841823 if (!name)
17851824 return false ;
17861825
0 commit comments