This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Debug problem
- From: John Love-Jensen <eljay at adobe dot com>
- To: Arora Yogesh-a22623 <yogesh dot arora at motorola dot com>
- Cc: MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Wed, 11 Jul 2007 06:39:28 -0500
- Subject: 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