]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix PR 21352: Command tsave does not support -r argument
authorSergio Durigan Junior <sergiodj@redhat.com>
Wed, 5 Apr 2017 16:28:30 +0000 (12:28 -0400)
committerSergio Durigan Junior <sergiodj@redhat.com>
Wed, 5 Apr 2017 16:28:30 +0000 (12:28 -0400)
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  <sergiodj@redhat.com>

PR gdb/21352
* tracefile.c (tsave_command): Fix argument parsing for '-r'
option.

gdb/ChangeLog
gdb/tracefile.c

index c3999b67c4412fa2c55f1d1829d0495e429eaa72..4141beb64b7b758423d22e2dc78565147ae57df8 100644 (file)
@@ -1,3 +1,9 @@
+2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+       PR gdb/21352
+       * tracefile.c (tsave_command): Fix argument parsing for '-r'
+       option.
+
 2017-04-05  Yao Qi  <yao.qi@linaro.org>
 
        * frame.c (frame_unwind_register_unsigned): Call
index 641ad4d93704b21db270ca8f1926777249635611..cc90945bb2abfc9d017c1234e6759c000b016001 100644 (file)
@@ -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);