Commit Graph

111490 Commits

Author SHA1 Message Date
Tom Tromey
3a3bb6eb36 Remove c_printstr
This renames c_printstr, removing a layer of indirection.
2022-10-10 10:43:34 -06:00
Tom Tromey
c1c7fe59f6 Remove c_emit_char
This renames c_emit_char, removing a layer of indirection.
2022-10-10 10:43:34 -06:00
Tom Tromey
3a64633804 Boolify need_escape in generic_emit_char
This changes 'need_escape' in generic_emit_char to be of type bool,
rather than int.
2022-10-10 10:43:34 -06:00
Tom Tromey
1be8435c74 Fix latent quote char bug in generic_printstr
generic_printstr prints an empty string like:

      fputs_filtered ("\"\"", stream);

However, this seems wrong to me if the quote character is something
other than double quote.  This patch fixes this latent bug.  Thanks to
Andrew for the test case.

Co-authored-by: Andrew Burgess <aburgess@redhat.com>
2022-10-10 10:43:33 -06:00
Tom Tromey
79aafec96b Fix the guile build
The frame_info_ptr patches broke the build with Guile.  This patch
fixes the problem.  In mos cases I chose to preserve the use of
frame_info_ptr, at least where I could be sure that the object
lifetime did not interact with Guile's longjmp-based exception scheme.

Tested on x86-64 Fedora 34.
2022-10-10 09:34:09 -06:00
Tom de Vries
c52ce60356 [gdb/testsuite] Detect trailing ^C/^D in command
Detect a trailing ^C/^D in the command argument of gdb_test_multiple, and
error out.

Tested on x86_64-linux.
2022-10-10 16:24:38 +02:00
Tom de Vries
ed6cd15957 [gdb/testsuite] Fix error message for cmd with trailing newline
I noticed that the error message in gdb_test_multiple about trailing newline
in a command does not mention the offending command, nor the word command:
...
    if [string match "*\[\r\n\]" $command] {
        error "Invalid trailing newline in \"$message\" test"
    }
...

Fix this by using instead:
...
        error "Invalid trailing newline in \"$command\" command"
...

Also add a test-case to trigger this: gdb.testsuite/gdb-test.exp.

Tested on x86_64-linux.
2022-10-10 14:44:40 +02:00
Andrew Burgess
66984afd29 gdb: include the base address in in-memory bfd filenames
The struct target_buffer (in gdb_bfd.c) is used to hold information
about an in-memory BFD object created by GDB.  For now this mechanism
is used by GDB when loading information about JIT symfiles.

This commit updates target_buffer (in gdb_bfd.c) to be more C++ like,
and, at the same time, adds the base address of the symfile into the
BFD filename.

Right now, every in-memory BFD is given the filename "<in-memory>".
This filename is visible in things like 'maint info symtabs' and
'maint info line-table'.  If there are multiple in-memory BFD objects
then it can be hard to match keep track if which BFD is which.  This
commit changes the name to be "<in-memory@ADDRESS>" where ADDRESS is
replaced with the base address for where the in-memory symbol file was
read from.

As an example of how this is useful, here's the output of 'maint info
jit' showing a single loaded JIT symfile:

  (gdb) maintenance info jit
  jit_code_entry address symfile address    symfile size
  0x00000000004056b0     0x0000000007000000 17320

And here's part of the output from 'maint info symtabs':

  (gdb) maintenance info symtabs
  ...snip...
  { objfile <in-memory@0x7000000> ((struct objfile *) 0x5258250)
    { ((struct compunit_symtab *) 0x4f0afb0)
      debugformat DWARF 4
      producer GNU C17 9.3.1 20200408 (Red Hat 9.3.1-2) -mtune=generic -march=x86-64 -g -fno-stack-protector -fpic
      name jit-elf-solib.c
      dirname /tmp/binutils-gdb/build/gdb/testsuite
      blockvector ((struct blockvector *) 0x5477850)
      user ((struct compunit_symtab *) (null))
  	{ symtab /tmp/binutils-gdb/build/gdb/testsuite/../../../src/gdb/testsuite/gdb.base/jit-elf-solib.c ((struct symtab *) 0x4f0b030)
  	  fullname (null)
  	  linetable ((struct linetable *) 0x5477880)
  	}
    }
  }

I've added a new test that checks the new in-memory file names are
generated correctly, and also checks that the in-memory JIT files can
be dumped back out using 'dump binary memory'.
2022-10-10 13:05:27 +01:00
Andrew Burgess
322dd71cbf gdb: remove filename arg from gdb_bfd_open_from_target_memory
The filename argument to gdb_bfd_open_from_target_memory was never
used; this argument had a default value of nullptr, and the only call
to this function, in jit.c, relied on the default value.

In the next commit I'm going to make some changes to the
gdb_bfd_open_from_target_memory function, and, though I could take
account of a filename parameter, it seems pointless to maintain an
unused argument.

This commit removes the filename argument.

There should be no user visible changes after this commit.
2022-10-10 13:05:27 +01:00
Andrew Burgess
e4014689b9 gdb: add infcall specific debugging
Add two new commands:

  set debug infcall on|off
  show debug infcall

These enable some new debugging related to when GDB makes inferior
function calls.  I've added some basic debugging for what I think are
the major steps in the inferior function call process, but I'm sure we
might want to add more later.
2022-10-10 12:18:00 +01:00
Andrew Burgess
58fd1204aa gdb: extra debug output in thread.c
Add some extra 'threads' debug in a couple of places in thread.c.
I've also added an additional gdb_assert in one case.
2022-10-10 12:16:18 +01:00
Andrew Burgess
adaef65695 gdb: improve infrun_debug_show_threads output
This commit switches to use INFRUN_SCOPED_DEBUG_START_END in the
infrun_debug_show_threads function, which means the output will get an
extra level of indentation, this looks a little nicer I think.
2022-10-10 12:16:18 +01:00
Nick Clifton
f54c53e9f4 Add ability to create reproducible source tarballs.
* src-release.sh: Add "-r <date>" option to create reproducible
	tarballs based upon a fixed timestamp of <date>.
	* binutils/README-how-to-make-a-release: Add a line showing how to
	use -r <date> when creating a binutils release.
2022-10-10 11:28:45 +01:00
Bruno Larsen
c29a6445a9 gdb/frame: Add reinflation method for frame_info_ptr
Currently, despite having a smart pointer for frame_infos, GDB may
attempt to use an invalidated frame_info_ptr, which would cause internal
errors to happen.  One such example has been documented as PR
python/28856, that happened when printing frame arguments calls an
inferior function.

To avoid failures, the smart wrapper was changed to also cache the frame
id, so the pointer can be reinflated later.  For this to work, the
frame-id stuff had to be moved to their own .h file, which is included
by frame-info.h.

Frame_id caching is done explicitly using the prepare_reinflate method.
Caching is done manually so that only the pointers that need to be saved
will be, and reinflating has to be done manually using the reinflate
method because the get method and the -> operator must not change
the internals of the class.  Finally, attempting to reinflate when the
pointer is being invalidated causes the following assertion errors:

check_ptrace_stopped_lwp_gone: assertion `lp->stopped` failed.
get_frame_pc: Assertion `frame->next != NULL` failed.

As for performance concerns, my personal testing with `time make
chec-perf GDB_PERFTEST_MODE=run` showed an actual reduction of around
10% of time running.

This commit also adds a testcase that exercises the python/28856 bug with
7 different triggers, run, continue, step, backtrace, finish, up and down.
Some of them can seem to be testing the same thing twice, but since this
test relies on stale pointers, there is always a chance that GDB got lucky
when testing, so better to test extra.

Regression tested on x86_64, using both gcc and clang.

