Commit Graph

104659 Commits

Author SHA1 Message Date
Nelson Chu
4c0e540e47 RISC-V: Fix the merged orders of Z* extension for linker.
Similar to the commit 6729e2c2af,
we have to check the first char of the Z* extensions, to make
sure that they follow the order of the standard extensions.

bfd/
    * elfxx-riscv.c (riscv_compare_subsets): Removed static.
    * elfxx-riscv.h: Add declaration.
    * elfnn-riscv.c (riscv_merge_multi_letter_ext): Use
    riscv_compare_subsets to check the orders.
    (riscv_skip_prefix): Removed.
    (riscv_prefix_cmp): Removed.
2021-01-04 11:17:33 +08:00
Alan Modra
e9cf3691bf PR26741, benign use after free in riscv_parse_prefixed_ext
ISO/IEC 9899:1999 C standard "J.2 Undefined behavior" says the
following is undefined behaviour:

"The value of a pointer that refers to space deallocated by a call to
the free or realloc function is used (7.20.3)."

	PR 26741
	* elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after
	calculating subset version length.
2021-01-04 11:08:05 +10:30
Nicolas Boulenguez
a7c23ac931 In libctf, make AC_CONFIG_MACRO_DIR consistent with ACLOCAL_AMFLAGS
PR 27117
	* configure.ac: Make AC_CONFIG_MACRO_DIR consistent with
	ACLOCAL_AMFLAGS -I dirs.
	* configure: Regenerate.
2021-01-04 11:08:05 +10:30
Alan Modra
90320e4095 PR27101, as: Reject (byte) .align 0x100000000
This allows alignments up to 2**TC_ALIGN_LIMIT, which might be larger
than an unsigned int can hold.

	PR 27101
	* read.c (s_align): Use a large enough type for "align" to hold
	the result of get_absolute_expression.
2021-01-04 11:08:05 +10:30
GDB Administrator
a68494db84 Automatic date update in version.in 2021-01-04 00:00:07 +00:00
Simon Marchi
9898e882c5 gdb: fix typos in comments in target-float.c
gdb/ChangeLog:

	* target-float.c: Fix typos.

Change-Id: Ib65e90746d0a7c77c3fbead81139facb40b91977
2021-01-02 21:32:14 -05:00
Alan Modra
e3b53295d5 PR27140, ppc32 segmentation fault in make_stub
This fixes a thinko in commit fa40fbe484.  st_other global entry bits
are relevant only for 64-bit ELFv2.  PowerPC gold leaves local sym
vector of st_other bits as NULL for 32-bit, hence the segfault.

	PR 27140
	* powerpc.cc (Target_powerpc::Branch_info::make_stub): Only access
	object->st_other() when 64-bit.
	(Stub_table::add_long_branch_entry): Ignore "other" when 32-bit.
2021-01-03 12:49:47 +10:30
Mike Frysinger
0ede24f2c4 sim: common: add align_{up,down} to match gdb
We have ALIGN_{8,16,PAGE} and FLOOR_PAGE macros (where PAGE is defined as
4k) which were imported from the ppc sim.  But no other sim utilizes these
and hardcoding the sizes in the name is a bit limiting.

Let's delete these and import the two general macros that gdb uses:
	align_up(addr, bytes)
	align_down(addr, bytes)

This in turn allows us to cut over the Blackfin code immediately.
2021-01-02 20:55:21 -05:00
GDB Administrator
3b47e132c4 Automatic date update in version.in 2021-01-03 00:00:06 +00:00
Hannes Domani
b66b4e658f Fix pretty printer of main_type.flds_bnds.bounds
In struct dynamic_prop the members kind and data were renamed to m_kind and
m_data.

And flag_upper_bound_is_count is actually in bounds directly, not in its
high member.

gdb/ChangeLog:

2021-01-02  Hannes Domani  <ssbssa@yahoo.de>

	* gdb-gdb.py.in: Fix main_type.flds_bnds.bounds pretty printer.
2021-01-02 19:47:53 +01:00
GDB Administrator
4258df85f1 Automatic date update in version.in 2021-01-02 00:00:06 +00:00
Joel Brobecker
b5b5650a49 Manual updates of copyright year range not covered by gdb/copyright.py
gdb/ChangeLog:

        * gdbarch.sh: Update copyright year range.

gdb/doc/ChangeLog:

        * gdb.texinfo, refcard.tex: Update copyright year range.
2021-01-01 12:13:21 +04:00
Joel Brobecker
3666a04883 Update copyright year range in all GDB files
This commits the result of running gdb/copyright.py as per our Start
of New Year procedure...

gdb/ChangeLog

        Update copyright year range in copyright header of all GDB files.
2021-01-01 12:12:21 +04:00
Joel Brobecker
ff7e39b613 gdb/copyright.py: Also update sources in "gdbserver" and "gdbsupport"
This commit adjusts GDB's copyright.py script, following two past changes:
  - gdb/gdbserver/ being move to the toplevel directory;
  - gdb/common/ being renamed to gdbsupport/.

gdb/ChangeLog:

        * copyright.py (get_update_list): Add "gdbserver" and "gdbsupport"
        to the list of directories to update.
2021-01-01 12:02:34 +04:00
Joel Brobecker
2b47c078fd Update copyright year in version message for gdb, gdbserver and gdbreplay
gdb/ChangeLog:

        * top.c (print_gdb_version): Update copyright year.

gdbserver/ChangeLog:

        * server.cc (gdbserver_version): Update copyright year.
        * gdbreplay.cc (gdbreplay_version): Likewise.
2021-01-01 11:53:14 +04:00
Joel Brobecker
476923f1ca Rotate gdb/ChangeLog
As a results of the rotation, this introduces a new file which
needed to be added to DJGPP's fnchange.lst.

gdb/ChangeLog

       * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2020.
2021-01-01 11:45:58 +04:00
Alan Modra
f9a6a8f09d PR27116, Spelling errors found by Debian style checker
PR 27116
bfd/
	* xcofflink.c: Correct spelling in comments.
binutils/
	* coffgrok.c (do_type): Correct spelling of auxiliary in errors.
	* doc/binutils.texi: Correct grammar.
	* readelf.c (process_version_sections): Correct spelling of auxiliary
	in warning.
	* testsuite/binutils-all/vax/objdump.exp: Comment grammar fix.
config/
	* override.m4: Correct comment grammar.
gas/
	* config/tc-i386.c: Correct comment spelling.
	* config/tc-riscv.c: Likewise.
	* config/tc-s390.c: Correct comment grammar.
	* doc/c-i386.texi: Correct spelling.
	* doc/c-s390.texi: Correct grammar.
gold/
	* tilegx.cc: Correct comment spelling.
gprof/
	* README: Correct grammar.
	* gprof.texi: Likewise.
include/
	* coff/internal.h: Correct comment spelling.
	* coff/sym.h: Likewise.
	* opcode/aarch64.h: Likewise.
ld/
	* configure.tgt: Correct comment grammar.
	* emultempl/m68hc1xelf.em: Likewise.
	* ld.texi: Correct grammar.
2021-01-01 14:36:35 +10:30
Alan Modra
250d07de5c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
Alan Modra
f192b314f3 Add libctf to update-copyright.py 2021-01-01 10:31:02 +10:30
Alan Modra
c2795844e6 ChangeLog rotation 2021-01-01 10:31:02 +10:30
GDB Administrator
57f60d20ca Automatic date update in version.in 2021-01-01 00:00:07 +00:00
Hans-Peter Nilsson
64d05a4334 gas: Change to "swym 0" as canonical nop insn for MMIX
While "set $0, $0" works, that's not the documented instruction to do
nothing for MMIX.  However, I'm not changing it for "nop_type 5" as
seen in gas.exp and org-1.s, because "set $0, $0" seems like it could
be re-used there, for some future ISA.

gas/
	* config/tc-mmix.h (md_single_noop_insn): Change to "swym 0".
2021-01-01 00:47:36 +01:00
Tom Tromey
9b243007ba Update gdb.rust tests for Rust 1.49
Rust 1.49 was released today, and it includes some library changes
which caused some gdb.rust tests to fail.  This patch adapts the test
suite to the new output.  I also verified that this continues to work
with Rust 1.48.

gdb/testsuite/ChangeLog
2020-12-31  Tom Tromey  <tom@tromey.com>

	* gdb.rust/simple.exp: Update output for Rust 1.49.
2020-12-31 14:55:27 -07:00
Alan Modra
cab3f4da68 PR27128, nm -P portable output format regression
binutils/
	PR 27128
	* nm.c (print_symname): Append version string to symbol name
	before printing the lot under control of "form".  Append version
	to demangled names too.
ld/
	PR 27128
	* testsuite/ld-elf/pr27128.s: New file.
	* testsuite/ld-elf/pr27128.t: Likewise.
	* testsuite/ld-elf/pr27128a.d: Likewise.
	* testsuite/ld-elf/pr27128b.d: Likewise.
	* testsuite/ld-elf/pr27128c.d: Likewise.
	* testsuite/ld-elf/pr27128d.d: Likewise.
	* testsuite/ld-elf/pr27128e.d: Likewise.
2020-12-31 19:07:02 +10:30
Bernd Edlinger
4ff509e75b Fix passing debug options for gcc
Fix a bug in the test where we were missing "additional_flags=",
causing -gstatement-frontiers not to be passed to the compiler.

The issue was introduced in
eb24648c45 ("Fix gdb.cp/step-and-next-inline.exp with Clang").

gdb/testsuite:
2020-12-31  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* gdb.cp/step-and-next-inline.exp: Fix test case.
2020-12-31 08:38:19 +01:00
Simon Marchi
391750c355 gdb/testsuite: de-duplicate test names in gdb.python/py-frame-args.exp
Use with_test_prefix to de-duplicate test names.

gdb/testsuite/ChangeLog:

	* gdb.python/py-frame-args.exp: De-duplicate test names.

Change-Id: I5cc8bee692a0d071cb78258aca80ea642e00e7a8
2020-12-30 23:45:36 -05:00
Pavel I. Kryukov
382bc56bc7 sim/mips/sim-main.c: Include <stdlib.h> (for abort() declaration)
sim/mips/ChangeLog:

	* sim-main.c: Include <stdlib.h>.
2020-12-31 08:14:36 +04:00
GDB Administrator
13840e34b2 Automatic date update in version.in 2020-12-31 00:00:06 +00:00
GDB Administrator
705fa8202b Automatic date update in version.in 2020-12-30 00:00:06 +00:00
H.J. Lu
2e635a0157 elfedit: Pass osabi to reconcat
Pass osabi to reconcat to get

Usage: elfedit <option(s)> elffile(s)
...
  --input-osabi [none|HPUX|NetBSD|GNU|Linux|Solaris|AIX|Irix|FreeBSD|TRU64|Modesto|OpenBSD|OpenVMS|NSK|AROS|FenixOS]
                              Set input OSABI

instead of

  --input-osabi [|FenixOS]
                              Set input OSABI

	* elfedit (usage): Pass osabi to reconcat.
2020-12-29 10:37:24 -08:00
Hannes Domani
6596a5d4f6 Fix wrong method name
The objects returned by FrameDecorator.frame_args need to implement a
method named symbol, not argument.

gdb/doc/ChangeLog:

2020-12-29  Hannes Domani  <ssbssa@yahoo.de>

	* python.texi (Frame Decorator API): Fix method name.
