111164 Commits

Author SHA1 Message Date
Tsukasa OI
0938b032da RISC-V: Add 'Zmmul' extension in assembler.
Three-part patch set from Tsukasa OI to support zmmul in assembler.

The 'Zmmul' is a RISC-V extension consisting of only multiply instructions
(a subset of 'M' which has multiply and divide instructions).

bfd/
	* elfxx-riscv.c (riscv_implicit_subsets): Add 'Zmmul' implied by 'M'.
	(riscv_supported_std_z_ext): Add 'Zmmul' extension.
	(riscv_multi_subset_supports): Add handling for new instruction class.
gas/
	* testsuite/gas/riscv/attribute-09.d: Updated implicit 'Zmmul' by 'M'.
	* testsuite/gas/riscv/option-arch-02.d: Likewise.
	* testsuite/gas/riscv/m-ext.s: New test.
	* testsuite/gas/riscv/m-ext-32.d: New test (RV32).
	* testsuite/gas/riscv/m-ext-64.d: New test (RV64).
	* testsuite/gas/riscv/zmmul-32.d: New expected output.
	* testsuite/gas/riscv/zmmul-64.d: Likewise.
	* testsuite/gas/riscv/m-ext-fail-xlen-32.d: New test (failure
	by using RV64-only instructions in RV32).
	* testsuite/gas/riscv/m-ext-fail-xlen-32.l: Likewise.
	* testsuite/gas/riscv/m-ext-fail-zmmul-32.d: New failure test
	(RV32 + Zmmul but with no M).
	* testsuite/gas/riscv/m-ext-fail-zmmul-32.l: Likewise.
	* testsuite/gas/riscv/m-ext-fail-zmmul-64.d: New failure test
	(RV64 + Zmmul but with no M).
	* testsuite/gas/riscv/m-ext-fail-zmmul-64.l: Likewise.
	* testsuite/gas/riscv/m-ext-fail-noarch-64.d: New failure test
	(no Zmmul or M).
	* testsuite/gas/riscv/m-ext-fail-noarch-64.l: Likewise.
include/
	* opcode/riscv.h (enum riscv_insn_class): Added INSN_CLASS_ZMMUL.
ld/
	* testsuite/ld-riscv-elf/attr-merge-arch-01.d: We don't care zmmul in
	these testcases, so just replaced m by a.
	* testsuite/ld-riscv-elf/attr-merge-arch-01a.s: Likewise.
	* testsuite/ld-riscv-elf/attr-merge-arch-01b.s: Likewise.
	* testsuite/ld-riscv-elf/attr-merge-arch-02.d: Likewise.
	* testsuite/ld-riscv-elf/attr-merge-arch-02a.s: Likewise.
	* testsuite/ld-riscv-elf/attr-merge-arch-03.d: Likewise.
	* testsuite/ld-riscv-elf/attr-merge-arch-03a.s: Likewise.
	* testsuite/ld-riscv-elf/attr-merge-user-ext-01.d: Likewise.
	* testsuite/ld-riscv-elf/attr-merge-user-ext-rv32i2p1_a2p0.s: Renamed.
	* testsuite/ld-riscv-elf/attr-merge-user-ext-rv32i2p1_a2p1.s: Renamed.
opcodes/
	* riscv-opc.c (riscv_opcodes): Updated multiply instructions to zmmul.
