This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit/rx sim] Include config.h in source files which also include cpu.h


I've committed the patch below.

While debugging another problem, I noticed that I was unable to look
at regs.cycle_count since GDB reported that the field in question did
not exist.  The field `cycle_count' is a member of the struct `regs_type'
defined in cpu.h.  The presence of this field, however, depends upon
whether the macro CYCLE_ACCURATE is defined.  If that macro is defined,
then cycle_count (plus a few other fields) are included in the regs_type
struct, otherwise they are not.

The problem turned out to be that config.h was not being included
in all files which also include cpu.h.  As a consequence some files
were being compiled with a regs_type that included `cycle_count' while
others were not.  The patch below rectifies that problem.

Kevin

sim/rx/ChangeLog:

	* fpu.c, gdb-if.c, load.c, misc.c, syscalls.c (config.h): Include.

Index: fpu.c
===================================================================
RCS file: /cvs/src/src/sim/rx/fpu.c,v
retrieving revision 1.2
diff -u -p -r1.2 fpu.c
--- fpu.c	1 Jan 2010 10:03:33 -0000	1.2
+++ fpu.c	23 Sep 2010 22:59:51 -0000
@@ -18,6 +18,7 @@ GNU General Public License for more deta
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 
Index: gdb-if.c
===================================================================
RCS file: /cvs/src/src/sim/rx/gdb-if.c,v
retrieving revision 1.8
diff -u -p -r1.8 gdb-if.c
--- gdb-if.c	29 Jul 2010 18:41:28 -0000	1.8
+++ gdb-if.c	23 Sep 2010 22:59:51 -0000
@@ -18,6 +18,7 @@ GNU General Public License for more deta
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include "config.h"
 #include <stdio.h>
 #include <assert.h>
 #include <signal.h>
Index: load.c
===================================================================
RCS file: /cvs/src/src/sim/rx/load.c,v
retrieving revision 1.2
diff -u -p -r1.2 load.c
--- load.c	1 Jan 2010 10:03:33 -0000	1.2
+++ load.c	23 Sep 2010 22:59:51 -0000
@@ -19,6 +19,7 @@ You should have received a copy of the G
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
Index: misc.c
===================================================================
RCS file: /cvs/src/src/sim/rx/misc.c,v
retrieving revision 1.2
diff -u -p -r1.2 misc.c
--- misc.c	1 Jan 2010 10:03:33 -0000	1.2
+++ misc.c	23 Sep 2010 22:59:51 -0000
@@ -19,6 +19,7 @@ You should have received a copy of the G
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
+#include "config.h"
 #include <stdio.h>
 
 #include "cpu.h"
Index: syscalls.c
===================================================================
RCS file: /cvs/src/src/sim/rx/syscalls.c,v
retrieving revision 1.2
diff -u -p -r1.2 syscalls.c
--- syscalls.c	1 Jan 2010 10:03:33 -0000	1.2
+++ syscalls.c	23 Sep 2010 22:59:51 -0000
@@ -19,6 +19,7 @@ You should have received a copy of the G
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]