Approved-by: Tom Tomey <tom@tromey.com>
2022-10-10 11:57:10 +02:00
Tom Tromey
bd2b40ac12 Change GDB to use frame_info_ptr
This changes GDB to use frame_info_ptr instead of frame_info *
The substitution was done with multiple sequential `sed` commands:

sed 's/^struct frame_info;/class frame_info_ptr;/'
sed 's/struct frame_info \*/frame_info_ptr /g' - which left some
    issues in a few files, that were manually fixed.
sed 's/\<frame_info \*/frame_info_ptr /g'
sed 's/frame_info_ptr $/frame_info_ptr/g' - used to remove whitespace
    problems.

The changed files were then manually checked and some 'sed' changes
undone, some constructors and some gets were added, according to what
made sense, and what Tromey originally did

Co-Authored-By: Bruno Larsen <blarsen@redhat.com>
Approved-by: Tom Tomey <tom@tromey.com>
2022-10-10 11:57:10 +02:00
Tom Tromey
ba380b3e51 Introduce frame_info_ptr smart pointer class
This adds frame_info_ptr, a smart pointer class.  Every instance of
the class is kept on an intrusive list.  When reinit_frame_cache is
called, the list is traversed and all the pointers are invalidated.
This should help catch the typical GDB bug of keeping a frame_info
pointer alive where a frame ID was needed instead.

Co-Authored-By: Bruno Larsen <blarsen@redhat.com>
Approved-by: Tom Tomey <tom@tromey.com>
2022-10-10 11:57:10 +02:00
Tom Tromey
a0cbd6505e Remove frame_id_eq
This replaces frame_id_eq with operator== and operator!=.  I wrote
this for a version of this series that I later abandoned; but since it
simplifies the code, I left this patch in.

Approved-by: Tom Tomey <tom@tromey.com>
2022-10-10 11:57:10 +02:00
Andrew Burgess
f91822c2b9 gdb/testsuite: use 'end' at the end of python blocks
Within the testsuite, use the keyword 'end' to terminate blocks of
Python code being sent to GDB, rather than sending \004.  I could only
find three instances of this, all in tests that I originally wrote.  I
have no memory of there being any special reason why I used \004
instead of 'end' - I assume I copied this from somewhere else that has
since changed.

Non of the tests being changed here are specifically about whether
\004 can be used to terminate a Python block, so I think switching to
the more standard 'end' keyword is the right choice.
2022-10-10 10:23:59 +01:00
Simon Marchi
d549d8d23d gdbsupport: re-generate configure
I get this diff when re-generating configure, probably leftover from
67d1991b78 ("egrep in binutils").

Change-Id: I759c88c2bad648736d33ff98089db45c9b686356
2022-10-09 21:27:37 -04:00
Alan Modra
228cf97dd3 Merge configure.ac from gcc project
To merge with gcc's copy of configure.ac we need to revert changes to
configure.ac in the following gcc commits:
dc832fb39fc0 2022-08-25
fc259b522c0f 2022-06-25
Then reapply configure.ac changes in binutils from these binutils
commits:
50ad1254d5 2021-01-09
bb368aad29 2022-03-11
e5f2f7d901 2022-07-26
2cac01e3ff 2022-09-26
Plus copy over gcc's config/ax_cxx_compile_stdcxx.m4, then regenerate
configure.
2022-10-10 11:14:21 +10:30
GDB Administrator
bbcf4de018 Automatic date update in version.in 2022-10-10 00:00:14 +00:00
GDB Administrator
c10a862f17 Automatic date update in version.in 2022-10-09 00:00:18 +00:00
Tom Tromey
4482b068b2 Merge both implementations of debug_names::insert
The class debug_names has two 'insert' overloads, but only one of them
is ever called externally, and it simply forwards to the other
implementation.  It seems cleaner to me to have a single method, so
this patch merges the two.
2022-10-08 09:00:06 -06:00
Tom de Vries
db95282ce9 [gdb/testsuite] Fix silent fail in gdb.server/connect-with-no-symbol-file.exp
With native and target boards native-gdbserver, remote-gdbserver-on-localhost and
remote-stdio-gdbserver I have for gdb.server/connect-with-no-symbol-file.exp:
...
 # of expected passes            8
