From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5684 invoked by alias); 10 Nov 2008 16:46:06 -0000 Received: (qmail 5665 invoked by uid 22791); 10 Nov 2008 16:46:05 -0000 X-Spam-Check-By: sourceware.org Received: from mail.oarcorp.com (HELO OARmail.OARCORP.com) (216.186.189.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 10 Nov 2008 16:45:28 +0000 Received: from [192.168.1.3] (192.168.1.3) by OARmail.OARCORP.com (192.168.2.2) with Microsoft SMTP Server (TLS) id 8.1.311.2; Mon, 10 Nov 2008 10:41:56 -0600 Message-ID: <49186522.7050305@oarcorp.com> Date: Mon, 10 Nov 2008 17:49:00 -0000 From: Joel Sherrill User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: "gdb-patches@sourceware.org" Subject: fix errors in remote-sim.c Content-Type: multipart/mixed; boundary="------------030804010905080401000108" 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: 2008-11/txt/msg00177.txt.bz2 --------------030804010905080401000108 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 8bit Content-length: 911 Hi, Building on the CVS head, I encountered these errors ../../gdb-cvs/gdb/remote-sim.c: In function ‘init_gdbsim_ops’: ../../gdb-cvs/gdb/remote-sim.c:918: error: assignment from incompatible pointer type ../../gdb-cvs/gdb/remote-sim.c:919: error: assignment from incompatible pointer type It turned out that gdbsim_mourn_inferior and gdbsim_create_inferior had prototypes that did not match that expected in the target_ops table. This is a fairly straightforward fix but needs to be reviewed. Thanks. 2008-11-10 Joel Sherrill * remote-sim.c (gdbsim_create_inferior, gdbsim_mourn_inferior) : Correct prototypes to match that expected. -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherrill@OARcorp.com On-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available (256) 722-9985 --------------030804010905080401000108 Content-Type: text/x-patch; name="remote-sim.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="remote-sim.diff" Content-length: 1562 Index: remote-sim.c =================================================================== RCS file: /cvs/src/src/gdb/remote-sim.c,v retrieving revision 1.78 diff -u -r1.78 remote-sim.c --- remote-sim.c 9 Nov 2008 11:27:18 -0000 1.78 +++ remote-sim.c 10 Nov 2008 16:42:55 -0000 @@ -94,7 +94,7 @@ static void gdbsim_files_info (struct target_ops *target); -static void gdbsim_mourn_inferior (void); +static void gdbsim_mourn_inferior (struct target_ops *target); static void gdbsim_stop (ptid_t ptid); @@ -437,6 +437,7 @@ /* Start an inferior process and set inferior_ptid to its pid. + TARGET ports to the target operations structure EXEC_FILE is the file to run. ARGS is a string containing the arguments to the program. ENV is the environment vector to pass. Errors reported with error(). @@ -445,7 +446,7 @@ user types "run" after having attached. */ static void -gdbsim_create_inferior (char *exec_file, char *args, char **env, int from_tty) +gdbsim_create_inferior (struct target_ops *target, char *exec_file, char *args, char **env, int from_tty) { int len; char *arg_buf, **argv; @@ -822,13 +823,13 @@ /* Clear the simulator's notion of what the break points are. */ static void -gdbsim_mourn_inferior (void) +gdbsim_mourn_inferior (struct target_ops *target) { if (remote_debug) printf_filtered ("gdbsim_mourn_inferior:\n"); remove_breakpoints (); - target_mark_exited (&gdbsim_ops); + target_mark_exited (target); generic_mourn_inferior (); delete_thread_silent (remote_sim_ptid); } --------------030804010905080401000108--