Gives the current process or thread number.
When no process is being debugged, this field is set to @code{No process}.
+@item focus
+Shows the name of the TUI window that has the focus.
+
@item function
Gives the current function name for the selected frame.
The name is demangled if demangling is turned on (@pxref{Print Settings}).
set command_win { 0 16 80 8 }
# Check that the status window doesn't show Singlekey.
-set re "No process In:"
+set re [string_to_regexp "No process (src) In:"]
Term::check_region_contents "status window: initial" {*}$status_win $re
# Enter single-key mode. Check that the status window does show Singlekey.
send_gdb "\030s"
-set re "No process \\(SingleKey\\) In:"
+set re [string_to_regexp "No process (SingleKey) (src) In:"]
gdb_assert { [Term::wait_for_region_contents {*}$status_win $re] } \
"status window: single-key mode"
#include "tui/tui-win.h"
#include "tui/tui-wingeneral.h"
#include "tui/tui-winsource.h"
+#include "tui/tui-stack.h"
#include "gdb_curses.h"
#include <algorithm>
tui_unhighlight_win (win_with_focus);
win_with_focus = win_info;
tui_highlight_win (win_info);
+ tui_show_locator_content ();
}
}
const char *pc_buf = pc_out.c_str ();
int pc_width = pc_out.size ();
+ /* Width of the field showing the window with current focus. For a window
+ named "src" we show "(src)". */
+ int focus_width = (tui_win_with_focus () != nullptr
+ ? 1 + strlen (tui_win_with_focus ()->name ()) + 1
+ : 0);
+
/* First determine the amount of proc name width we have available.
The +1 are for a space separator between fields. */
proc_width = (status_size
- (PC_PREFIX.size () + pc_width + 1)
- (tui_current_key_mode == TUI_SINGLE_KEY_MODE
? (SINGLE_KEY.size () + 1)
+ : 0)
+ - (focus_width > 0
+ ? focus_width + 1
: 0));
/* If there is no room to print the function name, try by removing
string.puts (" ");
}
+ if (tui_win_with_focus () != nullptr)
+ {
+ string.puts ("(");
+ string.puts (tui_win_with_focus ()->name ());
+ string.puts (") ");
+ }
+
/* Procedure/class name. */
if (proc_width > 0)
{