...
but with native-extended-gdbserver I have instead:
...
 # of expected passes            8
 # of unexpected failures        4
...

The extra FAILs are of the form:
...
(gdb) detach^M
Detaching from pid process 28985^M
[Inferior 1 (process 28985) detached]^M
(gdb) FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=: \
  action=permission: connection to GDBserver succeeded
...
and are due to the fact that the actual gdb output doesn't match the regexp:
...
    gdb_test "detach" \
       ".*Detaching from program: , process.*Ending remote debugging.*" \
       "connection to GDBserver succeeded"
...

With native, the actual gdb output is:
...
(gdb) detach^M
Detaching from pid process 29657^M
Ending remote debugging.^M
[Inferior 1 (process 29657) detached]^M
(gdb) Remote debugging from host ::1, port 51028^M
...
and because the regexp doesn't match, it triggers an implicit clause for
"Ending remote debugging" in gdb_test_multiple, which has the consequence
that the FAIL is silent.

Fix:
- the regexp by making it less strict
- the silent fail by rewriting into a gdb_test_multiple, and adding an
  explicit fail clause.

Tested on x86_64-linux, using native and aforementioned target boards.
2022-10-08 10:47:47 +02:00
GDB Administrator
4cbfd0daab Automatic date update in version.in 2022-10-08 00:00:13 +00:00
Lancelot SIX
ae17d05a4a gdb/testsuite: fix gdb.threads/linux-dp.exp regex
On ubuntu 22.04 with the libc6-dbg package installed, I have the
following failure:

    where
    #0  print_philosopher (n=3, left=33 '!', right=33 '!') at .../gdb/testsuite/gdb.threads/linux-dp.c:105
    #1  0x000055555555576a in philosopher (data=0x55555555937c) at .../gdb/testsuite/gdb.threads/linux-dp.c:148
    #2  0x00007ffff7e11b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
    #3  0x00007ffff7ea3a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
    (gdb) FAIL: gdb.threads/linux-dp.exp: first thread-specific breakpoint hit

The regex for this test accounts for different situations (with /
without debug symbol) but assumes that if debug info is present the
backtrace shows execution under pthread_create.  However, for the
implementation under test, we are under start_thread.

Update the regex to accept start_thread.

Tested on Ubuntu-22.04 x86_64 with and without libc6-dbg debug symbols
available.

Change-Id: I1e1536279890bca2cd07f038e026b41e46af44e0
2022-10-07 20:15:21 +01:00
Tom de Vries
7808a1f7f6 [gdb/testsuite] Handle host cleanfiles
When running test-case gdb.server/abspath.exp with host board
local-remote-host-notty, I get:
...
$ git sti
  ...
        deleted:    gdb/testsuite/gdb.xml/trivial.xml
...

This happens as follows.  The test-case calls skip_gdbserver_test, which calls
gdb_skip_xml_test, which does:
...
    set xml_file [gdb_remote_download host "${srcdir}/gdb.xml/trivial.xml"]
...

Then proc gdb_remote_download appends $xml_file (which for this particular
host board happens to be ${srcdir}/gdb.xml/trivial.xml) to cleanfiles, which
ends up being handled in gdb_finish by:
...
       eval remote_file target delete $cleanfiles
...

The problem is that a host file is deleted using target delete.

Fix this by splitting cleanfiles up in cleanfiles_target and cleanfiles_host.

Tested on x86_64-linux.
2022-10-07 18:08:00 +02:00
Tom de Vries
8c7cb01a29 [gdb/testsuite] Remove unnecessary warning in gdb.base/default.exp
When running test-case gdb.base/default.exp with target board
native-gdbserver, we get:
...
WARNING: Skipping backtrace and break tests because of GDB stub.
...

There's no need for such a warning, so remove it.

Tested on x86_64-linux with native and target board native-gdbserver.
2022-10-07 16:17:35 +02:00
Tom de Vries
43792b0de4 [gdb/testsuite] Fix have_mpx with remote-gdbserver-on-localhost
With target board remote-gdbserver-on-localhost and gdb.arch/i386-mpx-call.exp
I run into:
...
FAIL: gdb.arch/i386-mpx-call.exp: upper_bnd0: continue to a bnd violation
...

This is due to the have_mpx test which should return 0, but instead returns 1
because the captured output:
...
No MPX support
No MPX support
...
does not match the used regexp:
...
    set status [expr ($status == 0) \
                   && ![regexp "^No MPX support\r\n" $output]]
...
which does match the captured output with native:
...
No MPX support^M
No MPX support^M
...

Fix this by making the \r in the regexp optional.

Tested on x86_64-linux, with native and target board
remote-gdbserver-on-localhost.
2022-10-07 16:17:35 +02:00
Tom de Vries
7fe3f84145 [gdb/testsuite] Fix DUPLICATEs with remote-gdbserver-on-localhost
Fix some DUPLICATEs that we run into with target board
remote-gdbserver-on-localhost, by using test_with_prefix.

Tested on x86_64-linux, with native and target board
remote-gdbserver-on-localhost.
2022-10-07 16:17:34 +02:00
Tom de Vries
8ed73e3164 [gdb/testsuite] Fix path in test name in gdb_load_shlib
When running test-case gdb.server/solib-list.exp with target board
remote-gdbserver-on-localhost, I run into:
...
(gdb) set solib-search-path $outputs/gdb.server/solib-list^M
(gdb) PASS: gdb.server/solib-list.exp: non-stop 0: \
  set solib-search-path $outputs/gdb.server/solib-list
PATH: gdb.server/solib-list.exp: non-stop 0: \
  set solib-search-path $outputs/gdb.server/solib-list
...

This is due to this code in gdb_load_shlib:
...
       gdb_test "set solib-search-path [file dirname $file]" "" ""
...

Fix this by setting an explicit test name.

Tested on x86_64-linux, with native and target boards
remote-gdbserver-on-localhost, native-gdbserver and native-extended-gdbserver.
2022-10-07 16:17:34 +02:00
Alan Modra
ea4e4a19b7 PR29653, objcopy/strip: fuzzed small input file induces large output file
_bfd_check_format functions should not print errors or warnings if
they return NULL.  A NULL return means the particular target under
test does not match, so there isn't any reason to make a complaint
about the target.  In fact there isn't a good reason to warn even if
the target matches, except via the _bfd_per_xvec_warn mechanism; Some
other target might be a better match.

This patch tidies pe_bfd_object_p with the above in mind, and
restricts the PE optional header SectionAlignment and FileAlignment
fields somewhat.  I chose to warn on nonsense values rather than
refusing to match.  Refusing to match would be OK too.

	PR 29653
	* peXXigen.c (_bfd_XXi_swap_aouthdr_in): Don't emit error about
	invalid NumberOfRvaAndSizes here.  Limit loop copying data
	directory to IMAGE_NUMBEROF_DIRECTORY_ENTRIES.
	* peicode.h (pe_bfd_object_p): Don't clear and test bfd_error
	around bfd_coff_swap_aouthdr_in.  Warn on invalid SectionAlignment,
	FileAlignment and NumberOfRvaAndSizes.  Don't return NULL on
	invalid NumberOfRvaAndSizes.
2022-10-07 12:30:28 +10:30
GDB Administrator
fea044ba7b Automatic date update in version.in 2022-10-07 00:00:25 +00:00
Tom Tromey
0bce60ac7f Fix indentation in riscv-tdep.c
This just fixes some indentation in riscv-tdep.c.
2022-10-06 11:27:11 -06:00
Torbjörn SVENSSON
60c90d8c6d gdb/arm: Handle lazy FPU state preservation
Read LSPEN, ASPEN and LSPACT bits from FPCCR and use them together
with FPCAR to identify if lazy FPU state preservation is active for
the current frame.  See "Lazy context save of FP state", in B1.5.7,
also ARM AN298, supported by Cortex-M4F architecture for details on
lazy FPU register stacking.  The same conditions are valid for other
Cortex-M cores with FPU.

