}
new_process = add_process (pid);
- add_thread (pid, new_process);
+ add_thread (pid, new_process, pid);
return pid;
}
}
new_process = (struct process_info *) add_process (pid);
- add_thread (tid, new_process);
+ add_thread (tid, new_process, pid);
/* The next time we wait for this LWP we'll see a SIGSTOP as PTRACE_ATTACH
brings it to a halt. We should ignore that SIGSTOP and resume the process
then we need to make sure we restart the other threads. We could
pick a thread at random or restart all; restarting all is less
arbitrary. */
- if (cont_thread > 0)
+ if (cont_thread != 0 && cont_thread != -1)
{
child = (struct thread_info *) find_inferior_id (&all_threads,
cont_thread);
goto error_exit;
}
}
- supply_register (regno, buf);
+ if (the_low_target.left_pad_xfer
+ && register_size (regno) < sizeof (PTRACE_XFER_TYPE))
+ supply_register (regno, (buf + sizeof (PTRACE_XFER_TYPE)
+ - register_size (regno)));
+ else
+ supply_register (regno, buf);
error_exit:;
}
& - sizeof (PTRACE_XFER_TYPE);
buf = alloca (size);
memset (buf, 0, size);
- collect_register (regno, buf);
+ if (the_low_target.left_pad_xfer
+ && register_size (regno) < sizeof (PTRACE_XFER_TYPE))
+ collect_register (regno, (buf + sizeof (PTRACE_XFER_TYPE)
+ - register_size (regno)));
+ else
+ collect_register (regno, buf);
for (i = 0; i < size; i += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
{
extern unsigned long signal_pid;
- if (cont_thread > 0)
+ if (cont_thread != 0 && cont_thread != -1)
{
struct process_info *process;