How to use gdb to view stack information of hung programs during operation and maintenance

坏嘻嘻
Release: 2018-09-15 16:22:24
Original
3626 people have browsed it

The content of this article is about how to use gdb to view the stack information of the hung program during the operation and maintenance process. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you. .​

Use gdb to view the stack information of the hung program


  1. View the stuck process

ps -ef|grep CobotStudio
Copy after login

How to use gdb to view stack information of hung programs during operation and maintenance2. Use gdb to open the process

sudo gdb ./CobotStudio
Copy after login

How to use gdb to view stack information of hung programs during operation and maintenance3. Use attach to attach

attach 22108(这里22108为进程子PID)
Copy after login

How to use gdb to view stack information of hung programs during operation and maintenance4. Use bt to view stack information

bt(直接使用bt查看堆栈信息)
Copy after login

How to use gdb to view stack information of hung programs during operation and maintenance


Enter gdb and use common commands in gdb

  • ##c: Continue

  • p_: Print

  • list: List

  • attach: Attach

  • b code snippet: Set breakpoint

  • i b: View the set breakpoint

  • bt: View program crash stack information

  • -up: Previous method (Press Enter to view the next page)

  • down: Next method (Press Enter to view the next page




The above is the detailed content of How to use gdb to view stack information of hung programs during operation and maintenance. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template