473,472 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Need help : -O2 flag and GDB

Hi,
For product version, I have to compile c++ code using -O2 flag for
optimization. But the problem is when I have to debug the core file,
GDB doesn't display any data.

I use g++ 3.0.40 and gdb 5.2 on Radhat linux. I was able to debug the
core with g++ 2.95 compiler event though -O2 flag was on.

What compiler and GDB version do you suggest?

Jul 23 '05 #1
2 2316
ri*****@yahoo.com wrote:
For product version, I have to compile c++ code using -O2 flag for
optimization. But the problem is when I have to debug the core file,
GDB doesn't display any data.

I use g++ 3.0.40 and gdb 5.2 on Radhat linux. I was able to debug the
core with g++ 2.95 compiler event though -O2 flag was on.

What compiler and GDB version do you suggest?


I suggest asking in gnu.g++.help or in comp.os.linux.development.apps.
But you're free to ignore my suggestion.
Jul 23 '05 #2
MSR

"Victor Bazarov" <v.********@comAcast.net> wrote in message
news:Or*******************@newsread1.mlpsca01.us.t o.verio.net...
ri*****@yahoo.com wrote:
For product version, I have to compile c++ code using -O2 flag for
optimization. But the problem is when I have to debug the core file,
GDB doesn't display any data.

I use g++ 3.0.40 and gdb 5.2 on Radhat linux. I was able to debug the
core with g++ 2.95 compiler event though -O2 flag was on.

What compiler and GDB version do you suggest?


I suggest asking in gnu.g++.help or in comp.os.linux.development.apps.
But you're free to ignore my suggestion.


Not a C++ question. Anyway you can use '-g' flag along with -O2. Not sure if
your version of gcc can take both flags but newer version certainly do.
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Piet | last post by:
Hello wxPythoneers. I have a problem with a dialog box derived from wxFrame which has a wxComboBox as main element. Depending on the entry selected from the ComboBox, the dialog box will be...
1
by: akickdoe22 | last post by:
Please help me finish this program. i have completed the addition and the subtraction parts, but i am stuck on the multiplication and division. any suggestions, hints, code, anyhting. it's not a...
5
by: clusardi2k | last post by:
Hello, I have a assignment just thrown onto my desk. What is the easiest way to solve it? Below is a brief description of the task. There are multible programs which use the same library...
4
by: coolsti | last post by:
I am aware of the setInterval and setTimeout functions for Javascript, but I can't seem to find an example that lets me do what I need to. I have a script that needs to wait until a certain...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
4
by: Peter Lin | last post by:
Dear all; I need to monitor a xml file so that I can update my data in hashtable, but the problem is it will trigger more than one event for a lastwrite action(I trigger this action by add...
3
by: xavo2007 | last post by:
Hi there. I am required to produce the greek flag however it requires me to use ratios. Below is the excercise question which I was given. I've got the starting code:
8
by: Chris LaVelle | last post by:
I don't know the easiest way to explain this so, I'm going to give an example of how it is today....and what I'm trying to accomplish. in the header... typedef struct XXX_ELEMENT_tag { UINT8 ...
1
by: jewel87 | last post by:
Hello everyone, I have problems with my code in C doing pipes. It is currently running into an indefinite loop, but I was trying all possible modifications I could think of, nothing have led me to...
3
by: ibeehbk | last post by:
Hi. I have a form made in xhtml. I test via vbscript to make sure none of the fields are empty and properly formatted (ie email). All the regular fields work. However, I have two drop down menus...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.