https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/137522
>From 2388b0951a3e9b0e2ebd297881f17423c8d68b4e Mon Sep 17 00:00:00 2001 From: Michael Buch <michaelbuc...@gmail.com> Date: Sun, 27 Apr 2025 11:23:20 +0100 Subject: [PATCH 1/7] [lldb][docs] Document new frame-format variables --- lldb/docs/use/formatting.rst | 50 +++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/lldb/docs/use/formatting.rst b/lldb/docs/use/formatting.rst index 7b3f01eebc891..6063a47e279f0 100644 --- a/lldb/docs/use/formatting.rst +++ b/lldb/docs/use/formatting.rst @@ -85,10 +85,24 @@ A complete list of currently supported format string variables is listed below: +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.name`` | The name of the current function or symbol. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.name-with-args`` | The name of the current function with arguments and values or the symbol name. | +| ``function.name-with-args`` | The name of the current function with arguments and values or the symbol name. The name will be displayed according to the current frame's language if possible. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.name-without-args`` | The name of the current function without arguments and values (used to include a function name in-line in the ``disassembly-format``) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ``function.basename`` | The basename of the current function depending on the frame's language. E.g., for C++ the basename for `void ns::foo<float>::bar<int>(int) const` is `bar`. | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ``function.scope`` | The scope qualifiers of the current function depending on the frame's language. E.g., for C++ the scope for `void ns::foo<float>::bar<int>(int) const` is `ns::foo<float>`. | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ``function.template-arguments`` | The template arguments of the current function depending on the frame's language. E.g., for C++ the template arguments for `void ns::foo<float>::bar<int>(int) const` are `<float>`. | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ``function.formatted-arguments`` | Arguments of the current function, formatted according to the frame's language. When debug-info is available, will apply data-formatters to each argument and include it's name if available. Otherwise prints the type of each argument according to the mangling. E.g., for C++ the pretty-printed arguments for `func(int x, const char \*str)` are `(x=10, str="Hello")`. Without debug-info it would be `(int, const char\*)`. | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ``function.qualifiers`` | The function CV and reference qualifiers of the current function depending on the frame's language. E.g., for C++ the qualifiers for `void ns::foo<float>::bar<int>(int) const &` are ` const &`. | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ``function.return-left`` | The return type to the left of the demangled function name of the current function. This depends on the frame's language. E.g., for C++ the `function.return-left` is in most-cases the entirety of the return type. In `void ns::foo(int)` that would be `void `. However, in some cases, particularly for functions returning function pointers, part of the return type is to the right of the function name. E.g., for `void (\*ns::func(float))(int)` the `function.return-left` would be `void (\*` and the `function.return-right` would be `)(int)`. | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ``function.return-right`` | The return type to the right of the demangled function name of the current function. This depends on the frame's language. In `void ns::foo(int)` there is no `function.return-right` so this would correspond to an empty string. However, in some cases, particularly for functions returning function pointers, part of the return type is to the right of the function name. E.g., for `void (\*ns::func(float))(int)` the `function.return-left` would be `void (\*` and the `function.return-right` would be `)(int)`. | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.mangled-name`` | The mangled name of the current function or symbol. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.pc-offset`` | The program counter offset within the current function or symbol | @@ -300,3 +314,37 @@ you would see output like: * Thread main has 21 frames +Function Name Formats +_____________________ + +The function names displayed in backtraces/``frame info``/``thread info`` are the demangled names of functions. On some platforms (like ones using Itanium the mangling scheme), LLDB supports decomposing these names into fine-grained components. These are currently: +* ``${function.return-left}`` +* ``${function.scope}`` +* ``${function.basename}`` +* ``${function.template-arguments}`` +* ``${function.formatted-arguments}`` +* ``${function.qualifiers}`` +* ``${function.return-right}`` + +Each language plugin decides how to handle these variables. For C++, LLDB uses these variables to dictate how function names are formatted. This can be customized using the ``plugin.cplusplus.display.function-name-format`` LLDB setting. + +E.g., the following setting would reconstruct the entire function name (and is LLDB's default): + +:: + + (lldb) settings set plugin.cplusplus.dislpay.function-name-format "${function.return-left}${function.scope}${function.basename}${function.template-arguments}${function.formatted-arguments}${function.qualifiers}${function.return-right}" + +If a user wanted to omit the return type and template arguments of C++ function names one could do: + +:: + + (lldb) settings set plugin.cplusplus.dislpay.function-name-format "${function.scope}${function.basename}${function.formatted-arguments}${function.qualifiers}" + + +Then the following would highlight just the basename in green: + +:: + + (lldb) settings set plugin.cplusplus.dislpay.function-name-format "${function.scope}${ansi.fg.yellow}${function.basename}${ansi.normal}${function.formatted-arguments}${function.qualifiers}" + +The ``${function.name-with-args}`` by default asks the language plugin whether it supports a language-specific ``function-name-format`` (e.g., the ``plugin.cplusplus.display.function-name-format`` for C++), and if it does, uses it. Otherwise it will display the demangled function name. >From 4898fc4b685f2ae530349fa7ec4933d00efe9cd4 Mon Sep 17 00:00:00 2001 From: Michael Buch <michaelbuc...@gmail.com> Date: Sun, 27 Apr 2025 16:19:09 +0100 Subject: [PATCH 2/7] fixup! fix whitespace in table --- lldb/docs/use/formatting.rst | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lldb/docs/use/formatting.rst b/lldb/docs/use/formatting.rst index 6063a47e279f0..c387af381f297 100644 --- a/lldb/docs/use/formatting.rst +++ b/lldb/docs/use/formatting.rst @@ -85,23 +85,26 @@ A complete list of currently supported format string variables is listed below: +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.name`` | The name of the current function or symbol. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.name-with-args`` | The name of the current function with arguments and values or the symbol name. The name will be displayed according to the current frame's language if possible. | +| ``function.name-with-args`` | The name of the current function with arguments and values or the symbol name. The name will be displayed according to the current frame's language if possible. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.name-without-args`` | The name of the current function without arguments and values (used to include a function name in-line in the ``disassembly-format``) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.basename`` | The basename of the current function depending on the frame's language. E.g., for C++ the basename for `void ns::foo<float>::bar<int>(int) const` is `bar`. | +| ``function.basename`` | The basename of the current function depending on the frame's language. E.g., for C++ the basename for `void ns::foo<float>::bar<int>(int) const` is `bar`. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.scope`` | The scope qualifiers of the current function depending on the frame's language. E.g., for C++ the scope for `void ns::foo<float>::bar<int>(int) const` is `ns::foo<float>`. | +| ``function.scope`` | The scope qualifiers of the current function depending on the frame's language. E.g., for C++ the scope for `void ns::foo<float>::bar<int>(int) const` is `ns::foo<float>`. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.template-arguments`` | The template arguments of the current function depending on the frame's language. E.g., for C++ the template arguments for `void ns::foo<float>::bar<int>(int) const` are `<float>`. | +| ``function.template-arguments`` | The template arguments of the current function depending on the frame's language. E.g., for C++ the template arguments for `void ns::foo<float>::bar<int>(int) const` are `<float>`. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.formatted-arguments`` | Arguments of the current function, formatted according to the frame's language. When debug-info is available, will apply data-formatters to each argument and include it's name if available. Otherwise prints the type of each argument according to the mangling. E.g., for C++ the pretty-printed arguments for `func(int x, const char \*str)` are `(x=10, str="Hello")`. Without debug-info it would be `(int, const char\*)`. | +| ``function.formatted-arguments`` | Arguments of the current function, formatted according to the frame's language. When debug-info is available, will apply data-formatters to each argument and include it's name if available. Otherwise prints the type of each argument according to the mangling. E.g., for C++ the | +| | pretty-printed arguments for `func(int x, const char \*str)` are `(x=10, str="Hello")`. Without debug-info it would be `(int, const char\*)`. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.qualifiers`` | The function CV and reference qualifiers of the current function depending on the frame's language. E.g., for C++ the qualifiers for `void ns::foo<float>::bar<int>(int) const &` are ` const &`. | +| ``function.qualifiers`` | The function CV and reference qualifiers of the current function depending on the frame's language. E.g., for C++ the qualifiers for `void ns::foo<float>::bar<int>(int) const &` are ` const &`. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.return-left`` | The return type to the left of the demangled function name of the current function. This depends on the frame's language. E.g., for C++ the `function.return-left` is in most-cases the entirety of the return type. In `void ns::foo(int)` that would be `void `. However, in some cases, particularly for functions returning function pointers, part of the return type is to the right of the function name. E.g., for `void (\*ns::func(float))(int)` the `function.return-left` would be `void (\*` and the `function.return-right` would be `)(int)`. | +| ``function.return-left`` | The return type to the left of the demangled function name of the current function. This depends on the frame's language. E.g., for C++ the `function.return-left` is in most-cases the entirety of the return type. In `void ns::foo(int)` that would be `void `. However, in some cases, | +| | particularly for functions returning function pointers, part of the return type is to the right of the function name. E.g., for `void (\*ns::func(float))(int)` the `function.return-left` would be `void (\*` and the `function.return-right` would be `)(int)`. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.return-right`` | The return type to the right of the demangled function name of the current function. This depends on the frame's language. In `void ns::foo(int)` there is no `function.return-right` so this would correspond to an empty string. However, in some cases, particularly for functions returning function pointers, part of the return type is to the right of the function name. E.g., for `void (\*ns::func(float))(int)` the `function.return-left` would be `void (\*` and the `function.return-right` would be `)(int)`. | +| ``function.return-right`` | The return type to the right of the demangled function name of the current function. This depends on the frame's language. In `void ns::foo(int)` there is no `function.return-right` so this would correspond to an empty string. However, in some cases, particularly for functions | +| | returning function pointers, part of the return type is to the right of the function name. E.g., for `void (\*ns::func(float))(int)` the `function.return-left` would be `void (\*` and the `function.return-right` would be `)(int)`. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.mangled-name`` | The mangled name of the current function or symbol. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ >From 52fde0af6ce4685a3586e2207fe74362ff7c6904 Mon Sep 17 00:00:00 2001 From: Michael Buch <michaelbuc...@gmail.com> Date: Sun, 27 Apr 2025 21:53:13 +0100 Subject: [PATCH 3/7] fixup! double backticks Co-authored-by: Jonas Devlieghere <jo...@devlieghere.com> --- lldb/docs/use/formatting.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/docs/use/formatting.rst b/lldb/docs/use/formatting.rst index c387af381f297..21d0709b7a9ac 100644 --- a/lldb/docs/use/formatting.rst +++ b/lldb/docs/use/formatting.rst @@ -89,7 +89,7 @@ A complete list of currently supported format string variables is listed below: +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.name-without-args`` | The name of the current function without arguments and values (used to include a function name in-line in the ``disassembly-format``) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.basename`` | The basename of the current function depending on the frame's language. E.g., for C++ the basename for `void ns::foo<float>::bar<int>(int) const` is `bar`. | +| ``function.basename`` | The basename of the current function depending on the frame's language. E.g., for C++ the basename for ``void ns::foo<float>::bar<int>(int) const`` is ``bar``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.scope`` | The scope qualifiers of the current function depending on the frame's language. E.g., for C++ the scope for `void ns::foo<float>::bar<int>(int) const` is `ns::foo<float>`. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ >From 0e66928287bb1f682e9066df059324aa50225ec5 Mon Sep 17 00:00:00 2001 From: Michael Buch <michaelbuc...@gmail.com> Date: Sun, 27 Apr 2025 22:13:02 +0100 Subject: [PATCH 4/7] fixup! fix table format --- lldb/docs/use/formatting.rst | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/lldb/docs/use/formatting.rst b/lldb/docs/use/formatting.rst index 21d0709b7a9ac..79b15927bcf69 100644 --- a/lldb/docs/use/formatting.rst +++ b/lldb/docs/use/formatting.rst @@ -89,22 +89,22 @@ A complete list of currently supported format string variables is listed below: +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.name-without-args`` | The name of the current function without arguments and values (used to include a function name in-line in the ``disassembly-format``) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.basename`` | The basename of the current function depending on the frame's language. E.g., for C++ the basename for ``void ns::foo<float>::bar<int>(int) const`` is ``bar``. | +| ``function.basename`` | The basename of the current function depending on the frame's language. E.g., for C++ the basename for ``void ns::foo<float>::bar<int>(int) const`` is ``bar``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.scope`` | The scope qualifiers of the current function depending on the frame's language. E.g., for C++ the scope for `void ns::foo<float>::bar<int>(int) const` is `ns::foo<float>`. | +| ``function.scope`` | The scope qualifiers of the current function depending on the frame's language. E.g., for C++ the scope for ``void ns::foo<float>::bar<int>(int) const`` is ``ns::foo<float>``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.template-arguments`` | The template arguments of the current function depending on the frame's language. E.g., for C++ the template arguments for `void ns::foo<float>::bar<int>(int) const` are `<float>`. | +| ``function.template-arguments`` | The template arguments of the current function depending on the frame's language. E.g., for C++ the template arguments for ``void ns::foo<float>::bar<int>(int) const`` are ``<float>``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.formatted-arguments`` | Arguments of the current function, formatted according to the frame's language. When debug-info is available, will apply data-formatters to each argument and include it's name if available. Otherwise prints the type of each argument according to the mangling. E.g., for C++ the | -| | pretty-printed arguments for `func(int x, const char \*str)` are `(x=10, str="Hello")`. Without debug-info it would be `(int, const char\*)`. | +| | pretty-printed arguments for ``func(int x, const char \*str)`` are ``(x=10, str="Hello")``. Without debug-info it would be ``(int, const char\*)``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.qualifiers`` | The function CV and reference qualifiers of the current function depending on the frame's language. E.g., for C++ the qualifiers for `void ns::foo<float>::bar<int>(int) const &` are ` const &`. | +| ``function.qualifiers`` | The function CV and reference qualifiers of the current function depending on the frame's language. E.g., for C++ the qualifiers for ``void ns::foo<float>::bar<int>(int) const &`` are `` const &``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.return-left`` | The return type to the left of the demangled function name of the current function. This depends on the frame's language. E.g., for C++ the `function.return-left` is in most-cases the entirety of the return type. In `void ns::foo(int)` that would be `void `. However, in some cases, | -| | particularly for functions returning function pointers, part of the return type is to the right of the function name. E.g., for `void (\*ns::func(float))(int)` the `function.return-left` would be `void (\*` and the `function.return-right` would be `)(int)`. | +| ``function.return-left`` | The return type to the left of the demangled function name of the current function. This depends on the frame's language. E.g., for C++ the ``function.return-left`` is in most-cases the entirety of the return type. In ``void ns::foo(int)`` that would be ``void ``. However, in some | +| | cases, particularly for functions returning function pointers, part of the return type is to the right of the function name. E.g., for ``void (\*ns::func(float))(int)`` the ``function.return-left`` would be ``void (\*`` and the ``function.return-right`` would be ``)(int)``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.return-right`` | The return type to the right of the demangled function name of the current function. This depends on the frame's language. In `void ns::foo(int)` there is no `function.return-right` so this would correspond to an empty string. However, in some cases, particularly for functions | -| | returning function pointers, part of the return type is to the right of the function name. E.g., for `void (\*ns::func(float))(int)` the `function.return-left` would be `void (\*` and the `function.return-right` would be `)(int)`. | +| ``function.return-right`` | The return type to the right of the demangled function name of the current function. This depends on the frame's language. In ``void ns::foo(int)`` there is no ``function.return-right`` so this would correspond to an empty string. However, in some cases, particularly for functions | +| | returning function pointers, part of the return type is to the right of the function name. E.g., for ``void (\*ns::func(float))(int)`` the ``function.return-left`` would be ``void (\*`` and the ``function.return-right`` would be ``)(int)``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.mangled-name`` | The mangled name of the current function or symbol. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -321,13 +321,14 @@ Function Name Formats _____________________ The function names displayed in backtraces/``frame info``/``thread info`` are the demangled names of functions. On some platforms (like ones using Itanium the mangling scheme), LLDB supports decomposing these names into fine-grained components. These are currently: -* ``${function.return-left}`` -* ``${function.scope}`` -* ``${function.basename}`` -* ``${function.template-arguments}`` -* ``${function.formatted-arguments}`` -* ``${function.qualifiers}`` -* ``${function.return-right}`` + +- ``${function.return-left}`` +- ``${function.scope}`` +- ``${function.basename}`` +- ``${function.template-arguments}`` +- ``${function.formatted-arguments}`` +- ``${function.qualifiers}`` +- ``${function.return-right}`` Each language plugin decides how to handle these variables. For C++, LLDB uses these variables to dictate how function names are formatted. This can be customized using the ``plugin.cplusplus.display.function-name-format`` LLDB setting. >From 56ace236d5e0f163c0019d312873bd181a106440 Mon Sep 17 00:00:00 2001 From: Michael Buch <michaelbuc...@gmail.com> Date: Sun, 27 Apr 2025 22:30:36 +0100 Subject: [PATCH 5/7] fixup! fix table format --- lldb/docs/use/formatting.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/docs/use/formatting.rst b/lldb/docs/use/formatting.rst index 79b15927bcf69..91dadab0036f7 100644 --- a/lldb/docs/use/formatting.rst +++ b/lldb/docs/use/formatting.rst @@ -96,15 +96,15 @@ A complete list of currently supported format string variables is listed below: | ``function.template-arguments`` | The template arguments of the current function depending on the frame's language. E.g., for C++ the template arguments for ``void ns::foo<float>::bar<int>(int) const`` are ``<float>``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.formatted-arguments`` | Arguments of the current function, formatted according to the frame's language. When debug-info is available, will apply data-formatters to each argument and include it's name if available. Otherwise prints the type of each argument according to the mangling. E.g., for C++ the | -| | pretty-printed arguments for ``func(int x, const char \*str)`` are ``(x=10, str="Hello")``. Without debug-info it would be ``(int, const char\*)``. | +| | pretty-printed arguments for ``func(int x, const char *str)`` are ``(x=10, str="Hello")``. Without debug-info it would be ``(int, const char*)``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.qualifiers`` | The function CV and reference qualifiers of the current function depending on the frame's language. E.g., for C++ the qualifiers for ``void ns::foo<float>::bar<int>(int) const &`` are `` const &``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.return-left`` | The return type to the left of the demangled function name of the current function. This depends on the frame's language. E.g., for C++ the ``function.return-left`` is in most-cases the entirety of the return type. In ``void ns::foo(int)`` that would be ``void ``. However, in some | -| | cases, particularly for functions returning function pointers, part of the return type is to the right of the function name. E.g., for ``void (\*ns::func(float))(int)`` the ``function.return-left`` would be ``void (\*`` and the ``function.return-right`` would be ``)(int)``. | +| | cases, particularly for functions returning function pointers, part of the return type is to the right of the function name. E.g., for ``void (*ns::func(float))(int)`` the ``function.return-left`` would be ``void (*`` and the ``function.return-right`` would be ``)(int)``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.return-right`` | The return type to the right of the demangled function name of the current function. This depends on the frame's language. In ``void ns::foo(int)`` there is no ``function.return-right`` so this would correspond to an empty string. However, in some cases, particularly for functions | -| | returning function pointers, part of the return type is to the right of the function name. E.g., for ``void (\*ns::func(float))(int)`` the ``function.return-left`` would be ``void (\*`` and the ``function.return-right`` would be ``)(int)``. | +| | returning function pointers, part of the return type is to the right of the function name. E.g., for ``void (*ns::func(float))(int)`` the ``function.return-left`` would be ``void (*`` and the ``function.return-right`` would be ``)(int)``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.mangled-name`` | The mangled name of the current function or symbol. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ >From 53b742b57f0b7631a8362f46e721c74b5278238b Mon Sep 17 00:00:00 2001 From: Michael Buch <michaelbuc...@gmail.com> Date: Sun, 27 Apr 2025 22:33:29 +0100 Subject: [PATCH 6/7] fixup! fix backticks --- lldb/docs/use/formatting.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/docs/use/formatting.rst b/lldb/docs/use/formatting.rst index 91dadab0036f7..429dbacf4d43d 100644 --- a/lldb/docs/use/formatting.rst +++ b/lldb/docs/use/formatting.rst @@ -98,9 +98,9 @@ A complete list of currently supported format string variables is listed below: | ``function.formatted-arguments`` | Arguments of the current function, formatted according to the frame's language. When debug-info is available, will apply data-formatters to each argument and include it's name if available. Otherwise prints the type of each argument according to the mangling. E.g., for C++ the | | | pretty-printed arguments for ``func(int x, const char *str)`` are ``(x=10, str="Hello")``. Without debug-info it would be ``(int, const char*)``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.qualifiers`` | The function CV and reference qualifiers of the current function depending on the frame's language. E.g., for C++ the qualifiers for ``void ns::foo<float>::bar<int>(int) const &`` are `` const &``. | +| ``function.qualifiers`` | The function CV and reference qualifiers of the current function depending on the frame's language. E.g., for C++ the qualifiers for ``void ns::foo<float>::bar<int>(int) const &`` are ``const &``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.return-left`` | The return type to the left of the demangled function name of the current function. This depends on the frame's language. E.g., for C++ the ``function.return-left`` is in most-cases the entirety of the return type. In ``void ns::foo(int)`` that would be ``void ``. However, in some | +| ``function.return-left`` | The return type to the left of the demangled function name of the current function. This depends on the frame's language. E.g., for C++ the ``function.return-left`` is in most-cases the entirety of the return type. In ``void ns::foo(int)`` that would be ``void``. However, in some | | | cases, particularly for functions returning function pointers, part of the return type is to the right of the function name. E.g., for ``void (*ns::func(float))(int)`` the ``function.return-left`` would be ``void (*`` and the ``function.return-right`` would be ``)(int)``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.return-right`` | The return type to the right of the demangled function name of the current function. This depends on the frame's language. In ``void ns::foo(int)`` there is no ``function.return-right`` so this would correspond to an empty string. However, in some cases, particularly for functions | >From 6963716f1b48dddc1ea22ddd3da6b50afc057a50 Mon Sep 17 00:00:00 2001 From: Michael Buch <michaelbuc...@gmail.com> Date: Sun, 27 Apr 2025 22:37:11 +0100 Subject: [PATCH 7/7] fixup! fix table --- lldb/docs/use/formatting.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/docs/use/formatting.rst b/lldb/docs/use/formatting.rst index 429dbacf4d43d..a21165a3ecae3 100644 --- a/lldb/docs/use/formatting.rst +++ b/lldb/docs/use/formatting.rst @@ -98,9 +98,9 @@ A complete list of currently supported format string variables is listed below: | ``function.formatted-arguments`` | Arguments of the current function, formatted according to the frame's language. When debug-info is available, will apply data-formatters to each argument and include it's name if available. Otherwise prints the type of each argument according to the mangling. E.g., for C++ the | | | pretty-printed arguments for ``func(int x, const char *str)`` are ``(x=10, str="Hello")``. Without debug-info it would be ``(int, const char*)``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.qualifiers`` | The function CV and reference qualifiers of the current function depending on the frame's language. E.g., for C++ the qualifiers for ``void ns::foo<float>::bar<int>(int) const &`` are ``const &``. | +| ``function.qualifiers`` | The function CV and reference qualifiers of the current function depending on the frame's language. E.g., for C++ the qualifiers for ``void ns::foo<float>::bar<int>(int) const &`` are ``const &``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``function.return-left`` | The return type to the left of the demangled function name of the current function. This depends on the frame's language. E.g., for C++ the ``function.return-left`` is in most-cases the entirety of the return type. In ``void ns::foo(int)`` that would be ``void``. However, in some | +| ``function.return-left`` | The return type to the left of the demangled function name of the current function. This depends on the frame's language. E.g., for C++ the ``function.return-left`` is in most-cases the entirety of the return type. In ``void ns::foo(int)`` that would be ``void``. However, in some | | | cases, particularly for functions returning function pointers, part of the return type is to the right of the function name. E.g., for ``void (*ns::func(float))(int)`` the ``function.return-left`` would be ``void (*`` and the ``function.return-right`` would be ``)(int)``. | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``function.return-right`` | The return type to the right of the demangled function name of the current function. This depends on the frame's language. In ``void ns::foo(int)`` there is no ``function.return-right`` so this would correspond to an empty string. However, in some cases, particularly for functions | _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits