projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Phase 1 of the ptid_t changes.
[deliverable/binutils-gdb.git]
/
gdb
/
remote-es.c
diff --git
a/gdb/remote-es.c
b/gdb/remote-es.c
index a5005107d90cc60cb080d177d74340bd5ecf1809..6423fe2ac36a53ff07ba67a3b02cf46e0f484d11 100644
(file)
--- a/
gdb/remote-es.c
+++ b/
gdb/remote-es.c
@@
-1,5
+1,6
@@
/* Memory-access and commands for remote es1800 processes, for GDB.
/* Memory-access and commands for remote es1800 processes, for GDB.
- Copyright (C) 1988, 1992 Free Software Foundation, Inc.
+ Copyright 1988, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is added to GDB to make it possible to do debugging via an
ES-1800 emulator. The code was originally written by Johan Holmberg
This file is added to GDB to make it possible to do debugging via an
ES-1800 emulator. The code was originally written by Johan Holmberg
@@
-104,11
+105,12
@@
#include "frame.h"
#include "inferior.h"
#include "target.h"
#include "frame.h"
#include "inferior.h"
#include "target.h"
-#include "gdb_wait.h"
#include "command.h"
#include "command.h"
+#include "symfile.h"
#include "remote-utils.h"
#include "gdbcore.h"
#include "serial.h"
#include "remote-utils.h"
#include "gdbcore.h"
#include "serial.h"
+#include "regcache.h"
/* Prototypes for local functions */
/* Prototypes for local functions */
@@
-134,13
+136,13
@@
static void es1800_files_info (struct target_ops *);
static int
es1800_xfer_inferior_memory (CORE_ADDR, char *, int, int,
static int
es1800_xfer_inferior_memory (CORE_ADDR, char *, int, int,
- struct target_ops *);
+ struct
mem_attrib *, struct
target_ops *);
static void es1800_prepare_to_store (void);
static void es1800_prepare_to_store (void);
-static
int es1800_wait (in
t, struct target_waitstatus *);
+static
ptid_t es1800_wait (ptid_
t, struct target_waitstatus *);
-static void es1800_resume (
in
t, int, enum target_signal);
+static void es1800_resume (
ptid_
t, int, enum target_signal);
static void es1800_detach (char *, int);
static void es1800_detach (char *, int);
@@
-433,7
+435,7
@@
es1800_close (int quitting)
}
if (savename != NULL)
{
}
if (savename != NULL)
{
- free (savename);
+
x
free (savename);
}
savename = NULL;
}
savename = NULL;
@@
-498,7
+500,7
@@
es1800_detach (char *args, int from_tty)
siggnal - the signal value to be given to the target (0 = no signal) */
static void
siggnal - the signal value to be given to the target (0 = no signal) */
static void
-es1800_resume (
int p
id, int step, enum target_signal siggnal)
+es1800_resume (
ptid_t pt
id, int step, enum target_signal siggnal)
{
char buf[PBUFSIZ];
{
char buf[PBUFSIZ];
@@
-521,8
+523,8
@@
es1800_resume (int pid, int step, enum target_signal siggnal)
storing status in STATUS just as `wait' would.
status - */
storing status in STATUS just as `wait' would.
status - */
-static
in
t
-es1800_wait (
int p
id, struct target_waitstatus *status)
+static
ptid_
t
+es1800_wait (
ptid_t pt
id, struct target_waitstatus *status)
{
unsigned char buf[PBUFSIZ];
int old_timeout = timeout;
{
unsigned char buf[PBUFSIZ];
int old_timeout = timeout;
@@
-587,7
+589,7
@@
es1800_wait (int pid, struct target_waitstatus *status)
}
signal (SIGINT, old_sigint);
timeout = old_timeout;
}
signal (SIGINT, old_sigint);
timeout = old_timeout;
- return
(0)
;
+ return
inferior_ptid
;
}
}
@@
-954,15
+956,14
@@
tohex (int nib)
memaddr - the target's address
myaddr - gdb's address
len - number of bytes
memaddr - the target's address
myaddr - gdb's address
len - number of bytes
- write - write if != 0 otherwise read */
+ write - write if != 0 otherwise read
+ tops - unused */
static int
static int
-es1800_xfer_inferior_memory (memaddr, myaddr, len, write, tops)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
- int write;
- struct target_ops *tops; /* Unused */
+es1800_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 origlen = len;
int xfersize;
{
int origlen = len;
int xfersize;
@@
-1032,7
+1033,7
@@
es1800_read_bytes (CORE_ADDR memaddr, char *myaddr, int len)
if (len > PBUFSIZ / 2 - 1)
{
if (len > PBUFSIZ / 2 - 1)
{
-
abort (
);
+
internal_error (__FILE__, __LINE__, "failed internal consistency check"
);
}
if (len == 1) /* The emulator does not like expressions like: */
}
if (len == 1) /* The emulator does not like expressions like: */
@@
-1065,11
+1066,10
@@
es1800_read_bytes (CORE_ADDR memaddr, char *myaddr, int len)
}
}
}
}
-/*
Information about the current target
*/
+/*
Display information about the current target. TOPS is unused.
*/
static void
static void
-es1800_files_info (tops)
- struct target_ops *tops; /* Unused */
+es1800_files_info (struct target_ops *tops)
{
printf ("ES1800 Attached to %s at %d baud in %s mode\n", savename, 19200,
MODE);
{
printf ("ES1800 Attached to %s at %d baud in %s mode\n", savename, 19200,
MODE);
@@
-1155,14
+1155,14
@@
verify_break (int vec)
{
memory_error (status, memaddress);
}
{
memory_error (status, memaddress);
}
- return (
STRCMP
(instr, buf));
+ return (
strcmp
(instr, buf));
}
return (-1);
}
/* get_break_addr ()
}
return (-1);
}
/* get_break_addr ()
- find address of breakpint routine
+ find address of breakp
o
int routine
vec - trap vector used for breakpoints
addrp - store the address here */
vec - trap vector used for breakpoints
addrp - store the address here */
@@
-1206,9
+1206,9
@@
get_break_addr (int vec, CORE_ADDR *addrp)
static void
es1800_kill (void)
{
static void
es1800_kill (void)
{
- if (
inferior_pid != 0
)
+ if (
!ptid_equal (inferior_ptid, null_ptid)
)
{
{
- inferior_p
id = 0
;
+ inferior_p
tid = null_ptid
;
es1800_mourn_inferior ();
}
}
es1800_mourn_inferior ();
}
}
@@
-1239,7
+1239,7
@@
es1800_load (char *filename, int from_tty)
}
filename = tilde_expand (filename);
}
filename = tilde_expand (filename);
- make_cleanup (free, filename);
+ make_cleanup (
x
free, filename);
switch (es1800_load_format)
{
switch (es1800_load_format)
{
@@
-1273,7
+1273,7
@@
es1800_load (char *filename, int from_tty)
}
breakpoint_init_inferior ();
}
breakpoint_init_inferior ();
- inferior_p
id = 0
;
+ inferior_p
tid = null_ptid
;
if (from_tty)
{
printf ("Downloading \"%s\" to the ES 1800\n", filename);
if (from_tty)
{
printf ("Downloading \"%s\" to the ES 1800\n", filename);
@@
-1320,7
+1320,7
@@
es1800_load (char *filename, int from_tty)
system (buf);
}
system (buf);
}
- symbol_file_
command (filename, from_tty);
/* reading symbol table */
+ symbol_file_
add_main (filename, from_tty);
/* reading symbol table */
immediate_quit--;
}
immediate_quit--;
}
@@
-1374,7
+1374,7
@@
bfd_copy (bfd *from_bfd, bfd *to_bfd)
#endif
#endif
-/* Start an process on the es1800 and set inferior_pid to the new
+/* Start an process on the es1800 and set inferior_p
t
id to the new
process' pid.
execfile - the file to run
args - arguments passed to the program
process' pid.
execfile - the file to run
args - arguments passed to the program
@@
-1427,7
+1427,7
@@
es1800_create_inferior (char *execfile, char *args, char **env)
/* The "process" (board) is already stopped awaiting our commands, and
the program is already downloaded. We just set its PC and go. */
/* The "process" (board) is already stopped awaiting our commands, and
the program is already downloaded. We just set its PC and go. */
- inferior_p
id = pid;
/* Needed for wait_for_inferior below */
+ inferior_p
tid = pid_to_ptid (pid);
/* Needed for wait_for_inferior below */
clear_proceed_status ();
clear_proceed_status ();
@@
-1961,7
+1961,7
@@
es1800_child_detach (char *args, int from_tty)
pop_target ();
if (from_tty)
{
pop_target ();
if (from_tty)
{
- printf ("Ending debugging the process %d.\n",
inferior_pid
);
+ printf ("Ending debugging the process %d.\n",
PIDGET (inferior_ptid)
);
}
}
}
}
@@
-2026,7
+2026,6
@@
Specify the serial device it is connected to (e.g. /dev/ttya).";
es1800_ops.to_thread_alive = 0;
es1800_ops.to_stop = 0;
es1800_ops.to_pid_to_exec_file = NULL;
es1800_ops.to_thread_alive = 0;
es1800_ops.to_stop = 0;
es1800_ops.to_pid_to_exec_file = NULL;
- es1800_ops.to_core_file_to_sym_file = NULL;
es1800_ops.to_stratum = core_stratum;
es1800_ops.DONT_USE = 0;
es1800_ops.to_has_all_memory = 0;
es1800_ops.to_stratum = core_stratum;
es1800_ops.DONT_USE = 0;
es1800_ops.to_has_all_memory = 0;
@@
-2099,7
+2098,6
@@
Specify the serial device it is connected to (e.g. /dev/ttya).";
es1800_child_ops.to_thread_alive = 0;
es1800_child_ops.to_stop = 0;
es1800_child_ops.to_pid_to_exec_file = NULL;
es1800_child_ops.to_thread_alive = 0;
es1800_child_ops.to_stop = 0;
es1800_child_ops.to_pid_to_exec_file = NULL;
- es1800_child_ops.to_core_file_to_sym_file = NULL;
es1800_child_ops.to_stratum = process_stratum;
es1800_child_ops.DONT_USE = 0;
es1800_child_ops.to_has_all_memory = 1;
es1800_child_ops.to_stratum = process_stratum;
es1800_child_ops.DONT_USE = 0;
es1800_child_ops.to_has_all_memory = 1;
This page took
0.027748 seconds
and
4
git commands to generate.