Codeblocks debugging STL -- GDB with Python support-wanglikai91-blog garden codeblocks debugging STL -- GDB with Py

Source: Internet
Author: User
ArticleDirectory
    • I. codeblocks debugging STL problems:
    • Ii. How to use it in codeblocks:
    • Iv. Reference:
    • I. codeblocks debugging STL problems:
    • Ii. How to use it in codeblocks:
    • Iv. Reference:

Codeblocks debug STL -- GDB with Python support-wanglikai91-blog

Codeblocks debugging STL -- GDB with Python support I. codeblocks debugging STL problems:

Whether it's windows or Linux C/C ++ProgramPersonnel, C: B is a very good integrated development environment. If you use STL frequently, you will find that C: B has poor debugging support for STL, in fact, this is not a problem with codeblocks, but the STL support of GDB itself is too poor. We can see the situation:

 

However, for some complex programs, we sometimes have to use debugging to observe the program running status. However, STL is an indispensable tool for us to compile C ++ programs. What should we do? There is a very stupid debugging method, but the omnipotent debugging method is output debugging. If we are proficient in this debugging method, we will find Bugs very quickly, but for learning other people's programs, for most programmers, but it is necessary not to debug the program. Therefore, we will introduce how to use the Python script to support GDB, so as to perfectly support debugging STL.

Ii. How to use it in codeblocks:

1. We can go to the http://qp-gcc.googlecode.com/files/gdb-7.2.7z (mingw GDB build with Python support, also include wx and STL pretty printer 2010-09-05 update), which contains all the python files that need to be used, therefore, you do not need to download the python runtime environment. You can also download the latest gdbas and wx and STL pretty printer at http://code.google.com/p/qp-gcc/downloads/list.

2. decompress the downloaded file and copy it to "X: Program Files \ codeblocks \ mingw \ bin.

3. Let C: B load the Python script when debugging is started. If you are using C: B of version 10.05, you can enter debugger setting as follows:

 

Enter the following command in the debugger intialization commands text box:

Source $ (target_compiler_dir) bin \ STL. GDB
Source $ (target_compiler_dir) bin \ wx. GDB

If we install C: bin the Windows D: \ Program Files \ directory, we can write the following command:

Source D: \ Program Files \ codeblocks \ mingw \ bin \ STL. GDB
Source D: \ Program Files \ codeblocks \ mingw \ bin \ wx. GDB

After modification, we can see the following results after debugging:

4. Enjoy the STL debugging of C: B yishuang!

Iv. Reference:

For more information, see the following:

    1. About Python GDB scirpt support
    2. Http://code.google.com/p/qp-gcc/
I. codeblocks debugging STL problems:

Whether you are a Windows or Linux C/C ++ programmer, C: B is a very good integrated development environment. If you use STL frequently, you will find C :: b's debugging support for STL is poor. In fact, this is not a problem with codeblocks, but because GDB's own support for STL is too poor. We can see the situation:

 

However, for some complex programs, we sometimes have to use debugging to observe the program running status. However, STL is an indispensable tool for us to compile C ++ programs. What should we do? There is a very stupid debugging method, but the omnipotent debugging method is output debugging. If we are proficient in this debugging method, we will find Bugs very quickly, but for learning other people's programs, for most programmers, but it is necessary not to debug the program. Therefore, we will introduce how to use the Python script to support GDB, so as to perfectly support debugging STL.

Ii. How to use it in codeblocks:

1. We can go to the http://qp-gcc.googlecode.com/files/gdb-7.2.7z (mingw GDB build with Python support, also include wx and STL pretty printer 2010-09-05 update), which contains all the python files that need to be used, therefore, you do not need to download the python runtime environment. You can also download the latest gdbas and wx and STL pretty printer at http://code.google.com/p/qp-gcc/downloads/list.

2. decompress the downloaded file and copy it to "X: Program Files \ codeblocks \ mingw \ bin.

3. Let C: B load the Python script when debugging is started. If you are using C: B of version 10.05, you can enter debugger setting as follows:

 

Enter the following command in the debugger intialization commands text box:

Source $ (target_compiler_dir) bin \ STL. GDB
Source $ (target_compiler_dir) bin \ wx. GDB

If we install C: bin the Windows D: \ Program Files \ directory, we can write the following command:

Source D: \ Program Files \ codeblocks \ mingw \ bin \ STL. GDB
Source D: \ Program Files \ codeblocks \ mingw \ bin \ wx. GDB

After modification, we can see the following results after debugging:

4. Enjoy the STL debugging of C: B yishuang!

Iv. Reference:

For more information, see the following:

    1. About Python GDB scirpt support
    2. Http://code.google.com/p/qp-gcc/

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.