arc: Pass proper CPU value to the disassembler
[external/binutils.git] / gdb / ChangeLog
1 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2
3         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4         * arc-tdep.h (arc_arch_is_em): New function.
5         (arc_arch_is_hs): Likewise.
6
7 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
8
9         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
10         parentheses in the declaration.
11         (macro_lookup_inclusion): Likewise.
12         (macro_lookup_definition): Likewise.
13         * p-lang.h (pascal_builtin_types): Likewise.
14         * tui/tui-data.c (tui_win_list): Likewise.
15         * tui/tui-data.h (tui_win_list): Likewise.
16         * utils.h (make_cleanup_free_section_addr_info): Likewise.
17
18 2017-10-11  Mark Rages  <markrages@gmail.com>
19
20         * target-memory.c (block_boundaries): Fix for block address not
21         aligned on block size.
22
23 2017-10-10  Pedro Alves <palves@redhat.com>
24             Tom Tromey  <tom@tromey.com>
25
26         * breakpoint.c (struct captured_breakpoint_query_args)
27         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
28         (print_breakpoint): New.
29         * breakpoint.h (print_breakpoint): Declare.
30         * common/common-exceptions.h (enum return_reason): Remove
31         references to catch_exceptions.
32         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
33         Delete.
34         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
35         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
36         * gdb.h: Delete.
37         * gdbthread.h (thread_select): Declare.
38         * mi/mi-cmd-break.c: Don't include gdb.h.
39         (breakpoint_notify): Use print_breakpoint.
40         * mi/mi-cmd-catch.c: Don't include gdb.h.
41         * mi/mi-interp.c: Don't include gdb.h.
42         (mi_print_breakpoint_for_event): New.
43         (mi_breakpoint_created, mi_breakpoint_modified): Use
44         mi_print_breakpoint_for_event.
45         * mi/mi-main.c: Don't include gdb.h.
46         (mi_cmd_thread_select): Parse the global thread ID here.  Use
47         thread_select instead of gdb_thread_select.
48         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
49         of using gdb_list_thread_ids.
50         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
51         FILEIO_ENOSYS here.
52         (remote_fileio_request): Use TRY/CATCH instead of
53         catch_exceptions.
54         * symfile-mem.c (struct symbol_file_add_from_memory_args)
55         (symbol_file_add_from_memory_wrapper): Delete.
56         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
57         * thread.c: Don't include gdb.h.
58         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
59         (thread_alive): Use thread_select.
60         (do_captured_thread_select): Delete, parts salvaged as ...
61         (thread_select): ... this new function.
62         (gdb_thread_select): Delete.
63
64 2017-10-10  Pedro Alves  <palves@redhat.com>
65             Tom Tromey  <tom@tromey.com>
66
67         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
68         and reverse logic.
69         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
70         No longer macros.  Instead ...
71         (enum wp_check_result): They're now values of this new
72         enumeration.
73         (watchpoint_check): Change return type to wp_check_result and
74         parameter type to bpstat.
75         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
76         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
77         catch_errors.  Reverse logic of watchpoint_check call.
78         (breakpoint_re_set_one): Now returns void and takes a breakpoint
79         pointer as parameter.
80         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
81         * common/common-exceptions.c (throw_exception_sjlj): Update
82         comments to avoid mentioning catch_errors.
83         * exceptions.c (catch_errors): Delete.
84         * exceptions.h: Update comments to avoid mentioning catch_errors.
85         (catch_errors_ftype, catch_errors): Delete.
86         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
87         (hook_stop_stub): Delete.
88         (restore_selected_frame): Change return type to void, and
89         parameter type to const frame_id &.
90         (restore_infcall_control_state): Use TRY/CATCH instead of
91         catch_errors.
92         * main.c (captured_command_loop): Return void and remove
93         parameter.  Remove references to catch_errors.
94         (captured_main): Use TRY/CATCH instead of catch_errors.
95         * objc-lang.c (objc_submethod_helper_data)
96         (find_objc_msgcall_submethod_helper): Delete.
97         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
98         catch_errors.
99         * record-full.c (record_full_message): Return void.
100         (record_full_message_args, record_full_message_wrapper): Delete.
101         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
102         instead of catch_errors.
103         * solib-aix.c (solib_aix_open_symbol_file_object): Change
104         parameter type to int.
105         * solib-darwin.c (open_symbol_file_object): Ditto.
106         * solib-dsbt.c (open_symbol_file_object): Ditto.
107         * solib-frv.c (open_symbol_file_object): Ditto.
108         * solib-svr4.c (open_symbol_file_object): Ditto.
109         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
110         * solib.c (update_solib_list): Use TRY/CATCH instead of
111         catch_errors.
112         * solist.h (struct target_so_ops) <open_symbol_file_object>:
113         Change type.
114         * symmisc.c (struct print_symbol_args): Remove.
115         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
116         (print_symbol): Change type.
117         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
118         and remove parameters.
119         (catch_errors): New.
120         (get_windows_debug_event): Adjust.
121
122 2017-10-09  Tom Tromey  <tom@tromey.com>
123
124         * mi/mi-main.c (free_splay_tree): Remove.
125         (list_available_thread_groups): Use splay_tree_up.
126         * common/gdb_splay_tree.h: New file.
127
128 2017-10-09  Tom Tromey  <tom@tromey.com>
129
130         * mi/mi-main.c (do_nothing): Remove.
131         (list_available_thread_groups): Update.
132
133 2017-10-09  Pedro Alves  <palves@redhat.com>
134
135         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
136         reading registers when switching context.
137
138 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
139
140         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
141         (fbsd_convert_siginfo): Likewise.
142         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
143
144 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
145
146         * configure.ac (try_guile_versions): Remove guile-2.2.
147         * configure: Regenerate.
148
149 2017-10-09  Tom Tromey  <tom@tromey.com>
150
151         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
152         (COMPILE.pre): Use $(CXX).
153
154 2017-10-09  Pedro Alves  <palves@redhat.com>
155
156         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
157         Use bool.
158         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
159         * cp-support.h (cp_remove_params): Now returns a
160         gdb::unique_xmalloc_ptr.
161         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
162         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
163         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
164         returning a gdb::unique_xmalloc_ptr.
165         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
166         * stack.c (find_frame_funname): Adjust to cp_remove_params
167         returning a gdb::unique_xmalloc_ptr.
168
169 2017-10-08  Tom Tromey  <tom@tromey.com>
170
171         * dwarf2read.c (dwarf2_get_dwz_file): Use
172         gdb::unique_xmalloc_ptr.
173         (find_slot_in_mapped_hash): Likewise.
174         (dwarf2_physname): Likewise.
175         (create_dwo_unit_in_dwp_v1): Use std::string.
176         (create_dwo_unit_in_dwp_v2): Likewise.
177         (lookup_dwo_cutu): Likewise.
178         (inherit_abstract_dies): Use std::vector.
179         (read_array_type): Likewise.
180         (dwarf_decode_macros): Remove unused declaration.
181         (unsigned_int_compar): Remove.
182         (dwarf2_build_psymtabs_hard): Use scoped_restore.
183         (psymtabs_addrmap_cleanup): Remove.
184
185 2017-10-08  Tom Tromey  <tom@tromey.com>
186
187         * frame-unwind.c (frame_unwind_try_unwinder): Update.
188         * frame.h (frame_cleanup_after_sniffer): Declare.
189         (frame_prepare_for_sniffer): Return void.
190         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
191         type of argument.
192         (frame_prepare_for_sniffer): Return void.
193
194 2017-10-08  Tom Tromey  <tom@tromey.com>
195
196         * utils.h (make_cleanup_value_free): Remove.
197         * utils.c (do_value_free, struct cleanup): Remove.
198         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
199         Use gdb_value_up.
200         * value.h (struct value_deleter): New.
201         (gdb_value_up): New typedef.
202
203 2017-10-08  Tom Tromey  <tom@tromey.com>
204
205         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
206         (make_cleanup_free_search_symbols): Remove.
207         (search_symbols): Return std::vector.
208         (symbol_search::compare_search_syms): Now member of
209         symbol_search.  Change arguments.
210         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
211         (symtab_symbol_info, rbreak_command): Update.
212         * symtab.h (struct symbol_search) <next>: Remove.
213         Add constructors.
214         (symbol_search::operator<): New function.
215         (symbol_search::operator==): New function.
216         (search_symbols): Remove std::vector.
217         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
218         (symbol_search::compare_search_syms): Declare.
219
220 2017-10-06  Yao Qi  <yao.qi@linaro.org>
221
222         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
223         arch/aarch64-insn.o.
224         Remove one rule.
225         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
226
227 2017-10-06  Yao Qi  <yao.qi@linaro.org>
228
229         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
230         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
231         arch/arm-linux.o respectively.
232         * configure.tgt: Likewise.
233
234 2017-10-06  Yao Qi  <yao.qi@linaro.org>
235
236         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
237         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
238
239 2017-10-06  Pedro Alves  <palves@redhat.com>
240
241         * windows-nat.c: Include <algorithm>.
242
243 2017-10-06  Yao Qi  <yao.qi@linaro.org>
244
245         * configure.tgt (i386_tobjs): New variable.
246         (amd64_tobjs): New variable.
247         Set $cpu_obs and $os_obs.
248
249 2017-10-06  Yao Qi  <yao.qi@linaro.org>
250
251         * Makefile.in (CONFIG_SRC_SUBDIR): New.
252         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
253         (clean): Remove object files and dependency files.
254         (distclean): Remove the directory.
255         * configure.ac: Invoke AC_CONFIG_COMMANDS.
256         * configure: Re-generated.
257         * configure.tgt: Replace amd64.o with arch/amd64.o.
258
259 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
260
261         PR build/22188
262         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
263         and SETEND.
264
265 2017-10-05  Pedro Alves  <palves@redhat.com>
266
267         * linux-nat.c (linux_child_follow_fork): When following the parent
268         and detaching the child, consult the parent thread's architecture
269         instead of the child's.
270
271 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
272
273         * ax.h: Do not include "doublest.h".
274         (union agent_val): Remove.
275
276 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
277
278         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
279         (decimal_to_string): Return std::string object.
280         (decimal_from_string): Accept std::string object.  Return bool.
281         (decimal_from_integral, decimal_from_doublest): Remove.
282         (decimal_from_longest): Add prototype.
283         (decimal_from_ulongest): Likewise.
284         (decimal_to_longest): Likewise.
285         (decimal_from_doublest): Likewise.
286         * dfp.c: Do not include "gdbtypes.h" or "value.h".
287         (MAX_DECIMAL_STRING): Move here.
288         (decimal_to_string): Return std::string object.
289         (decimal_from_string): Accept std::string object.  Return bool.
290         (decimal_from_integral): Remove, replace by ...
291         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
292         (decimal_to_longest): New function.
293         (decimal_from_floating): Remove, replace by ...
294         (decimal_from_doublest): ... this new function.
295         (decimal_to_doublest): Update to new decimal_to_string interface.
296
297         * value.c (unpack_long): Use decimal_to_longest.
298         * valops.c (value_cast): Use decimal_from_doublest instead of
299         decimal_from_floating.  Use decimal_from_[u]longest isntead of
300         decimal_from_integral.
301         * valarith.c (value_args_as_decimal): Likewise.
302         * valprint.c (print_decimal_floating): Update to new
303         decimal_to_string interface.
304         * printcmd.c (printf_decfloat): Likewise.
305         * c-exp.y (parse_number): Update to new decimal_from_string interface.
306
307 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
308
309         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
310         * gdbtypes.c: Include "floatformat.h".
311         * value.c: Likewise.
312         * m68k-tdep.c: Likewise.
313
314         * findvar.c: Do not include "floatformat.h".
315         * amd64-darwin-tdep.c: Likewise.
316         * arm-linux-tdep.c: Likewise.
317         * i386-darwin-tdep.c: Likewise.
318         * i387-tdep.c: Likewise.
319         * m68k-linux-tdep.c: Likewise.
320         * mep-tdep.c: Likewise.
321         * mips-tdep.c: Likewise.
322         * nios2-tdep.c: Likewise.
323         * s390-linux-tdep.c: Likewise.
324         * sparc-obsd-tdep.c: Likewise.
325         * sparc-tdep.c: Likewise.
326         * sparc64-tdep.c: Likewise.
327         * spu-tdep.c: Likewise.
328         * tic6x-tdep.c: Likewise.
329         * tilegx-tdep.c: Likewise.
330         * vax-tdep.c: Likewise.
331         * xstormy16-tdep.c: Likewise.
332         * xtensa-tdep.c: Likewise.
333
334         * top.c: Do not include "doublest.h".
335         * aarch64-tdep.c: Likewise.
336         * alpha-tdep.c: Likewise.
337         * arm-linux-tdep.c: Likewise.
338         * m68k-linux-tdep.c: Likewise.
339         * tilegx-tdep.c: Likewise.
340         * xstormy16-tdep.c: Likewise.
341
342 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
343
344         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
345         (mipsn32_fbsd_sigframe): Define.
346         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
347         for FreeBSD/mipsn32.
348
349 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
350
351         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
352         AT_HWCAP.
353
354 2017-10-05  Tristan Gingold  <tgingold@free.fr>
355
356         * MAINTAINERS (Misc): Update my email address.
357
358 2017-10-04  Pedro Alves  <palves@redhat.com>
359
360         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
361         it instead of target_gdbarch.
362         (get_remote_state, get_remote_packet_size): Adjust
363         get_remote_arch_state calls, passing down target_gdbarch
364         explicitly.
365         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
366         'gdbarch' and use it instead of target_gdbarch.
367         (get_memory_packet_size): Adjust get_remote_arch_state calls,
368         passing down target_gdbarch explicitly.
369         (struct stop_reply) <arch>: New field.
370         (remote_parse_stop_reply): Use the stopped thread's architecture,
371         not the current inferior's.  Save the architecture in the
372         stop_reply.
373         (process_stop_reply): Use the stop reply's architecture.
374         (process_g_packet, remote_fetch_registers)
375         (remote_prepare_to_store, store_registers_using_G)
376         (remote_store_registers): Adjust get_remote_arch_state calls,
377         using the regcache's architecture.
378         (remote_get_trace_status): Adjust get_remote_arch_state calls,
379         passing down target_gdbarch explicitly.
380         * spu-multiarch.c (spu_thread_architecture): Defer to the target
381         beneath instead of calling target_gdbarch.
382         * target.c (default_thread_architecture): Use the specified
383         inferior's architecture, instead of the current inferior's
384         architecture (via target_gdbarch).
385
386 2017-10-04  Pedro Alves  <palves@redhat.com>
387
388         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
389         case.
390         (regcache_print): Handle !target_has_registers here instead.
391
392 2017-10-04  Pedro Alves  <palves@redhat.com>
393
394         * frame.c (create_test_frame): Delete.
395         * frame.h (create_test_frame): Delete.
396         * gdbarch-selftests.c: Include gdbthread.h and target.h.
397         (class regcache_test): Delete.
398         (test_target_has_registers, test_target_has_stack)
399         (test_target_has_memory, test_target_prepare_to_store)
400         (test_target_store_registers): New functions.
401         (test_target_ops): New class.
402         (register_to_value_test): Error out if there's already a
403         process_stratum (or higher) target pushed.  Create a fuller mock
404         environment, with mock target_ops, inferior, address space, thread
405         and inferior_ptid.
406         * progspace.c (struct address_space): Move to ...
407         * progspace.h (struct address_space): ... here.
408         * regcache.h (regcache::~regcache, regcache::raw_write)
409         [GDB_SELF_TEST]: No longer virtual.
410
411 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
412
413         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
414
415 2017-10-04  Pedro Alves  <palves@redhat.com>
416
417         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
418         out of 'between TRY and CATCH'.
419
420 2017-10-04  Pedro Alves  <palves@redhat.com>
421
422         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
423         * common/common-exceptions.h (TRY): Open an outermost scope.
424         Expand intro comment.
425         (CATCH): Reindent.
426         (END_CATCH): Close the outermost scope.
427         * completer.c (complete_line_internal): Add missing END_CATCH.
428
429 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
430
431         * NEWS (Changes since GDB 8.0): Add entry about new
432         'set-cwd-on-gdbserver' feature.
433         (New remote packets): Add entry for QSetWorkingDir.
434         * common/common-inferior.h (set_inferior_cwd): New prototype.
435         * infcmd.c (set_inferior_cwd): Remove "static".
436         (show_cwd_command): Expand text to include remote debugging.
437         * remote.c: Add PACKET_QSetWorkingDir.
438         (remote_protocol_features) <QSetWorkingDir>: New entry for
439         PACKET_QSetWorkingDir.
440         (extended_remote_set_inferior_cwd): New function.
441         (extended_remote_create_inferior): Call
442         "extended_remote_set_inferior_cwd".
443         (_initialize_remote): Call "add_packet_config_cmd" for
444         QSetWorkingDir.
445
446 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
447
448         * NEWS (New commands): Mention "set/show cwd".
449         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
450         "cd" command's help text.
451         * common/common-inferior.h (get_inferior_cwd): New prototype.
452         * infcmd.c (inferior_cwd_scratch): New global variable.
453         (set_inferior_cwd): New function.
454         (get_inferior_cwd): Likewise.
455         (set_cwd_command): Likewise.
456         (show_cwd_command): Likewise.
457         (_initialize_infcmd): Add "set/show cwd" commands.
458         * inferior.h (class inferior) <cwd>: New field.
459         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
460         (fork_inferior): Change inferior's cwd before its execution.
461         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
462         to CreateProcess.
463
464 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
465
466         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
467         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
468         (COMMON_OBS): Add gdb_tilde_expand.o.
469         * common/gdb_tilde_expand.c: New file.
470         * common/gdb_tilde_expand.h: Likewise.
471
472 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
473
474         * gdbarch.sh (objfile): Remove duplicate declaration.
475         * gdbarch.h: Regenerate.
476
477 2017-10-03  Tom Tromey  <tom@tromey.com>
478
479         * utils.c (internal_vproblem): Use string_vprintf.
480
481 2017-10-03  Tom Tromey  <tom@tromey.com>
482
483         * printcmd.c (info_symbol_command): Use std::string.
484
485 2017-10-03  Tom Tromey  <tom@tromey.com>
486
487         * top.c (gdb_safe_append_history): Use std::string.
488
489 2017-10-03  Tom Tromey  <tom@tromey.com>
490
491         * event-top.c (stdin_event_handler): Update.
492         * main.c (captured_main_1): Update.
493         * top.h (make_delete_ui_cleanup): Remove.
494         (struct ui): Add constructor and destructor.
495         (new_ui, delete_ui): Remove.
496         * top.c (make_delete_ui_cleanup): Remove.
497         (new_ui_command): Use std::unique_ptr.
498         (delete_ui_cleanup): Remove.
499         (ui::ui): Rename from new_ui.  Update.
500         (free_ui): Remove.
501         (ui::~ui): Rename from delete_ui.  Update.
502
503 2017-10-03  Tom Tromey  <tom@tromey.com>
504
505         * symfile.c (load_progress): Use gdb::byte_vector.
506
507 2017-10-03  Tom Tromey  <tom@tromey.com>
508
509         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
510         declaration.
511         * printcmd.c (x_command): Remove unused declaration.
512         * symfile.c (symbol_file_command): Remove unused declaration.
513
514 2017-10-03  Tom Tromey  <tom@tromey.com>
515
516         * utils.c (internal_vproblem): Use std::string.
517         (defaulted_query): Likewise.
518
519 2017-10-03  Tom Tromey  <tom@tromey.com>
520
521         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
522         * top.c (execute_command_to_string): Update.
523         * utils.c (make_cleanup_restore_page_info): Remove.
524         (do_restore_page_info_cleanup): Remove.
525         (set_batch_flag_and_restore_page_info):
526         New.
527         (make_cleanup_restore_page_info): Remove.
528         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
529         (~set_batch_flag_and_restore_page_info): New
530         (make_cleanup_restore_uinteger): Remove.
531         (make_cleanup_restore_integer): Remove.
532         (struct restore_integer_closure): Remove.
533         (restore_integer): Remove.
534         * utils.h (struct set_batch_flag_and_restore_page_info): New
535         class.
536         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
537         (make_cleanup_restore_page_info): Remove.
538         (make_cleanup_restore_uinteger) Remove.
539         (make_cleanup_restore_integer) Remove.
540
541 2017-10-03  Tom Tromey  <tom@tromey.com>
542
543         * record-full.h (record_full_gdb_operation_disable_set): Return
544         scoped_restore_tmpl<int>.
545         * infrun.c (adjust_pc_after_break): Update.
546         (handle_signal_stop): Update.
547         * record-full.c (record_full_gdb_operation_disable_set): Return
548         scoped_restore_tmpl<int>.
549         (record_full_wait_1, record_full_insert_breakpoint)
550         (record_full_remove_breakpoint, record_full_save)
551         (record_full_goto_insn): Update.
552
553 2017-10-02  Tom Tromey  <tom@tromey.com>
554
555         PR rust/22236:
556         * rust-lang.c (rust_val_print_str): New function.
557         (val_print_struct): Call it.
558         (rust_subscript): Preserve name of slice type.
559
560 2017-10-02  Tom Tromey  <tom@tromey.com>
561
562         * rust-lang.c (rust_subscript): Handle slices in
563         EVAL_AVOID_SIDE_EFFECTS case.
564
565 2017-10-02  Tom Tromey  <tom@tromey.com>
566
567         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
568
569 2017-10-02  Tom Tromey  <tom@tromey.com>
570
571         * rust-lang.h (rust_slice_type): Add "extern".
572
573 2017-10-02  Tom Tromey  <tom@tromey.com>
574             Pedro Alves  <palves@redhat.com>
575
576         * ada-lang.h (ada_exc_info::operator<): Make const.
577         (ada_exc_info::operator==): Make const.
578         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
579         Make const.
580
581 2017-09-29  Tom Tromey  <tom@tromey.com>
582
583         * target.c (read_whatever_is_readable): Change type of "result".
584         Update.
585         (free_memory_read_result_vector): Remove.
586         (read_memory_robust): Change return type.  Update.
587         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
588         bin2hex, std::string.
589         * target.h (memory_read_result_s): Remove typedef.
590         (free_memory_read_result_vector): Remove.
591         (read_memory_robust): Return std::vector.
592
593 2017-09-29  Tom Tromey  <tom@tromey.com>
594
595         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
596
597 2017-09-29  Tom Tromey  <tom@tromey.com>
598
599         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
600         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
601         operator< and operator==.
602         (ada_exceptions_list): Return a std::vector.
603         * ada-lang.c (ada_exc_info::operator<): Rename from
604         compare_ada_exception_info.
605         (ada_exc_info::operator==): New.
606         (sort_remove_dups_ada_exceptions_list): Change type of
607         "exceptions".
608         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
609         (ada_add_global_exceptions): Likewise.
610         (ada_exceptions_list_1): Return a std::vector.
611         (ada_exceptions_list): Likewise.
612
613 2017-09-29  Tom Tromey  <tom@tromey.com>
614
615         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
616         'std::set *'.
617         (print_one_inferior): Update.
618         (free_vector_of_ints): Remove.
619         (list_available_thread_groups): Change "ids" to std::set.
620         (mi_cmd_list_thread_groups): Update.
621         (struct collect_cores_data) <core>: Now a std::set.
622         (collect_cores): Update.
623         (unique): Remove.
624         (print_one_inferior): Update.
625
626 2017-09-29  Tom Tromey  <tom@tromey.com>
627
628         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
629         (mi_execute_async_cli_command): Likewise.
630         (mi_cmd_trace_frame_collected): Use field_fmt.
631
632 2017-09-29  Tom Tromey  <tom@tromey.com>
633
634         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
635         gdb::byte_vector.
636
637 2017-09-29  Tom Tromey  <tom@tromey.com>
638
639         * mi/mi-parse.c (mi_parse): Remove unused declaration.
640
641 2017-09-29  Tom Tromey  <tom@tromey.com>
642
643         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
644
645 2017-09-29  Tom Tromey  <tom@tromey.com>
646
647         * varobj.h (varobj_gen_name): Return std::string.
648         * varobj.c (varobj_gen_name): Return std::string.
649         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
650         (mi_cmd_var_delete): Don't copy "name".
651
652 2017-09-29  Tom Tromey  <tom@tromey.com>
653
654         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
655         (mi_cmd_break_insert_1): Update.
656
657 2017-09-29  Tom Tromey  <tom@tromey.com>
658
659         * target.h (make_scoped_defer_target_commit_resume): Update.
660         * target.c (make_scoped_defer_target_commit_resume): Rename from
661         make_cleanup_defer_target_commit_resume.  Return a
662         scoped_restore.
663         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
664
665 2017-09-29  Tom Tromey  <tom@tromey.com>
666
667         * main.c (captured_main_1): Remove unused declaration.
668         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
669
670 2017-09-29  Tom Tromey  <tom@tromey.com>
671
672         * symtab.c (search_symbols): Remove unused outer cleanup.
673         (make_source_files_completion_list): Remove unused declaration.
674
675 2017-09-29  Tom Tromey  <tom@tromey.com>
676
677         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
678
679 2017-09-29  Tom Tromey  <tom@tromey.com>
680
681         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
682         gdb::byte_vector.
683
684 2017-09-29  Tom Tromey  <tom@tromey.com>
685
686         * complaints.c (vcomplaint): Use std::string.
687
688 2017-09-29  Tom Tromey  <tom@tromey.com>
689
690         * tracepoint.c (trace_variable_command): Use std::string.
691         (encode_actions_1): Remove unused declarations.
692         (create_tsv_from_upload): Use std::string.
693
694 2017-09-29  Tom Tromey  <tom@tromey.com>
695
696         * cp-support.c (gdb_demangle): Use std::string.
697
698 2017-09-29  Tom Tromey  <tom@tromey.com>
699
700         * stack.c (parse_frame_specification): Use std::string
701         (info_frame_command): Use gdb::unique_xmalloc_ptr.
702
703 2017-09-29  Tom Tromey  <tom@tromey.com>
704
705         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
706
707 2017-09-29  Tom Tromey  <tom@tromey.com>
708
709         * utils.c (vfprintf_maybe_filtered): Use std::string.
710         (vfprintf_unfiltered): Likewise.
711
712 2017-09-29  Tom Tromey  <tom@tromey.com>
713
714         * event-top.c (top_level_prompt): Return std::string.
715         (display_gdb_prompt): Update.
716
717 2017-09-29  Tom Tromey  <tom@tromey.com>
718
719         * unittests/common-utils-selftests.c (format): New function.
720         (string_vprintf_tests): New function.
721         (_initialize_common_utils_selftests): Register new tests.
722         * common/common-utils.c (string_vprintf): New function.
723         * common/common-utils.h (string_vprintf): Declare.
724
725 2017-09-29  Pedro Alves  <palves@redhat.com>
726
727         * common/rsp-low.c (unpack_varlen_hex): Constify.
728         * common/rsp-low.h (unpack_varlen_hex): Constify.
729         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
730         Constify.
731         * remote.c (remote_set_permissions, read_ptid)
732         (remote_current_thread, remote_get_threads_with_qthreadinfo)
733         (remote_static_tracepoint_marker_at)
734         (remote_static_tracepoint_markers_by_strid)
735         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
736         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
737         (parse_tracepoint_definition, parse_tsv_definition)
738         (parse_static_tracepoint_marker_definition): Constify.
739         * tracepoint.h (parse_static_tracepoint_marker_definition)
740         (parse_trace_status, parse_tracepoint_status)
741         (parse_tracepoint_definition, parse_tsv_definition): Constify.
742
743 2017-09-29  Pedro Alves  <palves@redhat.com>
744
745         * remote.c (target_buf, target_buf_size): Delete.
746         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
747         Use the connection's packet buffer instead.
748         All callers adjusted.
749         (_initialize_remote): Remove references to target_buf and
750         target_buf_size.
751
752 2017-09-28  Pedro Alves  <palves@redhat.com>
753
754         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
755         unittests/common-utils-selftests.c.
756         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
757         (COMMON_OBS): Remove utils-selftests.o.
758         * utils-selftests.c: Move to ...
759         * unittests/common-utils-selftests.c: ... here and rename self
760         test to "string_printf".
761
762 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
763
764         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
765         having NULL cus or tus.
766
767 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
768
769         * arm-tdep.c: (convert_from_extended): Remove.
770         (convert_to_extended): Likewise.
771         (arm_extract_return_value): Use convert_typed_floating.
772         (arm_store_return_value): Likewise.
773
774         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
775         * sh-tdep.c: Do not include "floatformat.h".
776         (sh_littlebyte_bigword_type): New function.
777         (sh_register_convert_to_virtual): Use convert_typed_floating.
778         (sh_register_convert_to_raw): Likewise.
779         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
780         (sh64_littlebyte_bigword_type): New function.
781         (sh64_extract_return_value): Use convert_typed_floating.
782         (sh64_register_convert_to_virtual): Likewise.
783         (sh64_register_convert_to_raw): Likewise.
784
785 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
786
787         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
788         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
789
790         * gdbtypes.h (union type_specific): Make field floatformat hold
791         just a single struct floatformat, not an array.
792         (floatformat_from_type): Move here.
793         * gdbtypes.c (floatformat_from_type): Move here.  Update to
794         changed TYPE_FLOATFORMAT definition.
795         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
796         (recursive_dump_type): Likewise.
797         (init_float_type): Install correct floatformat for byte order.
798         (arch_float_type): Likewise.
799
800 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
801
802         * gdbtypes.c (init_type): Change incoming argument from
803         length-in-bytes to length-in-bits.  Assert length is a
804         multiple of TARGET_CHAR_BITS.
805         (arch_type, arch_flags_type): Likewise.
806         (init_integer_type): Update call to init_type.
807         (init_character_type): Likewise.
808         (init_boolean_type): Likewise.
809         (init_float_type): Likewise.
810         (init_decfloat_type): Likewise.
811         (init_complex_type): Likewise.
812         (init_pointer_type): Likewise.
813         (objfile_type): Likewise.
814         (arch_integer_type): Update call to arch_type.
815         (arch_character_type): Likewise.
816         (arch_boolean_type): Likewise.
817         (arch_float_type): Likewise.
818         (arch_decfloat_type): Likewise.
819         (arch_complex_type): Likewise.
820         (arch_pointer_type): Likewise.
821         (gdbtypes_post_init): Likewise.
822
823         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
824         (read_base_type): Likewise.
825         * mdebugread.c (basic_type): Likewise.
826         * stabsread.c (dbx_init_float_type): Likewise.
827         (rs6000_builtin_type): Likewise.
828         (read_range_type): Likewise.  Also, fix call to init_integer_type
829         with erroneous length argument.
830
831         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
832         * d-lang.c (build_d_types): Likewise.
833         * f-lang.c (build_fortran_types): Likewise.
834         * go-lang.c (build_go_types): Likewise.
835         * opencl-lang.c (build_opencl_types): Likewise.
836         * jit.c (finalize_symtab): Likewise.
837         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
838         (build_std_type_info_type): Likewise.
839         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
840         update call to arch_flags_type.
841
842         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
843         arch_type.
844         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
845         * windows-tdep.c (windows_get_tlb_type): Likewise.
846
847         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
848         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
849         * m32c-tdep.c (make_types): Likewise.
850         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
851         (rl78_psw_type): Update call to arch_flags_type.
852         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
853         * rx-tdep.c (rx_psw_type): Likewise.
854         (rx_fpsw_type): Likewise.
855         * sparc-tdep.c (sparc_psr_type): Likewise.
856         (sparc_fsr_type): Likewise.
857         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
858         (sparc64_ccr_type): Likewise.
859         (sparc64_fsr_type): Likewise.
860         (sparc64_fprs_type): Likewise.
861
862 2017-09-27  Tom Tromey  <tom@tromey.com>
863
864         * findcmd.c (find_command): Constify.
865
866 2017-09-27  Tom Tromey  <tom@tromey.com>
867
868         * ada-tasks.c (task_command_1, task_command): Constify.
869
870 2017-09-27  Tom Tromey  <tom@tromey.com>
871
872         * symtab.c (maintenance_print_symbol_cache)
873         (maintenance_flush_symbol_cache)
874         (maintenance_print_symbol_cache_statistics): Constify.
875
876 2017-09-27  Tom Tromey  <tom@tromey.com>
877
878         * inferior.c (detach_inferior_command, kill_inferior_command)
879         (inferior_command): Constify.
880
881 2017-09-27  Tom Tromey  <tom@tromey.com>
882
883         * regcache.c (regcache_print, maintenance_print_registers)
884         (maintenance_print_raw_registers)
885         (maintenance_print_cooked_registers)
886         (maintenance_print_register_groups)
887         (maintenance_print_remote_registers): Constify.
888
889 2017-09-27  Tom Tromey  <tom@tromey.com>
890
891         * printcmd.c (map_display_numbers, undisplay_command)
892         (enable_disable_display_command, enable_display_command)
893         (disable_display_command): Constify.
894
895 2017-09-27  Tom Tromey  <tom@tromey.com>
896
897         * breakpoint.h (delete_command): Don't declare.
898         * breakpoint.c (delete_command, enable_once_command)
899         (enable_count_command, enable_delete_command, breakpoint_1)
900         (maintenance_info_breakpoints, stopin_command, stopat_command)
901         (delete_command, delete_trace_command, save_breakpoints)
902         (save_breakpoints_command, save_tracepoints_command): Constify.
903
904 2017-09-27  Tom Tromey  <tom@tromey.com>
905
906         * macrocmd.c (macro_expand_command, macro_expand_once_command)
907         (skip_ws, extract_identifier, macro_define_command)
908         (macro_undef_command, macro_list_command): Constify.
909
910 2017-09-27  Tom Tromey  <tom@tromey.com>
911
912         * infcmd.c (environment_info, set_environment_command)
913         (unset_environment_command, path_info, info_proc_cmd_1)
914         (info_proc_cmd_mappings, info_proc_cmd_stat)
915         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
916         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
917
918 2017-09-27  Tom Tromey  <tom@tromey.com>
919
920         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
921         Constify.
922
923 2017-09-27  Tom Tromey  <tom@tromey.com>
924
925         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
926
927 2017-09-27  Tom Tromey  <tom@tromey.com>
928
929         * demangle.c (demangle_command): Constify.
930
931 2017-09-27  Tom Tromey  <tom@tromey.com>
932
933         * progspace.c (maintenance_info_program_spaces_command):
934         Constify.
935
936 2017-09-27  Tom Tromey  <tom@tromey.com>
937
938         * compile/compile.c (check_raw_argument, compile_file_command)
939         (compile_code_command, compile_print_command): Constify.
940
941 2017-09-27  Tom Tromey  <tom@tromey.com>
942
943         * reggroups.c (maintenance_print_reggroups): Constify.
944
945 2017-09-27  Tom Tromey  <tom@tromey.com>
946
947         * dwarf2read.c (save_gdb_index_command): Constify.
948
949 2017-09-27  Tom Tromey  <tom@tromey.com>
950
951         * stap-probe.c (info_probes_stap_command): Constify.
952
953 2017-09-27  Tom Tromey  <tom@tromey.com>
954
955         * fork-child.c (unset_exec_wrapper_command): Constify.
956
957 2017-09-27  Tom Tromey  <tom@tromey.com>
958
959         * btrace.c (get_uint, get_context_size, no_chunk)
960         (maint_btrace_packet_history_cmd)
961         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
962         (maint_info_btrace_cmd): Constify.
963
964 2017-09-27  Tom Tromey  <tom@tromey.com>
965
966         * reverse.c (delete_bookmark_command): Constify.
967
968 2017-09-27  Tom Tromey  <tom@tromey.com>
969
970         * remote.c (set_memory_packet_size)
971         (set_memory_write_packet_size, show_memory_write_packet_size)
972         (set_memory_read_packet_size, show_memory_read_packet_size)
973         (compare_sections_command, packet_command, remote_put_command)
974         (remote_get_command, remote_delete_command): Constify.
975
976 2017-09-27  Tom Tromey  <tom@tromey.com>
977
978         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
979         (set_mipsfpu_double_command, set_mipsfpu_none_command)
980         (set_mipsfpu_auto_command): Constify.
981
982 2017-09-27  Tom Tromey  <tom@tromey.com>
983
984         * cli/cli-cmds.h (cd_command): Constify.
985         * cli/cli-cmds.c (cd_command): Constify.
986
987 2017-09-27  Tom Tromey  <tom@tromey.com>
988
989         * thread.c (thread_name_command, thread_find_command): Constify.
990
991 2017-09-27  Tom Tromey  <tom@tromey.com>
992
993         * probe.c (enable_probes_command, disable_probes_command):
994         Constify.
995
996 2017-09-27  Tom Tromey  <tom@tromey.com>
997
998         * symfile.c (symbol_file_command): Constify.
999         * gdbcore.h (deprecated_file_changed_hook): Constify.
1000         * exec.c (deprecated_file_changed_hook, exec_file_command)
1001         (file_command): Constify.
1002         * defs.h (symbol_file_command): Constify.
1003
1004 2017-09-27  Tom Tromey  <tom@tromey.com>
1005
1006         * remote-fileio.c (set_system_call_allowed)
1007         (show_system_call_allowed): Constify.
1008
1009 2017-09-27  Tom Tromey  <tom@tromey.com>
1010
1011         * tracepoint.c (delete_trace_variable_command)
1012         (tfind_end_command, tfind_start_command, tfind_pc_command)
1013         (tfind_tracepoint_command, tfind_line_command)
1014         (tfind_range_command, tfind_outside_command): Constify.
1015
1016 2017-09-27  Tom Tromey  <tom@tromey.com>
1017
1018         * ax-gdb.c (maint_agent_printf_command, agent_command)
1019         (agent_eval_command): Constify.
1020
1021 2017-09-27  Tom Tromey  <tom@tromey.com>
1022
1023         * tracepoint.c (info_scope_command): Constify.
1024         * python/python.c (gdbpy_decode_line): Constify.
1025         * python/py-breakpoint.c (bppy_init): Constify.
1026         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1027         * location.h: (new_linespec_location)
1028         (string_to_event_location_basic, string_to_event_location):
1029         Constify.
1030         * location.c (new_linespec_location)
1031         (string_to_event_location_basic, string_to_event_location):
1032         Constify.
1033         * linespec.h (decode_line_with_current_source)
1034         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1035         * linespec.c (linespec_lex_to_end)
1036         (decode_line_with_current_source)
1037         (decode_line_with_last_displayed): Constify.
1038         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1039         Constify.
1040         * cli/cli-cmds.c (edit_command, list_command): Constify.
1041         * breakpoint.h (until_break_command, watch_command_wrapper)
1042         (awatch_command_wrapper, rwatch_command_wrapper)
1043         (init_ada_exception_breakpoint): Constify.
1044         * breakpoint.c (break_command_1, dprintf_command)
1045         (break_range_command, watch_command_wrapper)
1046         (rwatch_command_wrapper, awatch_command_wrapper)
1047         (until_break_command, init_ada_exception_breakpoint)
1048         (strace_marker_create_sals_from_location, trace_command)
1049         (ftrace_command, strace_command, struct tracepoint): Constify.
1050         * ax-gdb.c (agent_command_1): Constify.
1051         * ada-lang.c (ada_exception_sal): Constify.
1052
1053 2017-09-27  Tom Tromey  <tom@tromey.com>
1054
1055         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1056         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1057         (get_context_size, no_chunk, get_insn_history_modifiers)
1058         (cmd_record_insn_history, get_call_history_modifiers)
1059         (cmd_record_call_history): Constify.
1060
1061 2017-09-27  Tom Tromey  <tom@tromey.com>
1062
1063         * source.c (show_substitute_path_command)
1064         (unset_substitute_path_command, set_substitute_path_command):
1065         Constify.
1066
1067 2017-09-27  Tom Tromey  <tom@tromey.com>
1068
1069         * typeprint.c (maintenance_print_type): Constify.
1070         * maint.c (maintenance_dump_me, maintenance_demangle)
1071         (maintenance_time_display, maintenance_info_sections)
1072         (maintenance_print_statistics, maintenance_deprecate)
1073         (maintenance_undeprecate): Constify.
1074         (maintenance_do_deprecate): Constify.  Use std::string.
1075         (maintenance_selftest): Constify.
1076         * gdbtypes.h (maintenance_print_type): Constify.
1077
1078 2017-09-27  Tom Tromey  <tom@tromey.com>
1079
1080         * hppa-tdep.c (unwind_command): Constify.
1081
1082 2017-09-27  Tom Tromey  <tom@tromey.com>
1083
1084         * target-descriptions.c (unset_tdesc_filename_cmd)
1085         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1086         Constify.
1087
1088 2017-09-27  Tom Tromey  <tom@tromey.com>
1089
1090         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1091
1092 2017-09-27  Tom Tromey  <tom@tromey.com>
1093
1094         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1095
1096 2017-09-27  Tom Tromey  <tom@tromey.com>
1097
1098         * tui/tui-regs.c (tui_reg_command): Constify.
1099
1100 2017-09-27  Tom Tromey  <tom@tromey.com>
1101
1102         * skip.c (skip_file_command, skip_function_command)
1103         (skip_enable_command, skip_disable_command, skip_delete_command):
1104         Constify.
1105
1106 2017-09-27  Tom Tromey  <tom@tromey.com>
1107
1108         * record-btrace.c (cmd_record_btrace_bts_start)
1109         (cmd_record_btrace_pt_start): Constify.
1110
1111 2017-09-27  Tom Tromey  <tom@tromey.com>
1112
1113         * symmisc.c (maintenance_print_symbols)
1114         (maintenance_print_msymbols, maintenance_print_objfiles)
1115         (maintenance_info_symtabs, maintenance_check_symtabs)
1116         (maintenance_expand_symtabs, maintenance_info_line_tables):
1117         Constify.
1118
1119 2017-09-27  Tom Tromey  <tom@tromey.com>
1120
1121         * top.c (new_ui_command): Constify.
1122
1123 2017-09-27  Tom Tromey  <tom@tromey.com>
1124
1125         * symfile.c (add_symbol_file_command)
1126         (remove_symbol_file_command, list_overlays_command)
1127         (map_overlay_command, unmap_overlay_command)
1128         (overlay_auto_command, overlay_manual_command)
1129         (overlay_off_command, overlay_load_command): Constify.
1130
1131 2017-09-27  Tom Tromey  <tom@tromey.com>
1132
1133         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1134         (info_spu_mailbox_command, info_spu_dma_command)
1135         (info_spu_proxydma_command): Constify.
1136
1137 2017-09-27  Tom Tromey  <tom@tromey.com>
1138
1139         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1140
1141 2017-09-27  Tom Tromey  <tom@tromey.com>
1142
1143         * cli/cli-script.c (user_defined_command): Constify.
1144
1145 2017-09-27  Tom Tromey  <tom@tromey.com>
1146
1147         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1148         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1149         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1150         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1151         (dump_binary_value, append_binary_memory, append_binary_value):
1152         Constify.
1153         (struct dump_context) <func>: Constify.
1154         (add_dump_command): Update.
1155
1156 2017-09-27  Tom Tromey  <tom@tromey.com>
1157
1158         * cli/cli-cmds.c (show_version, show_configuration)
1159         (source_command, show_user): Constify.
1160
1161 2017-09-27  Tom Tromey  <tom@tromey.com>
1162
1163         * target.c (maintenance_print_target_stack): Constify.
1164
1165 2017-09-27  Tom Tromey  <tom@tromey.com>
1166
1167         * interps.c (interpreter_exec_cmd): Constify.
1168
1169 2017-09-27  Tom Tromey  <tom@tromey.com>
1170
1171         * record-full.c (cmd_record_full_restore): Constify.
1172
1173 2017-09-27  Tom Tromey  <tom@tromey.com>
1174
1175         * memattr.c (enable_mem_command, disable_mem_command)
1176         (delete_mem_command): Constify.
1177
1178 2017-09-27  Tom Tromey  <tom@tromey.com>
1179
1180         * value.c (show_convenience): Constify.
1181
1182 2017-09-27  Tom Tromey  <tom@tromey.com>
1183
1184         * gdbcore.h (core_file_command): Update.
1185         * corefile.c (core_file_command): Constify.
1186
1187 2017-09-27  Tom Tromey  <tom@tromey.com>
1188
1189         * user-regs.c (maintenance_print_user_registers): Constify.
1190
1191 2017-09-27  Tom Tromey  <tom@tromey.com>
1192
1193         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1194
1195 2017-09-27  Tom Tromey  <tom@tromey.com>
1196
1197         * cp-support.c (first_component_command): Constify.
1198
1199 2017-09-27  Tom Tromey  <tom@tromey.com>
1200
1201         * psymtab.c (maintenance_print_psymbols)
1202         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1203         Constify.
1204
1205 2017-09-27  Tom Tromey  <tom@tromey.com>
1206
1207         * windows-tdep.c (display_tib): Constify.
1208
1209 2017-09-27  Tom Tromey  <tom@tromey.com>
1210
1211         * linux-fork.c (delete_checkpoint_command)
1212         (detach_checkpoint_command): Constify.
1213
1214 2017-09-27  Tom Tromey  <tom@tromey.com>
1215
1216         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1217
1218 2017-09-27  Tom Tromey  <tom@tromey.com>
1219
1220         * arc-tdep.c (dump_arc_instruction_command): Constify.
1221
1222 2017-09-27  Tom Tromey  <tom@tromey.com>
1223
1224         * valprint.c (set_radix, show_radix): Constify.
1225
1226 2017-09-27  Tom Tromey  <tom@tromey.com>
1227
1228         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1229
1230 2017-09-27  Tom Tromey  <tom@tromey.com>
1231
1232         * command.h (not_just_help_class_command): Update.
1233         * cli/cli-decode.h (not_just_help_class_command): Update.
1234         * cli/cli-decode.c (not_just_help_class_command): Constify.
1235
1236 2017-09-27  Tom Tromey  <tom@tromey.com>
1237
1238         * gdb_bfd.c (maintenance_info_bfds): Constify.
1239
1240 2017-09-27  Tom Tromey  <tom@tromey.com>
1241
1242         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1243         overloads.
1244         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1245         (do_const_cfunc): New function.
1246         (cmd_cfunc_eq): New overload.
1247         (cli_user_command_p): Check do_const_cfunc.
1248         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1249         const_cfunc.
1250         * command.h (add_cmd): Add const overload and no-function
1251         overload.
1252         (set_cmd_cfunc): Add const overload.
1253         (cmd_const_cfunc_ftype): Declare.
1254         (cmd_cfunc_eq): Add const overload.
1255         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1256         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1257         overload.
1258
1259 2017-09-27  Tom Tromey  <tom@tromey.com>
1260
1261         * macroexp.c (get_next_token_for_substitution): New function.
1262         (substitute_args): Call it.  Check for __VA_OPT__.
1263
1264 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1265             Pedro Alves <palves@redhat.com>
1266
1267         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1268         producer_is_icc_lt_14.
1269         (producer_is_icc_lt_14): New function.
1270         (check_producer): Add code for checking version of ICC.
1271         (producer_is_icc): Move to producer.c.
1272         (read_structure_type): Restrict ICC workaround to ICC<14.
1273         * producer.c: Include selftest.h.
1274         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1275         New functions.
1276         * producer.h (producer_is_icc): New declaration.
1277
1278 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1279
1280         * Makefile.in (SFILES): Add producer.c.
1281         (COMMON_OBS): Add producer.o
1282         * amd64-tdep.c (producer.h): Add new include.
1283         * dwarf2read.c (producer.h): Add new include.
1284         * producer.c: New file.
1285         * producer.h: New file.
1286         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1287         producer.c.
1288         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1289         producer.h.
1290
1291 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1292
1293         * configure.ac: Search ncursesw before ncurses.
1294         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1295         * gdb_curses.h: Include <ncursesw/ncurses.h>
1296         * config.in, configure: Regenerate.
1297
1298 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1299
1300         PR gdb/22185
1301         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1302         obsolete.
1303         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1304         Remove i386sol2 support.
1305         * configure.nat <i386sol2>: Remove.
1306         <sol2-64>: Fold into ...
1307         <sol2>: ... this.
1308         Move common settings to default section.
1309         Add sol-thread.o.
1310         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1311         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1312         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1313         <i[34567]86-*-solaris*>: Remove.
1314         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1315
1316         * configure.ac: Remove wctype in libw check.
1317         (_MSE_INT_H): Don't define on Solaris 7-9.
1318         <solaris*>: Remove libthread_db.so.1 check.
1319         * configure: Regenerate.
1320         * config.in: Regenerate.
1321
1322         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1323         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1324         (gdb_ps_size_t): Remove.
1325         Use base types in users.
1326         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1327
1328         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1329
1330 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1331
1332         PR build/22206
1333         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1334         (adi_is_addr_mapped): Likewise.
1335         (PSR_ICC): Don't redefine.
1336         (PSR_IMPL): Likewise.
1337
1338 2017-09-25  Tom Tromey  <tom@tromey.com>
1339
1340         * regcache.c (regcache::dump): Use string_printf.
1341
1342 2017-09-25  Tom Tromey  <tom@tromey.com>
1343
1344         * regcache.c (class regcache_invalidator): New.
1345         (struct register_to_invalidate): Remove.
1346         (make_cleanup_regcache_invalidate): Remove.
1347         (regcache::raw_write): Use regcache_invalidator.
1348
1349 2017-09-25  Tom Tromey  <tom@tromey.com>
1350
1351         * spu-tdep.c (spu2ppu_sniffer): Update.
1352         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1353         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1354         Remove.
1355         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1356         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1357         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1358         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1359         (frame_pop): Update.
1360
1361 2017-09-25  Tom Tromey  <tom@tromey.com>
1362
1363         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1364         * regcache.h (regcache_xfree): Don't declare.
1365         * regcache.c (regcache_xfree): Remove.
1366         (do_regcache_xfree): Use delete.
1367         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1368         * linux-fork.c (free_fork): Use delete.
1369         (fork_save_infrun_state): Likewise.
1370         * jit.c (jit_dealloc_cache): Use delete.
1371         * infrun.c (discard_infcall_suspend_state): Use delete.
1372
1373 2017-09-25  Tom Tromey  <tom@tromey.com>
1374
1375         * regcache.h (regcache_xmalloc): Don't declare.
1376         (regcache_raw_set_cached_value): Update comment.
1377         * regcache.c (regcache_xmalloc): Remove.
1378         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1379         * jit.c (jit_frame_sniffer): Use new.
1380         * frame.c (frame_save_as_regcache): Use new.
1381
1382 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1383
1384         * NEWS: Advertise support for guarded-storage registers on IBM z.
1385
1386 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1387
1388         * s390-linux-nat.c (have_regset_gs): New static variable.
1389         (s390_linux_fetch_inferior_registers): Handle guarded-storage
1390         control block and guarded-storage broadcast control regsets.
1391         (s390_read_description): Detect whether the target has
1392         guarded-storage support, return appropriate tdesc.
1393         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1394         (features/s390x-gs-linux64.c): Likewise.
1395         (struct gdbarch_tdep) <have_gs>: New field.
1396         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1397         (s390_gsbc_regset): New variables.
1398         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1399         and s390_gsbc_regset, if applicable.
1400         (s390_core_read_description): Check whether core file was from a
1401         target with guarded-storage support; include appropriate regsets.
1402         (s390_gdbarch_init): Add registers for guarded-storage support.
1403         (_initialize_s390_tdep): Initialize new target descriptions that
1404         include registers for guarded-storage support.
1405         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1406         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1407         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1408         (S390_NUM_REGS): Adjust macro definition.
1409         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1410         (tdesc_s390x_gs_linux64): New declarations.
1411
1412 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1413
1414         * features/s390-gs-linux64.xml: New file.
1415         * features/s390-gs.xml: New file.
1416         * features/s390-gsbc.xml: New file.
1417         * features/s390x-gs-linux64.xml: New file.
1418         * features/Makefile (WHICH): Add s390-gs-linux64 and
1419         s390x-gs-linux64.
1420         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1421         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1422         * features/s390-gs-linux64.c: New generated file.
1423         * features/s390x-gs-linux64.c: New file.
1424         * regformats/s390-gs-linux64.dat: New file.
1425         * regformats/s390x-gs-linux64.dat: New file.
1426
1427 2017-09-23  Tom Tromey  <tom@tromey.com>
1428
1429         * defs.h (make_cleanup_override_quit_handler): Don't declare.
1430
1431 2017-09-22  Tom Tromey  <tom@tromey.com>
1432
1433         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1434         type to scoped_restore_tmpl.
1435         <scoped_input_handler>: Initialize m_quit_handler directly.
1436
1437 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1438
1439         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1440         (cd_command): Likewise.  Free "current_directory" before
1441         assigning to it.
1442         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1443         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1444         * top.c (gdb_dirbuf): Remove global declaration.
1445         * top.h (gdb_dirbuf): Likewise.
1446
1447 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1448
1449         * gnulib/aclocal.m4: Regenerate.
1450         * gnulib/config.in: Regenerate.
1451         * gnulib/configure: Regenerate.
1452         * gnulib/import/Makefile.am: Regenerate.
1453         * gnulib/import/Makefile.in: Regenerate.
1454         * gnulib/import/assure.h: New file.
1455         * gnulib/import/at-func.c: Likewise
1456         * gnulib/import/chdir-long.c: New file.
1457         * gnulib/import/chdir-long.h: New file.
1458         * gnulib/import/cloexec.c: New file.
1459         * gnulib/import/cloexec.h: New file.
1460         * gnulib/import/close.c: New file.
1461         * gnulib/import/closedir.c: New file.
1462         * gnulib/import/dirent-private.h: New file.
1463         * gnulib/import/dup-safer.c: New file.
1464         * gnulib/import/dup.c: New file.
1465         * gnulib/import/dup2.c: New file.
1466         * gnulib/import/error.c: New file.
1467         * gnulib/import/error.h: New file.
1468         * gnulib/import/exitfail.c: New file.
1469         * gnulib/import/exitfail.h: New file.
1470         * gnulib/import/fchdir.c: New file.
1471         * gnulib/import/fcntl.c: New file.
1472         * gnulib/import/fcntl.in.h: New file.
1473         * gnulib/import/fd-hook.c: New file.
1474         * gnulib/import/fd-hook.h: New file.
1475         * gnulib/import/fd-safer.c: New file.
1476         * gnulib/import/fdopendir.c: New file.
1477         * gnulib/import/filename.h: New file.
1478         * gnulib/import/filenamecat-lgpl.c: New file.
1479         * gnulib/import/filenamecat.h: New file.
1480         * gnulib/import/fstat.c: New file.
1481         * gnulib/import/fstatat.c: New file.
1482         * gnulib/import/getcwd-lgpl.c: New file.
1483         * gnulib/import/getcwd.c: New file.
1484         * gnulib/import/getdtablesize.c: New file.
1485         * gnulib/import/getlogin_r.c: New file.
1486         * gnulib/import/getprogname.c: New file.
1487         * gnulib/import/getprogname.h: New file.
1488         * gnulib/import/gettext.h: New file.
1489         * gnulib/import/glob-libc.h: New file.
1490         * gnulib/import/glob.c: New file.
1491         * gnulib/import/glob.in.h: New file.
1492         * gnulib/import/intprops.h: New file.
1493         * gnulib/import/m4/chdir-long.m4: New file.
1494         * gnulib/import/m4/close.m4: New file.
1495         * gnulib/import/m4/closedir.m4: New file.
1496         * gnulib/import/m4/d-ino.m4: New file.
1497         * gnulib/import/m4/d-type.m4: New file.
1498         * gnulib/import/m4/dup.m4: New file.
1499         * gnulib/import/m4/dup2.m4: New file.
1500         * gnulib/import/m4/error.m4: New file.
1501         * gnulib/import/m4/fchdir.m4: New file.
1502         * gnulib/import/m4/fcntl.m4: New file.
1503         * gnulib/import/m4/fcntl_h.m4: New file.
1504         * gnulib/import/m4/fdopendir.m4: New file.
1505         * gnulib/import/m4/filenamecat.m4: New file.
1506         * gnulib/import/m4/fstat.m4: New file.
1507         * gnulib/import/m4/fstatat.m4: New file.
1508         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1509         * gnulib/import/m4/getcwd-path-max.m4: New file.
1510         * gnulib/import/m4/getcwd.m4: New file.
1511         * gnulib/import/m4/getdtablesize.m4: New file.
1512         * gnulib/import/m4/getlogin_r.m4: New file.
1513         * gnulib/import/m4/getprogname.m4: New file.
1514         * gnulib/import/m4/glob.m4: New file.
1515         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1516         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1517         * gnulib/import/m4/mempcpy.m4: New file.
1518         * gnulib/import/m4/memrchr.m4: New file.
1519         * gnulib/import/m4/mode_t.m4: New file.
1520         * gnulib/import/m4/msvc-inval.m4: New file.
1521         * gnulib/import/m4/msvc-nothrow.m4: New file.
1522         * gnulib/import/m4/open.m4: New file.
1523         * gnulib/import/m4/openat.m4: New file.
1524         * gnulib/import/m4/opendir.m4: New file.
1525         * gnulib/import/m4/readdir.m4: New file.
1526         * gnulib/import/m4/realloc.m4: New file.
1527         * gnulib/import/m4/rewinddir.m4: New file.
1528         * gnulib/import/m4/save-cwd.m4: New file.
1529         * gnulib/import/m4/strdup.m4: New file.
1530         * gnulib/import/m4/strerror.m4: New file.
1531         * gnulib/import/m4/unistd-safer.m4: New file.
1532         * gnulib/import/mempcpy.c: New file.
1533         * gnulib/import/memrchr.c: New file.
1534         * gnulib/import/msvc-inval.c: New file.
1535         * gnulib/import/msvc-inval.h: New file.
1536         * gnulib/import/msvc-nothrow.c: New file.
1537         * gnulib/import/msvc-nothrow.h: New file.
1538         * gnulib/import/open.c: New file.
1539         * gnulib/import/openat-die.c: New file.
1540         * gnulib/import/openat-priv.h: New file.
1541         * gnulib/import/openat-proc.c: New file.
1542         * gnulib/import/openat.c: New file.
1543         * gnulib/import/openat.h: New file.
1544         * gnulib/import/opendir.c: New file.
1545         * gnulib/import/pipe-safer.c: New file.
1546         * gnulib/import/readdir.c: New file.
1547         * gnulib/import/realloc.c: New file.
1548         * gnulib/import/rewinddir.c: New file.
1549         * gnulib/import/save-cwd.c: New file.
1550         * gnulib/import/save-cwd.h: New file.
1551         * gnulib/import/strdup.c: New file.
1552         * gnulib/import/strerror-override.c: New file.
1553         * gnulib/import/strerror-override.h: New file.
1554         * gnulib/import/strerror.c: New file.
1555         * gnulib/import/unistd--.h: New file.
1556         * gnulib/import/unistd-safer.h: New file.
1557         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1558         "getcwd" and "glob".
1559         * ser-tcp.c: Undefine "close" before redefining it.
1560
1561 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1562
1563         * guile/scm-value.c (gdbscm_value_address): Initialize address,
1564         get rid of res_val.
1565
1566 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1567
1568         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1569         <sol2,sparc>: Likewise.
1570         <sol2-64,i386>: Likewise.
1571
1572         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1573         -Wdeprecated-declarations on *-*-solaris*.
1574         * configure: Regenerate.
1575
1576         * procfs.c: Include "nat/inferior.h".
1577         (procfs_info_proc): Fix typo.
1578
1579 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1580
1581         * remote.c (vector): Include.
1582         (struct private_thread_info): Add field, thread_handle.
1583         (free_private_thread_info): Deallocate storage associated with
1584         thread handle.
1585         (get_private_info_thread): Initialize `thread_handle' field.
1586         (struct thread_item): Add field, thread_handle.
1587         (clear_threads_listing_context): Deallocate storage associated
1588         with thread handle.
1589         (start_thread): Add support for "handle" attribute.
1590         (thread_attributes): Add "handle".
1591         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1592         field.
1593         (remote_update_thread_list): Update thread_handle.
1594         (remote_thread_handle_to_thread_info): New function.
1595         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1596
1597 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1598
1599         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1600         function.
1601         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1602         * python/python-internal.h (thread_object_type): Declare.
1603
1604 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1605
1606         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1607         (target_thread_handle_to_thread_info): Declare.
1608         * target.c (target_thread_handle_to_thread_info): New function.
1609         * target-delegates.c: Regenerate.
1610         * gdbthread.h (find_thread_by_handle): Declare.
1611         * thread.c (find_thread_by_handle): New function.
1612         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1613         function.
1614         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1615
1616 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1617
1618         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1619
1620 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1621
1622         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1623
1624 2017-09-21  Yao Qi  <yao.qi@linaro.org>
1625
1626         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1627         to gdb_target_obs.
1628
1629 2017-09-20  Tom Tromey  <tom@tromey.com>
1630
1631         * breakpoint.c (struct counted_command_line): Remove.
1632         (breakpoint_commands): Update.
1633         (alloc_counted_command_line, incref_counted_command_line)
1634         (decref_counted_command_line, do_cleanup_counted_command_line)
1635         (make_cleanup_decref_counted_command_line): Remove.
1636         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1637         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1638         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1639         (save_breakpoints): Update.
1640         * breakpoint.h (counted_command_line): Now a typedef to
1641         shared_ptr.
1642         (struct breakpoint) <commands>: Now a counted_command_line.
1643         (struct bpstats) <command>: Likewise.
1644
1645 2017-09-20  Tom Tromey  <tom@tromey.com>
1646
1647         * breakpoint.c (struct commands_info, do_map_commands_command):
1648         Remove.
1649         (commands_command_1): Update.
1650         (iterate_over_related_breakpoints): Take a function_view.
1651         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1652         (delete_command): Update.
1653         (map_breakpoint_numbers): Take a function_view.
1654         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1655         (disable_command): Update.
1656         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1657         (enable_command): Update.
1658         (struct disp_data, do_enable_breakpoint_disp)
1659         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1660         (do_map_enable_delete_breakpoint): Remove.
1661         (enable_once_command, enable_count_command, enable_delete_command)
1662         (delete_trace_variable_command): Update.
1663
1664 2017-09-20  Tom Tromey  <tom@tromey.com>
1665
1666         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
1667         (bpstat_clear): Use delete.
1668         (bpstats): New constructors.
1669         (bpstat_copy, bpstat_stop_status): Use new.
1670         (dprintf_after_condition_true): Update.
1671         * breakpoint.h (bpstats::bpstats): Add constructors.
1672         (bpstats::~bpstats): Add destructor.
1673
1674 2017-09-20  Pedro Alves  <palves@redhat.com>
1675
1676         * eval.c (make_params): Delete, refactored as ...
1677         (class fake_method): ... this new type's ctor.
1678         (fake_method::~fake_method): New.
1679         (evaluate_subexp_standard): Use 'fake_method'.
1680
1681 2017-09-20  Tom Tromey  <tom@tromey.com>
1682
1683         * windows-nat.c (get_windows_debug_event, windows_wait)
1684         (do_initial_windows_stuff, windows_attach): Update.
1685         * utils.c (vwarning, internal_vproblem): Update.
1686         (ui_unregister_input_event_handler_cleanup)
1687         (prepare_to_handle_input): Remove.
1688         (class scoped_input_handler): New.
1689         (defaulted_query, prompt_for_continue): Update.
1690         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1691         Update.
1692         * top.c (undo_terminal_modifications_before_exit): Update.
1693         * target/target.h (target_terminal_init, target_terminal_inferior)
1694         (target_terminal_ours): Don't declare.
1695         (class target_terminal): New.
1696         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1697         (target_terminal_ours_for_output)
1698         (make_cleanup_restore_target_terminal): Don't declare.
1699         (target_terminal_info): Remove.
1700         * target.c (enum terminal_state, terminal_state): Remove.
1701         (target_terminal::terminal_state): Define.
1702         (target_terminal::init): Rename from target_terminal_init.
1703         (target_terminal::inferior): Rename from
1704         target_terminal_inferior.
1705         (target_terminal::ours): Rename from target_terminal_ours.
1706         (target_terminal::ours_for_output): Rename from
1707         target_terminal_ours_for_output.
1708         (target_terminal::info): New method.
1709         (cleanup_restore_target_terminal)
1710         (make_cleanup_restore_target_terminal): Remove.
1711         * solib.c (handle_solib_event): Update.
1712         * remote.c (remote_serial_quit_handler): Update.
1713         (remote_terminal_inferior, remote_wait_as): Update.
1714         * record-full.c (record_full_wait_1): Update.
1715         * nto-procfs.c (procfs_create_inferior): Update.
1716         * nat/fork-inferior.c (startup_inferior): Update.
1717         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1718         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1719         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1720         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1721         (mi_breakpoint_created, mi_breakpoint_deleted)
1722         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1723         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1724         (mi_user_selected_context_changed, report_initial_inferior):
1725         Update.
1726         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1727         (linux_nat_terminal_inferior): Update.
1728         * infrun.c (follow_fork_inferior)
1729         (handle_vfork_child_exec_or_exit, do_target_resume)
1730         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1731         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1732         Update.
1733         * inflow.c (child_terminal_init, info_terminal_command): Update.
1734         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1735         (attach_command): Update.
1736         * infcall.c (call_thread_fsm_should_stop): Update.
1737         * gnu-nat.c (gnu_attach): Update.
1738         * extension.c (struct active_ext_lang_state)
1739         (restore_active_ext_lang): Update.
1740         * exceptions.c (print_flush): Update.
1741         * event-top.c (async_enable_stdin, default_quit_handler): Update.
1742         (struct quit_handler_cleanup_data, restore_quit_handler)
1743         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1744         Remove.
1745         * cp-support.c (gdb_demangle): Update.
1746         * breakpoint.c (update_inserted_breakpoint_locations)
1747         (insert_breakpoint_locations, handle_jit_event)
1748         (disable_breakpoints_in_unloaded_shlib): Update.
1749         * annotate.c (annotate_breakpoints_invalid)
1750         (annotate_frames_invalid): Update.
1751
1752 2017-09-20  Tom Tromey  <tom@tromey.com>
1753
1754         * main.c (catch_command_errors): Rename from
1755         catch_command_errors_const.
1756         (captured_main_1): Update.
1757
1758 2017-09-20  Pedro Alves  <palves@redhat.com>
1759
1760         * cli/cli-cmds.c (list_command): Use print_sal_location.
1761         (print_sal_location): New function.
1762         (ambiguous_line_spec): Use print_sal_location.
1763         * linespec.c (symbol_to_sal): Record the symbol in the sal.
1764         * symtab.c (find_function_start_sal): Likewise.
1765         * symtab.h (symtab_and_line::symbol): New field.
1766
1767 2017-09-20  Pedro Alves  <palves@redhat.com>
1768
1769         * linespec.c (minsym_found): Handle non-text minsyms.
1770         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1771
1772 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1773
1774         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1775         backslash.
1776
1777 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1778
1779         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1780         vmovups instead vmovaps.
1781         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1782
1783 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
1784
1785         * NEWS (Changes since GDB 8.0): Add starti.
1786         * infcmd.c (enum run_break): New.
1787         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1788         case.
1789         (run_command): Use enum run_how.
1790         (start_command): Likewise.
1791         (starti_command): New function.
1792         (RUN_ARGS_HELP): New macro.
1793         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1794         commands.  Add starti command.
1795
1796 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1797
1798         * Makefile.in (monitor.o): Remove the rule.
1799
1800 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1801
1802         * annotate.h (struct annotate_arg_emitter): Use
1803         DISABLE_COPY_AND_ASSIGN.
1804         * common/refcounted-object.h (refcounted_object): Likewise.
1805         * completer.h (struct completion_result): Likewise.
1806         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1807         * filename-seen-cache.h (filename_seen_cache): Likewise.
1808         * gdbcore.h (thread_section_name): Likewise.
1809         * gdb_regex.h (compiled_regex): Likewise.
1810         * gdbthread.h (scoped_restore_current_thread): Likewise.
1811         * inferior.h (scoped_restore_current_inferior): Likewise.
1812         * jit.c (jit_reader): Likewise.
1813         * linespec.h (struct linespec_result): Likewise.
1814         * mi/mi-parse.h (struct mi_parse): Likewise.
1815         * nat/fork-inferior.c (execv_argv): Likewise.
1816         * progspace.h (scoped_restore_current_program_space): Likewise.
1817         * python/python-internal.h (class gdbpy_enter): Likewise.
1818         * regcache.h (regcache): Likewise.
1819         * target-descriptions.c (struct tdesc_reg): Likewise.
1820         (struct tdesc_type): Likewise.
1821         (struct tdesc_feature): Likewise.
1822         * ui-out.h (ui_out_emit_type): Likewise.
1823
1824 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1825
1826         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1827         label abort_expression.
1828
1829 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1830
1831         * common/buffer.c (buffer_xml_printf): Adjust.
1832         * common/xml-utils.c (xml_escape_text): Change return type to
1833         std::string, update code accordingly.
1834         * common/xml-utils.h (xml_escape_text): Change return type to
1835         std::string.
1836         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1837         * windows-tdep.c (windows_xfer_shared_library): Adjust.
1838         * unittests/xml-utils-selftests.c (test_xml_escape_text):
1839         Adjust.
1840
1841 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1842
1843         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1844         (SUBDIR_UNITTESTS_OBS): Add new object file.
1845         * unittests/xml-utils-selftests.c: New file.
1846
1847 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1848
1849         * common/selftest.h (selftest): New struct/interface.
1850         (register_test): Add name parameter, add new overload.
1851         (run_tests): Add filter parameter.
1852         (for_each_selftest_ftype): New typedef.
1853         (for_each_selftest): New declaration.
1854         * common/selftest.c (tests): Change type to
1855         map<string, unique_ptr<selftest>>.
1856         (simple_selftest): New struct.
1857         (register_test): New function.
1858         (register_test): Add name parameter and use it.
1859         (run_tests): Add filter parameter and use it.  Add prints.
1860         Adjust to vector -> map change.
1861         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1862         registering selftests.
1863         * arm-tdep.c (_initialize_arm_tdep): Likewise.
1864         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1865         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1866         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1867         * findvar.c (_initialize_findvar): Likewise.
1868         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1869         * maint.c (maintenance_selftest): Update call to run_tests.
1870         (maintenance_info_selftests): New function.
1871         (_initialize_maint_cmds): Register "maintenance info selftests"
1872         command.  Update "maintenance selftest" doc.
1873         * regcache.c (_initialize_regcache): Add names when registering
1874         selftests.
1875         * rust-exp.y (_initialize_rust_exp): Likewise.
1876         * selftest-arch.c (gdbarch_selftest): New struct.
1877         (gdbarch_tests): Remove.
1878         (register_test_foreach_arch): Add name parameter.  Call
1879         register_test.
1880         (tests_with_arch): Remove, move most content to
1881         gdbarch_selftest::operator().
1882         (_initialize_selftests_foreach_arch): Remove.
1883         * selftest-arch.h (register_test_foreach_arch): Add name
1884         parameter.
1885         (run_tests_with_arch): New declaration.
1886         * utils-selftests.c (_initialize_utils_selftests): Add names
1887         when registering selftests.
1888         * utils.c (_initialize_utils): Likewise.
1889         * unittests/array-view-selftests.c
1890         (_initialize_array_view_selftests): Likewise.
1891         * unittests/environ-selftests.c (_initialize_environ_selftests):
1892         Likewise.
1893         * unittests/function-view-selftests.c
1894         (_initialize_function_view_selftests): Likewise.
1895         * unittests/offset-type-selftests.c
1896         (_initialize_offset_type_selftests): Likewise.
1897         * unittests/optional-selftests.c
1898         (_initialize_optional_selftests): Likewise.
1899         * unittests/scoped_restore-selftests.c
1900         (_initialize_scoped_restore_selftests): Likewise.
1901         * NEWS: Document "maintenance selftest" and "maint info
1902         selftests".
1903
1904 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1905
1906         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1907         scoped_restore.
1908
1909 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1910
1911         * mi/mi-main.c (mi_load_progress): Make uiout variable
1912         a unique_ptr.
1913
1914 2017-09-15  Pedro Alves  <palves@redhat.com>
1915
1916         * compile/compile-c-types.c (convert_enum, convert_int)
1917         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1918
1919 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1920
1921         * dwarf2read.c (copy_string): Remove.
1922         (parse_macro_definition): Replace copy_string with savestring.
1923
1924 2017-09-15  Yao Qi  <yao.qi@linaro.org>
1925
1926         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1927         gdb_target_obs.
1928         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1929         Likewise.
1930         (i[34567]86-*-linux*): Likewise.
1931
1932 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1933
1934         * dwarf2expr.h (dwarf_stack_value): Add constructor.
1935         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1936         <stack>: Change type to std::vector.
1937         <stack_len, stack_allocated>: Remove.
1938         <grow_stack>: Remove.
1939         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1940         (dwarf_expr_context::~dwarf_expr_context): Remove.
1941         (dwarf_expr_context::grow_stack): Remove.
1942         (dwarf_expr_context::push): Adjust.
1943         (dwarf_expr_context::pop): Adjust.
1944         (dwarf_expr_context::fetch): Adjust.
1945         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1946         (dwarf_expr_context::stack_empty_p): Adjust.
1947         (dwarf_expr_context::execute_stack_op): Adjust.
1948
1949 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1950
1951         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1952         return type to bool.
1953         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1954
1955 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1956
1957         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1958         Change type to bool.
1959         (dwarf_stack_value) <in_stack_memory>: Likewise.
1960         (dwarf_expr_context) <push_address>: Change parameter type to
1961         bool.
1962         <fetch_in_stack_memory>: Change return type to bool.
1963         <push>: Change parameter type to bool.
1964         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1965         to bool.
1966         (dwarf_expr_context::push_address): Likewise.
1967         (dwarf_expr_context::fetch_in_stack_memory): Change return type
1968         to bool.
1969         (dwarf_expr_context::execute_stack_op): Adjust.
1970         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1971
1972 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1973
1974         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1975         (struct dwarf_expr_context) <n_pieces>: Remove.
1976         <pieces>: Change type to std::vector.
1977         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1978         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1979         pieces.
1980         (dwarf_expr_context::add_piece): Adjust.
1981         * dwarf2loc.c (struct piece_closure): Initialize fields.
1982         <n_pieces>: Remove.
1983         <pieces>: Change type to std::vector.
1984         (allocate_piece_closure): Adjust, change parameter to
1985         std::vector rvalue and std::move it to piece_closure.
1986         (rw_pieced_value): Adjust.
1987         (check_pieced_synthetic_pointer): Adjust.
1988         (indirect_synthetic_pointer): Adjust.
1989         (coerce_pieced_ref): Adjust.
1990         (free_pieced_value_closure):  Adjust.  Use delete to free
1991         piece_closure.
1992         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
1993         to allocate_piece_closure.
1994         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1995
1996 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1997
1998         * probe.h (probe_ops_cp): Remove typedef.
1999         (DEF_VEC_P (probe_ops_cp)): Remove.
2000         (all_probe_ops): Change type to std::vector.
2001         * probe.c (info_probes_for_ops): Adjust to vector change.
2002         (probe_linespec_to_ops): Likewise.
2003         (all_probe_ops): Change type to std::vector.
2004         (_initialize_probe): Adjust to vector change.
2005         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2006         * elfread.c (elf_get_probes): Likewise.
2007         * stap-probe.c (_initialize_stap_probe): Likewise.
2008
2009 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2010
2011         * probe.h (struct bound_probe): Define constructors.
2012         * probe.c (bound_probe_s): Remove typedef.
2013         (DEF_VEC_O (bound_probe_s)): Remove VEC.
2014         (collect_probes): Change return type to std::vector, remove
2015         cleanup.
2016         (compare_probes): Return bool, change parameter type.  Change
2017         semantic to "less than".
2018         (gen_ui_out_table_header_info): Change parameter to std::vector
2019         and update.
2020         (exists_probe_with_pops): Likewise.
2021         (info_probes_for_ops): Update to std::vector change.
2022         (enable_probes_command): Likewise.
2023         (disable_probes_command): Likewise.
2024
2025 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2026
2027         * probe.h (struct probe_ops) <get_probes>: Change parameter from
2028         vec to std::vector.
2029         * probe.c (parse_probes_in_pspace): Update.
2030         (find_probes_in_objfile): Update.
2031         (find_probe_by_pc): Update.
2032         (collect_probes): Update.
2033         (probe_any_get_probes): Update.
2034         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2035         return type to reference to std::vector.
2036         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2037         std::vector and update.
2038         (dtrace_process_dof): Likewise.
2039         (dtrace_get_probes): Likewise.
2040         * elfread.c (elf_get_probes): Change return type to std::vector,
2041         store an std::vector in bfd_data.
2042         (probe_key_free): Update to std::vector.
2043         * stap-probe.c (handle_stap_probe): Change parameter to
2044         std::vector and update.
2045         (stap_get_probes): Likewise.
2046         * symfile-debug.c (debug_sym_get_probes): Change return type to
2047         std::vector and update.
2048
2049 2017-09-11  Tom Tromey  <tom@tromey.com>
2050
2051         * breakpoint.c (program_breakpoint_here_p): Update.
2052         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2053         from make_show_memory_breakpoints_cleanup.  Return a
2054         scoped_restore_tmpl<int>.
2055         (restore_show_memory_breakpoints): Remove.
2056         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2057         * mem-break.c (memory_validate_breakpoint): Update.
2058         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2059         (ia64_memory_remove_breakpoint): Update.
2060         (ia64_breakpoint_from_pc): Update.
2061         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2062         from make_show_memory_breakpoints_cleanup.
2063
2064 2017-09-11  Tom Tromey  <tom@tromey.com>
2065
2066         * d-namespace.c (d_lookup_symbol): Use std::string.
2067         (find_symbol_in_baseclass): Likewise.
2068
2069 2017-09-11  Tom Tromey  <tom@tromey.com>
2070
2071         * ctf.c (ctf_start): Use std::string.
2072
2073 2017-09-11  Tom Tromey  <tom@tromey.com>
2074
2075         * ada-lang.c (is_known_support_routine): Update.
2076         (ada_unhandled_exception_name_addr_from_raise): Update.
2077         * guile/scm-frame.c (gdbscm_frame_name): Update.
2078         * python/py-frame.c (frapy_name): Update.
2079         (frapy_function): Update.
2080         * stack.h (find_frame_funname): Update.
2081         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2082         (print_frame): Update.
2083
2084 2017-09-11  Tom Tromey  <tom@tromey.com>
2085
2086         * findcmd.c (put_bits): Take a gdb::byte_vector.
2087         (parse_find_args): Return gdb::byte_vector.  "args" now const.
2088         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
2089         cleanups.
2090         (find_command): Update.
2091
2092 2017-09-11  Tom Tromey  <tom@tromey.com>
2093
2094         * cli/cli-script.c (class scoped_restore_hook_in): New.
2095         (clear_hook_in_cleanup): Remove.
2096         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2097         scoped_restore_hook_in.
2098
2099 2017-09-11  Tom Tromey  <tom@tromey.com>
2100
2101         * cli/cli-script.c (restore_interp): Remove.
2102         (read_command_lines): Use scoped_restore_interp.
2103         * interps.c (scoped_restore_interp::set_temp): Rename from
2104         interp_set_temp.
2105         * interps.h (class scoped_restore_interp): New.
2106         (interp_set_temp): Remove.
2107
2108 2017-09-11  Tom Tromey  <tom@tromey.com>
2109
2110         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2111         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2112         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2113         scoped_restore.
2114         (mi_cmd_break_insert_1): Update.
2115         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2116         scoped_restore.
2117
2118 2017-09-11  Tom Tromey  <tom@tromey.com>
2119
2120         * demangle.c (demangle_command): Update.
2121         * breakpoint.c (disable_command): Update.
2122         (enable_command): Update.
2123         (find_location_by_number): Make "number" const.  Use
2124         get_number_trailer.
2125         * cli/cli-utils.c (extract_arg): Return std::string.
2126         * probe.c (parse_probe_linespec): Update.  Change types.
2127         (collect_probes): Take string arguments.
2128         (parse_probe_linespec): Likewise.
2129         (info_probes_for_ops): Update.
2130         (enable_probes_command): Update.
2131         (disable_probes_command): Update.
2132         * break-catch-sig.c (catch_signal_split_args): Update.
2133         * mi/mi-parse.c (mi_parse): Update.
2134
2135 2017-09-11  Tom Tromey  <tom@tromey.com>
2136
2137         * language.h (language_enum): Make argument const.
2138         * language.c (language_enum): Make argument const.
2139
2140 2017-09-11  Tom Tromey  <tom@tromey.com>
2141
2142         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2143         as function.
2144         (skip_to_space): Rename from skip_to_space_const.
2145         * common/common-utils.c (skip_to_space): New function.
2146         (skip_to_space): Rename from skip_to_space_const.
2147         * cli/cli-utils.h (get_number): Rename from get_number_const.
2148         (extract_arg): Rename from extract_arg_const.
2149         * cli/cli-utils.c (get_number): Rename from get_number_const.
2150         (extract_arg): Rename from extract_arg_const.
2151         (number_or_range_parser::get_number): Use ::get_number.
2152         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2153         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2154         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2155         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2156         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2157         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2158         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2159         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2160
2161 2017-09-11  Tom Tromey  <tom@tromey.com>
2162
2163         * python/python.c (do_start_initialization): Use
2164         py-event-types.def to initialize types.
2165         Define all object type structures.
2166         * python/python-internal.h: Don't declare event initialization
2167         functions.
2168         * python/py-threadevent.c (thread_event_object_type): Don't
2169         define.
2170         * python/py-stopevent.c (stop_event_object_type): Don't define.
2171         * python/py-signalevent.c (signal_event_object_type): Don't
2172         declare or define.
2173         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2174         (clear_objfiles_event_object_type): Don't declare or define.
2175         * python/py-infevents.c (inferior_call_pre_event_object_type)
2176         (inferior_call_post_event_object_type)
2177         (register_changed_event_object_type)
2178         (memory_changed_event_object_type): Don't declare or define.
2179         * python/py-inferior.c (new_thread_event_object_type)
2180         (new_inferior_event_object_type)
2181         (inferior_deleted_event_object_type): Don't declare or define.
2182         * python/py-exitedevent.c (exited_event_object_type): Don't
2183         declare or define.
2184         * python/py-evts.c (gdbpy_initialize_py_events): Use
2185         py-all-events.def.
2186         * python/py-events.h (thread_event_object_type): Don't declare.
2187         (events_object): Use py-all-events.def.
2188         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2189         py-event-types.def.
2190         * python/py-event-types.def: New file.
2191         * python/py-continueevent.c (create_continue_event_object): Don't
2192         declare or define.
2193         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2194         declare or define.
2195         * python/py-all-events.def: New file.
2196
2197 2017-09-11  Tom Tromey  <tom@tromey.com>
2198
2199         * python/py-threadevent.c (create_thread_event_object): Return
2200         gdbpy_ref.
2201         * python/py-stopevent.h (create_stop_event_object)
2202         (create_breakpoint_event_object, create_signal_event_object):
2203         Update.
2204         * python/py-stopevent.c (create_stop_event_object): Return
2205         gdbpy_ref.
2206         (emit_stop_event): Update.
2207         * python/py-signalevent.c (create_signal_event_object): Return
2208         gdbpy_ref.
2209         * python/py-infevents.c (create_inferior_call_event_object):
2210         Update.
2211         * python/py-event.h (create_event_object)
2212         (create_thread_event_object): Update.
2213         * python/py-event.c (create_event_object): Return gdbpy_ref.
2214         * python/py-continueevent.c: Return gdbpy_ref.
2215         * python/py-bpevent.c (create_breakpoint_event_object): Return
2216         gdbpy_ref.
2217
2218 2017-09-11  Tom Tromey  <tom@tromey.com>
2219
2220         PR python/15622:
2221         * NEWS: Add entry.
2222         * python/python.c (do_start_initialization): Initialize new event
2223         types.
2224         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2225         (gdbpy_initialize_inferior_deleted_event)
2226         (gdbpy_initialize_new_thread_event): Declare.
2227         * python/py-threadevent.c (create_thread_event_object): Add option
2228         "thread" parameter.
2229         * python/py-inferior.c (new_thread_event_object_type)
2230         (new_inferior_event_object_type)
2231         (inferior_deleted_event_object_type): Declare.
2232         (python_new_inferior, python_inferior_deleted): New functions.
2233         (add_thread_object): Emit new_thread event.
2234         (gdbpy_initialize_inferior): Attach new functions to corresponding
2235         observers.
2236         (new_thread, new_inferior, inferior_deleted): Define new event
2237         types.
2238         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2239         registries.
2240         * python/py-events.h (events_object) <new_inferior,
2241         inferior_deleted, new_thread>: New fields.
2242         * python/py-event.h (create_thread_event_breakpoint): Add optional
2243         "thread" parameter.
2244
2245 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2246
2247         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2248         check current_ui instead.
2249         (internal_vproblem): Likewise.
2250
2251 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2252
2253         * thread.c (print_thread_info_1): Remove unnecessary calls to
2254         uiout->is_mi_like_p.
2255
2256 2017-09-09  Tom Tromey  <tom@tromey.com>
2257
2258         * namespace.h (add_using_directive): Update.
2259         * namespace.c (add_using_directive): Change type of excludes to
2260         std::vector.
2261         * dwarf2read.c (read_import_statement): Use std::vector.
2262         (read_namespace): Update.
2263         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2264
2265 2017-09-09  Tom Tromey  <tom@tromey.com>
2266
2267         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2268
2269 2017-09-09  Tom Tromey  <tom@tromey.com>
2270
2271         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2272
2273 2017-09-09  Tom Tromey  <tom@tromey.com>
2274
2275         * stack.c (func_command): Use gdb::def_vector.
2276
2277 2017-09-09  Tom Tromey  <tom@tromey.com>
2278
2279         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2280         ui_out_emit_list, ui_out_emit_tuple.
2281         (mi_cmd_var_update): Likewise.
2282
2283 2017-09-09  Tom Tromey  <tom@tromey.com>
2284
2285         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2286         ui_out_redirect_pop.
2287         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2288         ui_out_redirect_pop.
2289         * utils.c (do_ui_out_redirect_pop)
2290         (make_cleanup_ui_out_redirect_pop): Remove.
2291         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2292         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2293         * ui-out.h (ui_out_redirect_pop): New class.
2294
2295 2017-09-09  Tom Tromey  <tom@tromey.com>
2296
2297         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2298         (list_available_thread_groups, mi_cmd_list_thread_groups)
2299         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2300         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2301         Likewise.
2302
2303 2017-09-09  Tom Tromey  <tom@tromey.com>
2304
2305         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2306         ui_out_emit_tuple.
2307
2308 2017-09-09  Tom Tromey  <tom@tromey.com>
2309
2310         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2311         * stack.c (print_frame): Use ui_out_emit_tuple.
2312         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2313         (info_spu_mailbox_command, info_spu_dma_command)
2314         (info_spu_proxydma_command): Likewise.
2315         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2316         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2317         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2318         ui_out_emit_tuple.
2319         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2320
2321 2017-09-09  Tom Tromey  <tom@tromey.com>
2322
2323         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2324         (class ui_out_emit_table): Update comment.
2325         * ui-out.c (do_cleanup_table_end)
2326         (make_cleanup_ui_out_table_begin_end): Remove.
2327         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2328         (info_spu_dma_cmdlist): Likewise.
2329         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2330         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2331         ui_out_emit_table.
2332
2333 2017-09-09  Tom Tromey  <tom@tromey.com>
2334
2335         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2336         ui_out_emit_list, gdb::optional.
2337
2338 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2339
2340         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2341         prototype.
2342         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2343         prototype.
2344         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2345         prototype.
2346         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2347         * ada-exp.y: Remove _initialize_ada_exp prototype.
2348         * ada-lang.c: Remove _initialize_ada_language prototype.
2349         * ada-tasks.c: Remove _initialize_tasks prototype.
2350         * addrmap.c: Remove _initialize_addrmap prototype.
2351         * agent.c: Remove _initialize_agent prototype.
2352         * aix-thread.c: Remove _initialize_aix_thread prototype.
2353         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2354         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2355         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2356         prototype.
2357         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2358         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2359         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2360         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2361         prototype.
2362         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2363         prototype.
2364         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2365         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2366         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2367         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2368         prototype.
2369         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2370         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2371         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2372         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2373         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2374         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2375         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2376         prototype.
2377         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2378         prototype.
2379         * annotate.c: Remove _initialize_annotate prototype.
2380         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2381         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2382         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2383         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2384         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2385         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2386         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2387         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2388         prototype.
2389         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2390         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2391         * auto-load.c: Remove _initialize_auto_load prototype.
2392         * auxv.c: Remove _initialize_auxv prototype.
2393         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2394         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2395         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2396         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2397         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2398         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2399         prototype.
2400         * break-catch-throw.c: Remove _initialize_break_catch_throw
2401         prototype.
2402         * breakpoint.c: Remove _initialize_breakpoint prototype.
2403         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2404         * btrace.c: Remove _initialize_btrace prototype.
2405         * charset.c: Remove _initialize_charset prototype.
2406         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2407         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2408         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2409         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2410         * cli/cli-script.c: Remove _initialize_cli_script prototype.
2411         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2412         * coffread.c: Remove _initialize_coffread prototype.
2413         * compile/compile.c: Remove _initialize_compile prototype.
2414         * complaints.c: Remove _initialize_complaints prototype.
2415         * completer.c: Remove _initialize_completer prototype.
2416         * copying.awk: Remove _initialize_copying prototype.
2417         * copying.c: Regenerate.
2418         * core-regset.c: Remove _initialize_core_regset prototype.
2419         * corefile.c: Remove _initialize_core prototype.
2420         * corelow.c: Remove _initialize_corelow prototype.
2421         * cp-abi.c: Remove _initialize_cp_abi prototype.
2422         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2423         * cp-support.c: Remove _initialize_cp_support prototype.
2424         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2425         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2426         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2427         * ctf.c: Remove _initialize_ctf prototype.
2428         * d-lang.c: Remove _initialize_d_language prototype.
2429         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2430         prototype.
2431         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2432         * dbxread.c: Remove _initialize_dbxread prototype.
2433         * dcache.c: Remove _initialize_dcache prototype.
2434         * demangle.c: Remove _initialize_demangler prototype.
2435         * disasm-selftests.c: Remove _initialize_disasm_selftests
2436         prototype.
2437         * disasm.c: Remove _initialize_disasm prototype.
2438         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2439         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2440         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2441         prototype.
2442         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2443         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2444         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2445         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2446         * elfread.c: Remove _initialize_elfread prototype.
2447         * exec.c: Remove _initialize_exec prototype.
2448         * extension.c: Remove _initialize_extension prototype.
2449         * f-lang.c: Remove _initialize_f_language prototype.
2450         * f-valprint.c: Remove _initialize_f_valprint prototype.
2451         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2452         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2453         * filesystem.c: Remove _initialize_filesystem prototype.
2454         * findcmd.c: Remove _initialize_mem_search prototype.
2455         * fork-child.c: Remove _initialize_fork_child prototype.
2456         * frame-base.c: Remove _initialize_frame_base prototype.
2457         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2458         * frame.c: Remove _initialize_frame prototype.
2459         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2460         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2461         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2462         * gcore.c: Remove _initialize_gcore prototype.
2463         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2464         * gdbarch.c: Regenerate.
2465         * gdbarch.sh: Remove _initialize_gdbarch prototype.
2466         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2467         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2468         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2469         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2470         * go-lang.c: Remove _initialize_go_language prototype.
2471         * go32-nat.c: Remove _initialize_go32_nat prototype.
2472         * guile/guile.c: Remove _initialize_guile prototype.
2473         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2474         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2475         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2476         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2477         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2478         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2479         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2480         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2481         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2482         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2483         prototype.
2484         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2485         prototype.
2486         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2487         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2488         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2489         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2490         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2491         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2492         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2493         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2494         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2495         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2496         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2497         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2498         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2499         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2500         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2501         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2502         prototype.
2503         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2504         prototype.
2505         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2506         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2507         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2508         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2509         * infcall.c: Remove _initialize_infcall prototype.
2510         * infcmd.c: Remove _initialize_infcmd prototype.
2511         * inferior.c: Remove _initialize_inferiors prototype.
2512         * inflow.c: Remove _initialize_inflow prototype.
2513         * infrun.c: Remove _initialize_infrun prototype.
2514         * interps.c: Remove _initialize_interpreter prototype.
2515         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2516         * jit.c: Remove _initialize_jit prototype.
2517         * language.c: Remove _initialize_language prototype.
2518         * linux-fork.c: Remove _initialize_linux_fork prototype.
2519         * linux-nat.c: Remove _initialize_linux_nat prototype.
2520         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2521         * linux-thread-db.c: Remove _initialize_thread_db prototype.
2522         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2523         * m2-lang.c: Remove _initialize_m2_language prototype.
2524         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2525         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2526         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2527         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2528         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2529         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2530         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2531         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2532         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2533         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2534         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2535         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2536         * machoread.c: Remove _initialize_machoread prototype.
2537         * macrocmd.c: Remove _initialize_macrocmd prototype.
2538         * macroscope.c: Remove _initialize_macroscope prototype.
2539         * maint.c: Remove _initialize_maint_cmds prototype.
2540         * mdebugread.c: Remove _initialize_mdebugread prototype.
2541         * memattr.c: Remove _initialize_mem prototype.
2542         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2543         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2544         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2545         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2546         * mi/mi-main.c: Remove _initialize_mi_main prototype.
2547         * microblaze-linux-tdep.c: Remove
2548         _initialize_microblaze_linux_tdep prototype.
2549         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2550         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2551         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2552         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2553         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2554         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2555         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2556         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2557         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2558         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2559         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2560         prototype.
2561         * mipsread.c: Remove _initialize_mipsread prototype.
2562         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2563         prototype.
2564         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2565         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2566         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2567         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2568         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2569         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2570         prototype.
2571         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2572         * nto-procfs.c: Remove _initialize_procfs prototype.
2573         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2574         * objc-lang.c: Remove _initialize_objc_language prototype.
2575         * objfiles.c: Remove _initialize_objfiles prototype.
2576         * observer.c: Remove observer_test_first_notification_function,
2577         observer_test_second_notification_function,
2578         observer_test_third_notification_function, and
2579         _initialize_observer prototypes.
2580         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2581         * osabi.c: Remove _initialize_gdb_osabi prototype.
2582         * osdata.c: Remove _initialize_osdata prototype.
2583         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2584         * parse.c: Remove _initialize_parse prototype.
2585         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2586         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2587         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2588         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2589         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2590         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2591         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2592         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2593         * printcmd.c: Remove _initialize_printcmd prototype.
2594         * probe.c: Remove _initialize_probe prototype.
2595         * proc-api.c: Remove _initialize_proc_api prototype.
2596         * proc-events.c: Remove _initialize_proc_events prototype.
2597         * proc-service.c: Remove _initialize_proc_service prototype.
2598         * procfs.c: Remove _initialize_procfs prototype.
2599         * psymtab.c: Remove _initialize_psymtab prototype.
2600         * python/python.c: Remove _initialize_python prototype.
2601         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2602         * record-btrace.c: Remove _initialize_record_btrace prototype.
2603         * record-full.c: Remove _initialize_record_full prototype.
2604         * record.c: Remove _initialize_record prototype.
2605         * regcache.c: Remove _initialize_regcache prototype.
2606         * reggroups.c: Remove _initialize_reggroup prototype.
2607         * remote-notif.c: Remove _initialize_notif prototype.
2608         * remote-sim.c: Remove _initialize_remote_sim prototype.
2609         * remote.c: Remove _initialize_remote prototype.
2610         * reverse.c: Remove _initialize_reverse prototype.
2611         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2612         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2613         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2614         prototype.
2615         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2616         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2617         * rust-exp.y: Remove _initialize_rust_exp prototype.
2618         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2619         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2620         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2621         * score-tdep.c: Remove _initialize_score_tdep prototype.
2622         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2623         prototype.
2624         * ser-go32.c: Remove _initialize_ser_dos prototype.
2625         * ser-mingw.c: Remove _initialize_ser_windows prototype.
2626         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2627         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2628         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2629         * serial.c: Remove _initialize_serial prototype.
2630         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2631         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2632         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2633         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2634         * skip.c: Remove _initialize_step_skip prototype.
2635         * sol-thread.c: Remove _initialize_sol_thread prototype.
2636         * solib-aix.c: Remove _initialize_solib_aix prototype.
2637         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2638         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2639         * solib-frv.c: Remove _initialize_frv_solib prototype.
2640         * solib-spu.c: Remove _initialize_spu_solib prototype.
2641         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2642         * solib-target.c: Remove _initialize_solib_target prototype.
2643         * solib.c: Remove _initialize_solib prototype.
2644         * source.c: Remove _initialize_source prototype.
2645         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2646         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2647         prototype.
2648         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2649         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2650         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2651         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2652         prototype.
2653         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2654         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2655         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2656         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2657         prototype.
2658         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2659         prototype.
2660         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2661         prototype.
2662         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2663         prototype.
2664         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2665         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2666         prototype.
2667         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2668         prototype.
2669         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2670         prototype.
2671         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2672         prototype.
2673         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2674         prototype.
2675         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2676         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2677         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2678         * stabsread.c: Remove _initialize_stabsread prototype.
2679         * stack.c: Remove _initialize_stack prototype.
2680         * stap-probe.c: Remove _initialize_stap_probe prototype.
2681         * std-regs.c: Remove _initialize_frame_reg prototype.
2682         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2683         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2684         * symfile.c: Remove _initialize_symfile prototype.
2685         * symmisc.c: Remove _initialize_symmisc prototype.
2686         * symtab.c: Remove _initialize_symtab prototype.
2687         * target-dcache.c: Remove _initialize_target_dcache prototype.
2688         * target-descriptions.c: Remove _initialize_target_descriptions
2689         prototype.
2690         * thread.c: Remove _initialize_thread prototype.
2691         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2692         prototype.
2693         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2694         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2695         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2696         prototype.
2697         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2698         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2699         * tracefile.c: Remove _initialize_tracefile prototype.
2700         * tracepoint.c: Remove _initialize_tracepoint prototype.
2701         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2702         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2703         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2704         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2705         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2706         * tui/tui-win.c: Remove _initialize_tui_win prototype.
2707         * tui/tui.c: Remove _initialize_tui prototype.
2708         * typeprint.c: Remove _initialize_typeprint prototype.
2709         * user-regs.c: Remove _initialize_user_regs prototype.
2710         * utils.c: Remove _initialize_utils prototype.
2711         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2712         * valarith.c: Remove _initialize_valarith prototype.
2713         * valops.c: Remove _initialize_valops prototype.
2714         * valprint.c: Remove _initialize_valprint prototype.
2715         * value.c: Remove _initialize_values prototype.
2716         * varobj.c: Remove _initialize_varobj prototype.
2717         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2718         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2719         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2720         * windows-nat.c: Remove _initialize_windows_nat,
2721         _initialize_check_for_gdb_ini, and _initialize_loadable
2722         prototypes.
2723         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2724         * xcoffread.c: Remove _initialize_xcoffread prototype.
2725         * xml-support.c: Remove _initialize_xml_support prototype.
2726         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2727         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2728         prototype.
2729         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2730         prototype.
2731         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2732
2733 2017-09-08  Keith Seitz  <keiths@redhat.com>
2734
2735         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2736         field.
2737
2738 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
2739
2740         * f-valprint.c (f_val_print): Remove check for one byte
2741         sized integers. Remove printing of character type.
2742
2743 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
2744             Christoph Weinmann  <christoph.t.weinmann@intel.com>
2745             Bernhard Heckel  <bernhard.heckel@intel.com>
2746
2747         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2748         to maintain proper indentation when printing pointers/refs.
2749
2750 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2751
2752         GDB 8.0.1 released.
2753
2754 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2755
2756         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2757
2758 2017-09-05  Tom Tromey  <tom@tromey.com>
2759
2760         * parse.c (funcall_chain): Now a std::vector.
2761         (start_arglist, end_arglist): Simplify.
2762         (free_funcalls): Remove.
2763         (parse_exp_in_context_1): Remove cleanup.
2764
2765 2017-09-05  Tom Tromey  <tom@tromey.com>
2766
2767         * go-exp.y (go_parse): Don't create a cleanup.
2768
2769 2017-09-05  Tom Tromey  <tom@tromey.com>
2770
2771         * d-exp.y (PrimaryExpression): Use std::string.
2772         (d_parse): Don't create a cleanup.
2773
2774 2017-09-05  Tom Tromey  <tom@tromey.com>
2775
2776         * utils.c (do_clear_parser_state): Remove.
2777         (make_cleanup_clear_parser_state): Remove.
2778         * p-exp.y (pascal_parse): Use scoped_restore.
2779         * m2-exp.y (m2_parse): Use scoped_restore.
2780         * f-exp.y (f_parse): Use scoped_restore.
2781         * d-exp.y (d_parse): Use scoped_restore.
2782         * c-exp.y (c_parse): Use scoped_restore.
2783         * ada-exp.y (ada_parse): Use scoped_restore.
2784         * utils.h (make_cleanup_clear_parser_state): Remove.
2785
2786 2017-09-06  Keith Seitz  <keiths@redhat.com>
2787
2788         * dwarf2read.c (dw2_linkage_name_attr): New function.
2789         (dw2_linkage_name): New function.
2790         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2791         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2792         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2793
2794 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2795
2796         * config/djgpp/djconfig.sh: Correct shell portability issue.
2797
2798 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2799
2800         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2801
2802 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2803
2804         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2805         * NEWS: Mention new FreeBSD/mips native configuration.
2806         * configure.host: Add aarch64*-*-freebsd*.
2807         * configure.nat: Likewise.
2808         * aarch64-fbsd-nat.c: New file.
2809
2810 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2811
2812         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2813         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2814         * NEWS: Mention new FreeBSD/aarch64 target.
2815         * configure.tgt: Add aarch64*-*-freebsd*.
2816         * aarch64-fbsd-tdep.c: New file.
2817         * aarch64-fbsd-tdep.h: New file.
2818
2819 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2820
2821         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2822
2823 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2824
2825         * parse.c (find_minsym_type_and_address): Don't relocate addresses
2826         of TLS symbols.
2827
2828 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2829
2830         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2831         call.
2832
2833 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2834
2835         * infrun.c (follow_exec): Call add_thread after
2836         target_find_description.
2837
2838 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2839
2840         * infrun.c (handle_inferior_event_1): When exec'ing, read
2841         stop_pc after follow_exec.
2842
2843 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2844
2845         * remote.c (process_g_packet): Update error message.
2846
2847 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2848
2849         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2850         targets.
2851
2852 2017-09-05  Pedro Alves  <palves@redhat.com>
2853
2854         * eval.c (eval_call, evaluate_funcall): New functions, factored
2855         out from ...
2856         (evaluate_subexp_standard): ... this.
2857
2858 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2859
2860         * amd64-tdep.c (amd64_target_description): Create target
2861         descriptions.
2862         (_initialize_amd64_tdep): Don't call functions
2863         initialize_tdesc_amd64_*.  Add self tests.
2864         * arch/amd64.c (amd64_create_target_description): Add parameter
2865         is_linux.  Call set_tdesc_osabi if is_linux is true.
2866         * arch/amd64.h (amd64_create_target_description): Update the
2867         declaration.
2868         * arch/i386.c (i386_create_target_description): Add parameter
2869         is_linux.  Call set_tdesc_osabi if is_linux is true.
2870         * arch/i386.h (i386_create_target_description): Update
2871         declaration.
2872         * configure.tgt: Add i386.o to gdb_target_obs.
2873         * features/Makefile (XMLTOC): Remove i386/*.xml.
2874         * features/i386/amd64-avx-avx512.c: Remove.
2875         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2876         * features/i386/amd64-avx-mpx.c: Remove.
2877         * features/i386/amd64-avx.c: Remove.
2878         * features/i386/amd64-mpx.c: Remove.
2879         * features/i386/amd64.c: Remove.
2880         * features/i386/i386-avx-avx512.c: Remove.
2881         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2882         * features/i386/i386-avx-mpx.c: Remove.
2883         * features/i386/i386-avx.c: Remove.
2884         * features/i386/i386-mmx.c: Remove.
2885         * features/i386/i386-mpx.c: Remove.
2886         * features/i386/i386.c: Remove.
2887         * i386-tdep.c: Don't include features/i386/i386*.c., include
2888         target-descriptions.h and arch/i386.h.
2889         (i386_target_description): Create target descriptions.
2890         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2891         functions.  Do self tests.
2892
2893 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2894
2895         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2896         * features/i386/amd64-avx-avx512-linux.c: Removed.
2897         * features/i386/amd64-avx-linux.c: Removed.
2898         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2899         * features/i386/amd64-avx-mpx-linux.c: Removed.
2900         * features/i386/amd64-linux.c: Removed.
2901         * features/i386/amd64-mpx-linux.c: Removed.
2902         * features/i386/x32-avx-avx512-linux.c: Removed.
2903         * features/i386/x32-avx-linux.c: Removed.
2904         * features/i386/x32-linux.c: Removed.
2905
2906 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2907
2908         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
2909         features/i386/*.c.
2910         (amd64_linux_read_description): Call
2911         amd64_create_target_description.
2912         * arch/amd64.c: New file.
2913         * arch/amd64.h: New file.
2914         * configure.tgt (x86_64-*-linux*): Append amd64.o.
2915         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2916
2917 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2918
2919         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2920         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
2921         (amd64_linux_read_description): Create target descriptions.
2922         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2923         functions.  Add unit tests.
2924         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2925         x32-core.xml.
2926         * features/i386/64bit-avx.c: Generated.
2927         * features/i386/64bit-avx512.c: Generated.
2928         * features/i386/64bit-core.c: Generated.
2929         * features/i386/64bit-linux.c: Generated.
2930         * features/i386/64bit-mpx.c: Generated.
2931         * features/i386/64bit-pkeys.c: Generated.
2932         * features/i386/64bit-segments.c: Generated.
2933         * features/i386/64bit-sse.c: Generated.
2934         * features/i386/x32-core.c: Generated.
2935         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2936         c files for amd64-linux and x32-linux.
2937
2938 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2939
2940         * amd64-linux-tdep.c (amd64_linux_read_description): New
2941         function.
2942         (amd64_linux_core_read_description): Call
2943         amd64_linux_read_description.
2944         (amd64_linux_init_abi): Likewise.
2945         (amd64_x32_linux_init_abi): Likewise.
2946         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2947         * x86-linux-nat.c (x86_linux_read_description): Call
2948         amd64_linux_read_description.
2949
2950 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2951
2952         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2953         comments.
2954
2955 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2956
2957         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2958         * features/i386/i386-avx-avx512-linux.c: Remove.
2959         * features/i386/i386-avx-linux.c: Remove.
2960         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2961         * features/i386/i386-avx-mpx-linux.c: Remove.
2962         * features/i386/i386-linux.c: Remove.
2963         * features/i386/i386-mmx-linux.c: Remove.
2964         * features/i386/i386-mpx-linux.c: Remove.
2965
2966 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2967
2968         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2969         (SFILES): Add arch/i386.c.
2970         (HFILES_NO_SRCDIR): Add arch/i386.h.
2971         * arch/i386.c: New file.
2972         * arch/i386.h: New file.
2973         * arch/tdesc.h (allocate_target_description): Declare.
2974         (set_tdesc_architecture): Declare.
2975         (set_tdesc_osabi): Declare.
2976         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2977         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2978         include arch/i386.h.
2979         (i386_linux_read_description): Remove code and call
2980         i386_create_target_description.
2981         (set_tdesc_architecture): New function.
2982         (set_tdesc_osabi): New function.
2983         * target-descriptions.h (allocate_target_description): Remove.
2984
2985 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2986
2987         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2988         * target-descriptions.c (tdesc_create_feature): Likewise, and
2989         adjust code.
2990         * features/i386/32bit-avx.c: Re-generated.
2991         * features/i386/32bit-avx512.c: Re-generated.
2992         * features/i386/32bit-core.c: Re-generated.
2993         * features/i386/32bit-linux.c: Re-generated.
2994         * features/i386/32bit-mpx.c: Re-generated.
2995         * features/i386/32bit-pkeys.c: Re-generated.
2996         * features/i386/32bit-sse.c: Re-generated.
2997
2998 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2999
3000         * regformats/regdef.h (struct reg): Override operator == and !=.
3001
3002 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3003
3004         * arch/tdesc.h: New file.
3005         * regformats/regdat.sh: Generate code using tdesc_create_reg.
3006         * target-descriptions.c: Update comments.
3007         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
3008         declarations.
3009         * features/i386/32bit-avx.c: Re-generated.
3010         * features/i386/32bit-avx512.c: Re-generated.
3011         * features/i386/32bit-core.c: Re-generated.
3012         * features/i386/32bit-linux.c: Re-generated.
3013         * features/i386/32bit-mpx.c: Re-generated.
3014         * features/i386/32bit-pkeys.c: Re-generated.
3015         * features/i386/32bit-sse.c: Re-generated.
3016
3017 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3018
3019         * regformats/regdat.sh: Update generated code.
3020
3021 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3022
3023         * regformats/regdat.sh: Adjust code order.
3024
3025 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3026
3027         * expprint.c (dump_subexp_body_standard): Use constant format
3028         string in fprintf_filtered call.
3029
3030 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3031
3032         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3033         NetBSD/i386.
3034         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3035
3036 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3037
3038         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3039
3040 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3041
3042         * bsd-kvm.o: Define _KMEMUSER.
3043         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3044         * configure: Regenerate.
3045
3046 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3047
3048         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3049         * i386-fbsd-nat.c: Likewise.
3050
3051 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3052
3053         * unittests/array-view-selftests.c: Add include of <array>.
3054
3055 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3056
3057         * spu-tdep.c (flush_ea_cache): Add missing argument to
3058         call_function_by_hand.
3059
3060 2017-09-04  Pedro Alves  <palves@redhat.com>
3061
3062         * NEWS (Safer support for debugging with no debug info): New.
3063
3064 2017-09-04  Pedro Alves  <palves@redhat.com>
3065
3066         * c-exp.y (function_method, function_method_void): Add current
3067         instance flags to TYPE_INSTANCE.
3068         * dwarf2read.c (check_modifier): New.
3069         (compute_delayed_physnames): Assert that only C++ adds delayed
3070         physnames.  Mark fn_fields as const/volatile depending on
3071         physname.
3072         * eval.c (make_params): New type_instance_flags parameter.  Use
3073         it as the new type's instance flags.
3074         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3075         flags element and pass it to make_params.
3076         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3077         instance flags element.
3078         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3079         * gdbtypes.h: Include "enum-flags.h".
3080         (type_instance_flags): New enum-flags type.
3081         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3082         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3083         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3084         (follow_type_instance_flags): New function.
3085         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3086         * parser-defs.h (follow_type_instance_flags): Declare.
3087         * valops.c (value_struct_elt_for_reference): const/volatile must
3088         match too.
3089
3090 2017-09-04  Pedro Alves  <palves@redhat.com>
3091
3092         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3093         function/method scopes; lookup the nested name as a function local
3094         static variable.
3095
3096 2017-09-04  Pedro Alves  <palves@redhat.com>
3097
3098         (%type <voidval>): Add function_method.
3099         * c-exp.y (exp): New production for calls with no arguments.
3100         (function_method, function_method_void_or_typelist): New
3101         productions.
3102         (exp): New production for "method()::static_var".
3103         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3104         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3105         Handle OP_FUNC_STATIC_VAR.
3106         * parse.c (operator_length_standard):
3107         Handle OP_FUNC_STATIC_VAR.
3108
3109 2017-09-04  Pedro Alves  <palves@redhat.com>
3110
3111         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3112         handling.
3113         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3114         Ditto.
3115         * parse.c (operator_length_standard, operator_check_standard):
3116         Ditto.
3117         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3118
3119 2017-09-04  Pedro Alves  <palves@redhat.com>
3120
3121         * ax-gdb.c: Include "typeprint.h".
3122         (gen_expr_for_cast): New function.
3123         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3124         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3125         type is unknown.
3126         * dwarf2read.c (new_symbol_full): Fallback to int instead of
3127         nodebug_data_symbol.
3128         * eval.c: Include "typeprint.h".
3129         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3130         Error out if symbol has unknown type.
3131         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3132         evaluate_subexp_for_cast.
3133         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3134         OP_VAR_MSYM_VALUE.
3135         (evaluate_subexp_for_cast): New function.
3136         * gdbtypes.c (init_nodebug_var_type): New function.
3137         (objfile_type): Use it to initialize types of variables with no
3138         debug info.
3139         * typeprint.c (error_unknown_type): New.
3140         * typeprint.h (error_unknown_type): New declaration.
3141         * compile/compile-c-types.c (convert_type_basic): Handle
3142         TYPE_CODE_ERROR; warn and fallback to int for variables with
3143         unknown type.
3144
3145 2017-09-04  Pedro Alves  <palves@redhat.com>
3146
3147         * eval.c (evaluate_var_value): New function, factored out from ...
3148         (evaluate_subexp_standard): ... here.
3149
3150 2017-09-04  Pedro Alves  <palves@redhat.com>
3151
3152         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3153         Remove useless assignments to 'op'.
3154
3155 2017-09-04  Pedro Alves  <palves@redhat.com>
3156
3157         * eval.c (eval_skip_value): New function.
3158         (evaluate_subexp_standard): Use it.
3159
3160 2017-09-04  Pedro Alves  <palves@redhat.com>
3161
3162         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3163         function name from symbol/minsym and pass it to
3164         error_call_unknown_return_type.
3165
3166 2017-09-04  Pedro Alves  <palves@redhat.com>
3167
3168         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3169         * ax-gdb.c (gen_msym_var_ref): New function.
3170         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3171         * eval.c (evaluate_var_msym_value): New function.
3172         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3173         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3174         to call_function_by_hand.
3175         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3176         Handle OP_VAR_MSYM_VALUE.
3177         (union exp_element) <msymbol>: New field.
3178         * minsyms.h (struct type): Forward declare.
3179         (find_minsym_type_and_address): Declare.
3180         * parse.c (write_exp_elt_msym): New function.
3181         (write_exp_msymbol): Delete, refactored as ...
3182         (find_minsym_type_and_address): ... this new function.
3183         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3184         (operator_length_standard, operator_check_standard): Handle
3185         OP_VAR_MSYM_VALUE.
3186         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3187
3188 2017-09-04  Pedro Alves  <palves@redhat.com>
3189
3190         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3191         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3192         unknown.
3193         * ada-typeprint.c (print_func_type): Handle functions with unknown
3194         return type.
3195         * c-typeprint.c (c_type_print_base): Handle functions and methods
3196         with unknown return type.
3197         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3198         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3199         * compile/compile-c-types.c: Include "objfiles.h".
3200         (convert_func): For functions with unknown return type, warn and
3201         default to int.
3202         * compile/compile-object-run.c (compile_object_run): Adjust call
3203         to call_function_by_hand_dummy.
3204         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3205         call_function_by_hand.
3206         * eval.c (evaluate_subexp_standard): Adjust calls to
3207         call_function_by_hand.  Handle functions and methods with unknown
3208         return type.  Pass expect_type to call_function_by_hand.
3209         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3210         return type.
3211         * gcore.c (call_target_sbrk): Adjust call to
3212         call_function_by_hand.
3213         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3214         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3215         an integer address type instead of nodebug.
3216         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3217         call_function_by_hand.
3218         * infcall.c (error_call_unknown_return_type): New function.
3219         (call_function_by_hand): New "default_return_type" parameter.
3220         Pass it down.
3221         (call_function_by_hand_dummy): New "default_return_type"
3222         parameter.  Use it instead of defaulting to int.  If there's no
3223         default and the return type is unknown, throw an error.  If
3224         there's a default return type, and the called function has no
3225         debug info, then assume the function is prototyped.
3226         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3227         New "default_return_type" parameter.
3228         (error_call_unknown_return_type): New declaration.
3229         * linux-fork.c (call_lseek): Cast return type of lseek.
3230         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3231         call_function_by_hand.
3232         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3233         calls to call_function_by_hand.
3234         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3235         return type.
3236         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3237         (value_nsstring, print_object_command): Adjust calls to
3238         call_function_by_hand.
3239         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3240         functions with unknown return type.
3241         (pascal_type_print_func_varspec_suffix): New function.
3242         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3243         TYPE_CODE_METHOD>: Use it.
3244         * python/py-value.c (valpy_call): Adjust call to
3245         call_function_by_hand.
3246         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3247         call_function_by_hand.
3248         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3249         call_function_by_hand.
3250         * valops.c (value_allocate_space_in_inferior): Adjust call to
3251         call_function_by_hand.
3252         * typeprint.c (type_print_unknown_return_type): New function.
3253         * typeprint.h (type_print_unknown_return_type): New declaration.
3254
3255 2017-09-04  Pedro Alves  <palves@redhat.com>
3256
3257         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3258         types with more than one parameter as prototyped.
3259
3260 2017-09-04  Pedro Alves  <palves@redhat.com>
3261
3262         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3263         (disassemble_command): Use gdb_disassembly_flags instead of bare
3264         int.
3265         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3266         (dump_insns, do_mixed_source_and_assembly_deprecated)
3267         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3268         Use gdb_disassembly_flags instead of bare int.
3269         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3270         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3271         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3272         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3273         (enum gdb_disassembly_flag): ... values of this new enumeration.
3274         (gdb_disassembly_flags): Define.
3275         (gdb_disassembly)
3276         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3277         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3278         gdb_disassembly_flags instead of bare int.
3279         * record-btrace.c (btrace_insn_history)
3280         (record_btrace_insn_history, record_btrace_insn_history_range)
3281         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3282         instead of bare int.
3283         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3284         Use gdb_disassembly_flags instead of bare int.
3285         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3286         Define.
3287         * target-delegates.c: Regenerate.
3288         * target.c (target_insn_history, target_insn_history_from)
3289         (target_insn_history_range): Use gdb_disassembly_flags instead of
3290         bare int.
3291         * target.h: Include "disasm.h".
3292         (struct target_ops) <to_insn_history, to_insn_history_from,
3293         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3294         int.
3295         (target_insn_history, target_insn_history_from)
3296         (target_insn_history_range): Use gdb_disassembly_flags instead of
3297         bare int.
3298
3299 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3300
3301         * cli/cli-script.c (build_command_line): For if/while commands,
3302         check whether args is empty.
3303
3304 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3305
3306         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3307         (enum command_control_type): Likewise.
3308         (struct command_line): Likewise.
3309         (free_command_lines): Likewise.
3310         (struct command_lines_deleter): Likewise.
3311         (command_line_up): Likewise.
3312         (read_command_lines): Likewise.
3313         (read_command_lines_1): Likewise.
3314         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3315         (enum command_control_type): Likewise.
3316         (struct command_line): Likewise.
3317         (free_command_lines): Likewise.
3318         (struct command_lines_deleter): Likewise.
3319         (command_line_up): Likewise.
3320         (read_command_lines): Likewise.
3321         (read_command_lines_1): Likewise.
3322         * breakpoint.h: Include cli/cli-script.h.
3323         * extension-priv.h: Likewise.
3324         * gdbcmd.h: Likewise.
3325
3326 2017-09-04  Pedro Alves  <palves@redhat.com>
3327
3328         * ada-lang.c (is_known_support_routine): Move sal declaration to
3329         where it is initialized.
3330         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3331         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3332         (clear_command, update_static_tracepoint): Remove init_sal
3333         references.  Move declarations closer to initializations.
3334         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3335         initializations.
3336         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3337         references.  Move sal declarations closer to initializations.
3338         * frame.c (find_frame_sal): Return a symtab_and_line via function
3339         return instead of output parameter.  Remove init_sal references.
3340         * frame.h (find_frame_sal): Return a symtab_and_line via function
3341         return instead of output parameter.
3342         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3343         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3344         instead of memset.
3345         (gdbscm_find_pc_line): Remove init_sal reference.
3346         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3347         references.  Move declarations closer to initializations.
3348         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3349         initializations.
3350         (finish_backward): Remove init_sal references.  Move declarations
3351         closer to initializations.
3352         * infrun.c (process_event_stop_test, handle_step_into_function)
3353         (insert_hp_step_resume_breakpoint_at_frame)
3354         (insert_step_resume_breakpoint_at_caller): Likewise.
3355         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3356         (symbol_to_sal): Likewise.
3357         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3358         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3359         to its initialization.
3360         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3361         init_sal references.  Move declarations closer to initializations.
3362         * source.c (get_current_source_symtab_and_line): Remove brace
3363         initialization.
3364         (set_current_source_symtab_and_line): Now takes the sal by const
3365         reference.  Remove brace initialization.
3366         (line_info): Remove init_sal reference.
3367         * source.h (set_current_source_symtab_and_line): Now takes a
3368         symtab_and_line via const reference.
3369         * stack.c (set_current_sal_from_frame): Adjust.
3370         (print_frame_info): Adjust.
3371         (get_last_displayed_sal): Return the sal via function return
3372         instead of via output parameter.  Simplify.
3373         (frame_info): Adjust.
3374         * stack.h (get_last_displayed_sal): Return the sal via function
3375         return instead of via output parameter.
3376         * symtab.c (init_sal): Delete.
3377         (find_pc_sect_line): Remove init_sal references.  Move
3378         declarations closer to initializations.
3379         (find_function_start_sal): Remove init_sal references.  Move
3380         declarations closer to initializations.
3381         * symtab.h (struct symtab_and_line): In-class initialize all
3382         fields.
3383         * tracepoint.c (set_traceframe_context)
3384         (print_one_static_tracepoint_marker): Remove init_sal references.
3385         Move declarations closer to initializations.
3386         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3387         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
3388         declarations closer to initializations.
3389         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3390         init_sal references.  Adjust.
3391
3392 2017-09-04  Pedro Alves  <palves@redhat.com>
3393
3394         * ax-gdb.c (agent_command_1): Use range-for.
3395         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3396         * breakpoint.c: Include "common/array-view.h".
3397         (init_breakpoint_sal, create_breakpoint_sal): Change sals
3398         parameter from struct symtabs_and_lines to
3399         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
3400         (breakpoint_sals_to_pc): Change sals parameter from struct
3401         symtabs_and_lines to std::vector reference.
3402         (check_fast_tracepoint_sals): Change sals parameter from struct
3403         symtabs_and_lines to std::array_view.  Use range-for.
3404         (decode_static_tracepoint_spec): Return a std::vector instead of
3405         symtabs_and_lines.  Update.
3406         (create_breakpoint): Update.
3407         (break_range_command, until_break_command, clear_command): Update.
3408         (base_breakpoint_decode_location, bkpt_decode_location)
3409         (bkpt_probe_create_sals_from_location)
3410         (bkpt_probe_decode_location, tracepoint_decode_location)
3411         (tracepoint_probe_decode_location)
3412         (strace_marker_create_sals_from_location): Return a std::vector
3413         instead of symtabs_and_lines.
3414         (strace_marker_create_breakpoints_sal): Update.
3415         (strace_marker_decode_location): Return a std::vector instead of
3416         symtabs_and_lines.  Update.
3417         (update_breakpoint_locations): Change struct symtabs_and_lines
3418         parameters to gdb::array_view.  Adjust.
3419         (location_to_sals): Return a std::vector instead of
3420         symtabs_and_lines.  Update.
3421         (breakpoint_re_set_default): Use std::vector instead of struct
3422         symtabs_and_lines.
3423         (decode_location_default): Return a std::vector instead of
3424         symtabs_and_lines.  Update.
3425         * breakpoint.h: Include "common/array-view.h".
3426         (struct breakpoint_ops) <decode_location>: Now returns a
3427         std::vector instead of returning a symtabs_and_lines via output
3428         parameter.
3429         (update_breakpoint_locations): Change sals parameters to use
3430         gdb::array_view.
3431         * cli/cli-cmds.c (edit_command, list_command): Update to use
3432         std::vector and gdb::array_view.
3433         (ambiguous_line_spec): Adjust to use gdb::array_view and
3434         range-for.
3435         (compare_symtabs): Rename to ...
3436         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
3437         const reference and adjust.
3438         (filter_sals): Rewrite using std::vector and standard algorithms.
3439         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3440         (jump_command): Update to use std::vector.
3441         * linespec.c (struct linespec_state) <canonical_names>: Update
3442         comment.
3443         (add_sal_to_sals_basic): Delete.
3444         (add_sal_to_sals, filter_results, convert_results_to_lsals)
3445         (decode_line_2, create_sals_line_offset)
3446         (convert_address_location_to_sals, convert_linespec_to_sals)
3447         (convert_explicit_location_to_sals, parse_linespec)
3448         (event_location_to_sals, decode_line_full, decode_line_1)
3449         (decode_line_with_current_source)
3450         (decode_line_with_last_displayed, decode_objc)
3451         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3452         (linespec_result::~linespec_result): Adjust to use std::vector
3453         instead of symtabs_and_lines.
3454         * linespec.h (linespec_sals::sals): Now a std::vector.
3455         (struct linespec_result): Use std::vector, bool, and in-class
3456         initialization.
3457         (decode_line_1, decode_line_with_current_source)
3458         (decode_line_with_last_displayed): Return std::vector.
3459         * macrocmd.c (info_macros_command): Use std::vector.
3460         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3461         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3462         std::vector.
3463         * probe.h (parse_probes): Return a std::vector.
3464         * python/python.c (gdbpy_decode_line): Use std::vector and
3465         gdb::array_view.
3466         * source.c (select_source_symtab, line_info): Use std::vector.
3467         * stack.c (func_command): Use std::vector.
3468         * symtab.h (struct symtabs_and_lines): Delete.
3469         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3470
3471 2017-09-04  Pedro Alves  <palves@redhat.com>
3472
3473         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3474         unittests/array-view-selftests.c.
3475         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3476         * common/array-view.h: New file.
3477         * unittests/array-view-selftests.c: New file.
3478
3479 2017-09-04  Pedro Alves  <palves@redhat.com>
3480
3481         * cli/cli-cmds.c (edit_command): Pass message to
3482         ambiguous_line_spec.
3483         (list_command): Pass message to ambiguous_line_spec.  Say
3484         "first"/"last" instead of "start" and "end" to be consistent with
3485         the manual.
3486         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
3487         them to print formatted message.
3488
3489 2017-09-04  Pedro Alves  <palves@redhat.com>
3490
3491         * btrace.c (ftrace_add_pt): Pass btrace_insn to
3492         ftrace_update_insns by reference instead of pointer.
3493
3494 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3495
3496         * i386-go32-tdep.c: Include x86-xstate.h.
3497         (i386_go32_init_abi): Call i386_target_description.
3498         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3499         if xcr0 is X86_XSTATE_X87_MASK.
3500         * i386-tdep.h (tdesc_i386): Remove the declaration.
3501         (tdesc_i386_mmx): Likewise.
3502
3503 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3504
3505         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3506         X86_XSTATE_SSE_MASK instead of 0.
3507
3508 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3509
3510         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3511         i386_target_description.
3512         * i386-fbsd-nat.c (i386fbsd_read_description): Call
3513         i386_target_description.
3514         * i386-tdep.c (i386_gdbarch_init): Likewise.
3515
3516 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3517
3518         * amd64-darwin-tdep.c: Include "x86-xstate.h".
3519         (x86_darwin_init_abi_64): Call amd64_target_description.
3520         * amd64-dicos-tdep.c: Likewise.
3521         * amd64-fbsd-nat.c: Likewise.
3522         * amd64-fbsd-tdep.c: Likewise.
3523         * amd64-nbsd-tdep.c: Likewise.
3524         * amd64-obsd-tdep.c: Likewise.
3525         * amd64-sol2-tdep.c: Likewise.
3526         * amd64-windows-tdep.c: Likewise.
3527         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3528
3529 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3530
3531         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3532         (btrace_function) <insn>: Change type to use std::vector.
3533         * btrace.c (ftrace_debug, ftrace_call_num_insn,
3534         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3535         ftrace_update_insns, ftrace_compute_global_level_offset,
3536         btrace_stitch_bts, btrace_clear, btrace_insn_get,
3537         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3538         change to std::vector.
3539         (ftrace_update_insns): Adjust to change to std::vector, change
3540         type of INSN parameter.
3541         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3542         * record-btrace.c (btrace_call_history_insn_range,
3543         btrace_compute_src_line_range,
3544         record_btrace_frame_prev_register): Adjust to change to
3545         std::vector.
3546         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3547         to change to std::vector.
3548
3549 2017-09-03  Tom Tromey  <tom@tromey.com>
3550
3551         * corefile.c (reopen_exec_file): Use std::string.
3552
3553 2017-09-03  Tom Tromey  <tom@tromey.com>
3554
3555         * compile/compile.c (compile_register_name_mangled): Return
3556         std::string.
3557         * compile/compile-loc2c.c (pushf_register_address): Update.
3558         (pushf_register): Update.
3559         * compile/compile-c-types.c (convert_array): Update.
3560         * compile/compile-c-symbols.c (generate_vla_size): Update.
3561         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3562         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3563         (convert_one_symbol): Update.
3564         (generate_c_for_for_one_variable): Update.
3565         * compile/compile-c-support.c (c_get_range_decl_name): Return a
3566         std::string.
3567         (generate_register_struct): Update.
3568         * compile/compile-internal.h (c_get_range_decl_name): Return a
3569         std::string.
3570         (compile_register_name_mangled): Return std::string.
3571
3572 2017-09-03  Tom Tromey  <tom@tromey.com>
3573
3574         * utils.c (perror_string): Return a std::string.
3575         (throw_perror_with_name, perror_warning_with_name): Update.
3576
3577 2017-09-03  Tom Tromey  <tom@tromey.com>
3578
3579         * demangle.c (demangle_command): Use std::string,
3580         unique_xmalloc_ptr.
3581
3582 2017-09-03  Tom Tromey  <tom@tromey.com>
3583
3584         * cli/cli-setshow.c (do_set_command): Use std::string.
3585
3586 2017-09-03  Tom Tromey  <tom@tromey.com>
3587
3588         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3589
3590 2017-09-03  Tom Tromey  <tom@tromey.com>
3591
3592         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3593
3594 2017-09-03  Tom Tromey  <tom@tromey.com>
3595
3596         * mi/mi-cmd-env.c (env_execute_cli_command): Use
3597         gdb::unique_xmalloc_ptr.
3598
3599 2017-09-03  Tom Tromey  <tom@tromey.com>
3600
3601         * thread.c (print_thread_info_1): Use string_printf.
3602         (thread_apply_command, thread_apply_all_command): Use
3603         std::string.
3604
3605 2017-09-03  Tom Tromey  <tom@tromey.com>
3606
3607         * valprint.c (val_print_string): Update.
3608         * gdbcore.h (memory_error_message): Return std::string.
3609         * corefile.c (memory_error_message): Return std::string.
3610         (memory_error): Update.
3611         * breakpoint.c (insert_bp_location): Update.
3612
3613 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
3614
3615         * target/waitstatus.h (target_waitstatus_to_string): Change
3616         return type to std::string.
3617         * target/waitstatus.c (target_waitstatus_to_string): Return
3618         std::string.
3619         * target.h (target_waitstatus_to_string): Remove declaration.
3620         * infrun.c (resume, clear_proceed_status_thread,
3621         print_target_wait_results, do_target_wait, save_waitstatus,
3622         stop_all_threads): Adjust.
3623         * record-btrace.c (record_btrace_wait): Adjust.
3624         * target-debug.h
3625         (target_debug_print_struct_target_waitstatus_p): Adjust.
3626
3627 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3628
3629         PR gdb/22046
3630         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3631         detection.
3632
3633 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3634
3635         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3636         for setting/unsetting environment variables on the remote target.
3637         (New remote packets): Add entries for QEnvironmentHexEncoded,
3638         QEnvironmentUnset and QEnvironmentReset.
3639         * common/environ.c (gdb_environ::operator=): Extend method to
3640         handle m_user_set_env_list and m_user_unset_env_list.
3641         (gdb_environ::clear): Likewise.
3642         (match_var_in_string): Change type of first parameter from 'char
3643         *' to 'const char *'.
3644         (gdb_environ::set): Extend method to handle
3645         m_user_set_env_list and m_user_unset_env_list.
3646         (gdb_environ::unset): Likewise.
3647         (gdb_environ::clear_user_set_env): New method.
3648         (gdb_environ::user_set_envp): Likewise.
3649         (gdb_environ::user_unset_envp): Likewise.
3650         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3651         m_user_unset_env_list on move constructor/assignment.
3652         (unset): Add new default parameter 'update_unset_list = true'.
3653         (clear_user_set_env): New method.
3654         (user_set_envp): Likewise.
3655         (user_unset_envp): Likewise.
3656         (m_user_set_env_list): New std::set.
3657         (m_user_unset_env_list): Likewise.
3658         * common/rsp-low.c (hex2str): New function.
3659         (bin2hex): New overload for bin2hex function.
3660         * common/rsp-low.c (hex2str): New prototype.
3661         (str2hex): New overload prototype.
3662         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3663         QEnvironmentUnset and QEnvironmentReset.
3664         (remote_protocol_features): Add QEnvironmentHexEncoded,
3665         QEnvironmentUnset and QEnvironmentReset packets.
3666         (send_environment_packet): New function.
3667         (extended_remote_environment_support): Likewise.
3668         (extended_remote_create_inferior): Call
3669         extended_remote_environment_support.
3670         (_initialize_remote): Add QEnvironmentHexEncoded,
3671         QEnvironmentUnset and QEnvironmentReset packet configs.
3672         * unittests/environ-selftests.c (gdb_selftest_env_var):
3673         New variable.
3674         (test_vector_initialization): New function.
3675         (test_init_from_host_environ): Likewise.
3676         (test_reinit_from_host_environ): Likewise.
3677         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3678         Likewise.
3679         (test_unset_set_empty_vector): Likewise.
3680         (test_vector_clear): Likewise.
3681         (test_std_move): Likewise.
3682         (test_move_constructor):
3683         (test_self_move): Likewise.
3684         (test_set_unset_reset): Likewise.
3685         (run_tests): Rewrite in terms of the functions above.
3686
3687 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
3688
3689         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3690         (adi_available): Use a temp variable of type CORE_ADDR as argument
3691         3 when calling target_auxv_search.
3692         (adi_normalize_address): Use masks and xor operators to calculate
3693         normalized address.
3694         (adi_read_versions, adi_write_versions, adi_print_versions)
3695         (do_examine, do_assign): Use paddress.
3696
3697 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
3698
3699         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3700         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3701         out of loop and add supply of FIR.
3702         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3703         add collect of FIR.
3704
3705 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3706
3707         PR gdb/21827
3708         * cli/cli-script.c (define_command): Don't convert command name
3709         to lower case.
3710
3711 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
3712
3713         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3714         Update all callers accordingly. Remove all code blocks handling
3715         the case where DISPP is not NULL.
3716
3717 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3718
3719         PR symtab/22003
3720         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3721         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3722         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3723
3724 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3725
3726         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3727         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3728         (read_comp_units_from_section): New parameter abbrev_section, use
3729         read_and_check_comp_unit_head, allocate signatured_type if needed.
3730         (create_all_comp_units): Update read_comp_units_from_section caller.
3731
3732 2017-08-23  Pedro Alves  <palves@redhat.com>
3733
3734         PR remote/21852
3735         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3736         to null_ptid and switch to thread without reading the registers
3737         after adding the inferior.
3738
3739 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3740
3741         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3742         compile-gcc.
3743         * compile/compile.c (compile_gcc, show_compile_gcc): New.
3744         (compile_to_object): Implement compile_gcc.
3745         (_initialize_compile): Install "set compile-gcc".  Initialize
3746         compile_gcc.
3747
3748 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3749
3750         * compile/compile.c (compile_to_object): Conditionally call
3751         set_verbose.  Conditionally call compile or compile_v0.
3752
3753 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
3754
3755         * sparc64-tdep.h: (adi_normalize_address): New export.
3756         * sparc-nat.h: (open_adi_tag_fd): New export.
3757         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3758         * sparc64-linux-tdep.c:
3759         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3760         (sparc64_linux_handle_segmentation_fault): New function.
3761         (sparc64_linux_init_abi): Register
3762         sparc64_linux_handle_segmentation_fault
3763         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3764         (sparc64_addr_bits_remove): New function.
3765         (sparc64_init_abi): Register sparc64_addr_bits_remove.
3766         (MAX_PROC_NAME_SIZE): New macro.
3767         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3768         (sparc64adilist): New variable.
3769         (adi_proc_list): New variable.
3770         (find_adi_info): New function.
3771         (add_adi_info): New function.
3772         (get_adi_info_proc): New function.
3773         (get_adi_info): New function.
3774         (info_adi_command): New function.
3775         (read_maps_entry): New function.
3776         (adi_available): New function.
3777         (adi_normalize_address): New function.
3778         (adi_align_address): New function.
3779         (adi_convert_byte_count): New function.
3780         (adi_tag_fd): New function.
3781         (adi_is_addr_mapped): New function.
3782         (adi_read_versions): New function.
3783         (adi_write_versions): New function.
3784         (adi_print_versions): New function.
3785         (do_examine): New function.
3786         (do_assign): New function.
3787         (adi_examine_command): New function.
3788         (adi_assign_command): New function.
3789         (_initialize_sparc64_adi_tdep): New function.
3790
3791 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
3792
3793         * breakpoint.c (breakpoints_info): Rename to ...
3794         (info_breakpoints_command): ... this.
3795         (watchpoints_info): Rename to ...
3796         (info_watchpoints_command): ... this.
3797         (tracepoints_info): Rename to ...
3798         (info_tracepoints_command): ... this.
3799         (_initialize_breakpoint): Adjust.
3800         * dcache.c (dcache_info): Rename to ...
3801         (info_display_command): ... this.
3802         (_initialize_dcache): Adjust.
3803         * frame.h (args_info): Rename to ...
3804         (info_args_command): ... this.
3805         (locals_info): Rename to ...
3806         (info_locals_command): ... this.
3807         * infcmd.c (nofp_registers_info): Rename to ...
3808         (info_registers_command): ... this.
3809         (float_info): Rename to ...
3810         (info_float_command): ... this.
3811         (program_info): Rename to ...
3812         (info_program_command): ... this.
3813         (all_registers_info): Rename to ...
3814         (info_all_registers_command): ... this.
3815         (vector_info): Rename to ...
3816         (info_vector_command): ... this.
3817         (float_info): Rename to ...
3818         (info_float_command): ... this.
3819         (_initialize_infcmd): Adjust.
3820         * inferior.h (term_info): Rename to ...
3821         (info_terminal_command): ... this.
3822         * inflow.c (term_info): Rename to ...
3823         (info_terminal_command): ... this.
3824         (_initialize_inflow): Adjust.
3825         * infrun.c (signals_info): Rename to ...
3826         (info_signals_command): ... this.
3827         (_initialize_infrun): Adjust.
3828         * objc-lang.c (classes_info): Rename to ...
3829         (info_classes_command): ... this.
3830         (selectors_info): Rename to ...
3831         (info_selectors_command): ... this.
3832         (_initialize_objc_language): Adjust.
3833         * printcmd.c (sym_info): Rename to ...
3834         (info_symbol_command): ... this.
3835         (address_info): Rename to ...
3836         (info_address_command): ... this.
3837         (display_info): Rename to ...
3838         (info_display_command): ... this.
3839         (_initialize_printcmd): Adjust.
3840         * reverse.c (bookmarks_info): Rename to ...
3841         (info_breakpoints_command): ... this.
3842         (_initialize_reverse): Adjust.
3843         * ser-go32.c (dos_info): Rename to ...
3844         (info_serial_command): ... this.
3845         (_initialize_ser_dos): Adjust.
3846         * skip.c (skip_info): Rename to ...
3847         (info_skip_command): ... this.
3848         (_initialize_step_skip): Adjust.
3849         * source.c (line_info): Rename to ...
3850         (info_line_command): ... this.
3851         (source_info): Rename to ...
3852         (info_source_command)
3853         * stack.c (frame_info): Rename to ...
3854         (info_frame_command): ... this.
3855         (locals_info): Rename to ...
3856         (info_locals_command): ... this.
3857         (args_info): Rename to ...
3858         (info_args_command): ... this.
3859         (_initialize_stack): Adjust.
3860         * symtab.c (sources_info): Rename to ...
3861         (info_sources_command): ... this.
3862         (variables_info): Rename to ...
3863         (info_variables_command): ... this.
3864         (functions_info): Rename to ...
3865         (info_functions_command): ... this.
3866         (types_info): Rename to ...
3867         (info_types_command): ... this.
3868         (_initialize_symtab): Adjust.
3869         * target.c (target_info): Rename to ...
3870         (info_target_command): ... this.
3871         (initialize_targets): Adjust.
3872         * tracepoint.c (tvariables_info): Rename to ...
3873         (info_tvariables_command): ... this.
3874         (scope_info): Rename to ...
3875         (info_scope_command): ... this.
3876         (trace_dump_actions): Adjust.
3877         (_initialize_tracepoint): Adjust.
3878
3879 2017-08-22  Tom Tromey  <tom@tromey.com>
3880
3881         * breakpoint.h (install_breakpoint): Update.
3882         * breakpoint.c (add_solib_catchpoint): Update.
3883         (install_breakpoint): Change argument to a std::unique_ptr.
3884         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3885         (create_breakpoint_sal, create_breakpoint): Update.
3886         (watch_command_1, catch_exec_command_1)
3887         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3888         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3889         Return the breakpoint.
3890         (set_raw_breakpoint_without_location, set_raw_breakpoint)
3891         (new_single_step_breakpoint): Update.
3892         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3893         std::unique_ptr.
3894         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3895         std::unique_ptr.
3896         * break-catch-sig.c (create_signal_catchpoint): Use
3897         std::unique_ptr.
3898         * ada-lang.c (create_ada_exception_catchpoint): Use
3899         std::unique_ptr.
3900
3901 2017-08-22  Tom Tromey  <tom@tromey.com>
3902
3903         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3904
3905 2017-08-22  Tom Tromey  <tom@tromey.com>
3906
3907         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3908         (lookup_partial_symbol): Update.
3909
3910 2017-08-22  Tom Tromey  <tom@tromey.com>
3911
3912         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3913         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3914         (find_and_open_source, symtab_to_fullname): Update.
3915         * psymtab.c (psymtab_to_fullname): Update.
3916
3917 2017-08-22  Tom Tromey  <tom@tromey.com>
3918
3919         * exec.c (exec_file_attach): Update.
3920         * linux-thread-db.c (try_thread_db_load): Update.
3921         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3922         * utils.c (gdb_realpath): Change return type.
3923         (gdb_realpath_keepfile): Update.
3924         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3925         (_initialize_utils): Register the new self test.
3926         * source.c (openp): Update.
3927         (find_and_open_source): Update.
3928         * nto-tdep.c (nto_find_and_open_solib): Update.
3929         * main.c (set_gdb_data_directory): Update.
3930         (captured_main_1): Update.
3931         * dwarf2read.c (dwarf2_get_dwz_file): Update
3932         (dw2_map_symbol_filenames): Update.
3933         * auto-load.c (auto_load_safe_path_vec_update): Update.
3934         (filename_is_in_auto_load_safe_path_vec): Change type of
3935         "filename_realp".
3936         (auto_load_objfile_script): Update.
3937         (file_is_auto_load_safe): Update.  Use std::string.
3938         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3939
3940 2017-08-22  Tom Tromey  <tom@tromey.com>
3941
3942         * utils.c (gdb_realpath_keepfile): Return a
3943         gdb::unique_xmalloc_ptr.
3944         * exec.c (exec_file_attach): Update.
3945         * utils.h (gdb_realpath_keepfile): Return a
3946         gdb::unique_xmalloc_ptr.
3947
3948 2017-08-22  Tom Tromey  <tom@tromey.com>
3949
3950         * compile/compile.c (compile_file_command): Use
3951         gdb::unique_xmalloc_ptr, std::string.
3952         * utils.c (gdb_abspath): Change return type.
3953         * source.c (openp): Update.
3954         * objfiles.c (allocate_objfile): Update.
3955         * main.c (set_gdb_data_directory): Update.
3956         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3957
3958 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
3959
3960         * cli-cmds.c (list_commands): List actual code around more than
3961         one location.
3962
3963 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
3964
3965         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3966
3967 2017-08-21  Pedro Alves  <palves@redhat.com>
3968
3969         PR gdb/19487
3970         * c-exp.y (variable production): Handle function aliases.
3971         * minsyms.c (msymbol_is_text): New function.
3972         * minsyms.h (msymbol_is_text): Declare.
3973         * symtab.c (find_function_alias_target): New function.
3974         * symtab.h (find_function_alias_target): Declare.
3975
3976 2017-08-21  Pedro Alves  <palves@redhat.com>
3977
3978         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3979         typedefs.
3980         * typeprint.c (whatis_exp): If handling "whatis", and expression
3981         is OP_TYPE, strip one typedef level.  Otherwise don't strip
3982         typedefs here.
3983         * valops.c (value_cast): Save "to" type before resolving
3984         stubs/typedefs.  Use that type as resulting value's type.
3985
3986 2017-08-18  Tom Tromey  <tom@tromey.com>
3987             Pedro Alves  <palves@redhat.com>
3988
3989         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3990         * sol-thread.c (sol_thread_resume, sol_thread_wait)
3991         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3992         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3993         * proc-service.c (ps_xfer_memory): Use scoped_restore.
3994         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3995         (linux_get_siginfo_data): Add "thread" argument.  Use
3996         scoped_restore.
3997         * linux-nat.c (linux_child_follow_fork)
3998         (check_stopped_by_watchpoint): Use scoped_restore.
3999         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4000         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4001         (restore_inferior_ptid, save_inferior_ptid): Remove.
4002         * btrace.c (btrace_fetch): Use scoped_restore.
4003         * bsd-uthread.c (bsd_uthread_fetch_registers)
4004         (bsd_uthread_store_registers): Use scoped_restore.
4005         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4006         scoped_restore.
4007         * aix-thread.c (aix_thread_resume, aix_thread_wait)
4008         (aix_thread_xfer_partial): Use scoped_restore.
4009         * inferior.h (save_inferior_ptid): Remove.
4010
4011 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4012
4013         PR tdep/21818
4014         * arm-tdep.c (gdb_print_insn_arm): Mark
4015         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4016
4017 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4018
4019         * NEWS: Mention GDBserver's new option "--selftest".
4020         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4021         * selftest.c: Move it to common/selftest.c.
4022         * selftest.h: Move it to common/selftest.h.
4023         * selftest-arch.c (reset): New function.
4024         (tests_with_arch): Call reset.
4025
4026 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4027
4028         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
4029         instead of exception_fprintf and printf_filtered.
4030
4031 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4032
4033         * selftest.c (register_self_test): Rename it to
4034         selftests::register_test.
4035         (run_self_tests): selftest::run_tests.
4036         * selftest.h: Update declarations.
4037         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4038         selftests::register_test_foreach_arch.
4039         * selftest-arch.h: Update declaration.
4040         * aarch64-tdep.c: Update.
4041         * arm-tdep.c: Likewise.
4042         * disasm-selftests.c: Likewise.
4043         * dwarf2loc.c: Likewise.
4044         * dwarf2-frame.c: Likewise.
4045         * findvar.c: Likewise.
4046         * gdbarch-selftests.c: Likewise.
4047         * maint.c (maintenance_selftest): Likewise.
4048         * regcache.c: Likewise.
4049         * rust-exp.y: Likewise.
4050         * selftest-arch.c: Likewise.
4051         * unittests/environ-selftests.c: Likewise.
4052         * unittests/function-view-selftests.c: Likewise.
4053         * unittests/offset-type-selftests.c: Likewise.
4054         * unittests/optional-selftests.c: Likewise.
4055         * unittests/scoped_restore-selftests.c: Likewise.
4056         * utils-selftests.c: Likewise.
4057
4058 2017-08-17  Pedro Alves  <palves@redhat.com>
4059
4060         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4061         local.
4062
4063 2017-08-17  Pedro Alves  <palves@redhat.com>
4064
4065         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4066         field.
4067         (reset_die_in_process): Delete, replaced by ...
4068         (process_die_scope): ... this new class.  Make it responsible for
4069         freeing cu->line_header too.
4070         (process_die): Use process_die_scope.
4071         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4072         cu->line_header_die_owner.  Don't release the line header if it's
4073         owned by the CU.
4074         (setup_type_unit_groups): Make the CU/DIE own the line header.
4075         Don't release the line header here.
4076
4077 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
4078
4079         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4080
4081 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4082
4083         * NEWS: Mention new shortcuts for nexti and stepi in TUI
4084         Single-Key mode
4085
4086 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4087
4088         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4089         mode command list.
4090
4091 2017-08-15  Stafford Horne  <shorne@gmail.com>
4092
4093         * MAINTAINERS (Write After Approval): Add Stafford Horne.
4094
4095 2017-08-15  Stafford Horne  <shorne@gmail.com>
4096
4097         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4098
4099 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4100
4101         PR gdb/21954
4102         * infcmd.c (unset_environment_command): Use the 'clear' method on
4103         the environment instead of resetting it.
4104
4105 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
4106
4107         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4108         platforms.
4109
4110 2017-08-14  Tom Tromey  <tom@tromey.com>
4111
4112         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4113         (print_binary_chars): Likewise.
4114         (BITS_IN_BYTES): Remove.
4115
4116 2017-08-14  Tom Tromey  <tom@tromey.com>
4117
4118         PR gdb/21675
4119         * valprint.c (LOW_ZERO): Change value to 034.
4120         (print_octal_chars): Add static_asserts for octal constants.
4121         * printcmd.c (print_scalar_formatted): Add 'd' case.
4122
4123 2017-08-11  Tom Tromey  <tom@tromey.com>
4124
4125         * symfile.c (add_symbol_file_command): Use std::vector.
4126
4127 2017-08-14  Tom Tromey  <tom@tromey.com>
4128
4129         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4130         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4131         std::move.
4132         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4133
4134 2017-08-11  Pedro Alves  <palves@redhat.com>
4135
4136         * infrun.c (process_event_stop_test): Adjust
4137         function_name_is_marked_for_skip call.
4138         * skip.c: Include <list>.
4139         (skiplist_entry): Make it a class with private fields, and
4140         getters/setters.
4141         (skiplist_entry_chain): Delete.
4142         (skiplist_entries): New.
4143         (skiplist_entry_count): Delete.
4144         (highest_skiplist_entry_num): New.
4145         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4146         (add_skiplist_entry): Delete.
4147         (skiplist_entry::skiplist_entry): New.
4148         (skiplist_entry::add_entry): New.
4149         (skip_file_command, skip_function): Adjust.
4150         (compile_skip_regexp): Delete.
4151         (skip_command): Don't compile regexp here.  Adjust to use
4152         skiplist_entry::add_entry.
4153         (skip_info): Adjust to use range-for and getters.
4154         (skip_enable_command, skip_disable_command): Adjust to use
4155         range-for and setters.
4156         (skip_delete_command): Adjust to use std::list.
4157         (add_skiplist_entry): Delete.
4158         (skip_file_p): Delete, refactored as ...
4159         (skiplist_entry::do_skip_file_p): ... this new method.
4160         (skip_gfile_p): Delete, refactored as ...
4161         (skiplist_entry::do_gskip_file_p): ... this new method.
4162         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4163         (skiplist_entry::skip_function_p): ... this new method.
4164         (function_name_is_marked_for_skip): Now returns bool, and takes
4165         the function sal by const reference.  Adjust to use range-for and
4166         skiplist_entry methods.
4167         (_initialize_step_skip): Remove references to
4168         skiplist_entry_chain, skiplist_entry_count.
4169         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4170         takes the function sal by const reference.
4171
4172 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4173
4174         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4175         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4176         (dwarf2_frame_cache):
4177         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4178         RETURN_MASK_ALL and set *this_case to NULL.
4179         * frame-unwind.h: Update comments.
4180
4181 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4182
4183         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4184         (dwarf2_frame_state_copy_regs): Remove.
4185         (dwarf2_frame_state_free_regs): Remove.
4186         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4187         (dwarf2_restore_rule): Call method .alloc_regs instead of
4188         dwarf2_frame_state_alloc_regs.
4189         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4190         constructor.  Call std::move.
4191         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4192         (dwarf2_frame_cache): Likewise.
4193
4194         [GDB_SELF_TEST]: Include selftest.h and
4195         selftest-arch.h.
4196         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4197         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4198         execute_cfa_program_test.
4199
4200         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4201         copy ctor, assignment operator, move assignment.
4202         <alloc_regs>: New method.
4203         <swap>: New method.
4204         (struct dwarf2_frame_state): Delete dtor.
4205         (dwarf2_frame_state_alloc_regs): Remove declaration.
4206         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4207         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4208
4209 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4210
4211         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4212         (dwarf2_frame_state::dwarf2_frame_state): New.
4213         (dwarf2_frame_state::~dwarf2_frame_state): New.
4214         (dwarf2_fetch_cfa_info): Update.
4215         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4216         rather than a pointer.  Update code.
4217         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4218         dtor.
4219         <data_align, code_align, retaddr_column>: Change them to const.
4220         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4221         to bool.
4222
4223 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4224
4225         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4226         <loc.exp>: New field.
4227         * dwarf2-frame.c (execute_cfa_program): Update.
4228         (dwarf2_frame_prev_register): Update.
4229
4230 2017-08-10  Pedro Alves  <palves@redhat.com>
4231
4232         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4233
4234 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4235
4236         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4237         (fbsd_pending_children): Use std::list.
4238         (fbsd_remember_child): Likewise.
4239         (fbsd_is_child_pending): Likewise.
4240         (fbsd_pending_vfork_done): Use std::forward_list.
4241         (fbsd_add_vfork_done): Likewise.
4242         (fbsd_is_vfork_done_pending): Likewise.
4243         (fbsd_next_vfork_done): Likewise.
4244
4245 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4246
4247         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4248         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4249         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4250         for `mapfilename'.
4251         (fbsd_xfer_partial): Use gdb::byte_vector.
4252         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4253
4254 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4255
4256         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4257         "filestuff.h".
4258         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4259
4260 2017-08-09  Tom Tromey  <tom@tromey.com>
4261
4262         * skip.c (skiplist_entry): New constructor.
4263         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4264         (skiplist_entry::file_is_glob): Now bool.
4265         (skiplist_entry::file, skiplist_entry::function): Now
4266         std::string.
4267         (make_skip_entry): Return a unique_ptr.  Use new.
4268         (free_skiplist_entry, free_skiplist_entry_cleanup)
4269         (make_free_skiplist_entry_cleanup): Remove.
4270         (skip_command, skip_disable_command, add_skiplist_entry)
4271         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4272         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4273         (function_name_is_marked_for_skip): Update.
4274         (skip_delete_command): Update.  Use delete.
4275
4276 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4277
4278         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4279         (aarch64_linux_core_read_description): New function.
4280         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4281
4282 2017-08-09  Pedro Alves  <palves@redhat.com>
4283
4284         * cp-name-parser.y (cp_comp_to_string): Return a
4285         gdb::unique_xmalloc_ptr<char>.
4286         * cp-support.c (replace_typedefs_qualified_name)
4287         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4288         (cp_canonicalize_string_full): Use op= instead of explicit
4289         convertion.
4290         (cp_class_name_from_physname, method_name_from_physname)
4291         (cp_func_name, cp_remove_params): Adjust to use
4292         gdb::unique_xmalloc_ptr<char>.
4293         * cp-support.h (cp_comp_to_string): Return a
4294         gdb::unique_xmalloc_ptr<char>.
4295         * python/py-type.c (typy_lookup_type): Adjust to use
4296         gdb::unique_xmalloc_ptr<char>.
4297
4298 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4299
4300         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4301
4302 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4303             Yao Qi  <yao.qi@linaro.org>
4304
4305         * cp-support.c (cp_canonicalize_string_full): Use
4306         gdb::unique_xmalloc_ptr<char>.
4307         (cp_canonicalize_string): Likewise.
4308
4309 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4310
4311         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4312         * regformats/i386/amd64-avx-avx512.dat: Remove.
4313         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4314         * regformats/i386/amd64-avx-mpx.dat:Remove.
4315         * regformats/i386/amd64-avx.dat: Remove.
4316         * regformats/i386/amd64-mpx.dat: Remove.
4317         * regformats/i386/i386-avx-avx512.dat: Remove.
4318         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4319         * regformats/i386/i386-avx-mpx.dat: Remove.
4320         * regformats/i386/i386-mmx.dat: Remove.
4321         * regformats/i386/i386-mpx.dat: Remove.
4322
4323 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4324
4325         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4326         * amd64-tdep.c: Don't include features/i386/x32*.c.
4327         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4328         functions.
4329         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4330         and i386/x32-avx-avx512.
4331         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4332         and i386/x32.xml.
4333         * features/i386/x32-avx-avx512.c: Removed.
4334         * features/i386/x32-avx-avx512.xml: Removed.
4335         * features/i386/x32-avx.c: Removed.
4336         * features/i386/x32-avx.xml: Removed.
4337         * features/i386/x32.c: Removed.
4338         * features/i386/x32.xml: Removed.
4339         * regformats/i386/x32-avx-avx512.dat: Removed.
4340         * regformats/i386/x32-avx.dat: Removed.
4341         * regformats/i386/x32.dat: Removed.
4342
4343 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4344
4345         PR breakpoints/21886
4346         * mem-break.c (default_memory_insert_breakpoint): Use
4347         `->placed_address' rather than `->reqstd_address' for the
4348         breakpoint location.
4349
4350 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4351
4352         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4353         assertions.
4354
4355 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4356
4357         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4358         a union of `tdep_info', `tdesc_data' and `id'.
4359         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4360         rather than `info.tdep_info'.
4361         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4362         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4363         * i386-tdep.c (i386_gdbarch_init): Likewise.
4364         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4365         * mips-tdep.c (mips_gdbarch_init): Likewise.
4366         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4367         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4368         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4369         `info.tdep_info'.
4370         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4371         `info.tdep_info'.
4372         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4373         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4374         `info.tdep_info'.
4375         * spu-tdep.c (spu_gdbarch_init): Likewise.
4376         * gdbarch.h: Regenerate.
4377
4378 2017-08-07  Leszek Swirski  <leszeks@google.com>
4379
4380         PR symtab/20899
4381         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4382
4383 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4384
4385         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4386         (gdbsim_open): Rename gdb_argv args object to argv.
4387
4388 2017-08-05  Tom Tromey  <tom@tromey.com>
4389
4390         * compile/compile-object-load.c (compile_object_load): Use
4391         gdb::unique_xmalloc_ptr.
4392         * cli/cli-dump.c (scan_filename): Rename from
4393         scan_filename_with_cleanup.  Change return type.
4394         (scan_expression): Rename from scan_expression_with_cleanup.
4395         Change return type.
4396         (dump_memory_to_file, dump_value_to_file, restore_command):
4397         Use gdb::unique_xmalloc_ptr.  Update.
4398         * cli/cli-cmds.c (find_and_open_script): Use
4399         gdb::unique_xmalloc_ptr.
4400         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4401         * symmisc.c (maintenance_print_symbols)
4402         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4403         * symfile.c (symfile_bfd_open, generic_load)
4404         (add_symbol_file_command, remove_symbol_file_command): Use
4405         gdb::unique_xmalloc_ptr.
4406         * source.c (openp): Use gdb::unique_xmalloc_ptr.
4407         * psymtab.c (maintenance_print_psymbols): Use
4408         gdb::unique_xmalloc_ptr.
4409         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4410         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4411         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4412         (reload_shared_libraries_1): Likewise.
4413
4414 2017-08-05  Tom Tromey  <tom@tromey.com>
4415
4416         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4417         (rust_op_vector, rust_set_vector): New typedefs.
4418         (current_parser): New global.
4419         (work_obstack): Change to pointer type.  Update all users.
4420         (rust_ast, pstate): Remove globals.
4421         (struct rust_parser): New.
4422         (%union) <params, field_inits>: Change type.
4423         (start, tuple_expr, unit_expr, struct_expr_list, literal)
4424         (field_expr, expr_list, maybe_expr_list, type_list): Update.
4425         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4426         (convert_params_to_types, convert_params_to_expression): Change
4427         type of "params".
4428         (ast_string): Change type of "fields".
4429         (rust_parse): Make a rust_parser.  Remove cleanups.
4430         (rust_lex_tests): Make and install an auto_obstack.
4431
4432 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4433
4434         * configure.srv (ipa_x32_linux_regobj): New.
4435         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4436         instead of X86_TDESC_AVX512.
4437         (initialize_low_tracepoint): Call
4438         init_registers_x32_avx_avx512_linux.
4439
4440 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4441
4442         * utils.h (gdb_argv): Add namespace std for nullptr_t.
4443
4444 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4445
4446         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4447
4448 2017-08-03  Tom Tromey  <tom@tromey.com>
4449
4450         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4451         Remove.
4452         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4453
4454 2017-08-03  Tom Tromey  <tom@tromey.com>
4455
4456         * python/py-param.c (compute_enum_values): Use gdb_argv.
4457
4458 2017-08-03  Tom Tromey  <tom@tromey.com>
4459
4460         * utils.h (struct gdb_argv_deleter): New.
4461         (gdb_argv): New class.
4462         * utils.c (gdb_argv::reset): New method.
4463         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4464         * tracefile.c (tsave_command): Use gdb_argv.
4465         * top.c (new_ui_command): Use gdb_argv.
4466         * symmisc.c (maintenance_print_symbols)
4467         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4468         * symfile.c (symbol_file_command, generic_load)
4469         (remove_symbol_file_command): Use gdb_argv.
4470         * stack.c (backtrace_command): Use gdb_argv.
4471         * source.c (add_path, show_substitute_path_command)
4472         (unset_substitute_path_command, set_substitute_path_command):
4473         Use gdb_argv.
4474         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
4475         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4476         * remote.c (extended_remote_run, remote_put_command)
4477         (remote_get_command, remote_delete_command): Use gdb_argv.
4478         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4479         (gdbsim_open): Use gdb_argv.
4480         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4481         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4482         * procfs.c (procfs_info_proc): Use gdb_argv.
4483         * interps.c (interpreter_exec_cmd): Use gdb_argv.
4484         * infrun.c (handle_command): Use gdb_argv.
4485         * inferior.c (add_inferior_command, clone_inferior_command):
4486         Use gdb_argv.
4487         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4488         * exec.c (exec_file_command): Use gdb_argv.
4489         * cli/cli-cmds.c (alias_command): Use gdb_argv.
4490         * compile/compile.c (build_argc_argv): Use gdb_argv.
4491
4492 2017-08-03  Tom Tromey  <tom@tromey.com>
4493
4494         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4495
4496 2017-08-03  Tom Tromey  <tom@tromey.com>
4497
4498         * python/python.c (compute_python_string): Return std::string.
4499         (gdbpy_eval_from_control_command): Update.
4500         (do_start_initialization): Use std::string.
4501         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4502         xstrprintf.
4503         * python/py-breakpoint.c (local_setattro): Use string_printf, not
4504         xstrprintf.
4505
4506 2017-08-03  Tom Tromey  <tom@tromey.com>
4507
4508         * top.h (do_restore_instream_cleanup): Remove.
4509         * top.c (do_restore_instream_cleanup): Remove.
4510         (read_command_file): Use scoped_restore.
4511         * cli/cli-script.c (execute_user_command): Use scoped_restore.
4512
4513 2017-08-03  Tom Tromey  <tom@tromey.com>
4514
4515         * cli/cli-script.c (execute_user_command)
4516         (execute_control_command): Use scoped_restore.
4517
4518 2017-08-03  Tom Tromey  <tom@tromey.com>
4519
4520         * cli/cli-script.c (do_restore_user_call_depth): Remove.
4521         (execute_user_command): Remove user_call_depth; use
4522         user_args_stack's size instead.
4523
4524 2017-08-03  Tom Tromey  <tom@tromey.com>
4525
4526         * top.h (in_user_command): Remove.
4527         * top.c (in_user_command): Remove.
4528         * cli/cli-script.c (do_restore_user_call_depth)
4529         (execute_user_command): Update.
4530
4531 2017-08-03  Tom Tromey  <tom@tromey.com>
4532
4533         * valops.c (search_struct_method): Use gdb::byte_vector.
4534         * valarith.c (value_concat): Use std::vector.
4535         * target.c (memory_xfer_partial): Use gdb::byte_vector.
4536         (simple_search_memory): Likewise.
4537         * printcmd.c (find_string_backward): Use gdb::byte_vector.
4538         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4539         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4540         * elfread.c (elf_rel_plt_read): Use std::string.
4541         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4542         * cli/cli-dump.c (restore_section_callback): Use
4543         gdb::byte_vector.
4544
4545 2017-08-03  Tom Tromey  <tom@tromey.com>
4546
4547         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4548
4549 2017-08-03  Tom Tromey  <tom@tromey.com>
4550
4551         * tui/tui-regs.c (tui_restore_gdbout): Remove.
4552         (tui_register_format): Use scoped_restore.
4553
4554 2017-08-03  Tom Tromey  <tom@tromey.com>
4555
4556         * reverse.c (exec_direction_default): Remove.
4557         (exec_reverse_once): Use scoped_restore.
4558         * remote.c (restore_remote_timeout): Remove.
4559         (remote_flash_erase, remote_flash_write, remote_flash_done)
4560         (readchar, remote_serial_write): Use scoped_restore.
4561         * cli/cli-script.c (struct source_cleanup_lines_args)
4562         (source_cleanup_lines): Remove.
4563         (script_from_file): Use scoped_restore.
4564         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4565         (source_command): Use scoped_restore.
4566
4567 2017-08-03  Tom Tromey  <tom@tromey.com>
4568
4569         * utils.h (make_cleanup_free_so): Remove.
4570         * utils.c (do_free_so, make_cleanup_free_so): Remove.
4571         * solist.h (struct so_deleter): New.
4572         (so_list_up): New typedef.
4573         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4574
4575 2017-08-03  Tom Tromey  <tom@tromey.com>
4576
4577         * utils.h (make_cleanup_restore_current_language): Remove.
4578         * utils.c (do_restore_current_language)
4579         (make_cleanup_restore_current_language): Remove.
4580         * parse.c (parse_exp_in_context_1)
4581         (parse_expression_with_language): Use
4582         scoped_restore_current_language.
4583         * mi/mi-main.c (mi_cmd_execute): Use
4584         scoped_restore_current_language.
4585         * language.h (scoped_restore_current_language): New class.
4586
4587 2017-08-03  Tom Tromey  <tom@tromey.com>
4588
4589         * compile/compile.c (cleanup_unlink_file): Remove.
4590         (compile_to_object): Use gdb::unlinker.
4591         (eval_compile_command): Likewise.
4592
4593 2017-08-03  Tom Tromey  <tom@tromey.com>
4594
4595         * utils.h (make_cleanup_fclose): Remove.
4596         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4597
4598 2017-08-03  Tom Tromey  <tom@tromey.com>
4599
4600         * top.c (open_terminal_stream): Return gdb_file_up.
4601         (new_ui_command): Update.
4602
4603 2017-08-03  Tom Tromey  <tom@tromey.com>
4604
4605         * source.c (print_source_lines_base, forward_search_command)
4606         (reverse_search_command): Use gdb_file_up.
4607
4608 2017-08-03  Tom Tromey  <tom@tromey.com>
4609
4610         * fbsd-nat.c (fbsd_find_memory_regions): Update.
4611
4612 2017-08-03  Tom Tromey  <tom@tromey.com>
4613
4614         * cli/cli-cmds.c (find_and_open_script): Change return type.
4615         Remove "streamp" and "full_path" parameters.
4616         (source_script_with_search): Update.
4617         * auto-load.c (source_script_file): Update.
4618         * cli/cli-cmds.h (find_and_open_script): Change type.
4619         (open_script): New struct.
4620
4621 2017-08-03  Tom Tromey  <tom@tromey.com>
4622
4623         * xml-support.c (xml_fetch_content_from_file): Update.
4624         * ui-file.c (stdio_file::open): Update.
4625         * tracefile-tfile.c (tfile_start): Update.
4626         * remote.c (remote_file_put, remote_file_get): Update.
4627         * nat/linux-procfs.c (linux_proc_get_int)
4628         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4629         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4630         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4631         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4632         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4633         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4634         * linux-nat.c (linux_proc_pending_signals): Update.
4635         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4636         (file_closer): Remove.
4637         * compile/compile.c (compile_to_object): Update.
4638         * common/filestuff.h (struct gdb_file_deleter): New.
4639         (gdb_file_up): New typedef.
4640         (gdb_fopen_cloexec): Change return type.
4641         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4642         * cli/cli-dump.c (fopen_with_cleanup): Remove.
4643         (dump_binary_file, restore_binary_file): Update.
4644         * auto-load.c (auto_load_objfile_script_1): Update.
4645
4646 2017-08-03  Tom Tromey  <tom@tromey.com>
4647
4648         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4649         (info_static_tracepoint_markers_command): Likewise.
4650         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4651         * skip.c (skip_info): Use ui_out_emit_table.
4652         * progspace.c (print_program_space): Use ui_out_emit_table.
4653         * osdata.c (info_osdata): Use ui_out_emit_table.
4654         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4655         ui_out_emit_table.
4656         * linux-thread-db.c (info_auto_load_libthread_db): Use
4657         ui_out_emit_table.
4658         * inferior.c (print_inferior): Use ui_out_emit_table.
4659         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4660         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4661         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4662         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4663         * ui-out.h (class ui_out_emit_table): New.
4664
4665 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
4666
4667         * mips-tdep.c (mips_fpu_type_str): New function.
4668         (mips_dump_tdep): Call it.
4669
4670 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
4671
4672         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4673         `->mips_fpu_type'.
4674
4675 2017-07-31  Xavier Roirand  <roirand@adacore.com>
4676
4677         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4678
4679 2017-07-27  Xavier Roirand  <roirand@adacore.com>
4680
4681         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4682
4683 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4684
4685         * cli/cli-cmds.c (maintenancechecklist): New variable.
4686         * gdbcmd.h (maintenancechecklist): Declare it.
4687         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4688         Call i386_linux_read_description with different masks.
4689         * maint.c (maintenance_check_command): New function.
4690         (_initialize_maint_cmds): Call add_prefix_cmd.
4691         * target-descriptions.c (tdesc_reg): override operator != and ==.
4692         (tdesc_type): Likewise.
4693         (tdesc_feature): Likewise.
4694         (target_desc): Likewise.
4695         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4696         (maintenance_check_xml_descriptions): New function.
4697         (_initialize_target_descriptions) Add command "xml-descriptions".
4698         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4699
4700 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4701
4702         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4703         Include features/i386/32bit-*.c.
4704         (i386_linux_read_description): Generate target description if it
4705         doesn't exist.
4706         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4707         functions.
4708         * features/i386/32bit-linux.c: Re-generated.
4709         * features/i386/32bit-sse.c: Likewise.
4710         * target-descriptions.c (print_c_feature::visit): Print code to
4711         set register number if needed.
4712         (print_c_feature) <m_next_regnum>: New field.
4713
4714 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4715
4716         * features/Makefile (CFILES): Rename with TDESC_CFILES.
4717         (FEATURE_XMLFILES): New.
4718         (FEATURE_CFILES): New.
4719         New rules.
4720         (clean-cfiles): Remove generated c files.
4721         * features/i386/32bit-avx.c: Generated.
4722         * features/i386/32bit-avx512.c: Generated.
4723         * features/i386/32bit-core.c: Generated.
4724         * features/i386/32bit-linux.c: Generated.
4725         * features/i386/32bit-mpx.c: Generated.
4726         * features/i386/32bit-pkeys.c: Generated.
4727         * features/i386/32bit-sse.c: Generated.
4728         * target-descriptions.c: Include algorithm.
4729         (tdesc_element_visitor): Add method visit_end.
4730         (print_c_tdesc): Implement visit_end.
4731         (print_c_tdesc:: m_filename_after_features): Move it to
4732         protected.
4733         (print_c_feature): New class.
4734         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4735         name starts with "i386/32bit-".
4736
4737 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4738
4739         * target-descriptions.c (tdesc_element_visitor): New class.
4740         (tdesc_element): New class.
4741         (tdesc_reg): Inherit from tdesc_element.
4742         (tdesc_reg::accept): New function.
4743         (tdesc_type): Inherit from tdesc_element.
4744         (tdesc_type::accept): New function.
4745         (tdesc_feature): Inherit from tdesc_element.
4746         (tdesc_feature::accept): New function.
4747         (target_desc): Inherit from tdesc_element.
4748         (target_desc::target_desc): New.
4749         (target_desc::~target_desc): New.
4750         (target_desc::accept): New.
4751         (allocate_target_description): Use new.
4752         (free_target_description): Use delete.
4753         (print_c_tdesc): New class.
4754         (maint_print_c_tdesc_cmd): Adjust.
4755
4756         * features/aarch64.c: Re-generated.
4757         * features/arc-arcompact.c: Re-generated.
4758         * features/arc-v2.c: Re-generated.
4759         * features/arm/arm-with-iwmmxt.c: Re-generated.
4760         * features/arm/arm-with-m.c: Re-generated.
4761         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4762         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4763         * features/arm/arm-with-neon.c: Re-generated.
4764         * features/arm/arm-with-vfpv2.c: Re-generated.
4765         * features/arm/arm-with-vfpv3.c: Re-generated.
4766         * features/i386/amd64-avx-avx512.c: Re-generated.
4767         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4768         * features/i386/amd64-avx.c: Re-generated.
4769         * features/i386/amd64-avx-linux.c: Re-generated.
4770         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4771         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4772         * features/i386/amd64-avx-mpx.c: Re-generated.
4773         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4774         * features/i386/amd64.c: Re-generated.
4775         * features/i386/amd64-linux.c: Re-generated.
4776         * features/i386/amd64-mpx.c: Re-generated.
4777         * features/i386/amd64-mpx-linux.c: Re-generated.
4778         * features/i386/i386-avx-avx512.c: Re-generated.
4779         * features/i386/i386-avx-avx512-linux.c: Re-generated.
4780         * features/i386/i386-avx.c: Re-generated.
4781         * features/i386/i386-avx-linux.c: Re-generated.
4782         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4783         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4784         * features/i386/i386-avx-mpx.c: Re-generated.
4785         * features/i386/i386-avx-mpx-linux.c: Re-generated.
4786         * features/i386/i386.c: Re-generated.
4787         * features/i386/i386-linux.c: Re-generated.
4788         * features/i386/i386-mmx.c: Re-generated.
4789         * features/i386/i386-mmx-linux.c: Re-generated.
4790         * features/i386/i386-mpx.c: Re-generated.
4791         * features/i386/i386-mpx-linux.c: Re-generated.
4792         * features/i386/x32-avx-avx512.c: Re-generated.
4793         * features/i386/x32-avx-avx512-linux.c: Re-generated.
4794         * features/i386/x32-avx.c: Re-generated.
4795         * features/i386/x32-avx-linux.c: Re-generated.
4796         * features/i386/x32.c: Re-generated.
4797         * features/i386/x32-linux.c: Re-generated.
4798         * features/microblaze.c: Re-generated.
4799         * features/microblaze-with-stack-protect.c: Re-generated.
4800         * features/mips64-dsp-linux.c: Re-generated.
4801         * features/mips64-linux.c: Re-generated.
4802         * features/mips-dsp-linux.c: Re-generated.
4803         * features/mips-linux.c: Re-generated.
4804         * features/nds32.c: Re-generated.
4805         * features/nios2.c: Re-generated.
4806         * features/nios2-linux.c: Re-generated.
4807         * features/rs6000/powerpc-32.c: Re-generated.
4808         * features/rs6000/powerpc-32l.c: Re-generated.
4809         * features/rs6000/powerpc-403.c: Re-generated.
4810         * features/rs6000/powerpc-403gc.c : Re-generated.
4811         * features/rs6000/powerpc-405.c: Re-generated.
4812         * features/rs6000/powerpc-505.c: Re-generated.
4813         * features/rs6000/powerpc-601.c: Re-generated.
4814         * features/rs6000/powerpc-602.c: Re-generated.
4815         * features/rs6000/powerpc-603.c: Re-generated.
4816         * features/rs6000/powerpc-604.c: Re-generated.
4817         * features/rs6000/powerpc-64.c: Re-generated.
4818         * features/rs6000/powerpc-64l.c: Re-generated.
4819         * features/rs6000/powerpc-7400.c: Re-generated.
4820         * features/rs6000/powerpc-750.c: Re-generated.
4821         * features/rs6000/powerpc-860.c: Re-generated.
4822         * features/rs6000/powerpc-altivec32.c: Re-generated.
4823         * features/rs6000/powerpc-altivec32l.c: Re-generated.
4824         * features/rs6000/powerpc-altivec64.c: Re-generated.
4825         * features/rs6000/powerpc-altivec64l.c: Re-generated.
4826         * features/rs6000/powerpc-cell32l.c: Re-generated.
4827         * features/rs6000/powerpc-cell64l.c: Re-generated.
4828         * features/rs6000/powerpc-e500.c: Re-generated.
4829         * features/rs6000/powerpc-e500l.c: Re-generated.
4830         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4831         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4832         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4833         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4834         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4835         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4836         * features/rs6000/powerpc-vsx32.c: Re-generated.
4837         * features/rs6000/powerpc-vsx32l.c: Re-generated.
4838         * features/rs6000/powerpc-vsx64.c: Re-generated.
4839         * features/rs6000/powerpc-vsx64l.c: Re-generated.
4840         * features/rs6000/rs6000.c: Re-generated.
4841         * features/s390-linux32.c: Re-generated.
4842         * features/s390-linux32v1.c: Re-generated.
4843         * features/s390-linux32v2.c: Re-generated.
4844         * features/s390-linux64.c: Re-generated.
4845         * features/s390-linux64v1.c: Re-generated.
4846         * features/s390-linux64v2.c: Re-generated.
4847         * features/s390-te-linux64.c: Re-generated.
4848         * features/s390-tevx-linux64.c: Re-generated.
4849         * features/s390-vx-linux64.c: Re-generated.
4850         * features/s390x-linux64.c: Re-generated.
4851         * features/s390x-linux64v1.c: Re-generated.
4852         * features/s390x-linux64v2.c: Re-generated.
4853         * features/s390x-te-linux64.c: Re-generated.
4854         * features/s390x-tevx-linux64.c: Re-generated.
4855         * features/s390x-vx-linux64.c: Re-generated.
4856         * features/sparc/sparc32-solaris.c: Re-generated.
4857         * features/sparc/sparc64-solaris.c: Re-generated.
4858         * features/tic6x-c62x.c: Re-generated.
4859         * features/tic6x-c62x-linux.c: Re-generated.
4860         * features/tic6x-c64x.c: Re-generated.
4861         * features/tic6x-c64x-linux.c: Re-generated.
4862         * features/tic6x-c64xp.c: Re-generated.
4863         * features/tic6x-c64xp-linux.c: Re-generated.
4864
4865 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4866
4867         * i386-linux-tdep.c (i386_linux_read_description): New function.
4868         (i386_linux_core_read_description): Call
4869         i386_linux_read_description.
4870         * i386-linux-tdep.h (i386_linux_read_description): Declare.
4871         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4872         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4873         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4874         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4875         * x86-linux-nat.c (x86_linux_read_description): Call
4876         i386_linux_read_description.
4877
4878 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4879
4880         * NEWS: Mention it.
4881         * features/Makefile (%.c: %.xml): Pass the xml file name to
4882         command "maint print c-tdesc".
4883         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4884         name from 'arg'.
4885
4886 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4887
4888         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
4889         in-class initialization.
4890         (tdesc_create_feature): Call new instead of XCNEW.
4891         (free_target_description): Ue delete.
4892
4893 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
4894
4895         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4896
4897 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4898
4899         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4900         constant.
4901         (amd64_x32_init_abi): Likewise.
4902         * amd64-tdep.h (amd64_init_abi): Update declaration.
4903         (amd64_x32_init_abi): Likewise.
4904
4905 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4906
4907         PR tdep/21717
4908         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4909         condition for FPSCR.
4910         (arm_linux_store_inferior_registers): Likewise.
4911
4912 2017-07-22  Tom Tromey  <tom@tromey.com>
4913
4914         * break-catch-syscall.c (struct catch_syscall_inferior_data)
4915         <syscalls_counts>: Now a std::vector.
4916         (get_catch_syscall_inferior_data): Use "new".
4917         (catch_syscall_inferior_data_cleanup): Use "delete".
4918         (insert_catch_syscall, remove_catch_syscall)
4919         (clear_syscall_counts): Update.
4920
4921 2017-07-22  Tom Tromey  <tom@tromey.com>
4922
4923         * break-catch-syscall.c (syscall_catchpoint)
4924         <syscalls_to_be_caught>: Now a std::vector<int>
4925         (~syscall_catchpoint): Remove.
4926         (insert_catch_syscall, remove_catch_syscall)
4927         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4928         (print_mention_catch_syscall, print_recreate_catch_syscall):
4929         Update.
4930         (create_syscall_event_catchpoint): Change type of "filter"
4931         parameter.
4932         (catch_syscall_split_args): Return a std::vector.
4933         (catch_syscall_command_1, catching_syscall_number_1): Update.
4934
4935 2017-07-22  Tom Tromey  <tom@tromey.com>
4936
4937         * break-catch-throw.c (struct exception_catchpoint)
4938         <exception_rx>: Now a std::string.
4939         (~exception_catchpoint): Remove.
4940         (print_one_detail_exception_catchpoint): Update.
4941         (handle_gnu_v3_exceptions): Change type of except_rx.
4942         (extract_exception_regexp): Return a std::string.
4943         (catch_exception_command_1): Update.
4944
4945 2017-07-22  Tom Tromey  <tom@tromey.com>
4946
4947         * break-catch-sig.c (gdb_signal_type): Remove typedef.
4948         (struct signal_catchpoint) <signals_to_be_caught>: Now a
4949         std::vector.
4950         <catch_all>: Now a bool.
4951         (~signal_catchpoint): Remove.
4952         (signal_catchpoint_insert_location)
4953         (signal_catchpoint_remove_location)
4954         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4955         (signal_catchpoint_print_mention)
4956         (signal_catchpoint_print_recreate)
4957         (signal_catchpoint_explains_signal): Update.
4958         (create_signal_catchpoint): Change type of "filter" and
4959         "catch_all".
4960         (catch_signal_split_args): Return a std::vector.  Change type of
4961         "catch_all".
4962         (catch_signal_command): Update.
4963
4964 2017-07-20  Pedro Alves  <palves@redhat.com>
4965
4966         * ada-lang.c (ada_language_defn): Make extern.
4967         (_initialize_ada_language): Remove add_language call.
4968         * c-lang.c (c_language_defn, cplus_language_defn)
4969         (asm_language_defn, minimal_language_defn): Make extern.
4970         (_initialize_c_language): Delete.
4971         * completer.c (compare_cstrings): Delete, moved to utils.h.
4972         * d-lang.c (d_language_defn): Make extern.
4973         (_initialize_d_language): Remove add_language calls.
4974         * defs.h (enum language): Add comment.
4975         * f-lang.c (f_language_defn): Make extern.
4976         (_initialize_f_language): Remove add_language call.
4977         * go-lang.c (go_language_defn): Make extern.
4978         (_initialize_go_language): Remove add_language call.
4979         * language.c: Include <algorithm>.
4980         (languages): Redefine as const array.
4981         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4982         (set_language_command): Handle "local".  Use for-range loop.
4983         (set_language): Remove loop.
4984         (language_enum): Rewrite.
4985         (language_def, language_str): Remove loops.
4986         (add_language): Delete.
4987         (add_set_language_command): New, based on add_languages.
4988         (skip_language_trampoline): Adjust.
4989         (local_language_defn): Delete.
4990         (language_gdbarch_post_init): Adjust.
4991         (_initialize_language): Remove add_language calls.  Call
4992         add_set_language_command.
4993         * language.h (add_language): Delete.
4994         (auto_language_defn)
4995         (unknown_language_defn, minimal_language_defn, ada_language_defn)
4996         (asm_language_defn, c_language_defn, cplus_language_defn)
4997         (d_language_defn, f_language_defn, go_language_defn)
4998         (m2_language_defn, objc_language_defn, opencl_language_defn)
4999         (pascal_language_defn, rust_language_defn): Declare.
5000         * m2-lang.c (m2_language_defn): Make extern.
5001         (_initialize_m2_language): Remove add_language call.
5002         * objc-lang.c (objc_language_defn): Make extern.
5003         (_initialize_objc_language): Remove add_language call.
5004         * opencl-lang.c (opencl_language_defn): Make extern.
5005         (_initialize_opencl_language): Remove add_language call.
5006         * p-lang.c (pascal_language_defn): Make extern.
5007         (_initialize_pascal_language): Delete.
5008         * rust-lang.c (rust_language_defn): Make extern.
5009         (_initialize_rust_language): Delete.
5010         * utils.h (compare_cstrings): New static inline function.
5011
5012 2017-07-20  Pedro Alves  <palves@redhat.com>
5013
5014         * ada-lang.c (ada_to_fixed_type_1): Adjust.
5015         (get_var_value): Constify parameters.
5016         (get_int_var_value): Change prototype.
5017         (to_fixed_range_type): Adjust.
5018         * ada-lang.h (get_int_var_value): Change prototype.
5019
5020 2017-07-20  Pedro Alves  <palves@redhat.com>
5021
5022         * dwarf2read.c (dw2_lookup_symbol): Use
5023         SYMBOL_MATCHES_SEARCH_NAME.
5024         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5025
5026 2017-07-20  Pedro Alves  <palves@redhat.com>
5027
5028         * block.c (block_iter_name_step, block_iter_name_first)
5029         (block_iter_name_next): Delete.
5030         (block_lookup_symbol_primary): Adjust to use
5031         dict_iter_match_first/dict_iter_match_next.
5032         * block.h (block_iter_name_first, block_iter_name_next): Delete
5033         declarations.
5034         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5035         dict_iter_match_first/dict_iter_match_next.
5036
5037 2017-07-20  Pedro Alves  <palves@redhat.com>
5038
5039         * cp-support.c (cp_find_first_component_aux): Add missing case for
5040         end of string.
5041
5042 2017-07-18  David Blaikie  <dblaikie@gmail.com>
5043
5044         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5045         of dwo_cu's dwo_file.
5046
5047 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5048
5049         * remote.c (store_registers_using_G): Remove one line comment.
5050
5051 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5052
5053         * regcache.c (regcache_cpy): Simplify it.
5054         (regcache::cpy_no_passthrough): Remove it.
5055         * regcache.h (cpy_no_passthrough): Remove it.
5056         (regcache_dup, regcache_cpy): Update comments.
5057
5058 2017-07-18  Pedro Alves  <palves@redhat.com>
5059
5060         * remote-sim.c (sim_command_completer): Adjust to work with a
5061         completion_tracker instead of a VEC.
5062
5063 2017-07-17  Pedro Alves  <palves@redhat.com>
5064
5065         * completer.c (complete_source_filenames): New function.
5066         (complete_address_and_linespec_locations): New function.
5067         (location_completer): Use complete_address_and_linespec_locations.
5068         (completion_tracker::build_completion_result): Honor the tracker's
5069         request to suppress append.
5070         * completer.h (completion_tracker::suppress_append_ws)
5071         (completion_tracker::set_suppress_append_ws): New methods.
5072         (completion_tracker::m_suppress_append_ws): New field.
5073         (complete_source_filenames): New declaration.
5074         * linespec.c (linespec_complete_what): New.
5075         (struct ls_parser) <complete_what, completion_word,
5076         completion_quote_char, completion_quote_end, completion_tracker>:
5077         New fields.
5078         (string_find_incomplete_keyword_at_end): New.
5079         (linespec_lexer_lex_string): Record quote char.  If in completion
5080         mode, don't throw.
5081         (linespec_lexer_consume_token): Advance the completion word point.
5082         (linespec_lexer_peek_token): Save/restore completion info.
5083         (save_stream_and_consume_token): New.
5084         (set_completion_after_number): New.
5085         (linespec_parse_basic): Set what to complete next depending on
5086         token.  Handle function and label completions specially.
5087         (parse_linespec): Disable objc shortcut in completion mode.  Set
5088         what to complete next depending on token type.  Skip keyword if in
5089         completion mode.
5090         (complete_linespec_component, linespec_complete): New.
5091         * linespec.h (linespec_complete): Declare.
5092
5093 2017-07-17  Pedro Alves  <palves@redhat.com>
5094
5095         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5096         Handle 'operator<' / 'operator<<'.
5097
5098 2017-07-17  Pedro Alves  <palves@redhat.com>
5099
5100         * completer.c (collect_explicit_location_matches): Handle
5101         MATCH_LABEL.
5102         (convert_explicit_location_to_linespec): New, factored out from
5103         ...
5104         (convert_explicit_location_to_sals): ... this.
5105         (complete_label): New.
5106         (linespec_complete_label, find_label_symbols_in_block): New.
5107         (find_label_symbols): Add completion_mode parameter and adjust to
5108         call find_label_symbols_in_block.
5109         * linespec.h (linespec_complete_label): Declare.
5110
5111 2017-07-17  Pedro Alves  <palves@redhat.com>
5112
5113         * ada-lang.c (ada_collect_symbol_completion_matches): Add
5114         complete_symbol_mode parameter.
5115         * cli/cli-cmds.c (complete_command): Get the completion result out
5116         of the handle_brkchars tracker if used a custom word point.
5117         * completer.c: Include "linespec.h".
5118         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5119         (advance_to_expression_complete_word_point): New.
5120         (completion_tracker::completes_to_completion_word): New.
5121         (complete_files_symbols): Pass down
5122         complete_symbol_mode::EXPRESSION.
5123         (explicit_options, probe_options): New.
5124         (collect_explicit_location_matches): Complete on the
5125         explictit_loc->foo instead of word.  Use
5126         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
5127         keyword and options completions.
5128         (backup_text_ptr): Delete.
5129         (skip_keyword): New.
5130         (complete_explicit_location): Remove 'word' parameter.  Add
5131         language, quoted_arg_start and quoted_arg_end parameters.
5132         Rewrite, parsing left to right.
5133         (location_completer): Rewrite.
5134         (location_completer_handle_brkchars): New function.
5135         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5136         (enum complete_line_internal_reason): Adjust comments.
5137         (completion_tracker::discard_completions): New.
5138         (completer_handle_brkchars_func_for_completer): Handle
5139         location_completer.
5140         (gdb_custom_word_point_brkchars)
5141         (gdb_org_rl_basic_quote_characters): New.
5142         (gdb_completion_word_break_characters_throw)
5143         (completion_find_completion_word): Handle trackers that use a
5144         custom word point.
5145         (completion_tracker::advance_custom_word_point_by): New.
5146         (completion_tracker::build_completion_result): Don't rely on
5147         readline appending the quote char.
5148         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5149         use a custom word point.
5150         (gdb_rl_attempted_completion_function): Restore
5151         rl_basic_quote_characters.
5152         * completer.h (class completion_tracker): Extend intro comment.
5153         (completion_tracker::set_quote_char)
5154         (completion_tracker::quote_char)
5155         (completion_tracker::set_use_custom_word_point)
5156         (completion_tracker::use_custom_word_point)
5157         (completion_tracker::custom_word_point)
5158         (completion_tracker::set_custom_word_point)
5159         (completion_tracker::advance_custom_word_point_by)
5160         (completion_tracker::completes_to_completion_word)
5161         (completion_tracker::discard_completions): New methods.
5162         (completion_tracker::m_quote_char)
5163         (completion_tracker::m_use_custom_word_point)
5164         (completion_tracker::m_custom_word_point): New fields.
5165         (advance_to_expression_complete_word_point): Declare.
5166         * f-lang.c (f_collect_symbol_completion_matches): Add
5167         complete_symbol_mode parameter.
5168         * language.h (struct language_defn)
5169         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5170         parameter.
5171         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5172         (linespec_complete_function): New function.
5173         (linespec_lexer_lex_keyword): Adjust.
5174         * linespec.h (linespec_keywords, linespec_complete_function): New
5175         declarations.
5176         * location.c (find_end_quote): New function.
5177         (explicit_location_lex_one): Add explicit_completion_info
5178         parameter.  Save quoting info.  Don't throw if being called for
5179         completion.  Don't handle Ada operators here.
5180         (is_cp_operator, skip_op_false_positives, first_of)
5181         (explicit_location_lex_one_function): New function.
5182         (string_to_explicit_location): Replace 'dont_throw' parameter with
5183         an explicit_completion_info pointer parameter.  Handle it.  Don't
5184         use explicit_location_lex_one to lex function names.  Use
5185         explicit_location_lex_one_function instead.
5186         * location.h (struct explicit_completion_info): New.
5187         (string_to_explicit_location): Replace 'dont_throw' parameter with
5188         an explicit_completion_info pointer parameter.
5189         * symtab.c (default_collect_symbol_completion_matches_break_on):
5190         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5191         (default_collect_symbol_completion_matches)
5192         (collect_symbol_completion_matches): Add complete_symbol_mode
5193         parameter.
5194         (collect_symbol_completion_matches_type): Pass down
5195         complete_symbol_mode::EXPRESSION.
5196         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5197         parameter.  Handle LINESPEC mode.
5198         * symtab.h (complete_symbol_mode): New.
5199         (default_collect_symbol_completion_matches_break_on)
5200         (default_collect_symbol_completion_matches)
5201         (collect_symbol_completion_matches)
5202         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5203         parameter.
5204
5205 2017-07-17  Pedro Alves  <palves@redhat.com>
5206
5207         * utils.c (enum class strncmp_iw_mode): New.
5208         (strcmp_iw): Rename to ...
5209         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5210         parameters.  Handle them.
5211         (strncmp_iw): New.
5212         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5213         * utils.h (strncmp_iw): Declare.
5214         (strcmp_iw): Move describing comments here.
5215
5216 2017-07-17  Pedro Alves  <palves@redhat.com>
5217
5218         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5219         CP_OPERATOR_STR.
5220         * c-typeprint.c (is_type_conversion_operator): Use
5221         CP_OPERATOR_STR.
5222         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5223         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5224         CP_OPERATOR_LEN.
5225         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5226         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5227         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5228         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5229         CP_OPERATOR_STR.
5230         * location.c: Include "cp-support.h".
5231         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5232         CP_OPERATOR_STR.
5233         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5234         CP_OPERATOR_LEN.
5235
5236 2017-07-17  Pedro Alves  <palves@redhat.com>
5237
5238         * cli/cli-cmds.c (complete_command): Use a completion tracker
5239         along with completion_find_completion_word for handle_brkchars
5240         phase.
5241         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5242         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5243         (struct gdb_rl_completion_word_info): New.
5244         (gdb_rl_find_completion_word): New.
5245         (completion_find_completion_word): New.
5246         * completer.h (completion_find_completion_word): Declare.
5247
5248 2017-07-17  Pedro Alves  <palves@redhat.com>
5249
5250         * ada-lang.c (symbol_completion_match): Adjust comments.
5251         (symbol_completion_add): Replace vector parameter with
5252         completion_tracker parameter.  Use it.
5253         (ada_make_symbol_completion_list): Rename to...
5254         (ada_collect_symbol_completion_matches): ... this.  Add
5255         completion_tracker parameter and use it.
5256         (ada_language_defn): Adjust.
5257         * break-catch-syscall.c (catch_syscall_completer): Adjust
5258         prototype and work with completion_tracker instead of VEC.
5259         * breakpoint.c (condition_completer): Adjust prototype and work
5260         with completion_tracker instead of VEC.
5261         * c-lang.c (c_language_defn, cplus_language_defn)
5262         (asm_language_defn, minimal_language_defn): Adjust to renames.
5263         * cli/cli-cmds.c (complete_command): Rework using
5264         completion_tracker.  Catch exceptions when completing.
5265         * cli/cli-decode.c (integer_unlimited_completer)
5266         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5267         with completion_tracker instead of VEC.
5268         * command.h (struct completion_tracker): Forward declare.
5269         (completer_ftype, completer_handle_brkchars_ftype): Change
5270         types.
5271         (complete_on_cmdlist, complete_on_enum): Adjust.
5272         * completer.c: Include <algorithm>.
5273         (struct gdb_completer_state): New.
5274         (current_completion): New global.
5275         (readline_line_completion_function): Delete.
5276         (noop_completer, filename_completer)
5277         (filename_completer_handle_brkchars, complete_files_symbols)
5278         (linespec_location_completer): Adjust to work with a
5279         completion_tracker instead of a VEC.
5280         (string_or_empty): New.
5281         (collect_explicit_location_matches): Adjust to work with a
5282         completion_tracker instead of a VEC.
5283         (explicit_location_completer): Rename to ...
5284         (complete_explicit_location): ... this and adjust to work with a
5285         completion_tracker instead of a VEC.
5286         (location_completer): Adjust to work with a completion_tracker
5287         instead of a VEC.
5288         (add_struct_fields): Adjust to work with a completion_list instead
5289         of VEC.
5290         (expression_completer): Rename to ...
5291         (complete_expression): ... this and adjust to work with a
5292         completion_tracker instead of a VEC.  Use complete_files_symbols.
5293         (expression_completer): Reimplement on top of complete_expression.
5294         (symbol_completer): Adjust to work with a completion_tracker
5295         instead of a VEC.
5296         (enum complete_line_internal_reason): Add describing comments.
5297         (complete_line_internal_normal_command): Adjust to work with a
5298         completion_tracker instead of a VEC.
5299         (complete_line_internal): Rename to ...
5300         (complete_line_internal_1): ... this and adjust to work with a
5301         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5302         handle_brkchars phase.
5303         (new_completion_tracker): Delete.
5304         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5305         complete_line_internal_1.
5306         (free_completion_tracker): Delete.
5307         (INITIAL_COMPLETION_HTAB_SIZE): New.
5308         (completion_tracker::completion_tracker)
5309         (completion_tracker::~completion_tracker): New.
5310         (maybe_add_completion): Delete.
5311         (completion_tracker::maybe_add_completion)
5312         (completion_tracker::add_completion)
5313         (completion_tracker::add_completions): New.
5314         (throw_max_completions_reached_error): Delete.
5315         (complete_line): Adjust to work with a completion_tracker instead
5316         of a VEC.  Don't create a completion_tracker_t or check for max
5317         completions here.
5318         (command_completer, command_completer_handle_brkchars)
5319         (signal_completer, reg_or_group_completer_1)
5320         (reg_or_group_completer, default_completer_handle_brkchars):
5321         Adjust to work with a completion_tracker.
5322         (gdb_completion_word_break_characters_throw): New.
5323         (gdb_completion_word_break_characters): Reimplement.
5324         (line_completion_function): Delete.
5325         (completion_tracker::recompute_lowest_common_denominator)
5326         (expand_preserving_ws)
5327         (completion_tracker::build_completion_result)
5328         (completion_result::completion_result)
5329         (completion_result::completion_result)
5330         (completion_result::~completion_result)
5331         (completion_result::completion_result)
5332         (completion_result::release_match_list, compare_cstrings)
5333         (completion_result::sort_match_list)
5334         (completion_result::reset_match_list)
5335         (gdb_rl_attempted_completion_function_throw)
5336         (gdb_rl_attempted_completion_function): New.
5337         * completer.h (completion_list, struct completion_result)
5338         (class completion_tracker): New.
5339         (complete_line): Add completion_tracker parameter.
5340         (readline_line_completion_function): Delete.
5341         (gdb_rl_attempted_completion_function): New.
5342         (noop_completer, filename_completer, expression_completer)
5343         (location_completer, symbol_completer, command_completer)
5344         (signal_completer, reg_or_group_completer): Update prototypes.
5345         (completion_tracker_t, new_completion_tracker)
5346         (make_cleanup_free_completion_tracker): Delete.
5347         (enum maybe_add_completion_enum): Delete.
5348         (maybe_add_completion): Delete.
5349         (throw_max_completions_reached_error): Delete.
5350         * corefile.c (complete_set_gnutarget): Adjust to work with a
5351         completion_tracker instead of a VEC.
5352         * cp-abi.c (cp_abi_completer): Adjust to work with a
5353         completion_tracker instead of a VEC.
5354         * d-lang.c (d_language_defn): Adjust.
5355         * disasm.c (disassembler_options_completer): Adjust to work with a
5356         completion_tracker instead of a VEC.
5357         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5358         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5359         with a completion_tracker instead of a VEC.
5360         (f_language_defn): Adjust.
5361         * go-lang.c (go_language_defn): Adjust.
5362         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5363         Adjust to work with a completion_tracker instead of a VEC.
5364         * infrun.c (handle_completer): Likewise.
5365         * interps.c (interpreter_completer): Likewise.
5366         * interps.h (interpreter_completer): Likewise.
5367         * language.c (unknown_language_defn, auto_language_defn)
5368         (local_language_defn): Adjust.
5369         * language.h (language_defn::la_make_symbol_completion_list):
5370         Rename to ...
5371         (language_defn::la_collect_symbol_completion_matches): ... this
5372         and adjust to work with a completion_tracker instead of a VEC.
5373         * m2-lang.c (m2_language_defn): Adjust.
5374         * objc-lang.c (objc_language_defn): Adjust.
5375         * opencl-lang.c (opencl_language_defn): Adjust.
5376         * p-lang.c (pascal_language_defn): Adjust.
5377         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5378         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5379         with a completion_tracker.
5380         * rust-lang.c (rust_language_defn): Adjust.
5381         * symtab.c (free_completion_list, do_free_completion_list)
5382         (return_val, completion_tracker): Delete.
5383         (completion_list_add_name, completion_list_add_symbol)
5384         (completion_list_add_msymbol, completion_list_objc_symbol)
5385         (completion_list_add_fields, add_symtab_completions): Add
5386         completion_tracker parameter and use it.
5387         (default_make_symbol_completion_list_break_on_1): Rename to...
5388         (default_collect_symbol_completion_matches_break_on): ... this.
5389         Add completion_tracker parameter and use it instead of allocating
5390         a completion tracker here.
5391         (default_make_symbol_completion_list_break_on): Delete old
5392         implementation.
5393         (default_make_symbol_completion_list): Delete.
5394         (default_collect_symbol_completion_matches): New.
5395         (make_symbol_completion_list): Delete.
5396         (collect_symbol_completion_matches): New.
5397         (make_symbol_completion_type): Rename to ...
5398         (collect_symbol_completion_matches_type): ... this.  Add
5399         completion_tracker parameter and use it instead of VEC.
5400         (make_file_symbol_completion_list_1): Rename to...
5401         (collect_file_symbol_completion_matches): ... this.  Add
5402         completion_tracker parameter and use it instead of VEC.
5403         (make_file_symbol_completion_list): Delete.
5404         (add_filename_to_list): Use completion_list instead of a VEC.
5405         (add_partial_filename_data::list): Now a completion_list.
5406         (make_source_files_completion_list): Work with a completion_list
5407         instead of a VEC.
5408         * symtab.h: Include "completer.h".
5409         (default_make_symbol_completion_list_break_on)
5410         (default_make_symbol_completion_list, make_symbol_completion_list)
5411         (make_symbol_completion_type, make_file_symbol_completion_list)
5412         (make_source_files_completion_list): Delete.
5413         (default_collect_symbol_completion_matches_break_on)
5414         (default_collect_symbol_completion_matches)
5415         (collect_symbol_completion_matches)
5416         (collect_symbol_completion_matches_type)
5417         (collect_file_symbol_completion_matches)
5418         (make_source_files_completion_list): New.
5419         * top.c (init_main): Don't install a rl_completion_entry_function
5420         hook.  Install a rl_attempted_completion_function hook instead.
5421         * tui/tui-layout.c (layout_completer): Adjust to work with a
5422         completion_tracker.
5423         * tui/tui-regs.c (tui_reggroup_completer):
5424         * tui/tui-win.c (window_name_completer, focus_completer)
5425         (winheight_completer): Adjust to work with a completion_tracker.
5426         * value.c: Include "completer.h".
5427         (complete_internalvar): Adjust to work with a completion_tracker.
5428         * value.h (complete_internalvar): Likewise.
5429
5430 2017-07-17  Pedro Alves  <palves@redhat.com>
5431
5432         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5433         renames.
5434         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5435         comments to completer_ftype's declaration.
5436         <completer_handle_brkchars>: Change type to
5437         completer_handle_brkchars_ftype.
5438         * command.h (completer_ftype): Add describing comment and give
5439         names to parameters.
5440         (completer_ftype_void): Rename to ...
5441         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
5442         (set_cmd_completer_handle_brkchars): Adjust.
5443         * completer.c (filename_completer_handle_brkchars): New function.
5444         (complete_line_internal_normal_command): New function, factored
5445         out from ...
5446         (complete_line_internal): ... here.
5447         (command_completer_handle_brkchars)
5448         (default_completer_handle_brkchars)
5449         (completer_handle_brkchars_func_for_completer): New functions.
5450         * completer.h (set_gdb_completion_word_break_characters): Delete
5451         declaration.
5452         (completer_handle_brkchars_func_for_completer): New declaration.
5453         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5454         completer_handle_brkchars_func_for_completer.
5455
5456 2017-07-17  Pedro Alves  <palves@redhat.com>
5457
5458         * completer.c (symbol_completer): New function, based on
5459         make_symbol_completion_list_fn.
5460         * completer.h (symbol_completer): New declaration.
5461         * guile/scm-cmd.c (cmdscm_completers): Adjust.
5462         * python/py-cmd.c (completers): Adjust.
5463         * symtab.c (make_symbol_completion_list_fn): Delete.
5464         * symtab.h (make_symbol_completion_list_fn): Delete.
5465         * cli/cli-decode.c (add_cmd): Adjust.
5466
5467 2017-07-17  Pedro Alves  <palves@redhat.com>
5468
5469         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5470         * dwarf2read.c: Include "filename-seen-cache.h".
5471         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5472         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5473         * filename-seen-cache.c: New file.
5474         * filename-seen-cache.h: New file.
5475         * symtab.c: Include "filename-seen-cache.h".
5476         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5477         (create_filename_seen_cache, clear_filename_seen_cache)
5478         (delete_filename_seen_cache, filename_seen): Delete, parts moved
5479         to filename-seen-cache.h/filename-seen-cache.c.
5480         (output_source_filename, sources_info)
5481         (maybe_add_partial_symtab_filename)
5482         (make_source_files_completion_list): Adjust to use
5483         filename_seen_cache.
5484
5485 2017-07-17  Pedro Alves  <palves@redhat.com>
5486
5487         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5488         fields.
5489         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5490         dwarf2_debug_sections*)): New.
5491         (dwarf2_per_objfile::dwarf2_per_objfile(const
5492         dwarf2_per_objfile&)): Declare as deleted.
5493         (dwarf2_per_objfile::operator=): Declare as deleted.
5494         (dwarf2_per_objfile::dwarf2_per_objfile)
5495         (dwarf2_per_objfile::~dwarf2_per_objfile)
5496         (dwarf2_per_objfile::free_cached_comp_units): New.
5497         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5498         ctor.  Call dwarf2_per_objfile's ctor manually.
5499         (dwarf2_locate_sections): Deleted/refactored as ...
5500         (dwarf2_per_objfile::locate_sections): ... this new method.
5501         (free_cached_comp_units): Defer to
5502         dwarf2_per_objfile::free_cached_comp_units.
5503         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5504
5505 2017-07-14  Tom Tromey  <tom@tromey.com>
5506
5507         PR rust/21764:
5508         * rust-exp.y (convert_ast_to_expression): Add "want_type"
5509         parameter.
5510         <UNOP_SIZEOF>: Split into separate case.
5511         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
5512
5513 2017-07-14  Tom Tromey  <tom@tromey.com>
5514
5515         PR rust/21763:
5516         * symtab.c (symbol_matches_domain): Add language_rust to special
5517         case.
5518         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5519         treat LOC_TYPEDEF symbols as variables.
5520
5521 2017-07-14  Pedro Alves  <palves@redhat.com>
5522
5523         * symtab.c (make_file_symbol_completion_list_1): Iterate over
5524         symtabs matching all symtabs with SRCFILE as file name instead of
5525         only considering the first hit, with lookup_symtab.
5526
5527 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5528
5529         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5530         operator_name parameters.
5531         (gen_expr): Update function call.
5532
5533 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5534
5535         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5536         parameter.
5537         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5538         Likewise.
5539         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5540         parameter, use agent_expr::gdbarch instead, update function
5541         calls.
5542         (locexpr_tracepoint_var_ref): Likewise.
5543         (loclist_tracepoint_var_ref): Likewise.
5544         * ax-gdb.c (gen_trace_static_fields): Likewise.
5545         (gen_traced_pop): Likewise.
5546         (gen_frame_args_address): Likewise.
5547         (gen_frame_locals_address): Likewise.
5548         (gen_var_ref): Likewise.
5549         (gen_struct_ref_recursive): Likewise.
5550         (gen_static_field): Likewise.
5551         (gen_maybe_namespace_elt): Likewise.
5552         (gen_expr): Likewise.
5553         (gen_trace_for_var): Likewise.
5554         (gen_trace_for_expr): Likewise.
5555         (gen_trace_for_return_address): Likewise.
5556
5557 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5558
5559         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5560         parameter.
5561         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5562
5563 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5564
5565         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5566         from ax, update calls.
5567         (gen_usual_arithmetic): Likewise.
5568         (gen_integral_promotions): Likewise.
5569         (gen_bitfield_ref): Likewise.
5570         (gen_primitive_field): Likewise.
5571         (gen_struct_ref_recursive): Likewise.
5572         (gen_struct_ref): Likewise.
5573         (gen_maybe_namespace_elt): Likewise.
5574         (gen_struct_elt_for_reference): Likewise.
5575         (gen_namespace_elt): Likewise.
5576         (gen_aggregate_elt_ref): Likewise.
5577         (gen_expr): Get gdbarch from ax, update calls.
5578         (gen_expr_binop_rest): Likewise.
5579
5580 2017-07-13  Pedro Alves  <palves@redhat.com>
5581
5582         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5583         as default tdesc.
5584         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5585         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5586         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5587         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
5588         tdep.
5589         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5590         Get final tdesc from the tdep.
5591         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5592         default tdesc.
5593         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5594         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5595         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5596         Use it as default tdesc.
5597         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5598         down to amd_init_abi.  No longer handle fallback tdesc here.
5599         * amd64-tdep.h (tdesc_x32): Declare.
5600         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5601         parameter.
5602         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5603         as default tdesc.
5604
5605 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5606
5607         * s390-linux-tdep.c (s390_process_record): Add support for
5608         instructions new in arch12.
5609
5610 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5611
5612         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5613         PT_GETFSBASE and PT_GETGSBASE.
5614         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5615         PT_SETGSBASE.
5616
5617 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5618
5619         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5620         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5621         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5622         those rules.
5623         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5624         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5625         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5626         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5627         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5628         * features/i386/amd64.xml: Add 64bit-segments.xml.
5629         * features/i386/amd64-avx-avx512.c: Regenerated.
5630         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5631         * features/i386/amd64-avx-mpx.c: Regenerated.
5632         * features/i386/amd64-avx.c: Regenerated.
5633         * features/i386/amd64-mpx.c: Regenerated.
5634         * features/i386/amd64.c: Regenerated.
5635         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5636         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5637         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5638         * regformats/i386/amd64-avx.dat: Regenerated.
5639         * regformats/i386/amd64-mpx.dat: Regenerated.
5640         * regformats/i386/amd64.dat: Regenerated.
5641
5642 2017-07-10  Yao Qi  <yao.qi@linaro.org>
5643
5644         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5645         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5646
5647 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5648
5649         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5650         unsetenv.
5651         * gnulib/aclocal.m4: Regenerate.
5652         * gnulib/config.in: Regenerate.
5653         * gnulib/configure: Regenerate.
5654         * gnulib/import/Makefile.am: Regenerate.
5655         * gnulib/import/Makefile.in: Regenerate.
5656         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5657         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5658         * gnulib/import/m4/environ.m4: New file.
5659         * gnulib/import/m4/setenv.m4: New file.
5660         * gnulib/import/setenv.c: New file.
5661         * gnulib/import/unsetenv.c: New file.
5662
5663 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
5664
5665         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5666         address when op is DW_OP_addr.
5667
5668 2017-07-09  Tom Tromey  <tom@tromey.com>
5669
5670         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5671         check and apply to outer type.
5672
5673 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5674
5675         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5676         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5677         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5678         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5679
5680 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5681
5682         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5683
5684 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5685
5686         * corelow.c (get_core_siginfo): Remove.
5687         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5688         instead of get_core_siginfo.
5689         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5690         * gdbarch.h: Re-generate.
5691         * gdbarch.c: Re-generate.
5692         * linux-tdep.c (linux_core_xfer_siginfo): New.
5693         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5694
5695 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5696
5697         * corelow.c (thread_section_name): Move to ...
5698         * gdbcore.h (thread_section_name): ... here.
5699
5700 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5701
5702         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5703         (struct siginfo32): New.
5704         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5705         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5706         via ptrace(PT_LWPINFO).
5707
5708 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5709
5710         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5711         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5712         (fbsd_get_siginfo_type): New.
5713         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5714         (_initialize_fbsd_tdep): New.
5715
5716 2017-07-06  David Blaikie  <dblaikie@gmail.com>
5717
5718         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5719         a singular dwo_unit*) to support multiple CUs in the same way that
5720         multiple TUs are supported.
5721         (create_cus_hash_table): Replace create_dwo_cu with a function for
5722         parsing multiple CUs from a DWO file.
5723         (open_and_init_dwo_file): Use create_cus_hash_table rather than
5724         create_dwo_cu.
5725         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5726         htab_find, rather than comparing the signature to a singleton CU in
5727         the dwo_file.
5728
5729 2017-07-06  Pedro Alves  <palves@redhat.com>
5730
5731         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5732
5733 2017-07-04  Pedro Alves  <palves@redhat.com>
5734
5735         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5736         * gdbtypes.h (TYPE_STATIC): Delete.
5737         (struct fn_field) <is_public, is_abstract, is_static, is_final,
5738         is_synchronized, is_native>: Delete.
5739         <dummy>: Bump.
5740         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5741         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5742         (TYPE_FN_FIELD_ABSTRACT): Delete.
5743
5744 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
5745
5746         * buffer.h (buffer_finish): Fix spelling mistakes.
5747
5748 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
5749
5750         * .dir-locals.el: Automatically switch to C-style comments in
5751         versions of Emacs that support the feature.
5752
5753 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5754             Pedro Alves  <palves@redhat.com>
5755
5756         PR cli/21688
5757         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5758         (process_next_line): New variable 'inline_cmd'.
5759         Adjust 'if' clauses for "python", "compile" and "guile" to use
5760         'command_name_equals' and check for '!inline_cmd'.
5761
5762 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5763
5764         PR cli/21688
5765         * cli/cli-script.c (command_name_equals_not_inline): New function.
5766         (process_next_line): Adjust 'if' clauses for "python", "compile"
5767         and "guile" to use command_name_equals_not_inline.
5768
5769 2017-06-29  Pedro Alves  <palves@redhat.com>
5770
5771         * completer.c (expression_completer): Call
5772         linespec_location_completer instead of location_completer.
5773
5774 2017-06-29  Pedro Alves  <palves@redhat.com>
5775
5776         * completer.c (expression_completer): Remove code that recomputes
5777         'text' from 'word'.
5778
5779 2017-06-29  Yao Qi  <yao.qi@linaro.org>
5780
5781         * regformats/regdat.sh: Generate code with
5782         "ifndef IN_PROCESS_AGENT".
5783
5784 2017-06-28  Pedro Alves  <palves@redhat.com>
5785
5786         * command.h: Include "common/scoped_restore.h".
5787
5788 2017-06-28  Yao Qi  <yao.qi@linaro.org>
5789
5790         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5791         instead of obstack_grow.
5792
5793 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
5794
5795         PR gdb/21337
5796         * symfile.c (reread_symbols): Call objfiles_changed just before
5797         read_symbols.
5798
5799 2017-06-27  Pedro Alves  <palves@redhat.com>
5800
5801         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5802         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5803         (completion_list_add_symbol, completion_list_add_msymbol):
5804         ... these new functions.
5805         (add_symtab_completions)
5806         (default_make_symbol_completion_list_break_on_1): Adjust.
5807
5808 2017-06-27  Pedro Alves  <palves@redhat.com>
5809
5810         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5811         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
5812         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5813         dtor.
5814         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
5815         'storage_obstack' field an auto_obstack.  In-class initialize all
5816         non-bitfield fields.  Make minsyms_read bool.
5817         * symfile.c (read_symbols): Adjust.
5818
5819 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
5820
5821         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5822         (gdbsim_store_register): Likewise.
5823
5824 2017-06-27  Pedro Alves  <palves@redhat.com>
5825
5826         * c-exp.y (name_obstack): Now an auto_obstack.
5827         (yylex): Use auto_obstack::clear.
5828         (c_parse): Use auto_obstack::clear instead of reinitializing and
5829         freeing the obstack.
5830         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5831         * d-exp.y (name_obstack): Now an auto_obstack.
5832         (yylex): Use auto_obstack::clear.
5833         (d_parse): Use auto_obstack::clear instead of reinitializing and
5834         freeing the obstack.
5835         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5836         auto_obstack.
5837         * dwarf2read.c (create_addrmap_from_index)
5838         (dwarf2_build_psymtabs_hard)
5839         (update_enumeration_type_from_children): Likewise.
5840         * gdb_obstack.h (auto_obstack): New type.
5841         * go-exp.y (name_obstack): Now an auto_obstack.
5842         (build_packaged_name): Use auto_obstack::clear.
5843         (go_parse): Use auto_obstack::clear instead of reinitializing and
5844         freeing the obstack.
5845         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5846         auto_obstack.
5847         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5848         * rust-exp.y (work_obstack): Now an auto_obstack.
5849         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5850         reinitializing and freeing the obstack.
5851         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5852         (host_char_to_target): Use auto_obstack.
5853         * utils.h (make_cleanup_obstack_free): Delete declaration.
5854         * valprint.c (generic_emit_char, generic_printstr): Use
5855         auto_obstack.
5856
5857 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5858
5859         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5860         thread.
5861         (darwin_init_thread_list): Don't update dummy thread.
5862         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5863
5864 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5865
5866         * record-full.c (netorder16): Remove.
5867
5868 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5869
5870         * common/diagnostics.h: Define macros for GCC.
5871         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5872         * common/vec.h: Include diagnostics.h.
5873         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5874         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5875         warning.
5876
5877 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5878
5879         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5880         New macro.
5881         * ada-lex.l: Ignore deprecated register warnings.
5882
5883 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5884
5885         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5886         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5887
5888 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5889
5890         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5891         its own line.
5892
5893 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5894
5895         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5896
5897 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
5898
5899         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5900         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5901         (xtensa_register_read_masked): Likewise.
5902
5903 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5904
5905         * common/environ.c (gdb_environ::unset): Update comment.
5906
5907 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5908
5909         * python/py-unwind.c (pyuw_sniffer): Allocate space for
5910         registers.
5911
5912 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5913
5914         * record-full.c (record_full_exec_insn): Use byte_vector.
5915
5916 2017-06-22  Yao Qi  <yao.qi@linaro.org>
5917
5918         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5919         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5920
5921 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5922
5923         * remote.c (cached_reg): Move from here...
5924         * regcache.h (cached_reg): ...to here.
5925         * python/py-unwind.c (struct reg_info): Remove.
5926         (cached_frame_info): Use cached_reg_t.
5927         (pyuw_prev_register): Likewise.
5928         (pyuw_sniffer): Use cached_reg_t and allocate registers.
5929         (pyuw_dealloc_cache): Free all registers.
5930
5931 2017-06-22  Pedro Alves  <palves@redhat.com>
5932             Simon Marchi  <simon.marchi@ericsson.com>
5933
5934         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5935         warning.
5936         * common/diagnostics.h: New file.
5937
5938 2017-06-22  Pedro Alves  <palves@redhat.com>
5939
5940         * common/agent.h: Add include guards.
5941
5942 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
5943
5944         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5945         talk about addressable units instead of bytes.
5946
5947 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5948
5949         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5950         of '::const_iterator'.
5951
5952 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5953
5954         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5955         'unittests/environ-selftests.c'.
5956         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5957         * charset.c (find_charset_names): Declare object 'iconv_env'.
5958         Update code to use 'iconv_env' object.  Remove call to
5959         'free_environ'.
5960         * common/environ.c: Include <utility>.
5961         (make_environ): Delete function.
5962         (free_environ): Delete function.
5963         (gdb_environ::clear): New function.
5964         (gdb_environ::operator=): New function.
5965         (gdb_environ::get): Likewise.
5966         (environ_vector): Delete function.
5967         (set_in_environ): Delete function.
5968         (gdb_environ::set): New function.
5969         (unset_in_environ): Delete function.
5970         (gdb_environ::unset): New function.
5971         (gdb_environ::envp): Likewise.
5972         * common/environ.h: Include <vector>.
5973         (struct gdb_environ): Delete; transform into...
5974         (class gdb_environ): ... this class.
5975         (free_environ): Delete prototype.
5976         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5977         environ_vector): Likewise.
5978         * infcmd.c (run_command_1): Update code to call
5979         'envp' from 'gdb_environ' class.
5980         (environment_info): Update code to call methods from 'gdb_environ'
5981         class.
5982         (unset_environment_command): Likewise.
5983         (path_info): Likewise.
5984         (path_command): Likewise.
5985         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5986         (inferior::inferior): Initialize 'environment' using the host's
5987         information.
5988         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5989         Include "environ.h".
5990         (class inferior) <environment>: Change type from 'struct
5991         gdb_environ' to 'gdb_environ'.
5992         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5993         methods from 'gdb_environ' class.
5994         * solib.c (solib_find_1): Likewise
5995         * unittests/environ-selftests.c: New file.
5996
5997 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5998
5999         * features/i386/i386-linux.xml: Exchange the order of including
6000         32bit-linux.xml and 32bit-sse.xml.
6001         * features/i386/i386-linux.c: Regenerated.
6002
6003 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6004
6005         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6006         Delete copy ctor and assignment operator.
6007         (tdesc_type): Likewise.
6008         (tdesc_feature): Likewise.
6009         (tdesc_free_reg): Remove.
6010         (tdesc_create_reg): Use new.
6011         (tdesc_free_type): Remove.
6012         (tdesc_create_vector): Use new.
6013         (tdesc_create_union): Likewise.
6014         (tdesc_create_flags): Likewise.
6015         (tdesc_create_enum): Likewise.
6016         (tdesc_free_feature): Delete.
6017         (free_target_description): Use delete.
6018
6019 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
6020
6021         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6022         registers.
6023
6024 2017-06-19  Pedro Alves  <palves@redhat.com>
6025
6026         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6027         after gdb::unlinker.
6028
6029 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
6030
6031         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6032         gdb_environ to access an environment variable.
6033
6034 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
6035
6036         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6037         gdb_byte*.
6038
6039 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6040
6041         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6042
6043 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6044
6045         * configure: Re-generate.
6046         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6047
6048 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6049
6050         * configure: Re-generate.
6051         * warning.m4: Pass -Werror to compiler when checking for
6052         supported warning flags.
6053
6054 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6055
6056         * Makefile.in (COMPILE.pre): Add "-x c++".
6057
6058 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
6059             Pedro Alves  <palves@redhat.com>
6060             Yao Qi  <yao.qi@linaro.org>
6061
6062         * defs.h (RequireLongest): New.
6063         (extract_integer): Declare function template.
6064         (extract_signed_integer): Remove the declaration, but define it
6065         static inline.
6066         (extract_unsigned_integer): Likewise.
6067         (store_integer): Declare function template.
6068         (store_signed_integer): Remove the declaration, but define it
6069         static inline.
6070         (store_unsigned_integer): Likewise.
6071         * findvar.c (extract_integer): New function template.
6072         (extract_signed_integer): Remove.
6073         (extract_unsigned_integer): Remove.
6074         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6075         instantiations.
6076         (store_integer): New function template.
6077         (store_signed_integer): Remove.
6078         (store_unsigned_integer): Remove.
6079         (store_integer): Explicit instantiations.
6080         * regcache.c (regcache_raw_read_signed): Update.
6081         (regcache::raw_read): New function.
6082         (regcache::raw_read_signed): Remove.
6083         (regcache::raw_read_unsigned): Remove.
6084         (regcache_raw_read_unsigned): Update.
6085         (regcache_raw_write_unsigned): Update.
6086         (regcache::raw_write_signed): Remove.
6087         (regcache::raw_write): New function.
6088         (regcache_cooked_read_signed): Update.
6089         (regcache::raw_write_unsigned): Remove.
6090         (regcache::cooked_read_signed): Remove.
6091         (regcache_cooked_read_unsigned): Update.
6092         (regcache::cooked_read_unsigned): Remove.
6093         (regcache_cooked_write_signed): Update.
6094         (regcache_cooked_write_unsigned): Update.
6095         * regcache.h (regcache) <raw_read_signed>: Remove.
6096         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6097         <raw_read, raw_write>: New.
6098         <cooked_read_signed, cooked_write_signed>: Remove.
6099         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6100         <cooked_read, cooked_write>: New.
6101         * sh64-tdep.c (sh64_pseudo_register_read): Update.
6102         (sh64_pseudo_register_write): Update.
6103
6104 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
6105
6106         * arc-tdep.c (arc_disassembler_options): New variable.
6107         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6108         of default_print_insn.
6109         (arc_delayed_print_insn): Set info->section when needed,
6110         use default_print_insn to retrieve a disassembler.
6111
6112 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6113
6114         PR gdb/21574
6115         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6116         to mention $SHELL and startup-with-shell.
6117
6118 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
6119
6120         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6121
6122 2017-06-14  Yao Qi  <yao.qi@linaro.org>
6123
6124         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6125         default_print_insn instead of print_insn_aarch64.
6126         * arm-tdep.c (gdb_print_insn_arm): Call
6127         default_print_insn instead of print_insn_big_arm
6128         and print_insn_little_arm.
6129         * i386-tdep.c (i386_print_insn): Call default_print_insn
6130         instead of print_insn_i386.
6131         * ia64-tdep.c (ia64_print_insn): Call
6132         default_print_insn instead of print_insn_ia64.
6133         * mips-tdep.c (gdb_print_insn_mips): Call
6134         default_print_insn instead of print_insn_big_mips
6135         and print_insn_little_mips.
6136         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6137         instead of print_insn_spu.
6138
6139 2017-06-14  Pedro Alves  <palves@redhat.com>
6140
6141         * ada-lang.c: Include "common/byte-vector.h".
6142         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6143         * charset.c (wchar_iterator::iterate): Resize the vector instead
6144         of reserving it.
6145         * common/byte-vector.h: Include "common/def-vector.h".
6146         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6147         * cli/cli-dump.c: Include "common/byte-vector.h".
6148         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6149         * common/byte-vector.h: New file.
6150         * common/def-vector.h: New file.
6151         * common/default-init-alloc.h: New file.
6152         * dwarf2loc.c: Include "common/byte-vector.h".
6153         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6154         instead of reserving it.
6155         * dwarf2read.c: Include "common/byte-vector.h".
6156         (data_buf::m_vec): Now a gdb::byte_vector.
6157         * gdb_regex.c: Include "common/def-vector.h".
6158         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6159         * mi/mi-main.c: Include "common/byte-vector.h".
6160         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6161         * printcmd.c: Include "common/byte-vector.h".
6162         (print_scalar_formatted): Use gdb::byte_vector.
6163         * valprint.c: Include "common/byte-vector.h".
6164         (maybe_negate_by_bytes, print_decimal_chars): Use
6165         gdb::byte_vector.
6166
6167 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6168
6169         * darwin-nat.c: Include "nat/fork-inferior.h".
6170
6171 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6172
6173         * configure.nat: Factor out Darwin bits that are not
6174         architecture-specific.  Add fork-inferior.o.
6175
6176 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6177
6178         * configure.nat: Factor out AIX bits that are not
6179         architecture-specific.  Add fork-inferior.o.
6180
6181 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6182
6183         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6184         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6185         wrappers that just call rw_pieced_value.
6186
6187 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6188
6189         * dwarf2loc.c (write_pieced_value): When writing the data for a
6190         memory piece, use write_memory_with_notification instead of
6191         write_memory.
6192
6193 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6194
6195         * valops.c (read_value_memory): Change embedded_offset to
6196         represent a bit offset instead of a byte offset.
6197         * value.h (read_value_memory): Adjust comment.
6198
6199 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6200
6201         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6202         dest_offset_bits and source_offset_bits.
6203         (write_pieced_value): Likewise.
6204
6205 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6206
6207         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6208         given by DW_OP_bit_piece.
6209         (write_pieced_value): Likewise.
6210
6211 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6212
6213         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6214         some other preparations to the places where sufficient information
6215         is available.
6216         (write_pieced_value): Likewise.
6217
6218 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6219
6220         * dwarf2loc.c (bits_to_bytes): New function.
6221         (read_pieced_value): Fix offset calculations for register pieces
6222         on big-endian targets.
6223         (write_pieced_value): Likewise.
6224
6225 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6226
6227         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6228         (write_pieced_value): Likewise.
6229
6230 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6231
6232         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6233         transfer the source value's least significant bits, instead of its
6234         lowest-addressed ones.  Rename type_len to max_offset.
6235         (read_pieced_value): Mirror above changes to write_pieced_value as
6236         applicable.
6237
6238 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6239
6240         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6241         truncate full bytes from dest_offset_bits before using it as an
6242         offset into the buffer.
6243
6244 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6245
6246         * dwarf2loc.c (write_pieced_value): Include transfer size in
6247         byte-wise check.
6248
6249 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6250
6251         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6252         calculation of this_size.
6253
6254 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6255
6256         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6257         when targeting a bit-field.
6258         (write_pieced_value): Likewise.
6259
6260 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6261
6262         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6263         (allocate_piece_closure): Drop addr_size parameter.
6264         (dwarf2_evaluate_loc_desc_full): Adjust call to
6265         allocate_piece_closure.
6266
6267 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6268
6269         PR gdb/21226
6270         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6271         the LSB end, independent of endianness.
6272
6273 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6274
6275         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6276         size capping.
6277
6278 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6279
6280         * mips-linux-nat.c: Move include features/mips*-linux.c to
6281         mips-linux-tdep.c.
6282         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6283         to mips-linux-tdep.c.
6284         * mips-linux-tdep.c: Include features/mips*-linux.c
6285         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6286         functions.
6287         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6288         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6289         (tdesc_mips64_dsp_linux): Declare.
6290
6291 2017-06-12  Tom Tromey  <tom@tromey.com>
6292
6293         * valprint.h (val_print_type_code_int): Remove.
6294         * valprint.c (generic_val_print_int): Always call
6295         val_print_scalar_formatted.
6296         (val_print_type_code_int): Remove.
6297         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6298         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6299         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6300         * ada-valprint.c (ada_val_print_num): Use
6301         val_print_scalar_formatted.
6302
6303 2017-06-12  Tom Tromey  <tom@tromey.com>
6304
6305         * printcmd.c (print_scalar_formatted): Unify the two switches.
6306         Don't convert scalars to LONGEST.
6307
6308 2017-06-12  Tom Tromey  <tom@tromey.com>
6309
6310         PR exp/16225:
6311         * valprint.h (print_decimal_chars): Update.
6312         * valprint.c (maybe_negate_by_bytes): New function.
6313         (print_decimal_chars): Add "is_signed" argument.
6314         * printcmd.c (print_scalar_formatted): Update.
6315
6316 2017-06-12  Tom Tromey  <tom@tromey.com>
6317
6318         PR exp/16225:
6319         * valprint.h (print_binary_chars, print_hex_chars): Update.
6320         * valprint.c (val_print_type_code_int): Update.
6321         (print_binary_chars): Add "zero_pad" argument.
6322         (emit_octal_digit): New function.
6323         (print_octal_chars): Don't zero-pad.
6324         (print_decimal_chars): Likewise.
6325         (print_hex_chars): Add "zero_pad" argument.
6326         * sh64-tdep.c (sh64_do_fp_register): Update.
6327         * regcache.c (regcache::dump): Update.
6328         * printcmd.c (print_scalar_formatted): Update.
6329         * infcmd.c (default_print_one_register_info): Update.
6330
6331 2017-06-12  Pedro Alves  <palves@redhat.com>
6332             Alan Hayward  <alan.hayward@arm.com>
6333
6334         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6335         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6336         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6337         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6338         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6339
6340 2017-06-12  Pedro Alves  <palves@redhat.com>
6341
6342         * dwarf2read.c (mapped_symtab::data): Now a vector of
6343         symtab_index_entry instead of vector of
6344         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6345         whether an element's name is NULL instead of checking whether the
6346         element itself is NULL.
6347         (find_slot): Change return type.  Adjust.
6348         (hash_expand, , add_index_entry, uniquify_cu_indices)
6349         (write_hash_table): Adjust.
6350
6351 2017-06-12  Pedro Alves  <palves@redhat.com>
6352
6353         * dwarf2read.c (recursively_count_psymbols): New function.
6354         (write_psymtabs_to_index): Call it to compute number of psyms and
6355         pass estimate size of psyms_seen to unordered_set's ctor.
6356
6357 2017-06-12  Pedro Alves  <palves@redhat.com>
6358
6359         * dwarf2read.c (write_hash_table): Check if key already exists
6360         before emplacing.
6361
6362 2017-06-12  Pedro Alves  <palves@redhat.com>
6363
6364         * dwarf2read.c (data_buf::append_space): Rename to...
6365         (data_buf::grow): ... this, and make private.  Adjust all callers.
6366         (data_buf::append_uint): New method.
6367         (add_address_entry, write_one_signatured_type)
6368         (write_psymtabs_to_index): Use it.
6369
6370 2017-06-12  Pedro Alves  <palves@redhat.com>
6371
6372         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6373         (file_write (FILE *, const std::vector<Elem>&)): Delete.
6374         (data_buf::file_write): Call ::fwrite directly.
6375
6376 2017-06-12  Pedro Alves  <palves@redhat.com>
6377
6378         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6379         std::vector::erase.
6380
6381 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6382
6383         Code cleanup: C++ify .gdb_index producer.
6384         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6385         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6386         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6387         (create_strtab, add_string): Remove.
6388         (file_write, data_buf): New.
6389         (struct symtab_index_entry): Use std::vector for cu_indices.
6390         (struct mapped_symtab): Use std::vector for data.
6391         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6392         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6393         Remove.
6394         (find_slot): Change return type.  Update it to the new data structures.
6395         (hash_expand, add_index_entry): Update it to the new data structures.
6396         (offset_type_compare): Remove.
6397         (uniquify_cu_indices): Update it to the new data structures.
6398         (c_str_view, c_str_view_hasher, vector_hasher): New.
6399         (add_indices_to_cpool): Remove.
6400         (write_hash_table): Update it to the new data structures.
6401         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6402         (eq_psymtab_cu_index): Remove.
6403         (psym_index_map): New typedef.
6404         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6405         reference and std::unordered_map for cu_index_htab.
6406         (add_address_entry, add_address_entry_worker, write_address_map)
6407         (write_psymbols): Update it to the new data structures.
6408         (write_obstack): Remove.
6409         (struct signatured_type_index_data): Change types_list to a data_buf
6410         reference and psyms_seen to a std::unordered_set reference.
6411         (write_one_signatured_type, recursively_write_psymbols)
6412         (write_psymtabs_to_index): Update it to the new data structures.
6413
6414 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6415
6416         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6417         separate-debug-file commands.
6418         * symfile.h (separate_debug_file_debug): New global.
6419         * symfile.c (separate_debug_file_debug): New global.
6420         (separate_debug_file_exists, find_separate_debug_file): Add
6421         debug output.
6422         (_initialize_symfile): Add "set debug separate-debug-file"
6423         command.
6424         * build-id.c (build_id_to_debug_bfd,
6425         find_separate_debug_file_by_buildid): Add debug output.
6426
6427 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6428
6429         * gdbarch.sh (displaced_step_free_closure): Remove.
6430         * gdbarch.h, gdbarch.c: Re-generate.
6431         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6432         displaced_step_free_closure.
6433         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6434         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6435         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6436         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6437         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6438         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6439         * arch-utils.h (simple_displaced_step_free_closure): Remove.
6440         * arch-utils.c (simple_displaced_step_free_closure): Remove.
6441         * infrun.c (displaced_step_clear): Call xfree instead of
6442         gdbarch_displaced_step_free_closure.
6443
6444 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
6445
6446         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6447         NULL".
6448
6449 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
6450
6451         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6452         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6453         (mn10300_push_dummy_call): Likewise.
6454
6455 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6456
6457         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6458
6459 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6460
6461         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6462
6463 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6464
6465         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6466         able to start inferiors using a shell.
6467         (New remote packets): Announce new packet "QStartupWithShell".
6468         * remote.c: Add PACKET_QStartupWithShell.
6469         (extended_remote_create_inferior): Handle new
6470         PACKET_QStartupWithShell.
6471         (remote_protocol_features) <QStartupWithShell>: New entry for
6472         PACKET_QStartupWithShell.
6473         (_initialize_remote): Call "add_packet_config_cmd" for
6474         QStartupShell.
6475
6476 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6477             Pedro Alves  <palves@redhat.com>
6478
6479         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6480         and "nat/fork-inferior.h".
6481         * common/common-inferior.h: New file, with contents from
6482         "gdb/inferior.h".
6483         * commom/common-utils.c: Include "common-utils.h".
6484         (stringify_argv): New function.
6485         * common/common-utils.h (stringify_argv): New prototype.
6486         * configure.nat: Add "fork-inferior.o" as a dependency for
6487         "*linux*", "fbsd*" and "nbsd*" hosts.
6488         * corefile.c (get_exec_file): Update comment.
6489         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6490         instead of "startup_inferior".
6491         (darwin_create_inferior): Call "add_thread_silent" after
6492         "fork_inferior".
6493         * fork-child.c: Cleanup unnecessary includes.
6494         (SHELL_FILE): Move to "common/common-fork-child.c".
6495         (environ): Likewise.
6496         (exec_wrapper): Initialize.
6497         (get_exec_wrapper): New function.
6498         (breakup_args): Move to "common/common-fork-child.c"; rename to
6499         "breakup_args_for_exec".
6500         (escape_bang_in_quoted_argument): Move to
6501         "common/common-fork-child.c".
6502         (saved_ui): New variable.
6503         (prefork_hook): New function.
6504         (postfork_hook): Likewise.
6505         (postfork_child_hook): Likewise.
6506         (gdb_startup_inferior): Likewise.
6507         (fork_inferior): Move to "common/common-fork-child.c".  Update
6508         function to support gdbserver.
6509         (startup_inferior): Likewise.
6510         * gdbcore.h (get_exec_file): Remove declaration.
6511         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6512         instead of "startup_inferior".  Call "add_thread_silent" after
6513         "fork_inferior".
6514         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6515         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6516         instead of "startup_inferior".  Call "add_thread_silent" after
6517         "fork_inferior".
6518         * inferior.h: Include "common-inferior.h".
6519         (trace_start_error): Move to "common/common-utils.h".
6520         (trace_start_error_with_name): Likewise.
6521         (fork_inferior): Move prototype to "nat/fork-inferior.h".
6522         (startup_inferior): Likewise.
6523         (gdb_startup_inferior): New prototype.
6524         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6525         * nat/fork-inferior.h: New file.
6526         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6527         instead of "startup_inferior".  Call "add_thread_silent" after
6528         "fork_inferior".
6529         * target.h (target_terminal_init): Move prototype to
6530         "target/target.h".
6531         (target_terminal_inferior): Likewise.
6532         (target_terminal_ours): Likewise.
6533         * target/target.h (target_terminal_init): New prototype, moved
6534         from "target.h".
6535         (target_terminal_inferior): Likewise.
6536         (target_terminal_ours): Likewise.
6537         * utils.c (gdb_flush_out_err): New function.
6538
6539 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6540
6541         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6542         * common/common-gdbthread.h: New file, with parts from
6543         "gdb/gdbthread.h".
6544         * gdbthread.h: Include "common-gdbthread.h".
6545         (switch_to_thread): Moved to "common/common-gdbthread.h".
6546
6547 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6548
6549         * Makefile.in (SFILES): Add "common/job-control.c".
6550         (HFILES_NO_SRCDIR): Add "common/job-control.h".
6551         (COMMON_OBS): Add "job-control.o".
6552         * common/job-control.c: New file, with contents from
6553         "gdb/inflow.c".
6554         * common/job-control.h: New file, with contents from "terminal.h".
6555         * fork-child.c: Include "job-control.h".
6556         * inflow.c: Include "job-control.h".
6557         (gdb_setpgid): Move to "common/common-inflow.c".
6558         (_initialize_inflow): Move setting of "job_control" to
6559         "handle_job_control".
6560         * terminal.h (job_control): Moved to "common/common-terminal.h".
6561         (gdb_setpgid): Likewise.
6562         * top.c: Include "job_control.h".
6563         * utils.c: Likewise.
6564         (job_control): Moved to "job-control.c".
6565
6566 2017-06-07  Pedro Alves  <palves@redhat.com>
6567
6568         * Makefile.in (SFILES): Add gdb_regex.c.
6569         (COMMON_OBS): Add gdb_regex.o.
6570         * ada-lang.c (ada_add_standard_exceptions)
6571         (ada_add_exceptions_from_frame, name_matches_regex)
6572         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6573         parameter type to compiled_regex.  Adjust.
6574         (ada_exceptions_list): Use compiled_regex.
6575         * break-catch-throw.c (exception_catchpoint::pattern): Now a
6576         std::unique_ptr<compiled_regex>.
6577         (exception_catchpoint::~exception_catchpoint): Remove regfree
6578         call.
6579         (check_status_exception_catchpoint): Adjust to use compiled_regex.
6580         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6581         * breakpoint.c (solib_catchpoint::compiled): Now a
6582         std::unique_ptr<compiled_regex>.
6583         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6584         (check_status_catch_solib): Adjust to use compiled_regex.
6585         (add_solib_catchpoint): Adjust to use compiled_regex.
6586         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6587         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6588         compiled_regex reference.  Adjust to use it.
6589         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6590         declaration.  Include "gdb_regex.h".
6591         (apropos_cmd): Change regex parameter to compiled_regex reference.
6592         * gdb_regex.c: New file.
6593         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6594         declarations.
6595         (class compiled_regex): New.
6596         * linux-tdep.c: Include "common/gdb_optional.h".
6597         (struct mapping_regexes): New, factored out from
6598         mapping_is_anonymous_p, and adjusted to use compiled_regex.
6599         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6600         gdb::optional and remove cleanups.  Adjust to compiled_regex.
6601         * probe.c: Include "common/gdb_optional.h".
6602         (collect_probes): Use compiled_regex and gdb::optional and remove
6603         cleanups.
6604         * skip.c: Include "common/gdb_optional.h".
6605         (skiplist_entry::compiled_function_regexp): Now a
6606         gdb::optional<compiled_regex>.
6607         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6608         (free_skiplist_entry): Remove regfree call.
6609         (compile_skip_regexp, skip_rfunction_p): Adjust to use
6610         compiled_regex and gdb::optional.
6611         * symtab.c: Include "common/gdb_optional.h".
6612         (search_symbols): Use compiled_regex and gdb::optional.
6613         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6614         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
6615         to gdb_regex.c.
6616
6617 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6618
6619         * regcache.c (regcache::save): Avoid buffer use.
6620         (regcache::dump): Likewise.
6621
6622 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6623
6624         * sh-tdep.c (sh_pseudo_register_read): Remove
6625         MAX_REGISTER_SIZE.
6626         (sh_pseudo_register_write): Likewise.
6627         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6628         (sh64_pseudo_register_write): Likewise
6629
6630 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6631
6632         * aarch64-tdep.c (aarch64_store_return_value): Use
6633         V_REGISTER_SIZE.
6634         (aarch64_pseudo_read_value): Likewise.
6635         (aarch64_pseudo_write): Likewise.
6636
6637 2017-06-06  Yao Qi  <yao.qi@linaro.org>
6638
6639         * regformats/regdef.h (set_register_cache): Remove the
6640         declaration.
6641
6642 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
6643
6644         * frame.c (frame_unwind_register_signed): Use
6645         frame_unwind_register_value.
6646
6647 2017-06-06  Pedro Alves  <palves@redhat.com>
6648
6649         PR breakpoints/21553
6650         * breakpoint.c (create_breakpoints_sal_default)
6651         (init_breakpoint_sal, create_breakpoint_sal): Use
6652         gdb::unique_xmalloc_ptr for string parameters.
6653         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6654         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6655         (base_breakpoint_create_breakpoints_sal)
6656         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6657         (strace_marker_create_breakpoints_sal)
6658         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6659         string parameters.
6660         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6661         gdb::unique_xmalloc_ptr for string parameters.
6662         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6663         parameters.
6664
6665 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6666
6667         * alpha-tdep.c (alpha_register_to_value): Use
6668         get_frame_register_value.
6669         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6670
6671 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6672
6673         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6674         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6675         (ia64_value_to_register): Likewise.
6676         (ia64_extract_return_value): Likewise.
6677         (ia64_store_return_value): Likewise.
6678         (ia64_push_dummy_call): Likewise.
6679
6680 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
6681
6682         GDB 8.0 released.
6683
6684 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
6685
6686         * x86-linux-nat.c (struct arch_lwp_info): Remove.
6687
6688 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
6689
6690         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6691         parameter.
6692         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6693
6694 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6695
6696         * event-loop.c (poll_timers): Unallocate timer using delete
6697         instead of xfree.
6698
6699 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6700
6701         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6702         (struct breakpoint) <~breakpoint>: New.
6703         (struct watchpoint): Inherit from breakpoint.
6704         <~watchpoint>: New.
6705         <base>: Remove.
6706         (struct tracepoint): Inherit from breakpoint.
6707         <base>: Remove.
6708         * breakpoint.c (longjmp_breakpoint_ops): Remove.
6709         (struct longjmp_breakpoint): Inherit from breakpoint.
6710         <~longjmp_breakpoint>: New.
6711         <base>: Remove.
6712         (new_breakpoint_from_type): Remove casts.
6713         (watchpoint_in_thread_scope): Remove reference to base field.
6714         (watchpoint_del_at_next_stop): Likewise.
6715         (update_watchpoint): Likewise.
6716         (watchpoint_check): Likewise.
6717         (bpstat_check_watchpoint): Likewise.
6718         (set_longjmp_breakpoint): Likewise.
6719         (struct fork_catchpoint): Inherit from breakpoint.
6720         <base>: Remove.
6721         (struct solib_catchpoint): Inherit from breakpoint.
6722         <~solib_catchpoint>: New.
6723         <base>: Remove.
6724         (dtor_catch_solib): Change to ...
6725         (solib_catchpoint::~solib_catchpoint): ... this.
6726         (breakpoint_hit_catch_solib): Remove reference to base field.
6727         (add_solib_catchpoint): Likewise.
6728         (create_fork_vfork_event_catchpoint): Likewise.
6729         (struct exec_catchpoint): Inherit from breakpoint.
6730         <~exec_catchpoint>: New.
6731         <base>: Remove.
6732         (dtor_catch_exec): Change to ...
6733         (exec_catchpoint::~exec_catchpoint): ... this.
6734         (dtor_watchpoint): Change to ...
6735         (watchpoint::~watchpoint): ... this.
6736         (watch_command_1): Remove reference to base field.
6737         (catch_exec_command_1): Likewise.
6738         (base_breakpoint_dtor): Change to ...
6739         (breakpoint::~breakpoint): ... this.
6740         (base_breakpoint_ops): Remove dtor field value.
6741         (longjmp_bkpt_dtor): Change to ...
6742         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6743         (strace_marker_create_breakpoints_sal): Remove reference to base
6744         field.
6745         (delete_breakpoint): Don't manually call breakpoint destructor.
6746         (create_tracepoint_from_upload): Remove reference to base field.
6747         (trace_pass_set_count): Likewise.
6748         (initialize_breakpoint_ops): Don't initialize
6749         momentary_breakpoint_ops, don't set dtors.
6750         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6751         <~ada_catchpoint>: New.
6752         <base>: Remove.
6753         (create_excep_cond_exprs): Remove reference to base field.
6754         (dtor_exception): Change to ...
6755         (ada_catchpoint::~ada_catchpoint): ... this.
6756         (dtor_catch_exception): Remove.
6757         (dtor_catch_exception_unhandled): Remove.
6758         (dtor_catch_assert): Remove.
6759         (create_ada_exception_catchpoint): Remove reference to base
6760         field.
6761         (initialize_ada_catchpoint_ops): Don't set dtors.
6762         * break-catch-sig.c (struct signal_catchpoint): Inherit from
6763         breakpoint.
6764         <~signal_catchpoint>: New.
6765         <base>: Remove.
6766         (signal_catchpoint_dtor): Change to ...
6767         (signal_catchpoint::~signal_catchpoint): ... this.
6768         (create_signal_catchpoint): Remove reference to base field.
6769         (initialize_signal_catchpoint_ops): Don't set dtor.
6770         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6771         from breakpoint.
6772         <~syscall_catchpoint>: New.
6773         <base>: Remove.
6774         (dtor_catch_syscall): Change to ...
6775         (syscall_catchpoint::~syscall_catchpoint): ... this.
6776         (create_syscall_event_catchpoint): Remove reference to base
6777         field.
6778         (initialize_syscall_catchpoint_ops): Don't set dtor.
6779         * break-catch-throw.c (struct exception_catchpoint): Inherit
6780         from breakpoint.
6781         <~exception_catchpoint>: New.
6782         <base>: Remove.
6783         (dtor_exception_catchpoint): Change to ...
6784         (exception_catchpoint::~exception_catchpoint): ... this.
6785         (handle_gnu_v3_exceptions): Remove reference to base field.
6786         (initialize_throw_catchpoint_ops): Don't set dtor.
6787         * ctf.c (ctf_get_traceframe_address): Remove reference to base
6788         field.
6789         * remote.c (remote_get_tracepoint_status): Likewise.
6790         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6791         * tracefile.c (tracefile_fetch_registers): Likewise.
6792         * tracepoint.c (actions_command): Likewise.
6793         (validate_actionline): Likewise.
6794         (tfind_1): Likewise.
6795         (get_traceframe_location): Likewise.
6796         (find_matching_tracepoint_location): Likewise.
6797         (parse_tracepoint_status): Likewise.
6798         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6799
6800 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6801
6802         * breakpoint.c (struct longjmp_breakpoint): New struct.
6803         (is_tracepoint_type): Change return type to bool.
6804         (is_longjmp_type): New function.
6805         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6806         (set_raw_breakpoint_without_location): Use
6807         new_breakpoint_from_type.
6808         (set_raw_breakpoint): Likewise.
6809
6810 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6811
6812         * breakpoint.c (new_breakpoint_from_type): New function.
6813         (create_breakpoint_sal): Use new_breakpoint_from_type and
6814         unique_ptr.
6815         (create_breakpoint): Likewise.
6816
6817 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
6818
6819         * memattr.c (mem_info_command): Rename to ...
6820         (info_mem_command): ... this.
6821         (mem_enable_command): Rename to ...
6822         (enable_mem_command): ... this.
6823         (mem_disable_command): Rename to ...
6824         (disable_mem_command): ... this.
6825         (mem_delete_command): Rename to ...
6826         (delete_mem_command): ... this.
6827         (_initialize_mem): Adjust function names.
6828
6829 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6830
6831         * btrace.c (handle_pt_insn_events): New.
6832         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
6833         STATUS.  Split into this and ...
6834         (handle_pt_insn_event_flags): ... this.
6835
6836 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6837
6838         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6839         and struct pt_insn.resynced.
6840         * configure: Regenerated.
6841         * config.in: Regenerated.
6842
6843 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6844
6845         * btrace.c (ftrace_find_call_by_number): New function.
6846         (ftrace_new_function): Store objects, not pointers.
6847         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6848         ftrace_new_gap, ftrace_update_function,
6849         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6850         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6851         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6852         btrace_ends_with_single_insn, btrace_call_get): Account for
6853         btrace_thread_info::functions now storing objects.
6854         * btrace.h (struct btrace_thread_info): Add constructor.
6855         (struct btrace_thread_info) <functions>: Make std::vector.
6856         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6857         Initialize with default values.
6858         * record-btrace.c (record_btrace_frame_sniffer): Account for
6859         btrace_thread_info::functions now storing objects.
6860
6861 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6862
6863         * btrace.c: Remove typedef bfun_s.
6864         (ftrace_new_gap): Directly add gaps to the list of gaps.
6865         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6866         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6867         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6868         instead of gdb VEC.
6869
6870 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6871
6872         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6873         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6874         with btrace_thread_info::next_segment and
6875         btrace_thread_info::prev_segment.
6876         * btrace.h: Remove struct btrace_func_link.
6877         (struct btrace_function): Replace pair of function segment pointers
6878         with pair of indices.
6879         * python/py-record-btrace.c (btpy_call_prev_sibling,
6880         btpy_call_next_sibling): Replace references to
6881         btrace_thread_info::segment with btrace_thread_info::next_segment and
6882         btrace_thread_info::prev_segment.
6883         * record-btrace.c (record_btrace_frame_this_id): Use
6884         btrace_find_call_by_number.
6885
6886 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6887
6888         * btrace.c (ftrace_new_function, ftrace_fixup_level,
6889         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6890         btrace_insn_next, btrace_insn_prev): Remove references to
6891         btrace_thread_info::flow.
6892         * btrace.h (struct btrace_function): Remove FLOW.
6893
6894 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6895
6896         * btrace.c (ftrace_find_call_by_number): New function.
6897         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6898         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6899         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6900         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6901         index.
6902         * btrace.h (struct btrace_function): Turn UP into an index.
6903         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6904         as an index.
6905         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6906         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6907         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6908
6909 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6910
6911         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6912         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6913         ftrace_update_function, ftrace_compute_global_level_offset,
6914         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6915         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6916         btrace_insn_end, btrace_is_empty): Remove references to
6917         btrace_thread_info::begin and btrace_thread_info::end.
6918         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6919         (struct btrace_thread_info) <functions>: Adjust comment.
6920         * record-btrace.c (record_btrace_start_replaying): Remove reference to
6921         btrace_thread_info::begin.
6922
6923 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6924
6925         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6926         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6927         ftrace_update_function): Remove arguments that implicitly were always
6928         BTINFO->END.
6929         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6930         Don't pass BTINFO->END.
6931
6932 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6933
6934         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6935         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6936         btrace_find_insn_by_number): Replace function segment pointer with
6937         index.
6938         (btrace_insn_cmp): Simplify.
6939         * btrace.h: (struct btrace_insn_iterator) Rename index to
6940         insn_index.  Replace function segment pointer with index into function
6941         segment vector.
6942         * record-btrace.c (record_btrace_call_history): Replace function
6943         segment pointer use with index.
6944         (record_btrace_frame_sniffer): Retrieve function call segment through
6945         vector.
6946         (record_btrace_set_replay): Remove defunc't safety check.
6947
6948 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6949
6950         * btrace.c (btrace_ends_with_single_insn): New function.
6951         (btrace_call_get, btrace_call_number, btrace_call_begin,
6952         btrace_call_end, btrace_call_next, btrace_call_prev,
6953         btrace_find_call_by_number): Use index into call segment vector
6954         instead of pointer.
6955         (btrace_call_cmp): Simplify.
6956         * btrace.h (struct btrace_call_iterator): Replace function call segment
6957         pointer with index into vector.
6958         * record-btrace.c (record_btrace_call_history): Use index instead of
6959         pointer.
6960
6961 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6962
6963         * btrace.c (btrace_insn_begin, btrace_insn_end,
6964         btrace_find_insn_by_number): Add btinfo to iterator.
6965         * btrace.h (struct btrace_insn_iterator): Add btinfo.
6966
6967 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6968
6969         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6970         and save pointers directly.
6971         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6972         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6973         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
6974         changed signature of functions.
6975         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6976         (btrace_fetch): Remove code that adds btrace_function pointers to
6977         vector of btrace_functions.
6978         (btrace_clear): Simplify freeing vector of btrace_functions.
6979
6980 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6981
6982         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6983         Replace VEC_* with std::vector functions.
6984         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6985         (struct btrace_thread_info)<functions>: Change type to std::vector.
6986
6987 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6988
6989         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
6990         "Removed targets and native configurations" up.  Merge duplicate
6991         "New commands" sub-sections.  Add "New options" sub-sections.
6992
6993 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
6994
6995         * defs.h (copy_integer_to_size): New declaration.
6996         * findvar.c (copy_integer_to_size): New function.
6997         (do_cint_test): New selftest function.
6998         (copy_integer_to_size_test): Likewise.
6999         (_initialize_findvar): Likewise.
7000         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7001         (mips_fbsd_collect_reg): Use raw_collect_integer.
7002         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7003         (mips64_fill_gregset): Use raw_collect_integer
7004         (mips64_fill_fpregset): Use raw_supply_integer.
7005         * regcache.c (regcache::raw_supply_integer): New function.
7006         (regcache::raw_collect_integer): Likewise.
7007         * regcache.h: (regcache::raw_supply_integer): New declaration.
7008         (regcache::raw_collect_integer): Likewise.
7009
7010 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7011
7012         * Makefile.in (SFILES): Add gdbarch-selftests.c.
7013         (COMMON_OBS): Add gdbarch-selftests.o.
7014         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7015         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7016         * gdbarch-selftests.c: New file.
7017         * regcache.h (regcache) <~regcache>: Mark it virtual if
7018         GDB_SELF_TEST.
7019         <raw_write>: Likewise.
7020
7021 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7022
7023         * regcache.c (current_regcache): Change it to
7024         regcache::current_regcache.
7025         (regcache_observer_target_changed): Update.
7026         (regcache_thread_ptid_changed): Make it a regcache static
7027         method.
7028         (regcache_thread_ptid_changed): Update.
7029         (class regcache_access): New.
7030         (current_regcache_test): Update.
7031         (_initialize_regcache): Update.
7032         * regcache.h: Include forward_list.
7033         (regcache): Declare regcache_thread_ptid_changed and declare
7034         registers_changed_ptid as friend.
7035
7036 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7037
7038         * i387-tdep.c (i387_register_to_value): Use register_size
7039         instead of TYPE_LENGTH.
7040         * m68k-tdep.c (m68k_register_to_value): Likewise.
7041
7042 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7043
7044         * i387-tdep.c (i387_convert_register_p): Return false if type
7045         code isn't TYPE_CODE_FLT.
7046
7047 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7048
7049         * alpha-tdep.c (alpha_convert_register_p): Return true if type
7050         length is 4.
7051         (alpha_register_to_value): Remove type length check.
7052         (alpha_value_to_register): Likewise.
7053
7054 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7055
7056         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7057         TYPE_CODE_FLT.
7058
7059 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7060
7061         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7062         TYPE_CODE_FLT or not.
7063
7064 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7065
7066         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7067         * avr-tdep.c (avr_gdbarch_init): Likewise.
7068         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7069         * cris-tdep.c (cris_gdbarch_init): Likewise.
7070         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7071         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7072         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7073         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7074         * mep-tdep.c (mep_gdbarch_init): Likewise.
7075         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7076         * mips-tdep.c (mips_gdbarch_init): Likewise.
7077         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7078         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7079         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7080         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7081         * v850-tdep.c (v850_gdbarch_init): Likewise.
7082
7083 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7084
7085         * selftest-arch.c (tests_with_arch): Call registers_changed
7086         and reinit_frame_cache.
7087         * selftest.c (run_self_tests): Likewise.
7088
7089 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7090
7091         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7092         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7093
7094 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7095
7096         * rl78-tdep.c (rl78_gdbarch_init): Don't call
7097         set_gdbarch_print_insn.
7098
7099 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7100
7101         * h8300-tdep.c (h8300_gdbarch_init): Don't call
7102         set_gdbarch_print_insn.
7103
7104 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7105
7106         * alpha-tdep.c (alpha_gdbarch_init): Don't call
7107         set_gdbarch_print_insn.
7108         * arc-tdep.c (arc_gdbarch_init): Likewise.
7109         * arch-utils.c: include dis-asm.h.
7110         (default_print_insn): New function.
7111         * arch-utils.h (default_print_insn): Declare.
7112         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7113         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7114         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7115         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7116         * frv-tdep.c (frv_gdbarch_init): Likewise.
7117         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7118         * gdbarch.sh (print_insn): Use default_print_insn.
7119         * gdbarch.c: Regenerated.
7120         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7121         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7122         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7123         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7124         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7125         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7126         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7127         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7128         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7129         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7130         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7131         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7132         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7133         * mt-tdep.c (mt_gdbarch_init): Likewise.
7134         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7135         * nios2-tdep.c (nios2_print_insn): Remove.
7136         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7137         * rx-tdep.c (rx_gdbarch_init): Likewise.
7138         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7139         * score-tdep.c (score_print_insn): Remove.
7140         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7141         * sh-tdep.c (sh_gdbarch_init): Likewise.
7142         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7143         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7144         * tic6x-tdep.c (tic6x_print_insn): Remove.
7145         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7146         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7147         * v850-tdep.c (v850_gdbarch_init): Likewise.
7148         * vax-tdep.c (vax_gdbarch_init): Likewise.
7149         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7150         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7151
7152 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7153
7154         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7155         (MIPS_FP0_REGNUM): Remove.
7156         (MIPS_FSR_REGNUM): Remove.
7157         (mips_fbsd_supply_fpregs): Use mips_regnum.
7158         (mips_fbsd_supply_gregs): Likewise.
7159         (mips_fbsd_collect_fpregs): Likewise.
7160         (mips_fbsd_collect_gregs): Likewise.
7161
7162 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7163
7164         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7165         (getpfpregs_supplies): New function.
7166         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7167         getfpregs_supplies.
7168         (mips_fbsd_store_inferior_registers): Likewise.
7169
7170 2017-05-22  Pedro Alves <palves@redhat.com>
7171
7172         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7173         maintainer.
7174
7175 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7176
7177         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7178         (store_register): Likewise.
7179         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7180         (get_decimal_float_return_value): Likewise.
7181         (do_ppc_sysv_return_value): Likewise.
7182         (ppc64_sysv_abi_push_integer): Likewise.
7183         (ppc64_sysv_abi_push_freg): Likewise.
7184         (ppc64_sysv_abi_return_value_base): Likewise.
7185         (ppc64_sysv_abi_return_value): Likewise.
7186         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7187         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7188         * rs6000-nat.c: Likewise.
7189         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7190         (rs6000_value_to_register): Likewise.
7191         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7192
7193 2017-05-21  Tom Tromey  <tom@tromey.com>
7194
7195         PR rust/21466:
7196         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7197         arrays as "[T]", not "[T; ]".
7198
7199 2017-05-19  Tom Tromey  <tom@tromey.com>
7200
7201         PR rust/21484:
7202         * rust-lang.c (exp_descriptor_rust): New function.
7203         (rust_language_defn): Use it.
7204         * p-lang.c (pascal_language_defn): Update.
7205         * opencl-lang.c (opencl_language_defn): Update.
7206         * objc-lang.c (objc_language_defn): Update.
7207         * m2-lang.c (m2_language_defn): Update.
7208         * language.h (struct language_defn)
7209         <la_watch_location_expression>: New member.
7210         * language.c (unknown_language_defn, auto_language_defn)
7211         (local_language_defn): Update.
7212         * go-lang.c (go_language_defn): Update.
7213         * f-lang.c (f_language_defn): Update.
7214         * d-lang.c (d_language_defn): Update.
7215         * c-lang.h (c_watch_location_expression): Declare.
7216         * c-lang.c (c_watch_location_expression): New function.
7217         (c_language_defn, cplus_language_defn, asm_language_defn)
7218         (minimal_language_defn): Use it.
7219         * breakpoint.c (watch_command_1): Call
7220         la_watch_location_expression.
7221         * ada-lang.c (ada_language_defn): Update.
7222
7223 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7224
7225         PR tui/21482
7226         * gdb_curses.h (NOMACROS): Define.
7227         (NCURSES_NOMACROS): Define.
7228
7229 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7230
7231         PR tui/21482
7232         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7233         arg to char *.
7234         * tui/tui-wingeneral.c (box_win): Likewise.
7235         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7236         (tui_show_source_line): Likewise.
7237         (tui_show_exec_info_content): Likewise.
7238
7239 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7240
7241         * sparc-tdep.c (sparc_structure_return_p)
7242         (sparc_arg_on_registers_p): New functions.
7243         (sparc32_store_arguments): Use them.
7244         * sparc64-tdep.c (sparc64_16_byte_align_p)
7245         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7246         Handle TYPE_CODE_ARRAY.
7247
7248 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7249
7250         * cli/cli-decode.c (add_alias_cmd): New function.
7251         * command.h (add_alias_cmd): Declare.
7252         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7253         instead call add_alias_cmd.
7254
7255 2017-05-17  Pedro Alves  <palves@redhat.com>
7256
7257         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7258         (nat_makefile_frag): ... this.  All references updated.
7259         * configure.ac: Likewise.
7260         * configure.nat: Likewise.  Enhance comments.
7261         * configure: Regenerate.
7262
7263 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7264
7265         * procfs.c (procfs_create_inferior): Change prototype to match
7266         definition.
7267
7268 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7269
7270         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7271         C++ compiler warning.
7272
7273 2017-05-12  Tom Tromey  <tom@tromey.com>
7274
7275         PR rust/21483:
7276         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7277         recurse, just call value_struct_elt directly.
7278
7279 2017-05-12  Tom Tromey  <tom@tromey.com>
7280
7281         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7282         OP_RUST_ARRAY>: Fix.
7283
7284 2017-05-12  Tom Tromey  <tom@tromey.com>
7285
7286         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7287
7288 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7289
7290         * regcache.c: Include <forward_list>.
7291         (struct regcache_list): Remove.
7292         (current_regcache): Update.
7293         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7294         (regcache_thread_ptid_changed): Likewise.
7295         (registers_changed_ptid): Likewise.
7296         (current_regcache_size): Likewise.
7297
7298 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7299
7300         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7301         (current_regcache_size): New function.
7302         (current_regcache_test): New function.
7303         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7304
7305 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7306
7307         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7308         (print_gp_register_row): Use get_frame_register_value.
7309
7310 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7311
7312         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7313         (mips_supply_fpregset): Likewise.
7314         (mips64_supply_gregset): Likewise.
7315
7316 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7317
7318         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7319         regcache->raw_supply_zeroed.
7320
7321 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7322
7323         * configure.nat: Rearrange 'case' statements to match
7324         host before cpu.
7325
7326 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7327
7328         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7329         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7330         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7331         "@nat_extra_makefile_frag@".
7332         (Makefile): Remove dependency on "@frags@".
7333         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7334         (data-directory/Makefile): Likewise.
7335         * config/aarch64/linux.mh: Deleted; moved contents to
7336         "gdb/configure.nat".
7337         * config/alpha/alpha-linux.mh: Likewise.
7338         * config/alpha/nbsd.mh: Likewise.
7339         * config/arm/linux.mh: Likewise.
7340         * config/arm/nbsdelf.mh: Likewise.
7341         * config/i386/cygwin.mh: Likewise.
7342         * config/i386/cygwin64.mh: Likewise.
7343         * config/i386/darwin.mh: Likewise.
7344         * config/i386/fbsd.mh: Likewise.
7345         * config/i386/fbsd64.mh: Likewise.
7346         * config/i386/go32.mh: Likewise.
7347         * config/i386/i386gnu.mh: Likewise.
7348         * config/i386/i386sol2.mh: Likewise.
7349         * config/i386/linux.mh: Likewise.
7350         * config/i386/linux64.mh: Likewise.
7351         * config/i386/mingw.mh: Likewise.
7352         * config/i386/mingw64.mh: Likewise.
7353         * config/i386/nbsd64.mh: Likewise.
7354         * config/i386/nbsdelf.mh: Likewise.
7355         * config/i386/nto.mh: Likewise.
7356         * config/i386/obsd.mh: Likewise.
7357         * config/i386/obsd64.mh: Likewise.
7358         * config/i386/sol2-64.mh: Likewise.
7359         * config/ia64/linux.mh: Likewise.
7360         * config/m32r/linux.mh: Likewise.
7361         * config/m68k/linux.mh: Likewise.
7362         * config/m68k/nbsdelf.mh: Likewise.
7363         * config/m68k/obsd.mh: Likewise.
7364         * config/m88k/obsd.mh: Likewise.
7365         * config/mips/fbsd.mh: Likewise.
7366         * config/mips/linux.mh: Likewise.
7367         * config/mips/nbsd.mh: Likewise.
7368         * config/mips/obsd64.mh: Likewise.
7369         * config/pa/linux.mh: Likewise.
7370         * config/pa/nbsd.mh: Likewise.
7371         * config/pa/obsd.mh: Likewise.
7372         * config/powerpc/aix.mh: Likewise.
7373         * config/powerpc/fbsd.mh: Likewise.
7374         * config/powerpc/linux.mh: Likewise.
7375         * config/powerpc/nbsd.mh: Likewise.
7376         * config/powerpc/obsd.mh: Likewise.
7377         * config/powerpc/ppc64-linux.mh: Likewise.
7378         * config/powerpc/spu-linux.mh: Likewise.
7379         * config/s390/linux.mh: Likewise.
7380         * config/sh/nbsd.mh: Likewise.
7381         * config/sparc/fbsd.mh: Likewise.
7382         * config/sparc/linux.mh: Likewise.
7383         * config/sparc/linux64.mh: Likewise.
7384         * config/sparc/nbsd64.mh: Likewise.
7385         * config/sparc/nbsdelf.mh: Likewise.
7386         * config/sparc/obsd64.mh: Likewise.
7387         * config/sparc/sol2.mh: Likewise.
7388         * config/tilegx/linux.mh: Likewise.
7389         * config/vax/nbsdelf.mh: Likewise.
7390         * config/vax/obsd.mh: Likewise.
7391         * config/xtensa/linux.mh: Likewise.
7392         * config/i386/i386gnu.mn: New file, with excerpts from
7393         "config/i386/i386gnu.mh".
7394         * configure: Regenerate.
7395         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7396         *.mh files under "gdb/config".
7397         * configure.nat: New file, with contents from the
7398         "gdb/config/*/*.mh" files.
7399
7400 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
7401
7402         * btrace.c (btrace_clear): Free insn vector.
7403
7404 2017-05-05  Pedro Alves  <palves@redhat.com>
7405
7406         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7407         * configure: Regenerate.
7408
7409 2017-05-04  Pedro Alves  <palves@redhat.com>
7410
7411         * Makefile.in (SFILES): Add progspace-and-thread.c.
7412         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7413         (COMMON_OBS): Add progspace-and-thread.o.
7414         * breakpoint.c: Include "progspace-and-thread.h".
7415         (update_inserted_breakpoint_locations)
7416         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7417         Use scoped_restore_current_pspace_and_thread.
7418         (create_std_terminate_master_breakpoint): Use
7419         scoped_restore_current_program_space.
7420         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7421         (print_breakpoint_location): Use
7422         scoped_restore_current_program_space.
7423         (bp_loc_is_permanent): Use
7424         scoped_restore_current_pspace_and_thread.
7425         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7426         (download_tracepoint_locations): Use
7427         scoped_restore_current_pspace_and_thread.
7428         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7429         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7430         (enum step_over_calls_kind): Moved from inferior.h.
7431         (class scoped_restore_current_thread): New class.
7432         * gdbthread.h (make_cleanup_restore_current_thread): Delete
7433         declaration.
7434         (scoped_restore_current_thread): New class.
7435         * infcmd.c: Include "common/gdb_optional.h".
7436         (continue_1, proceed_after_attach): Use
7437         scoped_restore_current_thread.
7438         (notice_new_inferior): Use scoped_restore_current_thread.
7439         * inferior.c: Include "progspace-and-thread.h".
7440         (restore_inferior, save_current_inferior): Delete.
7441         (add_inferior_command, clone_inferior_command): Use
7442         scoped_restore_current_pspace_and_thread.
7443         * inferior.h (scoped_restore_current_inferior): New class.
7444         * infrun.c: Include "progspace-and-thread.h" and
7445         "common/gdb_optional.h".
7446         (follow_fork_inferior): Use
7447         scoped_restore_current_pspace_and_thread.
7448         (scoped_restore_exited_inferior): New class.
7449         (handle_vfork_child_exec_or_exit): Use
7450         scoped_restore_exited_inferior,
7451         scoped_restore_current_pspace_and_thread,
7452         scoped_restore_current_thread and scoped_restore.
7453         (fetch_inferior_event): Use scoped_restore_current_thread.
7454         * linespec.c (decode_line_full, decode_line_1): Use
7455         scoped_restore_current_program_space.
7456         * mi/mi-main.c: Include "progspace-and-thread.h".
7457         (exec_continue): Use scoped_restore_current_thread.
7458         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7459         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7460         * proc-service.c (ps_pglobal_lookup): Use
7461         scoped_restore_current_program_space.
7462         * progspace-and-thread.c: New file.
7463         * progspace-and-thread.h: New file.
7464         * progspace.c (release_program_space, clone_program_space): Use
7465         scoped_restore_current_program_space.
7466         (restore_program_space, save_current_program_space)
7467         (save_current_space_and_thread): Delete.
7468         (switch_to_program_space_and_thread): Moved to
7469         progspace-and-thread.c.
7470         * progspace.h (save_current_program_space)
7471         (save_current_space_and_thread): Delete declarations.
7472         (scoped_restore_current_program_space): New class.
7473         * remote.c (remote_btrace_maybe_reopen): Use
7474         scoped_restore_current_thread.
7475         * symtab.c: Include "progspace-and-thread.h".
7476         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7477         * thread.c (print_thread_info_1): Use
7478         scoped_restore_current_thread.
7479         (struct current_thread_cleanup): Delete.
7480         (do_restore_current_thread_cleanup)
7481         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7482         (scoped_restore_current_thread::~scoped_restore_current_thread):
7483         ... this new dtor.
7484         (make_cleanup_restore_current_thread): Rename/convert to ...
7485         (scoped_restore_current_thread::scoped_restore_current_thread):
7486         ... this new ctor.
7487         (thread_apply_all_command): Use scoped_restore_current_thread.
7488         (thread_apply_command): Use scoped_restore_current_thread.
7489         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7490         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7491
7492 2017-05-04  Pedro Alves  <palves@redhat.com>
7493
7494         * thread.c (make_cleanup_restore_current_thread): Move
7495         find_thread_ptid call before the is_stopped call.  Assert that the
7496         thread is found.  Replace is_stopped call by checking the thread's
7497         state directly.  Remove unnecessary NULL-thread check.
7498
7499 2017-05-04  Pedro Alves  <palves@redhat.com>
7500
7501         * corelow.c (thread_section_name): New class.
7502         (get_core_register_section, get_core_siginfo): Use it.
7503
7504 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7505
7506         * corelow.c (sniff_core_bfd): Remove extra semicolon.
7507         (get_core_register_section): Remove xfree of NULL pointer.
7508
7509 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
7510
7511         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7512         * regcache.c (regcache::raw_supply_zeroed): New function.
7513         * regcache.h (regcache::raw_supply_zeroed): New declaration.
7514
7515 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7516
7517         * gdbarch.sh: Remove commented out definition of
7518         TARGET_CHAR_BIT.
7519         * gdbarch.h: Re-generate.
7520
7521 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
7522
7523         * configure: Regenerate.
7524
7525 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
7526
7527         * solib-target.c (solib_target_relocate_section_addresses):
7528         Remove num_section_bases, num_bases, segment_bases variables.
7529
7530 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7531
7532         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7533
7534 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7535
7536         * solib-target.c: Include <vector>
7537         (struct lm_info_target) <~lm_info_target>: Remove.
7538         <segment_bases, section_bases>: Change type to
7539         std::vector<CORE_ADDR>.
7540         (library_list_start_segment, library_list_start_section,
7541         library_list_end_library,
7542         solib_target_relocate_section_addresses): Adjust.
7543
7544 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7545
7546         * gdbarch.sh (software_single_step): Change return type to
7547         std::vector<CORE_ADDR>.
7548         * gdbarch.c, gdbarch.h: Re-generate.
7549         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7550         Adjust.
7551         (arm_deal_with_atomic_sequence_raw): Adjust.
7552         (thumb_get_next_pcs_raw): Adjust.
7553         (arm_get_next_pcs_raw): Adjust.
7554         (arm_get_next_pcs): Adjust.
7555         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7556         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7557         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7558         (alpha_software_single_step): Adjust.
7559         * alpha-tdep.h (alpha_software_single_step): Adjust.
7560         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7561         * arm-tdep.c (arm_software_single_step): Adjust.
7562         (arm_breakpoint_kind_from_current_state): Adjust.
7563         * arm-tdep.h (arm_software_single_step): Adjust.
7564         * breakpoint.c (insert_single_step_breakpoint): Adjust.
7565         * cris-tdep.c (cris_software_single_step): Adjust.
7566         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7567         (micromips_deal_with_atomic_sequence): Adjust.
7568         (deal_with_atomic_sequence): Adjust.
7569         (mips_software_single_step): Adjust.
7570         * mips-tdep.h (mips_software_single_step): Adjust.
7571         * moxie-tdep.c (moxie_software_single_step): Adjust.
7572         * nios2-tdep.c (nios2_software_single_step): Adjust.
7573         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7574         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7575         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7576         * s390-linux-tdep.c (s390_software_single_step): Adjust.
7577         * sparc-tdep.c (sparc_software_single_step): Adjust.
7578         * spu-tdep.c (spu_software_single_step): Adjust.
7579         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7580
7581 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7582
7583         * gdbarch.sh: Use semi-colon as field separator instead of colon.
7584         * gdbarch.h: Re-generate.
7585
7586 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7587
7588         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7589         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7590         * python/py-instruction.c, python/py-instruction.h: New file.
7591         * python/py-record.c: Add py-instruction.h include.
7592         (gdbpy_initialize_record): Make gdb.Instruction a super class of
7593         gdb.RecordInstruction.
7594         * python/python-internal.h: Add gdbpy_initialize_instruction
7595         declaration.
7596         * python/python.c (do_start_initialization): Add
7597         gdbpy_initialize_instruction.
7598
7599 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7600
7601         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7602         Remove.
7603         (btrace_func_from_recpy_func): New function.
7604         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7605         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7606         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7607         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7608         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7609         Also, use new helper functions.
7610         (btpy_list_item): Use new helper functions.
7611         (recpy_bt_function_call_history): Use new type name.
7612         (btpy_call_getset): Remove.
7613         (gdbpy_initialize_btrace): Remove code to initialize
7614         gdb.BtraceFunctionCall.
7615         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7616         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7617         recpy_bt_func_prev, recpy_bt_func_next): New export.
7618         * python/py-record.c (recpy_func_type): New static object.
7619         (recpy_func_new, recpy_func_level, recpy_func_symbol,
7620         recpy_func_instructions, recpy_func_up, recpy_func_prev,
7621         recpy_func_next): New function.
7622         (recpy_element_hash, recpy_element_richcompare): Updated comment.
7623         (recpy_func_getset): New static object.
7624         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7625         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7626
7627 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7628
7629         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7630         (btpy_object, btpy_insn_type, btpy_new): Remove.
7631         (btpy_list_object): Use gdb.RecordInstruction type instead of
7632         gdb.BtraceInstruction type.
7633         (btrace_insn_from_recpy_insn): New function.
7634         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7635         btpy_new.
7636         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7637         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7638         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7639         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7640         instead of btpy_object.
7641         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7642         btpy_insn_data, btpy_insn_decode): Rename to ...
7643         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7644         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7645         recpy_bt_insn_decode): This.  Also, use new helper functions.
7646         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7647         recpy_insn_type.
7648         (btpy_insn_getset): Remove.
7649         (gdbpy_initialize_btrace): Remove code to initialize
7650         gdb.BtraceInstruction.  Use recpy_element_object.
7651         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7652         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7653         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7654         * python/py-record.c (recpy_insn_type): New static object.
7655         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7656         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7657         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7658         New function.
7659         (recpy_insn_getset): New static object.
7660         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7661         * python/py-record.h (recpy_element_object): New typedef.
7662         (recpy_insn_type, recpy_insn_new): New export.
7663
7664 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7665
7666         * py-record-btrace.c (btpy_insn_new): Removed.
7667         (btpy_insn_or_gap_new): New function.
7668         (btpy_insn_error): Removed.
7669         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7670         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7671         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7672         btpy_insn_or_gap_new instead of btpy_insn_new.
7673         (btpy_insn_getset): Remove btpy_insn_error.
7674         * py-record.c (recpy_gap_type): New static object.
7675         (recpy_gap_object): New typedef.
7676         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7677         recpy_gap_reason_string): New function.
7678         (recpy_gap_getset): New static object.
7679         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7680         * py-record.h (recpy_gap_new): New export.
7681
7682 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7683
7684         * python/py-record.c (recpy_ptid): Remove.
7685         (recpy_record_getset): Remove recpy_ptid.
7686
7687 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7688
7689         * btrace.c (btrace_fetch): Set inferior_ptid.
7690         * python/py-record-btrace.c: Add "py-record.h" include.
7691         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7692         recpy_bt_end, recpy_bt_instruction_history,
7693         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7694         in gdb.Record object instead of current ptid.
7695         * python/py-record.c: Include new "py-record.h" file.
7696         (recpy_record_object): Moved to py-record.h.
7697         * python/py-record.h: New file.
7698
7699 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7700
7701         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7702         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7703         indentation.
7704
7705 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
7706
7707         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7708         the past maintainers section.
7709
7710 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7711
7712         * infcmd.c (get_return_value): Use regcache ctor, and remove
7713         cleanup.
7714
7715 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7716             Pedro Alves  <palves@redhat.com>
7717
7718         * regcache.c (regcache::regcache): New tag dispatch ctor.
7719         (do_cooked_read): Moved above.
7720         (regcache_dup): Use the tag dispatch ctor..
7721         * regcache.h (regcache): Declare ctor, delete copy ctor and
7722         assignment operator, remove friend regcache_dup.
7723
7724 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7725
7726         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7727         call method save instead of regcache_cpy.
7728         * regcache.h (struct regcache): Make regcache_dup a friend.
7729
7730 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7731
7732         * regcache.c (struct regcache): Move to regcache.h
7733         (regcache::arch): New method.
7734         (regcache_get_ptid): Update.
7735         (get_regcache_arch): Call arch method.
7736         (get_regcache_aspace): Call method aspace.
7737         (register_buffer): Change it to method.
7738         (regcache_save): Change it to regcache::save.
7739         (regcache_restore): Likewise.
7740         (regcache_cpy_no_passthrough): Remove the declaration.
7741         (regcache_cpy): Call methods restore and cpy_no_passthrough.
7742         (regcache_cpy_no_passthrough): Change it to method
7743         cpy_no_passthrough.
7744         (regcache_register_status): Change it to method
7745         get_register_status.
7746         (regcache_invalidate): Change it to method invalidate.
7747         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7748         (regcache_raw_update): Change it to method raw_update.
7749         (regcache_raw_read): Likewise.
7750         (regcache_raw_read_signed): Likewise.
7751         (regcache_raw_read_unsigned): Likewise.
7752         (regcache_raw_write_signed): Likewise.
7753         (regcache_raw_write_unsigned): Likewise.
7754         (regcache_cooked_read): Likewise.
7755         (regcache_cooked_read_value): Likewise.
7756         (regcache_cooked_read_signed): Likewise.
7757         (regcache_cooked_read_unsigned): Likewise.
7758         (regcache_cooked_write_signed): Likewise.
7759         (regcache_cooked_write_unsigned): Likewise.
7760         (regcache_raw_set_cached_value): Likewise.
7761         (regcache_raw_write): Likewise.
7762         (regcache_cooked_write): Likewise.
7763         (regcache_xfer_part): Likewise.
7764         (regcache_raw_read_part): Likewise.
7765         (regcache_raw_write_part): Likewise.
7766         (regcache_cooked_read_part): Likewise.
7767         (regcache_cooked_write_part): Likewise.
7768         (regcache_raw_supply): Likewise.
7769         (regcache_raw_collect): Likewise.
7770         (regcache_transfer_regset): Likewise.
7771         (regcache_supply_regset): Likewise.
7772         (regcache_collect_regset): Likewise.
7773         (regcache_debug_print_register): Likewise.
7774         (enum regcache_dump_what): Move it to regcache.h.
7775         (regcache_dump): Change it to method dump.
7776         * regcache.h (enum regcache_dump_what): New.
7777         (class regcache): New.
7778         * target.c (target_fetch_registers): Call method
7779         debug_print_register.
7780         (target_store_registers): Likewise.
7781
7782 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7783
7784         * windows-nat.c (struct lm_info_windows): Initialize field.
7785         (windows_make_so): Allocate lm_info_windows with new.
7786         (windows_free_so): Free lm_info_windows with delete.
7787
7788 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7789
7790         * solib-darwin.c (struct lm_info_darwin): Initialize field.
7791         (darwin_current_sos): Allocate lm_info_darwin with new, remove
7792         cleanup.
7793         (darwin_free_so): Free lm_info_darwin with delete.
7794
7795 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7796
7797         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7798         <l_addr_p>: Change type to bool.
7799         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7800         (svr4_free_so): Free lm_info_svr4 with delete.
7801         (svr4_copy_library_list): Replace memcpy with call to copy
7802         constructor.
7803         (library_list_start_library, svr4_default_sos): Allocate
7804         lm_info_svr4 with new.
7805
7806 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7807
7808         * solib-target.c (struct lm_info_target): Add destructor,
7809         initialize fields.
7810         <name>: Change type to std::string.
7811         (library_list_start_library): Allocate lm_info_target with new.
7812         (solib_target_free_library_list): Free lm_info_target with
7813         delete.
7814         (solib_target_current_sos): Adapt to std::string.
7815         (solib_target_free_so): Free lm_info_target with delete.
7816
7817 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7818
7819         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7820         fields.
7821         (frv_current_sos): Allocate lm_info_frv with new.
7822         (frv_relocate_main_executable): Free lm_info_frv with delete,
7823         allocate with new.
7824         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7825
7826 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7827
7828         * solib-frv.c (struct lm_info_frv): Fix indentation.
7829
7830 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7831
7832         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7833         map field.
7834         (dsbt_current_sos): Allocate lm_info_dsbt with new.
7835         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7836         and allocate with new.
7837         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7838
7839 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7840
7841         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7842         <filename, member_name>: Change type to std::string.
7843         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7844         (library_list_start_library): Allocate lm_info_aix with new.
7845         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7846         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7847         with copy constructor.
7848
7849 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7850
7851         * solist.h (struct lm_info): Remove.
7852         (struct lm_info_base): New class.
7853         (struct so_list) <lm_info>: Change type to lm_info_base *.
7854         * nto-tdep.c (struct lm_info): Remove.
7855         (lm_addr): Adjust.
7856         * solib-aix.c (struct lm_info): Rename to ...
7857         (struct lm_info_aix): ... this.  Extend lm_info_base.
7858         (lm_info_p): Rename to ...
7859         (lm_info_aix_p): ... this, and adjust.
7860         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7861         solib_aix_parse_libraries, library_list_start_library,
7862         solib_aix_free_library_list, solib_aix_parse_libraries,
7863         solib_aix_get_library_list,
7864         solib_aix_relocate_section_addresses, solib_aix_free_so,
7865         solib_aix_get_section_offsets,
7866         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7867         Adjust.
7868         (struct solib_aix_inferior_data) <library_list>: Adjust.
7869         * solib-darwin.c (struct lm_info): Rename to ...
7870         (struct lm_info_darwin): ... this.  Extend lm_info_base.
7871         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7872         * solib-dsbt.c (struct lm_info): Rename to ...
7873         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
7874         (struct dsbt_info) <main_executable_lm_info): Adjust.
7875         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7876         dsbt_relocate_section_addresses): Adjust.
7877         * solib-frv.c (struct lm_info): Rename to ...
7878         (struct lm_info_frv): ... this.  Extend lm_info_base.
7879         (main_executable_lm_info): Adjust.
7880         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7881         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7882         find_canonical_descriptor_in_load_object,
7883         frv_fdpic_find_canonical_descriptor): Adjust.
7884         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7885         to lm_info_svr4.
7886         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7887         svr4_clear_so, svr4_copy_library_list,
7888         library_list_start_library, svr4_default_sos, svr4_read_so_list,
7889         svr4_current_sos, svr4_fetch_objfile_link_map,
7890         solist_update_incremental): Adjust.
7891         * solib-svr4.h (struct lm_info_svr4): Move here from
7892         solib-svr4.c.
7893         * solib-target.c (struct lm_info): Rename to ...
7894         (struct lm_info_target): ... this.  Extend lm_info_base.
7895         (lm_info_p): Rename to ...
7896         (lm_info_target_p): ... this.
7897         (solib_target_parse_libraries, library_list_start_segment,
7898         library_list_start_section, library_list_start_library,
7899         library_list_end_library, solib_target_free_library_list,
7900         solib_target_current_sos, solib_target_free_so,
7901         solib_target_relocate_section_addresses): Adjust.
7902         * windows-nat.c (struct lm_info): Rename to ...
7903         (struct lm_info_windows): ... this.  Extend lm_info_base.
7904         (windows_make_so, handle_load_dll, handle_unload_dll,
7905         windows_xfer_shared_libraries): Adjust.
7906
7907 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7908
7909         * solib-darwin.c (struct darwin_so_list): Remove.
7910         (darwin_current_sos): Allocate an so_list object instead of a
7911         darwin_so_list, separately allocate an lm_info object.
7912         (darwin_free_so): Free lm_info.
7913
7914 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
7915
7916         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7917         with fprintf_filtered.
7918
7919 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7920
7921         * regcache.c (regcache::regcache): New function.
7922         (regcache::~regcache): New function.
7923         (regcache_xmalloc_1): Remove.
7924         (regcache_xmalloc): Call new regcache.
7925         (regcache_xfree): Call delete regcache.
7926         (get_thread_arch_aspace_regcache): Call new regcache.
7927
7928 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7929
7930         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7931         lwp instead of ptid_get_lwp.
7932
7933 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7934
7935         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7936         lwp_info instead of getting from inferior_ptid.
7937
7938 2017-04-27  Keith Seitz  <keiths@redhat.com>
7939
7940         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7941         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7942         (CV_CONVERSION_BADNESS): Define.
7943         (rank_one_type): Remove overly restrictive rvalue reference
7944         rank checks.
7945         Add cv-qualifier checks and subranks for type equality.
7946         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7947         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7948         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7949
7950 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
7951
7952         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7953         count when creating the object.
7954
7955 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
7956             Ulrich Weigand  <uweigand@de.ibm.com>
7957
7958         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7959         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7960         is used in AIX.
7961         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7962         (process_xcoff_symbol): Likewise.
7963         (scan_xcoff_symtab): Likewise.
7964
7965 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7966
7967         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7968         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7969         (ia64_access_reg): Use get_frame_register_unsigned.
7970         (ia64_access_rse_reg): Likewise.
7971         (ia64_libunwind_frame_prev_register): Likewise.
7972
7973 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
7974
7975         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7976         * gdbarch.c: Regenerated.
7977         * gdbarch.h: Regenerated.
7978         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7979         visibility external.
7980         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7981         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7982         (enum cfa_how_kind): Move to ...
7983         (struct dwarf2_frame_state_reg_info): Likewise.
7984         (struct dwarf2_frame_state): Likewise.
7985         * dwarf2-frame.h: ... here.
7986         (dwarf2_frame_state_alloc_regs): New declaration.
7987         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7988         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7989
7990 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7991
7992         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7993         regcache_raw_read_unsigned.
7994         (xtensa_pseudo_register_write): Likewise.
7995
7996 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7997
7998         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7999         (nds32_pseudo_register_write): Likewise.
8000
8001 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8002
8003         * regcache.c (struct regcache) <readonly_p>: Change its type
8004         to bool.
8005         (regcache_xmalloc_1): Update parameter type and callers update.
8006
8007 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8008
8009         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8010         set_gdbarch_wchar_bit.
8011         * arm-tdep.c (arm_gdbarch_init): Likewise.
8012
8013 2017-04-25  Pedro Alves  <palves@redhat.com>
8014
8015         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8016         (BothAreRelocatable, memcopy, memmove): Don't define.
8017         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8018         macros.
8019
8020 2017-04-25  Pedro Alves  <palves@redhat.com>
8021
8022         * common/common-defs.h: Include "common/poison.h".
8023         * common/function-view.h: (Not, Or, Requires): Move to traits.h
8024         and adjust.
8025         * common/poison.h: New file.
8026         * common/traits.h: Include <type_traits>.
8027         (Not, Or, Requires): New, moved from common/function-view.h.
8028
8029 2017-04-25  Pedro Alves  <palves@redhat.com>
8030
8031         * breakpoint.h (struct breakpoint): In-class initialize all
8032         fields.  Make boolean fields "bool".
8033         * breakpoint.c (init_raw_breakpoint_without_location): Remove
8034         memset call and initializations no longer necessary.
8035
8036 2017-04-25  Pedro Alves  <palves@redhat.com>
8037
8038         * btrace.c (pt_btrace_insn_flags): Change parameter type to
8039         reference.
8040         (pt_btrace_insn): New function.
8041         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8042
8043 2017-04-25  Pedro Alves  <palves@redhat.com>
8044
8045         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
8046         "base" field and inherit from "bp_location" instead.  Add
8047         non-default ctor.
8048         (allocate_location_exception): Use new non-default ctor.
8049         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8050         (init_bp_location): Convert to ...
8051         (bp_location::bp_location): ... this new ctor, and remove memset
8052         call.
8053         (base_breakpoint_allocate_location): Use the new non-default ctor.
8054         * breakpoint.h (bp_location): Now a class.  Declare default and
8055         non-default ctors.  In-class initialize all members.
8056         (init_bp_location): Remove declaration.
8057
8058 2017-04-25  Pedro Alves  <palves@redhat.com>
8059
8060         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8061         assignment operator.
8062
8063 2017-04-24  Yao Qi  <yao.qi@linaro.org>
8064
8065         * doublest.c (convert_doublest_to_floatformat): Call
8066         floatformat_totalsize_bytes.
8067
8068 2017-04-22  Tom Tromey  <tom@tromey.com>
8069
8070         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8071         ui_out_emit_list.
8072         * stack.c (print_frame): Use ui_out_emit_list.
8073         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8074         ui_out_emit_list.
8075         * mi/mi-main.c (print_one_inferior)
8076         (mi_cmd_data_list_register_names)
8077         (mi_cmd_data_list_register_values, mi_cmd_list_features)
8078         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8079         ui_out_emit_list.
8080         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8081         (mi_output_solib_attribs): Use ui_out_emit_list,
8082         ui_out_emit_tuple.
8083         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8084         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8085         (mi_cmd_stack_list_args, list_args_or_locals): Use
8086         ui_out_emit_list.
8087         * disasm.c (do_assembly_only): Use ui_out_emit_list.
8088         * breakpoint.c (print_solib_event, output_thread_groups): Use
8089         ui_out_emit_list.
8090
8091 2017-04-22  Tom Tromey  <tom@tromey.com>
8092
8093         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8094         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8095         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8096
8097 2017-04-22  Tom Tromey  <tom@tromey.com>
8098
8099         * tracepoint.c (tvariables_info_1)
8100         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8101
8102 2017-04-22  Tom Tromey  <tom@tromey.com>
8103
8104         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8105         annotate_arg_emitter.
8106         * breakpoint.c (print_mention_watchpoint)
8107         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8108         * annotate.h (struct annotate_arg_emitter): New.
8109
8110 2017-04-22  Tom Tromey  <tom@tromey.com>
8111
8112         * record-btrace.c (record_btrace_insn_history)
8113         (record_btrace_insn_history_range, record_btrace_call_history)
8114         (record_btrace_call_history_range): Use ui_out_emit_tuple.
8115         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8116         ui_out_emit_tuple.
8117         * stack.c (print_frame_info): Use ui_out_emit_tuple.
8118         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8119         * skip.c (skip_info): Use ui_out_emit_tuple.
8120         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8121         * progspace.c (print_program_space): Use ui_out_emit_tuple.
8122         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8123         * osdata.c (info_osdata): Use ui_out_emit_tuple.
8124         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8125         ui_out_emit_tuple.
8126         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8127         (output_register, mi_cmd_data_read_memory)
8128         (mi_cmd_data_read_memory_bytes, mi_load_progress)
8129         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8130         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8131         Use ui_out_emit_tuple.
8132         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8133         ui_out_emit_tuple.
8134         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8135         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8136         * linux-thread-db.c (info_auto_load_libthread_db): Use
8137         ui_out_emit_tuple.
8138         * inferior.c (print_inferior): Use ui_out_emit_tuple.
8139         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8140         * disasm.c (do_mixed_source_and_assembly_deprecated)
8141         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8142         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8143         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8144         * breakpoint.c (print_one_breakpoint_location)
8145         (print_one_breakpoint): Use ui_out_emit_tuple.
8146         * auto-load.c (print_script, info_auto_load_cmd): Use
8147         ui_out_emit_tuple.
8148         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8149
8150 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8151
8152         * thread.c (print_thread_info_1): Remove dead code.
8153
8154 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8155
8156         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8157         GDB_SELF_TEST.
8158         * arm-tdep.c (selftests::arm_record_test): Likewise.
8159
8160 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8161
8162         * regcache.c (regcache_restore): Remove argument 2.  Replace
8163         argument 3 with regcache.  Get register status from
8164         src->register_status and get register contents from
8165         register_buffer (src, regnum).
8166         (regcache_cpy): Update.
8167
8168 2017-04-19  Pedro Alves  <palves@redhat.com>
8169
8170         * gdbthread.h (thread): Add missing closing parenthesis in
8171         comment.
8172
8173 2017-04-19  Pedro Alves  <palves@redhat.com>
8174
8175         * common/refcounted-object.h: New file.
8176         * gdbthread.h: Include "common/refcounted-object.h".
8177         (thread_info): Inherit from refcounted_object and add comments.
8178         (thread_info::incref, thread_info::decref)
8179         (thread_info::m_refcount): Delete.
8180         (thread_info::deletable): Use the refcounted_object::refcount()
8181         method.
8182         * inferior.c (current_inferior_): Add comment.
8183         (set_current_inferior): Increment/decrement refcounts.
8184         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8185         not-deletable instead of comparing with the current inferior.
8186         (initialize_inferiors): Increment the initial inferior's refcount.
8187         * inferior.h (struct inferior): Forward declare.
8188         Include "common/refcounted-object.h".
8189         (current_inferior, set_current_inferior): Move declaration to
8190         before struct inferior's definition, and fix comment.
8191         (inferior): Inherit from refcounted_object.  Add comments.
8192         * thread.c (switch_to_thread_no_regs): Reference the thread's
8193         inferior pointer directly instead of doing a ptid lookup.
8194         (switch_to_no_thread): New function.
8195         (switch_to_thread(thread_info *)): New function, factored out
8196         from ...
8197         (switch_to_thread(ptid_t)): ... this.
8198         (restore_current_thread): Delete.
8199         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8200         fields, and add 'inf' field.
8201         (do_restore_current_thread_cleanup): Check whether old->inf is
8202         alive instead of looking up an inferior by ptid.  Use
8203         switch_to_thread and switch_to_no_thread.
8204         (restore_current_thread_cleanup_dtor): Use old->inf directly
8205         instead of lookup up an inferior by id.  Decref the inferior.
8206         Don't restore 'removable'.
8207         (make_cleanup_restore_current_thread): Same the inferior pointer
8208         in old, instead of the inferior number.  Incref the inferior.
8209         Don't save/clear 'removable'.
8210
8211 2017-04-19  Pedro Alves  <palves@redhat.com>
8212
8213         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8214         unittests/scoped_restore-selftests.c.
8215         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8216         * common/scoped_restore.h (scoped_restore_base): Make "class".
8217         (scoped_restore_base::release): New public method.
8218         (scoped_restore_base::scoped_restore_base): New protected ctor.
8219         (scoped_restore_base::m_saved_var): New protected field.
8220         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8221         scoped_restore_base base class instead of m_saved_var directly.
8222         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8223         (scoped_restore_tmpl::scoped_restore_tmpl(const
8224         scoped_restore_tmpl<T>&)): Likewise.
8225         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8226         method.
8227         (scoped_restore_tmpl::saved_var): New method.
8228         (scoped_restore_tmpl::m_saved_var): Delete.
8229         * inferior.h (inferior::detaching): Now a bool.
8230         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8231         cleanup.
8232         * unittests/scoped_restore-selftests.c: New file.
8233
8234 2017-04-19  Pedro Alves  <palves@redhat.com>
8235
8236         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8237         Re-sort in alphabetic order.
8238
8239 2017-04-18  Pedro Alves  <palves@redhat.com>
8240
8241         * xml-support.c (obstack_xml_printf): Delete.
8242         * xml-support.h (obstack_xml_printf): Delete.
8243
8244 2017-04-18  Pedro Alves  <palves@redhat.com>
8245
8246         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8247         vdebug, verror, body_text, start_element, end_element, name,
8248         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8249         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8250         is_xinclude>: Make private and add m_ prefix.
8251         (gdb_xml_parser::body_text): New method, based on ...
8252         (gdb_xml_body_text): ... this.  Adjust.
8253         (gdb_xml_parser::vdebug): New method, based on ...
8254         (gdb_xml_debug): ... this.  Adjust.
8255         (gdb_xml_parser::verror): New method, based on ...
8256         (gdb_xml_error): ... this.  Adjust.
8257         (gdb_xml_parser::start_element): New method, based on ...
8258         (gdb_xml_start_element): ... this.  Adjust.
8259         (gdb_xml_start_element_wrapper): Defer to
8260         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8261         (gdb_xml_parser::end_element): New method, based on ...
8262         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8263         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8264         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8265         (gdb_xml_parser::use_dtd): New method, based on ...
8266         (gdb_xml_use_dtd): ... this.  Adjust.
8267         (gdb_xml_parser::parse): New method, based on ...
8268         (gdb_xml_parse): ... this.  Adjust.
8269         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8270         (xinclude_start_include): Adjust to call the parser's name method.
8271         (xml_xinclude_default, xml_xinclude_start_doctype)
8272         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8273         method.
8274         (xml_process_xincludes): Adjust to call parser methods.
8275         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8276         declarations.
8277
8278 2017-04-18  Pedro Alves  <palves@redhat.com>
8279
8280         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8281         gdb::optional<std::string>.
8282         * xml-support.c: Include <string>.
8283         (scope_level::scope_level(scope_level &&))
8284         (scope_level::~scope_level): Delete.
8285         (scope_level::body): Now a std::string.
8286         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8287         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8288         parameter.
8289         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8290         (xinclude_parsing_data::output): Now a std::string reference.
8291         (xinclude_start_include): Adjust.
8292         (xml_xinclude_default): Adjust.
8293         (xml_process_xincludes): Add 'output' parameter, and return bool.
8294         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8295         and return bool.
8296         * xml-tdesc.c: Include <unordered_map> and <string>.
8297         (tdesc_xml_cache): Delete.
8298         (tdesc_xml_cache_s): Delete.
8299         (xml_cache): Now an std::unordered_map.
8300         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8301         (target_fetch_description_xml): Change return type to
8302         gdb::optional<std::string>, and adjust.
8303         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8304         (target_fetch_description_xml): Change return type to
8305         gdb::optional<std::string>.
8306
8307 2017-04-18  Pedro Alves  <palves@redhat.com>
8308
8309         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8310         unittests/optional-selftests.c.
8311         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8312         * unittests/optional-selftests.c: New file.
8313         * unittests/optional/assignment/1.cc: New file.
8314         * unittests/optional/assignment/2.cc: New file.
8315         * unittests/optional/assignment/3.cc: New file.
8316         * unittests/optional/assignment/4.cc: New file.
8317         * unittests/optional/assignment/5.cc: New file.
8318         * unittests/optional/assignment/6.cc: New file.
8319         * unittests/optional/assignment/7.cc: New file.
8320         * unittests/optional/cons/copy.cc: New file.
8321         * unittests/optional/cons/default.cc: New file.
8322         * unittests/optional/cons/move.cc: New file.
8323         * unittests/optional/cons/value.cc: New file.
8324         * unittests/optional/in_place.cc: New file.
8325         * unittests/optional/observers/1.cc: New file.
8326         * unittests/optional/observers/2.cc: New file.
8327
8328 2017-04-18  Pedro Alves  <palves@redhat.com>
8329
8330         * common/gdb_optional.h: Include common/traits.h.
8331         (in_place_t): New type.
8332         (in_place): New constexpr variable.
8333         (optional::optional): Remove member initialization of
8334         m_instantiated.
8335         (optional::optional(in_place_t...)): New constructor.
8336         (optional::~optional): Use reset.
8337         (optional::optional(const optional&)): New.
8338         (optional::optional(const optional&&)): New.
8339         (optional::optional(T &)): New.
8340         (optional::optional(T &&)): New.
8341         (operator::operator=(const optional &)): New.
8342         (operator::operator=(optional &&)): New.
8343         (operator::operator= (const T &))
8344         (operator::operator= (T &&))
8345         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8346         (operator::reset): New.
8347         (operator::m_instantiated):: Add in-class initializer.
8348         * common/traits.h: Include <type_traits>.
8349         (struct And): New types.
8350
8351 2017-04-18  Pedro Alves  <palves@redhat.com>
8352
8353         * xml-support.c: Include <vector>.
8354         (scope_level::scope_level(const gdb_xml_element *))
8355         (scope_level::scope_level(scope_level&&)): New.
8356         (scope_level::~scope_level): New.
8357         (scope_level_s): Delete.
8358         (gdb_xml_parser::scopes): Now a std::vector.
8359         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8360         Use std::vector.
8361         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8362         scope cleanup code.
8363         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8364         of the scopes member.  Use std::vector::emplace_back.
8365
8366 2017-04-18  Pedro Alves  <palves@redhat.com>
8367
8368         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
8369         a bool.
8370         (gdb_xml_end_element): Change type of first parameter.
8371         (gdb_xml_cleanup): Rename to ...
8372         (gdb_xml_parser::~gdb_xml_parser): ... this.
8373         (gdb_xml_create_parser_and_cleanup): Delete with ...
8374         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8375         to this new ctor.
8376         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8377         using gdb_xml_create_parser_and_cleanup.
8378         (xinclude_parsing_data): Add ctor/dtor.
8379         (xml_xinclude_cleanup): Delete.
8380         (xml_process_xincludes): Create a local xinclude_parsing_data
8381         instead of heap-allocating one.  Create a local gdb_xml_parser
8382         instead of heap-allocating one with
8383         gdb_xml_create_parser_and_cleanup.
8384
8385 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
8386
8387         PR threads/20743
8388         * fbsd-nat.c (resume_one_thread_cb): Remove.
8389         (resume_all_threads_cb): Remove.
8390         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8391         iterate_over_threads.
8392
8393 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8394
8395         * NEWS: Create a new section for the next release branch.
8396         Rename the section of the current branch, now that it has
8397         been cut.
8398
8399 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8400
8401         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8402         * version.in: Bump version to 8.0.50.DATE-git.
8403
8404 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
8405
8406         PR gdb/21385
8407         * windows-nat.c (windows_create_inferior): Declare 'allargs'
8408         independently of the host, and fix build breakage on Cygwin.
8409
8410 2017-04-13  Pedro Alves  <palves@redhat.com>
8411
8412         * inferior.c (free_inferior): Convert to ...
8413         (inferior::~inferior): ... this dtor.
8414         (inferior::inferior): New ctor, factored out from ...
8415         (add_inferior_silent): ... here.  Allocate the inferior with a new
8416         expression.
8417         (delete_inferior): Call delete instead of free_inferior.
8418         * inferior.h (gdb_environ, continuation): Forward declare.
8419         (inferior): Now a class.  Add in-class initialization to all
8420         members.  Make boolean fields bool, except 'detaching'.
8421         (inferior::inferior): New explicit ctor.
8422         (inferior::~inferior): New.
8423
8424 2017-04-13  Pedro Alves  <palves@redhat.com>
8425
8426         * inferior.c (init_inferior_list): Delete.
8427         * inferior.h (init_inferior_list): Delete.
8428
8429 2017-04-13  Pedro Alves  <palves@redhat.com>
8430
8431         PR threads/13217
8432         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8433         (top level): Call it twice, with different thread sets.
8434
8435 2017-04-13  Pedro Alves  <palves@redhat.com>
8436
8437         * thread.c: Include <algorithm>.
8438         (thread_array_cleanup): Delete.
8439         (scoped_inc_dec_ref): New class.
8440         (live_threads_count): New function.
8441         (set_thread_refcount): Delete.
8442         (tp_array_compar_ascending): Now a bool.
8443         (tp_array_compar): Convert to a std::sort comparison function.
8444         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8445         and live_threads_count.
8446
8447 2017-04-13  Pedro Alves  <palves@redhat.com>
8448
8449         * infrun.c (follow_fork_inferior): Also switch the current
8450         inferior.
8451
8452 2017-04-13  Pedro Alves  <palves@redhat.com>
8453
8454         * breakpoint.c (watch_command_1): Save watchpoint-frame info
8455         before calling create_internal_breakpoint.
8456
8457 2017-04-13  Pedro Alves  <palves@redhat.com>
8458
8459         * fork-child.c (execv_argv): New class.
8460         (breakup_args): Refactored as ...
8461         (execv_argv::init_for_no_shell): .. this method of execv_argv.
8462         Copy arguments to storage and replace separators with NULL
8463         terminators in place.
8464         (escape_bang_in_quoted_argument): Adjust to return bool.
8465         (execv_argv::execv_argv): New ctor.
8466         (execv_argv::init_for_shell): New method, factored out from
8467         fork_inferior.  Don't strdup strings into the vector.
8468         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
8469         Remove free_vector_argv call.
8470
8471 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8472
8473         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8474         tdep->rx_psw_type.
8475
8476 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8477
8478         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8479         * rx-tdep.c (rx_gdbarch_init): Likewise.
8480
8481 2017-04-13  Pedro Alves  <palves@redhat.com>
8482
8483         * breakpoint.h (struct breakpoint): Reindent.
8484
8485 2017-04-13  Pedro Alves  <palves@redhat.com>
8486
8487         * breakpoint.c (bp_location): Rename to ...
8488         (bp_locations): ... this.  All references updated.
8489         (bp_location_count): Rename to ...
8490         (bp_locations_count): ... this.  All references updated.
8491         (bp_location_placed_address_before_address_max): Rename to ...
8492         (bp_locations_placed_address_before_address_max): ... this.  All
8493         references updated.
8494         (bp_location_shadow_len_after_address_max): Rename to ...
8495         (bp_locations_shadow_len_after_address_max): ... this.  All
8496         references updated.
8497         (bp_location_compare_addrs): Rename to ...
8498         (bp_locations_compare_addrs): ... this.  All references updated.
8499         (bp_location_compare):Rename to ...
8500         (bp_locations_compare): ... this.  All references updated.
8501         (bp_location_target_extensions_update): Rename to ...
8502         (bp_locations_target_extensions_update): ... this.  All references
8503         updated.
8504
8505 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8506
8507         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8508         * common/common.m4: Check headers 'termios.h', 'termio.h' and
8509         'sgtty.h'.
8510         * common/gdb_termios.h: New file, with parts of "terminal.h".
8511         * inflow.c: Include "gdb_termios.h".
8512         * ser-unix.c: Include "gdb_termios.h".
8513         * terminal.h: Move terminal-related defines to
8514         "common/gdb_termios.h".
8515
8516 2017-04-12  Tom Tromey  <tom@tromey.com>
8517
8518         * probe.c (parse_probes): Update.
8519         * location.h (delete_event_location): Don't declare.
8520         (event_location_deleter::operator()): Update.
8521         * location.c (event_location_deleter::operator()): Rename from
8522         delete_event_location.
8523         * linespec.h (linespec_result) <location>: Change type to
8524         event_location_up.
8525         * linespec.c (canonicalize_linespec, event_location_to_sals)
8526         (decode_objc): Update.
8527         (linespec_result): Don't call delete_event_location.
8528         * breakpoint.c (create_breakpoints_sal)
8529         (bkpt_probe_create_sals_from_location)
8530         (strace_marker_create_sals_from_location): Update.
8531
8532 2017-04-12  Tom Tromey  <tom@tromey.com>
8533
8534         * linespec.h (struct linespec_result): Add constructor and
8535         destructor.
8536         (init_linespec_result, destroy_linespec_result)
8537         (make_cleanup_destroy_linespec_result): Don't declare.
8538         * linespec.c (init_linespec_result): Remove.
8539         (linespec_result::~linespec_result): Rename from
8540         destroy_linespec_result.  Update.
8541         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8542         Remove.
8543         * breakpoint.c (create_breakpoint, break_range_command)
8544         (decode_location_default): Update.
8545         * ax-gdb.c (agent_command_1): Update.
8546
8547 2017-04-12  Tom Tromey  <tom@tromey.com>
8548
8549         * remote.c (remote_download_tracepoint): Update.
8550         * python/py-breakpoint.c (bppy_get_location): Update.
8551         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8552         (gdbscm_breakpoint_location): Update.
8553         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8554         * breakpoint.h (struct breakpoint) <location, location_range_end>:
8555         Change type to event_location_up.
8556         * breakpoint.c (create_overlay_event_breakpoint)
8557         (create_longjmp_master_breakpoint)
8558         (create_std_terminate_master_breakpoint)
8559         (create_exception_master_breakpoint)
8560         (breakpoint_event_location_empty_p, print_breakpoint_location)
8561         (print_one_breakpoint_location, create_thread_event_breakpoint)
8562         (init_breakpoint_sal, create_breakpoint)
8563         (print_recreate_ranged_breakpoint, break_range_command)
8564         (init_ada_exception_breakpoint, say_where): Update.
8565         (base_breakpoint_dtor): Don't call delete_event_location.
8566         (bkpt_print_recreate, tracepoint_print_recreate)
8567         (dprintf_print_recreate, update_static_tracepoint)
8568         (breakpoint_re_set_default): Update.
8569
8570 2017-04-12  Tom Tromey  <tom@tromey.com>
8571
8572         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8573         type of "to_do".  Update.
8574         (compute_stack_depth): Use std::vector.
8575
8576 2017-04-12  Tom Tromey  <tom@tromey.com>
8577
8578         * printcmd.c (find_instruction_backward): Use std::vector.
8579
8580 2017-04-12  Tom Tromey  <tom@tromey.com>
8581
8582         * symfile.c (objfilep): Remove typedef.
8583         (reread_symbols): Use a std::vector.
8584
8585 2017-04-12  Tom Tromey  <tom@tromey.com>
8586
8587         * mi/mi-main.c (exec_direction_forward): Remove.
8588         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8589         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8590         scoped_restore.
8591         * guile/guile.c (guile_repl_command, guile_command)
8592         (gdbscm_execute_gdb_command): Use scoped_restore.
8593         * go-exp.y (go_parse): Use scoped_restore.
8594         * d-exp.y (d_parse): Use scoped_restore.
8595         * cli/cli-decode.c (cmd_func): Use scoped_restore.
8596         * c-exp.y (c_parse): Use scoped_restore.
8597
8598 2017-04-12  Tom Tromey  <tom@tromey.com>
8599
8600         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8601         (mi_parse): Update return type.
8602         (mi_parse_free): Remove.
8603         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8604         (mi_parse::~mi_parse): Rename from mi_parse_free.
8605         (mi_parse_cleanup): Remove.
8606         (mi_parse): Return a unique_ptr.  Use new.
8607         * mi/mi-main.c (mi_execute_command): Update.
8608
8609 2017-04-12  Tom Tromey  <tom@tromey.com>
8610
8611         * location.c (explicit_location_lex_one): Return a
8612         unique_xmalloc_ptr.
8613         (string_to_explicit_location): Update.  Remove cleanups.
8614
8615 2017-04-12  Tom Tromey  <tom@tromey.com>
8616
8617         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8618         (compare_value_and_voffset): Change type.  Update.
8619         (compute_vtable_size): Change type of "offset_vec".
8620         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
8621         (gnuv3_get_typeid): Remove extraneous declaration.
8622
8623 2017-04-12  Tom Tromey  <tom@tromey.com>
8624
8625         * charset.h (wchar_iterator): Fix comment.
8626
8627 2017-04-12  Tom Tromey  <tom@tromey.com>
8628
8629         * charset.c (iconv_wrapper): New class.
8630         (cleanup_iconv): Remove.
8631         (convert_between_encodings): Use it.
8632
8633 2017-04-12  Tom Tromey  <tom@tromey.com>
8634
8635         * symfile.h (increment_reading_symtab): Update type.
8636         * symfile.c (decrement_reading_symtab): Remove.
8637         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8638         * psymtab.c (psymtab_to_symtab): Update.
8639         * dwarf2read.c (dw2_instantiate_symtab): Update.
8640
8641 2017-04-12  Tom Tromey  <tom@tromey.com>
8642
8643         * jit.c (struct jit_reader): Declare separately.  Add constructor
8644         and destructor.  Change type of "handle".
8645         (loaded_jit_reader): Define separately.
8646         (jit_reader_load): Update.  New "new".
8647         (jit_reader_unload_command): Use "delete".
8648         * gdb-dlfcn.h (struct dlclose_deleter): New.
8649         (gdb_dlhandle_up): New typedef.
8650         (gdb_dlopen, gdb_dlsym): Update types.
8651         (gdb_dlclose): Remove.
8652         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8653         (gdb_dlsym): Change type of "handle".
8654         (make_cleanup_dlclose): Remove.
8655         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8656         * compile/compile-c-support.c (load_libcc): Update.
8657
8658 2017-04-12  Tom Tromey  <tom@tromey.com>
8659
8660         * symtab.h (find_pcs_for_symtab_line): Change return type.
8661         * symtab.c (find_pcs_for_symtab_line): Change return type.
8662         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8663         type of "vec".  Update.
8664         (ltpy_get_pcs_for_line): Update.
8665         * linespec.c (decode_digits_ordinary): Update.
8666
8667 2017-04-12  Tom Tromey  <tom@tromey.com>
8668
8669         * tracepoint.c (actions_command): Update.
8670         * python/python.c (python_command, python_interactive_command):
8671         Update.
8672         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8673         * guile/guile.c (guile_command): Update.
8674         * defs.h (read_command_lines, read_command_lines_1): Return
8675         command_line_up.
8676         (command_lines_deleter): New struct.
8677         (command_line_up): New typedef.
8678         * compile/compile.c (compile_code_command)
8679         (compile_print_command): Update.
8680         * cli/cli-script.h (get_command_line, copy_command_lines): Return
8681         command_line_up.
8682         (make_cleanup_free_command_lines): Remove.
8683         * cli/cli-script.c (get_command_line, read_command_lines_1)
8684         (copy_command_lines): Return command_line_up.
8685         (while_command, if_command, read_command_lines, define_command)
8686         (document_command): Update.
8687         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8688         Remove.
8689         * breakpoint.h (breakpoint_set_commands): Change type of
8690         "commands".
8691         * breakpoint.c (breakpoint_set_commands): Change type of
8692         "commands".  Update.
8693         (do_map_commands_command, update_dprintf_command_list)
8694         (create_tracepoint_from_upload): Update.
8695
8696 2017-04-12  Tom Tromey  <tom@tromey.com>
8697
8698         * tracepoint.c (scope_info): Update.
8699         * spu-tdep.c (spu_catch_start): Update.
8700         * python/python.c (gdbpy_decode_line): Update.
8701         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8702         * python/py-breakpoint.c (bppy_init): Update.
8703         * probe.c (parse_probes): Update.
8704         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8705         * location.h (event_location_deleter): New struct.
8706         (event_location_up): New typedef.
8707         (new_linespec_location, new_address_location, new_probe_location)
8708         (new_explicit_location, copy_event_location)
8709         (string_to_event_location, string_to_event_location_basic)
8710         (string_to_explicit_location): Update return type.
8711         (make_cleanup_delete_event_location): Remove.
8712         * location.c (new_linespec_location, new_address_location)
8713         (new_probe_location, new_explicit_location, copy_event_location):
8714         Return event_location_up.
8715         (delete_event_location_cleanup)
8716         (make_cleanup_delete_event_location): Remove.
8717         (string_to_explicit_location, string_to_event_location_basic)
8718         (string_to_event_location): Return event_location_up.
8719         * linespec.c (canonicalize_linespec, event_location_to_sals)
8720         (decode_line_with_current_source)
8721         (decode_line_with_last_displayed, decode_objc): Update.
8722         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8723         * completer.c (location_completer): Update.
8724         * cli/cli-cmds.c (edit_command, list_command): Update.
8725         * breakpoint.c (create_overlay_event_breakpoint)
8726         (create_longjmp_master_breakpoint)
8727         (create_std_terminate_master_breakpoint)
8728         (create_exception_master_breakpoint)
8729         (create_thread_event_breakpoint): Update.
8730         (init_breakpoint_sal): Update.  Remove some dead code.
8731         (create_breakpoint_sal): Change type of "location".  Update.
8732         (create_breakpoints_sal, create_breakpoint, break_command_1)
8733         (dprintf_command, break_range_command, until_break_command)
8734         (init_ada_exception_breakpoint)
8735         (strace_marker_create_sals_from_location)
8736         (update_static_tracepoint, trace_command, ftrace_command)
8737         (strace_command, create_tracepoint_from_upload): Update.
8738         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8739         * ax-gdb.c (agent_command_1): Update.
8740
8741 2017-04-12  Pedro Alves  <palves@redhat.com>
8742
8743         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8744         * configure.tgt: Handle i[34567]86-*-go32* and
8745         i[34567]86-*-msdosdjgpp*.
8746         * i386-tdep.c (i386_svr4_reg_to_regnum):
8747         Make extern.
8748         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8749         i386-go32-tdep.c.
8750         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8751         * i386-go32-tdep.c: New file.
8752         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8753         declarations.
8754
8755 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
8756
8757         * aix-thread.c (pd_status2str): Change return type to const char *.
8758
8759 2017-04-12  Pedro Alves  <palves@redhat.com>
8760
8761         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8762         calls to set_gdbarch_gnu_triplet_regexp.
8763
8764 2017-04-12  Pedro Alves  <palves@redhat.com>
8765
8766         PR gdb/21323
8767         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8768         New enum value.
8769         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8770         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8771         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8772         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8773         * gdbarch.h, gdbarch.c: Regenerate.
8774         * aarch64-tdep.c (aarch64_gdbarch_init): Override
8775         gdbarch_wchar_bit and gdbarch_wchar_signed.
8776         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8777         * arm-tdep.c (arm_gdbarch_init): Likewise.
8778         * avr-tdep.c (avr_gdbarch_init): Likewise.
8779         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8780         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8781         * i386-tdep.c (i386_go32_init_abi): Likewise.
8782         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8783         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8784         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8785         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8786         * sh-tdep.c (sh_gdbarch_init): Likewise.
8787         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8788         * sparc64-tdep.c (sparc64_init_abi): Likewise.
8789         * windows-tdep.c (windows_init_abi): Likewise.
8790         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8791
8792 2017-04-12  Pedro Alves  <palves@redhat.com>
8793
8794         PR c++/21323
8795         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8796         cplus_primitive_type_char32_t>: New enum values.
8797         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8798         and cplus_primitive_type_char32_t.
8799         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8800         32, use the archtecture's built-in type for char16_t and char32_t,
8801         respectively.  Otherwise, fallback to init_integer_type as before,
8802         but make the type unsigned, and issue a complaint.
8803         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8804
8805 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
8806
8807         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8808         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8809
8810 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8811
8812         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8813         'const char *'.
8814
8815 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8816
8817         * common/common-utils.c (free_vector_argv): New function.
8818         * common/common-utils.h: Include <vector>.
8819         (free_vector_argv): New prototype.
8820         * darwin-nat.c (darwin_create_inferior): Rewrite function
8821         prototype in order to constify "exec_file" and accept a
8822         "std::string" for "allargs".
8823         * fork-child.c: Include <vector>.
8824         (breakup_args): Rewrite function, using C++.
8825         (fork_inferior): Rewrite function header, constify "exec_file_arg"
8826         and accept "std::string" for "allargs".  Update the code to
8827         calculate "argv" based on "allargs".  Update calls to "exec_fun"
8828         and "execvp".
8829         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8830         order to constify "exec_file" and accept a "std::string" for
8831         "allargs".
8832         * go32-nat.c (go32_create_inferior): Likewise.
8833         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8834         * infcmd.c (run_command_1): Constify "exec_file".  Use
8835         "std::string" for inferior arguments.
8836         * inferior.h (fork_inferior): Update prototype.
8837         * linux-nat.c (linux_nat_create_inferior): Rewrite function
8838         prototype in order to constify "exec_file" and accept a
8839         "std::string" for "allargs".
8840         * nto-procfs.c (procfs_create_inferior): Likewise.
8841         * procfs.c (procfs_create_inferior): Likewise.
8842         * remote-sim.c (gdbsim_create_inferior): Likewise.
8843         * remote.c (extended_remote_run): Update code to accept
8844         "std::string" as argument.
8845         (extended_remote_create_inferior): Rewrite function prototype in
8846         order to constify "exec_file" and accept a "std::string" for
8847         "allargs".
8848         * rs6000-nat.c (super_create_inferior): Likewise.
8849         (rs6000_create_inferior): Likewise.
8850         * target.h (struct target_ops) <to_create_inferior>: Likewise.
8851         * windows-nat.c (windows_create_inferior): Likewise.
8852
8853 2017-04-11  Pedro Alves  <palves@redhat.com>
8854
8855         * thread.c: Fix whitespace throughout.
8856
8857 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8858
8859         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8860
8861 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
8862
8863         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8864
8865 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
8866
8867         PR gdb/21364
8868         * osdata.c (info_osdata): Check if 'type' is an empty string
8869         instead of NULL.
8870
8871 2017-04-10  Pedro Alves  <palves@redhat.com>
8872
8873         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8874         (ptid_to_global_thread_id, in_thread_list)
8875         (do_captured_list_thread_ids, set_resumed, set_running)
8876         (set_executing, set_stop_requested, finish_thread_state)
8877         (validate_registers_access, can_access_registers_ptid)
8878         (print_thread_info_1, switch_to_thread)
8879         (do_restore_current_thread_cleanup)
8880         (make_cleanup_restore_current_thread, thread_command)
8881         (thread_name_command): Use operator== instead of ptid_equal.
8882
8883 2017-04-10  Pedro Alves  <palves@redhat.com>
8884
8885         * thread.c (struct current_thread_cleanup) <next>: Delete field.
8886         (current_thread_cleanup_chain): Delete.
8887         (restore_current_thread_cleanup_dtor)
8888         (make_cleanup_restore_current_thread): Remove references to
8889         current_thread_cleanup_chain.
8890
8891 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
8892
8893         * msp430-tdep.c (msp430_pseudo_register_read): Never return
8894         REG_UNKNOWN.
8895
8896 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8897
8898         PR gdb/19942
8899         * gdbthread.h (thread_info::deletable): New method.
8900         (thread_info::incref): New method.
8901         (thread_info::decref): New method.
8902         (thread_info::refcount): Move it to private.
8903         * infrun.c (save_stop_context): Call inc_refcount.
8904         (release_stop_context_cleanup): Likewise.
8905         * thread.c (set_thread_exited): New function.
8906         (init_thread_list): Delete "tp" only it is deletable, otherwise
8907         call set_thread_exited.
8908         (delete_thread_1): Call set_thread_exited.
8909         (current_thread_cleanup) <inferior_pid>: Remove.
8910         <thread>: New field.
8911         (restore_current_thread_ptid_changed): Removed.
8912         (do_restore_current_thread_cleanup): Adjust.
8913         (restore_current_thread_cleanup_dtor): Don't call
8914         find_thread_ptid.
8915         (set_thread_refcount): Use dec_refcount.
8916         (make_cleanup_restore_current_thread): Adjust.
8917         (thread_apply_all_command): Call inc_refcount.
8918         (_initialize_thread): Don't call
8919         observer_attach_thread_ptid_changed.
8920
8921 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8922
8923         * thread.c (delete_thread_1): Hoist code on marking thread as
8924         exited.
8925
8926 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8927
8928         * windows-nat.c (windows_detach): Initialize ptid with
8929         minus_one_ptid.
8930
8931 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8932
8933         * unittests/ptid-selftests.c: Fix erroneous assert messages.
8934
8935 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
8936
8937         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8938         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8939         (bfin_pseudo_register_write): Likewise
8940
8941 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
8942
8943         * common/ptid.h (struct ptid): Change to...
8944         (class ptid_t): ... this.
8945         <ptid_t>: New constructors.
8946         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8947         matches>: New methods.
8948         <make_null, make_minus_one>: New static methods.
8949         <pid>: Rename to...
8950         <m_pid>: ...this.
8951         <lwp>: Rename to...
8952         <m_lwp>: ...this.
8953         <tid>: Rename to...
8954         <m_tid>: ...this.
8955         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8956         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8957         as references, move comment to class ptid_t.
8958         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8959         ptid_t static methods.
8960         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8961         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8962         Take ptid arguments as references, implement using ptid_t methods.
8963         * unittests/ptid-selftests.c: New file.
8964         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8965         unittests/ptid-selftests.c.
8966         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8967
8968 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8969
8970         * python/python.c (python_run_simple_file): Cast mode literal to
8971         non-const char pointer as expected by PyFile_FromString.
8972
8973 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
8974
8975         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8976         minus_one_ptid and null_ptid.
8977
8978 2017-04-05  Pedro Alves  <palves@redhat.com>
8979
8980         * warning.m4 (build_warnings): Remove -Wno-write-strings.
8981         * configure: Regenerate.
8982
8983 2017-04-05  Pedro Alves  <palves@redhat.com>
8984
8985         * ada-exp.y (yyerror): Constify.
8986         * ada-lang.c (bound_name, get_selections)
8987         (ada_variant_discrim_type)
8988         (ada_variant_discrim_name, ada_value_struct_elt)
8989         (ada_lookup_struct_elt_type, is_unchecked_variant)
8990         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8991         (catch_ada_exception_command_split)
8992         (catch_ada_assert_command_split, catch_assert_command)
8993         (ada_op_name): Constify.
8994         * ada-lang.h (ada_yyerror, get_selections)
8995         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8996         * arc-tdep.c (arc_print_frame_cache): Constify.
8997         * arm-tdep.c (arm_skip_stub): Constify.
8998         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8999         (gen_aggregate_elt_ref): Constify.
9000         * bcache.c (print_bcache_statistics): Constify.
9001         * bcache.h (print_bcache_statistics): Constify.
9002         * break-catch-throw.c (catch_exception_command_1):
9003         * breakpoint.c (struct ep_type_description::description):
9004         Constify.
9005         (add_solib_catchpoint): Constify.
9006         (catch_fork_command_1): Add cast.
9007         (add_catch_command): Constify.
9008         * breakpoint.h (add_catch_command, add_solib_catchpoint):
9009         Constify.
9010         * bsd-uthread.c (bsd_uthread_state): Constify.
9011         * buildsym.c (patch_subfile_names): Constify.
9012         * buildsym.h (next_symbol_text_func, patch_subfile_names):
9013         Constify.
9014         * c-exp.y (yyerror): Constify.
9015         (token::oper): Constify.
9016         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9017         * c-varobj.c (cplus_describe_child): Constify.
9018         * charset.c (find_charset_names): Add cast.
9019         (find_charset_names): Constify array and add const_cast.
9020         * cli/cli-cmds.c (complete_command, cd_command): Constify.
9021         (edit_command): Constify.
9022         * cli/cli-decode.c (lookup_cmd): Constify.
9023         * cli/cli-dump.c (dump_memory_command, dump_value_command):
9024         Constify.
9025         (struct dump_context): Constify.
9026         (add_dump_command, restore_command): Constify.
9027         * cli/cli-script.c (get_command_line): Constify.
9028         * cli/cli-script.h (get_command_line): Constify.
9029         * cli/cli-utils.c (check_for_argument): Constify.
9030         * cli/cli-utils.h (check_for_argument): Constify.
9031         * coff-pe-read.c (struct read_pe_section_data): Constify.
9032         * command.h (lookup_cmd): Constify.
9033         * common/print-utils.c (decimal2str): Constify.
9034         * completer.c (gdb_print_filename): Constify.
9035         * corefile.c (set_gnutarget): Constify.
9036         * cp-name-parser.y (yyerror): Constify.
9037         * cp-valprint.c (cp_print_class_member): Constify.
9038         * cris-tdep.c (cris_register_name, crisv32_register_name):
9039         Constify.
9040         * d-exp.y (yyerror): Constify.
9041         (struct token::oper): Constify.
9042         * d-lang.h (d_yyerror): Constify.
9043         * dbxread.c (struct header_file_location::name): Constify.
9044         (add_old_header_file, add_new_header_file, last_function_name)
9045         (dbx_next_symbol_text, add_bincl_to_list)
9046         (find_corresponding_bincl_psymtab, set_namestring)
9047         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9048         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9049         * defs.h (command_line_input, print_address_symbolic)
9050         (deprecated_readline_begin_hook): Constify.
9051         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9052         Constify.
9053         * event-top.c (handle_line_of_input): Constify and add cast.
9054         * exceptions.c (catch_errors): Constify.
9055         * exceptions.h (catch_errors): Constify.
9056         * expprint.c (print_subexp_standard, op_string, op_name)
9057         (op_name_standard, dump_raw_expression, dump_raw_expression):
9058         * expression.h (op_name, op_string, dump_raw_expression):
9059         Constify.
9060         * f-exp.y (yyerror): Constify.
9061         (struct token::oper): Constify.
9062         (struct f77_boolean_val::name): Constify.
9063         * f-lang.c (f_word_break_characters): Constify.
9064         * f-lang.h (f_yyerror): Constify.
9065         * fork-child.c (fork_inferior): Add cast.
9066         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9067         (new_variant): Constify.
9068         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9069         * gdbarch.c: Regenerate.
9070         * gdbcore.h (set_gnutarget): Constify.
9071         * go-exp.y (yyerror): Constify.
9072         (token::oper): Constify.
9073         * go-lang.h (go_yyerror): Constify.
9074         * go32-nat.c (go32_sysinfo): Constify.
9075         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9076         * guile/scm-cmd.c (cmdscm_function): Constify.
9077         * guile/scm-param.c (pascm_param_value): Constify.
9078         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9079         (h8300sx_register_name): Constify.
9080         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9081         Constify.
9082         * ia64-tdep.c (ia64_register_names): Constify.
9083         * infcmd.c (construct_inferior_arguments): Constify.
9084         (path_command, attach_post_wait): Constify.
9085         * language.c (show_range_command, show_case_command)
9086         (unk_lang_error): Constify.
9087         * language.h (language_defn::la_error)
9088         (language_defn::la_name_of_this): Constify.
9089         * linespec.c (decode_line_2): Constify.
9090         * linux-thread-db.c (thread_db_err_str): Constify.
9091         * lm32-tdep.c (lm32_register_name): Constify.
9092         * m2-exp.y (yyerror): Constify.
9093         * m2-lang.h (m2_yyerror): Constify.
9094         * m32r-tdep.c (m32r_register_names): Constify and make static.
9095         * m68hc11-tdep.c (m68hc11_register_names): Constify.
9096         * m88k-tdep.c (m88k_register_name): Constify.
9097         * macroexp.c (appendmem): Constify.
9098         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9099         (upgrade_type, parse_external, parse_partial_symbols)
9100         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9101         (new_symbol): Constify.
9102         * memattr.c (mem_info_command): Constify.
9103         * mep-tdep.c (register_name_from_keyword): Constify.
9104         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9105         Constify.
9106         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9107         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9108         * mi/mi-main.c (captured_mi_execute_command): Constify and add
9109         cast.
9110         (mi_execute_async_cli_command): Constify.
9111         * mips-tdep.c (mips_register_name): Constify.
9112         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9113         (am33_register_name, am33_2_register_name)
9114         * moxie-tdep.c (moxie_register_names): Constify.
9115         * nat/linux-osdata.c (osdata_type): Constify fields.
9116         * nto-tdep.c (nto_parse_redirection): Constify.
9117         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9118         (lookup_child_selector): Constify.
9119         (objc_methcall::name): Constify.
9120         * objc-lang.h (lookup_objc_class, lookup_child_selector)
9121         (lookup_struct_typedef): Constify.
9122         * objfiles.c (pc_in_section): Constify.
9123         * objfiles.h (pc_in_section): Constify.
9124         * p-exp.y (struct token::oper): Constify.
9125         (yyerror): Constify.
9126         * p-lang.h (pascal_yyerror): Constify.
9127         * parser-defs.h (op_name_standard): Constify.
9128         (op_print::string): Constify.
9129         (exp_descriptor::op_name): Constify.
9130         * printcmd.c (print_address_symbolic): Constify.
9131         * psymtab.c (print_partial_symbols): Constify.
9132         * python/py-breakpoint.c (stop_func): Constify.
9133         (bppy_get_expression): Constify.
9134         * python/py-cmd.c (cmdpy_completer::name): Constify.
9135         (cmdpy_function): Constify.
9136         * python/py-event.c (evpy_add_attribute)
9137         (gdbpy_initialize_event_generic): Constify.
9138         * python/py-event.h (evpy_add_attribute)
9139         (gdbpy_initialize_event_generic): Constify.
9140         * python/py-evts.c (add_new_registry): Constify.
9141         * python/py-finishbreakpoint.c (outofscope_func): Constify.
9142         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9143         * python/py-inferior.c (get_buffer): Add cast.
9144         * python/py-param.c (parm_constant::name): Constify.
9145         * python/py-unwind.c (fprint_frame_id): Constify.
9146         * python/python.c (gdbpy_parameter_value): Constify.
9147         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9148         * remote.c (memory_packet_config::name): Constify.
9149         (show_packet_config_cmd, remote_write_bytes)
9150         (remote_buffer_add_string):
9151         * reverse.c (exec_reverse_once): Constify.
9152         * rs6000-tdep.c (variant::name, variant::description): Constify.
9153         * rust-exp.y (rustyyerror): Constify.
9154         * rust-lang.c (rust_op_name): Constify.
9155         * rust-lang.h (rustyyerror): Constify.
9156         * serial.h (serial_ops::name): Constify.
9157         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9158         (sh_sh3e_register_name, sh_sh2e_register_name)
9159         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9160         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9161         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9162         (sh_sh4al_dsp_register_name): Constify.
9163         * sh64-tdep.c (sh64_register_name): Constify.
9164         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9165         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9166         * stabsread.c (patch_block_stabs, read_type_number)
9167         (ref_map::stabs, ref_add, process_reference)
9168         (symbol_reference_defined, define_symbol, define_symbol)
9169         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9170         (read_one_struct_field, read_struct_fields, read_baseclasses)
9171         (read_tilde_fields, read_struct_type, read_array_type)
9172         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9173         (read_huge_number, read_range_type, read_args, common_block_start)
9174         (find_name_end): Constify.
9175         * stabsread.h (common_block_start, define_symbol)
9176         (process_one_symbol, symbol_reference_defined, ref_add):
9177         * symfile.c (get_section_index, add_symbol_file_command):
9178         * symfile.h (get_section_index): Constify.
9179         * target-descriptions.c (tdesc_type::name): Constify.
9180         (tdesc_free_type): Add cast.
9181         * target.c (find_default_run_target):
9182         (add_deprecated_target_alias, find_default_run_target)
9183         (target_announce_detach): Constify.
9184         (do_option): Constify.
9185         * target.h (add_deprecated_target_alias): Constify.
9186         * thread.c (print_thread_info_1): Constify.
9187         * top.c (deprecated_readline_begin_hook, command_line_input):
9188         Constify.
9189         (init_main): Add casts.
9190         * top.h (handle_line_of_input): Constify.
9191         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9192         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9193         (tfind_command): Rename to ...
9194         (tfind_command_1): ... this and constify.
9195         (tfind_command): New function.
9196         (tfind_end_command, tfind_start_command): Adjust.
9197         (encode_source_string): Constify.
9198         * tracepoint.h (encode_source_string): Constify.
9199         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9200         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9201         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9202         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9203         * tui/tui-win.c (parse_scrolling_args): Constify.
9204         * tui/tui-windata.c (tui_erase_data_content): Constify.
9205         * tui/tui-windata.h (tui_erase_data_content): Constify.
9206         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9207         * tui/tui.c (tui_enable): Add cast.
9208         * utils.c (defaulted_query): Constify.
9209         (init_page_info): Add cast.
9210         (puts_debug, subset_compare): Constify.
9211         * utils.h (subset_compare): Constify.
9212         * varobj.c (varobj_format_string): Constify.
9213         * varobj.h (varobj_format_string): Constify.
9214         * vax-tdep.c (vax_register_name): Constify.
9215         * windows-nat.c (windows_detach): Constify.
9216         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9217         * xml-support.c (gdb_xml_end_element): Constify.
9218         * xml-tdesc.c (tdesc_start_reg): Constify.
9219         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9220         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9221         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9222
9223 2017-04-05  Pedro Alves  <palves@redhat.com>
9224
9225         * proc-api.c (struct trans): Constify.
9226         (procfs_note): Constify.
9227         * proc-events.c (struct trans, syscall_table):
9228         * proc-flags.c (struct trans): Constify.
9229         * proc-utils.h (procfs_note): Constify.
9230         * proc-why.c (struct trans): Constify.
9231         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9232         (procfs_detach): Constify.
9233         * sol-thread.c (struct string_map): Constify.
9234         (td_err_string, td_state_string): Constify.
9235
9236 2017-04-05  Pedro Alves  <palves@redhat.com>
9237
9238         * proc-api.c (procfs_filename): Don't initialize
9239         procfs_filename.
9240         (prepare_to_trace): Assume procfs_filename is non-NULL.
9241         (_initialize_proc_api): Give procfs_filename a default value here.
9242
9243 2017-04-05  Pedro Alves  <palves@redhat.com>
9244
9245         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9246         'cond_string' parameter.
9247         (extract_exception_regexp): Constify 'string' parameter.
9248         (catch_exception_command_1): Constify.
9249         * breakpoint.c (init_catchpoint)
9250         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9251         parameter.
9252         (ep_parse_optional_if_clause, catch_fork_command_1)
9253         (catch_exec_command_1): Constify.
9254         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9255         parameter.
9256         (ep_parse_optional_if_clause): Constify.
9257         * cli/cli-utils.c (remove_trailing_whitespace)
9258         (check_for_argument): Constify.
9259         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9260         non-const overload.
9261         (check_for_argument): Likewise.
9262
9263 2017-04-05  Pedro Alves  <palves@redhat.com>
9264
9265         * event-top.c (command_line_handler): Add cast to execute_command
9266         call.
9267         * record-btrace.c (cmd_record_btrace_bts_start)
9268         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9269         (cmd_record_btrace_start): Add cast to execute_command call.
9270         * record-full.c (record_full_goto_insn):
9271         * record.c (record_start, record_stop): Add cast to
9272         execute_command_to_string calls.
9273         (cmd_record_start): Add cast to execute_command calls.
9274
9275 2017-04-05  Pedro Alves  <palves@redhat.com>
9276
9277         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9278         static inline function.
9279         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9280         array and use gdb_PyArg_ParseTupleAndKeywords.
9281         * python/py-cmd.c (cmdpy_init): Likewise.
9282         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9283         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9284         (infpy_search_memory): Likewise.
9285         * python/py-objfile.c (objfpy_add_separate_debug_file)
9286         (gdbpy_lookup_objfile): Likewise.
9287         * python/py-symbol.c (gdbpy_lookup_symbol)
9288         (gdbpy_lookup_global_symbol): Likewise.
9289         * python/py-type.c (gdbpy_lookup_type): Likewise.
9290         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9291         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9292         Likewise.
9293
9294 2017-04-05  Pedro Alves  <palves@redhat.com>
9295
9296         * python/python-internal.h (gdb_PyGetSetDef): New type.
9297         * python/py-block.c (block_object_getset)
9298         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9299         * python/py-event.c (event_object_getset)
9300         (finish_breakpoint_object_getset): Likewise.
9301         * python/py-inferior.c (inferior_object_getset): Likewise.
9302         * python/py-infthread.c (thread_object_getset): Likewise.
9303         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9304         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9305         * python/py-objfile.c (objfile_getset): Likewise.
9306         * python/py-progspace.c (pspace_getset): Likewise.
9307         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9308         Likewise.
9309         * python/py-record.c (recpy_record_getset): Likewise.
9310         * python/py-symbol.c (symbol_object_getset): Likewise.
9311         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9312         Likewise.
9313         * python/py-type.c (type_object_getset, field_object_getset):
9314         Likewise.
9315         * python/py-value.c (value_object_getset): Likewise.
9316
9317 2017-04-05  Pedro Alves  <palves@redhat.com>
9318
9319         * python/python-internal.h (gdb_PyObject_CallMethod)
9320         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9321         New functions.
9322         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9323         (PySys_GetObject, PySys_SetPath): New macros.
9324
9325 2017-04-05  Pedro Alves  <palves@redhat.com>
9326
9327         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9328         info_osdata_command.
9329         * osdata.c (info_osdata_command): Rename to ...
9330         (info_osdata): ... this.  Constify 'type' parameter, and remove
9331         the 'from_tty' parameter.  Accept NULL TYPE.
9332         (info_osdata_command): New function.
9333         * osdata.h (info_osdata_command): Remove declaration.
9334         (info_osdata): New declaration.
9335
9336 2017-04-05  Pedro Alves  <palves@redhat.com>
9337
9338         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9339         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9340         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9341         parameter.
9342         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9343         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9344         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9345         parameter.
9346         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9347         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9348         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9349         (mi_cmd_file_list_exec_source_files)
9350         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9351         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9352         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9353         parameter.
9354         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9355         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9356         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9357         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9358         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9359         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9360         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9361         'command' parameter.
9362         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9363         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9364         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9365         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9366         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9367         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9368         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9369         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9370         (mi_cmd_var_set_update_range): Constify 'command' parameter.
9371         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9372         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9373         parameter.
9374         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9375         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9376         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9377         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9378         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9379         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9380         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9381         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9382         (mi_cmd_data_list_changed_registers)
9383         (mi_cmd_data_write_register_values)
9384         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9385         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9386         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9387         (mi_cmd_list_features, mi_cmd_list_target_features)
9388         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9389         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9390         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9391         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9392         (mi_cmd_trace_frame_collected): Constify 'command'
9393         parameter.
9394         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9395         'command' parameter.
9396
9397 2017-04-05  Pedro Alves  <palves@redhat.com>
9398
9399         * ada-lang.c (ada_completer_word_break_characters): Now a const
9400         array.
9401         (ada_get_gdb_completer_word_break_characters): Constify.
9402         * completer.c (gdb_completer_command_word_break_characters)
9403         (gdb_completer_file_name_break_characters)
9404         (gdb_completer_quote_characters): Now const arrays.
9405         (get_gdb_completer_quote_characters): Constify.
9406         (set_rl_completer_word_break_characters): New function.
9407         (set_gdb_completion_word_break_characters)
9408         (complete_line_internal): Use it.
9409         * completer.h (get_gdb_completer_quote_characters): Constify.
9410         (set_rl_completer_word_break_characters): Declare.
9411         * f-lang.c (f_word_break_characters): Constify.
9412         * language.c (default_word_break_characters): Constify.
9413         * language.h (language_defn::la_word_break_characters): Constify.
9414         (default_word_break_characters): Constify.
9415         * top.c (init_main): Use set_rl_completer_word_break_characters.
9416
9417 2017-04-05  Pedro Alves  <palves@redhat.com>
9418
9419         * aix-thread.c (aix_thread_pid_to_str)
9420         (aix_thread_extra_thread_info): Constify.
9421         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9422         * bsd-uthread.c (bsd_uthread_extra_thread_info)
9423         (bsd_uthread_pid_to_str): Constify.
9424         * corelow.c (core_pid_to_str): Constify.
9425         * darwin-nat.c (darwin_pid_to_str): Constify.
9426         * fbsd-nat.c (fbsd_pid_to_str): Constify.
9427         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9428         Constify.
9429         * gnu-nat.c (gnu_pid_to_str): Constify.
9430         * go32-nat.c (go32_pid_to_str): Constify.
9431         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9432         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9433         * inferior.c (inferior_pid_to_str): Constify.
9434         * linux-nat.c (linux_nat_pid_to_str): Constify.
9435         * linux-tdep.c (linux_core_pid_to_str): Constify.
9436         * linux-thread-db.c (thread_db_pid_to_str)
9437         (thread_db_extra_thread_info): Constify.
9438         * nto-tdep.c (nto_extra_thread_info): Constify.
9439         * nto-tdep.h (nto_extra_thread_info): Constify.
9440         * obsd-nat.c (obsd_pid_to_str): Constify.
9441         * procfs.c (procfs_pid_to_str): Constify.
9442         * ravenscar-thread.c (ravenscar_extra_thread_info)
9443         (ravenscar_pid_to_str): Constify.
9444         * remote-sim.c (gdbsim_pid_to_str): Constify.
9445         * remote.c (remote_threads_extra_info, remote_pid_to_str):
9446         Constify.
9447         * sol-thread.c (solaris_pid_to_str): Constify.
9448         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9449         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9450         * target.c (default_pid_to_str, target_pid_to_str)
9451         (normal_pid_to_str, default_pid_to_str): Constify.
9452         * target.h (target_ops::to_pid_to_str)
9453         (target_ops::to_extra_thread_info): Constify.
9454         (target_pid_to_str, normal_pid_to_str): Constify.
9455         * windows-nat.c (windows_pid_to_str): Constify.
9456         * gdbarch.sh (core_pid_to_str): Constify.
9457         * target-delegates.c: Regenerate.
9458         * gdbarch.h, gdbarch.c: Regenerate.
9459
9460 2017-04-05  Pedro Alves  <palves@redhat.com>
9461
9462         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9463         the memory of the temporary warning_pre_print override.
9464         * utils.c (warning_pre_print): Constify.
9465         * utils.h (warning_pre_print): Constify.
9466
9467 2017-04-05  Pedro Alves  <palves@redhat.com>
9468
9469         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9470         (shell_command): New function.
9471         (make_command): Use std::string.
9472         (init_cli_cmds): Register shell_command instead of shell_escape.
9473
9474 2017-04-05  Pedro Alves  <palves@redhat.com>
9475
9476         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9477         * tracepoint.c (default_collect): Don't initialize.
9478
9479 2017-04-05  Pedro Alves  <palves@redhat.com>
9480
9481         * macroexp.c (macro_buffer::shared): Now a bool.
9482         (init_buffer): Update.
9483         (init_shared_buffer): Constify 'addr' parameter.
9484         (substitute_args, expand, macro_expand, macro_expand_next): Remove
9485         casts.
9486
9487 2017-04-05  Pedro Alves  <palves@redhat.com>
9488
9489         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9490         * disasm.c (set_disassembler_options): Constify local.
9491         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9492
9493 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
9494
9495         PR gdb/21352
9496         * tracefile.c (tsave_command): Fix argument parsing for '-r'
9497         option.
9498
9499 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9500
9501         * frame.c (frame_unwind_register_unsigned): Call
9502         frame_unwind_register_value.
9503
9504 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9505
9506         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9507         Use gdb_test_multiple, and don't match anchor.
9508
9509 2017-04-05  Pedro Alves  <palves@redhat.com>
9510
9511         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9512         (Write After Approval): Remove Simon Marchi.
9513
9514 2017-04-05  Pedro Alves  <palves@redhat.com>
9515
9516         * common/gdb_optional.h (optional::optional): Make constexpr and
9517         initialize m_dummy.
9518
9519 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9520
9521         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9522         (amd64fbsd_jmp_buf_reg_offset): Remove.
9523         (amd64fbsd_supply_uthread): Remove function.
9524         (amd64fbsd_collect_uthread): Remove function.
9525         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9526         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9527         (x86_64-*-freebsd*): Remove bsd-uthread.o.
9528         (fbsd-nat.c): Update comment.
9529         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9530         (i386fbsd_jmp_buf_reg_offset): Remove.
9531         (i386fbsd_supply_uthread): Remove function.
9532         (i386fbsd_collect_uthread): Remove function.
9533         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9534
9535 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9536
9537         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9538         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9539         * NEWS: Mention that support for FreeBSD/alpha was removed.
9540         * alpha-fbsd-tdep.c: Delete file.
9541         * config/alpha/fbsd.mh: Delete file.
9542         * configure.host: Delete alpha*-*-freebsd* and
9543         alpha*-*-kfreebsd*-gnu.
9544         * configure.tgt: Delete alpha*-*-freebsd* and
9545         alpha*-*-kfreebsd*-gnu.
9546
9547 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9548
9549         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9550         amd64bsd_store_inferior_registers): Use ptid from regcache.
9551
9552 2017-04-04  Pedro Alves  <palves@redhat.com>
9553
9554         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
9555         data fields, make them private and add "m_" prefixes.
9556         (lnp_state_machine::lnp_state_machine): New ctor.
9557         (record_line, check_line_address, handle_set_discriminator)
9558         (handle_set_address, handle_advance_pc, handle_special_opcode)
9559         (handle_advance_line, handle_set_file, handle_negate_stmt)
9560         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9561         (end_sequence, advance_line): New methods.
9562         (m_gdbarch, m_record_lines_p): New fields.
9563         (lnp_reader_state): Delete.
9564         (dwarf_record_line): Rename to ...
9565         (lnp_state_machine::record_line): ... adjust.
9566         (init_lnp_state_machine): Delete.
9567         (lnp_state_machine::lnp_state_machine): New.
9568         (check_line_address): Rename to ...
9569         (lnp_state_machine::check_line_address): This.
9570         (dwarf_decode_lines_1): Remove reference to "reader_state".
9571         Adjust lnp_state_machine having a non-default ctor.  Use bool.
9572         State machine internal state manipulation moved to
9573         lnp_state_machine methods.
9574
9575 2017-04-04  Pedro Alves  <palves@redhat.com>
9576
9577         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9578         unittests/offset-type-selftests.c.
9579         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9580         * common/offset-type.h: New file.
9581         * common/preprocessor.h: New file.
9582         * common/traits.h: New file.
9583         * common/valid-expr.h: New file.
9584         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
9585         sect_offset and cu_offset strong typedefs throughout.
9586         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9587         typedefs throughout.
9588         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
9589         sect_offset and cu_offset strong typedefs throughout.
9590         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9591         typedefs throughout.
9592         * gdbtypes.h: Include "common/offset-type.h".
9593         (cu_offset): Now an offset type (strong typedef) instead of a
9594         struct.
9595         (sect_offset): Likewise.
9596         (union call_site_parameter_u): Rename "param_offset" field to
9597         "param_cu_off".
9598         * unittests/offset-type-selftests.c: New file.
9599
9600 2017-04-04  Pedro Alves  <palves@redhat.com>
9601
9602         * common/underlying.h: New file.
9603         * dwarf2read.c: Include "common/gdb_optional.h" and
9604         "common/underlying.h".
9605         (dir_index, file_name_index): New types.
9606         (file_entry): Use them.
9607         (file_entry::include): Use to_underlying.
9608         (line_header::add_file_name): Use dir_index.
9609         (read_formatted_entries): Use gdb::optional.  Read form before
9610         writting to file_entry.
9611         (dwarf_decode_line_header): Use dir_index.
9612         (lnp_state_machine::current_file): Use to_underlying.
9613         (lnp_state_machine::file): Change type to file_name_index.
9614         (dwarf_record_line): Use to_underlying.
9615         (init_lnp_state_machine): Use file_name_index.
9616         (dwarf_decode_lines_1): Use dir_index and file_name_index.
9617
9618 2017-04-04  Pedro Alves  <palves@redhat.com>
9619
9620         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9621         operator bool, has_value and get methods.
9622
9623 2017-04-04  Pedro Alves  <palves@redhat.com>
9624
9625         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9626         fields.
9627         (line_header): Initialize all data fields.  Change type of
9628         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9629         Change type of include_dirs to std::vector<const char *>.  Remove
9630         num_include_dirs, include_dirs_size.  Change type of file_names to
9631         std::vector<file_entry>.  Remove num_file_names, file_names_size.
9632         (line_header::line_header): New.
9633         (line_header::add_include_dir, line_header::add_file_name): New
9634         methods.
9635         (line_header::include_dir_at): Remove NULL check.
9636         (line_header::file_name_at): Add const overload.
9637         (line_header_up): New unique_ptr typedef.
9638         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
9639         std::vector.  Remove free_line_header call.
9640         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
9641         free_line_header call.
9642         (free_cu_line_header): Delete.
9643         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9644         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9645         Adjust to use std::vector.
9646         (free_line_header): Delete.
9647         (free_line_header_voidp): Use delete.
9648         (add_include_dir): Replace with ...
9649         (line_header::add_include_dir): ... this method.  Use std::vector.
9650         (add_file_name): Replace with ...
9651         (line_header::add_file_name): ... this method.  Use std::vector.
9652         (add_include_dir_stub): Delete.
9653         (read_formatted_entries): Remove memset.
9654         (dwarf_decode_line_header): Return a line_header_up instead of a
9655         raw pointer.  Remove cleanup handling.  Pass lambdas to
9656         read_formatted_entries.  Adjust to use line_header methods.
9657         (dwarf_decode_lines_1): Adjust to use line_header methods.
9658         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9659         use std::vector.
9660
9661 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
9662
9663         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9664         instead of struct ptid.
9665
9666 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
9667
9668         * frame.c (get_frame_register_bytes): Unwind using value.
9669         (put_frame_register_bytes): Likewise.
9670
9671 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
9672
9673         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9674         aggregate-like.
9675
9676 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
9677
9678         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9679
9680 2017-03-29  Yao Qi  <yao.qi@linaro.org>
9681
9682         * gdbthread.h (struct thread_info): Declare constructor and
9683         destructor.  Add some in-class member initializers.
9684         * thread.c (free_thread): Remove.
9685         (init_thread_list): Call delete instead of free_thread.
9686         (new_thread): Call thread_info constructor.
9687         (thread_info::thread_info): New function.
9688         (thread_info::~thread_info): New function.
9689         (delete_thread_1): Call delete instead of free_thread.
9690         (make_cleanup_restore_current_thread): Move tp and frame to
9691         inner block.
9692
9693 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9694
9695         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9696         (arc_skip_prologue): Likewise.
9697         (arc_make_frame_cache): Likewise.
9698         (arc_pv_get_operand): New function.
9699         (arc_is_in_prologue): Likewise.
9700         (arc_analyze_prologue): Likewise.
9701         (arc_print_frame_cache): Likewise.
9702         (MAX_PROLOGUE_LENGTH): New constant.
9703
9704 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9705
9706         * configure.tgt: Add arc-insn.o.
9707         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9708         (dump_arc_instruction_command): New function.
9709         (arc_fprintf_disasm): Likewise.
9710         (arc_disassemble_info): Likewise.
9711         (arc_insn_get_operand_value): Likewise.
9712         (arc_insn_get_operand_value_signed): Likewise.
9713         (arc_insn_get_memory_base_reg): Likewise.
9714         (arc_insn_get_memory_offset): Likewise.
9715         (arc_insn_get_branch_target): Likewise.
9716         (arc_insn_dump): Likewise.
9717         (arc_insn_get_linear_next_pc): Likewise.
9718         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9719         (arc_disassemble_info): Likewise.
9720         (arc_insn_get_branch_target): Likewise.
9721         (arc_insn_get_linear_next_pc): Likewise.
9722         * NEWS: Mention new "maint print arc arc-instruction".
9723
9724 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9725
9726         * arc-tdep (maintenance_print_arc_list): New variable.
9727         (maintenance_print_arc_command): New function.
9728
9729 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9730
9731         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9732         Add "limm" and "reserved".
9733         (arc_cannot_fetch_register, arc_cannot_store_register): Add
9734         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9735         * arc-tdep.h (arc_regnum): Likewise.
9736
9737 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9738
9739         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9740         for THREADPTR register.
9741         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9742         register.
9743         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9744         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9745         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9746
9747 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9748
9749         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9750         registers above gdbarch_num_regs (gdbarch) as privileged in
9751         call0 ABI.
9752
9753 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9754
9755         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9756         for a single specified register or for all registers in
9757         a0_base..a0_base + C0_NREGS range.
9758         (supply_gregset_reg): Call regcache_raw_supply for a single
9759         specified register or for all registers in a0_base..a0_base +
9760         C0_NREGS range.
9761
9762 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9763
9764         * arch/xtensa.h (C0_NREGS): Add definition.
9765         * xtensa-tdep.c (C0_NREGS): Remove definition.
9766
9767 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9768
9769         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9770         Drop xtensa_default_isa initialization.
9771         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9772
9773 2017-03-27  Pedro Alves  <palves@redhat.com>
9774
9775         * dwarf2read.c (file_entry) <dir_index>: Add comment.
9776         (file_entry::include_dir): New method.
9777         (line_header::include_dir_at, line_header::file_name_at): New
9778         methods.
9779         (setup_type_unit_groups, setup_type_unit_groups)
9780         (psymtab_include_file_name): Simplify using the new methods.
9781         (lnp_state_machine) <the_line_header>: New field.
9782         <file>: Add comment.
9783         (lnp_state_machine::current_file): New method.
9784         (dwarf_record_line): Simplify using the new methods.
9785         (init_lnp_state_machine): Initialize the "the_line_header" field.
9786         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9787         Simplify using the new methods.
9788
9789 2017-03-27  Pedro Alves  <palves@redhat.com>
9790
9791         * cp-name-parser.y (make_empty): Delete.
9792         (demangler_special, nested_name, ptr_operator, array_indicator)
9793         (direct_declarator, declarator_1): Use fill_comp instead of
9794         make_empty.
9795
9796 2017-03-27  Pedro Alves  <palves@redhat.com>
9797
9798         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9799         to ATTRIBUTE_PRINTF.
9800         * solib-target.c (library_list_start_list): Print "string" not
9801         "version".
9802         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9803         gdb_xml_error call.
9804
9805 2017-03-27  Pedro Alves  <palves@redhat.com>
9806
9807         * dwarf2read.c (struct file_and_directory): New.
9808         (dwarf2_get_dwz_file): Adjust to use std::string.
9809         (dw2_get_file_names_reader): Adjust to use file_and_directory.
9810         (find_file_and_directory): Adjust to return a file_and_directory
9811         object.
9812         (read_file_scope): Adjust to use file_and_directory.  Remove
9813         make_cleanup/do_cleanups calls.
9814         (open_and_init_dwp_file): Adjust to use std::string.  Remove
9815         make_cleanup/do_cleanups calls.
9816         * python/python.c (do_start_initialization): Adjust to ldirname
9817         returning a std::string.
9818         * utils.c (ldirname): Now returns a std::string.
9819         * utils.h (ldirname): Change return type to std::string.
9820         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9821         returning a std::string.
9822         * xml-tdesc.c (file_read_description_xml): Likewise.
9823
9824 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
9825
9826         * regcache.c (regcache_debug_print_register): New function.
9827         * regcache.h (regcache_debug_print_register): New declaration.
9828         * target.c (debug_print_register): Remove.
9829         (target_fetch_registers): Call regcache_debug_print_register.
9830         (target_store_registers): Likewise.
9831
9832 2017-03-24  Pádraig Brady  <pbrady@fb.com>
9833
9834         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9835         reference beyond the 'lh->include_dirs' array before accessing to
9836         it.
9837         (psymtab_include_file_name): Likewise.
9838         (dwarf_decode_lines_1): Likewise.
9839         (dwarf_decode_lines): Likewise.
9840         (file_file_name): Likewise.
9841
9842 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
9843
9844         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9845         inferior_ptid.
9846         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9847         ps_lsetfpregs): Likewise.
9848         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9849         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9850         ps_lsetfpregs): Likewise.
9851         * target.c (target_fetch_registers, target_store_registers):
9852         Remove asserts.
9853
9854 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
9855
9856         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9857
9858 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9859
9860         * aarch64-tdep.c (aarch64_process_record_test): Declare.
9861         (_initialize_aarch64_tdep): Register it.
9862         (aarch64_record_load_store): Handle PRFM instruction.
9863         (aarch64_process_record_test): New function.
9864
9865 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9866
9867         * aarch64-tdep.c (aarch64_record_load_store): Fix code
9868         indentation.
9869
9870 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9871
9872         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9873
9874 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9875
9876         python/python.c (do_start_initialization): Fix memory leak.
9877
9878 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9879
9880         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9881         using get_ptrace_pid.
9882         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9883         inferior_ptid.
9884         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9885         inferior_ptid instead of pid.
9886
9887 2017-03-22  Yao Qi  <yao.qi@linaro.org>
9888
9889         * aarch64-tdep.c: Wrap locally used classes in anonymous
9890         namespace.
9891         * arm-tdep.c: Likewise.
9892         * linespec.c: Likewise.
9893         * ui-out.c: Likewise.
9894
9895 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
9896
9897         PR gdb/19637
9898         * python/lib/gdb/printer/bound_registers.py: Import sys.
9899
9900 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9901
9902         * windows-nat.c (do_windows_fetch_inferior_registers): Add
9903         windows_thread_info parameter and use it instead of
9904         current_thread.
9905         (windows_fetch_inferior_registers): Don't set current_thread,
9906         pass the thread to do_windows_fetch_inferior_registers.  Use
9907         ptid from regcache instead of inferior_ptid.
9908         (do_windows_store_inferior_registers): Add windows_thread_info
9909         parameter and use it instead of current_thread.
9910         (windows_store_inferior_registers): Don't set current_thread,
9911         pass the thread to do_windows_store_inferior_registers.  Use
9912         ptid from regcache instead of inferior_ptid.
9913
9914 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9915
9916         * ser-mingw.c (ser_windows_raw): Remove reference to
9917         struct serial::current_timeout.
9918
9919 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
9920
9921         PR tdep/20928
9922         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9923         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9924         (sparc64_fsr_type): Fix %fsr decoding.
9925
9926 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
9927
9928         * python/py-record-btrace.c (btpy_insn_data): Change return type
9929         for Python 2.
9930
9931 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9932
9933         * spu-linux-nat.c (spu_fetch_inferior_registers,
9934         spu_store_inferior_registers): Use ptid from regcache, set and
9935         restore inferior_ptid.
9936         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9937         Likewise.
9938
9939 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9940
9941         * i386-linux-nat.c (fetch_register, store_register,
9942         i386_linux_fetch_inferior_registers,
9943         i386_linux_store_inferior_registers): Use ptid from regcache.
9944         * ia64-linux-nat.c (ia64_linux_fetch_register,
9945         ia64_linux_store_register): Likewise.
9946         * inf-ptrace.c (inf_ptrace_fetch_register,
9947         inf_ptrace_store_register): Likewise.
9948         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9949         m32r_linux_store_inferior_registers): Likewise.
9950         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9951         m68kbsd_store_inferior_registers): Likewise.
9952         * m68k-linux-nat.c (fetch_register, store_register,
9953         m68k_linux_fetch_inferior_registers,
9954         m68k_linux_store_inferior_registers): Likewise.
9955         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9956         m88kbsd_store_inferior_registers): Likewise.
9957         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9958         mips_fbsd_store_inferior_registers): Likewise.
9959         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9960         mips64_linux_regsets_store_registers): Likewise.
9961         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9962         mipsnbsd_store_inferior_registers): Likewise.
9963         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9964         mips64obsd_store_inferior_registers): Likewise.
9965         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9966         Likewise.
9967         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9968         ppcfbsd_store_inferior_registers): Likewise.
9969         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9970         ppc_linux_store_inferior_registers): Likewise.
9971         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9972         ppcnbsd_store_inferior_registers): Likewise.
9973         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9974         ppcobsd_store_registers): Likewise.
9975         * procfs.c (procfs_fetch_registers, procfs_store_registers):
9976         Likewise.
9977         * ravenscar-thread.c (ravenscar_fetch_registers,
9978         ravenscar_store_registers, ravenscar_prepare_to_store):
9979         Likewise.
9980         * record-btrace.c (record_btrace_fetch_registers,
9981         record_btrace_store_registers, record_btrace_prepare_to_store):
9982         Likewise.
9983         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9984         Lookup inferior using ptid from regcache, instead of
9985         current_inferior.
9986         * remote.c (remote_fetch_registers, remote_store_registers): Use
9987         ptid from regcache.
9988         * rs6000-nat.c (fetch_register, store_register): Likewise.
9989         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9990         s390_linux_store_inferior_registers): Likewise.
9991         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9992         shnbsd_store_inferior_registers): Likewise.
9993         * sol-thread.c (sol_thread_fetch_registers,
9994         sol_thread_store_registers): Likewise.
9995         * sparc-nat.c (sparc_fetch_inferior_registers,
9996         sparc_store_inferior_registers): Likewise.
9997         * tilegx-linux-nat.c (fetch_inferior_registers,
9998         store_inferior_registers): Likewise.
9999         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10000         vaxbsd_store_inferior_registers): Likewise.
10001         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10002         store_xtregs): Likewise.
10003
10004 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10005
10006         PR gdb/14441
10007         * NEWS: Mention support for rvalue references in GDB and python.
10008         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10009         supports both lvalue and rvalue references.
10010
10011 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10012
10013         PR gdb/14441
10014         * gdbtypes.c (rank_one_type): Implement overloading
10015         resolution rules regarding rvalue references.
10016
10017 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10018
10019         PR gdb/14441
10020         * aarch64-tdep.c (aarch64_type_align)
10021         (aarch64_extract_return_value, aarch64_store_return_value): Change
10022         lvalue reference type checks to general reference type checks.
10023         * amd64-tdep.c (amd64_classify): Likewise.
10024         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10025         Likewise.
10026         * arm-tdep.c (arm_type_align, arm_extract_return_value)
10027         (arm_store_return_value): Likewise.
10028         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10029         * c-typeprint.c (c_print_type): Likewise.
10030         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10031         (cplus_number_of_children, cplus_describe_child): Likewise.
10032         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10033         * completer.c (expression_completer): Likewise.
10034         * cp-support.c (make_symbol_overload_list_adl_namespace):
10035         Likewise.
10036         * darwin-nat-info.c (info_mach_region_command): Likewise.
10037         * dwarf2loc.c (entry_data_value_coerce_ref)
10038         (value_of_dwarf_reg_entry): Likewise.
10039         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10040         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10041         Likewise.
10042         * findvar.c (extract_typed_address, store_typed_address):
10043         Likewise.
10044         * gdbtypes.c (rank_one_type): Likewise.
10045         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10046         * infcall.c (value_arg_coerce): Likewise.
10047         * language.c (pointer_type): Likewise.
10048         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10049         Likewise.
10050         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10051         * mn10300-tdep.c (mn10300_type_align): Likewise.
10052         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10053         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10054         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10055         Likewise.
10056         * printcmd.c (print_formatted, x_command): Likewise.
10057         * python/py-type.c (typy_get_composite, typy_template_argument):
10058         Likewise.
10059         * python/py-value.c (valpy_referenced_value)
10060         (valpy_get_dynamic_type, value_has_field): Likewise.
10061         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10062         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10063         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10064         * spu-tdep.c (spu_scalar_value_p): Likewise.
10065         * symtab.c (lookup_symbol_aux): Likewise.
10066         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10067         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10068         Likewise.
10069         * valops.c (value_cast_pointers, value_cast)
10070         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10071         (value_struct_elt, value_struct_elt_bitpos)
10072         (value_find_oload_method_list, find_overload_match)
10073         (value_rtti_indirect_type): Likewise.
10074         * valprint.c (val_print_scalar_type_p, generic_val_print):
10075         Likewise.
10076         * value.c (value_actual_type, value_as_address, unpack_long)
10077         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10078         (coerce_ref): Likewise.
10079         * varobj.c (varobj_get_value_type): Likewise.
10080
10081 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10082
10083         PR gdb/14441
10084         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10085         table of constants.
10086         * python/lib/gdb/command/explore.py: Support exploring values
10087         of rvalue reference types.
10088         * python/lib/gdb/types.py: Implement get_basic_type() for
10089         rvalue reference types.
10090         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10091         constant.
10092         * python/py-value.c (valpy_getitem): Add an rvalue reference
10093         check.
10094         (valpy_reference_value): Add new parameter "refcode".
10095         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10096         New wrappers for valpy_reference_value().
10097         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10098         (gdbpy_invoke_xmethod): Likewise.
10099
10100 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10101
10102         PR gdb/14441
10103         * dwarf2read.c (process_die, read_type_die_1): Handle the
10104         DW_TAG_rvalue_reference_type DIE.
10105         (read_tag_reference_type): Add new parameter "refcode".
10106
10107 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10108
10109         PR gdb/14441
10110         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10111         (c_type_print_modifier, c_type_print_varspec_suffix)
10112         (c_type_print_base): Support printing rvalue reference types.
10113         * c-valprint.c (c_val_print, c_value_print): Support printing
10114         rvalue reference values.
10115
10116 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10117
10118         PR gdb/14441
10119         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10120         typename.
10121         * cp-support.c (replace_typedefs): Handle
10122         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10123         * python/py-type.c (typy_lookup_type): Likewise.
10124
10125 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10126
10127         PR gdb/14441
10128         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10129         * parse.c (insert_type): Change assert statement.
10130         (follow_types): Handle rvalue reference types.
10131         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10132         constant.
10133
10134 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10135
10136         PR gdb/14441
10137         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10138         value_ref() interface.
10139         * c-valprint.c (c_value_print): Likewise.
10140         * infcall.c (value_arg_coerce): Likewise.
10141         * python/py-value.c (valpy_reference_value): Likewise.
10142         * valops.c (value_cast, value_reinterpret_cast)
10143         (value_dynamic_cast, typecmp): Likewise.
10144         (value_ref): Parameterize by kind of return value reference type.
10145         * value.h (value_ref): Add new parameter "refcode".
10146
10147 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10148
10149         PR gdb/14441
10150         * dwarf2read.c (read_tag_reference_type): Use
10151         lookup_lvalue_reference_type() instead of lookup_reference_type().
10152         * eval.c (evaluate_subexp_standard): Likewise.
10153         * f-exp.y: Likewise.
10154         * gdbtypes.c (make_reference_type, lookup_reference_type):
10155         Generalize with rvalue reference types.
10156         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10157         convenience wrappers for lookup_reference_type().
10158         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10159         reference kind parameter.
10160         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10161         wrappers for lookup_reference_type().
10162         * guile/scm-type.c (gdbscm_type_reference): Use
10163         lookup_lvalue_reference_type() instead of lookup_reference_type().
10164         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10165         * parse.c (follow_types): Likewise.
10166         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10167         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10168         Likewise.
10169         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10170         (gdbpy_invoke_xmethod): Likewise.
10171         * stabsread.c: Provide extra argument to make_reference_type()
10172         call.
10173         * valops.c (value_ref, value_rtti_indirect_type): Use
10174         lookup_lvalue_reference_type() instead of lookup_reference_type().
10175
10176 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10177
10178         PR gdb/14441
10179         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10180         (TYPE_IS_REFERENCE): New macro.
10181         (struct type): Add rvalue_reference_type field.
10182         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10183
10184 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10185
10186         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10187         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10188         New function definition.
10189         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10190         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10191         New function declaration.
10192         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10193         * mi/mi-interp.h: New file.
10194         * solib.c (info_sharedlibrary_command): Replace for loop with
10195         ALL_SO_LIBS macro
10196         * solib.h (update_solib_list): New function declaration.
10197         (so_list_head): Move macro.
10198         * solist.h (ALL_SO_LIBS): New macro.
10199
10200 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10201
10202         * infcmd.c (post_create_inferior): Remove unused argument in
10203         call to solib_add.
10204         * remote.c (remote_start_remote): Likewise.
10205         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10206         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10207         (enable_break): Likewise.
10208         * solib.c (update_solib_list): Remove unused target argument
10209         and its documentation.
10210         (solib_add): Remove unused target argument.  Remove unused
10211         argument in call to update_solib_list.
10212         (info_sharedlibrary_command): Remove unused argument in call
10213         to update_solib_list.
10214         (sharedlibrary_command): Remove unused argument in call to
10215         solib_add.
10216         (handle_solib_event): Likewise.
10217         (reload_shared_libraries): Likewise.
10218         * solib.h (solib_add): Remove unused target argument.
10219
10220 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10221
10222         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10223         (s390_displaced_step_fixup): Cover relative branches with the
10224         default fixup handling.  This fixes lack of support for some
10225         relative branch instructions.
10226
10227 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10228
10229         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10230         ptid from regcache.
10231
10232 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10233
10234         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10235         i386_darwin_store_inferior_registers): Use ptid from regcache.
10236
10237 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10238
10239         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10240         i386bsd_store_inferior_registers): Use ptid from regcache.
10241
10242 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10243
10244         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10245         hppaobsd_store_registers): Use ptid from regcache.
10246
10247 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10248
10249         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10250         hppanbsd_store_registers): Use ptid from regcache.
10251
10252 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10253
10254         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10255         from regcache.  Use get_ptrace_pid.
10256
10257 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10258
10259         * corelow.c (get_core_register_section): Use ptid from regcache,
10260         update doc.
10261
10262 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10263
10264         * bsd-uthread.c (bsd_uthread_fetch_registers,
10265         bsd_uthread_store_registers): Use ptid from regcache, set and
10266         restore inferior_ptid.
10267
10268 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10269
10270         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10271         fetch_fp_regs, store_register, store_regs, store_fp_register,
10272         store_fp_regs): Use ptid from regcache.
10273
10274 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10275
10276         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10277         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10278         store_vfp_regs): Use ptid from regcache.
10279
10280 2017-03-17  Pedro Alves  <palves@redhat.com>
10281
10282         PR remote/21188
10283         * ser-base.c (ser_base_wait_for): Add comment.
10284         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10285         version.
10286         * ser-unix.c (hardwire_raw): Remove reference to
10287         scb->current_timeout.
10288         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10289         (hardwire_ops): Install ser_base_readchar instead of
10290         hardwire_readchar.
10291         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10292         Remove fields.
10293
10294 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10295
10296         PR gdb/19637
10297         * python/lib/gdb/printer/bound_registers.py: Add support for
10298         Python 3.
10299
10300 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10301
10302         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10303         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10304         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10305         byte_offset to subobj_byte_offset.  Fix the handling of
10306         DWARF_VALUE_STACK on big-endian targets when coming via an
10307         implicit pointer.
10308         (dwarf2_evaluate_loc_desc): Adjust call to
10309         dwarf2_evaluate_loc_desc_full.
10310         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10311         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10312
10313 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10314
10315         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10316         and REVSH instructions.
10317
10318 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10319
10320         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10321         (arm_record_test): Declare.
10322         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10323         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10324         align with the manual.
10325         (thumb_record_misc): Adjust the code order to align with the
10326         manual.
10327         (thumb2_record_decode_insn_handler): Fix instruction matching.
10328         (instruction_reader_thumb): New class.
10329         (arm_record_test): New function.
10330
10331 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10332
10333         * arm-tdep.c (abstract_memory_reader): New class.
10334         (instruction_reader): New class.
10335         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10336         (decode_insn): Likewise.
10337
10338 2017-03-16  Doug Evans  <dje@google.com>
10339
10340         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10341         member.  Change type of TYPE member to SCM.  All uses updated.
10342         (lsscm_make_lazy_string_smob): Add assert.
10343         (lsscm_make_lazy_string): Flag bad length values.
10344         (lsscm_elt_type): New function.
10345         (gdbscm_lazy_string_to_value): Rewrite to use
10346         lsscm_safe_lazy_string_to_value.
10347         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10348         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10349         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10350         in incoming type.
10351         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10352         * guile/scm-type.c (tyscm_scm_to_type): New function.
10353
10354 2017-03-15  Doug Evans  <dje@google.com>
10355
10356         PR python/17728, python/18439, python/18779
10357         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10358         member.  Change type of TYPE member to PyObject *.  All uses updated.
10359         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10360         (gdbpy_create_lazy_string_object): Flag bad length values.
10361         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10362         Handle typedefs in incoming type.
10363         (stpy_lazy_string_elt_type): New function.
10364         (gdbpy_extract_lazy_string): Call it.
10365         * python/py-value.c (valpy_lazy_string): Flag bad length values.
10366         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
10367         typedefs in incoming type.
10368
10369 2017-03-16  Doug Evans  <dje@google.com>
10370
10371         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10372         * guile/scm-type.c (tyscm_scm_to_type): New function.
10373
10374 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
10375
10376         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10377         "ULONGEST" for "skip".
10378
10379 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10380
10381         PR gdb/21220
10382         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10383         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10384         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
10385         over ptrace peek/poke until end of buffer or error.
10386
10387 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
10388
10389         * parse.c (length_of_subexp): Make static.
10390         * parser-defs.h (length_of_subexp): Remove.
10391
10392 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10393
10394         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10395         as well.
10396
10397 2017-03-14  Pedro Alves  <palves@redhat.com>
10398
10399         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10400         (main): Use std::unique_ptr.  Remove calls to
10401         cp_demangled_name_parse_free.
10402
10403 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10404
10405         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10406         alphabsd_store_inferior_registers): Use regcache->ptid instead
10407         of inferior_ptid.
10408
10409 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10410
10411         * aix-thread.c (aix_thread_fetch_registers,
10412         aix_thread_store_registers): Use regcache->ptid instead of
10413         inferior_ptid.
10414
10415 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10416
10417         * aarch64-linux-nat.c (fetch_gregs_from_thread,
10418         store_gregs_to_thread, fetch_fpregs_from_thread,
10419         store_fpregs_to_thread): Use regcache->ptid instead of
10420         inferior_ptid.
10421
10422 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10423
10424         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10425         amd64_linux_fetch_inferior_registers): Use regcache->ptid
10426         instead of inferior_ptid.
10427
10428 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10429
10430         * target.c (target_fetch_registers, target_store_registers): Add
10431         assert.
10432
10433 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10434
10435         * regcache.h (regcache_get_ptid): New function.
10436         * regcache.c (regcache_get_ptid): New function.
10437
10438 2017-03-13  Mark Wielaard  <mark@klomp.org>
10439
10440         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10441
10442 2017-03-10  Keith Seitz  <keiths@redhat.com>
10443
10444         PR c++/8218
10445         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10446
10447 2017-03-08  Pedro Alves  <palves@redhat.com>
10448
10449         PR gdb/18360
10450         * infrun.c (start_step_over, do_target_resume, resume)
10451         (restart_threads): Assert we're not resuming a thread that is
10452         meant to be stopped.
10453         (infrun_thread_stop_requested_callback): Delete.
10454         (infrun_thread_stop_requested): If the thread is internally
10455         stopped, queue a pending stop event and clear the thread's
10456         inline-frame state.
10457         (handle_stop_requested): New function.
10458         (handle_syscall_event, handle_inferior_event_1): Use
10459         handle_stop_requested.
10460         (handle_stop_requested): New function.
10461         (handle_signal_stop): Set the thread's stop_signal here instead of
10462         at caller.
10463         (finish_step_over): Clear step over info unconditionally.
10464         (handle_signal_stop): If the user had interrupted the event
10465         thread, consider the stop a random signal.
10466         (handle_signal_stop) <signal arrived while stepping over
10467         breakpoint>: Don't restart threads here.
10468         (stop_waiting): Don't clear step-over info here.
10469
10470 2017-03-08  Pedro Alves  <palves@redhat.com>
10471
10472         PR 21206
10473         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10474         goes to argument 2, not 1.
10475
10476 2017-03-08  Pedro Alves  <palves@redhat.com>
10477
10478         PR cli/21218
10479         * top.c (gdb_readline_wrapper): Avoid passing NULL to
10480         display_gdb_prompt.
10481         (command_line_input): Add comment.
10482
10483 2017-03-08  Pedro Alves  <palves@redhat.com>
10484
10485         PR tui/21216
10486         * tui/tui-file.c (tui_file::write): New.
10487         * tui/tui-file.h (tui_file): Override "write".
10488         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10489         factored out from ...
10490         (tui_puts): ... here.
10491         (tui_putc): Use them.
10492         (tui_write): New function.
10493         * tui/tui-io.h (tui_write): Declare.
10494
10495 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10496
10497         * Makefile.in (SFILES): Replace "environ.c" with
10498         "common/environ.c".
10499         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10500         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
10501         to...
10502         * common/environ.c: ... here.
10503         * environ.h: Moved to...
10504         * common/environ.h: ... here.
10505
10506 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10507
10508         * gdbarch.sh (pstring_ptr): New static function.
10509         (gdbarch_disassembler_options): Use it.
10510         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10511         not valid_disassembler_option->name.
10512         * gdbarch.c: Regenerate.
10513
10514 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10515
10516         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10517
10518 2017-03-07  Pedro Alves  <palves@redhat.com>
10519
10520         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10521
10522 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10523
10524         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10525         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10526         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10527         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10528
10529 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
10530
10531         * xtensa-linux-nat.c (fetch_gregs): Remove const.
10532
10533 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
10534
10535         * remote.c (remote_add_target_side_commands): Use range-based
10536         for loop.
10537
10538 2017-03-03  Yao Qi  <yao.qi@linaro.org>
10539
10540         PR gdb/21165
10541         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10542         value is lazy.
10543         * valprint.c (common_val_print): Likewise.
10544
10545 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
10546
10547         * NEWS: Mention new set/show disassembler-options commands.
10548         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10549         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10550         (prospective_options): New static variable.
10551         (gdb_disassembler::gdb_disassembler): Initialize
10552         m_di.disassembler_options.
10553         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10554         (get_disassembler_options): New function.
10555         (set_disassembler_options): Likewise.
10556         (set_disassembler_options_sfunc): Likewise.
10557         (show_disassembler_options_sfunc): Likewise.
10558         (disassembler_options_completer): Likewise.
10559         (_initialize_disasm): Likewise.
10560         * disasm.h (get_disassembler_options): New prototype.
10561         (set_disassembler_options): Likewise.
10562         * gdbarch.sh (gdbarch_disassembler_options): New variable.
10563         (gdbarch_verify_disassembler_options): Likewise.
10564         * gdbarch.c: Regenerate.
10565         * gdbarch.h: Likewise.
10566         * arm-tdep.c (num_disassembly_options): Delete.
10567         (set_disassembly_style): Likewise.
10568         (arm_disassembler_options): New static variable.
10569         (set_disassembly_style_sfunc): Convert short style name into long
10570         option name.  Call set_disassembler_options.
10571         (show_disassembly_style_sfunc): New function.
10572         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10573         set_gdbarch_verify_disassembler_options.
10574         (_initialize_arm_tdep): Delete regnames variable and update callers.
10575         (arm_disassembler_options): Initialize.
10576         (disasm_options): New variable.
10577         (num_disassembly_options): Rename from this...
10578         (num_disassembly_styles): ...to this.  Compute by scanning through
10579         disasm_options.
10580         (valid_disassembly_styles): Initialize using disasm_options.
10581         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10582         set_arm_regname_option.
10583         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10584         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10585         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10586         set_gdbarch_verify_disassembler_options.
10587         * s390-tdep.c (s390_disassembler_options): New static variable.
10588         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10589         set_gdbarch_verify_disassembler_options.
10590
10591 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10592
10593         * remote.c (remote_add_target_side_condition): Remove "struct"
10594         keyword from range-based for loop.
10595
10596 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10597
10598         * remote.c (remote_add_target_side_condition): Use range-based
10599         for loop.  Update comment.
10600
10601 2017-02-27  Yao Qi  <yao.qi@linaro.org>
10602
10603         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10604
10605 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
10606
10607         * regcache.c (regcache_raw_update): New function.
10608         (regcache_raw_read): Move code to regcache_raw_update.
10609         * regcache.h (regcache_raw_update): New declaration.
10610         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10611
10612 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
10613
10614         * dwarf2read.c (create_debug_type_hash_table): Initialize
10615         header.signature and header.type_offset_in_tu.
10616
10617 2017-02-24  Pedro Alves  <palves@redhat.com>
10618
10619         * symtab.c (make_file_symbol_completion_list_1): Use
10620         add_symtab_completions.
10621
10622 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10623
10624         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10625
10626 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10627
10628         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10629         I386_MAX_REGISTER_SIZE.
10630         (i386_pseudo_register_write): Likewise.
10631         (i386_process_record): Likewise.
10632         * i387-tdep.c (i387_supply_xsave): Likewise.
10633         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10634         (store_register): Likewise.
10635
10636 2017-02-23  Pedro Alves  <palves@redhat.com>
10637
10638         * ada-lang.c: Include "common/function-view.h".
10639         (ada_iterate_over_symbols): Adjust to use function_view as
10640         callback type.
10641         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10642         (ada_make_symbol_completion_list): Use a lambda.
10643         (ada_exc_search_name_matches): Delete.
10644         (name_matches_regex): New.
10645         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10646         * compile/compile-c-support.c: Include "common/function-view.h".
10647         (print_one_macro): Change prototype to accept a ui_file pointer.
10648         (write_macro_definitions): Use a lambda.
10649         * dwarf2read.c: Include "common/function-view.h".
10650         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10651         (dw2_expand_symtabs_matching): Adjust to use function_view as
10652         callback type.
10653         * language.h: Include "common/function-view.h".
10654         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10655         function_view as callback type.
10656         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10657         * linespec.c: Include "common/function-view.h".
10658         (collect_info::add_symbol): New method.
10659         (struct symbol_and_data_callback, iterate_inline_only, struct
10660         symbol_matcher_data, iterate_name_matcher): Delete.
10661         (iterate_over_all_matching_symtabs): Adjust to use function_view
10662         as callback type and lambdas.
10663         (iterate_over_file_blocks): Adjust to use function_view as
10664         callback type.
10665         (decode_compound_collector): Now a class with private fields.
10666         (decode_compound_collector::release_symbols): New method.
10667         (collect_one_symbol): Rename to...
10668         (decode_compound_collector::operator()): ... this and adjust.
10669         (lookup_prefix_sym): decode_compound_collector construction bits
10670         move to decode_compound_collector ctor.  Pass the
10671         decode_compound_collector object directly as callback.  Remove
10672         cleanups and use decode_compound_collector::release_symbols
10673         instead.
10674         (symtab_collector): Now a class with private fields.
10675         (symtab_collector::release_symtabs): New method.
10676         (add_symtabs_to_list): Rename to...
10677         (symtab_collector::operator()): ... this and adjust.
10678         (collect_symtabs_from_filename): symtab_collector construction
10679         bits move to symtab_collector ctor.  Pass the symtab_collector
10680         object directly as callback.  Remove cleanups and use
10681         symtab_collector::release_symtabs instead.
10682         (collect_symbols): Delete.
10683         (add_matching_symbols_to_info): Use lambdas.
10684         * macrocmd.c (print_macro_callback): Delete.
10685         (info_macro_command): Use a lambda.
10686         (info_macros_command): Pass print_macro_definition as callable
10687         directly.
10688         (print_one_macro): Remove 'ignore' parameter.
10689         (macro_list_command): Adjust.
10690         * macrotab.c (macro_for_each_data::fn): Now a function_view.
10691         (macro_for_each_data::user_data): Delete field.
10692         (foreach_macro): Adjust to call the function_view.
10693         (macro_for_each): Adjust to use function_view as callback type.
10694         (foreach_macro_in_scope): Adjust to call the function_view.
10695         (macro_for_each_in_scope): Adjust to use function_view as callback
10696         type.
10697         * macrotab.h: Include "common/function-view.h".
10698         (macro_callback_fn): Declare a prototype instead of a pointer.
10699         Remove "user_data" parameter.
10700         (macro_for_each, macro_for_each_in_scope): Adjust to use
10701         function_view as callback type.
10702         * psymtab.c (partial_map_expand_apply)
10703         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10704         Adjust to use function_view as callback type and to return bool.
10705         (psym_expand_symtabs_matching): Adjust to use function_view as
10706         callback types.
10707         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10708         to use function_view as callback type and to return bool.
10709         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10710         callback types.
10711         * symfile.c (expand_symtabs_matching): Adjust to use function_view
10712         as callback types.
10713         * symfile.h: Include "common/function-view.h".
10714         (expand_symtabs_file_matcher_ftype)
10715         (expand_symtabs_symbol_matcher_ftype)
10716         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10717         return bool.
10718         (quick_symbol_functions::map_symtabs_matching_filename)
10719         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10720         function_view as callback type and return bool.
10721         (expand_symtabs_matching): Adjust to use function_view as callback
10722         type.
10723         (maintenance_expand_name_matcher)
10724         (maintenance_expand_file_matcher): Delete.
10725         (maintenance_expand_symtabs): Use lambdas.
10726         * symtab.c (iterate_over_some_symtabs): Adjust to use
10727         function_view as callback types and return bool.
10728         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
10729         of a cleanup.
10730         (lookup_symtab_callback): Delete.
10731         (lookup_symtab): Use a lambda.
10732         (iterate_over_symbols): Adjust to use function_view as callback
10733         type.
10734         (struct search_symbols_data, search_symbols_file_matches)
10735         (search_symbols_name_matches): Delete.
10736         (search_symbols): Use a pair of lambdas.
10737         (struct add_name_data, add_macro_name, symbol_completion_matcher)
10738         (symtab_expansion_callback): Delete.
10739         (default_make_symbol_completion_list_break_on_1): Use lambdas.
10740         * symtab.h: Include "common/function-view.h".
10741         (iterate_over_some_symtabs): Adjust to use function_view as
10742         callback type and return bool.
10743         (iterate_over_symtabs): Adjust to use function_view as callback
10744         type.
10745         (symbol_found_callback_ftype): Remove 'data' parameter and return
10746         bool.
10747         (iterate_over_symbols): Adjust to use function_view as callback
10748         type.
10749
10750 2017-02-23  Pedro Alves  <palves@redhat.com>
10751
10752         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10753         (%.o) <unittests/%.c>: New pattern.
10754         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10755         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10756         * common/function-view.h: New file.
10757         * unittests/function-view-selftests.c: New file.
10758         * configure: Regenerate.
10759
10760 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
10761
10762         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10763         inferior_ptid.
10764         * go32-nat.c (go32_thread_alive): Likewise.
10765
10766 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10767
10768         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10769         delete.
10770
10771 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10772
10773         * varobj.c (varobj_clear_saved_item): Use delete instead of
10774         xfree.
10775         (update_dynamic_varobj_children): Likewise.
10776
10777 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10778
10779         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10780
10781 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
10782
10783         * common/enum-flags.h (enum_flags::enum_flags): Initialize
10784         m_enum_value to 0 in default constructor.
10785
10786 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
10787
10788         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10789         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10790         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10791         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10792         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10793         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10794         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10795         IS_STORE_CONDITIONAL_INSN.
10796
10797 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10798
10799         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10800
10801 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10802
10803         * NEWS (Changes since GDB 7.12): Add DWARF-5.
10804
10805 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10806
10807         * dwarf2read.c (skip_one_die, read_attribute_value)
10808         (dwarf2_const_value_attr, dump_die_shallow)
10809         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10810         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10811
10812 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10813
10814         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10815         (dwarf_parse_macro_header): Accept DWARF version 5.
10816         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10817
10818 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10819
10820         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10821         DW_AT_GNU_*.
10822         * common/common-exceptions.h (enum errors): Likewise.
10823         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10824         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10825         (dwarf_expr_context::execute_stack_op): Likewise.
10826         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10827         Likewise.
10828         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10829         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10830         (show_entry_values_debug, call_site_to_target_addr)
10831         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10832         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10833         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10834         (value_of_dwarf_block_entry, indirect_pieced_value)
10835         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10836         (disassemble_dwarf_expression): Likewise.
10837         * dwarf2read.c (process_die, inherit_abstract_dies)
10838         (read_call_site_scope): Likewise.
10839         * gdbtypes.h (struct func_type, struct call_site_parameter)
10840         (struct call_site): Likewise.
10841         * stack.c (read_frame_arg): Likewise.
10842         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10843
10844 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10845
10846         * defs.h (read_unsigned_leb128): New declaration.
10847         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10848         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10849         (dwarf2_find_location_expression): Call also
10850         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
10851         * dwarf2loc.h (dwarf2_version): New declaration.
10852         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10853         rnglists.
10854         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10855         .debug_rnglists.
10856         (struct dwop_section_names): Add loclists_dwo.
10857         (dwop_section_names): Add .debug_loclists.dwo.
10858         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10859         (struct dwarf2_per_cu_data): Add dwarf_version.
10860         (struct dwo_sections): Add loclists.
10861         (struct attr_abbrev): Add implicit_const.
10862         (read_indirect_line_string): New declaration.
10863         (read_unsigned_leb128): Delete declaration.
10864         (rcuh_kind): New definition.
10865         (read_and_check_comp_unit_head): Change parameter
10866         is_debug_types_section to section_kind.
10867         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10868         (read_comp_unit_head): Change parameter abfd to section, add parameter
10869         section_kind.  Handle DWARF-5.
10870         (error_check_comp_unit_head): Accept also DWARF version 5.
10871         (read_and_check_comp_unit_head): Change parameter
10872         is_debug_types_section to section_kind.
10873         (read_and_check_type_unit_head): Delete function.
10874         (read_abbrev_offset): Handle DWARF-5.
10875         (create_debug_type_hash_table): Add parameter section_kind.  Process
10876         only DW_UT_type.  Use signature and type_offset_in_tu from struct
10877         comp_unit_head.
10878         (create_debug_types_hash_table): Update create_debug_type_hash_table
10879         caller.
10880         (create_all_type_units): Call create_debug_type_hash_table.
10881         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10882         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10883         caller.
10884         (skip_one_die): Handle DW_FORM_implicit_const.
10885         (dwarf2_rnglists_process): New function.
10886         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10887         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10888         (read_attribute_value): Handle DW_FORM_implicit_const,
10889         DW_FORM_line_strp.
10890         (read_attribute): Handle DW_FORM_implicit_const.
10891         (read_indirect_string_at_offset_from): New function from
10892         read_indirect_string_at_offset.
10893         (read_indirect_string_at_offset): Call
10894         read_indirect_string_at_offset_from.
10895         (read_indirect_line_string_at_offset): New function.
10896         (read_indirect_string): New function comment.
10897         (read_indirect_line_string): New function.
10898         (read_unsigned_leb128): Make it global.
10899         (dwarf2_string_attr): Handle DWARF-5.
10900         (add_include_dir_stub, read_formatted_entries): New functions.
10901         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10902         Handle DWARF-5.
10903         (per_cu_header_read_in): Update read_comp_unit_head caller.
10904         (dwarf2_version): New function.
10905         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10906         rnglists.
10907         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10908         fields.
10909
10910 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10911
10912         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10913
10914 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10915
10916         * dwarf2read.c (dwarf2_ranges_process): New function from
10917         dwarf2_ranges_read.
10918         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10919         dwarf2_ranges_process.
10920
10921 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10922
10923         * dwarf2read.c (create_debug_type_hash_table): New function from
10924         create_debug_types_hash_table.
10925         (create_debug_types_hash_table): Call create_debug_type_hash_table.
10926         (create_all_type_units, open_and_init_dwo_file): Update
10927         create_debug_types_hash_table callers.
10928
10929 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10930
10931         PR gdb/16188
10932         * fork-child.c (trace_start_error): Fix thinko.  va_end should
10933         refer to 'ap', not 'args'.
10934
10935 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10936             Pedro Alves  <palves@redhat.com>
10937
10938         PR gdb/16188
10939         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10940         calls succeeded.
10941         * fork-child.c (trace_start_error): New function.
10942         (trace_start_error_with_name): Likewise.
10943         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10944         * inf-ptrace.c (inf_ptrace_me): Likewise.
10945         * inferior.h (trace_start_error): New prototype.
10946         (trace_start_error_with_name): Likewise.
10947
10948 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
10949
10950         PR gdb/21164
10951         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10952         NULL before using it.
10953         * symmisc.c (maintenance_print_symbols): Likewise.
10954         (maintenance_print_msymbols): Likewise.
10955
10956 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10957
10958         * NEWS: Add record Python bindings entry.
10959
10960 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10961
10962         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10963         py-record-full.o.
10964         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10965         * python/py-record-btrace.c, python/py-record-btrace.h,
10966         python/py-record-full.c, python/py-record-full.h: New file.
10967         * python/py-record.c: Add include for py-record-btrace.h and
10968         py-record-full.h.
10969         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10970         recpy_instruction_history, recpy_function_call_history, recpy_begin,
10971         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10972         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10973         New definition.
10974         (gdbpy_initialize_btrace): New export.
10975         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10976
10977 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10978
10979         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10980         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10981         * python/py-record.c: New file.
10982         * python/python-internal.h (gdbpy_start_recording,
10983         gdbpy_current_recording, gdpy_stop_recording,
10984         gdbpy_initialize_record): New export.
10985         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10986         (python_GdbMethods): Add gdbpy_start_recording,
10987         gdbpy_current_recording and gdbpy_stop_recording.
10988
10989 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10990
10991         * record-btrace.c (record_btrace_record_method): New function.
10992         (init_record_btrace_ops): Initialize to_record_method.
10993         * record-full.c (record_full_record_method): New function.
10994         (init_record_full_ops, init_record_full_core_ops): Add
10995         record_full_record_method.
10996         * record.h (enum record_method): New enum.
10997         * target-debug.h (target_debug_print_enum_record_method: New define.
10998         * target-delegates.c: Regenerate.
10999         * target.c (target_record_method): New function.
11000         * target.h: Include record.h.
11001         (struct target_ops) <to_record_method>: New field.
11002         (target_record_method): New export.
11003
11004 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11005
11006         * record.h (record_start, record_stop): New export.
11007         * record.c (record_start, record_stop): New function.
11008
11009 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11010
11011         * btrace.c (btrace_fetch): Copy function call segments pointer
11012         into a vector.
11013         (btrace_clear): Clear the vector.
11014         (btrace_find_insn_by_number): Use binary search to find the correct
11015         function call segment.
11016         * btrace.h (brace_fun_p): New typedef.
11017         (struct btrace_thread_info) <functions>: New field.
11018
11019 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11020
11021         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11022         * btrace.c (btrace_decode_error): ... here.  New function.
11023         * btrace.h (btrace_decode_error): New export.
11024
11025 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11026
11027         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11028         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11029         btrace_find_insn_by_number): Remove special case for gaps.
11030         * btrace.h (btrace_insn_get_error): New export.
11031         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11032         * record-btrace.c (btrace_insn_history): Print number for gaps.
11033         (record_btrace_info, record_btrace_goto): Handle gaps.
11034
11035 2017-02-14  Tom Tromey  <tom@tromey.com>
11036
11037         PR python/13598:
11038         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11039         event.
11040         * python/py-evts.c (gdbpy_initialize_py_events): Add
11041         before_prompt registry.
11042         * python/py-events.h (events_object) <before_prompt>: New field.
11043
11044 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
11045
11046         * btrace.c (ftrace_new_switch): Preserve up link and flags.
11047
11048 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
11049
11050         * symfile (_initialize_symfile): Add usage text to the load command's
11051         help text.
11052
11053 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
11054
11055         * utils.c (defaulted_query): Don't query on secondary UIs.
11056
11057 2017-02-10  Tom Tromey  <tom@tromey.com>
11058
11059         * rust-lang.c (rust_get_disr_info): Remove unused variable.
11060
11061 2017-02-10  Tom Tromey  <tom@tromey.com>
11062
11063         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11064         "cleanup" local.
11065         * python/py-type.c (typy_legacy_template_argument): Remove
11066         unnecessary "cleanup" local.
11067
11068 2017-02-10  Tom Tromey  <tom@tromey.com>
11069
11070         * python/python.c (do_start_initialization): New function, from
11071         _initialize_python.
11072         (_initialize_python): Call do_start_initialization.
11073         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11074         goto.
11075
11076 2017-02-10  Tom Tromey  <tom@tromey.com>
11077
11078         * python/py-prettyprint.c (pretty_print_one_value): Use
11079         gdbpy_ref.
11080
11081 2017-02-10  Tom Tromey  <tom@tromey.com>
11082
11083         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11084         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11085         gdbpy_ref.
11086         * python/py-type.c (field_new): Use gdbpy_ref.
11087         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11088         gdbpy_ref.
11089         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11090         (py_free_pspace): Likewise.
11091         (pspace_to_pspace_object): Likewise.
11092         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11093         (py_free_objfile): Likewise.
11094         (objfile_to_objfile_object): Likewise.
11095         * python/py-inferior.c (delete_thread_object): Use
11096         gdbpy_ref.
11097         (infpy_read_memory): Likewise.
11098         (py_free_inferior): Likewise.
11099         * python/py-evtregistry.c (create_eventregistry_object): Use
11100         gdbpy_ref.
11101         * python/py-event.c (create_event_object): Use gdbpy_ref.
11102
11103 2017-02-10  Tom Tromey  <tom@tromey.com>
11104
11105         * python/py-ref.h (gdbpy_ref_policy): Now a template.
11106         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11107         used.
11108         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11109         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11110         python/py-exitedevent.c, python/py-finishbreakpoint.c,
11111         python/py-framefilter.c, python/py-function.c,
11112         python/py-inferior.c, python/py-infevents.c,
11113         python/py-linetable.c, python/py-newobjfileevent.c,
11114         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11115         python/py-signalevent.c, python/py-stopevent.c,
11116         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11117         python/py-unwind.c, python/py-utils.c, python/py-value.c,
11118         python/py-varobj.c, python/py-xmethods.c, python/python.c,
11119         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11120
11121 2017-02-10  Tom Tromey  <tom@tromey.com>
11122
11123         * ui-out.h (ui_out_emit_type): New class.
11124         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11125         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11126         and ui_out_emit_tuple.
11127         (enumerate_locals): Likewise.
11128         (py_mi_print_variables, py_print_locals, py_print_args): Use
11129         ui_out_emit_list.
11130         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11131         ui_out_emit_list.
11132         * common/gdb_optional.h: New file.
11133
11134 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11135
11136         * MAINTAINERS (Write After Approval): Update my e-mail address.
11137
11138 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11139
11140         PR gdb/21122
11141         * breakpoint.c (_initialize_breakpoint): Update the help description
11142         of the 'commands' command to indicate that it takes a list argument.
11143
11144 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11145
11146         * interps.c (current_interp_set_logging): Remove "return".
11147
11148 2017-02-09  Gary Benson  <gbenson@redhat.com>
11149
11150         * symtab.c (add_symtab_completions): Prevent NULL pointer
11151         dereference.
11152
11153 2017-02-08  Pedro Alves  <palves@redhat.com>
11154
11155         * interps.c (interp::interp): Remove reference to quiet_p.
11156         (interp_set): Make static.  Remove dead "Switching to" output
11157         code.
11158         (interp_quiet_p, interp_set_quiet): Delete.
11159         (interpreter_exec_cmd): Don't set the interpreter quiet.
11160         * interps.h (interp_quiet_p): Make static.
11161         (class interp) <quiet_p>: Remove field
11162
11163 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11164
11165         * cli/cli-decode.c (find_command_name_length): Make it extern.
11166         * cli/cli-decode.h (find_command_name_length): Declare.
11167         * cli/cli-script.c (command_name_equals, line_first_arg):
11168         New functions.
11169         (process_next_line): Use cli-decode to parse command names.
11170         (build_command_line): Make args a constant pointer.
11171
11172 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11173
11174         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11175         Remove case-insensitive search.
11176
11177 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11178
11179         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11180         at the end of the line.  Avoids an ARI warning.
11181
11182 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11183
11184         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11185         rdseed instructions.
11186         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11187
11188 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11189
11190         PR tdep/20936
11191         Provide and use sparc32 and sparc64 target description XML files.
11192         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11193         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11194         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11195         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11196         * features/sparc/sparc32-solaris.xml: New file.
11197         * features/sparc/sparc64-solaris.xml: New file.
11198         * features/sparc/sparc32-solaris.c: Generated.
11199         * features/sparc/sparc64-solaris.c: Generated.
11200         * sparc-tdep.h: Account for differences in target descriptions.
11201         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11202         (sparc32_register_type): Use target provided registers.
11203         (validate_tdesc_registers): New function.
11204         (sparc32_gdbarch_init): Use tdesc_has_registers.
11205         Set pseudoregister functions.
11206         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11207         (sparc64_register_type): Use target provided registers.
11208         (sparc64_init_abi): Set pseudoregister functions.
11209
11210 2017-02-03  Tom Tromey  <tom@tromey.com>
11211
11212         PR rust/21097:
11213         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11214         with a single member.
11215
11216 2017-02-03  Pedro Alves  <palves@redhat.com>
11217
11218         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11219         (cli_interp_base::~cli_interp_base): New.
11220         (cli_interp): New struct.
11221         (as_cli_interp): Cast the interp itself to cli_interp.
11222         (cli_interpreter_pre_command_loop): Rename to ...
11223         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11224         parameter.
11225         (cli_interpreter_init): Rename to ...
11226         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11227         boolean.  Make extern.
11228         (cli_interpreter_resume): Rename to ...
11229         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11230         extern.
11231         (cli_interpreter_suspend): Rename to ...
11232         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11233         extern.
11234         (cli_interpreter_exec): Rename to ...
11235         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11236         extern.
11237         (cli_interpreter_supports_command_editing): Rename to ...
11238         (cli_interp_base::supports_command_editing): ... this.  Remove
11239         'interp' parameter.  Make extern.
11240         (cli_ui_out): Rename to ...
11241         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11242         Make extern.
11243         (cli_set_logging): Rename to ...
11244         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11245         parameter.  Make extern.
11246         (cli_interp_procs): Delete.
11247         (cli_interp_factory): Adjust to use "new".
11248         * cli/cli-interp.h: Include "interps.h".
11249         (struct cli_interp_base): New struct.
11250         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11251         (interp_new): Delete.
11252         (interp::interp, interp::~interp): New.
11253         (interp_set): Use bool, and return void.  Assume the interpreter
11254         has suspend, init and resume methods, and that the all return
11255         void.
11256         (set_top_level_interpreter): interp_set returns void.
11257         (interp_ui_out): Adapt.
11258         (current_interp_set_logging): Adapt.
11259         (interp_data): Delete.
11260         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11261         (interp_exec): Adapt.
11262         (top_level_interpreter_data): Delete.
11263         * interps.h (interp_init_ftype, interp_resume_ftype)
11264         (interp_suspend_ftype, interp_exec_ftype)
11265         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11266         (class interp): New.
11267         (interp_new): Delete.
11268         (interp_set): Now returns void.  Use bool.
11269         (interp_data, top_level_interpreter_data): Delete.
11270         * mi/mi-common.h: Include interps.h.
11271         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11272         init, resume, suspect, exec, interp_ui_out, set_logging and
11273         pre_command_loop methods.
11274         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11275         (mi_interpreter_init): Rename to ...
11276         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11277         bool, return void and make extern.  Adjust.
11278         (mi_interpreter_resume): ... Rename to ...
11279         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11280         return void and make extern.  Adjust.
11281         (mi_interpreter_suspend): ... Rename to ...
11282         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11283         return void and make extern.  Adjust.
11284         (mi_interpreter_exec): ... Rename to ...
11285         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11286         extern.  Adjust.
11287         (mi_interpreter_pre_command_loop): ... Rename to ...
11288         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11289         parameter and make extern.
11290         (mi_on_normal_stop_1): Adjust.
11291         (mi_ui_out): Rename to ...
11292         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11293         parameter and make extern.  Adjust.
11294         (mi_set_logging): Rename to ...
11295         (mi_interp::set_logging): ... this.  Remove the 'interp'
11296         parameter and make extern.  Adjust.
11297         (mi_interp_procs): Delete.
11298         (mi_interp_factory): Adjust to use 'new'.
11299         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11300         (mi_print_exception, mi_execute_command, mi_load_progress):
11301         Adjust.
11302         * tui/tui-interp.c (tui_interp): New class.
11303         (as_tui_interp): Return a tui_interp pointer.
11304         (tui_on_normal_stop, tui_on_signal_received)
11305         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11306         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11307         to use interp::interp_ui_out.
11308         (tui_init): Rename to ...
11309         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11310         bool, return void and make extern.  Adjust.
11311         (tui_resume): Rename to ...
11312         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11313         return void and make extern.  Adjust.
11314         (tui_suspend): Rename to ...
11315         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11316         return void and make extern.  Adjust.
11317         (tui_ui_out): Rename to ...
11318         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11319         parameter, and make extern.  Adjust.
11320         (tui_exec): Rename to ...
11321         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11322         make extern.
11323         (tui_interp_procs): Delete.
11324         (tui_interp_factory): Use "new".
11325
11326 2017-02-02  Tom Tromey  <tom@tromey.com>
11327
11328         * rust-exp.y (ends_raw_string, space_then_number)
11329         (rust_identifier_start_p): Return bool.
11330         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11331         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11332         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11333         (rust_chartype_p): Return bool.
11334         (val_print_struct, rust_print_struct_def, rust_print_type):
11335         Update.
11336         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11337         Return bool.
11338
11339 2017-02-02  Tom Tromey  <tom@tromey.com>
11340
11341         * rust-lang.c: Reindent.
11342
11343 2017-02-02  Tom Tromey  <tom@tromey.com>
11344
11345         * rust-lang.h (rust_crate_for_block): Update.
11346         * rust-lang.c (rust_crate_for_block): Return std::string.
11347         (rust_get_disr_info): Use std:;string, not
11348         gdb::unique_xmalloc_ptr.
11349         * rust-exp.y (crate_name): Update.
11350
11351 2017-02-02  Pedro Alves  <palves@redhat.com>
11352
11353         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11354         field out of gdb_disassembler_test and make it static.
11355
11356 2017-02-02  Pedro Alves  <palves@redhat.com>
11357
11358         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11359         mi1_interp and mi_interp fields.
11360
11361 2017-02-02  Pedro Alves  <palves@redhat.com>
11362
11363         * cli/cli-interp.c (struct saved_output_files, saved_output):
11364         Moved from cli/cli-logging.c.
11365         (cli_set_logging): New function.
11366         (cli_interp_procs): Install cli_set_logging.
11367         * cli/cli-interp.h (make_logging_output, cli_set_logging):
11368         Declare.
11369         * cli/cli-logging.c (struct saved_output_files, saved_output):
11370         Moved to cli/cli-interp.c.
11371         (pop_output_files): Don't save outputs here.
11372         (make_logging_output): New function.
11373         (handle_redirections): Don't build tee nor save previous outputs
11374         here.
11375         * interps.c (current_interp_set_logging): Change prototype.
11376         Assume there's always a set_logging_proc method installed.
11377         * interps.h (interp_set_logging_ftype): Change prototype.
11378         (current_interp_set_logging): Change prototype and adjust comment.
11379         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
11380         use make_logging_output.
11381         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11382 2017-02-02  Pedro Alves  <palves@redhat.com>
11383
11384         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11385         from ...
11386         (set_logging_overwrite): ... here.
11387         (logging_no_redirect_file): Delete.
11388         (set_logging_redirect): Don't handle redirection on the fly.
11389         Instead warn that "logging off" / "logging on" is necessary.
11390         (pop_output_files): Delete references to logging_no_redirect_file.
11391         (show_logging_command): Always speak in terms of what will happen
11392         once logging is reenabled.
11393
11394 2017-02-02  Pedro Alves  <palves@redhat.com>
11395
11396         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11397
11398 2017-02-02  Pedro Alves  <palves@redhat.com>
11399
11400         * disasm.c (gdb_pretty_print_insn): Rename to ...
11401         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11402         Remove gdbarch parameter.  Adapt to clear the object's buffers
11403         instead of allocating new buffers, and to print using the object's
11404         gdb_disassembler instead of calling gdb_print_insn.
11405         (dump_insns): Use gdb_pretty_print_disassembler.
11406         * disasm.h (gdb_pretty_print_insn): Delete declaration.
11407         (gdb_pretty_print_disassembler): New class.
11408         * record-btrace.c (btrace_insn_history): Use
11409         gdb_pretty_print_disassembler.
11410
11411 2017-02-02  Pedro Alves  <palves@redhat.com>
11412
11413         * ada-lang.c (type_as_string): Use string_file.
11414         * ada-valprint.c (ada_print_floating): Use string_file.
11415         * ada-varobj.c (ada_varobj_scalar_image)
11416         (ada_varobj_get_value_image): Use string_file.
11417         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11418         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11419         * breakpoint.c (update_inserted_breakpoint_locations)
11420         (insert_breakpoint_locations, reattach_breakpoints)
11421         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11422         (print_it_watchpoint): Use string_file.
11423         (save_breakpoints): Use stdio_file.
11424         * c-exp.y (oper): Use string_file.
11425         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11426         tee_file.
11427         (pop_output_files): Use delete.
11428         (handle_redirections): Use stdio_file and tee_file.
11429         * cli/cli-setshow.c (do_show_command): Use string_file.
11430         * compile/compile-c-support.c (c_compute_program): Use
11431         string_file.
11432         * compile/compile-c-symbols.c (generate_vla_size): Take a
11433         'string_file &' instead of a 'ui_file *'.
11434         (generate_c_for_for_one_variable): Take a 'string_file &' instead
11435         of a 'ui_file *'.  Use string_file.
11436         (generate_c_for_variable_locations): Take a 'string_file &'
11437         instead of a 'ui_file *'.
11438         * compile/compile-internal.h (generate_c_for_for_one_variable):
11439         Take a 'string_file &' instead of a 'ui_file *'.
11440         * compile/compile-loc2c.c (push, pushf, unary, binary)
11441         (print_label, pushf_register_address, pushf_register)
11442         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11443         'ui_file *'.  Adjust.
11444         * compile/compile.c (compile_to_object): Use string_file.
11445         * compile/compile.h (compile_dwarf_expr_to_c)
11446         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11447         'ui_file *'.
11448         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11449         (replace_typedefs_qualified_name): Use string_file and
11450         obstack_copy0.
11451         * disasm.c (gdb_pretty_print_insn): Use string_file.
11452         (gdb_disassembly): Adjust reference the null_stream global.
11453         (do_ui_file_delete): Delete.
11454         (gdb_insn_length): Use null_stream.
11455         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11456         * dwarf2loc.c (dwarf2_compile_property_to_c)
11457         (locexpr_generate_c_location, loclist_generate_c_location): Take a
11458         'string_file &' instead of a 'ui_file *'.
11459         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11460         * dwarf2read.c (do_ui_file_peek_last): Delete.
11461         (dwarf2_compute_name): Use string_file.
11462         * event-top.c (gdb_setup_readline): Use stdio_file.
11463         * gdbarch.sh (verify_gdbarch): Use string_file.
11464         * gdbtypes.c (safe_parse_type): Use null_stream.
11465         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11466         string_file.
11467         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11468         'string_file *' instead of a 'ui_file *'.
11469         (gdbscm_arch_disassemble): Use string_file.
11470         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11471         * guile/scm-ports.c (class ioscm_file_port): Now a class that
11472         inherits from ui_file.
11473         (ioscm_file_port_delete, ioscm_file_port_rewind)
11474         (ioscm_file_port_put): Delete.
11475         (ioscm_file_port_write): Rename to ...
11476         (ioscm_file_port::write): ... this.  Remove file_port_magic
11477         checks.
11478         (ioscm_file_port_new): Delete.
11479         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11480         ui_file_up.
11481         * guile/scm-type.c (tyscm_type_name): Use string_file.
11482         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11483         Use string_file.
11484         * infcmd.c (print_return_value_1): Use string_file.
11485         * infrun.c (print_target_wait_results): Use string_file.
11486         * language.c (add_language): Use string_file.
11487         * location.c (explicit_to_string_internal): Use string_file.
11488         * main.c (captured_main_1): Use null_file.
11489         * maint.c (maintenance_print_architecture): Use stdio_file.
11490         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11491         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11492         event_channel>: Change type to mi_console_file pointer.
11493         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11494         (mi_console_file_delete): Delete.
11495         (struct mi_console_file): Delete.
11496         (mi_console_file_magic): Delete.
11497         (mi_console_file_new): Delete.
11498         (mi_console_file::mi_console_file): New.
11499         (mi_console_file_delete): Delete.
11500         (mi_console_file_fputs): Delete.
11501         (mi_console_file::write): New.
11502         (mi_console_raw_packet): Delete.
11503         (mi_console_file::flush): New.
11504         (mi_console_file_flush): Delete.
11505         (mi_console_set_raw): Rename to ...
11506         (mi_console_file::set_raw): ... this.
11507         * mi/mi-console.h (class mi_console_file): New class.
11508         (mi_console_file_new, mi_console_set_raw): Delete.
11509         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11510         (mi_set_logging): Use delete and tee_file.  Adjust.
11511         * mi/mi-main.c (output_register): Use string_file.
11512         (mi_cmd_data_evaluate_expression): Use string_file.
11513         (mi_cmd_data_read_memory): Use string_file.
11514         (mi_cmd_execute, print_variable_or_computed): Use string_file.
11515         * mi/mi-out.c (mi_ui_out::main_stream): New.
11516         (mi_ui_out::rewind): Use main_stream and
11517         string_file.
11518         (mi_ui_out::put): Use main_stream and string_file.
11519         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11520         Allocate a 'string_file' instead.
11521         (mi_out_new): Don't allocate a mem_fileopen stream here.
11522         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11523         (mi_ui_out::main_stream): Declare method.
11524         * printcmd.c (eval_command): Use string_file.
11525         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11526         * python/py-arch.c (archpy_disassemble): Use string_file.
11527         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11528         * python/py-frame.c (frapy_str): Use string_file.
11529         * python/py-framefilter.c (py_print_type, py_print_single_arg):
11530         Use string_file.
11531         * python/py-type.c (typy_str): Use string_file.
11532         * python/py-unwind.c (unwind_infopy_str): Use string_file.
11533         * python/py-value.c (valpy_str): Use string_file.
11534         * record-btrace.c (btrace_insn_history): Use string_file.
11535         * regcache.c (regcache_print): Use stdio_file.
11536         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11537         * remote.c (escape_buffer): Use string_file.
11538         * rust-lang.c (rust_get_disr_info): Use string_file.
11539         * serial.c (serial_open_ops_1): Use stdio_file.
11540         (do_serial_close): Use delete.
11541         * stack.c (print_frame_arg): Use string_file.
11542         (print_frame_args): Remove local mem_fileopen stream, not used.
11543         (print_frame): Use string_file.
11544         * symmisc.c (maintenance_print_symbols): Use stdio_file.
11545         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11546         Take a 'string_file *' instead of a 'ui_file *'.
11547         * top.c (new_ui): Use stdio_file and stderr_file.
11548         (free_ui): Use delete.
11549         (execute_command_to_string): Use string_file.
11550         (quit_confirm): Use string_file.
11551         * tracepoint.c (collection_list::append_exp): Use string_file.
11552         * tui/tui-disasm.c (tui_disassemble): Use string_file.
11553         * tui/tui-file.c: Don't include "ui-file.h".
11554         (enum streamtype, struct tui_stream): Delete.
11555         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11556         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11557         (tui_file::tui_file): New method.
11558         (tui_file_fputs): Delete.
11559         (tui_file_get_strbuf): Delete.
11560         (tui_file::puts): New method.
11561         (tui_file_adjust_strbuf): Delete.
11562         (tui_file_flush): Delete.
11563         (tui_file::flush): New method.
11564         * tui/tui-file.h: Tweak intro comment.
11565         Include ui-file.h.
11566         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11567         (tui_file_adjust_strbuf): Delete declarations.
11568         (class tui_file): New class.
11569         * tui/tui-io.c (tui_initialize_io): Use tui_file.
11570         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11571         (tui_register_format): Use string_stream.
11572         * tui/tui-stack.c (tui_make_status_line): Use string_file.
11573         (tui_get_function_from_frame): Use string_file.
11574         * typeprint.c (type_to_string): Use string_file.
11575         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11576         (null_stream): New global.
11577         (ui_file_delete): Delete.
11578         (ui_file::ui_file): New.
11579         (null_file_isatty): Delete.
11580         (ui_file::~ui_file): New.
11581         (null_file_rewind): Delete.
11582         (ui_file::printf): New.
11583         (null_file_put): Delete.
11584         (null_file_flush): Delete.
11585         (ui_file::putstr): New.
11586         (null_file_write): Delete.
11587         (ui_file::putstrn): New.
11588         (null_file_read): Delete.
11589         (ui_file::putc): New.
11590         (null_file_fputs): Delete.
11591         (null_file_write_async_safe): Delete.
11592         (ui_file::vprintf): New.
11593         (null_file_delete): Delete.
11594         (null_file::write): New.
11595         (null_file_fseek): Delete.
11596         (null_file::puts): New.
11597         (ui_file_data): Delete.
11598         (null_file::write_async_safe): New.
11599         (gdb_flush, ui_file_isatty): Adjust.
11600         (ui_file_put, ui_file_rewind): Delete.
11601         (ui_file_write): Adjust.
11602         (ui_file_write_for_put): Delete.
11603         (ui_file_write_async_safe, ui_file_read): Adjust.
11604         (ui_file_fseek): Delete.
11605         (fputs_unfiltered): Adjust.
11606         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11607         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11608         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11609         (set_ui_file_data): Delete.
11610         (string_file::~string_file, string_file::write)
11611         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11612         (do_ui_file_as_string, ui_file_as_string): Delete.
11613         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11614         (struct mem_file): Delete.
11615         (mem_file_new): Delete.
11616         (stdio_file::stdio_file): New.
11617         (mem_file_delete): Delete.
11618         (stdio_file::stdio_file): New.
11619         (mem_fileopen): Delete.
11620         (stdio_file::~stdio_file): New.
11621         (mem_file_rewind): Delete.
11622         (stdio_file::set_stream): New.
11623         (mem_file_put): Delete.
11624         (stdio_file::open): New.
11625         (mem_file_write): Delete.
11626         (stdio_file_magic, struct stdio_file): Delete.
11627         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11628         (stdio_file::flush): New.
11629         (stdio_file_read): Rename to ...
11630         (stdio_file::read): ... this.  Adjust.
11631         (stdio_file_write): Rename to ...
11632         (stdio_file::write): ... this.  Adjust.
11633         (stdio_file_write_async_safe): Rename to ...
11634         (stdio_file::write_async_safe) ... this.  Adjust.
11635         (stdio_file_fputs): Rename to ...
11636         (stdio_file::puts) ... this.  Adjust.
11637         (stdio_file_isatty): Delete.
11638         (stdio_file_fseek): Delete.
11639         (stdio_file::isatty): New.
11640         (stderr_file_write): Rename to ...
11641         (stderr_file::write) ... this.  Adjust.
11642         (stderr_file_fputs): Rename to ...
11643         (stderr_file::puts) ... this.  Adjust.
11644         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11645         (stderr_file::stderr_file): New.
11646         (tee_file_magic): Delete.
11647         (struct tee_file): Delete.
11648         (tee_file::tee_file): New.
11649         (tee_file_new): Delete.
11650         (tee_file::~tee_file): New.
11651         (tee_file_delete): Delete.
11652         (tee_file_flush): Rename to ...
11653         (tee_file::flush): ... this.  Adjust.
11654         (tee_file_write): Rename to ...
11655         (tee_file::write): ... this.  Adjust.
11656         (tee_file::write_async_safe): New.
11657         (tee_file_fputs): Rename to ...
11658         (tee_file::puts): ... this.  Adjust.
11659         (tee_file_isatty): Rename to ...
11660         (tee_file::isatty): ... this.  Adjust.
11661         * ui-file.h (struct obstack, struct ui_file): Don't
11662         forward-declare.
11663         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11664         (ui_file_write_ftype)
11665         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11666         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11667         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11668         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11669         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11670         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11671         (set_ui_file_fseek): Delete.
11672         (ui_file_data, ui_file_delete, ui_file_rewind)
11673         (struct ui_file): New.
11674         (ui_file_up): New.
11675         (class null_file): New.
11676         (null_stream): Declare.
11677         (ui_file_write_for_put, ui_file_put): Delete.
11678         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11679         Delete.
11680         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11681         (gdb_fopen, tee_file_new): Delete.
11682         (struct string_file): New.
11683         (struct stdio_file): New.
11684         (stdio_file_up): New.
11685         (struct stderr_file): New.
11686         (class tee_file): New.
11687         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11688         of a 'ui_file *'.  Adjust.
11689         * ui-out.h (class ui_out) <field_stream>: Likewise.
11690         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11691         (null_stream): Delete.
11692         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11693         Adjust.
11694         * utils.h (struct ui_file): Delete forward declaration..
11695         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11696         (error_stream): Take a 'string_file &' instead of a
11697         'ui_file *'.
11698         * varobj.c (varobj_value_get_print_value): Use string_file.
11699         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11700         * gdbarch.c: Regenerate.
11701
11702 2017-02-02  Pedro Alves  <palves@redhat.com>
11703
11704         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11705         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
11706         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
11707         Adjust to call gdb_print_insn instead of
11708         gdb_disassembler::print_insn.
11709         (dump_insns, do_mixed_source_and_assembly_deprecated)
11710         (do_mixed_source_and_assembly, do_assembly_only): Add back a
11711         'gdbarch' parameter.  Remove gdb_disassembler parameter.
11712         (gdb_disassembly): Don't allocate a gdb_disassembler here.
11713         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11714         declaration.
11715         (gdb_pretty_print_insn): Re-add declaration.
11716         * record-btrace.c (btrace_insn_history): Don't allocate a
11717         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
11718
11719 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
11720
11721         * disasm.h (gdb_disassembly): Remove file_string parameter.
11722         * disasm.c (gdb_disassembly): Likewise.
11723         * cli/cli-cmds.c (print_disassembly): Adapt.
11724         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11725         * stack.c (do_gdb_disassembly): Likewise.
11726
11727 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11728
11729         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11730         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11731         targets.  And if the implicit value is longer than needed, extract
11732         the first bytes instead of the "least significant" ones.
11733
11734 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11735
11736         * btrace.c (btrace_enable): Do not call btrace_add_pc for
11737         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11738         (btrace_fetch): Assert can_access_registers_ptid.
11739         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11740         validate_registers_access.
11741
11742 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11743
11744         * gdbthread.h (can_access_registers_ptid): New.
11745         * thread.c (can_access_registers_ptid): New.
11746
11747 2017-02-01  Pedro Alves  <palves@redhat.com>
11748
11749         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11750
11751 2017-01-31  Pedro Alves  <palves@redhat.com>
11752
11753         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11754         Fix typos.
11755
11756 2017-01-31  Pedro Alves  <palves@redhat.com>
11757
11758         * stack.c (print_frame_args): Remove local mem_fileopen stream,
11759         not used.
11760
11761 2017-01-31  Pedro Alves  <palves@redhat.com>
11762
11763         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11764
11765 2017-01-31  Pedro Alves  <palves@redhat.com>
11766
11767         * common/scoped_restore.h
11768         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11769         change the value's parameter type to T2.
11770         (make_scoped_restore): Likewise.
11771
11772 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11773             Richard Henderson  <rth@redhat.com>
11774
11775         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11776         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11777         GS_BASE for older kernels.
11778         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11779         GS_BASE for older kernels.
11780         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11781         and GS_BASE to the offset table.
11782         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11783         system register group.
11784         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11785         for older kernels.
11786         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11787         amd64 ABI.
11788         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11789         AMD64_GSBASE_REGNUM.
11790         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11791         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11792         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11793         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11794         i386/64bit-segments.xml in those rules.
11795         * features/i386/64bit-segments.xml: New file.
11796         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11797         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11798         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11799         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11800         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11801         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11802         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11803         * features/i386/amd64-avx-linux.c: Regenerated.
11804         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11805         * features/i386/amd64-avx-mpx.c: Regenerated.
11806         * features/i386/amd64-avx512-linux.c: Regenerated.
11807         * features/i386/amd64-linux.c: Regenerated.
11808         * features/i386/amd64-mpx-linux.c: Regenerated.
11809         * features/i386/i386-avx-mpx-linux.c: Regenerated.
11810         * features/i386/i386-avx-mpx.c: Regenerated.
11811         * features/i386/x32-avx-linux.c: Regenerated.
11812         * features/i386/x32-avx512-linux.c: Regenerated.
11813         * regformats/i386/amd64-avx-linux.dat: Regenerated.
11814         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11815         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11816         * regformats/i386/amd64-linux.dat: Regenerated.
11817         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11818         * regformats/i386/x32-avx-linux.dat: Regenerated.
11819         * regformats/i386/x32-avx512-linux.dat: Regenerated.
11820         * regformats/i386/x32-linux.dat: Regenerated.
11821
11822 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11823
11824         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11825         Set to AMD64_NUM_REGS.
11826
11827 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11828
11829         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11830         that checks validity of a register number.
11831
11832 2017-01-27  Kees Cook  <keescook@google.com>
11833
11834         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11835         fetch_fpregs if target has fpa registers.
11836         (arm_linux_store_inferior_registers): Call store_fpregs if target
11837         has fpa registers.
11838
11839 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11840
11841         * cris-tdep.c (cris_gdbarch_init): Remove check for
11842         info.byte_order and force it to BFD_ENDIAN_LITTLE.
11843
11844 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
11845
11846         * corelow.c (get_core_register_section): Check for regset
11847         existence before checking for REGSET_VARIABLE_SIZE.
11848
11849 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11850             Pedro Alves  <palves@redhat.com>
11851
11852         PR gdb/20939
11853         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11854         call memory_error, save memaddr instead.
11855         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11856         negative, cal memory_error.
11857         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11858
11859 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11860
11861         * disasm-selftests.c (memory_error_test): New function.
11862         (_initialize_disasm_selftests): Register memory_error_test.
11863
11864 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11865
11866         * Makefile.in (SFILES): Add disasm-selftests.c and
11867         selftest-arch.c.
11868         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11869         * disasm-selftests.c: New file.
11870         * selftest-arch.c: New file.
11871         * selftest-arch.h: New file.
11872
11873 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11874
11875         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11876         to bfd_arch_mep.  Don't return 0 if section is not
11877         found.  Call print_insn_mep.
11878
11879 2017-01-26  Pedro Alves  <palves@redhat.com>
11880             Yao Qi  <yao.qi@linaro.org>
11881
11882         * arm-tdep.c: Include "disasm.h".
11883         (gdb_print_insn_arm): Update code to get gdbarch.
11884         * disasm.c (dis_asm_read_memory): Change it to
11885         gdb_disassembler::dis_asm_read_memory.
11886         (dis_asm_memory_error): Likewise.
11887         (dis_asm_print_address): Likewise.
11888         (gdb_pretty_print_insn): Change it to
11889         gdb_disassembler::pretty_print_insn.
11890         (dump_insns): Add one argument gdb_disassemlber.  All
11891         callers updated.
11892         (do_mixed_source_and_assembly_deprecated): Likewise.
11893         (do_mixed_source_and_assembly): Likewise.
11894         (do_assembly_only): Likewise.
11895         (gdb_disassembler::gdb_disassembler): New.
11896         (gdb_disassembler::print_insn): New.
11897         * disasm.h (class gdb_disassembler): New.
11898         (gdb_pretty_print_insn): Remove declaration.
11899         (gdb_disassemble_info): Likewise.
11900         * guile/scm-disasm.c (class gdbscm_disassembler): New.
11901         (gdbscm_disasm_read_memory_worker): Update.
11902         (gdbscm_disasm_read_memory): Update.
11903         (gdbscm_disasm_memory_error): Remove.
11904         (gdbscm_disasm_print_address): Remove.
11905         (gdbscm_disassembler::gdbscm_disassembler): New.
11906         (gdbscm_print_insn_from_port): Update.
11907         * mips-tdep.c: Include disasm.h.
11908         (gdb_print_insn_mips): Update code to get gdbarch.
11909         * record-btrace.c (btrace_insn_history): Update.
11910         * spu-tdep.c: Include disasm.h.
11911         (struct spu_dis_asm_data): Remove.
11912         (struct spu_dis_asm_info): New.
11913         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11914         SPU id.
11915         (gdb_print_insn_spu): Cast disassemble_info to
11916         spu_dis_asm_info.
11917
11918 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11919
11920         * disasm.c (do_ui_file_delete): Delete.
11921         (gdb_insn_length): Move code creating stream to ...
11922         * utils.c (null_stream): ... here.  New function.
11923         * utils.h (null_stream): Declare.
11924
11925 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
11926
11927         * python/py-inferior.c (find_thread_object): Return directly
11928         from the loop.  Remove "found" variable.
11929
11930 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
11931
11932         GDB 7.12.1 released.
11933
11934 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11935
11936         * python/py-function.c (fnpy_call): Reorder declarations to have
11937         the gdbpy_enter object declared first.
11938         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11939
11940 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11941
11942         PR python/21068
11943         * python/python-internal.h (PyMem_RawMalloc): Define for
11944         Python < 3.4.
11945         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11946         PyMem_RawMalloc instead of PyMem_Malloc.
11947
11948 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
11949             Luis Machado  <lgustavo@codesourcery.com>
11950
11951         * NEWS (New commands): Mention flash-erase.
11952         (New MI commands): Mention target-flash-erase.
11953         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11954         command.
11955         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11956         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11957         * target.c (flash_erase_command): New function.
11958         (initialize_targets): Add new flash-erase command.
11959         * target.h (flash_erase_command): New declaration.
11960
11961 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
11962
11963         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11964         HAVE_SYS_PROCFS_H is defined.
11965
11966 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11967
11968         * remote.c (struct cached_reg): Change data into a pointer.
11969         * (stop_reply_dtr): Free data pointers before deleting vector.
11970         (process_stop_reply): Likewise.
11971         (remote_parse_stop_reply): Allocate space for data
11972
11973 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11974
11975         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11976         MAX_REGISTER_SIZE.
11977         (amd64_pseudo_register_read_value): Likewise.
11978         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11979         (store_register_using_P): Likewise.
11980         * regcache.c (regcache_xfer_part): Likewise.
11981
11982 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
11983
11984         Split real and pseudo registers.
11985         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11986         (sparc32_pseudo_regnum): New enum.
11987         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11988         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11989         (SPARC32_CP0_REGISTERS): New macro.
11990         (sparc32_pseudo_register_name): New function.
11991         (sparc32_register_name): Use sparc32_pseudo_register_name.
11992         (sparc32_pseudo_register_type): New function.
11993         (sparc32_register_type): Use sparc32_pseudo_register_type.
11994         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11995         pseudo register numbers.
11996         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11997         (SPARC64_CP0_REGISTERS): New macro.
11998         (sparc64_pseudo_register_name): New function.
11999         (sparc64_register_name): Use sparc64_pseudo_register_name.
12000         (sparc64_pseudo_register_type): New function.
12001         (sparc64_register_type): Use sparc64_pseudo_register_type.
12002         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12003         pseudo register numbers.
12004         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12005         sparc64_store_arguments): Handle pseudo register numbers.
12006
12007 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12008
12009         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12010         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12011         output.
12012         (getpkt_or_notif_sane_1): Likewise.
12013
12014 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12015
12016         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12017         of CC.  Pass "-x c++-header" instead of "-x c".
12018
12019 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12020
12021         * remote.c (remote_can_async_p): Update comment.
12022
12023 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12024
12025         * linux-nat.c (linux_nat_can_async_p): Update comment.
12026
12027 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12028
12029         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12030
12031 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
12032
12033         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12034
12035 2017-01-10  Tom Tromey  <tom@tromey.com>
12036
12037         * python/py-type.c (typy_legacy_template_argument): Update.
12038         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12039         ~demangle_parse_info): Declare new members.
12040         (cp_demangled_name_to_comp): Return unique_ptr.
12041         (cp_demangled_name_parse_free)
12042         (make_cleanup_cp_demangled_name_parse_free)
12043         (cp_new_demangle_parse_info): Remove.
12044         * cp-support.c (do_demangled_name_parse_free_cleanup)
12045         (make_cleanup_cp_demangled_name_parse_free): Remove.
12046         (inspect_type, cp_canonicalize_string_full)
12047         (cp_canonicalize_string): Update.
12048         (mangled_name_to_comp): Change return type.
12049         (cp_class_name_from_physname, method_name_from_physname)
12050         (cp_func_name, cp_remove_params): Update.
12051         * cp-name-parser.y (demangle_parse_info): New constructor, from
12052         cp_new_demangle_parse_info.
12053         (~demangle_parse_info): New destructor, from
12054         cp_demangled_name_parse_free.
12055         (cp_merge_demangle_parse_infos): Update.
12056         (cp_demangled_name_to_comp): Change return type.
12057
12058 2017-01-10  Tom Tromey  <tom@tromey.com>
12059
12060         * top.c (prevent_dont_repeat): Change return type.
12061         * python/python.c (execute_gdb_command): Use std::string.
12062         Update.
12063         * guile/guile.c (gdbscm_execute_gdb_command): Update.
12064         * command.h (prevent_dont_repeat): Change return type.
12065         * breakpoint.c (bpstat_do_actions_1): Update.
12066
12067 2017-01-10  Tom Tromey  <tom@tromey.com>
12068
12069         * value.h (scoped_value_mark::~scoped_value_mark): Call
12070         free_to_mark.
12071         (scoped_value_mark::free_to_mark): New method.
12072         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12073         scoped_value_mark.
12074
12075 2017-01-10  Tom Tromey  <tom@tromey.com>
12076
12077         * python/py-value.c (valpy_dereference, valpy_referenced_value)
12078         (valpy_reference_value, valpy_const_value, valpy_get_address)
12079         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12080         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12081         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12082         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12083         scoped_value_mark.
12084         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12085         * value.h (scoped_value_mark): New class.
12086
12087 2017-01-10  Tom Tromey  <tom@tromey.com>
12088
12089         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12090         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12091         * psymtab.c (discard_psymtabs_upto): Remove.
12092         (make_cleanup_discard_psymtabs): Remove.
12093         (struct psymtab_state): Remove.
12094
12095 2017-01-10  Tom Tromey  <tom@tromey.com>
12096
12097         * record-full.c (record_full_save_cleanups): Remove.
12098         (record_full_save): Use gdb::unlinker.
12099         * gcore.c (do_bfd_delete_cleanup): Remove.
12100         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
12101         cleanups.
12102         * dwarf2read.c (unlink_if_set): Remove.
12103         (write_psymtabs_to_index): Use gdb::unlinker.
12104         * common/gdb_unlinker.h: New file.
12105
12106 2017-01-10  Tom Tromey  <tom@tromey.com>
12107
12108         * windows-tdep.c (windows_xfer_shared_library): Update.
12109         * windows-nat.c (windows_make_so): Update.
12110         * utils.h (make_cleanup_bfd_unref): Remove.
12111         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12112         * symfile.h (symfile_bfd_open)
12113         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12114         * symfile.c (read_symbols, symbol_file_add)
12115         (separate_debug_file_exists): Update.
12116         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12117         (generic_load, reread_symbols): Update.
12118         * symfile-mem.c (symbol_file_add_from_memory): Update.
12119         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12120         (spu_symbol_file_add_from_memory): Update.
12121         * solist.h (struct target_so_ops) <bfd_open>: Return
12122         gdb_bfd_ref_ptr.
12123         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12124         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12125         gdb_bfd_ref_ptr.
12126         (solib_map_sections, reload_shared_libraries_1): Update.
12127         * solib-svr4.c (enable_break): Update.
12128         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12129         * solib-frv.c (enable_break2): Update.
12130         * solib-dsbt.c (enable_break): Update.
12131         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12132         gdb_bfd_ref_ptr.
12133         (darwin_solib_get_all_image_info_addr_at_init): Update.
12134         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12135         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12136         * record-full.c (record_full_save): Update.
12137         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12138         * procfs.c (insert_dbx_link_bpt_in_file): Update.
12139         * minidebug.c (find_separate_debug_file_in_section): Return
12140         gdb_bfd_ref_ptr.
12141         * machoread.c (macho_add_oso_symfile): Change abfd to
12142         gdb_bfd_ref_ptr.
12143         (macho_symfile_read_all_oso): Update.
12144         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12145         (macho_symfile_read): Update.
12146         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12147         (jit_bfd_try_read_symtab): Update.
12148         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12149         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12150         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12151         gdb_bfd_ref_ptr.
12152         (gdb_bfd_ref_policy): New struct.
12153         (gdb_bfd_ref_ptr): New typedef.
12154         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12155         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12156         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12157         gdb_bfd_ref_ptr.
12158         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12159         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12160         (gcore_command): Update.
12161         * exec.c (exec_file_attach): Update.
12162         * elfread.c (elf_symfile_read): Update.
12163         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12164         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12165         (open_and_init_dwo_file): Update.
12166         (open_dwp_file): Return gdb_bfd_ref_ptr.
12167         (open_and_init_dwp_file): Update.
12168         * corelow.c (core_open): Update.
12169         * compile/compile-object-load.c (compile_object_load): Update.
12170         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12171         * coffread.c (coff_symfile_read): Update.
12172         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12173         gdb_bfd_ref_ptr.  Rename.
12174         (dump_bfd_file, restore_command): Update.
12175         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12176         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12177         (find_separate_debug_file_by_buildid): Update.
12178
12179 2017-01-10  Tom Tromey  <tom@tromey.com>
12180
12181         * common/gdb_ref_ptr.h: New file.
12182         * python/py-ref.h (struct gdbpy_ref_policy): New.
12183         (gdbpy_ref): Now a typedef.
12184
12185 2017-01-10  Tom Tromey  <tom@tromey.com>
12186
12187         * utils.h (make_cleanup_htab_delete): Don't declare.
12188         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12189         Remove.
12190         * linespec.c (decode_compound_collector): Add constructor,
12191         destructor.
12192         (lookup_prefix_sym): Remove cleanup.
12193         (symtab_collector): Add constructor, destructor.
12194         (collect_symtabs_from_filename): Remove cleanup.
12195         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12196         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12197         Use htab_up.
12198         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12199         * dwarf2read.c (dw2_expand_symtabs_matching)
12200         (dw2_map_symbol_filenames, dwarf_decode_macros)
12201         (write_psymtabs_to_index): Use htab_up.
12202         * dwarf2loc.c (func_verify_no_selftailcall)
12203         (call_site_find_chain_1, func_verify_no_selftailcall)
12204         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12205         std::vector, gdb::unique_xmalloc_ptr.
12206         (call_sitep): Remove typedef.
12207         (dwarf2_locexpr_baton_eval): Remove unused variable.
12208
12209 2017-01-10  Tom Tromey  <tom@tromey.com>
12210
12211         * python/python-internal.h (make_cleanup_py_decref)
12212         (make_cleanup_py_xdecref): Don't declare.
12213         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12214         (py_xdecref, make_cleanup_py_xdecref): Remove.
12215
12216 2017-01-10  Tom Tromey  <tom@tromey.com>
12217
12218         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12219         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12220
12221 2017-01-10  Tom Tromey  <tom@tromey.com>
12222
12223         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12224
12225 2017-01-10  Tom Tromey  <tom@tromey.com>
12226
12227         * python/py-utils.c (unicode_to_encoded_string)
12228         (python_string_to_target_string)
12229         (python_string_to_target_python_string)
12230         (python_string_to_host_string, gdbpy_obj_to_string)
12231         (get_addr_from_python): Use gdbpy_ref.
12232
12233 2017-01-10  Tom Tromey  <tom@tromey.com>
12234
12235         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12236         gdbpy_ref.
12237
12238 2017-01-10  Tom Tromey  <tom@tromey.com>
12239
12240         * python/python.c (eval_python_command, gdbpy_decode_line)
12241         (gdbpy_run_events, gdbpy_start_type_printers)
12242         (gdbpy_apply_type_printers): Use gdbpy_ref.
12243
12244 2017-01-10  Tom Tromey  <tom@tromey.com>
12245
12246         * python/py-param.c (get_doc_string, compute_enum_values): Use
12247         gdbpy_ref.
12248
12249 2017-01-10  Tom Tromey  <tom@tromey.com>
12250
12251         * python/py-inferior.c (find_thread_object, build_inferior_list):
12252         Use gdbpy_ref.
12253
12254 2017-01-10  Tom Tromey  <tom@tromey.com>
12255
12256         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12257
12258 2017-01-10  Tom Tromey  <tom@tromey.com>
12259
12260         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12261         gdbpy_ref.
12262
12263 2017-01-10  Tom Tromey  <tom@tromey.com>
12264
12265         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12266         extra incref.
12267         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12268         Use gdbpy_ref.
12269
12270 2017-01-10  Tom Tromey  <tom@tromey.com>
12271
12272         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12273         gdbpy_ref.
12274
12275 2017-01-10  Tom Tromey  <tom@tromey.com>
12276
12277         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12278         decref results of PyArg_ParseTupleAndKeywords.
12279
12280 2017-01-10  Tom Tromey  <tom@tromey.com>
12281
12282         * python/python.c (python_run_simple_file): Use
12283         unique_xmalloc_ptr, gdbpy_ref.
12284
12285 2017-01-10  Tom Tromey  <tom@tromey.com>
12286
12287         * python/py-prettyprint.c (print_stack_unless_memory_error)
12288         (print_string_repr, print_children): Use gdbpy_ref.
12289         (dummy_python_frame): New class.
12290         (dummy_python_frame::dummy_python_frame): Rename from
12291         push_dummy_python_frame.
12292         (py_restore_tstate): Remove.
12293
12294 2017-01-10  Tom Tromey  <tom@tromey.com>
12295
12296         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12297
12298 2017-01-10  Tom Tromey  <tom@tromey.com>
12299
12300         * python/python.c (ensure_python_env, restore_python_env):
12301         Remove.
12302         * python/python-internal.h (ensure_python_env): Don't declare.
12303         * varobj.h (varobj_ensure_python_env): Don't declare.
12304         * varobj.c (varobj_ensure_python_env): Remove.
12305
12306 2017-01-10  Tom Tromey  <tom@tromey.com>
12307
12308         * varobj.c (varobj_value_get_print_value): Use
12309         gdbpy_enter_varobj.
12310
12311 2017-01-10  Tom Tromey  <tom@tromey.com>
12312
12313         * python/py-prettyprint.c (print_string_repr, print_children):
12314         Update.
12315         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12316         of "encoding".
12317         * varobj.c (varobj_value_get_print_value): Update.
12318         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12319
12320 2017-01-10  Tom Tromey  <tom@tromey.com>
12321
12322         * varobj.c (varobj_get_display_hint)
12323         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12324         (varobj_set_visualizer, free_variable): Use
12325         gdbpy_enter_varobj.
12326
12327 2017-01-10  Tom Tromey  <tom@tromey.com>
12328
12329         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12330         (do_finish_initialization): New function.  Use gdbpy_ref.
12331         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12332         do_finish_initialization.
12333
12334 2017-01-10  Tom Tromey  <tom@tromey.com>
12335
12336         * python/py-param.c (get_set_value, get_show_value): Use
12337         gdbpy_enter, gdbpy_ref.
12338
12339 2017-01-10  Tom Tromey  <tom@tromey.com>
12340
12341         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12342
12343 2017-01-10  Tom Tromey  <tom@tromey.com>
12344
12345         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12346
12347 2017-01-10  Tom Tromey  <tom@tromey.com>
12348
12349         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12350         Use gdbpy_enter_varobj.
12351
12352 2017-01-10  Tom Tromey  <tom@tromey.com>
12353
12354         * varobj.c (gdbpy_enter_varobj): New constructor.
12355         * python/python-internal.h (gdbpy_enter_varobj): New class.
12356         * python/py-varobj.c (py_varobj_get_iterator): Use
12357         gdbpy_enter_varobj.
12358
12359 2017-01-10  Tom Tromey  <tom@tromey.com>
12360
12361         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12362         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12363         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12364         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12365         unique_xmalloc_ptr.
12366         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12367
12368 2017-01-10  Tom Tromey  <tom@tromey.com>
12369
12370         * python/py-xmethods.c (invoke_match_method): Use
12371         gdbpy_ref.
12372
12373 2017-01-10  Tom Tromey  <tom@tromey.com>
12374
12375         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12376         gdbpy_enter, gdbpy_ref.
12377
12378 2017-01-10  Tom Tromey  <tom@tromey.com>
12379
12380         * python/python.c (python_interactive_command): Use gdbpy_enter.
12381
12382 2017-01-10  Tom Tromey  <tom@tromey.com>
12383
12384         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12385         gdbpy_ref.
12386
12387 2017-01-10  Tom Tromey  <tom@tromey.com>
12388
12389         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12390         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12391
12392 2017-01-10  Tom Tromey  <tom@tromey.com>
12393
12394         * utils.h (htab_deleter): New struct.
12395         (htab_up): New typedef.
12396         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12397         gdbpy_enter, gdbpy_ref, htab_up.
12398
12399 2017-01-10  Tom Tromey  <tom@tromey.com>
12400
12401         * python/py-unwind.c (pending_frame_invalidate): Remove.
12402         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12403
12404 2017-01-10  Tom Tromey  <tom@tromey.com>
12405
12406         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12407         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12408
12409 2017-01-10  Tom Tromey  <tom@tromey.com>
12410
12411         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12412
12413 2017-01-10  Tom Tromey  <tom@tromey.com>
12414
12415         * python/python.c (gdbpy_eval_from_control_command)
12416         (gdbpy_source_script, gdbpy_run_events)
12417         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12418         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12419         gdbpy_enter.
12420
12421 2017-01-10  Tom Tromey  <tom@tromey.com>
12422
12423         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12424
12425 2017-01-10  Tom Tromey  <tom@tromey.com>
12426
12427         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12428
12429 2017-01-10  Tom Tromey  <tom@tromey.com>
12430
12431         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12432         (python_on_inferior_call_pre, python_on_inferior_call_post)
12433         (python_on_memory_change, python_on_register_change)
12434         (python_inferior_exit, python_new_objfile, add_thread_object)
12435         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12436
12437 2017-01-10  Tom Tromey  <tom@tromey.com>
12438
12439         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12440         (bpfinishpy_handle_exit): Use gdbpy_enter.
12441
12442 2017-01-10  Tom Tromey  <tom@tromey.com>
12443
12444         * python/py-cmd.c (cmdpy_destroyer)
12445         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12446         gdbpy_enter.
12447
12448 2017-01-10  Tom Tromey  <tom@tromey.com>
12449
12450         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12451         gdbpy_enter.
12452         (gdbpy_breakpoint_has_cond): Likewise.
12453
12454 2017-01-10  Tom Tromey  <tom@tromey.com>
12455
12456         * python/python.c (gdbpy_enter): New constructor.
12457         (~gdbpy_enter): New destructor.
12458         (restore_python_env, ensure_python_env): Rewrite.
12459         * python/python-internal.h (gdbpy_enter): New class.
12460
12461 2017-01-10  Tom Tromey  <tom@tromey.com>
12462
12463         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12464
12465 2017-01-10  Tom Tromey  <tom@tromey.com>
12466
12467         * python/py-value.c (value_has_field, get_field_flag)
12468         (get_field_type, valpy_getitem, convert_value_from_python): Use
12469         gdbpy_ref.
12470
12471 2017-01-10  Tom Tromey  <tom@tromey.com>
12472
12473         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12474         gdbpy_ref.
12475
12476 2017-01-10  Tom Tromey  <tom@tromey.com>
12477
12478         * python/py-prettyprint.c (search_pp_list)
12479         (find_pretty_printer_from_objfiles)
12480         (find_pretty_printer_from_progspace)
12481         (find_pretty_printer_from_gdb, find_pretty_printer)
12482         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12483         gdbpy_ref.
12484
12485 2017-01-10  Tom Tromey  <tom@tromey.com>
12486
12487         * python/py-param.c (call_doc_function): Use gdbpy_ref.
12488
12489 2017-01-10  Tom Tromey  <tom@tromey.com>
12490
12491         * python/py-linetable.c (build_line_table_tuple_from_pcs)
12492         (ltpy_get_all_source_lines): Use gdbpy_ref.
12493
12494 2017-01-10  Tom Tromey  <tom@tromey.com>
12495
12496         * python/py-framefilter.c (extract_sym, extract_value)
12497         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12498         gdbpy_ref.
12499
12500 2017-01-10  Tom Tromey  <tom@tromey.com>
12501
12502         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12503
12504 2017-01-10  Tom Tromey  <tom@tromey.com>
12505
12506         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12507
12508 2017-01-10  Tom Tromey  <tom@tromey.com>
12509
12510         * python/py-function.c (convert_values_to_python, fnpy_init): Use
12511         gdbpy_ref.
12512
12513 2017-01-10  Tom Tromey  <tom@tromey.com>
12514
12515         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12516
12517 2017-01-10  Tom Tromey  <tom@tromey.com>
12518
12519         * python/py-type.c (convert_field, make_fielditem, typy_fields)
12520         (typy_range): Use gdbpy_ref.
12521
12522 2017-01-10  Tom Tromey  <tom@tromey.com>
12523
12524         * python/py-threadevent.c (create_thread_event_object): Use
12525         gdbpy_ref.
12526         * python/py-stopevent.c (create_stop_event_object): Simplify.
12527         (emit_stop_event): Use gdbpy_ref.
12528         * python/py-signalevent.c (create_signal_event_object): Use
12529         gdbpy_ref.
12530         * python/py-newobjfileevent.c (create_new_objfile_event_object)
12531         (emit_new_objfile_event, create_clear_objfiles_event_object)
12532         (emit_clear_objfiles_event): Use gdbpy_ref.
12533         * python/py-infevents.c (create_inferior_call_event_object)
12534         (create_register_changed_event_object)
12535         (create_memory_changed_event_object, emit_inferior_call_event)
12536         (emit_memory_changed_event, emit_register_changed_event): Use
12537         gdbpy_ref.
12538         * python/py-exitedevent.c (create_exited_event_object)
12539         (emit_exited_event): Use gdbpy_ref.
12540         * python/py-event.h (evpy_emit_event): Remove
12541         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12542         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12543         * python/py-continueevent.c (emit_continue_event): Use
12544         gdbpy_ref.
12545         * python/py-breakpoint.c (gdbpy_breakpoint_created)
12546         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12547         gdbpy_ref.
12548         * python/py-bpevent.c (create_breakpoint_event_object): Use
12549         gdbpy_ref.
12550
12551 2017-01-10  Tom Tromey  <tom@tromey.com>
12552
12553         * python/py-ref.h: New file.
12554
12555 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12556
12557         * cli-out.c (cli_ui_out::do_redirect): Change return type to
12558         void.
12559         * cli-out.h (cli_ui_out::do_redirect): Likewise.
12560         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12561         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12562         * ui-out.c (ui_out::redirect): Likewise.
12563         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12564         * cli/cli-logging.c (set_logging_redirect): Update call site of
12565         ui_out::redirect.
12566         (handle_redirections): Likewise.
12567         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12568         * top.c (execute_command_to_string): Likewise.
12569         * utils.c (do_ui_out_redirect_pop): Likewise.
12570
12571 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12572
12573         * stack.c (_initialize_stack): Update "frame" command help message.
12574
12575 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
12576
12577         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12578
12579 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12580
12581         * x86-linux-nat.h: Include gdb_proc_service.h.
12582
12583 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12584
12585         * ser-base.h: Include serial.h.
12586
12587 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12588
12589         * ppc-linux-tdep.h: Include ppc-tdep.h.
12590
12591 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12592
12593         * nat/amd64-linux-siginfo.h: Include signal.h.
12594
12595 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12596
12597         * nat/aarch64-linux-hw-point.h: Include break-common.h.
12598
12599 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12600
12601         * mi/mi-parse.h: Include mi-cmds.h.
12602
12603 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12604
12605         * inf-loop.c: Don't include "target.h".
12606         * inf-loop.h: Include it here.
12607
12608 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12609
12610         * dfp.h: Include "dboulest.h" and "expression.h".
12611
12612 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12613
12614         * ax-gdb.h: Include "ax.h".
12615
12616 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12617
12618         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12619         with nat/gdb_ptrace.h.
12620
12621 2017-01-05  Yao Qi  <yao.qi@linaro.org>
12622
12623         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12624         new line.
12625         (mips64_fbsd_sigframe_init): Likewise.
12626
12627 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12628
12629         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12630         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12631
12632 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12633
12634         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12635         * NEWS: Mention new FreeBSD/mips native configuration.
12636         * config/mips/fbsd.mh: New file.
12637         * configure.host: Add mips*-*-freebsd*.
12638         * mips-fbsd-nat.c: New file.
12639
12640 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12641
12642         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12643         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12644         * NEWS: Mention new FreeBSD/mips target.
12645         * configure.tgt: Add mips*-*-freebsd*.
12646         * mips-fbsd-tdep.c: New file.
12647         * mips-fbsd-tdep.h: New file.
12648
12649 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12650
12651         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12652         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12653
12654 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12655
12656         Update copyright year range in all GDB files.
12657
12658 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12659
12660         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12661
12662 For older changes see ChangeLog-2016.
12663 \f
12664 Local Variables:
12665 mode: change-log
12666 left-margin: 8
12667 fill-column: 74
12668 version-control: never
12669 coding: utf-8
12670 End: