libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] [PATCH 4/5] Fix test-ptrace argument parsing.


From: Ken Werner
Subject: [Libunwind-devel] [PATCH 4/5] Fix test-ptrace argument parsing.
Date: Wed, 2 Mar 2011 17:40:09 +0100

From: Zachary T Welch <address@hidden>

Avoids an endless loop when passing unknown options.

Signed-off-by: Zachary T Welch <address@hidden>
Signed-off-by: Ken Werner <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]