Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Linux Tools Project » AnalysisInfo.txt logic missing when opening GCDA file
AnalysisInfo.txt logic missing when opening GCDA file [message #1689368] Mon, 23 March 2015 12:16 Go to next message
Sanda Dedeic is currently offline Sanda DedeicFriend
Messages: 11
Registered: November 2012
Junior Member
Hello,

In linux tools v.1.2.1 there was a logic that was looking for AnalysisInfo.txt file when opening the GCDA file. Path to a binary file was resolved from there if such file exist. If not, first binary found within the project was used instead.

However, starting from v.2.0.0 this logic was removed, i.e. first binary found is used all the time.
We highly depend on AnalysisInfo mechanism because we have several binaries within the same project and it is not always the first one that we want to open.

Does anyone know why AnalisysInfo part was removed?
Is there some similar mechanism to achieve the same behavior?

GIT log for this change doesn't say to much: "o.e.l.gcov: Code review:refs/changes/60/10260/2"

Thank you in advance for any help.

[Updated on: Mon, 23 March 2015 14:34]

Report message to a moderator

Re: AnalysisInfo.txt logic missing when opening GCDA file [message #1689463 is a reply to message #1689368] Mon, 23 March 2015 16:24 Go to previous messageGo to next message
Jeff Johnston is currently offline Jeff JohnstonFriend
Messages: 206
Registered: July 2009
Senior Member
I cannot say why the functionality was removed, but I have forwarded your question on to the original author of the patch.
Re: AnalysisInfo.txt logic missing when opening GCDA file [message #1689466 is a reply to message #1689463] Mon, 23 March 2015 16:33 Go to previous messageGo to next message
Sanda Dedeic is currently offline Sanda DedeicFriend
Messages: 11
Registered: November 2012
Junior Member
Hi Jeff,

thanks a lot for your answer, we really appreciate it!

We are making a huge leap from version 1.1 to 3.2 and that's why we weren't noticed this until now.

Best Regards
Re: AnalysisInfo.txt logic missing when opening GCDA file [message #1689759 is a reply to message #1689466] Tue, 24 March 2015 09:06 Go to previous messageGo to next message
Xavier Raynaud is currently offline Xavier RaynaudFriend
Messages: 19
Registered: February 2012
Junior Member
Hi Sanda Dedeic,

I'm the author of this patch.
You're absolutely right, the logic around "AnalysisInfo.txt" has been removed (2 years ago!)
I removed it, because it was never documented (you have to read the source code to discover how it works), and therefore I think nobody uses it.
I was wrong, ans I'm a bit disappointed to discover the side effect of this patch.

As far as I know, there is no workaround for now.
Of course, the dialog box allows you to choose another binary file (not always the first). But I understand it can be annoying to change the default binary each time.

However, I suggest the following actions:
1/ Improve the algorithm that finds the default binary.
Instead of providing the first binary found, we can search for a binary with gcov information, corresponding to the file you have selected.
2/ Implements a "memory".
If, for a given file, you have selected another binary, it will be memorized, and selected by default for the subsequent attempts.

What's your opinion about these 2 actions ?
If it's OK for you, I will submit patches.

Xavier
Re: AnalysisInfo.txt logic missing when opening GCDA file [message #1689776 is a reply to message #1689759] Tue, 24 March 2015 09:43 Go to previous messageGo to next message
Xavier Raynaud is currently offline Xavier RaynaudFriend
Messages: 19
Registered: February 2012
Junior Member
A patch proposal is available here:
https://git.eclipse.org/r/#/c/44437/

Xavier
Re: AnalysisInfo.txt logic missing when opening GCDA file [message #1689790 is a reply to message #1689776] Tue, 24 March 2015 10:29 Go to previous messageGo to next message
Sanda Dedeic is currently offline Sanda DedeicFriend
Messages: 11
Registered: November 2012
Junior Member
Hi Xavier,

thanks a lot for your answer!
Also thanks for your patch proposal.
And don't be disappointed as your way of thinking was perfectly right. We should have probably discovered this much earlier since, as you said, this change was made really long time ago.

We've just tried to run the patch and encountered a problem.
When "STGcovProgramChecker.isGCovCompatible(o, project)" part is reached, Eclipse just freezes after it. We were able to track it down to STNM.java, init(...) method. After the "CdtSpawnerProcessFactory" process is created, it freezes when trying to reach the input stream. Arguments are Cygwin64\bin\nm.exe and a binary without gcov information.
We'll continue to investigate. Do you maybe have some hints of what might be wrong here?

Since we were not able to test it completely, we couldn't investigate how this patch will react on multiple configurations and thus on multiple binaries with gcov information for the same project.
That is why "AnalysisInfo" logic was very convenient in our case because it was sitting next to the GCDA which selected for opening.

Thank you for your assistance!
Re: AnalysisInfo.txt logic missing when opening GCDA file [message #1689803 is a reply to message #1689790] Tue, 24 March 2015 11:11 Go to previous messageGo to next message
Sanda Dedeic is currently offline Sanda DedeicFriend
Messages: 11
Registered: November 2012
Junior Member
Hi Xavier,

when run from the command line, nm.exe reports "File format not recognized". We are using a Target compiler which apparently doesn't write a binary file in right format. This actually means that we have hit a dead end here. (depending on our management resolution, we could try to write our own nm tool or perform some other workaround)

Thanks for your help anyway.
If there is a chance that the original "AnalysisInfo" logic can be resurrected somehow, please let us know.

Many thanks once again!
Re: AnalysisInfo.txt logic missing when opening GCDA file [message #1689837 is a reply to message #1689803] Tue, 24 March 2015 12:51 Go to previous messageGo to next message
Xavier Raynaud is currently offline Xavier RaynaudFriend
Messages: 19
Registered: February 2012
Junior Member
Hi,

You're right, this part does not work on windows.
I will submit another patch
Re: AnalysisInfo.txt logic missing when opening GCDA file [message #1689853 is a reply to message #1689837] Tue, 24 March 2015 13:46 Go to previous messageGo to next message
Xavier Raynaud is currently offline Xavier RaynaudFriend
Messages: 19
Registered: February 2012
Junior Member
I've submitted a second and a third patch.
https://git.eclipse.org/r/#/c/44437/

It no longer use the "nm" functionality, since it will work only on linux.
Moreover, since it not used anywhere, I deleted the class providing this service.

It also restore the "AnalysisInfo.txt" functionality.
However, I simplify a bit the content of this file.
"Project Name" is not used.
"Program Name" can now be absolute or relative to the project.

Finally, for people not using the "AnalysisInfo.txt" file, the GUI will remember choices made by user in the dialog box.
Re: AnalysisInfo.txt logic missing when opening GCDA file [message #1689871 is a reply to message #1689853] Tue, 24 March 2015 14:32 Go to previous message
Sanda Dedeic is currently offline Sanda DedeicFriend
Messages: 11
Registered: November 2012
Junior Member
Hi Xavier,

this are great news for us!
We've already tested it and it works like a charm.

This couldn't be more faster. Many thanks to you and your team.

If you already have a roadmap set for the next official release where this patch could take place please let us know. Anyhow, we are more than satisfied with this patch as well.

Thanks once again!
Previous Topic:wrong gcov result
Next Topic:Linux Tools 4.0.0 is released
Goto Forum:
  


Current Time: Wed Sep 26 12:16:51 GMT 2018

Powered by FUDForum. Page generated in 0.02945 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top