@@ -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 ;
@@ -1709,8 +1726,9 @@ bool FormatEntity::Format(const Entry &entry, Stream &s,
17091726 return true ;
17101727 }
17111728
1712- const char *name = sc->GetPossiblyInlinedFunctionName (
1713- Mangled::NamePreference::ePreferDemangled);
1729+ const char *name = sc->GetPossiblyInlinedFunctionName ()
1730+ .GetName (Mangled::NamePreference::ePreferDemangled)
1731+ .AsCString ();
17141732 if (!name)
17151733 return false ;
17161734
@@ -1741,8 +1759,10 @@ bool FormatEntity::Format(const Entry &entry, Stream &s,
17411759 return true ;
17421760 }
17431761
1744- const char *name = sc->GetPossiblyInlinedFunctionName (
1745- Mangled::NamePreference::ePreferDemangledWithoutArguments);
1762+ const char *name =
1763+ sc->GetPossiblyInlinedFunctionName ()
1764+ .GetName (Mangled::NamePreference::ePreferDemangledWithoutArguments)
1765+ .AsCString ();
17461766 if (!name)
17471767 return false ;
17481768
@@ -1751,19 +1771,38 @@ bool FormatEntity::Format(const Entry &entry, Stream &s,
17511771 return true ;
17521772 }
17531773
1774+ case Entry::Type::FunctionScope:
1775+ case Entry::Type::FunctionBasename:
1776+ case Entry::Type::FunctionTemplateArguments:
1777+ case Entry::Type::FunctionFormattedArguments:
1778+ case Entry::Type::FunctionReturnRight:
1779+ case Entry::Type::FunctionReturnLeft:
1780+ case Entry::Type::FunctionQualifiers: {
1781+ if (!sc->function )
1782+ return false ;
1783+
1784+ Language *language_plugin =
1785+ Language::FindPlugin (sc->function ->GetLanguage ());
1786+ if (!language_plugin)
1787+ return false ;
1788+
1789+ return language_plugin->HandleFrameFormatVariable (*sc, exe_ctx, entry.type ,
1790+ s);
1791+ }
1792+
17541793 case Entry::Type::FunctionNameWithArgs: {
17551794 if (!sc)
17561795 return false ;
17571796
17581797 return HandleFunctionNameWithArgs (s, exe_ctx, *sc);
17591798 }
1760-
17611799 case Entry::Type::FunctionMangledName: {
17621800 if (!sc)
17631801 return false ;
17641802
1765- const char *name = sc->GetPossiblyInlinedFunctionName (
1766- Mangled::NamePreference::ePreferMangled);
1803+ const char *name = sc->GetPossiblyInlinedFunctionName ()
1804+ .GetName (Mangled::NamePreference::ePreferMangled)
1805+ .AsCString ();
17671806 if (!name)
17681807 return false ;
17691808
0 commit comments