+2019-08-16 Tom Tromey <tom@tromey.com>
+
+ * tui/tui-winsource.h (tui_update_source_window)
+ (tui_update_source_window_as_is): Remove "noerror" parameter.
+ * tui/tui-winsource.c (tui_update_source_window)
+ (tui_update_source_window_as_is): Remove "noerror" parameter.
+ (tui_update_source_windows_with_addr)
+ (tui_update_source_windows_with_line)
+ (tui_source_window_base::rerender)
+ (tui_source_window_base::refill): Update.
+ * tui/tui-source.h (tui_set_source_content)
+ (tui_show_symtab_source): Remove "noerror" parameter.
+ * tui/tui-source.c (tui_set_source_content): Remove "noerror"
+ parameter.
+ (tui_show_symtab_source): Likewise.
+ (tui_source_window::maybe_update): Update.
+ * tui/tui-disasm.c (tui_show_disassem)
+ (tui_show_disassem_and_update_source)
+ (tui_disasm_window::do_scroll_vertical)
+ (tui_disasm_window::maybe_update): Update.
+
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui.c (tui_is_window_visible): Update.
val.loa = LOA_ADDRESS;
val.u.addr = start_addr;
- tui_update_source_window (TUI_DISASM_WIN, gdbarch, s, val, FALSE);
+ tui_update_source_window (TUI_DISASM_WIN, gdbarch, s, val);
/* If the focus was in the src win, put it in the asm win, if the
source view isn't split. */
sal = find_pc_line (start_addr, 0);
val.loa = LOA_LINE;
val.u.line_no = sal.line;
- tui_update_source_window (TUI_SRC_WIN, gdbarch, sal.symtab, val, TRUE);
+ tui_update_source_window (TUI_SRC_WIN, gdbarch, sal.symtab, val);
if (sal.symtab)
{
set_current_source_symtab_and_line (sal);
val.loa = LOA_ADDRESS;
val.u.addr = tui_find_disassembly_address (gdbarch, pc, num_to_scroll);
tui_update_source_window_as_is (this, gdbarch,
- NULL, val, FALSE);
+ NULL, val);
}
}
a.u.addr = low;
if (!addr_is_displayed (addr))
tui_update_source_window (this, get_frame_arch (fi),
- sal.symtab, a, TRUE);
+ sal.symtab, a);
else
{
a.u.addr = addr;
enum tui_status
tui_set_source_content (tui_source_window_base *win_info,
struct symtab *s,
- int line_no,
- int noerror)
+ int line_no)
{
enum tui_status ret = TUI_FAILURE;
std::string srclines;
if (!g_source_cache.get_source_lines (s, line_no, line_no + nlines,
&srclines))
- {
- if (!noerror)
- {
- const char *filename = symtab_to_filename_for_display (s);
- char *name = (char *) alloca (strlen (filename) + 100);
-
- sprintf (name, "%s:%d", filename, line_no);
- print_sys_errmsg (name, errno);
- }
- ret = TUI_FAILURE;
- }
+ ret = TUI_FAILURE;
else
{
int cur_line_no, cur_line;
void
tui_show_symtab_source (tui_source_window_base *win_info,
struct gdbarch *gdbarch, struct symtab *s,
- struct tui_line_or_address line,
- int noerror)
+ struct tui_line_or_address line)
{
win_info->horizontal_offset = 0;
- tui_update_source_window_as_is (win_info, gdbarch, s, line, noerror);
+ tui_update_source_window_as_is (win_info, gdbarch, s, line);
}
if (!(source_already_displayed
&& line_is_displayed (line_no)))
tui_update_source_window (this, get_frame_arch (fi),
- sal.symtab, l, TRUE);
+ sal.symtab, l);
else
{
l.u.line_no = line_no;
extern enum tui_status tui_set_source_content (tui_source_window_base *,
struct symtab *,
- int, int);
+ int);
extern void tui_show_symtab_source (tui_source_window_base *,
struct gdbarch *, struct symtab *,
- struct tui_line_or_address,
- int);
+ struct tui_line_or_address);
#endif /* TUI_TUI_SOURCE_H */
tui_update_source_window (struct tui_source_window_base *win_info,
struct gdbarch *gdbarch,
struct symtab *s,
- struct tui_line_or_address line_or_addr,
- int noerror)
+ struct tui_line_or_address line_or_addr)
{
win_info->horizontal_offset = 0;
- tui_update_source_window_as_is (win_info, gdbarch, s, line_or_addr, noerror);
+ tui_update_source_window_as_is (win_info, gdbarch, s, line_or_addr);
}
tui_update_source_window_as_is (struct tui_source_window_base *win_info,
struct gdbarch *gdbarch,
struct symtab *s,
- struct tui_line_or_address line_or_addr,
- int noerror)
+ struct tui_line_or_address line_or_addr)
{
enum tui_status ret;
if (win_info->type == SRC_WIN)
- ret = tui_set_source_content (win_info, s, line_or_addr.u.line_no,
- noerror);
+ ret = tui_set_source_content (win_info, s, line_or_addr.u.line_no);
else
ret = tui_set_disassem_content (win_info, gdbarch, line_or_addr.u.addr);
sal = find_pc_line (addr, 0);
l.loa = LOA_LINE;
l.u.line_no = sal.line;
- tui_show_symtab_source (TUI_SRC_WIN, gdbarch, sal.symtab, l, FALSE);
+ tui_show_symtab_source (TUI_SRC_WIN, gdbarch, sal.symtab, l);
break;
}
}
default:
l.loa = LOA_LINE;
l.u.line_no = line;
- tui_show_symtab_source (TUI_SRC_WIN, gdbarch, s, l, FALSE);
+ tui_show_symtab_source (TUI_SRC_WIN, gdbarch, s, l);
if (tui_current_layout () == SRC_DISASSEM_COMMAND)
{
find_line_pc (s, line, &pc);
line_or_addr = start_line_or_addr;
tui_update_source_window (this, gdbarch,
- cursal.symtab, line_or_addr, TRUE);
+ cursal.symtab, line_or_addr);
}
else if (deprecated_safe_get_selected_frame () != NULL)
{
line.loa = LOA_ADDRESS;
find_line_pc (s, cursal.line, &line.u.addr);
}
- tui_update_source_window (this, gdbarch, s, line, TRUE);
+ tui_update_source_window (this, gdbarch, s, line);
}
else
erase_source_content ();
}
tui_update_source_window_as_is (this, gdbarch, s,
- content[0].line_or_addr,
- FALSE);
+ content[0].line_or_addr);
}
/* Scroll the source forward or backward horizontally. */
extern void tui_display_main (void);
extern void tui_update_source_window (struct tui_source_window_base *,
struct gdbarch *, struct symtab *,
- struct tui_line_or_address,
- int);
+ struct tui_line_or_address);
extern void tui_update_source_window_as_is (struct tui_source_window_base *,
struct gdbarch *, struct symtab *,
- struct tui_line_or_address,
- int);
+ struct tui_line_or_address);
extern void tui_update_source_windows_with_addr (struct gdbarch *, CORE_ADDR);
extern void tui_update_source_windows_with_line (struct symtab *,
int);