aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-07-06 17:32:45 -0600
committerTom Tromey <tom@tromey.com>2019-08-15 12:29:28 -0600
commitee556432c44dd5dbcf22c4086774bd29ded5b208 (patch)
tree1a630bfcb4538dcff45b6e56ed647f0e723ab34d
parent46f438e3d57bae1d74ab9a7e6cba380b0e58f552 (diff)
downloadgdb-ee556432c44dd5dbcf22c4086774bd29ded5b208.zip
gdb-ee556432c44dd5dbcf22c4086774bd29ded5b208.tar.gz
gdb-ee556432c44dd5dbcf22c4086774bd29ded5b208.tar.bz2
Rename the "reset" method to "resize"
tui_gen_win_info::reset really just resizes the window. This patch renames it to reflect this. gdb/ChangeLog 2019-08-15 Tom Tromey <tom@tromey.com> * tui/tui-winsource.h (struct tui_source_window_base) <resize>: Rename from reset. * tui/tui-winsource.c (tui_source_window_base::resize): Rename. * tui/tui-layout.c (show_source_disasm_command, show_data): Update. (tui_gen_win_info::resize): Rename. (show_source_or_disasm_and_command): Update. * tui/tui-data.h (struct tui_gen_win_info) <resize>: Rename from reset.
-rw-r--r--gdb/ChangeLog12
-rw-r--r--gdb/tui/tui-data.h6
-rw-r--r--gdb/tui/tui-layout.c74
-rw-r--r--gdb/tui/tui-winsource.c10
-rw-r--r--gdb/tui/tui-winsource.h4
5 files changed, 59 insertions, 47 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f7ed59e..26741a1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,17 @@
2019-08-15 Tom Tromey <tom@tromey.com>
+ * tui/tui-winsource.h (struct tui_source_window_base) <resize>:
+ Rename from reset.
+ * tui/tui-winsource.c (tui_source_window_base::resize): Rename.
+ * tui/tui-layout.c (show_source_disasm_command, show_data):
+ Update.
+ (tui_gen_win_info::resize): Rename.
+ (show_source_or_disasm_and_command): Update.
+ * tui/tui-data.h (struct tui_gen_win_info) <resize>: Rename from
+ reset.
+
+2019-08-15 Tom Tromey <tom@tromey.com>
+
* tui/tui-stack.c (tui_initialize_static_data): Remove.
* tui/tui-interp.c (tui_interp::init): Don't call
tui_initialize_static_data.
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index eaf3e06..329fafc 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -62,10 +62,10 @@ public:
return "";
}
- /* Reset this window. The parameters are used to set the window's
+ /* Resize this window. The parameters are used to set the window's
size and position. */
- virtual void reset (int height, int width,
- int origin_x, int origin_y);
+ virtual void resize (int height, int width,
+ int origin_x, int origin_y);
/* Return true if this can be boxed. */
virtual bool can_box () const
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index d10c9a0..c7facc9 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -510,10 +510,10 @@ show_source_disasm_command (void)
if (TUI_SRC_WIN == NULL)
tui_win_list[SRC_WIN] = new tui_source_window ();
- TUI_SRC_WIN->reset (src_height,
- tui_term_width (),
- 0,
- 0);
+ TUI_SRC_WIN->resize (src_height,
+ tui_term_width (),
+ 0,
+ 0);
TUI_SRC_WIN->make_visible (true);
TUI_SRC_WIN->m_has_locator = false;
@@ -523,15 +523,15 @@ show_source_disasm_command (void)
TUI_SRC_WIN->show_source_content ();
if (TUI_DISASM_WIN == NULL)
tui_win_list[DISASSEM_WIN] = new tui_disasm_window ();
- TUI_DISASM_WIN->reset (asm_height,
- tui_term_width (),
- 0,
- src_height - 1);
+ TUI_DISASM_WIN->resize (asm_height,
+ tui_term_width (),
+ 0,
+ src_height - 1);
TUI_DISASM_WIN->make_visible (true);
- locator->reset (2 /* 1 */ ,
- tui_term_width (),
- 0,
- (src_height + asm_height) - 1);
+ locator->resize (2 /* 1 */ ,
+ tui_term_width (),
+ 0,
+ (src_height + asm_height) - 1);
TUI_SRC_WIN->m_has_locator = false;
TUI_DISASM_WIN->m_has_locator = true;
locator->make_visible (true);
@@ -540,10 +540,10 @@ show_source_disasm_command (void)
if (TUI_CMD_WIN == NULL)
tui_win_list[CMD_WIN] = new tui_cmd_window ();
- TUI_CMD_WIN->reset (cmd_height,
- tui_term_width (),
- 0,
- tui_term_height () - cmd_height);
+ TUI_CMD_WIN->resize (cmd_height,
+ tui_term_width (),
+ 0,
+ tui_term_height () - cmd_height);
TUI_CMD_WIN->make_visible (true);
current_layout = SRC_DISASSEM_COMMAND;
}
@@ -565,7 +565,7 @@ show_data (enum tui_layout_type new_layout)
src_height = total_height - data_height;
if (tui_win_list[DATA_WIN] == nullptr)
tui_win_list[DATA_WIN] = new tui_data_window ();
- tui_win_list[DATA_WIN]->reset (data_height, tui_term_width (), 0, 0);
+ tui_win_list[DATA_WIN]->resize (data_height, tui_term_width (), 0, 0);
tui_win_list[DATA_WIN]->make_visible (true);
if (new_layout == SRC_DATA_COMMAND)
@@ -583,14 +583,14 @@ show_data (enum tui_layout_type new_layout)
tui_source_window_base *base
= (tui_source_window_base *) tui_win_list[win_type];
- tui_win_list[win_type]->reset (src_height,
- tui_term_width (),
- 0,
- data_height - 1);
- locator->reset (2 /* 1 */ ,
- tui_term_width (),
- 0,
- total_height - 1);
+ tui_win_list[win_type]->resize (src_height,
+ tui_term_width (),
+ 0,
+ data_height - 1);
+ locator->resize (2 /* 1 */ ,
+ tui_term_width (),
+ 0,
+ total_height - 1);
base->make_visible (true);
base->m_has_locator = true;
locator->make_visible (true);
@@ -601,8 +601,8 @@ show_data (enum tui_layout_type new_layout)
}
void
-tui_gen_win_info::reset (int height_, int width_,
- int origin_x_, int origin_y_)
+tui_gen_win_info::resize (int height_, int width_,
+ int origin_x_, int origin_y_)
{
int h = height_;
@@ -648,14 +648,14 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type)
win_info = TUI_DISASM_WIN;
}
- locator->reset (2 /* 1 */ ,
- tui_term_width (),
- 0,
- src_height - 1);
- win_info->reset (src_height - 1,
+ locator->resize (2 /* 1 */ ,
tui_term_width (),
0,
- 0);
+ src_height - 1);
+ win_info->resize (src_height - 1,
+ tui_term_width (),
+ 0,
+ 0);
win_info->make_visible (true);
@@ -666,10 +666,10 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type)
if (TUI_CMD_WIN == NULL)
tui_win_list[CMD_WIN] = new tui_cmd_window ();
- TUI_CMD_WIN->reset (cmd_height,
- tui_term_width (),
- 0,
- src_height);
+ TUI_CMD_WIN->resize (cmd_height,
+ tui_term_width (),
+ 0,
+ src_height);
TUI_CMD_WIN->make_visible (true);
current_layout = layout_type;
}
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index 95a2ac2..f62c79d 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -291,12 +291,12 @@ tui_source_window_base::~tui_source_window_base ()
}
void
-tui_source_window_base::reset (int height, int width,
- int origin_x, int origin_y)
+tui_source_window_base::resize (int height, int width,
+ int origin_x, int origin_y)
{
- tui_gen_win_info::reset (height, width - 3,
- origin_x + 3, origin_y);
- execution_info->reset (height, 3, origin_x, origin_y);
+ tui_gen_win_info::resize (height, width - 3,
+ origin_x + 3, origin_y);
+ execution_info->resize (height, 3, origin_x, origin_y);
}
/* See tui-data.h. */
diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h
index e7ae5b0..6067408 100644
--- a/gdb/tui/tui-winsource.h
+++ b/gdb/tui/tui-winsource.h
@@ -124,8 +124,8 @@ public:
virtual bool location_matches_p (struct bp_location *loc, int line_no) = 0;
- void reset (int height, int width,
- int origin_x, int origin_y) override;
+ void resize (int height, int width,
+ int origin_x, int origin_y) override;
void show_source_content ();