This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix errors in remote-sim.c


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 <joel.sherrill@oarcorp.com>

* 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


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);
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]