binutils-gdb/gdb/tui
Tom Tromey 2179fbc36d Return scoped_fd from open_source_file and find_and_open_source
This changes open_source_file and find_and_open_source to return
scoped_fd, then updates the callers as appropriate, including using
scoped_fd::to_file.

Tested by the buildbot.

gdb/ChangeLog
2018-11-09  Tom Tromey  <tom@tromey.com>

	* common/scoped_fd.h (class scoped_fd): Add move constructor and
	move assignment operator.
	* psymtab.c (psymtab_to_fullname): Update.
	* source.h (open_source_file): Return scoped_fd.
	(find_and_open_source): Likewise.
	* source.c (open_source_file): Return scoped_fd.
	(get_filename_and_charpos): Update.
	(print_source_lines_base): Update.  Use scoped_fd::to_file.
	(forward_search_command): Likewise.
	(reverse_search_command): Likewise.
	(find_and_open_source): Return scoped_fd.
	* tui/tui-source.c (tui_set_source_content): Update.  Use
	gdb_file_up.
2018-11-09 15:47:45 -07:00
..
ChangeLog-1998-2003
tui-command.c
tui-command.h
tui-data.c Deprecate and replace the "tabset" command 2018-10-19 17:22:27 -06:00
tui-data.h Deprecate and replace the "tabset" command 2018-10-19 17:22:27 -06:00
tui-disasm.c Deprecate and replace the "tabset" command 2018-10-19 17:22:27 -06:00
tui-disasm.h
tui-file.c
tui-file.h
tui-hooks.c
tui-hooks.h
tui-interp.c
tui-io.c Minor cleanups in tui-io.c 2018-10-19 17:22:27 -06:00
tui-io.h Minor cleanups in tui-io.c 2018-10-19 17:22:27 -06:00
tui-layout.c Remove unnecessary casts from TUI 2018-10-15 23:01:32 -06:00
tui-layout.h
tui-out.c
tui-out.h
tui-regs.c Introduce gdbarch_num_cooked_regs 2018-10-21 22:29:21 -04:00
tui-regs.h
tui-source.c Return scoped_fd from open_source_file and find_and_open_source 2018-11-09 15:47:45 -07:00
tui-source.h
tui-stack.c Simple -Wshadow=local fixes 2018-10-04 22:51:45 -06:00
tui-stack.h
tui-win.c Deprecate and replace the "tabset" command 2018-10-19 17:22:27 -06:00
tui-win.h
tui-windata.c Remove unnecessary casts from TUI 2018-10-15 23:01:32 -06:00
tui-windata.h
tui-wingeneral.c Remove unnecessary casts from TUI 2018-10-15 23:01:32 -06:00
tui-wingeneral.h
tui-winsource.c Remove unnecessary casts from TUI 2018-10-15 23:01:32 -06:00
tui-winsource.h
tui.c Remove unnecessary casts from TUI 2018-10-15 23:01:32 -06:00
tui.h