1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-29 10:17:38 +01:00

Fix test-ptrace argument parsing.

Avoids an endless loop when passing unknown options.

Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
Signed-off-by: Ken Werner <ken.werner@linaro.org>
This commit is contained in:
Zachary T Welch 2011-03-02 17:40:09 +01:00 committed by Arun Sharma
parent 4a89b88fd3
commit 13cd3b0c26

View file

@ -202,6 +202,8 @@ main (int argc, char **argv)
else if (strcmp (argv[optind], "-n") == 0) else if (strcmp (argv[optind], "-n") == 0)
/* Don't look-up and print symbol names. */ /* Don't look-up and print symbol names. */
++optind, print_names = 0; ++optind, print_names = 0;
else
fprintf(stderr, "unrecognized option: %s\n", argv[optind++]);
} }
target_pid = fork (); target_pid = fork ();