projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Assume TARGET_BYTE_ORDER_SELECTABLE{,_P} is always true.
[deliverable/binutils-gdb.git]
/
gdb
/
remote-sim.c
diff --git
a/gdb/remote-sim.c
b/gdb/remote-sim.c
index 81baf52b834ad4406239ca03100494c102d50de3..1d037c8fa79d777e410be702fd57a9b04447c8a9 100644
(file)
--- a/
gdb/remote-sim.c
+++ b/
gdb/remote-sim.c
@@
-1,5
+1,8
@@
/* Generic remote debugging interface for simulators.
/* Generic remote debugging interface for simulators.
- Copyright 1993, 1994, 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ 2002 Free Software Foundation, Inc.
+
Contributed by Cygnus Support.
Steve Chamberlain (sac@cygnus.com).
Contributed by Cygnus Support.
Steve Chamberlain (sac@cygnus.com).
@@
-36,6
+39,7
@@
#include "remote-sim.h"
#include "remote-utils.h"
#include "command.h"
#include "remote-sim.h"
#include "remote-utils.h"
#include "command.h"
+#include "regcache.h"
/* Prototypes */
/* Prototypes */
@@
-84,9
+88,9
@@
static void gdbsim_close (int quitting);
static void gdbsim_detach (char *args, int from_tty);
static void gdbsim_detach (char *args, int from_tty);
-static void gdbsim_resume (
int p
id, int step, enum target_signal siggnal);
+static void gdbsim_resume (
ptid_t pt
id, int step, enum target_signal siggnal);
-static
int gdbsim_wait (int p
id, struct target_waitstatus *status);
+static
ptid_t gdbsim_wait (ptid_t pt
id, struct target_waitstatus *status);
static void gdbsim_prepare_to_store (void);
static void gdbsim_prepare_to_store (void);
@@
-357,7
+361,7
@@
gdbsim_kill (void)
/* There is no need to `kill' running simulator - the simulator is
not running */
/* There is no need to `kill' running simulator - the simulator is
not running */
- inferior_p
id = 0
;
+ inferior_p
tid = null_ptid
;
}
/* Load an executable file into the target process. This is expected to
}
/* Load an executable file into the target process. This is expected to
@@
-370,7
+374,7
@@
gdbsim_load (char *prog, int fromtty)
if (sr_get_debug ())
printf_filtered ("gdbsim_load: prog \"%s\"\n", prog);
if (sr_get_debug ())
printf_filtered ("gdbsim_load: prog \"%s\"\n", prog);
- inferior_p
id = 0
;
+ inferior_p
tid = null_ptid
;
/* FIXME: We will print two messages on error.
Need error to either not print anything if passed NULL or need
/* FIXME: We will print two messages on error.
Need error to either not print anything if passed NULL or need
@@
-385,7
+389,7
@@
gdbsim_load (char *prog, int fromtty)
}
}
-/* Start an inferior process and set inferior_pid to its pid.
+/* Start an inferior process and set inferior_p
t
id to its pid.
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().
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().
@@
-428,7
+432,7
@@
gdbsim_create_inferior (char *exec_file, char *args, char **env)
argv = NULL;
sim_create_inferior (gdbsim_desc, exec_bfd, argv, env);
argv = NULL;
sim_create_inferior (gdbsim_desc, exec_bfd, argv, env);
- inferior_p
id = 42
;
+ inferior_p
tid = pid_to_ptid (42)
;
insert_breakpoints (); /* Needed to get correct instruction in cache */
clear_proceed_status ();
insert_breakpoints (); /* Needed to get correct instruction in cache */
clear_proceed_status ();
@@
-470,15
+474,14
@@
gdbsim_open (char *args, int from_tty)
strcpy (arg_buf, "gdbsim"); /* 7 */
/* Specify the byte order for the target when it is both selectable
and explicitly specified by the user (not auto detected). */
strcpy (arg_buf, "gdbsim"); /* 7 */
/* Specify the byte order for the target when it is both selectable
and explicitly specified by the user (not auto detected). */
- if (TARGET_BYTE_ORDER_SELECTABLE_P
- && !TARGET_BYTE_ORDER_AUTO)
+ if (!TARGET_BYTE_ORDER_AUTO)
{
switch (TARGET_BYTE_ORDER)
{
{
switch (TARGET_BYTE_ORDER)
{
- case B
IG_ENDIAN
:
+ case B
FD_ENDIAN_BIG
:
strcat (arg_buf, " -E big");
break;
strcat (arg_buf, " -E big");
break;
- case
LITTLE_ENDIAN
:
+ case
BFD_ENDIAN_LITTLE
:
strcat (arg_buf, " -E little");
break;
default:
strcat (arg_buf, " -E little");
break;
default:
@@
-570,9
+573,9
@@
static enum target_signal resume_siggnal;
static int resume_step;
static void
static int resume_step;
static void
-gdbsim_resume (
int p
id, int step, enum target_signal siggnal)
+gdbsim_resume (
ptid_t pt
id, int step, enum target_signal siggnal)
{
{
- if (
inferior_pid
!= 42)
+ if (
PIDGET (inferior_ptid)
!= 42)
error ("The program is not being run.");
if (sr_get_debug ())
error ("The program is not being run.");
if (sr_get_debug ())
@@
-609,7
+612,6
@@
gdb_os_poll_quit (host_callback *p)
if (ui_loop_hook != NULL)
ui_loop_hook (0);
if (ui_loop_hook != NULL)
ui_loop_hook (0);
- notice_quit ();
if (quit_flag) /* gdb's idea of quit */
{
quit_flag = 0; /* we've stolen it */
if (quit_flag) /* gdb's idea of quit */
{
quit_flag = 0; /* we've stolen it */
@@
-632,8
+634,8
@@
gdbsim_cntrl_c (int signo)
gdbsim_stop ();
}
gdbsim_stop ();
}
-static
in
t
-gdbsim_wait (
int p
id, struct target_waitstatus *status)
+static
ptid_
t
+gdbsim_wait (
ptid_t pt
id, struct target_waitstatus *status)
{
static RETSIGTYPE (*prev_sigint) ();
int sigrc = 0;
{
static RETSIGTYPE (*prev_sigint) ();
int sigrc = 0;
@@
-695,7
+697,7
@@
gdbsim_wait (int pid, struct target_waitstatus *status)
break;
}
break;
}
- return inferior_pid;
+ return inferior_p
t
id;
}
/* Get ready to modify the registers array. On machines which store
}
/* Get ready to modify the registers array. On machines which store
@@
-718,9
+720,8
@@
gdbsim_prepare_to_store (void)
static int
gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len,
static int
gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len,
- int write,
- struct mem_attrib *attrib ATTRIBUTE_UNUSED,
- struct target_ops *target ATTRIBUTE_UNUSED)
+ int write, struct mem_attrib *attrib,
+ struct target_ops *target)
{
if (!program_loaded)
error ("No program loaded.");
{
if (!program_loaded)
error ("No program loaded.");
@@
-913,7
+914,6
@@
init_gdbsim_ops (void)
gdbsim_ops.to_thread_alive = 0;
gdbsim_ops.to_stop = gdbsim_stop;
gdbsim_ops.to_pid_to_exec_file = NULL;
gdbsim_ops.to_thread_alive = 0;
gdbsim_ops.to_stop = gdbsim_stop;
gdbsim_ops.to_pid_to_exec_file = NULL;
- gdbsim_ops.to_core_file_to_sym_file = NULL;
gdbsim_ops.to_stratum = process_stratum;
gdbsim_ops.DONT_USE = NULL;
gdbsim_ops.to_has_all_memory = 1;
gdbsim_ops.to_stratum = process_stratum;
gdbsim_ops.DONT_USE = NULL;
gdbsim_ops.to_has_all_memory = 1;
This page took
0.025277 seconds
and
4
git commands to generate.