aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracefile.c
diff options
context:
space:
mode:
authorSergio Durigan Junior <sergiodj@redhat.com>2017-04-05 12:28:30 -0400
committerSergio Durigan Junior <sergiodj@redhat.com>2017-04-05 12:28:30 -0400
commit4a596fe20e93109300e841a3d0ee5f198146ab6d (patch)
tree8cdea12126f8ade6d734560d41dfec460fec8040 /gdb/tracefile.c
parent2cad08ea7dbc96103da9957da6973f9d0dbc33a8 (diff)
downloadgdb-4a596fe20e93109300e841a3d0ee5f198146ab6d.zip
gdb-4a596fe20e93109300e841a3d0ee5f198146ab6d.tar.gz
gdb-4a596fe20e93109300e841a3d0ee5f198146ab6d.tar.bz2
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 <sergiodj@redhat.com> PR gdb/21352 * tracefile.c (tsave_command): Fix argument parsing for '-r' option.
Diffstat (limited to 'gdb/tracefile.c')
-rw-r--r--gdb/tracefile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/tracefile.c b/gdb/tracefile.c
index 641ad4d..cc90945 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);