2020-12-29 18:35:50 +01:00
GDB Administrator
e2e3422ce1 Automatic date update in version.in 2020-12-29 00:00:06 +00:00
H.J. Lu
3e9373fcaf binutils: Use the newly built assembler and linker
Use the newly built assembler and linker in test_gnu_debuglink by passing
$gcc_gas_flag to target_compile.

	* testsuite/binutils-all/compress.exp (test_gnu_debuglink): Pass
	$gcc_gas_flag to target_compile.
2020-12-28 10:44:28 -08:00
GDB Administrator
adf6c633a3 Automatic date update in version.in 2020-12-28 00:00:08 +00:00
Tom Tromey
c8f02daac9 Simplify MULTI_SUBSCRIPT implementation
The MULTI_SUBSCRIPT code in evaluate_subexp_standard has a comment
saying that perhaps the EVAL_SKIP handling is incorrect.  This patch
simplifies this code.  In particular, it precomputes all the indices
in a separate loop and removes some complicated flow-control.

Tested using the gdb.modula2 and gdb.dlang test suites, as these are
the only parsers that emit MULTI_SUBSCRIPT.

gdb/ChangeLog
2020-12-27  Tom Tromey  <tom@tromey.com>

	* eval.c (evaluate_subexp_standard) <case MULTI_SUBSCRIPT>:
	Simplify.
2020-12-27 13:36:55 -07:00
GDB Administrator
9e87bc7f0f Automatic date update in version.in 2020-12-27 00:00:06 +00:00
GDB Administrator
556444effa Automatic date update in version.in 2020-12-26 00:00:06 +00:00
H.J. Lu
a12f86b9a6 gas: Update 80387 floating point 's' suffix
Update 80387 floating point 's' suffix to read:

  * Integer constructors are '.word', '.long' or '.int', and '.quad'
     for the 16-, 32-, and 64-bit integer formats.  The corresponding
     instruction mnemonic suffixes are 's' (short), 'l' (long), and 'q'
     (quad).

instead of 's' (single).

	PR gas/27106
	* doc/c-i386.texi: Update 80387 floating point 's' suffix
2020-12-25 05:56:36 -08:00
GDB Administrator
e142715391 Automatic date update in version.in 2020-12-25 00:00:08 +00:00
Andrew Burgess
b7874836c3 gdb: avoid resolving dynamic properties for non-allocated arrays
In PR gdb/27059 an issue was discovered where GDB would sometimes
trigger undefined behaviour in the form of signed integer overflow.
The problem here is that GDB was reading random garbage from the
inferior memory space, assuming this data was valid, and performing
arithmetic on it.

This bug raises an interesting general problem with GDB's DWARF
expression evaluator, which is this:

We currently assume that the DWARF expressions being evaluated are
well formed, and well behaving.  As an example, this is the expression
that the bug was running into problems on, this was used as the
expression for a DW_AT_byte_stride of a DW_TAG_subrange_type:

	DW_OP_push_object_address;
	DW_OP_plus_uconst: 88;
	DW_OP_deref;
	DW_OP_push_object_address;
	DW_OP_plus_uconst: 32;
	DW_OP_deref;
	DW_OP_mul

Two values are read from the inferior and multiplied together.  GDB
should not assume that any value read from the inferior is in any way
sane, as such the implementation of DW_OP_mul should be guarding
against overflow and doing something semi-sane here.

However, it turns out that the original bug PR gdb/27059, is hitting a
more specific case, which doesn't require changes to the DWARF
expression evaluator, so I'm going to leave the above issue for
another day.

In the test mentioned in the bug GDB is actually trying to resolve the
dynamic type of a Fortran array that is NOT allocated.  A
non-allocated Fortran array is one that does not have any data
allocated for it yet, and even the upper and lower bounds of the array
are not yet known.

It turns out that, at least for gfortran compiled code, the data
fields that describe the byte-stride are not initialised until the
array is allocated.

This leads me to the following conclusion: GDB should not try to
resolve the bounds, or stride information for an array that is not
allocated (or not associated, a similar, but slightly different
Fortran feature).  Instead, each of these properties should be set to
undefined if the array is not allocated (or associated).

That is what this commit does.  There's a new flag that is passed
around during the dynamic array resolution.  When this flag is true
the dynamic properties are resolved using the DWARF expressions as
they currently are, but when this flag is false the expressions are
not evaluated, and instead the properties are set to undefined.

gdb/ChangeLog:

	PR gdb/27059
	* eval.c (evaluate_subexp_for_sizeof): Handle not allocated and
	not associated arrays.
	* f-lang.c (fortran_adjust_dynamic_array_base_address_hack): Don't
	adjust arrays that are not allocated/associated.
	* gdbtypes.c (resolve_dynamic_range): Update header comment.  Add
	new parameter which is used to sometimes set dynamic properties to
	undefined.
	(resolve_dynamic_array_or_string): Update header comment.  Add new
	parameter which is used to guard evaluating dynamic properties.
	Resolve allocated/associated properties first.

gdb/testsuite/ChangeLog:

	PR gdb/27059
	* gdb.dwarf2/dyn-type-unallocated.c: New file.
	* gdb.dwarf2/dyn-type-unallocated.exp: New file.
2020-12-24 16:45:40 +00:00
Andrew Burgess
5ba3b20ec2 gdb: include allocated/associated properties in 'maint print type'
Adds the allocated and associated dynamic properties into the output
of the 'maintenance print type' command.

gdb/ChangeLog:

	* gdbtypes (recursive_dump_type): Include allocated and associated
	properties.
2020-12-24 16:45:39 +00:00
Lancelot SIX
f867677682 gdb/gdbtypes.h: Fix comparison of uninitialized values
When called with an array type of unknown dimensions,
is_scalar_type_recursive ended up comparing uninitialized values.

This was picked up by the following compiler warning:

  CXX    gdbtypes.o
/binutils-gdb/gdb/gdbtypes.c: In function int is_scalar_type_recursive(type*):
/binutils-gdb/gdb/gdbtypes.c:3670:38: warning: high_bound may be used uninitialized in this function [-Wmaybe-uninitialized]
 3670 |       return high_bound == low_bound && is_scalar_type_recursive (elt_type);
      | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/binutils-gdb/gdb/gdbtypes.c:3670:38: warning: low_bound may be used uninitialized in this function [-Wmaybe-uninitialized]

This patch makes sure that when dealing with an array of unknown size
(or an array of more than 1 element), is_scalar_type_recursive returns
false.

gdb/ChangeLog:

	* gdbtypes.c (is_scalar_type_recursive): Prevent comparison
	between uninitialized values.

Change-Id: Ifc005ced166aa7a065fef3e652977bae67625bf4
2020-12-24 11:02:55 -05:00
Alan Modra
99d8bab0c1 SHF_GNU_RETAIN 7a and 7b tests
* testsuite/ld-elf/retain7a.d: Don't run on hppa-linux.
	* testsuite/ld-elf/retain7b.d: Correct name.  Don't run on tic6x.
	Allow OSABI FreeBSD.
2020-12-24 22:58:14 +10:30
Alan Modra
dccc31dee3 asan: print_vms_time signed integer overflow
I really don't think anyone cares about underflow of vms time values,
but the potential segfault on a gmtime failure is worth fixing.

	* readelf.c (INT64_MIN): Define if not already defined.
	(print_vms_time): Catch 64-bit overflow when converting from
	vms time to posix time.  Don't segfault if gmtime returns NULL.
