Commit Graph

98629 Commits

Author SHA1 Message Date
Sandra Loosemore 835b995b57 Skip batch-preserve-term-settings.exp tests that cannot work on Windows.
This group of tests assume that the gdb "shell" command launches a
POSIX-compliant shell supporting the PPID environment variable, which
is used to get gdb's pid for killing it from a remote_exec shell.  But
on Windows host "shell" launches cmd.exe, which doesn't have an
equivalent query.

2019-08-15  Sandra Loosemore  <sandra@codesourcery.com>

	gdb/testsuite/
	* gdb.base/batch-preserve-term-settings.exp
	(test_terminal_settings_preserved_after_sigterm): Skip on Windows.
2019-08-15 10:41:58 -07:00
Tom Tromey d59b55f095 Use gdb::byte_vector in target_write_memory
Pedro pointed out that target_write_memory should use gdb::byte_vector
rather than std::vector<unsigned char>.

gdb/gdbserver/ChangeLog
2019-08-15  Tom Tromey  <tromey@adacore.com>

	* target.c (target_write_memory): Use gdb::byte_vector.
2019-08-15 11:24:22 -06:00
Christian Biesinger 97dd8e07d9 [testsuite] Make the testsuite work on mingw
Dejagnu produces an objdir like /c/, but GDB expects something like c:/.
So fix it up in lib/gdb.exp.

gdb/testsuite/ChangeLog:

2019-08-14  Christian Biesinger  <cbiesinger@google.com>

	* lib/gdb.exp: When running on a mingw target, replace
	/x/ with x:/.
2019-08-15 11:14:35 -05:00
Nick Clifton 6ae978f133 Add a description of the 'n' symbol type displayed by nm.
PR 24767
	* doc/binutils.texi (nm): Document the 'n' symbol type.
2019-08-15 15:23:18 +01:00
Tom Tromey 4196ab2a6d Replace write_inferior_memory with target_write_memory
target_write_memory is just a simple wrapper for
write_inferior_memory.  Because target_write_memory is needed for
gdbsupport, and because gdb uses the name "target_write_memory"
everywhere, this patch renames write_inferior_memory and removes the
wrapper.  I think this brings gdb and gdbserver slightly more in sync.

gdb/gdbserver/ChangeLog
2019-08-15  Tom Tromey  <tromey@adacore.com>

	* tracepoint.c (write_inferior_data_pointer)
	(write_inferior_integer, write_inferior_int8)
	(write_inferior_uinteger, m_tracepoint_action_download)
	(r_tracepoint_action_download, x_tracepoint_action_download)
	(l_tracepoint_action_download, clear_inferior_trace_buffer)
	(download_agent_expr, download_tracepoint_1)
	(download_trace_state_variables, upload_fast_traceframes): Update.
	* server.c (gdb_write_memory): Update.
	* remote-utils.c (relocate_instruction): Update.
	* proc-service.c (ps_pdwrite): Update.
	* mem-break.c (remove_memory_breakpoint)
	(delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
	(uninsert_fast_tracepoint_jumps_at)
	(reinsert_fast_tracepoint_jumps_at): Update.
	* linux-x86-low.c (append_insns)
	(i386_install_fast_tracepoint_jump_pad)
	(amd64_write_goto_address, i386_write_goto_address): Update.
	* linux-s390-low.c (append_insns, s390_write_goto_address):
	Update.
	* linux-ppc-low.c (ppc_relocate_instruction)
	(ppc_install_fast_tracepoint_jump_pad, emit_insns)
	(ppc_write_goto_address): Update.
	* linux-aarch64-low.c (append_insns): Update.
	* target.h (struct target_ops): Update.
	(write_inferior_memory): Don't declare.
	* target.c (target_write_memory): Rename from
	write_inferior_memory.  Remove old target_write_memory.
2019-08-15 07:42:21 -06:00
Tom Tromey c6778d00df Simplify write_inferior_memory
gdbserver's write_inferior_memory uses a static variable to avoid
memory leaks, and has a comment referring to the lack of cleanups.
This patch removes this comment and the code in favor of a
straightforward use of std::vector.

gdb/gdbserver/ChangeLog
2019-08-15  Tom Tromey  <tromey@adacore.com>

	* target.c (write_inferior_memory): Use std::vector.
2019-08-15 07:42:21 -06:00
Christophe Vidal 9177214a22 Correct a typo in the documentation for the disassembler.
* docs/binutils.texi: Fixed notice message disassembler options
	section of the man page.
2019-08-15 14:40:51 +01:00
Tom Tromey 05192282ca Fix CU overrun in scan_unit_for_symbols
A customer program had a DWARF CU that consisted of just a CU DIE,
without any children.  In this situation, scan_unit_for_symbols will
try to read past the end of the current CU, and will take use the
first bytes of the next CU as an abbrev, printing an error message.

This patch fixes the bug by changing scan_unit_for_symbols to stop at
the end of the CU rather than the end of the .debug_info section.

bfd/ChangeLog
2019-08-15  Tom Tromey  <tromey@adacore.com>

	* dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
	of section.
2019-08-15 07:37:31 -06:00
Nick Clifton 6485977b89 Updatesd Swdish translation for the gas sub-directory.
* po/sv.po: Updated Swedish translation.
2019-08-15 12:41:24 +01:00
Tom de Vries 2208ee9170 [gdb] Fix gdb build on mips64-linux
When compiling for mips64-linux, we get:
...
src/gdb/linux-nat-trad.c:139:12: error: ‘gdbarch_num_regs’ was not declared \
  in this scope
  139 |   regnum < gdbarch_num_regs (regcache->arch ());
...

Fix this by including gdbarch.h in linux-nat-trad.c, similar to commit
b1c896b365 "Fix gdb build on macOS".

Build on mips64-linux.

gdb/ChangeLog:

2019-08-15  Tom de Vries  <tdevries@suse.de>

	* linux-nat-trad.c: Include gdbarch.h.
2019-08-15 08:14:31 +02:00
GDB Administrator fc9e754460 Automatic date update in version.in 2019-08-15 00:00:21 +00:00
Alan Hayward 75faf5c41d AArch64: Allow additional sizes in prologue
When saving registers to the stack at the start of a function, not all state
needs to be saved. For example, only the first 64bits of float registers need
saving.  However, a program may choose to store extra state if it wishes,
there is nothing preventing it doing so.

The aarch64_analyze_prologue will error if it detects extra state being
stored.  Relex this restriction.

Tested via aarch64-prologue test.

gdb/ChangeLog:

	* aarch64-tdep.c (aarch64_analyze_prologue): Allow any valid
	register sizes.

gdb/testsuite/ChangeLog:

	* gdb.arch/aarch64-prologue.c: New test.
	* gdb.arch/aarch64-prologue.exp: New file.
2019-08-14 15:58:21 +01:00
Tom Tromey b1c896b365 Fix gdb build on macOS
Internal testing showed that the macOS port did not build.  The
breakage was caused by the patch to remove the gdbarch.h include from
defs.h.  This patch fixes the problem.

gdb/ChangeLog
2019-08-14  Tom Tromey  <tromey@adacore.com>

	* darwin-nat.c: Include gdbarch.h.
	* darwin-nat-info.c: Include gdbarch.h.
2019-08-14 08:40:18 -06:00
Alan Modra dfc19da6a6 PR24623, DWARF errors
PR 24623
	* dwarf2.c (stash_comp_unit): New function, extracted from..
	(_bfd_dwarf2_find_nearest_line): ..here.
	(find_abstract_instance): Parse comp units and decode line info
	as needed.
2019-08-14 12:43:25 +09:30
Alan Modra c327a44f38 Use comp_unit_maybe_decode_line_info in more places
* dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
	(comp_unit_find_nearest_line): Use it here..
	(_bfd_dwarf2_find_symbol_bias): ..and here.
2019-08-14 11:26:48 +09:30
Alan Modra 9defd221fe Remove _bfd_dwarf2_find_nearest_line addr_size parameter
This parameter might appear to be used to set up offset_size, but
since git commit 024b2372f5 offset_size is either set from the
debug_info data or is set to 4.

	* dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
	* libbfd-in.h  (_bfd_dwarf2_find_nearest_line): Update prototype.
	* coffgen.c (coff_find_nearest_line_with_names): Adjust
	_bfd_dwarf2_find_nearest_line calls.
	* elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
	* elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
	* elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
	* elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
	* elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
	* mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
	* libbfd.h: Regenerate.
2019-08-14 11:23:18 +09:30
GDB Administrator 414b840430 Automatic date update in version.in 2019-08-14 00:00:22 +00:00
Tom Tromey 6405cd73c0 Remove tui_gen_win_info::last_visible_line
The last_visible_line field of tui_gen_win_info is not used, so remove
it.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-data.h (struct tui_gen_win_info) <last_visible_line>:
	Remove.
	* tui/tui-data.c (tui_initialize_static_data): Update.
2019-08-13 14:52:10 -06:00
Tom Tromey 5216580d7a Don't track the contents of the execution info window
The curses library keeps track of the contents of each window, and can
redraw the screen as needed.  This means that in most cases is no need
for the TUI windows to also keep track of their contents.  This patch
removes content tracking from the execution window, leaving that to
curses.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-winsource.h (struct tui_exec_info_window)
	<~tui_exec_info_window, maybe_allocate_content, get_content,
	m_content>: Remove.
	(struct tui_source_window_base) <set_exec_info_content,
	show_exec_info_content>: Don't declare.
	* tui/tui-winsource.c
	(tui_exec_info_window::maybe_allocate_content): Remove.
	(tui_source_window_base::update_exec_info): Rename from
	set_exec_info_content.
	(tui_source_window_base::show_exec_info_content)
	(tui_source_window_base::update_exec_info): Remove.
2019-08-13 14:52:10 -06:00
Tom Tromey 93858ad34e Remove tui_clear_exec_info_content
After the previous patch, all calls to tui_clear_exec_info_content
come just after a call to tui_clear_source_content.  Because these two
windows are linked, I think it makes sense to have
tui_clear_source_content simply do the work.  So, this patch removes
tui_clear_exec_info_content.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-winsource.h (tui_clear_exec_info_content): Don't
	declare.
	* tui/tui-winsource.c (tui_update_source_window_as_is)
	(tui_update_source_windows_with_addr, tui_erase_source_content):
	Update.
	(tui_clear_exec_info_content): Remove.
2019-08-13 14:52:10 -06:00
Tom Tromey e321e7ce75 Remove tui_erase_exec_info_content
One call to tui_erase_exec_info_content can be removed.  This call is
not needed because the function in question then immediately sets the
execution info window contents.

Once this is done, tui_clear_exec_info_content is just a wrapper for
the only call to tui_erase_exec_info_content, so
tui_erase_exec_info_content can be renamed and the wrapper function
removed.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-winsource.h (tui_erase_exec_info_content): Don't
	declare.
	* tui/tui-winsource.c (tui_source_window_base::refresh_all): Don't
	call tui_erase_exec_info_content.
	(tui_clear_exec_info_content): Rename from
	tui_erase_exec_info_content.
	(tui_clear_exec_info_content): Delete.
2019-08-13 14:52:09 -06:00
Tom Tromey 8270ac6229 Turn tui_show_exec_info_content into a method
This changes tui_show_exec_info_content to be a method on
tui_source_window_base.  As it is only called by other methods on this
class, it can be private.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-winsource.h (struct tui_source_window_base)
	<show_exec_info_content>: Declare.
	(tui_show_exec_info_content): Don't declare.
	* tui/tui-winsource.c
	(tui_source_window_base::show_exec_info_content): Rename from
	tui_show_exec_info_content.
	(tui_source_window_base::update_exec_info): Update.
2019-08-13 14:52:09 -06:00
Tom Tromey 7b56485db5 Move code to tui-winsource.h
This moves code related to the execution info window from tui-data.h
to tui-winsource.h.  It fits better here because the execution info is
conceptually part of the source and disassembly windows, and
tui-winsource.h is where this common class lives.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-data.h (enum tui_bp_flag, tui_bp_flags, struct tui_source_element)
	(TUI_BP_HIT_POS, TUI_BP_BREAK_POS, TUI_EXEC_POS)
	(TUI_EXECINFO_SIZE, tui_exec_info_content): Move ...
	* tui/tui-winsource.h (enum tui_bp_flag, tui_bp_flags, struct
	tui_source_element, TUI_BP_HIT_POS, TUI_BP_BREAK_POS)
	(TUI_EXEC_POS, TUI_EXECINFO_SIZE, tui_exec_info_content):
	... here.
2019-08-13 14:52:09 -06:00
Tom Tromey 7ba913dcdf Change tui_update_exec_info to be a method
This changes tui_update_exec_info to be a method on
tui_source_window_base.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-winsource.h (struct tui_source_window_base)
	<update_exec_info>: Declare.
	(tui_update_exec_info): Don't declare.
	* tui/tui-winsource.c (tui_update_source_window_as_is)
	(tui_source_window_base::refresh_all)
	(tui_update_all_breakpoint_info): Update.
	(tui_source_window_base::update_exec_info): Rename from
	tui_update_exec_info.
	* tui/tui-stack.c (tui_show_frame_info): Update.
2019-08-13 14:52:09 -06:00
Tom Tromey 37a4a13104 Change tui_set_exec_info_content to be a method
This changes tui_set_exec_info_content to bea method on
tui_source_window_base.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-winsource.h (struct tui_source_window_base)
	<set_exec_info_content>: Declare.
	(tui_set_exec_info_content): Don't declare.
	* tui/tui-winsource.c
	(tui_source_window_base::set_exec_info_content): Rename from
	tui_set_exec_info_content.
	(tui_update_exec_info): Update.
2019-08-13 14:52:09 -06:00
Tom Tromey 0bd27e079a Change tui_show_source_content to be a method
This changes tui_show_source_content to be a method on
tui_source_window_base.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-winsource.h (struct tui_source_window_base)
	<show_source_content>: Declare.
	(tui_show_source_content): Don't declare.
	* tui/tui-winsource.c (tui_update_source_window_as_is): Update.
	(tui_source_window_base::show_source_content): Rename from
	tui_show_source_content.
	(tui_source_window_base::refresh_all): Update.
	* tui/tui-layout.c (show_source_disasm_command)
	(show_source_or_disasm_and_command): Update.
2019-08-13 14:52:09 -06:00
Tom Tromey b4ef5aeb3a Change tui_check_and_display_highlight_if_needed to be a method
This changes tui_check_and_display_highlight_if_needed to be a method
on tui_win_info.  This makes it clear that the NULL check in that
function is not needed, so it is removed here.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-winsource.c (tui_erase_source_content)
	(tui_show_source_content, tui_source_window_base::refresh_all):
	Update.
	* tui/tui-wingeneral.h
	(tui_check_and_display_highlight_if_needed): Don't declare.
	* tui/tui-wingeneral.c
	(tui_win_info::check_and_display_highlight_if_needed): Rename from
	check_and_display_highlight_if_needed.
	* tui/tui-win.c (tui_rehighlight_all)
	(tui_win_info::make_visible_with_new_height): Update.
	* tui/tui-regs.c (tui_data_window::display_registers_from_line)
	(tui_data_window::erase_data_content)
	(tui_data_window::display_all_data): Update.
	* tui/tui-data.h (struct tui_win_info)
	<check_and_display_highlight_if_needed>: Declare.
2019-08-13 14:52:09 -06:00
Tom Tromey fede52738f Delete invisible TUI windows
This changes the TUI so that when the layout changes, any windows that
are invisible are now deleted.  This makes it simpler to understand
window lifetimes.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-win.c (tui_resize_all): Call
	tui_delete_invisible_windows.
	* tui/tui-layout.c (show_layout): Call
	tui_delete_invisible_windows.
	* tui/tui-data.h (tui_delete_invisible_windows): Declare.
	* tui/tui-data.c (tui_delete_invisible_windows): New function.
2019-08-13 14:52:09 -06:00
Tom Tromey 22c3f4909a Simplify tui_show_disassem
tui_show_disassem does not need to call tui_add_win_to_layout, because
the callers that could change the layout have already ensured that it
exists.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-disasm.c (tui_show_disassem): Add assertion.  Don't call
	tui_add_win_to_layout.
2019-08-13 14:52:09 -06:00
Tom Tromey 16cb7910b9 Make tui_default_win_height static
tui_default_win_height is only used in tui-layout.c, so make it static.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-layout.h (tui_default_win_height): Don't declare.
	* tui/tui-layout.c (tui_default_win_height): Now static.
2019-08-13 14:52:09 -06:00
Tom Tromey cc0c3ffbc9 Two simplifications in tui-layout.c
This patch simplifies some code in tui-layout.c.

In show_layout, all the layout settings can be handled by a single
switch statement.  In show_source_disasm_command and
show_source_or_disasm_and_command, there is no need to check the
current layout, as the caller has already done so.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-layout.c (show_layout): Unify all layout cases into a
	single switch.
	(show_source_disasm_command, show_source_or_disasm_and_command):
	Don't check current layout.
2019-08-13 14:52:09 -06:00
Tom Tromey 3f3ffe54e2 Simplify tui_make_all_invisible
This simplifies the implementation of tui_make_all_invisible.  Also,
because show_data is only called by show_layout, this hoists the call
to tui_make_all_invisible and removes the call from show_data.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-wingeneral.c (make_all_visible): Remove.
	(tui_make_all_invisible): Simplify.
	* tui/tui-layout.c (tui_make_all_invisible): Move from
	tui-wingeneral.c; simplify.
	(show_layout): Hoist call to tui_make_all_invisible.
	(show_data): Don't call tui_make_all_invisible.
2019-08-13 14:52:09 -06:00
Tom Tromey 6925809176 Remove tui_make_all_visible
The function tui_make_all_visible is not used, so remove it.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-wingeneral.h (tui_make_all_visible): Don't declare.
	* tui/tui-wingeneral.c (tui_make_all_visible): Remove.
2019-08-13 14:52:09 -06:00
Tom Tromey 62cf57fee7 Move current_layout to tui-layout.c
This moves the current_layout global to tui-layout.c.  This allows for
the removal of an accessor function; but also it just seems clearer to
have it here.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-layout.c (current_layout, tui_current_layout): Move from
	tui-data.c.
	(show_source_disasm_command, show_data)
	(show_source_or_disasm_and_command): Don't use
	tui_set_current_layout_to.
	* tui/tui-data.h (tui_set_current_layout_to): Don't declare.
	* tui/tui-data.c (current_layout, tui_current_layout): Move to
	tui-layout.c.
	(tui_set_current_layout_to): Remove.
2019-08-13 14:52:09 -06:00
Tom Tromey 2afade5dbe Remove struct tui_layout_def
"layout_def" isn't actually used in the TUI, so remove it.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-layout.c (tui_set_layout): Update.
	* tui/tui-data.h (struct tui_layout_def): Remove.
	(tui_layout_def): Don't declare.
	* tui/tui-data.c (layout_def): Remove.
	(tui_layout_def): Remove.
2019-08-13 14:52:09 -06:00
Tom Tromey a3504e9654 clear_detail can only be called on TUI source windows
The clear_detail method can only be called on source windows, so
remove definitions from the base of the class hierarchy, leaving only
a single non-virtual method.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-winsource.h (struct tui_source_window_base)
	<clear_detail>: No longer "override".
	* tui/tui-regs.h (struct tui_data_window) <clear_detail>: Remove.
	* tui/tui-regs.c (tui_data_window::clear_detail): Remove.
	* tui/tui-data.h (struct tui_win_info) <clear_detail>: Remove.
	* tui/tui-command.h (struct tui_cmd_window) <clear_detail>:
	Remove.
	* tui/tui-command.c (tui_cmd_window::clear_detail): Remove.
2019-08-13 14:52:09 -06:00
Christian Biesinger 0111684298 [readline] Fix compilation on MinGW
S_ISLNK should not be called outside of an #ifdef.

However, this specific call is actually unnecessary, because
linkok can only be 0 if S_ISLNK is true, per the code above.

I have sent a bug report to bug-readline, though it does not show
up in the online archive yet.

2019-08-13  Christian Biesinger  <cbiesinger@google.com>

	* colors.c (_rl_print_color_indicator): Remove unnecessary
	S_ISLNK check to fix compilation on MinGW.
2019-08-13 14:57:03 -05:00
Tom Tromey 29c9291108 Don't include readline headers from tracepoint.c
I was curious why updating readline caused so much to be to rebuilt,
so I look at all the uses of the readline headers.  Most are included
for valid reasons (either readline directory or for tilde_expand); but
the includes in tracepoint.c didn't seem to be used.

This patch removes them.  Tested by rebuilding.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tromey@adacore.com>

	* tracepoint.c: Don't include readline.h or history.h.
2019-08-13 12:28:38 -06:00
Tom de Vries abc6c00fb6 [gdb/testsuite] Fix gdb.gdb/selftest.exp regexp
With gdb.gdb/selftest.exp, we get:
...
(xgdb) PASS: gdb.gdb/selftest.exp: send SIGINT signal to child process
^M
Thread 1 "xgdb" received signal SIGINT, Interrupt.^M
0x00007ffff5bf01db in poll () from /lib64/libc.so.6^M
(gdb) FAIL: gdb.gdb/selftest.exp: send ^C to child process again
...

The failure is due to gdb printing 'Thread 1 "xgdb" received signal SIGINT',
but the regexp in the test-case expecting 'Program received signal SIGINT'.

Fix this by updating the regexp, similar to how that is done earlier in the
test-case.

gdb/testsuite/ChangeLog:

2019-08-13  Tom de Vries  <tdevries@suse.de>

	* gdb.gdb/selftest.exp (send ^C to child process again): Accept also
	Thread.
2019-08-13 18:57:50 +02:00
Sandra Loosemore 74c2c1f45f Fixes for gdb.python tests on remote Windows host.
This patch fixes several test ERRORs and FAILs seen from running
gdb.python tests on a remote Windows host.  The problems fixed
generally fall into these categories:
- Failure to copy the .py script to the host.
- Confusion between build and host pathnames.
- Assuming pathnames printed on the host include "/" as a directory
  separator.
- Tests that need to be conditionally disabled due to missing features
  on the host, etc.

2019-08-13  Sandra Loosemore  <sandra@codesourcery.com>

	gdb/testsuite/
	* gdb.python/py-completion.exp: Download the .py file to the host
	and use its host pathname.  Conditionalize tests that use
	tab completion and manipulate files on the build machine.
	* gdb.python/py-events.exp: Download the .py file to the host
	and use its host pathname.
	* gdb.python/py-evsignal.exp: Likewise.
	* gdb.python/py-evthreads.exp: Likewise.
	* gdb.python/py-framefilter-invalidarg.exp: Match Windows
	pathname syntax.
	* gdb.python/py-framefilter.exp: Download the .py file to the right
	place on the host.  Match Windows pathname syntax.
	* gdb.python/py-mi-var-info-path-expression.exp: Download the
	.py file to the host and use its host pathname.
	* gdb.python/py-objfile-script.exp: Match Windows pathname syntax.
	* gdb.python/py-objfile.exp: Expect a host pathname, not a
	build pathname.  Skip symlink test on Windows host.  Add missing
	newline at end of file.
	* gdb.python/py-pp-maint.exp: Download the .py file to the host
	and use its host pathname.
	* gdb.python/py-pp-registration.exp: Match Windows pathname syntax.
	* gdb.python/py-section-script.exp: Use host location of binfile
	on safe-path.  Use correct path separator on Windows host.
	Reorder alternatives in gdb_test_multiple to prevent matching
	the wrong alternative on success.
	* gdb.python/py-symtab.exp: Match Windows pathname syntax.
2019-08-13 09:09:30 -07:00
GDB Administrator 5067f530c3 Automatic date update in version.in 2019-08-13 00:00:26 +00:00
Tom Tromey 86c6b807f5 Require readline 7 or newer
This changes gdb to require readline 7 or newer at build time.

gdb/ChangeLog
2019-08-12  Tom Tromey  <tom@tromey.com>

	* configure: Rebuild.
	* configure.ac: Check for readline 7.
	* NEWS: Mention readline 7 requirement.
	* README: Update.

gdb/doc/ChangeLog
2019-08-12  Tom Tromey  <tom@tromey.com>

	* gdb.texinfo (Configure Options): Document minimum version of
	readline.
2019-08-12 10:57:56 -06:00
Tom Tromey 5db2718ce4 Remove readline hack from gdb_select
As discussed on gdb-patches, this removes the readline hack from the
mingw-hdep.c version of gdb_select.  It's believed that this is not
needed any more.  See:

    https://sourceware.org/ml/gdb-patches/2019-03/msg00465.html

gdb/ChangeLog
2019-08-12  Tom Tromey  <tom@tromey.com>

	* mingw-hdep.c (gdb_select): Remove readline hack.
2019-08-12 10:57:56 -06:00
Tom Tromey cb41b9e70e Import readline 8.0
This imports readline 8.0.

readline/ChangeLog.gdb
2019-08-12  Tom Tromey  <tom@tromey.com>

	* Imported readline 8.0.
2019-08-12 10:57:56 -06:00
Patrick Palka ca2589f3bb Fix gdb's selftest.exp after readline import
After the sync there is one testsuite regression, the test
"signal SIGINT" in gdb.gdb/selftest.exp which now FAILs.  Previously,
the readline 6.2 SIGINT handler would temporarily reinstall the
underlying application's SIGINT handler and immediately re-raise SIGINT
so that the orginal handler gets invoked.  But now (since readline 6.3)
its SIGINT handler does not re-raise SIGINT or directly invoke the
original handler; it now sets a flag marking that SIGINT was raised, and
waits until readline explicitly has control to call the application's
SIGINT handler.  Anyway, because SIGINT is no longer re-raised from
within readline's SIGINT handler, doing "signal SIGINT" with a stopped
inferior gdb process will no longer resume and then immediately stop the
process (since there is no 2nd SIGINT to immediately catch).  Instead,
the inferior gdb process will now just print "Quit" and continue to run.
So with this commit, this particular test case is adjusted to reflect
this change in behavior (we now have to send a 2nd SIGINT manually to
stop it).

gdb/testsuite/ChangeLog
2019-08-12  Patrick Palka  <patrick@parcs.ath.cx>

	* gdb.gdb/selftest.exp (test_with_self): Update test to now
	expect the GDB inferior to no longer immediately stop after
	being resumed with "signal SIGINT".
2019-08-12 10:57:56 -06:00
Tom Tromey c15a79c78c Remove gdb workaround from readline/xfree.c
There is a gdb-local patch to deal with interrupts during completion.
The original thread adding this patch is here:

https://sourceware.org/ml/gdb-patches/2011-06/msg00147.html

I believe readline now implements the approach suggested by
Chet Ramey:

https://sourceware.org/ml/gdb-patches/2011-06/msg00493.html

So, I believe this patch can be removed.

readline/ChangeLog.gdb
2018-10-07  Tom Tromey  <tom@tromey.com>

	* Makefile.in (xfree.o): Don't depend on readline.h.
	* xfree.c (xfree): Remove gdb workaround.
	* xmalloc.h (xfree): Remove #define.
2019-08-12 10:57:56 -06:00
Tom Tromey a2d4e4b709 Remove gdb workaround from readline/emacs_keymap.c
There is a gdb-local patch in readline/emacs_keymap.c that says:

  /* Temporary - this is a bug in readline 5.1 that should be fixed in
     readline 5.2.  */

So, I think this can be removed now.  I have no way to test this, as
the patch was specific to mingw.

readline/ChangeLog.gdb
2018-10-07  Tom Tromey  <tom@tromey.com>

	* emacs_keymap.c: Remove gdb workaround.
2019-08-12 10:57:56 -06:00
Tom Tromey 57a2fe0702 Remove gdb workaround from readline/complete.c
This removes a gdb-local patch from readline's get_y_or_n.  The code
references a gdb test that continues to work when I remove this patch.
So, I think it is not needed any more.

readline/ChangeLog.gdb
2018-10-07  Tom Tromey  <tom@tromey.com>

	* complete.c (get_y_or_n): Remove gdb workaround.
2019-08-12 10:57:56 -06:00
Tom Tromey 775e241e9c Import readline 7.0 (patch 5)
This imports readline 7.0 (up to patch 5) while preserving all
gdb-local changes.

This was done by checking out the readline git repository, making a
branch based on the gdb baseline revision, applying the gdb changes to
that branch, and then merging from readline 7.

readline/ChangeLog.gdb
2019-08-12  Tom Tromey  <tom@tromey.com>

	* Imported readline 7.0 patch 5.
2019-08-12 10:57:56 -06:00
Srinath Parvathaneni 08132bdd87 Modify the ARM encoding and decoding of SQRSHRL and UQRSHLL MVE instructions.
This is a change to the first published specifications [1][a] but since there is no hardware
out there that uses the old instructions we do not want to support the old variant.
This changes are done based on the latest published specifications [1][b].

[1] https://developer.arm.com/architectures/cpu-architecture/m-profile/docs/ddi0553/latest/armv81-m-architecture-reference-manual
    [a] version bf
    [b] version bh

gas	* config/tc-arm.c (enum operand_parse_code): Add the entry OP_I48_I64.
	(po_imm1_or_imm2_or_fail): Marco to check the immediate is either of
        48 or 64.
	(parse_operands): Add case OP_I48_I64.
	(do_mve_scalar_shift1): Add function to encode the MVE shift
        instructions with 4 arguments.
	* testsuite/gas/arm/mve-shift-bad.l: Modify.
	* testsuite/gas/arm/mve-shift-bad.s: Likewise.
	* testsuite/gas/arm/mve-shift.d: Likewise.
	* testsuite/gas/arm/mve-shift.s: Likewise.

opcodes	* arm-dis.c (struct mopcode32 mve_opcodes): Modify the mask for
	cases MVE_SQRSHRL and MVE_UQRSHLL.
	(print_insn_mve): Add case for specifier 'k' to check
	specific bit of the instruction.
2019-08-12 17:17:18 +01:00