From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16994 invoked by alias); 25 Sep 2012 09:12:58 -0000 Received: (qmail 16978 invoked by uid 22791); 25 Sep 2012 09:12:57 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,FSL_RCVD_USER,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.155) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 Sep 2012 09:12:40 +0000 Received: from md16.u-strasbg.fr (md16.u-strasbg.fr [130.79.200.206]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id q8P9CXOG031584 ; Tue, 25 Sep 2012 11:12:33 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms11.u-strasbg.fr [130.79.204.111]) by md16.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id q8P9CWJc018928 ; Tue, 25 Sep 2012 11:12:33 +0200 (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id q8P9CVns018923 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Tue, 25 Sep 2012 11:12:32 +0200 (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: Cc: "'Tom Tromey'" Subject: [RFA] Add missing gdb_bfd.h includes Date: Tue, 25 Sep 2012 09:12:00 -0000 Message-ID: <005d01cd9afd$e5694fe0$b03befa0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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: 2012-09/txt/msg00542.txt.bz2 It seems that "gdb_bfd.h" header is not included in several c files. I noticed that with a compilation failure for native windows: gcc -g -O2 -I. -I../../puresrc/gdb -I../../puresrc/gdb/common -I../../puresrc/gdb/config -DLOCALEDIR="\"/usr/local/s hare/locale\"" -DHAVE_CONFIG_H -I../../puresrc/gdb/../include/opcode -I../../puresrc/gdb/../opcodes/.. -I../../puresrc/g db/../readline/.. -I../bfd -I../../puresrc/gdb/../bfd -I../../puresrc/gdb/../include -I../libdecnumber -I../../puresrc/ gdb/../libdecnumber -I../../puresrc/gdb/gnulib/import -Ibuild-gnulib/import -DTUI=1 -I/usr/include/python2.6 -I/usr /include/python2.6 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -W error -c -o windows-nat.o -MT windows-nat.o -MMD -MP -MF .deps/windows-nat.Tpo ../../puresrc/gdb/windows-nat.c cc1: warnings being treated as errors ../../puresrc/gdb/windows-nat.c: In function 'windows_make_so': ../../puresrc/gdb/windows-nat.c:755:7: error: implicit declaration of function 'gdb_bfd_open' ../../puresrc/gdb/windows-nat.c:755:12: error: assignment makes pointer from integer without a cast ../../puresrc/gdb/windows-nat.c:765:4: error: implicit declaration of function 'gdb_bfd_unref' Makefile:962: recipe for target `windows-nat.o' failed make[1]: *** [windows-nat.o] Error 1 Upon investigation I found several missing gdb_bfd.h header, mainly in native files. This patch adds the header to any C source that had a match for grep gdb_bfd *.c but no corresponding header inclusion. All those file seem to call at least gdb_bfd_unref function, so I suppose that the inclusion is correct, but I would still prefer an approval from Tom, as he seemed to have committed all the gdb_bfd header related changes. Is this OK? As usual, 1) I am not sure about correct wording for ChangeLog 2) I never really understood the ordering logic (or to be more precise, if there is an ordering logic) of C headers in C source files, thus I inserted them more or less randomly... Tom, if you feel like putting them on the right place, don't hesitate to commit yourself... Pierre Muller GDB pascal language maintainer 2012-09-25 Pierre Muller * procfs.c: Add gdb_bfd header. * rs6000-nat.c: Likewise. * solib-pa64.c: Likewise. * spu-linux-nat.c: Likewise. * windows-nat.c: Likewise. Index: src/gdb/procfs.c =================================================================== RCS file: /cvs/src/src/gdb/procfs.c,v retrieving revision 1.160 diff -u -p -r1.160 procfs.c --- src/gdb/procfs.c 7 Aug 2012 13:26:32 -0000 1.160 +++ src/gdb/procfs.c 25 Sep 2012 08:57:18 -0000 @@ -45,6 +45,7 @@ #include "gdb_wait.h" #include #include +#include "gdb_bfd.h" #include "gdb_string.h" #include "gdb_assert.h" #include "inflow.h" Index: src/gdb/rs6000-nat.c =================================================================== RCS file: /cvs/src/src/gdb/rs6000-nat.c,v retrieving revision 1.116 diff -u -p -r1.116 rs6000-nat.c --- src/gdb/rs6000-nat.c 22 Aug 2012 16:24:38 -0000 1.116 +++ src/gdb/rs6000-nat.c 25 Sep 2012 08:57:18 -0000 @@ -53,6 +53,7 @@ #include #include #include "gdb_stat.h" +#include "gdb_bfd.h" #include #define __LDINFO_PTRACE32__ /* for __ld_info32 */ #define __LDINFO_PTRACE64__ /* for __ld_info64 */ Index: src/gdb/solib-pa64.c =================================================================== RCS file: /cvs/src/src/gdb/solib-pa64.c,v retrieving revision 1.37 diff -u -p -r1.37 solib-pa64.c --- src/gdb/solib-pa64.c 22 Aug 2012 16:24:38 -0000 1.37 +++ src/gdb/solib-pa64.c 25 Sep 2012 08:57:18 -0000 @@ -37,6 +37,7 @@ #include "target.h" #include "inferior.h" #include "regcache.h" +#include "gdb_bfd.h" #include "hppa-tdep.h" #include "solist.h" Index: src/gdb/spu-linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/spu-linux-nat.c,v retrieving revision 1.35 diff -u -p -r1.35 spu-linux-nat.c --- src/gdb/spu-linux-nat.c 23 Jul 2012 14:58:44 -0000 1.35 +++ src/gdb/spu-linux-nat.c 25 Sep 2012 08:57:18 -0000 @@ -29,6 +29,7 @@ #include "symfile.h" #include "gdb_wait.h" #include "gdbthread.h" +#include "gdb_bfd.h" #include #include Index: src/gdb/windows-nat.c =================================================================== RCS file: /cvs/src/src/gdb/windows-nat.c,v retrieving revision 1.232 diff -u -p -r1.232 windows-nat.c --- src/gdb/windows-nat.c 22 Aug 2012 16:24:39 -0000 1.232 +++ src/gdb/windows-nat.c 25 Sep 2012 08:57:19 -0000 @@ -49,6 +49,7 @@ #include "filenames.h" #include "symfile.h" #include "objfiles.h" +#include "gdb_bfd.h" #include "gdb_obstack.h" #include "gdb_string.h" #include "gdbthread.h"