Debugging a running Python process using GDB

Source: Internet
Author: User

This article shares with you the use of GDBdebugging in a runningPythonProcessRelated content, come together to look at it, hope to learn Python to help you. preparatory workinstallationGdband thepython2.7-dbg: $ sudo apt-getInstallGDB python2.7-dbgSet/proc/sys/kernel/yama/ptrace_scope: $ sudo su# echo 0 >/proc/sys/kernel/yama/ptrace_scopeRuntest.py: $pythonTest.py& [1] 6489throughGDB python PIDto debug a running process: $ gdb Python 6489 GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1 ... For Help,type"Help".Type"Apropos word" to Search forCommands related to"Word" ... Reading symbols fromPython... Reading symbols from/usr/lib/debug/.build-ID/90/d1300febaeb0a626baa2540d19df2416cd3361.debug...done. Done. ... Reading symbols from/lib/ld-linux.so.2 ... Reading symbols from/usr/lib/debug//lib/i386-linux-gnu/ld-2.23.so...done. Done.0xb778fc31inch__kernel_vsyscall () (GDB) Source: Huang Huang's Blog

Debugging a running Python process using GDB

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.