/* GNU/Linux/x86-64 specific low level interface, for the remote server
for GDB.
- Copyright (C) 2002-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 Free Software Foundation, Inc.
This file is part of GDB.
#endif
{
- struct lwp_info *lwp = find_lwp_pid (pid_to_ptid (lwpid));
+ struct lwp_info *lwp = find_lwp_pid (ptid_t (lwpid));
struct thread_info *thr = get_lwp_thread (lwp);
struct regcache *regcache = get_thread_regcache (thr, 1);
unsigned int desc[4];
gdb_assert_not_reached ("failed to return tdesc");
}
-/* Callback for for_each_inferior. Calls the arch_setup routine for
- each process. */
-
-static void
-x86_arch_setup_process_callback (struct inferior_list_entry *entry)
-{
- int pid = ptid_get_pid (entry->id);
-
- /* Look up any thread of this processes. */
- current_thread = find_any_thread_of_pid (pid);
-
- the_low_target.arch_setup ();
-}
-
/* Update all the target description of all processes; a new GDB
connected, and it may or not support xml target descriptions. */
release the current regcache objects. */
regcache_release ();
- for_each_inferior (&all_processes, x86_arch_setup_process_callback);
+ for_each_process ([] (process_info *proc) {
+ int pid = proc->pid;
+
+ /* Look up any thread of this process. */
+ current_thread = find_any_thread_of_pid (pid);
+
+ the_low_target.arch_setup ();
+ });
current_thread = saved_thread;
}