You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "gdbcore.h"
"\003", /* getmem.term_cmd */
},
{
- "\003r %s=%x\r", /* setreg.cmd (name, value) */
+ "r %s=%x\r", /* setreg.cmd (name, value) */
NULL, /* setreg.resp_delim */
NULL, /* setreg.term */
NULL /* setreg.term_cmd */
{
"r %s\r", /* getreg.cmd (name) */
" (", /* getreg.resp_delim */
- "):", /* getreg.term */
+ ":", /* getreg.term */
"\003", /* getreg.term_cmd */
},
"r\r", /* dump_registers */
"tl\r", /* download command */
NULL, /* load response */
">", /* monitor command prompt */
- NULL, /* end-of-command delimitor */
+ "\r", /* end-of-command delimitor */
NULL, /* optional command terminator */
&hms_ops, /* target operations */
SERIAL_1_STOPBITS, /* number of stop bits */
#include "inferior.h"
#include "wait.h"
#include "value.h"
-#include <string.h>
+#include "gdb_string.h"
#include <ctype.h>
#include <fcntl.h>
#include <signal.h>
static int quiet = 1; /* FIXME - can be removed after Dec '94 */
-DCACHE *dcache_ptr;
-int remote_dcache;
-serial_t desc;
/***********************************************************************
SERIAL_CLOSE (desc);
}
is_open = 0;
- remote_dcache = 0;
}
/* Terminate the open connection to the remote debugger. Use this
enum target_signal
sig;
{
- dcache_flush (dcache_ptr);
-
if (step)
{
hms_write_cr ("s");
int s;
int gottok;
- unsigned LONGEST reg[NUM_REGS];
+ ULONGEST reg[NUM_REGS];
check_open ();
}
-/* Read a word from remote address ADDR and return it.
- * This goes through the data cache.
- */
-int
-hms_fetch_word (addr)
- CORE_ADDR addr;
-{
- return dcache_fetch (dcache_ptr, addr);
-}
-
-/* Write a word WORD into remote address ADDR.
- This goes through the data cache. */
-
-void
-hms_store_word (addr, word)
- CORE_ADDR addr;
- int word;
-{
- dcache_poke (dcache_ptr, addr, word);
-}
int
hms_xfer_inferior_memory (memaddr, myaddr, len, write, target)
int write;
struct target_ops *target; /* ignored */
{
- register int i;
-
- /* Round starting address down to longword boundary. */
- register CORE_ADDR addr;
-
- /* Round ending address up; get number of longwords that makes. */
- register int count;
-
- /* Allocate buffer of that many longwords. */
- register int *buffer;
-
- memaddr &= 0xffff;
- addr = memaddr & -sizeof (int);
- count = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
-
- buffer = (int *) alloca (count * sizeof (int));
-
- if (write)
- {
- /* Fill start and end extra bytes of buffer with existing memory data. */
-
- if (addr != memaddr || len < (int) sizeof (int))
- {
- /* Need part of initial word -- fetch it. */
- buffer[0] = hms_fetch_word (addr);
- }
-
- if (count > 1) /* FIXME, avoid if even boundary */
- {
- buffer[count - 1]
- = hms_fetch_word (addr + (count - 1) * sizeof (int));
- }
-
- /* Copy data to be written over corresponding part of buffer */
-
- memcpy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len);
-
- /* Write the entire buffer. */
-
- for (i = 0; i < count; i++, addr += sizeof (int))
- {
- errno = 0;
- hms_store_word (addr, buffer[i]);
- if (errno)
- {
- return 0;
- }
-
- }
- }
- else
- {
- /* Read all the longwords */
- for (i = 0; i < count; i++, addr += sizeof (int))
- {
- errno = 0;
- buffer[i] = hms_fetch_word (addr);
- if (errno)
- {
- return 0;
- }
- QUIT;
- }
-
- /* Copy appropriate bytes out of the buffer. */
- memcpy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len);
- }
return len;
}
hms_insert_breakpoint, hms_remove_breakpoint, /* Breakpoints */
0, 0, 0, 0, 0, /* Terminal handling */
hms_kill, /* FIXME, kill */
- gr_load_image,
+ generic_load,
0, /* lookup_symbol */
hms_create_inferior, /* create_inferior */
hms_mourn, /* mourn_inferior FIXME */
0, /* can_run */
0, /* notice_signals */
+ 0, /* to_thread_alive */
0, /* to_stop */
process_stratum, 0, /* next */
1, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */