Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Code Coverage: (20 Items)
   
Code Coverage  
Hello Friends!!!!


I have question.

My features - Qnx Momentica 6.4.1 Winfows Host. Target - x86.

I create C++ Project on the Qnx Momentics and compile my sources with "code coverage" flags.

When I start to debug my project i have a problem. 

*.gcda  files don't genetate and Momentics have report a error - "*.gcda file nof found"
Re: Code Coverage  
When you created C++ project did  you create "QNX C++" project, or a 
plain "C++ Project"?

If it's "QNX C++" project, it should work as long as you enable the 
"Build with Code Coverage" in the options tab.

If it's "C++ Project", you have to open the project property, in the 
"C/C++ Build -> Settings" tab, set the "Active Configuration" to be 
"Coverage". Rebuild your project. Also make sure your launch 
configuration "Main -> Build Configuration" tab is set to use the 
"Coverage" configuration and pick up the correct binary from the 
"Coverage" output folder.

- Andy

Oleg Gopov wrote:
> Hello Friends!!!!
>
>
> I have question.
>
> My features - Qnx Momentica 6.4.1 Winfows Host. Target - x86.
>
> I create C++ Project on the Qnx Momentics and compile my sources with "code coverage" flags.
>
> When I start to debug my project i have a problem. 
>
> *.gcda  files don't genetate and Momentics have report a error - "*.gcda file nof found"
>
>
>
> _______________________________________________
>
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post34435
>
>   
Re: Code Coverage  
Hello Andy. Thank you for reply.

I create Qnx C++ Project and choose "Build with code coverage", but problem still not resolved. I attach the screenshot 
of the problem.
Attachment: Image Problem.JPG 144.7 KB
Re: Code Coverage  
My Qnx Momentics's  version

Version: 4.5.0
Build id: I20081019
Re: Code Coverage  
Code Covarage Example don't work too. 
Re: Code Coverage  
Please, Guys. Help me. I don't able to continue my work. Thanks in advance.
Re: Code Coverage  
Which version of Momentics are you running on your Windows host and your x86 target? 

You mentioned 6.4.1 in your first post but you also said you were using IDE 4.5 which was included in Momentics 6.4.0.

Also can you attach your workspace log file? You can find it under your workspace ".metadata" directory, it's called ".
log".

Re: Code Coverage  
What compiler are you using? You have 6.4.0 installed? And target is 6.4.0?
You can try new IDE 4.6 (you can install it separately, links and 
installation instructions are here:
http://community.qnx.com/sf/wiki/do/viewPage/projects.ide/wiki/Builds_Tau_Integration)

Oleg Gopov wrote:
> Please, Guys. Help me. I don't able to continue my work. Thanks in advance.
>
>
>
> _______________________________________________
>
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post34495
>
>   
Re: Code Coverage  
Thank you Guys. I will try yours recomendations in Monday and then will write results.
Re: Code Coverage  
> What compiler are you using? You have 6.4.0 installed? And target is 6.4.0?
> You can try new IDE 4.6 (you can install it separately, links and 
> installation instructions are here:
> http://community.qnx.com/sf/wiki/do/viewPage/projects.ide/wiki/
> Builds_Tau_Integration)

I have use qcc. I try new IDE - 4.6.1, but problem don't resolved.


Attachment: Image 1.JPG 147.45 KB
Re: Code Coverage  
My qnx version  - 6.4.0. How i can inquire my compiler's version???  I attach log gile. 
Attachment: Text .log 24.1 KB
Re: Code Coverage  
I input qcc -V. 

My qcc version - 4.2.4
Re: Code Coverage  
> My qnx version  - 6.4.0. 

I wrote above.



Re: Code Coverage  
> My qnx version  - 6.4.0. 

I wrote above.



Re: Code Coverage  
Your log file does not have any information about your code coverage 
session, is it the full log file?

In your debug session console view, I see several "mi_cmd_var_create" 
errors and your program received SIGKILL. This is worrysome. Can you try 
to create a simple QNX C project without Code Coverage and try to launch 
it in your target? If it works, try to re-compile it with Code Coverage on.

BTW what version of Momentics is running on  your target?


Oleg Gopov wrote:
>> What compiler are you using? You have 6.4.0 installed? And target is 6.4.0?
>> You can try new IDE 4.6 (you can install it separately, links and 
>> installation instructions are here:
>> http://community.qnx.com/sf/wiki/do/viewPage/projects.ide/wiki/
>> Builds_Tau_Integration)
>>     
>
> I have use qcc. I try new IDE - 4.6.1, but problem don't resolved.
>
>
>   
Re: Code Coverage  
> BTW what version of Momentics is running on  your target?

How can i find out a version of Momentics on my target??? Momentics may running on the host only. Or I mistaken anywhere
???
Re: Code Coverage  
Since  you are running the IDE on Windows, you can find out what is 
running on your target from the IDE System Information tool. Open the 
System Information perspective, create a new QNX Target to point to your 
target name/IP address, in the "System Summary" tab, look at the "OS 
Version".

Oleg Gopov wrote:
>> BTW what version of Momentics is running on  your target?
>>     
>
> How can i find out a version of Momentics on my target??? Momentics may running on the host only. Or I mistaken 
anywhere???
>
>
>
>
>   

Re: Code Coverage  
I wrote above. My qnx version -6.4.0
Re: Code Coverage  
Hello Andy. Thank you for the attention to my problem.

I almost resolve my problem. My programm is resource manager, then i have infinite cycle, then dispatch messages (write,
 read, ioctl and etc).

Something like this

while (1) {
    if ((ctp = resmgr_block (ctp)) == NULL) { 
        perror ("Unable to resmgr_block\n");
        exit (EXIT_FAILURE);
    }
    resmgr_handler (ctp);
}



Then in order that exit my program i force to push Terminate button (red rectangle in Debug Perspective). Because of 
this code coverage utility don't work properly . 


I have comment this infinite cycle and all work fine.

I have a question. Can i send signal from the Momentics IDE to the my programm???


I want to do something like this

void signal_handler()
{

exit_flag=false;

}

void main()
{
exit_flag=true;



while (exit_flag) {
    if ((ctp = resmgr_block (ctp)) == NULL) { 
        perror ("Unable to resmgr_block\n");
        exit (EXIT_FAILURE);
    }
    resmgr_handler (ctp);
}


}

Re: Code Coverage  
It's cool. I winner. I have resolve a problem.)))))))

I have create signal handler, which intercept SIGKILL signal. Then on the target machine I input a command : slay MY 
PROGRAM

In the signal handler a change value of the exit flag, see previous post.


Very very big thanks, Andy