2022-08-30 17:46:11 +08:00
Tom de Vries
1c04f72368 [gdb/symtab] Fix assert in set_length
When running the included test-case, we run into:
...
(gdb) break _start^M
read.h:309: internal-error: set_length: \
  Assertion `m_length == length' failed.^M
...

The problem is that while there are two CUs:
...
$ readelf -wi debug-names-missing-cu | grep @
  Compilation Unit @ offset 0x0:
  Compilation Unit @ offset 0x2d:
...
the CU table in the .debug_names section only contains the first one:
...
CU table:
[  0] 0x0
...

The incomplete CU table makes create_cus_from_debug_names_list set the size of
the CU at 0x0 to the actual size of both CUs combined.

This eventually leads to the assert, when we read the actual size from the CU
header.

While having an incomplete CU table in a .debug_names section is incorrect,
we need a better failure mode than asserting.

The easiest way to fix this is to set the length to 0 (meaning: unkown) in
create_cus_from_debug_names_list.

This makes the failure mode to accept the incomplete CU table, but to ignore
the missing CU.

It would be nice to instead reject the .debug_names index, and build a
complete CU list, but the point where we find this out is well after
dwarf2_initialize_objfile, so it looks rather intrusive to restart at that
point.

Tested on x86_64-linux.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29453
2022-08-30 10:22:28 +02:00
Tom de Vries
28b5cde22b [gdb/tdep] Declare score-*-* target obsolete
I tried out the script gdb/gdb_mbuild.sh, and ran into:
...
score-elf ...
... configure --target=score-elf
... make score-elf
... run score-elf
score-elf: gdb dumped core
Terminated
...

Gdb runs into this internal error in initialize_current_architecture:
...
  if (! gdbarch_update_p (info))
    internal_error (__FILE__, __LINE__,
                    _("initialize_current_architecture: Selection of "
                      "initial architecture failed"));
...

The call to gdbarch_update_p fails because commit 575b4c298a6 ("gdb: Remove
support for S+core") removed support for the architecture.

Fix this by adding score-*-* to the list of obsolete targets in
gdb/configure.tgt, such that we're no longer able to build the configuration:
...
*** Configuration score-unknown-elf is obsolete.
*** Support has been REMOVED.
make: *** [Makefile:12806: configure-gdb] Error 1
...

Also remove the related line from the "Target Instruction Set Architectures"
list in gdb/MAINTAINERS, such that gdb/gdb_mbuild.sh no longer tries to build
it.
2022-08-30 10:22:28 +02:00
GDB Administrator
fae8f4d1fd Automatic date update in version.in 2022-08-30 00:00:07 +00:00
GDB Administrator
27d582267a Automatic date update in version.in 2022-08-29 00:00:07 +00:00
Alan Modra
6f6f5b0adc PR29494 Trailing jump table on ARM
out_inc_line_addr and relax_inc_line_addr are passed INT_MAX as
line_delta to flag end of section.  This filters its way down to
size_inc_line_addr and emit_inc_line_addr.  Pass line_delta on to
scale_addr_delta where it can be used to omit an unaligned opcode
error.

	PR 29494
	* dwarf2dbg.c (scale_addr_delta): Delete unnecessary forward decl.
	Add line_delta param.  Don't print error at end of section, just
	round the address down.
	(size_inc_line_addr, emit_inc_line_addr): Adjust calls.
2022-08-28 21:05:10 +09:30
GDB Administrator
d91ab9a73b Automatic date update in version.in 2022-08-28 00:00:14 +00:00
rupothar
9c17922bfe bfd: Fix minor bug in read_indexed_address function.
read_indexed_address function is using offset_size instead of
addr_size while reading addrx forms.
2022-08-27 14:25:44 +09:30
GDB Administrator
46e59b72f2 Automatic date update in version.in 2022-08-27 00:00:08 +00:00
Simon Marchi
8341132038 gdbsupport: fix gdb::optional compilation with C++11 && _GLIBCXX_DEBUG
Similar to 911438f9f4 ("gdbsupport: fix array-view compilation with
c++11 && _GLIBCXX_DEBUG"), but for gdb::optional.

I get this error when building with Clang 14 and -std=c++11:

      CXX      agent.o
    In file included from /home/simark/src/binutils-gdb/gdbsupport/agent.cc:20:
    In file included from /home/simark/src/binutils-gdb/gdbsupport/common-defs.h:210:
    In file included from /home/simark/src/binutils-gdb/gdbsupport/common-debug.h:23:
    /home/simark/src/binutils-gdb/gdbsupport/../gdbsupport/gdb_optional.h:213:5: error: use of this statement in a constexpr function is a C++14 extension [-Werror,-Wc++14-extensions]
        gdb_assert (this->has_value ());
        ^
    /home/simark/src/binutils-gdb/gdbsupport/gdb_assert.h:35:3: note: expanded from macro 'gdb_assert'
      ((void) ((expr) ? 0 :                                                       \
      ^

Change-Id: If0cf55607fc9dbd1925ccb97cd9abbf8993ff264
2022-08-26 11:47:23 -04:00
Simon Marchi
403c71fdac gdb: change bpstat_print's kind parameter to target_waitkind
Change from int to target_waitkind,  which is really what is is.  While
at it, remove some outdated doc.  The return value is described by a
relatively self-describing enum, not a numerical value like the doc
says.

Change-Id: Id899c853a857c7891c45e5b1639024067d5b59cd
2022-08-26 10:32:08 -04:00
Simon Marchi
4fd404c298 gdb, gdbsupport: configure: factor out yes/no/auto value checking
Factor out the code that checks that a value is yes/no or yes/no/auto.
Add two macros to gdbsupport/common.m4 and use them in gdb/configure.ac

I inspected the changes to configure.  Other than whitespace changes, we
have some benign changes to the error messages (one of them had an error
actually).  There are changes to the --enable-source-highlight and
--enable-libbacktrace handling, but setting enable_source_highlight /
enable_libbacktrace was not really useful anyway, they already had the
right value.

Change-Id: I92587aec36874309e1605e2d60244649f09a757a
2022-08-26 10:29:51 -04:00
Alan Modra
3055522ab1 PR12265, Compiling ld/ fails on Solaris 8
The fail was due to -Werror and headers included by dlfcn.h and
elf-bfd.h disagreeing about AT_DCACHEBSIZE and other AT_*.  Not a
serious problem obviously, since release versions of binutils don't
enable -Werror and the defines are not used.  Anyway, reduce the
number of files that might hit this problem by only including dlfcn.h
where it is needed.

	PR 12265
	* sysdep.h: Don't include dlfcn.h here.
	* plugin.c: Include it here.
2022-08-26 18:56:01 +09:30
GDB Administrator
8d00b2b74b Automatic date update in version.in 2022-08-26 00:00:06 +00:00
Philippe Waroquiers
effcf7b144 Allow to document user-defined aliases.
Compared to the previous version, this version fixes the comments reported by
Tom Tromey and ensures that the 'help some-user-documented-alias'
shows the alias definition to ensure the user understands this is an
alias even if specifically documented.

When using 'help ALIASNAME', GDB shows the help of the aliased command.
This is a good default behaviour.

However, GDB alias command allows to define aliases with arguments
possibly changing or tuning significantly the behaviour of
the aliased command.  In such a case, showing the help of the aliased
command might not be ideal.

This is particularly true when defining an alias as a set of
nested 'with' followed by a last command to launch, such as:
  (gdb) alias pp10 = with print pretty -- with print elements 10 -- print
Asking 'help pp10' shows the help of the 'with' command, which is
not particularly useful:
  (gdb) help pp10
  with, pp10, w
    alias pp10 = with print pretty -- with print elements 10 -- print
  Temporarily set SETTING to VALUE, run COMMAND, and restore SETTING.
  Usage: with SETTING [VALUE] [-- COMMAND]
  ....

Such an alias can now be documented by the user:
  (gdb) document pp10
  >Pretty printing an expressiong, printing 10 elements.
  >Usage: pp10 [PRINT-COMMAND-OPTIONS] EXP
  >See 'help print' for more information.
  >end
  (gdb) help pp10
    alias pp10 = with print pretty -- with print elements 10 -- print
  Pretty printing an expressiong, printing 10 elements.
  Usage: pp10 [PRINT-COMMAND-OPTIONS] EXP
  See 'help print' for more information.
  (gdb)

When a user-defined alias is documented specifically, help and apropos
use the provided alias documentation instead of the documentation of
the aliased command.

Such a documented alias is also not shown anymore in the help of the
aliased command, and the alias is not listed anymore in the help
of the aliased command.  In particular for cases such as pp10 example above,
indicating that pp10 is an alias of the 'with' command is confusing.
2022-08-25 18:57:25 +02:00
Jan-Benedict Glaw
8b1a24e546 sim/aarch64: Fix aarch64_get_CPSR_bits() declaration
Noticed while doing mass builds with a very recent GCC:

/usr/lib/gcc-snapshot/bin/gcc  -DHAVE_CONFIG_H   -DWITH_HW=1 -DHAVE_DV_SOCKSER -DDEFAULT_INLINE=0 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wno-error=maybe-uninitialized -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wpointer-sign -Wold-style-declaration -Werror  -I. -I/var/lib/laminar/run/gdb-aarch64-elf/1/binutils-gdb/sim/aarch64 -I../common -I/var/lib/laminar/run/gdb-aarch64-elf/1/binutils-gdb/sim/aarch64/../common -I../../include -I/var/lib/laminar/run/gdb-aarch64-elf/1/binutils-gdb/sim/aarch64/../../include -I../../bfd -I/var/lib/laminar/run/gdb-aarch64-elf/1/binutils-gdb/sim/aarch64/../../bfd -I../../opcodes -I/var/lib/laminar/run/gdb-aarch64-elf/1/binutils-gdb/sim/aarch64/../../opcodes -I../..  -I/var/lib/laminar/run/gdb-aarch64-elf/1/binutils-gdb/sim/aarch64/../../gnulib/import -I../../gnulib/import  -g -O2   -c -o cpustate.o -MT cpustate.o -MMD -MP -MF .deps/cpustate.Tpo cpustate.c
cpustate.c:270:1: error: conflicting types for 'aarch64_get_CPSR_bits' due to enum/integer mismatch; have 'uint32_t(sim_cpu *, FlagMask)' {aka 'unsigned int(struct _sim_cpu *, FlagMask)'} [-Werror=enum-int-mismatch]
  270 | aarch64_get_CPSR_bits (sim_cpu *cpu, FlagMask mask)
      | ^~~~~~~~~~~~~~~~~~~~~
In file included from sim-main.h:30,
                 from cpustate.c:28:
cpustate.h:310:20: note: previous declaration of 'aarch64_get_CPSR_bits' with type 'uint32_t(sim_cpu *, uint32_t)' {aka 'unsigned int(struct _sim_cpu *, unsigned int)'}
  310 | extern uint32_t    aarch64_get_CPSR_bits  (sim_cpu *, uint32_t);
      |                    ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
2022-08-25 18:35:59 +02:00
H.J. Lu
2c43d202ae x86: Ignore protected visibility in shared libraries on Solaris
On x86, the PLT entry in executable may be used as function address for
functions in shared libraries.  If functions are protected, the function
address used in executable can be different from the function address
used in shared library.  This will lead to incorrect run-time behavior
if function pointer equality is needed.  By default, x86 linker issues
an error in this case.

On Solaris, linker issued an error for

struct tm *tb = (kind == CPP_time_kind::FIXED ? gmtime : localtime) (&tt);

where gmtime is a protected function in libc.so.  Use gmtime's PLT entry
in executable as function address is safe since function pointer equality
isn't needed.  Ignore protected visibility in shared libraries on Solaris
to disable linker error.  If function pointer equality is needed, linker
will silently generate executable with incorrect run-time behavior on
Solaris.

	PR ld/29512
	* elf32-i386.c (elf_i386_scan_relocs): Ignore protected
	visibility in shared libraries on Solaris.
	* elf64-x86-64.c (elf_x86_64_scan_relocs): Likewise.
2022-08-25 09:10:45 -07:00
Nick Clifton
5578fbf672 GAS: Add a return type tag to DWARF DIEs generated for function symbols.
PR 29517
	* dwarf2dbg.c (GAS_ABBREV_COMP_UNIT): New defined constant.
	(GAS_ABBREV_SUBPROG): New defined constant.
	(GAS_ABBREV_NO_TYPE): New defined constant.
	(out_debug_abbrev): Use the new defined constants when emitting
	abbreviation numbers.  Generate an abbreviation for an unspecified
	type.
	(out_debug_info): Use the new defined constants when referring to
	abbreviations.  Generate a use of the no_type abbreviation.
	Reference the use when generating DIEs for functions.
	* testsuite/gas/elf/dwarf-3-func.d: Update to allow for newly
	extended output from the assembler.
	* testsuite/gas/elf/dwarf-5-func-global.d: Likewise.
	* testsuite/gas/elf/dwarf-5-func-local.d: Likewise.
	* testsuite/gas/elf/dwarf-5-func.d: Likewise.
2022-08-25 11:48:00 +01:00
Nick Clifton
e8f2052623 GAS: Allow AArch64 pseudo-ops to accept the command line separator character.
PR 29519
	* config/tc-aarch64.c (s_unreq): Use find_end_of_line().
	(s_aarch64_cpu): Likewise.
	(s_aarch64_arch): Likewise.
	(s_aarch64_arch_extension): Likewise.
	* testsuite/gas/aarch64/pr29519.d: New test driver file.
	* testsuite/gas/aarch64/pr29519.s: New test source file.
2022-08-25 11:39:50 +01:00
Palmer Dabbelt
5a3ca6e319 gas: NEWS: Add the RISC-V features for 2.39 2022-08-25 16:10:13 +08:00
Palmer Dabbelt
6b60a1ec10 gas: NEWS: Add the RISC-V features for 2.38 2022-08-25 16:10:10 +08:00
Palmer Dabbelt
157a088c1e gas: NEWS: Add the RISC-V features for 2.37 2022-08-25 16:10:07 +08:00
Palmer Dabbelt
c17cf68c8c gas: NEWS: Add the RISC-V features for 2.36 2022-08-25 16:10:05 +08:00
Palmer Dabbelt
4362996c0e gas: NEWS: Add the RISC-V features for 2.35 2022-08-25 16:10:02 +08:00
Palmer Dabbelt
64411043fd gas: NEWS: Add the RISC-V features for 2.31 2022-08-25 16:09:59 +08:00
Alan Modra
c2d7de232b PR11290, avr-ld "out of range error" is confusing
Don't overload bfd_reloc_outofrange with what is really a domain error
(target at odd address), or an overflow.

	PR 11290
	* reloc.c (bfd_reloc_other): Correct comment.
	* elf32-avr.c (avr_final_link_relocate): Return bfd_reloc_other
	for unaligned reloc target values.  Return bfd_reloc_overflow
	when stubs are too far away and when R_AVR_LDS_STS_16,
	R_AVR_PORT6, or R_AVR_PORT5 overflow.
	(elf32_avr_relocate_section): Report more descriptive relocation
	errors.
	* bfd-in2.h: Regenerate.
2022-08-25 17:20:01 +09:30
Martin Storsjö
45692d91e7 ld: pe: Move the return type to a separate line from the function name
This fixes the coding style of an old, preexisting function.
2022-08-25 09:51:20 +03:00
Alan Modra
8f401e317a PR10372, SH: ld test with sim/sh/run fails always
PR 10372
	* testsuite/ld-sh/start.s: Add _start sym.  Use trapa 34.  Create
	an alloc .stack section.
2022-08-25 13:33:39 +09:30
Alan Modra
c6e42384f1 Re: LoongArch: ld: Fix bug not generate plt when link a dso
Fixes loongarch32-elf  +FAIL: medium jirl plt

	* testsuite/ld-loongarch-elf/cmodel.exp: Don't run test when
	no shared library support.
2022-08-25 09:41:43 +09:30
GDB Administrator
66a43cf1a7 Automatic date update in version.in 2022-08-25 00:00:08 +00:00
Martin Storsjö
b53b12c8e8 ld: pe: Make archive member file extension comparisons case insensitive when cross compiling too
On Windows, filename_cmp is case insensitive, but when cross compiling
with libraries that may contain members with uppercase file names, we
should keep those comparisons case insensitive when running the build
tools on other OSes too.

Also make the check for .def consistent with the other ones, fixing
out of bounds reads if file names are shorter than 4 characters.
2022-08-24 23:18:47 +03:00
Richard Earnshaw
a37854f916 gas: arm: handle multiple .directives on a single line (PR29519)
There's been a long-standing bug in the arm backend where
target-specific directives did not correctly handle lines with
multiple statements.  This patch fixes the issue for all the cases
I've been able to find.

It does result in a slight change in behaviour when errors are
encountered: where, previously,

  .cpu arm6 bar

would result in the error "junk at end of line, first unrecognized
character is `b'", we now get "unknown cpu `arm6 bar'", which I think
is slightly more helpful anyway.  Similar errors are generated for
other directives.
2022-08-24 17:08:07 +01:00
Andrew Burgess
7017529261 gdb: new 'maint print frame-id' command
When debugging a certain class of GDB bug, I often end up wanting to
know what GDB thinks the frame-id is in a particular frame.  It's
not too hard to pull this from some debug output, but I thought it
might be nice if there was a maintenance command that could tell us.

