From patchwork Wed Jul 8 20:37:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 7592 Received: (qmail 60753 invoked by alias); 8 Jul 2015 20:37:48 -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 59119 invoked by uid 89); 8 Jul 2015 20:37:43 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-wi0-f182.google.com Received: from mail-wi0-f182.google.com (HELO mail-wi0-f182.google.com) (209.85.212.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 08 Jul 2015 20:37:43 +0000 Received: by wifm2 with SMTP id m2so100562772wif.1 for ; Wed, 08 Jul 2015 13:37:40 -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=dQ8QJw9xxhySuUnXMmgu0meGVNENNiBsaZ0ecztPxNY=; b=Cm8kAKawDMIQCvBtsJXkQyk6cDt1CIlbqUBcAtklkkJbfjGWIEErahTSL+rqXsQsRt embwZt//wCR9u4kioa+phbdIYLxOwB7iSz2av0CuzPH+1fsbaG7VoyNdUu6n62VI1paS HbkCmNpJk+d4j7dShMs3RJoDBVj8q+vsS4o0tbPtujyduwE5xR0bhj1vpOdE94uFIjVM H54cOnIqh1zALeWNw4yPCXlJO7AT3Ov9W8sBMJejx3gUZ9L9Af9kuLv5m9z3zHoONA4T h+woPsFq6SlavxVIhurrWKWRJjxZC1oeciPb33YxfZwwvwqNeWQY3b4WN+iV5qcCkrNU gReQ== X-Gm-Message-State: ALoCoQnMcy651X2+R+j3qw523XNWcqvLfx/2/0edK6QDZSnCGa3ctmeL6zkp4eNScbyZ3MR9m0tZ X-Received: by 10.180.102.233 with SMTP id fr9mr97991936wib.3.1436387860485; Wed, 08 Jul 2015 13:37:40 -0700 (PDT) Received: from localhost (host81-158-4-174.range81-158.btcentralplus.com. [81.158.4.174]) by smtp.gmail.com with ESMTPSA id r6sm4674955wiy.13.2015.07.08.13.37.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jul 2015 13:37:39 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 1/3] gdb: Convert TUI windows names to lower case. Date: Wed, 8 Jul 2015 21:37:28 +0100 Message-Id: <3bc8968ddcbfcfe0b407fca8fba170ff9eaf43c0.1436387456.git.andrew.burgess@embecosm.com> In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes This commit converts the window names for the TUI windows to lower case. The windows names are already lower case in the documentation, and are shown as lower case in some of the command completion results. Given that all the commands that take a window name currently accept upper or lower case, this commit just changes the window names to lower case in the remaining places they are displayed by gdb. gdb/ChangeLog: * tui/tui-data.h (SRC_NAME): Convert to lower case. (CMD_NAME): Likewise. (DATA_NAME): Likewise. (DISASSEM_NAME): Likewise. * tui/tui-win.c (tui_set_focus): Window names are now lower case. (tui_set_win_height): Likewise. (parse_scrolling_args): Likewise. --- gdb/ChangeLog | 10 ++++++++++ gdb/tui/tui-data.h | 8 ++++---- gdb/tui/tui-win.c | 10 +++++----- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3bdb099..2e889e9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2015-07-06 Andrew Burgess + + * tui/tui-data.h (SRC_NAME): Convert to lower case. + (CMD_NAME): Likewise. + (DATA_NAME): Likewise. + (DISASSEM_NAME): Likewise. + * tui/tui-win.c (tui_set_focus): Window names are now lower case. + (tui_set_win_height): Likewise. + (parse_scrolling_args): Likewise. + 2015-07-08 Patrick Palka * defs.h (deprecated_register_changed_hook): Remove prototype. diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index 1b9d832..0e7e31e 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -60,10 +60,10 @@ struct tui_gen_win_info #define NO_REGS_STRING "[ Register Values Unavailable ]" #define NO_DATA_STRING "[ No Data Values Displayed ]" #define MAX_CONTENT_COUNT 100 -#define SRC_NAME "SRC" -#define CMD_NAME "CMD" -#define DATA_NAME "REGS" -#define DISASSEM_NAME "ASM" +#define SRC_NAME "src" +#define CMD_NAME "cmd" +#define DATA_NAME "regs" +#define DISASSEM_NAME "asm" #define TUI_NULL_STR "" #define DEFAULT_HISTORY_COUNT 25 #define BOX_WINDOW TRUE diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index 629d54d..215a7f5 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -1036,11 +1036,11 @@ tui_set_focus (char *arg, int from_tty) struct tui_win_info *win_info = (struct tui_win_info *) NULL; for (i = 0; (i < strlen (buf_ptr)); i++) - buf_ptr[i] = toupper (arg[i]); + buf_ptr[i] = tolower (arg[i]); - if (subset_compare (buf_ptr, "NEXT")) + if (subset_compare (buf_ptr, "next")) win_info = tui_next_win (tui_win_with_focus ()); - else if (subset_compare (buf_ptr, "PREV")) + else if (subset_compare (buf_ptr, "prev")) win_info = tui_prev_win (tui_win_with_focus ()); else win_info = tui_partial_win_by_name (buf_ptr); @@ -1167,7 +1167,7 @@ tui_set_win_height (char *arg, int from_tty) /* Validate the window name. */ for (i = 0; i < strlen (wname); i++) - wname[i] = toupper (wname[i]); + wname[i] = tolower (wname[i]); win_info = tui_partial_win_by_name (wname); if (win_info == (struct tui_win_info *) NULL @@ -1689,7 +1689,7 @@ parse_scrolling_args (char *arg, /* Validate the window name. */ for (i = 0; i < strlen (wname); i++) - wname[i] = toupper (wname[i]); + wname[i] = tolower (wname[i]); } else wname = "?";