From patchwork Sat May 11 07:20:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "G. Branden Robinson" X-Patchwork-Id: 32643 Received: (qmail 60058 invoked by alias); 11 May 2019 07:21:07 -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 60049 invoked by uid 89); 11 May 2019 07:21:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Received:Sat, displays, italic, buster X-HELO: mail-pf1-f180.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=JnCOHSR66vdVPGLgu/N56uYJJgjRenJctcWL9x851PU=; b=mwENelGmt0ssD9c/bHJr+IjBH1ffeeQs19EpsWe+aZDLdxhkZZzDWxHRELNBZefE74 oAqdY0Sx2Wntxwq+NNav3X6Eej5vr1IN7y+gaUUXLVtckO4cst3h+Uj4SWjbO/aFKi9N 7rIE0wdY6Hh6ZpZYPPu89UCBqtywtUsnUfVcFE2DNnQAuBGBIjH25LLgusv0SUiPvN2g 12ryoPrgixdxdWd1WC0xWvTeZLzSTui9ghWaer5zaFn3Nw/lU86luU1uV+w4hVRofV8s AgsF/Dy5A9Q+F4Rgn8mAjpSOgIUhyhGQcr91tspjmMkIC28LEB3mOphP+KcDt2P1XpQU QMow== Return-Path: Date: Sat, 11 May 2019 17:20:52 +1000 From: "G. Branden Robinson" To: mtk.manpages@gmail.com Cc: linux-man@vger.kernel.org, libc-alpha@sourceware.org Subject: [PATCH] pldd.1: Document glibc's unbreakage of tool. Message-ID: <20190511072049.2w7pp723iszp3gra@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20180716 ...plus a patch with some suggested wording fixes. ...plus a patch with some suggestions on improving the formatting and markup. Regards, Branden From 9285fe1b80cfbb52cfeff33372338a8c4728d47b Mon Sep 17 00:00:00 2001 From: "G. Branden Robinson" Date: Sat, 11 May 2019 16:38:39 +1000 Subject: [PATCH 3/3] pldd.1: srcfix, ffix, wfix, wsfix * [srcfix] Migrate Synopsis section from no-fill mode to no-adjust mode. This way you can break the pieces of a synopsis output line across multiple input lines, use the easy one-font macros, and worry less about quotation issues. (My best recommendation would be to go ahead and use groff_man's .SY/.YS extensions--but not .OP--for synopsis sections, but I think this was considered and rejected a couple of years ago.) * [wfix] Actually list the available options in the synopsis. There aren't many for pldd and they won't even line-wrap on an 80-column terminal. (not technically a ffix) * [srcfix] Use .RS for indentation instead of low-level .in requests. It's my belief that .RS and .RE pairs require less bookkeeping. * [srcfix] Use \c (the output line continuation escape) in examples to facilitate style (bold, italic) changes within a line. The result is more attractive and intuitive, particularly enabling italicization of paramaters in examples. * [srcfix] Use font macros instead of font escapes in examples. This is more readable, and helped to expose the next problem. * [ffix] Consistently escape all hyphens used as option dashes in gdb example. * [wsfix] Eliminate hard tab from input file, replacing it (in an example) with an appropriate number of non-adjustable spaces. (Whether this is a srcfix or wsfix depends on the output device and user configuration, which is, I submit, why we don't want to use hard tabs in the first place.) Signed-off-by: G. Branden Robinson --- man1/pldd.1 | 48 +++++++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/man1/pldd.1 b/man1/pldd.1 index 035368e20..33245d0d5 100644 --- a/man1/pldd.1 +++ b/man1/pldd.1 @@ -26,10 +26,15 @@ .SH NAME pldd \- display dynamic shared objects linked into a process .SH SYNOPSIS -.nf -.BI "pldd " "pid" -.BI pldd " option" -.fi +.na +.B pldd +.I pid +.PP +.B pldd +.RB [ \-? | \-\-help ] +.RB [ \-\-usage ] +.RB [ \-V | \-\-version ] +.ad .SH DESCRIPTION The .B pldd @@ -71,14 +76,17 @@ have a similar command. .SH NOTES The command .PP -.in +4n +.RS 4n .EX -lsof \-p PID +$ \c +.B lsof \-p \c +.I pid .EE -.in +.RE .PP also shows output that includes the dynamic shared objects -that are linked into a process. +that are linked into the process +.IR pid . .PP The .BR gdb (1) @@ -87,15 +95,19 @@ command also shows the shared libraries being used by a process, so that one can obtain similar output to .B pldd using a command such as the following -(to monitor the process with the specified -.IR pid ): +(to monitor the process with the specified PID): .PP -.in +4n +.RS 4n .EX -$ \fBgdb \-ex "set confirm off" \-ex "set height 0" \-ex "info shared" \e\fP - \fB-ex "quit" \-p $pid | grep '^0x.*0x'\fP +$ \c +.B gdb \-ex "set confirm off" \-ex "set height 0" \-ex "info shared" \e +.RS 8n +.B \-ex quit \-p \c +.I pid \c +.B | grep \(aq\(ti0x.*0x\(aq +.RE .EE -.in +.RE .SH BUGS From glibc 2.19 to 2.29, .B pldd @@ -104,10 +116,12 @@ was broken: it just hung when executed. This problem was fixed in glibc 2.30. .SH EXAMPLE .EX -$ \fBecho $$\fP # Display PID of shell +$ \c +.BR "echo $$" " # Display PID of the running shell." 1143 -$ \fBpldd $$\fP # Display DSOs linked into the shell -1143: /usr/bin/bash +$ \c +.BR "pldd $$" " # Display DSOs linked into the shell." +1143:\ \ \ /usr/bin/bash linux\-vdso.so.1 /lib64/libtinfo.so.5 /lib64/libdl.so.2 -- 2.20.1