remote_notice_new_inferior (item.ptid, executing);
- thread_info *tp = find_thread_ptid (item.ptid);
+ tp = find_thread_ptid (item.ptid);
remote_thread_info *info = get_remote_thread_info (tp);
info->core = item.core;
info->extra = std::move (item.extra);
ptid_t event_ptid;
struct target_waitstatus ws;
int ignore_event = 0;
- struct thread_info *thread;
memset (&ws, 0, sizeof (ws));
event_ptid = target_wait (waiton_ptid, &ws, TARGET_WNOHANG);
if (ignore_event)
continue;
- thread = find_thread_ptid (event_ptid);
+ struct thread_info *evthread = find_thread_ptid (event_ptid);
if (ws.kind == TARGET_WAITKIND_STOPPED)
{
instead of signal 0. Suppress it. */
if (sig == GDB_SIGNAL_TRAP)
sig = GDB_SIGNAL_0;
- thread->suspend.stop_signal = sig;
+ evthread->suspend.stop_signal = sig;
ws.value.sig = sig;
}
- thread->suspend.waitstatus = ws;
+ evthread->suspend.waitstatus = ws;
if (ws.kind != TARGET_WAITKIND_STOPPED
|| ws.value.sig != GDB_SIGNAL_0)
- thread->suspend.waitstatus_pending_p = 1;
+ evthread->suspend.waitstatus_pending_p = 1;
set_executing (event_ptid, 0);
set_running (event_ptid, 0);
- get_remote_thread_info (thread)->vcont_resumed = 0;
+ get_remote_thread_info (evthread)->vcont_resumed = 0;
}
/* "Notice" the new inferiors before anything related to
break;
case 'w': /* Thread exited. */
{
- const char *p;
ULONGEST value;
event->ws.kind = TARGET_WAITKIND_THREAD_EXITED;
case 'W': /* Target exited. */
case 'X':
{
- const char *p;
int pid;
ULONGEST value;
break;
case 'N': case 'T': case 'S': case 'X': case 'W':
{
- struct stop_reply *stop_reply;
-
/* There is a stop reply to handle. */
rs->waiting_for_stop_reply = 0;
&remote_protocol_packets[PACKET_qGetTLSAddr]);
if (result == PACKET_OK)
{
- ULONGEST result;
+ ULONGEST addr;
- unpack_varlen_hex (rs->buf, &result);
- return result;
+ unpack_varlen_hex (rs->buf, &addr);
+ return addr;
}
else if (result == PACKET_UNKNOWN)
throw_error (TLS_GENERIC_ERROR,
&remote_protocol_packets[PACKET_qGetTIBAddr]);
if (result == PACKET_OK)
{
- ULONGEST result;
-
- unpack_varlen_hex (rs->buf, &result);
+ ULONGEST val;
+ unpack_varlen_hex (rs->buf, &val);
if (addr)
- *addr = (CORE_ADDR) result;
+ *addr = (CORE_ADDR) val;
return true;
}
else if (result == PACKET_UNKNOWN)