This commit adds 'maint print frame-id' which prints the frame-id of
the currently selected frame.  You can also pass a frame level number
to find the frame-id for a specific frame.

There's a new test too.
2022-08-24 14:44:20 +01:00
liuzhensong
42bd5254fb LoongArch: ld: Fix bug not generate plt when link a dso
Fix the bug that can not generate func@plt
  when linking a undefined function with cmodel=medium.
  Add testcase.

  bfd/
    * elfnn-loongarch.c
  ld/testsuite/ld-loongarch-elf/
    * cmodel-libjirl.dd
    * cmodel.exp
    * libjirl.s
2022-08-24 14:27:03 +08:00
GDB Administrator
044193ebf6 Automatic date update in version.in 2022-08-24 00:00:10 +00:00
Alan Modra
37c49d0d63 SHT_RELR sh_link and sh_info
I don't think it makes any sense for a SHT_RELR section to specify a
symbol table with sh_link.  SHT_RELR relocations don't use symbols.
There is no real need to specify sh_info either, SHT_RELR is not for
relocatable object files.  Anyway, fuzzers of course don't restrict
themselves to even half-sensible objects.  So they found a hole in
objcopy using a non-alloc SHT_RELR in an ET_EXEC.  In that case BFD
set up the SHT_RELR section as if it were a SHT_REL against the
sh_info target section.  When it came to reading in the target section
relocs, the count was horribly wrong which caused a buffer overflow.

	* elf.c (bfd_section_from_shdr <SHT_RELR>): Always just make a
	normal section, don't treat it as a reloc section.
