[Lldb-commits] [lldb] Add the ability to define a Python based command that uses CommandObjectParsed (PR #70734)

via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 2 15:04:27 PDT 2023


jimingham wrote:

I actually run against a hand-build Python with debug symbols, so it was in fact a backtrace that contains only python internal functions, and even though they had symbols I still couldn't tell what was going on...  There must be a bunch of handy tricks for debugging the Python interpreter, but I don't know them.

Jim


> On Nov 1, 2023, at 11:06 PM, Med Ismail Bennani ***@***.***> wrote:
> 
> 
> @medismailben commented on this pull request.
> 
> In lldb/bindings/python/python-wrapper.swig <https://github.com/llvm/llvm-project/pull/70734#discussion_r1379633468>:
> 
> > +  // FIXME:
> +  // I wanted to do something like:
> +  // size_t num_elem = args.size();
> +  // PythonList my_list(num_elem);
> +  // for (const char *elem : args)
> +  //   my_list.append(PythonString(elem);
> +  //
> +  // and then pass my_list to the pfunc, but that crashes somewhere
> +  // deep in Python for reasons that aren't clear to me.
> My guess is that the backtrace only contains for python internal non symbolicated frames that are basically useless for debugging. I've experienced that myself multiple times.
> 
>> Reply to this email directly, view it on GitHub <https://github.com/llvm/llvm-project/pull/70734#discussion_r1379633468>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADUPVW4NABS6EBDGMGSXDE3YCMZ6HAVCNFSM6AAAAAA6WXATNCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTOMBZGUYTCNRTGE>.
> You are receiving this because you were mentioned.
> 



https://github.com/llvm/llvm-project/pull/70734


More information about the lldb-commits mailing list