[PATCH] D56272: [llvm-symbolizer] Add support for specifying input addresses on the command-line
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 9 09:41:38 PST 2019
jhenderson added a comment.
Thanks @ruiu!
================
Comment at: test/tools/llvm-symbolizer/basic.s:11-13
+# RUN: echo 0xa > %t1.input
+# RUN: echo 0xb >> %t1.input
+# RUN: llvm-symbolizer --obj=%t.o < %t1.input | FileCheck %s
----------------
ruiu wrote:
> Why don't you do
>
> echo "0xa 0xb" | llvm-symbolizer ...
>
> ?
When fed in via stdin, each input needs to be on a new line. I'm not sure I know a way to do this with a single echo command.
================
Comment at: tools/llvm-symbolizer/llvm-symbolizer.cpp:202-204
+ while (true) {
+ if (!fgets(InputString, sizeof(InputString), stdin))
+ break;
----------------
ruiu wrote:
> Now it is more straightforward to move `fgets` inside the `while` condition?
I'm actually not sure why this couldn't have been done before.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56272/new/
https://reviews.llvm.org/D56272
More information about the llvm-commits
mailing list