[Lldb-commits] [lldb] Add a pythin JIT loader class. (PR #142514)

2025-06-03 Thread via lldb-commits
jimingham wrote: This seems like a generic module loading observer. I don't see anything JIT specific about it. Not saying a generic module loading observer is not a good idea. But calling it a JITLoader seems pretty confusing to me. https://github.com/llvm/llvm-project/pull/142514

[Lldb-commits] [lldb] Add a pythin JIT loader class. (PR #142514)

2025-06-03 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben approved this pull request. Hey @clayborg, this is pretty cool. I'm glad you were able to use and extend the ScriptedPythonInterface to implement this, hopefully it wasn't too complicated. LGTM! https://github.com/llvm/llvm-project/pull/142514 __

[Lldb-commits] [lldb] Add a pythin JIT loader class. (PR #142514)

2025-06-03 Thread via lldb-commits
jimingham wrote: One thing that's nicer about this approach than independent callbacks for each of the hooks is that it allows you to group the three callbacks in the same class, so that you can more easily keep shared state. But that's a general problem with these affordances. For instance,

[Lldb-commits] [lldb] Add a pythin JIT loader class. (PR #142514)

2025-06-03 Thread via lldb-commits
jimingham wrote: But if you don't care so much about shared state, then I think a better way of doing what you want is just to add `target module-hook add`... https://github.com/llvm/llvm-project/pull/142514 ___ lldb-commits mailing list lldb-commits@

[Lldb-commits] [lldb] Add a pythin JIT loader class. (PR #142514)

2025-06-03 Thread via lldb-commits
jimingham wrote: I changed the stop-hooks recently so they optionally fire when lldb first gets control of the process, so you can already write python code that intervenes when your "did_attach" and "did_launch" callbacks fire. https://github.com/llvm/llvm-project/pull/142514

[Lldb-commits] [lldb] Add a pythin JIT loader class. (PR #142514)

2025-06-03 Thread via lldb-commits
jimingham wrote: This also seems like an awkward way to do what we've wanted for a while, which is the equivalent of stop hooks for "launch", "attach" and "module loaded", since you have to do all three, even if you only wanted to do one of the set. https://github.com/llvm/llvm-project/pull/14