<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp, branch users/vitalybuka/spr/main.asandarwin-simplify-test</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] Extend frame recognizers to hide frames from backtraces (#104523)</title>
<updated>2024-08-20T23:01:22+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2024-08-20T23:01:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f01f80ce6ca7640bb0e267b84b1ed0e89b57e2d9'/>
<id>f01f80ce6ca7640bb0e267b84b1ed0e89b57e2d9</id>
<content type='text'>
Compilers and language runtimes often use helper functions that are
fundamentally uninteresting when debugging anything but the
compiler/runtime itself. This patch introduces a user-extensible
mechanism that allows for these frames to be hidden from backtraces and
automatically skipped over when navigating the stack with `up` and
`down`.

This does not affect the numbering of frames, so `f &lt;N&gt;` will still
provide access to the hidden frames. The `bt` output will also print a
hint that frames have been hidden.

My primary motivation for this feature is to hide thunks in the Swift
programming language, but I'm including an example recognizer for
`std::function::operator()` that I wished for myself many times while
debugging LLDB.

rdar://126629381


Example output. (Yes, my proof-of-concept recognizer could hide even
more frames if we had a method that returned the function name without
the return type or I used something that isn't based off regex, but it's
really only meant as an example).

before:
```
(lldb) thread backtrace --filtered=false
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  * frame #0: 0x0000000100001f04 a.out`foo(x=1, y=1) at main.cpp:4:10
    frame #1: 0x0000000100003a00 a.out`decltype(std::declval&lt;int (*&amp;)(int, int)&gt;()(std::declval&lt;int&gt;(), std::declval&lt;int&gt;())) std::__1::__invoke[abi:se200000]&lt;int (*&amp;)(int, int), int, int&gt;(__f=0x000000016fdff280, __args=0x000000016fdff224, __args=0x000000016fdff220) at invoke.h:149:25
    frame #2: 0x000000010000399c a.out`int std::__1::__invoke_void_return_wrapper&lt;int, false&gt;::__call[abi:se200000]&lt;int (*&amp;)(int, int), int, int&gt;(__args=0x000000016fdff280, __args=0x000000016fdff224, __args=0x000000016fdff220) at invoke.h:216:12
    frame #3: 0x0000000100003968 a.out`std::__1::__function::__alloc_func&lt;int (*)(int, int), std::__1::allocator&lt;int (*)(int, int)&gt;, int (int, int)&gt;::operator()[abi:se200000](this=0x000000016fdff280, __arg=0x000000016fdff224, __arg=0x000000016fdff220) at function.h:171:12
    frame #4: 0x00000001000026bc a.out`std::__1::__function::__func&lt;int (*)(int, int), std::__1::allocator&lt;int (*)(int, int)&gt;, int (int, int)&gt;::operator()(this=0x000000016fdff278, __arg=0x000000016fdff224, __arg=0x000000016fdff220) at function.h:313:10
    frame #5: 0x0000000100003c38 a.out`std::__1::__function::__value_func&lt;int (int, int)&gt;::operator()[abi:se200000](this=0x000000016fdff278, __args=0x000000016fdff224, __args=0x000000016fdff220) const at function.h:430:12
    frame #6: 0x0000000100002038 a.out`std::__1::function&lt;int (int, int)&gt;::operator()(this= Function = foo(int, int) , __arg=1, __arg=1) const at function.h:989:10
    frame #7: 0x0000000100001f64 a.out`main(argc=1, argv=0x000000016fdff4f8) at main.cpp:9:10
    frame #8: 0x0000000183cdf154 dyld`start + 2476
(lldb) 
```

after

```
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  * frame #0: 0x0000000100001f04 a.out`foo(x=1, y=1) at main.cpp:4:10
    frame #1: 0x0000000100003a00 a.out`decltype(std::declval&lt;int (*&amp;)(int, int)&gt;()(std::declval&lt;int&gt;(), std::declval&lt;int&gt;())) std::__1::__invoke[abi:se200000]&lt;int (*&amp;)(int, int), int, int&gt;(__f=0x000000016fdff280, __args=0x000000016fdff224, __args=0x000000016fdff220) at invoke.h:149:25
    frame #2: 0x000000010000399c a.out`int std::__1::__invoke_void_return_wrapper&lt;int, false&gt;::__call[abi:se200000]&lt;int (*&amp;)(int, int), int, int&gt;(__args=0x000000016fdff280, __args=0x000000016fdff224, __args=0x000000016fdff220) at invoke.h:216:12
    frame #6: 0x0000000100002038 a.out`std::__1::function&lt;int (int, int)&gt;::operator()(this= Function = foo(int, int) , __arg=1, __arg=1) const at function.h:989:10
    frame #7: 0x0000000100001f64 a.out`main(argc=1, argv=0x000000016fdff4f8) at main.cpp:9:10
    frame #8: 0x0000000183cdf154 dyld`start + 2476
Note: Some frames were hidden by frame recognizers
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Compilers and language runtimes often use helper functions that are
fundamentally uninteresting when debugging anything but the
compiler/runtime itself. This patch introduces a user-extensible
mechanism that allows for these frames to be hidden from backtraces and
automatically skipped over when navigating the stack with `up` and
`down`.

This does not affect the numbering of frames, so `f &lt;N&gt;` will still
provide access to the hidden frames. The `bt` output will also print a
hint that frames have been hidden.

My primary motivation for this feature is to hide thunks in the Swift
programming language, but I'm including an example recognizer for
`std::function::operator()` that I wished for myself many times while
debugging LLDB.

rdar://126629381


Example output. (Yes, my proof-of-concept recognizer could hide even
more frames if we had a method that returned the function name without
the return type or I used something that isn't based off regex, but it's
really only meant as an example).

before:
```
(lldb) thread backtrace --filtered=false
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  * frame #0: 0x0000000100001f04 a.out`foo(x=1, y=1) at main.cpp:4:10
    frame #1: 0x0000000100003a00 a.out`decltype(std::declval&lt;int (*&amp;)(int, int)&gt;()(std::declval&lt;int&gt;(), std::declval&lt;int&gt;())) std::__1::__invoke[abi:se200000]&lt;int (*&amp;)(int, int), int, int&gt;(__f=0x000000016fdff280, __args=0x000000016fdff224, __args=0x000000016fdff220) at invoke.h:149:25
    frame #2: 0x000000010000399c a.out`int std::__1::__invoke_void_return_wrapper&lt;int, false&gt;::__call[abi:se200000]&lt;int (*&amp;)(int, int), int, int&gt;(__args=0x000000016fdff280, __args=0x000000016fdff224, __args=0x000000016fdff220) at invoke.h:216:12
    frame #3: 0x0000000100003968 a.out`std::__1::__function::__alloc_func&lt;int (*)(int, int), std::__1::allocator&lt;int (*)(int, int)&gt;, int (int, int)&gt;::operator()[abi:se200000](this=0x000000016fdff280, __arg=0x000000016fdff224, __arg=0x000000016fdff220) at function.h:171:12
    frame #4: 0x00000001000026bc a.out`std::__1::__function::__func&lt;int (*)(int, int), std::__1::allocator&lt;int (*)(int, int)&gt;, int (int, int)&gt;::operator()(this=0x000000016fdff278, __arg=0x000000016fdff224, __arg=0x000000016fdff220) at function.h:313:10
    frame #5: 0x0000000100003c38 a.out`std::__1::__function::__value_func&lt;int (int, int)&gt;::operator()[abi:se200000](this=0x000000016fdff278, __args=0x000000016fdff224, __args=0x000000016fdff220) const at function.h:430:12
    frame #6: 0x0000000100002038 a.out`std::__1::function&lt;int (int, int)&gt;::operator()(this= Function = foo(int, int) , __arg=1, __arg=1) const at function.h:989:10
    frame #7: 0x0000000100001f64 a.out`main(argc=1, argv=0x000000016fdff4f8) at main.cpp:9:10
    frame #8: 0x0000000183cdf154 dyld`start + 2476
(lldb) 
```

after

```
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  * frame #0: 0x0000000100001f04 a.out`foo(x=1, y=1) at main.cpp:4:10
    frame #1: 0x0000000100003a00 a.out`decltype(std::declval&lt;int (*&amp;)(int, int)&gt;()(std::declval&lt;int&gt;(), std::declval&lt;int&gt;())) std::__1::__invoke[abi:se200000]&lt;int (*&amp;)(int, int), int, int&gt;(__f=0x000000016fdff280, __args=0x000000016fdff224, __args=0x000000016fdff220) at invoke.h:149:25
    frame #2: 0x000000010000399c a.out`int std::__1::__invoke_void_return_wrapper&lt;int, false&gt;::__call[abi:se200000]&lt;int (*&amp;)(int, int), int, int&gt;(__args=0x000000016fdff280, __args=0x000000016fdff224, __args=0x000000016fdff220) at invoke.h:216:12
    frame #6: 0x0000000100002038 a.out`std::__1::function&lt;int (int, int)&gt;::operator()(this= Function = foo(int, int) , __arg=1, __arg=1) const at function.h:989:10
    frame #7: 0x0000000100001f64 a.out`main(argc=1, argv=0x000000016fdff4f8) at main.cpp:9:10
    frame #8: 0x0000000183cdf154 dyld`start + 2476
Note: Some frames were hidden by frame recognizers
```</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix windows debug build after 9d07f43 (#104896)</title>
<updated>2024-08-20T17:47:06+00:00</updated>
<author>
<name>Med Ismail Bennani</name>
<email>ismail@bennani.ma</email>
</author>
<published>2024-08-20T17:47:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=356533246aa33db44c75afb2d3eb6e0e08f0d7a6'/>
<id>356533246aa33db44c75afb2d3eb6e0e08f0d7a6</id>
<content type='text'>
This patch tries to fix an issue with the windows debug builds where the
PDB file for python scripted interfaces cannot be opened since its path
length exceed the windows `MAX_PATH` limit:

https://github.com/llvm/llvm-project/pull/101672#issuecomment-2289481324

This patch addresses the issue by building all the interfaces as a
single library plugin that initiliazes each component as part of its
`Initialize` method, instead of building each interface as its own
library plugin.

This keeps the build artifact path length smaller while respecting the
naming convention and without making any exception in the build system.

Fixes #104895.

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch tries to fix an issue with the windows debug builds where the
PDB file for python scripted interfaces cannot be opened since its path
length exceed the windows `MAX_PATH` limit:

https://github.com/llvm/llvm-project/pull/101672#issuecomment-2289481324

This patch addresses the issue by building all the interfaces as a
single library plugin that initiliazes each component as part of its
`Initialize` method, instead of building each interface as its own
library plugin.

This keeps the build artifact path length smaller while respecting the
naming convention and without making any exception in the build system.

Fixes #104895.

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Reland "[lldb] Reland 2402b3213c2f with `/H` to debug the windows build issue (#101672)</title>
<updated>2024-08-02T15:55:26+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2024-08-02T15:55:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9d07f43676f03460d913aabd503ae8154cabdda1'/>
<id>9d07f43676f03460d913aabd503ae8154cabdda1</id>
<content type='text'>
This reverts commit 9effefbae8d96006a4dd29bb9ab8532fd408559d.

With the include order in ScriptedProcessPythonInterface.cpp fixed
(though I cannot explain exactly why it works) and removes the /H flag
intended for debugging this issue.

I think it is something to do with Process.h pulling in PosixApi.h
somewhere along the line, and including Process.h after lldb-python.h
means that NO_PID_T is defined to prevent a redefinition of pid_t.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 9effefbae8d96006a4dd29bb9ab8532fd408559d.

With the include order in ScriptedProcessPythonInterface.cpp fixed
(though I cannot explain exactly why it works) and removes the /H flag
intended for debugging this issue.

I think it is something to do with Process.h pulling in PosixApi.h
somewhere along the line, and including Process.h after lldb-python.h
means that NO_PID_T is defined to prevent a redefinition of pid_t.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[lldb] Reland 2402b3213c2f with `/H` to debug the windows build issue"</title>
<updated>2024-07-31T20:58:30+00:00</updated>
<author>
<name>Haowei Wu</name>
<email>haowei@google.com</email>
</author>
<published>2024-07-31T20:58:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9effefbae8d96006a4dd29bb9ab8532fd408559d'/>
<id>9effefbae8d96006a4dd29bb9ab8532fd408559d</id>
<content type='text'>
This reverts commit e72cdae47b4e263ea97b2bdd75cf44c1510cf3be, which broke
LLVM's lldb builder for Windows msvc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit e72cdae47b4e263ea97b2bdd75cf44c1510cf3be, which broke
LLVM's lldb builder for Windows msvc.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Reland 2402b3213c2f with `/H` to debug the windows build issue</title>
<updated>2024-07-31T02:54:11+00:00</updated>
<author>
<name>Med Ismail Bennani</name>
<email>ismail@bennani.ma</email>
</author>
<published>2024-07-31T02:54:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e72cdae47b4e263ea97b2bdd75cf44c1510cf3be'/>
<id>e72cdae47b4e263ea97b2bdd75cf44c1510cf3be</id>
<content type='text'>
This patch relands 2402b3213c2f to investigate the ambigious typedef
issue happening on the windows bots:

https://lab.llvm.org/buildbot/#/builders/141/builds/1175/

However this patch adds the `/H` compiler flag when building
the ScriptedProcessPythonInterface library to be able to investigate the
include order issue.

This patch will be revert after 1 failing run on the windows bot.

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch relands 2402b3213c2f to investigate the ambigious typedef
issue happening on the windows bots:

https://lab.llvm.org/buildbot/#/builders/141/builds/1175/

However this patch adds the `/H` compiler flag when building
the ScriptedProcessPythonInterface library to be able to investigate the
include order issue.

This patch will be revert after 1 failing run on the windows bot.

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[lldb] Reland 2402b3213c2f with `-H` to debug the windows build issue"</title>
<updated>2024-07-31T02:46:19+00:00</updated>
<author>
<name>Med Ismail Bennani</name>
<email>ismail@bennani.ma</email>
</author>
<published>2024-07-31T02:46:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f65fa5461dcbaf554babf10ca67ae8fea5b4da7e'/>
<id>f65fa5461dcbaf554babf10ca67ae8fea5b4da7e</id>
<content type='text'>
This reverts commit c35c4c72e4977258fc1da940e0470e8d0671bf07.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit c35c4c72e4977258fc1da940e0470e8d0671bf07.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Reland 2402b3213c2f with `-H` to debug the windows build issue</title>
<updated>2024-07-31T01:26:04+00:00</updated>
<author>
<name>Med Ismail Bennani</name>
<email>ismail@bennani.ma</email>
</author>
<published>2024-07-31T01:25:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c35c4c72e4977258fc1da940e0470e8d0671bf07'/>
<id>c35c4c72e4977258fc1da940e0470e8d0671bf07</id>
<content type='text'>
This patch relands 2402b3213c2f to investigate the ambigious typedef
issue happening on the windows bots:

https://lab.llvm.org/buildbot/#/builders/141/builds/1175/

However this patch adds the `-H` compiler flag when building
the ScriptedProcessPythonInterface library to be able to investigate the
include order issue.

This patch will be revert after 1 failing run on the windows bot.

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch relands 2402b3213c2f to investigate the ambigious typedef
issue happening on the windows bots:

https://lab.llvm.org/buildbot/#/builders/141/builds/1175/

However this patch adds the `-H` compiler flag when building
the ScriptedProcessPythonInterface library to be able to investigate the
include order issue.

This patch will be revert after 1 failing run on the windows bot.

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[lldb] Reland 2402b3213c2f with `-H -MM` to debug the windows build issue"</title>
<updated>2024-07-30T04:02:06+00:00</updated>
<author>
<name>Med Ismail Bennani</name>
<email>ismail@bennani.ma</email>
</author>
<published>2024-07-30T04:01:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8425aa24d802c73e24368a81a4a96afc158497aa'/>
<id>8425aa24d802c73e24368a81a4a96afc158497aa</id>
<content type='text'>
This reverts commit 6bd5fd35063cd14b0a56bc6f7fb1e7b6e1ac56d5.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 6bd5fd35063cd14b0a56bc6f7fb1e7b6e1ac56d5.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Reland 2402b3213c2f with `-H -MM` to debug the windows build issue</title>
<updated>2024-07-30T03:51:49+00:00</updated>
<author>
<name>Med Ismail Bennani</name>
<email>ismail@bennani.ma</email>
</author>
<published>2024-07-30T03:48:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6bd5fd35063cd14b0a56bc6f7fb1e7b6e1ac56d5'/>
<id>6bd5fd35063cd14b0a56bc6f7fb1e7b6e1ac56d5</id>
<content type='text'>
This patch relands 2402b3213c2f to investigate the ambigious typedef
issue happening on the windows bots:

https://lab.llvm.org/buildbot/#/builders/141/builds/1175/

However this patch adds the `-H` &amp; `-MM` compiler flags when building
the ScriptedProcessPythonInterface library to be able to investigate the
include order issue.

This patch will be revert after 1 failing run on the windows bot.

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch relands 2402b3213c2f to investigate the ambigious typedef
issue happening on the windows bots:

https://lab.llvm.org/buildbot/#/builders/141/builds/1175/

However this patch adds the `-H` &amp; `-MM` compiler flags when building
the ScriptedProcessPythonInterface library to be able to investigate the
include order issue.

This patch will be revert after 1 failing run on the windows bot.

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[lldb] Add ScriptedProcess to `scripting template list`"</title>
<updated>2024-07-28T01:04:44+00:00</updated>
<author>
<name>Med Ismail Bennani</name>
<email>ismail@bennani.ma</email>
</author>
<published>2024-07-28T01:04:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bbc457a4f40328452f0c8c8f9b0b5fcb8d286a7b'/>
<id>bbc457a4f40328452f0c8c8f9b0b5fcb8d286a7b</id>
<content type='text'>
This reverts commit 2402b3213c2f10d5033b31df3a0e59e4ad151fbd since it
breaks the windows bot:

https://lab.llvm.org/buildbot/#/builders/141/builds/1175/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 2402b3213c2f10d5033b31df3a0e59e4ad151fbd since it
breaks the windows bot:

https://lab.llvm.org/buildbot/#/builders/141/builds/1175/
</pre>
</div>
</content>
</entry>
</feed>
