From patchwork Fri Sep 11 18:49:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 8649 Received: (qmail 54635 invoked by alias); 11 Sep 2015 18:49:59 -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 54594 invoked by uid 89); 11 Sep 2015 18:49:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL, BAYES_20, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail-wi0-f170.google.com Received: from mail-wi0-f170.google.com (HELO mail-wi0-f170.google.com) (209.85.212.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 11 Sep 2015 18:49:55 +0000 Received: by wiclk2 with SMTP id lk2so68248288wic.1 for ; Fri, 11 Sep 2015 11:49:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=iSICjDOjjYqLPqQAH/PqsvCVUES891SPvfvuuaOAnYo=; b=mACsXkBlxRb7KHrCtDyZ+YGI6TpenwxxoBw0YyjpUCZ+WSYM13u0Ugg6cPLZF+qVS7 vtnMdyUYdp6uJr0DrjBdhTRUH0fMWG46lX2IOLgGNQFWpbXTjK02BjZT+a7vSqunXyN5 xC+ACu0Iukw6EDq0+DAHLNzk0ag1zwWh9ACjM92mK8txSf5GYyod4F46Pn/fB2xpAcID n8WUYhKKkk7o6tA1Ufx+IxD0+MJtflKyOcnx+vWybaC8JbaII1Sl6MlEnkXaVlXiQEOW 52R4BBWXzvZYOK999ebZRG5O2N5snKa8ZJJXo76BDTmhJ39R+yIW/jKeST/CsN8vUZLl AZFQ== X-Gm-Message-State: ALoCoQnaNFkYuBc+ZFef4HX9gFacms0cqg7k0q9ObJaY6nTrJoaNIb1BLIPKpCvWV/330xn1/ZCz X-Received: by 10.180.184.134 with SMTP id eu6mr7220495wic.77.1441997392374; Fri, 11 Sep 2015 11:49:52 -0700 (PDT) Received: from localhost (host81-131-206-173.range81-131.btcentralplus.com. [81.131.206.173]) by smtp.gmail.com with ESMTPSA id t7sm462254wia.9.2015.09.11.11.49.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Sep 2015 11:49:51 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 3/9] gdb: Make use of safe-ctype.h header. Date: Fri, 11 Sep 2015 19:49:37 +0100 Message-Id: <208a01e3f21d7c7e2662a1d2199c4dedab668989.1441996064.git.andrew.burgess@embecosm.com> In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes In stack.c switch to using safe-ctype.h instead of ctype.h, update code as required. gdb/ChangeLog: * stack.c: Include safe-ctype.h not ctype.h. (parse_frame_specification): Use ISSPACE not isspace. (backtrace_command): Use TOLOWER not tolower. --- gdb/ChangeLog | 6 ++++++ gdb/stack.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 79952c7..50aa7f0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2015-09-11 Andrew Burgess + * stack.c: Include safe-ctype.h not ctype.h. + (parse_frame_specification): Use ISSPACE not isspace. + (backtrace_command): Use TOLOWER not tolower. + +2015-09-11 Andrew Burgess + * frame.h (make_restore_selected_frame_cleanup): Declare new function. * frame.c (do_restore_selected_frame): New function. diff --git a/gdb/stack.c b/gdb/stack.c index 82b366d..2fe176f 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -48,7 +48,7 @@ #include "cli/cli-utils.h" #include "objfiles.h" -#include +#include "safe-ctype.h" #include "symfile.h" #include "extension.h" @@ -1305,7 +1305,7 @@ parse_frame_specification_1 (const char *frame_exp, const char *message, /* Parse the argument, extract it, save it. */ for (p = frame_exp; - *p && !isspace (*p); + *p && !ISSPACE (*p); p++); addr_string = savestring (frame_exp, p - frame_exp); frame_exp = p; @@ -1904,7 +1904,7 @@ backtrace_command (char *arg, int from_tty) unsigned int j; for (j = 0; j < strlen (argv[i]); j++) - argv[i][j] = tolower (argv[i][j]); + argv[i][j] = TOLOWER (argv[i][j]); if (no_filters < 0 && subset_compare (argv[i], "no-filters")) no_filters = argc;