From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22493 invoked by alias); 23 Sep 2010 23:20:49 -0000 Received: (qmail 22485 invoked by uid 22791); 23 Sep 2010 23:20:48 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Sep 2010 23:20:44 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8NNKg4x018936 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 23 Sep 2010 19:20:42 -0400 Received: from mesquite.lan (ovpn-113-43.phx2.redhat.com [10.3.113.43]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8NNKfY6006103 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Thu, 23 Sep 2010 19:20:42 -0400 Date: Fri, 24 Sep 2010 05:24:00 -0000 From: Kevin Buettner To: gdb-patches@sourceware.org Subject: [commit/rx sim] Include config.h in source files which also include cpu.h Message-ID: <20100923162041.6903870d@mesquite.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00425.txt.bz2 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 . */ +#include "config.h" #include #include 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 . */ +#include "config.h" #include #include #include 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 . */ +#include "config.h" #include #include #include 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 . */ +#include "config.h" #include #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 . */ +#include "config.h" #include #include #include