From patchwork Tue Jul 26 22:57:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 14014 Received: (qmail 117366 invoked by alias); 26 Jul 2016 22:57:33 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 117349 invoked by uid 89); 26 Jul 2016 22:57:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Fetch, Gustavo X-HELO: gproxy10-pub.mail.unifiedlayer.com X-Authority-Analysis: v=2.1 cv=AL9Ak13q c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=PnD2wP_eR3oA:10 a=Tcgfi3cSt00A:10 a=cAmyUtKerLwA:10 a=zstS-IiYAAAA:8 a=VnNF1IyMAAAA:8 a=mDV3o1hIAAAA:8 a=z51yHutVrkvajP81jsoA:9 a=4G6NA9xxw8l3yy4pmD5M:22 a=skCgnbhlp52w9zbo2JeP:22 a=_FVE-zBwftR9WsbkzFJk:22 From: Tom Tromey To: libc-alpha@sourceware.org Cc: Tom Tromey Subject: [PATCH][v2] [BZ#20311] Update and install proc_service.h Date: Tue, 26 Jul 2016 16:57:05 -0600 Message-Id: <1469573825-26506-1-git-send-email-tom@tromey.com> X-Identified-User: {36111:box522.bluehost.com:elynrobi:tromey.com} {sentby:smtp auth 75.166.120.30 authed with tom+tromey.com} X-Exim-ID: 1bSBHn-0007P2-B5 X-Source-Sender: (bapiya.localdomain) [75.166.120.30]:48358 X-Source-Auth: tom+tromey.com X-Email-Count: 0 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== This adds an include guard and __BEGIN/__END_DECLS to proc_service.h, removes some extraneous "const"s, and then arranges to install the header. The idea here is to make it more convenient to implement the proc_service.h API. This fixes BZ#20311. Tested by rebuilding and installing; then examining the output of "gcc -E", both for C and C++, with the installed header. --- ChangeLog | 10 ++++++++++ nptl_db/Makefile | 2 +- nptl_db/proc_service.h | 19 ++++++++++++++----- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7b67d6..848a4cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2016-07-26 Tom Tromey + + [BZ #20311] + * nptl_db/Makefile (headers): Add proc_service.h. + * nptl_db/proc_service.h: Add include guard. Use + __BEGIN/__END_DECLS. + (ps_get_thread_area, ps_pstop, ps_pcontinue, ps_lstop) + (ps_lcontinue): Remove "const" from "struct ps_prochandle *" + arguments. + 2016-07-21 Gustavo Romero * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Fix missing verb diff --git a/nptl_db/Makefile b/nptl_db/Makefile index 849a73f..bc20440 100644 --- a/nptl_db/Makefile +++ b/nptl_db/Makefile @@ -26,7 +26,7 @@ nptl_db-version = 1.0 extra-libs = libthread_db extra-libs-others := $(extra-libs) -headers = thread_db.h sys/procfs.h +headers = proc_service.h thread_db.h sys/procfs.h libthread_db-routines = td_init td_log td_ta_new td_ta_delete \ td_ta_get_nthreads td_ta_get_ph \ diff --git a/nptl_db/proc_service.h b/nptl_db/proc_service.h index c1c139f..109962d 100644 --- a/nptl_db/proc_service.h +++ b/nptl_db/proc_service.h @@ -16,9 +16,14 @@ License along with the GNU C Library; if not, see . */ +#ifndef _PROC_SERVICE_H +#define _PROC_SERVICE_H 1 + /* The definitions in this file must correspond to those in the debugger. */ #include +__BEGIN_DECLS + /* Functions in this interface return one of these status codes. */ typedef enum { @@ -64,7 +69,7 @@ extern pid_t ps_getpid (struct ps_prochandle *); /* Fetch the special per-thread address associated with the given LWP. This call is only used on a few platforms (most use a normal register). The meaning of the `int' parameter is machine-dependent. */ -extern ps_err_e ps_get_thread_area (const struct ps_prochandle *, +extern ps_err_e ps_get_thread_area (struct ps_prochandle *, lwpid_t, int, psaddr_t *); @@ -78,9 +83,13 @@ extern ps_err_e ps_pglobal_lookup (struct ps_prochandle *, /* Stop or continue the entire process. */ -extern ps_err_e ps_pstop (const struct ps_prochandle *); -extern ps_err_e ps_pcontinue (const struct ps_prochandle *); +extern ps_err_e ps_pstop (struct ps_prochandle *); +extern ps_err_e ps_pcontinue (struct ps_prochandle *); /* Stop or continue the given LWP alone. */ -extern ps_err_e ps_lstop (const struct ps_prochandle *, lwpid_t); -extern ps_err_e ps_lcontinue (const struct ps_prochandle *, lwpid_t); +extern ps_err_e ps_lstop (struct ps_prochandle *, lwpid_t); +extern ps_err_e ps_lcontinue (struct ps_prochandle *, lwpid_t); + +__END_DECLS + +#endif /* proc_service.h */