Re: [gnome-love] Weird behaviour debugging with GDB
- From: Jaap Haitsma <jaap haitsma org>
- To: Elijah Newren <newren gmail com>
- Cc: Gnome-Love <gnome-love gnome org>
- Subject: Re: [gnome-love] Weird behaviour debugging with GDB
- Date: Sun, 10 Apr 2005 23:30:07 +0200
Elijah Newren wrote:
Thanks, already thought of that. ;-) I just compiled with -g, or does
that not disable all optimisation.
On Apr 10, 2005 3:20 PM, Jaap Haitsma <jaap haitsma org> wrote:
I see sometimes see some weird behavior when I debug GNOME programs.
If I step trough some piece of sequential code without any loops or
jumps with the next command. The next instruction some times goes one back.
So if I had one instruction on each line I would expect gdb to go trough
the lines like this: 1, 2, 3, 4, 5, 6. What I see happening though is
something like this: 1, 2, 1, 2, 3, 4, 5, 6
Anybody knows why this is happening?
Sounds like you're trying to debug code that has been optimized (e.g.
compiled with '-O2'). It's much easier to debug code compiled without
such optimization flags.
] [Thread Prev