aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-06-25Change tui_which_element::data_window to be a pointerTom Tromey7-15/+32
A coming patch will add a constructor to tui_gen_win_info. However, because the tui_which_element union contains an object of this type, first something must be done here in order to avoid having a union with a member that has a constructor. This patch changes this element to be a pointer instead. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-wingeneral.c (tui_refresh_win): Update. * tui/tui-windata.c (tui_first_data_item_displayed) (tui_delete_data_content_windows): Update. * tui/tui-win.c (tui_data_window::set_new_height): Update. * tui/tui-regs.c (tui_show_registers, tui_show_register_group) (tui_display_registers_from, tui_check_register_values): Update. * tui/tui-data.h (union tui_which_element) <data_window>: Now a pointer. * tui/tui-data.c (init_content_element): Update. Allocate the new window. (tui_free_data_content): Update. (free_content_elements) <case DATA_WIN>: Free the window.
2019-06-25Introduce set_highlight methodTom Tromey5-23/+32
This introduces the tui_win_info::set_highlight method, and changes the highlighting-related code to use bool rather than int. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-wingeneral.c (tui_unhighlight_win, tui_highlight_win): Update. * tui/tui-layout.c (make_command_window) (show_source_disasm_command, show_data, init_and_make_win) (show_source_or_disasm_and_command): Update. * tui/tui-data.h (struct tui_win_info) <set_highlight>: New method. <can_highight, is_highlighted>: Now bool. (tui_set_win_highlight): Don't declare. * tui/tui-data.c (tui_set_win_highlight): Remove.
2019-06-25Remove redundant check from make_visibleTom Tromey2-3/+6
This removes a check of the window type from make_visible. This function already checks that the window type is not CMD_WIN near the top, so this condition can never be false. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-wingeneral.c (make_visible): Remove check of window type.
2019-06-25Introduce max_height methodTom Tromey3-6/+31
This introduces the tui_win_info::max_height method and changes new_height_ok to use it, rather than checking the window type directly. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-win.c (tui_win_info::max_height) (tui_cmd_window::max_height): New methods. (new_height_ok): Call max_height. * tui/tui-data.h (struct tui_win_info, struct tui_cmd_window) <max_height>: New method.
2019-06-25Introduce set_new_height methodTom Tromey3-40/+57
This introduces tui_win_info::set_new_height and implements it in the subclasses as appropriate. This removes another switch on the window type. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-win.c (tui_source_window_base::set_new_height) (tui_data_window::set_new_height): New methods. (make_invisible_and_set_new_height): Call set_new_height method. * tui/tui-data.h (struct tui_win_info) (struct tui_source_window_base, struct tui_data_window) <set_new_height>: New method.
2019-06-25Introduce the refresh_all methodTom Tromey5-23/+38
This introduces the tui_win_info::refresh_all method and implements it as needed in subclasses. The name and comment are a bit of a guess on my part. The main benefit of this patch is removing another switch on the type of the window. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui.c (tui_rl_other_window): Call the refresh_all method. * tui/tui-windata.c (tui_data_window::refresh_all): Rename from tui_refresh_data_win. * tui/tui-win.c (tui_source_window_base::refresh_all): New method. (tui_refresh_all_win): Call the refresh_all method. (tui_set_focus): Likewise. * tui/tui-data.h (struct tui_win_info) <refresh_all>: New method. (struct tui_source_window_base, struct tui_data_window) <refresh>: Likewise.
2019-06-25Introduce two TUI source window methodsTom Tromey8-38/+59
This adds two methods to the TUI source window. These are just renamings of existing functions. It also changes the source window list to have a more precise type, letting the code be more type-safe. This will be useful again later. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-winsource.h (tui_refill_source_window) (tui_set_is_exec_point_at): Don't declare. * tui/tui-winsource.c (tui_update_source_windows_with_addr) (tui_source_window_base::refill): Rename from tui_refill_source_window. (tui_source_window_base::do_scroll_horizontal): Update. (tui_source_window_base::set_is_exec_point_at): Rename from tui_set_is_exec_point_at. (tui_update_all_breakpoint_info): Update. * tui/tui-stack.c (tui_show_frame_info): Update. * tui/tui-layout.c (show_data): Add cast. * tui/tui-hooks.c (tui_redisplay_source): Call refill method. * tui/tui-data.h (struct tui_source_window_base) <refill, set_is_exec_point_at>: New methods. (tui_source_windows, tui_add_to_source_windows): Update types. (tui_add_to_source_windows): Remove redundant declaration. * tui/tui-data.c (source_windows): Store tui_source_window_base. (tui_source_windows): Change return type. (tui_clear_source_windows_detail): Update. (tui_add_to_source_windows): Change type of parameter. (tui_free_all_source_wins_content): Update.
2019-06-25Introduce the refresh methodTom Tromey3-11/+32
This adds tui_win_info::refresh and updates tui_source_window_base to implement it as well. This lets us simplify tui_refresh_all, removing a check of the window type. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-wingeneral.c (tui_win_info::refresh) (tui_source_window_base::refresh): New methods. (tui_refresh_all): Call the refresh method. * tui/tui-data.h (struct tui_win_info) (struct tui_source_window_base) <refresh>: New method.
2019-06-25Use bool for visibilityTom Tromey7-22/+38
This changes the visibility-related functions and data members in the TUI to use bool rather than int. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui.h (tui_is_window_visible): Return bool. * tui/tui.c (tui_is_window_visible): Return bool. * tui/tui-wingeneral.c (tui_make_window, make_visible) (tui_make_visible, tui_make_invisible) (tui_win_info::make_visible) (tui_source_window_base::make_visible, make_all_visible) (tui_make_all_visible, tui_make_all_invisible): Update. * tui/tui-windata.c (tui_delete_data_content_windows): Update. * tui/tui-data.h (struct tui_gen_win_info) <is_visible>: Now bool. (struct tui_win_info, struct tui_source_window_base) (struct tui_cmd_window) <make_visible>: Change parameter to bool. * tui/tui-data.c (tui_init_generic_part): Update.
2019-06-25Introduce make_visible methodTom Tromey4-18/+38
This introduceds the make_visible to tui_win_info and overrides it in subclasses as appropriate. This allows the removal of the tui_win_is_source_type, as it is no longer used. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-wingeneral.c (tui_win_info::make_visible) (tui_source_window_base::make_visible): New methods. (make_all_visible): Make method call. * tui/tui-data.h (struct tui_win_info) <make_visible>: New method. (struct tui_source_window_base, struct tui_cmd_window): Override make_visible. (tui_win_is_source_type): Don't declare. * tui/tui-data.c (tui_win_is_source_type): Remove.
2019-06-25Remove an unneeded NULL checkTom Tromey2-23/+26
show_source_or_disasm_and_command will either create or reset the source window, so the final NULL check is not necessary. This patch removes it. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-layout.c (show_source_or_disasm_and_command): Remove NULL check.
2019-06-25Inline constructors and initializersTom Tromey3-27/+28
This inlines the constructors and initializers for tui_cmd_window and tui_data_window. This makes the code a bit simpler. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-data.h (struct tui_data_window, struct tui_cmd_window): Inline constructor. Add initializers for members. * tui/tui-data.c (tui_data_window, tui_cmd_window): Remove constructors; now inline in class.
2019-06-25Change tui_data_window::display_regs to boolTom Tromey4-5/+13
This changes tui_data_window::display_regs to bool and updates the uses. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-regs.c (tui_show_registers): Update. * tui/tui-data.h (struct tui_data_window) <display_regs>: Now bool. * tui/tui-data.c (tui_data_window::clear_detail) (tui_data_window): Update.
2019-06-25Remove struct tui_data_infoTom Tromey6-122/+112
Like the previous two patches, this removes struct tui_data_info in favor of inlining its contents into tui_data_window. This was the last member of the tui_win_info detail union, so that is removed. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-windata.c (tui_display_all_data) (tui_display_data_from_line, tui_display_data_from) (tui_check_data_values, tui_data_window::do_scroll_vertical): Update. * tui/tui-regs.c (tui_last_regs_line_no) (tui_line_from_reg_element_no, tui_first_reg_element_no_inline) (tui_show_registers, tui_show_register_group) (tui_display_registers_from, tui_display_reg_element_at_line) (tui_display_registers_from_line, tui_check_register_values) (tui_reg_next, tui_reg_prev): Update. * tui/tui-layout.c (tui_set_layout, show_data): Update. * tui/tui-data.h (struct tui_data_info): Remove. Move contents to tui_data_window. (struct tui_win_info) <detail>: Remove. Add new fields from tui_data_info. (TUI_DATA_WIN): Add cast. * tui/tui-data.c (tui_data_window::clear_detail, tui_data_window) (~tui_data_window): Simplify.
2019-06-25Remove struct tui_command_infoTom Tromey4-16/+24
Like the previous patch, this removes tui_command_info in favor of putting it elements directly into tui_cmd_window. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-layout.c (show_source_disasm_command) (show_source_or_disasm_and_command): Update. * tui/tui-io.c (update_cmdwin_start_line) (tui_redisplay_readline): Update. * tui/tui-data.h (struct tui_command_info): Remove. (struct tui_win_info) <detail>: Remove command_info member. (struct tui_data_window) <start_line>: New member, from tui_command_info. (TUI_CMD_WIN): Add casts.
2019-06-25Remove struct tui_source_infoTom Tromey9-111/+147
The tui_source_info struct is used as a member of the "detail" union in tui_win_info, and this member of the union is only used by source and disassembly windows. This patch removes tui_source_info and moves its members directly to tui_source_window_base. This simplifies the code by removing a layer of references from many places. In a few spots, a new cast was needed, but most of these will be removed by the end of the series. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-winsource.c (tui_update_source_window) (tui_refill_source_window) (tui_source_window_base::do_scroll_horizontal) (tui_update_breakpoint_info, tui_set_exec_info_content) (tui_show_exec_info_content, tui_erase_exec_info_content) (tui_clear_exec_info_content): Update. * tui/tui-wingeneral.c (make_all_visible, tui_refresh_all): Update. * tui/tui-win.c (make_invisible_and_set_new_height) (make_visible_with_new_height): Update. * tui/tui-source.c (tui_set_source_content) (tui_show_symtab_source): Update. * tui/tui-layout.c (extract_display_start_addr) (show_source_disasm_command, show_data) (make_source_or_disasm_window) (show_source_or_disasm_and_command): Update. * tui/tui-disasm.c (tui_set_disassem_content): Simplify. (tui_disasm_window::do_scroll_vertical): Remove shadowing "gdbarch". * tui/tui-data.h (struct tui_source_info): Remove. Move contents to tui_source_window_base. (struct tui_win_info) <detail>: Remove source_info member. (struct tui_source_window_base) <has_locator>: Inline. Move contents from tui_source_info; rename has_locator member to m_has_locator. (TUI_SRC_WIN, TUI_DISASM_WIN): Add casts. * tui/tui-data.c (tui_source_window_base::has_locator): Move to header file. (tui_source_window_base::clear_detail, ~tui_source_window_base): Simplify. (tui_free_all_source_wins_content): Cast to tui_source_window_base.
2019-06-25Introduce has_locator methodTom Tromey5-16/+40
This changes tui_win_has_locator to be a method on tui_win_info, and changes the locator code to use bool rather than int. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-win.c (make_invisible_and_set_new_height) (make_visible_with_new_height): Call has_locator method. * tui/tui-layout.c (show_source_disasm_command, show_data) (show_source_or_disasm_and_command): Update for bool change. * tui/tui-data.h (struct tui_source_info) <has_locator>: Now bool. (tui_win_info) <has_locator>: New method. (struct tui_source_window_base) <has_locator>: New method. (tui_win_has_locator): Don't declare. * tui/tui-data.c (tui_source_window_base::has_locator): Rename from tui_win_has_locator. (tui_source_window_base): Use false, not FALSE.
2019-06-25Remove tui_clear_win_detailTom Tromey3-11/+8
An earlier patch changed the context of the sole call to tui_clear_win_detail to make it clear that this can never be called with a NULL window pointer. So, remove tui_clear_win_detail in favor of calling the method directly. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-data.h (tui_clear_win_detail): Don't declare. * tui/tui-data.c (tui_clear_source_windows_detail): Call the clear_detail method directly. (tui_clear_win_detail): Remove.
2019-06-25Don't use TUI_DISASM_WIN in tui_disasm_window methodTom Tromey2-1/+6
The previous patch made it clear that the diassembly window scrolling method was written to assume there could only ever be a single disassembly window. This changes that spot to use "this" rather than the TUI_DISASM_WIN global. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-disasm.c (tui_disasm_window::do_scroll_vertical): Use "this", not TUI_DISASM_WIN.
2019-06-25Introduce methods for scrollingTom Tromey13-144/+134
This changes the TUI to use virtual methods on the various window types for scrolling. Window-specific functions for this purpose are renamed to be methods, and the generic tui_scroll function is removed as it is no longer called. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-winsource.h (tui_horizontal_source_scroll): Don't declare. * tui/tui-winsource.c (tui_source_window_base::do_scroll_horizontal): Rename from tui_horizontal_source_scroll. * tui/tui-windata.h (tui_vertical_data_scroll): Don't declare. * tui/tui-windata.c (tui_data_window::do_scroll_vertical): Rename from tui_vertical_data_scroll. * tui/tui-win.h (tui_scroll): Don't declare. * tui/tui-win.c (tui_win_info::forward_scroll) (tui_win_info::backward_scroll, tui_win_info::left_scroll) (tui_win_info::right_scroll): Rename and update. (tui_scroll_forward_command, tui_scroll_backward_command) (tui_scroll_left_command, tui_scroll_right_command): Update. (tui_scroll): Remove. * tui/tui-source.h: Don't declare tui_vertical_source_scroll. * tui/tui-source.c (tui_source_window::do_scroll_vertical): Rename from tui_vertical_source_scroll. * tui/tui-disasm.h (tui_vertical_disassem_scroll): Don't declare. * tui/tui-disasm.c (tui_disasm_window::do_scroll_vertical): Rename from tui_vertical_disassem_scroll. * tui/tui-data.h (struct tui_win_info) <do_scroll_vertical, do_scroll_horizontal>: New methods. <forward_scroll, backward_scroll, left_scroll, right_scroll>: Likewise. (struct tui_source_window_base): Add do_scroll_horizontal. (struct tui_source_window, struct tui_disasm_window): Add do_scroll_vertical. (struct tui_data_window, struct tui_cmd_window): Add do_scroll_horizontal and do_scroll_vertical. * tui/tui-command.c (tui_dispatch_ctrl_char): Use method calls.
2019-06-25Create tui_disasm_windowTom Tromey3-8/+51
This introduces the new tui_disasm_window class, which represents a disassembly window. It shares a lot of behavior with the source window, so a new tui_source_window_base class is also created. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-data.h (struct tui_source_window_base): New struct. (struct tui_source_window): Derive from tui_source_window_base. (struct tui_disasm_window): New struct. * tui/tui-data.c (tui_source_window_base::clear_detail): Rename from tui_source_window::clear_detail. (tui_source_window_base): Rename from tui_source_window. (~tui_source_window_base): Rename from ~tui_source_window. (tui_alloc_win_info): Create a tui_disasm_window.
2019-06-25Split the tui_win_info destructorTom Tromey3-37/+43
This patch adds destructors to tui_source_window and tui_data_window, and splits ~tui_win_info as appropriate. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-data.h (struct tui_source_window) (struct tui_data_window): Declare destructors. * tui/tui-data.c (~tui_source_window, ~tui_data_window): New destructors. (tui_win_info): Simplify.
2019-06-25Remove tui_listTom Tromey6-64/+47
This removes the tui_list type in favor of a std::vector. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-winsource.c (tui_display_main) (tui_update_source_windows_with_addr) (tui_update_all_breakpoint_info): Update. * tui/tui-win.c (tui_resize_all, tui_adjust_win_heights) (new_height_ok, parse_scrolling_args): Update. * tui/tui-stack.c (tui_show_frame_info): Update. * tui/tui-data.h (struct tui_list): Remove. (tui_source_windows): Return a reference to a std::vector. * tui/tui-data.c (source_windows): Now a std::vector. (tui_source_windows): Change return type. (tui_clear_source_windows): Rewrite. (tui_clear_source_windows_detail, tui_add_to_source_windows) (tui_free_all_source_wins_content): Rewrite.
2019-06-25Introduce tui_win_info::clear_detail methodTom Tromey3-25/+51
This introduces the clear_detail method and updates the various subclasses of tui_win_info to implement it. A subsequent patch will remove tui_clear_win_detail, but that isn't done for now because at this point it isn't readily obvious that the NULL check is not needed. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-data.h (struct tui_win_info, struct tui_source_window) (struct tui_data_window, struct tui_cmd_window): Declare clear_detail method. * tui/tui-data.c (tui_source_window::clear_detail) (tui_cmd_window::clear_detail, tui_data_window::clear_detail): New methods. (tui_clear_win_detail): Simplify.
2019-06-25Simplify source and disassembly window creationTom Tromey2-30/+32
Similar to the previous patch, neither make_source_window nor make_disasm_window could be called when *win_info_ptr was non-NULL. This patch simplifies the functions by removing the parameter and having them return their results directly. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-layout.c (make_source_window, make_disasm_window) (make_source_or_disasm_window): Remove win_info_ptr parameter. Return the new window. (show_source_disasm_command, show_data) (show_source_or_disasm_and_command): Update.
2019-06-25Simplify command window creationTom Tromey2-77/+76
make_command_window is never called when *win_info_ptr is non-NULL, so this patch simplifies the function by removing the parameter and having it return its result directly. This in turn makes it more obvious that a NULL check in show_source_disasm_command can be removed. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-layout.c (make_command_window): Remove win_info_ptr parameter. Return the new window. (show_source_disasm_command): Update and remove NULL check. (show_source_or_disasm_and_command): Update.
2019-06-25Remove an unnecessary NULL check from the TUITom Tromey2-10/+12
In init_and_make_win, opaque_win_info can't be NULL after a new window is allocated. This patch removes an unnecessary NULL check. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-layout.c (init_and_make_win): Remove NULL check.
2019-06-25Create subclasses for different window typesTom Tromey3-40/+86
This changes the TUI so that each different major window type has its own subclass. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-data.h (struct tui_win_info): Make constructor protected. Make destructor virtual. Add initializers. (tui_source_window, tui_data_window, tui_cmd_window): New classes. * tui/tui-data.c (tui_win_info): Rename from init_win_info. Now a constructor. Add "type" parameter. (tui_source_window, tui_data_window, tui_cmd_window): New constructors. (tui_alloc_win_info): Instantiate the appropriate subclass.
2019-06-25Add destructor to tui_win_infoTom Tromey4-29/+37
This changes tui_free_window into a destructor for tui_free_window and then updates the users. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-win.c (tui_resize_all): Use delete. * tui/tui-data.h (struct tui_win_info) <~tui_win_info>: Declare destructor. (tui_free_window): Don't declare. * tui/tui-data.c (~tui_win_info): Rename from tui_free_window. Update.
2019-06-25Use new and delete for TUI windowsTom Tromey3-3/+15
This changes tui_win_info to use new and delete, rather than XNEW and xfree. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-data.h (struct tui_win_info): Add constructor. * tui/tui-data.c (tui_alloc_win_info): Use new. (tui_free_window): Use delete.
2019-06-25ld/plugins: avoid shadowing a C library symbolJan Beulich2-15/+20
With my (oldish) gcc/glibc combination I'm seeing .../ld/plugin.c: In function ‘get_lto_kind’: .../ld/plugin.c:664: error: declaration of ‘index’ shadows a global declaration /usr/include/string.h:487: error: shadowed declaration is here .../ld/plugin.c: In function ‘get_lto_resolution’: .../ld/plugin.c:685: error: declaration of ‘index’ shadows a global declaration /usr/include/string.h:487: error: shadowed declaration is here .../ld/plugin.c: In function ‘get_lto_visibility’: .../ld/plugin.c:711: error: declaration of ‘index’ shadows a global declaration /usr/include/string.h:487: error: shadowed declaration is here
2019-06-25bfd/elf-properties: avoid shadowing a C library symbolJan Beulich2-4/+9
With my (oldish) gcc/glibc combination I'm seeing .../bfd/elf-properties.c: In function ‘elf_find_and_remove_property’: .../bfd/elf-properties.c:244: error: declaration of ‘remove’ shadows a global declaration /usr/include/stdio.h:157: error: shadowed declaration is here
2019-06-25readelf: avoid shadowing a libiberty symbolJan Beulich2-2/+7
With my (oldish) gcc I'm seeing .../binutils/readelf.c: In function ‘dump_ctf_indent_lines’: .../binutils/readelf.c:13851: error: declaration of ‘spaces’ shadows a global declaration .../binutils/../include/libiberty.h:253: error: shadowed declaration is here
2019-06-25objdump: avoid shadowing a libiberty symbolJan Beulich2-2/+7
With my (oldish) gcc I'm seeing .../binutils/objdump.c: In function ‘dump_ctf_indent_lines’: .../binutils/objdump.c:3210: error: declaration of ‘spaces’ shadows a global declaration .../binutils/../include/libiberty.h:253: error: shadowed declaration is here
2019-06-25x86: correct / adjust debug printingJan Beulich5-23/+48
For quite some time we've been using combinations of bits for specifying various registers in operands and templates. I think it was Alan who had indicated that likely the debug printing would need adjustment as a result. Here we go. Accumulator handling for GPRs gets changed to match that for FPU regs. For this to work, OPERAND_TYPE_ACC{32,64} get repurposed, with their original uses replaced by direct checks of the two bits of interest, which is cheaper than operand_type_equal() invocations. For SIMD registers nothing similar appears to be needed, as respective operands get stripped from the (copy of the) template before pt() is reached. The type change on pi() is to silence a compiler diagnostic. Arguably its other parameter could also be const-qualified.
2019-06-25x86: document certain command line options as "dangerous"Jan Beulich2-0/+11
Errata BT36, BT41, and BT230 mean that gas may, when using one ofthese options, produce code that causes #UD on (at least) SandyBridge systems.
2019-06-25x86: drop dqa_modeJan Beulich4-24/+15
I assume this mode was needed when EVEX.W handling wasn't really correct yet for other than 64-bit mode. It's clearly not needed anymore. Its elimination also allows dropping the EVEX.W split of VCVT{,U}SI2SS. (For the record, the dropped mode would have been wrong if used in any table entry not already guaranteeing EVEX.W=1.)
2019-06-25x86: don't open code is_any_vex_encoding()Jan Beulich2-3/+5
2019-06-25x86: simplify OP_I64()Jan Beulich2-40/+8
The only meaningful difference from OP_I() is the handling of the VEX.W=1 case in 64-bit mode for bytemode being v_mode. Funnel everything else into OP_I(), and drop no longer needed local variables.
2019-06-25x86: fix (dis)assembly of certain SSE2 insns in 16-bit modeJan Beulich8-9/+198
MOVNTI was wrongly assembled with a 66h prefix. Add IgnoreSize to address this. It and the scalar to/from integer conversion insns also were also wrongly using Ev / Gv, leading to 16-bit register names being printed when 32-bit ones were meant. Clone the 32-bit SSE2 test to cover both assembler and disassembler.
2019-06-25x86-64: also optimize ANDQ with immediate fitting in 7 bitsJan Beulich7-3/+32
The same reasoning applies here as did/does for immediates fitting in 31 bits.
2019-06-25x86: add CVT{,T}PS2PI cases to xmmwords testJan Beulich3-0/+12
I've (not so) recently noticed this further pair which should be tested here.
2019-06-25Fix logical expression in last commitAlan Modra2-1/+5
* config/tc-ppc.c (ppc_handle_align): Add parentheses.
2019-06-25PowerPC nopsAlan Modra6-19/+106
This patch corrects ppc rs_align_code handling to choose the alignment nops based on the machine in force at the alignment directive rather than the machine at the end of file. * config/tc-ppc.h (ppc_nop_select): Declare. (NOP_OPCODE): Define. * config/tc-ppc.c (ppc_elf_end, ppc_xcoff_end): Zero ppc_cpu. (ppc_nop_encoding_for_rs_align_code): New enum. (ppc_nop_select): New function. (ppc_handle_align): Don't use ppc_cpu here. Get nop type from frag. * testsuite/gas/ppc/groupnop.d, * testsuite/gas/ppc/groupnop.s: New test. * testsuite/gas/ppc/ppc.exp: Run it.
2019-06-25Automatic date update in version.inGDB Administrator1-1/+1
2019-06-24RISC-V: Enable lui relaxation for CODE and MERGE sections.Jim Wilson2-10/+55
2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com> bfd/ * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when SEC_MERGE or SEC_CODE flags are set. (_bfd_riscv_relax_section): New local symtype. Set sym_sec and symtype consistently. Don't include sec_addr (sym_sec) in symval. Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset. Add sec_addr (sym_sec) after handling merge sections.
2019-06-24elf: Remove the property after reporting its removalH.J. Lu9-6/+77
commit d2ef37ebd9f771d06edf1fdea37970f60b242b2d Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Dec 7 08:30:30 2018 -0800 elf: Report property change when merging properties failed to remove the property after reporting it has been removed. This patch corrects it. bfd/ PR ld/24721 * elf-properties.c (elf_merge_gnu_property_list): Remove the property after reporting property removal. ld/ PR ld/24721 * testsuite/ld-x86-64/x86-64.exp: Run PR ld/24721 tests. * testsuite/ld-x86-64/pr24721-x32.d: New file. * testsuite/ld-x86-64/pr24721.d: Likewise. * testsuite/ld-x86-64/pr24721.map: Likewise. * testsuite/ld-x86-64/pr24721a.s: Likewise. * testsuite/ld-x86-64/pr24721b.s: Likewise.
2019-06-24[gdb/testsuite] Fix label reference in implptr-64bit.expTom de Vries2-1/+5
When running gdb.dwarf2/implptr-64bit.exp with board cc-with-dwz-m, we run into: ... dwz: dwz.c:2363: checksum_die: \ Assertion `\ ((!op_multifile && !rd_multifile && !fi_multifile) || cu != die_cu (ref)) \ && (!op_multifile || cu->cu_chunk == die_cu (ref)->cu_chunk)' failed. cc-with-tweaks.sh: line 218: 13030 Aborted \ $DWZ -m ${output_file}.dwz "$output_file" ${output_file}.alt > /dev/null ... In other words, PR dwz/24170. The trigger for the dwz PR is when intra-CU references are encoded using section-relative encoding DW_FORM_ref_addr, but could have been encoded using CU-relative encoding DW_FORM_ref4. Fix the intra-CU '%' label reference in implptr-64bit.exp. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2019-06-24 Tom de Vries <tdevries@suse.de> * gdb.dwarf2/implptr-64bit.exp: Fix intra-CU '%' label reference.
2019-06-24[gdb/testsuite] Fix DW_AT_decl_file in gdb.trace testsTom de Vries3-6/+12
When running gdb.trace/{entry-values.exp,unavailable-dwarf-piece.exp} with board cc-with-dwz, we run into two failures related to the DW_AT_decl_file attribute: - The encoding DW_FOR_sdata is used for DW_AT_decl_file, while the attribute is required to have a an "unsigned integer constant" value. - The DW_AT_decl_file attributes refer to a file with index one, while there's no such file. Fix this by using DW_FOR_udata and the value 0, meaning "no file specified". Tested on x86_64-linux with board native-gdbserver. gdb/testsuite/ChangeLog: 2019-06-24 Tom de Vries <tdevries@suse.de> * gdb.trace/entry-values.exp: Use DW_FORM_udata instead of DW_FOR_sdata for DW_AT_decl_file. Use 0 for DW_AT_decl_file. * gdb.trace/unavailable-dwarf-piece.exp: Same.
2019-06-24[gdb/testsuite] Fix inter-cu refs in inlined_subroutine-inheritance.expTom de Vries2-3/+7
When running gdb.dwarf2/inlined_subroutine-inheritance.exp with board cc-with-dwz, we run into: ... dwz: inlined_subroutine-inheritance: Couldn't find DIE referenced by \ DW_AT_abstract_origin ... The problem is that the DW_AT_abstract_origin attributes refer to DIEs in other CUs, while the references are encoded using the cu-relative encoding DW_FORM_ref4. Fix this by forcing the references to use DW_FORM_ref_addr. Tested on x86_64-linux. Tested with commit c24bdb023c "Introduce dwarf2_cu::get_builder" reverted, and verified that the test-case fails in the same way before and after this patch. gdb/testsuite/ChangeLog: 2019-06-24 Tom de Vries <tdevries@suse.de> * gdb.dwarf2/inlined_subroutine-inheritance.exp: