Mail Archives: djgpp/1996/12/23/04:57:20
Salvador Eduardo Tropea (SET) wrote:
>
> Hi Dim:
> >
> > I discover the odd problem with DEBUGGING in RHIDE
> > (unfortunately i'm too stupid to use GDB :-( )
> I guess that you are lazy not stupid ;-).
Yes, thats right :-)
>If you use -Ox you'll loose some debug
> features. For example:
>
> if (a>10)
> { int b; for (b=1; b<10; b++) a++; }
>
> b will be optimized in the 90% of the cases and you'll not be able
> to watch the b contents because is in a CPU register.
>
> Or:
> switch (a)
> {
> case 1: a+=2; break;
> case 2: b+=2; a+=2; break;
> }
>
> If you step in the case 2 you'll see that the debugger will go to
> the case 1!, that very logic because the compiler will reuse the a+=2
> code, or you want 2 copies of the same code?
> That's normal, and logic.
Ok, loosing of some debugging information is not supprasing for me
(i have some knowlege about optimization and related things (i hope so))
> > Info page say:
> > "Unlike most other C compilers, GNU CC allows you to use `-g' with
> > `-O'.
Info page say just that it say. So, i offer add some words into info
page
about problems shown above :
: "Info page say:
: Unlike most other C compilers, GNU CC allows you to use `-g' with
: `-O' (with some restrictions). Restrictions are : ....
Thaks for all.
--
Regards,
Dim Zegebart,
Moscow Russia.
- Raw text -