find_and_open_source casts away const, but hasn't needed to in a
while. This removes the cast and a strangely hostile comment.
gdb/ChangeLog
2019-05-17 Tom Tromey <tromey@adacore.com>
* source.c (find_and_open_source): Remove cast.
I noticed that annotate_source takes a "char *", but really should
take a "const char *". This patch fixes this.
gdb/ChangeLog
2019-05-17 Tom Tromey <tromey@adacore.com>
* annotate.c (annotate_source): Make "filename" const.
* annotate.h (annotate_source): Use const.
TRANSCRIPT is superseeded by the .in, .cmd and .debug files, and
can be removed.
gdb/testsuite/ChangeLog
* README (Running the Testsuite): Change example.
(Testsuite Parameters): Remove TRANSCRIPT.
* lib/gdb.exp: Remove TRANSCRIPT check.
Add "replay" to the list of GDBSERVER_DEBUG options. This will
cause a gdbserver.replay file to be written to the test output
directory.
At the same time switch this to a comma separated list in order
to easily handle all possible options.
The replay log is created by GDB, but has been added to
GDBSERVER_DEBUG as it is only required for gdbserver tests. To
enable it, the gdb_debug_init is overridden to allow the additional
checking, before calling the original function.
gdb/testsuite/ChangeLog:
* README (Testsuite Parameters): Add replay logging to
GDBSERVER_DEBUG.
(gdbserver,debug): Refer to GDBSERVER_DEBUG.
* lib/gdbserver-support.exp (gdbserver_start): Treat gdbserverdebug
as a comma separated list.
(gdb_debug_init): Override procedure.
When spawning gdb or gdbserver create a .cmd file in the test output
directory containing the full command line, ensuring the current gdb
instance is appended to the files so that they can be quickly matched
to the corresponding gdb.in file.
gdb/testsuite/ChangeLog:
* lib/gdb.exp (default_gdb_spawn): Call gdb_write_cmd_file.
(gdb_write_cmd_file): New procedure.
* lib/gdbserver-support.exp (gdbserver_start): Call
gdbserver_write_cmd_file.
(gdbserver_write_cmd_file): New proedure.
When debugging testsuite failures, it can be awkward parsing gdb.log to
obtain all the commands run in order to manually re-run the test.
This patch adds the functionality to save all gdb commands to the file gdb.in
when the testsuite is run. The file is saved in the directory for the test and
if gdb is restarted then .1, .2, .3 etc is added to the filename.
Once a test has been run, the .in file can be used to re-run the test in the
following way:
gdb -x outputs/gdb.store/gdb.in outputs/gdb.store/store
The code works by intercepting send_gdb. I've added a TYPE to ensure that any
commands that would destroy the playback are kept from the log (for example the
Y from an answer to a y/n question).
Adds library function standard_output_file_with_gdb_instance to open a file
postfixed with count of the gdb instance. Ensure this count is reset when a new
.exp script is run.
I've re-run a random selection of .in files to check they do not error. Logs with
commands such as "attach <pid>" will not directly work when re-run.
gdb/testsuite/ChangeLog:
* lib/gdb.exp (gdb_unload): Mark Y as an answer.
(delete_breakpoints): Likewise.
(gdb_run_cmd): Likewise.
(gdb_start_cmd): Likewise.
(gdb_starti_cmd): Likewise.
(gdb_internal_error_resync): Likewise.
(gdb_test_multiple): Likewise.
(gdb_reinitialize_dir): Likewise.
(default_gdb_exit): Likewise.
(gdb_file_cmd): Mark kill as optional.
(default_gdb_start): Call gdb_stdin_log_init.
(send_gdb): Call gdb_stdin_log_write.
(rerun_to_main): Mark Y as an answer.
(gdb_stdin_log_init): New function.
(gdb_stdin_log_write): Likewise.
Fix up all failures encountered when running the testsuite with
GDB_DEBUG="infrun".
Some tests rely on enabling debugging for various components. With
debugging on, this will be lost to the debug file.
Disable separate tty for mi tests when debugging. This currently
does not work.
disasm.c should send errors to the stderr instead of the logfile.
Note that enabling debug for other components might still cause
additional errors above what has been fixed here.
gdb/ChangeLog:
* disasm.c (set_disassembler_options): Send errors to stderr.
gdb/testsuite/ChangeLog:
* gdb.base/breakpoint-in-ro-region.exp: Disable when debugging.
* gdb.base/debug-expr.exp: Likewise.
* gdb.base/foll-fork.exp: Likewise.
* gdb.base/foll-vfork.exp: Likewise.
* gdb.base/fork-print-inferior-events.exp: Likewise.
* gdb.base/gdb-sigterm.exp: Likewise.
* gdb.base/gdbinit-history.exp: Likewise.
* gdb.base/osabi.exp: Likewise.
* gdb.base/sss-bp-on-user-bp-2.exp: Likewise.
* gdb.base/ui-redirect.exp: Likewise.
* gdb.gdb/unittest.exp: Likewise.
* gdb.mi/mi-break.exp: Disable separate-mi-tty when debugging.
* gdb.mi/mi-watch.exp: Likewise.
* gdb.mi/new-ui-mi-sync.exp: Likewise.
* gdb.mi/user-selected-context-sync.exp: Likewise.
* gdb.python/python.exp: Disable debug test when debugging.
* gdb.threads/check-libthread-db.exp: Disable when debugging.
* gdb.threads/signal-while-stepping-over-bp-other-thread.exp:
Likewise.
* gdb.threads/stepi-random-signal.exp: Likewise.
Add both board option and environment variable which enables gdb
debug via a comma separated list and sends it to the file gdb.debug,
located in the output directory for the current test. Document this.
Add support for the environment variable in the Makefile.
The testsuite can be run with gdb debug enabled in the following way:
make check GDB_DEBUG="infrun,target,remote"
A Test with multiple invocations of GDB will all append debug to the
same log file.
gdb/testsuite/ChangeLog:
* Makefile.in: Pass through GDB_DEBUG.
* README (Testsuite Parameters): Add GDB_DEBUG.
(gdb,debug): Add board setting.
* lib/gdb.exp (default_gdb_start): Start debugging.
(gdb_debug_enabled): New procedure.
(gdb_debug_init): Likewise.
Currently, when logging is enabled, output will be sent to both a
logfile and standard terminal output. The redirect option sends output
only to the logfile. This includes all debug output.
Add the option to redirect debug output seperately to normal
output, using the cli command:
set logging debugredirect on
By setting this and enabling logging, all output and debug will
be sent to the logfile. The user will still see all output but
no debug output.
This causes a change in behaviour for anyone currently using
logging redirect, as now only output will be redirected. Users
will have to issue the additional command above to also redirect
debug.
Expand ui-redirect.exp cover the changes.
gdb/ChangeLog:
* cli/cli-interp.c (struct saved_output_files): Add saved entry.
(cli_interp_base::set_logging): Check debug_redirect.
* cli/cli-interp.h (set_logging): Add debug_redirect parameter.
* cli/cli-logging.c (debug_redirect): Add static variable.
(pop_output_files): Add default param.
(handle_redirections): Print debug setting.
(show_logging_command): Likewise.
(_initialize_cli_logging): Add debugredirect command.
* interps.c (current_interp_set_logging): Add debug_redirect
parameter.
* interps.h (set_logging): Add debug_redirect parameter.
(current_interp_set_logging): Likewise.
* mi/mi-common.h: Likewise.
* mi/mi-interp.c (mi_interp::set_logging): Likewise.
gdb/testsuite/ChangeLog:
* gdb.base/ui-redirect.exp: Add debug redirect tests.
GNU policy is not to include trademark acknowlegements in
documentation [1]
[1] https://www.gnu.org/prep/standards/html_node/Trademarks.html
Committing as obvious.
gas/
* doc/c-arm.texi (ARM Options): Remove "(r)" and "(tm)"
* doc/c-bfin.texi (Blackfin Syntax): Remove "(r)"
Instead of using two bools to decide if the files should close when tee_file
is closed, make file one stay open and file two close. This simplifies the
use cases for it.
Inline the make_logging_output into the calling functions (the logic here
looks ugly in order to simplify a later change).
Expand ui-redirect.exp to cover the changes, similar to mi-logging.exp.
gdb/ChangeLog:
* cli/cli-interp.c (cli_interp_base::set_logging): Create tee_file
directly.
* cli/cli-interp.h (make_logging_output): Remove declaration.
* cli/cli-logging.c (make_logging_output): Remove function.
* mi/mi-interp.c (mi_interp::set_logging): Create tee_file
directly.
* ui-file.c (tee_file::tee_file): Remove bools.
(tee_file::~tee_file): Remove deletes.
* ui-file.h (tee_file): Remove bools.
gdb/testsuite/ChangeLog:
* gdb.base/ui-redirect.exp: Test redirection.
As the existing comment said: "a common ought to be overridden by a
def in a -flto object". This patch makes the code actually do that,
rather than allowing a normal object file common to override a -flto
defined symbol.
PR 24567
* plugin.c (plugin_notice): Do not let a common symbol override
a non-common definition in IR.
There is a CLI command 'complete' intended to use with emacs. Such a command
would also be useful for MI frontends, when separate CLI and MI channels cannot
be used. For example, on Windows (because of lack of PTYs) or when GDB is used
through SSH session.
This commit adds a new '-complete' MI command.
gdb/Changelog:
2019-01-28 Jan Vrany <jan.vrany@fit.cvut.cz>
* mi/mi-cmds.h (mi_cmd_complete): New function.
* mi/mi-main.c (mi_cmd_complete): Likewise.
* mi/mi-cmds.c: Define new MI command -complete.
* NEWS: Mention new -complete command.
gdb/doc/ChangeLog:
2019-01-28 Jan Vrany <jan.vrany@fit.cvut.cz>
* gdb.texinfo (Miscellaneous GDB/MI Commands): Document new
MI command -complete.
gdb/testsuite/ChangeLog:
2019-01-28 Jan Vrany <jan.vrany@fit.cvut.cz>
* gdb.mi/mi-complete.exp: New file.
* gdb.mi/mi-complete.cc: Likewise.
Extract completion logic from CLI complete_command() into a new
helper function complete().
gdb/Changelog:
* completer.h (complete): New function.
* completer.c (complete): Likewise.
* cli/cli-cmds.c: (complete_command): Update to use new complete()
function defined in completer.h.
When running gdb using AddressSanitizer, and loading a cc1plus binary built
with profiledbootstrap and -flto, we run into a heap-use-after-free error:
...
$ LD_PRELOAD=/usr/lib64/libasan.so.3 ./gdb -batch cc1plus
==26855==ERROR: AddressSanitizer: heap-use-after-free on address \
0x62100ad8a8b0 at pc 0x7f13803cc9e3 bp 0x7ffe55b0d090 sp 0x7ffe55b0c840
READ of size 47 at 0x62100ad8a8b0 thread T0
#0 0x7f13803cc9e2 (/usr/lib64/libasan.so.3+0x3e9e2)
#1 0x5e7a0d in typename_concat gdb/dwarf2read.c:22661
#2 0x5c6437 in partial_die_full_name gdb/dwarf2read.c:8876
#3 0x5c6555 in add_partial_symbol gdb/dwarf2read.c:8893
#4 0x5c6ecf in add_partial_subprogram gdb/dwarf2read.c:9156
#5 0x5c5e90 in scan_partial_symbols gdb/dwarf2read.c:8668
#6 0x5c6c0a in add_partial_namespace gdb/dwarf2read.c:9081
#7 0x5c5f99 in scan_partial_symbols gdb/dwarf2read.c:8702
#8 0x5c48b6 in process_psymtab_comp_unit_reader gdb/dwarf2read.c:8056
#9 0x5c3c1f in init_cutu_and_read_dies gdb/dwarf2read.c:7689
#10 0x5c4c03 in process_psymtab_comp_unit gdb/dwarf2read.c:8140
#11 0x5c58a2 in dwarf2_build_psymtabs_hard gdb/dwarf2read.c:8500
#12 0x5c0d03 in dwarf2_build_psymtabs(objfile*) gdb/dwarf2read.c:6337
#13 0x612359 in read_psyms gdb/elfread.c:1311
#14 0x798a64 in require_partial_symbols(objfile*, int) gdb/psymtab.c:115
#15 0x867d7b in read_symbols gdb/symfile.c:821
#16 0x8683d9 in syms_from_objfile_1 gdb/symfile.c:1000
#17 0x8684a1 in syms_from_objfile gdb/symfile.c:1017
#18 0x868873 in symbol_file_add_with_addrs gdb/symfile.c:1124
#19 0x868b0a in symbol_file_add_from_bfd(bfd*, char const*, \
enum_flags<symfile_add_flag>, std::vector<other_sections, \
std::allocator<other_sections> >*, \
enum_flags<objfile_flag>, objfile*) gdb/symfile.c:1204
#20 0x868b64 in symbol_file_add(char const*, \
enum_flags<symfile_add_flag>, \
std::vector<other_sections, \
std::allocator<other_sections> >*, \
enum_flags<objfile_flag>) gdb/symfile.c:1217
#21 0x868c39 in symbol_file_add_main_1 gdb/symfile.c:1240
#22 0x868bd0 in symbol_file_add_main(char const*, \
enum_flags<symfile_add_flag>) gdb/symfile.c:1231
#23 0x71f1b2 in symbol_file_add_main_adapter gdb/main.c:395
#24 0x71f10e in catch_command_errors gdb/main.c:372
#25 0x71ff5f in captured_main_1 gdb/main.c:1043
#26 0x72045d in captured_main gdb/main.c:1163
#27 0x7204c8 in gdb_main(captured_main_args*) gdb/main.c:1188
#28 0x40fd7d in main gdb/gdb.c:32
#29 0x7f137e300f49 in __libc_start_main (/lib64/libc.so.6+0x20f49)
#30 0x40fc89 in _start (/data/gdb_versions/devel/build/gdb/gdb+0x40fc89)
0x62100ad8a8b0 is located 944 bytes inside of 4064-byte region \
[0x62100ad8a500,0x62100ad8b4e0)
freed by thread T0 here:
#0 0x7f13804523a0 in __interceptor_free (/usr/lib64/libasan.so.3+0xc43a0)
#1 0x435e44 in xfree<void> gdb/common/common-utils.h:60
#2 0xa82c25 in call_freefun libiberty/obstack.c:103
#3 0xa83098 in _obstack_free libiberty/obstack.c:280
#4 0x4367da in auto_obstack::~auto_obstack() gdb/gdb_obstack.h:101
#5 0x5ed72c in dwarf2_cu::~dwarf2_cu() gdb/dwarf2read.c:25341
#6 0x5fb5bb in std::default_delete<dwarf2_cu>::operator()(dwarf2_cu*) const \
/usr/include/c++/7/bits/unique_ptr.h:78
#7 0x5f7334 in std::unique_ptr<dwarf2_cu, \
std::default_delete<dwarf2_cu> >::~unique_ptr() \
/usr/include/c++/7/bits/unique_ptr.h:268
#8 0x5c3ce5 in init_cutu_and_read_dies gdb/dwarf2read.c:7624
#9 0x5c4c03 in process_psymtab_comp_unit gdb/dwarf2read.c:8140
#10 0x5c58a2 in dwarf2_build_psymtabs_hard gdb/dwarf2read.c:8500
#11 0x5c0d03 in dwarf2_build_psymtabs(objfile*) gdb/dwarf2read.c:6337
#12 0x612359 in read_psyms gdb/elfread.c:1311
#13 0x798a64 in require_partial_symbols(objfile*, int) gdb/psymtab.c:115
#14 0x867d7b in read_symbols gdb/symfile.c:821
#15 0x8683d9 in syms_from_objfile_1 gdb/symfile.c:1000
#16 0x8684a1 in syms_from_objfile gdb/symfile.c:1017
#17 0x868873 in symbol_file_add_with_addrs gdb/symfile.c:1124
#18 0x868b0a in symbol_file_add_from_bfd(bfd*, char const*, \
enum_flags<symfile_add_flag>, std::vector<other_sections, \
std::allocator<other_sections> >*, \
enum_flags<objfile_flag>, objfile*) gdb/symfile.c:1204
#19 0x868b64 in symbol_file_add(char const*, \
enum_flags<symfile_add_flag>, std::vector<other_sections, \
std::allocator<other_sections> >*, \
enum_flags<objfile_flag>) gdb/symfile.c:1217
#20 0x868c39 in symbol_file_add_main_1 gdb/symfile.c:1240
#21 0x868bd0 in symbol_file_add_main(char const*, \
enum_flags<symfile_add_flag>) gdb/symfile.c:1231
#22 0x71f1b2 in symbol_file_add_main_adapter gdb/main.c:395
#23 0x71f10e in catch_command_errors gdb/main.c:372
#24 0x71ff5f in captured_main_1 gdb/main.c:1043
#25 0x72045d in captured_main gdb/main.c:1163
#26 0x7204c8 in gdb_main(captured_main_args*) gdb/main.c:1188
#27 0x40fd7d in main gdb/gdb.c:32
#28 0x7f137e300f49 in __libc_start_main (/lib64/libc.so.6+0x20f49)
previously allocated by thread T0 here:
#0 0x7f13804526b8 in __interceptor_malloc (/usr/lib64/libasan.so.3+0xc46b8)
#1 0x5114b5 in xmalloc gdb/common/common-utils.c:44
#2 0xa82bd5 in call_chunkfun libiberty/obstack.c:94
#3 0xa82eda in _obstack_newchunk libiberty/obstack.c:206
#4 0x477310 in allocate_on_obstack::operator new(unsigned long, obstack*) \
gdb/gdb_obstack.h:117
#5 0x5dea8c in load_partial_dies gdb/dwarf2read.c:18571
#6 0x5c487f in process_psymtab_comp_unit_reader gdb/dwarf2read.c:8054
#7 0x5c3c1f in init_cutu_and_read_dies gdb/dwarf2read.c:7689
#8 0x5c4c03 in process_psymtab_comp_unit gdb/dwarf2read.c:8140
#9 0x5c58a2 in dwarf2_build_psymtabs_hard gdb/dwarf2read.c:8500
#10 0x5c0d03 in dwarf2_build_psymtabs(objfile*) gdb/dwarf2read.c:6337
#11 0x612359 in read_psyms gdb/elfread.c:1311
#12 0x798a64 in require_partial_symbols(objfile*, int) gdb/psymtab.c:115
#13 0x867d7b in read_symbols gdb/symfile.c:821
#14 0x8683d9 in syms_from_objfile_1 gdb/symfile.c:1000
#15 0x8684a1 in syms_from_objfile gdb/symfile.c:1017
#16 0x868873 in symbol_file_add_with_addrs gdb/symfile.c:1124
#17 0x868b0a in symbol_file_add_from_bfd(bfd*, char const*, \
enum_flags<symfile_add_flag>, \
std::vector<other_sections, \
std::allocator<other_sections> >*, \
enum_flags<objfile_flag>, objfile*) gdb/symfile.c:1204
#18 0x868b64 in symbol_file_add(char const*, enum_flags<symfile_add_flag>, \
std::vector<other_sections, \
std::allocator<other_sections> >*, \
enum_flags<objfile_flag>) gdb/symfile.c:1217
#19 0x868c39 in symbol_file_add_main_1 gdb/symfile.c:1240
#20 0x868bd0 in symbol_file_add_main(char const*, \
enum_flags<symfile_add_flag>) gdb/symfile.c:1231
#21 0x71f1b2 in symbol_file_add_main_adapter gdb/main.c:395
#22 0x71f10e in catch_command_errors gdb/main.c:372
#23 0x71ff5f in captured_main_1 gdb/main.c:1043
#24 0x72045d in captured_main gdb/main.c:1163
#25 0x7204c8 in gdb_main(captured_main_args*) gdb/main.c:1188
#26 0x40fd7d in main gdb/gdb.c:32
#27 0x7f137e300f49 in __libc_start_main (/lib64/libc.so.6+0x20f49)
...
This error happens as follows.
The function find_partial_die has a cu argument, but returns a pdi which may
or may not be from that cu:
...
/* Find a partial DIE at OFFSET, which may or may not be in CU,
except in the case of .debug_types DIEs which do not reference
outside their CU (they do however referencing other types via
DW_FORM_ref_sig8). */
static struct partial_die_info *
find_partial_die (sect_offset sect_off, int offset_in_dwz, struct dwarf2_cu *cu)
...
So the pdi returned by find_partial_die here in partial_die_parent_scope may
be from another cu:
...
partial_die_parent_scope (struct partial_die_info *pdi,
struct dwarf2_cu *cu)
{
const char *grandparent_scope;
struct partial_die_info *parent, *real_pdi;
/* We need to look at our parent DIE; if we have a DW_AT_specification,
then this means the parent of the specification DIE. */
real_pdi = pdi;
while (real_pdi->has_specification)
real_pdi = find_partial_die (real_pdi->spec_offset,
real_pdi->spec_is_dwz, cu);
parent = real_pdi->die_parent;
...
in which case both real_pdi and parent will be not from cu, but from another
one, say cu2.
Subsequently, cu's comp_unit_obstack is used to set parent->scope:
...
parent->scope = typename_concat (&cu->comp_unit_obstack,
grandparent_scope,
parent->name, 0, cu);
...
So, we use cu->comp_unit_obstack to assign a value to the scope field of
a pdi belonging to cu2, and when cu is deleted, the scope field points to a
freed value.
Fix this by making find_partial_die return the cu corresponding to the
returned pdi, and handling this at the call sites.
Tested on x86_64-linux.
gdb/ChangeLog:
2019-05-17 Tom de Vries <tdevries@suse.de>
PR gdb/24094
* dwarf2read.c (struct cu_partial_die_info): New struct.
(find_partial_die): Return cu_partial_die_info.
(partial_die_parent_scope, guess_partial_die_structure_name)
(partial_die_info::fixup): Handle new return type of find_partial_die.
This patch simplifies the code of
stap-probe.c:stap_parse_register_operand by making "regname" an
std::string. No functionality change.
I'm this code's maintainer, so I'm pushing this as it's a fairly
trivial patch.
gdb/ChangeLog:
2019-05-16 Sergio Durigan Junior <sergiodj@redhat.com>
* stap-probe.c (stap_parse_register_operand): Make "regname" an
"std::string", simplifying the algorithm.
I think the string formatting for complaints was messed up by Tom's
patch to simplify the complaint mechanism. This small and trivial
patch fixes them.
Pushed as obvious.
gdb/ChangeLog:
2019-05-16 Sergio Durigan Junior <sergiodj@redhat.com>
* stap-probe.c (handle_stap_probe): Fix complaint formatting.
(stap_static_probe_ops::get_probes): Likewise.
This patch contains three very small improvement on the logic of some
operations we do on stap-probe.c. They don't change what the code
does.
Pushed as obvious.
gdb/ChangeLog:
2019-05-16 Sergio Durigan Junior <sergiodj@redhat.com>
* stap-probe.c (stap_parse_register_operand): Make "if (*p->arg ==
'-')" and "else if".
(stap_parse_single_operand): Join checks for
"gdbarch_stap_parse_special_token_p" and
"gdbarch_stap_parse_special_token" in the same "if" statement.
Invert check when verifying for operation on register
displacement.
Some functions's comments were not entirely correct on stap-probe.c,
so this patch updates them.
Pushed as obvious.
gdb/ChangeLog:
2019-05-16 Sergio Durigan Junior <sergiodj@redhat.com>
* stap-probe.c (stap_get_opcode): Update comment.
(stap_get_expected_argument_type): Likewise.
(handle_stap_probe): Likewise.
This simple patch converts a bunch of "int"s to "bool" on stap-probe.c
and on the stap-related code present on i386-tdep.c.
Pushed as obvious (+ I'm the maintainer of this code).
gdb/ChangeLog:
2019-05-16 Sergio Durigan Junior <sergiodj@redhat.com>
* i386-tdep.c (i386_stap_parse_special_token_triplet): Change
return type to 'bool'. Adjust comment. Use 'bool' when
appropriate.
(i386_stap_parse_special_token_three_arg_disp): Likewise.
* stap-probe.c (stap_parse_argument_1): Likewise.
(stap_is_operator): Likewise.
(stap_is_generic_prefix): Likewise.
(stap_is_register_prefix): Likewise.
(stap_is_register_indirection_prefix): Likewise.
(stap_is_integer_prefix): Likewise.
(stap_generic_check_suffix): Likewise.
(stap_check_integer_suffix): Likewise.
(stap_check_register_suffix): Likewise.
(stap_check_register_indirection_suffix): Likewise.
(stap_parse_register_operand): Likewise.
(stap_parse_single_operand): Likewise.
(stap_parse_argument_1): Likewise.
(stap_probe::get_argument_count): Likewise.
(stap_is_operator): Likewise.
John Marshall pointed out that darwin-nat.c fails to build:
CXX darwin-nat.o
../../../binutils-gdb/gdb/darwin-nat.c:1709:8: error: must use 'class' tag to refer to type 'thread_info' in this scope
for (thread_info *it : all_threads ())
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/mach/thread_act.h:240:15: note:
class 'thread_info' is hidden by a non-type declaration of 'thread_info' here
kern_return_t thread_info
Mach has a thread_info() function declared in that header, which darwin-nat.c #includes.
This patch fixes the problem by reintroducing the struct keyword.
gdb/ChangeLog
2019-05-16 Tom Tromey <tromey@adacore.com>
* darwin-nat.c (thread_info_from_private_thread_info): Add struct
keyword to foreach.
gas/ChangeLog:
2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
* testsuite/gas/arm/mve-tailpredloop.d: New test.
* testsuite/gas/arm/mve-tailpredloop.s: New test.
* testsuite/gas/arm/mve-vabav.d: New test.
* testsuite/gas/arm/mve-vabav.s: New test.
* testsuite/gas/arm/mve-vabd.d: New test.
* testsuite/gas/arm/mve-vabd.s: New test.
* testsuite/gas/arm/mve-vabsneg.d: New test.
* testsuite/gas/arm/mve-vabsneg.s: New test.
* testsuite/gas/arm/mve-vadc.d: New test.
* testsuite/gas/arm/mve-vadc.s: New test.
* testsuite/gas/arm/mve-vaddlv.d: New test.
* testsuite/gas/arm/mve-vaddlv.s: New test.
* testsuite/gas/arm/mve-vaddsub.d: New test.
* testsuite/gas/arm/mve-vaddsub.s: New test.
* testsuite/gas/arm/mve-vaddv.d: New test.
* testsuite/gas/arm/mve-vaddv.s: New test.
* testsuite/gas/arm/mve-vand.d: New test.
* testsuite/gas/arm/mve-vand.s: New test.
* testsuite/gas/arm/mve-vbic.d: New test.
* testsuite/gas/arm/mve-vbic.s: New test.
* testsuite/gas/arm/mve-vbrsr.d: New test.
* testsuite/gas/arm/mve-vbrsr.s: New test.
* testsuite/gas/arm/mve-vcadd.d: New test.
* testsuite/gas/arm/mve-vcadd.s: New test.
* testsuite/gas/arm/mve-vcls.d: New test.
* testsuite/gas/arm/mve-vcls.s: New test.
* testsuite/gas/arm/mve-vclz.d: New test.
* testsuite/gas/arm/mve-vclz.s: New test.
* testsuite/gas/arm/mve-vcmla.d: New test.
* testsuite/gas/arm/mve-vcmla.s: New test.
* testsuite/gas/arm/mve-vcmp.d: New test.
* testsuite/gas/arm/mve-vcmp.s: New test.
* testsuite/gas/arm/mve-vcmul.d: New test.
* testsuite/gas/arm/mve-vcmul.s: New test.
* testsuite/gas/arm/mve-vcvt-1.d: New test.
* testsuite/gas/arm/mve-vcvt-1.s: New test.
* testsuite/gas/arm/mve-vcvt-2.d: New test.
* testsuite/gas/arm/mve-vcvt-2.s: New test.
* testsuite/gas/arm/mve-vcvt-3.d: New test.
* testsuite/gas/arm/mve-vcvt-3.s: New test.
* testsuite/gas/arm/mve-vcvt-4.d: New test.
* testsuite/gas/arm/mve-vcvt-4.s: New test.
* testsuite/gas/arm/mve-vddup.d: New test.
* testsuite/gas/arm/mve-vddup.s: New test.
* testsuite/gas/arm/mve-vdup.d: New test.
* testsuite/gas/arm/mve-vdup.s: New test.
* testsuite/gas/arm/mve-veor.d: New test.
* testsuite/gas/arm/mve-veor.s: New test.
* testsuite/gas/arm/mve-vfma-vfms.d: New test.
* testsuite/gas/arm/mve-vfma-vfms.s: New test.
* testsuite/gas/arm/mve-vfmas.d: New test.
* testsuite/gas/arm/mve-vfmas.s: New test.
* testsuite/gas/arm/mve-vhadd-vhsub-vrhadd.d: New test.
* testsuite/gas/arm/mve-vhadd-vhsub-vrhadd.s: New test.
* testsuite/gas/arm/mve-vhcadd.d: New test.
* testsuite/gas/arm/mve-vhcadd.s: New test.
* testsuite/gas/arm/mve-vmax-vmin.d: New test.
* testsuite/gas/arm/mve-vmax-vmin.s: New test.
* testsuite/gas/arm/mve-vmaxa-vmina.d: New test.
* testsuite/gas/arm/mve-vmaxa-vmina.s: New test.
* testsuite/gas/arm/mve-vmaxnm-vminnm.d: New test.
* testsuite/gas/arm/mve-vmaxnm-vminnm.s: New test.
* testsuite/gas/arm/mve-vmaxnma-vminnma.s: New test.
* testsuite/gas/arm/mve-vmaxnmv-vminnmv.d: New test.
* testsuite/gas/arm/mve-vmaxnmv-vminnmv.s: New test.
* testsuite/gas/arm/mve-vmaxv-vminv.d: New test.
* testsuite/gas/arm/mve-vmaxv-vminv.s: New test.
* testsuite/gas/arm/mve-vmla.d: New test.
* testsuite/gas/arm/mve-vmla.s: New test.
* testsuite/gas/arm/mve-vmladav.d: New test.
* testsuite/gas/arm/mve-vmladav.s: New test.
* testsuite/gas/arm/mve-vmlaldav.d: New test.
* testsuite/gas/arm/mve-vmlaldav.s: New test.
* testsuite/gas/arm/mve-vmlalv.d: New test.
* testsuite/gas/arm/mve-vmlalv.s: New test.
* testsuite/gas/arm/mve-vmlas.d: New test.
* testsuite/gas/arm/mve-vmlas.s: New test.
* testsuite/gas/arm/mve-vmlav.d: New test.
* testsuite/gas/arm/mve-vmlav.s: New test.
* testsuite/gas/arm/mve-vmlsdav.d: New test.
* testsuite/gas/arm/mve-vmlsdav.s: New test.
* testsuite/gas/arm/mve-vmlsldav.d: New test.
* testsuite/gas/arm/mve-vmlsldav.s: New test.
* testsuite/gas/arm/mve-vmov-1.d: New test.
* testsuite/gas/arm/mve-vmov-1.s: New test.
* testsuite/gas/arm/mve-vmov-2.d: New test.
* testsuite/gas/arm/mve-vmov-2.s: New test.
* testsuite/gas/arm/mve-vmul.d: New test.
* testsuite/gas/arm/mve-vmul.s: New test.
* testsuite/gas/arm/mve-vmulh.d: New test.
* testsuite/gas/arm/mve-vmulh.s: New test.
* testsuite/gas/arm/mve-vmullbt.d: New test.
* testsuite/gas/arm/mve-vmullbt.s: New test.
* testsuite/gas/arm/mve-vmvn.d: New test.
* testsuite/gas/arm/mve-vmvn.s: New test.
* testsuite/gas/arm/mve-vorn.d: New test.
* testsuite/gas/arm/mve-vorn.s: New test.
* testsuite/gas/arm/mve-vorr.d: New test.
* testsuite/gas/arm/mve-vorr.s: New test.
* testsuite/gas/arm/mve-vpnot.d: New test.
* testsuite/gas/arm/mve-vpnot.s: New test.
* testsuite/gas/arm/mve-vpsel.d: New test.
* testsuite/gas/arm/mve-vpsel.s: New test.
* testsuite/gas/arm/mve-vpt.d: New test.
* testsuite/gas/arm/mve-vpt.s: New test.
* testsuite/gas/arm/mve-vqabsneg.s: New test.
* testsuite/gas/arm/mve-vqaddsub.d: New test.
* testsuite/gas/arm/mve-vqaddsub.s: New test.
* testsuite/gas/arm/mve-vqdmladh.d: New test.
* testsuite/gas/arm/mve-vqdmladh.s: New test.
* testsuite/gas/arm/mve-vqdmlah.d: New test.
* testsuite/gas/arm/mve-vqdmlah.s: New test.
* testsuite/gas/arm/mve-vqdmlash.d: New test.
* testsuite/gas/arm/mve-vqdmlash.s: New test.
* testsuite/gas/arm/mve-vqdmlsdh.d: New test.
* testsuite/gas/arm/mve-vqdmlsdh.s: New test.
* testsuite/gas/arm/mve-vqdmulh.d: New test.
* testsuite/gas/arm/mve-vqdmulh.s: New test.
* testsuite/gas/arm/mve-vqdmull.d: New test.
* testsuite/gas/arm/mve-vqdmull.s: New test.
* testsuite/gas/arm/mve-vqmovn.d: New test.
* testsuite/gas/arm/mve-vqmovn.s: New test.
* testsuite/gas/arm/mve-vqrshl.d: New test.
* testsuite/gas/arm/mve-vqrshl.s: New test.
* testsuite/gas/arm/mve-vqrshrn.d: New test.
* testsuite/gas/arm/mve-vqrshrn.s: New test.
* testsuite/gas/arm/mve-vqshl.d: New test.
* testsuite/gas/arm/mve-vqshl.s: New test.
* testsuite/gas/arm/mve-vrev.d: New test.
* testsuite/gas/arm/mve-vrev.s: New test.
* testsuite/gas/arm/mve-vrint.d: New test.
* testsuite/gas/arm/mve-vrint.s: New test.
* testsuite/gas/arm/mve-vrmlaldavh.d: New test.
* testsuite/gas/arm/mve-vrmlaldavh.s: New test.
* testsuite/gas/arm/mve-vrshl.d: New test.
* testsuite/gas/arm/mve-vrshl.s: New test.
* testsuite/gas/arm/mve-vsbc.d: New test.
* testsuite/gas/arm/mve-vsbc.s: New test.
* testsuite/gas/arm/mve-vshl.d: New test.
* testsuite/gas/arm/mve-vshl.s: New test.
* testsuite/gas/arm/mve-vshlc.d: New test.
* testsuite/gas/arm/mve-vshlc.s: New test.
* testsuite/gas/arm/mve-vshll.d: New test.
* testsuite/gas/arm/mve-vshll.s: New test.
* testsuite/gas/arm/mve-vshr.d: New test.
* testsuite/gas/arm/mve-vshr.s: New test.
* testsuite/gas/arm/mve-vshrn.d: New test.
* testsuite/gas/arm/mve-vshrn.s: New test.
* testsuite/gas/arm/mve-vsli.d: New test.
* testsuite/gas/arm/mve-vsli.s: New test.
* testsuite/gas/arm/mve-vsri.d: New test.
* testsuite/gas/arm/mve-vsri.s: New test.
* testsuite/gas/arm/mve-vstld.d: New test.
* testsuite/gas/arm/mve-vstld.s: New test.
* testsuite/gas/arm/mve-vstrldr-1.d: New test.
* testsuite/gas/arm/mve-vstrldr-1.s: New test.
* testsuite/gas/arm/mve-vstrldr-2.d: New test.
* testsuite/gas/arm/mve-vstrldr-2.s: New test.
* testsuite/gas/arm/mve-vstrldr-3.d: New test.
* testsuite/gas/arm/mve-vstrldr-3.s: New test.
opcodes/ChangeLog:
2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
Michael Collison <michael.collison@arm.com>
* arm-dis.c (thumb32_opcodes): Add new instructions.
(print_insn_thumb32): Handle new instructions.
opcodes/ChangeLog:
2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
Michael Collison <michael.collison@arm.com>
* arm-dis.c (enum mve_instructions): Add new instructions.
(enum mve_unpredictable): Add new reasons.
(is_mve_encoding_conflict): Handle new instructions.
(is_mve_unpredictable): Likewise.
(mve_opcodes): Add new instructions.
(print_mve_unpredictable): Handle new reasons.
(print_mve_register_blocks): New print function.
(print_mve_size): Handle new instructions.
(print_insn_mve): Likewise.
opcodes/ChangeLog:
2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
Michael Collison <michael.collison@arm.com>
* arm-dis.c (enum mve_instructions): Add new instructions.
(enum mve_unpredictable): Add new values.
(mve_opcodes): Add new instructions.
(vec_condnames): New array with vector conditions.
(mve_predicatenames): New array with predicate suffixes.
(mve_vec_sizename): New array with vector sizes.
(enum vpt_pred_state): New enum with vector predication states.
(struct vpt_block): New struct type for vpt blocks.
(vpt_block_state): Global struct to keep track of state.
(mve_extract_pred_mask): New helper function.
(num_instructions_vpt_block): Likewise.
(mark_outside_vpt_block): Likewise.
(mark_inside_vpt_block): Likewise.
(invert_next_predicate_state): Likewise.
(update_next_predicate_state): Likewise.
(update_vpt_block_state): Likewise.
(is_vpt_instruction): Likewise.
(is_mve_encoding_conflict): Add entries for new instructions.
(is_mve_unpredictable): Likewise.
(print_mve_unpredictable): Handle new cases.
(print_instruction_predicate): Likewise.
(print_mve_size): New function.
(print_vec_condition): New function.
(print_insn_mve): Handle vpt blocks and new print operands.
opcodes/ChangeLog:
2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
* arm-dis.c (print_insn_coprocessor_1): Disable the use of coprocessors
8, 14 and 15 for Armv8.1-M Mainline.
gas/ChangeLog:
2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/tc-arm.c (do_mve_vshll): New encoding function.
(do_mve_vshlc): Likewise.
(insns): Add entries for MVE mnemonics.
* testsuite/gas/arm/mve-vshlc-bad.d: New test.
* testsuite/gas/arm/mve-vshlc-bad.l: New test.
* testsuite/gas/arm/mve-vshlc-bad.s: New test.
* testsuite/gas/arm/mve-vshll-bad.d: New test.
* testsuite/gas/arm/mve-vshll-bad.l: New test.
* testsuite/gas/arm/mve-vshll-bad.s: New test.