mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-30 00:52:16 +08:00
Fix C-x 1 from gdb prompt
Pedro pointed out on irc that C-x 1 from the gdb prompt will cause a crash. This happened because of a bug in remove_windows -- it would always remove all the windows from the layout. This patch fixes this bug, and also arranges to have C-x 1 preserve the status window. gdb/ChangeLog 2020-06-16 Tom Tromey <tom@tromey.com> * tui/tui-layout.c (tui_layout_split::remove_windows): Fix logic. Also preserve the status window.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2020-06-16 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* tui/tui-layout.c (tui_layout_split::remove_windows): Fix logic.
|
||||||
|
Also preserve the status window.
|
||||||
|
|
||||||
2020-06-16 Tom Tromey <tom@tromey.com>
|
2020-06-16 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* python/py-tui.c (tui_py_window::~tui_py_window): Handle case
|
* python/py-tui.c (tui_py_window::~tui_py_window): Handle case
|
||||||
|
@ -790,13 +790,14 @@ tui_layout_split::remove_windows (const char *name)
|
|||||||
const char *this_name = m_splits[i].layout->get_name ();
|
const char *this_name = m_splits[i].layout->get_name ();
|
||||||
if (this_name == nullptr)
|
if (this_name == nullptr)
|
||||||
m_splits[i].layout->remove_windows (name);
|
m_splits[i].layout->remove_windows (name);
|
||||||
|
else if (strcmp (this_name, name) == 0
|
||||||
|
|| strcmp (this_name, "cmd") == 0
|
||||||
|
|| strcmp (this_name, "status") == 0)
|
||||||
|
{
|
||||||
|
/* Keep. */
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (strcmp (this_name, name) == 0
|
|
||||||
|| strcmp (this_name, "cmd") == 0)
|
|
||||||
{
|
|
||||||
/* Keep. */
|
|
||||||
}
|
|
||||||
m_splits.erase (m_splits.begin () + i);
|
m_splits.erase (m_splits.begin () + i);
|
||||||
--i;
|
--i;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user