#Debugging

22 messages · Page 1 of 1 (latest)

vital valley
#

Anybody know how to debug the .so file using valgrind or gdb

tawny valeBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

quick tiger
#

It's no different than debugging anything else, you can set breakpoints and step around same as you normally would

vital valley
quick tiger
#

No

#

Not at all

#

You can simply debug a program utilizing a shared library

vital valley
#

In our project doesnot have the main() the working mechanism of my project is that the collection of object file can be converted into .so file and use package module to import the python program. So in the scenerio how can I debug it?

quick tiger
#

Thanks for providing additional context on what you're doing

#

I would say either 1) make a simple test program using your library or 2) you can run gdb on the python interpreter and set breakpoints in your .so

vital valley
quick tiger
#

for valgrind I would recommend putting together a simple program with a main() function utilizing your .so

#

you could try running valgrind on cpython but it'd probably be slow had have a lot of false positives

vital valley
#

After a time it automatically exits due to segmentation fault when I using valgrind

quick tiger
#

I would recommend gdb yes

vital valley
tawny valeBOT
#

@vital valley Has your question been resolved? If so, type !solved :)

vital valley
keen cliff
# vital valley I don't execute the idea . I can use this and afterwards surely I update my res...

It's just a bot that's triggered on itself.
When it reads a message like "Thank you buddy" and then there's a moment of silence (5 minutes in this case) where no other messages arrive, then the bot thinks that the Thank you buddy was meant for another person who helped you solve the question and that you simply forgot to close the question, which is why it reminded you that you could close it.

If it doesn't apply to you, just ignore whatever @tawny vale wrote