From: Andrew Burgess <andrew.burgess@embecosm.com>
To: gdb-patches@sourceware.org
Cc: Andrew Burgess <andrew.burgess@embecosm.com>
Subject: [PATCH 1/3] gdb: Convert TUI windows names to lower case.
Date: Wed, 08 Jul 2015 20:37:00 -0000 [thread overview]
Message-ID: <3bc8968ddcbfcfe0b407fca8fba170ff9eaf43c0.1436387456.git.andrew.burgess@embecosm.com> (raw)
In-Reply-To: <cover.1436387456.git.andrew.burgess@embecosm.com>
In-Reply-To: <cover.1436387456.git.andrew.burgess@embecosm.com>
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 <andrew.burgess@embecosm.com>
+
+ * 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 <patrick@parcs.ath.cx>
* 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 = "?";
--
2.4.0
next prev parent reply other threads:[~2015-07-08 20:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 20:37 [PATCH 0/3] convert tui window " Andrew Burgess
2015-07-08 20:37 ` [PATCH 3/3] gdb/tui: Use cleanups to free string copies Andrew Burgess
2015-07-08 20:37 ` Andrew Burgess [this message]
2015-07-08 20:37 ` [PATCH 2/3] gdb/tui: Define tui window names once Andrew Burgess
2015-07-08 20:52 ` [PATCH 0/3] convert tui window names to lower case Patrick Palka
2015-07-09 10:44 ` Pedro Alves
2015-07-09 12:53 ` Patrick Palka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3bc8968ddcbfcfe0b407fca8fba170ff9eaf43c0.1436387456.git.andrew.burgess@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox