How to debug console programs in carbidesymbian 3rd

Source: Internet
Author: User

How to debug console programs in carbidesymbian 3rd

 

The environment I set up is ActivePerl- 5.8.8 . 822 + jdk1.6.0 _ 04 + carbide. c ++ v1.2 + S60-SDK-200634-3.1 (FP1), so far the environment has not found any major problems, build the debugging console program found problems-program compilation can pass, but once run (run) there was no response to debugging, and then I went online to find a solution:

 

Method 1

Add the textshell statement to the first line of the EPOC file in X:/Symbian/9.1/s60_3rd_mr/epoc32/data. Run the simulator and the console interface is displayed.

On the console interface, enter CD private to enter the private folder, and then enter the name of the program to be run (for example, engine). Then, the statements output by the console class are displayed.

If you want to switch back to the GUI interface, adding # Before textshell will indicate that it has been commented out, and running simulator again will be the GUI interface :)

Note: The console interface displayed in this method is the same as that in the DOS environment, but I did not debug and run it successfully, because the compiled path is not "/epoc32/winscw" at all, and "/epoc32/release/winscw/udeb" is from the DOS perspective, in this case, only the external will *. the EXE file can be used only after it is copied. However, after it is copied, it is similar to the DOS statement that no file is found. So far, this method has been interrupted.

 

Method 2:

(1) Compile the console program. Path of the console program example: D:/Symbian/9.2/s60_3rd_fp1/examples/basics/helloworld. Enter the corresponding path in the CMD command prompt and enter bldmake bldfiles1 ~ 2 seconds later, the command is completed without any output.

Output the following command for compilation and link: abld build winscw udeb

The compiled EXE file is in D:/Symbian/9.2/s60_3rd_fp1/epoc32/release/winscw/udeb.

 

(2) enter D:/Symbian/9.2/s60_3rd_fp1/epoc32/release/winscw/udeb In the CMD command prompt, and output the following command to run the corresponding program:

Helloworld.exe

When the simulator appears, the console program helloworld is automatically run.

 

Note: This method can be executed, but if "textshell" is not set in the "EPOC. ini" file as in the first method, the Console appears in 1 ~ Two seconds later, the program exits and enters the GUI environment. Even if the "EPOC. ini" file is modified in the first method, only the execution function does not support debugging.

 

Method 3:

1. Add a registry RSS file for the console program. For example, myconsoleapp_reg.rss has the following content:

# Include <appinfo. RH>

Uid2 kuidappregistrationresourcefile

Uid3 0xa20001eb // modify this to uid3 that matches the MMP File

 

Resource app_registration_info

{

App_file = "myconsoleapp"; // modify the application name

Embeddability = kappnotembeddable;

}

 

2. Modify the MPs file and add the following content:

Start resource myconsoleapp_reg.rss // the file name is the registered resource file modified in the previous step.

# Ifdef winscw

Targetpath/private/ 10003a 3f /Apps // only this path can be used for debugging.

# Else

Targetpath/private/ 10003a 3f /Import/apps

# Endif

End // Resource

 

3. Compile and run.

 

Note: This method can be run and debugged without modifying the "EPOC. ini" file. It is relatively cumbersome to produce the above results.

 

In addition, because there are many programs edited by others, there may be no bld. the inf file is only *. in this case, you must compile a BLD file yourself when importing data in carbide C ++ v1.2. INF file. As for how to compile the bld. inf file, the following two documents can be used as basic knowledge points.

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.