From: Sergio Durigan Junior Date: Wed, 5 Apr 2017 16:28:30 +0000 (-0400) Subject: Fix PR 21352: Command tsave does not support -r argument X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a596fe20e93109300e841a3d0ee5f198146ab6d;p=binutils-gdb.git Fix PR 21352: Command tsave does not support -r argument This is an obvious fix for PR 21352. The problem is that the argument parsing loop is not using an "else if" where it should, and therefore the '-r' option ends up unrecognized by GDB. gdb/ChangeLog: 2017-04-05 Sergio Durigan Junior PR gdb/21352 * tracefile.c (tsave_command): Fix argument parsing for '-r' option. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c3999b67c44..4141beb64b7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2017-04-05 Sergio Durigan Junior + + PR gdb/21352 + * tracefile.c (tsave_command): Fix argument parsing for '-r' + option. + 2017-04-05 Yao Qi * frame.c (frame_unwind_register_unsigned): Call diff --git a/gdb/tracefile.c b/gdb/tracefile.c index 641ad4d9370..cc90945bb2a 100644 --- a/gdb/tracefile.c +++ b/gdb/tracefile.c @@ -325,7 +325,7 @@ tsave_command (char *args, int from_tty) { if (strcmp (*argv, "-r") == 0) target_does_save = 1; - if (strcmp (*argv, "-ctf") == 0) + else if (strcmp (*argv, "-ctf") == 0) generate_ctf = 1; else if (**argv == '-') error (_("unknown option `%s'"), *argv);