This patch has been verified on a STM32F4-Discovery board by:
a) writing a non-zero value (lets use 0x1122334455667788 as an
   example) to all the D-registers in the main function
b) configured the SysTick to fire
c) in the SysTick_Handler, write some other value (lets use
   0x0022446688aaccee as an example) to one of the D-registers (D0 as
   an example) and then do "SVC #0"
d) in the SVC_Handler, write some other value (lets use
   0x0099aabbccddeeff) to one of the D-registers (D0 as an example)

In GDB, suspend the execution in the SVC_Handler function and compare
the value of the D-registers for the SVC_handler frame and the
SysTick_Handler frame.  With the patch, the value of the modified
D-register (D0) should be the new value (0x009..eff) on the
SVC_Handler frame, and the intermediate value (0x002..cee) for the
SysTick_Handler frame.  Now compare the D-register value for the
SysTick_Handler frame and the main frame.  The main frame should
have the initial value (0x112..788).

Signed-off-by: Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>
Signed-off-by: Yvan ROUX  <yvan.roux@foss.st.com>
2022-10-06 16:01:10 +02:00
Tom de Vries
ca10a126c6 [gdb/symtab] Factor out have_complaint
After committing 8ba677d356 ("[gdb/symtab] Don't complain about function
decls") I noticed that quite a bit of code in read_func_scope is used to decide
whether to issue the "cannot get low and high bounds for subprogram DIE at
$hex" complaint, which executes unnecessarily if we have the default
"set complaints 0".

Fix this by (NFC):
- factoring out new static function have_complaint from macro complaint, and
- using it to wrap the relevant code in read_func_scope.

Tested on x86_64-linux.
2022-10-06 14:53:07 +02:00
Andrew Burgess
80e0c6dc91 gdb: add missing nullptr checks in bpstat_check_breakpoint_conditions
Add a couple of missing nullptr checks in the function
bpstat_check_breakpoint_conditions.

No user visible change after this commit.
2022-10-06 10:01:15 +01:00
Andrew Burgess
d8a77e4c80 gdb: more infrun debug from breakpoint.c
This commit adds additional infrun debug from the breakpoint.c file.
The new debug output all relates to breakpoint condition evaluation.

There is already some infrun debug emitted from the breakpoint.c file,
so hopefully, adding more will not be contentious.  I think the
functions being instrumented make sense as part of the infrun process,
the inferior stops, evaluates the condition, and then either stops or
continues.  This new debug gives more insight into that process.

I had to make the bp_location* argument to find_loc_num_by_location
const, and add a declaration for find_loc_num_by_location.

There should be no user visible changes unless they turn on debug
output.
2022-10-06 10:01:15 +01:00
Andrew Burgess
07443de62b gdb: add some additional debug in mark_async_event_handler
Extend the existing debug printf call to include the previous state of
the async_event_handler object.
2022-10-06 10:01:14 +01:00
Tsukasa OI
a13886e219 RISC-V: Print XTheadMemPair literal as "immediate"
The operand type "Xl(...)" denotes that (...) is a literal.  Specifically,
they are intended to be a constant immediate value.

This commit prints "Xl(...)" operand with dis_style_immediate style,
not dis_style_text.

opcodes/ChangeLog:

	* riscv-dis.c (print_insn_args): Use dis_style_immediate on
	the constant literal of the "Xl..." operand.
2022-10-06 02:23:31 +00:00
Tsukasa OI
1554329012 RISC-V: Fix T-Head immediate types on printing
This commit fixes two minor typing-related issues for
T-Head immediate operands.

1.  A signed type must be specified when printing with %i.
2.  unsigned/signed int is not portable enough for max 32-bit immediates.
    Instead, we should use unsigned/signed long.
    The format string is changed accordingly.

opcodes/ChangeLog:

	* riscv-dis.c (print_insn_args): Fix T-Head immediate types on
	printing.
2022-10-06 02:23:31 +00:00
Tsukasa OI
f3a8023579 RISC-V: Print comma and tabs as the "text" style
On the RISC-V disassembler, some separators have non-text style when
printed with another word with another style.

This commit splits those, making sure that those comma and tabs are printed
with the "text" style.

opcodes/ChangeLog:

	* riscv-dis.c (print_insn_args): Split and print the comma as
	text.  (riscv_disassemble_insn): Split and print tabs as text.
	(riscv_disassemble_data): Likewise.
2022-10-06 02:23:31 +00:00
Tsukasa OI
e0b004c5d5 RISC-V: Optimize riscv_disassemble_data printf
This commit makes types of printf arguments on riscv_disassemble_data
as small as possible (as long as we can preserve the portability) to reduce
the cost of printf (especially on 32-bit host).

opcodes/ChangeLog:

	* riscv-dis.c (riscv_disassemble_data): Use smallest possible type
	to printing data.
2022-10-06 02:23:31 +00:00
Tsukasa OI
2cfc7c876d RISC-V: Fix printf argument types corresponding %x
"%x" format specifier requires unsigned type, not int.  This commit
fixes this issue on the RISC-V disassembler.

opcodes/ChangeLog:

	* riscv-dis.c (print_insn_args): Fix printf argument types where
	the format specifier is "%x".
2022-10-06 02:23:31 +00:00
Tsukasa OI
9a76ca16e8 RISC-V: Fix immediates to have "immediate" style
This commit fixes certain print calls on immediate operands to have
dis_style_immediate.

opcodes/ChangeLog:

	* riscv-dis.c (print_insn_args): Fix immediates to have
	"immediate" style.  (riscv_disassemble_data): Likewise.
2022-10-06 02:23:31 +00:00
GDB Administrator
a1509b60cf Automatic date update in version.in 2022-10-06 00:00:17 +00:00
Alan Modra
769a27ade5 Re: bfd BLD-POTFILES.in dependencies
Removing $BLD_POTFILES from BFD-POTFILES.in was correct, but left a
hole in dependencies.
make[4]: Entering directory '/home/alan/build/gas/all/bfd/po'
make[4]: *** No rule to make target '../elf32-aarch64.c', needed by '/home/alan/src/binutils-gdb/bfd/po/bfd.pot'.  Stop.

	* Makefile.am (BUILT_SOURCES): Add BUILD_CFILES.
	* Makefile.in: Regenerate.
2022-10-06 09:45:56 +10:30
Jan Beulich
e87fb6a6d0 x86/gas: support quoted address scale factor in AT&T syntax
An earlier attempt (e68c3d59ac ["x86: better respect quotes in
parse_operands()"]) needed undoing (cc0f96357e ["x86: permit
parenthesized expressions again as addressing scale factor"]) as far its
effect here went. As indicated back then, the issue is the backwards
scanning of the operand string to find the matching opening parenthesis.
Switch to forward scanning, finding the last outermost unquoted opening
parenthesis (which is the one matching the trailing closing one).
2022-10-05 09:16:24 +02:00
Jan Beulich
bb5cb85b46 Arm64: support CLEARBHB alias
While the Arm v8 ARM (rev I-a) still doesn't mention this alias, it is
(typically via a macro) already in use in kernels and alike.
2022-10-05 09:15:51 +02:00
Alan Modra
306253b2cf PR29647, objdump -S looping
Fuzzed input with this in .debug_line
  [0x0000003b]  Special opcode 115: advance Address by 8 to 0x401180 and Line by -2 to -1

	PR 29647
	* objdump.c (print_line): Don't decrement line number here..
	(dump_lines): ..do so here instead, ensuring loop terminates.
2022-10-05 14:53:41 +10:30