Up until I started using Arch linux a couple of weeks ago, gdb would evaluate multi-line if statements atomically. So for a condition like this:
39523 if ((RM != NULL) &&
39524 (RM->DefaultC != NULL) &&
39525 (MSched.RemapC != NULL) &&
39526 (RM->DefaultC->FType != mqftRouting) &&
39527 (RM->DefaultC != MSched.RemapC))
39528 {
...
...
39728 } /* END if ... */
39732 if (ClassFound != TRUE)
39733 {
The only thing I'd see in gdb (unless I explicitly did a list command) was the first line:
39523 if ((RM != NULL) &&
(gdb)
Now I'm seeing the following:
39523 if ((RM != NULL) &&
(gdb)
39524 (RM->DefaultC != NULL) &&
(gdb)
39523 if ((RM != NULL) &&
(gdb)
39525 (MSched.RemapC != NULL) &&
(gdb)
39523 if ((RM != NULL) &&
(gdb)
39526 (RM->DefaultC->FType != mqftRouting) &&
(gdb)
39523 if ((RM != NULL) &&
(gdb)
39527 (RM->DefaultC != MSched.RemapC))
(gdb)
39523 if ((RM != NULL) &&
(gdb)
39732 if (ClassFound != TRUE)
I can see this kind of behavior being desirable, but I'd prefer to be able to configure it. Does anyone know if this is possible? I'm using gdb 6.7.1, built from source. I was using this exact version, built from the same source, on my Ubuntu system before I switched to Arch.
Edit: I see the same behavior when using gdb --tui
gcc --version on my arch system:
gcc (GCC) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
gcc --version on my ubuntu system:
gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.