[PATCH] D67554: [docs][llvm-strings] Write llvm-strings documentation
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 13 19:56:35 PDT 2019
MaskRay added inline comments.
================
Comment at: llvm/docs/CommandGuide/llvm-strings.rst:14
-:program:`llvm-strings` is a tool that prints strings in files. The goal is to
-make it a drop-in replacement for GNU's :program:`strings`.
+:program:`llvm-strings` is a tool that prints the strings contained in files. It
+is intended as a drop-in replacement for GNU's :program:`strings`, although
----------------
POSIX.1-2017 has a brief description.
> The strings utility shall look for printable strings in regular files and shall write those strings to standard output. A printable string is any sequence of four (by default) or more printable characters ...
If we follow its wording, we can merge this sentence with the sentence below:
> A series of bytes is considered to be a string if it consists of printable ASCII characters and is at least 4 characters long, or another length as specified by the :option:`--bytes` option
================
Comment at: llvm/docs/CommandGuide/llvm-strings.rst:16
+is intended as a drop-in replacement for GNU's :program:`strings`, although
+there are some differences.
+
----------------
> although there are some differences.
I assume you mean `-a`. Other binary utilities have differences with their GNU binutils counterparts, I am just wondering why you raise this point specifically for llvm-strings.
PS: Our behavior (always -a) conforms to POSIX:
> -a Scan files in their entirety. If -a is not specified, it is implementation-defined what portion of each file is scanned for strings.
================
Comment at: llvm/docs/CommandGuide/llvm-strings.rst:107
+ 609 main
+ $ llvm-strings --radix=x test.o
+ 22c _Z5hellov
----------------
Probably give an `-t x` example here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67554/new/
https://reviews.llvm.org/D67554
More information about the llvm-commits
mailing list