#include <hurd/msg.h>
#include <hurd/msg_request.h>
#include <hurd/process.h>
+/* Defined in <hurd/process.h>, but we need forward declarations from
+ <hurd/process_request.h> as well. */
+#undef _process_user_
#include <hurd/process_request.h>
#include <hurd/signal.h>
#include <hurd/sigpreempt.h>
proc_debug (thread, "died!");
thread->port = MACH_PORT_NULL;
thread = _proc_free (thread); /* THREAD is dead. */
- (last ? last->next : inf->threads) = thread;
+ if (last)
+ last->next = thread;
+ else
+ inf->threads = thread;
}
}
/* THREADS[I] is a thread we don't know about yet! */
{
thread = make_proc (inf, threads[i], next_thread_id++);
- (last ? last->next : inf->threads) = thread;
+ if (last)
+ last->next = thread;
+ else
+ inf->threads = thread;
last = thread;
proc_debug (thread, "new thread: %d", threads[i]);
add_thread (pid_to_ptid (thread->tid)); /* Tell GDB's generic thread code. */
{
struct proc *thread = inf_tid_to_thread (inf, PIDGET (tid));
if (!thread)
- error (_("Can't run single thread id %d: no such thread!"));
+ error (_("Can't run single thread id %d: no such thread!"), inf->pid);
inf_debug (inf, "running one thread: %d/%d", inf->pid, thread->tid);
inf_set_threads_resume_sc (inf, thread, 0);
}
if (err)
return 0;
- err = hurd_safe_copyin (myaddr, (void *) addr - low_address + copied, length);
+ err = hurd_safe_copyin (myaddr, (void *) (addr - low_address + copied), length);
if (err)
{
warning (_("Read from inferior faulted: %s"), safe_strerror (err));
deallocate++;
- err = hurd_safe_copyout ((void *) addr - low_address + copied,
+ err = hurd_safe_copyout ((void *) (addr - low_address + copied),
myaddr, length);
CHK_GOTO_OUT ("Write to inferior faulted", err);
/* Return 0 on failure, number of bytes handled otherwise. TARGET
is ignored. */
static int
-gnu_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+gnu_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write,
struct mem_attrib *attrib,
struct target_ops *target)
{