Fix crash in "run" on macOS when gdb is not signed
[external/binutils.git] / gdb / ChangeLog
1 2018-07-03  Tom Tromey  <tom@tromey.com>
2
3         PR cli/23340:
4         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5         inferior_ptid on error.
6
7 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
8             Simon Marchi  <simon.marchi@polymtl.ca>
9
10         PR tdep/8282
11         * disasm.h (gdb_disassembler): Add
12         `m_disassembler_options_holder'. member
13         * disasm.c (get_all_disassembler_options): New function.
14         (gdb_disassembler::gdb_disassembler): Use it.
15         (gdb_buffered_insn_length_init_dis): Likewise.
16         (gdb_buffered_insn_length): Adjust accordingly.
17         (set_disassembler_options): Handle options with arguments.
18         (show_disassembler_options_sfunc): Likewise.  Add a leading new
19         line if showing options with descriptions.
20         (disassembler_options_completer): Adapt to using the
21         `disasm_options_and_args_t' structure.
22         * mips-tdep.c (mips_disassembler_options): New variable.
23         (mips_disassembler_options_o32): Likewise.
24         (mips_disassembler_options_n32): Likewise.
25         (mips_disassembler_options_n64): Likewise.
26         (gdb_print_insn_mips): Don't set `disassembler_options'.
27         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
28         functions.
29         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
30         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
31         `gdbarch_disassembler_options_implicit' and
32         `gdbarch_valid_disassembler_options'.
33         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
34         `disasm_options_and_args_t' structure.
35         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
36         method.
37         (valid_disassembler_options): Switch from `disasm_options_t' to
38         the `disasm_options_and_args_t' structure.
39         * NEWS: Document `set disassembler-options' support for the MIPS
40         target.
41         * gdbarch.h: Regenerate.
42         * gdbarch.c: Regenerate.
43
44 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
45
46         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
47
48 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
49
50         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
51         parameter in call to amd64_target_description.
52         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
53         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
54         (amd64fbsd_init_abi): Likewise.
55         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
56         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
57         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
58         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
59
60 2018-06-29  Pedro Alves  <palves@redhat.com>
61
62         * gdb/amd64-tdep.h (amd64_create_target_description): Add
63         "segments" parameter.
64         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
65         (_initialize_amd64_tdep): Update call to
66         amd64_create_target_description.
67         (amd64_target_description): Add "segments" parameter.  Adjust
68         the implementation to use it.
69         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
70         call to amd64_create_target_description.
71         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
72         * gdb/arch/amd64.h (amd64_create_target_description): Add
73         "segments" register.
74         * gdb/arch/amd64.c (amd64_create_target_description): Add
75         "segments" parameter.  Call create_feature_i386_64bit_segments
76         only if SEGMENTS is true.
77         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
78         call to amd64_create_target_description.
79
80 2018-06-29  Pedro Alves  <palves@redhat.com>
81
82         * thread.c (thread_target_id_str): New, factored out from ...
83         (print_thread_info_1): ... here.  Use it to compute the max
84         "Target Id" column width.
85
86 2018-06-29  Pedro Alves  <palves@redhat.com>
87
88         * remote.c (remote_target::extra_thread_info): Delete
89         'display_buf' and 'n' locals.  from the cache, regardless of
90         packet mechanims is in use.  Use cache for qThreadExtra and qP
91         methods too.
92
93 2018-06-29  Pedro Alves  <palves@redhat.com>
94
95         * blockframe.c (find_pc_sect_containing_function): New function.
96         * breakpoint.c (print_breakpoint_location): Don't call
97         find_pc_sect_function.
98         * linespec.c (create_sals_line_offset): Record the location's
99         symbol in the sal.
100         * linespec.c (convert_address_location_to_sals): Fill in sal's
101         symbol with find_pc_sect_containing_function.
102         * symtab.c (find_function_start_sal): Rename to ...
103         (find_function_start_sal_1): ... this.
104         (find_function_start_sal): Reimplement as wrapper around
105         find_function_start_sal_1, and use
106         find_pc_sect_containing_function to fill in the sal's symbol.
107         (find_function_start_sal(symbol*, bool)): Adjust.
108         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
109         comments.
110         (find_pc_sect_containing_function): Declare.
111
112 2018-06-29  Pedro Alves  <palves@redhat.com>
113
114         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
115         true if the the location has no symbol.
116
117 2018-06-28  Tom Tromey  <tom@tromey.com>
118
119         * NEWS: Mention --enable-codesign.
120         * silent-rules.mk (ECHO_SIGN): New variable.
121         * configure.ac: Add --enable-codesign.
122         * configure: Rebuild.
123         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
124         (gdb$(EXEEXT)): Optionally invoke codesign.
125
126 2018-06-28  Pedro Alves  <palves@redhat.com>
127
128         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
129         comments.
130         (switch_to_thread_no_regs): Adjust comment.
131         * infcmd.c (stop_pc): Delete.
132         (post_create_inferior, info_program_command): Replace references
133         to stop_pc with references to thread_info->suspend.stop_pc.
134         * inferior.h (stop_pc): Delete declaration.
135         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
136         (handle_inferior_event_1, handle_signal_stop)
137         (process_event_stop_test, keep_going_stepped_thread)
138         (handle_step_into_function, handle_step_into_function_backward)
139         (print_stop_location): Replace references to stop_pc with
140         references to thread_info->suspend.stop_pc.
141         (struct infcall_suspend_state) <stop_pc>: Delete field.
142         (save_infcall_suspend_state, restore_infcall_suspend_state):
143         Remove references to inf_stat->stop_pc.
144         * linux-fork.c (fork_load_infrun_state): Likewise.
145         * record-btrace.c (record_btrace_set_replay): Likewise.
146         * record-full.c (record_full_goto_entry): Likewise.
147         * remote.c (print_one_stopped_thread): Likewise.
148         * target.c (target_resume): Extend comment.
149         * thread.c (set_executing_thread): New.
150         (set_executing): Use it.
151         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
152         Remove references to stop_pc.
153
154 2018-06-28  Pedro Alves  <palves@redhat.com>
155
156         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
157         Moving fetching stop_pc until after ecs->event_thread is refreshed.
158
159 2018-06-28  Tom Tromey  <tom@tromey.com>
160
161         * coffread.c (coff_symfile_finish): Update.
162         * xcoffread.c (xcoff_symfile_finish): Update.
163         * elfread.c (elf_symfile_finish): Update.
164         * symfile.h (dwarf2_free_objfile): Don't declare.
165         * dwarf2read.c (_initialize_dwarf2_read): Use
166         register_objfile_data_with_cleanup.
167         (dwarf2_free_objfile): Now static.  Change signature.
168
169 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
170
171         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
172         option "-o" to add-symbol-file-load to add an offset to each
173         section's load address.
174         * symfile.c (set_objfile_default_section_offset): New function.
175
176 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
177
178         * symfile.c (add_symbol_file_command): Make sure that sections
179         with the same name are sorted in the same order.
180
181 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
182
183         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
184         require the second argument.  If omitted, load sections at the
185         addresses specified in the file.
186
187 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
188
189         * symfile.c (symbol_file_command, symbol_file_add_main_1)
190         (_initialize_symfile): Add option "-o" to symbol-file to add an
191         offset to each section of the symbol file.
192
193 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
194
195         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
196
197 2018-06-27  Tom Tromey  <tom@tromey.com>
198
199         * stack.c (_initialize_stack): Update "func" help text.
200
201 2018-06-27  Tom Tromey  <tom@tromey.com>
202
203         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
204         std::vector.
205         (unwind_infopy_str, pyuw_create_unwind_info)
206         (unwind_infopy_add_saved_register, pyuw_sniffer)
207         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
208         Update.
209         (struct saved_reg): Add constructor.
210         <value>: Now a gdbpy_ref<>.
211
212 2018-06-27  Tom Tromey  <tom@tromey.com>
213
214         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
215
216 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
217
218         * gdb-gdb.py.in: Format using autopep8.
219
220 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
221
222         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
223         (type_lookup_function): Recognize CORE_ADDR values.
224
225 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
226
227         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
228         print tag_name.
229
230 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
231
232         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
233         <__lt__>: Add.
234
235 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
236
237         * gdb-gdb.py: Move to...
238         * gdb-gdb.py.in: ... here.
239         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
240         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
241         dependencies.
242         (distclean): Remove gdb-gdb.py when cleaning.
243         (gdb-gdb.py, gdb-gdb.gdb): New rules.
244         * configure: Re-generate.
245
246 2018-06-27  Pedro Alves  <palves@redhat.com>
247
248         * proc-service.c (get_ps_regcache): New.
249         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
250         (ps_lsetfpregs): Use it.
251
252 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
253
254         PR gdb/21695
255         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
256         (dwarf_decode_lines_1): Adjust.
257
258 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
259
260         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
261         override.
262         <info_proc>: Likewise.
263
264 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
265
266         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
267         to windows_fetch_one_register, and only handle the case of
268         fetching one register.  Move the code that reloads the context
269         and iterates over all registers if R is negative to...
270         (windows_nat_target::fetch_registers): ... here.
271         (do_windows_store_inferior_registers): Rename to
272         windows_store_one_register, and only handle the case of storing
273         one register.  Move the code that handles the case where r is
274         negative to...
275         (windows_nat_target::store_registers) ... here.
276
277 2018-06-26  Tom Tromey  <tom@tromey.com>
278
279         PR rust/22574:
280         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
281         * rust-lang.c (rust_print_struct_def): Add podata parameter.
282         Update.
283         (rust_internal_print_type): Add podata parameter.
284         (rust_print_type): Update.
285
286 2018-06-26  Tom Tromey  <tom@tromey.com>
287
288         * typeprint.h (struct print_offset_data) <update, finish,
289         maybe_print_hole>: New methods.
290         <indentation>: New constant.
291         * typeprint.c (print_offset_data::indentation): Define.
292         (print_offset_data::maybe_print_hole, print_offset_data::update)
293         (print_offset_data::finish): Move from c-typeprint.c and rename.
294         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
295         (print_spaces_filtered_with_print_options): Update.
296         (c_print_type_union_field_offset, maybe_print_hole)
297         (c_print_type_struct_field_offset): Move to typeprint.c and
298         rename.
299         (c_type_print_base_struct_union): Update.
300
301 2018-06-25  Pedro Alves  <palves@redhat.com>
302
303         * gdbthread.h (thread_info_ref, delete_thread)
304         (delete_thread_silent, first_thread_of_inferior)
305         (any_thread_of_inferior, switch_to_thread)
306         (enable_thread_stack_temporaries)
307         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
308         (get_last_thread_stack_temporary)
309         (value_in_thread_stack_temporaries, can_access_registers_thread):
310         Spell out "struct thread_info" instead of just "thread_info".
311         * inferior.h (notice_new_inferior): Likewise.
312
313 2018-06-25  Pedro Alves  <palves@redhat.com>
314
315         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
316         pass thread_info pointer to delete_thread.
317         (windows_nat_target::detach): Pass inferior pointer to
318         detach_inferior.
319         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
320         delete_thread.
321         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
322         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
323         and pass a thread_info pointer to delete_thread.
324         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
325         pass thread_info pointer to delete_thread.
326         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
327         delete_thread_silent call.
328         * procfs.c (procfs_target::detach): Pass inferior pointer to
329         detach_inferior.
330         (procfs_target::wait): Pass thread_info pointer to delete_thread.
331         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
332         delete_thread_silent call.
333         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
334         pass thread_info pointer to delete_thread.
335         (windows_nat_target::detach): Pass inferior pointer to
336         delete_inferior.
337
338 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
339
340         * regcache.c (readable_regcache::read_part): Fix asserts.
341         (reg_buffer::raw_collect_part): New function.
342         (regcache::write_part): Fix asserts.
343         (reg_buffer::raw_supply_part): New function.
344         (regcache::transfer_regset_register): New helper function.
345         (regcache::transfer_regset): Call new functions.
346         (regcache_supply_regset): Use gdb_byte*.
347         (regcache::supply_regset): Likewise.
348         (regcache_collect_regset): Likewise.
349         (regcache::collect_regset): Likewise.
350         * regcache.h (reg_buffer::raw_collect_part): New declaration.
351         (reg_buffer::raw_supply_part): Likewise.
352         (regcache::transfer_regset_register): Likewise.
353         (regcache::transfer_regset): Use gdb_byte*.
354
355 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
356
357         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
358
359 2018-06-21  Pedro Alves  <palves@redhat.com>
360
361         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
362         instead of a ptid_t.  All callers adjusted.
363         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
364         adjusted.
365         (print_ada_task_info, display_current_task_id, task_command_1):
366         Adjust.
367         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
368         inferior_thread.
369         (breakpoint_kind): Adjust.
370         (remove_breakpoints_pid): Rename to ...
371         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
372         pointer.  All callers adjusted.
373         (bpstat_clear_actions): Use inferior_thread.
374         (get_bpstat_thread): New.
375         (bpstat_do_actions): Use it.
376         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
377         to take a thread_info pointer.  All callers adjusted.
378         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
379         (breakpoint_re_set_thread): Use inferior_thread.
380         * breakpoint.h (struct inferior): Forward declare.
381         (bpstat_stop_status): Update.
382         (remove_breakpoints_pid): Delete.
383         (remove_breakpoints_inf): New.
384         * bsd-uthread.c (bsd_uthread_target::wait)
385         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
386         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
387         (maint_btrace_packet_history_cmd)
388         (maint_btrace_clear_packet_history_cmd): Adjust.
389         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
390         inferior_thread.
391         * cli/cli-interp.c: Include "inferior.h".
392         * common/refcounted-object.h (struct
393         refcounted_object_ref_policy): New.
394         * compile/compile-object-load.c: Include gdbthread.h.
395         (store_regs): Use inferior_thread.
396         * corelow.c (core_target::close): Use current_inferior.
397         (core_target_open): Adjust to use first_thread_of_inferior and use
398         the current inferior.
399         * ctf.c (ctf_target::close): Adjust to use current_inferior.
400         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
401         <thread>: ... this new field.  All references adjusted.
402         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
403         Take a thread_info pointer instead of a ptid_t.
404         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
405         (dummy_frame_discard, register_dummy_frame_dtor): Take a
406         thread_info pointer instead of a ptid_t.
407         * elfread.c: Include "inferior.h".
408         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
409         Use inferior_thread.
410         * eval.c (evaluate_subexp): Likewise.
411         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
412         inferior_thread.
413         * gdb_proc_service.h (struct thread_info): Forward declare.
414         (struct ps_prochandle) <ptid>: Delete, replaced by ...
415         <thread>: ... this new field.  All references adjusted.
416         * gdbarch.h, gdbarch.c: Regenerate.
417         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
418         'thread' parameter.  All implementations and callers adjusted.
419         * gdbthread.h (thread_info) <set_running>: New method.
420         (delete_thread, delete_thread_silent): Take a thread_info pointer
421         instead of a ptid.
422         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
423         (first_thread_of_process): Delete, replaced by ...
424         (first_thread_of_inferior): ... this new function.  All callers
425         adjusted.
426         (any_live_thread_of_process): Delete, replaced by ...
427         (any_live_thread_of_inferior): ... this new function.  All callers
428         adjusted.
429         (switch_to_thread, switch_to_no_thread): Declare.
430         (is_executing): Delete.
431         (enable_thread_stack_temporaries): Update comment.
432         <enable_thread_stack_temporaries>: Take a thread_info pointer
433         instead of a ptid_t.  Incref the thread.
434         <~enable_thread_stack_temporaries>: Decref the thread.
435         <m_ptid>: Delete
436         <m_thr>: New.
437         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
438         (get_last_thread_stack_temporary)
439         (value_in_thread_stack_temporaries, can_access_registers_thread):
440         Take a thread_info pointer instead of a ptid_t.  All callers
441         adjusted.
442         * infcall.c (get_call_return_value): Use inferior_thread.
443         (run_inferior_call): Work with thread pointers instead of ptid_t.
444         (call_function_by_hand_dummy): Work with thread pointers instead
445         of ptid_t.  Use thread_info_ref.
446         * infcmd.c (proceed_thread_callback): Access thread's state
447         directly.
448         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
449         access thread's state directly.
450         (continue_command): Use inferior_thread.
451         (info_program_command): Use find_thread_ptid and access thread
452         state directly.
453         (proceed_after_attach_callback): Use thread state directly.
454         (notice_new_inferior): Take a thread_info pointer instead of a
455         ptid_t.  All callers adjusted.
456         (exit_inferior): Take an inferior pointer instead of a pid.  All
457         callers adjusted.
458         (exit_inferior_silent): New.
459         (detach_inferior): Delete.
460         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
461         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
462         (detach_inferior_command, kill_inferior_command): Use
463         find_inferior_id instead of valid_gdb_inferior_id and
464         gdb_inferior_id_to_pid.
465         (inferior_command): Use inferior and thread pointers.
466         * inferior.h (struct thread_info): Forward declare.
467         (notice_new_inferior): Take a thread_info pointer instead of a
468         ptid_t.  All callers adjusted.
469         (detach_inferior): Delete declaration.
470         (exit_inferior, exit_inferior_silent): Take an inferior pointer
471         instead of a pid.  All callers adjusted.
472         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
473         (valid_gdb_inferior_id): Delete.
474         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
475         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
476         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
477         ...
478         <inf>: ... this new field.
479         <step_ptid>: Delete, replaced by ...
480         <step_thread>: ... this new field.
481         (get_displaced_stepping_state): Take an inferior pointer instead
482         of a pid.  All callers adjusted.
483         (displaced_step_in_progress_any_inferior): Adjust.
484         (displaced_step_in_progress_thread): Take a thread pointer instead
485         of a ptid_t.  All callers adjusted.
486         (displaced_step_in_progress, add_displaced_stepping_state): Take
487         an inferior pointer instead of a pid.  All callers adjusted.
488         (get_displaced_step_closure_by_addr): Adjust.
489         (remove_displaced_stepping_state): Take an inferior pointer
490         instead of a pid.  All callers adjusted.
491         (displaced_step_prepare_throw, displaced_step_prepare)
492         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
493         All callers adjusted.
494         (start_step_over): Adjust.
495         (infrun_thread_ptid_changed): Remove bit updating ptids in the
496         displaced step queue.
497         (do_target_resume): Adjust.
498         (fetch_inferior_event): Use inferior_thread.
499         (context_switch, get_inferior_stop_soon): Take an
500         execution_control_state pointer instead of a ptid_t.  All callers
501         adjusted.
502         (switch_to_thread_cleanup): Delete.
503         (stop_all_threads): Use scoped_restore_current_thread.
504         * inline-frame.c: Include "gdbthread.h".
505         (inline_state) <inline_state>: Take a thread pointer instead of a
506         ptid_t.  All callers adjusted.
507         <ptid>: Delete, replaced by ...
508         <thread>: ... this new field.
509         (find_inline_frame_state): Take a thread pointer instead of a
510         ptid_t.  All callers adjusted.
511         (skip_inline_frames, step_into_inline_frame)
512         (inline_skipped_frames, inline_skipped_symbol): Take a thread
513         pointer instead of a ptid_t.  All callers adjusted.
514         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
515         (inline_skipped_frames, inline_skipped_symbol): Likewise.
516         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
517         pointers directly.
518         * linux-nat.c (get_detach_signal): Likewise.
519         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
520         (thread_db_notice_clone): Adjust.
521         (thread_db_find_new_threads_silently)
522         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
523         a thread pointer instead of a ptid_t.  All callers adjusted.
524         * mi/mi-cmd-var.c: Include "inferior.h".
525         (mi_cmd_var_update_iter): Update to use thread pointers.
526         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
527         inferior directly.
528         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
529         out to ...
530         (mi_output_running): ... this new function.
531         (mi_on_resume_1): Adjust to use it.
532         (mi_user_selected_context_changed): Adjust to use inferior_thread.
533         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
534         directly.
535         (interrupt_thread_callback): : Adjust to use thread and inferior
536         pointers.
537         * proc-service.c: Include "gdbthread.h".
538         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
539         * progspace-and-thread.c: Include "inferior.h".
540         * progspace.c: Include "inferior.h".
541         * python/py-exitedevent.c (create_exited_event_object): Adjust to
542         hold a reference to an inferior_object.
543         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
544         inferior_thread.
545         * python/py-inferior.c (struct inferior_object): Give the type a
546         tag name instead of a typedef.
547         (python_on_normal_stop): No need to check if the current thread is
548         listed.
549         (inferior_to_inferior_object): Change return type to
550         inferior_object.  All callers adjusted.
551         (find_thread_object): Delete, bits factored out to ...
552         (thread_to_thread_object): ... this new function.
553         * python/py-infthread.c (create_thread_object): Use
554         inferior_to_inferior_object.
555         (thpy_is_stopped): Use thread pointer directly.
556         (gdbpy_selected_thread): Use inferior_thread.
557         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
558         field, replaced with ...
559         <thread>: ... this new field.  All users adjusted.
560         (btpy_insn_or_gap_new): Drop const.
561         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
562         callers adjusted.
563         * python/py-record.c: Include "gdbthread.h".
564         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
565         a ptid_t.  All callers adjusted.
566         (gdbpy_current_recording): Use inferior_thread.
567         * python/py-record.h (recpy_record_object) <ptid>: Delete
568         field, replaced with ...
569         <thread>: ... this new field.  All users adjusted.
570         (recpy_element_object) <ptid>: Delete
571         field, replaced with ...
572         <thread>: ... this new field.  All users adjusted.
573         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
574         a ptid_t.  All callers adjusted.
575         * python/py-threadevent.c: Include "gdbthread.h".
576         (get_event_thread): Use thread_to_thread_object.
577         * python/python-internal.h (struct inferior_object): Forward
578         declare.
579         (find_thread_object, find_inferior_object): Delete declarations.
580         (thread_to_thread_object, inferior_to_inferior_object): New
581         declarations.
582         * record-btrace.c: Include "inferior.h".
583         (require_btrace_thread): Use inferior_thread.
584         (record_btrace_frame_sniffer)
585         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
586         (get_thread_current_frame): Use scoped_restore_current_thread and
587         switch_to_thread.
588         (get_thread_current_frame): Use thread pointer directly.
589         (record_btrace_replay_at_breakpoint): Use thread's inferior
590         pointer directly.
591         * record-full.c: Include "inferior.h".
592         * regcache.c: Include "gdbthread.h".
593         (get_thread_arch_regcache): Use the inferior's address space
594         directly.
595         (get_thread_regcache, registers_changed_thread): New.
596         * regcache.h (get_thread_regcache(thread_info *thread)): New
597         overload.
598         (registers_changed_thread): New.
599         (remote_target) <remote_detach_1>: Swap order of parameters.
600         (remote_add_thread): <remote_add_thread>: Return the new thread.
601         (get_remote_thread_info(ptid_t)): New overload.
602         (remote_target::remote_notice_new_inferior): Use thread pointers
603         directly.
604         (remote_target::process_initial_stop_replies): Use
605         thread_info::set_running.
606         (remote_target::remote_detach_1, remote_target::detach)
607         (extended_remote_target::detach): Adjust.
608         * stack.c (frame_show_address): Use inferior_thread.
609         * target-debug.h (target_debug_print_thread_info_pp): New.
610         * target-delegates.c: Regenerate.
611         * target.c (default_thread_address_space): Delete.
612         (memory_xfer_partial_1): Use current_inferior.
613         (target_detach): Use current_inferior.
614         (target_thread_address_space): Delete.
615         (generic_mourn_inferior): Use current_inferior.
616         * target.h (struct target_ops) <thread_address_space>: Delete.
617         (target_thread_address_space): Delete.
618         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
619         pointers directly.
620         (delete_thread_1, delete_thread, delete_thread_silent): Take a
621         thread pointer instead of a ptid_t.  Adjust all callers.
622         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
623         (first_thread_of_process): Delete, replaced by ...
624         (first_thread_of_inferior): ... this new function.  All callers
625         adjusted.
626         (any_thread_of_process): Rename to ...
627         (any_thread_of_inferior): ... this, and take an inferior pointer.
628         (any_live_thread_of_process): Rename to ...
629         (any_live_thread_of_inferior): ... this, and take an inferior
630         pointer.
631         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
632         (value_in_thread_stack_temporaries)
633         (get_last_thread_stack_temporary): Take a thread pointer instead
634         of a ptid_t.  Adjust all callers.
635         (thread_info::set_running): New.
636         (validate_registers_access): Use inferior_thread.
637         (can_access_registers_ptid): Rename to ...
638         (can_access_registers_thread): ... this, and take a thread
639         pointer.
640         (print_thread_info_1): Adjust to compare thread pointers instead
641         of ptids.
642         (switch_to_no_thread, switch_to_thread): Make extern.
643         (scoped_restore_current_thread::~scoped_restore_current_thread):
644         Use m_thread pointer directly.
645         (scoped_restore_current_thread::scoped_restore_current_thread):
646         Use inferior_thread.
647         (thread_command): Use thread pointer directly.
648         (thread_num_make_value_helper): Use inferior_thread.
649         * top.c (execute_command): Use inferior_thread.
650         * tui/tui-interp.c: Include "inferior.h".
651         * varobj.c (varobj_create): Use inferior_thread.
652         (value_of_root_1): Use find_thread_global_id instead of
653         global_thread_id_to_ptid.
654
655 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
656
657         * regcache.c (readable_regcache::read_part): Avoid memcpy when
658         possible.
659         (regcache::write_part): Likewise.
660         (readable_regcache::cooked_read_part): Update comment.
661         (readable_regcache::cooked_write_part): Likewise.
662         * regcache.h: (readable_regcache::read_part): Likewise.
663         (regcache::write_part): Likewise.
664
665 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
666             Dirk Schubert  <dirk.schubert@arm.com>
667
668         * aarch64-linux-nat.c (post_attach): New.
669         (aarch64_linux_nat_target::post_attach): Override post_attach to
670         record the number of hardware debug registers.
671
672 2018-06-20  Tom Tromey  <tom@tromey.com>
673
674         * python/py-param.c (add_setshow_generic): Make parameters const.
675         (parmpy_init): Update.
676
677 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
678
679         * regcache.h (regcache_cooked_read_ftype): Rename to...
680         (register_read_ftype): ...this, change type to function_view.
681         (class reg_buffer) <save>: Remove src parameter.
682         (readonly_detached_regcache) <readonly_detached_regcache>: Make
683         parameter non-const in first overload.  Remove src parameter in
684         second overload.
685         * regcache.c (do_cooked_read): Remove.
686         (readonly_detached_regcache::readonly_detached_regcache): Make
687         parameter non-const, adjust call to other constructor.
688         (reg_buffer::save): Remove src parameter.
689         * frame.c (do_frame_register_read): Remove.
690         (frame_save_as_regcache): Use lambda function.
691         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
692         parameter to ppu2spu_data *.
693         (ppu2spu_sniffer): Use lambda function.
694
695 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
696
697         * record-full.c (record_full_target::insert_breakpoint): Remove
698         "struct" keyword, add const.
699
700 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
701
702         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
703         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
704         * configure.ac: Remove AC_PREREQ, add missing quoting.
705         * gnulib/configure.ac: Modernize usage of
706         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
707         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
708         (AUTOMAKE_VERSION): Bump to 1.15.1.
709         * configure: Re-generate.
710         * config.in: Re-generate.
711         * aclocal.m4: Re-generate.
712         * gnulib/aclocal.m4: Re-generate.
713         * gnulib/config.in: Re-generate.
714         * gnulib/configure: Re-generate.
715         * gnulib/import/Makefile.in: Re-generate.
716
717 2018-06-19  Pedro Alves  <palves@redhat.com>
718
719         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
720         (lookup_minimal_symbol_by_pc_section): ... here with
721         gdb_assert_not_reached added.
722
723 2018-06-19  Pedro Alves  <palves@redhat.com>
724
725         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
726         parameter with a block parameter.  Compare location's block symbol
727         with the frame's block instead of addresses.
728         (skip_inline_frames): Pass the current block instead of the
729         frame's address.  Break out as soon as we determine the frame
730         should not be skipped.
731
732 2018-06-18  Tom Tromey  <tom@tromey.com>
733
734         * solib-aix.c (solib_aix_get_section_offsets): Return
735         unique_xmalloc_ptr.
736         (solib_aix_solib_create_inferior_hook): Update.
737
738 2018-06-18  Tom Tromey  <tom@tromey.com>
739
740         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
741
742 2018-06-18  Tom Tromey  <tom@tromey.com>
743
744         * solib-frv.c (frv_relocate_main_executable): Use
745         unique_xmalloc_ptr.
746         * solib-dsbt.c (dsbt_relocate_main_executable): Use
747         unique_xmalloc_ptr.
748
749 2018-06-18  Tom Tromey  <tom@tromey.com>
750
751         * objfiles.h (inhibit_section_map_updates): Update.
752         (resume_section_map_updates, resume_section_map_updates_cleanup):
753         Remove.
754         * solib-svr4.c (svr4_handle_solib_event): Update.
755         * objfiles.c (inhibit_section_map_updates): Return
756         scoped_restore_tmpl<int>.
757         (resume_section_map_updates, resume_section_map_updates_cleanup):
758         Remove.
759
760 2018-06-18  Tom Tromey  <tom@tromey.com>
761
762         * valprint.h (read_string): Update.
763         * valprint.c (read_string): Change type of "buffer".
764         (val_print_string): Update.
765         * python/py-value.c (valpy_string): Update.
766         * language.h (struct language_defn) <la_get_string>: Change
767         type of "buffer".
768         (default_get_string, c_get_string): Update.
769         * language.c (default_get_string): Change type of "buffer".
770         * guile/scm-value.c (gdbscm_value_to_string): Update.
771         * c-lang.c (c_get_string): Change type of "buffer".
772
773 2018-06-18  Tom Tromey  <tom@tromey.com>
774
775         * ser-mingw.c (struct pipe_state_destroyer): New.
776         (pipe_state_up): New typedef.
777         (cleanup_pipe_state): Remove.
778         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
779
780 2018-06-18  Tom Tromey  <tom@tromey.com>
781
782         * rust-lang.h (rust_yyerror): Don't declare.
783         * rust-lang.c (rust_language_defn): Update.
784         * rust-exp.y (yyerror): Now static.
785         * parse.c (parse_exp_in_context_1): Update.
786         * p-lang.h (p_yyerror): Don't declare.
787         * p-lang.c (p_language_defn): Update.
788         * p-exp.y (yyerror): Now static.
789         * opencl-lang.c (opencl_language_defn): Update.
790         * objc-lang.c (objc_language_defn): Update.
791         * m2-lang.h (m2_yyerror): Don't declare.
792         * m2-lang.c (m2_language_defn): Update.
793         * m2-exp.y (yyerror): Now static.
794         * language.h (struct language_defn) <la_error>: Remove.
795         * language.c (unk_lang_error): Remove.
796         (unknown_language_defn, auto_language_defn): Remove.
797         * go-lang.h (go_yyerror): Don't declare.
798         * go-lang.c (go_language_defn): Update.
799         * go-exp.y (yyerror): Now static.
800         * f-lang.h (f_yyerror): Don't declare.
801         * f-lang.c (f_language_defn): Update.
802         * f-exp.y (yyerror): Now static.
803         * d-lang.h (d_yyerror): Don't declare.
804         * d-lang.c (d_language_defn): Update.
805         * d-exp.y (yyerror): Now static.
806         * c-lang.h (c_yyerror): Don't declare.
807         * c-lang.c (c_language_defn, cplus_language_defn)
808         (asm_language_defn, minimal_language_defn): Update.
809         * c-exp.y (yyerror): Now static.
810         * ada-lang.h (ada_yyerror): Don't declare.
811         * ada-lang.c (ada_language_defn): Update.
812         * ada-exp.y (yyerror): Now static.
813
814 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
815
816         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
817         (store_sveregs_to_thread): Likewise.
818         (aarch64_linux_fetch_inferior_registers): Check for SVE.
819         (aarch64_linux_store_inferior_registers): Likewise.
820         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
821         function.
822         (aarch64_sve_regs_copy_to_regcache): Likewise.
823         (aarch64_sve_regs_copy_from_regcache): Likewise.
824         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
825         declaration.
826         (aarch64_sve_regs_copy_to_regcache): Likewise.
827         (aarch64_sve_regs_copy_from_regcache): Likewise.
828         (sve_context): Structure from Linux headers.
829         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
830         (SVE_SIG_ZREG_SIZE): Likewise.
831         (SVE_SIG_PREG_SIZE): Likewise.
832         (SVE_SIG_FFR_SIZE): Likewise.
833         (SVE_SIG_REGS_OFFSET): Likewise.
834         (SVE_SIG_ZREGS_OFFSET): Likewise.
835         (SVE_SIG_ZREG_OFFSET): Likewise.
836         (SVE_SIG_ZREGS_SIZE): Likewise.
837         (SVE_SIG_PREGS_OFFSET): Likewise.
838         (SVE_SIG_PREG_OFFSET): Likewise.
839         (SVE_SIG_PREGS_SIZE): Likewise.
840         (SVE_SIG_FFR_OFFSET): Likewise.
841         (SVE_SIG_REGS_SIZE): Likewise.
842         (SVE_SIG_CONTEXT_SIZE): Likewise.
843         (SVE_PT_REGS_MASK): Likewise.
844         (SVE_PT_REGS_FPSIMD): Likewise.
845         (SVE_PT_REGS_SVE): Likewise.
846         (SVE_PT_VL_INHERIT): Likewise.
847         (SVE_PT_VL_ONEXEC): Likewise.
848         (SVE_PT_REGS_OFFSET): Likewise.
849         (SVE_PT_FPSIMD_OFFSET): Likewise.
850         (SVE_PT_FPSIMD_SIZE): Likewise.
851         (SVE_PT_SVE_ZREG_SIZE): Likewise.
852         (SVE_PT_SVE_PREG_SIZE): Likewise.
853         (SVE_PT_SVE_FFR_SIZE): Likewise.
854         (SVE_PT_SVE_FPSR_SIZE): Likewise.
855         (SVE_PT_SVE_FPCR_SIZE): Likewise.
856         (__SVE_SIG_TO_PT): Likewise.
857         (SVE_PT_SVE_OFFSET): Likewise.
858         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
859         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
860         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
861         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
862         (SVE_PT_SVE_PREG_OFFSET): Likewise.
863         (SVE_PT_SVE_PREGS_SIZE): Likewise.
864         (SVE_PT_SVE_FFR_OFFSET): Likewise.
865         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
866         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
867         (SVE_PT_SVE_SIZE): Likewise.
868         (SVE_PT_SIZE): Likewise.
869         (HAS_SVE_STATE): New define.
870
871 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
872
873         * nat/aarch64-sve-linux-sigcontext.h: New file.
874         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
875         new files.
876         (SVE_VQ_MIN): Likewise.
877         (SVE_VQ_MAX): Likewise.
878         (SVE_VL_MIN): Likewise.
879         (SVE_VL_MAX): Likewise.
880         (SVE_NUM_ZREGS): Likewise.
881         (SVE_NUM_PREGS): Likewise.
882         (sve_vl_valid): Likewise.
883         (struct user_sve_header): Likewise.
884
885 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
886             Richard Bunt <Richard.Bunt@arm.com>
887
888         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
889         was requested by GDB.
890
891 2018-06-15  Tom de Vries  <tdevries@suse.de>
892
893         * MAINTAINERS (Write After Approval): Add Tom de Vries.
894
895 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
896
897         * gnulib/update-gnulib.sh: Print expected versions of
898         autoconf/aclocal.
899
900 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
901
902         * arch-utils.c (default_type_align): Use type_length_units.
903         * gdbtypes.c (type_align): Use type_length_units.
904
905 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
906
907         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
908         of 'define' command.
909
910 2018-06-14  Tom de Vries  <tdevries@suse.de>
911
912         PR cli/22573
913         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
914         get_no_prettyformat_print_options.
915
916 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
917
918         * sparc-nat.h: Include target.h.
919         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
920         <fetch_registers>: Remove this argument in function call.
921         <store_registers>: Remove this argument in function call, remove
922         extra semicolon.
923         <low_forget_process>: Call sparc64_forget_process instead of
924         sparc_forget_process.
925
926 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
927
928         * procfs.c (_initialize_procfs): Use add_inf_child_target.
929         (procfs_target::make_corefile_notes): Adjust to new
930         target_read_alloc return type.
931
932 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
933             Stephen Roberts  <stephen.roberts@arm.com>
934
935         PR gdb/22882
936         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
937         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
938         Move should_notify_stop local into more inner scope.
939
940 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
941             Stephen Roberts  <stephen.roberts@arm.com>
942
943         PR gdb/22882
944         * infrun.c (resume_1): Add call to mark_async_event_handler.
945
946 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
947
948         * infrun.c (do_target_wait): Change old version of $pc printed.
949
950 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
951
952         * dwarf2read.c (read_index_from_section): Rename to...
953         (read_gdb_index_from_section): ... this, update all callers.
954         (dwarf2_read_index): Rename to...
955         (dwarf2_read_gdb_index): ... this, update all callers.
956
957 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
958
959         * gdb/hppa-linux-nat.c
960         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
961         hppa_linux_nat_target::fetch_registers.
962
963 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
964
965         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
966         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
967         (AARCH64_DWARF_SVE_FFR): Likewise.
968         (AARCH64_DWARF_SVE_P0): Likewise.
969         (AARCH64_DWARF_SVE_Z0): Likewise.
970
971 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
972
973         * common/common-regcache.h (raw_compare): New function.
974         * regcache.c (regcache::raw_compare): Likewise.
975         * regcache.h (regcache::raw_compare): New declaration.
976
977 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
978
979         * common/common-regcache.h (reg_buffer_common): New structure.
980         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
981         (reg_buffer::raw_supply): Likewise.
982         (reg_buffer::raw_supply_integer): Likewise.
983         (reg_buffer::raw_supply_zeroed): Likewise.
984         (reg_buffer::raw_collect): Likewise.
985         (reg_buffer::raw_collect_integer): Likewise.
986         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
987         (reg_buffer::raw_supply): Likewise.
988         (reg_buffer::raw_supply_integer): Likewise.
989         (reg_buffer::raw_supply_zeroed): Likewise.
990         (reg_buffer::raw_collect): Likewise.
991         (reg_buffer::raw_collect_integer): Likewise.
992
993 2018-06-10  Tom Tromey  <tom@tromey.com>
994
995         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
996         (class remote_state) <stop_reply_queue>: Now std::vector.
997         (remote_state::~remote_state)
998         (remote_target::stop_reply_queue_length): Update.
999         (struct queue_iter_param, remove_child_of_pending_fork)
1000         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1001         (check_pending_event_prevents_wildcard_vcont_callback)
1002         (remove_stop_reply_for_inferior)
1003         (remove_stop_reply_of_remote_state)
1004         (remote_notif_remove_once_on_match)
1005         (stop_reply_match_ptid_and_ws)
1006         (remote_kill_child_of_pending_fork): Remove.
1007         (remote_target::remove_new_fork_children)
1008         (remote_target::check_pending_events_prevent_wildcard_vcont)
1009         (remote_target::discard_pending_stop_replies)
1010         (remote_target::discard_pending_stop_replies_in_queue)
1011         (remote_target::remote_notif_remove_queued_reply)
1012         (remote_target::queued_stop_reply)
1013         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1014         (remote_target::wait, remote_target::kill_new_fork_children)
1015         (remote_target::async): Update.
1016
1017 2018-06-10  Tom Tromey  <tom@tromey.com>
1018
1019         * record-full.c (record_full_arch_list_cleanups): Remove.
1020         (record_full_message): Use try/catch.
1021         (record_full_wait_cleanups): Remove.
1022         (record_full_wait_1): Use try/catch.
1023         (record_full_restore): Likewise.
1024
1025 2018-06-10  Tom Tromey  <tom@tromey.com>
1026
1027         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
1028         declare VEC.  Add constructor.
1029         <in_target_beneath>: Now bool.
1030         (record_full_breakpoints): Now a std::vector, static.
1031         (record_full_sync_record_breakpoints)
1032         (record_full_init_record_breakpoints)
1033         (record_full_target::insert_breakpoint)
1034         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
1035
1036 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
1037
1038         * dwarf2read.c (process_cu_includes): Remove struct keyword.
1039         * serial.c (serial_interface_lookup): Remove struct keyword.
1040
1041 2018-06-10  Tom Tromey  <tom@tromey.com>
1042
1043         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1044         method.
1045         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1046         a method.
1047         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1048         method.
1049         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1050         "beneath" as a method.
1051         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1052         Use "beneath" as a method.
1053
1054 2018-06-10  Tom Tromey  <tom@tromey.com>
1055
1056         * tracefile.c (struct trace_file_writer_deleter): New.
1057         <operator()>: Rename from trace_file_writer_xfree.
1058         (trace_file_writer_up): New typedef.
1059         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1060
1061 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
1062
1063         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1064         <m_registers, m_register_status>: Change type to
1065         std::unique_ptr.
1066         * regcache.c (reg_buffer::reg_buffer): Use new instead of
1067         XCNEWVEC.
1068
1069 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
1070
1071         * common/common-regcache.h (enum register_status): Add
1072         underlying type "signed char".
1073         * regcache.h (reg_buffer) <m_register_status>: Change type to
1074         register_status *.
1075         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1076         register_status instead of signed char.
1077         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1078         (reg_buffer::get_register_status): Remove cast.
1079         (readable_regcache::raw_read): Remove cast.
1080         (readable_regcache::cooked_read): Remove cast.
1081
1082 2018-06-09  Tom Tromey  <tom@tromey.com>
1083
1084         * source.c (reverse_search_command, forward_search_command): Use
1085         scoped_fd.
1086
1087 2018-06-09  Tom Tromey  <tom@tromey.com>
1088
1089         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
1090         (serial_ops_list): Now static, std::vector.
1091         (serial_interface_lookup, serial_add_interface): Update.
1092
1093 2018-06-09  Tom Tromey  <tom@tromey.com>
1094
1095         * dwarf2read.c (process_cu_includes): Update.
1096         (process_full_comp_unit): Update.
1097         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1098         std::vector.
1099
1100 2018-06-08  Paul Koning  <paul_koning@dell.com>
1101
1102         PR gdb/23252
1103
1104         * python/python.c (do_start_initialization):
1105         Avoid call to internal Python API.
1106         (init__gdb_module): New function.
1107
1108 2018-06-08  Gary Benson <gbenson@redhat.com>
1109
1110         * linux-thread-db.c (valprint.h): New include.
1111         (struct check_thread_db_info): New structure.
1112         (check_thread_db_on_load, tdb_testinfo): New static globals.
1113         (check_thread_db, check_thread_db_callback): New functions.
1114         (try_thread_db_load_1): Run integrity checks if requested.
1115         (maintenance_check_libthread_db): New function.
1116         (_initialize_thread_db): Register "maint check libthread-db"
1117         and "maint set/show check-libthread-db".
1118         * NEWS: Mention the above new commands.
1119
1120 2018-06-08  Tom Tromey  <tom@tromey.com>
1121
1122         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1123         now a method.
1124
1125 2018-06-08  Tom Tromey  <tom@tromey.com>
1126
1127         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1128
1129 2018-06-08  Tom Tromey  <tom@tromey.com>
1130
1131         * common/btrace-common.h (struct btrace_data): Add constructor,
1132         destructor, move assignment operator.
1133         <empty, clear, fini>: New methods.
1134         <format>: Initialize.
1135         (btrace_data_init, btrace_data_fini, btrace_data_clear)
1136         (btrace_data_empty): Don't declare.
1137         * common/btrace-common.c (btrace_data_init): Remove.
1138         (btrace_data::fini): Rename from btrace_data_fini.
1139         (btrace_data::empty): Rename from btrace_data_empty.
1140         (btrace_data::clear): Rename from btrace_data_clear.  Return
1141         bool.
1142         * btrace.h (make_cleanup_btrace_data): Don't declare.
1143         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1144         (parse_xml_btrace): Update.
1145         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1146         (maint_btrace_clear_packet_history_cmd): Update.
1147
1148 2018-06-07  Pedro Alves  <palves@redhat.com>
1149
1150         * target.h (target_ops) <beneath>: Now a method.  All references
1151         updated.
1152         (class target_stack): New.
1153         * target.c (g_target_stack): New.
1154         (g_current_top_target): Delete.
1155         (current_top_target): Get the top target out of g_target_stack.
1156         (target_stack::push, target_stack::unpush): New.
1157         (push_target, unpush_target): Reimplement.
1158         (target_is_pushed): Reimplement in terms of g_target_stack.
1159         (target_ops::beneath, target_stack::find_beneath): New.
1160
1161 2018-06-07  Pedro Alves  <palves@redhat.com>
1162
1163         * target.h (find_target_beneath): Delete declaration.
1164         * target.c (find_target_beneath): Delete definition.
1165         * aix-thread.c: All callers of find_target_beneath adjusted to
1166         call target_ops::beneath instead.
1167         * bsd-uthread.c: Likewise.
1168         * linux-thread-db.c: Likewise.
1169         * ravenscar-thread.c: Likewise.
1170         * sol-thread.c: Likewise.
1171         * spu-multiarch.c: Likewise.
1172
1173 2018-06-07  Pedro Alves  <palves@redhat.com>
1174
1175         * target.h (target_ops) <beneath>: Now a method.  All references
1176         updated.
1177         (target_ops) <m_beneath>: New.
1178         * target.c (target_ops::beneath): New.
1179         * corelow.c: Adjust all references to target_ops::beneath.
1180         * linux-thread-db.c: Likewise.
1181         * make-target-delegates: Likewise.
1182         * record-btrace.c: Likewise.
1183         * record-full.c: Likewise.
1184         * remote.c: Likewise.
1185         * target.c: Likewise.
1186         * target-delegates.c: Regenerate.
1187
1188 2018-06-07  Pedro Alves  <palves@redhat.com>
1189
1190         * target.h (target_stack): Delete.
1191         (current_top_target): Declare function.
1192         * target.c (target_stack): Delete.
1193         (g_current_top_target): New.
1194         (current_top_target): New function.
1195         * auxv.c: Use current_top_target instead of target_stack
1196         throughout.
1197         * avr-tdep.c: Likewise.
1198         * breakpoint.c: Likewise.
1199         * corefile.c: Likewise.
1200         * elfread.c: Likewise.
1201         * eval.c: Likewise.
1202         * exceptions.c: Likewise.
1203         * frame.c: Likewise.
1204         * gdbarch-selftests.c: Likewise.
1205         * gnu-v3-abi.c: Likewise.
1206         * ia64-tdep.c: Likewise.
1207         * ia64-vms-tdep.c: Likewise.
1208         * infcall.c: Likewise.
1209         * infcmd.c: Likewise.
1210         * infrun.c: Likewise.
1211         * linespec.c: Likewise.
1212         * linux-tdep.c: Likewise.
1213         * minsyms.c: Likewise.
1214         * ppc-linux-nat.c: Likewise.
1215         * ppc-linux-tdep.c: Likewise.
1216         * procfs.c: Likewise.
1217         * regcache.c: Likewise.
1218         * remote.c: Likewise.
1219         * rs6000-tdep.c: Likewise.
1220         * s390-linux-nat.c: Likewise.
1221         * s390-tdep.c: Likewise.
1222         * solib-aix.c: Likewise.
1223         * solib-darwin.c: Likewise.
1224         * solib-dsbt.c: Likewise.
1225         * solib-spu.c: Likewise.
1226         * solib-svr4.c: Likewise.
1227         * solib-target.c: Likewise.
1228         * sparc-tdep.c: Likewise.
1229         * sparc64-tdep.c: Likewise.
1230         * spu-tdep.c: Likewise.
1231         * symfile.c: Likewise.
1232         * symtab.c: Likewise.
1233         * target-descriptions.c: Likewise.
1234         * target-memory.c: Likewise.
1235         * target.c: Likewise.
1236         * target.h: Likewise.
1237         * tracefile-tfile.c: Likewise.
1238         * tracepoint.c: Likewise.
1239         * valops.c: Likewise.
1240         * valprint.c: Likewise.
1241         * value.c: Likewise.
1242         * windows-tdep.c: Likewise.
1243         * mi/mi-main.c: Likewise.
1244
1245 2018-06-07  Tom Tromey  <tom@tromey.com>
1246
1247         * valprint.h (build_address_symbolic): Declare.
1248         * printcmd.c (print_address_symbolic): Update.
1249         (build_address_symbolic): Change "name" and "filename" to
1250         std::string.
1251         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1252         Update.
1253         * defs.h (build_address_symbolic): Remove declaration.
1254
1255 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
1256
1257         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1258         (aarch64_vnv_type): Add function.
1259         (aarch64_pseudo_register_name): Add V regs for SVE.
1260         (aarch64_pseudo_register_type): Likewise.
1261         (aarch64_pseudo_register_reggroup_p): Likewise.
1262         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1263         (aarch64_pseudo_read_value): Add V regs for SVE.
1264         (aarch64_pseudo_write_2): Use V0 offset for SVE
1265         (aarch64_pseudo_write): Add V regs for SVE.
1266         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1267
1268 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
1269
1270         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1271         (sve_vl_from_vq): Likewise.
1272
1273 2018-06-05  Tom Tromey  <tom@tromey.com>
1274
1275         * cli/cli-cmds.c (show_version): Update.
1276         * top.c (print_gdb_version): Add "interactive" parameter.
1277         Update.
1278         * main.c (captured_main_1): Update.
1279         * top.h (print_gdb_version): Add "interactive" parameter and a
1280         comment.
1281
1282 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
1283
1284         * common/enum-flags.h: Add trailing semicolon to example in
1285         comment.
1286
1287 2018-06-05  Tom Tromey  <tom@tromey.com>
1288
1289         PR cli/12326:
1290         * NEWS: Add entry about pager.
1291         * utils.c (pagination_disabled_for_command): New global.
1292         (prompt_for_continue): Allow "c" response to prompt.
1293         (reinitialize_more_filter): Clear
1294         pagination_disabled_for_command.
1295         (fputs_maybe_filtered): Check pagination_disabled_for_command.
1296
1297 2018-06-04  Tom Tromey  <tom@tromey.com>
1298
1299         * ada-lang.h (ada_lookup_symbol_list): Update.
1300         * ada-lang.c (resolve_subexp): Update.
1301         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
1302         parameter.
1303         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1304         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1305         results parameter to std::vector.
1306         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1307         Update.
1308         * ada-exp.y (block_lookup): Update.
1309         (select_possible_type_sym): Change type of syms.  Remove nsyms
1310         parameter.
1311         (write_var_or_type, write_name_assoc): Update.
1312
1313 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
1314
1315         * windows-nat.c (windows_nat_target::xfer_partial): Return
1316         TARGET_XFER_E_IO if we need to delegate to the target beneath
1317         but BENEATH is NULL.
1318
1319 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
1320
1321         * Makefile.in (config.status): Add configure.nat as a
1322         dependency.
1323
1324 2018-06-04  Tom Tromey  <tom@tromey.com>
1325
1326         * cp-name-parser.y (cpname_state): Add method declarations.
1327         (HANDLE_QUAL): Update.
1328         (cpname_state::d_grab, cpname_state::fill_comp)
1329         (cpname_state::make_operator, cpname_state::make_dtor)
1330         (cpname_state::make_builtin_type, cpname_state::make_name)
1331         (cpname_state::d_qualify, cpname_state::d_int_type)
1332         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1333         (%union): Move earlier.
1334
1335 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
1336
1337         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1338
1339 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
1340
1341         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1342         (aarch64_pseudo_write_1): Likewise.
1343         (aarch64_pseudo_read_value): Use helper.
1344         (aarch64_pseudo_write): Likewise.
1345
1346 2018-06-04  Pedro Alves  <palves@redhat.com>
1347
1348         * darwin-nat.c (darwin_ops): Delete.
1349         (darwin_attach_pid): Use get_native_target.
1350
1351 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
1352
1353         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1354         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1355
1356 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
1357
1358         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1359         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1360         (aarch64_gdbarch_init): Check for SVE.
1361         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1362
1363 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
1364
1365         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1366         * aarch64-tdep.h (aarch64_read_description): Likewise.
1367         * arch/aarch64.c (aarch64_create_target_description): Likewise.
1368         * arch/aarch64.h (aarch64_create_target_description): Likewise.
1369         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1370         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1371         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1372
1373 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
1374
1375         * value.c (value_fetch_lazy_bitfield): New.
1376         (value_fetch_lazy_memory): New.
1377         (value_fetch_lazy_register): New.
1378         (value_fetch_lazy): Factor out to smaller functions.
1379
1380 2018-06-01  Tom Tromey  <tom@tromey.com>
1381
1382         * cp-name-parser.y (backslashable, represented): Now const.
1383
1384 2018-06-01  Tom Tromey  <tom@tromey.com>
1385
1386         * cp-name-parser.y: Include parser-defs.h.
1387         (parser_fprintf): Remove declaration.
1388
1389 2018-06-01  Tom Tromey  <tom@tromey.com>
1390
1391         * cp-name-parser.y: Use %pure-parser, %lex-param, and
1392         %parse-param.
1393         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1394         (global_result): Remove globals.
1395         (struct cpname_state): New.
1396         (yyparse): Don't declare.
1397         (yylex, yyerror): Move declarations after %union.
1398         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1399         (make_name): Add state parameter.
1400         Update all callers.
1401         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1402         parameter.
1403         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1404         Update.
1405         (yylex): Add lvalp, state parameters.
1406         (yyerror): Add state parameter.
1407         (cp_demangled_name_to_comp): Update.
1408
1409 2018-06-01  Tom Tromey  <tom@tromey.com>
1410
1411         * cp-name-parser.y (parser_fprintf): Declare.
1412         (GDB_YY_REMAP_PREFIX): Define.
1413         Include yy-remap.h.  Don't redefine yy* identifiers.
1414
1415 2018-06-01  Tom Tromey  <tom@tromey.com>
1416
1417         * python/py-type.c (typy_legacy_template_argument): Update.
1418         * cp-support.h (cp_demangled_name_to_comp): Update.
1419         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1420         parameter to be a "std::string *".
1421         (main): Update.
1422
1423 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
1424
1425         * ada-lex.l: Include "diagnostics.h" instead of
1426         "common/diagnostics.h".
1427         * unittests/environ-selftests.c: Likewise.
1428         * common/diagnostics.h: Moved to ../include.
1429
1430 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
1431
1432         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1433         to language_mode_manual while calling breakpoint_re_set_one.
1434
1435 2018-06-01  Tom Tromey  <tom@tromey.com>
1436
1437         * valops.c (value_cast_structs, destructor_name_p): Update.
1438         * symtab.c (gdb_mangle_name): Update.
1439         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1440         Update.
1441         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1442         (pascal_object_print_value_fields, pascal_object_print_value):
1443         Update.
1444         * p-typeprint.c (pascal_type_print_derivation_info): Update.
1445         * linespec.c (find_methods): Update.
1446         * gdbtypes.h (type_name_no_tag): Remove.
1447         (type_name_or_error): Rename from type_name_no_tag_or_error.
1448         * gdbtypes.c (type_name_no_tag): Remove.
1449         (type_name_or_error): Rename from type_name_no_tag_or_error.
1450         (lookup_struct_elt_type, check_typedef): Update.
1451         * expprint.c (print_subexp_standard): Update.
1452         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1453         * d-namespace.c (d_lookup_nested_symbol): Update.
1454         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1455         (cp_print_class_member): Update.
1456         * cp-namespace.c (cp_lookup_nested_symbol): Update.
1457         * completer.c (add_struct_fields): Update.
1458         * c-typeprint.c (cp_type_print_derivation_info)
1459         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
1460         Update.
1461         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
1462         (ada_prefer_type, ada_is_exception_sym): Update.
1463
1464 2018-06-01  Tom Tromey  <tom@tromey.com>
1465
1466         * valops.c (enum_constant_from_type, value_namespace_elt)
1467         (value_maybe_namespace_elt): Update.
1468         * valarith.c (find_size_for_pointer_math): Update.
1469         * target-descriptions.c (make_gdb_type): Update.
1470         * symmisc.c (print_symbol): Update.
1471         * stabsread.c (define_symbol, read_type)
1472         (complain_about_struct_wipeout, add_undefined_type)
1473         (cleanup_undefined_types_1): Update.
1474         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
1475         (rust_range_type_p, val_print_struct, rust_print_struct_def)
1476         (rust_internal_print_type, rust_composite_type)
1477         (rust_evaluate_funcall, rust_evaluate_subexp)
1478         (rust_inclusive_range_type_p): Update.
1479         * python/py-type.c (typy_get_tag): Update.
1480         * p-typeprint.c (pascal_type_print_base): Update.
1481         * mdebugread.c (parse_symbol, parse_type): Update.
1482         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
1483         Update.
1484         * guile/scm-type.c (gdbscm_type_tag): Update.
1485         * go-lang.c (sixg_string_p): Update.
1486         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
1487         Update.
1488         * gdbtypes.h (struct main_type) <tag_name>: Remove.
1489         (TYPE_TAG_NAME): Remove.
1490         * gdbtypes.c (type_name_no_tag): Simplify.
1491         (check_typedef, check_types_equal, recursive_dump_type)
1492         (copy_type_recursive, arch_composite_type): Update.
1493         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
1494         in summary mode when needed.
1495         * eval.c (evaluate_funcall): Update.
1496         * dwarf2read.c (fixup_go_packaging, read_structure_type)
1497         (process_structure_scope, read_enumeration_type)
1498         (read_namespace_type, read_module_type, determine_prefix): Update.
1499         * cp-support.c (inspect_type): Update.
1500         * coffread.c (process_coff_symbol, decode_base_type): Update.
1501         * c-varobj.c (c_is_path_expr_parent): Update.
1502         * c-typeprint.c (c_type_print_base_struct_union): Update.
1503         (c_type_print_base_1): Update.  Print struct/class/union/enum in
1504         summary when using C language.
1505         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
1506         (gen_maybe_namespace_elt): Update.
1507         * ada-lang.c (ada_type_name): Simplify.
1508         (empty_record, ada_template_to_fixed_record_type_1)
1509         (template_to_static_fixed_type)
1510         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
1511
1512 2018-06-01  Tom Tromey  <tom@tromey.com>
1513
1514         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
1515         c_print_type.
1516         * c-typeprint.c (c_print_type_1): Add "language" parameter.
1517         (c_print_type): Update.
1518         (c_print_type): New overload.
1519         (c_type_print_varspec_prefix, c_type_print_args)
1520         (c_type_print_varspec_suffix, c_print_type_no_offsets)
1521         (c_type_print_base_struct_union, c_type_print_base_1)
1522         (cp_type_print_method_args): Add "language" parameter.
1523         (c_type_print_base): Update.
1524         * c-lang.h (c_print_type): Add new overload.
1525
1526 2018-06-01  Tom Tromey  <tom@tromey.com>
1527
1528         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
1529         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
1530
1531 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
1532
1533         * aarch64-tdep.c (aarch64_sve_register_names): New const
1534         var.
1535         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
1536         (AARCH64_SVE_Z_REGS_NUM): New define.
1537         (AARCH64_SVE_P_REGS_NUM): Likewise.
1538         (AARCH64_SVE_NUM_REGS): Likewise.
1539
1540 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
1541
1542         * nat/linux-ptrace.h [__alpha__]
1543         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
1544         definitions.
1545
1546 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
1547
1548         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
1549         the endianness selected.
1550         * NEWS: Document `set endian auto' mode operation update.
1551
1552 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
1553
1554         * Makefile.in: Add new header.
1555         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
1556         (sve_vl_from_vg): Likewise.
1557         (sve_vq_from_vl): Likewise.
1558         (sve_vl_from_vq): Likewise.
1559         (sve_vq_from_vg): Likewise.
1560         (sve_vg_from_vq): Likewise.
1561         * configure.nat: Add new c file.
1562         * nat/aarch64-sve-linux-ptrace.c: New file.
1563         * nat/aarch64-sve-linux-ptrace.h: New file.
1564
1565 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
1566
1567         * aarch64-linux-nat.c (aarch64_linux_read_description):
1568         Add parmeter zero.
1569         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1570         Likewise.
1571         * aarch64-tdep.c (tdesc_aarch64_list): Add.
1572         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
1573         (aarch64_gdbarch_init): Add parmeter zero.
1574         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
1575         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
1576         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
1577         parmeter.
1578         * doc/gdb.texinfo: Describe SVE feature
1579         * features/aarch64-sve.c: New file.
1580
1581 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
1582
1583         PR gdb/23210
1584         * gdbarch.sh (significant_addr_bit): Default to zero when
1585         not set by target architecture.
1586         * gdbarch.c: Re-generated.
1587         * utils.c (address_significant): Update.
1588
1589 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
1590
1591         * stack.c (func_command): Remove trailing newline in call to error.
1592
1593 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1594
1595         * regcache.h (regcache_raw_collect): Remove, update callers to
1596         use regcache::raw_collect.
1597         * regcache.c (regcache_raw_collect): Remove.
1598
1599 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1600
1601         * regcache.h (regcache_raw_supply): Remove, update callers to
1602         use detached_regcache::raw_supply.
1603         * regcache.c (regcache_raw_supply): Remove.
1604
1605 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1606
1607         * regcache.h (regcache_cooked_write_part): Remove, update
1608         callers to use regcache::cooked_write_part.
1609         * regcache.c (regcache_cooked_write_part): Remove.
1610
1611 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1612
1613         * regcache.h (regcache_cooked_read_part): Remove, update callers
1614         to use readable_regcache::cooked_read_part.
1615         * regcache.c (regcache_cooked_read_part): Remove.
1616
1617 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1618
1619         * regcache.h (regcache_cooked_read_value): Remove, update
1620         callers to use readable_regcache::cooked_read_value.
1621         * regcache.c (regcache_cooked_read_value): Remove.
1622
1623 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1624
1625         * regcache.h (regcache_cooked_write): Remove, update callers to
1626         use regcache::cooked_write.
1627         * regcache.c (regcache_cooked_write): Remove.
1628
1629 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1630
1631         * regcache.h (regcache_invalidate): Remove, update callers to
1632         use detached_regcache::invalidate instead.
1633         * regcache.c (regcache_invalidate): Remove.
1634
1635 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1636
1637         * regcache.h (regcache_raw_write_part): Remove, update callers
1638         to use regcache::raw_write_part instead.
1639         * regcache.c (regcache_raw_write_part): Remove.
1640
1641 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1642
1643         * regcache.h (regcache_raw_read_part): Remove, update callers to
1644         use readable_regcache::raw_read_part instead.
1645         * regcache.c (regcache_raw_read_part): Remove.
1646
1647 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1648
1649         * regcache.h (regcache_cooked_read): Remove, update callers to
1650         use readable_regcache::cooked_read instead.
1651         * regcache.c (regcache_cooked_read): Remove.
1652
1653 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1654
1655         * regcache.h (regcache_raw_write): Remove, update callers to use
1656         regcache::raw_write instead.
1657         * regcache.c (regcache_raw_write): Remove.
1658
1659 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1660
1661         * regcache.h (regcache_raw_read): Remove, update callers to use
1662         readable_regcache::raw_read instead.
1663         * regcache.c (regcache_raw_read): Remove.
1664
1665 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1666
1667         * regcache.h (regcache_raw_update): Remove, update callers to
1668         use readable_regcache::raw_update instead.
1669         * regcache.c (regcache_raw_update): Remove.
1670
1671 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1672
1673         * regcache.h (regcache_register_status): Remove, update callers
1674         to use reg_buffer::get_register_status directly instead.
1675         * regcache.c (regcache_register_status): Remove.
1676
1677 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1678
1679         * regcache.h (regcache_get_ptid): Remove, update all callers to
1680         call regcache::ptid instead.
1681         * regcache.c (regcache_get_ptid): Remove.
1682
1683 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1684
1685         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
1686
1687 2018-05-30  Pedro Alves  <palves@redhat.com>
1688
1689         * common/common-exceptions.h (exception_rethrow): Use
1690         ATTRIBUTE_NORETURN.
1691
1692 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
1693
1694         * breakpoint.c (print_solib_event, check_status_catch_solib):
1695         Remove struct keyword in range-based for loops.
1696         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
1697         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
1698         Likewise.
1699         * linespec.c (find_superclass_methods, search_minsyms_for_name):
1700         Likewise.
1701         * symfile.c (addr_info_make_relative): Likewise.
1702         * thread.c (value_in_thread_stack_temporaries): Likewise.
1703
1704 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
1705
1706         PR gdb/16841
1707         * valops.c (value_struct_elt_for_reference): Call check_typedef on
1708         aggregate type to get its real type before accessing it.
1709
1710 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
1711
1712         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
1713         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
1714         * coff-pe-read.c (add_pe_forwarded_sym): Replace
1715         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
1716         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
1717         * jit.c (jit_breakpoint_re_set_internal): Likewise.
1718         * printcmd.c (info_address_command): Likewise.
1719
1720 2018-05-29  Tom Tromey  <tom@tromey.com>
1721
1722         * windows-nat.c (handle_exception): Update fall-through comment.
1723
1724 2018-05-29  Tom Tromey  <tom@tromey.com>
1725
1726         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
1727         (struct program_space) <added_solibs>: Now a std::vector.
1728         * breakpoint.c (print_solib_event): Update.
1729         (check_status_catch_solib): Update.
1730         * progspace.c (clear_program_space_solib_cache): Update.
1731         * solib.c (update_solib_list): Update.
1732
1733 2018-05-29  Tom Tromey  <tom@tromey.com>
1734
1735         * python/py-type.c (typy_richcompare): Update.
1736         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
1737         * gdbtypes.h (types_deeply_equal): Return bool.
1738         (types_equal): Likewise.
1739         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
1740         declare VEC.
1741         (check_types_equal): Change worklist to std::vector.  Return
1742         bool.
1743         (struct type_equality_entry): Add constructor.
1744         (compare_maybe_null_strings): Return bool.
1745         (check_types_worklist): Return bool.  Change worklist to
1746         std::vector.
1747         (types_deeply_equal): Use std::vector.
1748         (types_equal): Return bool.
1749         (compare_maybe_null_strings): Simplify.
1750
1751 2018-05-29  Tom Tromey  <tom@tromey.com>
1752
1753         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
1754
1755 2018-05-29  Tom Tromey  <tom@tromey.com>
1756
1757         * objc-lang.h: Don't include cp-support.h.
1758         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
1759         declare VEC.
1760
1761 2018-05-27  Tom Tromey  <tom@tromey.com>
1762
1763         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
1764
1765 2018-05-25  Tom Tromey  <tom@tromey.com>
1766
1767         * value.c (value::location): Initialize.
1768
1769 2018-05-25  Tom Tromey  <tom@tromey.com>
1770
1771         * dbxread.c (init_bincl_list): Remove.
1772         (bincl_list): Now a std::vector.
1773         (bincls_allocated, next_bincl): Remove.
1774         (free_bincl_list, do_free_bincl_list_cleanup)
1775         (make_cleanup_free_bincl_list): Remove.
1776         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
1777         unique_xmalloc_ptr.
1778         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
1779         (struct header_file_location): Add constructor.
1780         (add_bincl_to_list): Remove.
1781
1782 2018-05-25  Tom Tromey  <tom@tromey.com>
1783
1784         * tui/tui.c (tui_enable): Update.
1785         * mi/mi-interp.c (mi_interp::init): Update.
1786         * interps.h (class interp) <name>: New method.
1787         <m_name>: Rename from name.
1788         (~scoped_restore_interp): Update.
1789         * interps.c (interp::interp): Update.
1790         (interp_add, interp_set, interp_lookup_existing)
1791         (current_interp_named_p): Update.
1792
1793 2018-05-25  Tom Tromey  <tom@tromey.com>
1794
1795         * interps.c (interp_name): Remove.
1796         * mi/mi-interp.c (mi_interp::init): Update.
1797         * interps.h (interp_name): Remove.
1798         (~scoped_restore_interp): Update.
1799         * tui/tui.c (tui_enable): Update.
1800
1801 2018-05-25  Tom Tromey  <tom@tromey.com>
1802
1803         * utils.c (fputs_maybe_filtered): Update.
1804         * linespec.c (decode_line_full): Update.
1805         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
1806         (mi_print_breakpoint_for_event, mi_solib_loaded)
1807         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1808         (mi_user_selected_context_changed): Update.
1809         * mi/mi-main.c (mi_execute_command): Update.
1810         * cli/cli-script.c (execute_control_command): Update.
1811         * python/python.c (execute_gdb_command): Update.
1812         * solib.c (info_sharedlibrary_command): Update.
1813         * interps.c (interp_ui_out): Remove.
1814         * interps.h (interp_ui_out): Remove.
1815
1816 2018-05-25  Tom Tromey  <tom@tromey.com>
1817
1818         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
1819         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
1820         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
1821
1822 2018-05-25  Tom Tromey  <tom@tromey.com>
1823
1824         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
1825         * interps.c (interp_exec): Use scoped_restore.
1826
1827 2018-05-25  Tom Tromey  <tom@tromey.com>
1828
1829         * remote.c (remote_target::remote_file_get): Use
1830         gdb::byte_vector.
1831         (remote_target::remote_file_put): Likewise.
1832
1833 2018-05-25  Tom Tromey  <tom@tromey.com>
1834
1835         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
1836         a std::string.
1837         (get_pe_section_index, add_pe_exported_sym): Update.
1838         (read_pe_exported_syms): Use gdb::def_vector.
1839
1840 2018-05-25  Tom Tromey  <tom@tromey.com>
1841
1842         * frame.c (remove_prev_frame): Remove.
1843         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
1844
1845 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
1846
1847         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
1848         Remove prototypes.
1849         * mips-linux-nat.c (supply_fpregset): Always call
1850         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
1851         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
1852         `mips_fill_fpregset'.
1853         * mips-linux-tdep.c (mips_supply_fpregset)
1854         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
1855         (mips_fill_fpregset_wrapper): Remove functions.
1856         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
1857         (mips_linux_fpregset): Remove variable.
1858         (mips_linux_iterate_over_regset_sections): Use
1859         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
1860         (mips_linux_o32_sigframe_init): Remove comment.
1861
1862 2018-05-25  Pedro Alves  <palves@redhat.com>
1863
1864         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
1865         (struct readahead_cache, struct packet_reg, struct
1866         remote_arch_state, class remote_state): Move higher up in the
1867         file.
1868         (remote_target::m_remote_state): Now an object instead of a pointer.
1869         (remote_target::get_remote_state): Adjust.
1870
1871 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
1872
1873         * stack.c (select_and_print_frame): Delete.
1874         (struct function_bounds): Move struct within function.
1875         (func_command): Most content moved into new function
1876         find_frame_for_function, use new function, print result, add
1877         function comment.
1878         (find_frame_for_function): New function, now returns a result.
1879
1880 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1881
1882         * stack.c (iterate_over_block_arg_vars): Fix comment.
1883         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
1884
1885 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
1886
1887         PR gdb/23203
1888         * frame.c
1889         (scoped_restore_selected_frame::scoped_restore_selected_frame):
1890         Define.
1891         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
1892         Define.
1893         * frame.h (class scoped_restore_selected_frame): New class.
1894         * stack.c (print_frame_local_vars): Remove catching and rethrowing
1895         of any exception, use scoped_restore_selected_frame to restore the
1896         frame instead.
1897
1898 2018-05-24  Pedro Alves  <palves@redhat.com>
1899
1900         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
1901         override.
1902
1903 2018-05-23  Tom Tromey  <tom@tromey.com>
1904
1905         * complaints.c (struct complaints): Remove.
1906         (symfile_complaint_book): Remove.
1907         (series): New global.
1908         (complaint_internal): Update.
1909         (clear_complaints): Update.
1910
1911 2018-05-23  Tom Tromey  <tom@tromey.com>
1912
1913         * complaints.c (counters): New global.
1914         (struct complain): Remove.
1915         (struct complaints) <root>: Remove.
1916         (complaint_sentinel): Remove.
1917         (symfile_complaint_book): Update.
1918         (find_complaint) Remove.
1919         (complaint_internal, clear_complaints): Update.
1920
1921 2018-05-23  Tom Tromey  <tom@tromey.com>
1922
1923         * complaints.c (struct complain) <file, line>: Remove.
1924         (find_complaint): Remove file, line parameters.
1925         (complaint_internal): Update.
1926
1927 2018-05-23  Tom Tromey  <tom@tromey.com>
1928
1929         * complaints.c (vcomplaint): Remove.
1930         (complaint_internal) Merge in contents of vcomplaint.
1931
1932 2018-05-23  Tom Tromey  <tom@tromey.com>
1933
1934         * complaints.c (struct complaints) <explanation>: Remove.
1935         (symfile_explanations): Remove.
1936         (symfile_complaint_book): Update.
1937         (vcomplaint): Update.
1938         (struct explanation): Remove.
1939
1940 2018-05-23  Tom Tromey  <tom@tromey.com>
1941
1942         * complaints.c (symfile_complaints): Remove.
1943         (complaint_internal): Remove "complaints" parameter.
1944         (clear_complaints, vcomplaint): Remove "c" parameter.
1945         (get_complaints): Remove.
1946         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
1947         (dwarf2_debug_line_missing_file_complaint)
1948         (dwarf2_debug_line_missing_end_sequence_complaint)
1949         (dwarf2_complex_location_expr_complaint)
1950         (dwarf2_const_value_length_mismatch_complaint)
1951         (dwarf2_section_buffer_overflow_complaint)
1952         (dwarf2_macro_malformed_definition_complaint)
1953         (dwarf2_invalid_attrib_class_complaint)
1954         (create_addrmap_from_index, dw2_symtab_iter_next)
1955         (dw2_expand_marked_cus)
1956         (dw2_debug_names_iterator::find_vec_in_debug_names)
1957         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
1958         (create_debug_type_hash_table, init_cutu_and_read_dies)
1959         (partial_die_parent_scope, add_partial_enumeration)
1960         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
1961         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
1962         (read_import_statement, read_file_scope, create_dwo_cu_reader)
1963         (create_cus_hash_table, create_dwp_hash_table)
1964         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
1965         (dwarf2_rnglists_process, dwarf2_ranges_process)
1966         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
1967         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
1968         (handle_struct_member_die, process_structure_scope)
1969         (read_array_type, read_common_block, read_module_type)
1970         (read_tag_pointer_type, read_typedef, read_base_type)
1971         (read_subrange_type, load_partial_dies, partial_die_info::read)
1972         (partial_die_info::read, partial_die_info::read)
1973         (partial_die_info::read, read_checked_initial_length_and_offset)
1974         (dwarf2_string_attr, read_formatted_entries)
1975         (dwarf_decode_line_header)
1976         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1977         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
1978         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
1979         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1980         (get_signatured_type, get_DW_AT_signature_type)
1981         (decode_locdesc, file_file_name, consume_improper_spaces)
1982         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
1983         (dwarf_decode_macro_bytes, dwarf_decode_macros)
1984         (dwarf2_symbol_mark_computed, set_die_type)
1985         (read_attribute_value): Update.
1986         * stap-probe.c (handle_stap_probe, get_stap_base_address):
1987         Update.
1988         * dbxread.c (unknown_symtype_complaint)
1989         (lbrac_mismatch_complaint, repeated_header_complaint)
1990         (set_namestring, function_outside_compilation_unit_complaint)
1991         (read_dbx_symtab, process_one_symbol): Update.
1992         * gdbtypes.c (stub_noname_complaint): Update.
1993         * windows-nat.c (handle_unload_dll): Update.
1994         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
1995         (decode_base_type): Update.
1996         * xcoffread.c (bf_notfound_complaint, ef_complaint)
1997         (eb_complaint, record_include_begin, record_include_end)
1998         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
1999         (process_xcoff_symbol, read_symbol)
2000         (function_outside_compilation_unit_complaint)
2001         (scan_xcoff_symtab): Update.
2002         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2003         * buildsym.c (finish_block_internal, make_blockvector)
2004         (end_symtab_get_static_block, augment_type_symtab): Update.
2005         * dtrace-probe.c (dtrace_process_dof)
2006         (dtrace_static_probe_ops::get_probes): Update.
2007         * complaints.h (struct complaint): Don't declare.
2008         (symfile_complaints): Remove.
2009         (complaint_internal): Remove "complaints" parameter.
2010         (complaint): Likewise.
2011         (clear_complaints): Likewise.
2012         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2013         (reread_symbols): Update.
2014         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2015         (dwarf2_frame_cache, decode_frame_entry): Update.
2016         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2017         * objc-lang.c (lookup_objc_class, lookup_child_selector)
2018         (info_selectors_command): Update.
2019         * macrotab.c (macro_include, check_for_redefinition)
2020         (macro_undef): Update.
2021         * objfiles.c (filter_overlapping_sections): Update.
2022         * stabsread.c (invalid_cpp_abbrev_complaint)
2023         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2024         (define_symbol, error_type, read_type, rs6000_builtin_type)
2025         (stabs_method_name_from_physname, read_member_functions)
2026         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2027         (attach_fields_to_type, complain_about_struct_wipeout)
2028         (read_range_type, read_args, common_block_start)
2029         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2030         Update.
2031         * mdebugread.c (index_complaint, unknown_ext_complaint)
2032         (basic_type_complaint, bad_tag_guess_complaint)
2033         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2034         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2035         (parse_procedure, parse_lines)
2036         (function_outside_compilation_unit_complaint)
2037         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2038         (bad_tag_guess_complaint, reg_value_complaint): Update.
2039         * cp-support.c (demangled_name_complaint): Update.
2040         * macroscope.c (sal_macro_scope): Update.
2041         * dwarf-index-write.c (class debug_names): Update.
2042
2043 2018-05-23  Tom Tromey  <tom@tromey.com>
2044
2045         * complaints.c (clear_complaints): Remove "noisy" parameter.
2046         * complaints.h (clear_complaints): Update.
2047         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2048         (reread_symbols): Update.
2049
2050 2018-05-23  Tom Tromey  <tom@tromey.com>
2051
2052         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2053         SUBSEQUENT_MESSAGE.
2054         (vcomplaint, clear_complaints): Update.
2055         (symfile_explanations): Remove some messages.
2056
2057 2018-05-23  Tom Tromey  <tom@tromey.com>
2058
2059         * complaints.c (internal_complaint): Remove.
2060         * complaints.h (internal_complaint): Remove.
2061
2062 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
2063
2064         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2065
2066 2018-05-22  Pedro Alves  <palves@redhat.com>
2067
2068         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2069         (remote_fileio_badfd, remote_fileio_return_errno)
2070         (remote_fileio_return_success, remote_fileio_func_open)
2071         (remote_fileio_func_open, remote_fileio_func_close)
2072         (remote_fileio_func_read, remote_fileio_func_write)
2073         (remote_fileio_func_lseek, remote_fileio_func_rename)
2074         (remote_fileio_func_unlink, remote_fileio_func_stat)
2075         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2076         (remote_fileio_func_isatty, remote_fileio_func_system): Add
2077         remote_target parameter.
2078         (remote_fio_func_map) <func>: Add remote_target parameter.
2079         (do_remote_fileio_request, remote_fileio_request):
2080         * remote-fileio.h (remote_fileio_request):
2081         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2082         remote_target parameter.
2083         (remote_notif_process, handle_notification): Adjust to pass down
2084         the remote.
2085         (remote_notif_state_allocate): Add remote_target parameter.  Save
2086         it.
2087         * remote-notif.h (struct remote_target): Forward declare.
2088         (struct notif_client) <parse, ack, can_get_pending_events>: Add
2089         remote_target parameter.
2090         (struct remote_notif_state) <remote>: New field.
2091         (remote_notif_ack, remote_notif_parse): Add remote_target
2092         parameter.
2093         (remote_notif_state_allocate, remote_notif_state_allocate): Add
2094         remote_target parameter.
2095         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2096         (threads_listing_context, rmt_thread_action, protocol_feature)
2097         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2098         (packet_result, struct threads_listing_context, remote_state):
2099         Move definitions and declarations higher up.
2100         (remote_target) <~remote_target>: Declare.
2101         (remote_download_command_source, remote_file_put, remote_file_get)
2102         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2103         (remote_hostio_pread_vFile, remote_hostio_send_command)
2104         (remote_hostio_set_filesystem, remote_hostio_open)
2105         (remote_hostio_close, remote_hostio_unlink, remote_state)
2106         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2107         (get_memory_write_packet_size, get_memory_read_packet_size)
2108         (append_pending_thread_resumptions, remote_detach_1)
2109         (append_resumption, remote_resume_with_vcont)
2110         (add_current_inferior_and_thread, wait_ns, wait_as)
2111         (process_stop_reply, remote_notice_new_inferior)
2112         (process_initial_stop_replies, remote_add_thread)
2113         (btrace_sync_conf, remote_btrace_maybe_reopen)
2114         (remove_new_fork_children, kill_new_fork_children)
2115         (discard_pending_stop_replies, stop_reply_queue_length)
2116         (check_pending_events_prevent_wildcard_vcont)
2117         (discard_pending_stop_replies_in_queue, stop_reply)
2118         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2119         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2120         (remote_interrupt_as, remote_interrupt_ns)
2121         (remote_get_noisy_reply, remote_query_attached)
2122         (remote_add_inferior, remote_current_thread, get_current_thread)
2123         (set_thread, set_general_thread, set_continue_thread)
2124         (set_general_process, write_ptid)
2125         (remote_unpack_thread_info_response, remote_get_threadinfo)
2126         (parse_threadlist_response, remote_get_threadlist)
2127         (remote_threadlist_iterator, remote_get_threads_with_ql)
2128         (remote_get_threads_with_qxfer)
2129         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2130         (get_offsets, remote_check_symbols, remote_supported_packet)
2131         (remote_query_supported, remote_packet_size)
2132         (remote_serial_quit_handler, remote_detach_pid)
2133         (remote_vcont_probe, remote_resume_with_hc)
2134         (send_interrupt_sequence, interrupt_query)
2135         (remote_notif_get_pending_events, fetch_register_using_p)
2136         (send_g_packet, process_g_packet, fetch_registers_using_g)
2137         (store_register_using_P, store_registers_using_G)
2138         (set_remote_traceframe, check_binary_download)
2139         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2140         (remote_xfer_live_readonly_partial, remote_read_bytes)
2141         (remote_send_printf, remote_flash_write, readchar)
2142         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2143         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2144         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2145         (extended_remote_disable_randomization, extended_remote_run)
2146         (send_environment_packet, extended_remote_environment_support)
2147         (extended_remote_set_inferior_cwd, remote_write_qxfer)
2148         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2149         (packet_command): Now methods of ...
2150         (remote_target): ... this class.
2151         (m_remote_state) <remote_target>: New field.
2152         (struct remote_state) <stop_reply_queue,
2153         remote_async_inferior_event_token, wait_forever_enabled_p>: New
2154         fields.
2155         (remote_state::remote_state): Allocate stop_reply_queue.
2156         (remote_state): Delete global.
2157         (get_remote_state_raw): Delete.
2158         (remote_target::get_remote_state): Allocate m_remote_state on
2159         demand.
2160         (get_current_remote_target): New.
2161         (remote_ops, extended_remote_ops): Delete.
2162         (wait_forever_enabled_p, remote_async_inferior_event_token):
2163         Delete, moved to struct remote_state.
2164         (remote_target::close): Delete self.  Destruction bits split to
2165         ...
2166         (remote_target::~remote_target): ... this.
2167         (show_memory_packet_size): Adjust to use
2168         get_current_remote_target.
2169         (struct protocol_feature) <func>: Add remote_target parameter.
2170         All callers adjusted.
2171         (curr_quit_handler_target): New.
2172         (remote_serial_quit_handler): Reimplement.
2173         (remote_target::open_1): Adjust to use get_current_remote_target.
2174         Heap-allocate remote_target/extended_remote_target instances.
2175         (vcont_builder::vcont_builder): Add remote_target parameter, and
2176         save it in m_remote.  All callers adjusted.
2177         (vcont_builder::m_remote): New field.
2178         (vcont_builder::restart, vcont_builder::flush)
2179         (vcont_builder::push_action): Use it.
2180         (remote_target::commit_resume): Use it.
2181         (struct queue_iter_param) <remote>: New field.
2182         (remote_target::remove_new_fork_children): Fill in 'remote' field.
2183         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2184         (check_pending_event_prevents_wildcard_vcont_callback)
2185         (remote_target::check_pending_events_prevent_wildcard_vcont)
2186         (remote_target::discard_pending_stop_replies)
2187         (remote_target::discard_pending_stop_replies_in_queue)
2188         (remote_target::remote_notif_remove_queued_reply): Fill in
2189         'remote' field.
2190         (remote_notif_get_pending_events): New.
2191         (remote_target::readchar, remote_target::remote_serial_write):
2192         Save/restore curr_quit_handler_target.
2193         (putpkt): New.
2194         (kill_new_fork_children): Fill in 'remote' field.
2195         (packet_command): Use get_current_remote_target, defer to
2196         remote_target method of same name.
2197         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2198         parameter, and save it in m_remote.  All callers adjusted.
2199         (scoped_remote_fd::release): Use m_remote.
2200         (scoped_remote_fd::m_remote): New field.
2201         (remote_file_put, remote_file_get, remote_file_delete): Use
2202         get_current_remote_target, defer to remote_target method of same
2203         name.
2204         (remote_btrace_reset): Add remote_state paremeter.  Update all
2205         callers.
2206         (remote_async_inferior_event_handler). Pass down 'data'.
2207         (remote_new_objfile): Use get_current_remote_target.
2208         (remote_target::vcont_r_supported): New.
2209         (set_range_stepping): Use get_current_remote_target and
2210         remote_target::vcont_r_supported.
2211         (_initialize_remote): Don't allocate 'remote_state' and
2212         'stop_reply_queue' globals.
2213         * remote.h (struct remote_target): Forward declare.
2214         (getpkt, putpkt, remote_notif_get_pending_events): Add
2215         'remote_target' parameter.
2216
2217 2018-05-22  Pedro Alves  <palves@redhat.com>
2218
2219         * remote.c (vcont_builder): Now a class.  Make all data members
2220         private.
2221         (vcont_builder) <vcont_builder, restart, flush, push_action>:
2222         Declare methods.
2223         (vcont_builder_restart): Rename to ...
2224         (vcont_builder::restart): ... this.
2225         (vcont_builder_flush): Rename to ...
2226         (vcont_builder::flush): ... this.
2227         (vcont_builder_push_action): Rename to ...
2228         (vcont_builder::push_action): ... this.
2229         (remote_target::commit_resume): Adjust.
2230
2231 2018-05-22  Pedro Alves  <palves@redhat.com>
2232
2233         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2234         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2235         (get_fixed_memory_packet_size): New.
2236         (get_memory_packet_size): Use it.
2237         (set_memory_packet_size): Don't override the config size with
2238         DEFAULT_MAX_MEMORY_PACKET_SIZE.
2239         (show_memory_packet_size): Use get_fixed_memory_packet_size.
2240         Don't refer to get_memory_packet_size if not connected to a remote
2241         target.  Show "(default)" if configured size is 0.
2242
2243 2018-05-22  Pedro Alves  <palves@redhat.com>
2244
2245         * remote.c (remote_target::mourn_inferior): Move
2246         discard_pending_stop_replies call here from ...
2247         (_initialize_remote): ... here.
2248
2249 2018-05-22  Pedro Alves  <palves@redhat.com>
2250
2251         * remote.c (compare_section_command): Remove set_general_process
2252         call.
2253
2254 2018-05-22  Pedro Alves  <palves@redhat.com>
2255
2256         * remote.c (struct packet_reg, struct remote_arch_state):
2257         Move higher up in the file.
2258         (remote_state) <m_arch_states>: Store remote_arch_state values
2259         instead of remote_arch_state pointers.
2260         (remote_state::get_remote_arch_state): Adjust.
2261
2262 2018-05-22  Pedro Alves  <palves@redhat.com>
2263
2264         * remote.c: Include <unordered_map>.
2265         (remote_state): Now a class.
2266         (remote_state) <get_remote_arch_state>: Declare method.
2267         <get_remote_arch_state>: New field.
2268         (remote_arch_state) <remote_arch_state>: Declare ctor.
2269         <regs>: Now a unique_ptr.
2270         (remote_gdbarch_data_handle): Delete.
2271         (get_remote_arch_state): Delete.
2272         (remote_state::get_remote_arch_state): New.
2273         (get_remote_state): Adjust to call remote_state's
2274         get_remote_arch_state method.
2275         (init_remote_state): Delete, bits factored out to ...
2276         (remote_arch_state::remote_arch_state): ... this new method.
2277         (get_remote_packet_size, get_memory_packet_size)
2278         (process_g_packet, remote_target::fetch_registers)
2279         (remote_target::prepare_to_store, store_registers_using_G)
2280         (remote_target::store_registers, remote_target::get_trace_status):
2281         Adjust to call remote_state's method.
2282         (_initialize_remote): Remove reference to
2283         remote_gdbarch_data_handle.
2284
2285 2018-05-22  Pedro Alves  <palves@redhat.com>
2286
2287         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2288         pread>: New method declarations.
2289         (remote_target::open_1): Adjust.
2290         (readahead_cache_invalidate): Rename to ...
2291         (readahead_cache::invalidate): ... this, and adjust to be a class
2292         method.
2293         (readahead_cache_invalidate_fd): Rename to ...
2294         (readahead_cache::invalidate_fd): ... this, and adjust to be a
2295         class method.
2296         (remote_hostio_pwrite): Adjust.
2297         (remote_hostio_pread_from_cache): Rename to ...
2298         (readahead_cache::pread): ... this, and adjust to be a class
2299         method.
2300         (remote_hostio_close): Adjust.
2301
2302 2018-05-22  Pedro Alves  <palves@redhat.com>
2303
2304         * remote.c (remote_hostio_close_cleanup): Delete.
2305         (class scoped_remote_fd): New.
2306         (remote_file_put, remote_file_get): Use it.
2307
2308 2018-05-22  Pedro Alves  <palves@redhat.com>
2309
2310         (struct vCont_action_support): Use bool and initialize all fields.
2311         (struct readahead_cache): Initialize all fields.
2312         (remote_state): Use bool and initialize all fields.
2313         (remote_state::remote_state, remote_state::~remote_state): New.
2314         (new_remote_state): Delete.
2315         (_initialize_remote): Use new to allocate remote_state.
2316
2317 2018-05-22  Pedro Alves  <palves@redhat.com>
2318             張俊芝  <zjz@zjz.name>
2319
2320         PR gdb/22973
2321         * c-exp.y: Include "c-support.h".
2322         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2323         of tolower.  Use c_ident_is_alpha to scan names.
2324         * c-lang.c: Include "c-support.h".
2325         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2326         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2327         * c-support.h: New file, with bits factored out from ...
2328         * cp-name-parser.y: ... this file.
2329         Include "c-support.h".
2330         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2331         c-support.h and renamed.
2332         (symbol_end, yylex): Adjust.
2333
2334 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
2335
2336         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2337         parameter type to CORE_ADDR.
2338         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2339         parameter type in declaration to CORE_ADDR.
2340         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2341         target_auxv_search to get AT_HWCAP and use the result to get the
2342         target description.
2343         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2344         to CORE_ADDR. Remove the cast of the return value to unsigned
2345         long. Fix error predicate of target_auxv_search.
2346         (ppc_linux_nat_target::read_description): Change the type of the
2347         hwcap variable to CORE_ADDR.
2348
2349 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
2350
2351         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2352         if the size of fpscr is larger than 32 bits.
2353
2354 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
2355
2356         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2357         (ppc32_linux_vsxregmap): New global.
2358         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2359         regcache_supply_regset, and regcache_collect_regset.
2360         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2361         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2362         (fetch_vsx_register, store_vsx_register): Remove.
2363         (fetch_vsx_registers): Add regno parameter. Get regset using
2364         ppc_linux_vsxregset. Use regset to supply registers.
2365         (store_vsx_registers): Add regno parameter. Get regset using
2366         ppc_linux_vsxregset. Use regset to collect registers.
2367         (fetch_register): Call fetch_vsx_registers instead of
2368         fetch_vsx_register.
2369         (store_register): Call store_vsx_registers instead of
2370         store_vsx_register.
2371         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2372         new regno parameter.
2373         (store_ppc_registers): Call store_vsx_registers with -1 for the
2374         new regno parameter.
2375         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2376         (ppc_collect_vsxregset): Remove.
2377
2378 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
2379
2380         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2381         offset fields.
2382         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2383         for vector register offset fields.
2384         (ppc64_fbsd_reg_offsets): Likewise.
2385         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2386         to vector register offset fields.
2387         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2388         to vector register offset fields.
2389         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2390         vector register offset fields.
2391         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2392         initializers for vector register offset fields.
2393         (rs6000_aix64_reg_offsets): Likewise.
2394         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2395         (ppc_supply_vrregset): Remove.
2396         (ppc_collect_vrregset): Remove.
2397         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2398         (ppc_linux_vrregset) : New function.
2399         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2400         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2401         (ppc32_linux_vrregset): Remove.
2402         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2403         and use result instead of ppc32_linux_vrregset.
2404         (ppc32_linux_reg_offsets): Remove initializers for vector register
2405         offset fields.
2406         (ppc64_linux_reg_offsets): Likewise.
2407         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2408         * ppc-linux-nat.c: Include regset.h.
2409         (gdb_vrregset_t): Adjust comment to account for little-endian
2410         mode.
2411         (supply_vrregset, fill_vrregset): Remove.
2412         (fetch_altivec_register, store_altivec_register): Remove.
2413         (fetch_altivec_registers): Add regno parameter. Get regset using
2414         ppc_linux_vrregset. Use regset to supply registers.
2415         (store_altivec_registers): Add regno parameter. Get regset using
2416         ppc_linux_vrregset. Use regset to collect registers.
2417         (fetch_register): Call fetch_altivec_registers instead of
2418         fetch_altivec_register.
2419         (store_register): Call store_altivec_registers instead of
2420         store_altivec_register.
2421         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2422         the new regno parameter.
2423         (store_ppc_registers): Call store_altivec_registers with -1 for
2424         the new regno parameter.
2425
2426 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
2427
2428         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2429         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2430         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2431         (gdb_vrregset_t): Change array type size to
2432         PPC_LINUX_SIZEOF_VRREGSET.
2433         (gdb_vsxregset_t): Change array type size to
2434         PPC_LINUX_SIZEOF_VSXREGSET.
2435         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2436         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2437         PPC_LINUX_SIZEOF_VSXREGSET.
2438
2439 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
2440
2441         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2442         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2443         nat/ppc-linux.c.
2444         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2445         ppc_linux_target_wordsize with tid.
2446         (ppc_linux_nat_target::read_description): Call ppc_linux_target
2447         wordsize with tid.
2448         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2449         (ppc64_64bit_inferior_p): Add static and inline specifiers.
2450         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2451         tid parameter. Remove static specifier.
2452         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2453         (ppc_linux_target_wordsize): New declaration.
2454
2455 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
2456
2457         * arch/ppc-linux-common.c: New file.
2458         * arch/ppc-linux-common.h: New file.
2459         * arch/ppc-linux-tdesc.h: New file.
2460         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
2461         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
2462         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
2463         arch/ppc-linux-tdesc.h.
2464         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
2465         arch/ppc-linux-tdesc.h.
2466         (ppc_linux_nat_target::read_description): Remove target
2467         description matching code. Fill a ppc_linux_features struct and
2468         call ppc_linux_match_description with it. Move comment about ISA
2469         2.05 to ppc-linux-common.c.
2470         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
2471         arch/ppc-linux-tdesc.h.
2472         (ppc_linux_core_read_description): Remove target description
2473         matching code. Fill a ppc_linux_features struct and call
2474         ppc_linux_match_description with it.
2475         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2476         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2477         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2478         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2479         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2480         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2481         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2482         (tdesc_powerpc_e500l): Remove.
2483
2484 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
2485
2486         * ada-lang.c (catch_assert_command): Pass empty string instead
2487         of NULL for excep_string argument.
2488
2489 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
2490
2491         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
2492         the width of the requested register exceeds the width of the
2493         `ptrace' data type.
2494
2495 2018-05-21  Tom Tromey  <tom@tromey.com>
2496
2497         * printcmd.c (output_command): Remove.
2498         (output_command_const): Rename to output_command.
2499         * valprint.h (output_command): Rename from output_command_const.
2500         * tracepoint.c (trace_dump_actions): Call output_command.
2501
2502 2018-05-21  Tom Tromey  <tom@tromey.com>
2503
2504         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2505         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
2506         * ada-lang.h (create_ada_exception_catchpoint): Update.
2507         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
2508         std::string.
2509         (create_excep_cond_exprs, ~ada_catchpoint)
2510         (should_stop_exception, print_one_exception)
2511         (print_mention_exception, print_recreate_exception): Update.
2512         (ada_get_next_arg): Remove.
2513         (catch_ada_exception_command_split): Use std::string.  Change type
2514         of "excep_string", "cond_string".
2515         (catch_ada_exception_command): Update.
2516         (create_ada_exception_catchpoint): Change type of excep_string.
2517         (ada_exception_sal): Remove excep_string parameter.
2518         (~ada_catchpoint): Remove.
2519
2520 2018-05-21  Tom Tromey  <tom@tromey.com>
2521
2522         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
2523         cleanup.
2524
2525 2018-05-21  Tom Tromey  <tom@tromey.com>
2526
2527         * ada-lang.c (ada_exception_message_1, ada_exception_message):
2528         Return unique_xmalloc_ptr.
2529         (print_it_exception): Update.
2530
2531 2018-05-21  Tom Tromey  <tom@tromey.com>
2532
2533         * tracepoint.c (trace_dump_actions): Use std::string.
2534
2535 2018-05-21  Tom Tromey  <tom@tromey.com>
2536
2537         * symfile.c (reread_symbols): Use std::string for original_name.
2538
2539 2018-05-21  Tom Tromey  <tom@tromey.com>
2540
2541         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
2542         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
2543         constructor.
2544
2545 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
2546
2547         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
2548         instance to...
2549         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
2550         * objfiles.c (get_objfile_bfd_data): Allocate
2551         objfile_per_bfd_storage with obstack_new when allocating on
2552         obstack.
2553
2554 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
2555
2556         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
2557         OBSTACK_ZALLOC.
2558         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
2559         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
2560         * mdebugread.c (mdebug_build_psymtabs): Likewise.
2561         (add_pending): Likewise.
2562         (parse_symbol): Likewise.
2563         (parse_partial_symbols): Likewise.
2564         (psymtab_to_symtab_1): Likewise.
2565         (new_psymtab): Likewise.
2566         (elfmdebug_build_psymtabs): Likewise.
2567         * minsyms.c (terminate_minimal_symbol_table): Likewise.
2568         * objfiles.c (get_objfile_bfd_data): Likewise.
2569         (objfile_register_static_link): Likewise.
2570         * psymtab.c (allocate_psymtab): Likewise.
2571         * stabsread.c (read_member_functions): Likewise.
2572         * xcoffread.c (xcoff_end_psymtab): Likewise.
2573
2574 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
2575
2576         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
2577         compiler supports std::is_trivially_constructible.
2578         * common/poison.h: Include obstack.h.
2579         (IsMallocable): Define to is_trivially_constructible if the
2580         compiler supports it, define to true_type otherwise.
2581         (xobnew): New.
2582         (XOBNEW): Redefine.
2583         (xobnewvec): New.
2584         (XOBNEWVEC): Redefine.
2585         * gdb_obstack.h (obstack_zalloc): New.
2586         (OBSTACK_ZALLOC): Redefine.
2587         (obstack_calloc): New.
2588         (OBSTACK_CALLOC): Redefine.
2589         (obstack_new): New.
2590         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
2591         (gdbarch_obstack): New declaration in gdbarch.h, definition in
2592         gdbarch.c.
2593         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
2594         obstack_calloc/obstack_zalloc.
2595         (gdbarch_obstack_zalloc): Remove.
2596         * target-descriptions.c (tdesc_data_init): Use obstack_new.
2597
2598 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2599
2600         * stack.c (backtrace_command_1): Remove useless variable int i.
2601
2602 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2603
2604         * stack.c (print_frame_info): Fix comment.
2605
2606 2018-05-18  Tom Tromey  <tom@tromey.com>
2607
2608         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
2609         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
2610         (~dwarf2_per_objfile): Update
2611         (dwarf2_get_dwz_file): Use new.
2612         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
2613         unique_ptr.
2614
2615 2018-05-18  Tom Tromey  <tom@tromey.com>
2616
2617         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
2618         unique_ptr.
2619         * dwarf2read.c (struct dwp_file): Add constructor and
2620         initializers.
2621         (open_and_init_dwp_file): Return a unique_ptr.
2622         (dwarf2_per_objfile, create_dwp_hash_table)
2623         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
2624         (lookup_dwo_unit_in_dwp): Update.
2625         (open_and_init_dwp_file, get_dwp_file): Update.
2626
2627 2018-05-18  Tom Tromey  <tom@tromey.com>
2628
2629         * dwarf2read.c (dwarf2_per_objfile): Update.
2630         (struct mapped_index): Add initializers.
2631         (dwarf2_read_index): Use new.
2632         (dw2_symtab_iter_init): Update.
2633         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
2634         unique_ptr.
2635
2636 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
2637
2638         * dwarf2read.c (mapped_index) <total_size>: Remove.
2639
2640 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
2641
2642         * unittests/format_pieces-selftests.c (test_format_specifier):
2643         Add ARI comments.
2644
2645 2018-05-18  Tom Tromey  <tom@tromey.com>
2646
2647         * c-typeprint.c (maybe_print_hole): New function.
2648         (c_print_type_struct_field_offset): Update.
2649         (c_type_print_base_struct_union): Call maybe_print_hole.
2650
2651 2018-05-17  Keith Seitz  <keiths@redhat.com>
2652
2653         * breakpoint.c (build_bpstat_chain): New function, moved from
2654         bpstat_stop_status.
2655         (bpstat_stop_status): Add optional parameter, `stop_chain'.
2656         If no stop chain is passed, call build_bpstat_chain to build it.
2657         * breakpoint.h (build_bpstat_chain): Declare.
2658         (bpstat_stop_status): Move documentation here from breakpoint.c.
2659         * infrun.c (handle_signal_stop): Before eliding inlined frames,
2660         build the stop chain and pass it to skip_inline_frames.
2661         Pass this stop chain to bpstat_stop_status.
2662         * inline-frame.c: Include breakpoint.h.
2663         (stopped_by_user_bp_inline_frame): New function.
2664         (skip_inline_frames): Add parameter `stop_chain'.
2665         Move documention to inline-frame.h.
2666         If non-NULL, use stopped_by_user_bp_inline_frame to determine
2667         whether the frame should be elided.
2668         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
2669         Add moved documentation and update for new parameter.
2670
2671 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
2672
2673         PR cli/14975
2674         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2675         unittests/format_pieces-selftests.c.
2676         * common/format.h (format_piece) <operator==>: New.
2677         (format_pieces) <operator[]>: Remove.
2678         * common/format.c (format_pieces::format_pieces): Handle \e.
2679         * unittests/format_pieces-selftests.c: New.
2680
2681 2018-05-17  Tom Tromey  <tom@tromey.com>
2682
2683         PR symtab/23010:
2684         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
2685         (dw2_instantiate_symtab): Add skip_partial parameter.
2686         (dw2_find_last_source_symtab, dw2_map_expand_apply)
2687         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
2688         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
2689         (dw2_expand_symtabs_matching_one)
2690         (dw2_find_pc_sect_compunit_symtab)
2691         (dw2_debug_names_lookup_symbol)
2692         (dw2_debug_names_expand_symtabs_for_function): Update.
2693         (init_cutu_and_read_dies): Add skip_partial parameter.
2694         (process_psymtab_comp_unit, build_type_psymtabs_1)
2695         (process_skeletonless_type_unit, load_partial_comp_unit)
2696         (psymtab_to_symtab_1): Update.
2697         (load_full_comp_unit): Add skip_partial parameter.
2698         (process_imported_unit_die, dwarf2_read_addr_index)
2699         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
2700         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
2701         (read_signatured_type): Update.
2702
2703 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
2704
2705         * value.c (release_value): Remove unused variable.
2706         (record_latest_value): Likewise.
2707         (access_value_history): Likewise.
2708         (preserve_values): Likewise.
2709
2710 2018-05-17  Tom Tromey  <tom@tromey.com>
2711
2712         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
2713         Initialize.
2714
2715 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
2716
2717         PR gdb/22286
2718         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
2719         Also handle registers whose width is not a multiple of
2720         PTRACE_TYPE_RET.
2721         (linux_nat_trad_target::store_register): Likewise.
2722
2723 2018-05-16  Tom Tromey  <tom@tromey.com>
2724
2725         * gdbcore.h (core_bfd): Redefine.
2726         * corelow.c (core_target::close): Update.
2727         (core_target_open): Update.
2728         * progspace.h (struct program_space) <cbfd>: Now a
2729         gdb_bfd_ref_ptr.
2730
2731 2018-05-16  Tom Tromey  <tom@tromey.com>
2732
2733         PR cli/19551:
2734         * symfile-add-flags.h (enum symfile_add_flags)
2735         <SYMFILE_NOT_FILENAME>: New constant.
2736         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
2737         objfile name from BFD.
2738         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
2739         * minidebug.c (find_separate_debug_file_in_section): Put
2740         ".gnu_debugdata" into BFD's file name.
2741
2742 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
2743
2744         * regcache.c (regcache_read_ftype, regcache_write_ftype):
2745         Remove.
2746
2747 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
2748
2749         PR binutils/21446
2750         * aarch64-tdep.c (aarch64_analyze_prologue,
2751         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
2752         Indicate not interested in errors.
2753
2754 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
2755
2756         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
2757         Supply the MIPS_ZERO_REGNUM register.
2758
2759 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
2760
2761         * mips-tdep.c (mask_address_var): Make variable static.
2762
2763 2018-05-14  Tom Tromey  <tom@tromey.com>
2764
2765         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
2766
2767 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
2768
2769         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
2770         FXSAVE_ADDR for the mxcsr register.
2771
2772 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
2773
2774         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
2775
2776 2018-05-11  Pedro Alves  <palves@redhat.com>
2777
2778         * corelow.c (core_target) <core_target>: No longer inline.
2779         Initialize m_core_gdbarch, m_core_vec and build the section table
2780         here.
2781         <~core_target>: New.
2782         <core_gdbarch, get_core_register_section>: New methods.
2783         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
2784         factored out from ...
2785         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
2786         (core_ops): Delete.
2787         (sniff_core_bfd): Add gdbarch parameter.
2788         (core_close): Delete, merged into ...
2789         (core_target::close): ... here.  Delete self.
2790         (core_close_cleanup): Delete.
2791         (core_target_open): Allocate a core_target on the heap.  Use a
2792         unique_ptr instead of a cleanup.  Bits moved into the core_target
2793         ctor.  Adjust to use core_target methods instead of globals.
2794         (get_core_register_section): Rename to ...
2795         (core_target::get_core_register_section): ... this and adjust.
2796         (struct get_core_registers_cb_data): New.
2797         (get_core_registers_cb): Use it.  Use bool.
2798         (core_target::fetch_registers, core_target::files_info)
2799         (core_target::xfer_partial, core_target::read_description)
2800         (core_target::pid_to, core_target::thread_name): Adjust to
2801         reference class fields instead of globals.
2802         * target.h (struct target_ops_deleter, target_ops_up): New.
2803
2804 2018-05-11  Pedro Alves  <palves@redhat.com>
2805
2806         * corefile.c (core_file_command): Move to corelow.c.
2807         * corelow.c (the_core_target): Delete.
2808         (core_file_command): Moved from corefile.c.  Check exec_bfd
2809         instead of the_core_target.  Use target_detach instead of calling
2810         into the_core_target directly.
2811         (maybe_say_no_core_file_now): New.
2812         (core_target::detach): Use it.
2813         (_initialize_corelow): Remove references to the_core_target.
2814         * gdbcore.h (the_core_target): Delete.
2815
2816 2018-05-11  Tom Tromey  <tromey@redhat.com>
2817             Pedro Alves  <palves@redhat.com>
2818
2819         * corefile.c (core_bfd): Remove.
2820         * gdbcore.h (core_bfd): Now a macro.
2821         * progspace.h (struct program_space) <cbfd>: New field.
2822
2823 2018-05-11  Tom Tromey  <tom@tromey.com>
2824
2825         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
2826         gdb::def_vector.
2827
2828 2018-05-10  Tom Tromey  <tom@tromey.com>
2829
2830         * configure: Rebuild.
2831         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
2832
2833 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
2834
2835         PR server/23158:
2836         * regformats/regdat.sh: Adjust script, following the addition
2837         of the new expedite_regs parameter to init_target_desc.
2838
2839 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
2840     
2841         PR gdb/23127
2842         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
2843         set_gdbarch_significant_addr_bit.
2844         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
2845         set_gdbarch_significant_addr_bit.
2846         * utils.c (address_significant): Update to sign extend addr.
2847
2848 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
2849
2850         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
2851         (xtensa_linux_init_abi): Limit tdep->num_regs by
2852         tdep->num_nopriv_regs.
2853         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
2854         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
2855         not initialized.
2856
2857 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
2858
2859         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
2860
2861 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2862
2863         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
2864         (I387_MXCSR_INIT_VAL): New constant.
2865         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
2866         buffer if it was supplied by the inferior.
2867         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
2868         (i387_xsave_get_clear_bv): New function.
2869         (i387_supply_xsave): Only read x87 control registers from the
2870         xsave buffer if the feature is enabled, and the state will have
2871         been written, otherwise, provide a suitable default.
2872         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
2873         including x87 control registers.  Update control registers if they
2874         have changed from the default value, and mark features as enabled
2875         as required.
2876         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
2877
2878 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
2879
2880         * spu-tdep.c (info_spu_event_command): Fix output formatting.
2881
2882 2018-05-07  Tom Tromey  <tom@tromey.com>
2883
2884         * configure: Rebuild.
2885         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
2886
2887 2018-05-07  Tom Tromey  <tom@tromey.com>
2888
2889         PR tdep/20362:
2890         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
2891         bit.  Use correct value for VDIV.
2892
2893 2018-05-04  Tom Tromey  <tom@tromey.com>
2894
2895         * configure: Rebuild.
2896         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
2897
2898 2018-05-04  Tom Tromey  <tom@tromey.com>
2899
2900         * linux-record.c (record_linux_system_call) <case
2901         RECORD_SYS_RECVFROM>: Add "break".
2902
2903 2018-05-04  Tom Tromey  <tom@tromey.com>
2904
2905         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
2906         Add missing "break".
2907         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
2908         Add missing "break".
2909
2910 2018-05-04  Tom Tromey  <tom@tromey.com>
2911
2912         * rs6000-tdep.c (ppc_process_record_op4)
2913         (ppc_process_record_op63): Add fall-through comment.
2914
2915 2018-05-04  Tom Tromey  <tom@tromey.com>
2916
2917         * i386-tdep.c (i386_process_record): Add fall-through comment.
2918
2919 2018-05-04  Tom Tromey  <tom@tromey.com>
2920
2921         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
2922         comment.
2923
2924 2018-05-04  Tom Tromey  <tom@tromey.com>
2925
2926         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
2927         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
2928         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
2929         comment.
2930         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
2931         comment.
2932         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
2933         comment.
2934
2935 2018-05-04  Tom Tromey  <tom@tromey.com>
2936
2937         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
2938
2939 2018-05-04  Tom Tromey  <tom@tromey.com>
2940
2941         * s390-tdep.c (s390_process_record): Fix fall-through comments.
2942         * xcoffread.c (scan_xcoff_symtab): Move comment later.
2943         * symfile.c (section_is_mapped): Fix fall-through comment.
2944         * stabsread.c (define_symbol, read_member_functions): Fix
2945         fall-through comment.
2946         * s390-linux-tdep.c (s390_process_record): Fix fall-through
2947         comment.
2948         * remote.c (remote_wait_as): Fix fall-through comment.
2949         * p-exp.y (yylex): Fix fall-through comment.
2950         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
2951         comment.
2952         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
2953         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
2954         * jv-exp.y (yylex): Fix fall-through comment.
2955         * go-exp.y (lex_one_token): Fix fall-through comment.
2956         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
2957         fall-through comment.
2958         * f-exp.y (yylex): Fix fall-through comment.
2959         * dwarf2read.c (process_die): Fix fall-through comments.
2960         * dbxread.c (process_one_symbol): Fix fall-through comment.
2961         * d-exp.y (lex_one_token): Fix fall-through comment.
2962         * cp-name-parser.y (yylex): Fix fall-through comment.
2963         * coffread.c (coff_symtab_read): Fix fall-through comment.
2964         * c-exp.y (lex_one_token): Fix fall-through comment.
2965         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
2966         comment.
2967         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
2968         comment.
2969
2970 2018-05-04  Tom Tromey  <tom@tromey.com>
2971
2972         PR python/22730:
2973         * NEWS: Mention gdb.execute change.
2974         * gdbcmd.h (execute_control_command): Don't declare.
2975         * python/python.c (execute_gdb_command): Use read_command_lines_1,
2976         execute_control_commands, execute_control_commands_to_string.
2977         * cli/cli-script.h (execute_control_commands)
2978         (execute_control_commands_to_string): Declare.
2979         (execute_control_command): Add from_tty parameter.
2980         * cli/cli-script.c (execute_control_commands)
2981         (execute_control_commands_to_string): New functions.
2982         (execute_user_command): Use execute_control_commands.
2983         (execute_control_command_1): Add "from_tty" parameter.  Update.
2984         (execute_control_command): Likewise.
2985
2986 2018-05-04  Tom Tromey  <tom@tromey.com>
2987
2988         PR python/22731:
2989         * NEWS: Mention that breakpoint commands are writable.
2990         * python/py-breakpoint.c (bppy_set_commands): New function.
2991         (breakpoint_object_getset) <"commands">: Use it.
2992
2993 2018-05-04  Tom Tromey  <tom@tromey.com>
2994
2995         * tracepoint.c (actions_command): Update.
2996         * mi/mi-cmd-break.c (mi_command_line_array)
2997         (mi_command_line_array_cnt, mi_command_line_array_ptr)
2998         (mi_read_next_line): Remove.
2999         (mi_cmd_break_commands): Update.
3000         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3001         function_view.
3002         * cli/cli-script.c (get_command_line): Update.
3003         (process_next_line): Use function_view.  Constify.
3004         (recurse_read_control_structure, read_command_lines)
3005         (read_command_lines_1): Change argument types to function_view.
3006         (do_define_command, document_command): Update.
3007         * breakpoint.h (check_tracepoint_command): Don't declare.
3008         * breakpoint.c (check_tracepoint_command): Remove.
3009         (commands_command_1, create_tracepoint_from_upload): Update.
3010
3011 2018-05-04  Tom Tromey  <tom@tromey.com>
3012
3013         PR gdb/11750:
3014         * cli/cli-script.h (enum command_control_type) <define_control>:
3015         New constant.
3016         * cli/cli-script.c (multi_line_command_p): Handle define_control.
3017         (build_command_line, execute_control_command_1)
3018         (process_next_line): Likewise.
3019         (do_define_command): New function, extracted from define_command.
3020         (define_command): Use it.
3021
3022 2018-05-04  Tom Tromey  <tom@tromey.com>
3023
3024         * tracepoint.c (actions_command): Update.
3025         * cli/cli-script.h (read_command_lines): Update.
3026         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3027         (MAX_TMPBUF): Remove define.
3028         (define_command): Use string_printf.
3029         (document_command): Likewise.
3030         * breakpoint.c (commands_command_1): Update.
3031
3032 2018-05-04  Tom Tromey  <tom@tromey.com>
3033
3034         * top.c (execute_command): Update.
3035         * cli/cli-script.h (print_command_lines): Now varargs.
3036         * cli/cli-script.c (print_command_lines): Now varargs.
3037         (execute_control_command_1) <case while_control, case if_control>:
3038         Update.
3039
3040 2018-05-04  Tom Tromey  <tom@tromey.com>
3041
3042         * tracepoint.c (all_tracepoint_actions): Rename from
3043         all_tracepoint_actions_and_cleanup.  Change return type.
3044         (actions_command, encode_actions_1, encode_actions)
3045         (trace_dump_actions, tdump_command): Update.
3046         * remote.c (remote_download_command_source): Update.
3047         * python/python.c (gdbpy_eval_from_control_command)
3048         (python_command, python_interactive_command): Update.
3049         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3050         * guile/guile.c (guile_command)
3051         (gdbscm_eval_from_control_command, guile_command): Update.
3052         * compile/compile.c (compile_code_command)
3053         (compile_print_command, compile_to_object): Update.
3054         * cli/cli-script.h (struct command_lines_deleter): New.
3055         (counted_command_line): New typedef.
3056         (struct command_line): Add constructor, destructor.
3057         <body_list>: Remove.
3058         <body_list_0, body_list_1>: New members.
3059         (command_line_up): Remove typedef.
3060         (read_command_lines, read_command_lines_1, get_command_line):
3061         Update.
3062         (copy_command_lines): Don't declare.
3063         * cli/cli-script.c (build_command_line): Use "new".
3064         (get_command_line): Return counted_command_line.
3065         (print_command_lines, execute_user_command)
3066         (execute_control_command_1, while_command, if_command): Update.
3067         (realloc_body_list): Remove.
3068         (process_next_line, recurse_read_control_structure): Update.
3069         (read_command_lines, read_command_lines_1): Return counted_command_line.
3070         (free_command_lines): Use "delete".
3071         (copy_command_lines): Remove.
3072         (define_command, document_command, show_user_1): Update.
3073         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3074         a counted_command_line.
3075         * breakpoint.h (counted_command_line): Remove typedef.
3076         (breakpoint_set_commands): Update.
3077         * breakpoint.c (check_no_tracepoint_commands)
3078         (validate_commands_for_breakpoint): Update.
3079         (breakpoint_set_commands): Change commands to be a
3080         counted_command_line.
3081         (commands_command_1, update_dprintf_command_list)
3082         (create_tracepoint_from_upload): Update.
3083
3084 2018-05-04  Tom Tromey  <tom@tromey.com>
3085
3086         * cli/cli-decode.h (cmd_list_element): New constructor.
3087         (~cmd_list_element): New destructor.
3088         (struct cmd_list_element): Add initializers.
3089         * cli/cli-decode.c (do_add_cmd): Use "new".
3090         (delete_cmd): Use "delete".
3091
3092 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
3093             Pedro Alves <palves@redhat.com>
3094
3095         PR breakpoints/19806 and support for PR external/20207.
3096         * NEWS: Mention Aarch64 watchpoint improvements.
3097         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3098         watchpoints and PR external/20207 watchpoints.
3099         * nat/aarch64-linux-hw-point.c
3100         (kernel_supports_any_contiguous_range): New.
3101         (aarch64_watchpoint_offset): New.
3102         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3103         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3104         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3105         (aarch64_align_watchpoint): New parameters aligned_offset_p and
3106         next_addr_orig_p.  Support PR external/20207 watchpoints.
3107         (aarch64_downgrade_regs): New.
3108         (aarch64_dr_state_insert_one_point): New parameters offset and
3109         addr_orig.
3110         (aarch64_dr_state_remove_one_point): Likewise.
3111         (aarch64_handle_breakpoint): Update caller.
3112         (aarch64_handle_aligned_watchpoint): Likewise.
3113         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3114         aligned_offset.
3115         (aarch64_linux_set_debug_regs): Remove const from state.  Call
3116         aarch64_downgrade_regs.
3117         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3118         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3119         (DR_CONTROL_MASK): ... this.
3120         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3121         (unsigned int aarch64_watchpoint_offset): New prototype.
3122         (aarch64_linux_set_debug_regs): Remove const from state.
3123         * utils.c (align_up, align_down): Move to ...
3124         * common/common-utils.c (align_up, align_down): ... here.
3125         * utils.h (align_up, align_down): Move to ...
3126         * common/common-utils.h (align_up, align_down): ... here.
3127
3128 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
3129
3130         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3131         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3132         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3133         Re-implement to match the ABI as summarized in GCC's
3134         gcc/config/sparc/sparc.c.  All callers updated.
3135         (sparc32_store_arguments): Remove assertion.
3136
3137 2018-05-04  Tom Tromey  <tom@tromey.com>
3138
3139         * printcmd.c: Don't include tui.h.
3140         (decode_format): Use skip_spaces.
3141
3142 2018-05-04  Tom Tromey  <tom@tromey.com>
3143
3144         PR gdb/22619:
3145         * printcmd.c (last_count): New global.
3146         (x_command): Use saved count when repeating.
3147
3148 2018-05-04  Tom Tromey  <tom@tromey.com>
3149
3150         * nto-procfs.c (do_closedir_cleanup): Remove.
3151         (procfs_pidlist): Use gdb_dir_up.
3152         * procfs.c (do_closedir_cleanup): Remove.
3153         (proc_update_threads): Use gdb_dir_up.
3154         * common/filestuff.h (struct gdb_dir_deleter): New.
3155         (gdb_dir_up): New typedef.
3156
3157 2018-05-04  Tom Tromey  <tom@tromey.com>
3158
3159         * ada-lang.c (print_mention_exception): Use std::string.
3160
3161 2018-05-04  Tom Tromey  <tom@tromey.com>
3162
3163         * ada-lang.c (create_excep_cond_exprs): Update.
3164         (ada_exception_catchpoint_cond_string): Use std::string.
3165
3166 2018-05-04  Tom Tromey  <tom@tromey.com>
3167
3168         * ada-lang.c (xget_renaming_scope): Return std::string.
3169         (old_renaming_is_invisible): Update.
3170
3171 2018-05-04  Tom Tromey  <tom@tromey.com>
3172
3173         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3174         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3175
3176 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
3177
3178         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3179
3180 2018-05-04  Tom Tromey  <tom@tromey.com>
3181
3182         * remote.c (remote_query_supported_append): Change type.
3183         (remote_check_symbols): Update.
3184
3185 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
3186
3187         PR gdb/11420
3188         * configure.ac: Prepend libpython.
3189         * python/python-config.py: Likewise.
3190         * configure: Regenerate.
3191
3192 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
3193
3194         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3195
3196 2018-05-03  Pedro Alves  <palves@redhat.com>
3197
3198         * s390-linux-nat.c
3199         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3200         override.  Write 'true' instead of '1'.
3201         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3202         declaration.
3203
3204 2018-05-02  Pedro Alves  <palves@redhat.com>
3205
3206         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3207         add_inf_child_target.
3208         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3209         add_inf_child_target.
3210         * aix-thread.c (aix_thread_target_info): New.
3211         (aix_thread_target) <shortname, longname, doc>: Delete.
3212         <info>: New.
3213         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3214         add_inf_child_target.
3215         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3216         add_inf_child_target.
3217         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3218         add_inf_child_target.
3219         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3220         add_inf_child_target.
3221         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3222         add_inf_child_target.
3223         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3224         add_inf_child_target.
3225         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3226         add_inf_child_target.
3227         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3228         add_inf_child_target.
3229         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3230         add_inf_child_target.
3231         * bfd-target.c (target_bfd_target_info): New.
3232         (target_bfd) <shortname, longname, doc>: Delete.
3233         <info>: New.
3234         * bsd-kvm.c (bsd_kvm_target_info): New.
3235         (bsd_kvm_target) <shortname, longname, doc>: Delete.
3236         <info>: New.
3237         (bsd_kvm_target::open): Rename to ...
3238         (bsd_kvm_target_open): ... this.  Adjust.
3239         * bsd-uthread.c (bsd_uthread_target_info): New.
3240         (bsd_uthread_target) <shortname, longname, doc>: Delete.
3241         <info>: New.
3242         * corefile.c (core_file_command): Adjust.
3243         * corelow.c (core_target_info): New.
3244         (core_target) <shortname, longname, doc>: Delete.
3245         <info>: New.
3246         (core_target::open): Rename to ...
3247         (core_target_open): ... this.  Adjust.
3248         * ctf.c (ctf_target_info): New.
3249         (ctf_target) <shortname, longname, doc>: Delete.
3250         <info>: New.
3251         (ctf_target::open): Rename to ...
3252         (ctf_target_open): ... this.
3253         (_initialize_ctf): Adjust.
3254         * exec.c (exec_target_info): New.
3255         (exec_target) <shortname, longname, doc>: Delete.
3256         <info>: New.
3257         (exec_target::open): Rename to ...
3258         (exec_target_open): ... this.
3259         * gdbcore.h (core_target_open): Declare.
3260         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3261         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3262         add_inf_child_target.
3263         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3264         add_inf_child_target.
3265         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3266         add_inf_child_target.
3267         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3268         add_inf_child_target.
3269         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3270         add_inf_child_target.
3271         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3272         add_inf_child_target.
3273         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3274         add_inf_child_target.
3275         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3276         add_inf_child_target.
3277         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3278         add_inf_child_target.
3279         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3280         add_inf_child_target.
3281         * inf-child.c (inf_child_target_info): New.
3282         (inf_child_target::info): New.
3283         (inf_child_open_target): Remove 'target' parameter.  Use
3284         get_native_target instead.
3285         (inf_child_target::open): Delete.
3286         (add_inf_child_target): New.
3287         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3288         Delete.
3289         <info>: New.
3290         (add_inf_child_target): Declare.
3291         (inf_child_open_target): Declare.
3292         * linux-thread-db.c (thread_db_target_info): New.
3293         (thread_db_target) <shortname, longname, doc>: Delete.
3294         <info>: New.
3295         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3296         add_inf_child_target.
3297         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3298         add_inf_child_target.
3299         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3300         add_inf_child_target.
3301         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3302         add_inf_child_target.
3303         * make-target-delegates (print_class): Adjust.
3304         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3305         add_inf_child_target.
3306         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3307         add_inf_child_target.
3308         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3309         add_inf_child_target.
3310         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3311         add_inf_child_target.
3312         * nto-procfs.c (nto_native_target_info): New.
3313         (nto_procfs_target_native) <shortname, longname, doc>:
3314         Delete.
3315         <info>: New.
3316         (nto_procfs_target_info): New.
3317         (nto_procfs_target_procfs) <shortname, longname, doc>:
3318         Delete.
3319         <info>: New.
3320         (init_procfs_targets): Adjust.
3321         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3322         add_inf_child_target.
3323         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3324         add_inf_child_target.
3325         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3326         add_inf_child_target.
3327         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3328         add_inf_child_target.
3329         * ravenscar-thread.c (ravenscar_target_info): New.
3330         (ravenscar_thread_target) <shortname, longname, doc>:
3331         Delete.
3332         <info>: New.
3333         * record-btrace.c (record_btrace_target_info):
3334         (record_btrace_target) <shortname, longname, doc>: Delete.
3335         <info>: New.
3336         (record_btrace_target::open): Rename to ...
3337         (record_btrace_target_open): ... this.  Adjust.
3338         * record-full.c (record_longname, record_doc): New.
3339         (record_full_base_target) <shortname, longname, doc>: Delete.
3340         <info>: New.
3341         (record_full_target_info): New.
3342         (record_full_target): <shortname>: Delete.
3343         <info>: New.
3344         (record_full_core_open_1, record_full_open_1): Update comments.
3345         (record_full_base_target::open): Rename to ...
3346         (record_full_open): ... this.
3347         (cmd_record_full_restore): Update.
3348         (_initialize_record_full): Update.
3349         * remote-sim.c (remote_sim_target_info): New.
3350         (gdbsim_target) <shortname, longname, doc>: Delete.
3351         <info>: New.
3352         (gdbsim_target::open): Rename to ...
3353         (gdbsim_target_open): ... this.
3354         (_initialize_remote_sim): Adjust.
3355         * remote.c (remote_doc): New.
3356         (remote_target_info): New.
3357         (remote_target) <shortname, longname, doc>: Delete.
3358         <info>: New.
3359         (extended_remote_target_info): New.
3360         (extended_remote_target) <shortname, longname, doc>: Delete.
3361         <info>: New.
3362         (remote_target::open_1): Make static.  Adjust.
3363         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3364         * s390-linux-nat.c (_initialize_s390_nat): Use
3365         add_inf_child_target.
3366         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3367         add_inf_child_target.
3368         * sol-thread.c (thread_db_target_info): New.
3369         (sol_thread_target) <shortname, longname, doc>: Delete.
3370         <info>: New.
3371         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3372         add_inf_child_target.
3373         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3374         add_inf_child_target.
3375         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3376         add_inf_child_target.
3377         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3378         add_inf_child_target.
3379         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3380         add_inf_child_target.
3381         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3382         add_inf_child_target.
3383         * spu-linux-nat.c (_initialize_spu_nat): Use
3384         add_inf_child_target.
3385         * spu-multiarch.c (spu_multiarch_target_info): New.
3386         (spu_multiarch_target) <shortname, longname, doc>: Delete.
3387         <info>: New.
3388         * target-delegates.c: Regenerate.
3389         * target.c: Include <unordered_map>.
3390         (target_ops_p): Delete.
3391         (DEF_VEC_P(target_ops_p)): Delete.
3392         (target_factories): New.
3393         (test_target_info): New.
3394         (test_target_ops::info): New.
3395         (open_target): Adjust to use target_factories.
3396         (add_target_with_completer): Rename to ...
3397         (add_target): ... this.  Change prototype.  Register target_info
3398         and open callback in target_factories.  Register target_info in
3399         command context instead of target_ops.
3400         (add_target): Delete old implementation.
3401         (add_deprecated_target_alias): Change prototype.  Adjust.
3402         (the_native_target): New.
3403         (set_native_target, get_native_target): New.
3404         (find_default_run_target): Use the_native_target.
3405         (find_attach_target, find_run_target): Simplify.
3406         (target_ops::open): Delete.
3407         (dummy_target_info): New.
3408         (dummy_target::shortname, dummy_target::longname)
3409         (dummy_target::doc): Delete.
3410         (dummy_target::info): New.
3411         (debug_target::shortname, debug_target::longname)
3412         (debug_target::doc): Delete.
3413         (debug_target::info): New.
3414         * target.h (struct target_info): New.
3415         (target_ops::~target_ops): Add comment.
3416         (target_ops::info): New.
3417         (target_ops::shortname, target_ops::longname, target_ops::doc): No
3418         longer virtual.  Implement in terms of target_info.
3419         (set_native_target, get_native_target): Declare.
3420         (target_open_ftype): New.
3421         (add_target, add_target_with_completer)
3422         (add_deprecated_target_alias): Change prototype.
3423         (test_target) <shortname, longname, doc>: Delete.
3424         <info>: New.
3425         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3426         add_inf_child_target.
3427         * tracefile-tfile.c (tfile_target_info): New.
3428         (tfile_target) <shortname, longname, doc>: Delete.
3429         <info>: New.
3430         (tfile_target::open): Rename to ...
3431         (tfile_target_open): ... this.
3432         (_initialize_tracefile_tfile): Adjust.
3433         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3434         add_inf_child_target.
3435         * windows-nat.c (_initialize_windows_nat): Use
3436         add_inf_child_target.
3437         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3438         add_inf_child_target.
3439
3440 2018-05-02  Pedro Alves  <palves@redhat.com>
3441
3442         * linux-nat.h (linux_nat_target) <low_new_thread,
3443         low_delete_thread, low_new_fork, low_forget_process,
3444         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3445         New virtual methods.
3446         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3447         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3448         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3449         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3450         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3451         Delete.
3452         * linux-fork.c (delete_fork): Adjust to call low method.
3453         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3454         (linux_nat_new_fork, linux_nat_forget_process_hook)
3455         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3456         (linux_nat_status_is_event):
3457         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3458         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
3459         to call low method.
3460         (sigtrap_is_event): Rename to ...
3461         (linux_nat_target::low_status_is_event): ... this.
3462         (linux_nat_set_status_is_event): Delete.
3463         (save_stop_reason, linux_nat_wait_1)
3464         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
3465         low methods.
3466         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3467         (linux_nat_set_new_fork, linux_nat_set_forget_process)
3468         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3469         (linux_nat_set_prepare_to_resume): Delete.
3470         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
3471         low virtual methods.
3472         * amd64-linux-nat.c: Likewise.
3473         * arm-linux-nat.c: Likewise.
3474         * i386-linux-nat.c: Likewise.
3475         * ia64-linux-nat.c: Likewise.
3476         * mips-linux-nat.c: Likewise.
3477         * ppc-linux-nat.c: Likewise.
3478         * s390-linux-nat.c: Likewise.
3479         * sparc64-linux-nat.c: Likewise.
3480         * x86-linux-nat.c: Likewise.
3481         * x86-linux-nat.h: Include "nat/x86-linux.h".
3482         (x86_linux_nat_target) <low_new_fork, low_forget_process,
3483         low_prepare_to_resume, low_new_thread, low_delete_thread>:
3484         Override methods.
3485
3486 2018-05-02  Pedro Alves  <palves@redhat.com>
3487
3488         * target.h (target_ops)
3489         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3490         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
3491         stopped_by_watchpoint, have_continuable_watchpoint,
3492         stopped_data_address, watchpoint_addr_within_range,
3493         can_accel_watchpoint_condition, can_run, thread_alive,
3494         has_all_memory, has_memory, has_stack, has_registers,
3495         has_execution, can_async_p, is_async_p, supports_non_stop,
3496         always_non_stop_p, can_execute_reverse, supports_multi_process,
3497         supports_enable_disable_tracepoint,
3498         supports_disable_randomization, supports_string_tracing,
3499         supports_evaluation_of_breakpoint_conditions,
3500         can_run_breakpoint_commands, filesystem_is_local,
3501         can_download_tracepoint, get_trace_state_variable_value,
3502         set_trace_notes, get_tib_address, use_agent, can_use_agent,
3503         record_is_replaying, record_will_replay,
3504         augmented_libraries_svr4_read>: Adjust to return bool.
3505         * aarch64-linux-nat.c: All implementations adjusted.
3506         * aix-thread.c: All implementations adjusted.
3507         * arm-linux-nat.c: All implementations adjusted.
3508         * breakpoint.c: All implementations adjusted.
3509         * bsd-kvm.c: All implementations adjusted.
3510         * bsd-uthread.c: All implementations adjusted.
3511         * corelow.c: All implementations adjusted.
3512         * ctf.c: All implementations adjusted.
3513         * darwin-nat.c: All implementations adjusted.
3514         * darwin-nat.h: All implementations adjusted.
3515         * exec.c: All implementations adjusted.
3516         * fbsd-nat.c: All implementations adjusted.
3517         * fbsd-nat.h: All implementations adjusted.
3518         * gnu-nat.c: All implementations adjusted.
3519         * gnu-nat.h: All implementations adjusted.
3520         * go32-nat.c: All implementations adjusted.
3521         * ia64-linux-nat.c: All implementations adjusted.
3522         * inf-child.c: All implementations adjusted.
3523         * inf-child.h: All implementations adjusted.
3524         * inf-ptrace.c: All implementations adjusted.
3525         * inf-ptrace.h: All implementations adjusted.
3526         * linux-nat.c: All implementations adjusted.
3527         * linux-nat.h: All implementations adjusted.
3528         * mips-linux-nat.c: All implementations adjusted.
3529         * nto-procfs.c: All implementations adjusted.
3530         * ppc-linux-nat.c: All implementations adjusted.
3531         * procfs.c: All implementations adjusted.
3532         * ravenscar-thread.c: All implementations adjusted.
3533         * record-btrace.c: All implementations adjusted.
3534         * record-full.c: All implementations adjusted.
3535         * remote-sim.c: All implementations adjusted.
3536         * remote.c: All implementations adjusted.
3537         * s390-linux-nat.c: All implementations adjusted.
3538         * sol-thread.c: All implementations adjusted.
3539         * spu-multiarch.c: All implementations adjusted.
3540         * target-delegates.c: All implementations adjusted.
3541         * target.c: All implementations adjusted.
3542         * target.h: All implementations adjusted.
3543         * tracefile-tfile.c: All implementations adjusted.
3544         * tracefile.c: All implementations adjusted.
3545         * tracefile.h: All implementations adjusted.
3546         * windows-nat.c: All implementations adjusted.
3547         * x86-linux-nat.h: All implementations adjusted.
3548         * x86-nat.h: All implementations adjusted.
3549
3550 2018-05-02  Pedro Alves  <palves@redhat.com>
3551
3552         * make-target-delegates (scan_target_h): Don't trim lines here.
3553         Replace sequences of tabs and/or whitespace with a single
3554         whitespace.
3555         (top level, parsing methods): Trim each line before processing it
3556         here.
3557
3558 2018-05-02  Pedro Alves  <palves@redhat.com>
3559             John Baldwin  <jhb@freebsd.org>
3560
3561         * target.h (enum strata) <debug_stratum>: New.
3562         (struct target_ops) <all delegation methods>: Replace by C++
3563         virtual methods, and drop "to_" prefix.  All references updated
3564         throughout.
3565         <to_shortname, to_longname, to_doc, to_data,
3566         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
3567         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
3568         virtual methods.  All references updated throughout.
3569         <can_attach, supports_terminal_ours, can_create_inferior,
3570         get_thread_control_capabilities, attach_no_wait>: New
3571         virtual methods.
3572         <insert_breakpoint, remove_breakpoint>: Now
3573         TARGET_DEFAULT_NORETURN methods.
3574         <info_proc>: Now returns bool.
3575         <to_magic>: Delete.
3576         (OPS_MAGIC): Delete.
3577         (current_target): Delete.  All references replaced by references
3578         to ...
3579         (target_stack): ... this.  New.
3580         (target_shortname, target_longname): Adjust.
3581         (target_can_run): Now a function declaration.
3582         (default_child_has_all_memory, default_child_has_memory)
3583         (default_child_has_stack, default_child_has_registers)
3584         (default_child_has_execution): Remove target_ops parameter.
3585         (complete_target_initialization): Delete.
3586         (memory_breakpoint_target): New template class.
3587         (test_target_ops): Refactor as a C++ class with virtual methods.
3588         * make-target-delegates (NAME_PART): Tighten.
3589         (POINTER_PART, CP_SYMBOL): New.
3590         (SIMPLE_RETURN_PART): Reimplement.
3591         (VEC_RETURN_PART): Expect less.
3592         (RETURN_PART, VIRTUAL_PART): New.
3593         (METHOD): Adjust to C++ virtual methods.
3594         (scan_target_h): Remove reference to C99.
3595         (dname): Output "target_ops::" prefix.
3596         (write_function_header): Adjust to output a C++ class method.
3597         (write_declaration): New.
3598         (write_delegator): Adjust to output a C++ class method.
3599         (tdname): Output "dummy_target::" prefix.
3600         (write_tdefault, write_debugmethod): Adjust to output a C++ class
3601         method.
3602         (tdefault_names, debug_names): Delete.
3603         (return_types, tdefaults, styles, argtypes_array): New.
3604         (top level): All methods are delegators.
3605         (print_class): New.
3606         (top level): Print dummy_target and debug_target classes.
3607         * target-delegates.c: Regenerate.
3608         * target-debug.h (target_debug_print_enum_info_proc_what)
3609         (target_debug_print_thread_control_capabilities)
3610         (target_debug_print_thread_info_p): New.
3611         * target.c (dummy_target): Delete.
3612         (the_dummy_target, the_debug_target): New.
3613         (target_stack): Now extern.
3614         (set_targetdebug): Push/unpush debug target.
3615         (default_child_has_all_memory, default_child_has_memory)
3616         (default_child_has_stack, default_child_has_registers)
3617         (default_child_has_execution): Remove target_ops parameter.
3618         (complete_target_initialization): Delete.
3619         (add_target_with_completer): No longer call
3620         complete_target_initialization.
3621         (target_supports_terminal_ours): Use regular delegation.
3622         (update_current_target): Delete.
3623         (push_target): No longer check magic number.  Don't call
3624         update_current_target.
3625         (unpush_target): Don't call update_current_target.
3626         (target_is_pushed): No longer check magic number.
3627         (target_require_runnable): Skip for all stratums over
3628         process_stratum.
3629         (target_ops::info_proc): New.
3630         (target_info_proc): Use find_target_at and
3631         find_default_run_target.
3632         (target_supports_disable_randomization): Use regular delegation.
3633         (target_get_osdata): Use find_target_at.
3634         (target_ops::open, target_ops::close, target_ops::can_attach)
3635         (target_ops::attach, target_ops::can_create_inferior)
3636         (target_ops::create_inferior, target_ops::can_run)
3637         (target_can_run): New.
3638         (default_fileio_target): Use regular delegation.
3639         (target_ops::fileio_open, target_ops::fileio_pwrite)
3640         (target_ops::fileio_pread, target_ops::fileio_fstat)
3641         (target_ops::fileio_close, target_ops::fileio_unlink)
3642         (target_ops::fileio_readlink): New.
3643         (target_fileio_open_1, target_fileio_unlink)
3644         (target_fileio_readlink): Always call the target method.  Handle
3645         FILEIO_ENOSYS.
3646         (return_zero, return_zero_has_execution): Delete.
3647         (init_dummy_target): Delete.
3648         (dummy_target::dummy_target, dummy_target::shortname)
3649         (dummy_target::longname, dummy_target::doc)
3650         (debug_target::debug_target, debug_target::shortname)
3651         (debug_target::longname, debug_target::doc): New.
3652         (target_supports_delete_record): Use regular delegation.
3653         (setup_target_debug): Delete.
3654         (maintenance_print_target_stack): Skip debug_stratum.
3655         (initialize_targets): Instantiate the_dummy_target and
3656         the_debug_target.
3657         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
3658         use target_stack.
3659         (target_auxv_search, fprint_target_auxv): Adjust.
3660         (info_auxv_command): Adjust to use target_stack.
3661         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
3662         * exceptions.c (print_flush): Handle a NULL target_stack.
3663         * regcache.c (target_ops_no_register): Refactor as class with
3664         virtual methods.
3665
3666         * exec.c (exec_target): New class.
3667         (exec_ops): Now an exec_target.
3668         (exec_open, exec_close_1, exec_get_section_table)
3669         (exec_xfer_partial, exec_files_info, exec_has_memory)
3670         (exec_make_note_section): Refactor as exec_target methods.
3671         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
3672         Delete.
3673         (exec_target::find_memory_regions): New.
3674         (_initialize_exec): Don't call init_exec_ops.
3675         * gdbcore.h (exec_file_clear): Delete.
3676
3677         * corefile.c (core_target): Delete.
3678         (core_file_command): Adjust.
3679         * corelow.c (core_target): New class.
3680         (the_core_target): New.
3681         (core_close): Remove target_ops parameter.
3682         (core_close_cleanup): Adjust.
3683         (core_target::close): New.
3684         (core_open, core_detach, get_core_registers, core_files_info)
3685         (core_xfer_partial, core_thread_alive, core_read_description)
3686         (core_pid_to_str, core_thread_name, core_has_memory)
3687         (core_has_stack, core_has_registers, core_info_proc): Rework as
3688         core_target methods.
3689         (ignore, core_remove_breakpoint, init_core_ops): Delete.
3690         (_initialize_corelow): Initialize the_core_target.
3691         * gdbcore.h (core_target): Delete.
3692         (the_core_target): New.
3693
3694         * ctf.c: (ctf_target): New class.
3695         (ctf_ops): Now a ctf_target.
3696         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
3697         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
3698         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
3699         methods.
3700         (init_ctf_ops): Delete.
3701         (_initialize_ctf): Don't call it.
3702         * tracefile-tfile.c (tfile_target): New class.
3703         (tfile_ops): Now a tfile_target.
3704         (tfile_open, tfile_close, tfile_files_info)
3705         (tfile_get_tracepoint_status, tfile_trace_find)
3706         (tfile_fetch_registers, tfile_xfer_partial)
3707         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
3708         Refactor as tfile_target methods.
3709         (tfile_xfer_partial_features): Remove target_ops parameter.
3710         (init_tfile_ops): Delete.
3711         (_initialize_tracefile_tfile): Don't call it.
3712         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
3713         (tracefile_has_stack, tracefile_has_registers)
3714         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
3715         tracefile_target methods.
3716         (init_tracefile_ops): Delete.
3717         (tracefile_target::tracefile_target): New.
3718         * tracefile.h: Include "target.h".
3719         (tracefile_target): New class.
3720         (init_tracefile_ops): Delete.
3721
3722         * spu-multiarch.c (spu_multiarch_target): New class.
3723         (spu_ops): Now a spu_multiarch_target.
3724         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
3725         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
3726         (spu_search_memory, spu_mourn_inferior): Refactor as
3727         spu_multiarch_target methods.
3728         (init_spu_ops): Delete.
3729         (_initialize_spu_multiarch): Remove references to init_spu_ops,
3730         complete_target_initialization.
3731
3732         * ravenscar-thread.c (ravenscar_thread_target): New class.
3733         (ravenscar_ops): Now a ravenscar_thread_target.
3734         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
3735         (ravenscar_thread_alive, ravenscar_pid_to_str)
3736         (ravenscar_fetch_registers, ravenscar_store_registers)
3737         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
3738         (ravenscar_stopped_by_hw_breakpoint)
3739         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
3740         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
3741         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
3742         methods.
3743         (init_ravenscar_thread_ops): Delete.
3744         (_initialize_ravenscar): Remove references to
3745         init_ravenscar_thread_ops and complete_target_initialization.
3746
3747         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
3748         (bsd_uthread_target): New class.
3749         (bsd_uthread_ops): Now a bsd_uthread_target.
3750         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
3751         (bsd_uthread_close, bsd_uthread_mourn_inferior)
3752         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
3753         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
3754         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
3755         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
3756         (bsd_uthread_target): Delete function.
3757         (_initialize_bsd_uthread): Remove reference to
3758         complete_target_initialization.
3759
3760         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
3761         (target_bfd): ... this new class.
3762         (target_bfd_xfer_partial, target_bfd_get_section_table)
3763         (target_bfd_close): Refactor as target_bfd methods.
3764         (target_bfd::~target_bfd): New.
3765         (target_bfd_reopen): Adjust.
3766         (target_bfd::close): New.
3767
3768         * record-btrace.c (record_btrace_target): New class.
3769         (record_btrace_ops): Now a record_btrace_target.
3770         (record_btrace_open, record_btrace_stop_recording)
3771         (record_btrace_disconnect, record_btrace_close)
3772         (record_btrace_async, record_btrace_info)
3773         (record_btrace_insn_history, record_btrace_insn_history_range)
3774         (record_btrace_insn_history_from, record_btrace_call_history)
3775         (record_btrace_call_history_range)
3776         (record_btrace_call_history_from, record_btrace_record_method)
3777         (record_btrace_is_replaying, record_btrace_will_replay)
3778         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
3779         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
3780         (record_btrace_store_registers, record_btrace_prepare_to_store)
3781         (record_btrace_to_get_unwinder)
3782         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
3783         (record_btrace_commit_resume, record_btrace_wait)
3784         (record_btrace_stop, record_btrace_can_execute_reverse)
3785         (record_btrace_stopped_by_sw_breakpoint)
3786         (record_btrace_supports_stopped_by_sw_breakpoint)
3787         (record_btrace_stopped_by_hw_breakpoint)
3788         (record_btrace_supports_stopped_by_hw_breakpoint)
3789         (record_btrace_update_thread_list, record_btrace_thread_alive)
3790         (record_btrace_goto_begin, record_btrace_goto_end)
3791         (record_btrace_goto, record_btrace_stop_replaying_all)
3792         (record_btrace_execution_direction)
3793         (record_btrace_prepare_to_generate_core)
3794         (record_btrace_done_generating_core): Refactor as
3795         record_btrace_target methods.
3796         (init_record_btrace_ops): Delete.
3797         (_initialize_record_btrace): Remove reference to
3798         init_record_btrace_ops.
3799         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
3800         the execution_direction global.
3801         (record_full_base_target, record_full_target)
3802         (record_full_core_target): New classes.
3803         (record_full_ops): Now a record_full_target.
3804         (record_full_core_ops): Now a record_full_core_target.
3805         (record_full_target::detach, record_full_target::disconnect)
3806         (record_full_core_target::disconnect)
3807         (record_full_target::mourn_inferior, record_full_target::kill):
3808         New.
3809         (record_full_open, record_full_close, record_full_async): Refactor
3810         as methods of the record_full_base_target class.
3811         (record_full_resume, record_full_commit_resume): Refactor
3812         as methods of the record_full_target class.
3813         (record_full_wait, record_full_stopped_by_watchpoint)
3814         (record_full_stopped_data_address)
3815         (record_full_stopped_by_sw_breakpoint)
3816         (record_full_supports_stopped_by_sw_breakpoint)
3817         (record_full_stopped_by_hw_breakpoint)
3818         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
3819         methods of the record_full_base_target class.
3820         (record_full_store_registers, record_full_xfer_partial)
3821         (record_full_insert_breakpoint, record_full_remove_breakpoint):
3822         Refactor as methods of the record_full_target class.
3823         (record_full_can_execute_reverse, record_full_get_bookmark)
3824         (record_full_goto_bookmark, record_full_execution_direction)
3825         (record_full_record_method, record_full_info, record_full_delete)
3826         (record_full_is_replaying, record_full_will_replay)
3827         (record_full_goto_begin, record_full_goto_end, record_full_goto)
3828         (record_full_stop_replaying): Refactor as methods of the
3829         record_full_base_target class.
3830         (record_full_core_resume, record_full_core_kill)
3831         (record_full_core_fetch_registers)
3832         (record_full_core_prepare_to_store)
3833         (record_full_core_store_registers, record_full_core_xfer_partial)
3834         (record_full_core_insert_breakpoint)
3835         (record_full_core_remove_breakpoint)
3836         (record_full_core_has_execution): Refactor
3837         as methods of the record_full_core_target class.
3838         (record_full_base_target::supports_delete_record): New.
3839         (init_record_full_ops): Delete.
3840         (init_record_full_core_ops): Delete.
3841         (record_full_save): Refactor as method of the
3842         record_full_base_target class.
3843         (_initialize_record_full): Remove references to
3844         init_record_full_ops and init_record_full_core_ops.
3845
3846         * remote.c (remote_target, extended_remote_target): New classes.
3847         (remote_ops): Now a remote_target.
3848         (extended_remote_ops): Now an extended_remote_target.
3849         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
3850         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
3851         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
3852         (remote_pass_signals, remote_set_syscall_catchpoint)
3853         (remote_program_signals, )
3854         (remote_thread_always_alive): Remove target_ops parameter.
3855         (remote_thread_alive, remote_thread_name)
3856         (remote_update_thread_list, remote_threads_extra_info)
3857         (remote_static_tracepoint_marker_at)
3858         (remote_static_tracepoint_markers_by_strid)
3859         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
3860         (remote_open): Refactor as methods of remote_target.
3861         (extended_remote_open, extended_remote_detach)
3862         (extended_remote_attach, extended_remote_post_attach):
3863         (extended_remote_supports_disable_randomization)
3864         (extended_remote_create_inferior): : Refactor as method of
3865         extended_remote_target.
3866         (remote_set_permissions, remote_open_1, remote_detach)
3867         (remote_follow_fork, remote_follow_exec, remote_disconnect)
3868         (remote_resume, remote_commit_resume, remote_stop)
3869         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
3870         (remote_terminal_ours, remote_wait, remote_fetch_registers)
3871         (remote_prepare_to_store, remote_store_registers)
3872         (remote_flash_erase, remote_flash_done, remote_files_info)
3873         (remote_kill, remote_mourn, remote_insert_breakpoint)
3874         (remote_remove_breakpoint, remote_insert_watchpoint)
3875         (remote_watchpoint_addr_within_range)
3876         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
3877         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
3878         (remote_supports_stopped_by_sw_breakpoint)
3879         (remote_stopped_by_hw_breakpoint)
3880         (remote_supports_stopped_by_hw_breakpoint)
3881         (remote_stopped_by_watchpoint, remote_stopped_data_address)
3882         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
3883         (remote_verify_memory): Refactor as methods of remote_target.
3884         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
3885         parameter.
3886         (remote_xfer_partial, remote_get_memory_xfer_limit)
3887         (remote_search_memory, remote_rcmd, remote_memory_map)
3888         (remote_pid_to_str, remote_get_thread_local_address)
3889         (remote_get_tib_address, remote_read_description): Refactor as
3890         methods of remote_target.
3891         (remote_target::fileio_open, remote_target::fileio_pwrite)
3892         (remote_target::fileio_pread, remote_target::fileio_close): New.
3893         (remote_hostio_readlink, remote_hostio_fstat)
3894         (remote_filesystem_is_local, remote_can_execute_reverse)
3895         (remote_supports_non_stop, remote_supports_disable_randomization)
3896         (remote_supports_multi_process, remote_supports_cond_breakpoints)
3897         (remote_supports_enable_disable_tracepoint)
3898         (remote_supports_string_tracing)
3899         (remote_can_run_breakpoint_commands, remote_trace_init)
3900         (remote_download_tracepoint, remote_can_download_tracepoint)
3901         (remote_download_trace_state_variable, remote_enable_tracepoint)
3902         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
3903         (remote_trace_start, remote_get_trace_status)
3904         (remote_get_tracepoint_status, remote_trace_stop)
3905         (remote_trace_find, remote_get_trace_state_variable_value)
3906         (remote_save_trace_data, remote_get_raw_trace_data)
3907         (remote_set_disconnected_tracing, remote_core_of_thread)
3908         (remote_set_circular_trace_buffer, remote_traceframe_info)
3909         (remote_get_min_fast_tracepoint_insn_len)
3910         (remote_set_trace_buffer_size, remote_set_trace_notes)
3911         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
3912         (remote_disable_btrace, remote_teardown_btrace)
3913         (remote_read_btrace, remote_btrace_conf)
3914         (remote_augmented_libraries_svr4_read, remote_load)
3915         (remote_pid_to_exec_file, remote_can_do_single_step)
3916         (remote_execution_direction, remote_thread_handle_to_thread_info):
3917         Refactor as methods of remote_target.
3918         (init_remote_ops, init_extended_remote_ops): Delete.
3919         (remote_can_async_p, remote_is_async_p, remote_async)
3920         (remote_thread_events, remote_upload_tracepoints)
3921         (remote_upload_trace_state_variables): Refactor as methods of
3922         remote_target.
3923         (_initialize_remote): Remove references to init_remote_ops and
3924         init_extended_remote_ops.
3925
3926         * remote-sim.c (gdbsim_target): New class.
3927         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
3928         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
3929         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
3930         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
3931         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
3932         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
3933         Refactor as methods of gdbsim_target.
3934         (gdbsim_ops): Now a gdbsim_target.
3935         (init_gdbsim_ops): Delete.
3936         (gdbsim_cntrl_c): Adjust.
3937         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
3938
3939         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
3940         (the_amd64_linux_nat_target): New.
3941         (amd64_linux_fetch_inferior_registers)
3942         (amd64_linux_store_inferior_registers): Refactor as methods of
3943         amd64_linux_nat_target.
3944         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
3945         * i386-linux-nat.c: Don't include "linux-nat.h".
3946         (i386_linux_nat_target): New class.
3947         (the_i386_linux_nat_target): New.
3948         (i386_linux_fetch_inferior_registers)
3949         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
3950         as methods of i386_linux_nat_target.
3951         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
3952         * inf-child.c (inf_child_ops): Delete.
3953         (inf_child_fetch_inferior_registers)
3954         (inf_child_store_inferior_registers): Delete.
3955         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
3956         methods of inf_child_target.
3957         (inf_child_target::supports_terminal_ours)
3958         (inf_child_target::terminal_init)
3959         (inf_child_target::terminal_inferior)
3960         (inf_child_target::terminal_ours_for_output)
3961         (inf_child_target::terminal_ours, inf_child_target::interrupt)
3962         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
3963         New.
3964         (inf_child_open, inf_child_disconnect, inf_child_close)
3965         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
3966         (inf_child_post_startup_inferior, inf_child_can_run)
3967         (inf_child_pid_to_exec_file): Refactor as methods of
3968         inf_child_target.
3969         (inf_child_follow_fork): Delete.
3970         (inf_child_target::can_create_inferior)
3971         (inf_child_target::can_attach): New.
3972         (inf_child_target::has_all_memory, inf_child_target::has_memory)
3973         (inf_child_target::has_stack, inf_child_target::has_registers)
3974         (inf_child_target::has_execution): New.
3975         (inf_child_fileio_open, inf_child_fileio_pwrite)
3976         (inf_child_fileio_pread, inf_child_fileio_fstat)
3977         (inf_child_fileio_close, inf_child_fileio_unlink)
3978         (inf_child_fileio_readlink, inf_child_use_agent)
3979         (inf_child_can_use_agent): Refactor as methods of
3980         inf_child_target.
3981         (return_zero, inf_child_target): Delete.
3982         (inf_child_target::inf_child_target): New.
3983         * inf-child.h: Include "target.h".
3984         (inf_child_target): Delete function prototype.
3985         (inf_child_target): New class.
3986         (inf_child_open_target, inf_child_mourn_inferior)
3987         (inf_child_maybe_unpush_target): Delete.
3988         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
3989         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
3990         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
3991         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
3992         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
3993         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
3994         (inf_ptrace_wait, inf_ptrace_xfer_partial)
3995         (inf_ptrace_thread_alive, inf_ptrace_files_info)
3996         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
3997         methods of inf_ptrace_target.
3998         (inf_ptrace_target): Delete function.
3999         * inf-ptrace.h: Include "inf-child.h".
4000         (inf_ptrace_target): Delete function declaration.
4001         (inf_ptrace_target): New class.
4002         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4003         * linux-nat.c (linux_target): New.
4004         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4005         (linux_nat_target::~linux_nat_target): New.
4006         (linux_child_post_attach, linux_child_post_startup_inferior)
4007         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4008         (linux_child_remove_fork_catchpoint)
4009         (linux_child_insert_vfork_catchpoint)
4010         (linux_child_remove_vfork_catchpoint)
4011         (linux_child_insert_exec_catchpoint)
4012         (linux_child_remove_exec_catchpoint)
4013         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4014         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4015         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4016         (linux_nat_stopped_data_address)
4017         (linux_nat_stopped_by_sw_breakpoint)
4018         (linux_nat_supports_stopped_by_sw_breakpoint)
4019         (linux_nat_stopped_by_hw_breakpoint)
4020         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4021         (linux_nat_kill, linux_nat_mourn_inferior)
4022         (linux_nat_xfer_partial, linux_nat_thread_alive)
4023         (linux_nat_update_thread_list, linux_nat_pid_to_str)
4024         (linux_nat_thread_name, linux_child_pid_to_exec_file)
4025         (linux_child_static_tracepoint_markers_by_strid)
4026         (linux_nat_is_async_p, linux_nat_can_async_p)
4027         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4028         (linux_nat_supports_multi_process)
4029         (linux_nat_supports_disable_randomization, linux_nat_async)
4030         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4031         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4032         (linux_nat_fileio_open, linux_nat_fileio_readlink)
4033         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4034         methods of linux_nat_target.
4035         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4036         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4037         parameter.
4038         (check_stopped_by_watchpoint): Adjust.
4039         (linux_xfer_partial): Delete.
4040         (linux_target_install_ops, linux_target, linux_nat_add_target):
4041         Delete.
4042         (linux_nat_target::linux_nat_target): New.
4043         * linux-nat.h: Include "inf-ptrace.h".
4044         (linux_nat_target): New.
4045         (linux_target, linux_target_install_ops, linux_nat_add_target):
4046         Delete function declarations.
4047         (linux_target): Declare global.
4048         * linux-thread-db.c (thread_db_target): New.
4049         (thread_db_target::thread_db_target): New.
4050         (thread_db_ops): Delete.
4051         (the_thread_db_target): New.
4052         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4053         (thread_db_update_thread_list, thread_db_pid_to_str)
4054         (thread_db_extra_thread_info)
4055         (thread_db_thread_handle_to_thread_info)
4056         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4057         (thread_db_resume): Refactor as methods of thread_db_target.
4058         (init_thread_db_ops): Delete.
4059         (_initialize_thread_db): Remove reference to init_thread_db_ops.
4060         * x86-linux-nat.c: Don't include "linux-nat.h".
4061         (super_post_startup_inferior): Delete.
4062         (x86_linux_nat_target::~x86_linux_nat_target): New.
4063         (x86_linux_child_post_startup_inferior)
4064         (x86_linux_read_description, x86_linux_enable_btrace)
4065         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4066         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4067         methods of x86_linux_nat_target.
4068         (x86_linux_create_target): Delete.  Bits folded ...
4069         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
4070         pointer.
4071         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4072         (x86_linux_nat_target): New class.
4073         (x86_linux_create_target): Delete.
4074         (x86_linux_add_target): Now takes a linux_nat_target pointer.
4075         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4076         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4077         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4078         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4079         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4080         make extern.
4081         (x86_use_watchpoints): Delete.
4082         * x86-nat.h: Include "breakpoint.h" and "target.h".
4083         (x86_use_watchpoints): Delete.
4084         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4085         (x86_stopped_by_watchpoint, x86_stopped_data_address)
4086         (x86_insert_watchpoint, x86_remove_watchpoint)
4087         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4088         (x86_stopped_by_hw_breakpoint): New declarations.
4089         (x86_nat_target): New template class.
4090
4091         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4092         (the_ppc_linux_nat_target): New.
4093         (ppc_linux_fetch_inferior_registers)
4094         (ppc_linux_can_use_hw_breakpoint)
4095         (ppc_linux_region_ok_for_hw_watchpoint)
4096         (ppc_linux_ranged_break_num_registers)
4097         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4098         (ppc_linux_insert_mask_watchpoint)
4099         (ppc_linux_remove_mask_watchpoint)
4100         (ppc_linux_can_accel_watchpoint_condition)
4101         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4102         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4103         (ppc_linux_watchpoint_addr_within_range)
4104         (ppc_linux_masked_watch_num_registers)
4105         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4106         (ppc_linux_read_description): Refactor as methods of
4107         ppc_linux_nat_target.
4108         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
4109
4110         * procfs.c (procfs_xfer_partial): Delete forward declaration.
4111         (procfs_target): New class.
4112         (the_procfs_target): New.
4113         (procfs_target): Delete function.
4114         (procfs_auxv_parse, procfs_attach, procfs_detach)
4115         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4116         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4117         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4118         (procfs_create_inferior, procfs_update_thread_list)
4119         (procfs_thread_alive, procfs_pid_to_str)
4120         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4121         (procfs_stopped_data_address, procfs_insert_watchpoint)
4122         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4123         (proc_find_memory_regions, procfs_info_proc)
4124         (procfs_make_note_section): Refactor as methods of procfs_target.
4125         (_initialize_procfs): Adjust.
4126         * sol-thread.c (sol_thread_target): New class.
4127         (sol_thread_ops): Now a sol_thread_target.
4128         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4129         (sol_thread_fetch_registers, sol_thread_store_registers)
4130         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4131         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4132         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4133         (init_sol_thread_ops): Delete.
4134         (_initialize_sol_thread): Adjust.  Remove references to
4135         init_sol_thread_ops and complete_target_initialization.
4136
4137         * windows-nat.c (windows_nat_target): New class.
4138         (windows_fetch_inferior_registers)
4139         (windows_store_inferior_registers, windows_resume, windows_wait)
4140         (windows_attach, windows_detach, windows_pid_to_exec_file)
4141         (windows_files_info, windows_create_inferior)
4142         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4143         (windows_close, windows_pid_to_str, windows_xfer_partial)
4144         (windows_get_tib_address, windows_get_ada_task_ptid)
4145         (windows_thread_name, windows_thread_alive): Refactor as
4146         windows_nat_target methods.
4147         (do_initial_windows_stuff): Adjust.
4148         (windows_target): Delete function.
4149         (_initialize_windows_nat): Adjust.
4150
4151         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4152         (darwin_mourn_inferior, darwin_kill_inferior)
4153         (darwin_create_inferior, darwin_attach, darwin_detach)
4154         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4155         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4156         (darwin_supports_multi_process): Refactor as darwin_nat_target
4157         methods.
4158         (darwin_resume_to, darwin_files_info): Delete.
4159         (_initialize_darwin_inferior): Rename to ...
4160         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
4161         * darwin-nat.h: Include "inf-child.h".
4162         (darwin_nat_target): New class.
4163         (darwin_complete_target): Delete.
4164         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4165         (darwin_target): New.
4166         (i386_darwin_fetch_inferior_registers)
4167         (i386_darwin_store_inferior_registers): Refactor as methods of
4168         darwin_nat_target.
4169         (darwin_complete_target): Delete, with ...
4170         (_initialize_i386_darwin_nat): ... bits factored out here.
4171
4172         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4173         (the_alpha_linux_nat_target): New.
4174         (alpha_linux_register_u_offset): Refactor as
4175         alpha_linux_nat_target method.
4176         (_initialize_alpha_linux_nat): Adjust.
4177         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4178         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4179         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4180         methods of linux_nat_trad_target.
4181         (linux_trad_target): Delete.
4182         * linux-nat-trad.h (linux_trad_target): Delete function.
4183         (linux_nat_trad_target): New class.
4184         * mips-linux-nat.c (mips_linux_nat_target): New class.
4185         (super_fetch_registers, super_store_registers, super_close):
4186         Delete.
4187         (the_mips_linux_nat_target): New.
4188         (mips64_linux_regsets_fetch_registers)
4189         (mips64_linux_regsets_store_registers)
4190         (mips64_linux_fetch_registers, mips64_linux_store_registers)
4191         (mips_linux_register_u_offset, mips_linux_read_description)
4192         (mips_linux_can_use_hw_breakpoint)
4193         (mips_linux_stopped_by_watchpoint)
4194         (mips_linux_stopped_data_address)
4195         (mips_linux_region_ok_for_hw_watchpoint)
4196         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4197         (mips_linux_close): Refactor as methods of mips_linux_nat.
4198         (_initialize_mips_linux_nat): Adjust to C++ification.
4199
4200         * aix-thread.c (aix_thread_target): New class.
4201         (aix_thread_ops): Now an aix_thread_target.
4202         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4203         (aix_thread_fetch_registers, aix_thread_store_registers)
4204         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4205         (aix_thread_thread_alive, aix_thread_pid_to_str)
4206         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4207         Refactor as methods of aix_thread_target.
4208         (init_aix_thread_ops): Delete.
4209         (_initialize_aix_thread): Remove references to init_aix_thread_ops
4210         and complete_target_initialization.
4211         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4212         (rs6000_nat_target): New class.
4213         (the_rs6000_nat_target): New.
4214         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4215         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4216         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4217         (super_create_inferior): Delete.
4218         (_initialize_rs6000_nat): Adjust to C++ification.
4219
4220         * arm-linux-nat.c (arm_linux_nat_target): New class.
4221         (the_arm_linux_nat_target): New.
4222         (arm_linux_fetch_inferior_registers)
4223         (arm_linux_store_inferior_registers, arm_linux_read_description)
4224         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4225         (arm_linux_remove_hw_breakpoint)
4226         (arm_linux_region_ok_for_hw_watchpoint)
4227         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4228         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4229         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4230         arm_linux_nat_target.
4231         (_initialize_arm_linux_nat): Adjust to C++ification.
4232
4233         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4234         (the_aarch64_linux_nat_target): New.
4235         (aarch64_linux_fetch_inferior_registers)
4236         (aarch64_linux_store_inferior_registers)
4237         (aarch64_linux_child_post_startup_inferior)
4238         (aarch64_linux_read_description)
4239         (aarch64_linux_can_use_hw_breakpoint)
4240         (aarch64_linux_insert_hw_breakpoint)
4241         (aarch64_linux_remove_hw_breakpoint)
4242         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4243         (aarch64_linux_region_ok_for_hw_watchpoint)
4244         (aarch64_linux_stopped_data_address)
4245         (aarch64_linux_stopped_by_watchpoint)
4246         (aarch64_linux_watchpoint_addr_within_range)
4247         (aarch64_linux_can_do_single_step): Refactor as methods of
4248         aarch64_linux_nat_target.
4249         (super_post_startup_inferior): Delete.
4250         (_initialize_aarch64_linux_nat): Adjust to C++ification.
4251
4252         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4253         (the_hppa_linux_nat_target): New.
4254         (hppa_linux_fetch_inferior_registers)
4255         (hppa_linux_store_inferior_registers): Refactor as methods of
4256         hppa_linux_nat_target.
4257         (_initialize_hppa_linux_nat): Adjust to C++ification.
4258
4259         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4260         (the_ia64_linux_nat_target): New.
4261         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4262         (ia64_linux_stopped_data_address)
4263         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4264         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4265         ia64_linux_nat_target methods.
4266         (super_xfer_partial): Delete.
4267         (_initialize_ia64_linux_nat): Adjust to C++ification.
4268
4269         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4270         (the_m32r_linux_nat_target): New.
4271         (m32r_linux_fetch_inferior_registers)
4272         (m32r_linux_store_inferior_registers): Refactor as
4273         m32r_linux_nat_target methods.
4274         (_initialize_m32r_linux_nat): Adjust to C++ification.
4275
4276         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4277         (the_m68k_linux_nat_target): New.
4278         (m68k_linux_fetch_inferior_registers)
4279         (m68k_linux_store_inferior_registers): Refactor as
4280         m68k_linux_nat_target methods.
4281         (_initialize_m68k_linux_nat): Adjust to C++ification.
4282
4283         * s390-linux-nat.c (s390_linux_nat_target): New class.
4284         (the_s390_linux_nat_target): New.
4285         (s390_linux_fetch_inferior_registers)
4286         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4287         (s390_insert_watchpoint, s390_remove_watchpoint)
4288         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4289         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4290         (s390_auxv_parse, s390_read_description): Refactor as methods of
4291         s390_linux_nat_target.
4292         (_initialize_s390_nat): Adjust to C++ification.
4293
4294         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4295         (the_sparc_linux_nat_target): New.
4296         (_initialize_sparc_linux_nat): Adjust to C++ification.
4297         * sparc-nat.c (sparc_fetch_inferior_registers)
4298         (sparc_store_inferior_registers): Remove target_ops parameter.
4299         * sparc-nat.h (sparc_fetch_inferior_registers)
4300         (sparc_store_inferior_registers): Remove target_ops parameter.
4301         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4302         (the_sparc64_linux_nat_target): New.
4303         (_initialize_sparc64_linux_nat): Adjust to C++ification.
4304
4305         * spu-linux-nat.c (spu_linux_nat_target): New class.
4306         (the_spu_linux_nat_target): New.
4307         (spu_child_post_startup_inferior, spu_child_post_attach)
4308         (spu_child_wait, spu_fetch_inferior_registers)
4309         (spu_store_inferior_registers, spu_xfer_partial)
4310         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4311         methods.
4312         (_initialize_spu_nat): Adjust to C++ification.
4313
4314         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4315         (the_tilegx_linux_nat_target): New.
4316         (fetch_inferior_registers, store_inferior_registers):
4317         Refactor as methods.
4318         (_initialize_tile_linux_nat): Adjust to C++ification.
4319
4320         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4321         (the_xtensa_linux_nat_target): New.
4322         (xtensa_linux_fetch_inferior_registers)
4323         (xtensa_linux_store_inferior_registers): Refactor as
4324         xtensa_linux_nat_target methods.
4325         (_initialize_xtensa_linux_nat): Adjust to C++ification.
4326
4327         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4328         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4329         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4330         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4331         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4332         (fbsd_stopped_by_sw_breakpoint)
4333         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4334         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4335         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4336         (fbsd_post_startup_inferior, fbsd_post_attach)
4337         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4338         (fbsd_set_syscall_catchpoint)
4339         (super_xfer_partial, super_resume, super_wait)
4340         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4341         (fbsd_handle_debug_trap): Remove target_ops parameter.
4342         (fbsd_nat_add_target): Delete.
4343         * fbsd-nat.h: Include "inf-ptrace.h".
4344         (fbsd_nat_add_target): Delete.
4345         (USE_SIGTRAP_SIGINFO): Define.
4346         (fbsd_nat_target): New class.
4347
4348         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4349         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4350         (amd64bsd_target): Delete.
4351         * amd64-bsd-nat.h: New file.
4352         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4353         "x86-bsd-nat.h".
4354         (amd64_fbsd_nat_target): New class.
4355         (the_amd64_fbsd_nat_target): New.
4356         (amd64fbsd_read_description): Refactor as method of
4357         amd64_fbsd_nat_target.
4358         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4359         (_initialize_amd64fbsd_nat): Adjust to C++ification.
4360         * amd64-nat.h (amd64bsd_target): Delete function declaration.
4361         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4362         (i386bsd_store_inferior_registers): Remove target_ops parameter.
4363         (i386bsd_target): Delete.
4364         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4365         (i386bsd_fetch_inferior_registers)
4366         (i386bsd_store_inferior_registers): Declare.
4367         (i386_bsd_nat_target): New class.
4368         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4369         (the_i386_fbsd_nat_target): New.
4370         (i386fbsd_resume, i386fbsd_read_description): Refactor as
4371         i386_fbsd_nat_target methods.
4372         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4373         (_initialize_i386fbsd_nat): Adjust to C++ification.
4374         * x86-bsd-nat.c (super_mourn_inferior): Delete.
4375         (x86bsd_mourn_inferior, x86bsd_target): Delete.
4376         (_initialize_x86_bsd_nat): Adjust to C++ification.
4377         * x86-bsd-nat.h: Include "x86-nat.h".
4378         (x86bsd_target): Delete declaration.
4379         (x86bsd_nat_target): New class.
4380
4381         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4382         (the_aarch64_fbsd_nat_target): New.
4383         (aarch64_fbsd_fetch_inferior_registers)
4384         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4385         aarch64_fbsd_nat_target.
4386         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4387         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4388         (the_alpha_bsd_nat_target): New.
4389         (alphabsd_fetch_inferior_registers)
4390         (alphabsd_store_inferior_registers): Refactor as
4391         alpha_bsd_nat_target methods.
4392         (_initialize_alphabsd_nat): Refactor as methods of
4393         alpha_bsd_nat_target.
4394         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4395         (the_amd64_nbsd_nat_target): New.
4396         (_initialize_amd64nbsd_nat): Adjust to C++ification.
4397         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4398         (the_amd64_obsd_nat_target): New.
4399         (_initialize_amd64obsd_nat): Adjust to C++ification.
4400         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4401         (the_arm_fbsd_nat_target): New.
4402         (arm_fbsd_fetch_inferior_registers)
4403         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4404         (_initialize_arm_fbsd_nat): Refactor as methods of
4405         arm_fbsd_nat_target.
4406         (_initialize_arm_fbsd_nat): Adjust to C++ification.
4407         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4408         (the_arm_netbsd_nat_target): New.
4409         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4410         arm_netbsd_nat_target.
4411         (_initialize_arm_netbsd_nat): Adjust to C++ification.
4412         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4413         (the_hppa_nbsd_nat_target): New.
4414         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4415         hppa_nbsd_nat_target methods.
4416         (_initialize_hppanbsd_nat): Adjust to C++ification.
4417         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4418         (the_hppa_obsd_nat_target): New.
4419         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4420         methods of hppa_obsd_nat_target.
4421         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
4422         add_target.
4423         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4424         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
4425         add_target.
4426         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4427         (_initialize_i386obsd_nat): Use add_target.
4428         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4429         (the_m68k_bsd_nat_target): New.
4430         (m68kbsd_fetch_inferior_registers)
4431         (m68kbsd_store_inferior_registers): Refactor as methods of
4432         m68k_bsd_nat_target.
4433         (_initialize_m68kbsd_nat): Adjust to C++ification.
4434         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4435         (the_mips_fbsd_nat_target): New.
4436         (mips_fbsd_fetch_inferior_registers)
4437         (mips_fbsd_store_inferior_registers): Refactor as methods of
4438         mips_fbsd_nat_target.
4439         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
4440         add_target.
4441         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4442         (the_mips_nbsd_nat_target): New.
4443         (mipsnbsd_fetch_inferior_registers)
4444         (mipsnbsd_store_inferior_registers): Refactor as methods of
4445         mips_nbsd_nat_target.
4446         (_initialize_mipsnbsd_nat): Adjust to C++ification.
4447         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4448         (the_mips64_obsd_nat_target): New.
4449         (mips64obsd_fetch_inferior_registers)
4450         (mips64obsd_store_inferior_registers): Refactor as methods of
4451         mips64_obsd_nat_target.
4452         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
4453         add_target.
4454         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4455         nbsd_nat_target.
4456         * nbsd-nat.h: Include "inf-ptrace.h".
4457         (nbsd_nat_target): New class.
4458         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
4459         (obsd_wait): Refactor as methods of obsd_nat_target.
4460         (obsd_add_target): Delete.
4461         * obsd-nat.h: Include "inf-ptrace.h".
4462         (obsd_nat_target): New class.
4463         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
4464         (the_ppc_fbsd_nat_target): New.
4465         (ppcfbsd_fetch_inferior_registers)
4466         (ppcfbsd_store_inferior_registers): Refactor as methods of
4467         ppc_fbsd_nat_target.
4468         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
4469         add_target.
4470         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
4471         (the_ppc_nbsd_nat_target): New.
4472         (ppcnbsd_fetch_inferior_registers)
4473         (ppcnbsd_store_inferior_registers): Refactor as methods of
4474         ppc_nbsd_nat_target.
4475         (_initialize_ppcnbsd_nat): Adjust to C++ification.
4476         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
4477         (the_ppc_obsd_nat_target): New.
4478         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
4479         methods of ppc_obsd_nat_target.
4480         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
4481         add_target.
4482         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
4483         (the_sh_nbsd_nat_target): New.
4484         (shnbsd_fetch_inferior_registers)
4485         (shnbsd_store_inferior_registers): Refactor as methods of
4486         sh_nbsd_nat_target.
4487         (_initialize_shnbsd_nat): Adjust to C++ification.
4488         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
4489         (inf_ptrace_xfer_partial): Delete.
4490         (sparc_xfer_partial, sparc_target): Delete.
4491         * sparc-nat.h (sparc_fetch_inferior_registers)
4492         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
4493         (sparc_target): Delete function declaration.
4494         (sparc_target): New template class.
4495         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
4496         (_initialize_sparcnbsd_nat): Adjust to C++ification.
4497         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
4498         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
4499         add_target.
4500         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
4501         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
4502         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
4503         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
4504         add_target.
4505         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
4506         (the_vax_bsd_nat_target): New.
4507         (vaxbsd_fetch_inferior_registers)
4508         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
4509         methods.
4510         (_initialize_vaxbsd_nat): Adjust to C++ification.
4511
4512         * bsd-kvm.c (bsd_kvm_target): New class.
4513         (bsd_kvm_ops): Now a bsd_kvm_target.
4514         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
4515         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
4516         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
4517         bsd_kvm_target.
4518         (bsd_kvm_return_one): Delete.
4519         (bsd_kvm_add_target): Adjust to C++ification.
4520
4521         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
4522         (nto_procfs_target_procfs): New classes.
4523         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
4524         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
4525         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
4526         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
4527         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
4528         (procfs_remove_hw_breakpoint, procfs_resume)
4529         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
4530         (procfs_kill_inferior, procfs_store_registers)
4531         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
4532         as methods of nto_procfs_target.
4533         (nto_procfs_ops): Now an nto_procfs_target_procfs.
4534         (nto_native_ops): Delete.
4535         (procfs_open, procfs_native_open): Delete.
4536         (nto_native_ops): Now an nto_procfs_target_native.
4537         (init_procfs_targets): Adjust to C++ification.
4538         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
4539         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
4540         Refactor as methods of nto_procfs_target.
4541
4542         * go32-nat.c (go32_nat_target): New class.
4543         (the_go32_nat_target): New.
4544         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
4545         (go32_store_registers, go32_xfer_partial, go32_files_info)
4546         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
4547         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
4548         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
4549         (go32_pid_to_str): Refactor as methods of go32_nat_target.
4550         (go32_target): Delete.
4551         (_initialize_go32_nat): Adjust to C++ification.
4552
4553         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
4554         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
4555         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
4556         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
4557         gnu_nat_target.
4558         (gnu_target): Delete.
4559         * gnu-nat.h (gnu_target): Delete.
4560         (gnu_nat_target): New class.
4561         * i386-gnu-nat.c (gnu_base_target): New.
4562         (i386_gnu_nat_target): New class.
4563         (the_i386_gnu_nat_target): New.
4564         (_initialize_i386gnu_nat): Adjust to C++ification.
4565
4566 2018-05-02  Pedro Alves  <palves@redhat.com>
4567
4568         * bfd-target.c (target_bfd_xclose): Rename to ...
4569         (target_bfd_close): ... this.
4570         (target_bfd_reopen): Adjust.
4571         * target.c (target_close): Remove references to to_xclose.
4572         * target.h (target_ops::to_xclose): Delete.
4573         (target_ops::to_close): Update comments.
4574
4575 2018-05-02  Pedro Alves  <palves@redhat.com>
4576
4577         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
4578         "linux-nat.h".
4579         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
4580         * inf-ptrace.c (inf_ptrace_register_u_offset)
4581         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4582         (inf_ptrace_store_register, inf_ptrace_store_registers)
4583         (inf_ptrace_trad_target): Move to ...
4584         * linux-nat-trad.c: ... this new file.
4585         * linux-nat-trad.h: New file.
4586         * linux-nat.c (linux_target_install_ops): Make extern.
4587         (linux_trad_target): Delete.
4588         * linux-nat.h (linux_trad_target): Delete declaration.
4589         (linux_target_install_ops): Declare.
4590         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
4591         "linux-nat.h".
4592
4593 2018-05-02  Pedro Alves  <palves@redhat.com>
4594
4595         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4596         procfs_target/add_target here.
4597         * procfs.c (procfs_target): Make static.
4598         (_initialize_procfs): Call add_target here.
4599         * procfs.h (struct target_ops): Remove forward declaration.
4600         (procfs_target): Remove declaration.
4601         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
4602
4603 2018-05-02  Pedro Alves  <palves@redhat.com>
4604
4605         * procfs.c (procfs_stopped_by_watchpoint)
4606         (procfs_insert_watchpoint, procfs_remove_watchpoint)
4607         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
4608         Forward declare.
4609         (procfs_use_watchpoints): Delete, move contents...
4610         (procfs_target): ... here.
4611         * procfs.h (procfs_use_watchpoints): Delete declaration.
4612         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4613         procfs_use_watchpoints.
4614         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
4615         procfs_use_watchpoints.
4616
4617 2018-05-02  Tom Tromey  <tom@tromey.com>
4618
4619         PR python/20084:
4620         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
4621         and var_zuinteger_unlimited.
4622         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
4623         and PARAM_ZUINTEGER_UNLIMITED.
4624         (set_parameter_value): Handle var_zuinteger and
4625         var_zuinteger_unlimited.
4626         (add_setshow_generic): Likewise.
4627         (parmpy_init): Likewise.
4628
4629 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
4630
4631         PR rust/23124
4632         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
4633         pointer is not null before dereferencing it.
4634
4635 2018-04-30  Tom Tromey  <tom@tromey.com>
4636
4637         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
4638         is_mi_like_p.
4639
4640 2018-04-30  Tom Tromey  <tom@tromey.com>
4641
4642         * breakpoint.c (mention): Remove use of is_mi_like_p.
4643         (print_mention_ranged_breakpoint): Likewise.
4644         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
4645         of is_mi_like_p.
4646
4647 2018-04-30  Tom Tromey  <tom@tromey.com>
4648
4649         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
4650
4651 2018-04-30  Tom Tromey  <tom@tromey.com>
4652
4653         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
4654         (info_spu_event_command): Remove some uses of is_mi_like_p.
4655
4656 2018-04-30  Tom Tromey  <tom@tromey.com>
4657
4658         * python/py-framefilter.c (py_print_single_arg)
4659         (enumerate_locals, py_print_args, py_print_frame): Remove some
4660         uses of is_mi_like_p.
4661
4662 2018-04-30  Tom Tromey  <tom@tromey.com>
4663
4664         * ui-out.c: Update.
4665         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
4666         * ui-out.h (ui_out::is_mi_like_p): Now const.
4667         (ui_out::do_is_mi_like_p): Now const.
4668         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
4669
4670 2018-04-30  Tom Tromey  <tom@tromey.com>
4671
4672         * varobj.c (varobj_set_visualizer): Use new_reference.
4673         * python/python.c (gdbpy_decode_line): Use new_reference.
4674         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
4675         new_reference.
4676
4677 2018-04-30  Tom Tromey  <tom@tromey.com>
4678
4679         * varobj.c (install_new_value): Use new_reference.
4680         * value.h (value_incref): Return void.  Swap intro comment with
4681         value_decref.
4682         * value.c (set_value_parent): Use new_reference.
4683         (value_incref): Return void.  Update intro comment.
4684         (release_value): Use new_reference.
4685         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
4686
4687 2018-04-30  Tom Tromey  <tom@tromey.com>
4688
4689         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
4690         * gdb_bfd.h (new_bfd_ref): Remove.
4691         (gdb_bfd_open): Update comment.
4692         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4693         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
4694         (gdb_bfd_fdopenr): Use new_reference.
4695         * exec.c (exec_file_attach): Use new_reference.
4696
4697 2018-04-30  Tom Tromey  <tom@tromey.com>
4698
4699         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
4700         method.
4701
4702 2018-04-30  Tom Tromey  <tom@tromey.com>
4703
4704         * jit.c (jit_read_code_entry): Use type_align.
4705         * i386-tdep.c (i386_gdbarch_init): Don't call
4706         set_gdbarch_long_long_align_bit.
4707         * gdbarch.sh: Remove long_long_align_bit.
4708         * gdbarch.c, gdbarch.h: Rebuild.
4709         * arc-tdep.c (arc_type_align): New function.
4710         (arc_gdbarch_init): Use arc_type_align.  Don't call
4711         set_gdbarch_long_long_align_bit.
4712
4713 2018-04-30  Tom Tromey  <tom@tromey.com>
4714
4715         * rust-lang.c (rust_type_alignment): Remove.
4716         (rust_composite_type): Use type_align.
4717
4718 2018-04-30  Tom Tromey  <tom@tromey.com>
4719
4720         * NEWS: Mention Type.align.
4721         * python/py-type.c (typy_get_alignof): New function.
4722         (type_object_getset): Add "alignof".
4723
4724 2018-04-30  Tom Tromey  <tom@tromey.com>
4725
4726         PR exp/17095:
4727         * NEWS: Update.
4728         * std-operator.def (UNOP_ALIGNOF): New operator.
4729         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
4730         New.
4731         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
4732         * c-lang.c (c_op_print_tab): Add alignof.
4733         * c-exp.y (ALIGNOF): New token.
4734         (exp): Add "ALIGNOF" production.
4735         (ident_tokens): Add _Alignof and alignof.
4736
4737 2018-04-30  Tom Tromey  <tom@tromey.com>
4738
4739         * i386-tdep.c (i386_type_align): New function.
4740         (i386_gdbarch_init): Update.
4741         * gdbarch.sh (type_align): New method.
4742         * gdbarch.c, gdbarch.h: Rebuild.
4743         * arch-utils.h (default_type_align): Declare.
4744         * arch-utils.c (default_type_align): New function.
4745         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
4746         (struct type) <align_log2>: New field.
4747         <instance_flags>: Now a bitfield.
4748         (TYPE_RAW_ALIGN): New macro.
4749         (type_align, type_raw_align, set_type_align): Declare.
4750         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
4751         functions.
4752         * dwarf2read.c (quirk_rust_enum): Set type alignment.
4753         (get_alignment, maybe_set_alignment): New functions.
4754         (read_structure_type, read_enumeration_type, read_array_type)
4755         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
4756         (read_subrange_type, read_base_type): Set type alignment.
4757
4758 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
4759
4760         * dwarf2read.c (read_index_from_section): Use bool.
4761
4762 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
4763
4764         PR gdb/22950
4765         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
4766         with #ifdef.
4767
4768 2018-04-29  John Reiser  <jreiser@BitWagon.com>
4769
4770         PR build/22873
4771         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
4772         last step, and do it atomically.
4773
4774 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
4775
4776         * compile/compile-c-types.c (convert_int, convert_float):
4777         Update for C FE v1.
4778
4779 2018-04-27  Tom Tromey  <tom@tromey.com>
4780
4781         PR rust/22545:
4782         * rust-lang.c (rust_inclusive_range_type_p): New function.
4783         (rust_range): Handle inclusive ranges.
4784         (rust_compute_range): Likewise.
4785         * rust-exp.y (struct rust_op) <inclusive>: New field.
4786         (DOTDOTEQ): New constant.
4787         (range_expr): Add "..=" productions.
4788         (operator_tokens): Add "..=" token.
4789         (ast_range): Add "inclusive" parameter.
4790         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
4791         ranges.
4792         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
4793         bounds values.
4794         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
4795         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
4796         Update comments.
4797         * expprint.c (print_subexp_standard): Handle new bounds values.
4798         (dump_subexp_body_standard): Likewise.
4799
4800 2018-04-27  Tom Tromey  <tom@tromey.com>
4801
4802         * configure: Rebuild.
4803         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
4804         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
4805         "OVERRIDE".
4806         (class symbol_needs_eval_context): Likewise.
4807         * dwarf2read.c (mock_mapped_index::symbol_name_count)
4808         (mock_mapped_index::symbol_name_at): Use "override".  Remove
4809         "virtual".
4810         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
4811         "override".
4812         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
4813         * aarch64-tdep.c (instruction_reader::read): Use "override".
4814         (instruction_reader_test::read): Likewise.
4815         * arm-tdep.c (instruction_reader::read): Use "override".
4816         (instruction_reader_thumb::read): Likewise.
4817
4818 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
4819
4820         PR remote/9665
4821         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
4822         instead of remote_send.
4823         (remote_send): Remove.
4824
4825 2018-04-26  Pedro Alves  <palves@redhat.com>
4826
4827         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
4828         find_function_start_sal instead of find_pc_line.
4829
4830 2018-04-26  Pedro Alves  <palves@redhat.com>
4831
4832         * breakpoint.c (set_breakpoint_location_function): Handle
4833         mst_data_gnu_ifunc.
4834         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
4835         * elfread.c (elf_symtab_read): Give data symbols with
4836         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
4837         (elf_rel_plt_read): Update comment.
4838         * linespec.c (convert_linespec_to_sals): Handle
4839         mst_data_gnu_ifunc.
4840         (minsym_found): Handle mst_data_gnu_ifunc.
4841         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
4842         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
4843         * parse.c (find_minsym_type_and_address): Handle
4844         mst_data_gnu_ifunc.
4845         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
4846         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
4847         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
4848         comment.
4849         <mst_data_gnu_ifunc>: New enumerator.
4850
4851 2018-04-26  Pedro Alves  <palves@redhat.com>
4852
4853         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
4854         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
4855         'want_trampoline' parameter by a lookup_msym_prefer parameter.
4856         Handle it.
4857         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
4858         (lookup_minimal_symbol_by_pc): Adjust.
4859         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
4860         (lookup_solib_trampoline_symbol_by_pc): Adjust.
4861         * minsyms.h (lookup_msym_prefer): New enum.
4862         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4863         parameter by a lookup_msym_prefer parameter.
4864
4865 2018-04-26  Pedro Alves  <palves@redhat.com>
4866
4867         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
4868         ends in "@plt" instead of looking at the symbol's section.
4869
4870 2018-04-26  Pedro Alves  <palves@redhat.com>
4871
4872         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
4873         all references.
4874         (find_pc_partial_function_gnu_ifunc): Rename to ...
4875         (find_pc_partial_function): ... this, and remove references to
4876         'is_gnu_ifunc_p'.
4877         (find_pc_partial_function): Delete old implementation.
4878         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
4879
4880 2018-04-26  Pedro Alves  <palves@redhat.com>
4881
4882         * linespec.c (struct bound_minimal_symbol_search_key): New.
4883         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
4884         skip first line if we found a GNU ifunc minimal symbol by name.
4885         (compare_msymbols): Change parameters to work with a destructured
4886         lhs minsym.
4887         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
4888         functions.
4889
4890 2018-04-26  Pedro Alves  <palves@redhat.com>
4891
4892         * breakpoint.c (set_breakpoint_location_function): Don't resolve
4893         ifunc targets here.  Instead, if we have an ifunc minsym, use its
4894         address/name.
4895         (add_location_to_breakpoint): Store the minsym and the objfile in
4896         the breakpoint location.
4897         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
4898         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
4899         Record the minsym in the sal.
4900         * symtab.h (symtab_and_line) <msymbol>: New field.
4901
4902 2018-04-26  Pedro Alves  <palves@redhat.com>
4903
4904         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
4905         unless we actually resolved the ifunc.
4906
4907 2018-04-26  Pedro Alves  <palves@redhat.com>
4908
4909         * c-exp.y (variable production): Prefer ifunc minsyms over
4910         regular function symbols.
4911         * symtab.c (find_gnu_ifunc): New function.
4912         * minsyms.h (lookup_msym_prefer): New enum.
4913         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4914         parameter by a lookup_msym_prefer parameter.
4915         * symtab.h (find_gnu_ifunc): New declaration.
4916
4917 2018-04-26  Pedro Alves  <palves@redhat.com>
4918
4919         * blockframe.c (find_gnu_ifunc_target_type): New function.
4920         (find_function_type): New.
4921         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
4922         return a value with a memory address.
4923         (eval_call): For calls to GNU ifunc functions, try to find the
4924         type of the target function from the type that the resolver
4925         returns.
4926         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
4927         symbols.
4928         * infcall.c (find_function_return_type): Delete.
4929         (find_function_addr): Add 'function_type' parameter.  For calls to
4930         GNU ifunc functions, try to find the type of the target function
4931         from the type that the resolver returns, and return it via
4932         FUNCTION_TYPE.
4933         (call_function_by_hand_dummy): Adjust to use the function type
4934         returned by find_function_addr.
4935         (find_function_addr): Add 'function_type' parameter and move
4936         description here.
4937         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
4938         declarations.
4939
4940 2018-04-26  Pedro Alves  <palves@redhat.com>
4941
4942         * c-exp.y (variable production): Skip finding an alias for ifunc
4943         symbols.
4944
4945 2018-04-26  Pedro Alves  <palves@redhat.com>
4946
4947         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
4948
4949 2018-04-25  Pedro Alves  <palves@redhat.com>
4950
4951         * infcmd.c (kill_command): Print the pid as string, not the whole
4952         thread's ptid.  Add comment.  s/has been killed/killed/ in output
4953         message.
4954         * remote.c (remote_detach_1): Print the pid as string, not the
4955         whole thread's ptid.
4956
4957 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4958             Sergio Durigan Junior  <sergiodj@redhat.com>
4959             Pedro Alves  <palves@redhat.com>
4960
4961         * infcmd.c (kill_command): Print message when inferior has
4962         been killed.
4963         * inferior.c (print_inferior_events): Remove 'static'.  Set as
4964         '1'.
4965         (add_inferior): Improve message printed when
4966         'print_inferior_events' is on.
4967         (exit_inferior): Remove message printed when
4968         'print_inferior_events' is on.
4969         (detach_inferior): Improve message printed when
4970         'print_inferior_events' is on.
4971         (initialize_inferiors): Use 'add_inferior_silent' to set
4972         'current_inferior_'.
4973         * inferior.h (print_inferior_events): Declare here as
4974         'extern'.
4975         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
4976         '[Detaching...]' messages when 'print_inferior_events' is on.
4977         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
4978         as prefix/suffix for messages.  Remove periods.  Fix erroneous
4979         'Detaching after fork from child...', replace it by '... from
4980         parent...'.
4981         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
4982         prefix/suffix when printing 'Detaching...' messages.  Print
4983         them when 'print_inferior_events' is on.
4984         * remote.c (remote_detach_1): Print message when detaching
4985         from inferior and '!is_fork_parent'.
4986
4987 2018-04-24  Tom Tromey  <tom@tromey.com>
4988
4989         * cli-out.h: Reindent.
4990
4991 2018-04-24  Tom Tromey  <tom@tromey.com>
4992
4993         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
4994         (cli_ui_out::do_field_string): Use fputs_filtered.
4995         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
4996
4997 2018-04-23  Tom Tromey  <tom@tromey.com>
4998
4999         * guile/scm-frame.c (gdbscm_frame_read_var): Use
5000         gdb::unique_xmalloc_ptr.
5001
5002 2018-04-23  Tom Tromey  <tom@tromey.com>
5003
5004         * configure: Rebuild.
5005
5006 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
5007
5008         PR gdb/23095
5009         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5010         prepare_for_testing.  Set normal_bp to r_debug_state if target
5011         is bsd.
5012
5013 2018-04-21  Pedro Alves  <palves@redhat.com>
5014             Rajendra SY  <rajendra.sy@gmail.com>
5015
5016         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5017         * remote.c (extended_remote_attach): In all-stop mode, mark the
5018         thread as executing.
5019
5020 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5021
5022         * thread.c (thread_apply_all_command): Fix comment.
5023         (thread_command): Fix comment.
5024
5025 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
5026
5027         * common/tdesc.h (tdesc_create_feature): Remove xml filename
5028         parameter.
5029         * features/aarch64-core.c (create_feature_aarch64_core):
5030         Regenerate.
5031         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5032         Likewise.
5033         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5034         Likewise.
5035         * features/i386/32bit-avx512.c
5036         (create_feature_i386_32bit_avx512): Likewise.
5037         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5038         Likewise.
5039         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5040         Likewise.
5041         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5042         Likewise.
5043         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5044         Likewise.
5045         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5046         Likewise.
5047         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5048         Likewise.
5049         * features/i386/64bit-avx512.c
5050         (create_feature_i386_64bit_avx512): Likewise.
5051         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5052         Likewise.
5053         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5054         Likewise.
5055         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5056         Likewise.
5057         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5058         Likewise.
5059         * features/i386/64bit-segments.c
5060         (create_feature_i386_64bit_segments): Likewise.
5061         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5062         Likewise.
5063         * features/i386/x32-core.c
5064         (create_feature_i386_x32_core): Likewise.
5065         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5066         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5067         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5068         * target-descriptions.c: In generated code, don't pass xml
5069         filename.
5070
5071 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
5072
5073         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5074         (print_xml_feature::visit_post): Likewise.
5075         (print_xml_feature::visit): Likewise.
5076         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5077         (print_xml_feature): Add new class.
5078         * regformats/regdat.sh: Null xmltarget on feature targets.
5079         * target-descriptions.c (struct target_desc): Add xmltarget.
5080         (maintenance_check_tdesc_xml_convert): Add unittest function.
5081         (tdesc_get_features_xml): Add function to get xml.
5082         (maintenance_check_xml_descriptions): Test xml generation.
5083         * xml-tdesc.c (string_read_description_xml): Add function.
5084         * xml-tdesc.h (string_read_description_xml): Add declaration.
5085
5086 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
5087
5088         * features/Makefile: Add feature marker to targets with new style
5089         target descriptions.
5090         * regformats/aarch64.dat: Regenerate.
5091         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5092         * regformats/i386/amd64-avx-linux.dat: Likewise.
5093         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5094         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5095         * regformats/i386/amd64-linux.dat: Likewise.
5096         * regformats/i386/amd64-mpx-linux.dat: Likewise.
5097         * regformats/i386/amd64.dat: Likewise.
5098         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5099         * regformats/i386/i386-avx-linux.dat: Likewise.
5100         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5101         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5102         * regformats/i386/i386-linux.dat: Likewise.
5103         * regformats/i386/i386-mmx-linux.dat: Likewise.
5104         * regformats/i386/i386-mpx-linux.dat: Likewise.
5105         * regformats/i386/i386.dat: Likewise.
5106         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5107         * regformats/i386/x32-avx-linux.dat: Likewise.
5108         * regformats/i386/x32-linux.dat: Likewise.
5109         * regformats/tic6x-c62x-linux.dat: Likewise.
5110         * regformats/tic6x-c64x-linux.dat: Likewise.
5111         * regformats/tic6x-c64xp-linux.dat: Likewise.
5112         * regformats/regdat.sh: Parse feature marker.
5113
5114 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
5115
5116         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5117         (tdesc_osabi_name): Likewise.
5118         * target-descriptions.c (tdesc_architecture_name): Add new
5119         function.
5120         (tdesc_osabi_name): Likewise.
5121
5122 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
5123
5124         * common/tdesc.c (tdesc_predefined_type): Move to here.
5125         (tdesc_named_type): Likewise.
5126         (tdesc_create_vector): Likewise.
5127         (tdesc_create_struct): Likewise.
5128         (tdesc_set_struct_size): Likewise.
5129         (tdesc_create_union): Likewise.
5130         (tdesc_create_flags): Likewise.
5131         (tdesc_create_enum): Likewise.
5132         (tdesc_add_field): Likewise.
5133         (tdesc_add_typed_bitfield): Likewise.
5134         (tdesc_add_bitfield): Likewise.
5135         (tdesc_add_flag): Likewise.
5136         (tdesc_add_enum_value): Likewise.
5137         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5138         (struct tdesc_type_vector): Likewise.
5139         (struct tdesc_type_field): Likewise.
5140         (struct tdesc_type_with_fields): Likewise.
5141         (tdesc_create_enum): Add declaration.
5142         (tdesc_add_typed_bitfield): Likewise.
5143         (tdesc_add_enum_value): Likewise.
5144         * target-descriptions.c (tdesc_type_field): Move from here.
5145         (tdesc_type_builtin): Likewise.
5146         (tdesc_type_vector): Likewise.
5147         (tdesc_type_with_fields): Likewise.
5148         (tdesc_predefined_types): Likewise.
5149         (tdesc_named_type): Likewise.
5150         (tdesc_create_vector): Likewise.
5151         (tdesc_create_struct): Likewise.
5152         (tdesc_set_struct_size): Likewise.
5153         (tdesc_create_union): Likewise.
5154         (tdesc_create_flags): Likewise.
5155         (tdesc_create_enum): Likewise.
5156         (tdesc_add_field): Likewise.
5157         (tdesc_add_typed_bitfield): Likewise.
5158         (tdesc_add_bitfield): Likewise.
5159         (tdesc_add_flag): Likewise.
5160         (tdesc_add_enum_value): Likewise.
5161         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5162         (tdesc_add_typed_bitfield): Likewise.
5163         (tdesc_add_enum_value): Likewise.
5164
5165 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
5166
5167         * common/tdesc.c (tdesc_feature::accept): Move to here.
5168         (tdesc_feature::operator==): Likewise.
5169         (tdesc_create_reg): Likewise.
5170         * common/tdesc.h (tdesc_type_kind): Likewise.
5171         (struct tdesc_type): Likewise.
5172         (struct tdesc_feature): Likewise.
5173         * regformats/regdat.sh: Create a feature.
5174         * target-descriptions.c (tdesc_type_kind): Move from here.
5175         (tdesc_type): Likewise.
5176         (tdesc_type_up): Likewise.
5177         (tdesc_feature): Likewise.
5178         (tdesc_create_reg): Likewise.
5179
5180 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
5181
5182         * Makefile.in: Add arch/tdesc.c
5183         * common/tdesc.c: New file.
5184         * common/tdesc.h (tdesc_element_visitor): Move to here.
5185         (tdesc_element): Likewise.
5186         (tdesc_reg): Likewise.
5187         (tdesc_reg_up): Likewise.
5188         * regformats/regdef.h (reg): Add offset to constructors.
5189         * target-descriptions.c (tdesc_element_visitor): Move from here.
5190         (tdesc_element): Likewise.
5191         (tdesc_reg): Likewise.
5192         (tdesc_reg_up): Likewise.
5193
5194 2018-04-17  Tom Tromey  <tom@tromey.com>
5195
5196         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5197         discriminant field.
5198
5199 2018-04-17  Tom Tromey  <tom@tromey.com>
5200
5201         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5202
5203 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5204
5205         * symtab.c (print_symbol_info): Skip printing filename and line
5206         number when `last' is NULL.
5207         (symtab_symbol_info): Use empty string instead of NULL for first
5208         invocation of print_symbol_info.
5209         (rbreak_command): Pass NULL to `last' parameter of
5210         print_symbol_info.
5211
5212 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
5213
5214         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5215         instead of nullptr.
5216
5217 2018-04-16  Pedro Alves  <palves@redhat.com>
5218
5219         * MAINTAINERS (sh): Remove.
5220         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5221         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5222         (ALLDEPFILES): Remove sh64-tdep.c.
5223         * NEWS: Mentions that support for SH-5/SH64 is removed.
5224         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5225         (sh*-*-openbsd*): Ditto.
5226         (sh64-*-elf*): Remove.
5227         (sh*): Remove.
5228         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5229         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5230         * sh-tdep.c: No longer include "sh64-tdep.h".
5231         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5232         * sh64-tdep.c, sh64-tdep.h: Remove files.
5233
5234 2018-04-16  Pedro Alves  <palves@redhat.com>
5235
5236         * MAINTAINERS: Remove m88k.
5237         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5238         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5239         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5240         * NEWS: Mention that support for m88k was removed.
5241         * configure.host (m88*-*-*): Remove support.
5242         * configure.nat (m88k-*-*): Remove support.
5243         * configure.tgt (m88*-*-openbsd*): Remove.
5244         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5245
5246 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
5247
5248         * configure.tgt (x86_tobjs): New variable.
5249         (amd64_tobjs, i386_tobjs): Use it.
5250
5251 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5252
5253         * symtab.c (print_symbol_info): Precede the symbol definition by
5254         the line number when available.
5255         * NEWS: Advertise this enhancement.
5256
5257 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
5258
5259         * NEWS (New options): announce set/show record btrace cpu.
5260         * btrace.c: Include record-btrace.h.
5261         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5262         the vendor is unknown.
5263         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
5264         Maybe overwrite the btrace configuration's cpu.
5265         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
5266         (btrace_fetch): Add cpu parameter.  Update callers.
5267         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5268         Maybe overwrite the btrace configuration's cpu.  Skip enabling
5269         errata workarounds if the vendor is unknown.
5270         * python/py-record-btrace.c: Include record-btrace.h.
5271         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5272         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5273         * record-btrace.c (record_btrace_cpu_state_kind): New.
5274         (record_btrace_cpu): New.
5275         (set_record_btrace_cpu_cmdlist): New.
5276         (record_btrace_get_cpu): New.
5277         (require_btrace_thread, record_btrace_info)
5278         (record_btrace_resume_thread): Call record_btrace_get_cpu.
5279         (cmd_set_record_btrace_cpu_none): New.
5280         (cmd_set_record_btrace_cpu_auto): New.
5281         (cmd_set_record_btrace_cpu): New.
5282         (cmd_show_record_btrace_cpu): New.
5283         (_initialize_record_btrace): Initialize set/show record btrace cpu
5284         commands.
5285         * record-btrace.h (record_btrace_get_cpu): New.
5286
5287 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
5288
5289         * record.c (set_record_command): Fix typo in message.
5290
5291 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
5292
5293         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5294
5295 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
5296
5297         * infrun.c (process_event_stop_test): Call
5298         gdbarch_in_indirect_branch_thunk.
5299         * gdbarch.sh (in_indirect_branch_thunk): New.
5300         * gdbarch.c: Regenerated.
5301         * gdbarch.h: Regenerated.
5302         * x86-tdep.h: New.
5303         * x86-tdep.c: New.
5304         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5305         (HFILES_NO_SRCDIR): Add x86-tdep.h.
5306         (ALLDEPFILES): Add x86-tdep.c.
5307         * arch-utils.h (default_in_indirect_branch_thunk): New.
5308         * arch-utils.c (default_in_indirect_branch_thunk): New.
5309         * i386-tdep: Include x86-tdep.h.
5310         (i386_in_indirect_branch_thunk): New.
5311         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5312         function.
5313         * amd64-tdep: Include x86-tdep.h.
5314         (amd64_in_indirect_branch_thunk): New.
5315         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5316
5317 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
5318
5319         PR gdb/23053
5320         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5321         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5322         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5323         regression.
5324
5325 2018-04-12  Tom Tromey  <tom@tromey.com>
5326
5327         * rust-lang.c (rust_print_struct_def): Remove univariant code.
5328         (rust_evaluate_subexp): Likewise.
5329
5330 2018-04-12  Pedro Alves  <palves@redhat.com>
5331
5332         * procfs.c (procfs_detach): Make forward declaration's prototype
5333         match definition's protototype.
5334         (proc_get_LDT_entry): Remove stale do_cleanups call.
5335
5336 2018-04-12  Pedro Alves  <palves@redhat.com>
5337
5338         * target.h (target_ops::to_has_exited): Delete.
5339         (target_has_exited): Delete.
5340         * target-delegates.c: Regenerate.
5341
5342 2018-04-11  Pedro Alves  <palves@redhat.com>
5343
5344         * target.c (fileio_fh_t::t): Add comment.
5345         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5346         (target_fileio_close): Handle a NULL target.
5347         (invalidate_fileio_fh): New.
5348         (target_close): Call it.
5349         * remote.c (remote_hostio_send_command): No longer check whether
5350         remote_desc is open.
5351
5352 2018-04-11  Pedro Alves  <palves@redhat.com>
5353
5354         * target.c (fileio_fh_t): Make it a named struct instead of a
5355         typedef.
5356         (fileio_fh_t::is_closed): New method.
5357         (DEF_VEC_O (fileio_fh_t)): Remove.
5358         (fileio_fhandles): Now a std::vector.
5359         (is_closed_fileio_fh): Delete.
5360         (acquire_fileio_fd): Adjust.  Rename parameters.
5361         (release_fileio_fd): Adjust.
5362         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5363         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5364         (target_fileio_close): Adjust.
5365
5366 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
5367
5368         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5369         index.
5370
5371 2018-04-10  Pedro Alves  <palves@redhat.com>
5372
5373         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5374         (scoped_finish_thread_state): New class.
5375         * infcmd.c (run_command_1): Use it instead of finish_thread_state
5376         cleanup.
5377         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5378         (fetch_inferior_event, normal_stop): Likewise.
5379         * thread.c (finish_thread_state_cleanup): Delete.
5380
5381 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
5382             Pedro Alves  <palves@redhat.com>
5383
5384         * value.c: Include "selftest.h" and "common/array-view.h".
5385         (struct range) <operator ==>: New.
5386         (test_ranges_contain): New.
5387         (check_ranges_vector): New.
5388         (test_insert_into_bit_range_vector): New.
5389         (_initialize_values): Register selftests.
5390         * common/array-view.h (operator==, operator!=): New.
5391
5392 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
5393
5394         * common/gdb_vecs.h (unordered_remove): Add overload that takes
5395         an iterator.
5396         * inline-frame.c: Include <algorithm>.
5397         (struct inline_state): Add constructor.
5398         (inline_state_s): Remove.
5399         (DEF_VEC_O(inline_state_s)): Remove.
5400         (inline_states): Change type to std::vector.
5401         (find_inline_frame_state): Adjust to std::vector.
5402         (allocate_inline_frame_state): Remove.
5403         (clear_inline_frame_state): Adjust to std::vector.
5404         (skip_inline_frames): Adjust to std::vector.
5405
5406 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
5407
5408         * tracepoint.h (struct trace_state_variable): Add constructor.
5409         <name>: Change type to std::string.
5410         * tracepoint.c (tsv_s): Remove.
5411         (DEF_VEC_O(tsv_s)): Remove.
5412         (tvariables): Change to std::vector.
5413         (create_trace_state_variable): Adjust to std::vector.
5414         (find_trace_state_variable): Likewise.
5415         (find_trace_state_variable_by_number): Likewise.
5416         (delete_trace_state_variable): Likewise.
5417         (trace_variable_command): Adjust to std::string.
5418         (delete_trace_variable_command): Likewise.
5419         (tvariables_info_1): Adjust to std::vector.
5420         (save_trace_state_variables): Likewise.
5421         (start_tracing): Likewise.
5422         (merge_uploaded_trace_state_variables): Adjust to std::vector
5423         and std::string.
5424         * target.h (struct target_ops)
5425         <to_download_trace_state_variable>: Pass reference to
5426         trace_state_variable.
5427         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5428         * target-delegates.c: Re-generate.
5429         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5430         (mi_tsv_deleted): Likewise.
5431         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5432         * remote.c (remote_download_trace_state_variable): Change
5433         pointer to reference and adjust.
5434         * make-target-delegates (parse_argtypes): Handle references.
5435         (write_function_header): Likewise.
5436         (munge_type): Likewise.
5437
5438 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
5439
5440         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5441         string_view-selftests.c.
5442         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5443         testsuite.
5444         * unittests/basic_string_view/cons/char/1.cc: Likewise.
5445         * unittests/basic_string_view/cons/char/2.cc: Likewise.
5446         * unittests/basic_string_view/cons/char/3.cc: Likewise.
5447         * unittests/basic_string_view/element_access/char/1.cc:
5448         Likewise.
5449         * unittests/basic_string_view/element_access/char/empty.cc:
5450         Likewise.
5451         * unittests/basic_string_view/element_access/char/front_back.cc:
5452         Likewise.
5453         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5454         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5455         Likewise.
5456         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5457         Likewise.
5458         * unittests/basic_string_view/modifiers/swap/char/1.cc:
5459         Likewise.
5460         * unittests/basic_string_view/operations/compare/char/1.cc:
5461         Likewise.
5462         * unittests/basic_string_view/operations/compare/char/13650.cc:
5463         Likewise.
5464         * unittests/basic_string_view/operations/copy/char/1.cc:
5465         Likewise.
5466         * unittests/basic_string_view/operations/data/char/1.cc:
5467         Likewise.
5468         * unittests/basic_string_view/operations/find/char/1.cc:
5469         Likewise.
5470         * unittests/basic_string_view/operations/find/char/2.cc:
5471         Likewise.
5472         * unittests/basic_string_view/operations/find/char/3.cc:
5473         Likewise.
5474         * unittests/basic_string_view/operations/find/char/4.cc:
5475         Likewise.
5476         * unittests/basic_string_view/operations/rfind/char/1.cc:
5477         Likewise.
5478         * unittests/basic_string_view/operations/rfind/char/2.cc:
5479         Likewise.
5480         * unittests/basic_string_view/operations/rfind/char/3.cc:
5481         Likewise.
5482         * unittests/basic_string_view/operations/substr/char/1.cc:
5483         Likewise.
5484         * unittests/basic_string_view/operators/char/2.cc: Likewise.
5485         * unittests/string_view-selftests.c: New file.
5486
5487 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
5488
5489         * unittests/basic_string_view/capacity/1.cc: New file.
5490         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
5491         * unittests/basic_string_view/cons/char/1.cc: New file.
5492         * unittests/basic_string_view/cons/char/2.cc: New file.
5493         * unittests/basic_string_view/cons/char/3.cc: New file.
5494         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
5495         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
5496         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
5497         * unittests/basic_string_view/element_access/char/1.cc: New file.
5498         * unittests/basic_string_view/element_access/char/2.cc: New file.
5499         * unittests/basic_string_view/element_access/char/empty.cc: New file.
5500         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
5501         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
5502         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
5503         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
5504         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
5505         * unittests/basic_string_view/include.cc: New file.
5506         * unittests/basic_string_view/inserters/char/1.cc: New file.
5507         * unittests/basic_string_view/inserters/char/2.cc: New file.
5508         * unittests/basic_string_view/inserters/char/3.cc: New file.
5509         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
5510         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
5511         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
5512         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
5513         * unittests/basic_string_view/literals/types.cc: New file.
5514         * unittests/basic_string_view/literals/values.cc: New file.
5515         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
5516         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
5517         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
5518         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
5519         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
5520         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
5521         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
5522         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
5523         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
5524         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
5525         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
5526         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
5527         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
5528         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
5529         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
5530         * unittests/basic_string_view/operations/data/char/1.cc: New file.
5531         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
5532         * unittests/basic_string_view/operations/find/char/1.cc: New file.
5533         * unittests/basic_string_view/operations/find/char/2.cc: New file.
5534         * unittests/basic_string_view/operations/find/char/3.cc: New file.
5535         * unittests/basic_string_view/operations/find/char/4.cc: New file.
5536         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
5537         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
5538         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
5539         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
5540         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
5541         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
5542         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
5543         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
5544         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
5545         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
5546         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
5547         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
5548         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
5549         * unittests/basic_string_view/operators/char/2.cc: New file.
5550         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
5551         * unittests/basic_string_view/range_access/char/1.cc: New file.
5552         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
5553         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
5554         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
5555         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
5556         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
5557         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
5558         * unittests/basic_string_view/requirements/typedefs.cc: New file.
5559         * unittests/basic_string_view/typedefs.cc: New file.
5560         * unittests/basic_string_view/types/1.cc: New file.
5561
5562 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
5563
5564         * common/gdb_string_view.h: Remove libstdc++ implementation
5565         details, adjust to gdb reality.
5566         * common/gdb_string_view.tcc: Likewise.
5567         * cli/cli-script.c (struct string_view): Remove.
5568         (user_args) <m_args>: Change element type to gdb::string_view.
5569         (user_args::insert_args): Adjust.
5570
5571 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
5572
5573         * common/gdb_string_view.h: New file.
5574         * common/gdb_string_view.tcc: New file.
5575
5576 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
5577
5578         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
5579         * configure: Re-generate.
5580
5581 2018-04-09  Pedro Alves  <palves@redhat.com>
5582
5583         * gdbarch.sh: Include "observable.h" instead of "observer.h".
5584         (set_target_gdbarch): Call
5585         gdb::observers::architecture_changed.notify instead of
5586         observer_notify_architecture_changed.
5587
5588 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
5589
5590         * tracepoint.c (struct current_traceframe_cleanup): Remove.
5591         (do_restore_current_traceframe_cleanup): Remove.
5592         (restore_current_traceframe_cleanup_dtor): Remove.
5593         (make_cleanup_restore_current_traceframe): Remove.
5594         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
5595         New.
5596         * tracepoint.h (struct scoped_restore_current_traceframe): New.
5597         * infrun.c (fetch_inferior_event): Use
5598         scoped_restore_current_traceframe.
5599
5600 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
5601
5602         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
5603         Remove.
5604         <n_allocated_type_units>: Remove.
5605         <all_type_units>: Change to std::vector.
5606         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5607         to std::vector change.
5608         (dwarf2_per_objfile::get_cutu): Likewise.
5609         (dwarf2_per_objfile::get_tu): Likewise.
5610         (create_signatured_type_table_from_index): Likewise.
5611         (create_signatured_type_table_from_debug_names): Likewise.
5612         (dw2_symtab_iter_next): Likewise.
5613         (dw2_print_stats): Likewise.
5614         (dw2_expand_all_symtabs): Likewise.
5615         (dw2_expand_marked_cus): Likewise.
5616         (dw2_debug_names_iterator::next): Likewise.
5617         (dwarf2_initialize_objfile): Likewise.
5618         (add_signatured_type_cu_to_table): Likewise.
5619         (create_all_type_units): Likewise.
5620         (add_type_unit): Likewise.
5621         (struct tu_abbrev_offset): Add constructor.
5622         (build_type_psymtabs_1): Adjust to std::vector change.
5623         (print_tu_stats): Likewise.
5624         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5625         (write_debug_names): Likewise.
5626
5627 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
5628
5629         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
5630         Make an std::vector.
5631         <n_comp_units>: Remove.
5632         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5633         to std::vector change.
5634         (dwarf2_per_objfile::get_cutu): Likewise.
5635         (dwarf2_per_objfile::get_cu): Likewise.
5636         (create_cus_from_index): Likewise.
5637         (create_addrmap_from_index): Likewise.
5638         (create_addrmap_from_aranges): Likewise.
5639         (dwarf2_read_index): Likewise.
5640         (dw2_find_last_source_symtab): Likewise.
5641         (dw2_map_symtabs_matching_filename): Likewise.
5642         (dw2_symtab_iter_next): Likewise.
5643         (dw2_print_stats): Likewise.
5644         (dw2_expand_all_symtabs): Likewise.
5645         (dw2_expand_symtabs_with_fullname): Likewise.
5646         (dw2_expand_marked_cus): Likewise.
5647         (dw2_map_symbol_filenames): Likewise.
5648         (create_cus_from_debug_names): Likewise.
5649         (dwarf2_read_debug_names): Likewise.
5650         (dw2_debug_names_iterator::next): Likewise.
5651         (dwarf2_initialize_objfile): Likewise.
5652         (set_partial_user): Likewise.
5653         (dwarf2_build_psymtabs_hard): Likewise.
5654         (read_comp_units_from_section): Remove arguments, adjust to
5655         std::vector change.
5656         (create_all_comp_units): Adjust to std::vector and
5657         read_comp_units_from_section changes.
5658         (dwarf2_find_containing_comp_unit): Adjust to std::vector
5659         change.
5660         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5661         (psyms_seen_size): Likewise.
5662         (write_gdbindex): Likewise.
5663         (write_debug_names): Likewise.
5664
5665 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
5666
5667         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
5668         with dwarf2_per_objfile.
5669         (create_cus_from_index): Likewise.
5670         (create_signatured_type_table_from_index): Likewise.
5671         (dwarf2_read_index): Likewise.
5672         (dwarf2_initialize_objfile): Likewise.
5673         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
5674         per_cu rather than get_dwarf2_per_objfile.
5675
5676 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
5677
5678         * dwarf2read.h (struct signatured_type): Forward declare.
5679         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
5680         New methods.
5681         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
5682         (dw2_get_cutu): ...this.
5683         (dwarf2_per_objfile::get_cu): Rename from...
5684         (dw2_get_cu): ...this.
5685         (dwarf2_per_objfile::get_tu): New.
5686         (create_addrmap_from_index): Adjust.
5687         (create_addrmap_from_aranges): Adjust.
5688         (dw2_find_last_source_symtab): Adjust.
5689         (dw2_map_symtabs_matching_filename): Adjust.
5690         (dw2_symtab_iter_next): Adjust.
5691         (dw2_print_stats): Adjust.
5692         (dw2_expand_all_symtabs): Adjust.
5693         (dw2_expand_symtabs_with_fullname): Adjust.
5694         (dw2_expand_marked_cus): Adjust.
5695         (dw_expand_symtabs_matching_file_matcher): Adjust.
5696         (dw2_map_symbol_filenames): Adjust.
5697         (dw2_debug_names_iterator::next): Adjust.
5698         (dwarf2_initialize_objfile): Adjust.
5699         (set_partial_user): Adjust.
5700         (dwarf2_build_psymtabs_hard): Adjust.
5701
5702 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
5703
5704         * dwarf2read.c (create_signatured_type_table_from_debug_names):
5705         Remove unused variables.
5706         (dw2_map_symtabs_matching_filename): Likewise.
5707         (dwarf2_record_block_ranges): Likewise.
5708         (dwarf2_read_addr_index): Likewise.
5709         (follow_die_offset): Likewise.
5710
5711 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
5712
5713         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
5714         to symbol_file_add_main.
5715
5716 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
5717
5718         PR mi/22299
5719         * mi/mi-console.c (do_fputc_async_safe): New.
5720         (mi_console_file::write_async_safe): New.
5721         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
5722         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
5723         New.
5724         * ui-file.c (ui_file::putstrn): Adjust call to
5725         fputstrn_unfiltered.
5726         * utils.c (printchar): Replace do_fputs and do_fprintf
5727         parameters by do_fputc.
5728         (fputstr_filtered): Adjust call to printchar.
5729         (fputstr_unfiltered): Likewise.
5730         (fputstrn_filtered): Likewise.
5731         (fputstrn_unfiltered): Add do_fputc parameter, pass to
5732         printchar.
5733         * utils.h (do_fputc_ftype): New typedef.
5734         (fputstrn_unfiltered): Add do_fputc parameter.
5735
5736 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
5737
5738         * regformats/i386/i386-avx.dat: Remove.
5739
5740 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
5741
5742         PR gdb/22979
5743         * amd64-tdep.c (amd64_none_init_abi): New function.
5744         (amd64_x32_none_init_abi): New function.
5745         (_initialize_amd64_tdep): Register handlers for x86-64 and
5746         x64_32 with GDB_OSABI_NONE.
5747         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
5748         GDB_OSABI_NONE osabi.
5749
5750 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
5751
5752         PR gdb/22980
5753         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
5754         GDB_OSABI_NONE.
5755         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
5756         * osabi.c (gdb_osabi_names): Add "unknown" entry.
5757
5758 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
5759
5760         * common/byte-vector.h (char_vector): New type.
5761         * target.h (target_read_alloc): Return
5762         gdb::optional<byte_vector>.
5763         (target_read_stralloc): Return gdb::optional<char_vector>.
5764         (target_get_osdata): Return gdb::optional<char_vector>.
5765         * target.c (target_read_alloc_1): Templatize.  Replacement
5766         manual memory management with vector.
5767         (target_read_alloc): Change return type, adjust.
5768         (target_read_stralloc): Change return type, adjust.
5769         (target_get_osdata): Change return type, adjust.
5770         * auxv.c (struct auxv_info) <length>: Remove.
5771         <data>: Change type to gdb::optional<byte_vector>.
5772         (auxv_inferior_data_cleanup): Free auxv_info with delete.
5773         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
5774         (target_auxv_search): Adjust.
5775         (fprint_target_auxv): Adjust.
5776         * avr-tdep.c (avr_io_reg_read_command): Adjust.
5777         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
5778         (linux_make_corefile_notes): Adjust.
5779         * osdata.c (get_osdata): Adjust.
5780         * remote.c (remote_get_threads_with_qxfer): Adjust.
5781         (remote_memory_map): Adjust.
5782         (remote_traceframe_info): Adjust.
5783         (btrace_read_config): Adjust.
5784         (remote_read_btrace): Adjust.
5785         (remote_pid_to_exec_file): Adjust.
5786         * solib-aix.c (solib_aix_get_library_list): Adjust.
5787         * solib-dsbt.c (decode_loadmap): Don't free buf.
5788         (dsbt_get_initial_loadmaps): Adjust.
5789         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
5790         * solib-target.c (solib_target_current_sos): Adjust.
5791         * tracepoint.c (sdata_make_value): Adjust.
5792         * xml-support.c (xinclude_start_include): Adjust.
5793         (xml_fetch_content_from_file): Adjust.
5794         * xml-support.h (xml_fetch_another): Change return type.
5795         (xml_fetch_content_from_file): Change return type.
5796         * xml-syscall.c (xml_init_syscalls_info): Adjust.
5797         * xml-tdesc.c (file_read_description_xml): Adjust.
5798         (fetch_available_features_from_target): Change return type.
5799         (target_fetch_description_xml): Adjust.
5800         (target_read_description_xml): Adjust.
5801
5802 2018-04-06  Tom Tromey  <tom@tromey.com>
5803
5804         * value.c (~value): Update.
5805         (struct value) <contents>: Now unique_xmalloc_ptr.
5806         (value_contents_bits_eq, allocate_value_contents)
5807         (value_contents_raw, value_contents_all_raw)
5808         (value_contents_for_printing, value_contents_for_printing_const)
5809         (set_value_enclosing_type): Update.
5810
5811 2018-04-06  Tom Tromey  <tom@tromey.com>
5812
5813         * value.c (range_s): Remove typedef, VEC.
5814         (struct range): Add operator<.
5815         (range_lessthan): Remove.
5816         (ranges_contain): Change type.
5817         (~value): Update.
5818         (struct value) <unavailable, optimized_out>: Now std::vector.
5819         (value_entirely_available)
5820         (value_entirely_covered_by_range_vector)
5821         (value_entirely_unavailable, value_entirely_optimized_out):
5822         Update.
5823         (insert_into_bit_range_vector): Change argument type.
5824         (find_first_range_overlap): Likewise.
5825         (struct ranges_and_idx, value_contents_bits_eq)
5826         (require_not_optimized_out, require_available): Update.
5827         (ranges_copy_adjusted): Change argument types.
5828         (value_optimized_out, value_copy, value_fetch_lazy): Update.
5829
5830 2018-04-06  Tom Tromey  <tom@tromey.com>
5831
5832         * value.c (~value): Update.
5833         (struct value) <parent>: Now a value_ref_ptr.
5834         (value_parent, set_value_parent, value_address, value_copy):
5835         Update.
5836
5837 2018-04-06  Tom Tromey  <tom@tromey.com>
5838
5839         * value.c (struct value): Add constructor, destructor, and member
5840         initializers.
5841         (allocate_value_lazy, value_decref): Update.
5842
5843 2018-04-06  Tom Tromey  <tom@tromey.com>
5844
5845         * value.c (struct value) <released, next>: Remove.
5846         (all_values): Now a std::vector.
5847         (allocate_value_lazy): Update.
5848         (value_next): Remove.
5849         (value_mark, value_free_to_mark, release_value)
5850         (value_release_to_mark): Update.
5851
5852 2018-04-06  Tom Tromey  <tom@tromey.com>
5853
5854         * value.h (fetch_subexp_value, value_release_to_mark): Update.
5855         (free_value_chain): Remove.
5856         * value.c (free_value_chain): Remove.
5857         (value_release_to_mark): Return a std::vector.
5858         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
5859         std::vector.
5860         (check_condition): Update.
5861         * eval.c (fetch_subexp_value): Change "val_chain" to a
5862         std::vector.
5863         * breakpoint.c (update_watchpoint): Update.
5864         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
5865
5866 2018-04-06  Tom Tromey  <tom@tromey.com>
5867
5868         * value.h (free_all_values): Remove.
5869         * value.c (free_all_values): Remove.
5870
5871 2018-04-06  Tom Tromey  <tom@tromey.com>
5872
5873         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
5874         (value_history_chain, value_history_count): Remove.
5875         (value_history): New global.
5876         (record_latest_value, access_value_history, show_values)
5877         (preserve_values): Update.
5878
5879 2018-04-06  Tom Tromey  <tom@tromey.com>
5880
5881         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
5882         * varobj.c (varobj_set_display_format, varobj_set_value)
5883         (install_default_visualizer, construct_visualizer)
5884         (install_new_value, ~varobj, varobj_get_value_type)
5885         (my_value_of_variable, varobj_editable_p): Update.
5886         * c-varobj.c (c_describe_child, c_value_of_variable)
5887         (cplus_number_of_children, cplus_describe_child): Update.
5888         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
5889         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
5890         (ada_value_of_variable, ada_value_is_changeable_p): Update.
5891
5892 2018-04-06  Tom Tromey  <tom@tromey.com>
5893
5894         * printcmd.c (last_examine_address): Change type to
5895         value_ref_ptr.
5896         (do_examine, x_command): Update.
5897
5898 2018-04-06  Tom Tromey  <tom@tromey.com>
5899
5900         * value.c (release_value): Update.
5901         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
5902         (struct bpstats) <val>: Now a value_ref_ptr.
5903         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5904         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5905         (~watchpoint, print_it_watchpoint, watch_command_1)
5906         (invalidate_bp_value_on_memory_change): Update.
5907
5908 2018-04-06  Tom Tromey  <tom@tromey.com>
5909
5910         * varobj.c (varobj_clear_saved_item)
5911         (update_dynamic_varobj_children, install_new_value, ~varobj):
5912         Update.
5913         * value.h (value_incref): Move declaration earlier.
5914         (value_decref): Rename from value_free.
5915         (struct value_ref_policy): New.
5916         (value_ref_ptr): New typedef.
5917         (struct value_deleter): Remove.
5918         (gdb_value_up): Remove typedef.
5919         (release_value): Change return type.
5920         (release_value_or_incref): Remove.
5921         * value.c (set_value_parent): Update.
5922         (value_incref): Change return type.
5923         (value_decref): Rename from value_free.
5924         (value_free_to_mark, free_all_values, free_value_chain): Update.
5925         (release_value): Return value_ref_ptr.
5926         (release_value_or_incref): Remove.
5927         (record_latest_value, set_internalvar, clear_internalvar):
5928         Update.
5929         * stack.c (info_frame_command): Don't call value_free.
5930         * python/py-value.c (valpy_dealloc, valpy_new)
5931         (value_to_value_object): Update.
5932         * printcmd.c (do_examine): Update.
5933         * opencl-lang.c (lval_func_free_closure): Update.
5934         * mi/mi-main.c (register_changed_p): Don't call value_free.
5935         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
5936         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
5937         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
5938         value_free.
5939         * guile/scm-value.c (vlscm_free_value_smob)
5940         (vlscm_scm_from_value): Update.
5941         * frame.c (frame_register_unwind, frame_unwind_register_signed)
5942         (frame_unwind_register_unsigned, get_frame_register_bytes)
5943         (put_frame_register_bytes): Don't call value_free.
5944         * findvar.c (address_from_register): Don't call value_free.
5945         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
5946         * dwarf2loc.c (entry_data_value_free_closure)
5947         (value_of_dwarf_reg_entry, free_pieced_value_closure)
5948         (dwarf2_evaluate_loc_desc_full): Update.
5949         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5950         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5951         (~watchpoint, watch_command_1)
5952         (invalidate_bp_value_on_memory_change): Update.
5953         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
5954
5955 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
5956
5957         PR gdb/23022
5958         * warning.m4: Add -Wno-error=deprecated-register.
5959         * configure: Re-generate.
5960
5961 2018-04-05  Tom Tromey  <tom@tromey.com>
5962
5963         * linespec.h: Remove include of "vec.h".
5964
5965 2018-04-05  Tom Tromey  <tom@tromey.com>
5966
5967         * linespec.c (typep): Remove typedef.
5968         (find_methods, find_superclass_methods): Take a std::vector.
5969         (find_method): Use std::vector.
5970
5971 2018-04-05  Tom Tromey  <tom@tromey.com>
5972
5973         * utils.c (compare_strings): Remove.
5974         * utils.h (compare_strings): Remove.
5975         * objc-lang.h (find_imps): Update.
5976         * objc-lang.c (find_methods): Take a std::vector.
5977         (uniquify_strings, find_imps): Likewise.
5978         * linespec.c (find_methods): Take a std::vector.
5979         (decode_objc): Use std::vector.
5980         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
5981         a std::vector.
5982         (find_method, find_function_symbols): Use std::vector.
5983
5984 2018-04-05  Tom Tromey  <tom@tromey.com>
5985
5986         * completer.c (completion_tracker::completion_tracker): Remove
5987         cast.
5988         (completion_tracker::discard_completions): Likewise.
5989         * breakpoint.c (ambiguous_names_p): Remove cast.
5990         * ada-lang.c (_initialize_ada_language): Remove cast.
5991         * utils.h (streq): Update.
5992         (streq_hash): Add new declaration.
5993         * utils.c (streq): Return bool.
5994         (streq_hash): New function.
5995
5996 2018-04-05  Tom Tromey  <tom@tromey.com>
5997
5998         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
5999         Remove a string copy.
6000
6001 2018-04-05  Tom Tromey  <tom@tromey.com>
6002
6003         * linespec.c (filter_results): Use std::vector.
6004         (decode_line_2, decode_line_full): Update.
6005
6006 2018-04-05  Tom Tromey  <tom@tromey.com>
6007
6008         * linespec.c (canonical_to_fullform): Return std::string.
6009         (filter_results): Update.
6010         (struct decode_line_2_item): Add constructor.
6011         <fullform, displayform>: Now std::string.
6012         (decode_line_2_compare_items): Now a std::sort comparator.
6013         (decode_line_2): Update.
6014
6015 2018-04-05  Tom Tromey  <tom@tromey.com>
6016
6017         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6018         (unexpected_linespec_error): Update.
6019         (linespec_parse_basic, parse_linespec): Update.
6020
6021 2018-04-05  Tom Tromey  <tom@tromey.com>
6022
6023         * linespec.c (linespec_parse_basic): Reindent.
6024
6025 2018-04-05  Tom Tromey  <tom@tromey.com>
6026
6027         * minsyms.h (iterate_over_minimal_symbols): Update.
6028         * minsyms.c (iterate_over_minimal_symbols): Take a
6029         gdb::function_view.
6030         * linespec.c (struct collect_minsyms): Remove.
6031         (compare_msyms): Now a std::sort comparator.
6032         (add_minsym): Add parameters.
6033         (search_minsyms_for_name): Update.  Use std::vector.
6034
6035 2018-04-03  Tom Tromey  <tom@tromey.com>
6036
6037         * mipsread.c (read_alphacoff_dynamic_symtab): Use
6038         gdb::byte_vector.
6039
6040 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
6041
6042         * MAINTAINERS (Write After Approval): Add Weimin Pan.
6043
6044 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
6045
6046         PR gdb/16959
6047         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
6048         printing static type.
6049
6050 2018-04-01  Tom Tromey  <tom@tromey.com>
6051
6052         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6053         (rs6000_xfer_shared_libraries): Update.
6054
6055 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
6056
6057         * common/gdb_vecs.h (char_ptr): Remove.
6058         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6059
6060 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
6061
6062         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6063         with std::vector.
6064         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6065
6066 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
6067
6068         * tracepoint.h (struct uploaded_tp): Initialize fields.
6069         <actions, step_actions, cmd_strings>: Change type to
6070         std::vector<char *>.
6071         * tracepoint.c (get_uploaded_tp): Allocate with new.
6072         (free_uploaded_tps): Free with delete.
6073         (parse_tracepoint_definition): Adjust to std::vector change.
6074         * breakpoint.c (read_uploaded_action): Likewise.
6075         (create_tracepoint_from_upload): Likewise.
6076         * ctf.c (ctf_write_uploaded_tp): Likewise.
6077         (SET_ARRAY_FIELD): Likewise.
6078         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6079
6080 2018-03-30  Tom Tromey  <tom@tromey.com>
6081
6082         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
6083         std::unique_ptr.
6084         (svr4_keep_data_in_core): Update.
6085         (svr4_read_so_list): Update.
6086
6087 2018-03-30  Tom Tromey  <tom@tromey.com>
6088
6089         * windows-nat.c (handle_output_debug_string, handle_exception):
6090         Update.
6091         * target.h (target_read_string): Update.
6092         * target.c (target_read_string): Change "string" to
6093         unique_xmalloc_ptr.
6094         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6095         Update.
6096         * solib-frv.c (frv_current_sos): Update.
6097         * solib-dsbt.c (dsbt_current_sos): Update.
6098         * solib-darwin.c (darwin_current_sos): Update.
6099         * linux-thread-db.c (inferior_has_bug): Update.
6100         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6101         Update.  Remove alloca.
6102         * ada-lang.c (ada_main_name): Update.
6103
6104 2018-03-30  Tom Tromey  <tom@tromey.com>
6105
6106         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6107         (struct dwo_file_deleter): New.
6108         (dwo_file_up): New typedef.
6109         (open_and_init_dwo_file): Use dwo_file_up.
6110         (free_dwo_file_cleanup): Remove.
6111
6112 2018-03-30  Tom Tromey  <tom@tromey.com>
6113
6114         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6115         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6116
6117 2018-03-30  Tom Tromey  <tom@tromey.com>
6118
6119         * dwarf2read.c (class free_cached_comp_units): New class.
6120         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6121         (free_cached_comp_units): Remove function.
6122
6123 2018-03-30  Tom Tromey  <tom@tromey.com>
6124
6125         * utils.h (make_cleanup_unpush_target): Remove.
6126         * inf-ptrace.c (struct target_unpusher): New.
6127         (target_unpush_up) New typedef.
6128         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6129         target_unpush_up.
6130         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6131
6132 2018-03-27  Tom Tromey  <tom@tromey.com>
6133
6134         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6135
6136 2018-03-27  Pedro Alves  <palves@redhat.com>
6137             Tom Tromey  <tom@tromey.com>
6138
6139         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6140         destructor.  Now a class.
6141         (gdb_readline_wrapper_cleanup): Remove function.
6142         (gdb_readline_wrapper): Remove cleanups.
6143
6144 2018-03-27  Tom Tromey  <tom@tromey.com>
6145
6146         * typeprint.h (struct type_print_options) <local_typedefs,
6147         global_typedefs>: Remove "struct" keyword.
6148         (class typedef_hash_table): New class.
6149         (recursively_update_typedef_hash, add_template_parameters)
6150         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6151         (find_typedef_in_hash): Don't declare.
6152         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6153         (typedef_hash_table::recursively_update): Rename from
6154         recursively_update_typedef_hash.  Now a member.
6155         (typedef_hash_table::add_template_parameters): Rename from
6156         add_template_parameters.  Now a member.
6157         (typedef_hash_table::typedef_hash_table): Now a constructor;
6158         rename from create_typedef_hash.
6159         (typedef_hash_table::~typedef_hash_table): Now a destructor;
6160         rename from free_typedef_hash.
6161         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6162         (do_free_global_table): Remove.
6163         (typedef_hash_table::typedef_hash_table): New constructor; renamed
6164         from copy_type_recursive.
6165         (create_global_typedef_table): Remove.
6166         (typedef_hash_table::find_global_typedef): Now a member of
6167         typedef_hash_table.
6168         (typedef_hash_table::find_typedef): Rename from
6169         find_typedef_in_hash; now a member.
6170         (whatis_exp): Update.
6171         * extension.h (struct ext_lang_type_printers): Add constructor and
6172         destructor.
6173         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6174         declare.
6175         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6176         Now a constructor; rename from start_ext_lang_type_printers.
6177         (ext_lang_type_printers): Now a destructor; rename from
6178         free_ext_lang_type_printers.
6179         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6180         Update.
6181         (c_type_print_base_struct_union): Update.  Remove cleanups.
6182
6183 2018-03-27  Tom Tromey  <tom@tromey.com>
6184
6185         * dwarf-index-write.c: Include <cmath>.
6186
6187 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
6188
6189         * NEWS: Add entry describing new "set|show varsize-limit" command.
6190         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6191         command.
6192         * printcmd.c (_initialize_printcmd): Add "set var" alias of
6193         "set variable".
6194
6195 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
6196
6197         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6198         dwarf-index-write.c
6199         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6200         * dwarf-index-common.c: New file.
6201         * dwarf-index-common.h: New file.
6202         * dwarf-index-write.c: New file.
6203         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6204         (struct dwarf2_section_info): Move from here.
6205         (dwarf2_section_info_def): Likewise.
6206         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6207         (offset_type): Likewise.
6208         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6209         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6210         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6211         (byte_swap): Likewise.
6212         (MAYBE_SWAP): Likewise.
6213         (dwarf2_per_cu_ptr): Likewise.
6214         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6215         (struct tu_stats): Likewise.
6216         (struct dwarf2_per_objfile): Likewise.
6217         (struct dwarf2_per_cu_data): Likewise.
6218         (struct signatured_type): Likewise.
6219         (sig_type_ptr): Likewise.
6220         (DEF_VEC_P (sig_type_ptr)): Likewise.
6221         (INDEX4_SUFFIX): Likewise.
6222         (INDEX5_SUFFIX): Likewise.
6223         (DEBUG_STR_SUFFIX): Likewise.
6224         (dwarf2_read_section): Make non-static.
6225         (mapped_index_string_hash): Move from here.
6226         (dwarf5_djb_hash): Likewise.
6227         (file_write): Likewise.
6228         (class data_buf): Likewise.
6229         (struct symtab_index_entry): Likewise.
6230         (struct mapped_symtab): Likewise.
6231         (find_slot): Likewise.
6232         (hash_expand): Likewise.
6233         (add_index_entry): Likewise.
6234         (uniquify_cu_indices): Likewise.
6235         (class c_str_view): Likewise.
6236         (class c_str_view_hasher): Likewise.
6237         (class vector_hasher): Likewise.
6238         (write_hash_table): Likewise.
6239         (psym_index_map): Likewise.
6240         (struct addrmap_index_data): Likewise.
6241         (add_address_entry): Likewise.
6242         (add_address_entry_worker): Likewise.
6243         (write_address_map): Likewise.
6244         (symbol_kind): Likewise.
6245         (write_psymbols): Likewise.
6246         (struct signatured_type_index_data): Likewise.
6247         (write_one_signatured_type): Likewise.
6248         (recursively_count_psymbols): Likewise.
6249         (recursively_write_psymbols): Likewise.
6250         (class debug_names): Likewise.
6251         (check_dwarf64_offsets): Likewise.
6252         (psyms_seen_size): Likewise.
6253         (write_gdbindex): Likewise.
6254         (write_debug_names): Likewise.
6255         (assert_file_size): Likewise.
6256         (write_psymtabs_to_index): Likewise.
6257         (save_gdb_index_command): Likewise.
6258         (_initialize_dwarf2_read): Don't register the "save gdb-index"
6259         command.
6260         * dwarf2read.h: New file.
6261
6262 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
6263
6264         PR gdb/22670
6265         * dwarf2read.c (dwarf2_physname): Do not return the demangled
6266         symbol name if the CU's language stores symbol names in linkage
6267         format.
6268         * language.h (struct language_defn)
6269         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
6270         all instances of this struct.
6271
6272 2018-03-26  Tom Tromey  <tom@tromey.com>
6273
6274         * stack.c (backtrace_command_1): Remove verbose code.
6275
6276 2018-03-26  Tom Tromey  <tom@tromey.com>
6277
6278         * python/py-framefilter.c (py_print_type): Don't catch
6279         exceptions.  Return void.
6280         (py_print_value): Likewise.
6281         (py_print_single_arg): Likewise.
6282         (enumerate_args): Don't catch exceptions.
6283         (py_print_args): Likewise.
6284         (py_print_frame): Likewise.
6285         (gdbpy_apply_frame_filter): Catch exceptions here.
6286
6287 2018-03-26  Tom Tromey  <tom@tromey.com>
6288
6289         * stack.c (_initialize_stack): Remove trailing newlines from help
6290         text.  Add "Usage" line to "backtrace" help.
6291
6292 2018-03-26  Tom Tromey  <tom@tromey.com>
6293
6294         PR python/16486:
6295         * python/py-framefilter.c (py_print_args): Call wrap_hint.
6296
6297 2018-03-26  Tom Tromey  <tom@tromey.com>
6298
6299         * python/py-framefilter.c (py_print_single_arg): Return
6300         EXT_LANG_BT_ERROR from catch.
6301
6302 2018-03-26  Tom Tromey  <tom@tromey.com>
6303
6304         PR backtrace/15584:
6305         * stack.c (backtrace_command_1): Move some code into no-filters
6306         "if".
6307
6308 2018-03-26  Tom Tromey  <tom@tromey.com>
6309
6310         * python/py-framefilter.c (throw_quit_or_print_exception): New
6311         function.
6312         (gdbpy_apply_frame_filter): Use it.
6313
6314 2018-03-26  Tom Tromey  <tom@tromey.com>
6315
6316         PR cli/17716:
6317         * python/py-framefilter.c (py_print_type, py_print_value)
6318         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6319         RETURN_MASK_ERROR.
6320
6321 2018-03-26  Tom Tromey  <tom@tromey.com>
6322
6323         * python/py-framefilter.c (enumerate_args): Use
6324         gdb::unique_xmalloc_ptr.
6325
6326 2018-03-26  Tom Tromey  <tom@tromey.com>
6327
6328         * python/py-framefilter.c (py_print_frame): Return
6329         EXT_LANG_BT_OK.
6330         (gdbpy_apply_frame_filter): Update comment.
6331         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6332         Remove.
6333         <EXT_LANG_BT_NO_FILTERS>: Change value.
6334
6335 2018-03-26  Tom Tromey  <tom@tromey.com>
6336
6337         PR backtrace/15582:
6338         * stack.c (backtrace_command): Parse "hide" argument.
6339         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6340         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6341         constant.
6342
6343 2018-03-26  Tom Tromey  <tom@tromey.com>
6344
6345         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6346         add "flags".
6347         (backtrace_command): Remove "fulltrace", add "flags".
6348
6349 2018-03-26  Tom Tromey  <tom@tromey.com>
6350
6351         * stack.c (backtrace_command): Rewrite command line parsing.
6352
6353 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
6354
6355         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6356
6357 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
6358
6359         * filename-seen-cache.h: Add include guard.
6360
6361 2018-03-26  Keith Seitz  <keiths@redhat.com>
6362
6363         * symfile.c (place_section): Remove "struct" from section_addr_info
6364         in comment.
6365         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6366         "struct" keyword from section_addr_info.
6367
6368 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
6369
6370         * regformats/regdef.h (reg): Add constructors.
6371
6372 2018-03-25  Pedro Alves  <palves@redhat.com>
6373
6374         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6375         if then/else bodies in var_func_name extraction.
6376
6377 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
6378
6379         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6380         lookup_minimal_symbol() to find symbol entry.
6381         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6382
6383 2018-03-23  Keith Seitz  <keiths@redhat.com>
6384
6385         PR c++/22968
6386         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6387         nested type definitions for C++, too.
6388
6389 2018-03-23  Tom Tromey  <tom@tromey.com>
6390
6391         * machoread.c (struct oso_el): Add a constructor.  Don't define as
6392         a typedef.
6393         (macho_register_oso): Remove.
6394         (macho_symtab_read): Take a std::vector.
6395         (oso_el_compare_name): Now a std::sort comparator.
6396         (macho_symfile_read_all_oso): Take a std::vector.
6397         (macho_symfile_read): Use std::vector.  Remove cleanups.
6398
6399 2018-03-22  Tom Tromey  <tom@tromey.com>
6400
6401         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6402         (record_full_goto_bookmark): Use std::string.
6403
6404 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6405
6406         PR tdep/18295
6407         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6408         a single mask.
6409
6410 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6411
6412         * rs6000-tdep.c (store_insn_p): New function.
6413         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6414         and cr_reg to their unshifted values. Use store_insn_p to
6415         match LR saves using either R1 or fdata->alloca_reg. Use
6416         store_insn_p to match CR saves. Set alloca_reg_offset
6417         when alloca_reg and framep are set. Remove lr_reg shift
6418         when assigning to fdata->lr_register.
6419
6420 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6421
6422         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6423         command line args instead of emitting a warning.
6424
6425 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
6426
6427         * tracepoint.h (struct static_tracepoint_marker): Initialize
6428         fields, define default constructor, move constructor and move
6429         assignment, disable the rest.
6430         <str_id, extra>: Make std::string.
6431         (release_static_tracepoint_marker): Remove.
6432         (free_current_marker): Remove.
6433         * tracepoint.c (free_current_marker): Remove.
6434         (parse_static_tracepoint_marker_definition): Adjust to
6435         std::string, use new hex2str overload.
6436         (release_static_tracepoint_marker): Remove.
6437         (print_one_static_tracepoint_marker): Get marker by reference
6438         and adjust to std::string.
6439         (info_static_tracepoint_markers_command): Adjust to std::vector
6440         changes
6441         * target.h (static_tracepoint_marker_p): Remove typedef.
6442         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6443         (struct target_ops) <to_static_tracepoint_marker_at>: Return
6444         bool.
6445         <to_static_tracepoint_markers_by_strid>: Return std::vector.
6446         * target-debug.h
6447         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6448         (target_debug_print_std_vector_static_tracepoint_marker): New.
6449         (target_debug_print_struct_static_tracepoint_marker_p): Rename
6450         to...
6451         (target_debug_print_static_tracepoint_marker_p): ... this.
6452         * target-delegates.c: Re-generate.
6453         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6454         Make std::string.
6455         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6456         (decode_static_tracepoint_spec): Adjust to std::vector.
6457         (tracepoint_print_one_detail): Adjust to std::string.
6458         (strace_marker_decode_location): Adjust to std::string.
6459         (update_static_tracepoint): Adjust to std::string, remove call
6460         to release_static_tracepoint_marker.
6461         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6462         Adjust to std::vector.
6463         * remote.c (remote_static_tracepoint_marker_at): Return bool.
6464         (remote_static_tracepoint_markers_by_strid): Adjust to
6465         std::vector.
6466         * common/rsp-low.h (hex2str): New overload with explicit count
6467         of bytes.
6468         * common/rsp-low.c (hex2str): New overload with explicit count
6469         of bytes.
6470         * unittests/rsp-low-selftests.c (test_hex2str): New function.
6471         (_initialize_rsp_low_selftests): Add test_hex2str test.
6472         * unittests/tracepoint-selftests.c
6473         (test_parse_static_tracepoint_marker_definition): Adjust to
6474         std::string.
6475
6476 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
6477
6478         * tracepoint.c (parse_static_tracepoint_marker_definition):
6479         Consider case where the definition is followed by more
6480         definitions.
6481         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6482         tracepoint-selftests.c.
6483         * unittests/tracepoint-selftests.c: New.
6484
6485 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6486
6487         * MAINTAINERS (Write After Approval): Add Pedro Franco de
6488         Carvalho.
6489
6490 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
6491
6492         * symtab.c (find_pc_sect_line): fixed indentation.
6493
6494 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
6495
6496         * symtab.c (find_pc_sect_line): now uses binary search.
6497
6498 2018-03-19  Tom Tromey  <tom@tromey.com>
6499
6500         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
6501         "IDENT" production.
6502
6503 2018-03-19  Pedro Alves  <palves@redhat.com>
6504             Tom Tromey  <tom@tromey.com>
6505
6506         * unittests/observable-selftests.c: New file.
6507         * common/observable.h: New file.
6508         * observable.h: New file.
6509         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
6510         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
6511         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
6512         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
6513         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
6514         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
6515         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
6516         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
6517         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
6518         python/py-breakpoint.c, python/py-finishbreakpoint.c,
6519         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
6520         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
6521         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
6522         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
6523         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
6524         tui/tui-interp.c, valops.c: Update all users.
6525         * tui/tui-hooks.c (tui_bp_created_observer)
6526         (tui_bp_deleted_observer, tui_bp_modified_observer)
6527         (tui_inferior_exit_observer, tui_before_prompt_observer)
6528         (tui_normal_stop_observer, tui_register_changed_observer):
6529         Remove.
6530         (tui_observers_token): New global.
6531         (attach_or_detach, tui_attach_detach_observers): New functions.
6532         (tui_install_hooks, tui_remove_hooks): Use
6533         tui_attach_detach_observers.
6534         * record-btrace.c (record_btrace_thread_observer): Remove.
6535         (record_btrace_thread_observer_token): New global.
6536         * observer.sh: Remove.
6537         * observer.c: Rename to observable.c.
6538         * observable.c (namespace gdb_observers): Define new objects.
6539         (observer_debug): Move into gdb_observers namespace.
6540         (struct observer, struct observer_list, xalloc_observer_list_node)
6541         (xfree_observer_list_node, generic_observer_attach)
6542         (generic_observer_detach, generic_observer_notify): Remove.
6543         (_initialize_observer): Update.
6544         Don't include observer.inc.
6545         * Makefile.in (generated_files): Remove observer.h, observer.inc.
6546         (clean mostlyclean): Likewise.
6547         (observer.h, observer.inc): Remove targets.
6548         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
6549         (COMMON_SFILES): Use observable.c, not observer.c.
6550         * .gitignore: Remove observer.h.
6551
6552 2018-03-18  Tom Tromey  <tom@tromey.com>
6553
6554         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
6555         gdb::def_vector.
6556         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
6557
6558 2018-03-17  Tom Tromey  <tom@tromey.com>
6559
6560         * auto-load.c (auto_load_objfile_script_1): Use std::string.
6561
6562 2018-03-17  Tom Tromey  <tom@tromey.com>
6563
6564         * target.c (class scoped_target_fd): New.
6565         (target_fileio_close_cleanup): Remove.
6566         (target_fileio_read_alloc_1): Use scoped_target_fd.
6567
6568 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
6569
6570         * silent-rules.mk: New.
6571         * Makefile.in: Include silent-rules.mk
6572         (srcdir, VPATH, top_srcdir): Move up.
6573         (COMPILE): Add ECHO_CXX.
6574         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
6575         (init.c): Add ECHO_INIT_C.
6576         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6577         (version.c): Add ECHO_GEN.
6578         (printcmd.o): Add ECHO_CXX.
6579         (target-float.o): Add ECHO_CXX.
6580         (ada-exp.o): Add ECHO_CXX.
6581         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
6582         (insight$(EXEEXT)): Add ECHO_CXXLD.
6583         * gnulib/configure.ac: Add AM_SILENT_RULES.
6584         * gnulib/aclocal.m4: Re-generate.
6585         * gnulib/configure: Re-generate.
6586         * gnulib/import/Makefile.in: Re-generate.
6587
6588 2018-03-16  Tom Tromey  <tom@tromey.com>
6589
6590         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
6591         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
6592         * utils.c (do_free_section_addr_info)
6593         (make_cleanup_free_section_addr_info): Remove.
6594         * symfile.h (struct other_sections): Add constructor.
6595         (struct section_addr_info): Remove.
6596         (section_addr_info): New typedef.
6597         (struct sym_fns) <sym_offsets>: Change type of parameter.
6598         (build_section_addr_info_from_objfile)
6599         (relative_addr_info_to_section_offsets, addr_info_make_relative)
6600         (default_symfile_offsets, symbol_file_add)
6601         (symbol_file_add_from_bfd)
6602         (build_section_addr_info_from_section_table): Update.
6603         (alloc_section_addr_info, free_section_addr_info): Don't declare.
6604         * symfile.c (alloc_section_addr_info): Remove.
6605         (build_section_addr_info_from_section_table): Change return type.
6606         Update.
6607         (build_section_addr_info_from_bfd)
6608         (build_section_addr_info_from_objfile): Likewise.
6609         (free_section_addr_info): Remove.
6610         (relative_addr_info_to_section_offsets): Change type of "addrs".
6611         (addrs_section_compar): Now a std::sort comparator.
6612         (addrs_section_sort): Change return type.
6613         (addr_info_make_relative): Change type of "addrs".  Update.
6614         (default_symfile_offsets, syms_from_objfile_1)
6615         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
6616         (symbol_file_add_separate): Update.
6617         (symbol_file_add): Change type of "addrs".  Update.
6618         (add_symbol_file_command): Update.  Remove cleanups.
6619         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
6620         cleanups.
6621         * symfile-debug.c (debug_sym_offsets): Change type of "info".
6622         * solib.c (solib_read_symbols): Update.
6623         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
6624         * machoread.c (macho_symfile_offsets): Update.
6625         * jit.c (jit_bfd_try_read_symtab): Update.
6626
6627 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
6628
6629         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6630         unittests/utils-selftests.c.
6631         * unittests/utils-selftests.c: New file.
6632
6633 2018-03-14  Tom Tromey  <tom@tromey.com>
6634
6635         PR cli/14977:
6636         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
6637         for NULL.
6638
6639 2018-03-14  Tom Tromey  <tom@tromey.com>
6640
6641         PR cli/19918:
6642         * printcmd.c (printf_pointer): Allow "-" in format.
6643
6644 2018-03-14  Tom Tromey  <tom@tromey.com>
6645
6646         * printcmd.c (_initialize_printcmd): Add usage to printf.
6647
6648 2018-03-14  Yao Qi  <qiyao@sourceware.org>
6649
6650         * MAINTAINERS: Update my email address.
6651
6652 2018-03-13  Tom Tromey  <tom@tromey.com>
6653
6654         * machoread.c (macho_check_dsym): Change filenamep to a
6655         std::string*.
6656         (macho_symfile_read): Update.
6657         * symfile.c (load_command): Use std::string.
6658
6659 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6660
6661         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
6662         to error message string.
6663         (riscv_register_name): Use xsnprintf instead of sprintf.
6664         (riscv_insn::fetch_instruction): Use gdb_assert instead of
6665         internal_error.
6666         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
6667         error.
6668         (riscv_push_dummy_call): Likewise.
6669
6670 2018-03-12  Tom Tromey  <tom@tromey.com>
6671
6672         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
6673         Use gdb::byte_vector.
6674         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
6675
6676 2018-03-12  Yao Qi  <yao.qi@linaro.org>
6677
6678         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
6679         parameter type to readable_regcache.
6680         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
6681         the declaration.
6682
6683 2018-03-11  Tom Tromey  <tom@tromey.com>
6684
6685         * dwarf2read.c (struct nextfield): Add initializers.
6686         (struct nextfnfield): Remove.
6687         (struct fnfieldlist): Add initializers.  Remove "length" and
6688         "head", use std::vector.
6689         (struct decl_field_list): Remove.
6690         (struct field_info): Add initializers.
6691         <fields, baseclasses>: Now std::vector.
6692         <nbaseclasses, nfnfields, typedef_field_list_count,
6693         nested_types_list_count>: Remove.
6694         (dwarf2_add_field, dwarf2_add_type_defn)
6695         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
6696         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
6697         (process_structure_scope): Update.
6698
6699 2018-03-11  Tom Tromey  <tom@tromey.com>
6700
6701         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
6702         for use by std::sort.
6703         (build_type_psymtabs_1): Use std::vector.
6704
6705 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
6706
6707         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
6708         and LIBMPFR in the printed configuration.
6709
6710 2018-03-08  Tom Tromey  <tom@tromey.com>
6711
6712         * source.c (get_filename_and_charpos): Use scoped_fd.
6713         * nto-procfs.c (procfs_open_1): Use scoped_fd.
6714         (procfs_pidlist): Likewise.
6715         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
6716         (iterate_over_mappings): Likewise.
6717
6718 2018-03-08  Tom Tromey  <tom@tromey.com>
6719
6720         * infcall.c (struct call_return_meta_info)
6721         <stack_temporaries_enabled>: Remove.
6722         (get_call_return_value, call_function_by_hand_dummy): Update.
6723         * thread.c (disable_thread_stack_temporaries): Remove.
6724         (enable_thread_stack_temporaries): Remove.
6725         (thread_stack_temporaries_enabled_p): Return bool.
6726         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
6727         (get_last_thread_stack_temporary): Update.
6728         * eval.c (evaluate_subexp): Update.
6729         * gdbthread.h (class enable_thread_stack_temporaries): Now a
6730         class, not a function.
6731         (value_ptr, value_vec): Remove typedefs.
6732         (class thread_info) <stack_temporaries_enabled>: Now bool.
6733         <stack_temporaries>: Now a std::vector.
6734         (thread_stack_temporaries_enabled_p)
6735         (value_in_thread_stack_temporaries): Return bool.
6736
6737 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
6738
6739         * remote.c (putpkt_binary): Fix omitted bytes reporting.
6740         (getpkt_or_notif_sane_1): Likewise.
6741
6742 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
6743
6744         * build-id.c (build_id_to_debug_bfd): Use std::string.
6745
6746 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
6747
6748         * build-id.c (find_separate_debug_file_by_buildid): Return
6749         std::string.
6750         * build-id.h (find_separate_debug_file_by_buildid): Return
6751         std::string.
6752         * coffread.c (coff_symfile_read): Adjust to std::string.
6753         * elfread.c (elf_symfile_read): Adjust to std::string.
6754         * symfile.c (separate_debug_file_exists): Change parameter to
6755         std::string.
6756         (find_separate_debug_file): Return std::string.
6757         (find_separate_debug_file_by_debuglink): Return std::string.
6758         * symfile.h (find_separate_debug_file_by_debuglink): Return
6759         std::string.
6760
6761 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
6762
6763         * common/xml-utils.c (xml_escape_text): Move code to...
6764         (xml_escape_text_append): ... this new function.
6765         * common/xml-utils.h (xml_escape_text_append): New declaration.
6766         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
6767         New function.
6768         (_initialize_xml_utils): register test_xml_escape_text_append as
6769         a selftest.
6770
6771 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
6772
6773         * defs.h: Remove MAX_REGISTER_SIZE.
6774         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
6775         asserts.
6776         * python/py-unwind.c (pyuw_sniffer): Likewise.
6777
6778 2018-03-07  Tom Tromey  <tom@tromey.com>
6779
6780         * linux-tdep.c (linux_info_proc): Update.
6781         * target.h (struct target_ops) <to_fileio_readlink>: Return
6782         optional<string>.
6783         (target_fileio_readlink): Return optional<string>.
6784         * remote.c (remote_hostio_readlink): Return optional<string>.
6785         * inf-child.c (inf_child_fileio_readlink): Return
6786         optional<string>.
6787         * target.c (target_fileio_readlink): Return optional<string>.
6788
6789 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
6790
6791         * regcache.c (cooked_read_test): Add riscv to the list of
6792         architectures that have a save_reggroup.
6793
6794 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6795
6796         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
6797         value is not a dynamic class object.
6798
6799 2018-03-06  Tom Tromey  <tom@tromey.com>
6800
6801         * rust-exp.y: Formatting fixes.
6802
6803 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
6804
6805         * riscv-tdep.c (riscv_register_name): Remove target description
6806         support.
6807         (riscv_gdbarch_init): Remove target description check.
6808
6809 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
6810
6811         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
6812         comment.
6813         * riscv-tdep.h: Likewise.
6814
6815 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
6816
6817         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
6818         (riscv_pseudo_register_write): Delete.
6819         (riscv_gdbarch_init): Remove all use of pseudo registers.
6820
6821 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
6822
6823         * record-btrace.c (btrace_print_lines): Replace cleanup
6824         parameter with RAII equivalents.
6825         (btrace_insn_history): Replace cleanup with RAII equivalents.
6826         * ui-out.h (make_cleanup_ui_out_list_begin_end,
6827         make_cleanup_ui_out_tuple_begin_end): Remove.
6828         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
6829         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
6830         make_cleanup_ui_out_list_begin_end): Remove.
6831
6832 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
6833
6834         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
6835         parameter types to std::vector.  Use bool.
6836         (record_btrace_wait): Replace VEC(tp_t) with
6837         std::vector<thread_info *>.
6838         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
6839
6840 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
6841
6842         * record-btrace.c (record_btrace_disable_callback): Remove.
6843         (struct scoped_btrace_disable): New.
6844         (record_btrace_open): Use scoped_btrace_disable.
6845
6846 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
6847
6848         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
6849         reading values from registers.
6850
6851 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
6852
6853         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
6854         where appropriate.
6855
6856 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
6857
6858         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
6859         change parameter type.  Use GDB's print functions, and use
6860         core_addr_to_string where appropriate.
6861         (riscv_push_dummy_call): Use core_addr_to_string where
6862         appropriate, update call to riscv_print_arg_location, and reindent
6863         a few lines.
6864         (riscv_return_value): Update call to riscv_print_arg_location.
6865
6866 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
6867             Tim Newsome <tim@sifive.com>
6868             Albert Ou <a0u@eecs.berkeley.edu>
6869             Darius Rad <darius@bluespec.com>
6870
6871         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
6872         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
6873         (ALLDEPFILES): Add riscv-tdep.c
6874         * configure.tgt: Add riscv support.
6875         * riscv-tdep.c: New file.
6876         * riscv-tdep.h: New file.
6877         * NEWS: Mention new target.
6878         * MAINTAINERS: Add entry for riscv.
6879
6880 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
6881
6882         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
6883         fields within aggregates.
6884
6885 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
6886
6887         * record-btrace.c (btrace_print_lines): Change type of flags to
6888         gdb_disassembly_flags.
6889
6890 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
6891
6892         * fbsd-nat.c: Include "inf-ptrace.h".
6893         (USE_SIGTRAP_SIGINFO): Conditionally define.
6894         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
6895         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
6896         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
6897         function.
6898         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
6899         Likewise.
6900         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
6901         Likewise.
6902         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
6903         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
6904         "supports_stopped_by_hw_breakpoint" target methods.
6905
6906 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
6907
6908         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
6909         * fbsd-nat.c (debug_fbsd_nat): New variable.
6910         (show_fbsd_nat_debug): New function.
6911         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
6912         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
6913
6914 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
6915
6916         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
6917         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
6918         prototype.
6919         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
6920         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
6921         method.
6922
6923 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
6924
6925         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
6926         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
6927
6928 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
6929
6930         * charset.c (struct charset_vector): New.
6931         (charsets): Change type to charset_vector.
6932         (find_charset_names): Adjust.
6933         (add_one): Adjust.
6934         (_initialize_charset): Adjust.
6935
6936 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
6937
6938         * progspace.h (struct program_space) <deleted_solibs>: Change
6939         type to std::vector<std::string>.
6940         * progspace.c (clear_program_space_solib_cache): Adjust.
6941         * breakpoint.c (print_solib_event): Adjust.
6942         (check_status_catch_solib): Adjust.
6943         * solib.c (update_solib_list): Adjust.
6944         * ui-out.h (class ui_out) <field_string>: New overload.
6945         * ui-out.c (ui_out::field_string): New overload.
6946
6947 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
6948
6949         * progspace.h (struct program_space): Add constructor and
6950         destructor, initialize fields.
6951         (add_program_space): Remove.
6952         * progspace.c (add_program_space): Rename to...
6953         (program_space::program_space): ... this.
6954         (release_program_space): Rename to...
6955         (program_space::~program_space): ... this.
6956         (delete_program_space): Use delete to delete program_space.
6957         (initialize_progspace): Use new to allocate program_space.
6958         * inferior.c (add_inferior_with_spaces): Likewise.
6959         (clone_inferior_command): Likewise.
6960         * infrun.c (follow_fork_inferior): Likewise.
6961         (handle_vfork_child_exec_or_exit): Likewise.
6962
6963 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
6964
6965         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
6966         (delim_string_to_char_ptr_vec): Return std::vector of
6967         gdb::unique_xmalloc_ptr.
6968         (dirnames_to_char_ptr_vec_append): Take std::vector of
6969         gdb::unique_xmalloc_ptr.
6970         (dirnames_to_char_ptr_vec): Return std::vector of
6971         gdb::unique_xmalloc_ptr.
6972         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
6973         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
6974         (delim_string_to_char_ptr_vec): Return an std::vector of
6975         gdb::unique_xmalloc_ptr, adjust the code.
6976         (dirnames_to_char_ptr_vec_append): Take an std::vector of
6977         gdb::unique_xmalloc_ptr, adjust the code.
6978         (dirnames_to_char_ptr_vec): Return an std::vector of
6979         gdb::unique_xmalloc_ptr, adjust the code.
6980         * auto-load.c (auto_load_safe_path_vec): Change type to
6981         std::vector of gdb::unique_xmalloc_ptr.
6982         (auto_load_expand_dir_vars): Return an std::vector of
6983         gdb::unique_xmalloc_ptr, adjust the code.
6984         (auto_load_safe_path_vec_update): Adjust.
6985         (filename_is_in_auto_load_safe_path_vec): Adjust.
6986         (auto_load_objfile_script_1): Adjust.
6987         * build-id.c (build_id_to_debug_bfd): Adjust.
6988         * linux-thread-db.c (thread_db_load_search): Adjust.
6989         * source.c (add_path): Adjust.
6990         (openp): Adjust.
6991         * symfile.c (find_separate_debug_file): Adjust.
6992         * utils.c (do_free_char_ptr_vec): Remove.
6993         (make_cleanup_free_char_ptr_vec): Remove.
6994
6995 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
6996
6997         PR gdb/22907
6998         * common/pathstuff.c: Conditionally include "<windows.h>".
6999
7000 2018-03-01  Georg Sauthoff  <mail@georg.so>
7001
7002         PR gdb/22888
7003         * gcore.in: Quote variables and switch interpreter to bash.
7004
7005 2018-03-01  Tom Tromey  <tom@tromey.com>
7006
7007         * dwarf2read.c (alloc_discriminant_info): Fix default_index
7008         assertion.  Add assertion for discriminant_index.
7009         (quirk_rust_enum): Use correct base type name in univariant case.
7010
7011 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
7012
7013         * record.c (get_call_history_modifiers): Return a
7014         record_print_flags.
7015         (cmd_record_call_history): Adjust.
7016         * record-btrace.c (record_btrace_call_history): Adjust.
7017         (record_btrace_call_history_range): Adjust.
7018         (record_btrace_call_history_from): Adjust.
7019         * target-debug.h (target_debug_print_record_print_flags): New.
7020         * target-delegates.c: Re-generate.
7021         * target.c (target_call_history): Change flags type.
7022         (target_call_history_from): Likewise.
7023         (target_call_history_range): Likewise.
7024         * target.h (struct target_ops) <target_call_history>: Likewise.
7025         (target_call_history_from): Likewise.
7026         (target_call_history_range): Likewise.
7027
7028 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
7029             Simon Marchi  <simon.marchi@polymtl.ca>
7030
7031         * common/common-utils.c: Include "sys/stat.h".
7032         (is_regular_file): Move here from "source.c"; change return
7033         type to "bool".
7034         * common/common-utils.h (is_regular_file): New prototype.
7035         * common/pathstuff.c (contains_dir_separator): New function.
7036         * common/pathstuff.h (contains_dir_separator): New prototype.
7037         * source.c: Don't include "sys/stat.h".
7038         (is_regular_file): Move to "common/common-utils.c".
7039
7040 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
7041
7042         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7043         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7044         * auto-load.c: Include "common/pathstuff.h".
7045         * common/common-def.h (current_directory): Move here.
7046         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7047         function.
7048         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7049         prototype.
7050         * common/pathstuff.c: New file.
7051         * common/pathstuff.h: New file.
7052         * compile/compile.c: Include "common/pathstuff.h".
7053         * defs.h (current_directory): Move to "common/common-defs.h".
7054         * dwarf2read.c: Include "common/pathstuff.h".
7055         * exec.c: Likewise.
7056         * guile/scm-safe-call.c: Likewise.
7057         * linux-thread-db.c: Likewise.
7058         * main.c: Likewise.
7059         * nto-tdep.c: Likewise.
7060         * objfiles.c: Likewise.
7061         * source.c: Likewise.
7062         * symtab.c: Likewise.
7063         * utils.c: Include "common/pathstuff.h".
7064         (gdb_realpath): Move to "common/pathstuff.c".
7065         (gdb_realpath_keepfile): Likewise.
7066         (gdb_abspath): Likewise.
7067         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7068         (gdb_realpath_keepfile): Likewise.
7069         (gdb_abspath): Likewise.
7070
7071 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
7072
7073         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7074         wildcard process pid for super_resume for kernels with a
7075         specific bug.
7076
7077 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
7078
7079         * compile/compile.c (get_args): Add additional comments
7080         explaining function.
7081
7082 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
7083             Tom Tromey  <tom@tromey.com>
7084
7085         * target.h (memory_write_request_s): Remove typedef.  Don't define
7086         VEC.
7087         (target_write_memory_blocks): Change argument to std::vector.
7088         (struct memory_write_request): Add constructor.
7089         * target-memory.c (compare_block_starting_address): Return bool.
7090         Change argument types.
7091         (claim_memory): Change arguments to use std::vector.
7092         (split_regular_and_flash_blocks, blocks_to_erase)
7093         (compute_garbled_blocks): Likewise.
7094         (cleanup_request_data, cleanup_write_requests_vector): Remove.
7095         (target_write_memory_blocks): Change argument to std::vector.
7096         * symfile.c (struct load_section_data): Add constructor and
7097         destructor.  Use std::vector for "requests".
7098         (struct load_progress_data): Add initializers.
7099         (load_section_callback): Update.  Use "new".
7100         (clear_memory_write_data): Remove.
7101         (generic_load): Update.
7102
7103 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
7104
7105         * arch/aarch64.h: Use common/tdesc.h.
7106
7107 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
7108
7109         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7110         architecture with a 64-bit ABI.
7111
7112 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
7113
7114         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7115         ahead of target description loading.
7116
7117 2018-02-26  Tom Tromey  <tom@tromey.com>
7118
7119         * stack.c (backtrace_command_1): Update.
7120         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7121         of "flags".
7122         * python/py-framefilter.c (py_print_frame)
7123         (gdbpy_apply_frame_filter): Change type of "flags".
7124         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7125         of "flags".
7126         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7127         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7128         * extension.h (enum frame_filter_flag): Rename from
7129         frame_filter_flags.
7130         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7131         (apply_ext_lang_frame_filter): Change type of "flags".
7132         * extension.c (apply_ext_lang_frame_filter): Change type of
7133         "flags".
7134         * extension-priv.h (struct extension_language_ops)
7135         <apply_frame_filter>: Change type of "flags".
7136
7137 2018-02-26  Tom Tromey  <tom@tromey.com>
7138
7139         PR python/16497:
7140         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
7141         off-by-one in py_end computation.
7142         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7143         PRINT_MORE_FRAMES.
7144         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7145         constant.
7146
7147 2018-02-26  Tom Tromey  <tom@tromey.com>
7148
7149         * dwarf2read.c (struct variant_field): New.
7150         (struct nextfield) <variant>: New field.
7151         (dwarf2_add_field): Handle DW_TAG_variant_part.
7152         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7153         discriminated union.
7154         (read_structure_type): Handle DW_TAG_variant_part.
7155         (handle_struct_member_die): New function, extracted from
7156         process_structure_scope.  Handle DW_TAG_variant.
7157         (process_structure_scope): Handle discriminated unions.  Call
7158         handle_struct_member_die.
7159
7160 2018-02-26  Tom Tromey  <tom@tromey.com>
7161
7162         * rust-lang.h (rust_last_path_segment): Declare.
7163         * rust-lang.c (rust_last_path_segment): Now public.  Change
7164         contract.
7165         (struct disr_info): Remove.
7166         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7167         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7168         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7169         (rust_enum_p, rust_enum_variant): New function.
7170         (rust_underscore_fields): Remove "offset" parameter.
7171         (rust_print_enum): New function.
7172         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7173         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7174         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
7175         enums.
7176         (rust_internal_print_type): New function, from rust_print_type.
7177         Remove enum code.
7178         (rust_print_type): Call rust_internal_print_type.
7179         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7180         Update enum handling.
7181         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7182         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7183         (rust_union_quirks): New functions.
7184         (process_full_comp_unit, process_full_type_unit): Call
7185         rust_union_quirks.
7186         (process_structure_scope): Update rust_unions if necessary.
7187
7188 2018-02-26  Tom Tromey  <tom@tromey.com>
7189
7190         * value.h (value_union_variant): Declare.
7191         * valops.c (value_union_variant): New function.
7192         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7193         (struct discriminant_info): New.
7194         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7195         enumerator.
7196         (struct main_type) <flag_discriminated_union>: New field.
7197
7198 2018-02-26  Tom Tromey  <tom@tromey.com>
7199
7200         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7201         unittests/unpack-selftests.c.
7202         * unittests/unpack-selftests.c: New file.
7203         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7204
7205 2018-02-26  Yao Qi  <yao.qi@linaro.org>
7206
7207         * dwarf2read.c (struct partial_die_info) <read>: New method.
7208         (read_partial_die): Remove the declaration.
7209         (load_partial_dies): Update.
7210         (partial_die_info::partial_die_info):
7211         (read_partial_die): Change it to partial_die_info::read.
7212
7213 2018-02-26  Yao Qi  <yao.qi@linaro.org>
7214
7215         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7216         (fixup_partial_die): Remove declaration.
7217         (scan_partial_symbols): Update.
7218         (partial_die_parent_scope): Likewise.
7219         (partial_die_full_name): Likewise.
7220         (fixup_partial_die): Change it to partial_die_info::fixup.
7221
7222 2018-02-26  Yao Qi  <yao.qi@linaro.org>
7223
7224         * dwarf2read.c (read_partial_die): Update the declaration.
7225         (load_partial_dies): Caller update.
7226         (read_partial_die): Remove one argument abbrev_len.
7227
7228 2018-02-26  Yao Qi  <yao.qi@linaro.org>
7229
7230         * dwarf2read.c (struct partial_die_info): Add ctor, delete
7231         assignment operator.
7232         (load_partial_dies): Use ctor and copy ctor.
7233         (read_partial_die): Update.
7234         (dwarf2_cu::find_partial_die): Use ctor.
7235
7236 2018-02-26  Yao Qi  <yao.qi@linaro.org>
7237
7238         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7239         (find_partial_die_in_comp_unit): Change it to
7240         dwarf2_cu::find_partial_die.
7241         (find_partial_die): Update.
7242
7243 2018-02-26  Yao Qi  <yao.qi@linaro.org>
7244
7245         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7246         is NULL.
7247
7248 2018-02-26  Yao Qi  <yao.qi@linaro.org>
7249
7250         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7251
7252 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
7253
7254         * arch/amd64.h: Use common/tdesc.h.
7255         * arch/i386.c: Likewise.
7256         * arch/i386.h: Likewise.
7257         * arch/tic6x.c: Likewise.
7258         * arch/tdesc.h: Move file from here...
7259         * common/tdesc.h: ...to here.
7260         * features/aarch64-core.c: Regenerate.
7261         * features/aarch64-fpu.c: Regenerate.
7262         * features/i386/32bit-avx.c: Regenerate.
7263         * features/i386/32bit-avx512.c: Regenerate.
7264         * features/i386/32bit-core.c: Regenerate.
7265         * features/i386/32bit-linux.c: Regenerate.
7266         * features/i386/32bit-mpx.c: Regenerate.
7267         * features/i386/32bit-pkeys.c: Regenerate.
7268         * features/i386/32bit-sse.c: Regenerate.
7269         * features/i386/64bit-avx.c: Regenerate.
7270         * features/i386/64bit-avx512.c: Regenerate.
7271         * features/i386/64bit-core.c: Regenerate.
7272         * features/i386/64bit-linux.c: Regenerate.
7273         * features/i386/64bit-mpx.c: Regenerate.
7274         * features/i386/64bit-pkeys.c: Regenerate.
7275         * features/i386/64bit-segments.c: Regenerate.
7276         * features/i386/64bit-sse.c: Regenerate.
7277         * features/i386/x32-core.c: Regenerate.
7278         * features/tic6x-c6xp.c: Regenerate.
7279         * features/tic6x-core.c: Regenerate.
7280         * features/tic6x-gp.c: Regenerate.
7281         * target-descriptions.c: Use common/tdesc.h.
7282         * target-descriptions.h: Likewise.
7283
7284 2018-02-24  Tom Tromey  <tom@tromey.com>
7285
7286         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7287         (try_thread_db_load_from_dir, thread_db_load_search): Use
7288         std::string.
7289         (info_auto_load_libthread_db_compare): Return bool.  Change
7290         argument types.
7291         (info_auto_load_libthread_db): Use std::vector, std::string.
7292         Remove cleanups.
7293
7294 2018-02-24  Tom Tromey  <tom@tromey.com>
7295
7296         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7297         std::string.
7298         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7299         std::string*.
7300         * gdbarch.c: Rebuild.
7301         * gdbarch.h: Rebuild.
7302         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7303         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7304         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7305         std::string*.
7306
7307 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
7308
7309         * gdbtypes.h (sect_offset): Change type to uint64_t.
7310         (sect_offset_str): New function.
7311         * dwarf2read.c (create_addrmap_from_aranges): Use
7312         sect_offset_str.
7313         (error_check_comp_unit_head): Likewise.
7314         (create_debug_type_hash_table): Likewise.
7315         (read_cutu_die_from_dwo): Likewise.
7316         (init_cutu_and_read_dies): Likewise.
7317         (init_cutu_and_read_dies_no_follow): Likewise.
7318         (process_psymtab_comp_unit_reader): Likewise.
7319         (partial_die_parent_scope): Likewise.
7320         (peek_die_abbrev): Likewise.
7321         (process_queue): Likewise.
7322         (dwarf2_physname): Likewise.
7323         (read_namespace_alias): Likewise.
7324         (read_import_statement): Likewise.
7325         (create_dwo_cu_reader): Likewise.
7326         (create_cus_hash_table): Likewise.
7327         (lookup_dwo_cutu): Likewise.
7328         (inherit_abstract_dies): Likewise.
7329         (read_func_scope): Likewise.
7330         (read_call_site_scope): Likewise.
7331         (dwarf2_add_member_fn): Likewise.
7332         (read_common_block): Likewise.
7333         (read_module_type): Likewise.
7334         (read_typedef): Likewise.
7335         (read_subrange_type): Likewise.
7336         (load_partial_dies): Likewise.
7337         (read_partial_die): Likewise.
7338         (find_partial_die): Likewise.
7339         (read_str_index): Likewise.
7340         (dwarf2_string_attr): Likewise.
7341         (build_error_marker_type): Likewise.
7342         (lookup_die_type): Likewise.
7343         (dump_die_shallow): Likewise.
7344         (follow_die_ref): Likewise.
7345         (dwarf2_fetch_die_loc_sect_off): Likewise.
7346         (dwarf2_fetch_constant_bytes): Likewise.
7347         (follow_die_sig): Likewise.
7348         (get_signatured_type): Likewise.
7349         (get_DW_AT_signature_type): Likewise.
7350         (dwarf2_find_containing_comp_unit): Likewise.
7351         (set_die_type): Likewise.
7352
7353 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
7354
7355         * arch/aarch64.c: Include "common-defs.h".
7356         * arch/amd64.c: Likewise.
7357         * arch/i386.c: Likewise.
7358
7359 2018-02-21  Tom Tromey  <tom@tromey.com>
7360
7361         * value.h: (extract_field_op): Update.
7362         * eval.c (extract_field_op): Return a const char *.
7363         * expression.h (parse_expression_for_completion): Update.
7364         * completer.c (complete_expression): Update.
7365         (add_struct_fields): Make fieldname const.
7366         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7367         (mark_completion_tag, parse_exp_in_context_1): Update.
7368         (parse_expression_for_completion): Change "name" to
7369         unique_xmalloc_ptr*.
7370
7371 2018-02-21  Tom Tromey  <tom@tromey.com>
7372
7373         * infcall.c (call_function_by_hand_dummy): Use std::vector.
7374
7375 2018-02-21  Yao Qi  <yao.qi@linaro.org>
7376
7377         * avr-tdep.c (avr_read_pc): Change parameter type to
7378         readable_regcache.
7379         * gdbarch.sh (read_pc): Likewise.
7380         * gdbarch.c: Re-generated.
7381         * gdbarch.h: Re-generated.
7382         * hppa-tdep.c (hppa_read_pc): Change parameter type to
7383         readable_regcache.
7384         * ia64-tdep.c (ia64_read_pc): Likewise.
7385         * mips-tdep.c (mips_read_pc): Likewise.
7386         * spu-tdep.c (spu_read_pc): Likewise.
7387
7388 2018-02-21  Yao Qi  <yao.qi@linaro.org>
7389
7390         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7391         * regcache-dump.c: New file.
7392         * regcache.c: Move register_dump to regcache-dump.c.
7393         (maintenance_print_registers): Likewise.
7394         (maintenance_print_raw_registers): Likewise.
7395         (maintenance_print_cooked_registers): Likewise.
7396         (maintenance_print_register_groups): Likewise.
7397         (maintenance_print_remote_registers): Likewise.
7398         (_initialize_regcache): Likewise.
7399         * regcache.h (register_dump): Moved from regcache.c.
7400
7401 2018-02-21  Yao Qi  <yao.qi@linaro.org>
7402
7403         * regcache.c (regcache::regcache): Update.
7404         (regcache::invalidate): Move it to detached_regcache::invalidate.
7405         (get_thread_arch_aspace_regcache): Update.
7406         (regcache::raw_update): Update.
7407         (regcache::cooked_read): Remove some code.
7408         (regcache::cooked_read_value): Likewise.
7409         (regcache::raw_write): Remove assert on m_readonly_p.
7410         (regcache::raw_supply_integer): Move it to
7411         detached_regcache::raw_supply_integer.
7412         (regcache::raw_supply_zeroed): Likewise.
7413         * regcache.h (detached_regcache) <raw_supply_integer>: New
7414         declaration.
7415         <raw_supply_zeroed, invalidate>: Likewise.
7416         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7417         <invalidate>: Likewise.
7418         <m_readonly_p>: Removed.
7419
7420 2018-02-21  Yao Qi  <yao.qi@linaro.org>
7421
7422         * infcmd.c (get_return_value): Let stop_regs point to
7423         get_current_regcache.
7424         * regcache.c (regcache::regcache): Remove.
7425         (register_dump_reg_buffer): New class.
7426         (regcache_print): Adjust.
7427         * regcache.h (regcache): Remove constructors.
7428
7429 2018-02-21  Yao Qi  <yao.qi@linaro.org>
7430
7431         * regcache.c (class register_dump): New class.
7432         (register_dump_regcache, register_dump_none): New class.
7433         (register_dump_remote, register_dump_groups): New class.
7434         (regcache_print): Update.
7435         * regcache.h (regcache_dump_what): Move it to regcache.c.
7436         (regcache) <dump>: Remove.
7437
7438 2018-02-21  Yao Qi  <yao.qi@linaro.org>
7439
7440         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7441          reg_buffer_rw *.
7442         (jit_unwind_reg_set_impl): Call raw_supply.
7443         (jit_frame_sniffer): Use reg_buffer_rw.
7444         * record-full.c (record_full_core_regbuf): Change its type.
7445         (record_full_core_open_1): Use reg_buffer_rw.
7446         (record_full_close): Likewise.
7447         (record_full_core_fetch_registers): Use regcache->raw_supply.
7448         (record_full_core_store_registers): Likewise.
7449         * regcache.c (regcache::get_register_status): Move it to
7450         reg_buffer.
7451         (regcache_raw_set_cached_value): Remove.
7452         (regcache::raw_set_cached_value): Remove.
7453         (regcache::raw_write): Call raw_supply.
7454         (regcache::raw_supply): Move it to reg_buffer_rw.
7455         * regcache.h (regcache_raw_set_cached_value): Remove.
7456         (reg_buffer_rw): New class.
7457
7458 2018-02-21  Yao Qi  <yao.qi@linaro.org>
7459
7460         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
7461         readonly_detached_regcache.
7462         (dummy_frame_prev_register): Use regcache->cooked_read.
7463         * frame.c (frame_save_as_regcache): Change return type.
7464         (frame_pop): Update.
7465         * frame.h (frame_save_as_regcache): Update declaration.
7466         * inferior.h (get_infcall_suspend_state_regcache): Update
7467         declaration.
7468         * infrun.c (infcall_suspend_state) <registers>: use
7469         readonly_detached_regcache.
7470         (save_infcall_suspend_state): Don't use regcache_dup.
7471         (get_infcall_suspend_state_regcache): Change return type.
7472         * linux-fork.c (struct fork_info) <savedregs>: Change to
7473         readonly_detached_regcache.
7474         <pc>: New field.
7475         (fork_save_infrun_state): Don't use regcache_dup.
7476         (info_checkpoints_command): Adjust.
7477         * mi/mi-main.c (register_changed_p): Update declaration.
7478         (mi_cmd_data_list_changed_registers): Use
7479         readonly_detached_regcache.
7480         (register_changed_p): Change parameter type to
7481         readonly_detached_regcache.
7482         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
7483         readonly_detached_regcache.
7484         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
7485         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
7486         New.
7487         (regcache::save): Move it to reg_buffer.
7488         (regcache::restore): Change parameter type.
7489         (regcache_dup): Remove.
7490         * regcache.h (reg_buffer) <save>: New method.
7491         (readonly_detached_regcache): New class.
7492         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
7493         readonly_detached_regcache.
7494         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
7495
7496 2018-02-21  Yao Qi  <yao.qi@linaro.org>
7497
7498         * frame.c (frame_save_as_regcache): Use regcache method save.
7499         (frame_pop): Use regcache method restore.
7500         * infrun.c (restore_infcall_suspend_state): Likewise.
7501         * linux-fork.c (fork_load_infrun_state): Likewise.
7502         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
7503         save.
7504         * regcache.c (regcache_save): Remove.
7505         (regcache::restore): More asserts.
7506         (regcache_cpy): Remove.
7507         * regcache.h (regcache_save): Remove the declaration.
7508         (regcache::restore): Move from private to public.
7509         Remove the friend declaration of regcache_cpy.
7510         (regcache_cpy): Remove declaration.
7511
7512 2018-02-21  Yao Qi  <yao.qi@linaro.org>
7513
7514         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
7515         parameter type to 'readable_regcache *'.
7516         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7517         * arm-tdep.c (arm_neon_quad_read): Likewise.
7518         (arm_pseudo_read): Likewise.
7519         * avr-tdep.c (avr_pseudo_register_read): Likewise.
7520         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7521         * frv-tdep.c (frv_pseudo_register_read): Likewise.
7522         * gdbarch.c: Re-generated.
7523         * gdbarch.h: Re-generated.
7524         * gdbarch.sh (pseudo_register_read): Change parameter type to
7525         'readable_regcache *'.
7526         (pseudo_register_read_value): Likewise.
7527         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
7528         (h8300_pseudo_register_read): Likewise.
7529         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
7530         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7531         (i386_pseudo_register_read_into_value): Likewise.
7532         (i386_pseudo_register_read_value): Likewise.
7533         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
7534         declaration.
7535         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
7536         * m32c-tdep.c (m32c_raw_read): Likewise.
7537         (m32c_read_flg): Likewise.
7538         (m32c_banked_register): Likewise.
7539         (m32c_banked_read): Likewise.
7540         (m32c_sb_read): Likewise.
7541         (m32c_part_read): Likewise.
7542         (m32c_cat_read): Likewise.
7543         (m32c_r3r2r1r0_read): Likewise.
7544         (m32c_pseudo_register_read): Likewise.
7545         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7546         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7547         (mep_pseudo_cr64_read): Likewise.
7548         (mep_pseudo_register_read): Likewise.
7549         * mips-tdep.c (mips_pseudo_register_read): Likewise.
7550         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7551         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7552         * regcache.c (regcache::raw_read): Move it to readable_regcache.
7553         (regcache::cooked_read): Likewise.
7554         (regcache::cooked_read_value): Likewise.
7555         (regcache_cooked_read_signed):
7556         (regcache::cooked_read): Likewise.
7557         * regcache.h (readable_regcache): New class.
7558         (regcache): Inherit readable_regcache.  Move some methods to
7559         readable_regcache.
7560         * rl78-tdep.c (rl78_pseudo_register_read): Change
7561         parameter type to 'readable_regcache *'.
7562         * rs6000-tdep.c (do_regcache_raw_read): Remove.
7563         (e500_pseudo_register_read): Change parameter type to
7564         'readable_regcache *'.
7565         (dfp_pseudo_register_read): Likewise.
7566         (vsx_pseudo_register_read): Likewise.
7567         (efpr_pseudo_register_read): Likewise.
7568         * s390-tdep.c (s390_pseudo_register_read): Likewise.
7569         * sh-tdep.c (sh_pseudo_register_read): Likewise.
7570         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
7571         (sh64_pseudo_register_read): Likewise.
7572         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7573         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7574         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7575         (spu_pseudo_register_read): Likewise.
7576         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7577         (xtensa_pseudo_register_read): Likewise.
7578
7579 2018-02-21  Yao Qi  <yao.qi@linaro.org>
7580
7581         * regcache.c (regcache::regcache): Call reg_buffer ctor.
7582         (regcache::arch): Move it to reg_buffer::arch.
7583         (regcache::register_buffer): Likewise.
7584         (regcache::assert_regnum): Likewise.
7585         (regcache::num_raw_registers): Likewise.
7586         * regcache.h (reg_buffer): New class.
7587         (regcache): Inherit reg_buffer.
7588
7589 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
7590
7591         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
7592         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
7593
7594 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
7595
7596         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
7597
7598 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
7599
7600         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
7601         (SFILES): Remove common/*.c files.
7602         (COMMON_OBS): Remove some *.o files built from common/*.c files.
7603         * common/common.host: Add common reference.
7604         * configure.ac: Likewise.
7605         * configure: Regenerate.
7606
7607 2018-02-16  Yao Qi  <yao.qi@linaro.org>
7608
7609         * block.c (block_namespace_info): Inherit allocate_on_obstack.
7610         (block_initialize_namespace): Use new.
7611         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
7612         (dwarf2_free_objfile): Use delete.
7613         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
7614         (copy_type_recursive): Use new.
7615         * gdb_obstack.h (allocate_on_obstack): New.
7616
7617 2018-02-15  Yao Qi  <yao.qi@linaro.org>
7618
7619         PR gdb/22849
7620         * inferior.c (exit_inferior_1): Reset inf->control.
7621
7622 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
7623
7624         * ada-lang.c (ada_to_fixed_value_create): Delete advance
7625         declaration.
7626
7627 2018-02-14  Pedro Alves  <palves@redhat.com>
7628
7629         * frame-unwind.c (frame_unwind_try_unwinder): Always call
7630         frame_cleanup_after_sniffer on exception.
7631
7632 2018-02-14  Tom Tromey  <tom@tromey.com>
7633
7634         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
7635         const.
7636         (solib_bfd_open): Make pathname const.
7637         * solib.c (solib_bfd_open): Make pathname const.
7638         * solib-spu.c (spu_bfd_fopen): Make name const.
7639         (spu_bfd_open): Make pathname const.
7640         * solib-darwin.c (darwin_bfd_open): Make pathname const.
7641         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
7642
7643 2018-02-14  Tom Tromey  <tom@tromey.com>
7644
7645         * symfile.c (symfile_bfd_open): Update.
7646         * source.h (openp, source_full_path_of, find_and_open_source):
7647         Change argument type to unique_xmalloc_ptr.
7648         * source.c (openp): Take a unique_xmalloc_ptr.
7649         (source_full_path_of, find_and_open_source): Likewise.
7650         (open_source_file, symtab_to_fullname): Update.
7651         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
7652         unique_xmalloc_ptr.
7653         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
7654         (exec_file_find): Update.
7655         * psymtab.c (psymtab_to_fullname): Update.
7656         * nto-tdep.h (nto_find_and_open_solib): Update.
7657         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
7658         unique_xmalloc_ptr.
7659         * exec.c (exec_file_attach): Update.
7660         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
7661         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
7662
7663 2018-02-14  Tom Tromey  <tom@tromey.com>
7664
7665         * solib.c: Include source.h.
7666         * nto-tdep.c: Include source.h.
7667         * mi/mi-cmd-env.c: Include source.h.
7668         * infcmd.c: Include source.h.
7669         * exec.c: Include source.h.
7670         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
7671         (add_path, directory_switch, source_path, init_source_path): Move
7672         declarations...
7673         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
7674         (add_path, directory_switch, source_path, init_source_path):
7675         ...here.
7676
7677 2018-02-14  Tom Tromey  <tom@tromey.com>
7678
7679         * solist.h (exec_file_find, solib_find): Return
7680         unique_xmalloc_ptr.
7681         (solib_bfd_fopen): Take a const char *.
7682         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
7683         (exec_file_find, solib_find): Likewise.
7684         (solib_bfd_fopen): Do not take ownership of "pathname".
7685         (solib_bfd_open): Use unique_xmalloc_ptr.
7686         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
7687         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
7688         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
7689         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
7690
7691 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
7692
7693         * ada-lang.c (name_match_type_from_name): Remove reference to
7694         ada_name_for_lookup in function's documentation.
7695         * ada-lang.h (ada_name_for_lookup): Delete declaration.
7696
7697 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
7698
7699         * defs.h (enum openp_flags): New enum.
7700         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
7701         Move to enum openp_flags.
7702         (openp_flags): New enum flags.
7703         (openp): Change parameter type to openp_flags.
7704         * source.c (openp): Change parameter type to openp_flags.
7705         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
7706         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
7707
7708 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
7709
7710         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
7711         per-command.
7712
7713 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7714
7715         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
7716         into...
7717         (class dwarf2_queue_guard): ...the destructor of this new class.
7718         (dw2_do_instantiate_symtab): Create instance of the new class
7719         dwarf2_queue_guard, remove cleanup.
7720
7721 2018-02-09  Tom Tromey  <tom@tromey.com>
7722
7723         * source.c (find_source_lines): Don't reference past the end of
7724         the vector.
7725
7726 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
7727
7728         * remote.c (remote_btrace_maybe_reopen): Change error message.
7729         * btrace.c (btrace_enable): Likewise.
7730         (parse_xml_btrace): Likewise.
7731         (parse_xml_btrace_conf): Likewise.
7732
7733 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
7734
7735         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
7736         (linux_enable_pt, linux_enable_bts): Call
7737         diagnose_perf_event_open_fail.
7738
7739 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
7740
7741         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
7742         Remove parameter and change return type.  Update callers.  Move it.
7743         (linux_enable_bts, linux_enable_pt): Improve error message.
7744         (linux_enable_pt): Remove zero buffer size check.
7745         (linux_enable_btrace): Improve error messages.  Remove NULL return
7746         check.
7747
7748 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
7749
7750         * btrace.c (btrace_enable): Remove target_supports_btrace call.
7751         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
7752         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
7753         (linux_supports_pt, linux_supports_btrace): Remove.
7754         (linux_enable_bts): Call cpu_supports_bts.
7755         * nat/linux-btrace.h (linux_supports_btrace): Remove.
7756         * remote.c (remote_supports_btrace): Remove.
7757         (init_remote_ops): Remove remote_supports_btrace.
7758         * target-delegates.c: Regenerated.
7759         * target.c (target_supports_btrace): Remove.
7760         * target.h (target_ops) <to_supports_btrace>: Remove
7761         (target_supports_btrace): Remove.
7762         * x86-linux-nat.c (x86_linux_create_target): Remove
7763         linux_supports_btrace.
7764
7765 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
7766
7767         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
7768         btrace failed.
7769         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
7770         exception and use message in own exception.
7771
7772 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
7773
7774         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
7775         (perf_event_pt_event_type): Use gdb_file_up.
7776         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
7777         scoped_fd, and scoped_mmap.
7778
7779 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
7780
7781         * common/scoped_mmap.h: New.
7782         * unittests/scoped_mmap-selftest.c: New.
7783         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7784         unittests/scoped_mmap-selftest.c.
7785
7786 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
7787
7788         * common/scoped_fd.h: New.
7789         * unittests/scoped_fd-selftest.c: New.
7790         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7791         unittests/scoped_fd-selftest.c.
7792
7793 2018-02-09  Tom Tromey  <tom@tromey.com>
7794
7795         * auto-load.c (auto_load_section_scripts): Use
7796         gdb::unique_xmalloc_ptr.
7797
7798 2018-02-09  Tom Tromey  <tom@tromey.com>
7799
7800         * auto-load.c (execute_script_contents): Use std::string.
7801
7802 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
7803
7804         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
7805         Python function, rather than a new command.
7806
7807 2018-02-08  Tom Tromey  <tom@tromey.com>
7808
7809         * solib.c (solib_find_1): Use std::string.
7810         (solib_bfd_fopen): Use unique_xmalloc_ptr.
7811
7812 2018-02-08  Tom Tromey  <tom@tromey.com>
7813
7814         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
7815
7816 2018-02-08  Tom Tromey  <tom@tromey.com>
7817
7818         * source.c (find_source_lines): Use gdb::def_vector.
7819
7820 2018-02-08  Tom Tromey  <tom@tromey.com>
7821
7822         * macrocmd.c (struct temporary_macro_definition): New.
7823         (macro_define_command): Use temporary_macro_definition.  Remove
7824         cleanups.
7825         (free_macro_definition_ptr): Remove.
7826
7827 2018-02-08  Tom Tromey  <tom@tromey.com>
7828
7829         * macroexp.c (maybe_expand): Use std::string.
7830
7831 2018-02-08  Tom Tromey  <tom@tromey.com>
7832
7833         * macroexp.c (struct macro_buffer): Add initializers for some
7834         members.
7835         (init_buffer, init_shared_buffer, free_buffer)
7836         (free_buffer_return_text): Remove.
7837         (macro_buffer): New constructors.
7838         (~macro_buffer): New destructor.
7839         (macro_buffer::set_shared): New method.
7840         (macro_buffer::resize_buffer, macro_buffer::appendc)
7841         (macro_buffer::appendmem): Now methods, not free functions.
7842         (set_token, append_tokens_without_splicing, stringify)
7843         (macro_stringify): Update.
7844         (gather_arguments): Change return type.  Remove argc_p argument,
7845         add args_ptr argument.  Use std::vector.
7846         (substitute_args): Remove argc argument.  Accept std::vector.
7847         (expand): Update.  Use std::vector.
7848         (scan, macro_expand, macro_expand_next): Update.
7849
7850 2018-02-08  Tom Tromey  <tom@tromey.com>
7851
7852         * symtab.c (default_collect_symbol_completion_matches_break_on):
7853         Use unique_xmalloc_ptr.
7854         * macroscope.h: (sal_macro_scope, user_macro_scope)
7855         (default_macro_scope): Return unique_xmalloc_ptr.
7856         * macroscope.c (sal_macro_scope, user_macro_scope)
7857         (default_macro_scope): Return unique_xmalloc_ptr.
7858         * macroexp.h (macro_expand, macro_expand_once): Return
7859         unique_xmalloc_ptr.
7860         * macroexp.c (macro_expand, macro_expand_once): Return
7861         unique_xmalloc_ptr.
7862         * macrocmd.c (macro_expand_command, macro_expand_once_command)
7863         (info_macro_command, info_macros_command): Use
7864         unique_xmalloc_ptr.
7865         * compile/compile-c-support.c (write_macro_definitions): Use
7866         unique_xmalloc_ptr.
7867         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
7868
7869 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
7870
7871         * value.c (value_static_field): Assign field type instead of
7872         containing type when returning an optimized out value.
7873
7874 2018-02-06  Yao Qi  <yao.qi@linaro.org>
7875
7876         * ft32-tdep.c (ft32_read_pc): Remove.
7877         (ft32_write_pc): Remove.
7878         (ft32_gdbarch_init): Update.
7879         * m32r-tdep.c (m32r_read_pc): Remove.
7880         (m32r_gdbarch_init): Update.
7881         * mep-tdep.c (mep_read_pc): Remove.
7882         (mep_gdbarch_init): Update.
7883         * microblaze-tdep.c (microblaze_write_pc): Remove.
7884         (microblaze_gdbarch_init): Update.
7885         * mn10300-tdep.c (mn10300_read_pc): Remove.
7886         (mn10300_write_pc): Remove.
7887         (mn10300_gdbarch_init): Update.
7888         * moxie-tdep.c (moxie_read_pc): Remove.
7889         (moxie_write_pc): Remove.
7890         (moxie_gdbarch_init): Update.
7891
7892 2018-02-06  Yao Qi  <yao.qi@linaro.org>
7893
7894         * expprint.c (print_subexp_standard): Handle
7895         OP_F77_UNDETERMINED_ARGLIST.
7896         (dump_subexp_body_standard): Likewise.
7897
7898 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
7899
7900         * target-descriptions.c (tdesc_element_visitor) Add empty
7901         implementations.
7902         (tdesc_type): Move make_gdb_type from here.
7903         (tdesc_type_builtin): Likewise.
7904         (tdesc_type_vector): Likewise.
7905         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
7906         (make_gdb_type_struct): Move from tdesc_type_with_fields.
7907         (make_gdb_type_union): Likewise.
7908         (make_gdb_type_flags): Likewise.
7909         (make_gdb_type_enum): Likewise.
7910         (make_gdb_type): New function.
7911         (tdesc_register_type): Use static make_gdb_type.
7912
7913 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
7914
7915         * infcmd.c (default_print_one_register_info): Align natural-format
7916         column values consistently one under another.
7917         (pad_to_column): New function.
7918
7919 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
7920
7921         * dwarf2read.c (dwarf2_physname): Move commment.
7922
7923 2018-02-01  Leszek Swirski  <leszeks@google.com>
7924
7925         * varobj.c (varobj_formatted_print_options): Allow recursive
7926         pretty printing if pretty printing is enabled.
7927
7928 2018-02-01  Leszek Swirski  <leszeks@google.com>
7929
7930         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
7931         names after a structop as a filename.
7932
7933 2018-02-01  Yao Qi  <yao.qi@linaro.org>
7934
7935         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
7936         (arm_record_coproc_data_proc): Likewise.
7937
7938 2018-02-01  Yao Qi  <yao.qi@linaro.org>
7939
7940         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
7941
7942 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
7943
7944         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
7945         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
7946
7947 2018-01-31  Pedro Alves  <palves@redhat.com>
7948
7949         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
7950         * inflow.c (child_terminal_save_inferior): Wrap reference to
7951         tcgetpgrp in HAVE_TERMIOS_H.
7952         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
7953         _WIN32.
7954         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
7955         always iterate over all inferiors.
7956         (gdbsim_cntrl_c): Adjust.
7957         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
7958
7959 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
7960
7961         * gdbtypes.c (lookup_array_range_type): Make sure the array's
7962         index type is objfile-owned if the element type is as well.
7963
7964 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
7965
7966         GDB 8.1 released.
7967
7968 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7969
7970         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
7971         "features/s390x-linux64.c".
7972         (_initialize_s390_linux_tdep): Remove initialization of tdescs
7973         s390_linux32 and s390x_linux64.
7974         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
7975         default tdesc.
7976         * s390-tdep.c: Include "features/s390-linux32.c" and
7977         "features/s390x-linux64.c".
7978         (s390_tdesc_valid): Add check for tdesc_has_registers.
7979         (s390_gdbarch_init): Make sure there is always a valid tdesc.
7980         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
7981         tdesc_s390x_linux64.
7982         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
7983         tdesc_s390x_linux64 to...
7984         * s390-tdep.h: ...here.
7985
7986 2018-01-30  Pedro Alves  <palves@redhat.com>
7987
7988         PR gdb/13211
7989         * config.in, configure: Regenerate.
7990         * configure.ac: Check for getpgid.
7991         * go32-nat.c (go32_pass_ctrlc): New.
7992         (go32_target): Install it.
7993         * inf-child.c (inf_child_target): Install
7994         child_terminal_save_inferior, child_pass_ctrlc and
7995         child_interrupt.
7996         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
7997         (inf_ptrace_target): No longer install it.
7998         * infcmd.c (interrupt_target_1): Adjust.
7999         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8000         (child_interrupt): Declare.
8001         (inferior::terminal_state): New.
8002         * inflow.c (struct terminal_info): Update comments.
8003         (inferior_process_group): Delete.
8004         (terminal_is_ours): Delete.
8005         (gdb_tty_state): New.
8006         (child_terminal_init): Adjust.
8007         (is_gdb_terminal, sharing_input_terminal_1)
8008         (sharing_input_terminal): New functions.
8009         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
8010         Set the process's actual process group in the foreground if
8011         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
8012         mark terminal as the inferior's if not sharing GDB's terminal.
8013         Don't check attach_flag.
8014         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8015         pass down a target_terminal_state.
8016         (child_terminal_save_inferior): New, factored out from ...
8017         (child_terminal_ours_1): ... this.  Handle
8018         target_terminal_state::is_ours_for_output.
8019         (child_interrupt, child_pass_ctrlc): New.
8020         (inflow_inferior_exit): Clear the inferior's terminal_state.
8021         (copy_terminal_info): Copy the inferior's terminal state.
8022         (_initialize_inflow): Remove reference to terminal_is_ours.
8023         * inflow.h (inferior_process_group): Delete.
8024         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8025         * procfs.c (procfs_target): Don't install procfs_interrupt.
8026         (procfs_interrupt): Delete.
8027         * remote.c (remote_serial_quit_handler): Adjust.
8028         (remote_interrupt): Remove ptid parameter.  Adjust.
8029         * target-delegates.c: Regenerate.
8030         * target.c: Include "terminal.h".
8031         (target_terminal::terminal_state): Rename to ...
8032         (target_terminal::m_terminal_state): ... this.
8033         (target_terminal::init): Adjust.
8034         (target_terminal::inferior): Adjust to per-inferior
8035         terminal_state.
8036         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8037         (target_terminal::ours, target_terminal::ours_for_output): Use
8038         target_terminal_is_ours_kind.
8039         (target_interrupt): Remove ptid parameter.  Adjust.
8040         (default_target_pass_ctrlc): Adjust.
8041         * target.h (target_ops::to_terminal_save_inferior): New field.
8042         (target_ops::to_interrupt): Remove ptid_t parameter.
8043         (target_interrupt): Remove ptid_t parameter.  Update comment.
8044         (target_pass_ctrlc): Update comment.
8045         * target/target.h (target_terminal_state): New scoped enum,
8046         factored out of ...
8047         (target_terminal::terminal_state): ... here.
8048         (target_terminal::inferior): Update comments.
8049         (target_terminal::restore_inferior): New.
8050         (target_terminal::is_inferior, target_terminal::is_ours)
8051         (target_terminal::is_ours_for_output): Adjust.
8052         (target_terminal::scoped_restore_terminal_state): Adjust to
8053         rename, and call restore_inferior() instead of inferior().
8054         (target_terminal::scoped_restore_terminal_state::m_state): Change
8055         type.
8056         (target_terminal::terminal_state): Rename to ...
8057         (target_terminal::m_terminal_state): ... this and change type.
8058
8059 2018-01-30  Pedro Alves  <palves@redhat.com>
8060
8061         * linux-nat.c (wait_for_signal): New function.
8062         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8063         directly.
8064         (async_terminal_is_ours)
8065         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8066         (linux_nat_add_target): Don't override
8067         to_terminal_inferior/to_terminal_ours.
8068
8069 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
8070
8071         * remote.c (remote_follow_fork): Don't call "detach_inferior".
8072
8073 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
8074
8075         * dwarf2read.c (free_dwo_files): Add forward-declaration.
8076         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8077         dwarf2_per_objfile_free here.
8078         (dwarf2_per_objfile_free): Remove.
8079         (_initialize_dwarf2_read): Don't register
8080         dwarf2_per_objfile_free as a registry cleanup.
8081
8082 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
8083
8084         Avoid compilation errors in MinGW native builds
8085
8086         The error is triggered by including python-internal.h, and the
8087         error message is:
8088
8089              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8090                       from build-gnulib/import/math.h:27,
8091                       from d:/usr/Python26/include/pyport.h:235,
8092                       from d:/usr/Python26/include/Python.h:58,
8093                       from python/python-internal.h:94,
8094                       from python/py-arch.c:24:
8095              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8096         using ::hypot;
8097                 ^~~~~
8098
8099         This happens because Python headers define 'hypot' to expand t
8100         '_hypot' in the Windows builds.
8101         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8102         'hypoth'.  This avoids a compilation error.
8103
8104 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
8105
8106         * MAINTAINERS (Write After Approval): Fix ordering.
8107
8108 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
8109
8110         * MAINTAINERS (Write After Approval): Add Alan Hayward.
8111
8112 2018-01-26  Alan Modra  <amodra@gmail.com>
8113
8114         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8115         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8116         Remove nop.  Make const.  Comment.
8117         (powerpc32_plt_stub_so_2): New.
8118         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8119         Correct count.  Update uses.
8120         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8121         Move common code reading PLT entry word.  Correct
8122         powerpc32_plt_stub PLT address calculation.
8123         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8124         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8125         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8126         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8127         (ppc64_standard_linkage8): Likewise.
8128         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8129         Correct insns description.
8130         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8131
8132 2018-01-24  Pedro Alves  <palves@redhat.com>
8133
8134         GCC PR libstdc++/83906
8135         * gdbtypes.c (operator==(const dynamic_prop &,
8136         const dynamic_prop &)): New.
8137         (operator==(const range_bounds &, const range_bounds &)): New.
8138         (check_types_equal): Use them instead of memcmp.
8139         * gdbtypes.h (operator==(const dynamic_prop &,
8140         const dynamic_prop &)): Declare.
8141         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8142         (operator==(const range_bounds &, const range_bounds &)): Declare.
8143         (operator!=(const range_bounds &, const range_bounds &)): Declare.
8144
8145 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8146
8147         * s390-linux-tdep.c (s390_record_address_mask)
8148         (s390_record_calc_disp_common, s390_record_calc_disp)
8149         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8150         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8151         (s390_process_record): Move to s390-tdep.c.
8152         (s390_linux_init_abi_any): Adjust.
8153         * s390-tdep.c (s390_record_address_mask)
8154         (s390_record_calc_disp_common, s390_record_calc_disp)
8155         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8156         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8157         (s390_process_record): Moved from s390-linux-tdep.c
8158         (s390_gdbarch_init): Adjust.
8159
8160 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8161
8162         * s390-linux-nat.c (s390-tdep.h): New include.
8163         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8164         (HFILES_NO_SRCDIR): Add s390-tdep.h.
8165         (ALLDEPFILES): Add s390-tdep.c.
8166         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8167         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8168         * s390-tdep.h: ...this.  New file.
8169         * s390-linux-tdep.c (s390-tdep.h): New include.
8170         (_initialize_s390_tdep): Rename to...
8171         (_initialize_s390_linux_tdep): ...this and adjust.
8172         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8173         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8174         s390-tdep.h.
8175         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8176         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8177         (s390_is_partial_instruction, s390_software_single_step)
8178         (is_non_branch_ril, s390_displaced_step_copy_insn)
8179         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8180         (s390_prologue_data, s390_addr, s390_store, s390_load)
8181         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8182         (s390_register_call_saved, s390_guess_tracepoint_registers)
8183         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8184         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8185         (s390_pseudo_register_name, s390_pseudo_register_type)
8186         (s390_pseudo_register_read, s390_pseudo_register_write)
8187         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8188         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8189         (s390_addr_bits_remove, s390_address_class_type_flags)
8190         (s390_address_class_type_flags_to_name)
8191         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8192         (s390_function_arg_float, s390_function_arg_vector)
8193         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8194         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8195         (s390_frame_align, s390_register_return_value, s390_return_value)
8196         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8197         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8198         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8199         (s390_trad_frame_prev_register, s390_unwind_cache)
8200         (s390_prologue_frame_unwind_cache)
8201         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8202         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8203         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8204         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8205         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8206         (s390_frame_base_address, s390_local_base_address)
8207         (s390_frame_base, s390_gcc_target_options)
8208         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8209         (s390_validate_reg_range, s390_tdesc_valid)
8210         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8211         * s390-tdep.c: ...this.  New file.
8212
8213 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8214
8215         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8216         (s390_process_record, s390_gdbarch_tdep_alloc)
8217         (s390_linux_init_abi_any): Use/set new hook.
8218
8219 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8220
8221         * s390-linux-tdep.c (osabi.h): New include.
8222         (s390_linux_init_abi_31, s390_linux_init_abi_64)
8223         (s390_linux_init_abi_any): New functions.
8224         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8225
8226 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8227
8228         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8229         tdesc_has_registers check
8230
8231 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8232
8233         * s390-linux-tdep.c (s390_tdesc_valid): New function.
8234         (s390_validate_reg_range): New macro.
8235         (s390_gdbarch_init): Adjust.
8236
8237 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8238
8239         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8240         (s390_gdbarch_tdep_alloc): Adjust.
8241         (s390_gdbarch_init): Adjust.
8242
8243 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8244
8245         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8246         <have_tdb>: Change type to bool.
8247         (s390_gdbarch_tdep_alloc): Adjust.
8248         (s390_gdbarch_init): Adjust.
8249
8250 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8251
8252         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8253         (gdbarch_tdep) <have_upper, have_vx>: New fields.
8254         (s390_gdbarch_tdep_alloc): New function.
8255         (s390_gdbarch_init): Allocate tdep at start and use its fields
8256         instead of separate variables.
8257
8258 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8259
8260         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8261         when looking for cached gdbarch and add comment for remaining.
8262
8263 2018-01-22  Pedro Alves  <palves@redhat.com>
8264             Sergio Durigan Junior  <sergiodj@redhat.com>
8265
8266         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8267         case.
8268
8269 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
8270
8271         * MAINTAINERS: Update my company e-mail address.
8272
8273 2018-01-22  Yao Qi  <yao.qi@linaro.org>
8274
8275         * regcache.c (cooked_write_test): New function.
8276         (_initialize_regcache): Register the test.
8277
8278 2018-01-22  Yao Qi  <yao.qi@linaro.org>
8279
8280         * ia64-tdep.c (ia64_pseudo_register_read): Call
8281         regcache->cooked_read instead of regcache_cooked_read_unsigned.
8282         * m32c-tdep.c (m32c_cat_read): Likewise.
8283         (m32c_r3r2r1r0_read): Likewise.
8284         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8285         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8286
8287 2018-01-22  Yao Qi  <yao.qi@linaro.org>
8288
8289         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8290         method raw_read instead of regcache_raw_read.
8291         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8292         * arm-tdep.c (arm_neon_quad_read): Likewise.
8293         * avr-tdep.c (avr_pseudo_register_read): Likewise.
8294         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8295         * frv-tdep.c (frv_pseudo_register_read): Likewise.
8296         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8297         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8298         (i386_pseudo_register_read_into_value): Likewise.
8299         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8300         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8301         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8302         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8303         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8304         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
8305         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8306         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
8307         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8308
8309 2018-01-22  Yao Qi  <yao.qi@linaro.org>
8310
8311         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8312         * configure.tgt: Remove target mt.
8313         * mt-tdep.c: Remove.
8314         * regcache.c (cooked_read_test): Remove the check for mt.
8315
8316 2018-01-22  Yao Qi  <yao.qi@linaro.org>
8317
8318         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8319         instead of gdbarch_pseudo_register_read_value.
8320
8321 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
8322
8323         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8324         language is Ada.
8325
8326 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
8327
8328         * linespec.c (create_sals_line_offset): Remove code that preserved
8329         the symtab_and_line's line number.
8330
8331 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
8332
8333         * varobj.c (varobj_create): Don't set valid_block when creating a
8334         floating varobj.
8335
8336 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
8337
8338         * varobj.c (varobj_create): Remove out of date comment.
8339
8340 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
8341
8342         PR mi/20395
8343         * ada-exp.y (write_var_from_sym): Pass extra parameter when
8344         updating innermost block.
8345         * parse.c (innermost_block_tracker::update): Take extra type
8346         parameter, and check types match before updating innermost block.
8347         (write_dollar_variable): Update innermost block for registers.
8348         * parser-defs.h (enum innermost_block_tracker_type): New enum.
8349         (innermost_block_tracker::innermost_block_tracker): Initialise
8350         m_types member.
8351         (innermost_block_tracker::reset): Take type parameter.
8352         (innermost_block_tracker::update): Take type parameter, and pass
8353         type through as needed.
8354         (innermost_block_tracker::m_types): New member.
8355         * varobj.c (varobj_create): Pass type when reseting innermost
8356         block.
8357
8358 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
8359
8360         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8361         * ada-lang.c (resolve_subexp): Likewise.
8362         * breakpoint.c (set_breakpoint_condition) Likewise.
8363         (watch_command_1) Likewise.
8364         * c-exp.y (variable): Likewise.
8365         * d-exp.y (PrimaryExpression): Likewise.
8366         * f-exp.y (variable): Likewise.
8367         * go-exp.y (variable): Likewise.
8368         * m2-exp.y (variable): Likewise.
8369         * objfiles.c (objfile::~objfile): Likewise.
8370         * p-exp.y (variable): Likewise.
8371         * parse.c (innermost_block): Change type.
8372         * parser-defs.h (class innermost_block_tracker): New.
8373         (innermost_block): Change to innermost_block_tracker.
8374         * printcmd.c (display_command): Switch to innermost_block API.
8375         (do_one_display): Likewise.
8376         * rust-exp.y (do_one_display): Likewise.
8377         * symfile.c (clear_symtab_users): Likewise.
8378         * varobj.c (varobj_create): Switch to innermost_block API, replace
8379         use of innermost_block with block stored on varobj object.
8380
8381 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
8382
8383         * expression.h (innermost_block): Remove declaration.
8384         * varobj.c: Add 'parser-defs.h' include.
8385
8386 2018-01-19  Tom Tromey  <tom@tromey.com>
8387
8388         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8389         symbols in the static and global blocks.
8390
8391 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
8392
8393         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8394         gdb_ptrace.h, and move including gdb_wait.h ...
8395         * nat/linux-ptrace.h: ... to here.
8396
8397 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
8398
8399         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8400         inf_ptrace_detach_success.
8401         (inf_ptrace_detach_success): Add inferior parameter, use it
8402         instead of inferior_ptid, pass it to detach_inferior.
8403         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8404         parameter.
8405         * inferior.c (detach_inferior): Add overload that takes an
8406         inferior object.
8407         * inferior.h (detach_inferior): Likewise.
8408         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8409         use inferior_ptid, adjust call to inf_ptrace_detach_success.
8410         * linux-thread-db.c (thread_db_detach): Use inf parameter.
8411
8412 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
8413
8414         * target.h (struct target_ops) <to_detach>: Add inferior
8415         parameter.
8416         (target_detach): Likewise.
8417         * target.c (dispose_inferior): Pass inferior down.
8418         (target_detach): Pass inferior down.  Assert that it is equal to
8419         the current inferior.
8420         * aix-thread.c (aix_thread_detach): Pass inferior down.
8421         * corefile.c (core_file_command): Pass current_inferior() down.
8422         * corelow.c (core_detach): Add inferior parameter.
8423         * darwin-nat.c (darwin_detach): Likewise.
8424         * gnu-nat.c (gnu_detach): Likewise.
8425         * inf-ptrace.c (inf_ptrace_detach): Likewise.
8426         * infcmd.c (detach_command): Pass current_inferior() down to
8427         target_detach.
8428         * infrun.c (follow_fork_inferior): Pass parent_inf to
8429         target_detach.
8430         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8431         target_detach.
8432         * linux-nat.c (linux_nat_detach): Add inferior parameter.
8433         * linux-thread-db.c (thread_db_detach): Likewise.
8434         * nto-procfs.c (procfs_detach): Likewise.
8435         * procfs.c (procfs_detach): Likewise.
8436         * record.c (record_detach): Likewise.
8437         * record.h (struct inferior): Forward-declare.
8438         (record_detach): Add inferior parameter.
8439         * remote-sim.c (gdbsim_detach): Likewise.
8440         * remote.c (remote_detach_1): Likewise.
8441         (remote_detach): Likewise.
8442         (extended_remote_detach): Likewise.
8443         * sol-thread.c (sol_thread_detach): Likewise.
8444         * target-debug.h (target_debug_print_inferior_p): New macro.
8445         * target-delegates.c: Re-generate.
8446         * top.c (kill_or_detach): Pass inferior down to target_detach.
8447         * windows-nat.c (windows_detach): Add inferior parameter.
8448
8449 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
8450
8451         * target.h (struct target_ops) <to_detach>: Remove args
8452         parameter.
8453         (target_detach): Likewise.
8454         * target.c (dispose_inferior): Adjust.
8455         (target_detach): Remove args parameter, adjust.
8456         * aix-thread.c (aix_thread_detach): Adjust.
8457         * corefile.c (core_file_command): Adjust.
8458         * corelow.c (core_detach): Adjust.
8459         * darwin-nat.c (darwin_detach): Adjust.
8460         * gnu-nat.c (gnu_detach): Adjust.
8461         * inf-ptrace.c (inf_ptrace_detach): Adjust.
8462         * infcmd.c (detach_command): Adjust
8463         * infrun.c (follow_fork_inferior): Adjust.
8464         (handle_vfork_child_exec_or_exit): Adjust.
8465         * linux-fork.c (linux_fork_detach): Remove args parameter.
8466         * linux-fork.h (linux_fork_detach): Likewise.
8467         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
8468         * linux-thread-db.c (thread_db_detach): Likewise.
8469         * nto-procfs.c (procfs_detach): Likewise.
8470         * procfs.c (procfs_detach): Likewise.
8471         (do_detach): Remove signo parameter.
8472         * record.c (record_detach): Remove args parameter.
8473         * record.h (record_detach): Likewise.
8474         * remote-sim.c (gdbsim_detach): Likewise.
8475         * remote.c (remote_detach_1): Likewise.
8476         (remote_detach): Likewise.
8477         (extended_remote_detach): Likewise.
8478         * sol-thread.c (sol_thread_detach): Likewise.
8479         * target-delegates.c: Re-generate.
8480         * top.c (struct qt_args) <args>: Remove field.
8481         (kill_or_detach): Don't pass args.
8482         (quit_force): Don't set args.
8483         * windows-nat.c (windows_detach): Remove args parameter.
8484
8485 2018-01-19  Yao Qi  <yao.qi@linaro.org>
8486
8487         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
8488         (arm_linux_init_abi): Install it.
8489
8490 2018-01-19  Yao Qi  <yao.qi@linaro.org>
8491
8492         * osabi.c (gdb_osabi_names): Extend the regexp for
8493         arm-linux-gnueabihf.
8494
8495 2018-01-18  Yao Qi  <yao.qi@linaro.org>
8496
8497         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
8498         m_abbrevs.
8499         (abbrev_table::add_abbrev): Update.
8500         (abbrev_table::lookup_abbrev): Update.
8501
8502 2018-01-18  Yao Qi  <yao.qi@linaro.org>
8503
8504         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
8505
8506 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
8507
8508         * compile/compile.c (compile_to_object): Convert "triplet_rx"
8509         to "std::string".
8510
8511 2018-01-17  Tom Tromey  <tom@tromey.com>
8512
8513         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
8514
8515 2018-01-17  Tom Tromey  <tom@tromey.com>
8516
8517         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
8518         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
8519         (create_array_type_with_stride): Update.
8520         * dwarf2read.c (set_die_type): Update.
8521
8522 2018-01-17  Tom Tromey  <tom@tromey.com>
8523
8524         * dwarf2read.c (delayed_method_info): Remove typedef.
8525         (dwarf2_cu::method_info): Now a std::vector.
8526         (add_to_method_list): Update.
8527         (free_delayed_list): Remove.
8528         (compute_delayed_physnames): Update.
8529         (process_full_comp_unit, process_full_type_unit): Clear the method
8530         list.  Remove cleanups.
8531         (psymtab_include_file_name): Add name_holder parameter.  Use
8532         unique_xmalloc_ptr.
8533         (dwarf_decode_lines): Update.
8534
8535 2018-01-17  Tom Tromey  <tom@tromey.com>
8536             Simon Marchi  <simon.marchi@ericsson.com>
8537
8538         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
8539         (dwarf2_per_objfile::free_cached_comp_units)
8540         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8541         (init_cutu_and_read_dies_no_follow): Update.
8542         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
8543         (dwarf2_cu::~dwarf2_cu): New.
8544         (free_heap_comp_unit, free_stack_comp_unit): Remove.
8545         (age_cached_comp_units, free_one_cached_comp_unit): Update.
8546
8547 2018-01-17  Tom Tromey  <tom@tromey.com>
8548             Simon Marchi  <simon.marchi@ericsson.com>
8549
8550         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
8551         (struct die_reader_specs) <abbrev_table>: New member.
8552         (struct abbrev_table): Add constructor.
8553         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
8554         <abbrev_obstack>: Now an auto_obstack.
8555         (abbrev_table_up): New typedef.
8556         (init_cu_die_reader): Add abbrev_table parameter.
8557         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
8558         Add result_dwo_abbrev_table.
8559         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8560         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
8561         Update.
8562         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
8563         parameter.
8564         (skip_children): Update.
8565         (abbrev_table::alloc_abbrev): Rename from
8566         abbrev_table_alloc_abbrev.
8567         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
8568         (abbrev_table::lookup_abbrev): Rename from
8569         abbrev_table_lookup_abbrev.
8570         (abbrev_table_read_table): Return abbrev_table_up.
8571         (abbrev_table_free, abbrev_table_free_cleanup)
8572         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
8573         (load_partial_dies): Update.
8574
8575 2018-01-17  Tom Tromey  <tom@tromey.com>
8576
8577         * dwarf2read.c (dwarf2_compute_name): Update comment.
8578         (read_func_scope, read_variable): Update.
8579         (new_symbol): Remove.
8580         (new_symbol_full): Rename to new_symbol.
8581
8582 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
8583
8584         PR gdb/16577
8585         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
8586         a warning instead of throwing an error, set section size to 0 and return
8587         NULL.
8588         * gdb_bfd.h (gdb_bfd_map_section): Update description.
8589
8590 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
8591
8592         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
8593         std::string.
8594         (linux_ptrace_attach_fail_reason_string): Likewise.
8595         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
8596         Likewise.
8597         (linux_ptrace_attach_fail_reason_string): Likewise.
8598         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
8599
8600 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
8601
8602         * linux-nat.c (linux_nat_attach): Remove xstrdup.
8603
8604 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
8605
8606         PR gdb/21559
8607         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
8608         checking for fs_base/gs_base fields in struct user_regs_struct.
8609         * configure: Regenerate.
8610
8611 2018-01-17  Yao Qi  <yao.qi@linaro.org>
8612
8613         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
8614         function.
8615         (aarch64_linux_init_abi): Install it to gdbarch hook
8616         gcc_target_options.
8617
8618 2018-01-15  Pedro Alves  <palves@redhat.com>
8619
8620         * common/signals-state-save-restore.c
8621         (save_original_signals_state): Fix typos.
8622
8623 2017-01-12  Tom Tromey  <tom@tromey.com>
8624             Sergio Durigan Junior  <sergiodj@redhat.com>
8625
8626         * Makefile.in (install-only): Install gdb-add-index.
8627
8628 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
8629
8630         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
8631
8632 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8633
8634         * infrun.c (keep_going_pass_signal): Clear step-over info when
8635         insert_breakpoints fails.
8636
8637 2018-01-11  Pedro Alves  <palves@redhat.com>
8638
8639         PR gdb/22583
8640         * infrun.c (resume): Rename to ...
8641         (resume_1): ... this.
8642         (resume): Reimplement as wrapper around resume_1.
8643
8644 2018-01-11  Pedro Alves  <palves@redhat.com>
8645
8646         PR remote/22597
8647         * remote.c (remote_parse_stop_reply): Default to the last-set
8648         general thread instead of to 'magic_null_ptid'.
8649
8650 2018-01-10  Pedro Alves  <palves@redhat.com>
8651
8652         * language.h (language_get_symbol_name_matcher): Rename ...
8653         (get_symbol_name_matcher): ... this.
8654         * language.c (language_get_symbol_name_matcher): Ditto.
8655         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
8656         callers adjusted.
8657
8658 2018-01-10  Pedro Alves  <palves@redhat.com>
8659
8660         PR gdb/22670
8661         * dwarf2read.c
8662         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
8663         Adjust to use language_get_symbol_name_matcher instead of
8664         language_defn::la_get_symbol_name_matcher.
8665         * language.c (language_get_symbol_name_matcher): If in Ada mode
8666         and the lookup name is a verbatim match, return Ada's matcher.
8667         * language.h (language_get_symbol_name_matcher): Adjust comment.
8668         (ada_lookup_name_info::verbatim_p):: New method.
8669
8670 2018-01-10  Pedro Alves  <palves@redhat.com>
8671
8672         PR gdb/22670
8673         * ada-lang.c (ada_collect_symbol_completion_matches): If the
8674         minsym's language is language_auto or language_cplus, pass down
8675         language_ada instead.
8676         * symtab.c (compare_symbol_name): Don't frob symbol language here.
8677
8678 2018-01-10  Pedro Alves  <palves@redhat.com>
8679
8680         PR gdb/22670
8681         * minsyms.c (linkage_name_str): New function.
8682         (iterate_over_minimal_symbols): Use it.
8683
8684 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
8685
8686         * NEWS: Document that 'info proc' now works on FreeBSD.
8687
8688 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
8689
8690         * configure.ac: Check for kinfo_getfile in libutil.
8691         * configure: Regenerate.
8692         * config.in: Regenerate.
8693         * fbsd-nat.c: Include "fbsd-tdep.h".
8694         (fbsd_fetch_cmdline): New.
8695         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
8696         rather than calling error.
8697         (fbsd_info_proc): New.
8698         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
8699         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
8700         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
8701
8702 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
8703
8704         * fbsd-nat.c (struct free_deleter): Remove.
8705         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
8706
8707 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
8708
8709         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
8710         NULL for an empty pathname.
8711
8712 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
8713
8714         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
8715         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
8716         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
8717         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
8718         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
8719         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
8720         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
8721         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
8722         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
8723         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
8724         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
8725         (fbsd_core_fetch_timeval, fbsd_print_sigset)
8726         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
8727         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
8728         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
8729
8730 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
8731
8732         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
8733         (gnu_xfer_auxv): New function.
8734         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
8735         TARGET_OBJECT_AUXV.
8736
8737 2018-01-08  Yao Qi  <yao.qi@linaro.org>
8738             Simon Marchi  <simon.marchi@ericsson.com>
8739
8740         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
8741         common/selftest.c.
8742         (COMMON_OBS): Remove selftest.o.
8743         * configure.ac: Append selftest-arch.c and common/selftest.c to
8744         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
8745         * configure: Re-generated.
8746         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
8747         GDB_SELF_TEST.
8748         (maintenance_info_selftests): Likewise.
8749
8750 2018-01-08  Xavier Roirand  <roirand@adacore.com>
8751
8752         * ada-valprint.c (val_print_packed_array_elements): Use
8753         proper number of elements when printing an array indexed
8754         by an enumeration type.
8755
8756 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
8757
8758         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
8759         (dw2_get_file_names_reader): Adjust.
8760         (lookup_dwo_signatured_type): Adjust.
8761         (lookup_dwp_signatured_type): Adjust.
8762         (lookup_signatured_type): Adjust.
8763         (create_type_unit_group): Adjust.
8764         (get_type_unit_group): Adjust.
8765         (process_psymtab_comp_unit_reader): Adjust.
8766         (build_type_psymtabs_reader): Adjust.
8767         (scan_partial_symbols): Adjust.
8768         (add_partial_symbol): Adjust.
8769         (add_partial_subprogram): Adjust.
8770         (peek_die_abbrev): Adjust.
8771         (fixup_go_packaging): Adjust.
8772         (process_imported_unit_die): Adjust.
8773         (dwarf2_compute_name): Adjust.
8774         (dwarf2_physname): Adjust.
8775         (read_import_statement): Adjust.
8776         (handle_DW_AT_stmt_list): Adjust.
8777         (read_file_scope): Adjust.
8778         (read_func_scope): Adjust.
8779         (read_lexical_block_scope): Adjust.
8780         (read_call_site_scope): Adjust.
8781         (read_variable): Adjust.
8782         (dwarf2_rnglists_process): Adjust.
8783         (dwarf2_ranges_process): Adjust.
8784         (dwarf2_ranges_read): Adjust.
8785         (dwarf2_get_pc_bounds): Adjust.
8786         (dwarf2_record_block_ranges): Adjust.
8787         (dwarf2_add_field): Adjust.
8788         (dwarf2_add_member_fn): Adjust.
8789         (read_structure_type): Adjust.
8790         (process_structure_scope): Adjust.
8791         (read_enumeration_type): Adjust.
8792         (read_array_type): Adjust.
8793         (mark_common_block_symbol_computed): Adjust.
8794         (read_common_block): Adjust.
8795         (read_namespace_type): Adjust.
8796         (read_namespace): Adjust.
8797         (read_module_type): Adjust.
8798         (read_tag_pointer_type): Adjust.
8799         (read_tag_ptr_to_member_type): Adjust.
8800         (read_tag_string_type): Adjust.
8801         (read_subroutine_type): Adjust.
8802         (read_typedef): Adjust.
8803         (read_base_type): Adjust.
8804         (attr_to_dynamic_prop): Adjust.
8805         (read_subrange_type): Adjust.
8806         (read_unspecified_type): Adjust.
8807         (dwarf2_read_abbrevs): Adjust.
8808         (load_partial_dies): Adjust.
8809         (read_partial_die): Adjust.
8810         (find_partial_die): Adjust.
8811         (guess_partial_die_structure_name): Adjust.
8812         (fixup_partial_die): Adjust.
8813         (read_attribute_value): Adjust.
8814         (read_addr_index): Adjust.
8815         (read_addr_index_from_leb128): Adjust.
8816         (read_str_index): Adjust.
8817         (dwarf2_string_attr): Adjust.
8818         (get_debug_line_section): Adjust.
8819         (dwarf_decode_line_header): Adjust.
8820         (lnp_state_machine::check_line_address): Adjust.
8821         (dwarf_decode_lines_1): Adjust.
8822         (dwarf_decode_lines): Adjust.
8823         (dwarf2_start_symtab): Adjust.
8824         (var_decode_location): Adjust.
8825         (new_symbol_full): Adjust.
8826         (dwarf2_const_value_data): Adjust.
8827         (dwarf2_const_value_attr): Adjust.
8828         (dwarf2_const_value): Adjust.
8829         (die_type): Adjust.
8830         (die_containing_type): Adjust.
8831         (build_error_marker_type): Adjust.
8832         (lookup_die_type): Adjust.
8833         (guess_full_die_structure_name): Adjust.
8834         (anonymous_struct_prefix): Adjust.
8835         (determine_prefix): Adjust.
8836         (dwarf2_name): Adjust.
8837         (follow_die_ref_or_sig): Adjust.
8838         (follow_die_offset): Adjust.
8839         (follow_die_ref): Adjust.
8840         (follow_die_sig_1): Adjust.
8841         (follow_die_sig): Adjust.
8842         (get_signatured_type): Adjust.
8843         (get_DW_AT_signature_type): Adjust.
8844         (decode_locdesc): Adjust.
8845         (dwarf_decode_macros): Adjust.
8846         (cu_debug_loc_section): Adjust.
8847         (fill_in_loclist_baton): Adjust.
8848         (dwarf2_symbol_mark_computed): Adjust.
8849         (init_one_comp_unit): Don't assign
8850         dwarf2_cu::dwarf2_per_objfile.
8851         (set_die_type): Adjust.
8852
8853 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
8854
8855         * dwarf2read.c (struct mapped_debug_names): Add constructor.
8856         <dwarf2_per_objfile>: New field.
8857         (dwarf2_per_objfile): Remove global.
8858         (get_dwarf2_per_objfile): New function.
8859         (set_dwarf2_per_objfile): New function.
8860         (dwarf2_build_psymtabs_hard): Change objfile parameter to
8861         dwarf2_per_objfile.
8862         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8863         (read_abbrev_offset): Likewise.
8864         (read_indirect_string): Likewise.
8865         (read_indirect_line_string): Likewise.
8866         (read_indirect_string_at_offset): Likewise.
8867         (read_indirect_string_from_dwz): Likewise.
8868         (dwarf2_find_containing_comp_unit): Change objfile parameter to
8869         dwarf2_per_objfile.
8870         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8871         (create_all_comp_units): Change objfile parameter to
8872         dwarf2_per_objfile.
8873         (create_all_type_units): Likewise.
8874         (process_queue): Add dwarf2_per_objfile parameter.
8875         (read_and_check_comp_unit_head): Likewise.
8876         (lookup_dwo_unit_in_dwp): Likewise.
8877         (get_dwp_file): Likewise.
8878         (process_cu_includes): Likewise.
8879         (struct free_dwo_file_cleanup_data): New struct.
8880         (dwarf2_has_info): Use get_dwarf2_per_objfile and
8881         set_dwarf2_per_objfile.
8882         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
8883         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
8884         context, adjust calls.
8885         (dw2_instantiate_symtab): Likewise.
8886         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
8887         (dw2_get_cu): Likewise.
8888         (create_cu_from_index_list): Change objfile parameter to
8889         dwarf2_per_objfile.
8890         (create_cus_from_index_list): Get dwarf2_per_objfile from
8891         context, adjust calls.
8892         (create_cus_from_index): Likewise.
8893         (create_signatured_type_table_from_index): Change objfile
8894         parameter to dwarf2_per_objfile.
8895         (create_signatured_type_table_from_debug_names): Change objfile
8896         parameter to dwarf2_per_objfile.
8897         (create_addrmap_from_index): Likewise.
8898         (create_addrmap_from_aranges): Likewise.
8899         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
8900         (dw2_setup): Remove.
8901         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
8902         context.
8903         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
8904         get_dwarf2_per_objfile.
8905         (dw2_forget_cached_source_info): Likewise.
8906         (dw2_map_symtabs_matching_filename): Likewise.
8907         (struct dw2_symtab_iterator) <index>: Remove.
8908         <dwarf2_per_objfile>: New field.
8909         (dw2_symtab_iter_init): Replace index parameter with
8910         dwarf2_per_objfile.
8911         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
8912         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
8913         (dw2_print_stats): Likewise.
8914         (dw2_dump): Likewise.
8915         (dw2_expand_symtabs_for_function): Likewise.
8916         (dw2_expand_all_symtabs): Likewise.
8917         (dw2_expand_symtabs_with_fullname): Likewise.
8918         (dw2_expand_marked_cus): Replace index and objfile parameters
8919         with dwarf2_per_objfile.
8920         (dw_expand_symtabs_matching_file_matcher): Add
8921         dwarf2_per_objfile parameter and adjust calls.
8922         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
8923         adjust calls.
8924         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
8925         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
8926         adjust calls.
8927         (create_cus_from_debug_names_list): Replace objfile parameter
8928         with dwarf2_per_objfile and adjust calls.
8929         (create_cus_from_debug_names): Likewise.
8930         (dwarf2_read_debug_names): Likewise.
8931         (mapped_debug_names::namei_to_name): Adjust call.
8932         (dw2_debug_names_iterator::next): Likewise.
8933         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
8934         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
8935         (dw2_debug_names_dump): Likewise.
8936         (dw2_debug_names_expand_symtabs_for_function): Likewise.
8937         (dw2_debug_names_expand_symtabs_matching): Likewise.
8938         (dwarf2_initialize_objfile): Likewise.
8939         (dwarf2_build_psymtabs): Likewise.
8940         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
8941         this_cu.
8942         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
8943         (read_and_check_comp_unit_head): Likewise.
8944         (read_abbrev_offset): Likewise.
8945         (create_debug_type_hash_table): Likewise.
8946         (create_debug_types_hash_table): Likewise.
8947         (create_all_type_units): Replace objfile parameter with
8948         dwarf2_per_objfile.
8949         (add_type_unit): Add dwarf2_per_objfile parameter.
8950         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
8951         with dwarf2_per_objfile.
8952         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
8953         (lookup_dwp_signatured_type): Likewise.
8954         (lookup_signatured_type): Likewise.
8955         (read_cutu_die_from_dwo): Likewise.
8956         (init_tu_and_read_dwo_dies): Likewise.
8957         (init_cutu_and_read_dies): Likewise.
8958         (init_cutu_and_read_dies_no_follow): Likewise.
8959         (allocate_type_unit_groups_table): Add objfile parameter.
8960         (create_type_unit_group): Use dwarf2_per_objfile from cu.
8961         (get_type_unit_group): Likewise.
8962         (process_psymtab_comp_unit): Update call.
8963         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
8964         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
8965         (print_tu_stats): Likewise.
8966         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
8967         in void* parameter.
8968         (build_type_psymtabs): Change objfile parameter to
8969         dwarf2_per_objfile.
8970         (process_skeletonless_type_unit): Use dwarf2_per_objfile
8971         passed in void* parameter.
8972         (process_skeletonless_type_units): Change objfile parameter to
8973         dwarf2_per_objfile.
8974         (set_partial_user): Likewise.
8975         (dwarf2_build_psymtabs_hard): Likewise.
8976         (read_comp_units_from_section): Likewise.
8977         (create_all_comp_units): Likewise.
8978         (scan_partial_symbols): Update calls.
8979         (add_partial_symbol): Likewise.
8980         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
8981         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
8982         (process_queue): Add dwarf2_per_objfile parameter.
8983         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
8984         (compute_compunit_symtab_includes): Likewise.
8985         (process_cu_includes): Add dwarf2_per_objfile parameter.
8986         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
8987         (process_full_type_unit): Likewise.
8988         (process_imported_unit_die): Update call.
8989         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
8990         (read_file_scope): Likewise.
8991         (allocate_dwo_file_hash_table): Add objfile parameter.
8992         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
8993         (create_cus_hash_table): Likewise.
8994         (create_dwp_hash_table): Likewise.
8995         (create_dwo_unit_in_dwp_v1): Likewise.
8996         (create_dwp_v2_section): Likewise.
8997         (create_dwo_unit_in_dwp_v2): Likewise.
8998         (lookup_dwo_unit_in_dwp): Likewise.
8999         (try_open_dwop_file): Likewise.
9000         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9001         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9002         cleanup to include a reference to dwarf2_per_objfile.
9003         (open_dwp_file): Add dwarf2_per_objfile parameter.
9004         (open_and_init_dwp_file): Likewise.
9005         (get_dwp_file): Likewise.
9006         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9007         (queue_and_load_all_dwo_tus): Update call.
9008         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9009         data.
9010         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9011         (dwarf2_ranges_process): Likewise.
9012         (dwarf2_get_pc_bounds): Likewise.
9013         (mark_common_block_symbol_computed): Likewise.
9014         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9015         (dwarf2_read_abbrevs): Update call.
9016         (read_partial_die): Use dwarf2_per_objfile from cu.
9017         (find_partial_die): Likewise.
9018         (fixup_partial_die): Likewise.
9019         (read_attribute_value): Likewise.
9020         (read_indirect_string_at_offset_from): Add objfile parameter.
9021         (read_indirect_string_at_offset): Add dwarf2_per_objfile
9022         parameter.
9023         (read_indirect_string_from_dwz): Add objfile parameter.
9024         (read_indirect_string): Add objfile parameter.
9025         (read_addr_index_1): Add dwarf2_per_objfile parameter.
9026         (read_addr_index): Use dwarf2_per_objfile from cu.
9027         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9028         call dw2_setup.
9029         (read_str_index): Use dwarf2_per_objfile from cu.
9030         (get_debug_line_section): Likewise.
9031         (read_formatted_entries): Add dwarf2_per_objfile parameter.
9032         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9033         (new_symbol_full): Use dwarf2_per_objfile from cu.
9034         (build_error_marker_type): Likewise.
9035         (lookup_die_type): Likewise.
9036         (determine_prefix): Likewise.
9037         (follow_die_offset): Likewise.
9038         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9039         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9040         (dwarf2_fetch_die_type_sect_off): Likewise.
9041         (dwarf2_get_die_type): Likewise.
9042         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9043         (get_signatured_type): Likewise.
9044         (get_DW_AT_signature_type): Likewise.
9045         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9046         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9047         (cu_debug_loc_section): Likewise.
9048         (fill_in_loclist_baton): Likewise.
9049         (dwarf2_symbol_mark_computed): Likewise.
9050         (dwarf2_find_containing_comp_unit): Change objfile parameter to
9051         dwarf2_per_objfile.
9052         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9053         parameter.
9054         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9055         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9056         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9057         (set_die_type): Use dwarf2_free_objfile from cu.
9058         (get_die_type_at_offset): Likewise.
9059         (dwarf2_per_objfile_free): Don't assign global variable.
9060         (debug_names) <constructor>: Add dwarf2_per_objfile
9061         parameter, update m_debugstrlookup construction.
9062         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9063         parameter.
9064         <m_dwarf2_per_objfile>: New field.
9065         <lookup>: Use m_dwarf2_per_objfile.
9066         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9067         (psyms_seen_size): Likewise.
9068         (write_gdbindex): Replace objfile parameter with
9069         dwarf2_per_objfile.
9070         (write_debug_names): Likewise.
9071         (write_psymtabs_to_index): Likewise.
9072         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9073         calls.
9074
9075 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
9076
9077         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9078         <dwarf2_per_objfile>: New field.
9079         (struct dwarf2_per_cu_data) <objfile>: Remove.
9080         <dwarf2_per_objfile>: New field.
9081         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9082         of objfile.
9083         (create_signatured_type_table_from_index): Likewise.
9084         (create_debug_type_hash_table): Likewise.
9085         (fill_in_sig_entry_from_dwo_entry): Likewise.
9086         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9087         (create_type_unit_group): Assign dwarf2_per_objfile instead of
9088         objfile.
9089         (create_partial_symtab): Access objfile through
9090         dwarf2_per_objfile.
9091         (process_psymtab_comp_unit_reader): Likewise.
9092         (read_comp_units_from_section): Likewise.
9093         (scan_partial_symbols): Likewise.
9094         (add_partial_symbol): Likewise.
9095         (add_partial_subprogram): Likewise.
9096         (peek_die_abbrev): Likewise.
9097         (fixup_go_packaging): Likewise.
9098         (process_full_comp_unit): Likewise.
9099         (process_full_type_unit): Likewise.
9100         (process_imported_unit_die): Likewise.
9101         (dwarf2_compute_name): Likewise.
9102         (dwarf2_physname): Likewise.
9103         (read_import_statement): Likewise.
9104         (create_cus_hash_table): Assign dwarf2_physname instead of
9105         objfile.
9106         (read_func_scope): Access objfile through dwarf2_per_objfile.
9107         (read_lexical_block_scope): Likewise.
9108         (read_call_site_scope): Likewise.
9109         (read_variable): Likewise.
9110         (dwarf2_rnglists_process): Likewise.
9111         (dwarf2_ranges_process): Likewise.
9112         (dwarf2_ranges_read): Likewise.
9113         (dwarf2_record_block_ranges): Likewise.
9114         (dwarf2_add_field): Likewise.
9115         (dwarf2_add_member_fn): Likewise.
9116         (read_structure_type): Likewise.
9117         (process_structure_scope): Likewise.
9118         (read_enumeration_type): Likewise.
9119         (read_array_type): Likewise.
9120         (read_common_block): Likewise.
9121         (read_namespace_type): Likewise.
9122         (read_namespace): Likewise.
9123         (read_module_type): Likewise.
9124         (read_tag_pointer_type): Likewise.
9125         (read_tag_ptr_to_member_type): Likewise.
9126         (read_tag_string_type): Likewise.
9127         (read_subroutine_type): Likewise.
9128         (read_typedef): Likewise.
9129         (read_base_type): Likewise.
9130         (attr_to_dynamic_prop): Likewise.
9131         (read_subrange_type): Likewise.
9132         (read_unspecified_type): Likewise.
9133         (load_partial_dies): Likewise.
9134         (read_partial_die): Likewise.
9135         (find_partial_die): Likewise.
9136         (guess_partial_die_structure_name): Likewise.
9137         (fixup_partial_die): Likewise.
9138         (read_attribute_value): Likewise.
9139         (read_addr_index_from_leb128): Likewise.
9140         (dwarf2_read_addr_index): Likewise.
9141         (dwarf2_string_attr): Likewise.
9142         (lnp_state_machine::check_line_address): Likewise.
9143         (dwarf_decode_lines_1): Likewise.
9144         (dwarf_decode_lines): Likewise.
9145         (dwarf2_start_symtab): Likewise.
9146         (var_decode_location): Likewise.
9147         (new_symbol_full): Likewise.
9148         (dwarf2_const_value_data): Likewise.
9149         (dwarf2_const_value_attr): Likewise.
9150         (dwarf2_const_value): Likewise.
9151         (die_type): Likewise.
9152         (die_containing_type): Likewise.
9153         (lookup_die_type): Likewise.
9154         (guess_full_die_structure_name): Likewise.
9155         (anonymous_struct_prefix): Likewise.
9156         (dwarf2_name): Likewise.
9157         (follow_die_ref_or_sig): Likewise.
9158         (follow_die_offset): Likewise.
9159         (follow_die_ref): Likewise.
9160         (dwarf2_fetch_die_loc_sect_off): Likewise.
9161         (dwarf2_fetch_constant_bytes): Likewise.
9162         (dwarf2_fetch_die_type_sect_off): Likewise.
9163         (dwarf2_get_die_type): Likewise.
9164         (follow_die_sig): Likewise.
9165         (decode_locdesc): Likewise.
9166         (dwarf2_per_cu_objfile): Likewise.
9167         (dwarf2_per_cu_text_offset): Likewise.
9168         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9169         objfile.
9170         (set_die_type): Access objfile through
9171         dwarf2_per_objfile.
9172
9173 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
9174
9175         * valprint.c (converted_character_d): Remove typedef.
9176         (DEF_VEC_O (converted_character_d)): Remove.
9177         (count_next_character): Use std::vector.
9178         (print_converted_chars_to_obstack): Likewise.
9179         (generic_printstr): Likewise.
9180
9181 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
9182
9183         * xml-support.h (struct gdb_xml_value): Add constructor.
9184         <value>: Change type to unique_xmalloc_ptr.
9185         (gdb_xml_value_s): Remove typedef.
9186         (DEF_VEC_O (gdb_xml_value_s)): Remove.
9187         (gdb_xml_element_start_handler): Change parameter type to
9188         std::vector.
9189         (xml_find_attribute): Likewise.
9190         * xml-support.c (xml_find_attribute): Change parameter type to
9191         std::vector and adjust.
9192         (gdb_xml_values_cleanup): Remove.
9193         (gdb_xml_parser::start_element): Adjust to std::vector.
9194         (xinclude_start_include): Change paraeter type to std::vector
9195         and adjust.
9196         * btrace.c (check_xml_btrace_version): Likewise.
9197         (parse_xml_btrace_block): Likewise.
9198         (parse_xml_btrace_pt_config_cpu): Likewise.
9199         (parse_xml_btrace_pt): Likewise.
9200         (parse_xml_btrace_conf_bts): Likewise.
9201         (parse_xml_btrace_conf_pt): Likewise.
9202         * memory-map.c (memory_map_start_memory): Likewise.
9203         (memory_map_start_property): Likewise.
9204         * osdata.c (osdata_start_osdata): Likewise.
9205         (osdata_start_item): Likewise.
9206         (osdata_start_column): Likewise.
9207         * remote.c (start_thread): Likewise.
9208         * solib-aix.c (library_list_start_library): Likewise.
9209         (library_list_start_list): Likewise.
9210         * solib-svr4.c (library_list_start_library): Likewise.
9211         (svr4_library_list_start_list): Likewise.
9212         * solib-target.c (library_list_start_segment): Likewise.
9213         (library_list_start_section): Likewise.
9214         (library_list_start_library): Likewise.
9215         (library_list_start_list): Likewise.
9216         * tracepoint.c (traceframe_info_start_memory): Likewise.
9217         (traceframe_info_start_tvar): Likewise.
9218         * xml-syscall.c (syscall_start_syscall): Likewise.
9219         * xml-tdesc.c (tdesc_start_target): Likewise.
9220         (tdesc_start_feature): Likewise.
9221         (tdesc_start_reg): Likewise.
9222         (tdesc_start_union): Likewise.
9223         (tdesc_start_struct): Likewise.
9224         (tdesc_start_flags): Likewise.
9225         (tdesc_start_enum): Likewise.
9226         (tdesc_start_field): Likewise.
9227         (tdesc_start_enum_value): Likewise.
9228         (tdesc_start_vector): Likewise.
9229
9230 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
9231
9232         * extension.h (struct xmethod_worker) <clone>: Remove.
9233         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9234         Remove.
9235         (python_xmethod_worker::clone): Remove.
9236         * valops.c (find_overload_match): Use std::move instead of
9237         clone.
9238
9239 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
9240
9241         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9242         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9243         <free_xmethod_worker_data>: Remove.
9244         <get_matching_xmethod_workers>: Chance VEC to std::vector.
9245         <get_xmethod_arg_types>: Remove.
9246         <get_xmethod_result_type>: Remove.
9247         <invoke_xmethod>: Remove.
9248         * extension.c (new_xmethod_worker): Remove.
9249         (clone_xmethod_worker): Remove.
9250         (get_matching_xmethod_workers): Return void, pass std::vector by
9251         pointer.
9252         (get_xmethod_arg_types): Rename to...
9253         (xmethod_worker::get_arg_types): ... this, and adjust.
9254         (get_xmethod_result_type): Rename to...
9255         (xmethod_worker::get_result_type): ... this, and adjust.
9256         (invoke_xmethod): Remove.
9257         (free_xmethod_worker): Remove.
9258         (free_xmethod_worker_vec): Remove.
9259         * extension.h (enum ext_lang_rc): Move here from
9260         extension-priv.h.
9261         (struct xmethod_worker): Add constructor and destructor.
9262         <data>: Remove.
9263         <value>: Remove.
9264         <invoke, clone, do_get_result_type, do_get_arg_types>: New
9265         virtual pure methods.
9266         <get_arg_types, get_result_type>: New methods.
9267         (xmethod_worker_ptr): Remove typedef.
9268         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9269         (xmethod_worker_vec): Remove typedef.
9270         (xmethod_worker_up): New typedef.
9271         (invoke_xmethod): Remove.
9272         (clone_xmethod_worker): Remove.
9273         (free_xmethod_worker): Remove.
9274         (free_xmethod_worker_vec): Remove.
9275         (get_xmethod_arg_types): Remove.
9276         (get_xmethod_result_type): Remove.
9277         * valops.c (find_method_list): Use std::vector, don't use
9278         intermediate vector.
9279         (value_find_oload_method_list): Use std::vector.
9280         (find_overload_match): Use std::vector.
9281         (find_oload_champ): Use std::vector.
9282         * value.c (value_free): Use operator delete.
9283         (value_of_xmethod): Rename to...
9284         (value_from_xmethod): ... this.  Don't assign
9285         xmethod_worker::value, take rvalue-reference.
9286         (result_type_of_xmethod): Adjust.
9287         (call_xmethod): Adjust.
9288         * value.h: Include extension.h.
9289         (struct xmethod_worker): Don't forward-declare.
9290         (value_of_xmethod): Rename to...
9291         (value_from_xmethod): ... this, take rvalue-reference.
9292         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9293         (struct python_xmethod_worker): ... this, add constructor and
9294         destructor.
9295         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9296         (gdbpy_free_xmethod_worker_data): Rename to...
9297         (python_xmethod_worker::~python_xmethod_worker): ... this and
9298         adjust.
9299         (gdbpy_clone_xmethod_worker_data): Rename to...
9300         (python_xmethod_worker::clone): ... this and adjust.
9301         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9302         temporary vector.
9303         (gdbpy_get_xmethod_arg_types): Rename to...
9304         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9305         (gdbpy_get_xmethod_result_type): Rename to...
9306         (python_xmethod_worker::do_get_result_type): ... this and
9307         adjust.
9308         (gdbpy_invoke_xmethod): Rename to...
9309         (python_xmethod_worker::invoke): ... this and adjust.
9310         (new_python_xmethod_worker): Rename to...
9311         (python_xmethod_worker::python_xmethod_worker): ... this and
9312         adjust.
9313         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9314         Remove.
9315         (gdbpy_free_xmethod_worker_data): Remove.
9316         (gdbpy_get_matching_xmethod_workers): Use std::vector.
9317         (gdbpy_get_xmethod_arg_types): Remove.
9318         (gdbpy_get_xmethod_result_type): Remove.
9319         (gdbpy_invoke_xmethod): Remove.
9320         * python/python.c (python_extension_ops): Remove obsolete
9321         callbacks.
9322
9323 2018-01-05  Pedro Alves  <palves@redhat.com>
9324
9325         PR gdb/18653
9326         * common/signals-state-save-restore.c
9327         (save_original_signals_state): New parameter 'quiet'.  Warn if we
9328         find a custom handler preinstalled, instead of internal erroring.
9329         But only warn if !quiet.
9330         * common/signals-state-save-restore.h
9331         (save_original_signals_state): New parameter 'quiet'.
9332         * main.c (captured_main_1): Move save_original_signals_state call
9333         after option handling, and pass QUIET.
9334
9335 2018-01-05  Pedro Alves  <palves@redhat.com>
9336
9337         * spu-tdep.c (spu_catch_start): Pass
9338         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9339
9340 2018-01-05  Pedro Alves  <palves@redhat.com>
9341
9342         PR gdb/22670
9343         * ada-lang.c (literal_symbol_name_matcher): New function.
9344         (ada_get_symbol_name_matcher): Use it for
9345         symbol_name_match_type::SEARCH_NAME.
9346         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
9347         it down instead of assuming symbol_name_match_type::FULL.
9348         * block.h (block_lookup_symbol): New parameter 'match_type'.
9349         * c-valprint.c (print_unpacked_pointer): Use
9350         lookup_symbol_search_name instead of lookup_symbol.
9351         * compile/compile-object-load.c (get_out_value_type): Pass down
9352         symbol_name_match_type::SEARCH_NAME.
9353         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9354         symbol_name_match_type::FULL.
9355         * cp-support.c (cp_get_symbol_name_matcher): Handle
9356         symbol_name_match_type::SEARCH_NAME.
9357         * infrun.c (insert_exception_resume_breakpoint): Use
9358         lookup_symbol_search_name.
9359         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9360         * psymtab.c (maintenance_check_psymtabs): Use
9361         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9362         * stack.c (print_frame_args): Use lookup_symbol_search_name and
9363         SYMBOL_SEARCH_NAME.
9364         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9365         if symbol_name_match_type::SEARCH_NAME.
9366         (lookup_symbol_in_language): Pass down
9367         symbol_name_match_type::FULL.
9368         (lookup_symbol_search_name): New.
9369         (lookup_language_this): Pass down
9370         symbol_name_match_type::SEARCH_NAME.
9371         (lookup_symbol_aux, lookup_local_symbol): New parameter
9372         'match_type'.  Pass it down.
9373         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9374         (lookup_symbol_search_name): New declaration.
9375         (lookup_symbol_in_block): New 'match_type' parameter.
9376
9377 2018-01-05  Pedro Alves  <palves@redhat.com>
9378
9379         PR gdb/22670
9380         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9381         ada_lookup_symbol.
9382         (ada_lookup_symbol): Reimplement in terms of
9383         ada_lookup_symbol_list, bits factored out from
9384         ada_lookup_encoded_symbol.
9385
9386 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
9387
9388         * ada-exp.y (write_object_renaming): When subscripting an array
9389         using a symbol as the index, pass the block in call to
9390         ada_lookup_encoded_symbol when looking that symbol up.
9391
9392 2018-01-05  Jerome Guitton  <guitton@adacore.com>
9393
9394         * ada-lang.c (ada_array_length): Use ada_index_type instead of
9395         TYPE_INDEX_TYPE.
9396
9397 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
9398
9399         * ada-lang.c (ada_to_fixed_value_create): Add handling of
9400         the case where VALUE_LVAL (val0) is not lval_memory.
9401
9402 2018-01-05  Xavier Roirand  <roirand@adacore.com>
9403
9404         * ada-valprint.c (print_optional_low_bound): Handle
9405         character-indexed array printing like boolean-indexed array
9406         printing.
9407
9408 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
9409
9410         * NEWS: Create a new section for the next release branch.
9411         Rename the section of the current branch, now that it has
9412         been cut.
9413
9414 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
9415
9416         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9417         * version.in: Bump version to 8.1.50.DATE-git.
9418
9419 2018-01-03  Xavier Roirand  <roirand@adacore.com>
9420
9421         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9422         Add field.
9423         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9424         Add field.
9425         (default_exception_support_info) <catch_handlers_sym>: Add field.
9426         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9427         (ada_exception_name_addr_1): Add "catch handlers" handling.
9428         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9429         Update all callers.
9430         (create_excep_cond_exprs) <ex>: Add parameter.
9431         (re_set_exception): Update create_excep_cond_exprs call.
9432         (print_it_exception, print_one_exception, print_mention_exception)
9433         (print_recreate_exception): Add "catch handler" handling.
9434         (allocate_location_catch_handlers, re_set_catch_handlers)
9435         (check_status_catch_handlers, print_it_catch_handlers)
9436         (print_one_catch_handlers, print_mention_catch_handlers)
9437         (print_recreate_catch_handlers): New function.
9438         (catch_handlers_breakpoint_ops): New variable.
9439         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9440         Add parameter.  Add "catch handler" handling.
9441         (ada_exception_sym_name, ada_exception_breakpoint_ops):
9442         Add "catch handler" handling.
9443         (ada_exception_catchpoint_cond_string): Add "catch handler"
9444         handling.
9445         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9446         call.
9447         (catch_ada_handlers_command): New function.
9448         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9449         operations structure.
9450         (_initialize_ada_language): Add "catch handlers" command entry.
9451         * NEWS: Document "catch handlers" feature.
9452
9453 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
9454
9455         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9456         account when creating the array type of the slice.
9457         (ada_value_slice): Likewise.
9458
9459 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
9460
9461         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
9462         New enum value.
9463         (create_array_type_with_stride): Add byte_stride_prop parameter.
9464         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
9465         New parameter.  Update all callers in this file.
9466         (array_type_has_dynamic_stride): New function.
9467         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
9468         of arrays with dynamic byte strides.
9469         * dwarf2read.c (read_array_type): Add support for dynamic
9470         DW_AT_byte_stride attributes.
9471
9472 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
9473
9474         * dwarf2read.c (read_unspecified_type): Treat
9475         DW_TAG_enumeration_type DIEs from Ada units as stubs.
9476
9477 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
9478
9479         Update copyright year range in all GDB files.
9480
9481 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
9482
9483         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
9484         and gdb/testsuite/gdb.base/step-line.c.
9485
9486 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
9487
9488         * copyright.py (main): Dump the contents of
9489         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
9490         even if BY_HAND is empty.
9491
9492 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
9493
9494         * top.c (print_gdb_version): Update Copyright year in version
9495         message.
9496
9497 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
9498
9499         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
9500
9501 For older changes see ChangeLog-2017.
9502 \f
9503 Local Variables:
9504 mode: change-log
9505 left-margin: 8
9506 fill-column: 74
9507 version-control: never
9508 coding: utf-8
9509 End: