From: Eli Zaretskii <eliz@gnu.org>
To: Keith Seitz <keiths@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Add gstack script
Date: Fri, 13 Dec 2024 09:36:38 +0200 [thread overview]
Message-ID: <86ttb8xce1.fsf@gnu.org> (raw)
In-Reply-To: <08a19a3debe4a1e3c6072a807e79566277a7c0dc.1734022384.git.keiths@redhat.com> (message from Keith Seitz on Thu, 12 Dec 2024 13:07:41 -0800)
> From: Keith Seitz <keiths@redhat.com>
> Date: Thu, 12 Dec 2024 13:07:41 -0800
>
> --- Changes in v2
> - Review feedback from Andrew Burgess
> o Don't chmod gstack.in in configure.ac.
> o Fix testsuite issues which could mislead users into thinking
> that tests succeeded when they did not.
> ---
Thanks.
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -62,6 +62,9 @@
> * Support for process record/replay and reverse debugging on loongarch*-linux*
> targets has been added.
>
> +* Newly installed $prefix/bin/gstack uses GDB to print stack traces of
> + running processes.
This is okay, but please say that gstack is a Bash shell script.
Also, what did you want to say by the "newly installed" part?
> +@node gstack man
> +@heading gstack
> +
> +@c man title gstack Print a stack trace of a running program
> +
> +@format
> +@c man begin SYNOPSIS gstack
> +gstack [-h | --help] [-v | --version] @var{pid}
> +@c man end
> +@end format
> +
> +@c man begin DESCRIPTION gstack
> +Print a stack trace of a running program with process ID @var{pid}. If the process
> +is multi-threaded, @command{gstack} outputs backtraces for every thread which exists
> +in the process.
> +@c man end
> +
> +@c man begin OPTIONS gstack
> +@table @env
> +@item --help
> +@itemx -h
> +List all options, with brief explanations.
> +
> +@item --version
> +@itemx -v
> +Print version information and then exit.
> +@end table
> +@c man end
> +
> +@c man begin SEEALSO gstack
> +@ifset man
> +The full documentation for @value{GDBN} is maintained as a Texinfo manual.
> +If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo
> +documentation are properly installed at your site, the command
> +
> +@smallexample
> +info gdb
> +@end smallexample
> +
> +@noindent
> +should give you access to the complete manual.
> +
> +@cite{Using GDB: A Guide to the GNU Source-Level Debugger},
> +Richard M. Stallman and Roland H. Pesch, July 1991.
> +@end ifset
> +@c man end
Is that all we want to tell in the manual about the script? Even for
a man page this is quite terse. Can we expand on this some more? At
the very least I think we should tell that the script invokes G|DB to
attach to the program and produce the backtraces, then detaches from
the program. Also, perhaps tell what happens if PID identifies a
non-existent process?
> +awk -- "$awk_script"
What if the system has only gawk or nawk or mawk? Should the literal
"awk" be a variable?
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
next prev parent reply other threads:[~2024-12-13 7:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 18:18 [PATCH] " Keith Seitz
2024-12-11 16:51 ` Andrew Burgess
2024-12-11 16:58 ` Keith Seitz
2024-12-12 21:07 ` [PATCH v2] " Keith Seitz
2024-12-13 7:36 ` Eli Zaretskii [this message]
2024-12-13 18:21 ` Keith Seitz
2024-12-13 19:04 ` Eli Zaretskii
2024-12-13 19:45 ` Tom Tromey
2024-12-13 19:57 ` Keith Seitz
2024-12-18 18:05 ` [PATCH v3] " Keith Seitz
2024-12-18 19:22 ` Eli Zaretskii
2024-12-18 21:47 ` Keith Seitz
2024-12-20 16:15 ` Tom Tromey
2024-12-20 18:18 ` Keith Seitz
2024-12-20 18:26 ` Tom Tromey
2024-12-20 20:47 ` Keith Seitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86ttb8xce1.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox