Re: [lldb-dev] Debugging Python scripts (backtraces, variables) with LLDB

2018-11-26 Thread Jim Ingham via lldb-dev
lldb does have an affordance for synthetic threads, but at present, those have to be memory threads, and once you have the 0th frame, they are backtraced just like ordinary threads. So they are a start but don't provide a way to make up synthetic frames within a thread. So I don't think that t

Re: [lldb-dev] Debugging Python scripts (backtraces, variables) with LLDB

2018-11-20 Thread Alexandru Croitor via lldb-dev
Thanks for the link. I'm aware that VS provides that functionality (although I forgot that it was open-source). My aim would be to implement something similar in LLDB though. On 20. Nov 2018, at 18:49, Zachary Turner mailto:ztur...@google.com>> wrote: On Tue, Nov 20, 2018 at 8:51 AM Alexand

Re: [lldb-dev] Debugging Python scripts (backtraces, variables) with LLDB

2018-11-20 Thread Alexandru Croitor via lldb-dev
Thanks. That's useful info that covers the "squishing" of C frames into Python frames. The link to the slides at the end also mentions two other useful projects for walking the stack, py-spy and pyflame. Having said that, I'm more interested on the "lldb" side of things. On 20. Nov 2018, at 18

Re: [lldb-dev] Debugging Python scripts (backtraces, variables) with LLDB

2018-11-20 Thread Zachary Turner via lldb-dev
On Tue, Nov 20, 2018 at 8:51 AM Alexandru Croitor via lldb-dev < lldb-dev@lists.llvm.org> wrote: > > I would appreciate, if someone could point me to some relevant code that > does something similar to what I'm asking, so I could use it as a base > point for exploration. > > Many thanks. Not sur

Re: [lldb-dev] Debugging Python scripts (backtraces, variables) with LLDB

2018-11-20 Thread Leonard Mosescu via lldb-dev
Not strictly related to LLDB but you might find this interesting: https://blogs.dropbox.com/tech/2018/11/crash-reporting-in-desktop-python-applications On Tue, Nov 20, 2018 at 8:51 AM Alexandru Croitor via lldb-dev < lldb-dev@lists.llvm.org> wrote: > Hello, > > It's been a while since I asked th

Re: [lldb-dev] Debugging Python scripts (backtraces, variables) with LLDB

2018-11-20 Thread Alexandru Croitor via lldb-dev
Hello, It's been a while since I asked this question on the mailing list ( 2~ years ago). I am interested in what would be the current best way for implementing interleaved / mixed-mode Python backtraces when debugging the CPython interpreter. So if I run lldb -- python /path/to/my/script, se

Re: [lldb-dev] Debugging Python scripts (backtraces, variables) with LLDB

2016-07-08 Thread Alexandru Croitor via lldb-dev
Thanks for replying, it's good to know what the status is at least, as well as how it's done in GDB. > On 06 Jul 2016, at 20:56, Jim Ingham wrote: > > Nothing of this sort has been done to my knowledge, and I haven't heard of > any plans to do so either. > > It should certainly be possible, y

Re: [lldb-dev] Debugging Python scripts (backtraces, variables) with LLDB

2016-07-06 Thread Jim Ingham via lldb-dev
Nothing of this sort has been done to my knowledge, and I haven't heard of any plans to do so either. It should certainly be possible, you just need to grub the C stack and recognize the pattern of a Python stack frame in it and where said frame stashes away the arguments & locals, and then re-