zuhu2195
(Mohammed Zuhaib)
May 4, 2023, 7:52am
1
Hi,
I wanted to debug CPython source using gdb, however when I step into the function and do a back trace I get some functions as follows,
in _PyEval_EvalFrameDefault ()
in _PyEval_EvalFrame ()
in _PyEval_Vector ()
in _PyFunction_Vectorcall ()
and these functions contain PyObjects, how to know what those objects contain exactly, is there any way to see this?
zuhu2195
(Mohammed Zuhaib)
May 4, 2023, 8:19am
2
I want to print the contents of PyObject, ex if a PyObject is for some integer, I want to print that integer value or see that integer value. any help would be appreciated.
Rosuav
(Chris Angelico)
May 4, 2023, 8:39am
3
Looks like you probably want the repr of the object? PyObject_Repr should give you that.
1 Like
zuhu2195
(Mohammed Zuhaib)
May 4, 2023, 11:25am
4
yep this is the one, thank you Chris.
1 Like