This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Debug problem


Hi Yogesh,

Two things to try:

1) try using -O0 on all the files.

Optimization can cause the debugger to do "funny" things.  You may be
running into those "funny" things.  When debugging optimized code, you
should expect "funny" things, since the optimizer can rearrange the
resulting code such that it is not necessarily a 1:1 mapping to the source
code (but should be functionally the same, for compliant & correct source
code).

Disabling optimization should stop those "funny" things.

2) Upgrade your compiler and debugger to the current released versions.

GCC - 4.2.0

gdb - 6.6

HTH,
--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]