void add_pid_to_list (struct inferior_list *list, unsigned long pid) { struct inferior_list_entry *new_entry; new_entry = xmalloc (sizeof (struct inferior_list_entry)); new_entry->id = pid_to_ptid (pid); add_inferior_to_list (list, new_entry); }
struct process_info * add_process (int pid, int attached) { struct process_info *process = XCNEW (struct process_info); process->entry.id = pid_to_ptid (pid); process->attached = attached; add_inferior_to_list (&all_processes, &process->entry); return process; }
void loaded_dll (const char *name, CORE_ADDR base_addr) { struct dll_info *new_dll = XCNEW (struct dll_info); new_dll->entry.id = minus_one_ptid; new_dll->name = xstrdup (name); new_dll->base_addr = base_addr; add_inferior_to_list (&all_dlls, &new_dll->entry); dlls_changed = 1; }
void loaded_dll (const char *name, CORE_ADDR base_addr) { struct dll_info *new_dll = xmalloc (sizeof (*new_dll)); memset (new_dll, 0, sizeof (*new_dll)); new_dll->entry.id = minus_one_ptid; new_dll->name = xstrdup (name); new_dll->base_addr = base_addr; add_inferior_to_list (&all_dlls, &new_dll->entry); dlls_changed = 1; }
struct process_info * add_process (int pid, int attached) { struct process_info *process; process = xcalloc (1, sizeof (*process)); process->entry.id = pid_to_ptid (pid); process->attached = attached; add_inferior_to_list (&all_processes, &process->entry); return process; }
static void * add_process (int pid) { struct process_info *process; process = (struct process_info *) malloc (sizeof (*process)); memset (process, 0, sizeof (*process)); process->head.id = pid; /* Default to tid == lwpid == pid. */ process->tid = pid; process->lwpid = pid; add_inferior_to_list (&all_processes, &process->head); return process; }
void add_thread (ptid_t thread_id, void *target_data) { struct thread_info *new_thread = xmalloc (sizeof (*new_thread)); memset (new_thread, 0, sizeof (*new_thread)); new_thread->entry.id = thread_id; new_thread->last_resume_kind = resume_continue; new_thread->last_status.kind = TARGET_WAITKIND_IGNORE; add_inferior_to_list (&all_threads, & new_thread->entry); if (current_inferior == NULL) current_inferior = new_thread; new_thread->target_data = target_data; }
struct thread_info * add_thread (ptid_t thread_id, void *target_data) { struct thread_info *new_thread = XCNEW (struct thread_info); new_thread->entry.id = thread_id; new_thread->last_resume_kind = resume_continue; new_thread->last_status.kind = TARGET_WAITKIND_IGNORE; add_inferior_to_list (&all_threads, &new_thread->entry); if (current_thread == NULL) current_thread = new_thread; new_thread->target_data = target_data; return new_thread; }
void add_thread (unsigned long thread_id, void *target_data, unsigned int gdb_id) { struct thread_info *new_thread = (struct thread_info *) malloc (sizeof (*new_thread)); memset (new_thread, 0, sizeof (*new_thread)); new_thread->entry.id = thread_id; add_inferior_to_list (&all_threads, & new_thread->entry); if (current_inferior == NULL) current_inferior = new_thread; new_thread->target_data = target_data; set_inferior_regcache_data (new_thread, new_register_cache ()); new_thread->gdb_id = gdb_id; }