get_remote_arch_state (void)
{
gdb_assert (target_gdbarch () != NULL);
- return gdbarch_data (target_gdbarch (), remote_gdbarch_data_handle);
+ return ((struct remote_arch_state *)
+ gdbarch_data (target_gdbarch (), remote_gdbarch_data_handle));
}
/* Fetch the global remote target state. */
static void
remote_pspace_data_cleanup (struct program_space *pspace, void *arg)
{
- char *remote_exec_file = arg;
+ char *remote_exec_file = (char *) arg;
xfree (remote_exec_file);
}
{
char *remote_exec_file;
- remote_exec_file = program_space_data (current_program_space,
- remote_pspace_data);
+ remote_exec_file
+ = (char *) program_space_data (current_program_space,
+ remote_pspace_data);
if (remote_exec_file == NULL)
return "";
set_pspace_remote_exec_file (struct program_space *pspace,
char *remote_exec_file)
{
- char *old_file = program_space_data (pspace, remote_pspace_data);
+ char *old_file = (char *) program_space_data (pspace, remote_pspace_data);
xfree (old_file);
set_program_space_data (pspace, remote_pspace_data,
static int
compare_pnums (const void *lhs_, const void *rhs_)
{
- const struct packet_reg * const *lhs = lhs_;
- const struct packet_reg * const *rhs = rhs_;
+ const struct packet_reg * const *lhs
+ = (const struct packet_reg * const *) lhs_;
+ const struct packet_reg * const *rhs
+ = (const struct packet_reg * const *) rhs_;
if ((*lhs)->pnum < (*rhs)->pnum)
return -1;
static void
clear_threads_listing_context (void *p)
{
- struct threads_listing_context *context = p;
+ struct threads_listing_context *context
+ = (struct threads_listing_context *) p;
int i;
struct thread_item *item;
static int
remote_newthread_step (threadref *ref, void *data)
{
- struct threads_listing_context *context = data;
+ struct threads_listing_context *context
+ = (struct threads_listing_context *) data;
struct thread_item item;
int pid = ptid_get_pid (inferior_ptid);
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct threads_listing_context *data = user_data;
+ struct threads_listing_context *data
+ = (struct threads_listing_context *) user_data;
struct thread_item item;
char *id;
struct gdb_xml_value *attr;
- id = xml_find_attribute (attributes, "id")->value;
+ id = (char *) xml_find_attribute (attributes, "id")->value;
item.ptid = read_ptid (id, NULL);
attr = xml_find_attribute (attributes, "core");
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct threads_listing_context *data = user_data;
+ struct threads_listing_context *data
+ = (struct threads_listing_context *) user_data;
if (body_text && *body_text)
VEC_last (thread_item_t, data->items)->extra = xstrdup (body_text);
stop_reply_p event,
void *data)
{
- struct queue_iter_param *param = data;
- struct threads_listing_context *context = param->input;
+ struct queue_iter_param *param = (struct queue_iter_param *) data;
+ struct threads_listing_context *context
+ = (struct threads_listing_context *) param->input;
if (event->ws.kind == TARGET_WAITKIND_FORKED
|| event->ws.kind == TARGET_WAITKIND_VFORKED)
stop_reply_p event,
void *data)
{
- struct queue_iter_param *param = data;
- struct inferior *inf = param->input;
+ struct queue_iter_param *param = (struct queue_iter_param *) data;
+ struct inferior *inf = (struct inferior *) param->input;
if (ptid_get_pid (event->ptid) == inf->pid)
{
stop_reply_p event,
void *data)
{
- struct queue_iter_param *param = data;
- struct remote_state *rs = param->input;
+ struct queue_iter_param *param = (struct queue_iter_param *) data;
+ struct remote_state *rs = (struct remote_state *) param->input;
if (event->rs == rs)
{
stop_reply_p event,
void *data)
{
- struct queue_iter_param *param = data;
- ptid_t *ptid = param->input;
+ struct queue_iter_param *param = (struct queue_iter_param *) data;
+ ptid_t *ptid = (ptid_t *) param->input;
if (ptid_match (event->ptid, *ptid))
{
struct stop_reply *event,
void *data)
{
- ptid_t *ptid = data;
+ ptid_t *ptid = (ptid_t *) data;
return !(ptid_equal (*ptid, event->ptid)
&& event->ws.kind == TARGET_WAITKIND_STOPPED);
event->ws.kind = TARGET_WAITKIND_VFORK_DONE;
p = skip_to_semicolon (p1 + 1);
}
- else if (strncmp (p, "exec", p1 - p) == 0)
+ else if (strprefix (p, p1, "exec"))
{
ULONGEST ignored;
char pathname[PATH_MAX];
rs->stop_reason = TARGET_STOPPED_BY_NO_REASON;
- /* We got something. */
- rs->waiting_for_stop_reply = 0;
-
/* Assume that the target has acknowledged Ctrl-C unless we receive
an 'F' or 'O' packet. */
if (buf[0] != 'F' && buf[0] != 'O')
case 'E': /* Error of some sort. */
/* We're out of sync with the target now. Did it continue or
not? Not is more likely, so report a stop. */
+ rs->waiting_for_stop_reply = 0;
+
warning (_("Remote failure reply: %s"), buf);
status->kind = TARGET_WAITKIND_STOPPED;
status->value.sig = GDB_SIGNAL_0;
break;
case 'T': case 'S': case 'X': case 'W':
{
- struct stop_reply *stop_reply
+ struct stop_reply *stop_reply;
+
+ /* There is a stop reply to handle. */
+ rs->waiting_for_stop_reply = 0;
+
+ stop_reply
= (struct stop_reply *) remote_notif_parse (¬if_client_stop,
rs->buf);
}
case 'O': /* Console output. */
remote_console_output (buf + 1);
-
- /* The target didn't really stop; keep waiting. */
- rs->waiting_for_stop_reply = 1;
-
break;
case '\0':
if (rs->last_sent_signal != GDB_SIGNAL_0)
strcpy ((char *) buf, rs->last_sent_step ? "s" : "c");
putpkt ((char *) buf);
-
- /* We just told the target to resume, so a stop reply is in
- order. */
- rs->waiting_for_stop_reply = 1;
break;
}
/* else fallthrough */
default:
warning (_("Invalid remote reply: %s"), buf);
- /* Keep waiting. */
- rs->waiting_for_stop_reply = 1;
break;
}
stop_reply_p event,
void *data)
{
- struct queue_iter_param *param = data;
+ struct queue_iter_param *param = (struct queue_iter_param *) data;
int parent_pid = *(int *) param->input;
if (is_pending_fork_parent (&event->ws, parent_pid, event->ptid))
const struct target_desc *tdesc)
{
struct remote_g_packet_data *data
- = gdbarch_data (gdbarch, remote_g_packet_data_handle);
+ = ((struct remote_g_packet_data *)
+ gdbarch_data (gdbarch, remote_g_packet_data_handle));
struct remote_g_packet_guess new_guess, *guess;
int ix;
remote_read_description_p (struct target_ops *target)
{
struct remote_g_packet_data *data
- = gdbarch_data (target_gdbarch (), remote_g_packet_data_handle);
+ = ((struct remote_g_packet_data *)
+ gdbarch_data (target_gdbarch (), remote_g_packet_data_handle));
if (!VEC_empty (remote_g_packet_guess_s, data->guesses))
return 1;
remote_read_description (struct target_ops *target)
{
struct remote_g_packet_data *data
- = gdbarch_data (target_gdbarch (), remote_g_packet_data_handle);
+ = ((struct remote_g_packet_data *)
+ gdbarch_data (target_gdbarch (), remote_g_packet_data_handle));
/* Do not try this during initial connection, when we do not know
whether there is a running but stopped thread. */
static void
free_actions_list_cleanup_wrapper (void *al)
{
- free_actions_list (al);
+ free_actions_list ((char **) al);
}
static void
static void
remote_async_serial_handler (struct serial *scb, void *context)
{
- struct remote_state *rs = context;
+ struct remote_state *rs = (struct remote_state *) context;
/* Don't propogate error information up to the client. Instead let
the client find out about the error by querying the target. */