From: Zachary T Welch <[email protected]>

Avoids an endless loop when passing unknown options.

Signed-off-by: Zachary T Welch <[email protected]>
Signed-off-by: Ken Werner <[email protected]>
---
 tests/test-ptrace.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tests/test-ptrace.c b/tests/test-ptrace.c
index b7de682..c9f8f2e 100644
--- a/tests/test-ptrace.c
+++ b/tests/test-ptrace.c
@@ -202,6 +202,8 @@ main (int argc, char **argv)
        else if (strcmp (argv[optind], "-n") == 0)
          /* Don't look-up and print symbol names.  */
          ++optind, print_names = 0;
+       else
+         fprintf(stderr, "unrecognized option: %s\n", argv[optind++]);
       }
 
   target_pid = fork ();
-- 
1.7.4.1


_______________________________________________
Libunwind-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/libunwind-devel

Reply via email to