/* Remote debugging interface for Motorola's MVME187BUG monitor, an embedded
monitor for the m88k.
- Copyright 1992, 1993 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by K. Richard Pixley.
This file is part of GDB.
#include "defs.h"
#include "inferior.h"
-#include "gdb_wait.h"
-
#include "gdb_string.h"
+#include "regcache.h"
#include <ctype.h>
#include <fcntl.h>
-#include <signal.h>
#include <setjmp.h>
#include <errno.h>
#include "remote-utils.h"
-
-extern int sleep ();
-
/* External data declarations */
extern int stop_soon_quietly; /* for wait_for_inferior */
sr_check_open ();
- inferior_pid = 0;
+ inferior_ptid = null_ptid;
abfd = bfd_openr (args, 0);
if (!abfd)
{
char *buffer = xmalloc (srec_frame);
- printf_filtered ("%s\t: 0x%4x .. 0x%4x ", s->name, s->vma, s->vma + s->_raw_size);
+ printf_filtered ("%s\t: 0x%4lx .. 0x%4lx ", s->name, s->vma, s->vma + s->_raw_size);
gdb_flush (gdb_stdout);
for (i = 0; i < s->_raw_size; i += srec_frame)
{
target_is_m88110 = 1;
break;
default:
- abort ();
+ internal_error (__FILE__, __LINE__, "failed internal consistency check");
}
}
/* Tell the remote machine to resume. */
void
-bug_resume (int pid, int step, enum target_signal sig)
+bug_resume (ptid_t ptid, int step, enum target_signal sig)
{
if (step)
{
NULL,
};
-int
-bug_wait (int pid, struct target_waitstatus *status)
+ptid_t
+bug_wait (ptid_t ptid, struct target_waitstatus *status)
{
int old_timeout = sr_get_timeout ();
int old_immediate_quit = immediate_quit;
sr_set_timeout (old_timeout);
immediate_quit = old_immediate_quit;
- return 0;
+ return inferior_ptid;
}
/* Return the name of register number REGNO
if (target_is_m88110 && regno == SFIP_REGNUM)
return;
else if (regno < XFP_REGNUM)
- sprintf (buffer, "rs %s %08x",
+ sprintf (buffer, "rs %s %08lx",
regname,
- read_register (regno));
+ (long) read_register (regno));
else
{
unsigned char *fpreg_buf =
int
bug_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
- struct target_ops *target)
+ struct mem_attrib *attrib ATTRIBUTE_UNUSED,
+ struct target_ops *target ATTRIBUTE_UNUSED)
{
int res;
thisgo = srec_bytes;
address = memaddr + done;
- sprintf (buf, "S3%02X%08X", thisgo + 4 + 1, address);
+ sprintf (buf, "S3%02X%08lX", thisgo + 4 + 1, (long) address);
buf += 12;
checksum += (thisgo + 4 + 1
unsigned int inaddr;
unsigned int checksum;
- sprintf (request, "du 0 %x:&%d", memaddr, len);
+ sprintf (request, "du 0 %lx:&%d", (long) memaddr, len);
sr_write_cr (request);
p = buffer = alloca (len);
char buffer[100];
num_brkpts++;
- sprintf (buffer, "br %x", addr);
+ sprintf (buffer, "br %lx", (long) addr);
sr_write_cr (buffer);
gr_expect_prompt ();
return (0);
char buffer[100];
num_brkpts--;
- sprintf (buffer, "nobr %x", addr);
+ sprintf (buffer, "nobr %lx", (long) addr);
sr_write_cr (buffer);
gr_expect_prompt ();
bug_ops.to_thread_alive = 0;
bug_ops.to_stop = 0;
bug_ops.to_pid_to_exec_file = NULL;
- bug_ops.to_core_file_to_sym_file = NULL;
bug_ops.to_stratum = process_stratum;
bug_ops.DONT_USE = 0;
bug_ops.to_has_all_memory = 1;