2020-12-24 22:58:14 +10:30
Alan Modra
de34d42812 PR27100, final link failed: bad value
The failure on this PR is due to using the same bfd section for
multiple output sections.  Commit 21401fc7bf managed to create
duplicate linker script output section statements, but not the actual
bfd sections.

	PR 27100
	* ldlang.h (lang_output_section_statement_type): Add dup_output.
	* ldlang.c (lang_output_section_statement_lookup): Set dup_output.
	(init_os): Test dup_output rather than constraint.
	* testsuite/ld-scripts/pr27100.d,
	* testsuite/ld-scripts/pr27100.s,
	* testsuite/ld-scripts/pr27100.t: New test.
	* testsuite/ld-scripts/data.exp: Run it.  Don't exclude aout here.
	* testsuite/ld-scripts/data.d: Do so here instead.
	* testsuite/ld-scripts/fill.d: Likewise.
	* testsuite/ld-scripts/fill16.d: Likewise.
2020-12-24 22:58:03 +10:30
GDB Administrator
62fa7b3c6a Automatic date update in version.in 2020-12-24 00:00:06 +00:00
Alex Bennée
f37059ea22 Clarify language for the '?' packet
Both QEMU and kgdb make the assumption that the '?' packet is only
sent during the initial setup of a gdbstub connection. Both use that
knowledge to reset breakpoints and ensure the gdbstub is in a
clean-state on a resumed connection. This can cause confusion for
others implementing clients that speak to gdbstub devices. To avoid
that make the language clearer that this is a start-up query packet
that you only expect to see once.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

gdb/doc/ChangeLog:

	* gdb.texinfo (Packets): Clarify language for ? packet.

Change-Id: Iae25d3110fe28b8d2467704962a6889e55224ca5
2020-12-23 16:36:48 -05:00
H.J. Lu
279d901e5a x86-64: Add Intel LAM property support
Add Intel Linear Address Masking (LAM) property support.  LAM modifies
the checking that is applied to 64-bit linear addresses, allowing
software to use of the untranslated address bits for metadata.

bfd/

	* elf-linker-x86.h (elf_x86_cet_report): Renamed to ...
	(elf_x86_prop_report): This.
	(elf_linker_x86_params): Add lam_u48, lam_u57, lam_u48_report
	and lam_u57_report.
	* elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Support
	GNU_PROPERTY_X86_FEATURE_1_LAM_U48 and
	GNU_PROPERTY_X86_FEATURE_1_LAM_U57.
	(_bfd_x86_elf_link_fixup_gnu_properties): Keep LAM features only
	for 64-bit output.

binutils/

	* NEWS: Mention LAM_U48 and LAM_U57 support.
	* elfedit.c (elf_x86_feature): Support lam_u48 and lam_u57.
	(usage): Add lam_u48 and lam_u57.
	* readelf.c (decode_x86_feature_1): Support LAM_U48 and LAM_U57.
	* doc/binutils.texi: Update elfedit with lam_u48 and lam_u57
	support.
	* testsuite/binutils-all/x86-64/lam-u48.d: New file.
	* testsuite/binutils-all/x86-64/lam-u48.s: Likewise.
	* testsuite/binutils-all/x86-64/lam-u57.d: Likewise.
	* testsuite/binutils-all/x86-64/lam-u57.s: Likewise.

include/

	* elf/common.h (GNU_PROPERTY_X86_FEATURE_1_LAM_U48): New.
	(GNU_PROPERTY_X86_FEATURE_1_LAM_U57): Likewise.

ld/

	* NEWS: Mention LAM_U48 and LAM_U57 support.
	* ld.texi: Document LAM_U48 and LAM_U57 support.
	* emulparams/cet.sh: Updated.
	* emulparams/elf_x86_64.sh: Source x86-64-lam.sh.
	* emulparams/x86-64-lam.sh: New file.
	* testsuite/ld-x86-64/property-x86-lam-u48-1a.d: Likewise.
	* testsuite/ld-x86-64/property-x86-lam-u48-1b.d: Likewise.
	* testsuite/ld-x86-64/property-x86-lam-u48-2.d: Likewise.
	* testsuite/ld-x86-64/property-x86-lam-u48-3a.d: Likewise.
	* testsuite/ld-x86-64/property-x86-lam-u48-3b.d: Likewise.
	* testsuite/ld-x86-64/property-x86-lam-u48-4.d: Likewise.
	* testsuite/ld-x86-64/property-x86-lam-u48-5.d: Likewise.
	* testsuite/ld-x86-64/property-x86-lam-u48.s: Likewise.
	* testsuite/ld-x86-64/property-x86-lam-u57-1a.d: Likewise.
	* testsuite/ld-x86-64/property-x86-lam-u57-1b.d: Likewise.
	* testsuite/ld-x86-64/property-x86-lam-u57-2.d: Likewise.
	* testsuite/ld-x86-64/property-x86-lam-u57-3a.d: Likewise.
	* testsuite/ld-x86-64/property-x86-lam-u57-3b.d: Likewise.
	* testsuite/ld-x86-64/property-x86-lam-u57-4.d: Likewise.
	* testsuite/ld-x86-64/property-x86-lam-u57-5.d: Likewise.
	* testsuite/ld-x86-64/property-x86-lam-u57.s: Likewise.
	* testsuite/ld-x86-64/x86-64.exp: Run LAM tests.
2020-12-23 13:00:55 -08:00
Andrew Burgess
5cc0917c38 gdb: remove some uses of LA_PRINT_STRING
This commit removes some, but not all, uses of LA_PRINT_STRING.  In
this commit I've removed those uses where there is an obvious language
object on which I can instead call the printstr method.

In the remaining 3 uses it is harder to know if the correct thing is
to call printstr on the current language, or on a specific language.
Currently obviously, we always call on the current language (as that's
what LA_PRINT_STRING does), and clearly this behaviour is good enough
right now, but is it "right"?  I've left them for now and will give
them more thought in the future.

gdb/ChangeLog:

	* expprint.c (print_subexp_standard): Replace uses of
	LA_PRINT_STRING.
	* f-valprint.c (f_language::value_print_inner): Likewise.
	* guile/scm-pretty-print.c (ppscm_print_string_repr): Likewise.
	* p-valprint.c (pascal_language::value_print_inner): Likewise.
	* python/py-prettyprint.c (print_string_repr): Likewise.
2020-12-23 20:53:14 +00:00
Andrew Burgess
1c4852651c gdb: move rust_language into rust-lang.h
Move the rust_language class declaration into the rust-lang.h header
file.  This allows for the function implementations called directly in
rust-lang.c and rust-exp.y without the need for trampoline functions.

There should be no user visible changes after this commit.

gdb/ChangeLog:

	* rust-exp.y (rust_parse): Rename to...
	(rust_language::parser): ...this.
	* rust-lang.c (-rust_printstr): Rename to...
	(rust_language::printstr): ...this.
	(rust_value_print_inner): Delete declaration.
	(val_print_struct): Rename to...
	(rust_language::val_print_struct): ...this.  Update calls to
	member functions.
	(rust_print_enum): Rename to...
	(rust_language::print_enum): ...this.  Update calls to member
	functions.
	(rust_value_print_inner): Rename to...
	(rust_language::value_print_inner): ...this.  Update calls to
	member functions.
	(exp_descriptor_rust): Rename to...
	(rust_language::exp_descriptor_tab): ...this.
	(class rust_language): Move to rust-lang.h.
	(rust_language::language_arch_info): Implementation moved to here
	from class declaration.
	(rust_language::print_type): Likewise.
	(rust_language::emitchar): Likewise.
	(rust_language::is_string_type_p): Likewise.
	* rust-lang.h: Add 'demangle.h', 'language.h', 'value.h', and
	'c-lang.h' includes.
	(rust_parse): Delete declaration.
	(class rust_language): Class declaration moved here from
	rust-lang.c.
2020-12-23 20:53:14 +00:00