From patchwork Wed Apr 5 16:31:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Durigan Junior X-Patchwork-Id: 19869 Received: (qmail 123669 invoked by alias); 5 Apr 2017 16:31:36 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 123643 invoked by uid 89); 5 Apr 2017 16:31:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Apr 2017 16:31:34 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6A58819CBD1 for ; Wed, 5 Apr 2017 16:31:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6A58819CBD1 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=sergiodj@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6A58819CBD1 Received: from psique.yyz.redhat.com (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7703383113; Wed, 5 Apr 2017 16:31:32 +0000 (UTC) From: Sergio Durigan Junior To: GDB Patches Cc: Sergio Durigan Junior Subject: [commit/obvious] Fix PR 21352: Command tsave does not support -r argument Date: Wed, 5 Apr 2017 12:31:29 -0400 Message-Id: <20170405163129.24815-1-sergiodj@redhat.com> X-IsSubscribed: yes 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. --- gdb/ChangeLog | 6 ++++++ gdb/tracefile.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c3999b6..4141beb 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 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);