• R/O
  • HTTP
  • SSH
  • HTTPS

List of commits

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


All branches
RSS
Rev. Hora Autor
fbf42f4 2020-06-24 06:17:19 Andrew Burgess

gdb: Print compatible information within print_xml_feature

The gdbsupport directory contains a helper class print_xml_feature
that is shared between gdb and gdbserver. This class is used for
printing an XML representation of a target_desc object.

Currently this class doesn't have the ability to print the
<compatible> entities that can appear within a target description, I
guess no targets have needed that functionality yet.

The print_xml_feature classes API is based around operating on the
target_desc class, however, the sharing between gdb and gdbserver is
purely textural, we rely on their being a class called target_desc in
both gdb and gdbserver, but there is no shared implementation. We
then have a set of functions declared that operate on an object of
type target_desc, and again these functions have completely separate
implementations.

Currently then the gdb version of target_desc contains a vector of
bfd_arch_info pointers which represents the compatible entries from a
target description. The gdbserver version of target_desc has no such
information. Further, the gdbserver code doesn't seem to include the
bfd headers, and so doesn't know about the bfd types.

I was reluctant to include the bfd headers into gdbserver just so I
can reference the compatible information, which isn't (currently) even
needed in gdbserver.

So, the approach I take in this patch is to wrap the compatible
information into a new helper class. This class is declared in the
gdbsupport library, but implemented separately in both gdb and
gdbserver.

In gdbserver the class is empty. The compatible information within
the gdbserver is an empty list, of empty classes.

In gdb the class contains a pointer to the bfd_arch_info object.

With this in place we can now add support to print_xml_feature for
printing the compatible information if it is present. In the
gdbserver code this will never happen, as the gdbserver never has any
compatible information. But in gdb, this code will trigger when
appropriate.

gdb/ChangeLog:

* target-descriptions.c (class tdesc_compatible_info): New class.
(struct target_desc): Change type of compatible vector.
(tdesc_compatible_p): Update for change in type of
target_desc::compatible.
(tdesc_compatible_info_list): New function.
(tdesc_compatible_info_arch_name): New function.
(tdesc_add_compatible): Update for change in type of
target_desc::compatible.
(print_c_tdesc::visit_pre): Likewise.

gdbserver/ChangeLog:

* tdesc.cc (struct tdesc_compatible_info): New struct.
(tdesc_compatible_info_list): New function.
(tdesc_compatible_info_arch_name): New function.

gdbsupport/ChangeLog:

* tdesc.cc (print_xml_feature::visit_pre): Print compatible
information.
* tdesc.h (struct tdesc_compatible_info): Declare new struct.
(tdesc_compatible_info_up): New typedef.
(tdesc_compatible_info_list): Declare new function.
(tdesc_compatible_info_arch_name): Declare new function.

20821f4 2020-06-24 06:17:18 Andrew Burgess

gdb: Allow target description to be dumped even when it is remote

The maintenance command 'maintenance print c-tdesc' can only print the
target description if it was loaded from a local file, or if the local
filename is passed to the maintenance command as an argument.

Sometimes it would be nice to know what target description GDB was
given by the remote, however, if I connect to a remote target and try
this command I see this:

(gdb) maintenance print c-tdesc
The current target description did not come from an XML file.
(gdb)

Which is not very helpful.

This commit changes things so that if the description came from the
remote end then GDB will use a fake filename 'fetched from target' as
the filename for the description, GDB will then create the C
description of the target as though it came from this file. Example
output would look like this (I snipped the feature creation from the
middle as that hasn't changed):

(gdb) maintenance print c-tdesc
/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
Original: fetched from target */

#include "defs.h"
#include "osabi.h"
#include "target-descriptions.h"

struct target_desc *tdesc_fetched_from_target;
static void
initialize_tdesc_fetched_from_target (void)
{
struct target_desc *result = allocate_target_description ();
struct tdesc_feature *feature;

/* ... features created here ... */

tdesc_fetched_from_target = result;
}
(gdb)

In order to support using 'fetched from target' I had to update the
print_c_tdesc code to handle filenames that include a space. This has
the benefit that we can now print out real files with spaces in the
name, for example the file 'with space.xml':

(gdb) maint print c-tdesc with space.xml

I originally added this functionality so I could inspect the
description passed to GDB by the remote target. After using this for
a while I realised that actually having GDB recreate the XML would be
even better, so a later commit will add that functionality too.

Still, given how small this patch is I thought it might be nice to
include this in GDB anyway.

While I was working on this anyway I've added filename command
completion to this command.

gdb/ChangeLog:

* target-descriptions.c (print_c_tdesc::print_c_tdesc): Change
whitespace to underscore.
(maint_print_c_tdesc_cmd): Use fake filename for target
descriptions that came from the target.
(_initialize_target_descriptions): Add filename command completion
for 'maint print c-tdesc'.

1fb5ee6 2020-06-24 04:40:24 Simon Marchi

gdb: add some more empty lines in loc.c

Add some empty lines at places I forgot in the previous patch.

gdb/ChangeLog:

* dwarf2/loc.c (decode_debug_loclists_addresses): Add empty
lines.

Change-Id: I8a9f3766ede1ce750e0703023285dca873bce0da

fc3ecb3 2020-06-24 04:34:45 Simon Marchi

gdb: add empty lines in loc.c

I always found that some switch statements in this file were a bit too
packed. I think having empty lines between each case helps with
reading. I'm pushing this as obvious, I hope it won't be too
controversial.

gdb/ChangeLog:

* dwarf2/loc.c (decode_debug_loc_dwo_addresses): Add empty
lines.
(dwarf2_find_location_expression): Likewise.
(call_site_parameter_matches): Likewise.
(dwarf2_compile_expr_to_ax): Likewise.
(disassemble_dwarf_expression): Likewise.
(loclist_describe_location): Likewise.

Change-Id: I381366a0468ff1793faa612c46ef48a9d4773192

f37b21b 2020-06-24 04:01:24 Roland McGrath

PR 22843: ld, gold: Add --dependency-file option.

gold/
* options.h (class General_options): Add --dependency-file option.
* fileread.cc (File_read::files_read): New static variable.
(File_read::open): Add the file to the files_read list.
(File_read::record_file_read): New static member function.
(File_read::write_dependency_file): New static member function.
* fileread.h (class File_read): Declare them.
* layout.cc (Layout::read_layout_from_file): Call record_file_read.
(Close_task_runner::run): Call write_dependency_file if
--dependency-file was passed.

ld/
* NEWS: Note --dependency-file.
* ld.texi (Options): Document --dependency-file.
* ldlex.h (enum option_values): Add OPTION_DEPENDENCY_FILE.
* ld.h (ld_config_type): New member dependency_file.
* lexsup.c (ld_options, parse_args): Parse --dependency-file.
* ldmain.c (struct dependency_file): New type.
(dependency_files, dependency_files_tail): New static variables.
(track_dependency_files): New function.
(write_dependency_file): New function.
(main): Call it when --dependency-file was passed.
* ldfile.c (ldfile_try_open_bfd): Call track_dependency_files.
(ldfile_open_command_file_1): Likewise.
* ldelf.c (ldelf_try_needed): Likewise.
* pe-dll.c (pe_implied_import_dll): Likewise.

236ef03 2020-06-24 02:57:03 Pedro Alves

Fix "maint selftest" regression, add struct scoped_mock_context

This commit:

commit 3922b302645fda04da42a5279399578ae2f6206c
Author: Pedro Alves <palves@redhat.com>
AuthorDate: Thu Jun 18 21:28:37 2020 +0100

Decouple inferior_ptid/inferior_thread(); dup ptids in thread list (PR 25412)

caused a regression for gdb.gdb/unittest.exp when GDB is configured
with --enable-targets=all. The failure is:

gdb/thread.c:95: internal-error: thread_info* inferior_thread(): Assertion `current_thread_ != nullptr' failed.

The problem is in this line in regcache.c:cooked_read_test:

/* Switch to the mock thread. */
scoped_restore restore_inferior_ptid
= make_scoped_restore (&inferior_ptid, mock_ptid);

Both gdbarch-selftest.c and regcache.c set up a similar mock context,
but the series the patch above belongs to only updated the
gdbarch-selftest.c context to not write to inferior_ptid directly, and
missed updating regcache.c's.

Instead of copying the fix over to regcache.c, share the mock context
setup code in a new RAII class, based on gdbarch-selftest.c's version.

Also remove the "target already pushed" error from regcache.c, like it
had been removed from gdbarch-selftest.c in the multi-target series.
That check is unnecessary because each inferior now has its own target
stack, and the unit test pushes a target on a separate (mock)
inferior, not the current inferior on entry.

gdb/ChangeLog:
2020-06-23 Pedro Alves <palves@redhat.com>

* gdbarch-selftests.c: Don't include inferior.h, gdbthread.h or
progspace-and-thread.h. Include scoped-mock-context.h instead.
(register_to_value_test): Use scoped_mock_context.
* regcache.c: Include "scoped-mock-context.h".
(cooked_read_test): Don't error out if a target is already pushed.
Use scoped_mock_context. Adjust.
* scoped-mock-context.h: New file.

bb8d126 2020-06-24 01:33:31 Sandra Loosemore

Adjust command completion output when TUI is disabled

The history-scrolling commands "+", "-", "<" and ">" are only known to
GDB when TUI is enabled. This means the "complete pipe " command
produces different output depending on whether TUI is present, which
in turn caused

FAIL: gdb.base/shell.exp: cmd complete "pipe "

This patch provides different patterns for that test depending on
whether or not TUI is available.

2020-06-23 Sandra Loosemore <sandra@codesourcery.com>

gdb/testsuite/
* lib/completion-support.exp (test_gdb_completion_offers_commands):
Adjust for omitted commands when TUI is disabled.

d0dded5 2020-06-24 01:20:28 H.J. Lu

Add a testcase for PR binutils/26160

PR binutils/26160
* testsuite/binutils-all/pr26160.dwp.bz2: New file.
* testsuite/binutils-all/pr26160.r: Likewise.
* testsuite/binutils-all/readelf.exp: Run PR binutils/26160 test.

9221725 2020-06-24 00:20:48 Alan Modra

PR26150, Assertion when asm() defines global symbols, -flto and --start-group

If an archive map contains symbols that aren't actually defined by the
indexed element for any reason, then loading that element will leave
the symbol undefined (or common). This leads to the possibility of
the element being loaded again should the archive be searched again
due to the action of --start-group/--end-group. The testcase
triggering this problem was an archive containing fat lto objects,
with the archive map incorrectly created by ar rather than gcc-ar.

PR 26150
* ldlang.c (ldlang_add_file): Assert that we aren't adding the
current end of link.next list again too.
* ldmain.c (add_archive_element): Don't load archive elements
again that have already been loaded.

39f381c 2020-06-24 00:06:38 Nick Clifton

Fix decoding of indexed DWARF strings using pre-DWARF-5 string offset sections. Fix display of .debug_str_offsets.dwo sections.

PR 26160
* dwarf.c (fetch_indexed_string): Detect and handle old style
.debug_str_offset tables.
(display_debug_str_offsets): Likewise. Also add support for
.debug_str_offsets.dwo sections.

7e4b9c4 2020-06-23 23:11:27 Gary Benson

Improve -Wunused-value testcase build failures fix

This commit improves upon my previous -Wunused-value fix by
replacing the various dummy variables with casts to void, as
suggested by Pedro.

gdb/testsuite/ChangeLog:

* gdb.cp/namespace.cc: Improve -Wunused-value fix.
* gdb.cp/nsimport.cc: Likewise.
* gdb.cp/nsnested.cc: Likewise.
* gdb.cp/nsnoimports.cc: Likewise.
* gdb.cp/nsusing.cc: Likewise.
* gdb.cp/smartp.cc: Likewise.
* gdb.python/py-pp-integral.c: Likewise.
* gdb.python/py-pp-re-notag.c: Likewise.

80fda85 2020-06-23 22:52:41 H.J. Lu

Add a testcase for PR binutils/26112

PR binutils/26112
* testsuite/binutils-all/pr26112.o.bz2: New file.
* testsuite/binutils-all/pr26112.r: Likewise.
* testsuite/binutils-all/readelf.exp: Run PR binutils/26112 test.

39e7ecc 2020-06-23 21:34:11 Andrew Burgess

gdb: Convert language la_is_string_type_p field to a method

This commit changes the language_data::la_is_string_type_p function
pointer member variable into a member function of language_defn.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* ada-lang.c (ada_language_data): Delete la_is_string_type_p
initializer.
(ada_language::is_string_type_p): New member function.
* c-lang.c (c_language_data): Delete la_is_string_type_p
initializer.
(cplus_language_data): Likewise.
(asm_language_data): Likewise.
(minimal_language_data): Likewise.
* d-lang.c (d_language_data): Likewise.
* f-lang.c (f_is_string_type_p): Delete function, implementation
moved to f_language::is_string_type_p.
(f_language_data): Delete la_is_string_type_p initializer.
(f_language::is_string_type_p): New member function,
implementation from f_is_string_type_p.
* go-lang.c (go_is_string_type_p): Delete function, implementation
moved to go_language::is_string_type_p.
(go_language_data): Delete la_is_string_type_p initializer.
(go_language::is_string_type_p): New member function,
implementation from go_is_string_type_p.
* language.c (language_defn::is_string_type_p): Define new member
function.
(default_is_string_type_p): Make static, add comment copied from
header file.
(unknown_language_data): Delete la_is_string_type_p initializer.
(unknown_language::is_string_type_p): New member function.
(auto_language_data): Delete la_is_string_type_p initializer.
(auto_language::is_string_type_p): New member function.
* language.h (language_data): Delete la_is_string_type_p field.
(language_defn::is_string_type_p): Declare new function.
(default_is_string_type_p): Delete desclaration, move comment to
definition.
* m2-lang.c (m2_is_string_type_p): Delete function, implementation
moved to m2_language::is_string_type_p.
(m2_language_data): Delete la_is_string_type_p initializer.
(m2_language::is_string_type_p): New member function,
implementation from m2_is_string_type_p.
* objc-lang.c (objc_language_data): Delete la_is_string_type_p
initializer.
* opencl-lang.c (opencl_language_data): Likewise.
* p-lang.c (pascal_is_string_type_p): Delete function,
implementation moved to pascal_language::is_string_type_p.
(pascal_language_data): Delete la_is_string_type_p initializer.
(pascal_language::is_string_type_p): New member function,
implementation from pascal_is_string_type_p.
* rust-lang.c (rust_is_string_type_p): Delete function,
implementation moved to rust_language::is_string_type_p.
(rust_language_data): Delete la_is_string_type_p initializer.
(rust_language::is_string_type_p): New member function,
implementation from rust_is_string_type_p.
* valprint.c (val_print_scalar_or_string_type_p): Update call to
is_string_type_p.

4ffc13f 2020-06-23 21:34:11 Andrew Burgess

gdb: Convert language la_print_typedef field to a method

This commit changes the language_data::la_print_typedef function
pointer member variable into a member function of language_defn.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* ada-lang.c (ada_language_data): Delete la_print_typedef
initializer.
(ada_language::print_typedef): New member function.
* c-lang.c (c_language_data): Delete la_print_typedef initializer.
(cplus_language_data): Likewise.
(asm_language_data): Likewise.
(minimal_language_data): Likewise.
* d-lang.c (d_language_data): Likewise.
* f-lang.c (f_language_data): Likewise.
(f_language::print_typedef): New member function.
* go-lang.c (go_language_data): Delete la_print_typedef
initializer.
* language.c (language_defn::print_typedef): Define member
function.
(unknown_language_data): Delete la_print_typedef initializer.
(unknown_language::print_typedef): New member function.
(auto_language_data): Delete la_print_typedef initializer.
(auto_language::print_typedef): New member function.
* language.h (language_data): Delete la_print_typedef field.
(language_defn::print_typedef): Declare new member function.
(LA_PRINT_TYPEDEF): Update call to print_typedef.
(default_print_typedef): Delete declaration.
* m2-lang.c (m2_language_data): Delete la_print_typedef
initializer.
(m2_language::print_typedef): New member function.
* objc-lang.c (objc_language_data): Delete la_print_typedef
initializer.
* opencl-lang.c (opencl_language_data): Likewise.
* p-lang.c (pascal_language_data): Likewise.
(pascal_language::print_typedef): New member function.
* rust-lang.c (rust_print_typedef): Delete function,
implementation moved to rust_language::print_typedef.
(rust_language): Delete la_print_typedef initializer.
(rust_language::print_typedef): New member function,
implementation from rust_print_typedef.
* typeprint.c (default_print_typedef): Delete.

d711ee6 2020-06-23 21:34:11 Andrew Burgess

gdb: Convert language la_printstr field to a method

This commit changes the language_data::la_printstr function pointer
member variable into a member function of language_defn.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* ada-lang.c (ada_language_data): Delete la_printstr initializer.
(ada_language::printstr): New member function.
* c-lang.c (c_language_data): Delete la_printstr initializer.
(cplus_language_data): Likewise.
(asm_language_data): Likewise.
(minimal_language_data): Likewise.
* d-lang.c (d_language_data): Likewise.
* f-lang.c (f_printstr): Rename to f_language::printstr.
(f_language_data): Delete la_printstr initializer.
(f_language::printstr): New member function, implementation from
f_printstr.
* go-lang.c (go_language_data): Delete la_printstr initializer.
* language.c (language_defn::printstr): Define new member
function.
(unk_lang_printstr): Delete.
(unknown_language_data): Delete la_printstr initializer.
(unknown_language::printstr): New member function.
(auto_language_data): Delete la_printstr initializer.
(auto_language::printstr): New member function.
* language.h (language_data): Delete la_printstr field.
(language_defn::printstr): Declare new member function.
(LA_PRINT_STRING): Update call to printstr.
* m2-lang.c (m2_printstr): Rename to m2_language::printstr.
(m2_language_data): Delete la_printstr initializer.
(m2_language::printstr): New member function, implementation from
m2_printstr.
* objc-lang.c (objc_language_data): Delete la_printstr
initializer.
* opencl-lang.c (opencl_language_data): Likewise.
* p-lang.c (pascal_printstr): Rename to pascal_language::printstr.
(pascal_language_data): Delete la_printstr initializer.
(pascal_language::printstr): New member function, implementation
from pascal_printstr.
* p-lang.h (pascal_printstr): Delete declaration.
* rust-lang.c (rust_printstr): Update header comment.
(rust_language_data): Delete la_printstr initializer.
(rust_language::printstr): New member function.

52b50f2 2020-06-23 21:34:11 Andrew Burgess

gdb: Convert language la_printchar field to a method

This commit changes the language_data::la_printchar function pointer
member variable into a member function of language_defn.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* ada-lang.c (ada_language_data): Delete la_printchar initializer.
(ada_language::printchar): New member function.
* c-lang.c (c_language_data): Delete la_printchar initializer.
(cplus_language_data): Likewise.
(asm_language_data): Likewise.
(minimal_language_data): Likewise.
* d-lang.c (d_language_data): Likewise.
* f-lang.c (f_printchar): Rename to f_language::printchar.
(f_language_data): Delete la_printchar initializer.
(f_language::printchar): New member function, implementation from
f_printchar.
* go-lang.c (go_language_data): Delete la_printchar initializer.
* language.c (unk_lang_printchar): Delete.
(language_defn::printchar): Define new member function.
(unknown_language_data): Delete la_printchar initializer.
(unknown_language::printchar): New member function.
(auto_language_data): Delete la_printchar initializer.
(auto_language::printchar): New member function.
* language.h (language_data): Delete la_printchar field.
(language_defn::printchar): Declare new member function.
(LA_PRINT_CHAR): Update call to printchar.
* m2-lang.c (m2_language_data): Delete la_printchar initializer.
(m2_language::printchar): New member function.
* objc-lang.c (objc_language_data): Delete la_printchar
initializer.
* opencl-lang.c (opencl_language_data): Likewise.
* p-lang.c (pascal_language_data): Delete la_printchar
initializer.
(pascal_language::printchar): New member function.
* rust-lang.c (rust_printchar): Rename to
rust_language::printchar.
(rust_language_data): Delete la_printchar initializer.
(rust_language::printchar): New member function, implementation
from rust_printchar.

ec8cec5 2020-06-23 21:34:11 Andrew Burgess

gdb: Convert language la_emitchar field to a method

This commit changes the language_data::la_emitchar function pointer
member variable into a member function of language_defn.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* ada-lang.c (emit_char): Renamed to ada_language::emitchar.
(ada_language_data): Delete la_emitchar initializer.
(ada_language::emitchar): New member function, implementation from
emit_char.
* c-lang.c (c_language_data): Delete la_emitchar initializer.
(cplus_language_data): Likewise.
(asm_language_data): Likewise.
(minimal_language_data): Likewise.
* d-lang.c (d_language_data): Likewise.
* f-lang.c (f_emit_char): Rename to f_language::emitchar.
(f_language_data): Delete la_emitchar initializer.
(f_language::emitchar): New member function, implementation from
f_emit_char.
* go-lang.c (go_language_data): Delete la_emitchar initializer.
* language.c (unk_lang_emit_char): Delete.
(language_defn::emitchar): New member function definition.
(unknown_language_data): Delete la_emitchar initializer.
(unknown_language::emitchar): New member function.
(auto_language_data): Delete la_emitchar initializer.
(auto_language::emitchar): New member function.
* language.h (language_data): Delete la_emitchar field.
(language_defn::emitchar): New member field declaration.
(LA_EMIT_CHAR): Update call to emitchar.
* m2-lang.c (m2_emit_char): Rename to m2_language::emitchar.
(m2_language_data): Delete la_emitchar initializer.
(m2_language::emitchar): New member function, implementation from
m2_emit_char.
* objc-lang.c (objc_language_data): Delete la_emitchar
initializer.
* opencl-lang.c (opencl_language_data): Likewise.
* p-lang.c (pascal_emit_char): Rename to pascal_language::emitchar.
(pascal_language_data): Delete la_emitchar initializer.
(pascal_language::emitchar): New member function, implementation
from pascal_emit_char.
* rust-lang.c (rust_emitchar): Rename to rust_language::emitchar.
(rust_language_data): Delete la_emitchar initializer.
(rust_language::emitchar): New member function, implementation
from rust_emitchar.

1bf9c36 2020-06-23 21:34:11 Andrew Burgess

gdb: Convert language la_post_parser field to a method

This commit changes the language_data::la_post_parser function pointer
member variable into a member function of language_defn.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* ada-lang.c (resolve): Rename to ada_language::post_parser.
(ada_language_data): Delete la_post_parser initializer.
(ada_language::post_parser): New member function.
* c-lang.c (c_language_data): Delete la_post_parser initializer.
(cplus_language_data): Likewise.
(asm_language_data): Likewise.
(minimal_language_data): Likewise.
* d-lang.c (d_language_data): Likewise.
* f-lang.c (f_language_data): Likewise.
* go-lang.c (go_language_data): Likewise.
* language.c (unknown_language_data): Likewise.
(auto_language_data): Likewise.
* language.h (language_data): Delete la_post_parser field.
(language_defn::post_parser): New member function.
* m2-lang.c (m2_language_data): Delete la_post_parser initializer.
* objc-lang.c (objc_language_data): Likewise.
* opencl-lang.c (opencl_language_data): Likewise.
* p-lang.c (pascal_language_data): Likewise.
* parse.c (parse_exp_in_context): Update call to post_parser.
(null_post_parser): Delete definition.
* parser-defs.h (null_post_parser): Delete declaration.
* rust-lang.c (rust_language_data): Delete la_post_parser
initializer.

87afa65 2020-06-23 21:34:10 Andrew Burgess

gdb: Convert language la_parser field to a method

This commit changes the language_data::la_parser function pointer
member variable into a member function of language_defn.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* ada-lang.c (parse): Rename to ada_language::parser.
(ada_language_data): Delete la_parser initializer.
(ada_language::parser): New member function, implementation from
parse.
* c-lang.c (c_language_data): Delete la_parser initializer.
(cplus_language_data): Likewise.
(asm_language_data): Likewise.
(minimal_language_data): Likewise.
* d-lang.c (d_language_data): Likewise.
(d_language::parser): New member function.
* f-lang.c (f_language_data): Delete la_parser initializer.
(f_language::parser): New member function.
* go-lang.c (go_language_data): Delete la_parser initializer.
(go_language::parser): New member function.
* language.c (unk_lang_parser): Delete.
(language_defn::parser): Define new member function.
(unknown_language_data): Delete la_parser initializer.
(unknown_language::parser): New member function.
(auto_language_data): Delete la_parser initializer.
(auto_language::parser): New member function.
* language.h (language_data): Delete la_parser field.
(language_defn::parser): Declare new member function.
* m2-lang.c (m2_language_data): Delete la_parser initializer.
(m2_language::parser): New member function.
* objc-lang.c (objc_language_data): Delete la_parser initializer.
* opencl-lang.c (opencl_language_data): Likewise.
* p-lang.c (pascal_language_data): Likewise.
(pascal_language::parser): New member function.
* parse.c (parse_exp_in_context): Update call to parser.
* rust-lang.c (rust_language_data): Delete la_parser initializer.
(rust_language::parser): New member function.

3084d7a 2020-06-23 21:07:45 H.J. Lu

ELF: Add _bfd_elf_add_dynamic_tags

All ELF backends with shared library support need to add dynamic tags.
Add dt_pltgot_required and dt_jmprel_required to elf_link_hash_table to
indicate that DT_PLTGOT and DT_JMPREL are required dynamic tags.

1. Add _bfd_elf_add_dynamic_tags to add common dynamic tags.
2. Add _bfd_elf_maybe_vxworks_add_dynamic_tags to add common VxWorks
dynamic tags.

* elf-bfd.h (elf_link_hash_table): Add dt_pltgot_required and
dt_jmprel_required.
(_bfd_elf_add_dynamic_tags): New.
* elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Call
_bfd_elf_add_dynamic_tags.
* elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
* elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
* elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
* elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
* elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
* elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
* elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
* elf32-microblaze.c (microblaze_elf_size_dynamic_sections):
Likewise.
* elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
* elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
* elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
* elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
* elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
* elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
* elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
* elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections):
Likewise.
* elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise.
* elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
* elf32-arm.c (elf32_arm_size_dynamic_sections): Call
_bfd_elf_maybe_vxworks_add_dynamic_tags.
* elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections):
Likewise.
* elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
(_bfd_x86_elf_size_dynamic_sections): Likewise.
* elfxx-x86.h (elf_x86_link_hash_table): Remove dt_reloc,
dt_reloc_sz and dt_reloc_ent.
* elf-vxworks.c (_bfd_elf_maybe_vxworks_add_dynamic_tags): New.
* elf-vxworks.h (_bfd_elf_maybe_vxworks_add_dynamic_tags):
Likewise.
* elf32-hppa.c (elf32_hppa_link_hash_table_create): Set
etab.dt_pltgot_required.
(elf32_hppa_size_dynamic_sections): Call
_bfd_elf_add_dynamic_tags.
* elf32-metag.c (elf_metag_link_hash_table_create): Set
etab.dt_pltgot_required.
(elf_metag_size_dynamic_sections): Call _bfd_elf_add_dynamic_tags.
* elf32-sh.c (sh_elf_link_hash_table_create): Set
root.dt_pltgot_required for FDPIC output.
(sh_elf_size_dynamic_sections): Call
_bfd_elf_maybe_vxworks_add_dynamic_tags.
* elf32-xtensa.c (elf_xtensa_link_hash_table_create): Set
elf.dt_pltgot_required.
(elf_xtensa_size_dynamic_sections): Call
_bfd_elf_add_dynamic_tags.
* elf64-hppa.c (elf64_hppa_hash_table_create): Set
root.dt_pltgot_required.
(elf64_hppa_size_dynamic_sections): Call
_bfd_elf_add_dynamic_tags.
* elfnn-ia64.c (elfNN_ia64_hash_table_create): Set
root.dt_pltgot_required.
(elfNN_ia64_size_dynamic_sections): Set root.dt_jmprel_required
for rel_pltoff_sec. Call _bfd_elf_add_dynamic_tags.
* elflink.c (_bfd_elf_add_dynamic_tags): New.

2e573c0 2020-06-23 20:25:34 Gary Benson

Avoid testcase build failures with -Wunused-value

A number of testcases fail to build with -Wunused-value enabled.
This commit adds dummy values to avoid this.

gdb/testsuite/ChangeLog:

* gdb.cp/namespace.cc: Avoid build failure with -Wunused-value.
* gdb.cp/nsimport.cc: Likewise.
* gdb.cp/nsnested.cc: Likewise.
* gdb.cp/nsnoimports.cc: Likewise.
* gdb.cp/nsusing.cc: Likewise.
* gdb.cp/smartp.cc: Likewise.
* gdb.python/py-pp-integral.c: Likewise.
* gdb.python/py-pp-re-notag.c: Likewise.

3782580 2020-06-23 18:06:20 Andrew Burgess

gdb: Add --with-python-libdir to gdb's --configuration output

Commit:

commit d13c7322fe1266984024644154003a19664610ea
Date: Fri Jan 17 00:10:22 2020 +0000

gdb: Allow more control over where to find python libraries

Added a new configuration option --with-python-libdir, but failed to
add this option to the output of 'gdb --configuration'. This commit
fixes this mistake.

gdb/ChangeLog:

* top.c (print_gdb_configuration): Print --with-python-libdir
configuration value.

1a79004 2020-06-23 10:38:12 Nelson Chu

RISC-V: Generate ELF priv attributes if priv instruction are explicited used.

We should generate the ELF priv attributes only if,

1. The priv attributes are already set in the assembly file.
2. The CSR are explicited used.
3. The privileged instruction are explicited used.

* There are four privileged instruction defined in the v1.11 priv spec:
`mret`, `sret`, `wfi` and `sfence.vma`.

* `sfence.vm` is dropped in the v1.10 priv spec.

* `uret` is actually a N-ext instruction. So it is better to regard it as
an user instruction rather than the priv instruction.

* `hret` is used to return from traps in H-mode. H-mode is removed since
the v1.10 priv spec, but probably be added in the new hypervisor spec.
Therefore, `hret` should be controlled by the hypervisor spec rather than
priv spec in the future.

* `dret` is a debug instruction. We should record the debug spec versions
once it is explicited used in the future.

gas/
* config/tc-riscv.c (explicit_priv_attr): Rename explicit_csr to
explicit_priv_attr. It used to indicate CSR or priv instructions are
explictly used.
(riscv_is_priv_insn): Return True if it is a privileged instruction.
(riscv_ip): Call riscv_is_priv_insn to check whether the instruction
is privileged or not. If it is, then set explicit_priv_attr to TRUE.
(riscv_write_out_attrs): Clarification of when to generate the elf
priv spec attributes.

* testsuite/gas/riscv/attribute-11.s: Add comments.
* testsuite/gas/riscv/attribute-14.s: New testcase. Use symbol
`priv_insn_<n>` to decide which priv instruction is expected to used.
(<n> is a to g.)
* testsuite/gas/riscv/attribute-14a.d: Likewise.
* testsuite/gas/riscv/attribute-14b.d: Likewise.
* testsuite/gas/riscv/attribute-14c.d: Likewise.
* testsuite/gas/riscv/attribute-14d.d: Likewise.
* testsuite/gas/riscv/attribute-14e.d: Likewise.

c7c970e 2020-06-23 10:33:34 Alan Modra

Correct bfin XPASSes

bfin-elf and bfin-linux differ. This patch fixes these:
bfin-linux-uclibc -XPASS: PR ld/14170
bfin-linux-uclibc -XPASS: pr17068 link --as-needed lib in group
bfin-linux-uclibc -XPASS: -Bsymbolic-functions
bfin-linux-uclibc -XPASS: pr22374 function pointer initialization

* testsuite/ld-elf/shared.exp (pr14170): Clear xfail for
bfin-*-linux*.
(pr17068, symbolic-func.so, pr22374): Likewise.

d081fff 2020-06-23 10:32:56 Alan Modra

binutils objdump.exp remote_file typo

* testsuite/binutils-all/objdump.exp (bintest.a): Correct
remote_file delete command.

7189404 2020-06-23 09:00:39 GDB Administrator

Automatic date update in version.in

0c32f42 2020-06-23 09:00:25 GDB Administrator

Automatic date update in version.in

46dfcab 2020-06-23 09:00:06 GDB Administrator

Automatic date update in version.in

5b860c9 2020-06-23 04:16:25 Philippe Waroquiers

NEWS and documentation for alias default-args related concept and commands.

gdb/ChangeLog
2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>

* NEWS: Mention change to the alias command.

gdb/doc/ChangeLog
2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>

* gdb.texinfo (Command aliases default args): New node documenting
how to use default args for a command using aliases.
(Aliases): Document the new 'DEFAULT-ARGS...' option.
(Help): Update help aliases text and describe when full alias
definition is provided.

746ebfe 2020-06-23 04:15:14 Philippe Waroquiers

Add tests for new alias default-args related commands and arguments.

Test the new default-args behaviour and completion for the alias command.
Note that gdb.base/default-args.exp is somewhat copied from
with.exp (the test of the with command), while default-exp.c
is a plain copy of with.c.

gdb/testsuite/ChangeLog
2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>

* gdb.base/default-args.exp: New test.
* gdb.base/default-args.c: New file.
* gdb.base/alias.exp: Update expected error msg for alias foo=bar.
* gdb.base/default.exp: Update to new help text.
* gdb.base/help.exp: Likewise.
* gdb.base/page.exp: Likewise.
* gdb.base/style.exp: Likewise.
* gdb.guile/guile.exp: Likewise.
* gdb.python/python.exp: Likewise.