Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* fix errors in remote-sim.c
@ 2008-11-10 17:49 Joel Sherrill
  2008-11-10 17:54 ` Joel Brobecker
  0 siblings, 1 reply; 2+ messages in thread
From: Joel Sherrill @ 2008-11-10 17:49 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

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



[-- Attachment #2: remote-sim.diff --]
[-- Type: text/x-patch, Size: 1562 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: fix errors in remote-sim.c
  2008-11-10 17:49 fix errors in remote-sim.c Joel Sherrill
@ 2008-11-10 17:54 ` Joel Brobecker
  0 siblings, 0 replies; 2+ messages in thread
From: Joel Brobecker @ 2008-11-10 17:54 UTC (permalink / raw)
  To: Joel Sherrill; +Cc: gdb-patches

> 2008-11-10 Joel Sherrill <joel.sherrill@oarcorp.com>
> 
> * remote-sim.c (gdbsim_create_inferior,
> gdbsim_mourn_inferior) : Correct prototypes to match
> that expected.

Looks good to me. Thanks for fixing this.


-- 
Joel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-10 17:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-10 17:49 fix errors in remote-sim.c Joel Sherrill
2008-11-10 17:54 ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox