[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [22.1.90]: Point before start of properties
From: |
Eli Zaretskii |
Subject: |
Re: [22.1.90]: Point before start of properties |
Date: |
Wed, 20 Feb 2008 21:40:13 +0200 |
> From: Stefan Monnier <address@hidden>
> Date: Wed, 20 Feb 2008 12:17:01 -0500
> Cc: address@hidden, Chong Yidong <address@hidden>
>
> Whenever I have to debug optimized code, I tend to rely a lot on good'ol
> fprintf (stderr, ...), so try to add a few such printfs just before
> calling `error', where you print things like `i', i->up.interval,
> i->up_obj, ...
So 20 years after GCC was a pioneer of the idea that it should be
possible to debug optimized code, we are back at printf debugging
because GCC developers no longer think it's important enough.
Progress, indeed...
To Simon: if compiling with -O1 does not give you reasonably
debuggable code, you may wish to look at the machine code at the
offending places. For example, you might find out that, while
"p (((i)->up_obj || (i)->up.interval == 0))" yields zero, the real
values of up_obj and/or up.interval are loaded in registers, and thus
the condition does fire. Although I find this rather surprising for
"-O1".
Btw, I'd also suggest to try "-ggdb -g3" instead of just -g, it should
cause GCC to produce more elaborate debug info, and could help you
discover real values of variables.
- RE: [22.1.90]: Point before start of properties, (continued)
- RE: [22.1.90]: Point before start of properties, Marshall, Simon, 2008/02/13
- Re: [22.1.90]: Point before start of properties, Stefan Monnier, 2008/02/18
- RE: [22.1.90]: Point before start of properties, Marshall, Simon, 2008/02/19
- Re: [22.1.90]: Point before start of properties, Stefan Monnier, 2008/02/19
- RE: [22.1.90]: Point before start of properties, Marshall, Simon, 2008/02/19
- Re: [22.1.90]: Point before start of properties, David Kastrup, 2008/02/19
- RE: [22.1.90]: Point before start of properties, Marshall, Simon, 2008/02/20
- Re: [22.1.90]: Point before start of properties, Stefan Monnier, 2008/02/19
- RE: [22.1.90]: Point before start of properties, Marshall, Simon, 2008/02/20
- Re: [22.1.90]: Point before start of properties, Stefan Monnier, 2008/02/20
- Re: [22.1.90]: Point before start of properties,
Eli Zaretskii <=
- Re: [22.1.90]: Point before start of properties, Richard Stallman, 2008/02/21
- Re: [22.1.90]: Point before start of properties, Stefan Monnier, 2008/02/21
- Re: [22.1.90]: Point before start of properties, Stephen J. Turnbull, 2008/02/21
- [OT] Deugging optimized code (was: [22.1.90]: Point before start of properties), Stefan Monnier, 2008/02/22
- Re: [OT] Deugging optimized code (was: [22.1.90]: Point before start of properties), Andreas Schwab, 2008/02/22
- [OT] Deugging optimized code (was: [22.1.90]: Point before start of properties), Stephen J. Turnbull, 2008/02/22
- Re: [22.1.90]: Point before start of properties, Eli Zaretskii, 2008/02/22
- Re: [22.1.90]: Point before start of properties, Eli Zaretskii, 2008/02/22
- Re: [22.1.90]: Point before start of properties, Miles Bader, 2008/02/22
- Re: [22.1.90]: Point before start of properties, Richard Stallman, 2008/02/23