Commit Graph

12 Commits

Author SHA1 Message Date
Saleem Abdulrasool
4c5684d092 llvm-strings: remove default for -Wcovered-switch-default
Fix the -Werror build by removing the unnecessary default case in the
covered switch.  NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292708 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-21 02:52:29 +00:00
Saleem Abdulrasool
6d72920b21 llvm-strings: add support for -t
Allow printing the file content offset via the `-t` or `--radix` option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292707 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-21 02:36:28 +00:00
Saleem Abdulrasool
fe23a5c29f llvm-strings: support the -n option
Permit specifying the match length (the `-n` or `--bytes` option).  The
deprecated `-[length]` form is not supported as an option.  This allows the
strings tool to display only the specified length strings rather than the
hardcoded default length of >= 4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286914 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-15 00:43:52 +00:00
Saleem Abdulrasool
4da3d72a9b Revert "Revert "llvm-strings: support printing the filename""
Change the dynamic files to static in the hope that it will actually fix the
transient errors that Ive been unable to reproduce.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286891 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-14 21:10:41 +00:00
Renato Golin
bdeedc78d8 Revert "llvm-strings: support printing the filename"
Also,

Revert "test: remove the archive before modifying it"
Revert "test: explicitly use gnu format"

This reverts commits r286778, r286729 and r286767, as they are randomly failing
on many bots (AArch64, x86_64).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286820 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-14 13:09:24 +00:00
Saleem Abdulrasool
c99852c60e llvm-strings: support printing the filename
This adds support for the `-f` or `--print-file-name` option for strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286767 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-13 19:07:48 +00:00
Saleem Abdulrasool
98825db755 llvm-strings: trivialise logic until we support more options
Until we have handling for ignoring unloaded sections, simplify the logic to
the point of triviality.  This fixes the scanning of archives, particularly when
embedded in archives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286727 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 18:37:04 +00:00
Saleem Abdulrasool
421c744b29 llvm-strings: ensure that the last string is correctly printed
We would ignore the last string that appeared if the file ended with a printable
character.  Ensure that we get the last string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286706 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 03:39:21 +00:00
NAKAMURA Takumi
49e462805d llvm-strings: Fix r286556 to add required libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286594 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 14:17:37 +00:00
Mehdi Amini
274b04e1a0 Fix build failure, update llvm-strings for the new Error API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286563 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 04:50:18 +00:00
Saleem Abdulrasool
ca29721046 llvm-strings: explicitly include cctype
Include the cctype header to try to fix windows bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286558 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 04:00:59 +00:00
Saleem Abdulrasool
6a1b55e1ea llvm-strings: introduce basic strings tool
This is a replacement to binutils' string tool.  It prints strings found in a
binary (object file, executable, or archive library).  It is rather bare and
not functionally equivalent, however, it lays the groundwork necessary for the
strings tool, enabling iterative development of features to reach feature
parity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286556 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 03:44:12 +00:00