static int ocd_read_bytes PARAMS ((CORE_ADDR memaddr,
char *myaddr, int len));
-static int ocd_start_remote PARAMS ((char *dummy));
+static int ocd_start_remote PARAMS ((PTR dummy));
static int readchar PARAMS ((int timeout));
other form of hairy serial connection, I would think 2 seconds would
be plenty. */
+#if 0
/* FIXME: Change to allow option to set timeout value on a per target
- basis.
-
+ basis. */
static int remote_timeout = 2;
+#endif
/* Descriptor for I/O to remote machine. Initialize it to NULL so that
ocd_open knows that we don't have a file open when the program
static int
ocd_start_remote (dummy)
- char *dummy;
+ PTR dummy;
{
unsigned char buf[10], *p;
int pktlen;
int speed;
enum ocd_target_type target_type;
- target_type = (enum ocd_target_type)dummy;
+ target_type = *(enum ocd_target_type*)dummy;
immediate_quit = 1; /* Allow user to interrupt it */
select_frame (get_current_frame (), 0);
print_stack_frame (selected_frame, -1, 1);
-#if 0
buf[0] = OCD_LOG_FILE;
buf[1] = 3; /* close existing WIGGLERS.LOG */
ocd_put_packet (buf, 2);
buf[1] = 2; /* append to existing WIGGLERS.LOG */
ocd_put_packet (buf, 2);
p = ocd_get_packet (buf[0], &pktlen, remote_timeout);
-#endif
return 1;
}
if (!ocd_desc)
perror_with_name (name);
-#if 0
buf[0] = OCD_LOG_FILE;
buf[1] = 1; /* open new or overwrite existing WIGGLERS.LOG */
ocd_put_packet (buf, 2);
p = ocd_get_packet (buf[0], &pktlen, remote_timeout);
-#endif
buf[0] = OCD_SET_CONNECTION;
buf[1] = 0x01; /* atoi (name[11]); */
/* Start the remote connection; if error (0), discard this target.
In particular, if the user quits, be sure to discard it
(we'd be in an inconsistent state otherwise). */
- if (!catch_errors (ocd_start_remote, (char *)target_type,
+ if (!catch_errors (ocd_start_remote, &target_type,
"Couldn't establish connection to remote target\n",
RETURN_MASK_ALL))
- pop_target();
+ {
+ pop_target();
+ error ("Failed to connect to OCD.");
+ }
}
/* This takes a program previously attached to and detaches it. After
*statusp = status;
-#if 0
logbuf[0] = OCD_LOG_FILE;
logbuf[1] = 3; /* close existing WIGGLERS.LOG */
ocd_put_packet (logbuf, 2);
logbuf[1] = 2; /* append to existing WIGGLERS.LOG */
ocd_put_packet (logbuf, 2);
ocd_get_packet (logbuf[0], &logpktlen, remote_timeout);
-#endif
return p + 3;
}
not yet supported fully */
#define BDM_BREAKPOINT {0x0,0x0,0x0,0x0} /* For ppc 8xx */
-/* #define BDM_BREAKPOINT {0x4a,0xfa} /* BGND insn used for CPU32 */
+#if 0
+#define BDM_BREAKPOINT {0x4a,0xfa} /* BGND insn used for CPU32 */
+#endif
/* BDM (at least on CPU32) uses a different breakpoint */