2022-08-23 21:10:51 +09:30
Alan Modra
6ecc36f7b7 Re: bfd_elf_set_group_contents assertion
Further to commit 7744e3278b9f.

	* elf.c (bfd_elf_set_group_contents): Restrict loc in loop writing
	contents, and add another assertion.
2022-08-23 18:32:25 +09:30
Nick Clifton
25ee24d990 Add an option to dlltool to allow the creation of deterministic libraries.
PR 29489
	* dlltool.c (deterministic): New variable.
	(gen_lib_file): If deterministic is true set the
	BFD_DETERMINISTIC_OUTPUT flag.
	(usage): Mention --deterministic-libraries and
	--non-deterministic-libraries.
	(long_options): Add new options.
	(main): Parse new options.
	* doc/binutils.texi: Document the new options.
	* NEWS: Mention the new feature.
2022-08-23 09:54:52 +01:00
Nelson Chu
179390a375 binutils: Updated my email address.
binutils/
    * MAINTAINERS (RISC-V): Updated my email address.
2022-08-23 13:09:56 +08:00
GDB Administrator
f8bfbd5b75 Automatic date update in version.in 2022-08-23 00:00:12 +00:00
Tom Tromey
d08bae3d66 Implement target async for Windows
This implements target async for Windows.  The basic idea is to have
the worker thread block in WaitForDebugEvent, then notify the event
loop when an event is seen.  In a few situations, this blocking
behavior is undesirable, so the functions passed to do_synchronously
are changed to return a boolean indicating which behavior is needed.
2022-08-22 12:12:00 -06:00
Tom Tromey
4cb763d64d Move some Windows operations to worker thread
On Windows, certain debugging APIs can only be called from the thread
that started (or attached) to the inferior.  Also, there is no way on
Windows to wait for a debug event in addition to other events.
Therefore, in order to implement target async for Windows, gdb will
have to call some functions in a worker thread.

