From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5946 invoked by alias); 15 Jan 2014 16:36:50 -0000 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 Received: (qmail 5929 invoked by uid 89); 15 Jan 2014 16:36:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Jan 2014 16:36:49 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0FGajqq026330 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 15 Jan 2014 11:36:46 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s0FGaiGe014821; Wed, 15 Jan 2014 11:36:45 -0500 Message-ID: <52D6B91C.2030402@redhat.com> Date: Wed, 15 Jan 2014 16:36:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: GDB Patches CC: Eli Zaretskii Subject: [PUSHED] Fix go32-nat.c build fallout from to_detach constification. Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-01/txt/msg00518.txt.bz2 I pushed the patch below, approved by Eli offlist. FYI, djgpp still doesn't build OOTB: ../../src/binutils/readelf.c: In function 'print_symbol': ../../src/binutils/readelf.c:474:4: error: implicit declaration of function 'mbrtowc' [-Werror=implicit-function-declaration] cc1: all warnings being treated as errors ... ../../src/gdb/dwarf2read.c: In function 'open_and_init_dwp_file': ../../src/gdb/dwarf2read.c:10550:7: error: format '%d' expects argument of type 'int', but argument 2 has type 'uint32_t' [-Werror=format] ../../src/gdb/dwarf2read.c:10550:7: error: format '%d' expects argument of type 'int', but argument 3 has type 'uint32_t' [-Werror=format] I'm not planing on addressing those myself at the moment though. --- Fix go32-nat.c build fallout from to_detach constification. The recent constification of to_detach missed updating the forward declaration of go32_detach, breaking the build: ../../src/gdb/go32-nat.c:387:1: error: conflicting types for 'go32_detach' ../../src/gdb/go32-nat.c:240:13: note: previous declaration of 'go32_detach' was here go32_detach is actually defined before it's ever used, making the forward declaration is unnecessary. So we can just remove it instead of updating it. While at it, remove all others in the same situation. Tested by building a djgpp gdb. gdb/ 2014-01-15 Pedro Alves * go32-nat.c (go32_open, go32_close, go32_attach, go32_detach) (go32_resume, go32_fetch_registers, store_register) (go32_store_registers, go32_prepare_to_store) (go32_xfer_memory, go32_files_info, go32_kill_inferior) (go32_create_inferior, go32_can_run, go32_terminal_init) (go32_terminal_inferior, go32_terminal_ours): Delete forward declarations. --- gdb/ChangeLog | 10 ++++++++++ gdb/go32-nat.c | 26 +------------------------- 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e3b3eaa..6c51b84 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2014-01-15 Pedro Alves + + * go32-nat.c (go32_open, go32_close, go32_attach, go32_detach) + (go32_resume, go32_fetch_registers, store_register) + (go32_store_registers, go32_prepare_to_store) + (go32_xfer_memory, go32_files_info, go32_kill_inferior) + (go32_create_inferior, go32_can_run, go32_terminal_init) + (go32_terminal_inferior, go32_terminal_ours): Delete forward + declarations. + 2014-01-15 Tom Tromey * target.h (async_callback_ftype): New typedef. diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c index 8c8e1c7..22b2d21 100644 --- a/gdb/go32-nat.c +++ b/gdb/go32-nat.c @@ -234,34 +234,10 @@ static int dr_ref_count[4]; #define SOME_PID 42 static int prog_has_started = 0; -static void go32_open (char *name, int from_tty); -static void go32_close (void); -static void go32_attach (struct target_ops *ops, char *args, int from_tty); -static void go32_detach (struct target_ops *ops, char *args, int from_tty); -static void go32_resume (struct target_ops *ops, - ptid_t ptid, int step, - enum gdb_signal siggnal); -static void go32_fetch_registers (struct target_ops *ops, - struct regcache *, int regno); -static void store_register (const struct regcache *, int regno); -static void go32_store_registers (struct target_ops *ops, - struct regcache *, int regno); -static void go32_prepare_to_store (struct regcache *); -static int go32_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, - int write, - struct mem_attrib *attrib, - struct target_ops *target); -static void go32_files_info (struct target_ops *target); -static void go32_kill_inferior (struct target_ops *ops); -static void go32_create_inferior (struct target_ops *ops, char *exec_file, - char *args, char **env, int from_tty); + static void go32_mourn_inferior (struct target_ops *ops); -static int go32_can_run (void); static struct target_ops go32_ops; -static void go32_terminal_init (void); -static void go32_terminal_inferior (void); -static void go32_terminal_ours (void); #define r_ofs(x) (offsetof(TSS,x)) -- 1.7.11.7