The GDB command in xcode.

Source: Internet
Author: User

The xcode debugger provides you with a GDB interface, which is an open-source debugger of GNU. You can do anything in the visual interface of xcode. However, if you need it, you can use the gdb command in the command line.

Enter the gdb command line in a debugging task:

Click console drawer in the toolbar to open the console.
You can view the commands that the xcode debugger sends to GDB in the console, or you can directly enter the gdb command in the console. In the console window, click and enter the command at the gdb prompt.

  1. Command explanation
  2. Break num sets a breakpoint on the specified row.
  3. BT indicates all call stack frames. This command can be used to display the call sequence of a function.
  4. Clear deletes breakpoints set on specific source files and specific rows. The usage is clear filename: num.
  5. Continue continues to execute the program being debugged. This command is used by the program to process signals or breakpoints.
  6. This causes the instance to stop running.
  7. Display expr: The expression value is displayed after each program is stopped. An expression is composed of variable defined by the program.
  8. File file to load the specified executable file for debugging.
  9. The help name command displays the help information of the specified command.
  10. Info break displays the current breakpoint list, including the number of times the breakpoint is reached.
  11. Info files displays the details of the debugged file.
  12. Info func shows all function names.
  13. Info local shows the local variable information in the function.
  14. Info prog displays the execution state of the program to be debugged.
  15. Info var displays all global and static variable names.
  16. Kill stops the program being debugged.
  17. List shows source code segments.
  18. Make runs the make tool without exiting GDB.
  19. Next executes a source code line forward without entering other functions.
  20. Print expr indicates the value of the expression expr.
  21. Print-object: print an object
  22. Print (INT) Name print a type
  23. Print-object [artist description] calls a function.
  24. Set artist = @ "test" to set the variable value
  25. Whatis: Check the Data Type of the change.

Original address http://www.aisidachina.com/forum/thread-316-1-1.html

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.