This patch implements the worker thread and moves the necessary
operations there.  Target async isn't yet implemented, so this patch
does not cause any visible changes.
2022-08-22 12:09:24 -06:00
Tom Tromey
6bab7e67d0 Avoid crash with Ravenscar tasks
When using Ravenscar, gdb can crash if the user sets a breakpoint very
early in task startup.  This happens because gdb thinks the runtime is
initialized, but in practice the particular task isn't sufficiently
initialized.  This patch avoids the issue by turning an assertion into
an early return.

I tested this using the AdaCore internal test suite.  I don't know how
to test Ravenscar using the FSF test suite.
2022-08-22 12:03:41 -06:00
Nick Clifton
b3ea2010cd Fix compile time warning from Clang about error messages not being printed safely. 2022-08-22 16:19:17 +01:00
Nick Clifton
521f726815 Have readelf warn users if it is asked to decode a LLVM bitcode file or a golang object file.
* readelf.c (check_magic_number): New function.  Checks the magic
	bytes at the start of a file.  If they are not the ELF format
	magic values, then attempts to generate a helpful error message.
	(process_file_header): Call check_magic_number.
2022-08-22 11:15:40 +01:00
Frederic Cambus
ba86e75013 Add OpenBSD AArch64 Little Endian BFD support.
* config.bfd (aarch64-*-openbsd*): Add target.
2022-08-22 10:19:42 +01:00
tangxiaolin
7ec249249c LoongArch: gas: add support using constant variable in instructions.
Instructions that can load immediate support using constant
        variable like ".equ var, 123    li.w/d resgister, var".

