Linux single process, single thread debugging command

  1. l//Display the source code of the file where the main function is located
  2. list 文件名:num//Display the source code above and below the num line of the filename file
  3. b 行号//Add a breakpoint to the specified line
  4. b 函数名//Add a breakpoint to the first valid line of the pointer function
  5. info break//Display breakpoint information
  6. delete 断点号//Delete the specified breakpoint
  7. disable 断点号//Set the breakpoint to invalid, without adding the breakpoint number, set all breakpoints to invalid
  8. enable 断点号//Set the breakpoint as valid, without adding the breakpoint number, set all breakpoints as valid
  9. r(run)//run the program
  10. n(next)//single step execution
  11. c (continue)//Continue to execute and execute directly to the next breakpoint
  12. s//Enter the function to be called to execute
  13. finish//Exit function
  14. q//Exit debugging
  15. p val// print the value of the variable val
  16. p &val//Print the address of the variable val
  17. p a+b// print the value of the expression
  18. p arr(数组名)// print the value of all elements of the array
  19. p *parr@len//Print the value of all elements of the array with a pointer to the array
  20. display//Automatic display, the parameters are the same as the p command
  21. info display//Display automatic display information
  22. undisplay + 编号//Delete the specified automatic display
  23. ptype val//display variable type
  24. bt//Display function call stack

Guess you like

Origin blog.csdn.net/NuYoaH502329/article/details/132250305