The branch, jankratochvil/gdbserverbuildid has been created at d3b64846f32fe967eda4a42993509fa043bf6fab (commit) - Log ----------------------------------------------------------------- commit d3b64846f32fe967eda4a42993509fa043bf6fab Author: Jan Kratochvil Date: Thu Jul 30 20:48:14 2015 +0200 mainbuildid commit 127a7c8c5f95c94627a7020ea70baaf34e8af4c4 Author: Jan Kratochvil Date: Thu Jul 30 20:31:46 2015 +0200 hexallocate commit 9a330d05001869fafbeb1977ba01002760f06223 Author: Jan Kratochvil Date: Thu Jul 30 20:48:50 2015 +0200 locatetest commit 2ac4a4a2b1c67501c243500f89f39b993afc9d57 Author: Jan Kratochvil Date: Thu Jul 30 20:49:10 2015 +0200 buildidwarn commit c957e11eefea3a3b0df0725d0bcc7f71284cbfdd Author: Jan Kratochvil Date: Tue Jul 28 22:13:31 2015 +0200 buildidsolibbfdopen commit 7fc9a74927d454a5390f1d5d2a1cb3c4610d2bd6 Author: Jan Kratochvil Date: Mon Aug 3 20:45:26 2015 +0200 buildidverify commit 1819c3617e892c280ef275ddc227cde019215137 Author: Jan Kratochvil Date: Mon Aug 3 20:44:27 2015 +0200 buildidsolibsearch commit 363c073195eb984c1a87337c2b766264c9b492c0 Author: Jan Kratochvil Date: Mon Aug 3 20:42:40 2015 +0200 buildidtofile commit 41d3fed626c53a4c1941bb7e5cab4f31d1867d86 Author: Jan Kratochvil Date: Tue Jul 28 22:12:52 2015 +0200 buildidproto commit 9d78733d3e5cb8a75da2fde76c4b5b016adaa73e Author: Jan Kratochvil Date: Wed Jul 29 21:38:45 2015 +0200 buildidtobfd commit daf575991634bf88c15a21b206af0025eb7945b3 Author: Jan Kratochvil Date: Wed Jul 29 19:52:47 2015 +0200 buildidforcemove commit ff999b8d72b8b986c21a85f3853a933d61377d62 Author: Jan Kratochvil Date: Thu Jul 30 23:07:10 2015 +0200 buildidfreefix commit 4c5ec92510d46549c0ab8b7bef138e49916a9c7e Author: Jan Kratochvil Date: Mon Aug 3 19:07:06 2015 +0200 unvalidate commit be47105b3a08816825e3af06e364976a50b0addc Author: Jan Kratochvil Date: Mon Aug 3 20:20:45 2015 +0200 openpsymfile commit 3f48d4a72c91deb16d7845e05c1c6de0017363a1 Author: Jan Kratochvil Date: Mon Aug 3 20:20:10 2015 +0200 openpexec commit ee108b9e22005af135a0e3abdd987a6e8d11ae60 Author: Jan Kratochvil Date: Mon Aug 3 20:18:53 2015 +0200 openpsolib commit e5ac2b27b2656e633f03e03471215134039eab26 Author: Jan Kratochvil Date: Sat Jul 25 23:11:36 2015 +0200 openp commit 357927ebc9c67445f26db3e8f9c4f9619da9758c Author: Jan Kratochvil Date: Wed Jul 29 22:49:17 2015 +0200 filelib commit 5fb62cb37b182a1724c142fb5074c610438f3d21 Author: Jan Kratochvil Date: Wed Jul 29 22:47:55 2015 +0200 targetfd commit fc362f9aceda33a7fda5587a894afb845d9ab969 Author: Jan Kratochvil Date: Mon Jul 27 23:01:54 2015 +0200 openpnullpathname commit cc7e9e180d16e577c75fac12e8dd7397fe0305b8 Author: Jan Kratochvil Date: Mon Jul 27 20:11:55 2015 +0200 openpmode commit 77349f9a27c0b1ad34a16b8245dd8f89663a6b99 Author: Jan Kratochvil Date: Mon Jul 27 22:42:55 2015 +0200 openppath commit d0ec4ffa44abbfb3ae91d073d9e173d08add716a Author: Jan Kratochvil Date: Mon Jul 27 23:15:48 2015 +0200 openpenum commit 53ecd8abae0b52b4972c15d71174e0ba0f141976 Author: Jan Kratochvil Date: Sat Jul 25 22:48:02 2015 +0200 sysroots commit 90f484011751e127565e5600bfde5308773edb93 Author: Jan Kratochvil Date: Fri Jul 17 22:31:05 2015 +0200 build-id: -config,+configure.tgt commit 0ad719190dd1375219d3bcdc3718daf109dff476 Author: Jan Kratochvil Date: Fri Jul 17 22:30:32 2015 +0200 Revert "Revert the previous 7 commits of: Validate binary before use" This reverts commit db1ff28b60f8886b8d7c634f1db2f939ba47a13c. Conflicts: gdb/ChangeLog gdb/gdbserver/ChangeLog gdb/testsuite/ChangeLog commit 3d3389010c00504602656ba6f16c6b91ade75243 Author: Doug Evans Date: Mon Aug 3 09:17:40 2015 -0700 Add parallel build support for perf tests. gdb/testsuite/ChangeLog: * Makefile.in (workers/%.worker, build-perf): New rule. (GDB_PERFTEST_MODE): New variable. (check-perf): Use it. (clean): Clean up gdb.perf parallel build subdirs. * lib/build-piece.exp: New file. * lib/gdb.exp (make_gdb_parallel_path): New function (standard_output_file, standard_temp_file): Call it. (GDB_PARALLEL handling): Make outputs,temp,cache directories as subdirs of $GDB_PARALLEL. * lib/cache.exp (gdb_do_cache): Call make_gdb_parallel_path. commit af061d3e9c09baa0df2f2d4724baed06cc6158ca Author: Doug Evans Date: Mon Aug 3 09:04:03 2015 -0700 Move basic perf-test output from perftest.log to perftest.sum. This patch does two things. 1) Add support for multiple data points. 2) Move the "report" output from perftest.log to perftest.sum. I want to record the raw data somewhere, and a bit of statistical analysis (standard deviation left for another day), but I also don't want it to clutter up the basic report. This patch takes a cue from gdb.{sum,log} and does the same thing with perftest.{sum,log}. Ultimately, we'll probably want to emit raw data to csv files or some such and then do post-processing passes on that. gdb/testsuite/ChangeLog: * lib/perftest/reporter.py (SUM_FILE_NAME): New global. (LOG_FILE_NAME): New global. (TextReporter.__init__): Initialize self.txt_sum. (TextReporter.report): Add support for multiple data-points. Move report to perftest.sum, put raw data in perftest.log. (TextReporter.start): Open sum and log files. (TextReporter.end): Close sum and log files. * lib/perftest/testresult.py (SingleStatisticTestResult.record): Handle multiple data-points. commit 1da03605ced73fc20f40ad649f3038e654d36dee Author: Ulrich Weigand Date: Mon Aug 3 14:35:58 2015 +0200 Fix build error due to uninitialized variable warning As of commit a5fdf78a4402341a0ae23a5ca8a63825e2b5286c, building GDB with a GCC 4.1 host compiler fails with: gdb/cp-namespace.c: In function 'cp_lookup_symbol_via_imports': gdb/cp-namespace.c:482: warning: 'sym.block' may be used uninitialized in this function Apparently, more recent compilers are able to deduce that no actual uninitialized use of sym.block takes place, but GCC 4.1 isn't yet able to do that. Fixed by adding an explicit initalization. gdb/ * cp-namespace.c (cp_lookup_symbol_via_imports): Fix uninitialized variable warning with some compilers. commit 8156fe7f47884390b7404af15903795bb607658b Author: Yao Qi Date: Mon Aug 3 10:37:23 2015 +0100 Enum fix for arm-linux-nat.c This patch fixes GDB build breakage on arm-linux. gdb: 2015-08-03 Yao Qi * arm-linux-nat.c (arm_linux_get_hwbp_type): Capitalize "type" in comment. Replace "rw" with "type". (arm_linux_remove_watchpoint): Change type of "rw" to "enum target_hw_bp_type". commit d60646b95830f1687b641b96f31adbea75c08d6c Author: Nick Clifton Date: Mon Aug 3 09:19:00 2015 +0100 Fix thinkos in the description of the --hash-size command line option for GAS. * doc/as.texinfo (Overview): Add --hash-size to the synopsis and fix typo in its entry: @kindex -> @item. commit a5fdf78a4402341a0ae23a5ca8a63825e2b5286c Author: Pierre-Marie de Rodat Date: Mon Aug 3 09:39:42 2015 +0200 Fix the block_found refactoring ChangeLog entry Replace the old "struct symbol_in_block" with the actual "struct block_symbol", fix a typo and remove mention to an unmodified function. commit 17c42309df30d43ad57556050f96850105a7dfe7 Author: GDB Administrator Date: Mon Aug 3 00:00:08 2015 +0000 Automatic date update in version.in commit e76460dbb9b9b34b9c7fc2f2e4faae38730d00b0 Author: Pedro Alves Date: Sun Aug 2 11:46:50 2015 -0700 Unbreak PPC gdb builds Commit f486487f5586 (Mostly trivial enum fixes) missed updating ppc-linux-nat.c, resulting in: ../../src/gdb/ppc-linux-nat.c: In function ‘_initialize_ppc_linux_nat’: ../../src/gdb/ppc-linux-nat.c:2503:27: error: assignment from incompatible pointer type [-Werror] ../../src/gdb/ppc-linux-nat.c:2504:27: error: assignment from incompatible pointer type [-Werror] gdb/ChangeLog 2015-08-02 Pedro Alves * ppc-linux-nat.c (get_trigger_type, create_watchpoint_request) (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint): Change parameter 'rw's type to enum target_hw_bp_type and rename to 'type'. commit 835a09d99d585bfdc9f760970908e10bd8b2fec2 Author: Pierre-Marie de Rodat Date: Sat Aug 1 11:25:44 2015 +0200 Complete the previous commit (block_found refactoring) The previous commit (Replace the block_found global with explicit data-flow) lacks updates in a couple of files because it was not tested building GDB with --enable-targets=all... but buildbots did. This adds the appropriate simple updates to fix the build. gdb/ChangeLog: * alpha-mdebug-tdep.c (find_proc_desc): Update call to lookup_symbol. * ft32-tdep.c (ft32_skip_prologue): Likewise. * moxie-tdep.c (moxie_skip_prologue): Likewise. * mt-tdep.c (mt_skip_prologue): Likewise. * xstormy16-tdep.c (xstormy16_skip_prologue): Likewise. commit 5e99d4b301d820e1622b35cfd4b359bb4ba264e6 Author: GDB Administrator Date: Sun Aug 2 00:00:08 2015 +0000 Automatic date update in version.in commit d12307c199dfdb9cad1ea79d2626224e705089a3 Author: Pierre-Marie de Rodat Date: Tue Jul 21 17:02:15 2015 +0200 Replace the block_found global with explicit data-flow As Pedro suggested on gdb-patches@ (see https://sourceware.org/ml/gdb-patches/2015-05/msg00714.html), this change makes symbol lookup functions return a structure that includes both the symbol found and the block in which it was found. This makes it possible to get rid of the block_found global variable and thus makes block hunting explicit. gdb/ * ada-exp.y (write_object_renaming): Replace struct ada_symbol_info with struct block_symbol. Update field references accordingly. (block_lookup, select_possible_type_sym): Likewise. (find_primitive_type): Likewise. Also update call to ada_lookup_symbol to extract the symbol itself. (write_var_or_type, write_name_assoc): Likewise. * ada-lang.h (struct ada_symbol_info): Remove. (ada_lookup_symbol_list): Replace struct ada_symbol_info with struct block_symbol. (ada_lookup_encoded_symbol, user_select_syms): Likewise. (ada_lookup_symbol): Return struct block_symbol instead of a mere symbol. * ada-lang.c (defns_collected): Replace struct ada_symbol_info with struct block_symbol. (resolve_subexp, ada_resolve_function, sort_choices, user_select_syms, is_nonfunction, add_defn_to_vec, num_defns_collected, defns_collected, symbols_are_identical_enums, remove_extra_symbols, remove_irrelevant_renamings, add_lookup_symbol_list_worker, ada_lookup_symbol_list, ada_iterate_over_symbols, ada_lookup_encoded_symbol, get_var_value): Likewise. (ada_lookup_symbol): Return a block_symbol instead of a mere symbol. Replace struct ada_symbol_info with struct block_symbol. (ada_lookup_symbol_nonlocal): Likewise. (standard_lookup): Make block passing explicit through lookup_symbol_in_language. * ada-tasks.c (get_tcb_types_info): Update the calls to lookup_symbol_in_language to extract the mere symbol out of the returned value. (ada_tasks_inferior_data_sniffer): Likewise. * ax-gdb.c (gen_static_field): Likewise for the call to lookup_symbol. (gen_maybe_namespace_elt): Deal with struct symbol_in_block from lookup functions. (gen_expr): Likewise. * c-exp.y: Likewise. Remove uses of block_found. (lex_one_token, classify_inner_name, c_print_token): Likewise. (classify_name): Likewise. Rename the "sym" local variable to "bsym". * c-valprint.c (print_unpacked_pointer): Likewise. * compile/compile-c-symbols.c (convert_symbol_sym): Promote the "sym" parameter from struct symbol * to struct block_symbol. Use it to remove uses of block_found. Deal with struct symbol_in_block from lookup functions. (gcc_convert_symbol): Likewise. Update the call to convert_symbol_sym. * compile/compile-object-load.c (compile_object_load): Deal with struct symbol_in_block from lookup functions. * cp-namespace.c (cp_lookup_nested_symbol_1, cp_lookup_nested_symbol, cp_lookup_bare_symbol, cp_search_static_and_baseclasses, cp_lookup_symbol_in_namespace, cp_lookup_symbol_via_imports, cp_lookup_symbol_imports_or_template, cp_lookup_symbol_via_all_imports, cp_lookup_symbol_namespace, lookup_namespace_scope, cp_lookup_nonlocal, find_symbol_in_baseclass): Return struct symbol_in_block instead of mere symbols and deal with struct symbol_in_block from lookup functions. * cp-support.c (inspect_type, replace_typedefs, cp_lookup_rtti_type): Deal with struct symbol_in_block from lookup functions. * cp-support.h (cp_lookup_symbol_nonlocal, cp_lookup_symbol_from_namespace, cp_lookup_symbol_imports_or_template, cp_lookup_nested_symbol): Return struct symbol_in_block instead of mere symbols. * d-exp.y (d_type_from_name, d_module_from_name, push_variable, push_module_name): Deal with struct symbol_in_block from lookup functions. Remove uses of block_found. * eval.c (evaluate_subexp_standard): Update call to cp_lookup_symbol_namespace. * f-exp.y: Deal with struct symbol_in_block from lookup functions. Remove uses of block_found. (yylex): Likewise. * gdbtypes.c (lookup_typename, lookup_struct, lookup_union, lookup_enum, lookup_template_type, check_typedef): Deal with struct symbol_in_block from lookup functions. * guile/scm-frame.c (gdbscm_frame_read_var): Likewise. * guile/scm-symbol.c (gdbscm_lookup_symbol): Likewise. (gdbscm_lookup_global_symbol): Likewise. * gnu-v3-abi.c (gnuv3_get_typeid_type): Likewise. * go-exp.y: Likewise. Remove uses of block_found. (package_name_p, classify_packaged_name, classify_name): Likewise. * infrun.c (insert_exception_resume_breakpoint): Likewise. * jv-exp.y (push_variable): Likewise. * jv-lang.c (java_lookup_class, get_java_object_type): Likewise. * language.c (language_bool_type): Likewise. * language.h (struct language_defn): Update la_lookup_symbol_nonlocal to return a struct symbol_in_block rather than a mere symbol. * linespec.c (find_label_symbols): Deal with struct symbol_in_block from lookup functions. * m2-exp.y: Likewise. Remove uses of block_found. (yylex): Likewise. * mi/mi-cmd-stack.c (list_args_or_locals): Likewise. * objc-lang.c (lookup_struct_typedef, find_imps): Likewise. * p-exp.y: Likewise. Remove uses of block_found. (yylex): Likewise. * p-valprint.c (pascal_val_print): Likewise. * parse.c (write_dollar_variable): Likewise. Remove uses of block_found. * parser-defs.h (struct symtoken): Turn the SYM field into a struct symbol_in_block. * printcmd.c (address_info): Deal with struct symbol_in_block from lookup functions. * python/py-frame.c (frapy_read_var): Likewise. * python/py-symbol.c (gdbpy_lookup_symbol, gdbpy_lookup_global_symbol): Likewise. * skip.c (skip_function_command): Likewise. * solib-darwin.c (darwin_lookup_lib_symbol): Return a struct symbol_in_block instead of a mere symbol. * solib-spu.c (spu_lookup_lib_symbol): Likewise. * solib-svr4.c (elf_lookup_lib_symbol): Likewise. * solib.c (solib_global_lookup): Likewise. * solist.h (solib_global_lookup): Likewise. (struct target_so_ops): Update lookup_lib_global_symbol to return a struct symbol_in_block rather than a mere symbol. * source.c (select_source_symtab): Deal with struct symbol_in_block from lookup functions. * stack.c (print_frame_args, iterate_over_block_arg_vars): Likewise. * symfile.c (set_initial_language): Likewise. * symtab.c (SYMBOL_LOOKUP_FAILED): Turn into a struct symbol_in_block. (SYMBOL_LOOKUP_FAILED_P): New predicate as a macro. (struct symbol_cache_slot): Turn the FOUND field into a struct symbol_in_block. (block_found): Remove. (eq_symbol_entry): Update to deal with struct symbol_in_block in cache slots. (symbol_cache_lookup): Return a struct symbol_in_block rather than a mere symbol. (symbol_cache_mark_found): Add a BLOCK parameter to fill appropriately the cache slots. Update callers. (symbol_cache_dump): Update cache slots handling to the type change. (lookup_symbol_in_language, lookup_symbol, lookup_language_this, lookup_symbol_aux, lookup_local_symbol, lookup_symbol_in_objfile, lookup_global_symbol_from_objfile, lookup_symbol_in_objfile_symtabs, lookup_symbol_in_objfile_from_linkage_name, lookup_symbol_via_quick_fns, basic_lookup_symbol_nonlocal, lookup_symbol_in_static_block, lookup_static_symbol, lookup_global_symbol): Return a struct symbol_in_block rather than a mere symbol. Deal with struct symbol_in_block from other lookup functions. Remove uses of block_found. (lookup_symbol_in_block): Remove uses of block_found. (struct global_sym_lookup_data): Turn the RESULT field into a struct symbol_in_block. (lookup_symbol_global_iterator_cb): Update references to the RESULT field. (search_symbols): Deal with struct symbol_in_block from lookup functions. * symtab.h (struct symbol_in_block): New structure. (block_found): Remove. (lookup_symbol_in_language, lookup_symbol, basic_lookup_symbol_nonlocal, lookup_symbol_in_static_block, looku_static_symbol, lookup_global_symbol, lookup_symbol_in_block, lookup_language_this, lookup_global_symbol_from_objfile): Return a struct symbol_in_block rather than just a mere symbol. Update comments to remove mentions of block_found. * valops.c (find_function_in_inferior, value_struct_elt_for_reference, value_maybe_namespace_elt, value_of_this): Deal with struct symbol_in_block from lookup functions. * value.c (value_static_field, value_fn_field): Likewise. commit 5efafabf7be800069e02f84589c9462e99079c4d Author: GDB Administrator Date: Sat Aug 1 00:00:08 2015 +0000 Automatic date update in version.in commit 2c8c5d375e91824387eeacd1d710e714f1534d36 Author: Pedro Alves Date: Fri Jul 31 20:06:24 2015 +0100 testsuite: tcl exec& -> 'kill -9 $pid' is racy (attach-many-short-lived-thread.exp races and others) The buildbots show that attach-many-short-lived-thread.exp is racy. But after staring at debug logs and playing with SystemTap scripts for a (long) while, I figured out that neither GDB, nor the kernel nor the test's program itself are at fault. The problem is simply that the testsuite machinery is currently subject to PID-reuse races. The attach-many-short-lived-threads.c test program just happens to be much more susceptible to trigger this race because threads and processes share the same number space on Linux, and the test spawns many many short lived threads in succession, thus enlarging the race window a lot. Part of the problem is that several tests spawn processes with "exec&" (in order to test the "attach" command) , and then at the end of the test, to make sure things are cleaned up, issue a 'remote_spawn "kill -p $testpid"'. Since with tcl's "exec&", tcl itself is responsible for reaping the process's exit status, when we go kill the process, testpid may have already exited _and_ its status may have (and often has) been reaped already. Thus it can happen that another process meanwhile reuses $testpid, and that "kill" command kills the wrong process... Frequently, that happens to be attach-many-short-lived-thread, but this explains other test's races as well. In the attach-many-short-lived-threads test, it sometimes manifests like this: (gdb) file /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.threads/attach-many-short-lived-threads Reading symbols from /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.threads/attach-many-short-lived-threads...done. (gdb) Loaded /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.threads/attach-many-short-lived-threads into /home/pedro/gdb/mygit/build/gdb/testsuite/../../gdb/gdb attach 5940 Attaching to program: /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.threads/attach-many-short-lived-threads, process 5940 warning: process 5940 is a zombie - the process has already terminated ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ptrace: Operation not permitted. (gdb) PASS: gdb.threads/attach-many-short-lived-threads.exp: iter 1: attach info threads No threads. (gdb) PASS: gdb.threads/attach-many-short-lived-threads.exp: iter 1: no new threads set breakpoint always-inserted on (gdb) PASS: gdb.threads/attach-many-short-lived-threads.exp: iter 1: set breakpoint always-inserted on Other times the process dies while the test is ongoing (the process is ptrace-stopped): (gdb) print again = 1 Cannot access memory at address 0x6020cc (gdb) FAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 2: reset timer in the inferior (Recall that on Linux, SIGKILL is not interceptable) And other times it dies just while we're detaching: $4 = 319 (gdb) PASS: gdb.threads/attach-many-short-lived-threads.exp: iter 2: print seconds_left detach Can't detach Thread 0x7fb13b7de700 (LWP 1842): No such process (gdb) FAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 2: detach GDB mishandles the latter (it should ignore ESRCH while detaching just like when continuing), but that's another story. The fix here is to change spawn_wait_for_attach to use Expect's 'spawn' command instead of Tcl's 'exec&' to spawn programs, because with spawn we control when to wait for/reap the process. That allows killing the process by PID without being subject to pid-reuse races, because even if the process is already dead, the kernel won't reuse the process's PID until the zombie is reaped. The other part of the problem lies in DejaGnu itself, unfortunately. I have occasionally seen tests (attach-many-short-lived-threads included, but not only that one) die with a random inexplicable SIGTERM too, and that too is caused by the same reason, except that in that case, the rogue SIGTERM is sent from this bit in DejaGnu's remote.exp: exec sh -c "exec > /dev/null 2>&1 && (kill -2 $pgid || kill -2 $pid) && sleep 5 && (kill $pgid || kill $pid) && sleep 5 && (kill -9 $pgid || kill -9 $pid) &" ... catch "wait -i $shell_id" Even if the program exits promptly, that whole cascade of kills carries on in the background, thus potentially killing the poor process that manages to reuse $pid... I sent a fix for that to the DejaGnu list: http://lists.gnu.org/archive/html/dejagnu/2015-07/msg00000.html With both patches in place, I haven't seen attach-many-short-lived-threads.exp fail again. Tested on x86_64 Fedora 20, native, gdbserver and extended-gdbserver. gdb/testsuite/ChangeLog: 2015-07-31 Pedro Alves * gdb.base/attach-pie-misread.exp: Rename $res to $test_spawn_id. Use spawn_id_get_pid. Wait for spawn id after eof. Use kill_wait_spawned_process instead of explicit "kill -9". * gdb.base/attach-pie-noexec.exp: Adjust to spawn_wait_for_attach returning a spawn id instead of a pid. Use spawn_id_get_pid and kill_wait_spawned_process. * gdb.base/attach-twice.exp: Likewise. * gdb.base/attach.exp: Likewise. (do_command_attach_tests): Use gdb_spawn_with_cmdline_opts and gdb_test_multiple. * gdb.base/solib-overlap.exp: Adjust to spawn_wait_for_attach returning a spawn id instead of a pid. Use spawn_id_get_pid and kill_wait_spawned_process. * gdb.base/valgrind-infcall.exp: Likewise. * gdb.multi/multi-attach.exp: Likewise. * gdb.python/py-prompt.exp: Likewise. * gdb.python/py-sync-interp.exp: Likewise. * gdb.server/ext-attach.exp: Likewise. * gdb.threads/attach-into-signal.exp (corefunc): Use spawn_wait_for_attach, spawn_id_get_pid and kill_wait_spawned_process. * gdb.threads/attach-many-short-lived-threads.exp: Adjust to spawn_wait_for_attach returning a spawn id instead of a pid. Use spawn_id_get_pid and kill_wait_spawned_process. * gdb.threads/attach-stopped.exp (corefunc): Use spawn_wait_for_attach, spawn_id_get_pid and kill_wait_spawned_process. * gdb.base/break-interp.exp: Rename $res to $test_spawn_id. Use spawn_id_get_pid. Wait for spawn id after eof. Use kill_wait_spawned_process instead of explicit "kill -9". * lib/gdb.exp (can_spawn_for_attach): Adjust comment. (kill_wait_spawned_process, spawn_id_get_pid): New procedures. (spawn_wait_for_attach): Use spawn instead of exec to spawn processes. Don't map cygwin/windows pids here. Now returns a spawn id list. commit b1c59ddc809bc4ad2c082b5cae02a18c68746257 Author: Simon Marchi Date: Fri Jul 31 14:08:14 2015 -0400 Fix m32r_remove_watchpoint parameter type This change should have been in the previous patch (Mostly trivial enum fixes). gdb/ChangeLog: * remote-m32r-sdi.c (m32r_remove_watchpoint): Use enum type instead of integer. commit f486487f558686c05d4f4d91a75638b9da399044 Author: Simon Marchi Date: Fri Jul 31 13:19:53 2015 -0400 Mostly trivial enum fixes This is a patch I extracted from Pedro's C++ branch. It contains the most trivial enum fixes, where an integer type/value was used instead of the appropriate enum type/value. It fixes many C++ errors, since in C++ you can't mix integers and enums implicitely. Regardless of the C++ conversion, I think this is a good cleanup to make use of the appropriate enum types. Regression-tested on native x86_64. gdb/ChangeLog: * aarch64-linux-nat.c (aarch64_linux_can_use_hw_breakpoint): Use enum type or value instead of integer. (aarch64_linux_insert_watchpoint): Likewise. (aarch64_linux_remove_watchpoint): Likewise. * ada-lang.c (ada_op_print_tab): Likewise. * amd64-linux-tdep.c (amd64_canonicalize_syscall): Likewise. (amd64_linux_syscall_record_common): Likewise. * arch-utils.c (target_byte_order_user): Likewise. (default_byte_order): Likewise. * arm-linux-nat.c (arm_linux_can_use_hw_breakpoint): Likewise. (arm_linux_get_hwbp_type): Likewise. (arm_linux_hw_watchpoint_initialize): Likewise. (arm_linux_insert_watchpoint): Likewise. * arm-linux-tdep.c (arm_canonicalize_syscall): Likewise. (arm_linux_syscall_record): Likewise. * breakpoint.c (update_watchpoint): Likewise. (breakpoint_here_p): Likewise. (bpstat_print): Likewise. (enable_breakpoint_disp): Likewise. * c-lang.c (c_op_print_tab): Likewise. * cli/cli-decode.c (add_info_alias): Likewise. * d-lang.c (d_op_print_tab): Likewise. * eval.c (evaluate_subexp_standard): Likewise. * f-exp.y (dot_ops): Likewise. (f77_keywords): Likewise. * f-lang.c (f_op_print_tab): Likewise. * go-lang.c (go_op_print_tab): Likewise. * guile/scm-breakpoint.c (gdbscm_make_breakpoint): Likewise. * guile/scm-cmd.c (gdbscm_make_command): Likewise. * guile/scm-param.c (gdbscm_make_parameter): Likewise. * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Likewise. * guile/scm-string.c (struct scm_to_stringn_data): Likewise. (struct scm_from_stringn_data): Likewise. * i386-linux-tdep.c (i386_canonicalize_syscall): Likewise. * ia64-linux-nat.c (ia64_linux_insert_watchpoint): Likewise. (ia64_linux_remove_watchpoint): Likewise. (ia64_linux_can_use_hw_breakpoint): Likewise. * infrun.c (print_stop_event): Likewise. * jv-lang.c (java_op_print_tab): Likewise. * linux-nat.c (linux_proc_xfer_partial): Likewise. * linux-nat.h (struct lwp_info): Likewise. * linux-thread-db.c (enable_thread_event): Likewise. * m2-lang.c (m2_op_print_tab): Likewise. * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Likewise. (mi_cmd_stack_list_variables): Likewise. * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise. * mi/mi-out.c (mi_table_begin): Likewise. (mi_table_header): Likewise. * mips-linux-nat.c (mips_linux_can_use_hw_breakpoint): Likewise. (mips_linux_insert_watchpoint): Likewise. (mips_linux_remove_watchpoint): Likewise. * nat/mips-linux-watch.c (mips_linux_watch_type_to_irw): Likewise. * nat/mips-linux-watch.h (struct mips_watchpoint): Likewise. (mips_linux_watch_type_to_irw): Likewise. * nto-procfs.c (procfs_can_use_hw_breakpoint): Likewise. (procfs_insert_hw_watchpoint): Likewise. (procfs_remove_hw_watchpoint): Likewise. (procfs_hw_watchpoint): Likewise. (procfs_can_use_hw_breakpoint): Likewise. (procfs_remove_hw_watchpoint): Likewise. (procfs_insert_hw_watchpoint): Likewise. * p-lang.c (pascal_op_print_tab): Likewise. * ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): Likewise. * ppc-linux-tdep.c (ppu2spu_unwind_register): Likewise. * ppc-sysv-tdep.c (get_decimal_float_return_value): Likewise. * procfs.c (procfs_can_use_hw_breakpoint): Likewise. (procfs_insert_watchpoint): Likewise. (procfs_remove_watchpoint): Likewise. * psymtab.c (recursively_search_psymtabs): Likewise. * remote-m32r-sdi.c (m32r_can_use_hw_watchpoint): Likewise. (m32r_insert_watchpoint): Likewise. * remote-mips.c (mips_can_use_watchpoint): Likewise. (mips_insert_watchpoint): Likewise. (mips_remove_watchpoint): Likewise. * remote.c (watchpoint_to_Z_packet): Likewise. (remote_insert_watchpoint): Likewise. (remote_remove_watchpoint): Likewise. (remote_check_watch_resources): Likewise. * s390-linux-nat.c (s390_insert_watchpoint): Likewise. (s390_remove_watchpoint): Likewise. (s390_can_use_hw_breakpoint): Likewise. * s390-linux-tdep.c (s390_gdbarch_init): Likewise. * spu-linux-nat.c (spu_can_use_hw_breakpoint): Likewise. * target.h (struct target_ops): Likewise. * tilegx-tdep.c (tilegx_analyze_prologue): Likewise. * ui-out.c (struct ui_out_hdr): Likewise. (append_header_to_list): Likewise. (get_next_header): Likewise. (verify_field): Likewise. (ui_out_begin): Likewise. (ui_out_field_int): Likewise. (ui_out_field_fmt_int): Likewise. (ui_out_field_skip): Likewise. (ui_out_field_string): Likewise. (ui_out_field_fmt): Likewise. * varobj.c (new_variable): Likewise. * x86-nat.c (x86_insert_watchpoint): Likewise. (x86_remove_watchpoint): Likewise. (x86_can_use_hw_breakpoint): Likewise. * xtensa-tdep.h (struct gdbarch_tdep): Likewise. * inflow.c (enum gdb_has_a_terminal_flag_enum): Add name to previously anonymous enumeration type.. * linux-record.h (enum gdb_syscall): Add gdb_sys_no_syscall value. * target-debug.h (target_debug_print_enum_target_hw_bp_type): New. (target_debug_print_enum_bptype): New. * target-delegates.c: Regenerate. commit 22d31b1192bb38c766e349e5eed1a82298cc2c1f Author: GDB Administrator Date: Fri Jul 31 00:00:08 2015 +0000 Automatic date update in version.in commit 032a0fca009e8ae7ffc5443d07d959c839dc7af4 Author: Sandra Loosemore Date: Thu Jul 30 14:20:01 2015 -0700 Replace incorrect patch to gdb.cp/var-tag.exp. 2015-07-30 Sandra Loosemore gdb/testsuite/ * gdb.cp/var-tag.exp (do_global_tests): Revert broken commit 4bc4d42859e3b42c79c89295ef39944bdb3e6753 and apply the correct patch. commit e1b5381f1b24d2c6b1e254cf7e35f8a470394adc Author: Sandra Loosemore Date: Thu Jul 30 13:26:03 2015 -0700 Don't allow non-stack memory writes in the prologue for nios2. 2015-07-30 Sandra Loosemore gdb/ * nios2-tdep.c (nios2_analyze_prologue): Do what the comment already says and disallow non-stack memory writes in the prologue. commit 9aaf8e3a2875f719e4d5633ba222a3c04a5d0e8d Author: Sandra Loosemore Date: Thu Jul 30 13:23:43 2015 -0700 Update trap/break handling in nios2 prologue analyzer. 2015-07-30 Sandra Loosemore gdb/ * nios2-tdep.c (nios2_analyze_prologue): Update comments to reflect how current GCC emits stack overflow checks. Match both trap and break instructions for backward compatibility. Disallow other trap and break instructions in the prologue. commit 61a934ca2090456acb4432b6c136241d3aaee7a2 Author: Sandra Loosemore Date: Thu Jul 30 12:06:29 2015 -0700 Restrict gdb.arch/ppc64-symtab-cordic.exp to ppc64 targets. 2015-07-30 Sandra Loosemore gdb/testsuite/ * gdb.arch/ppc64-symtab-cordic.exp: Restrict to ppc64 targets. commit 4bc4d42859e3b42c79c89295ef39944bdb3e6753 Author: Sandra Loosemore Date: Thu Jul 30 11:52:49 2015 -0700 Reapply fix for gdb.cp/var-tag.exp C++ failures. 2015-07-30 Sandra Loosemore gdb/testsuite/ Reapply: 2014-05-21 Mark Wielaard * gdb.cp/var-tag.exp (do_global_tests): Handle underlying type. commit 998d452ac81bc240996c967dd27f7b747240cd66 Author: Pedro Alves Date: Thu Jul 30 18:41:44 2015 +0100 remote follow fork and spurious child stops in non-stop mode Running gdb.threads/fork-plus-threads.exp against gdbserver in extended-remote mode, even though the test passes, we still see broken behavior: (gdb) PASS: gdb.threads/fork-plus-threads.exp: set detach-on-fork off continue & Continuing. (gdb) PASS: gdb.threads/fork-plus-threads.exp: continue & [New Thread 28092.28092] [Thread 28092.28092] #2 stopped. [New Thread 28094.28094] [Inferior 2 (process 28092) exited normally] [New Thread 28094.28105] [New Thread 28094.28109] ... [Thread 28174.28174] #18 stopped. [New Thread 28185.28185] [Inferior 10 (process 28174) exited normally] [New Thread 28185.28196] [Thread 28185.28185] #20 stopped. Cannot remove breakpoints because program is no longer writable. Further execution is probably impossible. [Inferior 11 (process 28185) exited normally] [Inferior 1 (process 28091) exited normally] PASS: gdb.threads/fork-plus-threads.exp: reached breakpoint info threads No threads. (gdb) PASS: gdb.threads/fork-plus-threads.exp: no threads left info inferiors Num Description Executable * 1 /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.threads/fork-plus-threads (gdb) PASS: gdb.threads/fork-plus-threads.exp: only inferior 1 left All the "[Thread FOO] #NN stopped." above are bogus, as well as the "Cannot remove breakpoints because program is no longer writable.", which is a consequence. The problem is that when we intercept a fork event, we should report the event for the parent, only, and leave the child stopped, but not report its stop event. GDB later decides whether to follow the parent or the child. But because handle_extended_wait does not set the child's last_status.kind to TARGET_WAITKIND_STOPPED, a stop_all_threads/unstop_all_lwps sequence (e.g., from trying to access memory) by mistake ends up queueing a SIGSTOP on the child, resuming it, and then when that SIGSTOP is intercepted, because the LWP has last_resume_kind set to resume_stop, gdbserver reports the stop to GDB, as GDB_SIGNAL_0: ... >>>> entering unstop_all_lwps unstopping all lwps proceed_one_lwp: lwp 1600 client wants LWP to remain 1600 stopped proceed_one_lwp: lwp 1828 Client wants LWP 1828 to stop. Making sure it has a SIGSTOP pending ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sending sigstop to lwp 1828 pc is 0x3615ebc7cc Resuming lwp 1828 (continue, signal 0, stop expected) continue from pc 0x3615ebc7cc unstop_all_lwps done sigchld_handler <<<< exiting unstop_all_lwps handling possible target event >>>> entering linux_wait_1 linux_wait_1: [] my_waitpid (-1, 0x40000001) my_waitpid (-1, 0x1): status(137f), 1828 LWFE: waitpid(-1, ...) returned 1828, ERRNO-OK LLW: waitpid 1828 received Stopped (signal) (stopped) pc is 0x3615ebc7cc Expected stop. LLW: resume_stop SIGSTOP caught for LWP 1828.1828. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... linux_wait_1 ret = LWP 1828.1828, 1, 0 <<<< exiting linux_wait_1 Writing resume reply for LWP 1828.1828:1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Tested on x86_64 Fedora 20, extended-remote. gdb/gdbserver/ChangeLog: 2015-07-30 Pedro Alves * linux-low.c (handle_extended_wait): Set the child's last reported status to TARGET_WAITKIND_STOPPED. commit 69dde7dcb81f6baf2b823dcc03e040c29ee5de7d Author: Pedro Alves Date: Wed Jul 22 18:01:46 2015 +0100 PR threads/18600: Inferiors left around after fork+thread spawn The new gdb.threads/fork-plus-threads.exp test exposes one more problem. When one types "info inferiors" after running the program, one see's a couple inferior left still, while there should only be inferior #1 left. E.g.: (gdb) info inferiors Num Description Executable 4 process 8393 /home/pedro/bugs/src/test 2 process 8388 /home/pedro/bugs/src/test * 1 /home/pedro/bugs/src/test (gdb) info threads Calling prune_inferiors() manually at this point (from a top gdb) does not remove them, because they still have inf->pid != 0 (while they shouldn't). This suggests that we never mourned those inferiors. Enabling logs (master + previous patch) we see: ... WL: waitpid Thread 0x7ffff7fc2740 (LWP 9513) received Trace/breakpoint trap (stopped) WL: Handling extended status 0x03057f LHEW: Got clone event from LWP 9513, new child is LWP 9579 [New Thread 0x7ffff37b8700 (LWP 9579)] WL: waitpid Thread 0x7ffff7fc2740 (LWP 9508) received 0 (exited) WL: Thread 0x7ffff7fc2740 (LWP 9508) exited. ^^^^^^^^ [Thread 0x7ffff7fc2740 (LWP 9508) exited] WL: waitpid Thread 0x7ffff7fc2740 (LWP 9499) received 0 (exited) WL: Thread 0x7ffff7fc2740 (LWP 9499) exited. [Thread 0x7ffff7fc2740 (LWP 9499) exited] RSRL: resuming stopped-resumed LWP Thread 0x7ffff37b8700 (LWP 9579) at 0x3615ef4ce1: step=0 ... (gdb) info inferiors Num Description Executable 5 process 9508 /home/pedro/bugs/src/test ^^^^ 4 process 9503 /home/pedro/bugs/src/test 3 process 9500 /home/pedro/bugs/src/test 2 process 9499 /home/pedro/bugs/src/test * 1 /home/pedro/bugs/src/test (gdb) ... Note the "Thread 0x7ffff7fc2740 (LWP 9508) exited." line. That's this in wait_lwp: /* Check if the thread has exited. */ if (WIFEXITED (status) || WIFSIGNALED (status)) { thread_dead = 1; if (debug_linux_nat) fprintf_unfiltered (gdb_stdlog, "WL: %s exited.\n", target_pid_to_str (lp->ptid)); } } That was the leader thread reporting an exit, meaning the whole process is gone. So the problem is that this code doesn't understand that an WIFEXITED status of the leader LWP should be reported to infrun as process exit. gdb/ChangeLog: 2015-07-30 Pedro Alves PR threads/18600 * linux-nat.c (wait_lwp): Report to the core when thread group leader exits. gdb/testsuite/ChangeLog: 2015-07-30 Pedro Alves PR threads/18600 * gdb.threads/fork-plus-threads.exp: Test that "info inferiors" only shows inferior 1. commit 4dd63d488a76482543517c4c4cde699ee6fa33ef Author: Pedro Alves Date: Thu Jul 30 18:50:29 2015 +0100 PR threads/18600: Threads left stopped after fork+thread spawn When a program forks and another process start threads while gdb is handling the fork event, newly created threads are left stuck stopped by gdb, even though gdb presents them as "running", to the user. This can be seen with the test added by this patch. The test has the inferior fork a certain number of times and waits for all children to exit. Each fork child spawns a number of threads that do nothing and joins them immediately. Normally, the program should run unimpeded (from the point of view of the user) and exit very quickly. Without this fix, it doesn't because of some threads left stopped by gdb, so inferior 1 never exits. The program triggers when a new clone thread is found while inside the linux_stop_and_wait_all_lwps call in linux-thread-db.c: linux_stop_and_wait_all_lwps (); ALL_LWPS (lp) if (ptid_get_pid (lp->ptid) == pid) thread_from_lwp (lp->ptid); linux_unstop_all_lwps (); Within linux_stop_and_wait_all_lwps, we reach linux_handle_extended_wait with the "stopping" parameter set to 1, and because of that we don't mark the new lwp as resumed. As consequence, the subsequent resume_stopped_resumed_lwps, called from linux_unstop_all_lwps, never resumes the new LWP. There's lots of cruft in linux_handle_extended_wait that no longer makes sense. On systems with CLONE events support, we don't rely on libthread_db for thread listing anymore, so the code that preserves stop_requested and the handling of last_resume_kind is all dead. So the fix is to remove all that, and simply always mark the new LWP as resumed, so that resume_stopped_resumed_lwps re-resumes it. gdb/ChangeLog: 2015-07-30 Pedro Alves Simon Marchi PR threads/18600 * linux-nat.c (linux_handle_extended_wait): On CLONE event, always mark the new thread as resumed. Remove STOPPING parameter. (wait_lwp): Adjust call to linux_handle_extended_wait. (linux_nat_filter_event): Adjust call to linux_handle_extended_wait. (resume_stopped_resumed_lwps): Add debug output. gdb/testsuite/ChangeLog: 2015-07-30 Simon Marchi Pedro Alves PR threads/18600 * gdb.threads/fork-plus-threads.c: New file. * gdb.threads/fork-plus-threads.exp: New file. commit 6b940e6a063ac13372b44a03a54b6be33d22a183 Author: Pierre Langlois Date: Thu Jul 30 18:05:00 2015 +0100 Remove isize output argument from fast_tracepoint_valid_at This patch removes the isize output argument from the fast_tracepoint_valid_at gdbarch hook. It was used to return the size of the instruction that needs to be replaced when installing a fast tracepoint. Instead of getting this value from the fast_tracepoint_valid_at hook, we can call the gdb_insn_length function. If we do not do this, then architectures which do not have a restriction on where to install the fast tracepoint will send uninitialized memory off to GDBserver. See remote_download_tracepoint: ~~~ int isize; if (gdbarch_fast_tracepoint_valid_at (target_gdbarch (), tpaddr, &isize, NULL)) xsnprintf (buf + strlen (buf), BUF_SIZE - strlen (buf), ":F%x", isize); ~~~ The default implementation of fast_tracepoint_valid_at will not set isize resulting in uninitialized memory being sent. Later on, GDBserver could use this information to compute a jump offset. gdb/ChangeLog: * arch-utils.c (default_fast_tracepoint_valid_at): Remove unused isize argument. * arch-utils.h (default_fast_tracepoint_valid_at): Likewise. * breakpoint.c (check_fast_tracepoint_sals): Adjust call to gdbarch_fast_tracepoint_valid_at. * gdbarch.sh (fast_tracepoint_valid_at): Remove isize argument. * gdbarch.h: Regenerate. * gdbarch.c: Regenerate. * i386-tdep.c (i386_fast_tracepoint_valid_at): Remove isize argument. Do not set it. * remote.c (remote_download_tracepoint): Adjust call to gdbarch_fast_tracepoint_valid_at. Call gdb_insn_length to get the instruction length. commit e8b416815be691cc3fb1212d1a3dcb5d21a0d19d Author: Yao Qi Date: Thu Jul 30 15:07:39 2015 +0100 Remove global variable arm_hwcap After previous patch, we don't need global variable arm_hwcap. This patch is to remove it. gdb/gdbserver: 2015-07-30 Yao Qi * linux-arm-low.c (arm_hwcap): Remove it. (arm_read_description): New local variable arm_hwcap. Don't set arm_hwcap to zero. commit 89abb03951a90203c6635296447b7e96a1248a68 Author: Yao Qi Date: Thu Jul 30 15:07:39 2015 +0100 Use regcache->tdesc instead of arm_hwcap arm_hwcap is a global variable, and we should avoid using it as much as we can. Instead of checking arm_hwcap, we can check whether regcache->tdesc is a certain kind of target description. This is what this patch does. gdb/gdbserver: 2015-07-30 Yao Qi * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap. Use regcache->tdesc instead. (arm_store_wmmxregset): Likewise. (arm_fill_vfpregset): Likewise. (arm_store_vfpregset): Likewise. commit deca266c89cf61c679f759a74bdf362960b0cc2c Author: Yao Qi Date: Thu Jul 30 15:07:38 2015 +0100 Don't use arm_regmap and arm_num_regs in arm_fill_gregset and arm_store_gregset In order to align with arm-linux-nat.c counterparts, we don't use arm_num_regs and arm_regmap in functions arm_fill_gregset and arm_store_gregset. Instead, we use register numbers. With this patch applied, arm_fill_gregset and arm_store_gregset don't need arm_num_regs and arm_regmap, and they will be moved to a separate file shared for both arm and aarch64 in the following patch. gdb/gdbserver: 2015-07-30 Yao Qi * linux-arm-low.c: Include arch/arm.h. (arm_fill_gregset): Don't use arm_num_regs and arm_regmap. (arm_store_gregset): Likewise. commit ec74129274bf2fb65aac9381a19731c570f7be29 Author: Yao Qi Date: Thu Jul 30 15:07:38 2015 +0100 Move ARM register numbers enum to arch/arm.h This patch moves ARM register numbers enum to arch/arm.h, so that it can used by GDBserver too. This patch also creates a new directory gdb/arch in which arch-specific or target-specific files are placed. gdb: 2015-07-30 Yao Qi * arm-tdep.h (enum gdb_regnum): Move it to ... * arch/arm.h: ... here. New file. * Makefile.in (HFILES_NO_SRCDIR): Add arch/arm.h. commit 0ea6402e6ce0af0623f0cfd180b626c7ccc41891 Author: Pierre Langlois Date: Thu Jul 30 12:40:49 2015 +0100 [AArch64] Rename boolean arguments in decoding functions This patch cleans up the decoding functions using booleans when they can decode two instructions. The boolean argument is used to know which of the two instructions was decoded. The instructions affected are BR/BLR, B/BL, CBZ/CBNZ and TBZ/TBNZ. These arguments would be named after a named bit in the instruction encoding, this patch renames them to 'is_XXX'. Furthermore, the 'unsigned' type would be used to describe a boolean while aarch64_decode_cb would use 'int' (see the 'is64' argument). This patch makes all booleans be 'int' and decoded bitfields be 'unsigned'. gdb/ChangeLog: * aarch64-tdep.c (decode_b): Rename link argument to is_bl. Change its type to int *. (decode_br): Rename link argument to is_blr. Change its type to int *. (decode_cb): Rename op argument to is_cbnz. Change its type to int *. (decode_tb): Rename op argument to is_tbnz. Change its type to int *. Set is_tbnz to either 1 or 0. (aarch64_analyze_prologue): Change type of is_link to int. Add new variables is_cbnz and is_tbnz. Adjust call to aarch64_decode_cb and aarch64_decode_tb. commit a8484f9612fc5b7d2b762b6fec950faa0fcd1483 Author: H.J. Lu Date: Thu Jul 30 04:17:02 2015 -0700 Properly disassemble movnti in Intel mode gas/testsuite/ PR binutils/13571 * gas/i386/i386.exp: Run i386-intel and x86_64-intel. * gas/i386/i386-intel.d: New file. * gas/i386/x86_64-intel.d: Likewise. opcodes/ PR binutils/13571 * i386-dis.c (MOD_0FC3): New. (PREFIX_0FC3): Renamed to ... (PREFIX_MOD_0_0FC3): This. (dis386_twobyte): Replace PREFIX_0FC3 with MOD_0FC3. (prefix_table): Replace Ma with Ev on movntiS. (mod_table): Add MOD_0FC3. commit c6e8a9a802bcd3a96ef14b6ea1b6cd60d5d8d065 Author: H.J. Lu Date: Thu Jul 30 03:27:44 2015 -0700 Don't change the default symbol for relocatable link We should change the default symbol for the versioned symbol only when not performing a relocatable link. bfd/ PR ld/18735 * elflink.c (_bfd_elf_add_default_symbol): Add the default symbol if not performing a relocatable link. (elf_link_add_object_symbols): Adjust the default symbol if not performing a relocatable link. ld/testsuite/ PR ld/18735 * ld-elf/pr18735.d: New file. * ld-elf/pr18735.s: Likewise. commit 13be649613bb62e75296d1f69a7c889ddf29a564 Author: GDB Administrator Date: Thu Jul 30 00:00:08 2015 +0000 Automatic date update in version.in commit aa58a496ed9a3ee19233af0bfb7c76ae02b9b2c1 Author: Simon Marchi Date: Wed Jul 29 17:15:46 2015 -0400 MIPS ptrace build fixes Since Pedro's ptrace cleanups, the MIPS buildbot compilation fails. Code in MIPS native uses ptrace with 3 arguments, where ptrace requires 4. When looking at the definition of ptrace in /usr/include/sys/ptrace.h, it shows that it takes a variable number of arguments. The wrapper macro in nat/gdb_ptrace.h takes a fixed number of arguments (4). That would explain why it used to work and stopped. I am pushing this as obvious, tell me if there is any problem. I built-tested this with a MIPS toolchain (ct-ng), but I don't have any setup to test it. At least it should put back the buildbot builder in a better shape. gdb/ChangeLog: * mips-linux-nat.c (write_watchpoint_regs): Add NULL as ptrace's 4th parameter. (mips_linux_new_thread): Likewise. * nat/mips-linux-watch.c (mips_linux_read_watch_registers): Likewise. gdb/gdbserver/ChangeLog: * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as ptrace's 4th parameter. commit d618e4c51c73f2139a1aa8903d677a4202956f21 Author: Patrick Palka Date: Wed Jul 29 12:44:21 2015 -0400 batch-preserve-term-settings.exp: use send_quit_command some more Just a slight cleanup. Committed as obvious. gdb/testsuite/ChangeLog: * gdb.base/batch-preserve-term-settings.exp (test_terminal_settings_preserved_after_cli_exit): Use send_quit_command. commit 60b57502ec8b600dac3fe53aa6615965f0430a6d Author: H.J. Lu Date: Wed Jul 29 11:20:04 2015 -0700 Use noclone attribute only for GCC 4.5 or newer noclone attribute was added to GCC 4.5. We should check GCC version before using it. * ld-elf/pr18718.c (bar): Use noclone attribute only for GCC 4.5 or newer. commit de0a00263930c9ed3e4e330a0d8573df4805fe87 Author: H.J. Lu Date: Wed Jul 29 10:51:08 2015 -0700 Move run-time support check for size relocation We must check run-time support for size relocation first before running the tests. * ld-size/size.exp: Move run-time support check. commit 06265e53f4657a86f3ac3485552b97c942c9f4ac Author: Patrick Palka Date: Wed Jul 29 11:59:25 2015 -0400 Test that terminal settings are restored after quitting via SIGTERM Tested on x86_64 Debian Stretch, native, gdbserver and extended-gdbserver. Also tested that the various error paths, like if $PPID is empty or if SIGTERM did not not kill GDB, function correctly. gdb/testsuite/ChangeLog: * gdb.base/batch-preserve-term-settings.exp (send_quit_command): New proc. (test_terminal_settings_preserved_after_sigterm): New test. commit e77e648e93adf564fb10e725e4d8800d30a83eb5 Author: H.J. Lu Date: Wed Jul 29 09:11:15 2015 -0700 Don't set link_info.executable for "ld -r" This patch changes "ld -r" not to set link_info.executable. It removes !info->relocatable check for info->executable and adds it for !info->executable in elflink.c. bfd/ * elflink.c (elf_link_add_object_symbols): Remove !info->relocatable check for info->executable. Add !info->relocatable check for !info->executable. (elf_link_output_extsym): Remove !info->relocatable check for info->executable. ld/ * lexsup.c (parse_args): Don't set link_info.executable to TRUE for link_info.relocatable. commit 1eef6428112a1c1fe0295f36f92d7a3cf9908228 Author: Pedro Alves Date: Wed Jul 29 16:24:53 2015 +0100 Make gdb.base/multi-forks.exp work with the native-extended-gdbserver board Now that we can expect inferior output with the gdbserver boards, this is all it takes to have the test pass against extended-remote gdbserver. Don Breazeal originally wrong something like this: https://sourceware.org/ml/gdb-patches/2015-03/msg00506.html which was what originally inspired the introduction of $inferior_spawn_id. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves Don Breazeal * gdb.base/multi-forks.exp (continue_to_exit_bp_loc): Expect output from both inferior_spawn_id and gdb_spawn_id. commit 7da5b897c96faa3c520662d2b0bd4837567bfb1d Author: Sergio Durigan Junior Date: Wed Jul 29 11:10:49 2015 -0400 Uniquefy gdb.threads/attach-into-signal.exp Hi, While examining BuildBot's logs, I noticed: gdb.threads/attach-into-signal.exp has two nested loops and don't use unique messages. This commit fixes that. Pushed under the obvious rule. gdb/testsuite/ChangeLog: 2015-07-29 Sergio Durigan Junior * gdb.threads/attach-into-signal.exp (corefunc): Use with_test_prefix on nested loops, uniquefying the test messages. commit dac804dfa6389b71f50b5e169ffa4e239958e774 Author: Sergio Durigan Junior Date: Wed Jul 29 10:16:38 2015 -0400 Fix typo in gdb.python/py-objfile.exp My last commit d60a92216e5d599fed6b37c58c744debe38a0b24 introduced a regression caused by a typo. This fixes it. Checked in as obvious. Thanks to Pedro for reporting. gdb/testsuite/ChangeLog: 2015-07-29 Sergio Durigan Junior * gdb.python/py-objfile.exp: Fix typo that snuck in from my last commit. commit 18206ca3f9367f1488cdfc1475f8da072e7e9636 Author: Patrick Palka Date: Mon Jul 27 11:54:07 2015 -0400 Make sure terminal settings are restored before exiting When exiting GDB -- whether it's via the "quit" command, via a SIGTERM, or otherwise -- we should leave the terminal in the state we acquired it. To that end, we have to undo any modifications that may have been made by the TUI (ncurses) or by the CLI (readline). Tested on x86_64 Debian Stretch. gdb/ChangeLog: * top.c: Include "tui/tui.h". (undo_terminal_modifications_before_exit): New static function. (quit_force): Use it. gdb/testsuite/ChangeLog: * gdb.base/batch-preserve-term-settings.exp (test_terminal_settings_preserved_after_cli_exit): New test. commit 7afa63c624ae570472381b8e35ce066bf145844a Author: Patrick Palka Date: Tue Jul 28 13:58:17 2015 -0400 Initialize terminal_state to terminal_is_ours Right now this variable is initialized to 0 i.e. terminal_is_inferior and does not get set to terminal_is_ours until target_terminal_init() is called. This function however only gets called when an inferior is first created. In the meantime, terminal_state would wrongly remain set to terminal_is_inferior. Tested on x86_64 Debian Stretch -- native, gdbserver and extended-gdbserver. gdb/ChangeLog: * target.c (terminal_state): Initialize to terminal_is_ours. commit 90074d118de70c5eb2c71ba83e58d96359149d79 Author: Patrick Palka Date: Mon Jul 27 22:10:13 2015 -0400 Clean up batch-preserve-term-settings.exp See ChangeLog for details. No functional change intended. Tested on x86_64 Debian Stretch by verifying that the gdb.log output remains unchanged for native, gdbserver and extended-gdbserver. gdb/testsuite/ChangeLog: * gdb.base/batch-preserve-term-settings.exp: Remove top-level manipulation of saved_gdbflags. (test_terminal_settings_preserved): Remove global declaration of the unused variable pagination_prompt. Remove manipulation of saved_gdbflags. Use a local variable EXTRA_GDBFLAGS instead of GDBFLAGS. commit cc9f16aa882eb22cb2128c5eb8237fd453ab2988 Author: Yao Qi Date: Wed Jul 29 12:43:10 2015 +0100 PR record/18691: Fix fails in solib-precsave.exp We see the following regressions in testing on x86_64-linux, reverse-step^M Cannot access memory at address 0x2aaaaaed26c0^M (gdb) FAIL: gdb.reverse/solib-precsave.exp: reverse-step into solib function one when GDB reverse step into a function, GDB wants to skip prologue so it requests TARGET_OBJECT_CODE_MEMORY to read some code memory in memory_xfer_partial_1. However in dcache_read_memory_partial, the object becomes TARGET_OBJECT_MEMORY return ops->to_xfer_partial (ops, TARGET_OBJECT_MEMORY, NULL, myaddr, NULL, memaddr, len, xfered_len); in reverse debugging, ops->to_xfer_partial is record_full_core_xfer_partial and it will return TARGET_XFER_E_IO because it can't find any records. The test fails. At this moment, the delegate relationship is like dcache -> record-core -> core -> exec and we want to GDB read memory across targets, which means if the requested memory isn't found in record-core, GDB can read memory from core, and exec even further if needed. I find raw_memory_xfer_partial is exactly what I want. gdb: 2015-07-29 Yao Qi PR record/18691 * dcache.c (dcache_read_memory_partial): Call raw_memory_xfer_partial. * target.c (raw_memory_xfer_partial): Make it non-static. * target.h (raw_memory_xfer_partial): Declare. commit eb1a79028c63ca565850c5d64ae60193f90cd841 Author: Pedro Alves Date: Wed Jul 29 11:09:46 2015 +0100 Don't set gdb,noinferiorio on gdbserver boards As all tests that check gdb,noinferiorio have been adjusted to expect inferior output with "-i $inferior_spawn_id", we can remove this now, and thus enable those tests against gdbserver. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * boards/gdbserver-base.exp: Don't set gdb,noinferiorio. commit 8b75dd3b8a32e790d7d9f1621ad4fbb6d7af9e8e Author: Pedro Alves Date: Wed Jul 29 11:09:46 2015 +0100 interrupt.exp: Revert back to checking gdb,noinferiorio at the top The following patch will remove the gdb,noinferiorio setting from the gdbserver boards, so this bit can be reverted. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.base/interrupt.exp: Revert back to checking gdb,noinferiorio at the top. commit dedad4e3d2ed1d6ecdb89422fc0baa028021f19d Author: Pedro Alves Date: Wed Jul 29 11:09:45 2015 +0100 Unbuffer all tests that rely on stdio This forces all tests that rely on stdio to be unbuffered, like interrupt.exp was adjusted in 6f98576f. To recap, in some scenarios, GDB or GDBserver can be spawned with input _not_ connected to a tty, and then tests that rely on stdio fail with timeouts, because the inferior's stdout and stderr streams end up fully buffered. Calling gdb_unbuffer_output forces output to be unbuffered. See https://sourceware.org/ml/gdb-patches/2015-02/msg00809.html and https://sourceware.org/ml/gdb-patches/2015-02/msg00819.html. Tested on x86_64 Fedora 20, native, and against a remote gdbserver board file that connects to the target with ssh, with and without -t (create pty). gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.base/call-ar-st.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/call-rt-st.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/call-strs.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/call-strs.exp: Adjust to step over the gdb_unbuffer_output call. * gdb.base/catch-gdb-caused-signals.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/dprintf.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/ending-run.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/run.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/shlib-call.exp: Adjust to step over the gdb_unbuffer_output call. * gdb.base/shmain.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/sizeof.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/varargs.c: Include "../lib/unbuffer_output.c". (main): Rename to ... (test): ... this. (main): Reimplement. * gdb.base/varargs.exp: Run to test instead of to main. * gdb.mi/mi-dprintf.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. commit 58789a917b7eed57c5200ec0a4d8a2fc44efc64c Author: Pedro Alves Date: Wed Jul 29 11:09:45 2015 +0100 Make gdb.mi/mi-dprintf.exp use $inferior_spawn_id gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.mi/mi-dprintf.exp (mi_expect_dprintf): New procedure, factore out from mi_continue_dprintf. For call-style dprintfs, expect dprintf output out of $inferior_spawn_id. (mi_continue_dprintf): Use mi_expect_dprintf. * gdb.mi/mi-dprintf.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. commit e8376742bdba233d14cfbff91776be065ae27587 Author: Pedro Alves Date: Wed Jul 29 11:09:44 2015 +0100 Adjust MI to $inferior_spawn_id Rather than trying to determine where (which spawn id) the inferior output comes out from, which depends on e.g., remote that supports file i/o remote protocol extension, vs remote that sends inferior output through a separate $inferior_spawn_id, vs native debugging, which sends output through $gdb_spawn_id, vs native debugging with a test that uses "separate-inferior-tty" (like mi-console.exp does), always expect inferior output from both $inferior_spawn_id and $gdb_spawn_id. mi-console.exp itself already copes with different possible outputs in a similar way: # Combine both outputs in a single pattern. set output "($semihosted_output|$native_output)" Fixes: FAIL: gdb.mi/mi-console.exp: Testing console output inferior output (timeout) when testing against local gdbserver with gdb,noinferiorio removed from the board file. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * lib/mi-support.exp (mi_inferior_spawn_id): Delete. (default_mi_gdb_start): Set inferior_spawn_id instead of mi_inferior_spawn_id. If $inferior_spawn_id is not set, set it to gdb_spawn_id. (mi_gdb_test): Always expect inferior output from both $inferior_spawn_id and $gdb_spawn_id. commit 0828001082ea8dfd223211373fb912d47f715827 Author: Pedro Alves Date: Wed Jul 29 11:09:44 2015 +0100 Make gdb.gdb/selftest.exp use '-i $inferior_spawn_id' gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.gdb/selftest.exp (test_with_self): Update comment. Use send_inferior and $inferior_spawn_id. commit 4d30e4328fd344ef6f26c7ee520d08813da69a33 Author: Pedro Alves Date: Wed Jul 29 11:09:43 2015 +0100 Make gdb.gdb/complaints.exp use '-i $inferior_spawn_id' and gdb_test_stdio gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.gdb/complaints.exp (test_initial_complaints) (test_serial_complaints, test_short_complaints): Use gdb_test_stdio. (test_empty_complaint): Handle $inferior_spawn_id != $gdb_spawn_id. commit 0d30a335a6747bb0e2847e0aee2ba958cf19dac7 Author: Pedro Alves Date: Wed Jul 29 11:09:43 2015 +0100 Make gdb.base/varargs.exp use gdb_test_stdio gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.base/varargs.exp: Use gdb_test_stdio. commit 39413b296f9eb92ae3936bf29397ac1d35ca803b Author: Pedro Alves Date: Wed Jul 29 11:09:42 2015 +0100 Make gdb.base/shlib-call.exp use gdb_test_stdio gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.base/shlib-call.exp: Use gdb_test_stdio. commit 7cb000a97ebcf7f23fe1b63fbbdd86d87b8c8634 Author: Pedro Alves Date: Wed Jul 29 11:09:42 2015 +0100 Make gdb.base/ending-run.exp use gdb_test_stdio gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.base/ending-run.exp: Use gdb_test_stdio. commit d7b8ac8297642399a10216068b8003cd778b7237 Author: Pedro Alves Date: Wed Jul 29 11:09:41 2015 +0100 Make gdb.base/call-rt-st.exp use $inferior_spawn_id gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.base/call-rt-st.exp (print_struct_call): Split "result" parameter into two new parameters, "inf_result" and "gdb_result". Expect inferior output and gdb output from $inferior_spawn_id and $gdb_spawn_id, respectively. Adjust all callers. commit 789c3a0cc3b1ace2d54ecc37fdbdb967f1810aaf Author: Pedro Alves Date: Wed Jul 29 11:09:40 2015 +0100 Make gdb.base/call-ar-st.exp use gdb_test_stdio gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.base/call-ar-st.exp: Use gdb_test_stdio+multi_line instead of gdb_test_sequence. commit 77e760c3aae925fef163d866a651079fea5f3143 Author: Pedro Alves Date: Wed Jul 29 11:09:40 2015 +0100 Make gdb.base/a2-run.exp use $inferior_spawn_id and gdb_test_stdio This one is a little more complicated than the other patches in this series, because of the exit status wrapper handling, requiring a little state machine. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.base/a2-run.exp (saw_usage, saw_exit_wrapper) (saw_spurious_output): Expect inferior output from $inferior_spawn_id. Use gdb_test_stdio. commit 8396d2cdf4b013b237bf8cca306bbec602bdbb72 Author: Pedro Alves Date: Wed Jul 29 11:09:39 2015 +0100 Make gdb.base/dprintf.exp use gdb_test_stdio This one needed a larger revamp. The issue is that the "info breakpoints" test at the bottom of the file is broken on targets that can do both server-side dprintf, and inferior I/O, because then neither the breakpoint numbers match nor the "already hit N times" output. Address that by making the test restart gdb from scratch when switching between dprintf styles. Test groups are factored into procedures, and we now use with_test_prefix. While we're changing test messages, lowercase a few test messages, and then while at it, modernize a couple things here and there. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.base/dprintf.exp: Use standard_testfile. Change prepare_for_testing call. (srcfile): Don't set. (restart): New procedure. (test_dprintf): New procecure, use to continue over dprintfs. (test_call, test_agent): New procedures, tests moved here. Restart gdb and recreate dprintfs. Adjust expected output. commit 2051d61f76bc009f42d094e57fa0e7114fb23a4e Author: Pedro Alves Date: Wed Jul 29 11:09:39 2015 +0100 Make gdb.base/catch-gdb-caused-signals.exp use gdb_test_stdio gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.base/catch-gdb-caused-signals.exp: Use gdb_test_stdio. commit 452397af30f68f6d4ed05fa6d9fc30ca70cbe7f9 Author: Pedro Alves Date: Wed Jul 29 11:09:38 2015 +0100 Make gdb.base/call-strs.exp use gdb_test_stdio gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.base/call-strs.exp: Use gdb_test_stdio instead of gdb_test. commit 8aed9555b232946606f3fb9370c1657a71c2afaf Author: Pedro Alves Date: Wed Jul 29 11:09:38 2015 +0100 Make gdb.base/sizeof.exp use gdb_test_stdio gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.base/sizeof.exp (check_sizeof, check_valueof): Use gdb_test_stdio. commit 188a61b4404369ae30dce95ad4b05975a3609a33 Author: Pedro Alves Date: Wed Jul 29 11:09:37 2015 +0100 Introduce gdb_test_stdio This adds a new helper procedure to be used by tests that rely on stdio. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * lib/gdb.exp (gdb_test_stdio): New procedure. commit 12264a451d993a0a8635be82bed15618e0f4645f Author: Pedro Alves Date: Wed Jul 29 11:09:37 2015 +0100 Don't rely on inferior I/O in gdb.base/restore.exp There seems to be no point in relying on stdio here. Simply use gdb_continue_to_end instead. (not removing the printf calls, as the .c file is half generated.) gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.base/restore.exp (restore_tests): Use gdb_continue_to_end. commit 23ffc893f5693f20dc807c6a7daad402de0c2e51 Author: Pedro Alves Date: Wed Jul 29 11:09:36 2015 +0100 Don't rely on inferior I/O in {call-signal-resume, unwindonsignal}.exp These tests rely on inferior I/O, but that seems pointless and unrelated here. Simply remove the printf calls, and don't expect them. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.base/call-signal-resume.exp: Remove check for gdb,noinferiorio. Don't expect "no signal". Use gdb_test. * gdb.base/unwindonsignal.exp: Likewise. * gdb.base/call-signals.c (gen_signal): Remove printf call. * gdb.base/unwindonsignal.c (gen_signal): Likewise. commit 655669183104eb8eab559b5faf2b5a676ab6cd3f Author: Pedro Alves Date: Wed Jul 29 11:09:36 2015 +0100 Don't rely on inferior I/O in gdb.base/siginfo-addr.exp No point in relying on stdio in this test. Simply run to a breakpoint instead. gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves * gdb.base/siginfo-addr.c (pass): New function. (handler): Call it iff si_addr is correct. * gdb.base/siginfo-addr.exp: Remove gdb_skip_stdio_test check. Set a breakpoint at "pass" and continue to it. commit 11509220a045532b1995b4af5dac2f921b541003 Author: Hans-Peter Nilsson Date: Wed Jul 29 05:39:27 2015 +0200 bfd/mmo.c (MMIX): Fix massive gcc LTO testsuite failures. * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type assignment loop for bfd plugin objects. commit a66f09dd911338fb02ee40cec3840f579f533262 Author: GDB Administrator Date: Wed Jul 29 00:00:09 2015 +0000 Automatic date update in version.in commit d60a92216e5d599fed6b37c58c744debe38a0b24 Author: Sergio Durigan Junior Date: Tue Jul 28 17:38:14 2015 -0400 Uniquify test names from gdb.python/{py-objfile.exp,py-pp-registration.exp} While running some regression tests, I noticed that the two Python tests mentioned in the $SUBJECT contain non-unique names. This is a violation of our guidelines: And also makes things harder for BuildBot. So I hacked both testcases and made every test name unique. I guess this could be considered an obvious patch, but I decided to post it before pushing because others may have different opinions about the names. OK to apply? gdb/testsuite/ChangeLog: 2015-07-28 Sergio Durigan Junior * gdb.python/py-objfile.exp: Make some tests have unique names. * gdb.python/py-pp-registration.exp: Likewise. commit bde40b8f563dd682b9c6bcb8e24c3f5bd944a4f6 Author: Pedro Alves Date: Tue Jul 28 18:04:07 2015 +0100 Fix gdb.server/server-exec-info.exp with the extended-remote board This test fails with --target_board=native-extended-gdbserver because it misses the usual "disconnect": (gdb) spawn ../gdbserver/gdbserver --once :2347 /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.server/server-exec-info Process /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.server/server-exec-info created; pid = 4736 Listening on port 2347 target extended-remote localhost:2347 Already connected to a remote target. Disconnect? (y or n) ^CsQuit (gdb) et sysroot remote: Undefined command: "et". Try "help". (gdb) n The program is not being run. (gdb) FAIL: gdb.server/server-exec-info.exp: set sysroot remote: (got interactive prompt) info files (gdb) FAIL: gdb.server/server-exec-info.exp: info files gdb/testsuite/ChangeLog: 2015-07-28 Pedro Alves * gdb.server/server-exec-info.exp: Issue a "disconnect". commit 3ae385afe150f2e001a1cc8fb14f4ba0ab94cdf2 Author: Simon Marchi Date: Tue Jul 28 11:01:50 2015 -0400 Consider addressable memory unit size in various value functions This patch updates various value handling functions to make them consider the addressable memory unit size of the current architecture. This allows to correctly extract and print values on architectures whose addressable memory unit is not 8 bits. The patch doesn't cover all the code that would ideally need to be adjusted, only the code paths that we happen to use, plus a few obvious ones. Specifically, those areas are not covered by this patch: - Management of unavailable bits - Bitfields - C++ stuff Regression-tested on x86-64 Ubuntu 14.04. I saw no related test result change. gdb/ChangeLog: * c-valprint.c (c_val_print_array): Consider addressable memory unit size. (c_val_print_ptr): Likewise. (c_val_print_int): Likewise. * findvar.c (read_frame_register_value): Likewise. * valarith.c (find_size_for_pointer_math): Likewise. (value_ptrdiff): Likewise. (value_subscripted_rvalue): Likewise. * valops.c (read_value_memory): Likewise (and rename variables). (value_assign): Likewise. (value_repeat): Likewise. (value_array): Likewise. (value_slice): Likewise. * valprint.c (generic_val_print_ptr): Likewise. (generic_val_print_enum): Likewise. (generic_val_print_bool): Likewise. (generic_val_print_int): Likewise. (generic_val_print_char): Likewise. (generic_val_print_float): Likewise. (generic_val_print_decfloat): Likewise. (generic_val_print_complex): Likewise. (val_print_scalar_formatted): Likewise. (val_print_array_elements): Likewise. * value.c (set_value_parent): Likewise. (value_contents_copy_raw): Likewise. (set_internalvar_component): Likewise. (value_primitive_field): Likewise. (value_fetch_lazy): Likewise. * value.h (read_value_memory): Update comment. commit e512cdbdffafefa63baeb835ba6636fcef56e17d Author: Simon Marchi Date: Tue Jul 28 11:01:50 2015 -0400 Introduce get_value_arch Similar to get_type_arch, used to get the gdbarch associated to a struct value. gdb/ChangeLog: * value.c (get_value_arch): New function. * value.h (get_value_arch): New declaration. commit 3723fda829671b273d7b31a0753bb1fa8f614cb6 Author: Simon Marchi Date: Tue Jul 28 11:01:49 2015 -0400 Update comments in struct value for non-8-bits architectures gdb/ChangeLog: * value.c (struct value): Update comments. commit 2e0569314c2ee9e5635899d47b0bc0a4b9b08d8d Author: Simon Marchi Date: Tue Jul 28 11:01:49 2015 -0400 Update comment for struct type's length field, introduce type_length_units This patch tries to clean up a bit the blur around the length field in struct type, regarding its use with architectures with non-8-bits addressable memory. It clarifies that the field is expressed in host bytes, which is what is the closest to the current reality. It also introduces a new function to get the length of the type in target addressable memory units. gdb/ChangeLog: * gdbtypes.c (type_length_units): New function. * gdbtypes.h (type_length_units): New declaration. (struct type) : Update comment. commit c6e5c03a2c0dfa224a71056ede035476e511f5fc Author: Robert Suchanek Date: Tue Jul 28 11:26:39 2015 +0100 Add cores for M5100 series gas/ * config/tc-mips.c (mips_cpu_info_table): Add m5100 and m5101 entries. * doc/c-mips.texi: Document m5100 and m5101 for -march=. commit 77403ce9669d35b286b3ca75fdc1e4c61f36b59a Author: Robert Suchanek Date: Tue Jul 28 11:26:31 2015 +0100 Add -march=interaptiv gas/ * config/tc-mips.c (mips_cpu_info_table): Add interaptiv entry. * doc/c-mips.text: Document -march=interaptiv. commit e5654c0f8492e65b3e3ac5e1a2276856049eb1b1 Author: Alan Modra Date: Tue Jul 28 11:03:57 2015 +0930 Fallout from "Reorder more powerpc64 sections for -z relro" Commit 23283c1b changed the layout of some bss style sections on powerpc64, but neglected to add a page gap before the third PT_LOAD segment created by this reording. Without a page gap we get two PT_LOAD headers that overlap by one page in memory. That shouldn't be allowed because the dynamic loader will load garbage from the first page of the last segment over the last page of the previous segment. bfd/ * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new segment for loaded sections after nonloaded sections if the sections are on the same page. ld/testsuite/ * ld-powerpc/elfv2so.d: Update commit d6f1bafa2c05241b89c0303a9f6a2af89f51c39c Author: Iain Buclaw Date: Tue Jul 28 09:57:32 2015 +0200 Check for asprintf and vasprintf during configure stage. This should fix some build errors seen on AIX, MinGW, and possibly other non-GNU systems too due to missing asprintf(). bfd/ * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS. * config.in, configure: Regenerate. commit 671c4e31fb12f1bee30d3bb5f8ad95f17d8d4663 Author: GDB Administrator Date: Tue Jul 28 00:00:08 2015 +0000 Automatic date update in version.in commit 6f8ea6c424a3ceda065c39903065cfb251add37d Author: H.J. Lu Date: Mon Jul 27 16:16:17 2015 -0700 Set NOPIE_CFLAGS and NOPIE_LDFLAGS GCC 6 can be configured to generate PIE by default. But some linker size tests expect non-PIE. This patch defines NOPIE_CFLAGS to "-fno-PIE" and NOPIE_LDFLAGS to "-no-pie" if target compiler supports them. Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS to linker size tests if needed. * config/default.exp (NOPIE_CFLAGS): New. (NOPIE_LDFLAGS): Likewise. * ld-size/size.exp (run_cc_link_tests): Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if needed. (run_ld_link_exec_tests): Add $NOPIE_CFLAGS if needed. commit 13e1dec8960122ec0329f74e5915503e14db5ea2 Author: Simon Marchi Date: Mon Jul 27 15:49:24 2015 -0400 gdb.mi/mi-pending.c: Return NULL instead of nothing in thread function Using gcc 5.2 (maybe other versions as well), building mi-pending.c gives these warnings: ./gdb.mi/mi-pending.c: In function ‘thread_func’: ./gdb.mi/mi-pending.c:34:5: warning: ‘return’ with no value, in function returning non-void return; ^ ./gdb.mi/mi-pending.c:38:5: warning: ‘return’ with no value, in function returning non-void return; ^ gdb_compile_pthreads assumes that the build was successful only if there is no output. These warnings therefore make gdb_compile_pthreads think that the build failed, and the test doesn't run. The easy fix is to replace the "return" with "return NULL". I am pushing this as obvious. gdb/testsuite/ChangeLog: * gdb.mi/mi-pending.c (thread_func): Replace return with return NULL. commit da33c9a7bff093e772a381bf9ab42d876089cdcf Author: Simon Marchi Date: Mon Jul 27 15:02:10 2015 -0400 Remove xfail in gdb.mi/mi-watch.exp I noticed there was an unexpected pass in mi-watch.exp when running on x86_64. Doing a bit of archeology shows that the xfail was added by 4a543da. This particular test failed on the MIPS architecture, which the original contributor was working with. Here is the thread: https://www.sourceware.org/ml/gdb-patches/2007-09/msg00151.html Looking at the latest buildbot results for MIPS, it seems that it's also an unexpected pass on that architecture. Therefore, I see no reason to leave the xfail in place. gdb/testsuite/ChangeLog: * gdb.mi/mi-watch.exp (test_watchpoint_triggering): Remove xfail. commit 0c87c0bfdfe19d5e2b8938d1db42c43e7b19e53f Author: Simon Marchi Date: Mon Jul 27 14:11:26 2015 -0400 Factor out complex printing code from generic_val_print gdb/ChangeLog: * valprint.c (generic_val_print): Factor out complex printing code to ... (generic_val_print_complex): ... this new function. commit 9550ae5e548dd63599ffadedfe8d1768bfc94072 Author: Simon Marchi Date: Mon Jul 27 14:11:25 2015 -0400 Factor out decfloat printing code from generic_val_print gdb/ChangeLog: * valprint.c (generic_val_print): Factor out decfloat printing code to ... (generic_val_print_decfloat): ... this new function. commit 7784724bb1b8a5732239e27935cd76813b9df35c Author: Simon Marchi Date: Mon Jul 27 14:11:24 2015 -0400 Factor out float printing code from generic_val_print gdb/ChangeLog: * valprint.c (generic_val_print): Factor out float printing code to ... (generic_val_print_float): ... this new function. commit 385f5affc00e88ad6ff0f8287bb3c1c43d59351c Author: Simon Marchi Date: Mon Jul 27 14:11:24 2015 -0400 Factor out char printing code from generic_val_print gdb/ChangeLog: * valprint.c (generic_val_print): Factor out char printing code to ... (generic_val_print_char): ... this new function. commit b21b63420be3857c1d0e2676e1214d63fe38ed3d Author: Simon Marchi Date: Mon Jul 27 14:11:23 2015 -0400 Factor out int printing code from generic_val_print gdb/ChangeLog: * valprint.c (generic_val_print): Factor out integer printing code to ... (generic_val_print_int): ... this new function. commit e5bead4b23122be39e0bf32889fd609df6299e1c Author: Simon Marchi Date: Mon Jul 27 14:11:23 2015 -0400 Factor out bool printing code from generic_val_print gdb/ChangeLog: * valprint.c (generic_val_print): Factor out bool printing code to ... (generic_val_print_bool): ... this new function. commit 4a8c372f1f82d1be24d2575e5979690efd839e08 Author: Simon Marchi Date: Mon Jul 27 14:11:22 2015 -0400 Factor out function/method printing code from generic_val_print gdb/ChangeLog: * valprint.c (generic_val_print): Factor out function/method printing code to ... (generic_val_print_func): ... this new function. commit d93880bd1cd10d0ccf5346e261d5d145d50d8ab0 Author: Simon Marchi Date: Mon Jul 27 14:11:22 2015 -0400 Factor out flags printing code from generic_val_print gdb/ChangeLog: * valprint.c (generic_val_print): Factor out flags printing code to ... (generic_val_print_flags): ... this new function. commit ef0bc0dd961898d393627c3d502ad168028d7c40 Author: Simon Marchi Date: Mon Jul 27 14:11:21 2015 -0400 Factor out enum printing code from generic_val_print gdb/ChangeLog: * valprint.c (generic_val_print): Factor out enum printing code to ... (generic_val_print_enum): ... this new function. commit fe43fede4726122efbee9d52b9e68b47be97757f Author: Simon Marchi Date: Mon Jul 27 14:11:21 2015 -0400 Factor out reference printing code from generic_val_print gdb/ChangeLog: * valprint.c (generic_val_print): Factor out reference printing code to ... (generic_val_print_ref): ... this new function. commit 45000ea2f350fae68b4524059ae1876f8e89f2bb Author: Simon Marchi Date: Mon Jul 27 14:11:20 2015 -0400 Factor out memberptr printing code from generic_val_print gdb/ChangeLog: * valprint.c (generic_val_print): Factor out memberptr printing code to ... (generic_val_print_memberptr): ... this new function. commit 81eb921ae109e875b9df6435ac6947181d824a67 Author: Simon Marchi Date: Mon Jul 27 14:11:19 2015 -0400 Factor out pointer printing code from generic_val_print gdb/ChangeLog: * valprint.c (generic_val_print): Factor out pointer printing code to ... (generic_val_print_ptr): ... this new function. commit 557dbe8a5ea7f87fd9e6910997ca04f306cab195 Author: Simon Marchi Date: Mon Jul 27 14:11:19 2015 -0400 Factor out array printing code from generic_val_print gdb/ChangeLog: * valprint.c (generic_val_print): Factor out array printing code to ... (generic_val_print_array): ... this new function. commit 9f436164d55690a0b3d2e4308bfd8834996b97d1 Author: Simon Marchi Date: Mon Jul 27 14:11:18 2015 -0400 Factor out print_unpacked_pointer from generic_val_print gdb/ChangeLog: * valprint.c (generic_val_print): Factor out print_unpacked_pointer code to ... (print_unpacked_pointer): ... this new function. commit c45bd4fd43e5eb0cbad8ec410504e4778c64c65d Author: H.J. Lu Date: Mon Jul 27 10:04:31 2015 -0700 Check address of versined symbol Since GCC 5 folds symbol address comparison, assuming each symbol has a different address, &foo == &bar is always false for GCC 5. This patch adds check_ptr_eq if 2 addresses are the same and uses it to check the address of versined symbol. PR ld/18718 * ld-elf/check-ptr-eq.c: New file. * ld-elf/pr18718.c (main): Call check_ptr_eq. * ld-elf/shared.exp: Add check-ptr-eq.c to PR ld/18718 tests. commit 077836f7cf6725386c01ae3bb7111663b8f2b85e Author: Patrick Palka Date: Fri Jul 24 13:58:47 2015 -0400 Have SIGTERM promptly quit GDB even when the dummy target is active GDB currently does not promptly quit after receiving a SIGTERM while no proper target is active. This is because in handle_sigterm we currently look at target_can_async_p to determine whether to asynchronously quit GDB using an async signal handler or to asynchronously quit using the quit flag. However, target_can_async_p is always false under the dummy target, so under this target we always use the quit flag and not the async signal handler to signal that GDB should quit. So GDB won't quit until a code path that checks the quit flag is executed. To fix this issue, this patch makes the SIGTERM handler no longer inspect target_can_async_p, and instead makes the handler unconditionally set the quit flag _and_ mark the corresponding async signal handler, so that if the target is async (or if it's the dummy target) then we will likely quit through the async signal handler, and if it's not async then we will likely quit through the quit flag. This redundant approach is similar to how we handle SIGINT. gdb/ChangeLog: * event-top.c (handle_sigterm): Don't inspect target_can_async_p. Always set the quit flag and always mark the async signal handler. gdb/testsuite/ChangeLog: * gdb.base/gdb-sigterm-2.exp: New test. commit 50904b25ecf09f14c9406157b7f51255b21f54c0 Author: Yao Qi Date: Mon Jul 27 16:15:48 2015 +0100 [gdbserver] Don't set srv_linux_usrregs for aarch64*-*-linux* We don't use PTRACE_PEEKUSR/PTRACE_POKEUSR on aarch64-linux, so don't need to set srv_linux_usrregs. This patch removes that line. gdb/gdbserver: 2015-07-27 Yao Qi * configure.srv (case aarch64*-*-linux*): Don't set srv_linux_usrregs. commit 3a60804fbca012d751d21fde17592df0eee8d82a Author: Yao Qi Date: Mon Jul 27 16:12:31 2015 +0100 Fix ChangeLog entry commit 206350da0f99b9a50fe6405613b3b05561a55aae Author: Yao Qi Date: Thu Jul 23 16:26:14 2015 +0100 Remove REMOTE_EXAMPLES from gdb/Makefile.in I happen to see REMOTE_EXAMPLES isn't used anywhere, so this patch removes it. REMOTE_EXAMPLES was added in the following commit in 1991, commit 86bbb439c8fa01fd55d6cbce102483a471ffd0c4 Author: John Gilmore Date: Fri May 3 19:57:13 1991 +0000 There should be a Makefile in the cvs main directory, configured for "./config.gdb none", so that things like "make tags" and "make tar" will work. and it was used like: TARFILES = ${TAGFILES_MAINDIR} ${OTHERS} ${REMOTE_EXAMPLES} However TARFILES was removed by the change latter in 1994, Tue Aug 16 15:24:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * symtab.c (decode_line_1): If funfirstline and we get a non-LOC_BLOCK symbol (e.g. variable or type), then error(). * Makefile.in (TARFILES, NONSRC, SFILES_STAND, SFILES_KGDB): Remove; unused. Since then, REMOTE_EXAMPLES is not used any more. gdb: 2015-07-27 Yao Qi * Makefile.in (REMOTE_EXAMPLES): Remove it. commit 37a42ee9ad4e4bf635edc87661acb42175f20f91 Author: H.J. Lu Date: Mon Jul 27 07:56:32 2015 -0700 Regenerate configure files bfd/ * configure: Regenerated. binutils/ * configure: Regenerated. gas/ * configure: Regenerated. gold/ * configure: Regenerated. gprof/ * configure: Regenerated. ld/ * configure: Regenerated. opcodes/ * configure: Regenerated. commit 136bb21fda016fcfc97dfeff692ee899951148de Author: H.J. Lu Date: Mon Jul 27 07:49:05 2015 -0700 Sync toplevel files with GCC Sync with GCC 2015-07-24 Michael Darling PR other/66259 * config-ml.in: Reflects renaming of configure.in to configure.ac * configure: Likewise * configure.ac: Likewise commit edb71a9c3838b83424f6eb0ef04eab5b31aa7f4a Author: H.J. Lu Date: Mon Jul 27 07:43:26 2015 -0700 Sync config with GCC Sync with GCC 2015-07-24 Micahel Darling PR other/66259 * gettext.m4: Reflects renaming of configure.in to configure.ac * po.m4: Likewise * stdint.m4: Likewise * tcl.m4: Likewise commit 79559014b26f3c6bc64f29dabce613fa89418ee5 Author: Nick Clifton Date: Mon Jul 27 15:15:28 2015 +0100 Fix the address size computation for the MSP430 port. * elf32-msp430.c (uses_large_model): New function. (msp430_elf_eh_frame_address_size): New function. (elf_backend_eh_frame_address_size): Define. commit 219a6876d48c9986b47d045a41b74cb6c84a2116 Author: H.J. Lu Date: Mon Jul 27 05:18:20 2015 -0700 Append $PLT_CFLAGS to CC/CXX for S-records tests S-records tests don't work with -fno-plt. This path appends $PLT_CFLAGS to CC and CXX for S-records tests. * ld-srec/srec.exp (CC): Save and restore. Append $PLT_CFLAGS. (CXX): Likewise. commit cda77e9efc68d04e50990ea72890bd8e515d4d7b Author: H.J. Lu Date: Mon Jul 27 05:17:26 2015 -0700 Pass $PLT_CFLAGS to ld_compile Some linker shard library tests without PIC expect PLT. This patch passes $PLT_CFLAGS to ld_compile. * ld-shared/shared.exp: Pass $PLT_CFLAGS to ld_compile. commit 379d3f1ffc3fab112a0f388a1565c6be2f74f5c3 Author: H.J. Lu Date: Mon Jul 27 05:16:38 2015 -0700 Append $PLT_CFLAGS to CC for NOCROSSREFS tests NOCROSSREFS tests don't work with -fno-plt. This path appends $PLT_CFLAGS to CC for NOCROSSREFS tests. * ld-scripts/crossref.exp (CC): Save and restore. Append $PLT_CFLAGS. commit ea9fb8b3e9f9624262984ad402f2aac34c65534d Author: H.J. Lu Date: Mon Jul 27 05:15:48 2015 -0700 Add $PLT_CFLAGS to -fPIC for run_cc_link_tests Some x86 linker tests expect PLT. This patch adds $PLT_CFLAGS to -fPIC for run_cc_link_tests. * ld-i386/i386.exp (run_cc_link_tests): Add $PLT_CFLAGS to -fPIC if needed. * ld-x86-64/mpx.exp (run_cc_link_tests): Likewise. * ld-x86-64/x86-64.exp (run_cc_link_tests): Likewise. commit faebca0390ceef085f383d42423e14079dcd0a48 Author: H.J. Lu Date: Mon Jul 27 05:15:01 2015 -0700 Pass $PLT_CFLAGS to ld_compile Some linker visibility tests without PIC expect PLT. This patch passes $PLT_CFLAGS to ld_compile. * ld-elfvsb/elfvsb.exp (visibility_run): Pass $PLT_CFLAGS to ld_compile. commit c4972ed6029abb1a56eeafe144000031d902f074 Author: H.J. Lu Date: Mon Jul 27 05:13:55 2015 -0700 Pass $PLT_CFLAGS to build_binary Some linker symbol version tests without PIC expect PLT. This patch adds $PLT_CFLAGS to CFLAGS. * ld-elfvers/vers.exp (build_vers_lib_no_pic): Pass $PLT_CFLAGS to build_binary. commit e10461aebd2c9165c168583e70e7901e962ed1bb Author: H.J. Lu Date: Mon Jul 27 03:42:39 2015 -0700 Set PLT_CFLAGS to "-fplt" if supported GCC 6 supports -fno-plt. But some linker tests expect PLT. This patch defines PLT_CFLAGS to "-fplt" if target compiler supports it. * config/default.exp (PLT_CFLAGS): New. commit 32f573bcb3aaa1c9defcad79dbb5851fcc02ae2d Author: Szabolcs Nagy Date: Mon Jul 27 11:48:48 2015 +0100 [AArch64] Fix extern protected data handling Emit *GLOB_DAT instead of *RELATIVE relocs for protected data in shared objects. This is needed for the fix of glibc bug 17711: https://sourceware.org/bugzilla/show_bug.cgi?id=17711 bfd: PR ld/18705 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define. ld/testsuite: PR ld/18705 * ld-aarch64/protected-data.d: New. * ld-aarch64/protected-data.s: New. * ld-aarch64/aarch64-elf.exp: Add new test. commit b68a20d6675f1360ea4db50a9835c073675b9889 Author: Szabolcs Nagy Date: Mon Jul 27 11:45:27 2015 +0100 [ARM] Fix extern protected data handling Emit *GLOB_DAT instead of *RELATIVE relocs for protected data in shared objects. This is needed for the fix of glibc bug 17711: https://sourceware.org/bugzilla/show_bug.cgi?id=17711 bfd: PR ld/18705 * elf32-arm.c (elf_backend_extern_protected_data): Define. ld/testsuite: PR ld/18705 * ld-arm/protected-data.d: New. * ld-arm/protected-data.s: New. * ld-arm/arm-elf.exp: Add new test. commit 0c096ed760273eb364d2e4e6def21f688ceff525 Author: GDB Administrator Date: Mon Jul 27 00:00:08 2015 +0000 Automatic date update in version.in commit edcab5e8bdaafdb96b182693a5c8eab020ba3e5c Author: H.J. Lu Date: Sun Jul 26 14:55:39 2015 -0700 Compile PR ld/18718 tests with -O2 PR ld/18718 * ld-elf/shared.exp: Compile PR ld/18718 tests with -O2. commit d76b6207439e16b98aa04f38b730376257b31a62 Author: H.J. Lu Date: Sun Jul 26 11:55:57 2015 -0700 Set errcnt and warncnt to 0 in run_host_cmd_yesno run_host_cmd_yesno should set errcnt and warncnt to 0. Otherwise, they may leak to the next run. * lib/ld-lib.exp (run_host_cmd_yesno): Set errcnt and warncnt to 0. commit ab3b14b04b35e4e9ee8bd8cdb38ef888f0922da5 Author: Doug Kwan Date: Sun Jul 26 00:54:26 2015 -0700 Make arm_unaligned_reloc test less sensitive to disassembler output format. commit c9f35b348e586c0f48592918324b6e15c815a702 Author: Kevin Buettner Date: Fri Jul 10 10:25:29 2015 -0700 remote.c: Make read_ptid return a null value when no thread id is found. When using GDB to debug an RX target using the GDB remote protocol, using a Renesas supplied debug agent, I encountered the following assertion error: thread.c:85: internal-error: inferior_thread: Assertion `tp' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Create a core file of GDB? (y or n) n Command aborted. This assertion error occurs due to the fact that the value associated with inferior_ptid is not on the thread list. The remote debug output (obtained with "set debug remote 1") is fairly short, so I will include it up to the point where things go wrong - which is somewhat before the assertion failure: (gdb) target remote coyote.lan:61234 Remote debugging using coyote.lan:61234 Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+#c9...Ack Packet received: PacketSize=c00;qXfer:memory-map:read-;qXfer:features:read-;QStartNoAckMode+;multiprocess+;QNonStop+ Packet qSupported (supported-packets) is supported Sending packet: $QStartNoAckMode#b0...Ack Packet received: OK Sending packet: $Hgp0.0#ad...Packet received: OK Sending packet: $QNonStop:0#8c...Packet received: OK Sending packet: $qTStatus#49...Packet received: Packet qTStatus (trace-status) is NOT supported Sending packet: $?#3f...Packet received: S02 Sending packet: $qfThreadInfo#bb...Packet received: m1 Sending packet: $qsThreadInfo#c8...Packet received: l Sending packet: $qAttached:a410#bf...Packet received: 0 Packet qAttached (query-attached) is supported Sending packet: $Hc-1#09...Packet received: OK Sending packet: $qC#b4...Packet received: QC not supported Above is the trace starting from the invocation of "target remote" through the call of get_current_thread() in remote_start_remote(). Below, I've pasted this line of code along with additional lines of context. The test following the call is especially important to understanding both the problem and my patch. /* We have thread information; select the thread the target says should be current. If we're reconnecting to a multi-threaded program, this will ideally be the thread that last reported an event before GDB disconnected. */ inferior_ptid = get_current_thread (wait_status); if (ptid_equal (inferior_ptid, null_ptid)) { /* Odd... The target was able to list threads, but not tell us which thread was current (no "thread" register in T stop reply?). Just pick the first thread in the thread list then. */ inferior_ptid = thread_list->ptid; } } Prior to getting to the code pasted above, remote_start_remote() made a call to target_update_thread_list(). This corresponds to the following lines from the above trace: Sending packet: $qfThreadInfo#bb...Packet received: m1 Sending packet: $qsThreadInfo#c8...Packet received: l Sending packet: $qAttached:a410#bf...Packet received: 0 Packet qAttached (query-attached) is supported Once target_update_thread_list has completed, the thread list contains a single entry: {pid = 42000, lwp = 1, tid = 0}. remote_start_remote() then makes a call to set_continue_thread(), accounting for this line of the trace: Sending packet: $Hc-1#09...Packet received: OK Finally, the call to get_current_thread() is responsible for the last line of the trace that I provided above: Sending packet: $qC#b4...Packet received: QC not supported get_current_thread() calls stop_reply_extract_thread() with the wait status. This returns null_ptid. get_current_thread() then calls remote_current_thread with a null inferior_ptid. After the calls to putpkt() and getpkt(), rs->buf[0] is 'Q', so read_ptid() is called and its result is returned. The buffer passed to read_ptid() is " not supported". read_ptid ultimately returns a ptid of {pid = 4200, lwp = 0, tid = 0}. However, this thread is not on the thread list. As noted earlier, the call to target_update_thread_list() had placed {pid = 42000, lwp = 1, tid = 0} on the list. This is the only thread in the list. When these calls ultimately return to remote_start_remote(), inferior_ptid gets set to {pid = 4200, lwp = 0, tid = 0}, which (again) is not on the thread list. It appears to me that the string " not supported" is coming from the debug agent. If so, it should be fixed, but I don't see a reason to not consult the thread list in order to place a valid thread id in inferior_ptid. This (consultation of the thread list) is what is done when inferior_ptid is null_ptid: if (ptid_equal (inferior_ptid, null_ptid)) { /* Odd... The target was able to list threads, but not tell us which thread was current (no "thread" register in T stop reply?). Just pick the first thread in the thread list then. */ inferior_ptid = thread_list->ptid; } My patch causes a null inferior_ptid to be returned by read_ptid when no thread id is found in the response from the debug agent. This return value ends up being returned by remote_current_thread() and then by get_current_thread. The assignment then places this null value into inferior_ptid. That, in turn, allows the ptid_equal test (noted above) to fetch a valid thread from the thread list. I no longer see the assertion failure due a good value (which is on the thread list) being placed in inferior_ptid. This patch also adds two log warnings that may be output when "set debug remote 1" is used. When running against the Renesas debug agent mentioned earlier, this is the relevant portion of the log output: Sending packet: $qC#b4...Packet received: QC not supported warning: garbage in qC reply warning: couldn't determine remote current thread; picking first in list. gdb/ChangeLog: * remote.c (read_ptid): Return null_ptid when no thread id is found. (remote_current_thread): Add log warning for malformed qC reply. (remote_start_remote): Add log warning when current thread not found. commit 805cee45cdf608922af942ff8ff1ccf4da78412b Author: GDB Administrator Date: Sun Jul 26 00:00:11 2015 +0000 Automatic date update in version.in commit 5836a818eccb180d75c92ce4c861abb6fe8dec23 Author: Patrick Palka Date: Sat Jul 25 15:41:05 2015 -0400 Revert "Sync readline/ to version 7.0 alpha" This reverts commit b558ff043d41ba8d17a82f5f9ae5f9dade66160e. This reverts commit 4a11f2065906976675808364ddbd1c0f77eea41f. The initial import commit failed to retain local changes made to readline's configure.in (and the commit message erroneously stated that there were no local changes that needed to be reapplied). Also the import caused a couple of build errors and a scattering of testsuite regressions throughout many arches. It's probably better to start over with this import, hopefully more carefully next time. commit b8cc7b2e9afab37eb9a7cff0d3ae4ebbcf7d494f Author: Doug Evans Date: Sat Jul 25 12:07:28 2015 -0700 Revert: * Makefile.in (check/%.exp): Pass directory for GDB_PARALLEL. Regressions, e.g., http://gdb-build.sergiodj.net/builders/Fedora-x86_64-m32/builds/1501 gdb/testsuite/ChangeLog: Revert: * Makefile.in (check/%.exp): Pass directory for GDB_PARALLEL. (workers/%.worker, build-perf): New rule. (GDB_PERFTEST_MODE): New variable. (check-perf): Use it. (clean): Clean up gdb.perf parallel build subdirs. * lib/build-piece.exp: New file. * lib/cache.exp (gdb_do_cache): Include $GDB_PARALLEL in path name. * lib/gdb.exp (standard_output_file): Include $GDB_PARALLEL in path name. (standard_temp_file): Ditto. (GDB_PARALLEL handling): Make outputs,temp,cache directories as subdirs of $GDB_PARALLEL. commit b558ff043d41ba8d17a82f5f9ae5f9dade66160e Author: Patrick Palka Date: Sat Jul 25 11:14:34 2015 -0400 Don't build readline's shared libs by default Since the sync to version 7.0-alpho, readline now by default builds (unused) shared libraries alongside static libraries, whereas before it only built static libraries. A couple of GDB buildbots were not happy with this change: http://gdb-build.sergiodj.net/builders/AIX-POWER7-plain/builds/240 http://gdb-build.sergiodj.net/builders/Fedora-i686/builds/1518 To get these buildbots building again, this patch alters readline's configure.ac file to not build shared libraries by default, as was the case with readline 6.2. A more permanent fix may be to alter the top-level Makefile.def to pass --disable-shared to readline, or to investigate why these building these shared libraries are giving the buildbots trouble. (I think the proximate reason why the i686 buildbot fails is because it passes CFLAGS=-m32 instead of CC="gcc -m32" to the top-level configure script, and readline's linker commands don't inherit CFLAGS. Not sure about the AIX failure.) readline/ChangeLog.gdb: * configure.ac: Default opt_shared_libs to no. * configure: Regenerate. commit 18d9555c6e7c34beb40f54e670c11b76b61be13f Author: H.J. Lu Date: Sat Jul 25 08:10:51 2015 -0700 Add missing ChangeLog files commit 1659f720b0818d6666570f79bef53ac461b2b22f Author: H.J. Lu Date: Sat Jul 25 07:56:18 2015 -0700 Skip missing symbol version section check for executable Missing symbol version section is a run-time problem only if it will be referenced dynamically at run-time. We should skip the check for locally defined symbol, which isn't referenced by shared library, when linking executable. bfd/ PR ld/18718 * elflink.c (elf_link_output_extsym): Check symbol version section check only if not linking executable, the symbol is referenced by shared library or not locally defined. ld/testsuite/ PR ld/18718 * ld-elf/pr18718.c: New file. * ld-elf/shared.exp: Run tests for PR ld/18718. commit 4a11f2065906976675808364ddbd1c0f77eea41f Author: Patrick Palka Date: Tue Jul 14 20:29:21 2015 -0400 Sync readline/ to version 7.0 alpha This patch syncs our upstream copy of readline from version 6.2 to the latest version, 7.0 alpha (released July 10 2015). I essentially copied what was done the last time readline was synced, when Jan updated to readline 6.2 in 2011: http://sourceware.org/ml/gdb-patches/2011-05/msg00003.html Procedure: 1. I extracted the readline-7.0-alpha tarball on top of readline/. 2. I deleted all the new files under doc/ that were deliberately omitted before. 3. I regenerated readline/configure and readline/examples/rlfe/configure using autoconf 2.64. No other configure files need regenerating. 4. I updated the function gdb_printable_part in completer.c with a trivial change made to the readline function it is based off of, printable_part in readline/complete.c. There is more work to be done in completer.c to sync it with readline/complete.c, but it is non-trivial and should probably be done separately anyway. Local patches that had to be reapplied: None. readline 7.0 alpha contains all of our local readline patches. New files in readline/: colors.{c,h} examples/{hist_erasedups,hist_purgecmd,rl-callbacktest,rlbasic}.c parse-colors.{c,h} readline.pc.in configure.ac Deleted files in readline/: configure.in Regressions: After the sync there is one testsuite regression, the test "signal SIGINT" in gdb.gdb/selftest.exp which now FAILs. Previously, the readline 6.2 SIGINT handler would temporarily reinstall the underlying application's SIGINT handler and immediately re-raise SIGINT so that the orginal handler gets invoked. But now (since readline 6.3) its SIGINT handler does not re-raise SIGINT or directly invoke the original handler; it now sets a flag marking that SIGINT was raised, and waits until readline explicitly has control to call the application's SIGINT handler. Anyway, because SIGINT is no longer re-raised from within readline's SIGINT handler, doing "signal SIGINT" with a stopped inferior gdb process will no longer resume and then immediately stop the process (since there is no 2nd SIGINT to immediately catch). Instead, the inferior gdb process will now just print "Quit" and continue to run. So with this commit, this particular test case is adjusted to reflect this change in behavior (we now have to send a 2nd SIGINT manually to stop it). Aside from this one testsuite regression, I personally noticed no regression in user-visible behavior. Though I only tested on x86_64 and on i686 Debian Stretch. Getting this kind of change in at the start of the GDB 7.11 development cycle will allow us to get a lot of passive testing from developers and from bleeding-edge users. readline/ChangeLog.gdb: Import readline 7.0 alpha * configure: Regenerate. * examples/rlfe/configure: Regenerate. gdb/ChangeLog: * completer.c (gdb_printable_part): Sync with readline function it is based off of. gdb/testsuite/ChangeLog: * gdb.gdb/selftest.exp (test_with_self): Update test to now expect the GDB inferior to no longer immediately stop after being resumed with "signal SIGINT". commit a496fbc8802f0a5719db6347a43cc869e03d83c9 Author: Alan Modra Date: Sat Jul 25 16:38:42 2015 +0930 Fix broken -Bsymbolic-functions For selected targets. The testcase reveals a number of targets that still need fixing. bfd/ * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to check if a symbol should be bound symbolically. * elf32-hppa.c (elf32_hppa_check_relocs, elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section, elf32_hppa_finish_dynamic_symbol): Likewise. * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_relocate_section): Likewise. * elf32-nios2.c (nios2_elf32_relocate_section, nios2_elf32_check_relocs, allocate_dynrelocs): Likewise. * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_relocate_section): Likewise. ld/testsuite/ * ld-elf/symbolic-func.s, * ld-elf/symbolic-func.r: New test. * ld-elf/elf.exp: Run it. commit ca3084f54b62ce06c6e70a6e1daafeb5e3317c12 Author: Doug Evans Date: Fri Jul 24 17:39:56 2015 -0700 Revert 4fd4095a5ffe3d4e50e0dac5f8ad37b8478afa9d, log individual measurements. I think I lost a patch along the way, because I remember needing something like this, but the reverted patch isn't the right way to do this. Removing ... gdb/testsuite/ChangeLog: * gdb.perf/lib/perftest/measure.py (MeasurementCpuTime::stop): Print result. (MeasurementWallTime::stop): Ditto. (MeasurementVmSizeTime::stop): Ditto. commit f7d3050b1966fcc3d4cf7ddb9d0a8ca741e50d26 Author: GDB Administrator Date: Sat Jul 25 00:00:08 2015 +0000 Automatic date update in version.in commit 7fecd1b400ba3ba0ae9efba3662e1f75b519860f Author: Doug Evans Date: Fri Jul 24 15:46:31 2015 -0700 Add gmonster-{1,2} perf testcases. These testcases are mocks of real programs. GDB doesn't care what the programs do, they just have to look and/or behave like the real program. These testcases exercise gdb when debugging really large programs. E.g., gmonster-1 has 10,000 CUs, and gmonster-2 has 1000 shared libs (which is actually a little small, 5000 would be more accurate). gdb/testsuite/ChangeLog: * gdb.perf/lib/perftest/utils.py: New file. * gdb.perf/gm-hello.cc: New file. * gdb.perf/gm-pervasive-typedef.cc: New file. * gdb.perf/gm-pervasive-typedef.h: New file. * gdb.perf/gm-std.cc: New file. * gdb.perf/gm-std.h: New file. * gdb.perf/gm-use-cerr.cc: New file. * gdb.perf/gm-utils.h: New file. * gdb.perf/gmonster-null-lookup.py: New file. * gdb.perf/gmonster-pervasive-typedef.py: New file. * gdb.perf/gmonster-print-cerr.py: New file. * gdb.perf/gmonster-ptype-string.py: New file. * gdb.perf/gmonster-runto-main.py: New file. * gdb.perf/gmonster-select-file.py: New file. * gdb.perf/gmonster1-null-lookup.exp: New file. * gdb.perf/gmonster1-pervasive-typedef.exp: New file. * gdb.perf/gmonster1-print-cerr.exp: New file. * gdb.perf/gmonster1-ptype-string.exp: New file. * gdb.perf/gmonster1-runto-main.exp: New file. * gdb.perf/gmonster1-select-file.exp: New file. * gdb.perf/gmonster1.cc: New file. * gdb.perf/gmonster1.exp: New file. * gdb.perf/gmonster2-null-lookup.exp: New file. * gdb.perf/gmonster2-pervasive-typedef.exp: New file. * gdb.perf/gmonster2-print-cerr.exp: New file. * gdb.perf/gmonster2-ptype-string.exp: New file. * gdb.perf/gmonster2-runto-main.exp: New file. * gdb.perf/gmonster2-select-file.exp: New file. * gdb.perf/gmonster2.cc: New file. * gdb.perf/gmonster2.exp: New file. commit 6eab34f3dc27a571071d8c56146c2ffda133f454 Author: Doug Evans Date: Fri Jul 24 15:43:15 2015 -0700 Add perf testcase generator. gdb/testsuite/ChangeLog: * gdb.perf/README: New file. * lib/perftest.exp (tcl_string_list_to_python_list): New function. * lib/gen-perf-test.exp: New file. commit 63738bfdb96f654322794384993a6f5d8608aab9 Author: Doug Evans Date: Fri Jul 24 15:38:21 2015 -0700 PerfTest::assemble functions return results. gdb/testsuite/ChangeLog: * lib/perftest.exp (PerfTest::compile): Unconditionally call body. (PerfTest::startup): New function. (PerfTest::run): Return result of calling body. (PerfTest::assemble): Rewrite. * gdb.perf/backtrace.exp (PerfTest::assemble): Update function result. * gdb.perf/disassemble.exp (PerfTest::assemble): Ditto. * gdb.perf/single-step.exp (PerfTest::assemble): Ditto. * gdb.perf/skip-prologue.exp (PerfTest::assemble): Ditto. * gdb.perf/solib.exp (PerfTest::assemble): Ditto. commit 7b606f95c9bcfa1b569fe5d33f7d2a73d39322f4 Author: Doug Evans Date: Fri Jul 24 15:35:12 2015 -0700 lib/gdb.exp (clean_restart): Make executable optional. gdb/testsuite/ChangeLog: * lib/gdb.exp (clean_restart): Make executable optional. commit a97b16b8fcfc7ac818c43c9f9457966cfc47aed6 Author: Doug Evans Date: Fri Jul 24 15:32:45 2015 -0700 Clean up testsuite compiler_info support. gdb/testsuite/ChangeLog: * gdb.base/watchpoint.exp (test_complex_watchpoint): Remove compiler_info references. * gdb.cp/temargs.exp: Ditto. * lib/gdb.exp: Unset compiler_info instead of setting to "unknown". (get_compiler_info): Early exit if already computed. Set compiler_info to "unknown" if there was a problem. (test_compiler_info): Add function comment. Call get_compiler_info. commit 35baa57fcfb50f7db24f7850ec9e34f4bc25b45c Author: Doug Evans Date: Fri Jul 24 15:28:46 2015 -0700 Add parallel build support for perf tests. gdb/testsuite/ChangeLog: * Makefile.in (check/%.exp): Pass directory for GDB_PARALLEL. (workers/%.worker, build-perf): New rule. (GDB_PERFTEST_MODE): New variable. (check-perf): Use it. (clean): Clean up gdb.perf parallel build subdirs. * lib/build-piece.exp: New file. * lib/cache.exp (gdb_do_cache): Include $GDB_PARALLEL in path name. * lib/gdb.exp (standard_output_file): Include $GDB_PARALLEL in path name. (standard_temp_file): Ditto. (GDB_PARALLEL handling): Make outputs,temp,cache directories as subdirs of $GDB_PARALLEL. commit 6ebea266fd0a7a56c90db3ab6237ff9f6c919747 Author: Doug Evans Date: Fri Jul 24 15:24:37 2015 -0700 Workaround debian change to default value of --as-needed. gdb/testsuite/ChangeLog: * lib/future.exp (gdb_default_target_compile): New option "early_flags". * lib/gdb.exp (gdb_compile): Undo debian's change in default of --as-needed. commit 4fd4095a5ffe3d4e50e0dac5f8ad37b8478afa9d Author: Doug Evans Date: Fri Jul 24 15:11:07 2015 -0700 Print data from individual perf runs. gdb/testsuite/ChangeLog: * gdb.perf/lib/perftest/measure.py (MeasurementCpuTime::stop): Print result. (MeasurementWallTime::stop): Ditto. (MeasurementVmSizeTime::stop): Ditto. commit 1e76a7e9b156173a76e6a14a3ed41cefc9fed480 Author: Sergio Durigan Junior Date: Fri Jul 24 16:46:49 2015 -0400 Call gdb_exit before gdb_skip_xml_test on gdb.base/catch-syscall.exp The gdb_skip_xml_test procedure explicitly says that it cannot be invoked when GDB is running. However, the testcase for "catch syscall" is wrongly doing that, which is causing a failure on native-extended-gdbserver tests: new FAIL: gdb.base/catch-syscall.exp: set tdesc filename /home/gdb-buildbot/fedora-x86-64-3/fedora-x86-64-native-extended-gdbserver-m32/build/gdb/testsuite/outputs/gdb.base/catch-syscall/trivial.xml (got interactive prompt) This obvious commit fixes this, by calling gdb_exit before gdb_skip_xml_test. Checked in as obvious. gdb/testsuite/ChangeLog 2015-07-24 Sergio Durigan Junior * gdb.base/catch-syscall.exp: Call gdb_exit before gdb_skip_xml_test. commit 2b4cab865440e2c61d72da31a1a5045c840c60fe Author: Pedro Alves Date: Fri Jul 24 20:29:53 2015 +0100 Fix s390 GNU/Linux build after enum __ptrace_request changes The buildbot noticed that the enum __ptrace_request series broke the s390 GNU/Linux build: ../../binutils-gdb/gdb/s390-linux-nat.c: In function 'fetch_regs': ../../binutils-gdb/gdb/s390-linux-nat.c:226:54: error: macro "ptrace" requires 4 arguments, but only 3 given if (ptrace (PTRACE_PEEKUSR_AREA, tid, (long) &parea) < 0) ^ ../../binutils-gdb/gdb/s390-linux-nat.c: In function 'store_regs': ../../binutils-gdb/gdb/s390-linux-nat.c:243:54: error: macro "ptrace" requires 4 arguments, but only 3 given if (ptrace (PTRACE_PEEKUSR_AREA, tid, (long) &parea) < 0) ^ Fix this the same way it's handled everywhere else -- just pass 0 as forth argument, which also handles non-varargs ptrace prototypes in non-glibc libcs, e.g., Bionic (if it ever gets a s390 port...). gdb/ChangeLog: 2015-07-24 Pedro Alves * s390-linux-nat.c (fetch_regs, store_regs, fetch_fpregs) (s390_stopped_by_watchpoint, s390_prepare_to_resume): Pass 0 as forth argument to ptrace PTRACE_PEEKUSR_AREA/PTRACE_POKEUSR_AREA. commit 5068630ad34dce5fefbe68d70d3a50cd8b92f71e Author: Pedro Alves Date: Fri Jul 24 19:34:17 2015 +0100 gdb.python/py-events.exp and normal_stop observers ordering I have patches that: 1 - make the CLI print stop info from a normal_stop observer, like MI does. 2 - happen to change the order in which the Python and CLI/TUI normal_stop observers are installed. With those in place, py-events.exp regresses like shown below [1], because the Python stop events are output before CLI prints stop info, instead of after, and the test doesn't expect that. With the same Python hooks, the order in which MI and Python events is emited today is already undefined, because MI also uses the normal_stop observer for output. I see no reason that we should in general define the order observers, interpreters and scripting languages get their turn at being notified of these events. So this patch makes the test cope with Python->CLI output order too. Tested on x86_64 Fedora 20. gdb/testsuite/ 2015-07-24 Pedro Alves * gdb.python/py-events.exp: Accept output between the stop event and the prompt. * gdb.python/py-evsignal.exp: Likewise. * gdb.python/py-evthreads.exp: Likewise. [1] - The regressions in question look like: Before said patches: (gdb) continue Continuing. event type: continue Breakpoint 2, first () at /home/pedro/gdb/mygit/build/../src/gdb/testsuite/gdb.python/py-events.c:30 30 for (i = 0; i < 2; i++) event type: stop event type: stop stop reason: breakpoint first breakpoint number: 2 breakpoint number: 2 breakpoint number: 3 all threads stopped (gdb) PASS: gdb.python/py-events.exp: continue After said patches: (gdb) continue Continuing. event type: continue event type: stop event type: stop stop reason: breakpoint first breakpoint number: 2 breakpoint number: 2 breakpoint number: 3 all threads stopped Breakpoint 2, first () at /home/pedro/gdb/mygit/build/../src/gdb/testsuite/gdb.python/py-events.c:30 30 for (i = 0; i < 2; i++) (gdb) FAIL: gdb.python/py-events.exp: continue commit 7759842763d94dc2f1c7d52d09f9203830b753ab Author: Pedro Alves Date: Fri Jul 24 18:18:44 2015 +0000 PR gdb/18717: internal error if non-leader thread exits process If a non-leader thread exits the process while all other threads are ptrace-stopped, native gdb fails an assertion. The test added by this commit catches it: /home/pedro/gdb/mygit/build/../src/gdb/linux-nat.c:3198: internal-error: linux_nat_filter_event: Assertion `lp->resumed' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) FAIL: gdb.threads/non-leader-exit-process.exp: program exits normally (GDB internal error) The fix is just to remove the assertion. With that out of the way, neither GDB not GDBserver handle this perfectly though, so I'm adding a KFAIL: (gdb) continue Continuing. [Thread 0x7ffff7fc0700 (LWP 15350) exited] No unwaited-for children left. Couldn't get registers: No such process. (gdb) KFAIL: gdb.threads/non-ldr-exit.exp: program exits normally (PRMS: gdb/18717) gdb/ChangeLog: 2015-07-24 Pedro Alves PR gdb/18717 * linux-nat.c (linux_nat_filter_event): Don't assert that the lwp is resumed, and extend the debug log. gdb/testsuite/ChangeLog: 2015-07-24 Pedro Alves PR gdb/18717 * gdb.threads/non-ldr-exit.c: New file. * gdb.threads/non-ldr-exit.exp: New file. commit fe23c31f262151ce3265f5b90870d40cb6840f0a Author: Pedro Alves Date: Fri Jul 24 17:27:58 2015 +0100 Fix failed exec error message Ref: https://sourceware.org/ml/gdb-patches/2015-07/msg00629.html This fixes the bogus command line in the error message shown when the SHELL environment variable points somewhere that's not something that resembles a shell: $ SHELL=/nonexisting gdb /home/pedro/a.out (gdb) r Starting program: /home/pedro/a.out - Cannot exec /home/pedro/a.out -c exec /home/pedro/a.out . + Cannot exec /nonexisting -c exec /home/pedro/a.out . Error: No such file or directory During startup program exited with code 127. (gdb) gdb/ChangeLog: 2015-07-24 Pedro Alves * fork-child.c (fork_inferior): Print argv[0] instead of exec_file. commit afa5870f1bfafa1ccfa8a4b3f432c07c19a2447e Author: H.J. Lu Date: Fri Jul 24 09:10:18 2015 -0700 Add 'U' suffix to silence GCC 6 warning GCC 6 warns: error: result of ‘63 << 26’ requires 33 bits to represent, but ‘int’ only has 32 bits [-Werror=shift-overflow=] on 0x3f << 26. This patch adds 'U' suffix to make integer constant unsigned. * alpha.c (OP_Jxx): Add 'U' suffix to make it unsigned. (OP_BSR): Likewise. (Jxx_FUNC_JMP): Likewise. (Jxx_FUNC_JSR): Likewise. (Jxx_FUNC_RET): Likewise. (Jxx_FUNC_JSR_COROUTINE): Likewise. (alpha_find_call): Replace 0x3f with 0x3fU. commit 7cb9e39bd8f84867f913232904b4b36c0aea539c Author: H.J. Lu Date: Fri Jul 24 09:05:33 2015 -0700 Use 0xffffffffffffffffLL to silence GCC 6 warning GCC 6 warns: error: result of ‘4294967295ll << 32’ requires 65 bits to represent, but ‘long long int’ only has 64 bits [-Werror=shift-overflow=] on ((((bfd_signed_vma) 0xffffffff) << 32) | 0xffffffff). This patch replaces it with bfd_signed_vma) 0xffffffffffffffffLL. * stabs.c (parse_stab_range_type): Use 0xffffffffffffffffLL. commit aff1a65ecb5cfcf1abfb23ea0e0f37f39e75683e Author: Nick Clifton Date: Fri Jul 24 16:44:27 2015 +0100 Fix the evaluation of RL78 complex relocs, by making immediate values be computed relative to a new absolute symbol. gas * config/tc-rl78.c (rl78_abs_sym): New local variable. (md_begin): Initialise the new symbol. (OPIMM): Define the value to be relative to the new symbol and not the absolute section symbol. ld * emulparams/elf32rl78.sh (OTHER_SECTIONS): Provide a value for the _-rl78_abs__ symbol. tests * gas/all/struct.d: Allow for extra symbols in the output. * gas/macros/test1.d: Likewise. * gas/elf/elf.exp: Add an rl78 machine. * gas/elf/sections2e-rl78: New file. tests * binutils-all/localize-hidden-1.d: Allow for extra symbols in the output. * binutils-all/strip-11.d: Skip for the RL78. commit 5826e159863b6cd69953dc01faf7c20414409909 Author: Pedro Alves Date: Fri Jul 24 14:57:20 2015 +0100 Linux: sys/ptrace.h -> nat/gdb_ptrace.h everywhere So that we pick the enum __ptrace_request fix everywhere. gdb/ChangeLog: 2015-07-24 Pedro Alves * aarch64-linux-nat.c: Include nat/gdb_ptrace.h instead of sys/ptrace.h. * alpha-linux-nat.c: Likewise. * amd64-linux-nat.c: Likewise. * arm-linux-nat.c: Likewise. * hppa-linux-nat.c: Likewise. * i386-linux-nat.c: Likewise. * ia64-linux-nat.c: Likewise. * linux-fork.c: Likewise. * linux-nat.c: Likewise. * m32r-linux-nat.c: Likewise. * m68klinux-nat.c: Likewise. * mips-linux-nat.c: Likewise. * nat/linux-btrace.c: Likewise. * nat/linux-ptrace.c: Likewise. * nat/linux-ptrace.h * nat/mips-linux-watch.c: Likewise. * nat/x86-linux-dregs.c: Likewise. * ppc-linux-nat.c: Likewise. * s390-linux-nat.c: Likewise. * spu-linux-nat.c: Likewise. * tilegx-linux-nat.c: Likewise. * x86-linux-nat.c: Likewise. * xtensa-linux-nat.c: Likewise. gdb/gdbserver/ChangeLog: 2015-07-24 Pedro Alves * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of sys/ptrace.h. * linux-arm-low.c: Likewise. * linux-cris-low.c: Likewise. * linux-crisv32-low.c: Likewise. * linux-low.c: Likewise. * linux-m68k-low.c: Likewise. * linux-mips-low.c: Likewise. * linux-nios2-low.c: Likewise. * linux-s390-low.c: Likewise. * linux-sparc-low.c: Likewise. * linux-tic6x-low.c: Likewise. * linux-tile-low.c: Likewise. * linux-x86-low.c: Likewise. commit 54019719152ab269fb4cec2c6a8a245ba6af6e49 Author: Pedro Alves Date: Fri Jul 24 14:57:20 2015 +0100 C++: handle glibc's ptrace(enum __ptrace_request, ...) Building in C++ mode issues ~40 warnings like this: ../../src/gdb/linux-nat.c: In function ‘int linux_handle_extended_wait(lwp_info*, int, int)’: ../../src/gdb/linux-nat.c:2016:51: warning: invalid conversion from ‘int’ to ‘__ptrace_request’ [-fpermissive] ptrace (PTRACE_GETEVENTMSG, pid, 0, &new_pid); The issue is that in glibc, ptrace's first parameter is an enum. That's not a problem if we pick the PTRACE_XXX requests from sys/ptrace.h, as those will be values of the corresponding enum. However, we have fallback definitions for PTRACE_XXX symbols when the system headers miss them (such as PTRACE_GETEVENTMSG above), and those are plain integer constants. E.g., nat/linux-ptrace.h: #define PTRACE_GETEVENTMSG 0x4201 One idea would be to fix this by defining those fallbacks like: -#define PTRACE_GETEVENTMSG 0x4201 +#define PTRACE_GETEVENTMSG ((enum __ptrace_request) 0x4201) However, while glibc's ptrace uses enum __ptrace_request for first parameter: extern long int ptrace (enum __ptrace_request __request, ...) __THROW; other libc's, like e.g., Android's bionic do not -- in that case, the first parameter is int: long ptrace(int request, pid_t pid, void * addr, void * data); So the fix I came up is to make configure/ptrace.m4 also detect the type of the ptrace's first parameter and defin PTRACE_TYPE_ARG1, as already does the for parameters 3-4, and then simply wrap ptrace with a macro that casts the first argument to the detected type. (I'm leaving adding a nicer wrapper for when we drop building in C). While this adds the wrapper, GNU/Linux files won't use it until the next patch, which makes all native GNU/Linux files include gdb_ptrace.h. gdb/ChangeLog: 2015-07-24 Pedro Alves * ptrace.m4 (ptrace tests): Test in C++ mode. Try with 'enum __ptrace_request as first parameter type instead of int. (PTRACE_TYPE_ARG1): Define. * nat/gdb_ptrace.h [!PTRACE_TYPE_ARG5] (ptrace): Define as wrapper that casts first argument to PTRACE_TYPE_ARG1. * config.in: Regenerate. * configure: Regenerate. gdb/gdbserver/ChangeLog: 2015-07-24 Pedro Alves * config.in: Regenerate. * configure: Regenerate. commit e379037592ff71dc633c6d3de0828babe805ae96 Author: Pedro Alves Date: Fri Jul 24 14:57:19 2015 +0100 Move gdb_ptrace.h to nat/ Now that gdbserver's configure defines PTRACE_TYPE_ARGx etc., we'll be able to make gdbserver use gdb_ptrace.h too. Move it to the native target files directory. gdb/ChangeLog: 2015-07-24 Pedro Alves * gdb_ptrace.h: Move ... * nat/gdb_ptrace.h: ... here. * inf-ptrace.c: Adjust. commit eb7aa56163cc15bb732aa3b07966103fd6940d50 Author: Pedro Alves Date: Fri Jul 24 14:57:19 2015 +0100 make gdbserver use the same ptrace autoconf checks as gdb This factors the ptrace checks out of gdb's configure.ac to a new ptrace.m4 file, and then makes gdbserver's configure.ac source it too. gdb/ChangeLog: 2015-07-24 Pedro Alves * acinclude.m4: Include ptrace.m4. * configure.ac: Call GDB_AC_PTRACE and move ptrace checks ... * ptrace.m4: ... to this new file. gdb/gdbserver/ChangeLog: 2015-07-24 Pedro Alves * acinclude.m4: Include ../ptrace.m4. * configure.ac: Call GDB_AC_PTRACE. * config.in, configure: Regenerate. commit 55d7b841962c6e054735acdca2e0bb485afa0144 Author: Yao Qi Date: Fri Jul 24 14:40:34 2015 +0100 Remove proc->priv->new_inferior As the result of the previous patch, new_inferior is no longer used. This patch is to remove it. gdb/gdbserver: 2015-07-24 Yao Qi * linux-low.c (linux_create_inferior): Remove setting to proc->priv->new_inferior. (linux_attach): Likewise. (linux_low_filter_event): Likewise. * linux-low.h (struct process_info_private) : Remove. commit c06cbd92be66d82eb323a8c6ec451c1dccc02107 Author: Yao Qi Date: Fri Jul 24 14:40:34 2015 +0100 Initialise target descrption after skipping extra traps for --wrapper Nowadays, when --wrapper is used, GDBserver skips extra traps/stops in the wrapper program, and stops at the first instruction of the program to be debugged. However, GDBserver created target description in the first stop of inferior, and the executable of the inferior is the wrapper program rather than the program to be debugged. In this way, the target description can be wrong if the architectures of wrapper program and program to be debugged are different. This is shown by some fails in gdb.server/wrapper.exp on buildbot. We are testing i686-linux GDB (Fedora-i686) on an x86_64-linux box (fedora-x86-64-4) in buildbot, such configuration causes fails in gdb.server/wrapper.exp like this: spawn /home/gdb-buildbot-2/fedora-x86-64-4/fedora-i686/build/gdb/testsuite/../../gdb/gdbserver/gdbserver --once --wrapper env TEST=1 -- :2346 /home/gdb-buildbot-2/fedora-x86-64-4/fedora-i686/build/gdb/testsuite/outputs/gdb.server/wrapper/wrapper Process /home/gdb-buildbot-2/fedora-x86-64-4/fedora-i686/build/gdb/testsuite/outputs/gdb.server/wrapper/wrapper created; pid = 8795 Can't debug 64-bit process with 32-bit GDBserver Exiting target remote localhost:2346 localhost:2346: Connection timed out. (gdb) FAIL: gdb.server/wrapper.exp: setting breakpoint at marker See https://sourceware.org/ml/gdb-testers/2015-q3/msg01541.html In this case, program to be debugged ("wrapper") is 32-bit but wrapper program ("/usr/bin/env") is 64-bit, so GDBserver gets the 64-bit target description instead of 32-bit. The root cause of this problem is that GDBserver creates target description too early, and the rationale of fix could be creating target description once the GDBserver skips extra traps and inferior stops at the first instruction of the program we want to debug. IOW, when GDBserver skips extra traps, the inferior's tdesc is NULL, and mywait and its callees shouldn't use inferior's tdesc, so in this patch, we skip code that requires register access, see changes in linux_resume_one_lwp_throw and need_step_over_p. In linux_low_filter_event, if target description isn't initialised and GDBserver attached the process, we create target description immediately, because GDBserver don't have to skip extra traps for attach, IOW, it makes no sense to use --attach and --wrapper together. Otherwise, the process is launched by GDBserver, we keep the status pending, and return. After GDBserver skipped extra traps in start_inferior, we call a target_ops hook arch_setup to initialise target description there. gdb/gdbserver: 2015-07-24 Yao Qi * linux-low.c (linux_arch_setup): New function. (linux_low_filter_event): If proc->tdesc is NULL and proc->attached is true, call the_low_target.arch_setup. Otherwise, keep status pending, and return. (linux_resume_one_lwp_throw): Don't call get_pc if thread->while_stepping isn't NULL. Don't call get_thread_regcache if proc->tdesc is NULL. (need_step_over_p): Return 0 if proc->tdesc is NULL. (linux_target_ops): Install arch_setup. * server.c (start_inferior): Call the_target->arch_setup. * target.h (struct target_ops) : New field. (target_arch_setup): New marco. * lynx-low.c (lynx_target_ops): Update. * nto-low.c (nto_target_ops): Update. * spu-low.c (spu_target_ops): Update. * win32-low.c (win32_target_ops): Update. commit 5ae3ebbae55482a9fdd01bd21455b396e23e4077 Author: Yao Qi Date: Fri Jul 24 14:40:34 2015 +0100 Set proc->priv->new_inferior out of linux_add_process Nowadays, we set proc->priv->new_inferior to 1 inside linux_add_process, and new_inferior is used as a flag to initialise target description later. linux_add_process is used for the three cases, fork/vfork event (handle_extended_wait), run the program (linux_create_inferior), and attach to the process (linux_attach). In the first case, the child's target description is copied from parent's, so we don't need to initialise target description again later, which means we don't need to set proc->priv->new_inferior to 1 in this case. For the rest of two cases, we need this flag. This patch move the code setting proc->priv->new_inferior to 1 inside linux_add_process to linux_create_inferior and linux_attach. No functionality is changed. gdb/gdbserver: 2015-07-24 Yao Qi * linux-low.c (linux_add_process): Don't set proc->priv->new_inferior. (linux_create_inferior): Set proc->priv->new_inferior to 1. (linux_attach): Likewise. commit eb97750bce2bf37176f745636815600177fbdba8 Author: Yao Qi Date: Fri Jul 24 14:40:34 2015 +0100 Refactor start_inferior This patch is to refactor function start_inferior that signal_pid is return in one place. gdb/gdbserver: 2015-07-24 Yao Qi * server.c (start_inferior): Code refactor. commit 11e6c98f1b6318d27ad55f9ac7d362fe7a668872 Author: Yao Qi Date: Fri Jul 24 14:40:34 2015 +0100 Test --wrapper when restarting process. My patch series will affect the code starting inferior in GDBserver (callees of start_inferior), so we need tests to cover how start_inferior is used in different cases. In server.c:process_serial_event, start_inferior is used when GBDserver receives 'R' packet, and this patch is to add a test for this path, and see how --wrapper option works when the process is restarted. gdb/testsuite: 2015-07-24 Yao Qi * gdb.server/ext-wrapper.exp: Test --wrapper option when restarting process. commit 51aee833ed9c6bd67b0c0e4a8c7098a549e3d16d Author: Yao Qi Date: Fri Jul 24 14:40:34 2015 +0100 Set general_thread after restart When I run gdb.server/ext-restart.exp, I get the following GDB internal error, run^M The program being debugged has been started already.^M Start it from the beginning? (y or n) y^M Sending packet: $vKill;53c5#3d...Packet received: OK^M Packet vKill (kill) is supported^M Sending packet: $vFile:close:6#b6...Packet received: F0^M Sending packet: $vFile:close:3#b3...Packet received: F0^M Starting program: /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/gdb.server/ext-restart ^M Sending packet: $QDisableRandomization:1#cf...Packet received: OK^M Sending packet: $R0#82...Sending packet: $qC#b4...Packet received: QCp53c5.53c5^M <-- [1] Sending packet: $qAttached:53c5#c9...Packet received: E01^M warning: Remote failure reply: E01^M .... 0x00002aaaaaaac2d0 in ?? () from target:/lib64/ld-linux-x86-64.so.2^M /home/yao/SourceCode/gnu/gdb/git/gdb/thread.c:88: internal-error: inferior_thread: Assertion `tp' failed.^M A problem internal to GDB has been detected,^M further debugging may prove unreliable.^M Quit this debugging session? (y or n) FAIL: gdb.server/ext-restart.exp: run to main (GDB internal error) Resyncing due to internal error. the test is to restart the program, to make sure GDBserver handles packet 'R' correctly. From the GDBserver output, we can see, Remote debugging from host 127.0.0.1^M Process /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/gdb.server/ext-restart created; pid = 21445^M GDBserver restarting^M Process /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/gdb.server/ext-restart created; pid = 21446^M Killing process(es): 21446 we first start process 21445(0x53c5), kill it and restart a new process 21446. However, in the gdb output above [1], we can see that the reply of qC is still the old process id rather than the new one. Looks general_thread isn't up to date after GDBserver receives R packet. This patch is to update general_thread after call start_inferior. gdb/gdbserver: 2015-07-24 Yao Qi * server.c (process_serial_event): Set general_thread. gdb/testsuite: 2015-07-24 Yao Qi * gdb.server/ext-restart.exp: New file. commit 8cfe207c9fcfcf940ec8eb834afde41432ec6d80 Author: Yao Qi Date: Fri Jul 24 14:40:34 2015 +0100 Test --wrapper in extended-remote We didn't test --wrapper option in extended-remote before, this patch is to add a test case for it. In order to pass option --wrapper to gdbserver in extended-remote, I add arg in gdbserver_start_extended, and its default value is "", so that other places use gdbserver_start_extended don't have to be updated. gdb/testsuite: 2015-07-24 Yao Qi * lib/gdbserver-support.exp (gdbserver_start_extended): Add argument options. * gdb.server/ext-wrapper.exp: New file. commit 84b74b498eb690e5a856c23b9abc71f9680b81a6 Author: H.J. Lu Date: Fri Jul 24 04:14:04 2015 -0700 Replace -g with -ggdb3 in ld compress tests Use -ggdb3 to generate .debug_macro sections, which are bigger and are always compressed. * ld-elf/compress.exp (build_tests): Replace -g with -ggdb3. * ld-elf/zlibbegin.rS: Also expect "GC". * ld-elf/zlibnormal.rS: Likewise. commit 72f4393d8cfc4a47f0e59657f7822668cfad132f Author: H.J. Lu Date: Fri Jul 24 04:08:12 2015 -0700 Remove leading/trailing white spaces in ChangeLog commit 91cb26dac47265f178fb6635f1deebdfd244572a Author: Alan Modra Date: Fri Jul 24 14:44:26 2015 +0930 Correct reloc section name * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela prefix for reloc section corresponding to rela section associated with renamed debug section. commit 2fb9328d8daa751f3b71745636323eddccaaacce Author: Alan Modra Date: Fri Jul 24 14:36:38 2015 +0930 bfd_get_section_by_name_if hash chain traversal This function stops too soon, as I found when the hash chain happened to contain two .debug_macro sections and a .bss section: .debug_macro -> .bss -> .debug_macro * section.c (bfd_get_section_by_name_if): Iterate over entire hash chain. commit f0b0791b05ed335e5d74d843d828645805db1f9c Author: GDB Administrator Date: Fri Jul 24 00:00:14 2015 +0000 Automatic date update in version.in commit cdb061674c044636465e52a8c989b9011f2ec8ac Author: Han Shen Date: Thu Jul 23 15:52:22 2015 -0700 2015-07-23 Ian Coolidge Plumb --pic-veneer option for gold. gold/ChangeLog: * arm.cc (Reloc_stub::stub_type_for_reloc): Plumb to stub generation. * options.h (General_options): Add --pic-veneer option. commit d5cff5df74b18e1e5ed94de8f4c9adee3ffd95c6 Author: Joseph Myers Date: Thu Jul 23 21:52:04 2015 +0000 Fix DT_MIPS_RLD_MAP_REL tag for n64 target and 32-bit host. For the case of MIPS n64 target and 32-bit host, the computation of the DT_MIPS_RLD_MAP_REL tag involves sdyn->output_section->vma + sdyn->output_offset (64-bit) being added to b (32-bit host pointer), so losing the high part and resulting in an incorrect DT_MIPS_RLD_MAP_REL tag, and all dynamically linked glibc tests failing for n64. This patch fixes this (spot-tested with glibc tests; however, I don't have a self-contained testcase for this bug). * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections) : Add target address to host address difference, not to host pointer. commit cc12ce380e8dab7e3cee8ecad29db6e9bb36a8fa Author: Doug Evans Date: Thu Jul 23 09:21:48 2015 -0700 Fix crash when reading dummy CUs. Dummy CUs are used by the incremental linker to pre-allocate space in the output file. They have a DWARF header but no contents. gdb/ChangeLog: * dwarf2read.c (dwarf2_per_cu_data): Add comment. (load_cu): Handle dummy CUs. (dw2_do_instantiate_symtab, process_queuef): Ditto. (dwarf2_fetch_die_loc_sect_off, dwarf2_fetch_constant_bytes): Ditto. gdb/testsuite/ChangeLog: * gdb.dwarf2/dw2-dummy-cu.S: New file. * gdb.dwarf2/dw2-dummy-cu.exp: New file. commit 7b849db4f213d6734b4121ca5e5cab3341a5140c Author: Ciro Santilli Date: Thu Jul 23 06:36:25 2015 -0700 py-linetable.c: Fix doc of LineTable.source_lines' return type The ltpy_get_all_source_lines function, use to implement the gdb.LineTable.source_lines method, returns a list: source_list = PyDict_Keys (source_dict); return source_list; This patch fixes the function's documentation as well as its docstring to say that it returns a list rather than a FrozenSet. gdb/ChangeLog: * py-linetable.c (ltpy_get_all_source_lines): Adjust function documentation to say that it returns a list rather than a FrozenSet. (linetable_object_methods): Update the docstring of the "source_line" entry. Tested on x86_64-linux. commit d0d8478068ae7c01b1a504ca2fba90c1d36c5566 Author: Pierre-Marie de Rodat Date: Wed Jul 22 12:25:14 2015 +0200 gdb/gdbtypes: fix handling of typedef layers between array types When a dynamic array type contains a typedef-wrapped array, an assertion failure occurs during type resolution. This is what happens in the following Ada case: type Rec_Type is record I : Integer; B : Boolean; end record; type Vec_Type is array (1 .. 4) of Rec_Type; type Array_Type is array (Positive range <>) of Vec_Type; If users try to print or even pass to an inferior call a variable A of type Array_Type, GDB will raise an error: (gdb) print a ../../src/gdb/gdbtypes.c:1807: internal-error: resolve_dynamic_array: Assertion `TYPE_CODE (type) == TYPE_CODE_ARRAY' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) What happens is that during dynamic array type resolution, we first peel TYPE_CODE_TYPEDEF layers wrapping the array element type and check if its type is itself TYPE_CODE_ARRAY. If it is, we pass the typedef-wrapped type to a recursive call to resolve_dynamic_array whereas this function expects only TYPE_CODE_ARRAY types. This patch makes it pass the peeled type to the recursive call so that type resolution can continue smoothly. gdb/ChangeLog: * gdbtypes.c (resolve_dynamic_array): Pass the peeled element type to the recursive call instead of the original (maybe TYPE_CODE_TYPEDEF) type. gdb/testsuite/ChangeLog: * gdb.ada/var_arr_typedef.exp: New testcase. * gdb.ada/var_arr_typedef/pack.adb: New file. * gdb.ada/var_arr_typedef/pack.ads: New file. * gdb.ada/var_arr_typedef/var_arr_typedef.adb: New file. commit c2fbdc5901a9220d0953f14c27760c3d3ae13074 Author: Yao Qi Date: Thu Jul 23 11:22:34 2015 +0100 Return zero in aarch64_linux_can_use_hw_breakpoint if target doesn't support HW watchpoint/breakpoint Nowadays aarch64_linux_can_use_hw_breakpoint always return one, but it can be smarter, say, if GDB knows target doesn't support HW watchpoint or breakpoint because HW watchpoint/breakpoint is disabled in linux kernel, for example, it can safely return zero. gdb: 2015-07-23 Yao Qi * aarch64-linux-nat.c (aarch64_linux_can_use_hw_breakpoint): If TYPE is watchpoint, return zero if aarch64_num_wp_regs is zero. If TYPE is breakpoint, return zero if arch64_num_bp_regs is zero. commit 070fe95d07c78349f0c8f0fa90aeb92d05248483 Author: Alan Modra Date: Thu Jul 23 12:41:38 2015 +0930 Fix ubsan signed integer overflow IMO a fairly useless warning in this case, but technically correct. PR 18708 * i386-dis.c (get64): Avoid signed integer overflow. commit 510fac86d7a8855fc680466f07ae266802c5fb40 Author: GDB Administrator Date: Thu Jul 23 00:00:07 2015 +0000 Automatic date update in version.in commit 20c2a615876bdf0d5dc8e2db86eea1312d9dc9b8 Author: H.J. Lu Date: Wed Jul 22 13:24:20 2015 -0700 Fix memory operand size for vcvtt?ps2u?qq instructions When disassembling AVX512 vcvtt?ps2u?q instructions with data broadcasting enabled, memory operand size should be DWORD. gas/testsuite/ PR binutils/18631 * gas/i386avx512dq-intel.d: Replace "QWORD" with "DWORD" in vcvtt?ps2u?qq instructions disassembly regexes. Add disassembly regex for new test. * gas/i386/avx512dq.d: Likewise. * gas/i386/avx512dq_vl-intel.d: Likewise. * gas/i386/avx512dq_vl.d: Likewise. * gas/i386/x86-64-avx512dq-intel.d: Likewise. * gas/i386/x86-64-avx512dq.d: Likewise. * gas/i386/x86-64-avx512dq_vl-intel.d: Likewise. * gas/i386/x86-64-avx512dq_vl.d: Likewise. * gas/i386/avx512dq.s: Add new test for Intel syntax with memory operand and broadcasting enabled. * gas/i386/avx512dq_vl.s: Likewise. * gas/i386/x86-64-avx512dq.s: Likewise. * gas/i386/x86-64-avx512dq_vl.s: Likewise. opcodes/ PR binutils/18631 * i386-dis-evex.h (EVEX_W_0F78_P_2): Replace "EXxmmq" with "EXEvexHalfBcstXmmq" for the second operand. (EVEX_W_0F79_P_2): Likewise. (EVEX_W_0F7A_P_2): Likewise. (EVEX_W_0F7B_P_2): Likewise. commit 7360e63f80782cf34a195eb1c6149760c3da7f14 Author: Alan Modra Date: Wed Jul 22 10:26:29 2015 +0930 readelf display of 0x800...000 addend * readelf.c (dump_relocations): Show MIN_INT addends as negative. commit 511b1657d2b251e529a7a0634325bb7d8f3af80d Author: Alan Modra Date: Wed Jul 22 21:58:50 2015 +0930 gas line buffer handling This fixes a segfault when macro definitions end on the last line of a file, and that line isn't properly terminated with a newline. gas used to throw away the last line in cases like this, whereas in other cases gas added the missing newline. So I've also made gas consistently provide a missing newline. PR gas/18687 * input-scrub.c (input_scrub_next_buffer): Rearrange and simplify loop. Don't drop lines at end of file lacking a newline, add a newline instead. Ensure partial_size is zero whenever partial_where is NULL. Adjust buffer size for extra char. (input_scrub_push, input_scrub_begin): Adjust buffer size here too. commit 5b2af7dd40a4f3b570aef71daf11b9dfce9a5d13 Author: H.J. Lu Date: Wed Jul 22 03:36:42 2015 -0700 Don't compare symbol addresses directly GCC 5 will fold symbol address comparison, assuming each symbol has a different address, which leads to abort. We should use separate functions to compare symbol address. PR gold/18663 * testsuite/Makefile.am (script_test_1_SOURCES): Set to script_test_1a.cc script_test_1b.cc. (script_test_11_r.o): Replace script_test_11.o with script_test_11a.o script_test_11b.o. (script_test_11.o): Removed. (script_test_11a.o): New. (script_test_11b.o): Likewise. * testsuite/Makefile.in: Regenerated. * testsuite/script_test_1.h: New file. * testsuite/script_test_1b.cc: Likewise. * testsuite/script_test_11.h: Likewise. * testsuite/script_test_11b.c: Likewise. * testsuite/script_test_1.cc: Renamed to ... * testsuite/script_test_1a.cc: This. Include "script_test_1.h". (main): Call check_int and check_ptr. * testsuite/script_test_11.c: Renamed to ... * testsuite/script_test_11a.c: This. Include "script_test_11.h". (main): Call ptr_equal. commit cd78ea777c35c497fcc0f20d162789296dc0a44d Author: H.J. Lu Date: Wed Jul 22 03:35:47 2015 -0700 Mark global with hidden attribute GCC 5 will generate a relocation for protected symbol: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 when compiling for a shared library. It is undefined to access protected symbol in IFUNC selector function inside a shared library. PR gold/18628 * testsuite/ifuncdep2.c (global): Change protected to hidden. * testsuite/ifuncmod1.c (global): Likewise. * testsuite/ifuncmod5.c (global): Likewise. commit bb854a36d192bfa6609da9e3b1342e33da445598 Author: Alan Modra Date: Wed Jul 22 19:11:22 2015 +0930 Fix ppc64 ELFv1 assertion failure Bogus assembly can hit an assertion in opd_entry_value when the symbol referenced by a function descriptor is undefined. Worse, the code after the assert copies unitialised memory to return the code section. This uninitialised pointer can later be dereferencd, possibly causing a linker segmentation fault. * elf64-ppc.c (opd_entry_value): Remove assertion. Instead, return -1 if symbol referenced is not defined. Tidy. commit f945ba50bb7e11c03d850d1680b15da758300ad7 Author: Alan Modra Date: Tue Jul 21 12:10:27 2015 +0930 GOLD aarch64 warning fix aarch64.cc:2026:50: error: integer overflow in expression [-Werror=overflow] Insntype adr_insn = adrp_insn & ((1 << 31) - 1); * aarch64.cc (try_fix_erratum_843419_optimized): Warning fix. commit 6dca8d51d523adc1a8ba7ea22c4b27d86a57da56 Author: GDB Administrator Date: Wed Jul 22 00:00:08 2015 +0000 Automatic date update in version.in commit 5417c94d1a944d1a27f99240e5d62a6d7cd324f1 Author: Cary Coutant Date: Tue Jul 21 16:10:05 2015 -0700 Fix problem where __start_ and __stop_ section symbols do not honor version script. When creating the special __start_ and __stop_ section symbols, gold does not check the version script to see if they should be local instead of global. 2015-07-21 Cary Coutant gold/ PR gold/18548 * symtab.cc (Symbol_table::do_define_in_output_data): Check for forced local symbol even when oldsym != NULL. (Symbol_table::do_define_in_output_segment): Likewise. (Symbol_table::do_define_as_constant): Likewise. commit b8c6c5ef99ef8f07fcea1c777d5084dc6f7232e5 Author: Cary Coutant Date: Tue Jul 21 12:50:45 2015 -0700 Fix typo in PR number. Fix internal error when linking an archive library with no preceding objects. gold/ PR gold/18698 * archive.cc (Library_base::should_include_member): Don't use entry point for relocatable links, or if target is not yet valid. * parameters.cc (Parameters::entry): Check target_valid(). commit cb5cf5e26ea2e42937a2ce1b662e61e4772ba6f9 Author: Cary Coutant Date: Tue Jul 21 12:42:07 2015 -0700 Fix internal error when linking an archive library with no preceding objects. gold/ PR gold/18696 * archive.cc (Library_base::should_include_member): Don't use entry point for relocatable links, or if target is not yet valid. * parameters.cc (Parameters::entry): Check target_valid(). commit af1b22f3004774f8c5c570abe7fab629026032f7 Author: Yao Qi Date: Tue Jul 21 16:33:41 2015 +0100 Move aarch64_linux_get_debug_reg_capacity to nat/aarch64-linux-hw-point.c There are also some duplication on getting HW watchpoint/breakpoint registers info between GDB and GDBserver. This patch moves them to nat/aarch64-linux-hw-point.c. Note that ENABLE_NLS is not defined in GDBserver, so it should be OK to use _( markup. gdb: 2015-07-21 Yao Qi * aarch64-linux-nat.c (aarch64_linux_get_debug_reg_capacity): Move it to nat/aarch64-linux-hw-point.c. (aarch64_linux_child_post_startup_inferior): Update. * nat/aarch64-linux-hw-point.c (aarch64_linux_get_debug_reg_capacity): New function. * nat/aarch64-linux-hw-point.h (aarch64_linux_get_debug_reg_capacity): Declare it. gdb/gdbserver: 2015-07-21 Yao Qi * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call aarch64_linux_get_debug_reg_capacity. commit 40e050d242199ac67803c155ac2062169e5cf53d Author: Markus Metzger Date: Wed Jul 15 08:43:09 2015 +0200 btrace: fix case label in btrace_data_append gdb/ * common/btrace-common.c (btrace_data_append): Change case label. commit f33026a96558ba9231ad91eb989ea6f347a15899 Author: Matthew Wahab Date: Tue Jul 21 09:43:35 2015 +0100 [ARM] Support correctly spelled ARMv6KZ architecture names 2015-07-20 Matthew Wahab gas/ * NEWS: Mention corrected spelling of armv6kz. * config/tc-arm.c (arm_cpus): Replace ARM_ARCH_V6ZK with ARM_ARCH_V6KZ. (arm_archs): Likewise. Also add "armv6kz" and "armv6kzt2". * doc/c-arm.texi: Replace "armv6zk" with "armv6kz". gas/testsuite * gas/arm/attr-march-armv6kz.d: New. * gas/arm/attr-march-armv6kzt2.d: New. include/opcode * arm.h (ARM_AEXT_V6ZK): Rename to ARM_AEXT_V6KZ. (ARM_AEXT_V6ZKT2): Rename to ARM_AEXT_V6KZT2. (ARM_ARCH_V6ZK): Rename to ARM_ARCH_V6KZ. (ARM_ARCH_V6ZKT2): Rename to ARM_ARCH_V6KZT2. commit 391538482ede7161fdd88187596426eb6d9ae44d Author: GDB Administrator Date: Tue Jul 21 00:00:07 2015 +0000 Automatic date update in version.in commit 8b558f797a3a63aaa8de119ddf53c8afdd1dc6eb Author: Joel Brobecker Date: Mon Jul 20 15:09:44 2015 -0700 gdb.ada/info_exc.exp: Adjust expected output in "info exception" test. Since multi_line was moved to gdb.exp in a slightly stricter form, The gdb.ada/info_exc.exp:info exceptions test has been failing. This is because it now expects a new-line sequence at the end of each argument given to multi_line, including ".*". But the intent when writing the test was to signify "could-be-nothing-at-all". As a result, the test fails on x86_64-linux with a runtime built as recommended, because of that extra new-line sequence. gdb/testsuite/ChangeLog: * gdb.ada/info_exc.exp: Adjust "info exceptions" expected output. commit 0ef3814fe1b5579890a7758e6e52d12b8a96fdf2 Author: Han Shen Date: Mon Jul 20 13:04:06 2015 -0700 Optimize erratum 843419 fix. gold/ChangeLog: * aarch64.cc (AArch64_insn_utilities::is_adr): New method. (AArch64_insn_utilities::aarch64_adr_encode_imm): New method. (AArch64_insn_utilities::aarch64_adrp_decode_imm): New method. (E843419_stub): New sub-class of Erratum_stub. (AArch64_relobj::try_fix_erratum_843419_optimized): New method. (AArch64_relobj::section_needs_reloc_stub_scanning): Try optimized fix. (AArch64_relobj::create_erratum_stub): Add 1 argument. (Target_aarch64::scan_erratum_843419_span): Pass in adrp insn offset. commit 45972d00747459a447f7e84891ed6a3367565f24 Author: H.J. Lu Date: Mon Jul 20 12:18:06 2015 -0700 Update testsuite/pr18689.sh for older GCC Older GCC, like 4.2, generates .debug_macinfo section instead of .debug_macro section. This patch updates testsuite/pr18689.sh to support it. commit 2bca03770d4d219b4e29d43754a9d95a4152255a Author: Han Shen Date: Thu Jul 16 15:59:16 2015 -0700 Properly set arm-specific elf flags wrt hardfp. gold/ChangeLog: * arm.cc (Target_arm::do_adjust_elf_header): Set flags into view. commit f54f5e31ce1270a1e9441348d6f2ea2426352478 Author: H.J. Lu Date: Mon Jul 20 10:14:26 2015 -0700 Clear SHF_COMPRESSED flag bit from input to output For relocatable link, we should clear the SHF_COMPRESSED flag bit from input group section. PR gold/18689 * layout.cc (Layout::layout): Clear the SHF_COMPRESSED flag bit from input group section for relocatable link. * testsuite/Makefile.am (check_SCRIPTS): Add pr18689.sh. (check_DATA): Add pr18689.stdout. (MOSTLYCLEANFILES): Add pr18689a.o pr18689b.o. (pr18689.stdout): New rule. (pr18689a.o): Likewise. (pr18689b.o): Likewise. (pr18689.o): Likewise. * testsuite/pr18689.c: New file. * testsuite/pr18689.sh: Likewise. * testsuite/Makefile.in: Regenerated. commit a3b5281eb93f986e9865a099c554156c40e4a686 Author: Doug Evans Date: Mon Jul 20 09:21:51 2015 -0700 Makefile.in (STABS_DOC_BUILD_INCLUDES): Add gdb-cfg.texi, GDBvn.texi. gdb/doc/ChangeLog: * Makefile.in (STABS_DOC_BUILD_INCLUDES): Add gdb-cfg.texi, GDBvn.texi. commit c20ceeb226168ffd84078ef74d890c2b7f69a435 Author: Yiran Wang Date: Mon Jul 20 08:47:57 2015 -0700 Remove warning about references from shared objects to hidden symbols. gold/ PR gold/15574 * resolve.cc (Symbol_table): Remove warning about references from shared objects to hidden symbols. * testsuite/Makefile.am (hidden_test): Add hidden_test.syms. * testsuite/Makefile.in: Regenerate. * testsuite/hidden_test.sh: Check dynamic symbol table; update expected error messages. commit 3675a06a823132663f7c2376796c5345032fddad Author: Yao Qi Date: Mon Jul 20 16:29:16 2015 +0100 Fix ARI warnings to nat/aarch64-linux-hw-point.{c,h} This patch is to fix two ARI warnings for nat/aarch64-linux-hw-point.{c,h}. gdb: 2015-07-20 Yao Qi * nat/aarch64-linux-hw-point.c (aarch64_handle_unaligned_watchpoint): Re-indent the code. * nat/aarch64-linux-hw-point.h: Use ULONGEST rather than "unsigned long long". commit 7ac018954bd9c2d964204a451ecabdd7d8a11945 Author: H.J. Lu Date: Fri Jul 17 08:29:26 2015 -0700 Make binutils abort message GDB friendly We used to generate abort messages like: internal error, aborting at .../bfd/elf64-x86-64.c line 1554 in elf_x86_64_check_relocs We can't cut and paste "file line ???" to GDB. This patch changes those abort messages to internal error, aborting at .../bfd/elf64-x86-64.c:1554 in elf_x86_64_check_relocs so that we can cut and paste "file:???" to GDB. bfd/ * bfd.c (_bfd_abort): Replace " line " with ":" in output message. gas/ * messages.c (as_assert): Replace " line " with ":" in output message. (as_abort): Likewise. ld/ * ldmisc.c (ld_abort): Replace " line " with ":" in output message. commit f2d7e0f45023ef1b469c627aff02ead3697b1240 Author: Alan Modra Date: Mon Jul 20 14:31:23 2015 +0930 Regen two files bfd/ * po/SRC-POTFILES.in: Regenerate. binutils/ * doc/Makefile.in: Regenerate. commit d9d11c361cc29bdac2d2d6c38bce329d25abf7af Author: Alan Modra Date: Mon Jul 20 14:29:37 2015 +0930 ALIGN change affects cris scripts More fallout from a2c59f28. This one could have been fixed by simply using ". = ALIGN (ABSOLUTE (.), 2);" but it's nicer to align the section. * emulparams/criself.sh (INIT_ADDR, FINI_ADDR): Define. (INIT_START, FINI_START): Don't ALIGN. * scriptempl/elf.sc (.init, .fini): Apply INIT_ADDR/FINI_ADDR. commit e474ab13ec653d5d78489467f90669689191b31a Author: Alan Modra Date: Mon Jul 20 14:29:21 2015 +0930 ALIGN change affects standard scripts a2c59f28 changed the way the unary ALIGN behaved inside output sections, resulting in cris-elf testsuite regressions. This patch pads out .bss in the same manner as it was prior to the ALIGN change. * scripttempl/elf.sc (.ldata, .bss): Align absolute value of dot. * ldexp.c (is_align_conditional): Handle binary ALIGN. (exp_fold_tree_1): Move code setting SEC_KEEP for assignments to dot inside output sections. Handle absolute expressions. commit 5e63e4525526ddf01fcbde7d7517560c492a0884 Author: GDB Administrator Date: Mon Jul 20 00:00:07 2015 +0000 Automatic date update in version.in commit 0bda1f8819c4c0aed25c78fadac545d8334dd0c1 Author: GDB Administrator Date: Sun Jul 19 00:00:08 2015 +0000 Automatic date update in version.in commit b4e1fd615ae6582170a6bb62d6519d586bd5347e Author: Kevin Buettner Date: Fri Jul 10 17:41:55 2015 -0700 dwarf2read: Allow SEC_ALLOC sections to be located at address 0. GDB already allows statically initialized variables, located in SEC_LOAD sections, to be placed at address 0. This change allows uninitialized variables (which are in SEC_ALLOC sections) to be placed address 0 as well. gdb/ChangeLog: * dwarf2read.c (dwarf2_locate_sections): Allow has_section_at_zero to be set for SEC_ALLOC sections too. commit ce62125ee9797bc5b23745fe140506b0d64f4220 Author: GDB Administrator Date: Sat Jul 18 00:00:08 2015 +0000 Automatic date update in version.in commit 554717a3edce7e266d409cd2c9c76d92584ac156 Author: Yao Qi Date: Fri Jul 17 14:32:40 2015 +0100 Move common aarch64 HW breakpoint/watchpoint code to nat/ When I look at test fails related to watchpoint on aarch64-linux, I find there are some code duplicates between GDB and GDBserver. This patch is to move some of them to a nat/aarch64-linux-hw-point.{h,c}. The only change I do is about the dr_changed_t typedef, which was ULONGEST in GDB and 'unsigned long long' in GDBserver. Each bit of dr_changed_t represents a status of each HW breakpoint or watchpoint register, and the max number of HW breakpoint or watchpoint registers is 16, so the width of 'unsigned long long' is sufficient. gdb: 2015-07-17 Yao Qi * Makefile.in (HFILES_NO_SRCDIR): Add nat/aarch64-linux-hw-point.h. (aarch64-linux-hw-point.o): New rule. * nat/aarch64-linux-hw-point.h: New file. * nat/aarch64-linux-hw-point.c: New file. * aarch64-linux-nat.c: Include nat/aarch64-linux-hw-point.h. (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h. (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise. (AARCH64_HWP_ALIGNMENT): Likewise. (AARCH64_HWP_MAX_LEN_PER_REG): Likewise. (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise. (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise. (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise. (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise. (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise. (struct aarch64_debug_reg_state): Likewise. (struct arch_lwp_info): Likewise. (aarch64_linux_set_debug_regs): Likewise. (aarch64_notify_debug_reg_change): Remove static. (aarch64_align_watchpoint): Likewise. (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise. (aarch64_watchpoint_length): Likewise. (aarch64_point_encode_ctrl_reg): Likewise (aarch64_point_is_aligned): Likewise. (aarch64_dr_state_insert_one_point): Likewise. (aarch64_dr_state_remove_one_point): Likewise. (aarch64_handle_breakpoint): Likewise. (aarch64_handle_aligned_watchpoint): Likewise. (aarch64_handle_unaligned_watchpoint): Likewise. (aarch64_handle_watchpoint): Likewise. * config/aarch64/linux.mh (NAT_FILE): Add aarch64-linux-hw-point.o. gdb/gdbserver: 2015-07-17 Yao Qi * Makefile.in (aarch64-linux-hw-point.o): New rule. * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o. * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h. (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h. (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise. (AARCH64_HWP_ALIGNMENT): Likewise. (AARCH64_HWP_MAX_LEN_PER_REG): Likewise. (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise. (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise. (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise. (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise. (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise. (struct aarch64_debug_reg_state): Likewise. (struct arch_lwp_info): Likewise. (aarch64_align_watchpoint): Likewise. (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise. (aarch64_watchpoint_length): Likewise. (aarch64_point_encode_ctrl_reg): Likewise (aarch64_point_is_aligned): Likewise. (aarch64_align_watchpoint): Likewise. (aarch64_linux_set_debug_regs): (aarch64_dr_state_insert_one_point): Likewise. (aarch64_dr_state_remove_one_point): Likewise. (aarch64_handle_breakpoint): Likewise. (aarch64_handle_aligned_watchpoint): Likewise. (aarch64_handle_unaligned_watchpoint): Likewise. (aarch64_handle_watchpoint): Likewise. commit c67ca4de63fb3018a7e21ec4afe709d4c0dd52c4 Author: Yao Qi Date: Fri Jul 17 14:32:40 2015 +0100 Pass aarch64_debug_reg_state to functions Some functions on handling HW watchpoint in GDB and GDBserver looks the same except the code getting debug register state from current inferior. In GDB, we get debug register state like this: state = aarch64_get_debug_reg_state (ptid_get_pid (inferior_ptid)); while in GDBserver, we get debug register state like this: state = aarch64_get_debug_reg_state (); This patch is to move two lines above out of some functions, and pass aarch64_debug_reg_state to these functions, in this way, these functions are the same, and can be moved to a common place. gdb: 2015-07-17 Yao Qi * aarch64-linux-nat.c (aarch64_handle_breakpoint): Add argument state and don't call aarch64_get_debug_reg_state. All callers update. (aarch64_linux_insert_hw_breakpoint): Call aarch64_get_debug_reg_state earlier. (aarch64_linux_remove_hw_breakpoint): Likewise. (aarch64_handle_aligned_watchpoint): Add argument state and don't call aarch64_get_debug_reg_state. All callers update. (aarch64_handle_unaligned_watchpoint): Likewise. (aarch64_handle_watchpoint): Add argument state. (aarch64_linux_insert_watchpoint): Call aarch64_get_debug_reg_state earlier. (aarch64_linux_remove_watchpoint): Likewise. gdb/gdbserver: 2015-07-17 Yao Qi * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state and don't aarch64_get_debug_reg_state. All callers update. (aarch64_handle_aligned_watchpoint): Likewise. (aarch64_handle_unaligned_watchpoint): Likewise. (aarch64_handle_watchpoint): Likewise. (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier. (aarch64_remove_point): Likewise. commit 25abf97969e50190cb5532b25b8e1deef3ab3bde Author: Yao Qi Date: Fri Jul 17 14:32:40 2015 +0100 Use debug_printf to print debug message Some functions in aarch64-linux-nat.c and linux-aarch64-low.c looks the same except for the code printing debug message. In GDB, we use fprintf_unfiltered (gdb_stdlog, ...) while in GDBserver, we use fprintf (stderr, ...). This patch is to change them to use debug_printf so that these functions are the same, and I can move them to a common place in the following patch. gdb: 2015-07-17 Yao Qi * aarch64-linux-nat.c (aarch64_show_debug_reg_state): Use debug_printf. (aarch64_handle_unaligned_watchpoint): Likewise. gdb/gdbserver: 2015-07-17 Yao Qi * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use debug_printf. (aarch64_handle_unaligned_watchpoint): Likewise. commit 2ecd81c23cd070cb66073f726bddf2a7083bdaf1 Author: Yao Qi Date: Fri Jul 17 14:32:40 2015 +0100 int -> enum target_hw_bp_type in aarch64-linux-nat.c This patch is to use 'enum target_hw_bp_type' instead of int for breakpoint type, in order to make some functions in GDB and GDBserver looks similar. gdb: 2015-07-17 Yao Qi * aarch64-linux-nat.c (aarch64_dr_state_insert_one_point): Change argument type's type to 'enum target_hw_bp_type'. (aarch64_dr_state_remove_one_point): Likewise. (aarch64_handle_breakpoint): Likewise. (aarch64_linux_insert_hw_breakpoint): Likewise. (aarch64_linux_remove_hw_breakpoint): Likewise. (aarch64_handle_aligned_watchpoint): Likewise. commit e53b69389a7d743fe888926475d46167e91b1157 Author: Yao Qi Date: Fri Jul 17 14:06:34 2015 +0100 Call ptid_get_pid instead of get_thread_id in aarch64_linux_get_debug_reg_capacity aarch64_linux_get_debug_reg_capacity is called by aarch64_linux_child_post_startup_inferior, and argument ptid is created in inf-ptrace.c:inf_ptrace_create_inferior, /* On some targets, there must be some explicit actions taken after the inferior has been started up. */ target_post_startup_inferior (pid_to_ptid (pid)); so in aarch64_linux_get_debug_reg_capacity, we can get pid by ptid_get_pid, and don't need to use get_thread_id. gdb: 2015-07-17 Yao Qi * aarch64-linux-nat.c (aarch64_linux_get_debug_reg_capacity): Call ptid_get_pid instead of get_thread_id. commit 4c0a9a6fa1c43e727e8de9ede87df7c21bd8500f Author: Jiong Wang Date: Fri Jul 17 13:03:26 2015 +0100 [AArch64] Sort TLS reloc types alphabetically commit 6a49a997b406fba3a389d9d8a6ff72042606c69d Author: Yao Qi Date: Fri Jul 17 12:14:59 2015 +0100 Fix using uninitialised values We did a code refacotr here https://sourceware.org/ml/gdb-patches/2013-11/msg00063.html > (get_current_thread): New function, factored out from ... > (add_current_inferior_and_thread): ... this. Adjust. > >@@ -3332,18 +3371,8 @@ add_current_inferior_and_thread (char *wait_status) > > inferior_ptid = null_ptid; > >- /* Now, if we have thread information, update inferior_ptid. First >- if we have a stop reply handy, maybe it's a T stop reply with a >- "thread" register we can extract the current thread from. If >- not, ask the remote which is the current thread, with qC. The >- former method avoids a roundtrip. Note we don't use >- remote_parse_stop_reply as that makes use of the target >- architecture, which we haven't yet fully determined at this >- point. */ >- if (wait_status != NULL) >- ptid = stop_reply_extract_thread (wait_status); >- if (ptid_equal (ptid, null_ptid)) >- ptid = remote_current_thread (inferior_ptid); >+ /* Now, if we have thread information, update inferior_ptid. */ >+ ptid = get_current_thread (wait_status); but after the refactor, local variable ptid is used without initialisation. However, before this change, ptid is initialised to null_ptid. This error can be found by valgrind too... ==3298== at 0x6B99BA: ptid_equal (ptid.c:80) ==3298== by 0x4C67FF: get_current_thread (remote.c:3484) ==3298== by 0x4C6951: add_current_inferior_and_thread (remote.c:3511) ==3298== by 0x4C762C: extended_remote_create_inferior (remote.c:8506) ==3298== by 0x5A5312: run_command_1 (infcmd.c:606) ==3298== by 0x68B4FB: execute_command (top.c:463) ==3298== by 0x5C7214: command_handler (event-top.c:494) ==3298== by 0x5C78A3: command_line_handler (event-top.c:692) ==3298== by 0x6DEB57: rl_callback_read_char (callback.c:220) ==3298== by 0x5C7278: rl_callback_read_char_wrapper (event-top.c:171) ==3298== by 0x5C72C2: stdin_event_handler (event-top.c:432) ==3298== by 0x5C6194: gdb_wait_for_event (event-loop.c:834) This patch initialises local variable ptid to null in get_current_thread. We don't need to initialise ptid in add_current_inferior_and_thread, so this patch also removes the ptid initialisation. gdb: 2015-07-17 Yao Qi * remote.c (get_current_thread): Initialise ptid to null_ptid. (add_current_inferior_and_thread): Don't initialise ptid. commit 4f9b735feac07e013e9f63d50d9da7a91d58cdfe Author: GDB Administrator Date: Fri Jul 17 00:00:08 2015 +0000 Automatic date update in version.in commit 6bcb1f97b19a749ddec7c0d80d10282fcd3f4fb3 Author: Doug Evans Date: Thu Jul 16 09:48:03 2015 -0700 stabs.texinfo: @include gdb-cfg.texi. gdb/doc/ChangeLog: * stabs.texinfo: @include gdb-cfg.texi. commit 775a3298dca48e76e29045912e08025abacafa94 Author: Jan Kratochvil Date: Thu Jul 16 18:01:22 2015 +0200 Fix gdb.arch/i386-biarch-core.exp FAIL on i386. This new test fails on i686 buildbot slaves, (gdb) core-file /home/gdb-buildbot-2/fedora-x86-64-2/fedora-i686/build/gdb/testsuite/gdb.arch/i386-biarch-core.core "/home/gdb-buildbot-2/fedora-x86-64-2/fedora-i686/build/gdb/testsuite/gdb.arch/i386-biarch-core.core" is not a core dump: File format not recognized (gdb) FAIL: gdb.arch/i386-biarch-core.exp: core-file There are two problems: (1) The testcase did not really test if elf64-i386 is supported by GDB (BFD). That was OK for a Fedora testcase but I forgot about it when submitting it upstream. I haven't really verified if the GNU target is elf64-little but it seems so, no other one seems suitable from: elf32-x86-64 elf64-big elf64-k1om elf64-l1om elf64-little elf64-x86-64 pei-x86-64 (2) The output of the "core-file" command itself can be arbitrary as the elf64-i386 file with x86_64 registers is really broken; but that does not matter much, important is the following test whether core file memory is readable. ./configure --enable-64-bit-bfd (gdb) core-file /home/jkratoch/redhat/gdb-test-build32-plus64/gdb/testsuite/gdb.arch/i386-biarch-core.core^M warning: Couldn't find general-purpose registers in core file.^M Failed to read a valid object file image from memory.^M warning: Couldn't find general-purpose registers in core file.^M #0 in ?? ()^M (gdb) FAIL: gdb.arch/i386-biarch-core.exp: core-file x/i 0x400078^M 0x400078: hlt ^M (gdb) PASS: gdb.arch/i386-biarch-core.exp: .text is readable I do not know much dejagnu but I expect 'istarget' tests against the site.exp 'target_triplet' content which is set to the primary GDB target (--target=...). GDB is normally never configured for primary target elf64-i386, I think BFD does not know such explicit target, it gets recognized as elf64-little. In fact many testfiles of the GDB testsuite are wrong as they require 'istarget' (therefore primary GDB target) even for just loading arch specific files which would be sufficient with secondary target (--enable-targets=...) support. This my new patch removes this 'istarget' check as it is IMO unrelated to what we need to test. Although you are right we do 'x/i' and test for 'hlt' so I think we should test also for available 'set architecture i386'. We could also test by 'x/bx' instead of 'x/i' to avoid such additional test/requirement. This testcase comes from a different bug from 2009: https://bugzilla.redhat.com/show_bug.cgi?id=457187 http://pkgs.fedoraproject.org/cgit/gdb.git/commit/?id=94cd124608bf0dd359cb48a710800d72c21b30c3 That bug has been fixed in the meantime but the same testcase was reproducing this new different bug - internal error regression - so I submitted it. We can remove the "x/bx $address" test but it was useful for the previous bug from 2009 as that time the internal error regression did not happen, just the core file was not recognized (which would not be detected by the proposed ignoring of the "core-file" command output) and so the core file was not available. That can be tested by the "x/bx $address" test. gdb/testsuite/ChangeLog 2015-07-16 Jan Kratochvil * gdb.arch/i386-biarch-core.exp: Replace istarget by "complete set gnutarget". Remove expectation for the "core-file" command. commit 6f1c2142595b1ec203a7da998b2155403a433e89 Author: Alessandro Marzocchi Date: Thu Jul 16 16:38:48 2015 +0100 Updates the ARM disassembler's output of floating point constants to include the actual floating point value. opcodes * arm-dis.c (print_insn_coprocessor): Added support for quarter float bitfield format. (coprocessor_opcodes): Changed VFP vmov reg,immediate to use new quarter float bitfield format. tests * gas/arm/vfpv3-const-conv.d: Update expected result due to change of comment for vmov reg,immediate with VFP coprocessor. commit 53c3012ccc25ecfc4fa1f52e341e19b30d1e57db Author: Alan Modra Date: Fri Jul 17 00:13:22 2015 +0930 Correct readelf dynamic section buffer overlow test PR binutils/18672 * readelf.c (get_32bit_dynamic_section): Correct buffer limit test. (get_64bit_dynamic_section): Likewise. commit 77a69ff840d60cca73624e16e5b2dd5217a6037e Author: Jiong Wang Date: Thu Jul 16 15:46:21 2015 +0100 [AArch64][3/3] LD support BFD_RELOC_AARCH64_TLSLD_ADR_PREL21 commit 6c37fedc41b028905cc828c0eccd3a8720512e4e Author: Jiong Wang Date: Thu Jul 16 15:43:21 2015 +0100 [AArch64][2/3] GAS support BFD_RELOC_AARCH64_TLSLD_ADR_PREL21 commit 53e8fd0f07cec1eb36149a64e4ed45923967453c Author: Jiong Wang Date: Thu Jul 16 15:38:32 2015 +0100 [AArch64][1/3] Add R_AARCH64_P32_TLSLD_ADR_PREL21 in elf header commit 081e4c7d6714c62ae0e53842013e360f97618ba4 Author: Matthew Wahab Date: Thu Jul 16 15:11:30 2015 +0100 [ARM] Add crypto-neon-fp-armv8.1 as an fpu option 2015-07-16 Matthew Wahab gas/ * config/tc-arm.c (arm_fpus): Add crypto-neon-fp-armv8.1. * doc/c-arm.texi (-mfpu=): Likewise. Correct the entry for neon-fp-armv8.1. commit 84b52b66511b99c8cb5cc2074d3dbabf4ffcf826 Author: James Greenhalgh Date: Thu Jul 16 14:43:00 2015 +0100 [ARM] Make human parsing of "processor does not support instruction in mode" error messages easier 2015-07-16 James Greenhalgh gas/ * config/tc-arm.c (md_assemble): Rephrase the "selected processor does not support ARM mode" error messages. gas/testsuite/ * gas/arm/arch7em-bad.l: Update expected errors. * gas/arm/arch7m-bad.l: Likewise. * gas/arm/arm-idiv-bad.l: Likewise. * gas/arm/arm7-bad.l: Likewise. * gas/arm/armv1-bad.l: Likewise. * gas/arm/thumb-w-bad.l: Likewise. commit 4bcddaceb01a5ece549b2d807166b5e050801f5a Author: Pierre Langlois Date: Thu Jul 16 10:16:14 2015 +0100 [AArch64] Mark single precision pseudo registers unavailable if invalid I noticed two failure in gdb.trace/mi-trace-frame-collected.exp: FAIL: gdb.trace/mi-trace-frame-collected.exp: live: -trace-frame-collected (register) FAIL: gdb.trace/mi-trace-frame-collected.exp: tfile: -trace-frame-collected (register) In these cases, we are not collecting registers so the MI command -trace-frame-collected should only give us the value of the PC. However, it also gives us all of the single precision pseudo registers, initialized with 0x0. We can reproduce this error by simply issuing the 'maint print cooked-register' when no inferior is connected: ~~~ ... (gdb) maint print cooked-register Name Nr Rel Offset Size Type Cooked value x0 0 0 0 8 long x1 1 1 8 8 long ... d30 130 62 1540 8 *1 d31 131 63 1548 8 *1 s0 132 64 1556 4 *1 0x00000000 s1 133 65 1560 4 *1 0x00000000 s2 134 66 1564 4 *1 0x00000000 ... s28 160 92 1668 4 *1 0x00000000 s29 161 93 1672 4 *1 0x00000000 s30 162 94 1676 4 *1 0x00000000 s31 163 95 1680 4 *1 0x00000000 h0 164 96 1684 2 *1 h1 165 97 1686 2 *1 h2 166 98 1688 2 *1 ... ~~~ It turns out GDB does not check if S registers are valid before returning a value for them. It should return in this case. gdb/ChangeLog: * aarch64-tdep.c (aarch64_pseudo_read_value): Mark S register as unavailable if invalid. commit bb20bd8373e9880ec9bf0df357c5836519ca1048 Author: GDB Administrator Date: Thu Jul 16 00:00:07 2015 +0000 Automatic date update in version.in commit db1ff28b60f8886b8d7c634f1db2f939ba47a13c Author: Jan Kratochvil Date: Wed Jul 15 20:27:32 2015 +0200 Revert the previous 7 commits of: Validate binary before use ddc98fbf2fd9e244a215a4d09e559180dc573a14 Create empty nat/linux-maps.[ch] and common/target-utils.[ch] 6e5b4429db0d66e2d0b27e1bcfe4709f3dae73ed Move gdb_regex* to common/ f7af1fcd759fa126612018a5916cf808df7bb8bc Prepare linux_find_memory_regions_full & co. for move 9904185cfde13d6c6849f1f042c8e3b74974cf08 Move linux_find_memory_regions_full & co. 700ca40f6fc1addd7238f4ab57f76c095ad3c99f gdbserver build-id attribute generator ca5268b6be265580b91ef75c1a1a9815f581ae42 Validate symbol file using build-id 0a94970d663a053c523f23ac0d71deb25a77f709 Tests for validate symbol file using build-id gdb/ChangeLog 2015-07-15 Jan Kratochvil Revert the previous 6 commits: Create empty nat/linux-maps.[ch] and common/target-utils.[ch]. Move gdb_regex* to common/ Prepare linux_find_memory_regions_full & co. for move Move linux_find_memory_regions_full & co. gdbserver build-id attribute generator Validate symbol file using build-id gdb/gdbserver/ChangeLog 2015-07-15 Jan Kratochvil Revert the previous 3 commits: Move gdb_regex* to common/ Move linux_find_memory_regions_full & co. gdbserver build-id attribute generator gdb/doc/ChangeLog 2015-07-15 Jan Kratochvil Revert the previous 2 commits: gdbserver build-id attribute generator Validate symbol file using build-id gdb/testsuite/ChangeLog 2015-07-15 Jan Kratochvil Revert the previous commit: Tests for validate symbol file using build-id. commit 0a94970d663a053c523f23ac0d71deb25a77f709 Author: Jan Kratochvil Date: Sun Jul 12 20:59:03 2015 +0200 Tests for validate symbol file using build-id New testcase. gdb/testsuite/ChangeLog 2015-07-15 Aleksandar Ristovski Date: Wed Jul 15 17:37:28 2015 +0200 Validate symbol file using build-id Consumer part of the "build-id" attribute. gdb/ChangeLog 2015-07-15 Aleksandar Ristovski Validate symbol file using build-id. * NEWS (Changes since GDB 7.10): Add 'set validate-build-id' and 'show validate-build-id'. Add build-id attribute. * solib-darwin.c (_initialize_darwin_solib): Assign validate value. * solib-dsbt.c (_initialize_dsbt_solib): Ditto. * solib-frv.c (_initialize_frv_solib): Ditto. * solib-spu.c (set_spu_solib_ops): Ditto. * solib-svr4.c: Include rsp-low.h. (NOTE_GNU_BUILD_ID_NAME): New define. (svr4_validate): New function. (svr4_copy_library_list): Duplicate field build_id. (library_list_start_library): Parse 'build-id' attribute. (svr4_library_attributes): Add 'build-id' attribute. (_initialize_svr4_solib): Assign validate value. * solib-target.c (solib.h): Include. (_initialize_solib_target): Assign validate value. * solib.c (validate_build_id, show_validate_build_id): New. (solib_map_sections): Use ops->validate. (clear_so): Free build_id. (default_solib_validate): New function. (_initialize_solib): Add "validate-build-id". * solib.h (default_solib_validate): New declaration. * solist.h (struct so_list): New fields 'build_idsz' and 'build_id'. (target_so_ops): New field 'validate'. gdb/doc/ChangeLog 2015-07-15 Jan Kratochvil * gdb.texinfo (Files): Add 'set validate-build-id' and 'show validate-build-id'. commit 700ca40f6fc1addd7238f4ab57f76c095ad3c99f Author: Jan Kratochvil Date: Wed Jul 15 17:37:28 2015 +0200 gdbserver build-id attribute generator Producer part of the new "build-id" XML attribute. gdb/ChangeLog 2015-07-15 Aleksandar Ristovski gdbserver build-id attribute generator. * features/library-list-svr4.dtd (library-list-svr4): New 'build-id' attribute. gdb/doc/ChangeLog 2015-07-15 Aleksandar Ristovski gdbserver build-id attribute generator. * gdb.texinfo (Library List Format for SVR4 Targets): Add 'build-id' in description, example, new attribute in dtd. gdb/gdbserver/ChangeLog 2015-07-15 Aleksandar Ristovski gdbserver build-id attribute generator. * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include. (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New. (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New. (find_phdr): New. (get_dynamic): Use find_pdhr to traverse program headers. (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec) (compare_mapping_entry_range, struct find_memory_region_callback_data) (read_build_id, find_memory_region_callback, lrfind_mapping_entry) (get_hex_build_id): New. (linux_qxfer_libraries_svr4): Add optional build-id attribute to reply XML document. commit 9904185cfde13d6c6849f1f042c8e3b74974cf08 Author: Jan Kratochvil Date: Wed Jul 15 17:37:27 2015 +0200 Move linux_find_memory_regions_full & co. This should be just a move with no changes. gdb/ChangeLog 2015-07-15 Aleksandar Ristovski Move linux_find_memory_regions_full & co. * linux-tdep.c (nat/linux-maps.h): Include. (gdb_regex.h): Remove the include. (enum filterflags, struct smaps_vmflags, read_mapping, decode_vmflags) (mapping_is_anonymous_p, dump_mapping_p): Moved to nat/linux-maps.c. (linux_find_memory_region_ftype): Moved typedef to nat/linux-maps.h. (linux_find_memory_regions_full): Moved definition to nat/linux-maps.c. * nat/linux-maps.c: Include ctype.h, target/target-utils.h, gdb_regex.h and target/target.h. (struct smaps_vmflags, read_mapping, decode_vmflags) (mapping_is_anonymous_p, dump_mapping_p): Move from linux-tdep.c. (linux_find_memory_regions_full): Move from linux-tdep.c. * nat/linux-maps.h (read_mapping): New declaration. (linux_find_memory_region_ftype, enum filterflags): Moved from linux-tdep.c. (linux_find_memory_regions_full): New declaration. * target.c (target/target-utils.h): Include. (read_alloc_pread_ftype): Moved typedef to target/target-utils.h. (read_alloc, read_stralloc_func_ftype, read_stralloc): Moved definitions to target/target-utils.c. * target.h (target_fileio_read_stralloc): Move it to target/target.h. * target/target-utils.c (read_alloc, read_stralloc): Move definitions from target.c. * target/target-utils.h (read_alloc_pread_ftype): New typedef. (read_alloc): New declaration. (read_stralloc_func_ftype): New typedef. (read_stralloc): New declaration. * target/target.h (target_fileio_read_stralloc): Move it from target.h. gdb/gdbserver/ChangeLog 2015-07-15 Aleksandar Ristovski * target.c: Include target/target-utils.h and fcntl.h. (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1) (target_fileio_read_stralloc): New functions. commit f7af1fcd759fa126612018a5916cf808df7bb8bc Author: Jan Kratochvil Date: Wed Jul 15 17:37:27 2015 +0200 Prepare linux_find_memory_regions_full & co. for move Prepare code for move into gdb/common/. gdb/ChangeLog 2015-07-15 Aleksandar Ristovski Prepare linux_find_memory_regions_full & co. for move. * linux-tdep.c (linux_find_memory_region_ftype): Comment. (linux_find_memory_regions_full): Change signature and prepare for moving to linux-maps. (linux_find_memory_regions_data): Rename field 'obfd' to 'data'. (linux_find_memory_regions_thunk): New. (linux_find_memory_regions_thunk): Use 'data' field instead of 'obfd'. (linux_find_memory_regions_gdb): New. (linux_find_memory_regions): Rename argument 'obfd' to 'func_data'. (linux_make_mappings_corefile_notes): Use linux_find_memory_regions_gdb. * target.c (read_alloc_pread_ftype): New typedef. (target_fileio_read_alloc_1_pread): New function. (read_alloc): Refactor from target_fileio_read_alloc_1. (read_stralloc_func_ftype): New typedef. (target_fileio_read_alloc_1): New implementation. Use read_alloc. (read_stralloc): Refactored from target_fileio_read_stralloc. (target_fileio_read_stralloc): New implementation, use read_stralloc. commit 6e5b4429db0d66e2d0b27e1bcfe4709f3dae73ed Author: Jan Kratochvil Date: Wed Jul 15 17:37:27 2015 +0200 Move gdb_regex* to common/ Later patches need regex support also in gdbserver. gdb/ChangeLog 2015-07-15 Jan Kratochvil * Makefile.in (HFILES_NO_SRCDIR): Change gdb_regex.h to common/gdb_regex.h. (COMMON_OBS): Add gdb_regex.o. (gdb_regex.o): New. * common/common.m4 (GDB_AC_COMMON): Add gdb_use_included_regex, --without-included-regex and USE_INCLUDED_REGEX. * common/gdb_regex.c: New file from utils.c functions. * common/gdb_regex.h: Move it here from gdb_regex.h, update include file wrapping define name. * configure: Rebuilt. * configure.ac (gdb_use_included_regex, --without-included-regex) (USE_INCLUDED_REGEX): Move them to common/common.m4. * gdb_regex.h: Move it to common/gdb_regex.h. * utils.c: Remove include gdb_regex.h. (do_regfree_cleanup, make_regfree_cleanup, get_regcomp_error) (compile_rx_or_error): Move them to common/gdb_regex.c. gdb/gdbserver/ChangeLog 2015-07-15 Jan Kratochvil * Makefile.in (OBS): Add gdb_regex.o. (gdb_regex.o): New. * config.in: Rebuilt. * configure: Rebuilt. commit ddc98fbf2fd9e244a215a4d09e559180dc573a14 Author: Jan Kratochvil Date: Wed Jul 15 17:37:27 2015 +0200 Create empty nat/linux-maps.[ch] and common/target-utils.[ch] Prepare new files for later move. gdb/ChangeLog 2015-07-15 Aleksandar Ristovski Create empty nat/linux-maps.[ch] and common/target-utils.[ch]. * Makefile.in (HFILES_NO_SRCDIR); Add nat/linux-maps.h, common/target-utils.h. (COMMON_OBS): Add target-utils.o. (linux-maps.o, target-utils.o): New. * target/target-utils.c: New file. * target/target-utils.h: New file. * config/i386/linux.mh (NATDEPFILES): Add linux-maps.o. * config/i386/linux64.mh (NATDEPFILES): Ditto. * nat/linux-maps.c: New file. * nat/linux-maps.h: New file. gdb/gdbserver/ChangeLog 2015-07-15 Aleksandar Ristovski Create empty nat/linux-maps.[ch] and common/target-utils.[ch]. * Makefile.in (OBS): Add target-utils.o. (linux-maps.o, target-utils.o): New. * configure.srv (srv_linux_obj): Add linux-maps.o. commit 03346981fe6c11ab63b54a8d1919d6357e659684 Author: Sandra Loosemore Date: Wed Jul 15 08:30:14 2015 -0700 Unbreak nios2-*-linux* GDB testing. 2015-07-15 Sandra Loosemore gdb/testsuite/ * gdb.base/sigaltstack.exp (finish_test): Add kfail for nios2-*-linux*. * gdb.base/sigbpt.exp (stepi_out): Likewise. * gdb.base/siginfo.exp: Likewise. * gdb.base/sigstep.exp (advance, advancei): Likewise. commit 189ebcf9150ee935fd5f9718a3abf02084dde02d Author: H.J. Lu Date: Wed Jul 15 07:31:55 2015 -0700 Make x86 Linux assembler default to gABI compliant The default compression is gABI compliant now. This patch makes the x86 Linux assembler default to gABI compliant. * config/tc-i386.c (flag_compress_debug): Replace COMPRESS_DEBUG_GNU_ZLIB with COMPRESS_DEBUG_GABI_ZLIB. commit e57bb7a0313b66f8be8b380f5328bbb45fbc2fbf Author: Pierre Langlois Date: Wed Jul 15 15:03:01 2015 +0100 Move ChangeLog entry to gdbserver gdb/gdbserver/ChangeLog: * linux-aarch64-low.c (aarch64_supports_range_stepping): New function, return 1. (the_low_target): Install it. commit d1d0aea1ea3572451ed04dc22a31ec1c50c606de Author: Pierre Langlois Date: Wed Jul 15 14:58:32 2015 +0100 [GDBserver][AArch64] Enable support for range stepping gdb/gdbserver/Changelog: * linux-aarch64-low.c (aarch64_supports_range_stepping): New function, return 1. (the_low_target): Install it. commit 42422cc7d6c2e816ef1c4d268f41b58c031344f2 Author: Pierre Langlois Date: Wed Jul 15 14:33:32 2015 +0100 [testsuite] Skip gdb.trace/range-stepping.exp test case if not supported Tracepoints and range stepping are independent features. This patch skips the gdb.trace/range-stepping.exp test case if the target does not support range stepping. gdb/testsuite/ChangeLog: * gdb.base/range-stepping.exp (gdb_range_stepping_enabled): Move it to ... * lib/range-stepping-support.exp (gdb_range_stepping_enabled): ... here. * gdb.trace/range-stepping.exp: Check that the target supports range stepping. commit e7b01ce03de85cfbbddb6ed755486db528abf1d1 Author: Markus Metzger Date: Wed Jul 8 09:38:16 2015 +0200 ari, btrace: avoid unsigned long long Fix the ARI warning about the use of unsigned long long. We can't use ULONGEST as this is defined unsigned long on 64-bit systems. This will result in a compile error when storing a pointer to an unsigned long long structure field (declared in perf_event.h as __u64) in a ULONGEST * variable. Use size_t to hold the buffer size inside GDB and __u64 when interfacing the Linux kernel. gdb/ * nat/linux-btrace.c (perf_event_read): Change the type of DATA_HEAD. (perf_event_read_all): Change the type of SIZE and DATA_HEAD. (perf_event_read_bts): Change the type of SIZE and READ. (linux_enable_bts): Change the type of SIZE, PAGES, DATA_SIZE, and DATA_OFFSET. Move DATA_SIZE declaration. Restrict the buffer size to UINT_MAX. Check for overflows when using DATA_HEAD from the perf mmap page. (linux_enable_pt): Change the type of PAGES and SIZE. Restrict the buffer size to UINT_MAX. (linux_read_bts): Change the type of BUFFER_SIZE, SIZE, DATA_HEAD, and DATA_TAIL. * nat/linux-btrace.h (struct perf_event_buffer) : Change type. * common/btrace-common.h (struct btrace_dat_pt) : Change type. * common/btrace-common.c (btrace_data_append): Change the type of SIZE. * btrace.c (parse_xml_raw): Change the type of SIZE. Change oddness check. commit 210187848791f50ee7dd8eaae8fc4bd371b3550b Author: GDB Administrator Date: Wed Jul 15 00:00:08 2015 +0000 Automatic date update in version.in commit f168693bc9d109c387e442119354bd57ecec8267 Author: Simon Marchi Date: Mon Jul 6 16:05:06 2015 -0400 Remove CHECK_TYPEDEF, use check_typedef instead I think that the CHECK_TYPEDEF macro is not necessary, and even a bit annoying. It makes unclear the fact that the "type" variables gets overwritten. It has actually bitten me a few times. I think the following, explicit form, is better. type = check_typedef (type); This patches changes all instances of CHECK_TYPEDEF for an equivalent call to check_typedef. The bulk of the change was done with this sed: sed -i 's/CHECK_TYPEDEF (\([^)]*\));/\1 = check_typedef (\1);/' .c The ChangeLog was generated using David Malcom's generate_changelog.py. I manually fixed those places where it gets the wrong function name, hopefully all of them. The patch was built-tested, and I ran a few smoke tests. gdb/ChangeLog: * gdbtypes.h (CHECK_TYPEDEF): Remove. * aarch64-tdep.c (aarch64_return_in_memory): Replace CHECK_TYPEDEF with check_typedef. * ada-lang.c (decode_constrained_packed_array_type): Likewise. (ada_array_length): Likewise. (find_parallel_type_by_descriptive_type): Likewise. (ada_check_typedef): Likewise. * arm-tdep.c (arm_return_in_memory): Likewise. * ax-gdb.c (gen_trace_static_fields): Likewise. (gen_struct_ref_recursive): Likewise. * c-exp.y (exp : SIZEOF '(' type ')' %prec UNARY): Likewise. (variable: block COLONCOLON name): Likewise. (qualified_name: TYPENAME COLONCOLON name): Likewise. * c-lang.c (classify_type): Likewise. * c-typeprint.c (c_print_type): Likewise. (c_print_typedef): Likewise. (c_type_print_base): Likewise. * c-valprint.c (c_val_print): Likewise. * compile/compile-c-types.c (convert_type): Likewise. * compile/compile-object-load.c (get_out_value_type): Likewise. * completer.c (add_struct_fields): Likewise. (expression_completer): Likewise. * cp-namespace.c (cp_find_type_baseclass_by_name): Likewise. (cp_lookup_nested_symbol_1): Likewise. (cp_lookup_nested_symbol): Likewise. * cp-valprint.c (cp_print_value_fields): Likewise. (cp_print_static_field): Likewise. * d-valprint.c (d_val_print): Likewise. * eval.c (evaluate_subexp_standard): Likewise. (evaluate_subexp_for_sizeof): Likewise. * f-exp.y (exp : SIZEOF '(' type ')' %prec UNARY): Likewise. * f-typeprint.c (f_type_print_base): Likewise. * f-valprint.c (f_val_print): Likewise. * gdbtypes.c (get_discrete_bounds): Likewise. (create_array_type_with_stride): Likewise. (type_name_no_tag_or_error): Likewise. (lookup_struct_elt_type): Likewise. (get_unsigned_type_max): Likewise. (internal_type_vptr_fieldno): Likewise. (set_type_vptr_fieldno): Likewise. (internal_type_vptr_basetype): Likewise. (set_type_vptr_basetype): Likewise. (get_vptr_fieldno): Likewise. (is_integral_type): Likewise. (is_scalar_type): Likewise. (is_scalar_type_recursive): Likewise. (distance_to_ancestor): Likewise. (is_unique_ancestor_worker): Likewise. (check_types_equal): Likewise. * gnu-v2-abi.c (gnuv2_value_rtti_type): Likewise. * gnu-v3-abi.c (gnuv3_dynamic_class): Likewise. (gnuv3_get_vtable): Likewise. (gnuv3_pass_by_reference): Likewise. * go-exp.y (exp : SIZEOF_KEYWORD '(' type ')' %prec UNARY): Likewise. * go-lang.c (gccgo_string_p): Likewise. (go_classify_struct_type): Likewise. * go-typeprint.c (go_print_type): Likewise. * go-valprint.c (go_val_print): Likewise. * guile/scm-math.c (vlscm_binop): Likewise. * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise. (gdbscm_value_to_bytevector): Likewise. (gdbscm_value_to_bool): Likewise. (gdbscm_value_to_integer): Likewise. (gdbscm_value_to_real): Likewise. * infcall.c (call_function_by_hand_dummy): Likewise. * infcmd.c (get_return_value): Likewise. * jv-lang.c (is_object_type): Likewise. * jv-typeprint.c (java_type_print_base): Likewise. * jv-valprint.c (java_print_value_fields): Likewise. (java_val_print): Likewise. * linespec.c (find_methods): Likewise. (collect_one_symbol): Likewise. * m2-typeprint.c (m2_print_type): Likewise. (m2_print_typedef): Likewise. (m2_get_discrete_bounds): Likewise. * m2-valprint.c (m2_print_long_set): Likewise. (m2_print_unbounded_array): Likewise. (m2_print_array_contents): Likewise. (m2_val_print): Likewise. * opencl-lang.c (opencl_print_type): Likewise. * p-exp.y (exp : SIZEOF '(' type ')' %prec UNARY): Likewise. * p-typeprint.c (pascal_print_type): Likewise. (pascal_print_typedef): Likewise. (pascal_type_print_base): Likewise. * p-valprint.c (pascal_val_print): Likewise. (pascal_object_print_value_fields): Likewise. (pascal_object_print_static_field): Likewise. * python/py-type.c (typy_fields_items): Likewise. (typy_get_composite): Likewise. * python/py-value.c (valpy_get_dynamic_type): Likewise. (valpy_binop): Likewise. (valpy_long): Likewise. (valpy_float): Likewise. * stack.c (return_command): Likewise. * symtab.c (check_field): Likewise. (lookup_symbol_aux): Likewise. * tic6x-tdep.c (tic6x_return_value): Likewise. * typeprint.c (print_type_scalar): Likewise. * valarith.c (value_vector_widen): Likewise. * valops.c (value_cast): Likewise. (value_assign): Likewise. (do_search_struct_field): Likewise. (search_struct_method): Likewise. (find_method_list): Likewise. * valprint.c (val_print_scalar_type_p): Likewise. (valprint_check_validity): Likewise. (generic_val_print): Likewise. * value.c (unpack_double): Likewise. (value_primitive_field): Likewise. (unpack_bits_as_long): Likewise. commit 452802827f0870df0c8ece81a7e098d94cee4536 Author: Iain Buclaw Date: Tue Jul 14 20:31:21 2015 +0200 Add support reading D modules from DWARF Extends existing support for namespaces/modules in C++/Fortran/Java to include language_d too. However unlike Fortran/C++, the separator for qualified names is a single dot. 2015-07-14 Iain Buclaw * dwarf2read.c (find_slot_in_mapped_hash): Extend language support to also test for language_d. (dwarf2_compute_name): Likewise. (read_func_scope): Likewise. (read_structure_type): Likewise. (determine_prefix): Likewise. (read_import_statement): Use dot as the separator for language_d. (typename_concat): Likewise, but don't prefix the D main function. commit cfa68bae4271a51a4402f8ca7ccdc014be95d79d Author: Jan Kratochvil Date: Tue Jul 14 19:50:20 2015 +0200 i386-biarch-core.exp: Fix comment typo gdb/testsuite/ChangeLog 2015-07-14 Jan Kratochvil * gdb.arch/i386-biarch-core.exp: Fix comment typo. commit 19a7fe52ae3d0971e67a134bcb1648899e21ae1c Author: H.J. Lu Date: Tue Jul 14 10:25:52 2015 -0700 Make default compression gABI compliant All programs in binutils+gdb git repo now support gABI compression with the SHF_COMPRESSED bit. This patch makes the zlib-gabi option as compression default for gas, gold, ld and objcopy, instead of the zlib-gnu option whose outputs are incompatible with gABI. binutils/ * objcopy.c (copy_file): Set BFD_COMPRESS_GABI if not zlib-gnu. * doc/binutils.texi: Change --compress-debug-sections and --compress-debug-sections=zlib to zlib-gabi. binutils/testsuite/ * binutils-all/compress.exp: Update. gas/ * as.c (parse_args): Make --compress-debug-sections and --compress-debug-sections=zlib the same as --compress-debug-sections=zlib-gabi. * doc/as.texinfo: Change --compress-debug-sections and --compress-debug-sections=zlib to zlib-gabi. gold/ * compressed_output.cc (Output_compressed_section::set_final_data_size): Make --compress-debug-sections=zlib the same as --compress-debug-sections=zlib-gabi. * testsuite/Makefile.am (flagstest_compress_debug_sections.check): Expect ".debug_.*" with the SHF_COMPRESSED bit, instead of ".zdebug_". * testsuite/Makefile.in: Regenerated. ld/ * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Make --compress-debug-sections=zlib the same as --compress-debug-sections=zlib-gabi. * ld.texinfo: Change --compress-debug-sections=zlib to zlib-gabi. ld/testsuite/ * ld-elf/zlibbegin.rS: Updated to .debug_.* with the SHF_COMPRESSED bit. * ld-elf/zlibnormal.rS: Likewise. commit 22121df01ff9247b3cb272f52632848f9631f80f Author: H.J. Lu Date: Tue Jul 14 09:52:36 2015 -0700 Sync Makefile.tpl with GCC * Makefile.in: Regenerated. Sync with GCC 2015-05-21 Jason Merrill * Makefile.tpl: Update comments. 2015-04-22 Bernhard Reutner-Fischer * Makefile.tpl: Remove surplus whitespace throughout. 2015-03-25 Martin Liska Yury Gribov * Makefile.tpl: Fix ln source location for vimrc file. commit dc2edb520a534fd0c2af169d46b4d892208e8f42 Author: H.J. Lu Date: Tue Jul 14 09:17:41 2015 -0700 Sync longlong.h with GCC Sync with GCC 2014-10-28 Richard Henderson * longlong.h [__alpha] (umul_ppmm): Disable for c++. commit d0270d8cb92123b55d2bf735e59ee9450a9893f9 Author: H.J. Lu Date: Tue Jul 14 09:16:33 2015 -0700 Sync hashtab.h, splay-tree.h with GCC Sync with GCC 2014-12-09 Trevor Saunders * hashtab.h, splay-tree.h: Remove GTY markers. commit 1d83d382dea9b98d4aa4aa0083713447b83e0ba5 Author: H.J. Lu Date: Tue Jul 14 09:14:50 2015 -0700 Remove trailing spaces in demangle.h commit 4d6404f01d38b1f34bd9bba4d78276e8154f3312 Author: H.J. Lu Date: Tue Jul 14 09:10:59 2015 -0700 Sync ansidecl.h with GCC Sync with GCC 2015-03-02 Markus Trippelsdorf PR target/65261 * ansidecl.h (ATTRIBUTE_NO_SANITIZE_UNDEFINED): New macro. commit 49d00f48e8e3c1331d367785f19c69867a47b4cd Author: H.J. Lu Date: Tue Jul 14 08:43:24 2015 -0700 Sync config files with GCC Sync with GCC 2015-05-13 Eric Botcazou * sjlj.m4: New file. 2015-05-04 Trevor Saunders * bitfields.m4: Change int to long long, and use bitfields of width 1 instead of 0. 2015-05-01 Trevor Saunders * bitfields.m4: New file. 2015-04-14 H.J. Lu * bootstrap-mpx.mk: New file. 2015-03-25 Uros Bizjak PR bootstrap/65537 * bootstrap-lto-noplugin.mk: New build configuration. 2014-11-13 Kirill Yukhin * target-posix: New file. 2014-10-27 Tom Tromey * gcc-plugin.m4: New file. commit 99fe86f7999afd2743b08c550b10f083ae4bd9bd Author: Peter Bergner Date: Tue Jul 14 10:46:16 2015 -0500 Fix build issue with nat/linux-namespaces.c. * nat/linux-namespaces.c (setns): Rename from this ... (do_setns): ... to this. Support calling setns if it exists. (mnsh_handle_setns): Call do_setns. commit 8a643cc36cf121de3a9131f95547eba927413710 Author: H.J. Lu Date: Tue Jul 14 08:39:12 2015 -0700 Sync config/warnings.m4 with GCC config/ Sync with GCC 2015-05-27 Jason Merrill PR bootstrap/66304 * warnings.m4 (ACX_PROG_CXX_WARNING_OPTS) (ACX_PROG_CXX_WARNINGS_ARE_ERRORS) (ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC): New. (ACX_PROG_CC_WARNING_OPTS, ACX_PROG_CC_WARNING_ALMOST_PEDANTIC) (ACX_PROG_CC_WARNINGS_ARE_ERRORS): Push into C language context. libdecnumber/ * configure: Regenerated. libiberty/ * configure: Regenerated. opcodes/ * configure: Regenerated. commit 969b1713b7c5bc0a5fb90d85f82c7f0fd27de34f Author: H.J. Lu Date: Tue Jul 14 08:17:27 2015 -0700 Sync toplevel configure with GCC Sync with GCC 2015-05-16 James Bowman * configure.ac: FT32 target added. * configure: Regenerate. commit ce6c656dcb8257b7c05975039700e3c9f4c3af3b Author: H.J. Lu Date: Tue Jul 14 07:49:50 2015 -0700 Sync toplevel configure.ac with GCC Sync with GCC 2015-06-02 Jason Merrill PR bootstrap/66319 * configure.ac: Use -std=gnu++98. 2015-05-28 Mike Frysinger * configure.ac (--vtable-verify): Use AS_HELP_STRING for help. * configure: Regenerate. 2015-05-11 Paulo Matos * configure.ac: Fix typo. * configure: Regenerate. 2015-05-03 Matthias Klose * configure.ac: Match $host configured with triplets. * configure: Regenerate. 2015-04-17 Jakub Jelinek PR bootstrap/62077 * configure.ac (--enable-stage1-checking): Default to release,misc,gimple,rtlflag,tree,types if --disable-checking or --enable-checking is not specified and DEV-PHASE is not experimental. * configure: Regenerated. 2015-03-27 Uros Bizjak Install back PR target/47230 fix (Revert the revert). config/ Sync with GCC * mh-alpha-linux: Restored. commit 454de2ee151958e0c45d4ed0f3e496156e29d3a2 Author: Nick Clifton Date: Tue Jul 14 12:06:33 2015 +0100 Remove extraneous whitespace from ARM sim sources. * armcopro.c: Remove extraneous whitespace. * armdefs.h: Likewise. * armfpe.h: Likewise. * arminit.c: Likewise. * armopts.h: Likewise. * armos.c: Likewise. * armos.h: Likewise. * armrdi.c: Likewise. * armsupp.c: Likewise. * armvirt.c: Likewise. * bag.c: Likewise. * bag.h: Likewise. * communicate.c: Likewise. * communicate.h: Likewise. * dbg_conf.h: Likewise. * dbg_cp.h: Likewise. * dbg_hif.h: Likewise. * dbg_rdi.h: Likewise. * gdbhost.c: Likewise. * gdbhost.h: Likewise. * iwmmxt.c: Likewise. * iwmmxt.h: Likewise. * kid.c: Likewise. * main.c: Likewise. * maverick.c: Likewise. * parent.c: Likewise. * thumbemu.c: Likewise. * wrapper.c: Likewise. commit 1f0d470a6699abe442982df22168c002d16bb714 Author: Nick Clifton Date: Tue Jul 14 11:31:42 2015 +0100 Fix texinfo problem by adding the required period after an @xref. * ld.texinfo (Options): Add missing period after @xref. commit 8ffdba260ca757521c815782a0fe01fedc84849a Author: Pedro Alves Date: Wed Mar 11 15:20:31 2015 +0000 Add test that exercises the inferior being killed while stopped under GDB This exercises the case of the inferior disappearing while GDB is debugging it, such as something doing "kill -9 PID" while the program is stopped under GDB or GDBserver. This triggered a set of internal errors, fixed by previous patches. gdb/testsuite/ChangeLog: 2015-07-14 Pedro Alves * gdb.base/killed-outside.exp: New file. * gdb.base/killed-outside.c: New file. commit 586b02a96f744497c8921a558f1c386287849ab0 Author: Pedro Alves Date: Tue Jul 14 10:10:50 2015 +0100 gdbserver/Linux: internal error when killing a process that is already gone If the process disappears (e.g., killed with "kill -9" from the shell) while it was stopped under GDBserver's control, and the GDBserver tries to kill it, GDBserver asserts: (gdb) shell kill -9 23084 (gdb) kill ... Killing process(es): 23084 /home/pedro/gdb/mygit/src/gdb/gdbserver/linux-low.c:972: A problem internal to GDBserver has been detected. kill_wait_lwp: Assertion `res > 0' failed. ... gdb/gdbserver/ChangeLog: 2015-07-14 Pedro Alves * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails. Instead, ignore ECHILD, and throw an error for other errnos. commit 05e83eb1b6a69c34b2fc5ab5e2dc14119145e49d Author: GDB Administrator Date: Tue Jul 14 00:00:08 2015 +0000 Automatic date update in version.in commit d5131498a57d1789ff0fea2cfeb1af90802c8dad Author: Yao Qi Date: Mon Jul 13 17:14:13 2015 +0100 Fix attach-pie-noexec.exp fail on native-extended-gdbserver When I examine the buildbot fails, I see this fail on native-extended-gdbserver, Attaching to process 13529^M "target:/scratch/yao/gdb/build-git/x86_64/gdb/testsuite/gdb.base/attach-pie-noexec (deleted)": could not open as an executable file: No such file or directory^M (gdb) FAIL: gdb.base/attach-pie-noexec.exp: attach if I run tests with board file unix, it doesn't exist, Attaching to process 13869^M /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/gdb.base/attach-pie-noexec (deleted): No such file or directory.^M (gdb) PASS: gdb.base/attach-pie-noexec.exp: attach the test expects to see the period at the end of the error message, gdb_test "attach $testpid" "Attaching to process $testpid\r\n.*: No such file or directory\\." "attach" however the period is missing when running with native-extended-gdbserver. in exec.c:exec_file_attach, GDB has two places may throw errors [1] and [2], if (load_via_target) { ... } else { ... if (scratch_chan < 0) perror_with_name (filename); <--- [1] } ... if (!exec_bfd) { error (_("\"%s\": could not open as an executable file: %s"), <-- [2] scratch_pathname, bfd_errmsg (bfd_get_error ())); } perror_with_name [1] append a period at the end of error message, but error [2] doesn't. This fix is to add a period at the end of the error message. Note that this fail is shown up on 7.9 release as well. gdb: 2015-07-13 Yao Qi * exec.c (exec_file_attach): Add period at the end of error message. commit 97605e61a14518b1a0ac2a576f4f3c843743e4d5 Author: Andrew Burgess Date: Fri Jul 10 14:06:28 2015 +0100 gdb/tui: Add command completion to winheight command. Share the window name completion code from the focus command with the winheight command, providing window name completion for the winheight command. gdb/ChangeLog: * tui/tui-win.c (window_name_completer): New function. (focus_completer): Call window_name_completer. All old content moved into window_name_completer. (winheight_completer): New function. (_initialize_tui_win): Rename variable. Add completer to winheight command. Update doc string on winheight. commit c576455ba70871d7f93218f995b02bbd0a098d85 Author: GDB Administrator Date: Mon Jul 13 00:00:08 2015 +0000 Automatic date update in version.in commit fb8b9dbc147d37129e5a366a395302f532f5d190 Author: H.J. Lu Date: Sun Jul 12 10:56:41 2015 -0700 Extend --compress-debug-sections in gold This patch extends --compress-debug-sections= with [zlib-gnu|zlib-gabi] in gold. PR gold/18322 * compressed_output.cc (zlib_compress): Add argument for compression header size. Set header size to compression header size if it isn't 0. Don't write out the zlib header here. (Output_compressed_section::set_final_data_size): Support zlib-gnu and zlib-gabi compressions. Pass compression header size to zlib_compress and write out compression header. Set the SHF_COMPRESSED bit for zlib-gabi compression. Otherwise clear the SHF_COMPRESSED bit * options.h (compress_debug_sections): Add zlib-gnu and zlib-gabi. * output.h (Output_section::set_flags): New. * testsuite/Makefile.am (check_PROGRAMS): Add flagstest_compress_debug_sections_none, flagstest_compress_debug_sections_gnu and flagstest_compress_debug_sections_gabi. (check_DATA): Add flagstest_compress_debug_sections_none.stdout. flagstest_compress_debug_sections.stdout, flagstest_compress_debug_sections.cmp, flagstest_compress_debug_sections.check, flagstest_compress_debug_sections_gnu.stdout, flagstest_compress_debug_sections_gnu.cmp, flagstest_compress_debug_sections_gnu.check, flagstest_compress_debug_sections_gabi.stdout, flagstest_compress_debug_sections_gabi.cmp and flagstest_compress_debug_sections_gabi.check. (flagstest_compress_debug_sections_none): New. (flagstest_compress_debug_sections_none.stdout): Likewise. (flagstest_compress_debug_sections.stdout): Likewise. (flagstest_compress_debug_sections.check): Likewise. (flagstest_compress_debug_sections.cmp): Likewise. (flagstest_compress_debug_sections_gnu): Likewise. (flagstest_compress_debug_sections_gnu.stdout): Likewise. (flagstest_compress_debug_sections_gnu.check): Likewise. (flagstest_compress_debug_sections_gnu.cmp): Likewise. (flagstest_compress_debug_sections_gabi): Likewise. (flagstest_compress_debug_sections_gabi.stdout): Likewise. (flagstest_compress_debug_sections_gnu.check): Likewise. (flagstest_compress_debug_sections_gnu.cmp): Likewise. * testsuite/Makefile.in: Regenerated. commit 480586639d6b814b2e87f6f106b8635cf7442b20 Author: H.J. Lu Date: Sun Jul 12 10:50:25 2015 -0700 Add SHF_COMPRESSED section decompression to gold This patch adds SHF_COMPRESSED section decompression to gold. PR gold/18321 * compressed_output.h (decompress_input_section): Add arguments for ELF class, big endian and sh_flags. * compressed_output.cc (decompress_input_section): Likewise. Support the SHF_COMPRESSED section. * dynobj.h (Dynobj): Add elfsize and is_big_endian member functions. * plugin.h (Pluginobj): Likewise. * layout.cc (Layout::get_output_section_flags): Also clear the SHF_COMPRESSED bit. * object.h (Compressed_section_info): Add flag to store sh_flags. (Object): Add pure virtual elfsize and is_big_endian member functions. * object.cc (need_decompressed_section): Don't skip the ".zdebug" prefix here. (build_compressed_section_map): Check SHF_COMPRESSED for uncompressed size. Store sh_flags in Compressed_section_info. Pass size, big_endian and sh_flags to decompress_input_section. Skip the ".debug"/".zdebug" prefix when passing section name to need_decompressed_section. (Sized_relobj_file::do_find_special_section): Don't check ".zdebug_*" sections. (Object::decompressed_section_contents): Pass ELF class, big endian and sh_flags to decompress_input_section. * reloc.cc (Sized_relobj_file::write_sections): Likewise. * testsuite/Makefile.am (check_DATA): Add debug_msg_cdebug_gabi.err and gdb_index_test_2_gabi.stdout. (MOSTLYCLEANFILES): Add debug_msg_cdebug_gabi.err and gdb_index_test_2_gabi.stdout. (debug_msg_cdebug_gabi.o): New. (odr_violation1_cdebug_gabi.o): Likewise. (odr_violation2_cdebug_gabi.o): Likewise. (debug_msg_cdebug_gabi.err): Likewise. (check_SCRIPTS): Add gdb_index_test_2_gabi.sh. (gdb_index_test_cdebug_gabi.o): Likewise. (gdb_index_test_2_gabi): Likewise. (gdb_index_test_2_gabi.stdout): Likewise. * testsuite/gdb_index_test_2_gabi.sh: New file. * testsuite/Makefile.in: Regenerated. commit 8d6dbeb44ca93b836e3af8f8d3993997bf347112 Author: Sandra Loosemore Date: Sun Jul 12 07:13:12 2015 -0700 Fix GDB breakage due to addition of new nios2 mach types in BFD. 2015-07-12 Sandra Loosemore gdb/ * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Register all nios2 mach variants. commit 9394ff46fba5a989d94782db817cc248dac736e9 Author: GDB Administrator Date: Sun Jul 12 00:00:08 2015 +0000 Automatic date update in version.in commit e571fc2b054422f2e236f614a5276c416ffb9e44 Author: GDB Administrator Date: Sat Jul 11 00:00:08 2015 +0000 Automatic date update in version.in commit 889884731e09b46e4c2ecb051dfde1e2f69d2b47 Author: H.J. Lu Date: Fri Jul 10 14:20:20 2015 -0700 Properly convert objects between different ELF classes The output SHF_COMPRESSED section size is different from input if ELF classes of input and output aren't the same. We must adjust the section sizes as well as the compression headers in SHF_COMPRESSED sections when converting objects between different ELF classes. bfd/ PR binutils/18656 * bfd.c (bfd_convert_section_size): New function. (bfd_convert_section_contents): Likewise. * bfd-in2.h: Regenerated. binutils/ 2015-07-10 H.J. Lu PR binutils/18656 * objcopy.c (setup_section): Call bfd_convert_section_size to get the output section size. (copy_section): Get the section size from the output section and call bfd_get_full_section_contents to convert section contents for output. binutils/testsuite/ PR binutils/18656 * binutils-all/compress.exp (convert_test): New proc. Run conversion tests between x86-64 and x32. commit a0e28e54675fd92e73df71fed5d4f6c718f40102 Author: Kevin Buettner Date: Thu Jul 9 16:05:31 2015 -0700 rx-tdep.c: Use target_read_code instead of target_read_memory. This change causes the prologue scanner and the frame type scanner in rx-tdep.c to use target_read_code() instead of target_read_memory(). This change allows these instruction scanners to operate much more quickly due to the fact that target_read_code() can potentially read from a cache maintained by GDB. gdb/ChangeLog: * rx-tdep.c (rx_get_opcode_byte): Use target_read_code instead of target_read_memory. commit 58c1b36c673c88f13fe0cf3844fef643c35e8318 Author: Pedro Alves Date: Fri Jul 10 19:47:17 2015 +0100 gdbserver/event-loop.c: type mismatch Building with C++ catches a buglet here: ../../../src/gdb/gdbserver/event-loop.c:205:19: warning: invalid conversion from ‘gdb_client_data {aka void*}’ to ‘void**’ [-fpermissive] event_ptr->data = data; ^ This works in practice because gdb_client_data is a pointer already (hence in C we get an implicit conversion), and nothing deferences the pointer. It's passed from client at event registration/creation time, only to pass straight back to client callback. Well, that and nothing in gdbserver uses the event data anyway. gdb/gdbserver/ChangeLog: 2015-07-10 Pedro Alves * event-loop.c (struct callback_event) : Change type to gdb_client_data instance instead of gdb_client_data pointer. (append_callback_event): Adjust. commit 813dabb9f0413c3391035300e9af083513ce83fb Author: H.J. Lu Date: Fri Jul 10 10:23:12 2015 -0700 Warn unsupported compress type and corrupted compressed section * readelf.c (dump_section_as_strings): Warn unsupported compress type and corrupted compressed section. (dump_section_as_bytes): Likewise. (load_specific_debug_section): Likewise. commit 209ce4c2de420e5d55649eecdcb3e8a837fa546f Author: H.J. Lu Date: Fri Jul 10 08:41:10 2015 -0700 Updated to accept .debug_* sections * gas/i386/dw2-compress-1.d: Updated to accept .debug_* sections. commit be0496857f9f11559681ebaafd3462ebc8df351d Author: H.J. Lu Date: Fri Jul 10 08:14:59 2015 -0700 Updated to accept .debug_* sections * binutils-all/dw2-3.W: Updated to accept .debug_* sections. commit 218a5a11a07268228484af88666739852ba36552 Author: Jan Kratochvil Date: Fri Jul 10 15:04:51 2015 +0200 Fix testsuite regression by: Do not skip prologue for asm (.S) files I have somehow missed gdb.asm/asm-source.exp PASS->FAIL even on x86_64. It has no longer valid assumption that "break" breaks after the prologue even in assembler. So I have changed this assumption of the testfile. gdb/testsuite/ChangeLog 2015-07-10 Jan Kratochvil * gdb.asm/asm-source.exp (f at main): Stop at gdbasm_enter. (n at main): New. * gdb.asm/asmsrc1.s: Add comment "mark: main enter". commit 421530db90312b605ce05d7cf883123a084f9af3 Author: Pierre Langlois Date: Thu Jul 2 12:11:47 2015 +0100 [GDBserver][AArch64] Cleanup comments for each linux_target_ops method This patch cleans up the comments for each linux_target_ops methods. We should mention which method each function implements but there is no need to duplicate information already mentionned in the base target_ops or linux_target_ops definitions. gdb/gdbserver/ChangeLog: * linux-aarch64-low.c: Add comments for each linux_target_ops method. Remove comments already covered in target_ops and linux_target_ops definitions. (the_low_target): Add comments for each unimplemented method. commit c101f28fea4fc8621bdf864bc6e2132244dbe6a7 Author: Andrew Burgess Date: Mon Jul 6 18:16:24 2015 +0100 gdb/tui: Use cleanups to free string copies. In parse_scrolling_args it is possible for a string copy to leak if an error occurs. Switching to using a cleanup fixes this leak. In tui_set_win_height the string can't be leaked, but switching to using a cleanup guards against the possibility that a leak could be introduced in the future (by adding an error somewhere in the call stack). gdb/ChangeLog: * tui/tui-win.c (tui_set_win_height): Use a cleanup to free the string copy. (parse_scrolling_args): Likewise. commit 150375dc7ac877d1dc6e8aaf73a23479b720306c Author: Andrew Burgess Date: Mon Jul 6 17:50:28 2015 +0100 gdb/tui: Define tui window names once. Don't duplicate the window names inside the completion function. Instead make use of the existing defines, and the tui_win_name function to obtain the window names. gdb/ChangeLog: * tui/tui-win.c (focus_completer): Don't duplicate the tui window names in this function. commit 6dce28e413375aa878cf43853d32657d1fc26c6f Author: Andrew Burgess Date: Mon Jul 6 11:09:05 2015 +0100 gdb: Convert TUI windows names to lower case. This commit converts the window names for the TUI windows to lower case. The windows names are already lower case in the documentation, and are shown as lower case in some of the command completion results. Given that all the commands that take a window name currently accept upper or lower case, this commit just changes the window names to lower case in the remaining places they are displayed by gdb. gdb/ChangeLog: * tui/tui-data.h (SRC_NAME): Convert to lower case. (CMD_NAME): Likewise. (DATA_NAME): Likewise. (DISASSEM_NAME): Likewise. * tui/tui-win.c (tui_set_focus): Window names are now lower case. (tui_set_win_height): Likewise. (parse_scrolling_args): Likewise. commit a2c59f280dda14a2f68d0175c8879238be1aa200 Author: Alan Modra Date: Wed Jul 8 22:18:34 2015 +0930 Make ALIGN(x) behave as ALIGN(.,x) Inside output sections, ALIGN(.,x) uses a section-relative value for dot. The unary ALIGN always used the absolute value of dot. * ldexp.c (align_dot_val): New function. (fold_unary ): Use it. commit 40f77f827b91ab9665ce27950c30c688f8fde983 Author: Alan Modra Date: Fri Jul 10 20:06:25 2015 +0930 Add missing changelog entries commit e03ed3c64a048522ba4bc12092f8a75bcfab6ea8 Author: Andreas Arnez Date: Fri Jul 10 10:36:02 2015 +0200 gnu_vector.exp: Skip infcall tests on x86/x86_64 Since the new KFAILs/KPASSs for the infcall tests on x86 and x86_64 targets generated unnecessary noise, this change skips them with UNSUPPORTED instead. gdb/testsuite/ChangeLog: * gdb.base/gnu_vector.exp: On x86 and x86_64 targets, skip the infcall tests instead of setting up for KFAIL. commit 485668e5b3987456b44588c1f2fd8a0723909866 Author: Markus Metzger Date: Mon Jul 6 16:36:45 2015 +0200 record: set stop_pc in "record goto" command When navigating in the recorded execution trace via "record goto", we do not set stop_pc. This may trigger an internal error in infrun.c when stepping from that location. Set it. (gdb) rec full (gdb) c Continuing. Breakpoint 1, foo (void) at foo.c:42 42 x = y (gdb) rn foo (void) at foo.c:41 41 y = x (gdb) rec go end Go forward to insn number 98724 at foo.c:42 42 x = y (gdb) n infrun.c:2382: internal-error: resume: Assertion `sig != GDB_SIGNAL_0' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) This happens because there's a breakpoint at PC when the "next" is issued, so that breapoint should be immediately stepped over. That should have been detected/done by proceed, here: if (addr == (CORE_ADDR) -1) { if (pc == stop_pc && breakpoint_here_p (aspace, pc) == ordinary_breakpoint_here && execution_direction != EXEC_REVERSE) /* There is a breakpoint at the address we will resume at, step one instruction before inserting breakpoints so that we do not stop right away (and report a second hit at this breakpoint). Note, we don't do this in reverse, because we won't actually be executing the breakpoint insn anyway. We'll be (un-)executing the previous instruction. */ tp->stepping_over_breakpoint = 1; But since stop_pc was stale, the pc == stop_pc check failed, and left the breakpont at PC inserted. gdb/ * record-btrace.c (record_btrace_goto_begin, record_btrace_goto_end) record_btrace_goto): Move call to print_stack_frame ... (record_btrace_set_replay): ... here. Set stop_pc. * record-full.c (record_full_goto_entry): Set stop_pc. testsuite/ * gdb.btrace/record_goto-step.exp: New. commit 73854cdd438dc8858290231ebcb682377d71fec2 Author: Han Shen Date: Thu Jul 9 15:55:55 2015 -0700 Use "gold_info" instead of "gold_warning" for erratum fix. gold/ChangeLog: * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Use 'gold_info'. (Target_aarch64::scan_erratum_835769_span): USe 'gold_info'. commit f250f5c6ddedd25e81a66cddfcfe93ed79018e8d Author: GDB Administrator Date: Fri Jul 10 00:00:08 2015 +0000 Automatic date update in version.in commit 61163dfaaedb90d78e11c1d79ad1e469daf3da47 Author: Han Shen Date: Thu Jul 9 15:38:12 2015 -0700 Drop 'missing mapping symbols' warning for arm and aarch64. The psABI (AAELF) says this about mapping symbols: 4.6.5.1 Section-relative mapping symbols Mapping symbols defined in a section define a sequence of half-open address intervals that cover the address range of the section. Each interval starts at the address defined by the mapping symbol, and continues up to, but not including, the address defined by the next (in address order) mapping symbol or the end of the section. A section must have a mapping symbol defined at the beginning of the section; however, if the section contains only data then the mapping symbol may be omitted. That makes it pretty clear that, in the absence of a mapping symbol, the entire section can be treated as data. gold/ChangeLog: * aarch64.cc (AArch64_relobj::scan_errata): Drop missing symbol warning. * arm.cc (Arm_relobj::scan_section_for_cortex_a8_erratum): Drop missing symbol warning. commit 58d2eda55ca5aea4fa2dcaf3bb2fff4525b236d0 Author: Pierre Langlois Date: Thu Jul 9 16:35:11 2015 +0100 Add NEWS entry for tracepoints support on aarch64-linux gdb/ChangeLog: * NEWS: Mention support for tracepoints on aarch64-linux. commit 7671bf47fc6233087ec8b2ac2698f48a1d3f35f3 Author: Pierre Langlois Date: Thu Jul 9 16:35:11 2015 +0100 [GDBServer][AArch64] Enable support for tracepoints gdb/gdbserver/ChangeLog: * linux-aarch64-low.c (aarch64_supports_tracepoints): New function. Return 1. (the_low_target): Install it. commit 7890fb45667484d99488b047551bc9dd6d1c9889 Author: Pierre Langlois Date: Thu Jul 9 16:35:11 2015 +0100 [testsuite][AArch64] Port gdb.trace This patch adds support for AArch64 to the gdb.trace testsuite. Note that it does not add support for testing fast tracepoint as it isn't supported. Therefore the test cases with inline assembly are not ported in this patch, as we do not know what the conditions for inserting a fast tracepoint on AArch64 would be. gdb/testsuite/ChangeLog: * gdb.trace/backtrace.exp: Set registers for aarch64 target. * gdb.trace/collection.exp: Likewise. * gdb.trace/mi-trace-frame-collected.exp: Likewise. * gdb.trace/mi-trace-unavailable.exp: Likewise. * gdb.trace/report.exp: Likewise. * gdb.trace/trace-break.exp: Likewise. * gdb.trace/unavailable.exp: Likewise. * gdb.trace/while-dyn.exp: Likewise. commit ea873d8ea64281250434e198b57373f308c3bddb Author: Pierre Langlois Date: Thu Jul 9 16:35:11 2015 +0100 [AArch64] Implement gdbarch_gen_return_address gdbarch method This patch implements the 'collect $_ret' command to collect the return address of a function in a tracepoint. It marks the LR register for collection. gdb/ChangeLog: * aarch64-tdep.c: Add ax.h and ax-gdb.h includes. (aarch64_gen_return_address): New function. (aarch64_gdbarch_init): Hook it. commit 02a2a705aa71646a47c955388491523a989516c5 Author: Pierre Langlois Date: Thu Jul 9 16:35:11 2015 +0100 [AArch64] Teach stub unwinder to terminate gracefully The stub unwinder is used on AArch64 if the target's memory is not readable at the current PC. For example, the user could try to call at an invalid address such as 0x0, as covered in the gdb.base/signull.exp test case. Many GDB ports use a similar unwinder to handle this case too. If we purposely kill the inferior before examining the trace then we get the following issue: ~~~ ... (gdb) trace f Tracepoint 3 at 0x7fb7fc28c0 (gdb) tstart (gdb) continue ... (gdb) tstop (gdb) tsave /tmp/trace (gdb) kill ... (gdb) target tfile /tmp/trace ... (gdb) tfind Register 31 is not available. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Found trace frame 0, tracepoint 3 #-1 0x0000007fb7fc28c0 in f () ... ^^^ ~~~ This patch teaches the stub unwinder to report to the core frame code with UNWIND_UNAVAILABLE when either the stack pointer of the return address are unavailable to read from the target. gdb/ChangeLog: * aarch64-tdep.c (aarch64_make_stub_cache): Set available_p and swallow NOT_AVAILABLE_ERROR. (aarch64_stub_this_id): Call frame_id_build_unavailable_stack if available_p is not set. (aarch64_stub_frame_unwind_stop_reason): New function. (aarch64_stub_unwind): Install it. commit 7dfa3edc033c443036d9f2a3e01120f7fb54f498 Author: Pierre Langlois Date: Thu Jul 9 16:35:11 2015 +0100 [AArch64] Teach prologue unwinder to terminate gracefully Without debugging information, we have the following issue when examining a trace buffer: ~~~ ... (gdb) trace f Tracepoint 3 at 0x7fb7fc28c0 (gdb) tstart (gdb) continue ... (gdb) tstop (gdb) tfind start Register 31 is not available. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Found trace frame 0, tracepoint 3 #-1 0x0000007fb7fc28c0 in f () ... ^^^ ~~~ The reason for this is that the target's stack pointer is unavailable when examining the trace buffer. What we are seeing is due to the 'tfind' command creating a sentinel frame and unwinding it. If an exception is thrown, we are left with the sentinel frame being displayed at level #-1. The exception is thrown when the prologue unwinder tries to read the stack pointer to construct an ID for the frame. This patch fixes this by making the prologue unwinder catch NOT_AVAILABLE_ERROR exceptions when either registers or memory is unreadable and report back to the frame core code with UNWIND_UNAVAILABLE. gdb/ChangeLog: * aarch64-tdep.c (aarch64_prologue_cache) : New field. (aarch64_make_prologue_cache_1): New function, factored out from aarch64_make_prologue_cache. Do not allocate cache. Set available_p. (aarch64_make_prologue_cache): Reimplement wrapping aarch64_make_prologue_cache_1, and swallowing NOT_AVAILABLE_ERROR. (aarch64_prologue_frame_unwind_stop_reason): New function. Return UNWIND_UNAVAILABLE if available_p is not set. (aarch64_prologue_unwind): Install it. (aarch64_prologue_this_id): Move prev_pc and prev_sp limit checks into aarch64_prologue_frame_unwind_stop_reason. Call frame_id_build_unavailable_stack if available_p is not set. commit db634143224dc7cb985d996bed15257f5cb86b25 Author: Pierre Langlois Date: Thu Jul 9 16:35:11 2015 +0100 [AArch64] Only access inferior registers when creating a frame cache This patch moves the address of the start of a function (func) and the address from which it was called (prev_pc) into aarch64_prologue_cache. The idea is to keep accesses to the inferior's registers into aarch64_make_prologue_cache and aarch64_make_stub_cache. gdb/ChangeLog: * aarch64-tdep.c (aarch64_prologue_cache) : New fields. (aarch64_scan_prologue): Set prev_pc. (aarch64_make_prologue_cache): Set func. (aarch64_make_stub_cache): Set prev_pc. (aarch64_prologue_this_id): Remove local variables id, pc and func. Read prev_pc and func from cache. (aarch64_stub_this_id): Read prev_pc from cache. commit 8b61f75db53877215c7cb15b901a094bf1fb916e Author: Pierre Langlois Date: Thu Jul 9 16:35:10 2015 +0100 [AArch64] Refactor aarch64_make_stub_cache We would previously have to make sure the frame cache was not already created before calling aarch64_make_stub_cache. This patch makes this function check it so the caller does not need to do so. gdb/ChangeLog: * aarch64-tdep.c (aarch64_make_stub_cache): Update comment. New argument this_cache. Remove unused local variables reg and unwound_fp. Return early if this_cache is already set. Set this_cache. (aarch64_stub_this_id): Update call to aarch64_make_stub_cache. commit 7c8edfae86385f922dca6ef1ab7c7d378d4fd30f Author: Pierre Langlois Date: Thu Jul 9 16:35:10 2015 +0100 [AArch64] Refactor aarch64_make_prologue_cache We would previously have to make sure the frame cache was not already created before calling aarch64_make_prologue_cache. This patch makes this function check it so that the caller does not need to do so. gdb/ChangeLog: * aarch64-tdep.c (aarch64_make_prologue_cache): Update comment. New argument this_cache. Return early if this_cache is already set. Set this_cache. (aarch64_prologue_this_id): Update call to aarch64_make_prologue_cache. (aarch64_prologue_prev_register): Likewise. (aarch64_normal_frame_base): Likewise. commit 3350cc01deccb8289c1c26938628f996df3e390c Author: Catherine Moore Date: Thu Jul 9 08:24:54 2015 -0700 2015-07-09 Catherine Moore include/ * elf/mips/mips.h (Val_GNU_MIPS_ABI_FP_NAN2008): New. gas/ * config/tc-mips.c (check_fpabi): Handle VAL_GNU_MIPS_ABI_FP_NAN2008. binutils/ * readelf.c (print_mips_fp_abi_value): Handle Val_GNU_MIPS_ABI_FP_NAN2008. ld/testsuite/ * ld-mips-elf/attr-gnu-4-08.d: Update expected output. * ld-mips-elf/attr-gnu-4-09.d: New. * ld-mips-elf/attr-gnu-4-19.d: New. * ld-mips-elf/attr-gnu-4-29.d: New. * ld-mips-elf/attr-gnu-4-39.d: New. * ld-mips-elf/attr-gnu-4-49.d: New. * ld-mips-elf/attr-gnu-4-59.d: New. * ld-mips-elf/attr-gnu-4-69.d: New. * ld-mips-elf/attr-gnu-4-79.d: New. * ld-mips-elf/attr-gnu-4-89.d: New. * ld-mips-elf/attr-gnu-4-9.s: New. * ld-mips-elf/mips-elf.exp: Run new tests. commit 938c69a11897acea85275b93b5bb376b589564fa Author: Simon Marchi Date: Thu Jul 9 11:19:25 2015 -0400 Factor out memberptr printing code from c_val_print gdb/ChangeLog: * c-valprint.c (c_val_print): Factor out memberptr printing code from c_val_print to ... (c_val_print_memberptr): ... this new function. commit 49f7fe2880dc08ae701d9cdb84c8217642ef637a Author: Simon Marchi Date: Thu Jul 9 11:18:59 2015 -0400 Factor out int printing code from c_val_print gdb/ChangeLog: * c-valprint.c (c_val_print): Factor out int printing code to ... (c_val_print_int): ... this new function. commit 9e4f353ca9d4f4ae70ce76ae704e5686d47e2f63 Author: Simon Marchi Date: Thu Jul 9 11:18:39 2015 -0400 Factor out struct and union printing code from c_val_print gdb/ChangeLog: * c-valprint.c (c_val_print): Factor out struct and union printing code to ... (c_val_print_struct): ... this new function ... (c_val_print_union): ... and this new function. commit 1c67f0326351d9c521692ceca92f93cb0de9bf2e Author: Simon Marchi Date: Thu Jul 9 11:18:12 2015 -0400 Factor out pointer printing code from c_val_print gdb/ChangeLog: * c-valprint.c (c_val_print): Factor out pointer printing code to ... (c_val_print_ptr): ... this new function. commit 0b6ef777bd0b7918590da1bdbeab1ca97d753ba2 Author: Simon Marchi Date: Thu Jul 9 11:17:20 2015 -0400 Factor out array printing code from c_val_print gdb/ChangeLog: * c-valprint.c (c_valprint): Factor our array printing code from c_val_print to ... (c_val_print_array): ... this new function. commit 1033c33c36c5f3d0b89d58aaaa374c76562583f3 Author: Simon Marchi Date: Thu Jul 9 11:16:22 2015 -0400 Factor out print_unpacked_pointer from c_val_print Turn this code into a function, instead of a goto. gdb/ChangeLog: * c-valprint.c (c_val_print): Factor out pointer printing code to ... (print_unpacked_pointer): ... this new function. commit f6b93c346364866f96529fb03557eb43e0434fa5 Author: Simon Marchi Date: Thu Jul 9 11:15:40 2015 -0400 Remove unneeded variable assignment The assignment to i in the TYPE_CODE_PTR section is not useful. Removing it allows to move i in a narrower scope, which will help things somewhere in the next patches. gdb/ChangeLog: * c-valprint.c (c_val_print): Remove an assignment to i and move its declaration. commit de231f2015ec537df22c60822c9adb1f2205c13e Author: Catherine Moore Date: Thu Jul 9 08:07:47 2015 -0700 2015-07-09 Catherine Moore * elflink.c (bfd_elf_size_dynamic_sections): Call to _bfd_elf_maybe_strip_eh_frame_hdr should be before bed->elf_backend_size_dynamic_sections. commit 0f4576e3582f097cd257339d9395e88d07031002 Author: Yao Qi Date: Thu Jul 9 12:55:45 2015 +0100 Pass ptid to aarch64_linux_get_debug_reg_capacity This patch is to pass ptid to aarch64_linux_get_debug_reg_capacity, and stop using global variable inferior_ptid. gdb: 2015-07-09 Yao Qi * aarch64-linux-nat.c (aarch64_linux_get_debug_reg_capacity): Add argument ptid. Update comments. Caller update. commit c2d65f389a2f213d74bd78df6a75dca6eedb3bae Author: Yao Qi Date: Thu Jul 9 12:47:06 2015 +0100 [gdbserver, aarch64] Set usrregs to NULL in regs_info Hi, I happen to read the comments in regs_info below, struct regs_info { ... /* Info used when accessing registers with PTRACE_PEEKUSER / PTRACE_POKEUSER. This can be NULL if all registers are transferred with regsets .*/ struct usrregs_info *usrregs; that usrregs can be NULL if all registers are transferred with regsets, which is exactly what aarch64-linux does. This patch is to set usrregs to NULL in regs_info and remove aarch64_usrregs_info and aarch64_regmap. gdb/gdbserver: 2015-07-09 Yao Qi * linux-aarch64-low.c (aarch64_regmap): Remove. (aarch64_usrregs_info): Remove. (regs_info): Set field usrregs to NULL. commit 37fdfe4c0083c2a6c8558c76e2bc4fbc77df7d91 Author: Markus Metzger Date: Thu Jul 2 15:16:09 2015 +0200 btrace, pt: support new packets Add support for dumping new Intel(R) Processor Trace packets in the "maint btrace packet-history" command. gdb/ * btrace.c (pt_print_packet): Print stop, vmcs, tma, mtc, cyc, and mnt packets. commit 80a2b330f7e719cd851242d6f976719586fb9295 Author: Markus Metzger Date: Tue Jul 7 13:54:34 2015 +0200 btrace: fix build fail with 32-bit BFD When compiling GDB with 32-bit BFD, the build fails with: In file included from btrace.h:33:0, from btrace.c:23: /usr/include/intel-pt.h:1643:51: note: expected 'int (*)(uint8_t *, size_t, const struct pt_asid *, uint64_t, void *)' but argument is of type 'int (*)(gdb_byte *, size_t, const struct pt_asid *, CORE_ADDR, void *)' extern pt_export int pt_image_set_callback(struct pt_image *image, ^ gdb/ * btrace.c (btrace_pt_readmem_callback): Change type of PC argument. commit de0ef285459ec1b4330b9eaede88a229380aefa0 Author: GDB Administrator Date: Thu Jul 9 00:00:07 2015 +0000 Automatic date update in version.in commit 4ab31498e400c89ba9dcea2444c65aa020ab53fc Author: Simon Marchi Date: Wed Jul 8 15:48:02 2015 -0400 Add missing spaces in previous patch gdb/ChangeLog: * progspace.c (delete_program_space): Add missing spaces. commit 7a41607e01b505db895fcebcad618606cfab1ecf Author: Simon Marchi Date: Wed Jul 8 15:41:01 2015 -0400 Delete program spaces directly when removing inferiors When deleting an inferior, delete the associated program space as well if it becomes unused. This replaces the "pruning" approach, with which you could forget to call prune_program_spaces (as seen, with the -remove-inferior command, see [1]). This allows to remove the prune_program_spaces function. At the same time, I was able to clean up the delete_inferior* family: - delete_inferior is unused - delete_inferior_silent is only used in monitor_close, but is replaced with discard_all_inferiors [2], so it becomes unused - All remaining calls to delete_inferior_1 are with silent=1, so the parameter is removed - delete_inferior_1 is renamed to delete_inferior I renamed pspace_empty_p to program_space_empty_p. I prefer if the "exported" functions have a more explicit and standard name. Tested on Ubuntu 14.10. [1] https://sourceware.org/ml/gdb-patches/2014-09/msg00717.html [2] See https://sourceware.org/ml/gdb-patches/2015-07/msg00228.html and follow-ups for details. gdb/Changelog: * inferior.c (delete_inferior_1): Rename to ... (delete_inferior): ..., remove 'silent' parameter, delete program space when unused and remove call to prune_program_spaces. Remove the old, unused, delete_inferior. (delete_inferior_silent): Remove. (prune_inferiors): Change call from delete_inferior_1 to delete_inferior and remove 'silent' parameter. Remove call to prune_program_spaces. (remove_inferior_command): Idem. * inferior.h (delete_inferior_1): Rename to... (delete_inferior): ..., remove 'silent' parameter and remove the original delete_inferior. (delete_inferior_silent): Remove. * mi/mi-main.c (mi_cmd_remove_inferior): Change call from delete_inferior_1 to delete_inferior and remove 'silent' parameter. * progspace.c (prune_program_spaces): Remove. (pspace_empty_p): Rename to... (program_space_empty_p): ... and make non-static. (delete_program_space): New. * progspace.h (prune_program_spaces): Remove declaration. (program_space_empty_p): New declaration. (delete_program_space): New declaration. * monitor.c (monitor_close): Replace call to delete_thread_silent and delete_inferior_silent with discard_all_inferiors. commit 7e3023528162de7760a0e7e487aa81bbf44cb6a9 Author: Richard Sandiford Date: Wed Jul 8 20:11:03 2015 +0100 Clarify case requirements for gas pseudo-ops gas/ 2015-07-08 Ciro Santilli * doc/as.texinfo: Clarify case requirements for pseudo ops. commit a9bd710f8777b5f4d6cbb9f5f14d6eb16f60c690 Author: Patrick Palka Date: Thu Jul 2 12:27:50 2015 -0400 tui: replace deprecated_register_changed_hook with observer This is a straightforward replacement of the TUI's use of the aforementioned hook with the register_changed observer. Since this was the only user of the hook, this patch also removes the hook. gdb/ChangeLog: * defs.h (deprecated_register_changed_hook): Remove prototype. * interps.c (clear_iterpreter_hooks): Remove reference to deprecated_register_changed_hook. * top.c (deprecated_register_changed_hook): Remove prototype. * valops.c (value_assign): Remove reference to deprecated_register_changed_hook. * tui/tui-hooks.c (tui_register_changed): Add parameter "frame". Add comment documenting the function. (tui_register_changed_observer): Define. (tui_install_hooks): Remove reference to deprecated_register_changed_hook. Set tui_register_changed_observer. (tui_remove_hooks): Remove reference to deprecated_register_changed_hook. Unset tui_register_changed_observer. commit 328e7bfdde7267f5e4b971bc6dca7b82aef77661 Author: Denis Chertykov Date: Wed Jul 8 21:35:19 2015 +0300 Define DIFF_EXPR_OK for avr target to allow PC relative difference relocation. When generating relocation (tc_gen_reloc) 32 bit relocation fixup is changed to new 32 bit PC relative relocation if the fixup has pc-relative flag set. bfd/ChangeLog 2015-07-06 Pitchumani Sivanupandi * elf32-avr.c: Add 32 bit PC relative relocation for AVR target. gas/ChangeLog 2015-07-06 Pitchumani Sivanupandi * config/tc-avr.c (tc_gen_reloc): Change 32 bit relocation to 32 bit PC relative and update offset if the fixup is pc-relative. * config/tc-avr.h (DIFF_EXPR_OK): Define to enable PC relative diff relocs. gas/testsuite/ChangeLog 2015-07-06 Pitchumani Sivanupandi * gas/avr/pc-relative-reloc.d: New test for 32 bit pc relative reloc. * gas/avr/per-function-debugline.s: New test source. include/ChangeLog 2015-07-06 Pitchumani Sivanupandi * elf/avr.h: Add new 32 bit PC relative relocation. ld/testsuite/ChangeLog 2015-07-06 Pitchumani Sivanupandi * ld-avr/gc-section-debugline.d: New test. * ld-avr/per-function-debugline.s: Source for new test. commit 7c7f93f6e5ce31223acbe871fe0c7e4daf0d8bbc Author: Andrew Burgess Date: Wed Jul 8 15:02:32 2015 +0100 gdb/doc: Update 'frame' command documentation. The documentation for the 'frame' command has gotten a little out of date, it still mentions architecturally specific details that are no longer relevant. This commit removes the old details that no longer apply, and tries to expand the existing text a little to make the usage clearer for some cases. gdb/doc/ChangeLog: * gdb.texinfo (Selection): Update documentation for 'frame' command. commit ef3f321b39c3e31fc49f034257a944d515af182a Author: Simon Marchi Date: Wed Jul 8 11:40:35 2015 -0400 Revert "Delete program spaces directly when removing inferiors" Reverted, since it causes a build failure. It turns out that delete_inferior_silent wasn't actually unused. This reverts commit 0560c645c02eba2828a053039dcfdf676cdd1d00. commit 0560c645c02eba2828a053039dcfdf676cdd1d00 Author: Simon Marchi Date: Mon Sep 29 16:33:10 2014 -0400 Delete program spaces directly when removing inferiors When deleting an inferior, delete the associated program space as well if it becomes unused. This replaces the "pruning" approach, with which you could forget to call prune_program_spaces (as seen, with the -remove-inferior command, see [1]). This allows to remove the prune_program_spaces function. At the same time, I was able to clean up the delete_inferior* family. delete_inferior_silent and delete_inferior were unused, which allowed renaming delete_inferior_1 to delete_inferior. Also, since all calls to it were with silent=1, I removed that parameter completely. I renamed pspace_empty_p to program_space_empty_p. I prefer if the "exported" functions have a more explicit and standard name. Tested on Ubuntu 14.10. This obsoletes my previous patch "Add call to prune_program_spaces in mi_cmd_remove_inferior" [1]. [1] https://sourceware.org/ml/gdb-patches/2014-09/msg00717.html gdb/Changelog: * inferior.c (delete_inferior_1): Rename to ... (delete_inferior): ..., remove 'silent' parameter, delete program space when unused and remove call to prune_program_spaces. Remove the old, unused, delete_inferior. (delete_inferior_silent): Remove. (prune_inferiors): Change call from delete_inferior_1 to delete_inferior and remove 'silent' parameter. Remove call to prune_program_spaces. (remove_inferior_command): Idem. * inferior.h (delete_inferior_1): Rename to... (delete_inferior): ..., remove 'silent' parameter and remove the original delete_inferior. (delete_inferior_silent): Remove. * mi/mi-main.c (mi_cmd_remove_inferior): Change call from delete_inferior_1 to delete_inferior and remove 'silent' parameter. * progspace.c (prune_program_spaces): Remove. (pspace_empty_p): Rename to... (program_space_empty_p): ... and make non-static. (delete_program_space): New. * progspace.h (prune_program_spaces): Remove declaration. (program_space_empty_p): New declaration. (delete_program_space): New declaration. commit 084641963dba63283bf2eca227f4f77c2598b172 Author: Jan Kratochvil Date: Wed Jul 8 14:42:19 2015 +0200 compile: Warn for old GCC on cv-qualified self-reference GDB could: compile code struct_object.selffield = &struct_object ./compile/compile-c-types.c:83: internal-error: insert_type: Assertion `add == NULL || add->gcc_type == gcc_type' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) FAIL: gdb.compile/compile.exp: compile code struct_object.selffield = &struct_object (GDB internal error) The bug was not in GDB but in the GCC part interfacing with GDB. Alexandre Oliva has fixed it the right way: https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;a=commitdiff;h=072dfdba0ea62abb65514cb3a90cdf3868efe286 git://gcc.gnu.org/git/gcc.git aoliva/libcp1 Attaching this GDB testsuite update + info to user s/he should upgrade GCC. After Alex upstreams the fix I can update the message to contain the specific GCC release. gdb/ChangeLog 2015-07-08 Jan Kratochvil PR compile/18484 * compile/compile-c-types.c (insert_type): Change gdb_assert to error. gdb/testsuite/ChangeLog 2015-07-08 Jan Kratochvil PR compile/18484 * gdb.compile/compile.c (struct struct_type): Add volatile to selffield's type. * gdb.compile/compile.exp (compile code struct_object.selffield = &struct_object): Skip further struct_object tests if this one xfails. commit bcf5c1d96b3b5493041002eb2b6d27288d9d160a Author: Robert O'Callahan Date: Wed Jul 8 10:53:36 2015 +0100 PR18617 - Incorrect expression bytecode generated for narrowing conversions The existing code preserves 'from' bits, which is incorrect. E.g. (gdb) maint agent-eval (char)255L Scope: 0x4008d6 Reg mask: 00 0 const16 255 3 ext 64 5 end 'ext 64' should be 'ext 8'; this bytecode evaluates to 255 instead of the correct result of -1. The fix is simple. I ran the entire test suite on x86-64 and there were no new test failures. gdb/ChangeLog: 2015-07-08 Robert O'Callahan PR exp/18617 * ax-gdb.c (gen_conversion): Extend to 'to' bits, not 'from'. gdb/testsuite/ChangeLog: 2015-07-08 Robert O'Callahan PR exp/18617 * gdb.trace/ax.exp: Add test. commit e8643a4533a92e011dad97ea53c99d314c06513d Author: Markus Metzger Date: Mon Jul 6 15:40:45 2015 +0200 add myself to write-after-approval list gdb/ * MAINTAINERS (Write After Approval): Add Markus T. Metzger. commit 76fb6829cd9cc53c3eefa98ce6c99bacaa52f491 Author: Markus Metzger Date: Mon Jul 6 15:21:37 2015 +0200 ari: fix strerror() use Do not use strerror(), instead use safe_strerror(). gdb/ * nat/linux-btrace.c (kernel_supports_bts, kernel_supports_pt): Use safe_strerror() instead of strerror(). commit 501f83eb1837e89f8a4060b46d68d155156b41eb Author: GDB Administrator Date: Wed Jul 8 00:00:07 2015 +0000 Automatic date update in version.in commit b91deca94e36b9f18156909e4c615fe7af8e3ae8 Author: Han Shen Date: Mon Jul 6 15:17:25 2015 -0700 Make gold aarch64 accept long form of mapping symbols. 2015-07-07 Han Shen gold/ChangeLog: 2015-07-06 Han Shen * aarch64.cc (AArch64_relobj::do_count_local_symbols): Make legal of mapping symbols. commit 4931af25b8ab8f9db77c40142d52e4513762ca97 Author: Yao Qi Date: Tue Jul 7 16:58:20 2015 +0100 New proc is_aarch64_target Some tests expect the the target is aarch64, but checking target triplet is not accurate, because target triplet can be aarch64 but the program is in arm (or aarch32) state. This patch addes a new proc is_aarch64_target which returns true if the target is on aarch64 state. gdb/testsuite: 2015-07-07 Yao Qi * gdb.arch/aarch64-atomic-inst.exp: Check is_aarch64_target instead of istarget "aarch64*-*-*". * gdb.arch/aarch64-fp.exp: Likewise. * gdb.base/float.exp: Likewise. * gdb.reverse/aarch64.exp: Likewise. * lib/gdb.exp (is_aarch64_target): New proc. commit 9fcf688e800e089217ecc8a47b228be180866df8 Author: Yao Qi Date: Tue Jul 7 16:58:19 2015 +0100 New proc is_aarch32_target GDB tests running on arm target should be also run on aarch32 (32-bit mode on aarch64). There should be no difference. It is not precise to check target triplet to decide which tests should be run, because if I compiler all the test binary in 32-bit (arm program), but target triplet is still aarch64, so that these arm specific tests are skipped. This patch is to add a new proc is_aarch32_target which return true if target triplet is arm or the test binary is compiled for arm. gdb/testsuite: 2015-07-07 Yao Qi * lib/gdb.exp (is_aarch32_target): New proc. * gdb.arch/arm-bl-branch-dest.exp: Check is_aarch32_target instead of "istarget "arm*-*-*"". * gdb.arch/arm-disp-step.exp: Likewise. * gdb.arch/thumb-bx-pc.exp: Likewise. * gdb.arch/thumb-prologue.exp: Likewise. * gdb.arch/thumb-singlestep.exp: Likewise. * gdb.base/disp-step-syscall.exp: Likewise. * gdb.base/float.exp: Likewise. commit fbd8d50de232dcc7efa5ac4531adb72af2439977 Author: Yao Qi Date: Tue Jul 7 16:58:19 2015 +0100 Enable multi-arch test in catch-syscall.exp on aarch64 This patch is to enable test_catch_syscall_multi_arch on aarch64. gdb/testsuite: 2015-07-07 Yao Qi * gdb.base/catch-syscall.exp (test_catch_syscall_multi_arch): Set arch1, arch2, syscall1_name, syscall2_name and syscall_number. commit 71be1fdc3655a170f4b14d795e5c9e81fcea06ef Author: Yao Qi Date: Tue Jul 7 16:58:19 2015 +0100 Adjust gdb.multi tests for aarch64 Multi-arch related tests under gdb.multi are to compile programs with the same compiler but different compiler options (-m64 vs -m32). However, different compilers are needed to compile both aarch64 program and arm (aarch32) program. This patch is to adjust these test cases to compile programs in different modes with different compiler. When we use gcc for arm-linux target, its file name can be different, arm-linux-gnueabihf-gcc, arm-linux-gnueabi-gcc, or arm-none-linux-gnueabi-gcc, so I add a variable ARM_CC_FOR_TARGET, so that user can set the name of gcc for arm-linux target on aarch64, like: $ make check RUNTESTFLAGS='ARM_CC_FOR_TARGET=arm-linux-gnueabihf-gcc multi-arch.exp' gdb/testsuite: 2015-07-07 Yao Qi * gdb.multi/multi-arch-exec.exp: Set march1 and march2 to "" if target is aarch64. If target is aarch64, set compiler=${ARM_CC_FOR_TARGET} if it exists. * gdb.multi/multi-arch.exp: Likewise. commit 82c40d4b1deb252f2d17ff74f3fae6ae8cdd0383 Author: Yao Qi Date: Tue Jul 7 16:58:19 2015 +0100 Set architecture to arm in arm-*.xml files This patch is to add the following line to various arm target description xml files, arm in order to fix problems I've seen on aarch64 multi-arch debugging, detach^M Detaching from program: build-gdb/gdb/testsuite/gdb.base/attach, process 17145^M (gdb) PASS: gdb.base/attach.exp: attach1 detach file^M No executable file now.^M Architecture of file not recognized.^M (gdb) FAIL: gdb.base/attach.exp: attach1, purging symbols after detach Without this patch, struct target_desc *tdesc_* are not initialised properly, that is, fields arch and osabi in 'struct target_desc' are not set properly. This doesn't cause any problems on single arch debugging, because arch-utils.c:gdbarch_info_fill will guess correctly. However, in multi-arch debugging, gdbarch_info_fill gets the aarch64 arch, but the target description is for arm (because the current inferior is 32-bit arm). It is a surprise to me we didn't set architecture to "arm" before in *.xml files, and I didn't find out why didn't do so. AFAICS, gdb/features/arm-with-iwmmxt.xml was added firstly (in patch https://sourceware.org/ml/gdb-patches/2007-01/msg00593.html) which had iwmmxt, however, afterwards, architecture isn't set anymore in features/arm-*.xml files (in patches https://sourceware.org/ml/gdb-patches/2009-07/msg00689.html and https://sourceware.org/ml/gdb-patches/2010-08/msg00225.html). gdb: 2015-07-07 Yao Qi * features/arm-with-m-fpa-layout.xml: Set architecture to arm. * features/arm-with-m-fpa-layout.c: Regenerated. * features/arm-with-m-vfp-d16.xml: Likewise. * features/arm-with-m-vfp-d16.c: Regenerated. * features/arm-with-m.xml: Likewise. * features/arm-with-m.c: Regenerated. * features/arm-with-neon.xml: Likewise. * features/arm-with-neon.c: Regenerated. * features/arm-with-vfpv2.xml: Likewise. * features/arm-with-vfpv2.c: Regenerated. * features/arm-with-vfpv3.xml: Likewise. * features/arm-with-vfpv3.c: Regenerated. commit 607685ecee1015d6c37e0d800d40453dc0aadc8c Author: Yao Qi Date: Tue Jul 7 16:58:19 2015 +0100 Native debug arm program by aarch64 GDB This patch is to let aarch64 GDB debug 32-bit arm program natively. In each function for fetching and storing registers, GDB will check gdbarch_bfd_arch_info (gdbarch)->bits_per_word, if it is 32, call the corresponding aarch32 functions in aarch32-linux-nat.c, otherwise fall back to aarch64 code to fetch and store registers. aarch64_linux_read_description has to return the right target description, but we don't have gdbarch available there, so GDB fetches auxv and gets AT_PHENT, in order to determine whether the target is 32-bit or 64-bit. I learned this trick from solib-svr4.c. gdb: 2015-07-07 Yao Qi * aarch32-linux-nat.h (VFP_REGS_SIZE): New macro, moved from arm-linux-nat.c. * aarch64-linux-nat.c: Include aarch32-linux-nat.h and elf/external.h. (fetch_gregs_from_thread): Call aarch32_gp_regcache_supply if target is 32-bit. (store_gregs_to_thread): Call aarch32_gp_regcache_collect if target is 32-bit. (fetch_fpregs_from_thread): Call aarch32_vfp_regcache_supply if target is 32-bit. (store_fpregs_to_thread): Call aarch32_vfp_regcache_collect if target is 32-bit. (tdesc_arm_with_vfpv3, tdesc_arm_with_neon): Declare. (aarch64_linux_read_description): Return the right target description. * arm-linux-nat.c (VFP_REGS_SIZE): Moved to aarch32-linux-nat.h. * config/aarch64/linux.mh (NATDEPFILES): Add aarch32-linux-nat.o. * configure.tgt (aarch64*-*-linux*): Add arm-tdep.o and arm-linux-tdep.o commit f1b6788884b2e95105475c95b7f22f6ceba2271e Author: Yao Qi Date: Tue Jul 7 16:58:19 2015 +0100 New aarch32-linux-nat.c This patch is to move all the code about transferring regcache <-> byte buffer for arm (aarch32) to a separate file aarch32-linux-nat.c. Then, in the following patch, aarch64 code can use it to do multi-arch debugging. This is a refactory patch. gdb: 2015-07-07 Yao Qi * aarch32-linux-nat.c: New file. * aarch32-linux-nat.h: New file. * arm-linux-nat.c: Include aarch32-linux-nat.h. (fetch_regs): Move code to aarch32-linux-nat.c. Call aarch32_gp_regcache_supply. (store_regs): Move code to aarch32-linux-nat.c. Call aarch32_gp_regcache_collect. (fetch_vfp_regs): Move code to aarch32-linux-nat.c. Call aarch32_vfp_regcache_supply. (store_vfp_regs): Move code to aarch32-linux-nat.c. Call aarch32_vfp_regcache_collect. * config/arm/linux.mh (NATDEPFILES): Add aarch32-linux-nat.o. commit 179bfe826ba62ca8aa43f3d20cc1b21dfc41b1d0 Author: Yao Qi Date: Tue Jul 7 16:58:19 2015 +0100 Remove {fetch,store}_fpregister and {fetch,store}_register This patch is to remove fetch_fpregister, fech_register, store_fpregister and store_register, and use fetch_fpregs, fetch_regs, store_regs, and store_fpregs instead. gdb: 2015-07-07 Yao Qi * arm-linux-nat.c (store_fpregister): Remove. (store_register): Likewise. (fetch_fpregister): Likewise. (fetch_register): Likewise. (arm_linux_store_inferior_registers): Call store_regs and store_fpregs instead. (arm_linux_fetch_inferior_registers): Call fetch_fpregs and fetch_regs instead. commit 3e221d361f5647b56b7cc3ebf5ff487f417ceed0 Author: Simon Marchi Date: Tue Jul 7 11:39:06 2015 -0400 Fix test for Python 3 gdb/testsuite/ChangeLog: * gdb.python/py-lazy-string.exp: Add missing parentheses to print. commit d441430b752a617fe476e745b95f544fe4463fec Author: Yao Qi Date: Tue Jul 7 10:37:28 2015 +0100 [arm] Fix regression by Do not skip prologue for asm (.S) files Patch "Do not skip prologue for asm (.S) files" [1] changes GDB's behaviour on which test gdb.arch/thumb-singlestep.exp depends, so it causes the fail below: (gdb) si^M 37 blx foo^M (gdb) FAIL: gdb.arch/thumb-singlestep.exp: step into foo the test assumes the program will stop at the instruction after "push" but it doesn't. The fix to this fail is to do one more single step. [1] https://sourceware.org/ml/gdb-patches/2015-06/msg00561.html gdb/testsuite: 2015-07-07 Yao Qi * gdb.arch/thumb-singlestep.exp: Do one more single step. commit fa446e20d980f2fa225c57e452849dc7d5f615d6 Author: GDB Administrator Date: Tue Jul 7 00:00:08 2015 +0000 Automatic date update in version.in commit 15162befa3ac493c781c126ad49cb20eac053618 Author: Doug Kwan Date: Mon Jul 6 15:02:40 2015 -0700 Align text section ends so that stub tables appears at expected addresses. commit 6008fc5fcd34e3f1cde89c86e3b62bcc7ad7ea7c Author: Andrew Burgess Date: Mon Jul 6 11:33:31 2015 +0100 gdb: Rewrite documentation for layout and focus commands. Changes the documentation for the layout and focus commands. Instead of documenting each layout (or focus) sub-command as a separate command, document a single layout (and focus) command which takes a parameter, then list the possible parameters in a table nested under each command. The documentation for the layout command has been extended little to make it clearer which windows are shown in each layout. gdb/ChangeLog: * doc/gdb.texinfo (TUI): Restructure documentation on TUI layout and focus commands. commit 7c79d316af486c456f6f092d0841a9e16527bfd6 Author: Joel Brobecker Date: Mon Jul 6 13:02:47 2015 -0700 Update NEWS post GDB 7.10 branch creation. gdb/ChangeLog: * NEWS: Create a new section for the next release branch. Rename the section of the current branch, now that it has been cut. commit f2232bea3284b80fcf0ed19ee6b940bcc6ebeb3d Author: Joel Brobecker Date: Mon Jul 6 12:58:29 2015 -0700 Bump version to 7.10.50.DATE-cvs. Now that the GDB 7.10 branch has been created, we can bump the version number. gdb/ChangeLog: GDB 7.10 branch created (66c4b3e8a628a207bc6aafef6af0c4128195f56e): * version.in: Bump version to 7.10.50.DATE-cvs. commit 66c4b3e8a628a207bc6aafef6af0c4128195f56e Author: Luis Machado Date: Mon Jul 6 16:09:21 2015 -0300 Fix problems with finishing a dummy function call on simulators. This fixes regressions introduced with the original change to not consider permanent breakpoints always inserted: 6ae8866180bf90e9ec76c2dd34c07fd826d11a83 is the first bad commit commit 6ae8866180bf90e9ec76c2dd34c07fd826d11a83 Author: Luis Machado Date: Wed Jun 17 16:50:57 2015 -0300 Fix problems with finishing a dummy function call on simulators. Some checks were mistakenly left out of the original patch, which caused the following failures: -PASS: gdb.base/shlib-call.exp: print mainshr1(1) -PASS: gdb.base/shlib-call.exp: step into mainshr1 +FAIL: gdb.base/shlib-call.exp: print mainshr1(1) +FAIL: gdb.base/shlib-call.exp: step into mainshr1 -PASS: gdb.cp/chained-calls.exp: q(p()) +FAIL: gdb.cp/chained-calls.exp: q(p()) -PASS: gdb.cp/chained-calls.exp: q(p() + r()) +FAIL: gdb.cp/chained-calls.exp: q(p() + r()) -PASS: gdb.cp/chained-calls.exp: g(f(g(f() + f())) + f()) +FAIL: gdb.cp/chained-calls.exp: g(f(g(f() + f())) + f()) -PASS: gdb.cp/chained-calls.exp: *c -PASS: gdb.cp/chained-calls.exp: *c + *c -PASS: gdb.cp/chained-calls.exp: q(*c + *c) +FAIL: gdb.cp/chained-calls.exp: *c +FAIL: gdb.cp/chained-calls.exp: *c + *c +FAIL: gdb.cp/chained-calls.exp: q(*c + *c) -PASS: gdb.cp/classes.exp: calling method for small class +FAIL: gdb.cp/classes.exp: calling method for small class The above is likely caused by GDB not removing the permanent breakpoints from the target, leading to the inferior executing the breakpoint instruction and tripping on a SIGSEGV. gdb/ChangeLog: 2015-07-06 Luis Machado * breakpoint.c (remove_breakpoint_1): Don't handle permanent breakpoints in a special way. (remove_breakpoint): Likewise. (mark_breakpoints_out): Likewise. commit 1a617dc351fe55ad18dee9759a6f3286c2df2cf8 Author: H.J. Lu Date: Mon Jul 6 12:00:45 2015 -0700 Remove the merge conflict introduced by commit 2f0c68f23bb3132cd5ac466ca8775c0d9e4960cd Author: Catherine Moore Date: Thu May 28 14:50:36 2015 -0700 Compact EH Support commit bcd8537ce10dd72b053fa54e87525defa26f3fd0 Author: Andrew Burgess Date: Mon Jul 6 11:37:24 2015 +0100 gdb/doc: Fix incorrect use of @xref. All uses of @xref must be followed by either '.' or ','. In commit a4ea0946c an incorrect use of @xref was introduced. This commit adds a comma after the use of @xref. gdb/ChangeLog: * doc/gdb.texinfo (TUI): Add comma after @xref. commit 10e9aaa3b8554f997db993c8158493a96030d4d5 Author: Andrew Burgess Date: Mon Jul 6 16:56:42 2015 +0100 gdb/tui: Don't cast between window types. Instead of casting between structure types to get the 'tui_gen_win_info' info from a 'tui_win_info' access the generic member variable. This is inline with what is done throughout the rest of the tui code. gdb/ChangeLog: * tui/tui-win.c (tui_set_focus): Use structure member 'generic' instead of casting the structure type. commit 8a13d42d99390c36d5e7884b509e6bb92ec72e3c Author: Simon Marchi Date: Mon Jul 6 13:10:56 2015 -0400 search_struct_field: remove OFFSET parameter I was trying to understand what the OFFSET parameter was for, and realized it was set to 0 in every call to search_struct_field. I assume that it was used at some point, but some subsequent changes made it useless. gdb/ChangeLog: * valops.c (search_struct_field): Remove OFFSET parameter. (value_cast_structs): Adjust calls to search_struct_field. (value_struct_elt): Same. (find_overload_match): Same. commit a844296a982bdff7c14dab355de0fca75486add6 Author: Simon Marchi Date: Mon Jul 6 13:04:11 2015 -0400 Cleanup value_fetch_lazy's comment and return value The comment for value_fetch_lazy seems outdated. It says that it's only called from the value_contents and value_contents_all (macros!), which is not true. Also, the return value seems useless now, despite what the comment says. gdb/ChangeLog: * value.c (value_fetch_lazy): Update comment, change return value to void. * value.h (value_fetch_lazy): Change return value to void. commit f41cbf58f4af65e8612585c45208f3690a39ea28 Author: Andrew Burgess Date: Mon Jul 6 15:32:11 2015 +0100 gdb: tui_win_name: Make parameter and result const. This commit makes the parameter and the result for 'tui_win_name' constant. There's one place in the code that is then updated as a result of this change. gdb/ChangeLog: * tui/tui-data.c (tui_partial_win_by_name): Window name is const. (tui_win_name): Make parameter and result const. * tui/tui-data.h (tui_win_name): Make parameter and result const. commit 118ca22445afc728069ca80be2f30dae6913059e Author: Patrick Palka Date: Thu Jul 2 11:55:01 2015 -0400 Don't throw an error in "show mpx bound" implementation "show" functions should not throw an exception in part because it causes the output of the commands "info set" and "show" to get truncated. This fixes the following fails: FAIL: gdb.base/default.exp: info set FAIL: gdb.base/default.exp: show gdb/ChangeLog: * i386-tdep.c (i386_mpx_info_bounds): Don't call error, instead use printf_unfiltered. (set_mpx_cmd): Add missing trailing space to command string literal. (_initialize_i386_tdep): Give the "mpx" prefix command its correct name. commit 0d3a523baa86b53238c658d2b290b151eac072dd Author: GDB Administrator Date: Mon Jul 6 00:00:07 2015 +0000 Automatic date update in version.in commit 92a9c616e496f41c3d1da949078d5739add79161 Author: Richard Sandiford Date: Sun Jul 5 19:56:59 2015 +0100 Fix an opd->append index in elf64-ppc.c bfd/ * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value plus addend rather than the original st_value when looking up entries in opd->adjust. ld/testsuite/ * ld-powerpc/tocopt6-inc.s, ld-powerpc/tocopt6a.s, ld-powerpc/tocopt6b.s, ld-powerpc/tocopt6c.s, ld-powerpc/tocopt6.d: New test. * ld-powerpc/powerpc.exp (ppc64elftests): Add it. commit 533edc14b87398bbf4cbf3083bd6deaa5b89d5ab Author: GDB Administrator Date: Sun Jul 5 00:00:07 2015 +0000 Automatic date update in version.in commit e7ba597a2e537e1e77bff5d8a26ab8fbe6369afc Author: GDB Administrator Date: Sat Jul 4 00:00:08 2015 +0000 Automatic date update in version.in commit 0f088b2a9417b1d4ed597849ffa671eba25f5051 Author: Kai Tietz Date: Fri Jul 3 15:50:29 2015 +0100 Add experimental support for --gc-sections with COFF and PE based targets. PR ld/11539 bfd * coffcode.h (coff_bfd_gc_sections): Define default to bfd_coff_gc_sections function. * cofflink.c (init_reloc_cookie): Copy and adjust coff related code about gc-sections from elflink.c to here. (fini_reloc_cookie): Likewise. (init_reloc_cookie_rels): Likewise. (fini_reloc_cookie_rels): Likewise. (init_reloc_cookie_for_section): Likewise. (fini_reloc_cookie_for_section): Likewise. (_bfd_coff_gc_mark_hook): Likewise. (_bfd_coff_gc_mark_rsec): Likewise. (_bfd_coff_gc_mark_reloc): Likewise. (_bfd_coff_gc_mark): Likewise. (_bfd_coff_gc_mark_extra_sections): Likewise. (coff_gc_sweep_symbol_info): Likewise. (coff_gc_sweep_symbol): Likewise. (gc_sweep_hook_fn): Likewise. (coff_gc_sweep): Likewise. (bfd_coff_gc_sections): Likewise. (_bfd_coff_gc_keep): Likewise. * libcoff.h (coff_reloc_cookie): New struct. (bfd_coff_gc_sections): New prototype. (coff_gc_mark_hook_fn): New type. ld * scripttempl/pep.sc: Mark .idata*, .CRT*, .tls*, .rsrc*, .init, .ctor*, .dtor*, .fini, .jcr, .eh_frame, .pdata. .xdata, and .gcc_except_table sections as KEEP. * scripttempl/pe.sc: Likewise. commit b6b3dd8f31c96b6f7ba26de1508c3c1b2fd437f9 Author: Alan Modra Date: Fri Jul 3 10:58:22 2015 +0930 Correct ld Makefile dependendcy for or1k * Makefile.am (eelf32or1k.c, eelf32or1k_linux.c): Depend on ELF_DEPS. * Makefile.in: Regenerate. commit ef5a96d564a22a25d31533c7377eede42c12b25c Author: Alan Modra Date: Fri Jul 3 10:56:26 2015 +0930 Remove ppc860, ppc750cl, ppc7450 insns from common ppc. Back in the day support for these processors was added, we probably didn't want to waste PPC_OPCODE bits on minor variations. I've had a complaint that disassembly of mfspr/mtspr was wrong for power8. This patch fixes that problem. Note that since -m860/-m850/-m821 are new gas options enabling the mpc8xx specific mfspr/mtspr variants it is possible that this change will break some mpc8xx assembly code. ie. you might need to modify makefiles to pass -m860 to gas. include/opcode/ * ppc.h (PPC_OPCODE_750, PPC_OPCODE_7450, PPC_OPCODE_860): Define. opcodes/ * ppc-opc.c (PPC750, PPC7450, PPC860): Define using PPC_OPCODE_*. * ppc-dis.c (ppc_opts): Add 821, 850 and 860 entries. Add PPC_OPCODE_7450 to 7450 entry. Add PPC_OPCODE_750 to 750cl entry. gas/ * config/tc-ppc.c (md_show_usage): Add -m821, -m850, -m860. * doc/c-ppc.texi (PowerPC-Opts): Likewise. gas/testsuite/ * gas/ppc/titan.d: Correct mfmcsrr0 disassembly. commit 1b485e67784d7b4c212a936edc79f43bdd7d09cd Author: Kevin Buettner Date: Thu Jul 2 16:46:31 2015 -0700 Add support for backtracing through Renesas RX exception frames. This change adds support for backtracing through Renesas RX exception frames. Determination about the type of frame is made by scanning the remainder of the function for a return instruction and then looking at which, if any, return instruction is found. A normal RTS instruction indicates that the frame is a normal frame. An RTFI instruction indicates that it's a fast interrupt, and an RTE instruction indicates that the frame is a (normal) exception frame. If no return instruction is found within the scanned region - which can happen when the end of the function cannot be found - it is assumed to be a normal frame. I was able to test that normal prologue scanning still works by disabling the dwarf2 sniffer. I've tested this code for normal interrupts. The fast interrupt case has not been tested. gdb/ChangeLog: * rx-tdep.c (RX_USP_REGNUM, RX_BPC_REGNUM): New constants. (enum rx_frame_type): New. (struct rx_prologue): Add new field `frame_type'. (rx_analyze_prologue): Add `frame_type' parameter. Cache this parameter in the prologue struct. Add code for recording locations of PC and PSW for fast interrupt and exception frames. (rx_skip_prologue): Adjust call to rx_analyze_prologue. (rx_analyze_frame_prologue): Add `frame_type' parameter. (rx_frame_type): New function. (rx_frame_base): Fetch frame type and pass it to rx_analyze_prologue. (rx_frame_this_id): Rename parameter `this_prologue_cache' to `this_cache'. (rx_frame_prev_register): Rename parameter `this_prologue_cache' to `this_cache'. Add cases for RX_FRAME_TYPE_EXCEPTION and RX_FRAME_TYPE_FAST_INTERRUPT. (normal_frame_p, exception_frame_p, rx_frame_sniffer_common) (rx_frame_sniffer, rx_exception_sniffer): New functions. (rx_frame_unwind): Use rx_frame_sniffer instead of default_frame_sniffer. (rx_frame_unwind): New unwinder. (rx_gdbarch_init): Register new unwinder. commit 69ae7f4d16a0fd2548211a37aa5dc8482050bd70 Author: GDB Administrator Date: Fri Jul 3 00:00:08 2015 +0000 Automatic date update in version.in commit 0561fea48c107b271308a013c485c29cbd5c13b5 Author: Kevin Buettner Date: Thu Jul 2 15:02:56 2015 -0700 rx: Create and use flags types for psw, bpsw, and fpsw registers. This change adds two flags types for the (Renesas RX) psw, bpsw, and fpsw registers. As a result, symbolic flags are displayed for these registers in the output of GDB's "info registers" command as well as in output from other commands, such as "print". gdb/ChangeLog: * rx-tdep.c (RX_BPSW_REGNUM, RX_FPSW_REGNUM): New constants. (struct gdbarch_tdep): Add fields rx_psw_type and rx_fpsw_type. (rx_register_type): Add cases for RX_PSW_REGNUM, RX_BPSW_REGNUM, and RX_FPSW_REGNUM. (rx_gdbarch_init): Initialize PSW, BPSW, and FPSW flags types. commit decf8d9a5f91912768d52cd075b6a25617a90d1c Author: Jan Kratochvil Date: Thu Jul 2 22:39:57 2015 +0200 Fix GCC false warning At least on gcc-4.4.7-11.el6.i686 ./configure --enable-64-bit-bfd --enable-targets=all GDB does not build due to: cc1: warnings being treated as errors s390-linux-tdep.c: In function ‘s390_handle_arg’: s390-linux-tdep.c:2575: error: ‘val’ may be used uninitialized in this function gdb/ChangeLog 2015-07-02 Jan Kratochvil Fix GCC false warning. * s390-linux-tdep.c (s390_handle_arg): Initialize VAL. commit 2fd0f80d57e8437d70ba79921efd3ce02e755755 Author: Yao Qi Date: Thu Jul 2 14:03:54 2015 +0100 Fix typo in aarch64_linux_insert_hw_breakpoint It should be "insert_hw_breakpoint" rather than "insert_hw_watchpoint". gdb: 2015-07-02 Yao Qi * aarch64-linux-nat.c (aarch64_linux_insert_hw_breakpoint): Fix typo in the debugging message. commit db49d3d0414173fe8907dcae1cab0067d46c44cd Author: Nick Clifton Date: Thu Jul 2 16:19:09 2015 +0100 Fix snafu with latest addition to the ARM sim. * Makefile.in (SIM_EXTRA_CFLAGS): Revert previous delta. (SIM_EXTRA_LIBS): Add -lm. commit b0627500e819fcaaa42538046b0bf069a7c2edc5 Author: Markus Metzger Date: Mon Feb 3 14:35:28 2014 +0100 btrace: maintenance commands Add maintenance commands that help debugging the btrace record target. The following new commands are added: maint info btrace Print information about branch tracing internals. maint btrace packet-history Print the raw branch tracing data. maint btrace clear-packet-history Discard the stored raw branch tracing data. maint btrace clear Discard all branch tracing data. It will be fetched and processed anew by the next "record" command. maint set|show btrace pt skip-pad Set and show whether PAD packets are skipped when computing the packet history. gdb/ * btrace.c: Include gdbcmd.h, cli/cli-utils.h, and ctype.h. (maint_btrace_cmdlist, maint_btrace_set_cmdlist) (maint_btrace_show_cmdlist, maint_btrace_pt_set_cmdlist) (maint_btrace_pt_show_cmdlist, maint_btrace_pt_skip_pad) (btrace_maint_clear): New. (btrace_fetch, btrace_clear): Call btrace_maint_clear. (pt_print_packet, btrace_maint_decode_pt) (btrace_maint_update_pt_packets, btrace_maint_update_packets) (btrace_maint_print_packets, get_uint, get_context_size, no_chunk) (maint_btrace_packet_history_cmd) (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd) (maint_btrace_cmd, maint_btrace_set_cmd, maint_btrace_show_cmd) (maint_btrace_pt_set_cmd, maint_btrace_pt_show_cmd) (maint_info_btrace_cmd, _initialize_btrace): New. * btrace.h (btrace_pt_packet, btrace_pt_packet_s) (btrace_maint_packet_history, btrace_maint_info): New. (btrace_thread_info) : New. * NEWS: Announce it. doc/ * gdb.texinfo (Maintenance Commands): Document "maint btrace" commands. commit 9be54cae43929ab989fcd44dfcf8d3313a55f7a0 Author: Markus Metzger Date: Mon Feb 3 11:40:50 2014 +0100 btrace: store raw btrace data Store the raw branch trace data that has been read from the target. This data can be used for maintenance commands as well as for generating a core file for the "record save" command. gdb/ * btrace.c (btrace_fetch): Append the new trace data. (btrace_clear): Clear the stored trace data. * btrace.h (btrace_thread_info) : New. * common/btrace-common.h (btrace_data_clear) (btrace_data_append): New. * common/btrace-common.c (btrace_data_clear) (btrace_data_append): New. commit 010a18a1b12ec6d5219b7e602aa6abe12344dd1a Author: Markus Metzger Date: Mon Nov 17 11:18:05 2014 +0100 btrace, linux: use data_size and data_offset In struct perf_event_mmap_page there are new fields data_size and data_offset that give the location of the perf_event data buffer relative to the mmap page. Use them if they are present. gdb/ * nat/linux-btrace.c (linux_enable_bts): Check for PERF_ATTR_SIZE_VER5. Check for data_offset and data_size fields. Use them. commit b20a652466ea6e62e7d056188b79a0677a29f46e Author: Markus Metzger Date: Fri Jan 24 13:45:47 2014 +0100 btrace: support Intel(R) Processor Trace Adds a new command "record btrace pt" to configure the kernel to use Intel(R) Processor Trace instead of Branch Trace Strore. The "record btrace" command chooses the tracing format automatically. Intel(R) Processor Trace support requires Linux 4.1 and libipt. gdb/ * NEWS: Announce new commands "record btrace pt" and "record pt". Announce new options "set|show record btrace pt buffer-size". * btrace.c: Include "rsp-low.h". Include "inttypes.h". (btrace_add_pc): Add forward declaration. (pt_reclassify_insn, ftrace_add_pt, btrace_pt_readmem_callback) (pt_translate_cpu_vendor, btrace_finalize_ftrace_pt) (btrace_compute_ftrace_pt): New. (btrace_compute_ftrace): Support BTRACE_FORMAT_PT. (check_xml_btrace_version): Update version check. (parse_xml_raw, parse_xml_btrace_pt_config_cpu) (parse_xml_btrace_pt_raw, parse_xml_btrace_pt) (btrace_pt_config_cpu_attributes, btrace_pt_config_children) (btrace_pt_children): New. (btrace_children): Add support for "pt". (parse_xml_btrace_conf_pt, btrace_conf_pt_attributes): New. (btrace_conf_children): Add support for "pt". * btrace.h: Include "intel-pt.h". (btrace_pt_error): New. * common/btrace-common.c (btrace_format_string, btrace_data_fini) (btrace_data_empty): Support BTRACE_FORMAT_PT. * common/btrace-common.h (btrace_format): Add BTRACE_FORMAT_PT. (struct btrace_config_pt): New. (struct btrace_config): New. (struct btrace_data_pt_config, struct btrace_data_pt): New. (struct btrace_data): New. * features/btrace-conf.dtd (btrace-conf): New. (pt): New. * features/btrace.dtd (btrace): New. (pt, pt-config, cpu): New. * nat/linux-btrace.c (perf_event_read, perf_event_read_all) (perf_event_pt_event_type, kernel_supports_pt) (linux_supports_pt): New. (linux_supports_btrace): Support BTRACE_FORMAT_PT. (linux_enable_bts): Free tinfo on error. (linux_enable_pt): New. (linux_enable_btrace): Support BTRACE_FORMAT_PT. (linux_disable_pt): New. (linux_disable_btrace): Support BTRACE_FORMAT_PT. (linux_fill_btrace_pt_config, linux_read_pt): New. (linux_read_btrace): Support BTRACE_FORMAT_PT. * nat/linux-btrace.h (struct btrace_tinfo_pt): New. (struct btrace_target_info): New. * record-btrace.c (set_record_btrace_pt_cmdlist) (show_record_btrace_pt_cmdlist): New. (record_btrace_print_pt_conf): New. (record_btrace_print_conf): Support BTRACE_FORMAT_PT. (btrace_ui_out_decode_error): Support BTRACE_FORMAT_PT. (cmd_record_btrace_pt_start): New. (cmd_record_btrace_start): Support BTRACE_FORMAT_PT. (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): New. (_initialize_record_btrace): Add new commands. * remote.c (PACKET_Qbtrace_pt, PACKET_Qbtrace_conf_pt_size): New. (remote_protocol_features): Add "Qbtrace:pt". Add "Qbtrace-conf:pt:size". (remote_supports_btrace): Support BTRACE_FORMAT_PT. (btrace_sync_conf): Support PACKET_Qbtrace_conf_pt_size. (remote_enable_btrace): Support BTRACE_FORMAT_PT. (_initialize_remote): Add new commands. gdbserver/ * linux-low.c: Include "rsp-low.h" (linux_low_encode_pt_config, linux_low_encode_raw): New. (linux_low_read_btrace): Support BTRACE_FORMAT_PT. (linux_low_btrace_conf): Support BTRACE_FORMAT_PT. (handle_btrace_enable_pt): New. (handle_btrace_general_set): Support "pt". (handle_btrace_conf_general_set): Support "pt:size". doc/ * gdb.texinfo (Process Record and Replay): Spell out that variables and registers are not available during btrace replay. Describe the new "record btrace pt" command. Describe the new "set|show record btrace pt buffer-size" options. (General Query Packets): Describe the new Qbtrace:pt and Qbtrace-conf:pt:size packets. Expand "bts" to "Branch Trace Store". Update the branch trace DTD. commit 58bfce93438e1f936d4547bb9659b7d096e2823f Author: Markus Metzger Date: Tue Nov 12 16:58:45 2013 +0100 configure: check for libipt Check for libipt, an Intel(R) Processor Trace decoder library. The sources can be found on github at: https://github.com/01org/processor-trace gdb/ * configure.ac: Check for libipt * configure: Regenerate. * config.in: Regenerate. * Makefile.in (LIBIPT): New. (CLIBS): Add $LIBIPT. * NEWS: document new configure options commit b0fd6b3037669534962b1ffe860db178ea7e1239 Author: Jan Kratochvil Date: Thu Jul 2 08:01:35 2015 +0200 debug compile: Replace confusing debug message It was found that from (gdb) set debug compile 1 (gdb) compile code 1 [...] allocated 0x7f bytes at 0x7ffff7ff9000 prot 5 allocated 0x38 bytes at 0x7ffff7ff8000 prot 1 lookup undefined ELF symbol "_GLOBAL_OFFSET_TABLE_" allocated 0x10 bytes at 0x7ffff7ff7000 for registers (gdb) _ the message 'lookup undefined ELF symbol' looks as an error to people, including to myself once. Change it to: allocated 0x7f bytes at 0x7ffff7ff9000 prot 5 allocated 0x38 bytes at 0x7ffff7ff8000 prot 1 ELF symbol "_GLOBAL_OFFSET_TABLE_" relocated to zero allocated 0x10 bytes at 0x7ffff7ff7000 for registers (gdb) _ gdb/ChangeLog 2015-07-02 Jan Kratochvil * compile/compile-object-load.c (compile_object_load): Replace debug message "lookup undefined ELF symbol" by 3 more specific messages. commit 78ab7e9d38585cb939c473812e6a472b8f4fd5b9 Author: Kevin Buettner Date: Wed Jul 1 17:46:23 2015 -0700 Tabify my ChangeLog entry for 2015-06-29. commit e62803699d1a722460e8aaa63ef5c99f5580761a Author: Kevin Buettner Date: Wed Jul 1 16:18:35 2015 -0700 rl78: Create a flags type for the psw register. For the Renesas rl78 architecture, associate a flags type with the PSW register. This will cause symbolic flags to be printed when using the "info registers" command. gdb/ChangeLog: * rl78-tdep.c (struct gdbarch_tdep): Add new field, rl78_psw_type. (rl78_register_type): Add case for RL78_PSW_REGNUM. (rl78_gdbarch_init): Initialize rl78_psw_type. commit 7d8d1bd943e28623cd188725aa994edf045e54fb Author: GDB Administrator Date: Thu Jul 2 00:00:08 2015 +0000 Automatic date update in version.in commit 0cb5a38a5be39be9e18a1090418d3be97d6b8678 Author: Sandra Loosemore Date: Wed Jul 1 16:11:47 2015 -0700 Assembler tests for Nios II R2 2015-07-01 Sandra Loosemore Cesar Philippidis gas/testsuite/ * gas/nios2/add-r2.d: New. * gas/nios2/align_fill-r2.d: New. * gas/nios2/align_text-r2.d: New. * gas/nios2/aligned_text-r2.d: New. * gas/nios2/and-r2.d: New. * gas/nios2/andc.d: New. * gas/nios2/andc.s: New. * gas/nios2/bmx.d: New. * gas/nios2/bmx.s: New. * gas/nios2/branch-r2.d: New. * gas/nios2/break-r2.d: New. * gas/nios2/bret-r2.d: New. * gas/nios2/cache-r2.d: New. * gas/nios2/cache-r2.s: New. * gas/nios2/call-r2.d: New. * gas/nios2/call26-r2.d: New. * gas/nios2/call26_noat-r2.d: New. * gas/nios2/call_noat-r2.d: New. * gas/nios2/cdx_add.d: New. * gas/nios2/cdx_add.s: New. * gas/nios2/cdx_and.d: New. * gas/nios2/cdx_and.s: New. * gas/nios2/cdx_break.d: New. * gas/nios2/cdx_break.s: New. * gas/nios2/cdx_callr.d: New. * gas/nios2/cdx_callr.s: New. * gas/nios2/cdx_jmpr.d: New. * gas/nios2/cdx_jmpr.s: New. * gas/nios2/cdx_ldbu.d: New. * gas/nios2/cdx_ldbu.s: New. * gas/nios2/cdx_ldhu.d: New. * gas/nios2/cdx_ldhu.s: New. * gas/nios2/cdx_ldw.d: New. * gas/nios2/cdx_ldw.s: New. * gas/nios2/cdx_ldwsp.d: New. * gas/nios2/cdx_ldwsp.s: New. * gas/nios2/cdx_mov.d: New. * gas/nios2/cdx_mov.s: New. * gas/nios2/cdx_neg.d: New. * gas/nios2/cdx_neg.s: New. * gas/nios2/cdx_not.d: New. * gas/nios2/cdx_not.s: New. * gas/nios2/cdx_or.d: New. * gas/nios2/cdx_or.s: New. * gas/nios2/cdx_pop.d: New. * gas/nios2/cdx_pop.s: New. * gas/nios2/cdx_push.d: New. * gas/nios2/cdx_push.s: New. * gas/nios2/cdx_relax.d: New. * gas/nios2/cdx_relax.s: New. * gas/nios2/cdx_ret.d: New. * gas/nios2/cdx_ret.s: New. * gas/nios2/cdx_sll.d: New. * gas/nios2/cdx_sll.s: New. * gas/nios2/cdx_spaddi.d: New. * gas/nios2/cdx_spaddi.s: New. * gas/nios2/cdx_spdeci.d: New. * gas/nios2/cdx_spdeci.s: New. * gas/nios2/cdx_srl.d: New. * gas/nios2/cdx_srl.s: New. * gas/nios2/cdx_stb.d: New. * gas/nios2/cdx_stb.s: New. * gas/nios2/cdx_sth.d: New. * gas/nios2/cdx_sth.s: New. * gas/nios2/cdx_stw.d: New. * gas/nios2/cdx_stw.s: New. * gas/nios2/cdx_stwsp.d: New. * gas/nios2/cdx_stwsp.s: New. * gas/nios2/cdx_sub.d: New. * gas/nios2/cdx_sub.s: New. * gas/nios2/cdx_trap.d: New. * gas/nios2/cdx_trap.s: New. * gas/nios2/cdx_xor.d: New. * gas/nios2/cdx_xor.s: New. * gas/nios2/cmp-r2.d: New. * gas/nios2/comments-r2.d: New. * gas/nios2/complex-r2.d: New. * gas/nios2/ctl-r2.d: New. * gas/nios2/custom-r2.d: New. * gas/nios2/eni.d: New. * gas/nios2/eni.s: New. * gas/nios2/etbt-r2.d: New. * gas/nios2/flushda-r2.d: New. * gas/nios2/jmp-r2.d: New. * gas/nios2/ldb-r2.d: New. * gas/nios2/ldb-r2.s: New. * gas/nios2/ldh-r2.d: New. * gas/nios2/ldh-r2.s: New. * gas/nios2/ldw-r2.d: New. * gas/nios2/ldw-r2.s: New. * gas/nios2/ldwm.d: New. * gas/nios2/ldwm.s: New. * gas/nios2/lineseparator-r2.d: New. * gas/nios2/movia-r2.d: New. * gas/nios2/mpx.d: New. * gas/nios2/mpx.s: New. * gas/nios2/mul-r2.d: New. * gas/nios2/nop-r2.d: New. * gas/nios2/nop-r2.s: New. * gas/nios2/nor-r2.d: New. * gas/nios2/or-r2.d: New. * gas/nios2/rdprs-r2.d: New. * gas/nios2/rdprs-r2.s: New. * gas/nios2/registers-r2.d: New. * gas/nios2/ret-r2.d: New. * gas/nios2/rotate-r2.d: New. * gas/nios2/stb-r2.d: New. * gas/nios2/stb-r2.s: New. * gas/nios2/sth-r2.d: New. * gas/nios2/sth-r2.s: New. * gas/nios2/stw-r2.d: New. * gas/nios2/stw-r2.s: New. * gas/nios2/stwm.d: New. * gas/nios2/stwm.s: New. * gas/nios2/sub-r2.d: New. * gas/nios2/sync-r2.d: New. * gas/nios2/trap-r2.d: New. * gas/nios2/tret-r2.d: New. * gas/nios2/wrpie.d: New. * gas/nios2/wrpie.s: New. * gas/nios2/wrprs-r2.d: New. * gas/nios2/xor-r2.d: New. commit c8c8175b623c597cf18442ff1e13456beb41931d Author: Sandra Loosemore Date: Wed Jul 1 16:08:03 2015 -0700 Opcodes and assembler support for Nios II R2 2015-07-01 Sandra Loosemore Cesar Philippidis gas/ * config/tc-nios2.c (nios2_min_align): New. (nop): Replace with.... (nop_r1, nop_r2, nop_r2_cdx, nop32, nop16): New. (nios2_align): Handle alignment on 2-byte boundaries when CDX instructions may be present. (s_nios2_align): Adjust reference to nop. (CDXBRANCH, IS_CDXBRANCH): New. (CDX_UBRANCH_SUBTYPE, CDX_CBRANCH_SUBTYPE): New. (nios2_relax_subtype_size): Handle 2-byte CDX branches. (nios2_relax_frag): Likewise. (md_convert_frag): Handle R2 encodings. (nios2_check_overflow): Check that low-order bits are zero before applying rightshift from howto. (nios2_check_overflow): Correct negative overflow calculation. (nios2_diagnose_overflow): Handle signed_immed12_overflow. Issue generic overflow messages for miscellaneous instruction formats. (md_apply_fix): Recognize new R2 relocations. For pc_relative relocations, store fixup in *valP. (nios2_reglist_mask, nios2_reglist_dir): New. (nios2_parse_reglist): New. (nios2_parse_base_register): New. (nios2_assemble_expression): Handle constant expressions designated by BFD_RELOC_NONE. (nios2_assemble_reg3): New. (nios2_assemble_arg_c): Handle R2 instruction formats. (nios2_assemble_arg_d): Likewise. (nios2_assemble_arg_s): Likewise. (nios2_assemble_arg_t): Likewise. (nios2_assemble_arg_D): New. (nios2_assemble_arg_S): New. (nios2_assemble_arg_T): New. (nios2_assemble_arg_i): Handle R2 instruction formats. (nios2_assemble_arg_I): New. (nios2_assemble_arg_u): Handle R2 instruction formats. (nios2_assemble_arg_U): New. (nios2_assemble_arg_V): New. (nios2_assemble_arg_W): New. (nios2_assemble_arg_X): New. (nios2_assemble_arg_Y): New. (nios2_assemble_arg_o): Handle R2 instruction formats. (nios2_assemble_arg_O): New. (nios2_assemble_arg_P): New. (nios2_assemble_arg_j): Handle R2 instruction formats. (nios2_assemble_arg_k): New. (nios2_assemble_arg_l): Handle R2 instruction formats. (nios2_assemble_arg_m): Likewise. (nios2_assemble_arg_M): New. (nios2_assemble_arg_N): New. (nios2_assemble_arg_e): New. (nios2_assemble_arg_f): New. (nios2_assemble_arg_g): New. (nios2_assemble_arg_h): New. (nios2_assemble_arg_R): New. (nios2_assemble_arg_B): New. (nios2_assemble_args): Handle new argument letters. (nios2_consume_arg): Likewise. (nios2_translate_pseudo_insn): Avoid dereferencing null pointer in error message. (nios2_ps_insn_info_structs): Add nop.n. (output_ubranch): Handle CDX branches. (output_cbranch): Likewise. (output_call): Handle R2 encodings. (output_movia): Likewise. (md_begin): Initialize nios2_min_align. (md_assemble): Align to nios2_min_align. Adjust nios2_min_align if a 16-bit instruction is seen. (nios2_cons_align): Use appropriate nop pattern. include/opcode/ * nios2.h (enum iw_format_type): Add R2 formats. (enum overflow_type): Add signed_immed12_overflow and enumeration_overflow for R2. (struct nios2_opcode): Document new argument letters for R2. (REG_3BIT, REG_LDWM, REG_POP): Define. (includes): Include nios2r2.h. (nios2_r2_opcodes, nios2_num_r2_opcodes): Declare. (nios2_r2_asi_n_mappings, nios2_num_r2_asi_n_mappings): Declare. (nios2_r2_shi_n_mappings, nios2_num_r2_shi_n_mappings): Declare. (nios2_r2_andi_n_mappings, nios2_num_r2_andi_n_mappings): Declare. (nios2_r2_reg3_mappings, nios2_num_r2_reg3_mappings): Declare. (nios2_r2_reg_range_mappings, nios2_num_r2_reg_range_mappings): Declare. * nios2r2.h: New file. opcodes/ * nios2-dis.c (nios2_extract_opcode): New. (nios2_disassembler_state): New. (nios2_find_opcode_hash): Use mach parameter to select correct disassembler state. (nios2_print_insn_arg): Extend to support new R2 argument letters and formats. (print_insn_nios2): Check for 16-bit instruction at end of memory. * nios2-opc.c (nios2_builtin_regs): Add R2 register attributes. (NIOS2_NUM_OPCODES): Rename to... (NIOS2_NUM_R1_OPCODES): This. (nios2_r2_opcodes): New. (NIOS2_NUM_R2_OPCODES): New. (nios2_num_r2_opcodes): New. (nios2_r2_asi_n_mappings, nios2_num_r2_asi_n_mappings): New. (nios2_r2_shi_n_mappings, nios2_num_r2_shi_n_mappings): New. (nios2_r2_andi_n_mappings, nios2_num_r2_andi_n_mappings): New. (nios2_r2_reg3_mappings, nios2_num_r2_reg3_mappings): New. (nios2_r2_reg_range_mappings, nios2_num_r2_reg_range_mappings): New. commit 8c163c5a87f3e16f34ea9a0565767a23dccd5983 Author: Sandra Loosemore Date: Wed Jul 1 16:02:09 2015 -0700 Relocations for Nios II R2 2015-07-01 Sandra Loosemore Cesar Philippidis bfd/ * bfd-in2.h: Regenerated. * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to... (elf_nios2_r1_howto_table_rel): This. (elf_nios2_r2_howto_table_rel): New. (BFD_IS_R2): New. (lookup_howto): Add ABFD parameter. Adjust to look up in either the R1 or R2 relocation table, as determined by ABFD. (nios2_reloc_map): Add R2 relocations. (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto. Pass it the ABFD parameter. (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to return an R1 or R2 relocation. (nios2_elf32_info_to_howto): Do lookup using lookup_howto. Pass it the ABFD parameter. (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte boundary. (nios2_elf32_relocate_section): Adjust call to lookup_howto. * libbfd.h: Regenerated. * reloc.c (BFD_RELOC_NIOS2_R2_S12): New. (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New. (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New. (BFD_RELOC_NIOS2_R2_T1I7_2): New. (BFD_RELOC_NIOS2_R2_T2I4): New. (BFD_RELOC_NIOS2_R2_T2I4_1): New. (BFD_RELOC_NIOS2_R2_T2I4_2): New. (BFD_RELOC_NIOS2_R2_X1I7_2): New. (BFD_RELOC_NIOS2_R2_X2L5): New. (BFD_RELOC_NIOS2_R2_F1I5_2): New. (BFD_RELOC_NIOS2_R2_L5I4X1): New. (BFD_RELOC_NIOS2_R2_T1X1I6): New. (BFD_RELOC_NIOS2_R2_T1X1I6_2): New. include/elf/ * nios2.h (R_NIOS2_R2_S12): New. (R_NIOS2_R2_I10_1_PCREL): New. (R_NIOS2_R2_T1I7_1_PCREL): New. (R_NIOS2_R2_T1I7_2): New. (R_NIOS2_R2_T2I4): New. (R_NIOS2_R2_T2I4_1): New. (R_NIOS2_R2_T2I4_2): New. (R_NIOS2_R2_X1I7_2): New. (R_NIOS2_R2_X2L5): New. (R_NIOS2_R2_F1I5_2): New. (R_NIOS2_R2_L5I4X1): New. (R_NIOS2_R2_T1X1I6): New. (R_NIOS2_R2_T1X1I6_2): New. (R_NIOS2_ILLEGAL): Renumber. commit 965b1d80832fde9ba17a8b5f11b578a8f9e10581 Author: Sandra Loosemore Date: Wed Jul 1 15:55:28 2015 -0700 Add Nios II arch flags and compatibility tests 2015-07-01 Sandra Loosemore Cesar Philippidis bfd/ * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New. * bfd-in2.h: Regenerated. * cpu-nios2.c (nios2_compatible): New. (N): Use nios2_compatible instead of bfd_default_compatible. (NIOS2R1_NEXT, NIOS2R2_NEXT): Define. (arch_info_struct): New. (bfd_nios2_arch): Chain to NIOS2R1_NEXT. * elf32-nios2.c (is_nios2_elf): New. (nios2_elf32_merge_private_bfd_data): New. (nios2_elf32_object_p): New. (bfd_elf32_bfd_merge_private_bfd_data): Define. (elf_backend_object_p): Define. gas/ * config/tc-nios2.c: Adjust includes. (OPTION_MARCH): Define. (md_longopts): Add -march option. (nios2_architecture): New. (nios2_use_arch): New. (md_parse_option): Handle OPTION_MARCH. (md_show_usage): Document -march. (md_begin): Set arch in BFD. (nios2_elf_final_processing): New. * config/tc-nios2.h (elf_tc_final_processing): Define. (nios2_elf_final_processing): New. * doc/c-nios2.texi (-march): Add documentation. include/elf/ * nios2.h (EF_NIOS2_ARCH_R1, EF_NIOS2_ARCH_R2): Define. ld/testsuite/ * ld-nios2/mixed1a.d: New. * ld-nios2/mixed1a.s: New. * ld-nios2/mixed1b.d: New. * ld-nios2/mixed1b.s: New. * ld-nios2/nios2.exp: Build the new compatibility tests. commit dfc87947b5ac6d6382c225449d4fdce411c7ee66 Author: H.J. Lu Date: Wed Jul 1 09:32:47 2015 -0700 Refactor elf_x86_64_convert_mov_to_lea * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor. commit bbcbf914a6ad801bfa7d4e56150217a1d53e07af Author: Patrick Palka Date: Wed Jul 1 08:02:09 2015 -0400 TUI: Make sure to update registers if frame information has changed When I replaced TUI's frame_changed hook to fix PR tui/13378 I assumed that there's no reason to refresh register information following a call to "up", "down" or "frame". This assumption was made to fix the problem of refreshing frame information twice following a sync-execution normal stop (once in tui_normal_stop and then in tui_before_prompt) -- the second refresh removing any highlights made by the first. I was wrong about that -- GDB's snapshot of register information is per-frame, and when the frame changes, registers do too (most prominently the %rip and %rsp registers). So e.g. GDB 7.8 would highlight such register changes after invoking "up", "down" or "frame", and current GDB does not. To fix this regression, this patch adds another (sufficient) condition for refreshing register information: in tui_refresh_frame_and_register_information, always refresh register information if frame information has changed. This makes register information get refreshed following a call to "up", "down" or "frame" while still avoiding the "double refresh" issue following a normal stop. This condition may seem to obsolete the existing registers_too_p parameter, but it does not: following a normal stop, it is possible that registers may have changed while frame information had not. We could be on the exact same PC with different register values. The new condition would not catch such a case, but the registers_too_p condition will. So both conditions seem necessary (and either one is sufficient). gdb/ChangeLog: * tui/tui-hooks.c (tui_refresh_frame_and_register_information): Update commentary. Always refresh the registers when frame information has changed. * tui/tui-stack.c (tui_show_frame_info): Update commentary. Change return type to int. Return 1 if frame information has changed, 1 otherwise. (tui_before_prompt): Update commentary. * tui/tui-stack.h (tui_show_frame_info): Change return type to int. commit 7a53c6c9c7b85f92480370d29c8a70635f6744b3 Author: GDB Administrator Date: Wed Jul 1 00:00:08 2015 +0000 Automatic date update in version.in commit 06f810bd8ee52d2485c180d45c635c25c9a15108 Author: Martin Galvan Date: Tue Jun 30 18:20:47 2015 -0300 Remove the unneeded escaping of '[' and ']' characters in test_class_help As these characters don't need to be escaped for strings wrapped inside {} braces, we can remove the unneeded backslashes. gdb/testsuite/ChangeLog: * lib/gdb.exp (test_class_help): Remove the unneeded escaping of '[' and ']' characters. commit 5e61e7c0390b390bd07c019ade5e42d7a6d77e10 Author: Iain Buclaw Date: Tue Jun 30 20:09:16 2015 +0200 Sync dlang demangling tests from upstream libiberty testsuite gdb/testsuite/ChangeLog: * gdb.dlang/demangle.exp: Sync tests from libiberty testsuite. commit 0986c744dfecb8177de90020646090e9ed23cfe7 Author: Patrick Palka Date: Tue Jun 30 13:56:49 2015 -0400 Replace TUI's select_frame hook (PR tui/13378) The select_frame hook is used by TUI to update TUI's frame and register information following changes to the selected frame. The problem with this hook is that it gets called after every single frame change, even if the frame change is only temporary or internal. This is the primary cause of flickering and slowdown when running the inferior under TUI with conditional breakpoints set. Internal GDB events are the source of many calls to select_frame and these internal events are triggered frequently, especially when a few conditional breakpoints are set. This patch removes the select_frame hook altogether and instead makes the frame and register information get updated in two key places (using observers): after an inferior stops, and right before displaying a prompt. The latter hook covers the case when frame information must be updated following a call to "up", "down" or "frame", and the former covers the case when frame and register information must be updated after a call to "continue", "step", etc. or after the inferior stops in async execution mode. Together these hooks should cover all the cases when frame information ought to be refreshed (and when the relevant windows ought to be subsequently updated). The print_frame_info_listing hook is also effectively obsolete now, but it still must be set while the TUI is active because its caller print_frame_info will otherwise assume that the CLI is active, and will print the frame informaion accordingly. So this patch also sets the print_frame_info_listing hook to a dummy callback, in lieu of outright removing it yet. Effectively, with this patch, frame/PC changes that do not immediately precede an inferior-stop event or a prompt display event no longer cause TUI's frame and register information to be updated. And as a result of this change and of the previous change to tui_show_frame_info, the TUI is much more disciplined about updating the screen, and so the flicker as described in the PR is totally gone. gdb/ChangeLog: PR tui/13378 * frame.c (select_frame): Remove reference to deprecated_selected_frame_level_changed_hook. * frame.h (deprecated_selected_frame_level_changed_hook): Remove declaration. * stack.c (deprecated_selected_frame_level_changed_hook): Likewise. * tui/tui-hooks.c (tui_selected_frame_level_changed_hook): Rename to ... (tui_refresh_frame_and_register_information): ... this. Bail out if there is no stack. Don't update register information unless registers_too_p is true. (tui_print_frame_info_listing_hook): Rename to ... (tui_dummy_print_frame_info_listing_hook): ... this. (tui_before_prompt): New function. (tui_normal_stop): New function. (tui_before_prompt_observer): New observer. (tui_normal_stop_observer): New observer. (tui_install_hooks): Set deprecated_print_frame_info_listing_hook to tui_dummy_print_frame_info_listing_hook. Register tui_before_prompt_observer to call tui_before_prompt and tui_normal_stop_observer to call tui_normal_stop. Remove reference to deprecated_selected_frame_level_changed_hook. (tui_remove_hooks): Detach and unset tui_before_prompt_observer and tui_normal_stop_observer. Remove reference to deprecated_selected_frame_level_changed_hook. commit b5fca6d7284b2cd2e90efc556eb6a29a1b177476 Author: Patrick Palka Date: Fri Jun 26 20:38:30 2015 -0400 Be lazy about refreshing the windows in tui_show_frame_info (PR tui/13378) tui_show_frame_info is responsible for updating the visible windows following a change in frame information (that being the currently selected frame, PC, line number, etc). Currently it always redraws and refreshes each window even if frame information has not changed. This behavior is inefficient and helps contribute to the occassional flickering of the TUI as described in the mentioned PR. This patch makes tui_show_frame_info refresh the windows only if frame information has changed. Determining whether frame information has changed is done indirectly by determining whether the locator has changed. This approach is convenient and yet sensible because the locator contains all the relevant info we need to check anyway: the current PC, the line number, the name of the executable and the name of the current function. Probably only the PC is really necessary to check, but it doesn't hurt to check every field. Effectively, with this patch, consecutive calls to select_frame with the same frame/PC no longer cause TUI's frame information to be updated multiple times. gdb/ChangeLog: PR tui/13378 * tui/tui-stack.c (tui_set_locator_info): Change prototype to return an int instead of void. Return whether the locator window has changed. (tui_show_frame_info): If the locator info has not changed, then bail out early to avoid refreshing the windows. commit c45613e33dbdc646b6fd7f02f86635639e852bfb Author: Patrick Palka Date: Fri Jun 26 20:17:56 2015 -0400 Correctly initialize the TUI locator window The call to tui_alloc_content in tui_set_locator_info passes locator->type as the type of the window whose content is being allocated. This may seem correct but it's actually not because when this code path actually get executed locator->type has not yet been to set LOCATOR_WIN so it defaults to 0 i.e. SRC_WIN. Thus we allocate the content of the locator window as if it was the source window. This oversight turns out not to be a big deal in practice but the patch that follows depends on the locator's proc_name and full_name arrays to be initialized to the empty string which is done by tui_alloc_content if we pass to it LOCATOR_WIN. This patch fixes this bug by explicitly passing LOCATOR_WIN to tui_alloc_content. gdb/ChangeLog: * tui/tui-stack.c (tui_set_locator_info): Explicitly pass LOCATOR_WIN to tui_alloc_content. commit d0bf44cb88be21ea009a4fe0e59a3d3e6e545aed Author: H.J. Lu Date: Tue Jun 30 10:22:36 2015 -0700 Sync libdecnumber with gcc * configure: Regenerated. commit a2efc14b81515aebd2b7e1f47fe4768e432493a9 Author: H.J. Lu Date: Tue Jun 30 10:20:19 2015 -0700 Sync dfp.m4 with gcc * dfp.m4 (enable_decimal_float): Also set to yes for i?86*-*-elfiamcu target. commit 16beab3db6f347a00b18c0d6bcc3c48feff58dca Author: H.J. Lu Date: Tue Jun 30 10:15:57 2015 -0700 Sync toplevel configure with gcc * configure.ac (ospace_frag): Enable for i?86*-*-elfiamcu target. * configure: Regenerate. commit 5ee4a1ca16364c79f8717752ee9a9bd562580907 Author: Nick Clifton Date: Tue Jun 30 17:12:47 2015 +0100 This fixes parsing a file containing ELF attributes with very large tag values. PR binutils/18570 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag. (write_obj_attribute): Likewise. (elf_new_obj_attr): Likewise. (bfd_elf_get_obj_attr_int): Likewise. (bfd_elf_add_obj_attr_int): Likewise. (bfd_elf_add_obj_attr_string): Likewise. (bfd_elf_add_obj_attr_int_string): Likewise. (gnu_obj_attrs_arg_type): Likewise. (_bfd_elf_obj_attrs_arg_type): Likewise. (_bfd_elf_parse_attributes): Likewise. (_bfd_elf_merge_unknown_attribute_list): Likewise. * elf-bfd.h (struct obj_attribute_list): Likewise. Update prototypes. commit 9916071f8df180400e39d1783d4a878cf57c61fe Author: Amit Pawar Date: Tue Jun 30 12:11:52 2015 +0530 Add support for monitorx/mwaitx instructions gas/ * config/tc-i386.c (cpu_arch): Add .mwaitx. (process_immext): Check operands for monitorx/mwaitx instructions. * doc/c-i386.texi: Document mwaitx. gas/testsuite/ * gas/i386/i386.exp: Add new mwaitx test cases. * gas/i386/mwaitx.s: New. * gas/i386/mwaitx-bdver4.d: New. * gas/i386/x86-64-mwaitx.s: New. * gas/i386/x86-64-mwaitx-bdver4.d: New. * gas/i386/mwaitx-reg.s: New. * gas/i386/mwaitx-reg.l: New. * gas/i386/x86-64-mwaitx-reg.l: New. * gas/i386/x86-64-mwaitx-reg.s: New. * gas/i386/arch-13.s: Updated. * gas/i386/arch-13.d: Updated. * gas/i386/arch-13-znver1.d: Updated. * gas/i386/x86-64-arch-3.s: Updated. * gas/i386/x86-64-arch-3.d: Updated. * gas/i386/x86-64-arch-3-znver1.d: Updated. opcodes/ * i386-dis.c (OP_Mwaitx): New. (rm_table): Add monitorx/mwaitx. * i386-gen.c (cpu_flag_init): Add CpuMWAITX to CPU_BDVER4_FLAGS and CPU_ZNVER1_FLAGS. Add CPU_MWAITX_FLAGS. (operand_type_init): Add CpuMWAITX. * i386-opc.h (CpuMWAITX): New. (i386_cpu_flags): Add cpumwaitx. * i386-opc.tbl: Add monitorx and mwaitx. * i386-init.h: Regenerated. * i386-tbl.h: Likewise. commit 54f66250d79ec304ea427915bfd8b535ec249c3b Author: Nick Clifton Date: Tue Jun 30 11:25:18 2015 +0100 Add support for SADDR addressing to the RL78 port. gas * config/rl78-parse.y: Tag all saddr expressions throughout. (SET_SA): New. (expr_is_saddr): Allow symbolic expressions. * config/tc-rl78.c (md_apply_fix): Handle SADDR. bfd * elf32-rl78.c (rl78_elf_howto_table): Add RH_SADDR. (rl78_reloc_map): Add R_RL78_RH_SADDR. * reloc.c: Add BFD_RELOC_RL78_SADDR. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. commit 7b9be803fed8f500b512d5685773c84fffcdf63f Author: Yao Qi Date: Tue Jun 30 09:24:43 2015 +0100 Handle media instructions in arm software single step. This patch fixes PR 18605 which is about incorrectly decoding media instructions in software single step. gdb: 2015-06-30 Yao Qi PR tdep/18605 * arm-tdep.c (arm_get_next_pc_raw): Break for media instructions. commit fd6e021d8c989905bbb234fdf993799db5a18cb9 Author: Kevin Buettner Date: Mon Jun 29 08:08:12 2015 -0700 Turn on dwarf2 unwinding for Renesas RX architecture This change turns on dwarf2 unwinding in rx-tdep.c. I found it necessary to add rx_dwarf_reg_to_regnum in order to cause PC to be mapped correctly. gdb/ChangeLog: * rx-tdep.c (RX_PSW_REGNUM): New enum constant. (rx_dwarf_reg_to_regnum): New function. (rx_gdbarch_init): Register rx_dwarf_reg_to_regnum. Use dwarf2 unwinding. commit 56b06706ebe6bb3decc674b788b6f5b243b8610d Author: Han Shen Date: Tue Jun 16 15:00:58 2015 -0700 Patch for gold internal error while fixing erratum 843419. The crash reason is that the insn to be moved to stub may be a relocation spot, so instead of placing the origin insn (that is insn before-relocation) to the stub, I have to place the relocated one. Note the relocation involved is non-pc-relative, so it is safe to move the relocated insn. gold/ChangeLog: 2015-06-29 Han Shen * AArch64.cc (Erratum_stub::Insn_utilities): New typedef. (Erratum_stub::update_erratum_insn): New method. (Stub_table::relocate_stubs): Modified to place relocated insn. (AArch64_relobj::fix_errata): Modified gold_assert. commit 06b3fd23bfe2f0f76a590e89ac7378c13153e165 Author: GDB Administrator Date: Tue Jun 30 00:00:08 2015 +0000 Automatic date update in version.in commit 28bf096c62d7da6b349605f3940f4c586a850f78 Author: Pedro Alves Date: Mon Jun 29 16:07:57 2015 +0100 PR threads/18127 - threads spawned by infcall end up stuck in "running" state Refs: https://sourceware.org/ml/gdb/2015-03/msg00024.html https://sourceware.org/ml/gdb/2015-06/msg00005.html On GNU/Linux, if an infcall spawns a thread, that thread ends up with stuck running state. This happens because: - when linux-nat.c detects a new thread, it marks them as running, and does not report anything to the core. - we skip finish_thread_state when the thread that is running the infcall stops. As result, that new thread ends up with stuck "running" state, even though it really is stopped. On Windows, _all_ threads end up stuck in running state, not just the one that was spawned. That happens because when a new thread is detected, unlike linux-nat.c, windows-nat.c reports TARGET_WAITKIND_SPURIOUS to infrun. It's the fact that that event does not cause a user-visible stop that triggers the problem. When the target is re-resumed, we call set_running with a wildcard ptid, which marks all thread as running. That set_running is not suppressed because the (leader) thread being resumed does not have in_infcall set. Later, when the infcall finally finishes successfully, nothing marks all threads back to stopped. We can trigger the same problem on all targets by having a thread other than the one that is running the infcall report a breakpoint hit to infrun, and then have that breakpoint not cause a stop. That's what the included test does. The fix is to stop GDB from suppressing the set_running calls while doing an infcall, and then set the threads back to stopped when the call finishes, iff they were originally stopped before the infcall started. (Note the MI *running/*stopped event suppression isn't affected.) Tested on x86_64 GNU/Linux. gdb/ChangeLog: 2015-06-29 Pedro Alves PR threads/18127 * infcall.c (run_inferior_call): On infcall success, if the thread was marked stopped before, reset it back to stopped. * infrun.c (resume): Don't suppress the set_running calls when doing an infcall. (normal_stop): Only discard the finish_thread_state cleanup if the infcall succeeded. gdb/testsuite/ChangeLog: 2015-06-29 Pedro Alves PR threads/18127 * gdb.threads/hand-call-new-thread.c: New file. * gdb.threads/hand-call-new-thread.c: New file. commit 2880b51c25b055013c2f4939a5d0c0779b972bb3 Author: Pierre Langlois Date: Mon Jun 29 10:47:51 2015 +0100 Fix email in ChangeLog entry. commit 96c97461222f9cb1a16b3b90fb7316c9c3d8732a Author: Pierre Langlois Date: Mon Jun 29 10:36:55 2015 +0100 [GDBServer][AArch64] Enable support for Z0 packets This patch lets GDBServer handle software breakpoints instead of relying on GDB. gdb/gdbserver/ChangeLog: * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for Z_PACKET_SW_BP. commit 37d669427f8b90f3c9d17a6e04d72c731d3abdbc Author: Pierre Langlois Date: Mon Jun 29 10:34:42 2015 +0100 [GDBServer][AArch64] Use the same break instruction as GDB GDB uses a "brk #0" instruction to perform a software breakpoint while GDBServer uses an illegal instruction. Both instructions should match. When enabling support for the 'Z0' packet, we let GDBServer insert the breakpoint instruction instead of GDB. And in case of permanent breakpoints for example, GDB will check if a breakpoint is inserted in the inferior with `program_breakpoint_here_p (gdbarch, address)', and compare the instruction read from the inferior with the breakpoint instruction. On AArch64, instructions are always little endian so we need to represent it as an array of bytes, as done in aarch64-tdep.c. gdb/gdbserver/ChangeLog: * linux-aarch64-low.c: Remove comment about endianness. (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0". (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use memcmp. commit 1451ea7da40a82e8cf6a39fa8d0fc74ff230600a Author: Pierre Langlois Date: Mon Jun 29 10:23:48 2015 +0100 Update my email address gdb/ChangeLog: * MAINTAINERS (Write After Approval): Update my email address. commit bb0eef66f82c97b863951eddd0c47e28faf716a8 Author: GDB Administrator Date: Mon Jun 29 00:00:07 2015 +0000 Automatic date update in version.in commit 73cb0348b296656e971c4d428aa63781e656a1c4 Author: Nick Clifton Date: Sun Jun 28 19:14:36 2015 +0100 Add support for ARM v6 instructions. * Makefile.in (SIM_EXTRA_CFLAGS): Add -lm. * armdefs.h (ARMdval, ARMfval): New types. (ARM_VFP_reg): New union. (struct ARMul_State): Add VFP_Reg and FPSCR fields. (VFP_fval, VFP_uword, VFP_sword, VFP_dval, VFP_dword): Accessor macros for the new VFP_Reg field. * armemu.c (handle_v6_insn): Add code to handle MOVW, MOVT, QADD16, QASX, QSAX, QSUB16, QADD8, QSUB8, UADD16, USUB16, UADD8, USUB8, SEL, REV, REV16, RBIT, BFC, BFI, SBFX and UBFX instructions. (handle_VFP_move): New function. (ARMul_Emulate16): Add checks for newly supported v6 instructions. Add support for VMRS, VMOV and MRC instructions. (Multiply64): Allow nRdHi == nRm and/or nRdLo == nRm when operating in v6 mode. * armemu.h (t_resolved): Define. * armsupp.c: Include math.h. (handle_VFP_xfer): New function. Handles VMOV, VSTM, VSTR, VPUSH, VSTM, VLDM and VPOP instructions. (ARMul_LDC): Test for co-processor 10 or 11 and pass call to the new handle_VFP_xfer function. (ARMul_STC): Likewise. (handle_VFP_op): New function. Handles VMLA, VMLS, VNMLA, VNMLS, VNMUL, VMUL, VADD, VSUB, VDIV, VMOV, VABS, VNEG, VSQRT, VCMP, VCMPE and VCVT instructions. (ARMul_CDP): Test for co-processor 10 or 11 and pass call to the new handle_VFP_op function. * thumbemu.c (tBIT, tBITS, ntBIT, ntBITS): New macros. (test_cond): New function. Tests a condition and returns non-zero if the condition has been met. (handle_IT_block): New function. (in_IT_block): New function. (IT_block_allow): New function. (ThumbExpandImm): New function. (handle_T2_insn): New function. Handles T2 thumb instructions. (handle_v6_thumb_insn): Add next_instr and pc parameters. (ARMul_ThumbDecode): Add support for IT blocks. Add support for v6 instructions. * wrapper.c (sim_create_inferior): Detect a thumb address and call SETT appropriately. commit ee0c0c503deffb7baf900ac8e092b18bf8c1528a Author: H.J. Lu Date: Sun Jun 28 06:30:10 2015 -0700 Remove COMPRESS_DEBUG_ZLIB COMPRESS_DEBUG_ZLIB isn't needed. This patch removes COMPRESS_DEBUG_ZLIB and replace COMPRESS_DEBUG_ZLIB with COMPRESS_DEBUG_GNU_ZLIB. bfd/ * bfd-in.h (compressed_debug_section_type): Remove COMPRESS_DEBUG_ZLIB. * bfd-in2.h : Regenerated. gas/ * as.c (parse_args): Replace COMPRESS_DEBUG_ZLIB with COMPRESS_DEBUG_GNU_ZLIB. * config/tc-i386.c (flag_compress_debug): Likewise. ld/ * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Replace COMPRESS_DEBUG_ZLIB with COMPRESS_DEBUG_GNU_ZLIB. commit e44fbadbede56bf42896c2b3214a056cf20f131e Author: GDB Administrator Date: Sun Jun 28 00:00:08 2015 +0000 Automatic date update in version.in commit 216cb5839a931d3d61aff8e0de9e49183e3d69c1 Author: H.J. Lu Date: Sat Jun 27 16:43:43 2015 -0700 Update ia64 gas tests * gas/ia64/psn.d: Updated. * gas/ia64/xdata-ilp32.d: Likewise. commit a2a55a40071096faef218f34dad3adf34db9b1ed Author: H.J. Lu Date: Sat Jun 27 16:24:50 2015 -0700 Update xtensa linker tests * ld-xtensa/tlsbin.rd: Updated. * ld-xtensa/tlspic.rd: Likewise. commit 98090c0be30fb626aed09a7f9973b9c9980cce56 Author: GDB Administrator Date: Sat Jun 27 00:00:07 2015 +0000 Automatic date update in version.in commit ee93cd5e1e61e5739a1a44e0d1d166ae09d04dc2 Author: Keith Seitz Date: Fri Jun 26 10:27:45 2015 -0700 PR 16253 revisited Last year a patch was submitted/approved/commited to eliminate symbol_matches_domain which was causing this problem. It was later reverted because it introduced a (severe) performance regression. Recap: (gdb) list 1 enum e {A,B,C} e; 2 int main (void) { return 0; } 3 (gdb) p e Attempt to use a type name as an expression The parser attempts to find a symbol named "e" of VAR_DOMAIN. This gets passed down through lookup_symbol and (eventually) into block_lookup_symbol_primary, which iterates over the block's dictionary of symbols: for (sym = dict_iter_name_first (block->dict, name, &dict_iter); sym != NULL; sym = dict_iter_name_next (name, &dict_iter)) { if (symbol_matches_domain (SYMBOL_LANGUAGE (sym), SYMBOL_DOMAIN (sym), domain)) return sym; } The problem here is that we have a symbol named "e" in both STRUCT_DOMAIN and VAR_DOMAIN, and for languages like C++, Java, and Ada, where a tag name may be used as an implicit typedef of the type, symbol_matches_domain ignores the difference between VAR_DOMAIN and STRUCT_DOMAIN. As it happens, the STRUCT_DOMAIN symbol is found first, considered a match, and that symbol is returned to the parser, eliciting the (now dreaded) error message. Since this bug exists specifically because we have both STRUCT and VAR_DOMAIN symbols in a given block/CU, this patch rather simply/naively changes block_lookup_symbol_primary so that it continues to search for an exact domain match on the symbol if symbol_matches_domain returns a symbol which does not exactly match the requested domain. This "fixes" the immediate problem, but admittedly might uncover other, related bugs. [Paranoia?] However, it causes no regressions (functional or performance) in the test suite. A similar change has been made to block_lookup_symbol for other cases in which this bug might appear. The tests from the previous submission have been resurrected and updated. However since we can still be given a matching symbol with a different domain than requested, we cannot say that a symbol "was not found." The error messages today will still be the (dreaded) "Attempt to use a type name..." ChangeLog PR 16253 * block.c (block_lookup_symbol): For non-function blocks, continue to search for a symbol with an exact domain match Otherwise, return any previously found "best domain" symbol. (block_lookup_symbol_primary): Likewise. testsuite/ChangeLog PR 16253 * gdb.cp/var-tag-2.cc: New file. * gdb.cp/var-tag-3.cc: New file. * gdb.cp/var-tag-4.cc: New file. * gdb.cp/var-tag.cc: New file. * gdb.cp/var-tag.exp: New file. commit fc637f04c741b08726cc1631428bf094235ecb4e Author: Patrick Palka Date: Tue Jun 2 22:49:15 2015 -0400 Add option to remove duplicate command history entries This patch implements the new option "history remove-duplicates", which controls the removal of duplicate history entries ("off" by default). The motivation for this option is to be able to reduce the prevalence of basic commands such as "up" and "down" in the history file. These common commands crowd out more unique commands in the history file (when the history file has a fixed size), and they make navigation of the history file via ^P, ^N and ^R more inconvenient. The option takes an integer denoting the number of history entries to look back at for a history entry that is a duplicate of the latest one. "history remove-duplicates 1" is equivalent to bash's ignoredups option, and "history remove-duplicates unlimited" is equivalent to bash's erasedups option. [ I decided to go with this integer approach instead of a tri-state enum because it's slightly more flexible and seemingly more intuitive than leave/erase/ignore. ] gdb/ChangeLog: * NEWS: Mention the new option "history remove-duplicates". * top.c (history_remove_duplicates): New static variable. (show_history_remove_duplicates): New static function. (gdb_add_history): Conditionally remove duplicate history entries. (init_main): Add "history remove-duplicates" option. gdb/doc/ChangeLog: * gdb.texinfo (Command History): Document the new option "history remove-duplicates". gdb/testsuite/ChangeLog: * gdb.base/history-duplicates.exp: New test. commit 2e52ae68e7cedc3a1f9908c98ee60a8602705835 Author: Patrick Palka Date: Sun Jun 21 22:54:10 2015 -0400 Add tab completion for TUI's "focus" command The implementation is pretty straightforward, with the only caveat being that the "src", "cmd", "next" and "prev" entries get delibrately added to the completion list even when the TUI has not yet been initialized (i.e. has never been enabled during the session), since invoking the "focus" command with these arguments already works when the TUI has not yet been initialized. gdb/ChangeLog: * tui/tui-win.c (focus_completer): New static function. (_initialize_tui_win): Set the completion function of the "focus" command to focus_completer. gdb/testsuite/ChangeLog: * gdb.base/completion.exp: Test the completion of the "focus" command. commit 6e22494e5076e4d3c0b2c2785883162f83db499e Author: Jan Kratochvil Date: Fri Jun 26 15:11:14 2015 +0200 Do not skip prologue for asm (.S) files GDB tries to skip prologue for .S files according to .debug_line but it then places the breakpoint to a location where it is never hit. This is because #defines in .S files cause prologue skipping which is completely inappropriate, for s390x: glibc/sysdeps/unix/syscall-template.S 78:/* This is a "normal" system call stub: if there is an error, 79: it returns -1 and sets errno. */ 80: 81:T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) 82: ret 00000000000f4210 T __select Line Number Statements: Extended opcode 2: set Address to 0xf41c8 Advance Line by 80 to 81 Copy Advance PC by 102 to 0xf422e Special opcode 6: advance Address by 0 to 0xf422e and Line by 1 to 82 Special opcode 34: advance Address by 2 to 0xf4230 and Line by 1 to 83 Advance PC by 38 to 0xf4256 Extended opcode 1: End of Sequence Compilation Unit @ offset 0x28b3e0: <0><28b3eb>: Abbrev Number: 1 (DW_TAG_compile_unit) <28b3ec> DW_AT_stmt_list : 0x7b439 <28b3f0> DW_AT_low_pc : 0xf41c8 <28b3f8> DW_AT_high_pc : 0xf4256 <28b400> DW_AT_name : ../sysdeps/unix/syscall-template.S <28b423> DW_AT_comp_dir : /usr/src/debug////////glibc-2.17-c758a686/misc <28b452> DW_AT_producer : GNU AS 2.23.52.0.1 <28b465> DW_AT_language : 32769 (MIPS assembler) without debuginfo or with debuginfo and the fix - correct address: (gdb) b select Breakpoint 1 at 0xf4210 It is also where .dynsym+.symtab point to: 00000000000f4210 T __select 00000000000f4210 W select with debuginfo, without the fix: (gdb) b select Breakpoint 1 at 0xf41c8: file ../sysdeps/unix/syscall-template.S, line 81. One part is to behave for asm files similar way like for 'locations_valid': /* Symtab has been compiled with both optimizations and debug info so that GDB may stop skipping prologues as variables locations are valid already at function entry points. */ unsigned int locations_valid : 1; The other part is to extend the 'locations_valid'-like functionality more. Both minsym_found and find_function_start_sal need to be patched, otherwise their addresses do not match and GDB regresses on ppc64: gdb/ChangeLog 2015-06-26 Jan Kratochvil * linespec.c (minsym_found): Reset sal.PC for COMPUNIT_LOCATIONS_VALID and language_asm.. * symtab.c (find_function_start_sal): Likewise. gdb/testsuite/ChangeLog 2015-06-26 Jan Kratochvil * gdb.arch/amd64-prologue-skip.S: New file. * gdb.arch/amd64-prologue-skip.exp: New file. commit c742574f825fe43d1e7203fca8690c008b525e97 Author: H.J. Lu Date: Fri Jun 26 05:39:45 2015 -0700 Compile-in IAMCU linker scripts * emulparams/elf_iamcu.sh (COMPILE_IN): New. commit a5499fa4649e4325cf46edfff2f24dae2fe2afef Author: Matthew Fortune Date: Thu Jun 11 10:16:19 2015 +0100 Add support for DT_MIPS_RLD_MAP_REL. This tag makes it possible to access the debug map when debugging position independent executables. bfd/ * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable instead of !shared to indicate an application vs shared library. (_bfd_mips_elf_size_dynamic_sections): Likewise. (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL. (_bfd_mips_elf_get_target_dtag): Likewise. binutils/ * readelf.c (get_mips_dynamic_type): Handle DT_MIPS_RLD_MAP_REL. include/ * elf/mips.h (DT_MIPS_RLD_MAP_REL): New macro. ld/testsuite/ * ld-mips-elf/pic-and-nonpic-3b.ad: Adjust for extra dynamic tag. * ld-mips-elf/pic-and-nonpic-4b.ad: Likewise. * ld-mips-elf/pic-and-nonpic-5b.ad: Likewise. * ld-mips-elf/pic-and-nonpic-6-n32.ad: Likewise. * ld-mips-elf/pic-and-nonpic-6-n64.ad: Likewise. * ld-mips-elf/pic-and-nonpic-6-o32.ad: Likewise. * ld-mips-elf/tlsdyn-o32-1.d: Likewise. * ld-mips-elf/tlsdyn-o32-1.got: Likewise. * ld-mips-elf/tlsdyn-o32-2.d: Likewise. * ld-mips-elf/tlsdyn-o32-2.got: Likewise. * ld-mips-elf/tlsdyn-o32-3.d: Likewise. * ld-mips-elf/tlsdyn-o32-3.got: Likewise. * ld-mips-elf/tlsdyn-o32.d: Likewise. * ld-mips-elf/tlsdyn-o32.got: Likewise. * ld-mips-elf/pie-n32.d: New file. * ld-mips-elf/pie-n64.d: Likewise. * ld-mips-elf/pie-o32.d: Likewise. * ld-mips-elf/pie.s: Likewise. * ld-mips-elf/mips-elf.exp: Add new tests. commit 920d644c6377a0bf7419ae8a24bac6e101beb847 Author: GDB Administrator Date: Fri Jun 26 00:00:07 2015 +0000 Automatic date update in version.in commit 3f3070745b78c25d7b16c913c15496b296802505 Author: DJ Delorie Date: Thu Jun 25 17:20:15 2015 -0400 Fix REL handling for MSP430 * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix REL loads to match RELA stores. commit 946748d5ed1d218adfccd523be9fdf280adfe434 Author: H.J. Lu Date: Thu Jun 25 12:12:43 2015 -0700 Don't set sh_size for .shstrtab twice _bfd_elf_assign_file_positions_for_non_load will set the sh_size field for .shstrtab section. There is need to initialize it in _bfd_elf_compute_section_file_positions. * elf.c (_bfd_elf_compute_section_file_positions): Don't initialize sh_size for .shstrtab here. commit bf7b9cd9aa4645119792e9d1689e0f014f43934f Author: Simon Marchi Date: Thu Jun 25 13:33:14 2015 -0400 py-prettyprint.exp: Add is_address_zero_readable check gdb/testsuite/ChangeLog: * gdb.python/py-prettyprint.exp (run_lang_tests): Add is_address_zero_readable check. commit 06e78fc77dfcb8a63e44a790c9731db0eaebe87d Author: H.J. Lu Date: Thu Jun 25 10:14:13 2015 -0700 Run ld-elf/strtab only on linux/gnu targets Since not all ELF targets support -shared, we limit ld-elf/strtab to linux and gnu targets. * ld-elf/strtab.d: Only run on *-*-linux* and *-*-gnu* targets. commit 4a677ba7249d61afc58b761c997cf1a743279e02 Author: H.J. Lu Date: Thu Jun 25 10:05:10 2015 -0700 Update .strtab section sizes in mmix tests Since commit ef10c3ace00674e8c3599c3bf95f06c87d68898b may reduce .strtab section size, we need to adjust expected .strtab section sizes in mmix tests. gas/testsuite/ * gas/mmix/loc-3.d: Updated. * gas/mmix/loc-5.d: Likewise. ld/testsuite/ * ld-mmix/bspec1.d: Updated. * ld-mmix/bspec2.d: Likewise. * ld-mmix/undef-3.d: Likewise. commit ef10c3ace00674e8c3599c3bf95f06c87d68898b Author: H.J. Lu Date: Thu Jun 25 08:16:00 2015 -0700 Use strtab with GC and suffix merging for .strtab This patch uses ELF strtab with GC and suffix merging support to create ELF .strtab section. There is some small memory overhead to use ELF strtab: ==14928== HEAP SUMMARY: ==14928== in use at exit: 3,276,318 bytes in 679 blocks ==14928== total heap usage: 1,544 allocs, 865 frees, 15,259,146 bytes allocated vs. ==14936== HEAP SUMMARY: ==14936== in use at exit: 3,276,318 bytes in 679 blocks ==14936== total heap usage: 1,532 allocs, 853 frees, 15,026,402 bytes allocated when running: ./ld-new -m elf_x86_64 -o tmpdir/ld-partial.o -r ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf_x86_64.o eelf32_x86_64.o eelf_i386.o eelf_iamcu.o ei386linux.o eelf_l1om.o eelf_k1om.o ldbuildid.o The results are [32] .strtab STRTAB 0+ 3beff8 00407a 00 0 0 1 vs [32] .strtab STRTAB 0+ 3beff8 0041d8 00 0 0 1 It reduces the .strtab size by 350 bytes, about 2% Saving on libc.so from glibc is much more since libc.so has many alias symbols with the same suffix. For x32 glibc, [82] .strtab STRTAB 0+ 81b348 0159e7 00 0 0 1 vs [82] .strtab STRTAB 0+ 81b8bc 019e72 00 0 0 1 It reduces the .strtab size by 17547 bytes, about 16%. bfd/ PR gas/18451 * elf-bfd.h (elf_sym_strtab): New. (elf_link_hash_table): Add strtabcount, strtabsize and strtab. (_bfd_elf_stringtab_init): Removed. * elf.c (_bfd_elf_stringtab_init): Removed. (_bfd_elf_compute_section_file_positions): Replace bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/ _bfd_stringtab_size with elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/ _bfd_elf_strtab_size. Use _bfd_elf_strtab_add, _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get st_name. (swap_out_syms): Likewise. * elflink.c (elf_final_link_info): Replace bfd_strtab_hash with elf_strtab_hash. Remove symbuf, symbuf_count, symbuf_size and shndxbuf_size. (elf_link_flush_output_syms): Removed. (elf_link_output_sym): Renamed to ... (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add with _bfd_elf_strtab_add. Don't flush symbols to the file nor swap out symbols. (elf_link_swap_symbols_out): New. (elf_link_output_extsym): Replace elf_link_output_sym with elf_link_output_symstrtab. (elf_link_input_bfd): Likewise. (elf_final_link_free): Replace _bfd_stringtab_free with _bfd_elf_strtab_free. Remove symbuf. (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with _bfd_elf_strtab_init. Don't set symbuf, symbuf_count, symbuf_size nor shndxbuf_size. Initialize strtabsize and strtab. Initialize symshndxbuf to -1 when number of sections >= 64K. Replace elf_link_output_sym/elf_link_output_sym with elf_link_output_symstrtab/elf_link_output_symstrtab. Don't call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize and elf_link_swap_symbols_out. Replace _bfd_stringtab_size and _bfd_stringtab_emit with _bfd_elf_strtab_size and _bfd_elf_strtab_emit. gas/testsuite/ PR gas/18451 * gas/elf/elf.exp: Run strtab. * gas/elf/strtab.d: New file. * gas/elf/strtab.s: Likewise. ld/testsuite/ PR gas/18451 * ld-elf/strtab.d: New file. * ld-elf/strtab.s: Likewise. commit f8773be1be076f828b93ac3bebeab3f782e191e4 Author: Gary Benson Date: Thu Jun 25 09:54:12 2015 +0100 Correctly notice empty sysroots in solib_find_1 Some parts of solib_find_1 should only operate if the sysroot is nonempty after processing, but the logic that checked this happened before trailing slashes were stripped so empty but non-NULL sysroots were possible. This commit moves the logic so it correctly notices all empty sysroots. gdb/ChangeLog: * solib.c (solib_find_1): Set local variable sysroot to NULL if it is the empty string after trailing slashes have been stripped. commit a3be80c3c54e9e2c0d8e9a1ff77c931cd8ebeb60 Author: Gary Benson Date: Wed Jun 24 16:06:49 2015 +0100 Remove gdb_sysroot NULL checks Since fed040c6a50399617d8265cbddc7fd21b3f134ef gdb_sysroot is never NULL. This commit removes all gdb_sysroot NULL checks. gdb/ChangeLog: * exec.c (exec_file_locate_attach): Remove gdb_sysroot NULL check. * infrun.c (follow_exec): Likewise. * remote.c (remote_filesystem_is_local): Likewise. * solib.c (solib_find_1): Likewise. commit 53f7371c77f50aea587cf06bf4cc79273ee1382e Author: GDB Administrator Date: Thu Jun 25 00:00:16 2015 +0000 Automatic date update in version.in commit 68c3545dc3bf31e41572a3e9ada3e189dc704b0c Author: H.J. Lu Date: Wed Jun 24 15:27:44 2015 -0700 Remove the extra @section .cfi_lsda Commit 2f0c68f23bb3132cd5ac466ca8775c0d9e4960cd added an extra @section .cfi_lsda: @subsection @code{.cfi_lsda @var{encoding} [, @var{exp}]} +@section @code{.cfi_lsda @var{encoding} [, @var{exp}]} @code{.cfi_lsda} defines LSDA and its encoding. It shouldn't be there. * doc/as.texinfo (.cfi_lsda): Remove the extra @section. commit 7cc152be3e6f24f2bdb9740157426dc115cdaa54 Author: H.J. Lu Date: Wed Jun 24 14:12:15 2015 -0700 Silence older GCC warning * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older GCC warning. commit 32fad71f9e6cdf73fe3c10123b23f42397b83e7d Author: Keith Seitz Date: Thu Jun 4 10:13:50 2015 -0700 Fix lrealpath memory leak in build_id_to_debug_bfd Valgrind reports memory leaking from build_id_to_debug_bfd: ==7261== 88 bytes in 2 blocks are definitely lost in loss record 31,319 of 35,132 ==7261== at 0x4A06BCF: malloc (vg_replace_malloc.c:296) ==7261== by 0x32CA88A9B9: strdup (strdup.c:42) ==7261== by 0xFE62AB: lrealpath (lrealpath.c:88) ==7261== by 0x7F7AD6: build_id_to_debug_bfd (build-id.c:116) ==7261== by 0x7F7BB5: find_separate_debug_file_by_buildid (build-id.c:149) ==7261== by 0x6D9382: elf_symfile_read (elfread.c:1348) ==7261== by 0x777F02: read_symbols (symfile.c:875) ==7261== by 0x778505: syms_from_objfile_1 (symfile.c:1078) ==7261== by 0x778548: syms_from_objfile (symfile.c:1094) ==7261== by 0x778746: symbol_file_add_with_addrs (symfile.c:1191) ==7261== by 0x77893B: symbol_file_add_from_bfd (symfile.c:1280) ==7261== by 0x8E51E3: solib_read_symbols (solib.c:706) ==7261== by 0x8E58AF: solib_add (solib.c:1029) This occurs because commit 1be5090b in bfd, addressing PR 11983, started taking a copy of the input filename instead of directly caching it. It appears that this code was never updated to reflect that API change. This simple patch creates a cleanup to free the return value for lrealpath. gdb/ChangeLog * build-id.c (build_id_to_debug_bfd): Add cleanup to free return value from lrealpath. commit 7c1e8d3ed5e48b3339d60450fdb5b29ae54edebe Author: H.J. Lu Date: Wed Jun 24 13:37:05 2015 -0700 Keep .plt section and DT_PLTGOT for prelink Since the .plt section and DT_PLTGOT are used by prelink to undo prelinking for dynamic relocations, we must keep them even if there is no PLT relocation. This patch reverted commit a3747075a. bfd/ * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate space for the first .plt entry. (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if there are PLT relocations. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always allocate space for the first .plt entry. (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if there are PLT relocations. ld/testsuite/ * ld-i386/i386.exp: Run pltgot-2 for Linux targets. * ld-x86-64/x86-64.exp: Likewise. * ld-i386/pltgot-1.d: Updated. * ld-x86-64/pltgot-1.d: Likewise. * ld-i386/pltgot-2.d: New file. * ld-x86-64/pltgot-2.d: Likewise. commit f91ca6bc00c1e3c70c1d2f4527d4297b76e2eaca Author: Iain Buclaw Date: Wed Jun 24 21:43:02 2015 +0200 Sync libiberty from GCC, replaying updates to configure scripts commit 59cab532835904f368b0aa99267afba5fda5ded2 Author: H.J. Lu Date: Wed Jun 24 10:13:55 2015 -0700 Don't convert R_X86_64_GOTPCREL if it will overflow When converting "mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg" with R_X86_64_PC32 relocation, it may overflow if the target section is more than 2GB away. This patch estimates distance between mov instruction and the target section. We convert R_X86_64_GOTPCREL to R_X86_64_PC32 only if their distance is less than 2GB. PR ld/18591 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation overflow. commit 602a67cbeaf6b42bc513a873aec82e53235b8754 Author: Mike Frysinger Date: Wed Jun 24 22:09:07 2015 +0700 sim: trace: drop unused trace_one_insn Everyone has migrated to the split functions (trace_prefix + trace_generic) a while ago, so we can drop this one now. commit 9b6025d1691e83eb5e85805df88a67083972ecca Author: Mike Frysinger Date: Wed Jun 24 21:59:26 2015 +0700 sim: trace: rename debug_printf fully Rather than redirect using a define, just rename the symbol fully. commit fa8f87e53b68881c5e3aab296b517203407c4378 Author: Mike Frysinger Date: Wed Jun 24 19:37:21 2015 +0545 sim: trace: add a basic cpu register class The bfin/msp430 ports already had trace logic set up for reading/writing cpu registers, albeit using different unrelated levels (core & vpu). Add a proper register class for these and for other ports. commit cf304b56ca48631836bdc4035134b5b5ec3b9d49 Author: Mike Frysinger Date: Wed Jun 24 01:00:16 2015 +0545 sim: trace: add set of system helpers Some code paths trace on a system instance and not a cpu instance (like the events code), so add some helpers for those cases. commit 87d1b30944783ae0efb49236c6d872d775a37417 Author: Mike Frysinger Date: Wed Jun 24 21:23:12 2015 +0700 gdb: sim: merge the sysroot update logic together Initialize the local sysroot fully before we start using it. This keeps it all a bit simpler. commit 8371bf0cd99635c9eabed28481b34ea8934a948e Author: Mike Frysinger Date: Wed Jun 24 19:06:38 2015 +0545 sim: trace: document alu/fpu/vpu trace options better Make the acronyms clear for people. commit 201e8dfdc8926c0b15bd9bebc762612ce196fd00 Author: Peter Bergner Date: Wed Jun 24 09:15:29 2015 -0500 Add missing ChangeLog entries for yesterday's commmit below. gdb/testsuite/ * gdb.arch/powerpc-power.exp : Fixup test results. * gdb.arch/powerpc-power.s : Likewise. commit 23bf70af12aa0c14e79c02b6098117bdba8c8a3a Author: Mike Frysinger Date: Tue Jun 23 11:29:39 2015 -0400 gdb: sim: handle target sysroot prefix The default gdb sysroot now sets itself to "target:". This works for most remote targets, but when using the simulator, this causes problems as the sim will attempt to search for that path. Update the remote-sim logic to skip this leading prefix when it is found so that the sysroot isn't passed in as an invalid value. commit 5cd867b414fe3609dbf596c373343474132775a8 Author: Yao Qi Date: Wed Jun 24 14:53:03 2015 +0100 Call set_gdbarch_get_siginfo_type in linux_init_abi linux_get_siginfo_type is installed to many linux gdbarch. This patch is to move this to a common area linux-tdep.c:linux_init_abi, so that linux_get_siginfo_type is installed to every linux gdbarch. If some linux gdbarch needs its own version, please override it in $ARCH_linux_init_abi. In the testsuite, we enable siginfo related tests for all linux targets. gdb: 2015-06-24 Yao Qi * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't call set_gdbarch_get_siginfo_type. * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise. * arm-linux-tdep.c (arm_linux_init_abi): Likewise. * i386-linux-tdep.c (i386_linux_init_abi): Likewise. * m68klinux-tdep.c (m68k_linux_init_abi): Likewise. * ppc-linux-tdep.c (ppc_linux_init_abi): Likewise. * s390-linux-tdep.c (s390_gdbarch_init): Likewise. * tilegx-linux-tdep.c (tilegx_linux_init_abi): Likewise. * linux-tdep.c (linux_get_siginfo_type): Change it to static. (linux_init_abi): Call set_gdbarch_get_siginfo_type. * linux-tdep.h (linux_get_siginfo_type): Remove the declaration. gdb/testsuite: 2015-06-24 Yao Qi * lib/gdb.exp (supports_get_siginfo_type): Return 1 for all linux targets. commit 4d7be0075acd2083772944209c765a7c332a1727 Author: Yao Qi Date: Wed Jun 24 14:53:03 2015 +0100 New proc supports_get_siginfo_type Both siginfo-obj.exp and siginfo-thread.exp have the same code checking the support of geting a type of siginfo for a given arch. This patch is to move these code into a proc supports_get_siginfo_type. gdb/testsuite: 2015-06-24 Yao Qi * lib/gdb.exp (supports_get_siginfo_type): New proc. * gdb.base/siginfo-obj.exp: Invoke supports_get_siginfo_type. * gdb.base/siginfo-thread.exp: Likewise. commit dc06243f6f87aa52222dab0ef45bb9a5119724da Author: Gary Benson Date: Wed Jun 24 11:59:03 2015 +0100 Remove redundant include directives. stdint.h was added to common-defs.h some months ago and should no longer be included directly by any file. gdb_assert.h was added to common-defs.h nearly a year ago, but three includes have crept in since then. This commit removes all such redundant include directives. gdb/ChangeLog: * common/buffer.c (stdint.h): Do not include. * common/print-utils.c (stdint.h): Likewise. * compile/compile-c-symbols.c (gdb_assert.h): Likewise. * compile/compile-c-types.c (gdb_assert.h): Likewise. * ft32-tdep.c (gdb_assert.h): Likewise. * guile/scm-utils.c (stdint.h): Likewise. * i386-linux-tdep.c (stdint.h): Likewise. * i386-tdep.c (stdint.h): Likewise. * nat/linux-btrace.c (stdint.h): Likewise. * nat/linux-btrace.h (stdint.h): Likewise. * nat/linux-ptrace.c (stdint.h): Likewise. * nat/mips-linux-watch.h (stdint.h): Likewise. * ppc-linux-nat.c (stdint.h): Likewise. * python/python-internal.h (stdint.h): Likewise. * stub-termcap.c (stdlib.h): Likewise. * target/target.h (stdint.h): Likewise. * xtensa-linux-nat.c (stdint.h): Likewise. gdb/gdbserver/ChangeLog: * linux-i386-ipa.c (stdint.h): Do not include. * lynx-i386-low.c (stdint.h): Likewise. * lynx-ppc-low.c (stdint.h): Likewise. * mem-break.c (stdint.h): Likewise. * thread-db.c (stdint.h): Likewise. * tracepoint.c (stdint.h): Likewise. * win32-low.c (stdint.h): Likewise. commit 44d51e2c27f2154970c046089be768f503b996b1 Author: GDB Administrator Date: Wed Jun 24 00:00:08 2015 +0000 Automatic date update in version.in commit 0fc26cafacfff9f53d898bb73495b384b80d6d31 Author: Patrick Palka Date: Tue Jun 23 10:01:38 2015 -0400 Fix GDBHISTSIZE test failure on i686 The test test_histsize_history_setting "99999999999999999999999999999999999" "unlimited" was failing on i686 because the condition in init_history() for determining whether to map a large GDBHISTSIZE value to infinity was long var = strtol (tmpenv); if (var > INT_MAX) history_size = unlimited; but this condition is never true on i686 because INT_MAX == LONG_MAX. So in order to properly map large out-of-range values of GDBHISTSIZE to infinity on targets where LONG_MAX > INT_MAX as well as on i686, we have to instead change the above condition to if (var > INT_MAX || (var == INT_MAX && errno == ERANGE)) history_size = unlimited; gdb/ChangeLog: * top.c (init_history): Look at errno after calling strtol to properly map large GDBHISTSIZE values to infinity. commit e750549018d67d545bdaf90cc058f97b954600cc Author: Mike Frysinger Date: Wed Jun 24 00:36:06 2015 +0545 sim: common: replace SIM_FILTER_PATH with lbasename This helper macro has largely the same behavior as libiberty's lbasename. There is a slight nuance related to colons, but it's not clear what the point of that is, and the code implies that it just wants the basename. commit 8d0978fb4bf62e760e7b50e59d5c58d30c059183 Author: Mike Frysinger Date: Tue Jun 23 23:43:48 2015 +0545 sim: use AS_HELP_STRING everywhere This helps standardize the configure --help output. commit a38fe4feddd68b9c0aa082dd078c668ca9f06aae Author: Doug Evans Date: Tue Jun 23 11:36:49 2015 -0700 inferior.h (struct inferior_suspend_state): Delete, unused. gdb/ChangeLog: * inferior.h (struct inferior_suspend_state): Delete, unused. All references deleted. commit 8e6500c55ef0b9413ab16e384dbfcaa238bcd420 Author: Peter Bergner Date: Tue Jun 23 13:33:05 2015 -0500 Fix rfebb gdb test cases. The following patch fixed the assembly / disassembly of the rfebb instruction: https://sourceware.org/ml/binutils/2015-06/msg00190.html This patch updates the gdb testsuite to match the new disassembly behavior. gdb/testsuite/ * gdb.arch/powerpc-power.exp : Fixup test results. * gdb.arch/powerpc-power.s : Likewise. commit 4953dc20941a48eed02b575cec29d8de419f87eb Author: Mike Frysinger Date: Tue Jun 23 23:42:29 2015 +0545 sim: trace: do not enable internal debug by default Since --trace-debug is for people hacking on the sim sources rather than people just using the sim, default it to off. This matches the behavior of other debug knobs we have. commit b50a153264dae2267e3846772819515c648e3c97 Author: Mike Frysinger Date: Tue Jun 23 23:39:52 2015 +0545 sim: assume recentish compiler/systems Assume the build system supports stdint.h/stdarg.h as those have been around long enough and we don't care about pre-stdc compilers anymore. commit 7564fe458c2fe1a77eecfaf5e2f99bec8961d457 Author: Mike Frysinger Date: Sun Jun 21 14:13:03 2015 -0400 gdb: microblaze: delete useless stubs These don't accomplish anything the common core doesn't already, so punt them as they purely waste code. commit 0bdb2f78497a1b3be65d1428cc02f7d4e1d3a888 Author: Yao Qi Date: Tue Jun 23 14:03:11 2015 +0100 Convert have_ptrace_getregset to a tri-state boolean have_ptrace_getregset is a tri-state variable (-1, 0, 1), and we have some conditions like "if (have_ptrace_getregset)", which is not correct. I'll explain why it is not correct in the following example. This fix to this problem to replace the test (have_ptrace_getregset) to test (have_ptrace_getregset == 1) or (have_ptrace_getregset == -1) etc. However Doug thinks it hinders readability https://sourceware.org/ml/gdb-patches/2015-05/msg00692.html so I decide to add a new enum tribool and change have_ptrace_getregset to it, in order to make these tests more readable. have_ptrace_getregset is initialised to -1, and is adjusted to 0 or 1 in $ARCH_linux_read_description according to the capability of the kernel. However, it is possible that have_ptrace_getregset is used before it is set to 0 or 1, which means it is still -1. This is shown below. (gdb) run Starting program: gdb/testsuite/gdb.base/break Breakpoint 2, amd64_linux_fetch_inferior_registers (ops=0xceaa80, regcache=0xe72000, regnum=16) at git/gdb/amd64-linux-nat.c:128 128 { top?p have_ptrace_getregset $1 = TRIBOOL_UNKNOWN top?c Continuing. Breakpoint 2, amd64_linux_fetch_inferior_registers (ops=0xceaa80, regcache=0xe72000, regnum=16) at git/gdb/amd64-linux-nat.c:128 128 { top?c Continuing. Breakpoint 1, x86_linux_read_description (ops=0xceaa80) at git/gdb/x86-linux-nat.c:117 117 { PTRACE_GETREGSET command is used even GDB doesn't know whether PTRACE_GETREGSET is supported or not. It is wrong, but works on x86. However it doesn't work on arm-linux if the kernel doesn't support PTRACE_GETREGSET at all. We'll get: (gdb) run Starting program: gdb/testsuite/gdb.base/break warning: Unable to fetch general register. PC register is not available gdb: 2015-06-23 Yao Qi * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers): Check whether have_ptrace_getregset is TRIBOOL_TRUE explicitly. (amd64_linux_store_inferior_registers): Likewise. * arm-linux-nat.c (fetch_fpregister): Likewise. (fetch_fpregs, store_fpregister): Likewise. (store_fpregister, store_fpregs): Likewise. (fetch_register, fetch_regs): Likewise. (store_register, store_regs): Likewise. (fetch_vfp_regs, store_vfp_regs): Likewise. (arm_linux_read_description): Check have_ptrace_getregset is TRIBOOL_UNKNOWN. Set have_ptrace_getregset to TRIBOOL_TRUE or TRIBOOL_FALSE. * i386-linux-nat.c (fetch_xstateregs): Check have_ptrace_getregset is not TRIBOOL_TRUE. (store_xstateregs): Likewise. * linux-nat.c (have_ptrace_getregset): Change its type to enum tribool. * linux-nat.h (tribool): New enum. * x86-linux-nat.c (x86_linux_read_description): Use enum tribool. Check whether have_ptrace_getregset is TRIBOOL_TRUE. commit c217058957a45a93481da35e1531ed120750d739 Author: Jiong Wang Date: Tue Jun 23 12:12:06 2015 +0100 [AArch64] Generate DT_TEXTREL for relocation against read-only section 2015-06-23 Jiong Wang bfd/ * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function. (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check relocations against read-only sections. ld/testsuite/ * ld-aarch64/dt_textrel.s: New testcase. * ld-aarch64/dt_textrel.d: New expectation file. * ld-aarch64/aarch64-elf.exp: Run new testcase. commit e5ee3fe285c698f1ce3d9bbb596bcda6219f5f3a Author: GDB Administrator Date: Tue Jun 23 00:00:08 2015 +0000 Automatic date update in version.in commit 7b9341139a693eac8d316275004b2d752b1f0cb8 Author: Peter Bergner Date: Mon Jun 22 14:55:24 2015 -0500 PPC sync instruction accepts invalid and incompatible operands ISA 2.07 added a new category called Elemental Memory Barriers that modifies the sync instruction to accept an additional operand ESYNC. Edmar added support for this insruction varient here: https://sourceware.org/ml/binutils/2012-02/msg00221.html Looking at this closer, I see that the insert_ls() function is misnamed (since it's attached to the ESYNC operand, not the LS operand) but more importantly, it is silently modifying the LS operand value behind the users back when the LS operand is either invalid or is incompatible with the new ESYNC operand. The ISA 2.07 doc has an Assembler Note that clearly states that assemblers that support the ESYNC operand should report all invalid uses of LS and ESYNC. This patch changes the assembler to error out on invalid and incompatible operand usage. opcodes/ * ppc-opc.c (insert_ls): Test for invalid LS operands. (insert_esync): New function. (LS, WC): Use insert_ls. (ESYNC): Use insert_esync. gas/testsuite/ * gas/ppc/e6500.s : Fix invalid test. * gas/ppc/e6500.d: Likewise. commit bdc4de1b24353c4213e404029252ec75065499de Author: Nick Clifton Date: Mon Jun 22 16:53:27 2015 +0100 Stop "objdump -d" from disassembling past a symbolic address. include * dis-asm.h (struct disassemble_info): Add stop_vma field. binuti * objdump.c (disassemble_bytes): Set the stop_vma field in the disassemble_info structure when disassembling code sections with -d. * doc/binutils.texi (objdump): Document the discrepancy between -d and -D. opcodes * dis-buf.c (buffer_read_memory): Fail is stop_vma is set and the requested region lies beyond it. * bfin-dis.c (print_insn_bfin): Ignore sysop instructions when looking for 32-bit insns. * mcore-dis.c (print_insn_mcore): Disable stop_vma when reading data. * sh-dis.c (print_insn_sh): Likewise. * tic6x-dis.c (print_insn_tic6x): Disable stop_vma when reading blocks of instructions. * vax-dis.c (print_insn_vax): Check that the requested address does not clash with the stop_vma. tests * gas/arm/backslash-at.s: Add extra .byte directives so that the foo symbol does not appear to point half way through an instruction. * gas/arm/backslash-at.d: Update expected disassembly. * gas/i386/ilp32/x86-64-opcode-inval-intel.d: Likewise. * gas/i386/ilp32/x86-64-opcode-inval.d: Likewise. * gas/i386/x86-64-opcode-inval-intel.d: Likewise. * gas/i386/x86-64-opcode-inval.d: Likewise. commit 07fcd30112bb071e8dda0a2229a860f2874a7816 Author: Yao Qi Date: Tue Apr 28 10:59:04 2015 +0100 Add comments on using board file remote-gdbserver-on-localhost.exp This commit is to add comments on using this board file and the requirements on localhost. gdb/testsuite: 2015-06-22 Yao Qi * boards/remote-gdbserver-on-localhost.exp: Add comments. commit 52042a003f3e9200c992bc5cf4607dc7655b1f7b Author: Yao Qi Date: Mon Jun 22 13:41:33 2015 +0100 Don't skip hw breakpoint/watchpoint tests for aarch64 target This patch is to let skip_hw_breakpoint_tests and skip_hw_watchpoint_tests return 0 for aarch64 target, since aarch64 has HW watchpoint and breakpoint registers. With this patch applied, about 1560 watchpoint/breakpoint related tests become enabled on aarch64-linux native testing. gdb/testsuite: 2015-06-22 Yao Qi * lib/gdb.exp (skip_hw_breakpoint_tests): Return 0 for target aarch64*-*-*. (skip_hw_watchpoint_tests): Likewise. commit cb5d172ca44e20200b96b5276c4198095d7b6516 Author: GDB Administrator Date: Mon Jun 22 00:00:07 2015 +0000 Automatic date update in version.in commit ccd4b2953bb039e91b301a616c5f7c6f542b6b10 Author: Mike Frysinger Date: Sat Jun 20 15:21:26 2015 +0545 sim: common: add basic model assert If the configured in default doesn't match a known value, throw an assertion failure rather than segfaulting deeper down. commit f55b33d51b056c665568c6204bd3ced7f1ec15c8 Author: Mike Frysinger Date: Sat Jun 20 09:33:04 2015 +0545 sim: common: use standard intXX_t types for signedXX Let's assume that the system supports the POSIX int8/16/32/64_t types as this collapses the logic significantly. commit 618b526e31d3df71e9526a0753271624a568564e Author: Mike Frysinger Date: Sat Jun 20 09:31:10 2015 +0545 sim: common: standardize multiple include defines We use SIM_xxx_H in most headers, so convert _SIM_xxx_H_ over to it. commit 02db4b0a9f80505adaef9f547e8c069adfe63e36 Author: Alan Modra Date: Sun Jun 21 13:03:36 2015 +0930 Don't use $< in Makefiles $< is a GNU make feature. * Makefile.am: Expand $<. * Makefile.in: Regenerate. commit bcdeacb69a4de9e019acf6c4a7f09457e6e6cf0a Author: GDB Administrator Date: Sun Jun 21 00:00:08 2015 +0000 Automatic date update in version.in commit c325601c3f444689bd807c40c9b7d5d702e7b7e5 Author: GDB Administrator Date: Sat Jun 20 00:00:08 2015 +0000 Automatic date update in version.in commit 11a0cf2ec0ed6e70ff25e9a50c2223dcd98c1c10 Author: Peter Bergner Date: Fri Jun 19 17:17:07 2015 -0500 Allow for optional operands with non-zero default values. ISA 2.07 (ie, POWER8) added the rfebb instruction which takes one operand with the value of either a 0 or 1. It also defines an extended mnemonic with no operands (ie, "rfebb") that is supposed to be equivalent to "rfebb 1". I implemented rfebb's lone operand with PPC_OPERAND_OPTIONAL, but the problem is, optional operands that are ommitted always default to the value 0, which is wrong in this case. I have added support for allowing non-zero default values by adding an additional flag PPC_OPERAND_OPTIONAL_VALUE that specifies that the default operand value to be used is stored in the SHIFT field of the operand field immediately following this one. This fixes the rfebb issue. I also fixed the mftb and mfcr instructions so they use the same mechanism. This allows us to flag invalid uses of mfcr where we explicitly pass in a zero FXM value, like the use in a2.[sd]. include/opcode/ * ppc.h (PPC_OPERAND_OPTIONAL_VALUE): New. (ppc_optional_operand_value): New inline function. opcodes/ * ppc-dis.h (skip_optional_operands): Use ppc_optional_operand_value. * ppc-opc.c (FXM4): Add non-zero optional value. (TBR): Likewise. (SXL): Likewise. (insert_fxm): Handle new default operand value. (extract_fxm): Likewise. (insert_tbr): Likewise. (extract_tbr): Likewise. gas/ * config/tc-ppc.c (md_assemble): Use ppc_optional_operand_value. Allow for optional operands without insert functions. gas/testsuite/ * gas/ppc/power8.d: Fixup rfebb test results. * gas/ppc/a2.s: Fix invalid mfcr test. * gas/ppc/a2.d: Likewise. commit 18a94d75a0a9baca8e2db2563fa3e637415ad86e Author: Doug Evans Date: Fri Jun 19 11:34:43 2015 -0700 Remove special support in gdb for Sun's version of stabs. Discussion: https://sourceware.org/ml/gdb-patches/2015-05/msg00169.html gdb/ChangeLog: * NEWS: Mention Sun's version of stabs is no longer supported. * elfread.c (free_elfinfo): Delete. All uses updated. (elfstab_offset_sections): Delete. All uses updated. * gdb-stabs.h (stab_section_info): Delete. All uses updated. * psympriv.h (partial_symtab) : Delete. All uses updated. * psymtab.c (start_psymtab_common): Delete arg section_offsets. All callers updated. gdb/doc/ChangeLog: * stabs.texinfo (ELF Linker Relocation): Mention Sun stabs is no longer supported. commit ef8b8d4ad51c2b90e022c5442f60b39f05e38ef6 Author: GDB Administrator Date: Fri Jun 19 00:00:08 2015 +0000 Automatic date update in version.in commit 124e13d9e753ef307d6fe478e2cd6dd738de1a0f Author: Simon Marchi Date: Thu Jun 18 13:12:39 2015 -0400 remote: consider addressable unit size when reading/writing memory Adapt code in remote.c to take into account addressable unit size when reading/writing memory. A few variables are renamed and suffixed with _bytes or _units. This way, it's more obvious if there is any place where we add or compare values of different kinds (which would be a mistake). gdb/ChangeLog: * common/rsp-low.c (needs_escaping): New. (remote_escape_output): Add unit_size parameter. Refactor to support multi-byte addressable units. Rename parameters. * common/rsp-low.h (remote_escape_output): Add unit_size parameter and rename others. Update doc. * remote.c (align_for_efficient_write): New. (remote_write_bytes_aux): Add unit_size parameter and use it. Rename some variables. Update doc. (remote_xfer_partial): Get unit size and use it. (remote_read_bytes_1): Add unit_size parameter and use it. Rename some variables. Update doc. (remote_write_bytes): Same. (remote_xfer_live_readonly_partial): Same. (remote_read_bytes): Same. (remote_flash_write): Update call to remote_write_bytes_aux. (remote_write_qxfer): Update call to remote_escape_output. (remote_search_memory): Same. (remote_hostio_pwrite): Same. gdb/gdbserver/ChangeLog: * server.c (write_qxfer_response): Update call to remote_escape_output. commit 74bd41ce65c6c2c30ff67519bfc1d00b61826d96 Author: Patrick Palka Date: Wed Jun 17 15:41:07 2015 -0400 Test the interaction between GDBHISTSIZE and .gdbinit The value inside the GDBHISTSIZE environment variable, only if valid, should override setting the history size through one's .gdbinit file. gdb/testsuite/ChangeLog: * gdb.base/gdbinit-history.exp: Test the interaction between setting GDBHISTSIZE and setting the history size via .gdbinit. commit c12d2c9d48cf18d818f79b89bffda934c354fdac Author: Nick Clifton Date: Thu Jun 18 10:23:16 2015 +0100 Add support for using the ADR alias in Thumb mode against nearby symbols. PR gas/18541 gas * config/tc-arm.c (md_apply_fix): Add support for ADR in thumb mode against a nearby symbol. tests * gas/arm/thumb.s: Add test of ADR against a nearby symbol. * gas/arm/thumb.d: Update expected output. * gas/arm/thumb-eabi.d: Likewise. commit 75c11999673ba32027eb17f6df9c37904622ed24 Author: Nick Clifton Date: Thu Jun 18 10:18:42 2015 +0100 Fix the computation of the addends for an ARM_TLS_LE32 reloc. PR gas/18481 bfd * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL. gas * config/tc-arm.c (tc_gen_reloc): Include BFD_RELOC_ARM_TLS_LE32 in the same case as BFD_RELOC_ARM_TLS_IS32. tests * gas/arm/tls.s: Add tests of the tpoff pseudo with a local symbol. * gas/arm/tls.d: Update expected output. commit 57b42d6489218e29cb18edd111c97f4390b62ad9 Author: Mike Frysinger Date: Thu Jun 18 04:06:27 2015 -0400 sim: syscall: simplify unknown syscall trace Since we always include the raw syscall number when tracing, also including it in the name when it's unknown is redundant. Simplify the code by using a constant string. commit 7aec3bb968de6847cc73809408dfe8aa78fe7de7 Author: Mike Frysinger Date: Thu Jun 18 04:02:26 2015 -0400 sim: callback: fix sentinel testing when walking maps The new helpers for walking the maps tested the wrong value for exiting the for loop. This caused crashes when looking up entries that were not in the map. commit faffbc648d247533b6cecfedbbaf2d640d72cad2 Author: GDB Administrator Date: Thu Jun 18 00:00:08 2015 +0000 Automatic date update in version.in commit 6ae8866180bf90e9ec76c2dd34c07fd826d11a83 Author: Luis Machado Date: Wed Jun 17 16:50:57 2015 -0300 Fix problems with finishing a dummy function call on simulators. Some simulators don't handle permanent breakpoints properly and will sometimes terminate when hitting such a breakpoint instruction or have unwanted effects. When a permanent breakpoint is inserted, GDB will not attempt to insert other breakpoint locations on top of it, leading to the problem described above. By not marking permanent breakpoint locations as inserted, we allow the insertion of breakpoint locations on top of the permanent ones, preventing the simulators from running into that situation. gdb/ChangeLog: 2015-06-17 Luis Machado * breakpoint.c (add_location_to_breakpoint): Don't mark permanent locations as inserted. Update and expand comment about permanent locations. (bp_loc_is_permanent): Don't return 0 for bp_call_dummy. Move comment to add_location_to_breakpoint. (update_global_location_list): Don't error out if a permanent breakpoint is not marked inserted. Don't error out if a non-permanent breakpoint location is inserted on top of a permanent breakpoint. commit da4616f69f53c221477388b6f2d4abee9bba0722 Author: Luis Machado Date: Wed Jun 17 11:08:55 2015 -0300 Remove unused function make_breakpoint_permanent. make_breakpoint_permanent is no longer used anywhere and can be safely removed. gdb/ChangeLog: 2015-06-17 Luis Machado * breakpoint.c (make_breakpoint_permanent): Remove unused function. * breakpoint.h (make_breakpoint_permanent): Remove declaration. commit 0eacb2983d96fd7f12a1400a66450c1a89578f00 Author: Patrick Palka Date: Wed Jun 17 14:44:38 2015 -0400 Make NEWS entry and manual regarding GDBHISTSIZE more consistent ... by mentioning in the manual that setting GDBHISTSIZE to the empty string disables truncation, like the NEWS entry does. gdb/doc/ChangeLog: * gdb.texinfo (Command History): Mention that setting GDBHISTSIZE to the empty string disables history truncation. commit bc460514b9db46a491c2c39cd118b02608742968 Author: Patrick Palka Date: Tue May 12 06:50:26 2015 -0400 Tweak the handling of $GDBHISTSIZE edge cases [PR gdb/16999] When GDB reads a nonsensical value for the GDBHISTSIZE environment variable, i.e. one that is non-numeric or negative, GDB then sets its history size to 0. This behavior is annoying and also inconsistent with the behavior of bash. This patch makes the behavior of invalid GDBHISTSIZE consistent with how bash handles HISTSIZE. When we encounter a null or out-of-range GDBHISTSIZE (outside of [0, INT_MAX]) we now set the history size to unlimited instead of 0. When we encounter a non-numeric GDBHISTSIZE we do nothing. gdb/ChangeLog: PR gdb/16999 * NEWS: Mention new GDBHISTSIZE behavior. * top.c (init_history): For null or out-of-range GDBHISTSIZE, set history size to unlimited. Ignore non-numeric GDBHISTSIZE. gdb/doc/ChangeLog: PR gdb/16999 * gdb.texinfo (Command History): Mention new GDBHISTSIZE behavior. gdb/testsuite/ChangeLog: PR gdb/16999 * gdb.base/gdbhistsize-history.exp: New test. commit b58c513b7932cfb9852d66e07282b9c2379197ed Author: Patrick Palka Date: Wed Jun 17 13:31:56 2015 -0400 Read $GDBHISTSIZE instead of $HISTSIZE The HISTSIZE environment variable is generally expected to be read by shells, not by applications. Some distros for example globally export HISTSIZE in /etc/profile -- with the intention that it only affects shells -- and by doing so it renders useless GDB's own mechanism for setting the history size via .gdbinit. Also, annoyances may arise when HISTSIZE is not interpreted the same way by the shell and by GDB, e.g. PR gdb/16999. That can always be fixed on a shell-by-shell basis but it may be impossible to be consistent with the behavior of all shells at once. Finally it just makes sense to not confound shell environment variables with application environment variables. gdb/ChangeLog: * NEWS: Mention that GDBHISTSIZE is read instead of HISTSIZE. * top.c (init_history): Read from GDBHISTSIZE instead of HISTSIZE. (init_main): Refer to GDBHISTSIZE instead of HISTSIZE. gdb/doc/ChangeLog: * gdb.texinfo (Command History): Replace occurrences of HISTSIZE with GDBHISTSIZE. gdb/testsuite/ChangeLog: * gdb.base/gdbinit-history.exp: Replace occurrences of HISTSIZE with GDBHISTSIZE. * gdb.base/readline.exp: Likewise. commit 7d5c6c43ca8a5dd5491f4a58e977ec5501386ee3 Author: Mike Frysinger Date: Mon Jun 15 19:22:38 2015 +0545 sim: syscall: add common sim_syscall helpers Many ports have the same sim syscall logic, so add some helpers to handle all the common details. The arches still have to deal with the unpacking and packing of the syscall arguments, but the rest of the sim<->callback glue is now shared. commit 61a0c964e611eaf72489c3049ba206b2f91ea4a9 Author: Mike Frysinger Date: Mon Jun 15 21:09:21 2015 +0545 sim: syscall: unify memory helpers Almost every port implements these two callbacks in the same way, so unify them in the common layer. commit 6362a3f8757bfce133b724df2077573433823ad4 Author: Mike Frysinger Date: Mon Jun 15 19:17:16 2015 +0545 sim: callback: add human readable strings for debugging to maps When tracing, we often want to display the human readable name for the various syscall/errno values. Rather than make each target duplicate the lookup, extend the existing maps to include the string directly, and add helper functions to look up the constants. While most targets are autogenerated (from libgloss), the bfin/cris targets have custom maps for the Linux ABI which need to be updated by hand. commit 920467912a594a3e5af1d779487ffe3e5c550aef Author: Yao Qi Date: Wed Jun 17 17:03:03 2015 +0100 Fix tcl error This patch fixes the following tcl error Running ../../../binutils-gdb/gdb/testsuite/gdb.base/break-interp.exp ... ERROR: (DejaGnu) proc "else" does not exist. The error code is NONE The info on the error is: invalid command name "else" while executing "::tcl_unknown else" ("uplevel" body line 1) invoked from within "uplevel 1 ::tcl_unknown $args" gdb/testsuite: 2015-06-17 Yao Qi * lib/gdb.exp (get_build_id): Move braces and "else" to the same line. commit 696ddf4b52bd4b4d3997ca1a514b1d07fcea3715 Author: Jiong Wang Date: Wed Jun 17 16:36:04 2015 +0100 [AArch64] Select correct linker emulation for ILP32 according to endianes 2015-06-17 Jiong Wang ld/testsuite/ * ld-aarch64/aarch64-elf.exp (aarch64_choose_ilp32_emul): New function. * ld-aarch64/emit-relocs-28.d: Use aarch64_choose_ilp32_emul to choose emulation mode. commit 5fc177c89526035dfa5ac5329f88b02af01d8ca5 Author: Nick Clifton Date: Wed Jun 17 16:10:36 2015 +0100 Fix compile warnings building previous delta in a 32-bit environment. * config/tc-arm.c (is_double_a_single): Make conditional upon the availablity of a 64-bit type. Use this type for the argument and mantissa. (double_to_single): Likewise. * config/tc-arm.c (move_or_literal_pool): Use a 64-bit type for the constant value, if available. Generate a 64-bit value from a bignum if supported. Only perform the second optimization for PR 18500 if the 64-bit type is available. commit 2093d2d31460dc351145c4c295ea4a101e0c5aed Author: Patrick Palka Date: Thu Jun 4 10:12:27 2015 -0400 Don't truncate the history file when history size is unlimited We still do not handle "set history size unlimited" correctly. In particular, after writing to the history file, we truncate the history even if it is unlimited. This patch makes sure that we do not call history_truncate_file() if the history is not stifled (i.e. if it's unlimited). This bug causes the history file to be truncated to zero on exit when one has "set history size unlimited" in their gdbinit file. Although this code exists in GDB 7.8, the bug is masked by a pre-existing bug that's been only fixed in GDB 7.9 (PR gdb/17820). gdb/ChangeLog: * top.c (gdb_safe_append_history): Do not call history_truncate_file if the history is not stifled. gdb/testsuite/ChangeLog: * gdb.base/gdbinit-history.exp: Add test case to check that an unlimited history file does not get truncated on exit. commit 1256987795a7f61826c0e5cc2ee023a579bb0a80 Author: Alessandro Marzocchi Date: Wed Jun 17 13:50:52 2015 +0100 Add support for converting LDR Rx,= to MOV or MVN in Thumb2 mode. PR gas/18499 gas * config/tc-arm.c (move_or_literal_pool): Add support for LDR Rx,= to MOV.w or MVN.w for Thumb2. tests * gas/arm/thumb2_ldr_immediate_armv6.s: New test case. * gas/arm/thumb2_ldr_immediate_armv6.d: Expected disassembly. * gas/arm/thumb2_ldr_immediate_armv6t2.s: New test case. * gas/arm/thumb2_ldr_immediate_armv6t2.d: Expected disassembly. commit ba592044bc04610d6fa14d0a95931bac303ace37 Author: Alessandro Marzocchi Date: Wed Jun 17 12:56:17 2015 +0100 Add support for converting VLDR ,= to a VMOV instruction when appropriate. PR gas/18500 gas * config/tc-arm.c (is_double_a_single): New function. (double_to_single): New function. (move_or_literal_pool): Add support for converting VLDR to VMOV. tests * gas/arm/vfpv2-ldr_immediate.s: New test case. * gas/arm/vfpv2-ldr_immediate.d: Expected disassembly. * gas/arm/vfpv3-ldr_immediate.s: New test case. * gas/arm/vfpv3-ldr_immediate.d: Expected disassembly. * gas/arm/vfpv3xd-ldr_immediate.s: New test case. * gas/arm/vfpv3xd-ldr_immediate.d: Expected disassembly. commit fc2484855563d0cd3e43b9f2d937481b5f5e4a7b Author: Andreas Arnez Date: Wed Jun 17 11:17:08 2015 +0200 S390: Add syscall info for syscalls from 344 up to 354 Represent new Linux syscalls for s390 and s390x in GDB's syscall info. Add the syscalls from 344 (finit_module) up to 354 (execveat). gdb/ChangeLog: * syscalls/s390-linux.xml: Add syscalls 344 through 354. * syscalls/s390x-linux.xml: Likewise. commit e6c693af14c0488998a784d560b8cfbcf15db99a Author: Andreas Arnez Date: Wed Jun 17 11:17:07 2015 +0200 Add vector ABI tests to gnu_vector.exp So far the gnu_vector test was limited to "static" aspects of GDB's vector support, like evaluating vector-valued expressions. This patch enriches the test and adds checks for GDB's vector ABI support as well. The new checks particularly verify inferior function calls with vector arguments and GDB's handling of vector return values. The test now attempts to compile for the target's "native" architecture, such that a hardware vector ABI is used if available. Since GDB has no vector ABI support for x86 and x86_64 targets, most of the new checks are KFAILed there. gdb/testsuite/ChangeLog: * gdb.base/gnu_vector.c: Include stdarg.h and stdio.h. (VECTOR): New macro. Use it... (int4, uint4, char4, float4, int2, longlong2, float2, double2): ...for these typedefs. (int8, char1, int1, double1): New typedefs. (struct just_int2, struct two_int2): New structures. (add_some_intvecs, add_many_charvecs, add_various_floatvecs) (add_structvecs, add_singlevecs): New functions. (main): Call add_some_intvecs twice. * gdb.base/gnu_vector.exp: Drop GCC version check; just attempt the compile and exit upon failure. Try compiling for the "native" architecture. Test inferior function calls with vector arguments and vector return value handling with "finish" and "return". commit 490b7f752c8d0c91f8cdf53c3771d5be5cb9e7de Author: GDB Administrator Date: Wed Jun 17 00:00:07 2015 +0000 Automatic date update in version.in commit 451133cefa839104aa127d230436fb609dbef37f Author: Nicolas Pitre Date: Tue Jun 9 23:06:29 2015 -0400 gas: section name substitution sequence This patch adds the ability to automatically construct a section name based on the prior section. When gas is invoked with --sectname-subst, the occurrence of %S in a section name will be substituted by the name of the current section. For example: .macro exception_code .pushsection %S.exception [exception code here] .popsection .endm .text [code] exception_code [...] .section .init [init code] exception_code [...] The first and second exception_code invocations create the .text.exception and the .init.exception sections respectively. This is useful e.g. to discriminate between anciliary sections that are tied to .init code and can be discarded at run time when initialization is over vs anciliary sections tied to .text sections that need to stay resident. * as.c (show_usage): Document --sectname-subst. (parse_args): Add --sectname-subst. * as.h (flag_sectname_subst): New. * config/obj-elf.c (obj_elf_section_name): Add %S substitution. * doc/as.texinfo: Document it. commit 4da680addb9f9c22f24f0294b8b9b9ca52cecd7f Author: Michael Eager Date: Tue Jun 16 07:18:03 2015 -0700 GDB Namespaces - Define MSG_CMSG_CLOEXEC if not defined. 2015-06-16 Michael Eager * nat/linux-namespaces.c (MSG_CMSG_CLOEXEC): Define if not defined. commit 0a75489fab4f3a1172c0328b9f0767351dbb8744 Author: Patrick Palka Date: Mon Jun 1 21:30:50 2015 -0400 Call target_terminal_ours_for_output() before refreshing TUI's frame info In some cases tui_show_frame_info() may get called while the inferior's terminal settings are still in effect. But when we call this function we absolutely need to have our terminal settings in effect because the function is responsible for redrawing TUI's windows following a change in the selected frame or a change in the PC. If our terminal settings are not in effect, the screen does not get redrawn properly, causing temporary display artifacts (which can be fixed via ^L). This scenario happens most prominently when stepping through a program in TUI while a watchpoint is in effect. Here is an example backtrace for when tui_show_frame_info() gets called while target_terminal_is_inferior() == 1: #1 0x00000000004988ee in tui_selected_frame_level_changed_hook (level=0) #2 0x0000000000617b99 in select_frame (fi=0x18c9820) #3 0x0000000000617c3f in get_selected_frame (message=message@entry=0x0) #4 0x00000000004ce534 in update_watchpoint (b=b@entry=0x2d9a760, reparse=reparse@entry=0) #5 0x00000000004d625e in insert_breakpoints () #6 0x0000000000531cfe in keep_going (ecs=ecs@entry=0x7ffea7884ac0) #7 0x00000000005326d7 in process_event_stop_test (ecs=ecs@entry=0x7ffea7884ac0) #8 0x000000000053596e in handle_inferior_event_1 (ecs=0x7ffea7884ac0) The fix is simple: call target_terminal_ours_for_output() before calling tui_show_frame_info() in TUI's frame-changed hook, making sure to restore the original terminal settings afterwards. gdb/ChangeLog: * tui/tui-hooks.c (tui_selected_frame_level_changed_hook): Call target_terminal_ours_for_output() before calling tui_show_frame_info(), and restore the original terminal settings afterwards. commit bdfa8b951ba38b15487eab2a754b9a33b9f29634 Author: Matthew Wahab Date: Tue Jun 16 14:15:54 2015 +0100 [AArch64] Support id_mmfr4 system register 2015-06-16 Matthew Wahab opcodes/ * aarch64-opc.c (aarch64_sys_regs): Add "id_mmfr4_el1". gas/testsuite * sysreg.d: Add id_mmfr4_el1, update expected output. * sysreg.s: Add id_mmfr4_el1. commit 56f4083249f4633084d4e8d89fc065e895f874cf Author: Jon Turney Date: Mon Jun 15 19:20:02 2015 +0100 Fix build when size_t is not available in bfd-in2.h bfd/ChangeLog: 2015-06-15 Jon Turney * bfd.c: Change struct bfd_build_id to use bfd_size_type. * bfd-in2.h : Regenerate. commit 24b4cf66a626566e7903813a2e0156778f4903f9 Author: Szabolcs Nagy Date: Tue Jun 16 13:35:33 2015 +0100 Fixes a compile time warnng about left shifting a negative value. * arm-dis.c (print_insn_coprocessor): Avoid negative shift. commit 95855ca82ec3ced28916922d663106e61ce593b4 Author: Martin Simmons Date: Tue Jun 16 09:32:47 2015 +0100 Fix compilation of gdb/arm-linux-nat.c on Raspbian GNU/Linux 7 GDB trunk fails to compile on Raspbian GNU/Linux 7 because PTRACE_GETREGSET and PTRACE_SETREGSET are not defined in sys/ptrace.h. gcc -g -O2 -I. -I. -I./common -I./config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I./../zlib -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wpointer-sign -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral -Werror -c -o arm-linux-nat.o -MT arm-linux-nat.o -MMD -MP -MF .deps/arm-linux-nat.Tpo arm-linux-nat.c arm-linux-nat.c: In function 'fetch_fpregister': arm-linux-nat.c:103:21: error: 'PTRACE_GETREGSET' undeclared (first use in this function) arm-linux-nat.c:103:21: note: each undeclared identifier is reported only once for each function it appears in arm-linux-nat.c: In function 'fetch_fpregs': arm-linux-nat.c:144:21: error: 'PTRACE_GETREGSET' undeclared (first use in this function) arm-linux-nat.c: In function 'store_fpregister': arm-linux-nat.c:184:21: error: 'PTRACE_GETREGSET' undeclared (first use in this function) arm-linux-nat.c:211:21: error: 'PTRACE_SETREGSET' undeclared (first use in this function) ... This patch includes the gdb header file nat/linux-ptrace.h, which provides fallback definitions. 2015-06-16 Martin Simmons (tiny patch) * arm-linux-nat.c: Include nat/linux-ptrace.h. commit 1d5c94cb3e2e312fc37e7841d17ea98a02f0412c Author: Alan Modra Date: Tue Jun 16 16:47:51 2015 +0930 ppc476 linker workaround shared lib fixes again Huh, I can't even write a binary search properly. bfd/ * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of dynamic relocs. ld/testsuite/ * ld-powerpc/ppc476-shared.s: Repeat dynamic reloc generating insns. * ld-powerpc/ppc476-shared.d: Update. * ld-powerpc/ppc476-shared2.d: Update. commit dd9bdb04c7ca31c4ca14e2aaf244d4a492d9d9b3 Author: GDB Administrator Date: Tue Jun 16 00:00:08 2015 +0000 Automatic date update in version.in commit cfc32360afdc8605b2dd2062e857313e62c40e30 Author: Simon Marchi Date: Mon Jun 15 15:50:31 2015 -0400 MI: consider addressable unit size when reading/writing memory As a user of the target memory read/write interface, the MI code must adjust its memory allocations to take into account the addressable memory unitsize of the target. gdb/ChangeLog: mi/mi-main.c (mi_cmd_data_read_memory_bytes): Consider byte size. (mi_cmd_data_write_memory_bytes): Same. commit a86c90e6ba808e997f87f0287d9f01ba8d3e904e Author: Simon Marchi Date: Mon Jun 15 15:31:00 2015 -0400 Clarify doc about memory read/write and non-8-bits addressable memory unit sizes New in v3: * Change RSP documentation as well. The m, M and X packets now use lengths in addressable memory units. New in v2: * Change wording: use byte for 8-bits chunks and addressable memory unit for the unit of data associated to a single address. * Introduce definition of addressable memory unit in the Memory section. This patch modifies the manual to clarify the MI, RSP and Python APIs in regard to reading/writing memory on architectures with addressable memory unit that are not 8 bits. Care is taken to use the word "addressable memory unit" or "memory unit" when referring to one piece of the smallest addressable size on the current architecture and the word "byte" when referring to an 8-bits data piece. For MI, -data-{read,write}-memory are not modified, since they are deprecated. gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Data Manipulation): Clarify usage of bytes and memory units for -data-{read,write}-memory-bytes. (Packets): Same for m, M and X packets. * python.texi (Inferiors In Python): Same for read_memory and write_memory. commit cb6f16cf4f7a12f9aadddc0451d47f0511729c8d Author: Simon Marchi Date: Mon Jun 15 13:34:47 2015 -0400 Cleanup write_memory doc This doc about write_memory seems outdated. gdb/ChangeLog: * corefile.c (write_memory): Update doc. * gdbcore.h (write_memory): Same. commit 31b7833d205031b52996982f5da025d60c6e052f Author: Jan Kratochvil Date: Mon Jun 15 17:10:44 2015 +0200 Code cleanup: Rename enum -> enum filterflags Bit mask ints are better to make enums as GDB already has support to automatically decode them: before this patch: (gdb) p filterflags $1 = 51 (gdb) p/x filterflags $2 = 0x33 after this patch: (gdb) p filterflags $1 = (COREFILTER_ANON_PRIVATE | COREFILTER_ANON_SHARED | COREFILTER_ELF_HEADERS | COREFILTER_HUGETLB_PRIVATE) gdb/ChangeLog 2015-06-15 Jan Kratochvil * linux-tdep.c (enum filterflags): Make it from anonymous enum. (dump_mapping_p): Use it for parameter filterflags. (linux_find_memory_regions_full): Use it for variable filterflags. commit 909c2cdaa78f5c33ce61a3b47e86f831025d0a02 Author: Jan Kratochvil Date: Mon Jun 15 17:08:49 2015 +0200 Merge multiple hex conversions gdb/ChangeLog 2015-06-15 Aleksandar Ristovski Merge multiple hex conversions. * monitor.c: Include rsp-low.h. (fromhex): Remove definition. gdb/gdbserver/ChangeLog 2015-06-15 Aleksandar Ristovski Merge multiple hex conversions. * gdbreplay.c (tohex): Rename to 'fromhex'. (logchar): Use fromhex. commit 03aef70fecec83e109c65337a59600ad36def6bf Author: Jan Kratochvil Date: Mon Jun 15 17:04:56 2015 +0200 Move utility functions to common/ gdb/ChangeLog 2015-06-15 Aleksandar Ristovski Move utility functions to common/. * cli/cli-utils.c (skip_spaces, skip_spaces_const, skip_to_space_const): Move defs to common/common-utils.c. * cli/cli-utils.h (skip_spaces, skip_spaces_const, skip_to_space) (skip_to_space_const): Move decls to common/common-utils.h. * common/common-defs.h: Move include of common-types.h before common-utils.h. * common/common-utils.c: Include host-defs.h and ctype.h. (HIGH_BYTE_POSN, is_digit_in_base, digit_to_int, strtoulst): Move from utils.c. (skip_spaces, skip_spaces_const, skip_to_space_const): Move from cli/cli-utils.c. * common/common-utils.h (strtoulst): Move decl from utils.h. (skip_spaces, skip_spaces_const, skip_to_space, skip_to_space_const): Move from cli/cli-utils.h. * common/host-defs.h: Include limits.h. (TARGET_CHAR_BIT, HOST_CHAR_BIT): Moved from defs.h. (skip_spaces, skip_spaces_const): Move decls from cli/cli-utils.h. * defs.h (TARGET_CHAR_BIT, HOST_CHAR_BIT): Move to common/common-utils.h. * utils.c (HIGH_BYTE_POSN, is_digit_in_base, digit_to_int) (strtoulst): Move to common/common-utils.c. * utils.h (strtoulst): Moved decl to common/common-utils.h. commit d1168cc1a9825b96747440b0bd1f82c4498e6343 Author: Yao Qi Date: Mon Jun 15 12:41:09 2015 +0100 Copy aarch64-linux.xml to build tree. This patch fixes a bug that aarch64-linux.xml isn't copied to the build tree, so that some tests catch-syscall.exp fail. gdb: 2015-06-15 Yao Qi * data-directory/Makefile.in (SYSCALLS_FILES): Add aarch64-linux.xml. commit 1e5338b6e7405acdd1e1d0eab46682bd1af007d5 Author: Ulrich Weigand Date: Mon Jun 15 13:49:43 2015 +0200 Fix ChangeLog entry. commit c74f7d1c6c5a968330208757f476c67a4bb66643 Author: Jon Turney Date: Tue Apr 7 20:49:08 2015 +0100 Allow gdb to find debug symbols file by build-id for PE file format also This promotes BFD's struct elf_build_id to the generic struct bfd_build_id, populated when an ELF or PE BFD is read. gdb is updated to use that, and to use the build-id to find symbols for PE files also. There is currently no generic way to extract the build-id from an object file, perhaps an option to objdump to do this might make sense? On x86_64-pc-cygwin, gdb's sepdebug.exp changes: -# of unsupported tests 1 +# of expected passes 90 I don't seem to get consistent testsuite runs on i686-linux-gnu, but there don't appear to be any regressions. bfd/ChangeLog: 2015-06-10 Jon Turney * elf-bfd.h : Remove struct elf_build_id. * bfd.c : Add struct bfd_build_id. * bfd-in2.h: Regenerate. * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id. * libpei.h: Add protoype and macros for bfd_XXi_slurp_codeview_record. * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public * peicode.h (pe_bfd_read_buildid): Add. (pe_bfd_object_p): Use pe_bfd_read_buildid(). gdb/ChangeLog: 2015-06-10 Jon Turney * build-id.c: Don't include elf-bfd.h. (build_id_bfd_get): Use bfd_build_id. (build_id_verify): Ditto. * build-id.h: Ditto. (find_separate_debug_file_by_buildid): Ditto. * python/py-objfile.c: Don't include elf-bfd.h. (objfpy_get_build_id) Use bfd_build_id. (objfpy_build_id_matches, objfpy_lookup_objfile_by_build_id): Ditto. * coffread.c: Include build-id.h. (coff_symfile_read): Try find_separate_debug_file_by_buildid. gdb/doc/ChangeLog: 2015-06-10 Jon Turney * gdb.texinfo (Separate Debug Files): Document that PE is also supported. gdb/testsuite/ChangeLog: 2015-06-10 Jon Turney * gdb.base/sepdebug.exp: Add EXEEXT where needed. * lib/gdb.exp (get_build_id): Teach how to extract build-id from a PE file. * lib/future.exp (gdb_find_objdump): Add gdb_find_objdump. Signed-off-by: Jon Turney commit f20c58f51f5735d1ba49efadc86b3ec67631410e Author: Jon Turney Date: Wed Jun 3 13:58:45 2015 +0100 windows-nat: Replace __COPY_CONTEXT_SIZE conditional with __CYGWIN__ Replace __COPY_CONTEXT_SIZE conditional with __CYGWIN__ __COPY_CONTEXT_SIZE was added to Cygwin's headers in 2006. Versions of Cygwin which don't define __COPY_CONTEXT_SIZE are long obsolete. Also see the thread starting at https://sourceware.org/ml/gdb-patches/2015-03/msg00989.html for some discussion Note that __COPY_CONTEXT_SIZE should just be sizeof(CONTEXT) (which is a platform constant), but isn't due to historical mistakes in Cygwin headers. gdb/ChangeLog: 2015-06-03 Jon Turney * windows-nat.c (do_windows_fetch_inferior_registers) (handle_output_debug_string): Replace __COPY_CONTEXT_SIZE conditional with __CYGWIN__. Signed-off-by: Jon Turney commit 87f5fbcc7aa49cee13e9ed44587b80d695d7e781 Author: Renlin Li Date: Mon Jun 15 11:07:37 2015 +0100 [AArch64] Gas add BFD_RELOC_AARCH64_LD64_GOTOFF_LO15 support 2015-06-15 Renlin Li bfd/ * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_LD64_GOTOFF_LO15. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. gas/ * config/tc-aarch64.c (reloc_table): New relocation modifier. (md_apply_fix): Support BFD_RELOC_AARCH64_LD64_GOTOFF_LO15. (aarch64_force_relocation): Ditto gas/testsuite/ * gas/aarch64/reloc-insn.s: Update test * gas/aarch64/reloc-insn.d: Update expected result. commit a2a4d60d831e40350d96edd2f1cd55f430d04fd4 Author: Nick Clifton Date: Mon Jun 15 09:25:26 2015 +0100 Fix a segmentation fault triggered when trying to handle an unresolved PE symbol with a very long name. PR ld/18466 * emultempl/pe.em (pe_find_data_imports): Generate an error if a symbol name is too long to handle. * emultempl/pep.em (pep_find_data_imports): Likewise. commit d025d5e5b57fb59c56aa4d57b7fc138720a8e454 Author: Mark Wielaard Date: Sat Jun 13 17:47:41 2015 -0400 gas: Don't use frag_align but use plain padding to align .debug_aranges. out_debug_aranges uses frag_align to make sure the addresses start out aligned. Using frag_align will call frag_var[_init], which will end up calling TC_FRAG_INIT. On arm and aarch64 TC_FRAG_INIT will generate a $d mapping symbol for the .debug_aranges to show that at that point a sequence of data items starts. Such a symbol pointing into a non-allocated debug section will confuse eu-strip -g. And it seems inefficient and wrong in general to have additional mapping symbols for debug sections, which won't contain actual code in the first place. Just keep track of the aranges header size and use plain padding to align the addresses which avoids generating any mapping symbols on aarch64 and arm. Includes a testcase for aarch64 that PASS with this patch and shows the extra $d mapping symbol in .debug_aranges before. gas/ChangeLog * dwarf2dbg.c (out_header): Document EXPR->X_add_number value, out_debug_aranges depends on it. (out_debug_aranges): Track size of header to properly pad header for address alignment. gas/testsuite/ChangeLog * gas/aarch64/dwarf.d: New. * gas/aarch64/dwarf.s: New. commit 3a062fa1eeee8296dece36a9bb7ecc8d4500de18 Author: Alan Modra Date: Tue Jun 9 14:14:41 2015 +0930 DJGPP port of binutils broken due to 64 bit cygwin fix * cofflink.c (_bfd_coff_generic_relocate_section): Revert 2014-03-26 change. Call _bfd_clear_contents for relocs against local and global symbols defined in discarded input sections. commit 17b9af13f5943872cd33a559bb5dd0de95d1b04c Author: GDB Administrator Date: Mon Jun 15 00:00:08 2015 +0000 Automatic date update in version.in commit ebfe52f99cf11c847ca2aea544f7b8d2206a4df4 Author: GDB Administrator Date: Sun Jun 14 00:00:08 2015 +0000 Automatic date update in version.in commit 51f0e40d6502cb873d8120f8bbd5a345db1c5914 Author: Andrew Burgess Date: Tue May 26 23:23:23 2015 +0100 gdb: Rework command completion on 'tui reg'. We previously specified a few known register groups for the 'tui reg' command. Other register groups could be accessed, but only by using the 'tui reg next' command and cycling through all the groups. This commit removes the hard coded sub-commands of 'tui reg' and instead adds dynamic completion of sub-commands based on the architecturally defined register groups, giving immediate access to all available register groups. There is still the 'next' and 'prev' commands for cycling through the register groups if that's wanted. The new code maintains the ability to only enter partial names for register groups, which is something we got for free when using the standard sub-command mechanism. The register (and register group) completer has been changed to use get_current_arch rather than using the architecture of the currently selected frame. When the target is running, this is equivalent, however, when the target is not running, using get_current_arch will provide results from the default architecture. gdb/ChangeLog: * completer.c: Add arch-utils.h include. (enum reg_completer_targets): New enum. (reg_or_group_completer_1): New function containing old reg_or_group_completer, add and use new parameter to control what is completed on. Use get_current_arch rather than architecture of currently selected frame. (reg_or_group_completer): Call new reg_or_group_completer_1. (reggroup_completer): Call new reg_or_group_completer_1. * completer.h (reggroup_completer): Add declaration. * tui/tui-regs.c: Add 'completer.h' include. (tui_reg_next_command): Renamed to... (tui_reg_next): ...this. Adjust parameters and return rather than display new group. (tui_reg_prev_command): Renamed to... (tui_reg_prev): ...this. Adjust parameters and return rather than display new group. (tui_reg_float_command): Delete. (tui_reg_general_command): Delete. (tui_reg_system_command): Delete. (tui_reg_command): Rewrite to perform switching of register group. Add header comment. (tuireglist): Remove. (tui_reggroup_completer): New function. (_initialize_tui_regs): Remove 'tui reg' sub-commands, update creation of 'tui reg' command. * NEWS: Add comment about 'tui reg' changes. gdb/doc/ChangeLog: * gdb.texinfo (TUI Commands): Bring all 'tui reg' commands into a single table entry. commit 644dbd876c3f39eb1279cec5680e52fa20bb9ac3 Author: GDB Administrator Date: Sat Jun 13 00:00:08 2015 +0000 Automatic date update in version.in commit 2f0c79aa61e82cbc5da4b9ab399362b2cdd8ea2e Author: Han Shen Date: Wed Jun 10 14:50:26 2015 -0700 [gold][aarch64] Fix erratum 835769. gold/ChangeLog: * aarch64.cc (AArch64_insn_utilities::BYTES_PER_INSN): Move defintion outside class definition. (AArch64_insn_utilities::AARCH64_ZR): New static constant. (AArch64_insn_utilities::aarch64_op31): New member. (AArch64_insn_utilities::aarch64_ra): New member. (AArch64_insn_utilities::aarch64_mac): New member. (AArch64_insn_utilities::aarch64_mlxl): New member. (ST_E_835769): New global enum member. (Stub_table::relocate_stubs): Add 835769 handler. (Stub_template_repertoire::Stub_template_repertoire): Install new stub type. (AArch64_relobj::scan_errata): This func is renamed from scan_erratum_843419. (AArch64_relobj::do_count_local_symbols): Add 835769 handler. (AArch64_relobj::do_relocate_sections): Add 835769 handler. (AArch64_relobj::scan_sections_for_stubs): Add 835769 handler. (Target_aarch64::scan_erratum_835769_span): New method. (Target_aarch64::create_erratum_stub): New method. (Target_aarch64::is_erratum_835769_sequence): New method. (Target_aarch64::scan_erratum_843419_sequence): Move part of the code into create_erratum_stub. * options.h (fix_cortex_a53_835769): New option. commit d309493c38fcef624f6f85aee4aa37f4f9e3e62a Author: Simon Marchi Date: Fri Jun 12 17:02:44 2015 -0400 target: consider addressable unit size when reading/writing memory If we are reading/writing from a memory object, the length represents the number of "addresses" to read/write, so the addressable unit size needs to be taken into account when allocating memory on gdb's side. gdb/ChangeLog: * target.c (target_read): Consider addressable unit size when reading from a memory object. (read_memory_robust): Same. (read_whatever_is_readable): Same. (target_write_with_progress): Consider addressable unit size when writing to a memory object. * target.h (target_read): Update documentation. (target_write): Add documentation. commit 3374165f51fa3cc3ce1b1bf8c72293464da9d511 Author: Simon Marchi Date: Fri Jun 12 16:51:51 2015 -0400 gdbarch: add addressable_memory_unit_size method Add a new gdbarch method to get the length of an addressable memory unit for a given architecture. The default implementation returns 1. gdb/ChangeLog: * arch-utils.h (default_addressable_memory_unit_size): New. * arch-utils.c (default_addressable_memory_unit_size): New. * gdbarch.sh (addressable_memory_unit_size): New. * gdbarch.h: Re-generate. * gdbarch.c: Re-generate. commit 99a2c56121247207d4846fe7e28b5e7e18e0bfa0 Author: Peter Bergner Date: Fri Jun 12 15:06:07 2015 -0500 Remove unused MTMSRD_L macro and re-add accidentally deleted comment. In the commit that added PowerPC Pair Singles, Ben accidentally removed a comment and re-added an unused MTMSRD_L macro Alan had recently deleted. This was probably just an oversite when he was refreshing his patch to trunk. opcodes/ * ppc-opc.c: Add comment accidentally removed by old commit. (MTMSRD_L): Delete. commit 279a6fed95275b480d50f6f1d80a4f3970a9c5bc Author: Simon Marchi Date: Fri Jun 12 13:08:12 2015 -0400 Various cleanups in target read/write code This contains various cleanups in the target memory read and write code. They are not directly related to the non-8-bits changes, but they clarify things a bit down the line. gdb/ChangeLog: * target.c (target_read): Rename variables and use TARGET_XFER_E_IO. (target_read_with_progress): Same. (read_memory_robust): Constify parameters and rename variables. (read_whatever_is_readable): Constify parameters, rename variables, adjust formatting. * target.h (read_memory_robust): Constify parameters. commit aaa9dc0170d5a2c09712f65f38dd308e7cfd4df0 Author: Mike Frysinger Date: Fri Jun 12 12:12:52 2015 -0400 sim: bfin: expand CB_SYS_xxx comment commit 306f4178efa1851c411438aea39ddc553bc3070d Author: Mike Frysinger Date: Fri Jun 12 12:04:42 2015 -0400 sim: update configure.in->configure.ac docs A few places still refer to the configure.in file; update them. commit a1da2672bdc5adc551ad30d73eccea902063f583 Author: Ulrich Weigand Date: Fri Jun 12 17:43:48 2015 +0200 ppc64: Handle short vectors as function return types Short synthetic vector types (i.e. those defined using GCC's attribute ((vector_size)) instead of AltiVec vector types) are returned in r3. Fix ppc64_sysv_abi_return_value to correctly handle this. gdb/ChangeLog: * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value_base): Handle short synthetic (non-AltiVec) vector types. (ppc64_sysv_abi_return_value): Likewise. commit a34870829162e3276a9e0152efe2c7de5677a0c3 Author: Mike Frysinger Date: Fri Jun 12 10:32:54 2015 -0400 sim: drop -DTRACE from configure No code uses this anymore and the symbol conflicts with the new TRACE helper. Punt it from configure. commit 5b064994f0e7d8a7bfa0b4b080a360ecd9d2af82 Author: Mike Frysinger Date: Fri Jun 12 19:52:55 2015 +0545 sim: msp430: use new common trace print helpers Replace the "if (TRACE_xxx_P) trace_generic" form with "TRACE_xxx". The output is the same, but the code is nicer to read. commit 98aa42ee02c56378cecb737d01c27adca36bf48f Author: Antoine Tremblay Date: Fri Jun 12 07:58:47 2015 -0400 Fix MI dprintf-insert not printing on a resolved pending location. This patch fixes the "Format string required" error when trying to print a dprintf on a now resolved, pending location when set via the MI interface even if the format string is entered correctly. This patch also adds a test case to check that issue called mi-dprintf-pending.exp. gdb/ChangeLog: PR breakpoints/16465 * breakpoint.c (create_breakpoint): Save extra_string for pending breakpoints. gdb/testsuite/ChangeLog: PR breakpoints/16465 * gdb.mi/mi-dprintf-pending.c: New file. * gdb.mi/mi-dprintf-pending.exp: New test. * gdb.mi/mi-dprintf-pendshr.c: New file. commit 0054dcd7b6a815ce178c464f7a1b7e7fce7df3e4 Author: Mike Frysinger Date: Fri Jun 12 15:38:03 2015 +0545 sim: moxie: use new common trace defines Now that there's common helpers for printing trace data, switch to that to restore the insn tracing support for this target. commit bb11f3ed2bd9eeddca84cc3a80c3643ddae517f3 Author: Mike Frysinger Date: Thu Jun 11 18:28:25 2015 +0800 sim: trace: add common macros for logging info The Blackfin port had some TRACE_xxx macros for easily logging trace data. Use these as a base for common ones that have a simple form and match the existing sets of helper macros. commit 29bc024d07fe480cd37f36097f23d5585b15e71c Author: Mike Frysinger Date: Fri Jun 12 15:51:35 2015 +0545 sim: mips: switch to common WITH_TRACE_ANY_P We want to add new common trace helpers including "TRACE", so change the mips one to the new WITH_TRACE_ANY_P macro since they do the same thing. commit bffcfec8c3a15b669579b67d5b626c4d14b2b6df Author: Mike Frysinger Date: Fri Jun 12 15:52:07 2015 +0545 sim: trace: add WITH_TRACE_ANY_P helper We have STRACE_ANY_P and TRACE_ANY_P, so add WITH_TRACE_ANY_P to fill out the API. This lets us wrap the internal configure symbol. commit 53d2389fd01ea7eaa83bb2727efd64c9904951ec Author: Mike Frysinger Date: Fri Jun 12 15:36:32 2015 +0545 sim: moxie: rename TRACE to MOXIE_TRACE_INSN We want to add new common trace helpers including "TRACE", so rename the moxie one to MOXIE_TRACE_INSN. This also matches what the code is doing. commit 3604cb1f8ca4a926039a9540d03bb224d84af3e1 Author: Tristan Gingold Date: Fri Jun 5 15:09:31 2015 +0200 Add new ld option: --print-memory-usage ld/ * NEWS: Mention new option. * lexsup.c (parse_args): Handle --print-memory-usage. (ld_options): Add --print-memory-usage. * ldmain.c (main): Call lang_print_memory_usage. * ldlex.h (enum option_values): Add OPTION_PRINT_MEMORY_USAGE. * ldlang.h: Add prototype of lang_print_memory_usage. * ldlang.c (lang_print_memory_size, lang_print_memory_usage): New functions. * ld.texinfo (Options): Document --print-memory-usage. * ld.h (args_type): Add print_memory_usage field. ld/testsuite/ * ld-scripts/print-memory-usage-1.t, * ld-scripts/print-memory-usage-1.s, * ld-scripts/print-memory-usage-1.l, * ld-scripts/print-memory-usage-2.t, * ld-scripts/print-memory-usage-2.l, * ld-scripts/print-memory-usage-3.s, * ld-scripts/print-memory-usage-3.t, * ld-scripts/print-memory-usage-3.l, * ld-scripts/print-memory-usage.t: New tests. * ld-scripts/print-memory-usage.exp: Run them. commit db7858e227f3951c665410314fca62c77349ac24 Author: Mike Frysinger Date: Fri Jun 12 13:29:02 2015 +0545 sim: cgen: namespace custom trace functions The cgen code declares some macros/funcs using the trace_xxx prefix, but the code isn't generic and only works with cgen targets. This is blocking the creation of new common trace functions. Let's blindly add cgen_xxx prefixes to all these symbols. Some already use this convention to avoid conflicts, so it makes sense to align them. In the future we might want to move some to the common trace core, but one thing at a time. commit 966f0aefa6a96df2c45ec36a7ecc02419e3842db Author: Walfred Tedeschi Date: Fri Jun 12 09:42:16 2015 +0200 Fix broken GDB build after adding Bound table support for i386. Types used for some variables could not be used for 32 bits, causing a compilation failure. This patch adds a cast to force a quite compilation, but at the same time it bails out in the case that the cast performed is not safe, i.e. in the case where the debuggee is 64bit and debugger is 32bit. Documentation was also affected, once a different version of texinfo the docs could not be build. 2015-06-10 Walfred Tedeschi * i386-tdep.c (i386_mpx_get_bt_entry): Add a cast for mpx_bd_mask and bt_mask to CORE_ADDR. doc: * gdb.textinfo (i386): Fix "@end table" end and "@table" placement. commit 5c4f4e4a8a774318fd49f6002a002836e4d61197 Author: GDB Administrator Date: Fri Jun 12 00:00:07 2015 +0000 Automatic date update in version.in commit 18c208b2292f3c61097dee99053ecab78b393e46 Author: John David Anglin Date: Thu Jun 11 18:50:39 2015 -0400 tc-hppa.c: Speed up search for last label commit 5d7908e0880030628536a0266968a15922574735 Author: Cary Coutant Date: Thu Jun 11 13:19:38 2015 -0700 Fix gold build error at -O0. In aarch64.cc, Erratum_stub::STUB_ADDR_ALIGN and Reloc_stub::STUB_ADDR_ALIGN are declared as static const int, and initialized in the class body. These values are referenced from outside the class body, and with no optimization, the references go unresolved. gold/ * aarch64.cc (Erratum_stub::STUB_ADDR_ALIGN): Move initialization outside class body. (Reloc_stub::STUB_ADDR_ALIGN): Likewise. commit dd68f8fa8e2412c5c16380871d8ac5e40909aef6 Author: Cary Coutant Date: Thu Jun 11 10:17:04 2015 -0700 Fix bug where SECTIONS clause does not handle compressed debug sections. When laying out .debug_* sections, we translate the names of compressed debug sections that start with ".zdebug", but when processing input section specs in a linker script, we do not handle the translation there. This results in an internal error as reported in PR 17731. gold/ PR gold/17731 * layout.cc (corresponding_uncompressed_section_name): New function. (Layout::choose_output_section): Call it. * layout.h (corresponding_uncompressed_section_name): New function. * script-sections.cc (Input_section_info::set_section_name): Check for compressed debug section (.zdebug style). commit a3a0c39166742c9ef9bb5d87ab51320b7f62cb92 Author: Jing Yu Date: Thu Jun 11 12:41:36 2015 -0700 Fix broken gold/testsuite/script_test_12 in some setup. This patch adds -O0 to gold script_test_12 test, hoping that compiler won't change the order of globel variables that the test assumes. Changelog: testsuite/Makefile.am: Add -O0 to compile script_test_12 test. testsuite/Makefile.in: Regenerate. commit c1d8560ea5721191e30e2fcad720345730918497 Author: Mike Frysinger Date: Thu Jun 11 21:53:11 2015 +0545 sim: msp430: delete unused trace macros These macros were copied from the Blackfin port but never used, so delete them as part of the trace unification work. commit 83034798de7d11d2e26b3760e26b2c9cadec9fd4 Author: Mike Frysinger Date: Wed Jun 10 18:02:52 2015 +0800 sim: trace: centralize the system tracing First we convert the ETRACE_P to STRACE_EVENTS_P. This means we move from using the sim_events.trace storage to the common sim_state_base.trace_data array. With that deleted, the common trace init code can be simplified so the sim state works the same as the sim cpu. commit ce4eda4a58d4634577cf998b928572bed6779246 Author: Mike Frysinger Date: Wed Jun 10 18:00:09 2015 +0800 sim: trace: add STRACE_xxx_P macros These are the parallel to the TRACE_xxx_P macros and fill out the full set to match the existing debug one. commit a6c2a374e05770dd7469e050f5d6603e3f034f17 Author: Mike Frysinger Date: Wed Jun 10 16:01:29 2015 +0800 sim: trace: use existing defines for the useful mask No point in duplicating the shift logic when we have macros already to keep that all unified. commit 9b9c712cebc08f4242fdcf3b12c057f57bd1b589 Author: Mike Frysinger Date: Wed Jun 10 15:58:03 2015 +0800 sim: trace: create a common WITH_TRACE_P macro This way we can use the IDX macros everywhere and not worry about the encoding of the WITH_TRACE define in multiple places. commit 66a19e2f815060e69d2e38f9319ed827fce67399 Author: Mike Frysinger Date: Wed Jun 10 15:54:16 2015 +0800 sim: frv: drop custom debug mask This is the only sim that sets up its own WITH_TRACE mask and it conflicts with the user setting their own list at configure time. Drop it to match all the other sims. commit 09896bd2234218a8ff3617e1043a1e72da2587f6 Author: Mike Frysinger Date: Tue Jun 9 23:44:25 2015 +0800 sim: m68hc11: delete unused interrupt_names The interrupts.c file has a static/fuller definition that is used, so drop this copy in interp.c. commit a84f8df0e2027400910e339824444dc45ba6e4f4 Author: Mike Frysinger Date: Tue Jun 9 23:44:13 2015 +0800 sim: m68hc11: switch to common sim_resume This code already matched the common sim reusme logic, so we can simply drop it and pull in the common code. commit 926b1cd8cffbcd8cf2d37e779463a4e7e696f73b Author: Mike Frysinger Date: Tue Jun 9 23:38:15 2015 +0800 sim: mn10300: delete unused memory code Only one place used get_word/put_word, so inline the usage there. All the rest is dead code so trim it. commit 6449ed0d3a78ba8c25e8a634f8d6ed120a4cac7f Author: Gary Benson Date: Thu Jun 11 13:38:15 2015 +0100 Use pulongest for printing ssize_t This commit changes the debug printing code in linux-namespaces.c to use pulongest instead of "%ld". gdb/ChangeLog: * nat/linux-namespaces.c (mnsh_send_message): Use pulongest. (mnsh_recv_message): Likewise. commit 34f8ac9f490fc38a07d03ec8e425c06a2bb737b2 Author: Walfred Tedeschi Date: Thu Jun 11 13:48:26 2015 +0200 Fix ARI new warnings introduced in i386-tdep.c. 1. gdb/i386-tdep.c:8720: Do not use 'long long', instead use LONGEST gdb/i386-tdep.c:8720: long long int size; 2. gdb/i386-tdep.c:8755: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value gdb/i386-tdep.c:8755: ui_out_field_fmt (uiout, "size", "%lld", size); 2015-06-11 Walfred Tedeschi * i386-tdep.c (i386_mpx_print_bounds): use of LONGEST instead of long long int and plongest instead of %ll. Signed-off-by: Walfred Tedeschi commit 2cc78d4dd7cb533024eab3a59fb278e03fb51c87 Author: Mike Frysinger Date: Tue Jun 9 22:31:51 2015 +0800 sim: mn10300: add missing static markings commit 96eaf29ec4df2f81be180cfeabdb9b26492e8264 Author: Mike Frysinger Date: Tue Jun 9 22:27:09 2015 +0800 sim: mn10300: delete unused exception/exited/debug state The syscall path was the only code checking the custom exception state after recent cleanups. Once we change that to the common engine halt function, we can delete that state entirely. This also helps highlight some other dead code that we can cull. commit b0e4c8a581c689da0c3e7319c03a8cc60d64a2f2 Author: Mike Frysinger Date: Tue Jun 9 23:23:41 2015 +0800 sim: mn10300: use common size types No point in open coding this logic here when we have common size types already that give the right answer. commit 5d19c36612c6b08627280bb0063ad1222b0a92dd Author: Mike Frysinger Date: Tue Jun 9 22:26:16 2015 +0800 sim: m68hc11/mn10300/v850: delete redundant INLINE defines The sim-inline.h header already takes care of this for us, so punt the local definitions. commit 31557eccb23b478e049b5eb7db3cb144c6533ee5 Author: Mike Frysinger Date: Tue Jun 9 16:10:49 2015 +0800 sim: microblaze: switch to common sim_resume/sim_stop_reason This allows us to use the common code for all exception handling. commit 198c808c87eac2d4605962c2f19191c8ca24d268 Author: Gary Benson Date: Thu Jun 11 10:58:41 2015 +0100 Fix ARI warning in linux-namespaces.c This commit fixes the following ARI warning: gdb/nat/linux-namespaces.c:28: regression: Do not include wait.h or sys/wait.h, instead include gdb_wait.h gdb/ChangeLog: * nat/linux-namespaces.c (gdb_wait.h): New include. (sys/wait.h): Do not include. commit 970cdef2612b098b457345025a08aba800991722 Author: Davide Italiano Date: Sun May 31 13:22:11 2015 -0700 [GOLD] Fix handling of __start/__stop symbols If the section contains 'Q' in the name, is_cident() returns false, __start and __stop symbols for the section are not generated.. * gold.h (is_cident): Correct typo. commit 6e737c31868eb2cc6b56ebdd5a0497a39d53e622 Author: GDB Administrator Date: Thu Jun 11 00:00:07 2015 +0000 Automatic date update in version.in commit e815d2d2714a395d11abb350eff385931257ed9a Author: Simon Marchi Date: Wed Jun 10 16:34:16 2015 -0400 dwarf2read: call dwarf_finish_line when ending a sequence Commit d9b3de22f33e400f7f409cce3acf6c7dab07dd79 introduced a behaviour change where dwarf_finish_line was not called anymore when ending a sequence of machine instructions. This patch restores the original behaviour. gdb/ChangeLog: * dwarf2read.c (dwarf_record_line): Call dwarf_record_line if end_sequence is true. commit 8847cac2f7ce6ff2c13fa611660c2dfc59c78272 Author: Jan Kratochvil Date: Wed Jun 10 19:37:19 2015 +0200 Code cleanup: Use explicit NULL comparison gdb/ChangeLog 2015-06-10 Jan Kratochvil Code cleanup. * solib-target.c (library_list_start_list): Use explicit NULL comparison. commit a48d0c12f893a922692492829f04189d9f216172 Author: Han Shen Date: Wed Jun 10 09:50:22 2015 -0700 Patch for erratum-843419 (2 of 2 - fix erratum occurrences). Now fixing for 843419 is fully functional. The first part of the erratum fix CL is here - https://sourceware.org/ml/binutils/2015-04/msg00229.html gold/ChangeLog 2015-06-10 Han Shen * aarch64.cc(global enum): New constants representing stub types. (Stub_template): New POD struct. (Stub_template_repertoire): New class. (Stub_base): New class. (Erratum_stub): New class. (Reloc_stub): Refactored to be a subclass of Stub_base. (Reloc_stub::Stub_type): Removed. (Reloc_stub::offset): Moved to Stub_base. (Reloc_stub::set_offset): Moved to Stub_base. (Reloc_stub::destination_address): Moved to Stub_base. (Reloc_stub::set_destination_address): Moved to Stub_base. (Reloc_stub::reset_destination_address): Moved to Stub_base. (Reloc_stub::stub_type): Renamed and moved to Stub_base. (Reloc_stub::stub_size): Renamed and moved to Stub_base. (Reloc_stub::stub_insns): Renamed and moved to Stub_base. (Reloc_stub::write): Moved to Stub_base. (Reloc_stub::invalid_offset): Moved to Stub_base. (Reloc_stub::invalid_address): Moved to Stub_base. (Reloc_stub::stub_type_): Renamed and moved to Stub_base. (Reloc_stub::stub_insns_): Moved to Stub_base. (Reloc_stub::offset_): Moved to Stub_base. (Reloc_stub::destination_address_): Moved to Stub_base. (Stub_table::The_aarch64_relobj): New typedef. (Stub_table::The_erratum_stub): New typedef. (Stub_table::The_erratum_stub_less): New typedef. (Stub_table::The_erratum_stub_set): New typedef. (Stub_table::The_erratum_stub_set_iter): New typedef. (Stub_table::empty): Added emptiness testing for erratum stubs. (Stub_table::add_erratum_stub): New method to add an erratum stub. (Stub_table::find_erratum_stub): New method. (Stub_table::find_erratum_stubs_for_input_section): New method. (Stub_table::erratum_stub_address): New method. (Stub_table::update_date_size_changed_p): Modified to handle erratum stubs. (Stub_table::do_addralign): Modified to handle erratum stubs. (Stub_table::erratum_stubs_): New member. (Stub_table::erratum_stub_size_): New member. (Stub_table::relocate_stubs): Modified to handle erratum stubs. (Stub_table::do_write): Modified to handle erratum stubs. (AArch64_relobj::The_erratum_stub): New typedef. (AArch64_relobj::Erratum_stub_set_iter): New typedef. (AArch64_relobj::fix_errata): New method. (Target_aarch64::The_reloc_stub_type): Removed. (Target_aarch64::The_erratum_stub): New typede. (AArch64_relocate_functions::construct_b): New method. commit 24c05f46059182f0c8768c6ebbb66b4ca3233ecc Author: Jan Kratochvil Date: Wed Jun 10 18:29:05 2015 +0200 Fix gdbserver and its #FIXED version="1.0" While reimplementing I found from expat-2.0.1-11.fc15.x86_64: warning: while parsing target library list (at line 1): Required attribute "version" of not specified I believe the same bug has to apply for existing FSF gdbserver but I do not have any platform to test it (I did not try to build MinGW). features/library-list.dtd: http://www.xml.com/pub/a/98/10/guide0.html?page=3 says: In this case, the attribute is not required, but if it occurs, it must have the specified value. Which would suggest gdbserver is right but solib-target.c is wrong. One could also make gdbserver explicit for the version (if those 14 bytes are not of a concern). gdb/ChangeLog 2015-06-10 Jan Kratochvil * solib-target.c (library_list_start_list): Do not dereference variable version in its initialization. Make the VERSION check handle NULL. (library_list_attributes): Make "version" GDB_XML_AF_OPTIONAL. gdb/gdbserver/ChangeLog 2015-06-10 Jan Kratochvil * server.c (handle_qxfer_libraries): Set `version' attribute for . commit 51aad7cc44161ebbd2eea80647391c692ae330ac Author: Gary Benson Date: Wed Jun 10 14:28:44 2015 +0100 Announce new container-awareness features for GNU/Linux systems This commit announces the newly added ability to directly access executable and shared library files when attaching to processes running in containers on GNU/Linux systems. gdb/ChangeLog: * NEWS: Announce support for direct access of executable and shared library files when attaching to inferiors in containers on GNU/Linux systems. commit 14d2069a321cdd2b06f1982e6832c8c5661febf4 Author: Gary Benson Date: Wed Jun 10 14:28:44 2015 +0100 Implement vFile:setfs in gdbserver This commit implements the "vFile:setfs" packet in gdbserver. gdb/gdbserver/ChangeLog: * target.h (struct target_ops) : New field. : Likewise. : Likewise. * linux-low.c (nat/linux-namespaces.h): New include. (linux_target_ops): Initialize the_target->multifs_open, the_target->multifs_unlink and the_target->multifs_readlink. * hostio.h (hostio_handle_new_gdb_connection): New declaration. * hostio.c (hostio_fs_pid): New static variable. (hostio_handle_new_gdb_connection): New function. (handle_setfs): Likewise. (handle_open): Use the_target->multifs_open as appropriate. (handle_unlink): Use the_target->multifs_unlink as appropriate. (handle_readlink): Use the_target->multifs_readlink as appropriate. (handle_vFile): Handle vFile:setfs packets. * server.c (handle_query): Call hostio_handle_new_gdb_connection after target_handle_new_gdb_connection. commit 15a201c844e770d3c6edf174b9ef6596fbae7eb2 Author: Gary Benson Date: Wed Jun 10 14:28:44 2015 +0100 Implement multiple-filesystem support for remote targets This commit allows GDB to access executables and shared libraries on remote targets where the remote stub does not share a common filesystem with the inferior(s). A new packet "vFile:setfs" is added to the remote protocol and the three remote hostio functions with filename arguments are modified to send "vFile:setfs" packets as necessary. gdb/ChangeLog: * remote.c (struct remote_state) : New field. (new_remote_state): Initialize the above. (PACKET_vFile_setfs): New enum value. (remote_hostio_set_filesystem): New function. (remote_hostio_open): Call the above. (remote_hostio_unlink): Likewise. (remote_hostio_readlink): Likewise. (_initialize_remote): Register new "set/show remote hostio-setfs-packet" command. * NEWS: Announce new vFile:setfs packet. gdb/doc/ChangeLog: * gdb.texinfo (Remote Configuration): Document the "set/show remote hostio-setfs-packet" command. (Host I/O Packets): Document the vFile:setfs packet. commit 7a6a173129107538574949116c0ce1c0ead589b4 Author: Gary Benson Date: Wed Jun 10 14:28:43 2015 +0100 Implement mount namespace support for native Linux targets This commit allows GDB to access executables and shared libraries on native Linux targets where GDB and the inferior have different mount namespaces. gdb/ChangeLog: * linux-nat.c (nat/linux-namespaces.h): New include. (fileio.h): Likewise. (linux_nat_filesystem_is_local): New function. (linux_nat_fileio_pid_of): Likewise. (linux_nat_fileio_open): Likewise. (linux_nat_fileio_readlink): Likewise. (linux_nat_fileio_unlink): Likewise. (linux_nat_add_target): Initialize to_filesystem_is_local, to_fileio_open, to_fileio_readlink and to_fileio_unlink. (_initialize_linux_nat): New "set/show debug linux-namespaces" commands. * NEWS: Mention new "set/show debug linux-namespaces" commands. gdb/doc/ChangeLog: * gdb.texinfo (Debugging Output): Document the "set/show debug linux-namespaces" command. commit 07c138c8ae2b11d417c9799202363a95a2d06881 Author: Gary Benson Date: Wed Jun 10 14:28:43 2015 +0100 Add "inferior" argument to some target_fileio functions This commit adds a new argument to all target_fileio functions with filename arguments to allow the desired inferior to be specified. This allows GDB to support systems where processes do not necessarily share a common filesystem. gdb/ChangeLog: * target.h (struct inferior): New forward declaration. (struct target_ops) : Update comment. (struct target_ops) : New argument inf. Update comment. All implementations updated. (struct target_ops) : Likewise. (struct target_ops) : Likewise. (target_filesystem_is_local): Update comment. (target_fileio_open): New argument inf. Update comment. (target_fileio_unlink): Likewise. (target_fileio_readlink): Likewise. (target_fileio_read_alloc): Likewise. (target_fileio_read_stralloc): Likewise. * target.c (target_fileio_open): New argument inf. Pass inf to implementation. Update debug printing. (target_fileio_unlink): Likewise. (target_fileio_readlink): Likewise. (target_fileio_read_alloc_1): New argument inf. Pass inf to target_fileio_open. (target_fileio_read_alloc): New argument inf. Pass inf to target_fileio_read_alloc_1. (target_fileio_read_stralloc): Likewise. * gdb_bfd.c (inferior.h): New include. (gdb_bfd_iovec_fileio_open): Replace unused "open_closure" argument with new argument "inferior". Pass inferior to target_fileio_open. (gdb_bfd_open): Supply inferior argument to gdb_bfd_iovec_fileio_open. * linux-tdep.c (linux_info_proc): Supply inf argument to relevant target_fileio calls. (linux_find_memory_regions_full): Likewise. (linux_fill_prpsinfo): Likewise. * remote.c (remote_filesystem_is_local): Supply inf argument to remote_hostio_open. (remote_file_put): Likewise. (remote_file_get): Likewise. (remote_file_delete): Supply inf argument to remote_hostio_unlink. commit 12e2a5fdccfc6857c57d2e0a1c1e5fd136a94025 Author: Gary Benson Date: Wed Jun 10 14:28:43 2015 +0100 Comment and whitespace changes Comments on the various implementations of target fileio functions duplicate information documented in target.h. This commit replaces the duplicated documentation with breadcrumbs, and inserts blank lines to separate comments from the functions they describe where necessary. gdb/ChangeLog: * inf-child.c (inf_child_fileio_open): Replace comment. (inf_child_fileio_pwrite): Likewise. (inf_child_fileio_pread): Likewise. (inf_child_fileio_fstat): Insert blank line before comment. (inf_child_fileio_close): Replace comment. (inf_child_fileio_unlink): Likewise. (inf_child_fileio_readlink): Likewise. * remote.c (remote_hostio_open): Likewise. (remote_hostio_pread): Likewise. (remote_hostio_pwrite): Likewise. (remote_hostio_close): Likewise. (remote_hostio_unlink): Likewise. (remote_hostio_readlink): Likewise. (remote_hostio_fstat): Likewise. (remote_filesystem_is_local): Likewise. * target.c (target_fileio_open): Likewise. (target_fileio_pwrite): Likewise. (target_fileio_pread): Likewise. (target_fileio_fstat): Insert blank line before comment. (target_fileio_close): Replace comment. (target_fileio_unlink): Likewise. (target_fileio_readlink): Likewise. (target_fileio_read_alloc): Likewise. (target_fileio_read_stralloc): Likewise. commit 9bc3a9760b22a6187fdce6abc3df8f0c1d483a21 Author: Gary Benson Date: Wed Jun 10 14:28:43 2015 +0100 Remove linux_proc_pid_get_ns This commit removes linux_proc_pid_get_ns, and updates its only caller to use linux_ns_same instead. gdb/ChangeLog: * linux-thread-db.c (nat/linux-namespaces.h): New include. (check_pid_namespace_match): Use linux_ns_same rather than linux_proc_pid_get_ns to spot PID namespace mismatches. * nat/linux-procfs.h (linux_proc_pid_get_ns): Remove. * nat/linux-procfs.c (linux_proc_pid_get_ns): Likewise. commit 4b8b5e72451d5b9da4000b8346b20035833aa087 Author: Gary Benson Date: Wed Jun 10 14:28:43 2015 +0100 Introduce nat/linux-namespaces.[ch] This commit introduces new shared files nat/linux-namespaces.[ch] containing code to support Linux namespaces that will be used by both GDB and gdbserver. gdb/ChangeLog: * configure.ac (AC_CHECK_FUNCS): Add setns. * config.in: Regenerate. * configure: Likewise. * nat/linux-namespaces.h: New file. * nat/linux-namespaces.c: Likewise. * Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-namespaces.h. (linux-namespaces.o): New rule. * config/aarch64/linux.mh (NATDEPFILES): Add linux-namespaces.o. * config/alpha/alpha-linux.mh (NATDEPFILES): Likewise. * config/arm/linux.mh (NATDEPFILES): Likewise. * config/i386/linux.mh (NATDEPFILES): Likewise. * config/i386/linux64.mh (NATDEPFILES): Likewise. * config/ia64/linux.mh (NATDEPFILES): Likewise. * config/m32r/linux.mh (NATDEPFILES): Likewise. * config/m68k/linux.mh (NATDEPFILES): Likewise. * config/mips/linux.mh (NATDEPFILES): Likewise. * config/pa/linux.mh (NATDEPFILES): Likewise. * config/powerpc/linux.mh (NATDEPFILES): Likewise. * config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise. * config/powerpc/spu-linux.mh (NATDEPFILES): Likewise. * config/s390/linux.mh (NATDEPFILES): Likewise. * config/sparc/linux.mh (NATDEPFILES): Likewise. * config/sparc/linux64.mh (NATDEPFILES): Likewise. * config/tilegx/linux.mh (NATDEPFILES): Likewise. * config/xtensa/linux.mh (NATDEPFILES): Likewise. gdb/gdbserver/ChangeLog: * configure.ac (AC_CHECK_FUNCS): Add setns. * config.in: Regenerate. * configure: Likewise. * Makefile.in (SFILES): Add nat/linux-namespaces.c. (linux-namespaces.o): New rule. * configure.srv (srv_linux_obj): Add linux-namespaces.o. commit ca09583623ab77362186a9fd1ae260c38dcab470 Author: Gary Benson Date: Wed Jun 10 14:28:43 2015 +0100 Move make_cleanup_close to common code This commit moves the function make_cleanup_close from gdb/utils.[ch] to gdb/common/filestuff.[ch] to make it usable from common code. gdb/ChangeLog: * utils.h (make_cleanup_close): Moved to common/filestuff.h. * utils.c (do_close_cleanup): Moved to common/filestuff.c. (make_cleanup_close): Likewise. * common/filestuff.h (make_cleanup_close): Moved from utils.h. * common/filestuff.c (do_close_cleanup): Moved from utils.c. (make_cleanup_close): Likewise. commit 5d9c55d355c8e5c688caa3fe43c0d95d538daf35 Author: Jon Turney Date: Wed Jun 3 14:28:29 2015 +0100 windows-nat: Also ignore ERROR_INVALID_HANDLE from SuspendThread() Discussed somewhat in the thread at https://cygwin.com/ml/gdb-patches/2013-06/msg00680.html This is pretty straightforward to demonstrate on Cygwin currently: $ cat main.c int main() { return 0; } $ gcc -g -O0 main.c -o main $ ./gdb ./main [...] (gdb) r Starting program: /wip/binutils-gdb/build.x86_64/gdb/main warning: SuspendThread (tid=0x1cf0) failed. (winerr 6) [Inferior 1 (process 976) exited normally] with this patch applied: $ ./gdb ./main [...] (gdb) r Starting program: /wip/binutils-gdb/build.x86_64/gdb/main [Inferior 1 (process 4852) exited normally] gdb/ChangeLog: 2015-06-03 Jon Turney * windows-nat.c (thread_rec): Also ignore ERROR_INVALID_HANDLE from SuspendThread(). Signed-off-by: Jon Turney commit 040ea00bb02018cbe21ba732f68134ac91f370d2 Author: Jon Turney Date: Wed Jun 3 14:03:50 2015 +0100 windows-nat: Trim a trailing '\n' from OutputDebugString before echoing it For cosmetic purposes, trim a trailing '\n' from OutputDebugString before echoing it, as warning() will add a '\n', anyhow. gdb/ChangeLog: 2015-06-03 Jon Turney * windows-nat.c (handle_output_debug_string): Trim trailing '\n' from OutputDebugString. Signed-off-by: Jon Turney commit 7d73c23c4d8cf727528ac5a34a787e44a30d98cc Author: Walfred Tedeschi Date: Wed Jun 10 10:52:12 2015 +0200 Missing Changelogs for last commits Signed-off-by: Walfred Tedeschi commit 29c1c24429a099eca297080dba56a8c090e3136a Author: Walfred Tedeschi Date: Tue Jun 9 15:27:02 2015 +0200 Add support for bound table in the Intel MPX context. Intel(R) Memory protection bound information are located in register to be tested using the MPX new instructions. Since the number of bound registers are limited a table is used to provide storage for bounds during run-time. In order to investigate the contents of the MPX bound table two new commands are added to GDB. "show mpx bound" and "set mpx bound" are used to display and set values on the MPX bound table. 2015-04-20 Walfred Tedeschi Mircea Gherzan * i386-tdep.c (MPX_BASE_MASK, MPX_BD_MASK, MPX_BT_MASK, MPX_BD_MASK_32, MPX_BT_MASK_32): New macros. (i386_mpx_set_bounds): New function that implements the command "set-mpx-bound". (i386_mpx_enabled) Helper function to test MPX availability. (i386_mpx_bd_base) Helper function to calculate the base directory address. (i386_mpx_get_bt_entry) Helper function to access a bound table entry. (i386_mpx_print_bounds) Effectively display bound information. (_initialize_i386_tdep): Qdd new commands to commands "set mpx" and "show mpx". (_initialize_i386_tdep): Add "bound" to the commands "show mpx" and "set mpx" commands. (mpx_set_cmdlist and mpx_show_cmdlist): list for the new prefixed "set mpx" and "show mpx" commands. * NEWS: List new commands for MPX support. testsuite: * gdb.arch/i386-mpx-map.c: New file. * gdb.arch/i386-mpx-map.exp: New File. doc: * gdb.texinfo (i386): Add documentation about "show mpx bound" and "set mpx bound". commit 422d944b03535efba6187bbd9e35e87f73767dd7 Author: Walfred Tedeschi Date: Mon Jun 8 17:42:08 2015 +0200 Obvious indentation fixes on test sample and test file for MPX registers. 2015-06-08 Walfred Tedeschi gdb/testsuite: * gdb.arch/i386-mpx.c (have_mpx): Indentation fixed. * gdb.arch/i386-mpx.exp: Indentation fixed. commit 547a646d67e7a38b96d2a93b709e52c9461d017f Author: Walfred Tedeschi Date: Mon Jun 8 17:37:40 2015 +0200 Improve test for processor feature om MPX registers test. Skips the MPX register test in case target is not Intel. Improves the test for MPX feature making MPX and AVX512 tests more similar in terms of initialization. Indentation was improved on sample file and final return added to have_mpx. On test file identation was improved and gdb_send was exchanged by gdb_test_multiple. 2015-06-08 Walfred Tedeschi gdb/testsuite * gdb.arch/i386-mpx.c: Added final return to the have_mpx function and improved indentation. * gdb.arch/i386-mpx.exp: Exchanging gdb_send and gdb_expect for gdb_test_multiple. Added additional tests to skip the test. commit 8b600ba2b47c9ae56c21f1abdfeb1eb5510d9615 Author: Walfred Tedeschi Date: Mon Jun 8 17:51:04 2015 +0200 Fix MPX and AVX512 tests for path changes. Changes on the path for i386-cpuid.h file lead to failure in compiling tests for AVX512 and MPX. 2015-06-08 Walfred Tedeschi gdb/testsuite * gdb.arch/i386-avx512.c: Change path in include file. * gdb.arch/i386-avx512.exp: Change include dir path compilation flag. * gdb.arch/i386-mpx.c: Change path in include file. * gdb.arch/i386-mpx.exp: Change include dir path compilation flag. commit e5796f023338867d1fed85b4908069f099122758 Author: GDB Administrator Date: Wed Jun 10 00:00:08 2015 +0000 Automatic date update in version.in commit bb9e16d4bb717968b92130344d0f5dc3babedaaa Author: Joel Brobecker Date: Tue Jun 9 14:29:09 2015 -0400 Fix latest sim/common/ChangeLog entry. commit f419f52b9b04f2e45dd11542c6531a48ba0e0d13 Author: Joel Brobecker Date: Tue Jun 9 14:27:58 2015 -0400 Remove unnecessary empty line in sim/common/ChangeLog commit 509c2f329a42646e64c7c3e8796f8b3bbd904032 Author: Mike Stump Date: Tue Jun 9 14:25:28 2015 -0400 Fix spelling mistakes in sim/common/sim-events.c error messages. sim/common/ChangeLog: * sim-events.c (sim_events_schedule_after_signal): Fix spelling mistake in call to sim_engine_abort. (sim_events_schedule_after_signal): Likewise. commit 3ac2e371a1abd1279f66477aa4fc68039da1872e Author: Gary Benson Date: Tue Jun 9 10:00:15 2015 +0100 Don't assume File-I/O mode bits match the host's format inf_child_fileio_open and its gdbserver equivalent both assume that the mode_t bits defined in gdb/fileio.h are the same as those used by the open system call, but there is no mechanism to ensure this is the case. This commit adds a conversion function to handle systems where the File-I/O definitions do not align with the host's. gdb/ChangeLog: * common/fileio.h (fileio_to_host_mode): New declaration. * common/fileio.c (fileio_to_host_mode): New Function. * inf-child.c (inf_child_fileio_open): Process mode argument with fileio_to_host_mode. gdb/gdbserver/ChangeLog: * hostio.c (handle_open): Process mode argument with fileio_to_host_mode. commit ecef18c564bd609aa7640564747b807bfe1632c6 Author: Gary Benson Date: Tue Jun 9 10:02:25 2015 +0100 Fix preprocessor conditional This commit fixes a typo in common/fileio.c where S_IWGRP was misspelled as S_IWRGRP in a preprocessor conditional, causing Host-I/O "vFile:fstat:" and File-I/O "Fstat" and "Ffstat" responses to always indicate files were not group-writable regardless of their actual status. commit f5316771bd0cf89578450be0460908beeef4dbb5 Author: GDB Administrator Date: Tue Jun 9 00:00:08 2015 +0000 Automatic date update in version.in commit 1e1b2efc461dad176d4e0473d6e3d3686b5abdfc Author: Nick Clifton Date: Mon Jun 8 15:04:17 2015 +0100 Update French Translations for LD and GOLD. ld * po/fr.po: Updated French Translation. gold * po/fr.po: New French Translation. commit f0e8c65e02e84ceb85b569508aa4f54ecb0a8abe Author: Nick Clifton Date: Mon Jun 8 11:32:38 2015 +0100 Fix RX GAS handling of integer bignums. * config/tc-rx.c (rx_op): Correct handling of integer bignums. commit 80fb91378c91a8239817a5ab2b1c3e346109db25 Author: GDB Administrator Date: Mon Jun 8 00:00:08 2015 +0000 Automatic date update in version.in commit b8cf50755b573140aae71f7247b604373fcdfbeb Author: Cary Coutant Date: Sun Jun 7 14:03:09 2015 -0700 Fix incorrect handling of STT_COMMON symbols in shared libraries. The gABI allows STT_COMMON symbols to appear in executables and shared objects, so that the dynamic loader can resolve commons across modules. When reading a shared object, however, an STT_COMMON symbol should be treated as a regular definition at link time. In a relocatable object, the gABI requires that any STT_COMMON symbols must also be defined in the special SHN_COMMON section (which we extend to include target-specific small and large common sections). Thus, there is no need for gold to treat STT_COMMON symbols as common unless the st_shndx field is also set to a common section. gold/ PR gold/18288 * resolve.cc (symbol_to_bits): Remove type parameter; adjust all callers. Don't use STT_COMMON to check for common symbols. (Symbol_table::resolve): Warn if relocatable object has STT_COMMON symbol that's not in a common section. * symtab.h (Symbol::is_common): Don't use STT_COMMON to check for common symbols. commit 66f38e2951a1f7110ca3f1adf362322ec4208428 Author: GDB Administrator Date: Sun Jun 7 00:00:07 2015 +0000 Automatic date update in version.in commit f051a5a3d0bae10f5a9294f01b70257a0520a976 Author: GDB Administrator Date: Sat Jun 6 00:00:07 2015 +0000 Automatic date update in version.in commit 8fcc61b42be7703460dcacf24d97b290f502c23e Author: Nick Clifton Date: Fri Jun 5 16:58:35 2015 +0100 Improves the detection of partial .debug_line sections. * dwarf.c (read_debug_line_header): Use reloc_at to detect incomplete .debug_line headers commit e00a2fbc249c540593baef120eb13ea2ca7891f3 Author: Nick Clifton Date: Fri Jun 5 16:48:01 2015 +0100 Fixes a typo in the list of targets that should not run the compressed1d test. * ld-elf/compressed1d.d: Fix typo: iq200 -> iq2000. commit 1ade71756948cad279f9b01d88ae762d144643e3 Author: Nick Clifton Date: Fri Jun 5 16:40:37 2015 +0100 Fixes computation of MSP430 SYM_DIFF relocs in very small sections. * elf32-msp430.c (rl78_sym_diff_handler): New function. (msp430_howto_table): Use the new function for the SYM_DIFF reloc. (msp430x_howto_table): Likewise. commit e3dd7556ad89bf00c2a92f76079ae1c53dc130a8 Author: Gary Benson Date: Fri Jun 5 16:08:05 2015 +0100 Move vgdb special case into remote_filesystem_is_local Valgrind GDB (vgdb) presents itself as a remote target but works on the local filesystem. gdb_bfd_open contained a special case to make vgdb work with "target:" sysroots, but the implementation meant that GDB would fall back to the local filesystem if *any* to_fileio_open method failed with ENOSYS for *any* reason. This commit moves the vgdb special case to remote_filesystem_is_local to allow the fallback to be restricted only to the specific case that remote file transfer is unsupported. This commit also adds a warning which is displayed the first time the fallback is used. gdb/ChangeLog: * gdb_bfd.c (gdb_bfd_open): Move vgdb special case to... * remote.c (remote_filesystem_is_local): ...here. commit f8b447819b3d65c3bea65dee860110aa198c081e Author: Alan Modra Date: Fri Jun 5 18:35:40 2015 +0930 ppc476 linker workaround shared lib fixes When building a shared lib from non-PIC objects, we'll get dynamic text relocations. These need to move with any insns we move. Otherwise the dynamic reloc will modify the branch, resulting in crashes and other unpleasant behaviour. Also, ld -r --ppc476-workaround used with sufficiently aligned PIC objects needs a fix for emitted REL16 relocs. bfd/ * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text relocs with insns moved by --ppc476-workaround. Correct output of REL16 relocs. ld/testsuite/ * ld-powerpc/ppc476-shared.s, * ld-powerpc/ppc476-shared.lnk, * ld-powerpc/ppc476-shared.d, * ld-powerpc/ppc476-shared2.d: New tests. * ld-powerpc/powerpc.exp: Run them. commit bdd2d2b7e6fbe90a07bd631cb599266fc6e12b5e Author: Cary Coutant Date: Thu Jun 4 22:58:39 2015 -0700 Add diststuff target to Makefile. gold/ PR gold/18200 * Makefile.am (diststuff): Add target. * Makefile.in: Regenerate. commit cd3c333f43f03d6e41668a82a68a99c14000a681 Author: Cary Coutant Date: Thu Jun 4 20:58:08 2015 -0700 Change default to discard temporary local symbols in merge sections. Add --discard-none to keep all local symbols. gold/ PR gold/17498 * object.cc (Sized_relobj_file::do_count_local_symbols): Discard temporary locals in merge sections. * options.cc (General_options::parse_discard_all): New method. (General_options::parse_discard_locals): New method. (General_options::parse_discard_none): New method. (General_options::General_options): Initialize discard_locals_. * options.h (--discard-all): Convert to special option. (--discard-locals): Likewise. (--discard-none): New option. (General_options::discard_all): New method. (General_options::discard_locals): New method. (General_options::discard_sec_merge): New method. (General_options::Discard_locals): New enum. (General_options::discard_locals_): New data member. commit dc302c00611b6973fbc55e9fdd643ad24c370bd1 Author: Peter Bergner Date: Thu Jun 4 20:27:03 2015 -0500 Add hwsync extended mnemonic. This commit adds a new extended menmonic for "sync 0" (same as "sync"). The ISA documentation doesn't explicitly mention hwsync as an extended mnemonic (yet), but it does mention "heavyweight sync" and "hwsync" as the operation that gets performed when the sync's L field is 0. This is only enabled for POWER4 and later. opcodes/ * ppc-opc.c: (powerpc_opcodes) : New extended mnemonic. gas/testsuite/ * gas/ppc/a2.d: Fixup test case due to new extended mnemonic. * gas/ppc/power4.s : Add tests. * gas/ppc/power4.d: Likewise. commit 000966891702bdf5f3da8b2b174cd857298ea7c0 Author: GDB Administrator Date: Fri Jun 5 00:00:07 2015 +0000 Automatic date update in version.in commit d5eba19a654f31f7409bd17b0d3dd2e4c483280e Author: Jan Kratochvil Date: Thu Jun 4 21:35:43 2015 +0200 compile-print.exp: xfail->kfail for '@' GDB array operator Patch implementing '@' GDB array operator in GCC has been rejected: https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00414.html and so there is now a GDB tracker to implement it just in GDB: https://sourceware.org/bugzilla/show_bug.cgi?id=18489 gdb/testsuite/ChangeLog 2015-06-04 Jan Kratochvil * gdb.compile/compile-print.exp (compile print *vararray@3) (compile print *vararrayp@3): Change xfail to kfail compile/18489. commit 5b74bf7d63e71e977fc9706b56499045035ea63a Author: Yao Qi Date: Thu Jun 4 17:26:29 2015 +0100 Regenerate gdbarch.c to sync with gdbarch.sh When I do something else, I find that gdbarch.c isn't sync'ed with gdbarch.sh. This patch just move some statements on stack_frame_destroyed_p some lines below. gdb: 2015-06-04 Yao Qi * gdbarch.c: Regenerate it. commit 13be46a23c97f8bdb4ac028c1498197e44fe2e62 Author: Nick Clifton Date: Thu Jun 4 16:33:12 2015 +0100 Fixes the check for emulated MSP430 instrucrtions that take no operands. PR 18474 * msp430-dis.c (msp430_nooperands): Fix check for emulated insns. commit 239c0f4cebf8da3914597e2e296f5d172c2c62fb Author: Nick Clifton Date: Thu Jun 4 16:20:35 2015 +0100 Fix compile time warning for tc-h8300.c when using gcc 5+. * config/tc-h8300.c (md_section_align): Fix compile time warning about left shifting a negative value. commit 88f0ea342dc6eb3d93a29895febdebe3e425a048 Author: Matthew Wahab Date: Thu Jun 4 11:14:07 2015 +0100 [AArch64] Add support for ARMv8.1 command line option commit b968d18a6d3df13b92c98e813f3d2fb3bbd3d4ee Author: Jiong Wang Date: Thu Jun 4 09:36:35 2015 +0100 [ARM] Use frag's thumb_mode information when available 2015-06-04 Renlin Li * config/tc-arm.c (arm_init_frag): Use frag's thumb_mode information when available. commit 8086551f52df808681fa09ca00dfb91e67d8d2ff Author: Cary Coutant Date: Wed Jun 3 20:30:11 2015 -0700 Fix SIZEOF_HEADERS in gold. Gold undercounts the number of program headers it's going to add when initially evaluating the SIZEOF_HEADERS expression. As a result, scripts that use it end up skipping a page unnecessarily when the starting address is too low. The undercounting is because it doesn't count the PT_INTERP segment. Then, when finalizing symbols, gold overcounts the program headers: all segments have already been created, but we still count the headers we expected to add from the script. This patch fixes both problems. gold/ * script-sections.cc (Script_sections::Script_sections): Initialize segments_created_. (Script_sections::create_note_and_tls_segments): Set flag when segments are created. (Script_sections::expected_segment_count): Count PT_INTERP. (Script_sections::attach_sections_using_phdrs_clause): Set flag when segments are created. * script-sections.h (Script_sections::segments_created_): New data member. commit 374082dfab280123f5a54a23b1c1b2cb893b4d2b Author: Cary Coutant Date: Wed Jun 3 19:11:42 2015 -0700 Fix gold to group sections correctly via linker script. In PR 15370, it is noted that gold does not distinguish between "*(.foo .bar)" and "*(.foo) *(.bar)" in linker scripts. In both cases, gold groups all .foo sections together, followed by all .bar sections, whereas in the first case, it should collect all .foo and .bar sections in the order seen. If you add sort specs, the Gnu linker has some bizarre corner cases that I do not try to replicate. In particular, "*(SORT_BY_NAME(.foo) SORT_BY_NAME(.bar))" does the same thing as "*(.foo) *(.bar)". But if you apply a sort spec to just one of several patterns, say, "*(SORT_BY_NAME(.foo) .bar)", the Gnu linker will collect any .bar section it sees before the first .foo, then all .foo sections, then all remaining .bar sections. With this patch, if any of the input patterns have a sort spec, gold will group them all as it did before; e.g., all .foo sections followed by all .bar sections. 2015-06-03 Cary Coutant gold/ PR gold/15370 * script-sections.cc (Output_section_element_input::set_section_addresses): When there are several patterns with no sort spec, put all sections in the same bin. * testsuite/Makefile.am (script_test_12): New testcase. (script_test_12i): New testcase. * testsuite/Makefile.in: Regenerate. * testsuite/script_test_12.t: New test linker script. * testsuite/script_test_12i.t: New test linker script. * testsuite/script_test_12a.c: New test source file. * testsuite/script_test_12b.c: New test source file. commit a96a7cce1820951c566cfe793ccc72db1e4adf69 Author: GDB Administrator Date: Thu Jun 4 00:00:08 2015 +0000 Automatic date update in version.in commit 7f36105668d57c26b52037202f5d97dbad91336b Author: Jan Kratochvil Date: Wed Jun 3 21:22:56 2015 +0200 compile: Use also inferior munmap Currently inferior memory is allocated by inferior mmap() but it is never deallocated; despite the injected objfile incl. its symbols is freed. This was intentional so that one can do for example: inferior: char *str = "foo"; GDB: (gdb) compile code str = "bar"; I believe later patches will be needed to introduce full control over keeping vs. discarding the injected module as being discussed in: compile: objfiles lifetime UI https://sourceware.org/ml/gdb/2015-04/msg00051.html Message-ID: <20150429135735.GA16974@host1.jankratochvil.net> https://sourceware.org/ml/gdb/2015-05/msg00007.html As decided by Phil it is better not to leak inferior pages as users can workaround the issue above for example by: (gdb) compile code str = strdup ("bar"); I have checked that in fact gdb/doc/ (written by Phil) already expects the injected code will be unmapped so that does not need to be changed: compile code int ff = 5; p = &ff; In this example, @code{p} would point to @code{ff} when the @code{compile} command is executing the source code provided to it. However, as variables in the (example) program persist with their assigned values, the variable @code{p} would point to an invalid location when the command exists. gdb/ChangeLog 2015-04-28 Jan Kratochvil * arch-utils.c (default_infcall_munmap): New. * arch-utils.h (default_infcall_munmap): New declaration. * compile/compile-object-load.c (struct munmap_list, munmap_list_add) (munmap_list_free, munmap_listp_free_cleanup): New. (struct setup_sections_data): Add field munmap_list_headp. (setup_sections): Call munmap_list_add. (compile_object_load): New variable munmap_list_head, initialize setup_sections_data.munmap_list_headp, return munmap_list_head. * compile/compile-object-load.h (struct munmap_list): New declaration. (struct compile_module): Add field munmap_list_head. (munmap_list_free): New declaration. * compile/compile-object-run.c (struct do_module_cleanup): Add field munmap_list_head. (do_module_cleanup): Call munmap_list_free. (compile_object_run): Pass munmap_list_head to do_module_cleanup. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * gdbarch.sh (infcall_munmap): New. * linux-tdep.c (linux_infcall_munmap): New. (linux_init_abi): Install it. gdb/testsuite/ChangeLog 2015-04-28 Jan Kratochvil * gdb.compile/compile.exp (keep jit in memory): Rename to ... (do not keep jit in memory): ... this. (expect 5): Change it to ... (expect no 5): ... this. commit f277626b45b9d4af76e5d61a7efe09ce417ac200 Author: Matthew Wahab Date: Wed Jun 3 10:52:34 2015 +0100 [ARM] Commit approaved testcases missed in previous commit 2015-06-03 Matthew Wahab * gas/arm/armv8-a+rdma.d: New. * gas/arm/armv8-a+rdma.s: New. commit fbf8de7c4d262f4de5148574c13f48961cff0837 Author: Jiong Wang Date: Wed Jun 3 10:06:42 2015 +0100 [AArch64] Revert local changes included in Matthew's commit When commit the following code for Matthew, I wrongly included my local changes. Revert it. Sorry. commit a5932920ef397c2cbe02efa915686022b78d59a7 Author: Matthew Wahab Date: Wed Jun 3 10:03:50 2015 +0100 commit a5932920ef397c2cbe02efa915686022b78d59a7 Author: Matthew Wahab Date: Wed Jun 3 10:03:50 2015 +0100 [ARM] Support for ARMv8.1 command line option 2015-06-03 Matthew Wahab gas/ * config/tc-arm.c (arm_archs): Add "armv8.1-a". * doc/c-arm.texi (ARM Options, -march): Add "armv8.1-a". * NEWS: Mention ARMv8.1 support. include/opcode/ * arm.h (FPU_ARCH_CRYPTO_NEON_VFP_ARMV8_1): New. (ARM_ARCH_V8_1A): New. (ARM_ARCH_V8_1A_FP): New. (ARM_ARCH_V8_1A_SIMD): New. (ARM_ARCH_V8_1A_CRYPTOV1): New. (ARM_FEATURE_CORE): New. commit 0220bc5727e595f42bc3a1ce8ef284491aa74ac7 Author: GDB Administrator Date: Wed Jun 3 00:00:09 2015 +0000 Automatic date update in version.in commit 775ed62ec53a38c656300d4ce50ae5a56c0d38a2 Author: Cary Coutant Date: Tue Jun 2 14:12:56 2015 -0700 Fix Sniff_file to get an aligned view. gold/ * nacl.h (Sniff_file): Switch parameters to get_view to get an aligned view. commit 3b462ec2bedca7392bf4720db44fdf2a46ad8b4d Author: Simon Marchi Date: Tue Jun 2 15:32:40 2015 -0400 Fix =thread-exited not showing up when detaching (PR 15564) I sent a patch in 2013 for this (incorrectly named =thread-created): https://cygwin.com/ml/gdb-patches/2013-06/msg00129.html Tom Tromey was ok with the change, but suggested to add a test as well. Then I forgot about this patch until today. So here it is again, with the corresponding test. The problem is that the =thread-exited event does not appear when detaching from a local process. It does appear with remote though. It's not a really big deal, but I'd like it to be consistent. Tested with local and remote Linux on my Ubuntu 14.04. gdb/ChangeLog: PR gdb/15564 * inferior.c (detach_inferior): Call exit_inferior_1 with silent = 0. gdb/testsuite/ChangeLog: PR gdb/15564 * gdb.mi/mi-detach.exp: New file. commit 9c7fe3c5c2c9e4c3571c253cf77341e3f6adf94c Author: Cary Coutant Date: Tue Jun 2 09:45:24 2015 -0700 PR 17819: Fix --build-id=tree when using --compress-debug-sections. When --build-id=tree is selected, gold would schedule a set of tasks to run to compute md5 hashes in parallel on chunks of the file. The scheduling was done before the Write_after_input_sections_task ran, so if we are compressing debug sections, the output file will change size and be remapped to a new address, sometimes causing the build id computation to crash, but even when it doesn't crash, it wouldn't include the debug information in the hash computation. This patch delays the scheduling of the md5 tasks until after Write_after_input_sections_task. gold/ PR gold/17819 * gold.cc (queue_final_tasks): When --build-id=tree, queue a separate task to schedule the build id computation. * layout.cc (Hash_task::Hash_task): Remove build_id_blocker, add Output_file and offset. (Hash_task::run): Get and release the input views. (Hash_task::is_runnable): Always return NULL (always runnable). (Layout::queue_build_id_tasks): Remove. (Layout::write_build_id): Add array_of_hashes and size_of_hashes parameters; use them instead of class members. (Build_id_task_runner::run): New function. (Close_task_runner::run): Pass array_of_hashes and size_of_hashes to write_build_id. * layout.h (Layout::queue_build_id_tasks): Remove. (Layout::write_build_id): Add array_of_hashes and size_of_hashes parameters. (Layout::array_of_hashes_): Remove. (Layout::size_of_array_of_hashes_): Remove. (Layout::input_view_): Remove. (Build_id_task_runner): New class. (Close_task_runner::Close_task_runner): Add array_of_hashes and size_of_hashes parameters. (Close_task_runner::array_of_hashes_): New data member. (Close_task_runner::size_of_hashes_): New data member. * testsuite/Makefile.am (flagstest_compress_debug_sections_and_build_id_tree): New test. * testsuite/Makefile.in: Regenerate. commit afa403d8d467466edfd77baea0bba7ae45a4447f Author: Jiong Wang Date: Tue Jun 2 13:59:17 2015 +0100 [AArch64] Fix typo in testcase ld/testsuite/ * ld-aarch64/emit-relocs-313.s: Use gotpage_lo15. commit d6b4b13ed2859a1eafd6c94c0dc64b20fdbde1ba Author: Matthew Wahab Date: Tue Jun 2 12:35:21 2015 +0100 [ARM] Support for ARMv8.1 Adv.SIMD extension commit ddfded2f7bba485d6c967b502337a72310f24913 Author: Matthew Wahab Date: Tue Jun 2 12:30:38 2015 +0100 [ARM] Add support for ARMv8.1 PAN extension commit 1af1dd51db991700c0e66b35d777a44e6953bbd2 Author: Matthew Wahab Date: Tue Jun 2 12:24:24 2015 +0100 [ARM] Rework CPU feature selection in the disassembler include/opcode/ * arm.h (ARM_FEATURE_ALL): New. opcodes/ * arm-dis.c (select_arm_features): Rework to avoid used of redefined macros. commit 9e1f0fa7f3f7aef95d27e197562906bc648849bb Author: Matthew Wahab Date: Tue Jun 2 12:20:00 2015 +0100 [AArch64] Support for ARMv8.1a Adv.SIMD instructions 2015-06-02 Matthew Wahab gas/ * config/tc-aarch64.c (aarch64_features): Add "rdma". * doc/c-aarch64.texi (AArch64 Extensions): Add "rdma". gas/testsuite/ * rdma-directive.d: New. * rdma.d: New. * rdma.s: New. include/opcode/ * aarch64.h (AARCH64_FEATURE_RDMA): New. opcode/ * aarch64-tbl.h (aarch64_feature_rdma): New. (RDMA): New. (aarch64_opcode_table): Add "sqrmlah" and "sqrdmlsh" instructions. * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Regenerate. * aarch64-opc-2.c: Regenerate. commit 290806fd94099361f28e012cebca058c8c4f0e45 Author: Matthew Wahab Date: Tue Jun 2 11:29:15 2015 +0100 [AArch64] Support for ARMv8.1a Limited Ordering Regions extension 2015-06-02 Matthew Wahab include/ * aarch64.h (AARCH64_FEATURE_LOR): New. opcodes/ * aarch64-tbl.h (aarch64_feature_lor): New. (LOR): New. (aarch64_opdocde_table): Add "ldlar", "ldlarb", "ldlarh", "stllr", "stllrb", "stllrh". * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Regenerate. * aarch64-opc-2.c: Regenerate. gas/ * config/tc-aarch64.c (aarch64_features): Add "lor". * doc/c-aarch64.c (Aarch64 Extensions): Add "lor" to list of architecture extensions. gas/testsuite/ * lor-directive.d: New. * lor.d: New. * lor.s: New. commit 8d683210f1932f6ac6d2cd8ae8186cdad80f5a23 Author: Yao Qi Date: Tue Jun 2 10:28:03 2015 +0100 Include linux-nat.h in i386-linux-nat.c This commit fixes a build failure on i386-linux. gdb: 2015-06-02 Yao Qi * i386-linux-nat.c: Include linux-nat.h. commit 400f89447b72cbd48a2fc8b016a09cbc4e590d81 Author: Rafael Ávila de Espíndola Date: Mon Jun 1 22:47:20 2015 -0400 Use a std::vector instead of a std::map to hold Input_merge_map. A std::map is hardly the best data structure for a small map from small integers. commit d78b6450515fb163b00bc8874a15469df797ef17 Author: GDB Administrator Date: Tue Jun 2 00:00:08 2015 +0000 Automatic date update in version.in commit 72ca8fad61dea369e4e584e80d3326dc894703b8 Author: Matthew Wahab Date: Mon Jun 1 16:05:58 2015 +0100 [AArch64][GAS] Add support for PAN architecture extension 2015-06-01 Matthew Wahab gas/ * config/tc-aarch64.c (parse_sys_reg): New parameter. Check target support. Fix whitespace. (parse_operands): Update for parse_sys_reg changes. (aarch64_features): Add "pan". * doc/c-aarch64.texi (Aarch64 Extensions): Add "pan". gas/testsuite/ * pan-directive.d: New. * pan.d: New. * pan.s: New commit f21cce2cacb534428ed6ea96fdb684ad8a4a948a Author: Matthew Wahab Date: Mon Jun 1 16:00:28 2015 +0100 [AArch64][libopcode] Add support for PAN architecture extension The ARMv8.1 architecture introduced the Privileged Access Never extension. This adds a processor state field PSTATE.PAN which can be accessed using the MRS/MSR instructions. This patch adds support for the PAN architecture feature and processor state field to libopcode. include/opcode 2015-06-01 Matthew Wahab * aarch64.h (AARCH64_FEATURE_PAN): New. (aarch64_sys_reg_supported_p): Declare. (aarch64_pstatefield_supported_p): Declare. opcodes/ 2015-06-01 Matthew Wahab * aarch64-opc.c (F_ARCHEXT): New. (aarch64_sys_regs): Add "pan". (aarch64_sys_reg_supported_p): New. (aarch64_pstatefields): Add "pan". (aarch64_pstatefield_supported_p): New. commit 7018c0308ac5d936b68c280bfcdc80bef77225e1 Author: Jiong Wang Date: Mon Jun 1 15:45:25 2015 +0100 [AArch64] BFD support BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14 This patch add BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14 relocation supoprt in bfd linker. 2015-06-01 Jiong Wang bfd/ * elfnn-aarch64.c (aarch64_reloc_got_type): Support BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14. (elfNN_aarch64_final_link_relocate): Ditto. (elfNN_aarch64_gc_swap_hook): Ditto. (elfNN_aarch64_check_relocs): Ditto. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto. ld/testsuite/ * ld-aarch64/emit-relocs-28.s: New test file. * ld-aarch64/emit-relocs-28.d: Ditto. * ld-aarch64/aarch64-elf.exp: Run new test. commit 3d715ce4202ef799e288261d08a5438c82e7c21e Author: Jiong Wang Date: Mon Jun 1 15:41:54 2015 +0100 [AArch64] GAS support BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14 This patch add BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14 support in Gas. The relocation modifier === :gotpage_lo14:symbol 2015-06-01 Jiong.Wang bfd/ * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14. gas/ * config/tc-aarch64.c (reloc_table): New relocation modifiers. (md_apply_fix): Support BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14. (aarch64_force_relocation): Ditto. gas/testsuite/ * gas/aarch64/ilp32-basic.s: New testcase. * gas/aarch64/ilp32-basic.d: Ditto. commit e0619de699ae6e86d8b93fa96a7668aef2e9636a Author: Jan Kratochvil Date: Mon Jun 1 14:02:34 2015 +0200 PR symtab/18392 Initially there is some chain (let's say the longest one but that doe snot matter). Consequently its elements from the middle are being removed and there remains only some few unambiguous top and bottom ones. The original idea why the comparison should be sharp ("<") was that if there are multiple chains like (0xaddr show jmp instruction address): main(0x100) -> a(0x200) -> d(0x400) main(0x100) -> a(0x200) -> c(0x300) -> d(0x400) then - such situation cannot exist - if two jmp instructions in "a" have the same address they must also jump to the same address (*). (*) jump to a computed address would be never considered for the DWARF tail-call records. So there could be: main(0x100) -> a(0x200) -> d(0x400) main(0x100) -> a(0x270) -> c(0x300) -> d(0x400) But then "a" frame itself is ambiguous and it must not be displayed. I did not realize that there can be self-tail-call: main(0x100) -> a(0x200) -> d(0x400) main(0x100) -> a(0x280) -> a(0x200) -> d(0x400) which intersects to: main(0x100) -> ? -> a(0x200) -> d(0x400) And so if the first chain was chosen the main(0x100) -> a(0x200) -> d(0x400) then the final intersection has callers+callees==length. > for example, if CALLERS is 3 and > CALLEES is 2, what does the chain look like? main(0x100) -> x(0x150) -> y(0x200) -> ? -> a(0x200) -> d(0x400) And if LENGTH is 7 then: call_site[0] = main(0x100) call_site[1] = x(0x150) call_site[2] = y(0x200) call_site[3] = garbage call_site[4] = garbage call_site[5] = a(0x200) call_site[6] = d(0x400) gdb/ChangeLog 2015-06-01 Andreas Schwab Jan Kratochvil PR symtab/18392 * dwarf2-frame-tailcall.c (pretended_chain_levels): Correct assertion. * dwarf2loc.c (chain_candidate): Likewise. gdb/testsuite/ChangeLog 2015-06-01 Jan Kratochvil PR symtab/18392 * gdb.arch/amd64-tailcall-self.S: New file. * gdb.arch/amd64-tailcall-self.c: New file. * gdb.arch/amd64-tailcall-self.exp: New file. commit bd16da5114e2f04772bf05604a608fbe006a485a Author: Yao Qi Date: Mon Jun 1 12:13:02 2015 +0100 Fetch and store VFP registers by PTRACE_{G,S}ETREGSET This patch is to use PTRACE_{G,S}ETREGSET to fetch and store VFP registers if kernel supports. gdb: 2015-06-01 Yao Qi * arm-linux-nat.c (fetch_vfp_regs): Use PTRACE_GETREGSET. (store_vfp_regs): Use PTRACE_SETREGSET. commit df9d7ec9e749c18e9970fb240ca142148dd3bea9 Author: Yao Qi Date: Mon Jun 1 12:13:02 2015 +0100 Fetch and store FP registers by PTRACE_{G,S}ETREGSET If kernel supports PTRACE_GETREGSET, GDB uses PTRACE_{G,S}ETREGSET to fetch and store FP registers. gdb: 2015-06-01 Yao Qi * arm-linux-nat.c (fetch_fpregister): Use PTRACE_GETREGSET. (fetch_fpregs): Likewise. * arm-linux-nat.c (store_fpregister): Use PTRACE_SETREGSET. (store_fpregs): Likewise. commit 10766686b02fce9eedd6217ca76f457106a8142c Author: Yao Qi Date: Mon Jun 1 12:13:02 2015 +0100 Fetch and store GP registers by PTRACE_{G,S}ETREGSET If kernel supports PTRACE_GETREGSET, GDB uses PTRACE_{G,S}ETREGSET to fetch and store GP registers. gdb: 2015-06-01 Yao Qi * arm-linux-nat.c (fetch_register): Use PTRACE_GETREGSET. (fetch_regs): Likewise. (store_regs): Use PTRACE_SETREGSET. (store_register): Likewise. commit 7efe48d196f3fb6f55fc53b8021a410848c0a677 Author: Yao Qi Date: Mon Jun 1 12:13:02 2015 +0100 Check whether kernel supports PTRACE_GETREGSET gdb: 2015-06-01 Yao Qi * arm-linux-nat.c (arm_linux_read_description): Check whether kernel supports PTRACE_GETREGSET. commit 433bbbf8574a04c1639c5466fd7c320b510b9512 Author: Yao Qi Date: Mon Jun 1 12:13:02 2015 +0100 Move have_ptrace_getregset to linux-nat.c I'll let arm-linux-nat.c to use PTRACE_GETREGSET if kernel supports, so this patch is to move have_ptrace_getregset from x86-linux-nat.c to linux-nat.c. gdb: 2015-06-01 Yao Qi * x86-linux-nat.c (have_ptrace_getregset): Move it to ... * linux-nat.c: ... here. * x86-linux-nat.h (have_ptrace_getregset): Move the declaration to ... * linux-nat.h: ... here. commit ca9b78ce906d588bb9aab0c6739c2dbdacd62612 Author: Yao Qi Date: Mon Jun 1 12:13:02 2015 +0100 Move PTRACE_GETREGSET and PTRACE_SETREGSET to nat/linux-ptrace.h Macros PTRACE_GETREGSET and PTRACE_SETREGSET are defined locally in some places in GDB and GDBserver. This patch is to move them to nat/linux-ptrace.h to avoid duplication. gdb: 2015-06-01 Yao Qi * amd64-linux-nat.c: Include "nat/linux-ptrace.h". * i386-linux-nat.c: Likewise. * nat/linux-ptrace.h (PTRACE_GETREGSET, PTRACE_SETREGSET): Define. * s390-linux-nat.c: Include "nat/linux-ptrace.h". (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove. * x86-linux-nat.c: Include "nat/linux-ptrace.h". * x86-linux-nat.h (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove. gdb/gdbserver: 2015-06-01 Yao Qi * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove. * linux-x86-low.c: Likewise. commit d194d186a7dd9f23f34a9aef593ce691af3c875f Author: Jan Beulich Date: Mon Jun 1 11:40:28 2015 +0200 x86/Intel: fix i386_optab[] for vcvt{,u}si2s{d,s} opcodes/ 2015-06-01 Jan Beulich * i386-tbl.h: Regenerate. commit 36e6c1400b94b9da7ba0dff5b3900a8d3e3b0c75 Author: Jiong Wang Date: Mon Jun 1 10:31:38 2015 +0100 [AArch64] BFD_RELOC_AARCH64_TLSLE_ADD_LO12 should enable overflow check BFD_RELOC_AARCH64_TLSLE_ADD_LO12 is used to generate simplest one-instruction addressing for TLS LE model when tls size is smaller 4K. Linker need to make sure there is no TLS offset overflow. 2015-06-01 Jiong Wang bfd/ * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12. * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12, that will mask off all potential high overflowed bits. ld/testsuite/ * ld-aarch64/tprel_add_lo12_overflow.s: New testcase. * ld-aarch64/tprel_add_lo12_overflow.d: Nex expectation file. * ld-aarch64/aarch64-elf.exp: Run new testcase. commit 99ad26cb0d4f9152dbe5ed03b74020cc52d84d94 Author: Jiong Wang Date: Mon Jun 1 10:26:00 2015 +0100 [AArch64] BFD Support BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15 2015-06-01 Jiong Wang bfd/ * elfnn-aarch64.c (aarch64_reloc_got_type): Support BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15. (elfNN_aarch64_final_link_relocate): Ditto. (elfNN_aarch64_gc_swap_hook): Ditto. (elfNN_aarch64_check_relocs): Ditto. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto. ld/testsuite/ * ld-aarch64/emit-relocs-313.s: New test file. * ld-aarch64/emit-relocs-313.d: Ditto. * ld-aarch64/aarch64-elf.exp: Run new test. commit a921b5bd708cc6e8afa3cf33443cda54b4e8cae6 Author: Jiong Wang Date: Mon Jun 1 10:22:15 2015 +0100 [AArch64] GAS Support BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15 2015-06-01 Jiong.Wang bfd/ * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15. gas/ * config/tc-aarch64.c (reloc_table): New relocation modifiers. (md_apply_fix): Support BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15. (aarch64_force_relocation): Ditto. gas/testsuite/ * gas/aarch64/reloc-insn.s: New testcase. * gas/aarch64/reloc-insn.d: Ditto. commit 3a8547d2fb5319890dda877fb313822053083c3a Author: Jan Beulich Date: Mon Jun 1 09:51:28 2015 +0200 x86/Intel: disassemble vcvt{,u}si2s{d,s} with correct operand order As pointed out before, the documentation mandates the rounding mode to follow the GPR, so disassembler should produce output accordingly. gas/testsuite/ 2015-06-01 Jan Beulich * gas/i386/avx512f.s: Adjust operand order for Intel syntax vcvt{,u}si2ss. * gas/i386/x86-64-avx512f.s: Adjust operand order for Intel syntax vcvt{,u}si2s{d,s}. opcodes/ 2015-06-01 Jan Beulich * i386-dis.c (print_insn): Swap rounding mode specifier and general purpose register in Intel mode. commit 015c54d5a6a052f074fab168bc70296131276e80 Author: Jan Beulich Date: Mon Jun 1 09:50:00 2015 +0200 x86/Intel: accept mandated operand order for vcvt{,u}si2s{d,s} As pointed out before, the documentation mandates the rounding mode to follow the GPR, so gas should accept such input. As the brojen code got released already we sadly will need to continue to also accept the badly ordered operands. gas/testsuite/ 2015-06-01 Jan Beulich * gas/i386/avx512f-intel.d: Adjust expectations on operand order. * gas/i386/evex-lig256-intel.d: Likewise. * gas/i386/evex-lig512-intel.d: Likewise. * gas/i386/x86-64-avx512f-intel.d: Likewise. * gas/i386/x86-64-evex-lig256-intel.d: Likewise. * gas/i386/x86-64-evex-lig512-intel.d: Likewise. opcodes/ 2015-06-01 Jan Beulich * i386-opc.tbl: New IntelSyntax entries for vcvt{,u}si2s{d,s}. * i386-tbl.h: Regenerate. commit b2e38b610c237b159578a595537d9c1137e7a6a0 Author: GDB Administrator Date: Mon Jun 1 00:00:08 2015 +0000 Automatic date update in version.in commit fd59d950bab2a36d6fd851ace41a17a1bd9bd5fc Author: GDB Administrator Date: Sun May 31 00:00:07 2015 +0000 Automatic date update in version.in commit 99cee7b71f81a9d346fc1a2f4e678537f1bb945f Author: Eli Zaretskii Date: Sat May 30 13:05:53 2015 +0300 Unbreak DJGPP build of GDB. gdb/ * go32-nat.c (go32_xfer_memory): Fix the return value to be compatible to what read_child and write_child return. This unbreaks that DJGPP build of GDB which was broken since v7.7. commit 6809615b88590aa911fe71839ec753cfaedf987d Author: GDB Administrator Date: Sat May 30 00:00:12 2015 +0000 Automatic date update in version.in commit 2147f5bd6505ad9266e6563580036fc1a17f1ad5 Author: Martin Galvan Date: Fri May 29 20:44:22 2015 -0300 Add myself to the Write After Approval list. commit c8f6c93cb29febd6b8174a20eb35368e70f62faa Author: Roland McGrath Date: Fri May 29 09:24:36 2015 -0700 PR gdb/18464: Do not crash on unrecognized GNU .note.ABI-tag values Diagnosis of unexpected input (in this case, in an executable file) should not crash as if it were a bug in GDB. gdb/ PR gdb/18464 * osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Use warning rather than internal_error for an unrecognized value. commit 14ae95f2208258d5957f47a3185fc5b068e18a5a Author: Roland McGrath Date: Fri May 29 09:13:53 2015 -0700 Recognize GNU_ABI_TAG_SYLLABLE and GNU_ABI_TAG_NACL. binutils/ * readelf.c (print_gnu_note: NT_GNU_ABI_TAG): Recognize GNU_ABI_TAG_SYLLABLE and GNU_ABI_TAG_NACL. include/elf/ * common.h (GNU_ABI_TAG_SYLLABLE): New macro. (GNU_ABI_TAG_NACL): New macro. commit 32c17175af60999fdbe4f2b187ba320d2171de8c Author: Stephen Kitt Date: Fri May 29 11:51:41 2015 +0100 Fix building PE test executables in environments where $CFLAGS is needed. * ld-pe/pe-run2.exp (test_direct2_link_dll): Add $CFLAGS to the compiler command line. commit 8c6a948dbe1d6587058a85c31f4c9f5cf13bb464 Author: Max Filippov Date: Mon May 18 01:39:40 2015 +0300 xtensa: fix access to the last pseudo register Currently access to the last pseudo register is aliased to a1. This is done by little snippets in the beginning of xtensa_pseudo_register_read and xtensa_pseudo_register_write that used to do such aliasing for FP register since bdb4c075a29dd086f0868b394b488b1c94666be6, but then FP_ALIAS was expanded into gdbarch_num_regs (current_gdbarch) + gdbarch_num_pseudo_regs (current_gdbarch) (one register past the last pseudo register) in 304fe2552d6e0821e8fdb7575f8e7ba6607a076d, which then was changed to the last pseudo register in 94a0e877111421d300d26b858bd3a0a27078d1e8. Drop these snippets. 2015-05-29 Max Filippov gdb/ * xtensa-tdep.c (xtensa_pseudo_register_read) (xtensa_pseudo_register_write): Don't alias last pseudo register to a1. commit 030f4c7f08246bdc79d74c4c297729003773b67c Author: Stephen Kitt Date: Fri May 29 11:03:03 2015 +0100 Fixes a couple of bugs reported in dlltool. * dlltool.c (make_one_lib_file): Clear .idata$6 before use. (main): Fail if the output file specified by the -z option cannot be opened. commit 4fb18d37fdcbf3756ce9018e68f1bdc40d4abc1f Author: GDB Administrator Date: Fri May 29 00:00:08 2015 +0000 Automatic date update in version.in commit 2f0c68f23bb3132cd5ac466ca8775c0d9e4960cd Author: Catherine Moore Date: Thu May 28 14:50:36 2015 -0700 Compact EH Support The specification for the Compact EH format is available at: https://github.com/MentorEmbedded/cxx-abi/blob/master/MIPSCompactEH.pdf 2015-05-28 Catherine Moore Bernd Schmidt Paul Brook bfd/ * bfd-in2.h: Regenerated. * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define. (COMPACT_EH_CANT_UNWIND_OPCODE): Define. (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from eh_frame_hdr_info. (compact_eh_frame_hdr_info): Declare. (eh_frame_hdr_info): Redeclare with union for dwarf-specific fields and compact-eh fields. (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding. (bfd_elf_section_data): Add eh_frame_entry_field. (elf_section_eh_frame_entry): Define. (bfd_elf_parse_eh_frame_entries): Declare. (_bfd_elf_parse_eh_frame_entry): Declare. (_bfd_elf_end_eh_frame_parsing): Declare. (_bfd_elf_write_section_eh_frame_entry): Declare. (_bfd_elf_eh_frame_entry_present): Declare. (_bfd_elf_section_for_symbol): Declare. * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function. (bfd_elf_record_eh_frame_entry): New function. (_bfd_elf_parse_eh_frame_entry): New function. (_bfd_elf_parse_eh_frame): Update hdr_info field references. (cmp_eh_frame_hdr): New function. (add_eh_frame_hdr_terminator): New function. (_bfd_elf_end_eh_frame_parsing): New function. (find_merged_cie): Update hdr_info field references. (_bfd_elf_discard_section_eh_frame): Likewise. (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support. (_bfd_elf_eh_frame_entry_present): New function. (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support. (_bfd_elf_write_section_eh_frame_entry): New function. (_bfd_elf_write_section_eh_frame): Update hdr_info field references. (_bfd_elf_fixup_eh_frame_hdr): New function. (write_compact_eh_frame_hdr): New function. (write_dwarf_eh_frame_hdr): New function. (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support. * elflink.c (_bfd_elf_section_for_symbol): New function. (elf_section_ignore_discarded_relocs): Add Compact EH support. (elf_link_input_bfd): Likewise. (bfd_elf_final_link): Likewise. (_bfd_elf_gc_mark): Likewise. (bfd_elf_parse_eh_frame_entries): New function. (bfd_elf_gc_sections): Add Compact EH support. (bfd_elf_discard_info): Likewise. * elfxx-mips.c: Include dwarf2.h. (_bfd_mips_elf_compact_eh_encoding): New function. (_bfd_mips_elf_cant_unwind_opcode): New function. * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare. (_bfd_mips_elf_cant_unwind_opcode): Declare. (elf_backend_compact_eh_encoding): Define. (elf_backend_cant_unwind_opcode): Define. * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default. (elf_backend_cant_unwind_opcode): Provide default. (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and elf_backend_cant_unwind_opcode. * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition. gas/ * config/tc-alpha.c (all_cfi_sections): Declare. (s_alpha_ent): Initialize all_cfi_sections. (alpha_elf_md_end): Invoke cfi_set_sections. * config/tc-mips.c (md_apply_fix): Handle BFD_RELOC_NONE. (s_ehword): Use BFD_RELOC_32_PCREL. (mips_fix_adjustable): Handle BFD_RELOC_32_PCREL. (mips_cfi_reloc_for_encoding): New function. * tc-mips.h (DWARF2_FDE_RELOC_SIZE): Redefine. (DWARF2_FDE_RELOC_ENCODING): Define. (tc_cfi_reloc_for_encoding): Define. (mips_cfi_reloc_for_encoding): Define. (tc_compact_eh_opcode_stop): Define. (tc_compact_eh_opcode_pad): Define. * doc/as.texinfo: Document Compact EH extensions. * doc/internals.texi: Likewise. * dw2gencfi.c (EH_FRAME_LINKONCE): Redefine. (tc_cfi_reloc_for_encoding): Provide default. (compact_eh): Declare. (emit_expr_encoded): New function. (get_debugseg_name): Add Compact EH support. (alloc_debugseg_item): Likewise. (cfi_set_sections): New function. (dot_cfi_fde_data): New function. (dot_cfi_personality_id): New function. (dot_cfi_inline_lsda): New function. (cfi_pseudo_table): Add cfi_fde_data, cfi_personality_id, and cfi_inline_lsda. (dot_cfi_personality): Add Compact EH support. (dot_cfi_lsda): Likewise. (dot_cfi_sections): Likewise. (dot_cfi_startproc): Likewise. (get_cfi_seg): Likewise. (output_compact_unwind_data): New function. (output_cfi_insn): Add Compact EH support. (output_cie): Likewise. (output_fde): Likewise. (cfi_finish): Likewise. (cfi_emit_eh_header): New function. (output_eh_header): New function. * dw2gencfi.h (cfi_set_sections): Declare. (SUPPORT_COMPACT_EH): Define. (MULTIPLE_FRAME_SECTIONS): Define. New enumeration to describe the Compact EH header format. (fde_entry): Add new fields personality_id, eh_header_type, eh_data_size, eh_data, eh_loc and sections. (CFI_EMIT_eh_frame, CFI_EMIT_debug_frame, CFI_EMIT_target, CFI_EMIT_eh_frame_compact): Define. 2015-05-22 Catherine Moore Bernd Schmidt gas/testsuite/ * gas/mips/mips.exp: Run new tests. * gas/mips/compact-eh-1.s: New file. * gas/mips/compact-eh-2.s: New file. * gas/mips/compact-eh-3.s: New file. * gas/mips/compact-eh-4.s: New file. * gas/mips/compact-eh-5.s: New file. * gas/mips/compact-eh-6.s: New file. * gas/mips/compact-eh-7.s: New file. * gas/mips/compact-eh-eb-1.d: New file. * gas/mips/compact-eh-eb-2.d: New file. * gas/mips/compact-eh-eb-3.d: New file. * gas/mips/compact-eh-eb-4.d: New file. * gas/mips/compact-eh-eb-5.d: New file. * gas/mips/compact-eh-eb-6.d: New file. * gas/mips/compact-eh-eb-7.d: New file. * gas/mips/compact-eh-el-1.d: New file. * gas/mips/compact-eh-el-2.d: New file. * gas/mips/compact-eh-el-3.d: New file. * gas/mips/compact-eh-el-4.d: New file. * gas/mips/compact-eh-el-5.d: New file. * gas/mips/compact-eh-el-6.d: New file. * gas/mips/compact-eh-el-7.d: New file. * gas/mips/compact-eh-err1.l: New file. * gas/mips/compact-eh-err1.s: New file. * gas/mips/compact-eh-err2.l: New file. * gas/mips/compact-eh-err2.s: New file. 2015-05-22 Catherine Moore include/ * bfdlink.h: Rename eh_frame_hdr to eh_frame_hdr_type. 2015-05-22 Catherine Moore Paul Brook ld/ * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Add Compact EH support. * scripttempl/elf.sc: Handle .eh_frame_entry and .gnu_extab sections. 2015-05-22 Catherine Moore ld/testsuite/ * ld-mips-elf/compact-eh.ld: New linker script. * ld-mips-elf/compact-eh1.d: New. * ld-mips-elf/compact-eh1.s: New. * ld-mips-elf/compact-eh1a.s: New. * ld-mips-elf/compact-eh1b.s: New. * ld-mips-elf/compact-eh2.d: New. * ld-mips-elf/compact-eh2.s: New. * ld-mips-elf/compact-eh3.d: New. * ld-mips-elf/compact-eh3.s: New. * ld-mips-elf/compact-eh3a.s: New. * ld-mips-elf/compact-eh4.d: New. * ld-mips-elf/compact-eh5.d: New. * ld-mips-elf/compact-eh6.d: New. * ld-mips-elf/mips-elf.exp: Run new tests. commit e970cb3401cf549accc92452f4888440fb983f39 Author: Don Breazeal Date: Thu May 28 13:36:05 2015 -0700 Disable exec-dependent follow vfork tests for remote The native-extended-gdbserver target now supports fork events and follow fork, but it does not yet support exec events. Some of the tests in gdb.base/foll-vfork.exp depend on exec events. This patch disables those tests for remote targets. We can re-enable these once the exec event support goes in. gdb/testsuite/ * gdb.base/foll-vfork.exp (main): Disable exec-dependent tests for remote targets by checking is_target_gdbserver. commit bfacd19d64c76b740a4a9c18dce4277e4a9afde5 Author: Don Breazeal Date: Thu May 28 13:12:01 2015 -0700 Initialize last_resume_kind for remote fork child This patch fixes some intermittent test failures in gdb.base/foll-vfork.exp where a vfork child would be (incorrectly) resumed when handling the vfork event. In this case the result was a subsequent event reported to the client side as a SIGTRAP delivered to the as-yet-unknown child thread. The new thread was resumed (incorrectly) in linux-low.c when resume_stopped_resumed_lwps was called from linux_wait_for_event_filtered after the vfork event had been handled in handle_extended_wait. Gdbserver/linux-low.c's add_thread function creates threads with last_resume_kind == resume_continue by default. This field is used by resume_stopped_resumed_lwps to decide whether to perform the resume: static void resume_stopped_resumed_lwps (struct inferior_list_entry *entry) { struct thread_info *thread = (struct thread_info *) entry; struct lwp_info *lp = get_thread_lwp (thread); if (lp->stopped && !lp->status_pending_p && thread->last_resume_kind != resume_stop && thread->last_status.kind == TARGET_WAITKIND_IGNORE) { So the fix is to make sure to set thread->last_resume_kind to resume_stop. Here we do that for new fork children in gdbserver/linux-low.c:handle_extended_wait. In addition, it seemed prudent to initialize lwp_info.status_pending_p for the new fork child. I also rearranged the initialization code so that all of the lwp_info initialization was together, rather than intermixed with thread_info and process_info initialization. Tested native, native-gdbserver, native-extended-gdbserver on x86_64 GNU/Linux. gdb/gdbserver/ * linux-low.c (handle_extended_wait): Initialize thread_info.last_resume_kind for new fork children. commit 8dd06f7a89b6eb7b646349f50746b3d2e85ed5de Author: Don Breazeal Date: Thu May 28 14:26:03 2015 -0700 Make remote follow fork 'Detaching' message match native This patch fixes a couple of failures in gdb.base/foll-vfork.exp for extended-remote targets. The failures were the result of the verbose/debug "Detaching..." messages in infrun.c:follow_fork_inferior not matching what was expected in the extended-remote case. The path modifies the ptids used in the messages to ensure that they print "process nnn" instead of (possibly) "Thread nnn.nnn". The detach is a process-wide operation, so we need to use a process- style ptid regardless of what type of ptid target_pid_to_str returns. Tested on x86_64 GNU/Linux, native, remote, extended-remote. gdb/ * infrun.c (follow_fork_inferior): Ensure the use of process-style ptids (pid,0,0) in verbose/debug "Detaching" messages. commit a051152b640c8bd1286ae71410f0b861ee158691 Author: Doug Evans Date: Thu May 28 09:42:02 2015 -0700 * dwarf2read.c (record_line_ftype): Remove, duplicate. gdb/Changelog: * dwarf2read.c (record_line_ftype): Remove, duplicate. commit a56cc1ce222a9c69fd117a8a6f23817f4f1abd5f Author: Yao Qi Date: Thu May 28 10:19:30 2015 +0100 Remove global variable arm_linux_has_wmmx_registers in arm-linux-nat.c This patch is to remove the global variable arm_linux_has_wmmx_registers in arm-linux-nat.c, and add a new field have_wmmx_registers in 'struct gdbarch_tdep'. gdb: 2015-05-28 Yao Qi * arm-linux-nat.c (arm_linux_has_wmmx_registers): Remove. (arm_linux_fetch_inferior_registers): Use tdep->have_wmmx_registers instead of arm_linux_has_wmmx_registers. (arm_linux_store_inferior_registers): Likewise. (arm_linux_read_description): Don't set arm_linux_has_wmmx_registers. * arm-tdep.c (arm_gdbarch_init): Set tdep->have_wmmx_registers according target descriptions. * arm-tdep.h (struct gdbarch_tdep) : New field. commit 330c6ca9a034902cb0e7c7a9f64af651f39b5bf9 Author: Yao Qi Date: Thu May 28 10:19:30 2015 +0100 Remove global variable arm_linux_vfp_register_count in arm-linux-nat.c This patch is to remove the global variable arm_linux_vfp_register_count from arm-linux-nat.c. This global variable is set when native gdb looks for the right target description according HWCAP. However, 'struct gdbarch_tdep' has already had a field have_vfp_registers, which is a boolean about whether target has vfp registers or not. This patch converts this boolean field to a numeric counter to replace global variable arm_linux_vfp_register_count. gdb: 2015-05-28 Yao Qi * arm-linux-nat.c (arm_linux_vfp_register_count): Remove. (fetch_vfp_regs): Use vfp_register_count from gdbarch_tdep instead of arm_linux_vfp_register_count. (store_vfp_regs): Likewise. (arm_linux_fetch_inferior_registers): Likewise. (arm_linux_store_inferior_registers): Likewise. (arm_linux_read_description): Don't set arm_linux_vfp_register_count. * arm-linux-tdep.c (arm_linux_iterate_over_regset_sections): Adjust. * arm-tdep.c (arm_gdbarch_init): Add assert on vfp_register_count. * arm-tdep.h (struct gdbarch_tdep) : Rename field to vfp_register_count. All users updated. commit d403db2720ef6ac091dd1c0101ffc60242199528 Author: Kyle Huey Date: Thu May 28 09:12:12 2015 +0100 Do arm_abi detection for ELFOSABI_GNU binaries On ARM systems, gdb must determine which style of breakpoint to use (see the comments at the beginning of gdb/arm-linux-tdep.c). In arm_gdbarch_init we only attempt to extract the eabi version from the ELF binary if it is a ELFOSABI_NONE binary. If the binary is ELFOSABI_GNU instead, we end up defaulting to the old style OABI syscall breakpoint instruction. On a Linux kernel built without CONFIG_OABI_COMPAT, this triggers a SIGILL in ld when attempting to execute any ELFOSABI_GNU program. (e.g. https://github.com/raspberrypi/linux/issues/766) gdb/ 2015-05-28 Kyle Huey (tiny patch) * gdb/arm-tdep.c (arm_gdbarch_init): Perform arm_abi detection on ELFOSABI_GNU binaries. commit 124b4f8708f534e44787d7edf22d214d2ec225be Author: GDB Administrator Date: Thu May 28 00:00:08 2015 +0000 Automatic date update in version.in commit d9b3de22f33e400f7f409cce3acf6c7dab07dd79 Author: Doug Evans Date: Wed May 27 14:44:29 2015 -0700 Add struct to record dwarf line number state machine. gdb/ChangeLog: * dwarf2read.c (lnp_state_machine): New typedef. (lnp_reader_state): New typedef. (dwarf_record_line_1): Renamed from dwarf_record_line. All callers updated. (dwarf_record_line): New function. (init_lnp_state_machine): New function. (check_line_address): Replace p_record_line parameter with state. All callers updated. (dwarf_decode_lines_1): Call dwarf_record_line, init_lnp_state_machine. Update to record state in lnp_state_machine. commit 8ded2ddc8bac501c1ee0706cb3d3ef3fb1c10b85 Author: H.J. Lu Date: Wed May 27 14:32:24 2015 -0700 Convert PLT reloc only if pointer equality isn't needed When pointer equality needed, we can't replace PLT relocations with GOT relocations for -z now. This patch checks if pointer equality is needed before converting PLT relocations to GOT relocations. bfd/ PR binutils/18458 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section for now binding only if pointer equality isn't needed. (elf_i386_allocate_dynrelocs): Use .plt.got section for now binding only if pointer equality isn't needed. * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got section for now binding only if pointer equality isn't needed. (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now binding only if pointer equality isn't needed. ld/testsuite/ PR binutils/18458 * ld-elf/shared.exp (build_tests): Build libpr18458a.so and libpr18458b.so. (run_tests): Run pr18458 test. * ld-elf/pr18458a.c: New file. * ld-elf/pr18458b.c: Likewise. * ld-elf/pr18458c.c: Likewise. commit 924c2928ae3f7a9fa1130103e6a83ff2b1ff17dd Author: Doug Evans Date: Wed May 27 13:22:02 2015 -0700 dwarf2read.c code cleanup, split out check_line_address gdb/ChangeLog: * dwarf2read.c (record_line_ftype): New typedef. (check_line_address): New function. (dwarf_decode_lines_1): Call it. commit 27e0867f4da863cf4e0cf9a297ae86598419729f Author: Doug Evans Date: Wed May 27 12:55:19 2015 -0700 Add set/show debug dwarf-line. gdb/ChangeLog: * NEWS: Mention "set debug dwarf-line". * dwarf2read.c (dwarf_line_debug): New static global. (add_include_dir): Add debug dwarf-line support. (add_file_name, dwarf_record_line, dwarf_finish_line): Ditto. (_initialize_dwarf2_read): New parameter "debug dwarf-line". gdb/doc/ChangeLog: * gdb.texinfo (Debugging Output): Mention set/show debug dwarf-line. commit 4dcabcc2b5d82dca1089f87e5830a8cd3b5a4bd6 Author: Doug Evans Date: Wed May 27 12:17:37 2015 -0700 Don't ignore domain in nested lookups. gdb/ChangeLog: * cp-namespace.c (cp_lookup_nested_symbol): New arg "domain". All callers updated. (cp_lookup_nested_symbol_1, find_symbol_in_baseclass): Ditto. * cp-support.h (cp_lookup_nested_symbol): Update. commit b2e2f908b863c27abb00108a03ebe2598baec55c Author: Doug Evans Date: Wed May 27 11:50:38 2015 -0700 PR symtab/18258 gdb/ChangeLog: * block.c (block_find_symbol): New function. (block_find_non_opaque_type): Ditto. (block_find_non_opaque_type_preferred): Ditto. * block.h (block_symbol_matcher_ftype): New typedef. (block_find_symbol): Declare. (block_find_non_opaque_type): Ditto. (block_find_non_opaque_type_preferred): Ditto. * dwarf2read.c (dw2_lookup_symbol): Call block_find_symbol. * psymtab.c (psym_lookup_symbol): Ditto. * symtab.c (basic_lookup_transparent_type_1): New function. (basic_lookup_transparent_type): Call it. gdb/testsuite/ChangeLog: * gdb.dwarf2/opaque-type-lookup-2.c: New file. * gdb.dwarf2/opaque-type-lookup.c: New file. * gdb.dwarf2/opaque-type-lookup.exp: New file. commit f62fce356bf1df27e01fc40a3a277fc924019ee7 Author: Yao Qi Date: Wed May 27 11:08:40 2015 +0100 [aarch64] Handle unknown instruction encoding We see the following build error: gdb/aarch64-tdep.c: In function 'aarch64_process_record': gdb/aarch64-tdep.c:2823:17: error: 'record_buf[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized] memcpy(®S[0], &RECORD_BUF[0], sizeof(uint32_t)*LENGTH); \ ^ gdb/aarch64-tdep.c:3529:12: note: 'record_buf[0]' was declared here uint32_t record_buf[2]; since record_buf[0] isn't initialized in some paths in which instruction encodings doesn't exist in current ARMv8 reference manual. This patch is to let the function return AARCH64_RECORD_UNKNOWN for these paths. gdb: 2015-05-27 Yao Qi * aarch64-tdep.c (aarch64_record_data_proc_simd_fp): Return AARCH64_RECORD_UNKNOWN for unknown instruction encoding. commit 5d98d3cd862ab5d463f71926788d52bf1b30ef79 Author: Yao Qi Date: Wed May 27 11:29:24 2015 +0100 Fix ARI warnings in aarch64-tdep.c This patch fixes some ARI warnings: $ bash ./gdb/contrib/ari/gdb_ari.sh -Wall -Werror -Wari gdb/aarch64-tdep.c gdb/aarch64-tdep.c:3009: code: Do not use &&, or || at the end of a line gdb/aarch64-tdep.c:3010: code: Do not use &&, or || at the end of a line gdb/aarch64-tdep.c:3413: code: Do not use &&, or || at the end of a line gdb/aarch64-tdep.c:3460: code: Do not use &&, or || at the end of a line This patch moves && from the end of line to the start of the line. gdb: 2015-05-27 Yao Qi * aarch64-tdep.c (aarch64_record_branch_except_sys): Split lines before operator &&. (aarch64_record_load_store): Likewise. commit 82c7be3106bbbf753f441f8a8113f2cac5e7cba8 Author: Doug Evans Date: Tue May 26 17:20:49 2015 -0700 PR c++/18141, c++/18417. gdb/ChangeLog: * cp-support.c (cp_lookup_rtti_type): Handle the case of NAME being a typedef. gdb/testsuite/ChangeLog: * gdb.cp/iostream.cc: New file. * gdb.cp/iostream.exp: New file. commit 04e40a033b6aab98f6ecf4bdb0cb7101f25fba27 Author: GDB Administrator Date: Wed May 27 00:00:09 2015 +0000 Automatic date update in version.in commit b4f5498457d0648811a9cc9d34d3c6635509dffc Author: Doug Evans Date: Tue May 26 16:50:57 2015 -0700 Rename dwarf2 to dwarf in "set debug" and maintenance commands. gdb/ChangeLog: * NEWS: Add entries for command renamings. * dwarf2read.c (dwarf_read_debug): Renamed from dwarf2_read_debug. All uses updated. (dwarf_die_debug): Renamed from dwarf2_die_debug. All uses updated. (dwarf_max_cache_age): Renamed from dwarf2_max_cache_age. All uses updated. (show_dwarf_max_cache_age): Renamed from show_dwarf2_max_cache_age. All callers updated. Fix spelling of DWARF in help text. (set_dwarf_cmdlist): Renamed from set_dwarf2_cmdlist. All uses updated. (show_dwarf_cmdlist): Renamed from show_dwarf2_cmdlist. All uses updated. (set_dwarf_cmd): Renamed from set_dwarf2_cmd. All callers updated. (show_dwarf_cmd): Renamed from show_dwarf2_cmd. All callers updated. (dwarf_always_disassemble): Renamed from dwarf_always_disassemble. All uses updated. (show_dwarf_always_disassemble): Renamed from show_dwarf2_always_disassemble. All callers updated. (_initialize_dwarf2_read): Rename "set/show dwarf2" prefix to "set/show dwarf". Rename "set/show dwarf2 max-cache-age" to "set/show dwarf max-cache-age". Rename "set/show dwarf2 always-disassemble" to "set/show dwarf always-disassemble". Rename "set/show debug dwarf2-read" to "set/show debug dwarf-read". Rename "set/show debug dwarf2-die" to "set/show debug dwarf-die". gdb/doc/ChangeLog: * gdb.texinfo (Debugging Output): Update for DWARF "set debug" command renamings. (Maintenance Commands): Update for DWARF "set debug" command renamings. gdb/testsuite/ChangeLog: * gdb.dwarf2/dw2-op-call.exp: Update. * gdb.dwarf2/dw4-sig-types.exp: Update. * gdb.dwarf2/implptr.exp: Update. * gdb.mi/mi-cmd-param-changed.exp: Update. commit 4ea6efe9365f8a87723fe01a2dd8ddf5cdec1498 Author: Doug Evans Date: Tue May 26 16:13:04 2015 -0700 PR python/18438 gdb/ChangeLog: * python/py-lazy-string.c (stpy_convert_to_value): Use gdbpy_gdb_memory_error not PyExc_MemoryError. (gdbpy_create_lazy_string_object): Ditto. gdb/testsuite/ChangeLog: * gdb.python/py-lazy-string.c: New file. * gdb.python/py-lazy-string.exp: New file. * gdb.python/py-prettyprint.c (lazystring) : New member. (main): Update. Add estring3. * gdb.python/py-prettyprint.exp: Add tests for strings at address 0. * gdb.python/py-prettyprint.py (pp_ls): Handle length. commit b93fd21dccc2cfa9a335ddba7435a341b49330ae Author: Andrew Burgess Date: Tue May 26 22:31:23 2015 +0100 gdb: tui: Minor fix to compare against NULL. Minor coding standard fix to compare against NULL. gdb/ChangeLog: * tui/tui-regs.c (tui_reg_next_command): Compare against NULL. commit 55b400279267cad460ca62a8211f0b414f564e93 Author: Andrew Burgess Date: Thu May 21 21:51:53 2015 +0200 gdb: Add 'tui reg prev' command. There is already a 'tui reg next' command, this adds a symmetric 'tui reg prev' command. gdb/ChangeLog: * tui/tui-regs.c (tui_reg_prev_command): New function. (_initialize_tui_regs): Add 'prev' command for 'tui reg'. * reggroups.c (reggroup_prev): New function. * reggroups.h (reggroup_prev): Add declaration. Update comment. gdb/doc/ChangeLog: * gdb.texinfo (TUI Commands): Add 'tui reg prev' details. commit 7e16ef34742d853239608fadde4a19f3a105b0a2 Author: Ed Maste Date: Mon May 25 12:12:12 2015 -0400 All FreeBSD targets are ELF except i?86-*-freebsd\[12\].*. FreeBSD has used ELF for all targets for more than 15 years. Add *-*-freebsd* except i?86-*-freebsd\[12\].* to is_elf_format. Update is_aout_format to include a trailing dot, so that it does not match freebsd-10.0 and later. commit f6bb7db35da7b1d150a467f97c41d5bf72c3baf5 Author: Yao Qi Date: Tue May 19 11:34:36 2015 +0100 New gdb.reverse test case for aarch64 instructions This patch adds a test case to test the process record for some of aarch64 instructions. In each function, GDB turns on process record, and single step until program goes to the end of the function. Then, single step backward. In each of forward single step and backward single step, the contents of registers are saved, and test compares them. If there is any differences, a FAIL is emitted. The test is flexible, and we can test other instructions easily in the future. gdb/testsuite: 2015-05-26 Omair Javaid Yao Qi * gdb.reverse/aarch64.c: New. * gdb.reverse/aarch64.exp: New. commit a81bfbd06b949518055b21d19f47332edbd992e0 Author: Omair Javaid Date: Mon May 11 12:10:56 2015 +0100 Enables gdb.reverse testsuite for aarch64*-linux targets This patch enable gdb.reverse tests for aarch64*-linux targets. With this patch, there are 7 FAILs in gdb.reverse/ tests. FAIL: gdb.reverse/finish-reverse-bkpt.exp: reverse-finish from void_func trips breakpoint at entry FAIL: gdb.reverse/finish-reverse-bkpt.exp: no spurious proceed after breakpoint stop FAIL: gdb.reverse/next-reverse-bkpt-over-sr.exp: reverse-next over call trips user breakpoint at function entry FAIL: gdb.reverse/step-precsave.exp: reverse step into fn call FAIL: gdb.reverse/step-precsave.exp: reverse step out of called fn FAIL: gdb.reverse/step-reverse.exp: reverse step into fn call FAIL: gdb.reverse/step-reverse.exp: reverse step out of called fn gdb/testsuite: 2015-05-26 Omair Javaid * lib/gdb.exp (supports_process_record): Return true for aarch64*-linux*. (supports_reverse): Likewise. commit 99afc88b396045cfe3755bede41a45ad3bed021d Author: Omair Javaid Date: Mon May 11 12:10:46 2015 +0100 Implements aarch64 process record and reverse debugging support This patch adds the support of aarch64-linux process record and reverse debugging. The implementation is similar to ARM's counterpart. 2015-05-26 Omair Javaid Yao Qi * aarch64-linux-tdep.c: Include linux-record.h and record-full.h. (struct linux_record_tdep aarch64_linux_record_tdep): Declare. (aarch64_syscall): New enum. (aarch64_canonicalize_syscall): New function. (aarch64_all_but_pc_registers_record): New function. (aarch64_linux_syscall_record): New function. (aarch64_linux_init_abi): Install AArch64 process record handler. Update to handle syscall recording. * aarch64-tdep.c: Include record.h and record-full.h. (submask, bit, bits, REG_ALLOC, MEM_ALLOC): New macros. (struct aarch64_mem_r): Define. (aarch64_record_result): New enum. (struct insn_decode_record): Define. (insn_decode_record): New typedef. (aarch64_record_data_proc_reg): New function. (aarch64_record_data_proc_imm): New function. (aarch64_record_branch_except_sys): New function. (aarch64_record_load_store): New function. (aarch64_record_data_proc_simd_fp): New function. (aarch64_record_asimd_load_store): New function. (aarch64_record_decode_insn_handler): New function. (deallocate_reg_mem): New function. (aarch64_process_record): New function. * aarch64-tdep.h (struct gdbarch_tdep) : New field. (aarch64_process_record): New extern declaration. * configure.tgt: Add linux-record.o to gdb_target_obs. * linux-record.h (struct linux_record_tdep) : New field. commit c16a3f522a71a20ff6e26599d684a61ac6acecca Author: Omair Javaid Date: Mon May 11 12:10:43 2015 +0100 NEWS entry about aarch64-linux record/replay support This patch adds the NEWS entry for aarch64-linux record replay support. It has been reviewed and approved. gdb: 2015-05-26 Omair Javaid * NEWS: Add a note on process record-replay support on aarch64*-linux* targets. commit c9cf6e20c6988a7e510cfe788b1b2cfe4d0d04a7 Author: Martin Galvan Date: Tue May 26 11:59:17 2015 +0100 Rename in_function_epilogue_p to stack_frame_destroyed_p We concluded that gdbarch_in_function_epilogue_p is misnamed, since it returns true if the given PC is one instruction after the one that destroyed the stack (which isn't necessarily inside an epilogue), therefore it should be renamed to stack_frame_destroyed_p. I also took the liberty of renaming the arch-specific implementations to *_stack_frame_destroyed_p as well for consistency. gdb: 2015-05-26 Martin Galvan * amd64-tdep.c: Replace in_function_epilogue_p with stack_frame_destroyed_p throughout. * arch-utils.c: Ditto. * arch-utils.h: Ditto. * arm-tdep.c: Ditto. * breakpoint.c: Ditto. * gdbarch.sh: Ditto. * hppa-tdep.c: Ditto. * i386-tdep.c: Ditto. * mips-tdep.c: Ditto. * nios2-tdep.c: Ditto. * rs6000-tdep.c: Ditto. * s390-linux-tdep.c: Ditto. * score-tdep.c: Ditto. * sh-tdep.c: Ditto. * sparc-tdep.c: Ditto. * sparc-tdep.h: Ditto. * sparc64-tdep.c: Ditto. * spu-tdep.c: Ditto. * tic6x-tdep.c: Ditto. * tilegx-tdep.c: Ditto. * xstormy16-tdep.c: Ditto. * gdbarch.c, gdbarch.h: Re-generated. commit 4de0562a4c69fef4952aa7e19d7bda359f02e8b4 Author: Max Filippov Date: Sun May 17 06:46:15 2015 +0300 xtensa: fix gas segfault with --text-section-literals When --text-section-literals is used and code in the .init or .fini emits literal in the absence of .literal_position, xtensa_move_literals segfaults. Check that search_frag is non-NULL in the xtensa_move_literals and report error otherwise. 2015-05-26 Max Filippov gas/ * config/tc-xtensa.c (xtensa_move_literals): Check that search_frag is non-NULL. Report error if literal frag is not found. commit 8f2fd309e013e4e230df46d2dee03c5ca2228836 Author: GDB Administrator Date: Tue May 26 00:00:08 2015 +0000 Automatic date update in version.in commit f51064fe14fb870af75c59c12721870bf4a39809 Author: GDB Administrator Date: Mon May 25 00:00:08 2015 +0000 Automatic date update in version.in commit c8ab67d1a659ec98d38c0a23c6739fbe8973c0a8 Author: GDB Administrator Date: Sun May 24 00:00:08 2015 +0000 Automatic date update in version.in commit 6b3f41b5c1fbae72209d43534e076abf05143983 Author: GDB Administrator Date: Sat May 23 00:00:08 2015 +0000 Automatic date update in version.in commit 29798047afaa22335a504280a5bbdbafe2b1b63d Author: Nick Clifton Date: Fri May 22 14:27:36 2015 +0100 Fixes: "gas/read.c:5087:12: error: left shift of negative" PR gas/18446 * read.c (output_big_sleb128): Use U suffix to prevent compile time warning. commit a4ea0946c3f1badd6755b85b4e50e2ec4841e69c Author: Andrew Burgess Date: Fri May 22 10:07:42 2015 +0200 gdb: New 'tui enable' and 'tui disable' commands. Add new commands to specifically enable and disable tui mode. This is in addition to the readline bindings, but might be easier for a user to discover if they accidentally end up in tui mode. gdb/ChangeLog: * NEWS: Mention 'tui enable' and 'tui disable'. * tui/tui.c (tui_enable_command): New function. (tui_disable_command): New function. (_initialize_tui): New function. gdb/doc/ChangeLog: * gdb.texinfo (TUI): Include 'tui enable' in the introduction. (TUI Commands): Add 'tui enable' and 'tui disable' details. commit 158bf1b4aacf7f184facdc184dc9585994f041a6 Author: Patrick Palka Date: Thu May 21 18:53:03 2015 -0400 Make sure test names are unique in gdb.base/gdbinit-history.exp Use with_test_prefix to avoid duplicating test names when calling the procedure test_gdbinit_history_setting multiple times. gdb/testsuite/ChangeLog: * gdb.base/gdbinit-history.exp (test_gdbinit_history_setting): Use with_test_prefix. commit 36b0313f2f429fc26899bb4776ec47cf850dfcaf Author: GDB Administrator Date: Fri May 22 00:00:08 2015 +0000 Automatic date update in version.in commit b75c69bbf05b90a71a3ed7e54ad24ac5ded2ae1e Author: Andrew Burgess Date: Thu May 21 21:21:40 2015 +0200 gdb: Use NULL not 0 in a tui function. gdb/ChangeLog: * tui/tui-regs.c (tui_reg_next_command): Use NULL not 0. commit c1b009eed88d41b22c9faf68d0dc15967292f6c9 Author: Andrew Burgess Date: Thu May 21 00:51:23 2015 +0200 gdb: Add cleanup to avoid memory leak on error. Use cleanup to avoid leaking memory if an error occurs during tui start up. gdb/ChangeLog: * tui/tui-layout.c (tui_set_layout_for_display_command): Ensure buf_ptr is freed. commit 880d1e40c771e4a389d0b29bf196b50f1b696ea9 Author: Andrew Burgess Date: Thu May 21 00:45:26 2015 +0200 gdb: Don't call tui_enable too early. Calling tui_enable too early in tui_layout_command can leave the tui in an enabled state if the user has entered an invalid layout name. Instead postpone the call to tui_enable until later in tui_set_layout_for_display_command just before the layout is changed. gdb/ChangeLog: * tui/tui-layout.c (tui_layout_command): Move call to tui_enable into ... (tui_set_layout_for_display_command): ...here, before calling tui_set_layout. Only set the layout if gdb has not already entered the TUI_FAILURE state. commit a014503004ad016d754bc9a4b143973ee18b0bbf Author: Andrew Burgess Date: Thu Mar 26 14:13:57 2015 +0000 gdb: Add completer for layout command. Add layout name completion for the layout command. gdb/ChangeLog: * tui/tui-layout.c (layout_completer): New function. (_initialize_tui_layout): Set completer on layout command. gdb/testsuite/ChangeLog: * gdb.base/completion.exp: Add test for completion of layout names. commit 7bd0be3a9b06dda7a9f3d54402d6f594faa4a1b1 Author: Andrew Burgess Date: Wed May 20 23:35:07 2015 +0200 gdb: Remove register class specific layout names. The layout command supports the layout names $FREGS, $GREGS, $SREGS, and $REGS. The intention of these layout names was to display the tui register window with a specific set of registers. First, these layout names no longer work, and haven't for a while, using any of them will just result in switching to the general register view. Second there is already the command 'tui reg GROUP' command to set the displayed register set to GROUP, so making the layout command also control the register set feels like unnecessary overloading of the layout command. This commit removes all code relating to supporting the register set specific names from the layout command. Afterwards the user can select an available layout using the layout command, and control the choice of register set using the 'tui reg GROUP' command. gdb/ChangeLog: * tui/tui-layout.c (tui_set_layout): Remove tui_register_display_type parameter. Remove all checking of this parameter, and reindent function. Update header comment. (tui_set_layout_for_display_command): Rename to... (tui_set_layout_by_name): ...this, and don't check for different register class types, don't pass a tui_register_display_type to tui_set_layout. Update header comment. (layout_names): Remove register set specific names. * tui/tui-layout.h (tui_set_layout): Remove tui_register_display_type parameter. * tui/tui.c (tui_rl_change_windows): Don't pass a tui_register_display_type to tui_set_layout. (tui_rl_delete_other_windows): Likewise. (tui_enable): Likewise. * tui/tui-data.h (TUI_FLOAT_REGS_NAME): Remove. (TUI_FLOAT_REGS_NAME_LOWER): Remove. (TUI_GENERAL_REGS_NAME): Remove. (TUI_GENERAL_REGS_NAME_LOWER): Remove. (TUI_SPECIAL_REGS_NAME): Remove. (TUI_SPECIAL_REGS_NAME_LOWER): Remove. (TUI_GENERAL_SPECIAL_REGS_NAME): Remove. (TUI_GENERAL_SPECIAL_REGS_NAME_LOWER): Remove. (enum tui_register_display_type): Remove. (struct tui_layout_def): Remove regs_display_type and float_regs_display_type fields. (struct tui_data_info): Remove regs_display_type field. (tui_layout_command): Use new name for tui_set_layout_for_display_command. * tui/tui-data.c (layout_def): Don't initialise removed fields. (tui_clear_win_detail): Don't initialise removed fields of win_info. * tui/tui-regs.c (tui_show_registers): Use new name for tui_set_layout_for_display_command. * tui/tui.h (tui_set_layout_for_display_command): Rename declaration to... (tui_set_layout_by_name): ...this. * printcmd.c (display_command): Remove tui related layout call, and reindent. ----------------------------------------------------------------------- hooks/post-receive -- Repository for Project Archer.