aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-07-06x86: adjust/correct V*{F,I}{32x8,64x4}Jan Beulich2-14/+22
For all of these only the 512-bit forms are valid, so drop 256-bit ones from the integer insert/extract variants. Also replace EXxmmq by the more natural (here) EXymm.
2020-07-06x86: drop EVEX table entries that can be made served by VEX onesJan Beulich5-165/+92
By doing the EVEX.W decode first, in various cases VEX table entries can be re-used.
2020-07-06x86: AVX512 VPERM{D,Q,PS,PD} insns need to honor EVEX.L'LJan Beulich5-4/+47
Just like (where they exist) their AVX counterparts do for VEX.L. For all of them the 128-bit forms are invalid.
2020-07-06x86: AVX512 extract/insert insns need to honor EVEX.L'LJan Beulich10-45/+120
Just like their AVX counterparts do for VEX.L. At this occasion also make EVEX.W have the same effect as VEX.W on the printing of VPINSR{B,W}'s operands, bringing them also in sync with VPEXTR{B,W}.
2020-07-06x86: honor VEX.W for VCVT{PH2PS,PS2PH}Jan Beulich5-15/+27
Unlike for the EVEX-encoded versions, the VEX ones failed to decode VEX.W. Once the necessary adjustments are done, it becomes obvious that the EVEX and VEX table entries for VCVTPS2PH are identical and can hence be folded.
2020-07-06x86: drop EVEX table entries that can be served by VEX onesJan Beulich5-713/+185
The duplication is not only space inefficient, but also risks entries going out of sync (some of which that I became aware of while doing this work will get addressed subsequently). Right here note that for VGF2P8MULB this also addresses the prior lack of EVEX.W decoding (i.e. a first example of out of sync entries). This introduces EXxEVexR to some VEX templates, on the basis that this operand is benign there and only relevant when EVEX encoding ends up reaching these entries.
2020-07-06x86: replace EXqScalarS by EXqVexScalarSJan Beulich10-7/+29
There's only a single user, that that one can do fine with the alternative, as the "Vex" aspect of the other operand kind is meaningful only on 3-operand insns. While doing this I noticed that I didn't need to do the same adjustment in the EVEX tables, and voilà - there was a bug, which gets fixed at the same time (see the testsuite changes).
2020-07-06x86: replace EX{d,q}Scalar by EXxmm_m{d,q}Jan Beulich3-47/+48
Along the lines of 4102be5cf925 ("x86: replace EXxmm_mdq by EXVexWdqScalar"), but in the opposite direction, replace EXdScalar/ EXqScalar by EXxmm_md/EXxmm_mq respectively, rendering d_scalar_mode and q_scalar_mode unused. The change is done this way to improve telling apart operands affected here from ones using EXbScalar/EXwScalar, which work sufficiently differently. Additionally this increases similarity between several VEX-encoded insns and their EVEX-encoded counterparts.
2020-07-06Fix spelling mistakes in some of the binutils sub-directories.Nick Clifton11-1690/+1916
PR 26204 gas * config/tc-arm.c: Fix spelling mistake. * config/tc-riscv.c: Likewise. * config/tc-z80.c: Likewise. * po/gas.pot: Regenerate. ld * lexsup.c: Fix spelling mistake. * po/ld.pot: Regenerate. opcodes * arc-dis.c: Fix spelling mistake. * po/opcodes.pot: Regenerate.
2020-07-06Updated translations for various binutils sub-directoriesNick Clifton22-22170/+22964
2020-07-06[gdb/tui,c++17] Fix NULL string_view in tui_partial_win_by_nameTom de Vries2-13/+15
When building gdb with CFLAGS=-std=gnu17 and CXXFLAGS=-std=gnu++17 and running test-case gdb.tui/new-layout.exp, we run into: ... UNRESOLVED: gdb.tui/new-layout.exp: left window box after shrink (ll corner) FAIL: gdb.tui/new-layout.exp: right window box after shrink (ll corner) ... In a minimal form, we run into an abort when issuing a winheight command: ... $ gdb -tui -ex "winheight src - 5" <tui stuff> Aborted (core dumped) $ ... with this backtrace at the abort: ... \#0 0x0000000000438db0 in std::char_traits<char>::length (__s=0x0) at /usr/include/c++/9/bits/char_traits.h:335 \#1 0x000000000043b72e in std::basic_string_view<char, \ std::char_traits<char> >::basic_string_view (this=0x7fffffffd4f0, \ __str=0x0) at /usr/include/c++/9/string_view:124 \#2 0x000000000094971b in tui_partial_win_by_name (name="src") at src/gdb/tui/tui-win.c:663 ... due to a NULL comparison which constructs a string_view object from NULL: ... 657 /* Answer the window represented by name. */ 658 static struct tui_win_info * 659 tui_partial_win_by_name (gdb::string_view name) 660 { 661 struct tui_win_info *best = nullptr; 662 663 if (name != NULL) ... In gdbsupport/gdb_string_view.h, we either use: - gdb's copy of libstdc++-v3/include/experimental/string_view, or - the standard implementation of string_view, when built with C++17 or later (which in gcc's case comes from libstdc++-v3/include/std/string_view) In the first case, there's support for constructing a string_view from a NULL pointer: ... /*constexpr*/ basic_string_view(const _CharT* __str) : _M_len{__str == nullptr ? 0 : traits_type::length(__str)}, _M_str{__str} { } ... but in the second case, there's not: ... __attribute__((__nonnull__)) constexpr basic_string_view(const _CharT* __str) noexcept : _M_len{traits_type::length(__str)}, _M_str{__str} { } ... Fix this by removing the NULL comparison altogether. Build on x86_64-linux with CFLAGS=-std=gnu17 and CXXFLAGS=-std=gnu++17, and tested. gdb/ChangeLog: 2020-07-06 Tom de Vries <tdevries@suse.de> PR tui/26205 * tui/tui-win.c (tui_partial_win_by_name): Don't test for NULL name.
2020-07-06asan: readelf: stack buffer overflowAlan Modra2-2/+7
* readelf.c (print_dynamic_symbol): Don't sprintf to buffer to find string length.
2020-07-06Automatic date update in version.inGDB Administrator1-1/+1
2020-07-05[gdb/build,c++17] Fix use of deprecated std::uncaught_exceptionTom de Vries2-1/+16
When compiling gdb with -std=gnu++17, we run into: ... ../../gdb/inferior.h: In member function ‘void \ infcall_suspend_state_deleter::operator()(infcall_suspend_state*) const’: ../../gdb/inferior.h:83:12: error: ‘bool std::uncaught_exception()’ is \ deprecated [-Werror=deprecated-declarations] 83 | if (!std::uncaught_exception ()) ... Fix this by rewriting using std::uncaught_exceptions. Tested on x86_64-linux with gcc 9.3.1 and -std=gnu17/gnu++17. Tested with test-case from RFC patch https://sourceware.org/pipermail/gdb-patches/2020-June/169970.html. gdb/ChangeLog: 2020-07-05 Tom de Vries <tdevries@suse.de> PR build/26187 * inferior.h (struct infcall_suspend_state_deleter): If available, use std::uncaught_exceptions instead of deprecated std::uncaught_exception.
2020-07-05Automatic date update in version.inGDB Administrator1-1/+1
2020-07-04Tweak version numbers in release-howtoNick Clifton1-6/+6
2020-07-04oops - omitted from previous deltaNick Clifton1-0/+6
2020-07-04Update version to 2.35.50 and regenerate filesNick Clifton16-5105/+5331
2020-07-04Add markers for binutils 2.35 branchNick Clifton17-0/+59
2020-07-03gdb: make macro_stringify return a gdb::unique_xmalloc_ptr<char>Simon Marchi4-16/+15
The change to macro_stringify is straightforward. This allows removing the manual memory management in fixup_definition. gdb/ChangeLog: * macroexp.h (macro_stringify): Return gdb::unique_xmalloc_ptr<char>. * macroexp.c (macro_stringify): Likewise. * macrotab.c (fixup_definition): Update. Change-Id: Id7db8988bdbd569dd51c4f4655b00eb26db277cb
2020-07-03gdb: make macro_expand_next return a gdb::unique_xmalloc_ptr<char>Simon Marchi4-22/+28
For some reason, macro_expand_next does not return a gdb::unique_xmalloc_ptr<char>, like its counterparts macro_expand and macro_expand_once. This patch fixes that. macro_buffer::release now returns a gdb::unique_xmalloc_ptr<char> too, which required updating the other callers. The `.release (). release ()` in macro_stringify looks a bit funny, but it's because one release is for the macro_buffer, and the other is for the unique ptr. I removed the ATTRIBUTE_UNUSED_RESULT on macro_buffer::release, I don't really understand why it's there. I don't see how this method could be called without using the result, that would be an obvious memory leak. The commit that introduced it (4e4a8b932b7 "Add ATTRIBUTE_UNUSED_RESULT to macro_buffer") doesn't give any details. gdb/ChangeLog: * c-exp.y (scan_macro_expansion): Don't free `expansion`. (lex_one_token): Update. * macroexp.c (struct macro_buffer) <release>: Return gdb::unique_xmalloc_ptr<char>. (macro_stringify): Update. (macro_expand): Update. (macro_expand_next): Return gdb::unique_xmalloc_ptr<char>. * macroexp.h (macro_expand_next): Likewise. Change-Id: I67a74d0d479d2c20cdc82161ead7c54cea034f56
2020-07-03gdb: remove callback in macro expand functionsSimon Marchi7-91/+72
I started to look into changing the callbacks in macroexp.h to use gdb::function_view. However, I noticed that the passed lookup function was always `standard_macro_lookup`, which looks up a macro in a `macro_scope` object. Since that doesn't look like a very useful abstraction, it would be simpler to just pass the scope around and have the various functions call standard_macro_lookup themselves. This is what this patch does. gdb/ChangeLog: * macroexp.h (macro_lookup_ftype): Remove. (macro_expand, macro_expand_once, macro_expand_next): Remove lookup function parameters, add scope parameter. * macroexp.c (scan, substitute_args, expand, maybe_expand, macro_expand, macro_expand_once, macro_expand_next): Likewise. * macroscope.h (standard_macro_lookup): Change parameter type to macro_scope. * macroscope.c (standard_macro_lookup): Likewise. * c-exp.y (lex_one_token): Update. * macrocmd.c (macro_expand_command): Likewise. (macro_expand_once_command): Likewise. Change-Id: Id2431b1489359e1b0274dc2b81e5ea5d225d730c
2020-07-04Automatic date update in version.inGDB Administrator1-1/+1
2020-07-03sim/igen: Fix linker error with -fno-commonSebastian Huber4-0/+20
GCC 10 enables -fno-common by default. This resulted in multiple definition linker errors since a global variable was declared and defined in a header file: ld: libsim.a(idecode.o):sim/v850/idecode.h:71: multiple definition of `idecode_issue'; libsim.a(irun.o):sim/v850/idecode.h:71: first defined here ld: libsim.a(engine.o):sim/v850/idecode.h:71: multiple definition of `idecode_issue'; libsim.a(irun.o):sim/v850/idecode.h:71: first defined here ld: libsim.a(support.o):sim/v850/idecode.h:71: multiple definition of `idecode_issue'; libsim.a(irun.o):sim/v850/idecode.h:71: first defined here ld: libsim.a(semantics.o):sim/v850/idecode.h:71: multiple definition of `idecode_issue'; libsim.a(irun.o):sim/v850/idecode.h:71: first defined here sim/igen PR sim/26194 * lf.h (lf_get_file_type): Declare. * lf.c (lf_get_file_type): Define. * gen-idecode.c (print_idecode_issue_function_header): Use lf_get_file_type() to issue an extern variable declaration in case of header files.
2020-07-03sim/ppc: Fix linker error with -fno-commonSebastian Huber3-17/+38
GCC 10 enables -fno-common by default. This resulted in a multiple definition linker error since global variables were declared and defined in a header file: ld: ld-insn.o:sim/ppc/ld-insn.h:221: multiple definition of `max_model_fields_len'; igen.o:sim/ppc/ld-insn.h:221: first defined here sim/ppc * ld-insn.h (last_model, last_model_data, last_model_function, last_model_internal, last_model_macro, last_model_static): Delete. (max_model_fields_len, model_data, model_functions, model_internal, model_macros, model_static, models): Declare, but do not define. * ld-insn.c (last_model, last_model_data, last_model_function, last_model_internal, last_model_macro, last_model_static, max_model_fields_len, model_data, model_functions, model_internal, model_macros, model_static, models): Define.
2020-07-03Fix gdb.base/structs2.exp with ClangPedro Alves3-2/+8
gdb.base/structs2.exp fails to run with Clang, because of: gdb compile failed, /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/structs2.c:16:14: warning: implicit conversion from 'int' to 'signed char' changes value from 130 to -126 [-Wconstant-conversion] param_reg (130, 120, 33000, 32000); ~~~~~~~~~ ^~~ /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/structs2.c:16:24: warning: implicit conversion from 'int' to 'short' changes value from 33000 to -32536 [-Wconstant-conversion] param_reg (130, 120, 33000, 32000); ~~~~~~~~~ ^~~~~ 2 warnings generated. === gdb Summary === # of untested testcases 1 Fix it by passing actual negative numbers. gdb/testsuite/ChangeLog: * gdb.base/structs2.c (main): Adjust second parem_reg call to explicitly write negative numbers. * gdb.base/structs2.exp: Adjust expected output.
2020-07-03Fix gdb.base/charset.exp with ClangPedro Alves2-4/+18
gdb.base/charset.exp fails to run with Clang, because of: gdb compile failed, /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/charset.c:144:20: warning: implicit conversion from 'int' to 'char' changes value from 162 to -94 [-Wconstant-conversion] 11, 162, 17); ^~~ /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/charset.c:151:16: warning: implicit conversion from 'int' to 'char' changes value from 167 to -89 [-Wconstant-conversion] 167, ^~~ /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/charset.c:168:16: warning: implicit conversion from 'int' to 'char' changes value from 167 to -89 [-Wconstant-conversion] 167, ^~~ 3 warnings generated. === gdb Summary === # of untested testcases 1 Fix it by changing init_string to take unsigned char parameters. gdb/testsuite/ChangeLog: * gdb.base/charset.c (init_string): Change all char parameters to unsigned char parameters.
2020-07-03Remove stale -DNO_PROTOTYPES bits from gdb testsuitePedro Alves8-67/+27
The gdb.base/call-sc.exp, gdb.base/structs.exp and gdb.base/structs2.exp testcases still try compiling the sources with -DNO_PROTOTYPES, but the corresponding sources don't have any #ifdef NO_PROTOTYPES any longer. Those were removed throughout years ago. OTOH, gdb.base/ovlymgr.h does check for NO_PROTOTYPES, but no .exp file compiles it with -DNO_PROTOTYPES. gdb.base/reread.exp and gdb.base/varargs.exp set a 'prototypes' global, which is a stale bit left behind when the "try-compiling without and then with -DNO_PROTOTYPES" logic was around. gdb/testsuite/ChangeLog: * gdb.base/call-sc.exp (start_scalars_test): Use prepare_for_testing and don't try compiling with -DNO_PROTOTYPES. * gdb.base/overlays.c: Remove references to PARAMS. * gdb.base/ovlymgr.h (PARAMS): Delete, and remove all references. * gdb.base/reread.exp: Don't set 'prototypes' global. * gdb.base/structs.exp (start_structs_test): Use prepare_for_testing and don't try compiling with -DNO_PROTOTYPES. * gdb.base/structs2.exp: Don't set 'prototypes' global. Use prepare_for_testing and don't try compiling with -DNO_PROTOTYPES. Don't issue "set width 0". Remove gdb_stop_suppressing_tests call. * gdb.base/varargs.exp: Don't set 'prototypes' global.
2020-07-03Remove stale overlay testcase bitsPedro Alves4-583/+5
D10V support was removed years ago, but the gdb.base/d10vovly.c file stayed behind. Looking a bit closer, I can't find anywhere that references gdb.base/m32rovly.c either. Both gdb.base/m32rovly.c and gdb.base/d10vovly.c seem to be older copies of gdb.base/ovlymgr.c, that are exactly the same, except for some cosmetic differences, and for missing _ovly_debug_event. Note that gdb.base/ovlymgr.c has the #ifdef __M32R__ bits too. Note also that gdb.base/overlays.exp is currently only supported on m32r, and that uses ovlymgr.c not gdb.base/m32rovly.c. gdb/testsuite/ChangeLog: * gdb.base/d10vovly.c: Delete. * gdb.base/m32rovly.c: Delete. * gdb.base/ovlymgr.c: Remove all code guarded by __D10V__.
2020-07-03Re: Change readelf's display of symbol namesAlan Modra14-63/+88
Fixes some fallout from git commit 0942c7ab94e5. PR 26028 gas/ * testsuite/gas/ia64/unwind-ilp32.d: Add -T to readelf options. gold/ * testsuite/Makefile.am (file_in_many_sections.stdout): Add -W to readelf options. * testsuite/Makefile.in: Regenerate. ld/ * testsuite/ld-arm/arm-elf.exp (vxworks1): Pass --wide to readelf when dumping relocs. * testsuite/ld-i386/i386.exp (vxworks1): Likewise. * testsuite/ld-sh/sh-vxworks.exp (vxworks1): Likewise. * testsuite/ld-sparc/sparc.exp (vxworks1): Likewise. * testsuite/ld-arm/vxworks1.rd: Adjust to suit. * testsuite/ld-i386/vxworks1.rd: Adjust. * testsuite/ld-sh/vxworks1.rd: Adjust. * testsuite/ld-sparc/vxworks1.rd: Adjust.
2020-07-03Automatic date update in version.inGDB Administrator1-1/+1
2020-07-02x86: Add SwapSourcesH.J. Lu7-3991/+4008
We check register-only source operand to decide if two source operands of VEX encoded instructions should be swapped. But source operands in AMX instructions with two source operands swapped are all register-only operand. Add SwapSources to indicate two source operands should be swapped. gas/ * config/tc-i386.c (build_modrm_byte): Check vexswapsources to swap two source operands. opcodes/ * i386-gen.c (opcode_modifiers): Add VexSwapSources. * i386-opc.h (VexSwapSources): New. (i386_opcode_modifier): Add vexswapsources. * i386-opc.tbl: Add VexSwapSources to BMI2 and BMI instructions with two source operands swapped. * i386-tbl.h: Regenerated.
2020-07-02Skip fill-1 gas test for MeP targets.Nick Clifton2-1/+7
* testsuite/gas/all/fill-1.d: Skip for MeP targets.
2020-07-02aarch64: Fix segfault on unicode symbolsAlex Coplan4-1/+18
This patch fixes a segfault which occurs when the AArch64 backend parses a symbol operand that begins with a register name and ends with a unicode byte (byte value > 127). For example, the following input causes the crash: x0é: udf x0é gas/ChangeLog: 2020-07-02 Alex Coplan <alex.coplan@arm.com> * config/tc-aarch64.c (reg_name_p): Fix cast so that we don't segfault on negative chars. * testsuite/gas/aarch64/reglike-label-unicode-segv.d: New test. * testsuite/gas/aarch64/reglike-label-unicode-segv.s: Input.
2020-07-02gdb: remove unused fetch_inferior_event and inferior_event_handler parametersSimon Marchi10-18/+31
I noticed that fetch_inferior_event receives the client_data parameter from its caller, inferior_event_handler, but doesn't actually need it. This patch removes it. In turn, inferior_event_handler doesn't use its parameter, so remove it too. The `data` argument used when registering remote_async_inferior_event_handler is changed to NULL, to avoid confusion. It could make people think that the value passed is used somewhere, when in fact it's not. gdb/ChangeLog: * inf-loop.c (inferior_event_handler): Remove client_data param. * inf-loop.h (inferior_event_handler): Likewise. * infcmd.c (step_1): Adjust. * infrun.c (proceed): Adjust. (fetch_inferior_event): Remove client_data param. (infrun_async_inferior_event_handler): Adjust. * infrun.h (fetch_inferior_event): Remove `void *` param. * linux-nat.c (handle_target_event): Adjust. * record-btrace.c (record_btrace_handle_async_inferior_event): Adjust. * record-full.c (record_full_async_inferior_event_handler): Adjust. * remote.c (remote_async_inferior_event_handler): Adjust. Change-Id: I3c2aa1eb0ea3e0985df096660d2dcd794674f2ea
2020-07-02Change readelf's display of symbol names (when not in --wide mode) so that ↵Nick Clifton19-25/+116
if they are going to be truncated then "[...]" is displayed at the end. Add a comment line option to disable this enhancement and restore the old behaviour. PR 26028 binutils* readelf.c (print_symbol): Handle truncation of symbol names. (options): Add -T/--silent-truncation option. (parse_args): Handle the option. (print_dynamic_symbol): Correct calculation of width available to display symbol name. * doc/binutils.texi: Document the -T option to readelf. * NEWS: Mention the new feature. gas * testsuite/gas/ia64/group-2.d: Add -T option to readelf command line. * testsuite/gas/ia64/unwind.d: Likewise. * testsuite/gas/mmix/bspec-1.d: Likewise. * testsuite/gas/mmix/bspec-2.d: Likewise. * testsuite/gas/mmix/comment-1.d: Likewise. * testsuite/gas/tic6x/scomm-directive-4.d: Likewise. ld * testsuite/ld-powerpc/powerpc.exp: Add -T option to readelf command line when running some tests. * testsuite/ld-arm/arm-elf.exp: Likewise. * testsuite/ld-mips-elf/mips-elf.exp: Likewise. * testsuite/ld-mmix/local1.d: Likewise. * testsuite/ld-mmix/local3.d: Likewise. * testsuite/ld-mmix/local5.d: Likewise. * testsuite/ld-mmix/local7.d: Likewise. * testsuite/ld-powerpc/powerpc.exp: Likewise.
2020-07-01Make tui_win_info::name pure virtualTom Tromey3-4/+11
It seemed cleaner to me for tui_win_info::name to be pure virtual. This meant adding a name method to the locator window; but this too seems like an improvement. gdb/ChangeLog 2020-07-01 Tom Tromey <tom@tromey.com> * tui/tui-data.h (struct tui_win_info) <name>: Now pure virtual. * tui/tui-stack.h (struct tui_locator_window) <name>: New method.
2020-07-01Remove tui_gen_win_infoTom Tromey6-93/+76
This merges the tui_gen_win_info base class with tui_win_info; renaming the resulting class to tui_win_info. gdb/ChangeLog 2020-07-01 Tom Tromey <tom@tromey.com> * tui/tui-wingeneral.c (tui_win_info::refresh_window): Move from tui_gen_win_info. (tui_win_info::make_window): Merge with tui_gen_win_info::make_window. (tui_win_info::make_visible): Move from tui_gen_win_info. * tui/tui-win.c (tui_win_info::max_width): Move from tui_gen_win_info. * tui/tui-layout.h (class tui_layout_window) <m_window>: Change type. <window_factory>: Likewise. * tui/tui-layout.c (tui_win_info::resize): Move from tui_gen_win_info. (make_standard_window): Change return type. (get_locator_window, tui_get_window_by_name): Likewise. (tui_layout_window::apply): Remove a cast. * tui/tui-data.h (MIN_WIN_HEIGHT): Move earlier. (struct tui_win_info): Merge with tui_gen_win_info. (struct tui_gen_win_info): Remove.
2020-07-01Derive tui_locator_window from tui_win_infoTom Tromey2-1/+23
tui_locator_window is the last remaining concrete child class of tui_gen_win_info. It seems a bit cleaner to me to flatten the hierarchy a bit; this patch prepares for that by changing tui_locator_window to derive from tui_win_info. gdb/ChangeLog 2020-07-01 Tom Tromey <tom@tromey.com> * tui/tui-stack.h (struct tui_locator_window): Derive from tui_win_info. <do_scroll_horizontal, do_scroll_vertical>: New methods. <can_box>: New method.
2020-07-01Remove body of tui_locator_window constructorTom Tromey2-5/+5
The tui_locator_window constructor initializes the first character of two of its members. However, this is actually an error, since these were changed to be std::string. This removes the erroneous code. gdb/ChangeLog 2020-07-01 Tom Tromey <tom@tromey.com> * tui/tui-stack.h (struct tui_locator_window): Remove body.
2020-07-01Don't derive tui_data_item_window from tui_gen_win_infoTom Tromey4-78/+51
There's no deep reason that tui_data_item_window should derive from tui_gen_win_info -- it currently uses a curses window to render, but that isn't truly needed, and it adds some hacks to other parts of the TUI. This patch changes tui_data_item_window so that it doesn't have a base class, and updates the register window. This simplifies the code and enables a subsequent cleanup. gdb/ChangeLog 2020-07-01 Tom Tromey <tom@tromey.com> * tui/tui-regs.c (tui_data_window::display_registers_from) (tui_data_window::display_registers_from) (tui_data_window::first_data_item_displayed) (tui_data_window::delete_data_content_windows): Update. (tui_data_window::refresh_window, tui_data_window::no_refresh): Remove. (tui_data_window::check_register_values): Update. (tui_data_item_window::rerender): Add parameters. Update. (tui_data_item_window::refresh_window): Remove. * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: No longer virtual. * tui/tui-regs.h (struct tui_data_item_window): Don't derive from tui_gen_win_info. <refresh_window, max_height, min_height>: Remove. <rerender>: Add parameters. <x, y, visible>: New members. (struct tui_data_window) <refresh_window, no_refresh>: Remove. <m_item_width>: New member.
2020-07-01Rename tui_data_item_window::item_noTom Tromey3-4/+11
tui_data_item_window::item_no is misnamed -- it only can be used for a register, but it references a "display" number as well. (Based on other comments I've seen in the past -- most since deleted -- I think there were plans at one point to display variables in this window as well. However, this was never implemented.) This patch renames this member to be more correct. gdb/ChangeLog 2020-07-01 Tom Tromey <tom@tromey.com> * tui/tui-regs.c (tui_data_window::show_register_group) (tui_data_window::check_register_values): Update. * tui/tui-regs.h (struct tui_data_item_window) <regno>: Rename from item_no.
2020-07-01Remove useless "if' from tui-regs.cTom Tromey2-7/+9
tui_data_window::show_register_group had a useless "if" -- the condition could never be false. This patch removes it. gdb/ChangeLog 2020-07-01 Tom Tromey <tom@tromey.com> * tui/tui-regs.c (tui_data_window::show_register_group): Remove useless "if".
2020-07-01Remove tui_data_window::nameTom Tromey3-2/+5
The "name" member of tui_data_window was set, but never used. This removes it. gdb/ChangeLog 2020-07-01 Tom Tromey <tom@tromey.com> * tui/tui-regs.c (tui_data_window::show_register_group): Update. * tui/tui-regs.h (struct tui_data_item_window) <name>: Remove.
2020-07-01Move some code out of tui-data.hTom Tromey5-26/+35
This moves some code out of tui-data.h, to more closely related places. Some unused forward declarations are also removed. gdb/ChangeLog 2020-07-01 Tom Tromey <tom@tromey.com> * tui/tui-stack.c (SINGLE_KEY): Move from tui-data.h * tui/tui-winsource.h (enum tui_line_or_address_kind) (struct tui_line_or_address): Move from tui-data.h. * tui/tui-win.c (DEFAULT_TAB_LEN): Move from tui-data.h. * tui/tui-data.h (DEFAULT_TAB_LEN): Move to tui-win.c. (tui_cmd_window, tui_source_window_base, tui_source_window) (tui_disasm_window): Don't declare. (enum tui_line_or_address_kind, struct tui_line_or_address): Move to tui-winsource.h. (SINGLE_KEY): Move to tui-stack.c.
2020-07-01Remove tui_expand_tabsTom Tromey5-73/+61
tui_expand_tabs only has a single caller. This patch removes this function, in favor of a tab-expanding variant of string_file. This simplifies the code somewhat. gdb/ChangeLog 2020-07-01 Tom Tromey <tom@tromey.com> * tui/tui-regs.h (struct tui_data_item_window) <content>: Now a std::string. * tui/tui-regs.c (class tab_expansion_file): New. (tab_expansion_file::write): New method. (tui_register_format): Change return type. Use tab_expansion_file. (tui_get_register, tui_data_window::display_registers_from) (tui_data_item_window::rerender): Update. * tui/tui-io.h (tui_expand_tabs): Don't declare. * tui/tui-io.c (tui_expand_tabs): Remove.
2020-07-01Use complete_on_enum in tui_reggroup_completerTom Tromey2-9/+6
tui_reggroup_completer has an "XXXX" comment suggesting the use of complete_on_enum. This patch implements this suggestion. gdb/ChangeLog 2020-07-01 Tom Tromey <tom@tromey.com> * tui/tui-regs.c (tui_reggroup_completer): Use complete_on_enum.
2020-07-02Automatic date update in version.inGDB Administrator1-1/+1
2020-07-01Recognize -1 as a tombstone value in .debug_lineFangrui Song2-6/+11
LLD from 11 onwards (https://reviews.llvm.org/D81784) uses -1 to represent a relocation in .debug_line referencing a discarded symbol. Recognize -1 to fix gdb.base/break-on-linker-gcd-function.exp when the linker is a newer LLD. gdb/ChangeLog: * dwarf2/read.c (lnp_state_machine::check_line_address): Test -1.
2020-07-01PR26188, buff overflow in coff_find_nearest_line_with_namesAlan Modra2-2/+12
PR 26188 * coffgen.c (coff_find_nearest_line_with_names): Sanity check raw syment index before dereferencing.