public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [commit/rx sim] Include config.h in source files which also include cpu.h
@ 2010-09-24  5:24 Kevin Buettner
  0 siblings, 0 replies; only message in thread
From: Kevin Buettner @ 2010-09-24  5:24 UTC (permalink / raw)
  To: gdb-patches

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>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-23 23:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-24  5:24 [commit/rx sim] Include config.h in source files which also include cpu.h Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).