gas/
        * config/loongarch-parse.y
        * config/tc-loongarch.c

        Add four testcases.One is a program using constant variable,
        one test using label is unsupported, and another two test
        almost instructions that can load immediate.

gas/
        * testsuite/gas/loongarch/li.d
        * testsuite/gas/loongarch/li.s
        * testsuite/gas/loongarch/imm_ins_label-fail.d
        * testsuite/gas/loongarch/imm_ins_label-fail.l
        * testsuite/gas/loongarch/imm_ins_label-fail.s
        * testsuite/gas/loongarch/imm_ins.d
        * testsuite/gas/loongarch/imm_ins.s
        * testsuite/gas/loongarch/imm_ins_32.d
        * testsuite/gas/loongarch/imm_ins_32.s
2022-08-22 10:20:01 +08:00
GDB Administrator
1034d824d8 Automatic date update in version.in 2022-08-22 00:00:07 +00:00
Tom Tromey
bdc8cfc1e4 Fix crash in gdbpy_parse_register_id
I noticed that gdbpy_parse_register_id would assert if passed a Python
object of a type it was not expecting.  The included test case shows
this crash.  This patch fixes the problem and also changes
gdbpy_parse_register_id to be more "Python-like" -- it always ensures
the Python error is set when it fails, and the callers now simply
propagate the existing exception.
2022-08-21 08:03:42 -06:00
GDB Administrator
12f26cb22e Automatic date update in version.in 2022-08-21 00:00:11 +00:00