<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/test/Shell/Settings/Inputs/names.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[lldb][Format] Fix missing inlined function names in frame formatting. (#78494)</title>
<updated>2024-01-18T16:06:57+00:00</updated>
<author>
<name>Zequan Wu</name>
<email>zequanwu@google.com</email>
</author>
<published>2024-01-18T16:06:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f4ede08c61cba631de204398a91aa59bac9d5db9'/>
<id>f4ede08c61cba631de204398a91aa59bac9d5db9</id>
<content type='text'>
This fixes missing inlined function names when formatting frame and the
`Block` in `SymbolContext` is a lexical block (e.g.
`DW_TAG_lexical_block` in Dwarf).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes missing inlined function names when formatting frame and the
`Block` in `SymbolContext` is a lexical block (e.g.
`DW_TAG_lexical_block` in Dwarf).</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][Test] Make TestFrameFormatNameWithArgs.test more compatible across platforms</title>
<updated>2022-11-03T13:30:14+00:00</updated>
<author>
<name>Michael Buch</name>
<email>michaelbuch12@gmail.com</email>
</author>
<published>2022-11-02T17:18:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c188910694ab821aabc0ca11f4636b69f5f7b4f1'/>
<id>c188910694ab821aabc0ca11f4636b69f5f7b4f1</id>
<content type='text'>
On Linux the `std::function` behaved differently to that on Darwin.

This patch removes usage of `std::function` in the test but attempts
to retain the test-coverage. We mainly want function types appearing
in the template argument and function argument lists.

Also add a `char const*` overload to one of the test functions to
cover the "format function argument using ValueObject formatter" code-path.

Differential Revision: https://reviews.llvm.org/D137272
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Linux the `std::function` behaved differently to that on Darwin.

This patch removes usage of `std::function` in the test but attempts
to retain the test-coverage. We mainly want function types appearing
in the template argument and function argument lists.

Also add a `char const*` overload to one of the test functions to
cover the "format function argument using ValueObject formatter" code-path.

Differential Revision: https://reviews.llvm.org/D137272
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][CPlusPlus] Implement CPlusPlusLanguage::GetFunctionDisplayName</title>
<updated>2022-10-31T12:25:19+00:00</updated>
<author>
<name>Michael Buch</name>
<email>michaelbuch12@gmail.com</email>
</author>
<published>2022-10-27T10:10:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=031096d04d09ac4a93859d161fb42d1a1b308253'/>
<id>031096d04d09ac4a93859d161fb42d1a1b308253</id>
<content type='text'>
This patch implements the `GetFunctionDisplayName` API which gets
used by the frame-formatting code to decide how to print a
function name.

Currently this API trivially returns `false`, so we try to parse
the demangled function base-name by hand. We try find the closing
parenthesis by doing a forward scan through the demangled name. However,
for arguments that contain parenthesis (e.g., function pointers)
this would leave garbage in the frame function name.

By re-using the `CPlusPlusLanguage` parser for this we offload the
need to parse function names to a component that knows how to do this
already.

We leave the existing parsing code in `FormatEntity` since it's used
in cases where a language-plugin is not available (and is not
necessarily C++ specific).

**Example**

For following function:
```
int foo(std::function&lt;int(void)&gt; const&amp; func) { return 1; }
```

Before patch:
```
frame #0: 0x000000010000151c a.out`foo(func= Function = bar() )&gt; const&amp;) at sample.cpp:11:49
```

After patch:
```
frame #0: 0x000000010000151c a.out`foo(func= Function = bar() ) at sample.cpp:11:49
```

**Testing**

* Added shell test
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements the `GetFunctionDisplayName` API which gets
used by the frame-formatting code to decide how to print a
function name.

Currently this API trivially returns `false`, so we try to parse
the demangled function base-name by hand. We try find the closing
parenthesis by doing a forward scan through the demangled name. However,
for arguments that contain parenthesis (e.g., function pointers)
this would leave garbage in the frame function name.

By re-using the `CPlusPlusLanguage` parser for this we offload the
need to parse function names to a component that knows how to do this
already.

We leave the existing parsing code in `FormatEntity` since it's used
in cases where a language-plugin is not available (and is not
necessarily C++ specific).

**Example**

For following function:
```
int foo(std::function&lt;int(void)&gt; const&amp; func) { return 1; }
```

Before patch:
```
frame #0: 0x000000010000151c a.out`foo(func= Function = bar() )&gt; const&amp;) at sample.cpp:11:49
```

After patch:
```
frame #0: 0x000000010000151c a.out`foo(func= Function = bar() ) at sample.cpp:11:49
```

**Testing**

* Added shell test
</pre>
</div>
</content>
</entry>
</feed>
