X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fprocfs.c;h=b62539f038105e075e672a40b646fe673dca5e9f;hb=4bfb94b8648cebad2683d24ebe033ef539df1dbb;hp=699fcd97fee41cadd1559783dfece8b7c59f60f5;hpb=f37f681c2bb884e74cd33340617a6d1a408d1a75;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/procfs.c b/gdb/procfs.c index 699fcd97fe..b62539f038 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -1,6 +1,6 @@ /* Machine independent support for SVR4 /proc (process file system) for GDB. - Copyright (C) 1999-2014 Free Software Foundation, Inc. + Copyright (C) 1999-2015 Free Software Foundation, Inc. Written by Michael Snyder at Cygnus Solutions. Based on work by Fred Fish, Stu Grossman, Geoff Noer, and others. @@ -133,7 +133,7 @@ static target_xfer_partial_ftype procfs_xfer_partial; static int procfs_thread_alive (struct target_ops *ops, ptid_t); -static void procfs_find_new_threads (struct target_ops *ops); +static void procfs_update_thread_list (struct target_ops *ops); static char *procfs_pid_to_str (struct target_ops *, ptid_t); static int proc_find_memory_regions (struct target_ops *self, @@ -196,7 +196,7 @@ procfs_target (void) t->to_files_info = procfs_files_info; t->to_stop = procfs_stop; - t->to_find_new_threads = procfs_find_new_threads; + t->to_update_thread_list = procfs_update_thread_list; t->to_thread_alive = procfs_thread_alive; t->to_pid_to_str = procfs_pid_to_str; @@ -2917,16 +2917,9 @@ procfs_debug_inferior (procinfo *pi) sysset_t *traced_syscall_exits; int status; -#ifdef PROCFS_DONT_TRACE_FAULTS - /* On some systems (OSF), we don't trace hardware faults. - Apparently it's enough that we catch them as signals. - Wonder why we don't just do that in general? */ - premptyset (&traced_faults); /* don't trace faults. */ -#else /* Register to trace hardware faults in the child. */ prfillset (&traced_faults); /* trace all faults... */ gdb_prdelset (&traced_faults, FLTPAGE); /* except page fault. */ -#endif if (!proc_set_traced_faults (pi, &traced_faults)) return __LINE__; @@ -4227,16 +4220,6 @@ unconditionally_kill_inferior (procinfo *pi) int parent_pid; parent_pid = proc_parent_pid (pi); -#ifdef PROCFS_NEED_CLEAR_CURSIG_FOR_KILL - /* FIXME: use access functions. */ - /* Alpha OSF/1-3.x procfs needs a clear of the current signal - before the PIOCKILL, otherwise it might generate a corrupted core - file for the inferior. */ - if (ioctl (pi->ctl_fd, PIOCSSIG, NULL) < 0) - { - printf_filtered ("unconditionally_kill: SSIG failed!\n"); - } -#endif #ifdef PROCFS_NEED_PIOCSSIG_FOR_KILL /* Alpha OSF/1-2.x procfs needs a PIOCSSIG call with a SIGKILL signal to kill the inferior, otherwise it might remain stopped with a @@ -4646,7 +4629,7 @@ procfs_inferior_created (struct target_ops *ops, int from_tty) #endif } -/* Callback for find_new_threads. Calls "add_thread". */ +/* Callback for update_thread_list. Calls "add_thread". */ static int procfs_notice_thread (procinfo *pi, procinfo *thread, void *ptr) @@ -4663,10 +4646,12 @@ procfs_notice_thread (procinfo *pi, procinfo *thread, void *ptr) back to GDB to add to its list. */ static void -procfs_find_new_threads (struct target_ops *ops) +procfs_update_thread_list (struct target_ops *ops) { procinfo *pi; + prune_threads (); + /* Find procinfo for main process. */ pi = find_procinfo_or_die (ptid_get_pid (inferior_ptid), 0); proc_update_threads (pi); @@ -5334,7 +5319,7 @@ procfs_do_thread_registers (bfd *obfd, ptid_t ptid, /* This part is the old method for fetching registers. It should be replaced by the newer one using regsets once it is implemented in this platform: - gdbarch_regset_from_core_section() and regset->collect_regset(). */ + gdbarch_iterate_over_regset_sections(). */ old_chain = save_inferior_ptid (); inferior_ptid = ptid;