void skip_frame ();
long read_frame (gdb::char_vector *buf_p);
int getpkt_or_notif_sane_1 (gdb::char_vector *buf, int forever,
- int expecting_notif, int *is_notif);
+ int *is_notif);
int getpkt (gdb::char_vector *buf, int forever);
int getpkt_or_notif_sane (gdb::char_vector *buf, int forever,
int *is_notif);
synchronous mode) to wait for a target that is is executing user
code to stop. If FOREVER == 0, this function is allowed to time
out gracefully and return an indication of this to the caller.
- Otherwise return the number of bytes read. If EXPECTING_NOTIF,
- consider receiving a notification enough reason to return to the
- caller. *IS_NOTIF is an output boolean that indicates whether *BUF
- holds a notification or not (a regular packet). */
+ Otherwise return the number of bytes read. If IS_NOTIF is not
+ NULL, then consider receiving a notification enough reason to
+ return to the caller. In this case, *IS_NOTIF is an output boolean
+ that indicates whether *BUF holds a notification or not (a regular
+ packet). */
int
remote_target::getpkt_or_notif_sane_1 (gdb::char_vector *buf,
- int forever, int expecting_notif,
+ int forever,
int *is_notif)
{
struct remote_state *rs = get_remote_state ();
if (forever)
timeout = watchdog > 0 ? watchdog : -1;
- else if (expecting_notif)
+ else if (is_notif != nullptr)
timeout = 0; /* There should already be a char in the buffer. If
not, bail out. */
else
if (c == SERIAL_TIMEOUT)
{
- if (expecting_notif)
+ if (is_notif != nullptr)
return -1; /* Don't complain, it's normal to not get
anything in this case. */
/* Notifications require no acknowledgement. */
- if (expecting_notif)
+ if (is_notif != nullptr)
return val;
}
}
int
remote_target::getpkt (gdb::char_vector *buf, int forever)
{
- return getpkt_or_notif_sane_1 (buf, forever, 0, NULL);
+ return getpkt_or_notif_sane_1 (buf, forever, NULL);
}
int
remote_target::getpkt_or_notif_sane (gdb::char_vector *buf, int forever,
int *is_notif)
{
- return getpkt_or_notif_sane_1 (buf, forever, 1, is_notif);
+ return getpkt_or_notif_sane_1 (buf, forever, is_notif);
}
/* Kill any new fork children of inferior INF that haven't been