aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2025-02-04[gdb/testsuite] Fix gdb.ada/big_packed_array.exp on s390x-linuxTom de Vries1-1/+8
When running test-case gdb.ada/big_packed_array.exp on s390x-linux, I run into: ... (gdb) print bad^M $2 = (0 => 0 <repeats 24 times>, 1)^M (gdb) FAIL: gdb.ada/big_packed_array.exp: scenario=minimal: print bad ... This is with gcc 7.5.0, and this xfail should trigger: ... if { $have_xfail && [string is integer $last] \ && [expr ($last & 0xf) == 0] } { # gcc/101643 setup_xfail *-*-* } ... but it doesn't because $last is '1'. Fix this by using 0xf0 as mask for big endian. Tested on s390x-linux.
2025-02-04[gdb/testsuite] Fix gdb.ada/convvar_comp.exp on s390x-linuxTom de Vries2-2/+4
When running test-case gdb.ada/convvar_comp.exp on s390x-linux, I get: ... (gdb) run ^M Starting program: pb16_063 ^M ^M Breakpoint 1, pck.break_me (item=...) at pck.adb:17^M 17 function Break_Me (Item : T) return Boolean is^M (gdb) print item.started^M Cannot access memory at address 0x0^M (gdb) FAIL: gdb.ada/convvar_comp.exp: print item.started ... This happens as follows. The parameter item is available in (DW_OP_fbreg: -168): ... <2><912>: Abbrev Number: 18 (DW_TAG_formal_parameter) <913> DW_AT_name : (indirect string, offset: 0x14ca): item <919> DW_AT_type : <0x929> <91d> DW_AT_location : 3 byte block: 91 d8 7e (DW_OP_fbreg: -168) ... and according to the rules of -O0, it's considered to be available after the prologue, which looks like this: ... 0000000001002998 <pck__break_me>: 1002998: b3 c1 00 2b ldgr %f2,%r11 100299c: b3 c1 00 0f ldgr %f0,%r15 10029a0: e3 f0 ff 58 ff 71 lay %r15,-168(%r15) 10029a6: b9 04 00 bf lgr %r11,%r15 10029aa: e3 20 b0 a0 00 24 stg %r2,160(%r11) ... To detect the prologue, gdb checks the line info, which looks like this: ... pck.adb: File name Line number Starting address View Stmt pck.adb 17 0x1002998 x pck.adb 17 0x1002998 1 x pck.adb 19 0x10029b0 x pck.adb 20 0x10029b8 x pck.adb - 0x10029c6 ... and gdb concludes that it's an empty prologue, so we stop at 0x1002998 and try to print parameter item, which is not available yet. For more details, see this comment in skip_prologue_using_sal: ... /* For languages other than assembly, treat two consecutive line entries at the same address as a zero-instruction prologue. ... The same thing happens on x86_64-linux, but it causes no problem there, because amd64_skip_prologue decides not to trust the result: ... struct compunit_symtab *cust = find_pc_compunit_symtab (func_addr); /* LLVM backend (Clang/Flang) always emits a line note before the prologue and another one after. We trust clang and newer Intel compilers to emit usable line notes. */ if (post_prologue_pc && (cust != NULL && cust->producer () != nullptr && (producer_is_llvm (cust->producer ()) || producer_is_icc_ge_19 (cust->producer ())))) return std::max (start_pc, post_prologue_pc); ... because the producer is GCC. Work around this by setting a breakpoint on the first statement of pck.break_me instead. Tested on s390x-linux.
2025-02-04[gdb/testsuite] Use c++ flag in c++ test-casesTom de Vries21-25/+108
In some cases, test-cases use c++, but don't add "c++" to the compilation flags. This can cause problems with some compilers. Fix this in some test-cases. Approved-By: Tom Tromey <tom@tromey.com> PR testsuite/30380 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30380
2025-02-04Update with latest changes to src-release.shNick Clifton1-32/+42
2025-02-04Rename 'binutils' to 'binutils_with_gold'. Rename 'bin_no_gold' to ↵Nick Clifton1-12/+26
'binutils'. Add 'gold'
2025-02-04[gdb/testsuite] Fix gdb.base/list-dot-nodebug.exp on openSUSETom de Vries1-1/+1
On openSUSE Leap 15.6 with test-case gdb.base/list-dot-nodebug.exp I run into: ... (gdb) list .^M warning: 1 ../sysdeps/x86_64/crtn.S: No such file or directory^M (gdb) FAIL: $exp: debug=none: print before start ... The intent of the debug=none case is to generate an executable with no debug info. However, we have quite a few CUs with debug info: ... $ readelf -wi outputs/gdb.base/list-dot-nodebug/list-dot-nodebug-none \ | egrep -c " @ " 431 ... This is because this code: ... gdb_gnu_strip_debug $executable no-debuglink ... uses $executable, and the variable is set here: ... set executable ${testfile}-none ... which sets it to "list-dot-nodebug-none" and consequently gdb_gnu_strip_debug cannot find it. Fix this by using "[standard_output_file $executable]" instead. Tested on x86_64-linux. Approved-By: Tom Tromey <tom@tromey.com> PR testsuite/31721 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31721
2025-02-04[gdb/tui] Remove stale title when showing "No Source Available"Tom de Vries2-0/+7
When running test-case gdb.tui/main.exp, the last command discards the executable file and symbol table: ... (gdb) file No executable file now. Discard symbol table from `main'? (y or n) [answered Y; input not from terminal] No symbol file now. (gdb) ... and we end up with this source window: ... +-tui-layout.c----------------------------------------------------------------+ | | | | | | | | | | | | | [ No Source Available ] | | | | | | | | | | | | | +-----------------------------------------------------------------------------+ ... The source window title shouldn't be showing tui-layout.c. It's the source file containing function main for the executable that was just discarded. Fix this by clearing the title in tui_source_window::erase_source_content. Tested on x86_64-linux. Approved-By: Tom Tromey <tom@tromey.com>
2025-02-04elf: Store __ehdr_start hash in elf_link_hash_tableH.J. Lu4-5/+8
Since commit 97da0e2677c4a38df2406576428ec27d1da26e7c Author: Alan Modra <amodra@gmail.com> Date: Wed Jan 12 23:42:23 2022 +1030 tweak __ehdr_start visibility and flags for check_relocs creates __ehdr_start hash in lang_symbol_tweaks, store __ehdr_start hash in elf_link_hash_table so that we just need to lookup it up only once. bfd/ * elf-bfd.h (elf_link_hash_table): Add hehdr_start. * elf.c (assign_file_positions_for_load_sections): Use hehdr_start. ld/ * ldelf.c (ldelf_before_allocation): Use hehdr_start for __ehdr_start hash. * ldlang.c (lang_symbol_tweaks): Store hehdr_start hash in hehdr_start. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2025-02-04elflink.c: Replace bed->dynamic_sec_flags with flagsH.J. Lu1-4/+2
Since at the function entry, there is flags = bed->dynamic_sec_flags; we can replace bed->dynamic_sec_flags with flags. * elflink.c (_bfd_elf_create_got_section): Replace bed->dynamic_sec_flags with flags. (_bfd_elf_link_create_dynamic_sections): Likewise. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2025-02-03pre-commit autoupdateSimon Marchi2-3/+3
Run `pre-commit autoupdate`. This picks up a fresh Black version from 2025, and with it comes a small but welcome formatting change. There is a new version of isort as well, but no formatting change there. Change-Id: Ie654a9c14c3a4096893011082668efb57c166fa4
2025-02-04Automatic date update in version.inGDB Administrator1-1/+1
2025-02-03[gdb/syscalls] Sync with strace v6.13Tom de Vries31-87/+91
After syncing with strace v6.13 using: ... $ update-linux-defaults.sh ~/upstream/strace.git ... we have a few new entries in linux-defaults.xml.in: ... <syscall name="getxattrat" groups="descriptor,file"/> <syscall name="listxattrat" groups="descriptor,file"/> <syscall name="removexattrat" groups="descriptor,file"/> <syscall name="setxattrat" groups="descriptor,file"/> ... Regenerate most *-linux.xml.in files using: ... $ ./update-linux-from-src.sh ~/upstream/linux-stable.git ... updating the copyright years, and do so manually for the remaining two. Then regenerate *-linux.xml using make, propagating the groups changes and copyright years. Tested on x86_64-linux. Approved-By: Andrew Burgess <aburgess@redhat.com>
2025-02-03Z8k: use is_whitespace()Jan Beulich1-12/+12
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). At the same time use is_end_of_stmt() instead of an open-coded check in adjacent code.
2025-02-03Z80: use is_whitespace()Jan Beulich1-4/+4
Replace an open-coded check and convert ISSPACE() uses.
2025-02-03Xtensa: use is_whitespace()Jan Beulich1-4/+5
Convert an open-coded check.
2025-02-03xgate: use is_whitespace()Jan Beulich1-1/+1
Convert an open-coded check.
2025-02-03x86: use is_whitespace()Jan Beulich2-49/+48
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input).
2025-02-03wasm32: use is_whitespace()Jan Beulich1-1/+1
Convert an open-coded check.
2025-02-03Visium: use is_whitespace()Jan Beulich1-2/+2
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). Also convert an open-coded check.
2025-02-03VAX: use is_whitespace()Jan Beulich1-9/+9
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input).
2025-02-03v850: use is_whitespace()Jan Beulich1-9/+8
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). Also convert open-coded checks as well as ISSPACE() uses. At the same time use is_end_of_stmt() instead of a kind-of-open- coded check in adjacent code.
2025-02-03C6x: use is_whitespace()Jan Beulich1-6/+7
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). Also convert an ISSPACE() use. At the same time use is_end_of_stmt() instead of open-coded checks in adjacent code.
2025-02-03C54x: use is_whitespace()Jan Beulich1-17/+18
Convert ISSPACE() uses. At the same time use is_end_of_stmt() instead of open-coded checks in adjacent code. The function also needs using in next_line_shows_parallel().
2025-02-03C4x: use is_whitespace()Jan Beulich1-3/+3
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). At the same time use is_end_of_stmt() instead of kind-of-open-coded checks in adjacent code.
2025-02-03C30: use is_whitespace()Jan Beulich1-1/+1
Convert an open-coded check.
2025-02-03spu: use is_whitespace()Jan Beulich1-4/+4
Convert ISSPACE() uses. At the same time use is_end_of_stmt() instead of a kind-of-open-coded check in adjacent code.
2025-02-03Sparc: use is_whitespace()Jan Beulich1-14/+20
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input).
2025-02-03SH: use is_whitespace()Jan Beulich1-8/+8
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). Also convert open-coded checks as well as an ISSPACE() use. At the same time use is_end_of_stmt() instead of (kind-of-)open-coded checks in adjacent code.
2025-02-03Score: use is_whitespace()Jan Beulich2-9/+9
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input).
2025-02-03S/390: use is_whitespace()Jan Beulich1-4/+4
Convert ISSPACE() uses. At the same time use is_end_of_stmt() instead of kind-of-open-coded checks in adjacent code.
2025-02-03s12z: use is_whitespace()Jan Beulich1-3/+3
Convert open-coded checks. At the same time use is_end_of_stmt() instead of open-coded checks in adjacent code. This then also fixes the prior use of a wrong cast for an array index: Plain char may, after all, be signed.
2025-02-03rx: use is_whitespace()Jan Beulich2-8/+9
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). Also convert open-coded checks as well as ISSPACE() uses. At the same time use is_end_of_stmt() instead of an open-coded check in adjacent code.
2025-02-03rl78: use is_whitespace()Jan Beulich2-6/+5
Replace open-coded checks and convert ISSPACE() uses. At the same time use is_end_of_stmt() instead of an open-coded check in adjacent code.
2025-02-03RISC-V: use is_whitespace()Jan Beulich1-8/+9
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). Switch places already checking for tabs to use the macro, too.
2025-02-03pru: use is_whitespace()Jan Beulich1-2/+2
Convert open-coded checks as well as an ISSPACE() use.
2025-02-03PPC: use is_whitespace()Jan Beulich1-5/+5
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). Also switch ISSPACE() uses over. At the same time use is_end_of_stmt() instead of an open-coded nul char check.
2025-02-03PicoJava: use is_whitespace()Jan Beulich1-3/+3
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). Also convert ISSPACE(). At the same time use is_end_of_stmt() instead of an open-coded check in adjacent code.
2025-02-03PDP11: use is_whitespace()Jan Beulich1-2/+2
Convert open-coded checks.
2025-02-03NS32k: use is_whitespace()Jan Beulich1-1/+3
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input).
2025-02-03nds32: use is_whitespace()Jan Beulich1-5/+5
Convert ISSPACE() uses.
2025-02-03msp430: use is_whitespace()Jan Beulich1-12/+10
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). Also convert ISSPACE() uses. At the same time use is_end_of_stmt() instead of open-coded checking in code needing touching anyway.
2025-02-03Moxie: use is_whitespace()Jan Beulich1-29/+26
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). Also convert ISSPACE() uses. At the same time use is_end_of_stmt() instead of an open-coded check in adjacent code. While at it also drop a redundant whitespace skipping loop.
2025-02-03mn10300: use is_whitespace()Jan Beulich1-6/+6
Convert open-coded checks as well as ISSPACE() uses. At the same time use is_end_of_stmt() instead of kind-of-open-coded checks in adjacent code.
2025-02-03mn10200: use is_whitespace()Jan Beulich1-6/+6
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). Also convert open-coded checks as well as ISSPACE() uses. At the same time use is_end_of_stmt() instead of kind-of-open- coded checks in adjacent code.
2025-02-03MIPS: use is_whitespace()Jan Beulich1-9/+12
... for consistency of recognition of what is deemed whitespace. At the same time use is_end_of_stmt() instead of an open-coded nul char check, and check for statement end in the first place in parse_relocation().
2025-02-03MicroBlaze: use is_whitespace()Jan Beulich1-5/+5
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). Also convert ISSPACE() uses. At the same time use is_end_of_stmt() instead of an open-coded check in adjacent code.
2025-02-03metag: use is_whitespace()Jan Beulich1-5/+4
Replace the custom is_whitespace_char().
2025-02-03M*Core: use is_whitespace()Jan Beulich1-36/+36
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). Also convert ISSPACE() uses. At the same time use is_end_of_stmt() instead of an open-coded check in adjacent code.
2025-02-03M68k: use is_whitespace()Jan Beulich2-29/+30
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). Also convert open-coded checks where tabs were already included. At the same time use is_end_of_stmt() instead of open- coded checks in adjacent code.
2025-02-03M68HC1x: use is_whitespace()Jan Beulich1-10/+10
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). Also convert open-coded checks where tabs were already included. At the same time use is_end_of_stmt() instead of an open-coded check in adjacent code.