From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27209 invoked by alias); 17 May 2012 17:35:25 -0000 Received: (qmail 26736 invoked by uid 22791); 17 May 2012 17:35:22 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 May 2012 17:35:07 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C15D81C6FED for ; Thu, 17 May 2012 13:35:06 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id i3yiB94NaazQ for ; Thu, 17 May 2012 13:35:06 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id F373F1C6FF7 for ; Thu, 17 May 2012 13:35:05 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 2586C145616; Thu, 17 May 2012 10:34:53 -0700 (PDT) Date: Thu, 17 May 2012 17:35:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: Re: [RFA/commit] procfs.c: Remove unused functions and make many functions static Message-ID: <20120517173453.GF10253@adacore.com> References: <1336000479-30511-1-git-send-email-brobecker@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1336000479-30511-1-git-send-email-brobecker@adacore.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00660.txt.bz2 > gdb/ChangeLog: > > * procfs.c (procfs_find_new_threads, procfs_pid_to_str, > proc_warn, proc_error, proc_get_status, proc_flags, > proc_why, proc_what, proc_nsysarg, proc_sysargs, > proc_set_run_on_last_close, proc_unset_run_on_last_close, > proc_unset_inherit_on_fork, proc_set_async, proc_unset_async, > proc_stop_process, proc_wait_for_stop, proc_run_process, > proc_set_traced_signals, proc_set_traced_faults, > proc_set_traced_sysentry, proc_set_traced_sysexit, > proc_set_held_signals, proc_get_held_signals, > proc_get_traced_signals, proc_get_traced_faults, > proc_get_traced_sysentry, proc_get_traced_sysexit, > proc_clear_current_fault, proc_set_current_signal, > proc_clear_current_signal, proc_get_gregs, proc_get_fpregs, > proc_set_gregs, proc_set_fpregs, proc_kill, proc_parent_pid, > proc_get_nthreads, proc_get_nthreads, proc_get_nthreads, > proc_get_current_thread, proc_get_current_thread, > proc_get_current_thread, proc_update_threads, > proc_update_threads, proc_update_threads, proc_update_threads, > proc_iterate_over_threads, procfs_find_new_threads, > procfs_pid_to_str): Make static. Remove advance declaration. > (proc_cursig): Make static. Conditionalized defintion on > PROCFS_DONT_PIOCSSIG_CURSIG being defined. > (proc_syscall, proc_set_kill_on_last_close, > proc_unset_kill_on_last_close, proc_set_inherit_on_fork, > proc_get_pending_signals, proc_get_signal_actions, > proc_trace_signal, proc_ignore_signal): Delete. [...] Maciej asked: > Hmm, here's a dumb question as a followup, following a situation I've > just experienced -- can this stuff be needed by anything external on > Solaris, similarly to some functions pulled from GDB by libthread_db.so.1 > from glibc? Sorry for the delay in answering this. I just couldn't find the time to look at it. I think we will be fine. Usually, implicit callbacks have a specific name that ties them to the external shared library that needs those callbacks, and the fact that the name of the functions being deleted start with the same prefix as the others is a little indicative that the odds of them being an implicit callback are small. Regardless, I did a little bit of research, and found that, AFAICT, this file is only used on sparc/x86/amd64-solaris, mips-irix¬ and alpha-tru64. I looked at the extra source files needed by these platforms, and none of them indicated that we would open a shared library that might call one of these functions. Just for kicks, I tested the patch on sparc-solaris using AdaCore's testsuite. So I have now checked the patch in. -- Joel