| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Fixed several test failures caused by the LoongArch32 assembler adding
labels during assembly. Additionally, skipped tests specific to LoongArch64.
Add test for new relocations.
Add test for tls type transition, got relaxation and call30 relaxation.
|
|
.L1:
pcaddu12i $t0, %got_pcadd_hi20(a) -> pcaddu12i $t0, %pcadd_hi20(a)
ld.w/d $t0, $t0, %got_pcadd_lo12(.L1) -> addi.w/d $t0, $t0, %pcadd_lo12(.L1)
|
|
desc -> le
ie -> le
desc -> ie
For desc/ie -> le, need to change the symbol of le_lo12 to the symbol of
[desc|ie]_pcadd_hi20.
|
|
Relax call30 to bl, relax tail30 to b.
|
|
Define a symbol .Lpcadd_hi* at R_LARCH_*_PCADD_HI20
if the instruction expand from macro.
Change the symbol of R_LARCH_PCADD_LO12 to .Lpcadd_hi*
if the instruction expand from macro.
|
|
Change pcalau12i to pcaddu12i for LA32 macros.
Add call/tail and call30/tail30 macros, call/tail can expand to
call36/tail36 or call30/tail30 by mabi option.
|
|
R_LARCH_CALL30:
pcaddu12i $ra, %call30(func)
jirl $ra, $ra, 0
Similar with R_LARCH_CALL36, pcaddu12i and jirl must be adjacent.
R_LARCH_PCADD_HI20, R_LARCH_PCADD_LO12:
.Lpcadd_hi0:
pcaddu12i $t0, %pcadd_hi20(sym)
addi.w $t0, $t0, %pcadd_lo12(.Lpcadd_hi0)
Similar with RISCV PCREL_HI20, PCREL_LO12, R_LARCH_PCADD_LO12 reference to the
symbol at R_LARCH_PCADD_HI20.
|
|
LA32 and LA32R do not have pcaddu18i.
LA32R does not have pcalau12i.
Add R_LARCH_CALL30 for pcaddu12i + jirl used in LA32 and LA32R.
Add R_LARCH_*_PCADD_HI20 for pcaddu12i used in LA32R.
Add R_LARCH_*_PCADD_LO12 for addi.w/ld.w used in LA32R.
|
|
Glibc checks LSX/LASX support when configure.
Kernel has float instructions but with -msoft-float option.
|
|
Fix compiler error for "add.w $r12,$r12,$r2,%le_add_r(a)".
|
|
|
|
Fix -march=loongarch64 error on LA32 target.
|
|
This reverts commit 852cbc7ffadf9daf173e13ea56caff49d52733af.
It fixed the build with libguile v2.0.9, but now GDB only supports
Guile >= 2.2.
I was able to build GDB using -std=c++20 with both Guile 2.2 and
Guile 3.0 (tested with GCC 14.3) without any error or warning.
Approved-By: Tom Tromey <tom@tromey.com>
|
|
The manual mentions since GDB 10 that the functions for getting and setting
the size of memory port buffers are deprecated, and don't work when using
Guile 2.2 or later. Since now GDB only supports Guile 2.2 and newer,
perform the promised removal.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Tom Tromey <tom@tromey.com>
|
|
Approved-By: Tom Tromey <tom@tromey.com>
|
|
|
|
Fix this:
...
$ empty=$(git hash-object -t tree /dev/null)
$ git diff-index --check $empty gdb/NEWS
gdb/NEWS:1874: space before tab in indent.
+ [--basename | --dirname]
...
and add the file to the clean list in
gdb/contrib/check-whitespace-pre-commit.py.
[ I'm not sure if NEWS has an official style.
There are no settings for NEWS in .gitattributes, so the whitespace attribute
defaults to trailing-space (shorthand for blank-at-eol, blank-at-eof) and
space-before-tab.
We could require either spaces only (tab-in-indent) in gdb/.gitattributes:
...
NEWS whitespace=space-before-tab,tab-in-indent,trailing-space
...
or tab style (indent-with-non-tab):
...
NEWS whitespace=space-before-tab,indent-with-non-tab,trailing-space
...
For tab-in-indent, we get:
...
$ git diff-index --check $empty gdb/NEWS | wc -l
228
...
and for indent-with-non-tab instead:
...
$ git diff-index --check $empty gdb/NEWS | wc -l
40
...
so the more common style seems to be tab style.
But I'm leaving this as is for now. ]
|
|
Add indent-with-non-tab for *.def in gdb*/.gitattributes.
Fix whitespace in the *.def files in gdb*, and add these files to the clean
list in gdb/contrib/check-whitespace-pre-commit.py.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
|
|
Add indent-with-non-tab for *.[ly] in gdb/.gitattributes.
Fix whitespace in the *.[ly] files in gdb, and add these files to the clean
list in gdb/contrib/check-whitespace-pre-commit.py.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
|
|
Fix whitespace in the *.c files in gdb, and add these files to the clean list
in gdb/contrib/check-whitespace-pre-commit.py.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
|
|
Fix whitespace in the *.h files in gdb, and add these files to the clean list
in gdb/contrib/check-whitespace-pre-commit.py.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
|
|
When Linux/x86 objcopy is used on Solaris binary, it sets EI_OSABI to
ELFOSABI_SOLARIS, but it doesn't set the sh_info and sh_link fields of
Solaris specific sections.
Add _bfd_elf_x86_copy_special_section_fields to return false for Solaris
binary to properly set the sh_info and sh_link fields of Solaris specific
sections.
PR binutils/33705
* elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
Removed.
(elf_backend_copy_special_section_fields): Likewise.
* elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
Likewise.
(elf_backend_copy_special_section_fields): Likewise.
* elfxx-x86.c (_bfd_elf_x86_copy_special_section_fields): New.
* elfxx-x86.h (_bfd_elf_x86_copy_special_section_fields): Likewise.
(elf_backend_copy_special_section_fields): Likewise.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
|
This patch partly rewries dwarf2_get_symbol_read_needs. The goal is
to simplify it and perhaps make it a little more efficient.
With this patch, if an operation simply continues to the next
operation in the expression, then no manipulation of ops_to_visit is
needed. This avoids excess pushes and pops.
Also, visited_ops is changed to be a std::vector<bool> rather than a
map.
Regression tested on x86-64 Fedora 41.
|
|
A user noted that "set environment" does not affect things like
"shell" or "pipe". This makes some sense, because the environment is
per-inferior, and also in the general case it may be affecting a
remote machine -- i.e., the settings may not be locally appropriate.
This patch adds a new set of "local-environment" commands (set, show,
and unset) that affect gdb's own environment.
Approved-By: Andrew Burgess <aburgess@redhat.com>
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Reviewed-by: Kévin Le Gouguec <legouguec@adacore.com>
|
|
This changse the various environment-related helper functions to
accept a NULL environment pointer. This special case means that the
function should affect gdb's global environment.
Approved-By: Andrew Burgess <aburgess@redhat.com>
Reviewed-by: Kévin Le Gouguec <legouguec@adacore.com>
|
|
This changes the environment-related helper functions to accept a
pointer argument rather than a reference.
Reviewed-by: Kévin Le Gouguec <legouguec@adacore.com>
|
|
This patch refactors the various environment-related commands into
functions that accept gdb_environ parameter.
Reviewed-by: Kévin Le Gouguec <legouguec@adacore.com>
|
|
In a review early in the year:
https://inbox.sourceware.org/gdb-patches/874iz3f4ek.fsf@redhat.com/
Andrew pointed out that a new test I proposed failed with read1.
This test was essentially a copy of gdb.base/environ.exp.
I couldn't reproduce the read1 problem, but this patch rewrites the
one test there that seems like it could possibly fail in this mode.
Now it uses line-by-line mode and checks for a certain environment
variable appearing in the output.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
|
|
These includes are reported as unused by clangd.
Change-Id: Ib5c655d9c96e7a612e223bd87d124f90112acc5a
|
|
This include is reported as unused by clangd.
Change-Id: I4fe6048d072d445a2133ac17887fe37ccc5e2d90
|
|
I forgot to update the previous patch based on a review comment before
pushing.
Change-Id: Ib357d105ba67725bfa4772f95d0b658456173be6
|
|
Commit f14bbacae00d ("gdb/guile: remove support for Guile < 2.2")
removed some code supporting Guile 2.0. This patch removes more bits
related to Guile 2.0, and adds a NEWS entry.
* Remove Guile 2.0 mention from the doc.
* Remove HAVE_GUILE_MANUAL_FINALIZATION, assume it is always true.
* Remove guile-2.0 from the versions automatically tried by configure.
* Remove check for scm_new_smob (HAVE_SCM_NEW_SMOB), assume it is
always true.
* Remove hack to fill ac_cv_guild_program_name when the .pc file
wouldn't specify it.
Tested by rebuilding against guile-3.0 and guile-2.2.
Change-Id: I2e89bcd4a4429262f4c3a1c74b275768e60f0cb0
Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
|
|
A couple of targets use virtually the same code for error reporting in
relocation processing. Merge the copies, removing small discrepancies
such as a fallback call to `abort' for NDS32 targets as per PR 17512,
and factor out for backends to use.
|
|
After commit:
commit 43db8f70d86b2492b79f59342187b919fd58b3dd
Date: Thu Oct 23 16:34:20 2025 +0100
gdbsupport: remove undefined behaviour from (forward_)scope_exit
A build failure was reported[1] when using clang++. The failure looks
like this:
CXX aarch64-fbsd-tdep.o
In file included from /tmp/src/binutils-gdb/gdb/aarch64-fbsd-tdep.c:22:
In file included from /tmp/src/binutils-gdb/gdb/gdbarch.h:28:
In file included from /tmp/src/binutils-gdb/gdb/infrun.h:21:
In file included from /tmp/src/binutils-gdb/gdb/gdbthread.h:35:
/tmp/src/binutils-gdb/gdb/../gdbsupport/forward-scope-exit.h:112:20: error: too many template arguments
for class template 'forward_scope_exit_policy'
112 | = scope_exit_base<forward_scope_exit_policy<Function,
| ^
113 | function, Res, Args...>>;
| ~~~~~~~~
/tmp/src/binutils-gdb/gdb/../gdbsupport/forward-scope-exit.h:82:8: note: template is declared here
81 | template<typename Function, Function *function, typename Signature>
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
82 | struct forward_scope_exit_policy;
| ^
The problem is that the forward_scope_exit_policy class expects 3
template arguments, but in forward-scope-exit.h we say:
template<typename Function, Function *function,
typename Res, typename... Args>
using forward_scope_exit
= scope_exit_base<forward_scope_exit_policy<Function,
function, Res, Args...>>;
Which passes 4 template arguments. Fix this by changing the above
'using' like too:
template<typename Function, Function *function, typename Signature>
using forward_scope_exit
= scope_exit_base<forward_scope_exit_policy<Function, function,
Signature>>;
This now compiles with clang++.
|
|
We can clear the flags first if no backend hide_symbol function tests
or sets them, which is true.
* elflink.c (_bfd_elf_link_hide_symbol): Clear flags before
calling elf_backend_hide_symbol, to enable tail recursion.
|
|
Avoid these mainline gcc complaints (C23 WG14 n2743).
copy_test_relro.cc:42:5: error: ‘++’ expression of ‘volatile’-qualified type is deprecated [-Werror=volatile]
icf_test_pr21066.cc:50:55: error: ‘volatile’-qualified parameter is deprecated [-Werror=volatile]
* testsuite/copy_test_relro.cc (segv): Avoid gcc warning.
* testsuite/icf_test_pr21066.cc (capture_exception_of_type):
Likewise.
|
|
mips.cc:9478:50: error: bitwise operation between different enumeration types ‘elfcpp::<unnamed enum>’ and ‘elfcpp::<unnamed enum>’ is deprecated [-Werror=deprecated-enum-enum-conversion]
9478 | merged_flags &= ~(elfcpp::EF_MIPS_ARCH | elfcpp::EF_MIPS_MACH);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
* mips.h: Define all the EF_MIPS values in one enum.
|
|
In the "ud ui5" macro, the value of ui5 must be in the range 0–31. It
expands to "amswap.w $rd, $r1, $rj", where ui5 specifies the register
number for $rd in the amswap.w instruction, and $rd == $rj.
The test case have been adjusted to no longer report errors for illegal
operands of the amswap.w instruction.
gas/
* config/tc-loongarch.c (check_this_insn_before_appending): No
longer check amswap.w.
* testsuite/gas/loongarch/illegal-operand.l: Update.
* testsuite/gas/loongarch/illegal-operand.s: Update.
* testsuite/gas/loongarch/macro_ud.d: New test.
* testsuite/gas/loongarch/macro_ud.s: New test.
include/
* opcode/loongarch.h: Add new macro for amswap.w.
opcodes/
* loongarch-opc.c: Add macro for ud.
|
|
Current gcc adds a note to the LTO "using serial compilation" warning.
* lib/binutils-common.exp (prune_warnings_extra): Remove
lto-wrapper note.
|
|
|
|
Add GLIBC_ABI_GNU_TLS version dependency only if ___tls_get_addr is
referenced by regular object.
bfd/
PR ld/33287
PR ld/33702
* elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set
has_tls_get_addr_call only if referenced by regular object.
ld/
PR ld/33287
PR ld/33702
* testsuite/ld-i386/i386.exp: Run PR ld/33702 test.
* testsuite/ld-i386/no-tls.c: New file.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
|
This reverts commit f70242a98f91b7f5ec5b375346d8bfa7f9a61c4a.
Nick already applied this..
|
|
Limit the warning to ET_REL.
|
|
Add gdbsupport and gdbserver as whitespace-clean in
gdb/contrib/check-whitespace-pre-commit.py.
Likewise for *.ac and *.m4.
Also drop the ignore of configure, that's already taken care of in
.gitattributes.
Approved-By: Tom Tromey <tom@tromey.com>
|
|
Simplify regexps in test-case gdb.multi/remote-with-running-inferior.exp using
string_to_regexp and {}.
While we're at it, also break an overly long line.
Tested on x86_64-linux.
|
|
Fix two typos in test-case gdb.multi/remote-with-running-inferior.exp.
|
|
Occasionally, with test-case gdb.multi/remote-with-running-inferior.exp I run
into:
...
(gdb) continue^M
Continuing.^M
^M
Thread 1.1 "remote-with-run" hit Breakpoint 1.1, main () at \
remote-with-running-inferior.c:31^M
31 for (int i = 0; i < 30; ++i)^M
(gdb) PASS: $exp: target_non_stop=auto: non_stop=off: \
continue to breakpoint: continue to breakpoint in breakpt
bt 1^M
(gdb) FAIL: $exp: target_non_stop=auto: non_stop=off: \
check inferior 1 is in breakpt
...
The problem is a race between:
- inferior 1 reaching main, and
- gdb setting a breakpoint on main.
If the breakpoint on main is set before inferior 1 reaches main, the
breakpoint triggers for inferior 1, which the test-case doesn't expect.
Fix this by setting the breakpoint on main only for inferior 2.
Tested on x86_64-linux.
PR testsuite/33621
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33621
|
|
|
|
|