Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Question about linux GCC compiler
Question about linux GCC compiler [message #832243] Thu, 29 March 2012 23:57 Go to next message
subhi quroush is currently offline subhi quroushFriend
Messages: 16
Registered: March 2012
Junior Member
When I debug my code the debugger goes up and down (two ways) (sometimes to the begining of the method) ; in java this behavior don't appear

I have another question
when I choose display as array the array appear good but I want this behaviour to be repeated every time I debug not only for the current one .

[Updated on: Thu, 29 March 2012 23:59]

Report message to a moderator

Re: Question about linux GCC compiler [message #832308 is a reply to message #832243] Fri, 30 March 2012 02:19 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
On 03/29/2012 06:57 PM, subhi quroush wrote:
> When I debug my code the debugger goes up and down and (two ways)
> (sometimes to the begining of the method in java this behavior don't appear
> I have another question when I choose display as array the array appear
> good but I want this behaviour repeated every time I debug not only for
> the current one .
Do you have compiler optimizations turned on for your project? When the
compiler optimizes code, it can change the ordering of instructions,
inline functions, and change things in ways that cause confusion for the
debugger.
Re: Question about linux GCC compiler [message #834971 is a reply to message #832308] Mon, 02 April 2012 16:21 Go to previous messageGo to next message
subhi quroush is currently offline subhi quroushFriend
Messages: 16
Registered: March 2012
Junior Member
I don't know if optimizations turned on or not , how can I know that
Re: Question about linux GCC compiler [message #835553 is a reply to message #834971] Tue, 03 April 2012 11:40 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
subhi quroush wrote on Mon, 02 April 2012 18:21
I don't know if optimizations turned on or not , how can I know that

Project Properties->Tool Settings


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Question about linux GCC compiler [message #837515 is a reply to message #835553] Thu, 05 April 2012 19:26 Go to previous messageGo to next message
subhi quroush is currently offline subhi quroushFriend
Messages: 16
Registered: March 2012
Junior Member
this is my setting

h_ttp://img6.imagebanana.com/img/zsaz0e88/PropertiesforSphinxTrain_019.png
Re: Question about linux GCC compiler [message #837518 is a reply to message #837515] Thu, 05 April 2012 19:28 Go to previous messageGo to next message
subhi quroush is currently offline subhi quroushFriend
Messages: 16
Registered: March 2012
Junior Member
when I debug this code

uint32 **smap;


 for (i = 0, k = 0; i < n_total; i++)
        for (j = 0; j < n_state_pm-1; j++)
            smap[i][j] = k++;


every time compiler goes to the begging of method

int32 make_mdef_from_list(char *mdeffile,
			char **CIlist, 
			int32  nciphones,
			heapelement_t **CDheap,
			int32  cdheapsize,
			char  *pgm)
{
Re: Question about linux GCC compiler [message #840574 is a reply to message #837515] Tue, 10 April 2012 09:00 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
subhi quroush wrote on Thu, 05 April 2012 21:26
this is my setting

h_ttp://img6.imagebanana.com/img/zsaz0e88/PropertiesforSphinxTrain_019.png

Then you are using your own Makefile. You must tweak your Makefile to turn off optimization.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Question about linux GCC compiler [message #855340 is a reply to message #832243] Tue, 24 April 2012 18:31 Go to previous messageGo to next message
subhi quroush is currently offline subhi quroushFriend
Messages: 16
Registered: March 2012
Junior Member
I do that and most of optimisation is disabled now , but there is some codes still optimised , my project is SphinxTrain and it is depend on sphinxbase , I think this cause the problem , I disabled optimisation in sphinxbase , but also there is some code that still show me , not optimized message

is it possible to see not optimised message even if I stop optimisation ?
Re: Question about linux GCC compiler [message #855844 is a reply to message #855340] Wed, 25 April 2012 06:35 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
subhi quroush wrote on Tue, 24 April 2012 20:31
I do that and most of optimisation is disabled now , but there is some codes still optimised , my project is SphinxTrain and it is depend on sphinxbase , I think this cause the problem , I disabled optimisation in sphinxbase , but also there is some code that still show me , not optimized message

is it possible to see not optimised message even if I stop optimisation ?

Did you do a clean rebuild after disabling optimization?


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:Git versus Eclipse CDT
Next Topic:Importing C project issue
Goto Forum:
  


Current Time: Wed Apr 24 16:47:56 GMT 2024

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

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

Back to the top