Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Sherrill <joel.sherrill@oarcorp.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: fix errors in remote-sim.c
Date: Mon, 10 Nov 2008 17:49:00 -0000	[thread overview]
Message-ID: <49186522.7050305@oarcorp.com> (raw)

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

             reply	other threads:[~2008-11-10 16:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-10 17:49 Joel Sherrill [this message]
2008-11-10 17:54 ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49186522.7050305@oarcorp.com \
    --to=joel.sherrill@oarcorp.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox