5b79d6f445315113239db93fbc29010de5d76953
[external/binutils.git] / gdb / ChangeLog
1 2018-05-02  Pedro Alves  <palves@redhat.com>
2             John Baldwin  <jhb@freebsd.org>
3
4         * target.h (enum strata) <debug_stratum>: New.
5         (struct target_ops) <all delegation methods>: Replace by C++
6         virtual methods, and drop "to_" prefix.  All references updated
7         throughout.
8         <to_shortname, to_longname, to_doc, to_data,
9         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
11         virtual methods.  All references updated throughout.
12         <can_attach, supports_terminal_ours, can_create_inferior,
13         get_thread_control_capabilities, attach_no_wait>: New
14         virtual methods.
15         <insert_breakpoint, remove_breakpoint>: Now
16         TARGET_DEFAULT_NORETURN methods.
17         <info_proc>: Now returns bool.
18         <to_magic>: Delete.
19         (OPS_MAGIC): Delete.
20         (current_target): Delete.  All references replaced by references
21         to ...
22         (target_stack): ... this.  New.
23         (target_shortname, target_longname): Adjust.
24         (target_can_run): Now a function declaration.
25         (default_child_has_all_memory, default_child_has_memory)
26         (default_child_has_stack, default_child_has_registers)
27         (default_child_has_execution): Remove target_ops parameter.
28         (complete_target_initialization): Delete.
29         (memory_breakpoint_target): New template class.
30         (test_target_ops): Refactor as a C++ class with virtual methods.
31         * make-target-delegates (NAME_PART): Tighten.
32         (POINTER_PART, CP_SYMBOL): New.
33         (SIMPLE_RETURN_PART): Reimplement.
34         (VEC_RETURN_PART): Expect less.
35         (RETURN_PART, VIRTUAL_PART): New.
36         (METHOD): Adjust to C++ virtual methods.
37         (scan_target_h): Remove reference to C99.
38         (dname): Output "target_ops::" prefix.
39         (write_function_header): Adjust to output a C++ class method.
40         (write_declaration): New.
41         (write_delegator): Adjust to output a C++ class method.
42         (tdname): Output "dummy_target::" prefix.
43         (write_tdefault, write_debugmethod): Adjust to output a C++ class
44         method.
45         (tdefault_names, debug_names): Delete.
46         (return_types, tdefaults, styles, argtypes_array): New.
47         (top level): All methods are delegators.
48         (print_class): New.
49         (top level): Print dummy_target and debug_target classes.
50         * target-delegates.c: Regenerate.
51         * target-debug.h (target_debug_print_enum_info_proc_what)
52         (target_debug_print_thread_control_capabilities)
53         (target_debug_print_thread_info_p): New.
54         * target.c (dummy_target): Delete.
55         (the_dummy_target, the_debug_target): New.
56         (target_stack): Now extern.
57         (set_targetdebug): Push/unpush debug target.
58         (default_child_has_all_memory, default_child_has_memory)
59         (default_child_has_stack, default_child_has_registers)
60         (default_child_has_execution): Remove target_ops parameter.
61         (complete_target_initialization): Delete.
62         (add_target_with_completer): No longer call
63         complete_target_initialization.
64         (target_supports_terminal_ours): Use regular delegation.
65         (update_current_target): Delete.
66         (push_target): No longer check magic number.  Don't call
67         update_current_target.
68         (unpush_target): Don't call update_current_target.
69         (target_is_pushed): No longer check magic number.
70         (target_require_runnable): Skip for all stratums over
71         process_stratum.
72         (target_ops::info_proc): New.
73         (target_info_proc): Use find_target_at and
74         find_default_run_target.
75         (target_supports_disable_randomization): Use regular delegation.
76         (target_get_osdata): Use find_target_at.
77         (target_ops::open, target_ops::close, target_ops::can_attach)
78         (target_ops::attach, target_ops::can_create_inferior)
79         (target_ops::create_inferior, target_ops::can_run)
80         (target_can_run): New.
81         (default_fileio_target): Use regular delegation.
82         (target_ops::fileio_open, target_ops::fileio_pwrite)
83         (target_ops::fileio_pread, target_ops::fileio_fstat)
84         (target_ops::fileio_close, target_ops::fileio_unlink)
85         (target_ops::fileio_readlink): New.
86         (target_fileio_open_1, target_fileio_unlink)
87         (target_fileio_readlink): Always call the target method.  Handle
88         FILEIO_ENOSYS.
89         (return_zero, return_zero_has_execution): Delete.
90         (init_dummy_target): Delete.
91         (dummy_target::dummy_target, dummy_target::shortname)
92         (dummy_target::longname, dummy_target::doc)
93         (debug_target::debug_target, debug_target::shortname)
94         (debug_target::longname, debug_target::doc): New.
95         (target_supports_delete_record): Use regular delegation.
96         (setup_target_debug): Delete.
97         (maintenance_print_target_stack): Skip debug_stratum.
98         (initialize_targets): Instantiate the_dummy_target and
99         the_debug_target.
100         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
101         use target_stack.
102         (target_auxv_search, fprint_target_auxv): Adjust.
103         (info_auxv_command): Adjust to use target_stack.
104         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
105         * exceptions.c (print_flush): Handle a NULL target_stack.
106         * regcache.c (target_ops_no_register): Refactor as class with
107         virtual methods.
108
109         * exec.c (exec_target): New class.
110         (exec_ops): Now an exec_target.
111         (exec_open, exec_close_1, exec_get_section_table)
112         (exec_xfer_partial, exec_files_info, exec_has_memory)
113         (exec_make_note_section): Refactor as exec_target methods.
114         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
115         Delete.
116         (exec_target::find_memory_regions): New.
117         (_initialize_exec): Don't call init_exec_ops.
118         * gdbcore.h (exec_file_clear): Delete.
119
120         * corefile.c (core_target): Delete.
121         (core_file_command): Adjust.
122         * corelow.c (core_target): New class.
123         (the_core_target): New.
124         (core_close): Remove target_ops parameter.
125         (core_close_cleanup): Adjust.
126         (core_target::close): New.
127         (core_open, core_detach, get_core_registers, core_files_info)
128         (core_xfer_partial, core_thread_alive, core_read_description)
129         (core_pid_to_str, core_thread_name, core_has_memory)
130         (core_has_stack, core_has_registers, core_info_proc): Rework as
131         core_target methods.
132         (ignore, core_remove_breakpoint, init_core_ops): Delete.
133         (_initialize_corelow): Initialize the_core_target.
134         * gdbcore.h (core_target): Delete.
135         (the_core_target): New.
136
137         * ctf.c: (ctf_target): New class.
138         (ctf_ops): Now a ctf_target.
139         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
140         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
141         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
142         methods.
143         (init_ctf_ops): Delete.
144         (_initialize_ctf): Don't call it.
145         * tracefile-tfile.c (tfile_target): New class.
146         (tfile_ops): Now a tfile_target.
147         (tfile_open, tfile_close, tfile_files_info)
148         (tfile_get_tracepoint_status, tfile_trace_find)
149         (tfile_fetch_registers, tfile_xfer_partial)
150         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
151         Refactor as tfile_target methods.
152         (tfile_xfer_partial_features): Remove target_ops parameter.
153         (init_tfile_ops): Delete.
154         (_initialize_tracefile_tfile): Don't call it.
155         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
156         (tracefile_has_stack, tracefile_has_registers)
157         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
158         tracefile_target methods.
159         (init_tracefile_ops): Delete.
160         (tracefile_target::tracefile_target): New.
161         * tracefile.h: Include "target.h".
162         (tracefile_target): New class.
163         (init_tracefile_ops): Delete.
164
165         * spu-multiarch.c (spu_multiarch_target): New class.
166         (spu_ops): Now a spu_multiarch_target.
167         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
168         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
169         (spu_search_memory, spu_mourn_inferior): Refactor as
170         spu_multiarch_target methods.
171         (init_spu_ops): Delete.
172         (_initialize_spu_multiarch): Remove references to init_spu_ops,
173         complete_target_initialization.
174
175         * ravenscar-thread.c (ravenscar_thread_target): New class.
176         (ravenscar_ops): Now a ravenscar_thread_target.
177         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
178         (ravenscar_thread_alive, ravenscar_pid_to_str)
179         (ravenscar_fetch_registers, ravenscar_store_registers)
180         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
181         (ravenscar_stopped_by_hw_breakpoint)
182         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
183         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
184         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
185         methods.
186         (init_ravenscar_thread_ops): Delete.
187         (_initialize_ravenscar): Remove references to
188         init_ravenscar_thread_ops and complete_target_initialization.
189
190         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
191         (bsd_uthread_target): New class.
192         (bsd_uthread_ops): Now a bsd_uthread_target.
193         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
194         (bsd_uthread_close, bsd_uthread_mourn_inferior)
195         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
196         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
197         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
198         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
199         (bsd_uthread_target): Delete function.
200         (_initialize_bsd_uthread): Remove reference to
201         complete_target_initialization.
202
203         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
204         (target_bfd): ... this new class.
205         (target_bfd_xfer_partial, target_bfd_get_section_table)
206         (target_bfd_close): Refactor as target_bfd methods.
207         (target_bfd::~target_bfd): New.
208         (target_bfd_reopen): Adjust.
209         (target_bfd::close): New.
210
211         * record-btrace.c (record_btrace_target): New class.
212         (record_btrace_ops): Now a record_btrace_target.
213         (record_btrace_open, record_btrace_stop_recording)
214         (record_btrace_disconnect, record_btrace_close)
215         (record_btrace_async, record_btrace_info)
216         (record_btrace_insn_history, record_btrace_insn_history_range)
217         (record_btrace_insn_history_from, record_btrace_call_history)
218         (record_btrace_call_history_range)
219         (record_btrace_call_history_from, record_btrace_record_method)
220         (record_btrace_is_replaying, record_btrace_will_replay)
221         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
222         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
223         (record_btrace_store_registers, record_btrace_prepare_to_store)
224         (record_btrace_to_get_unwinder)
225         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
226         (record_btrace_commit_resume, record_btrace_wait)
227         (record_btrace_stop, record_btrace_can_execute_reverse)
228         (record_btrace_stopped_by_sw_breakpoint)
229         (record_btrace_supports_stopped_by_sw_breakpoint)
230         (record_btrace_stopped_by_hw_breakpoint)
231         (record_btrace_supports_stopped_by_hw_breakpoint)
232         (record_btrace_update_thread_list, record_btrace_thread_alive)
233         (record_btrace_goto_begin, record_btrace_goto_end)
234         (record_btrace_goto, record_btrace_stop_replaying_all)
235         (record_btrace_execution_direction)
236         (record_btrace_prepare_to_generate_core)
237         (record_btrace_done_generating_core): Refactor as
238         record_btrace_target methods.
239         (init_record_btrace_ops): Delete.
240         (_initialize_record_btrace): Remove reference to
241         init_record_btrace_ops.
242         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
243         the execution_direction global.
244         (record_full_base_target, record_full_target)
245         (record_full_core_target): New classes.
246         (record_full_ops): Now a record_full_target.
247         (record_full_core_ops): Now a record_full_core_target.
248         (record_full_target::detach, record_full_target::disconnect)
249         (record_full_core_target::disconnect)
250         (record_full_target::mourn_inferior, record_full_target::kill):
251         New.
252         (record_full_open, record_full_close, record_full_async): Refactor
253         as methods of the record_full_base_target class.
254         (record_full_resume, record_full_commit_resume): Refactor
255         as methods of the record_full_target class.
256         (record_full_wait, record_full_stopped_by_watchpoint)
257         (record_full_stopped_data_address)
258         (record_full_stopped_by_sw_breakpoint)
259         (record_full_supports_stopped_by_sw_breakpoint)
260         (record_full_stopped_by_hw_breakpoint)
261         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
262         methods of the record_full_base_target class.
263         (record_full_store_registers, record_full_xfer_partial)
264         (record_full_insert_breakpoint, record_full_remove_breakpoint):
265         Refactor as methods of the record_full_target class.
266         (record_full_can_execute_reverse, record_full_get_bookmark)
267         (record_full_goto_bookmark, record_full_execution_direction)
268         (record_full_record_method, record_full_info, record_full_delete)
269         (record_full_is_replaying, record_full_will_replay)
270         (record_full_goto_begin, record_full_goto_end, record_full_goto)
271         (record_full_stop_replaying): Refactor as methods of the
272         record_full_base_target class.
273         (record_full_core_resume, record_full_core_kill)
274         (record_full_core_fetch_registers)
275         (record_full_core_prepare_to_store)
276         (record_full_core_store_registers, record_full_core_xfer_partial)
277         (record_full_core_insert_breakpoint)
278         (record_full_core_remove_breakpoint)
279         (record_full_core_has_execution): Refactor
280         as methods of the record_full_core_target class.
281         (record_full_base_target::supports_delete_record): New.
282         (init_record_full_ops): Delete.
283         (init_record_full_core_ops): Delete.
284         (record_full_save): Refactor as method of the
285         record_full_base_target class.
286         (_initialize_record_full): Remove references to
287         init_record_full_ops and init_record_full_core_ops.
288
289         * remote.c (remote_target, extended_remote_target): New classes.
290         (remote_ops): Now a remote_target.
291         (extended_remote_ops): Now an extended_remote_target.
292         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
293         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
294         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
295         (remote_pass_signals, remote_set_syscall_catchpoint)
296         (remote_program_signals, )
297         (remote_thread_always_alive): Remove target_ops parameter.
298         (remote_thread_alive, remote_thread_name)
299         (remote_update_thread_list, remote_threads_extra_info)
300         (remote_static_tracepoint_marker_at)
301         (remote_static_tracepoint_markers_by_strid)
302         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
303         (remote_open): Refactor as methods of remote_target.
304         (extended_remote_open, extended_remote_detach)
305         (extended_remote_attach, extended_remote_post_attach):
306         (extended_remote_supports_disable_randomization)
307         (extended_remote_create_inferior): : Refactor as method of
308         extended_remote_target.
309         (remote_set_permissions, remote_open_1, remote_detach)
310         (remote_follow_fork, remote_follow_exec, remote_disconnect)
311         (remote_resume, remote_commit_resume, remote_stop)
312         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
313         (remote_terminal_ours, remote_wait, remote_fetch_registers)
314         (remote_prepare_to_store, remote_store_registers)
315         (remote_flash_erase, remote_flash_done, remote_files_info)
316         (remote_kill, remote_mourn, remote_insert_breakpoint)
317         (remote_remove_breakpoint, remote_insert_watchpoint)
318         (remote_watchpoint_addr_within_range)
319         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
320         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
321         (remote_supports_stopped_by_sw_breakpoint)
322         (remote_stopped_by_hw_breakpoint)
323         (remote_supports_stopped_by_hw_breakpoint)
324         (remote_stopped_by_watchpoint, remote_stopped_data_address)
325         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
326         (remote_verify_memory): Refactor as methods of remote_target.
327         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
328         parameter.
329         (remote_xfer_partial, remote_get_memory_xfer_limit)
330         (remote_search_memory, remote_rcmd, remote_memory_map)
331         (remote_pid_to_str, remote_get_thread_local_address)
332         (remote_get_tib_address, remote_read_description): Refactor as
333         methods of remote_target.
334         (remote_target::fileio_open, remote_target::fileio_pwrite)
335         (remote_target::fileio_pread, remote_target::fileio_close): New.
336         (remote_hostio_readlink, remote_hostio_fstat)
337         (remote_filesystem_is_local, remote_can_execute_reverse)
338         (remote_supports_non_stop, remote_supports_disable_randomization)
339         (remote_supports_multi_process, remote_supports_cond_breakpoints)
340         (remote_supports_enable_disable_tracepoint)
341         (remote_supports_string_tracing)
342         (remote_can_run_breakpoint_commands, remote_trace_init)
343         (remote_download_tracepoint, remote_can_download_tracepoint)
344         (remote_download_trace_state_variable, remote_enable_tracepoint)
345         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
346         (remote_trace_start, remote_get_trace_status)
347         (remote_get_tracepoint_status, remote_trace_stop)
348         (remote_trace_find, remote_get_trace_state_variable_value)
349         (remote_save_trace_data, remote_get_raw_trace_data)
350         (remote_set_disconnected_tracing, remote_core_of_thread)
351         (remote_set_circular_trace_buffer, remote_traceframe_info)
352         (remote_get_min_fast_tracepoint_insn_len)
353         (remote_set_trace_buffer_size, remote_set_trace_notes)
354         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
355         (remote_disable_btrace, remote_teardown_btrace)
356         (remote_read_btrace, remote_btrace_conf)
357         (remote_augmented_libraries_svr4_read, remote_load)
358         (remote_pid_to_exec_file, remote_can_do_single_step)
359         (remote_execution_direction, remote_thread_handle_to_thread_info):
360         Refactor as methods of remote_target.
361         (init_remote_ops, init_extended_remote_ops): Delete.
362         (remote_can_async_p, remote_is_async_p, remote_async)
363         (remote_thread_events, remote_upload_tracepoints)
364         (remote_upload_trace_state_variables): Refactor as methods of
365         remote_target.
366         (_initialize_remote): Remove references to init_remote_ops and
367         init_extended_remote_ops.
368
369         * remote-sim.c (gdbsim_target): New class.
370         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
371         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
372         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
373         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
374         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
375         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
376         Refactor as methods of gdbsim_target.
377         (gdbsim_ops): Now a gdbsim_target.
378         (init_gdbsim_ops): Delete.
379         (gdbsim_cntrl_c): Adjust.
380         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
381
382         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
383         (the_amd64_linux_nat_target): New.
384         (amd64_linux_fetch_inferior_registers)
385         (amd64_linux_store_inferior_registers): Refactor as methods of
386         amd64_linux_nat_target.
387         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
388         * i386-linux-nat.c: Don't include "linux-nat.h".
389         (i386_linux_nat_target): New class.
390         (the_i386_linux_nat_target): New.
391         (i386_linux_fetch_inferior_registers)
392         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
393         as methods of i386_linux_nat_target.
394         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
395         * inf-child.c (inf_child_ops): Delete.
396         (inf_child_fetch_inferior_registers)
397         (inf_child_store_inferior_registers): Delete.
398         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
399         methods of inf_child_target.
400         (inf_child_target::supports_terminal_ours)
401         (inf_child_target::terminal_init)
402         (inf_child_target::terminal_inferior)
403         (inf_child_target::terminal_ours_for_output)
404         (inf_child_target::terminal_ours, inf_child_target::interrupt)
405         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
406         New.
407         (inf_child_open, inf_child_disconnect, inf_child_close)
408         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
409         (inf_child_post_startup_inferior, inf_child_can_run)
410         (inf_child_pid_to_exec_file): Refactor as methods of
411         inf_child_target.
412         (inf_child_follow_fork): Delete.
413         (inf_child_target::can_create_inferior)
414         (inf_child_target::can_attach): New.
415         (inf_child_target::has_all_memory, inf_child_target::has_memory)
416         (inf_child_target::has_stack, inf_child_target::has_registers)
417         (inf_child_target::has_execution): New.
418         (inf_child_fileio_open, inf_child_fileio_pwrite)
419         (inf_child_fileio_pread, inf_child_fileio_fstat)
420         (inf_child_fileio_close, inf_child_fileio_unlink)
421         (inf_child_fileio_readlink, inf_child_use_agent)
422         (inf_child_can_use_agent): Refactor as methods of
423         inf_child_target.
424         (return_zero, inf_child_target): Delete.
425         (inf_child_target::inf_child_target): New.
426         * inf-child.h: Include "target.h".
427         (inf_child_target): Delete function prototype.
428         (inf_child_target): New class.
429         (inf_child_open_target, inf_child_mourn_inferior)
430         (inf_child_maybe_unpush_target): Delete.
431         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
432         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
433         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
434         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
435         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
436         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
437         (inf_ptrace_wait, inf_ptrace_xfer_partial)
438         (inf_ptrace_thread_alive, inf_ptrace_files_info)
439         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
440         methods of inf_ptrace_target.
441         (inf_ptrace_target): Delete function.
442         * inf-ptrace.h: Include "inf-child.h".
443         (inf_ptrace_target): Delete function declaration.
444         (inf_ptrace_target): New class.
445         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
446         * linux-nat.c (linux_target): New.
447         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
448         (linux_nat_target::~linux_nat_target): New.
449         (linux_child_post_attach, linux_child_post_startup_inferior)
450         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
451         (linux_child_remove_fork_catchpoint)
452         (linux_child_insert_vfork_catchpoint)
453         (linux_child_remove_vfork_catchpoint)
454         (linux_child_insert_exec_catchpoint)
455         (linux_child_remove_exec_catchpoint)
456         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
457         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
458         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
459         (linux_nat_stopped_data_address)
460         (linux_nat_stopped_by_sw_breakpoint)
461         (linux_nat_supports_stopped_by_sw_breakpoint)
462         (linux_nat_stopped_by_hw_breakpoint)
463         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
464         (linux_nat_kill, linux_nat_mourn_inferior)
465         (linux_nat_xfer_partial, linux_nat_thread_alive)
466         (linux_nat_update_thread_list, linux_nat_pid_to_str)
467         (linux_nat_thread_name, linux_child_pid_to_exec_file)
468         (linux_child_static_tracepoint_markers_by_strid)
469         (linux_nat_is_async_p, linux_nat_can_async_p)
470         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
471         (linux_nat_supports_multi_process)
472         (linux_nat_supports_disable_randomization, linux_nat_async)
473         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
474         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
475         (linux_nat_fileio_open, linux_nat_fileio_readlink)
476         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
477         methods of linux_nat_target.
478         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
479         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
480         parameter.
481         (check_stopped_by_watchpoint): Adjust.
482         (linux_xfer_partial): Delete.
483         (linux_target_install_ops, linux_target, linux_nat_add_target):
484         Delete.
485         (linux_nat_target::linux_nat_target): New.
486         * linux-nat.h: Include "inf-ptrace.h".
487         (linux_nat_target): New.
488         (linux_target, linux_target_install_ops, linux_nat_add_target):
489         Delete function declarations.
490         (linux_target): Declare global.
491         * linux-thread-db.c (thread_db_target): New.
492         (thread_db_target::thread_db_target): New.
493         (thread_db_ops): Delete.
494         (the_thread_db_target): New.
495         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
496         (thread_db_update_thread_list, thread_db_pid_to_str)
497         (thread_db_extra_thread_info)
498         (thread_db_thread_handle_to_thread_info)
499         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
500         (thread_db_resume): Refactor as methods of thread_db_target.
501         (init_thread_db_ops): Delete.
502         (_initialize_thread_db): Remove reference to init_thread_db_ops.
503         * x86-linux-nat.c: Don't include "linux-nat.h".
504         (super_post_startup_inferior): Delete.
505         (x86_linux_nat_target::~x86_linux_nat_target): New.
506         (x86_linux_child_post_startup_inferior)
507         (x86_linux_read_description, x86_linux_enable_btrace)
508         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
509         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
510         methods of x86_linux_nat_target.
511         (x86_linux_create_target): Delete.  Bits folded ...
512         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
513         pointer.
514         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
515         (x86_linux_nat_target): New class.
516         (x86_linux_create_target): Delete.
517         (x86_linux_add_target): Now takes a linux_nat_target pointer.
518         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
519         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
520         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
521         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
522         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
523         make extern.
524         (x86_use_watchpoints): Delete.
525         * x86-nat.h: Include "breakpoint.h" and "target.h".
526         (x86_use_watchpoints): Delete.
527         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
528         (x86_stopped_by_watchpoint, x86_stopped_data_address)
529         (x86_insert_watchpoint, x86_remove_watchpoint)
530         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
531         (x86_stopped_by_hw_breakpoint): New declarations.
532         (x86_nat_target): New template class.
533
534         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
535         (the_ppc_linux_nat_target): New.
536         (ppc_linux_fetch_inferior_registers)
537         (ppc_linux_can_use_hw_breakpoint)
538         (ppc_linux_region_ok_for_hw_watchpoint)
539         (ppc_linux_ranged_break_num_registers)
540         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
541         (ppc_linux_insert_mask_watchpoint)
542         (ppc_linux_remove_mask_watchpoint)
543         (ppc_linux_can_accel_watchpoint_condition)
544         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
545         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
546         (ppc_linux_watchpoint_addr_within_range)
547         (ppc_linux_masked_watch_num_registers)
548         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
549         (ppc_linux_read_description): Refactor as methods of
550         ppc_linux_nat_target.
551         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
552
553         * procfs.c (procfs_xfer_partial): Delete forward declaration.
554         (procfs_target): New class.
555         (the_procfs_target): New.
556         (procfs_target): Delete function.
557         (procfs_auxv_parse, procfs_attach, procfs_detach)
558         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
559         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
560         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
561         (procfs_create_inferior, procfs_update_thread_list)
562         (procfs_thread_alive, procfs_pid_to_str)
563         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
564         (procfs_stopped_data_address, procfs_insert_watchpoint)
565         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
566         (proc_find_memory_regions, procfs_info_proc)
567         (procfs_make_note_section): Refactor as methods of procfs_target.
568         (_initialize_procfs): Adjust.
569         * sol-thread.c (sol_thread_target): New class.
570         (sol_thread_ops): Now a sol_thread_target.
571         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
572         (sol_thread_fetch_registers, sol_thread_store_registers)
573         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
574         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
575         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
576         (init_sol_thread_ops): Delete.
577         (_initialize_sol_thread): Adjust.  Remove references to
578         init_sol_thread_ops and complete_target_initialization.
579
580         * windows-nat.c (windows_nat_target): New class.
581         (windows_fetch_inferior_registers)
582         (windows_store_inferior_registers, windows_resume, windows_wait)
583         (windows_attach, windows_detach, windows_pid_to_exec_file)
584         (windows_files_info, windows_create_inferior)
585         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
586         (windows_close, windows_pid_to_str, windows_xfer_partial)
587         (windows_get_tib_address, windows_get_ada_task_ptid)
588         (windows_thread_name, windows_thread_alive): Refactor as
589         windows_nat_target methods.
590         (do_initial_windows_stuff): Adjust.
591         (windows_target): Delete function.
592         (_initialize_windows_nat): Adjust.
593
594         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
595         (darwin_mourn_inferior, darwin_kill_inferior)
596         (darwin_create_inferior, darwin_attach, darwin_detach)
597         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
598         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
599         (darwin_supports_multi_process): Refactor as darwin_nat_target
600         methods.
601         (darwin_resume_to, darwin_files_info): Delete.
602         (_initialize_darwin_inferior): Rename to ...
603         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
604         * darwin-nat.h: Include "inf-child.h".
605         (darwin_nat_target): New class.
606         (darwin_complete_target): Delete.
607         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
608         (darwin_target): New.
609         (i386_darwin_fetch_inferior_registers)
610         (i386_darwin_store_inferior_registers): Refactor as methods of
611         darwin_nat_target.
612         (darwin_complete_target): Delete, with ...
613         (_initialize_i386_darwin_nat): ... bits factored out here.
614
615         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
616         (the_alpha_linux_nat_target): New.
617         (alpha_linux_register_u_offset): Refactor as
618         alpha_linux_nat_target method.
619         (_initialize_alpha_linux_nat): Adjust.
620         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
621         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
622         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
623         methods of linux_nat_trad_target.
624         (linux_trad_target): Delete.
625         * linux-nat-trad.h (linux_trad_target): Delete function.
626         (linux_nat_trad_target): New class.
627         * mips-linux-nat.c (mips_linux_nat_target): New class.
628         (super_fetch_registers, super_store_registers, super_close):
629         Delete.
630         (the_mips_linux_nat_target): New.
631         (mips64_linux_regsets_fetch_registers)
632         (mips64_linux_regsets_store_registers)
633         (mips64_linux_fetch_registers, mips64_linux_store_registers)
634         (mips_linux_register_u_offset, mips_linux_read_description)
635         (mips_linux_can_use_hw_breakpoint)
636         (mips_linux_stopped_by_watchpoint)
637         (mips_linux_stopped_data_address)
638         (mips_linux_region_ok_for_hw_watchpoint)
639         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
640         (mips_linux_close): Refactor as methods of mips_linux_nat.
641         (_initialize_mips_linux_nat): Adjust to C++ification.
642
643         * aix-thread.c (aix_thread_target): New class.
644         (aix_thread_ops): Now an aix_thread_target.
645         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
646         (aix_thread_fetch_registers, aix_thread_store_registers)
647         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
648         (aix_thread_thread_alive, aix_thread_pid_to_str)
649         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
650         Refactor as methods of aix_thread_target.
651         (init_aix_thread_ops): Delete.
652         (_initialize_aix_thread): Remove references to init_aix_thread_ops
653         and complete_target_initialization.
654         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
655         (rs6000_nat_target): New class.
656         (the_rs6000_nat_target): New.
657         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
658         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
659         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
660         (super_create_inferior): Delete.
661         (_initialize_rs6000_nat): Adjust to C++ification.
662
663         * arm-linux-nat.c (arm_linux_nat_target): New class.
664         (the_arm_linux_nat_target): New.
665         (arm_linux_fetch_inferior_registers)
666         (arm_linux_store_inferior_registers, arm_linux_read_description)
667         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
668         (arm_linux_remove_hw_breakpoint)
669         (arm_linux_region_ok_for_hw_watchpoint)
670         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
671         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
672         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
673         arm_linux_nat_target.
674         (_initialize_arm_linux_nat): Adjust to C++ification.
675
676         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
677         (the_aarch64_linux_nat_target): New.
678         (aarch64_linux_fetch_inferior_registers)
679         (aarch64_linux_store_inferior_registers)
680         (aarch64_linux_child_post_startup_inferior)
681         (aarch64_linux_read_description)
682         (aarch64_linux_can_use_hw_breakpoint)
683         (aarch64_linux_insert_hw_breakpoint)
684         (aarch64_linux_remove_hw_breakpoint)
685         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
686         (aarch64_linux_region_ok_for_hw_watchpoint)
687         (aarch64_linux_stopped_data_address)
688         (aarch64_linux_stopped_by_watchpoint)
689         (aarch64_linux_watchpoint_addr_within_range)
690         (aarch64_linux_can_do_single_step): Refactor as methods of
691         aarch64_linux_nat_target.
692         (super_post_startup_inferior): Delete.
693         (_initialize_aarch64_linux_nat): Adjust to C++ification.
694
695         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
696         (the_hppa_linux_nat_target): New.
697         (hppa_linux_fetch_inferior_registers)
698         (hppa_linux_store_inferior_registers): Refactor as methods of
699         hppa_linux_nat_target.
700         (_initialize_hppa_linux_nat): Adjust to C++ification.
701
702         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
703         (the_ia64_linux_nat_target): New.
704         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
705         (ia64_linux_stopped_data_address)
706         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
707         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
708         ia64_linux_nat_target methods.
709         (super_xfer_partial): Delete.
710         (_initialize_ia64_linux_nat): Adjust to C++ification.
711
712         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
713         (the_m32r_linux_nat_target): New.
714         (m32r_linux_fetch_inferior_registers)
715         (m32r_linux_store_inferior_registers): Refactor as
716         m32r_linux_nat_target methods.
717         (_initialize_m32r_linux_nat): Adjust to C++ification.
718
719         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
720         (the_m68k_linux_nat_target): New.
721         (m68k_linux_fetch_inferior_registers)
722         (m68k_linux_store_inferior_registers): Refactor as
723         m68k_linux_nat_target methods.
724         (_initialize_m68k_linux_nat): Adjust to C++ification.
725
726         * s390-linux-nat.c (s390_linux_nat_target): New class.
727         (the_s390_linux_nat_target): New.
728         (s390_linux_fetch_inferior_registers)
729         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
730         (s390_insert_watchpoint, s390_remove_watchpoint)
731         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
732         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
733         (s390_auxv_parse, s390_read_description): Refactor as methods of
734         s390_linux_nat_target.
735         (_initialize_s390_nat): Adjust to C++ification.
736
737         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
738         (the_sparc_linux_nat_target): New.
739         (_initialize_sparc_linux_nat): Adjust to C++ification.
740         * sparc-nat.c (sparc_fetch_inferior_registers)
741         (sparc_store_inferior_registers): Remove target_ops parameter.
742         * sparc-nat.h (sparc_fetch_inferior_registers)
743         (sparc_store_inferior_registers): Remove target_ops parameter.
744         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
745         (the_sparc64_linux_nat_target): New.
746         (_initialize_sparc64_linux_nat): Adjust to C++ification.
747
748         * spu-linux-nat.c (spu_linux_nat_target): New class.
749         (the_spu_linux_nat_target): New.
750         (spu_child_post_startup_inferior, spu_child_post_attach)
751         (spu_child_wait, spu_fetch_inferior_registers)
752         (spu_store_inferior_registers, spu_xfer_partial)
753         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
754         methods.
755         (_initialize_spu_nat): Adjust to C++ification.
756
757         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
758         (the_tilegx_linux_nat_target): New.
759         (fetch_inferior_registers, store_inferior_registers):
760         Refactor as methods.
761         (_initialize_tile_linux_nat): Adjust to C++ification.
762
763         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
764         (the_xtensa_linux_nat_target): New.
765         (xtensa_linux_fetch_inferior_registers)
766         (xtensa_linux_store_inferior_registers): Refactor as
767         xtensa_linux_nat_target methods.
768         (_initialize_xtensa_linux_nat): Adjust to C++ification.
769
770         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
771         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
772         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
773         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
774         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
775         (fbsd_stopped_by_sw_breakpoint)
776         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
777         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
778         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
779         (fbsd_post_startup_inferior, fbsd_post_attach)
780         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
781         (fbsd_set_syscall_catchpoint)
782         (super_xfer_partial, super_resume, super_wait)
783         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
784         (fbsd_handle_debug_trap): Remove target_ops parameter.
785         (fbsd_nat_add_target): Delete.
786         * fbsd-nat.h: Include "inf-ptrace.h".
787         (fbsd_nat_add_target): Delete.
788         (USE_SIGTRAP_SIGINFO): Define.
789         (fbsd_nat_target): New class.
790
791         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
792         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
793         (amd64bsd_target): Delete.
794         * amd64-bsd-nat.h: New file.
795         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
796         "x86-bsd-nat.h".
797         (amd64_fbsd_nat_target): New class.
798         (the_amd64_fbsd_nat_target): New.
799         (amd64fbsd_read_description): Refactor as method of
800         amd64_fbsd_nat_target.
801         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
802         (_initialize_amd64fbsd_nat): Adjust to C++ification.
803         * amd64-nat.h (amd64bsd_target): Delete function declaration.
804         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
805         (i386bsd_store_inferior_registers): Remove target_ops parameter.
806         (i386bsd_target): Delete.
807         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
808         (i386bsd_fetch_inferior_registers)
809         (i386bsd_store_inferior_registers): Declare.
810         (i386_bsd_nat_target): New class.
811         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
812         (the_i386_fbsd_nat_target): New.
813         (i386fbsd_resume, i386fbsd_read_description): Refactor as
814         i386_fbsd_nat_target methods.
815         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
816         (_initialize_i386fbsd_nat): Adjust to C++ification.
817         * x86-bsd-nat.c (super_mourn_inferior): Delete.
818         (x86bsd_mourn_inferior, x86bsd_target): Delete.
819         (_initialize_x86_bsd_nat): Adjust to C++ification.
820         * x86-bsd-nat.h: Include "x86-nat.h".
821         (x86bsd_target): Delete declaration.
822         (x86bsd_nat_target): New class.
823
824         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
825         (the_aarch64_fbsd_nat_target): New.
826         (aarch64_fbsd_fetch_inferior_registers)
827         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
828         aarch64_fbsd_nat_target.
829         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
830         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
831         (the_alpha_bsd_nat_target): New.
832         (alphabsd_fetch_inferior_registers)
833         (alphabsd_store_inferior_registers): Refactor as
834         alpha_bsd_nat_target methods.
835         (_initialize_alphabsd_nat): Refactor as methods of
836         alpha_bsd_nat_target.
837         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
838         (the_amd64_nbsd_nat_target): New.
839         (_initialize_amd64nbsd_nat): Adjust to C++ification.
840         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
841         (the_amd64_obsd_nat_target): New.
842         (_initialize_amd64obsd_nat): Adjust to C++ification.
843         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
844         (the_arm_fbsd_nat_target): New.
845         (arm_fbsd_fetch_inferior_registers)
846         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
847         (_initialize_arm_fbsd_nat): Refactor as methods of
848         arm_fbsd_nat_target.
849         (_initialize_arm_fbsd_nat): Adjust to C++ification.
850         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
851         (the_arm_netbsd_nat_target): New.
852         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
853         arm_netbsd_nat_target.
854         (_initialize_arm_netbsd_nat): Adjust to C++ification.
855         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
856         (the_hppa_nbsd_nat_target): New.
857         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
858         hppa_nbsd_nat_target methods.
859         (_initialize_hppanbsd_nat): Adjust to C++ification.
860         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
861         (the_hppa_obsd_nat_target): New.
862         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
863         methods of hppa_obsd_nat_target.
864         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
865         add_target.
866         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
867         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
868         add_target.
869         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
870         (_initialize_i386obsd_nat): Use add_target.
871         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
872         (the_m68k_bsd_nat_target): New.
873         (m68kbsd_fetch_inferior_registers)
874         (m68kbsd_store_inferior_registers): Refactor as methods of
875         m68k_bsd_nat_target.
876         (_initialize_m68kbsd_nat): Adjust to C++ification.
877         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
878         (the_mips_fbsd_nat_target): New.
879         (mips_fbsd_fetch_inferior_registers)
880         (mips_fbsd_store_inferior_registers): Refactor as methods of
881         mips_fbsd_nat_target.
882         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
883         add_target.
884         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
885         (the_mips_nbsd_nat_target): New.
886         (mipsnbsd_fetch_inferior_registers)
887         (mipsnbsd_store_inferior_registers): Refactor as methods of
888         mips_nbsd_nat_target.
889         (_initialize_mipsnbsd_nat): Adjust to C++ification.
890         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
891         (the_mips64_obsd_nat_target): New.
892         (mips64obsd_fetch_inferior_registers)
893         (mips64obsd_store_inferior_registers): Refactor as methods of
894         mips64_obsd_nat_target.
895         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
896         add_target.
897         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
898         nbsd_nat_target.
899         * nbsd-nat.h: Include "inf-ptrace.h".
900         (nbsd_nat_target): New class.
901         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
902         (obsd_wait): Refactor as methods of obsd_nat_target.
903         (obsd_add_target): Delete.
904         * obsd-nat.h: Include "inf-ptrace.h".
905         (obsd_nat_target): New class.
906         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
907         (the_ppc_fbsd_nat_target): New.
908         (ppcfbsd_fetch_inferior_registers)
909         (ppcfbsd_store_inferior_registers): Refactor as methods of
910         ppc_fbsd_nat_target.
911         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
912         add_target.
913         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
914         (the_ppc_nbsd_nat_target): New.
915         (ppcnbsd_fetch_inferior_registers)
916         (ppcnbsd_store_inferior_registers): Refactor as methods of
917         ppc_nbsd_nat_target.
918         (_initialize_ppcnbsd_nat): Adjust to C++ification.
919         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
920         (the_ppc_obsd_nat_target): New.
921         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
922         methods of ppc_obsd_nat_target.
923         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
924         add_target.
925         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
926         (the_sh_nbsd_nat_target): New.
927         (shnbsd_fetch_inferior_registers)
928         (shnbsd_store_inferior_registers): Refactor as methods of
929         sh_nbsd_nat_target.
930         (_initialize_shnbsd_nat): Adjust to C++ification.
931         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
932         (inf_ptrace_xfer_partial): Delete.
933         (sparc_xfer_partial, sparc_target): Delete.
934         * sparc-nat.h (sparc_fetch_inferior_registers)
935         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
936         (sparc_target): Delete function declaration.
937         (sparc_target): New template class.
938         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
939         (_initialize_sparcnbsd_nat): Adjust to C++ification.
940         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
941         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
942         add_target.
943         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
944         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
945         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
946         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
947         add_target.
948         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
949         (the_vax_bsd_nat_target): New.
950         (vaxbsd_fetch_inferior_registers)
951         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
952         methods.
953         (_initialize_vaxbsd_nat): Adjust to C++ification.
954
955         * bsd-kvm.c (bsd_kvm_target): New class.
956         (bsd_kvm_ops): Now a bsd_kvm_target.
957         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
958         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
959         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
960         bsd_kvm_target.
961         (bsd_kvm_return_one): Delete.
962         (bsd_kvm_add_target): Adjust to C++ification.
963
964         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
965         (nto_procfs_target_procfs): New classes.
966         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
967         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
968         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
969         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
970         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
971         (procfs_remove_hw_breakpoint, procfs_resume)
972         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
973         (procfs_kill_inferior, procfs_store_registers)
974         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
975         as methods of nto_procfs_target.
976         (nto_procfs_ops): Now an nto_procfs_target_procfs.
977         (nto_native_ops): Delete.
978         (procfs_open, procfs_native_open): Delete.
979         (nto_native_ops): Now an nto_procfs_target_native.
980         (init_procfs_targets): Adjust to C++ification.
981         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
982         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
983         Refactor as methods of nto_procfs_target.
984
985         * go32-nat.c (go32_nat_target): New class.
986         (the_go32_nat_target): New.
987         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
988         (go32_store_registers, go32_xfer_partial, go32_files_info)
989         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
990         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
991         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
992         (go32_pid_to_str): Refactor as methods of go32_nat_target.
993         (go32_target): Delete.
994         (_initialize_go32_nat): Adjust to C++ification.
995
996         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
997         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
998         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
999         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
1000         gnu_nat_target.
1001         (gnu_target): Delete.
1002         * gnu-nat.h (gnu_target): Delete.
1003         (gnu_nat_target): New class.
1004         * i386-gnu-nat.c (gnu_base_target): New.
1005         (i386_gnu_nat_target): New class.
1006         (the_i386_gnu_nat_target): New.
1007         (_initialize_i386gnu_nat): Adjust to C++ification.
1008
1009 2018-05-02  Pedro Alves  <palves@redhat.com>
1010
1011         * bfd-target.c (target_bfd_xclose): Rename to ...
1012         (target_bfd_close): ... this.
1013         (target_bfd_reopen): Adjust.
1014         * target.c (target_close): Remove references to to_xclose.
1015         * target.h (target_ops::to_xclose): Delete.
1016         (target_ops::to_close): Update comments.
1017
1018 2018-05-02  Pedro Alves  <palves@redhat.com>
1019
1020         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
1021         "linux-nat.h".
1022         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
1023         * inf-ptrace.c (inf_ptrace_register_u_offset)
1024         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1025         (inf_ptrace_store_register, inf_ptrace_store_registers)
1026         (inf_ptrace_trad_target): Move to ...
1027         * linux-nat-trad.c: ... this new file.
1028         * linux-nat-trad.h: New file.
1029         * linux-nat.c (linux_target_install_ops): Make extern.
1030         (linux_trad_target): Delete.
1031         * linux-nat.h (linux_trad_target): Delete declaration.
1032         (linux_target_install_ops): Declare.
1033         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
1034         "linux-nat.h".
1035
1036 2018-05-02  Pedro Alves  <palves@redhat.com>
1037
1038         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1039         procfs_target/add_target here.
1040         * procfs.c (procfs_target): Make static.
1041         (_initialize_procfs): Call add_target here.
1042         * procfs.h (struct target_ops): Remove forward declaration.
1043         (procfs_target): Remove declaration.
1044         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
1045
1046 2018-05-02  Pedro Alves  <palves@redhat.com>
1047
1048         * procfs.c (procfs_stopped_by_watchpoint)
1049         (procfs_insert_watchpoint, procfs_remove_watchpoint)
1050         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
1051         Forward declare.
1052         (procfs_use_watchpoints): Delete, move contents...
1053         (procfs_target): ... here.
1054         * procfs.h (procfs_use_watchpoints): Delete declaration.
1055         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1056         procfs_use_watchpoints.
1057         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
1058         procfs_use_watchpoints.
1059
1060 2018-05-02  Tom Tromey  <tom@tromey.com>
1061
1062         PR python/20084:
1063         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
1064         and var_zuinteger_unlimited.
1065         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
1066         and PARAM_ZUINTEGER_UNLIMITED.
1067         (set_parameter_value): Handle var_zuinteger and
1068         var_zuinteger_unlimited.
1069         (add_setshow_generic): Likewise.
1070         (parmpy_init): Likewise.
1071
1072 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
1073
1074         PR rust/23124
1075         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
1076         pointer is not null before dereferencing it.
1077
1078 2018-04-30  Tom Tromey  <tom@tromey.com>
1079
1080         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
1081         is_mi_like_p.
1082
1083 2018-04-30  Tom Tromey  <tom@tromey.com>
1084
1085         * breakpoint.c (mention): Remove use of is_mi_like_p.
1086         (print_mention_ranged_breakpoint): Likewise.
1087         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
1088         of is_mi_like_p.
1089
1090 2018-04-30  Tom Tromey  <tom@tromey.com>
1091
1092         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
1093
1094 2018-04-30  Tom Tromey  <tom@tromey.com>
1095
1096         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
1097         (info_spu_event_command): Remove some uses of is_mi_like_p.
1098
1099 2018-04-30  Tom Tromey  <tom@tromey.com>
1100
1101         * python/py-framefilter.c (py_print_single_arg)
1102         (enumerate_locals, py_print_args, py_print_frame): Remove some
1103         uses of is_mi_like_p.
1104
1105 2018-04-30  Tom Tromey  <tom@tromey.com>
1106
1107         * ui-out.c: Update.
1108         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
1109         * ui-out.h (ui_out::is_mi_like_p): Now const.
1110         (ui_out::do_is_mi_like_p): Now const.
1111         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
1112
1113 2018-04-30  Tom Tromey  <tom@tromey.com>
1114
1115         * varobj.c (varobj_set_visualizer): Use new_reference.
1116         * python/python.c (gdbpy_decode_line): Use new_reference.
1117         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
1118         new_reference.
1119
1120 2018-04-30  Tom Tromey  <tom@tromey.com>
1121
1122         * varobj.c (install_new_value): Use new_reference.
1123         * value.h (value_incref): Return void.  Swap intro comment with
1124         value_decref.
1125         * value.c (set_value_parent): Use new_reference.
1126         (value_incref): Return void.  Update intro comment.
1127         (release_value): Use new_reference.
1128         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
1129
1130 2018-04-30  Tom Tromey  <tom@tromey.com>
1131
1132         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
1133         * gdb_bfd.h (new_bfd_ref): Remove.
1134         (gdb_bfd_open): Update comment.
1135         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1136         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
1137         (gdb_bfd_fdopenr): Use new_reference.
1138         * exec.c (exec_file_attach): Use new_reference.
1139
1140 2018-04-30  Tom Tromey  <tom@tromey.com>
1141
1142         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
1143         method.
1144
1145 2018-04-30  Tom Tromey  <tom@tromey.com>
1146
1147         * jit.c (jit_read_code_entry): Use type_align.
1148         * i386-tdep.c (i386_gdbarch_init): Don't call
1149         set_gdbarch_long_long_align_bit.
1150         * gdbarch.sh: Remove long_long_align_bit.
1151         * gdbarch.c, gdbarch.h: Rebuild.
1152         * arc-tdep.c (arc_type_align): New function.
1153         (arc_gdbarch_init): Use arc_type_align.  Don't call
1154         set_gdbarch_long_long_align_bit.
1155
1156 2018-04-30  Tom Tromey  <tom@tromey.com>
1157
1158         * rust-lang.c (rust_type_alignment): Remove.
1159         (rust_composite_type): Use type_align.
1160
1161 2018-04-30  Tom Tromey  <tom@tromey.com>
1162
1163         * NEWS: Mention Type.align.
1164         * python/py-type.c (typy_get_alignof): New function.
1165         (type_object_getset): Add "alignof".
1166
1167 2018-04-30  Tom Tromey  <tom@tromey.com>
1168
1169         PR exp/17095:
1170         * NEWS: Update.
1171         * std-operator.def (UNOP_ALIGNOF): New operator.
1172         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
1173         New.
1174         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
1175         * c-lang.c (c_op_print_tab): Add alignof.
1176         * c-exp.y (ALIGNOF): New token.
1177         (exp): Add "ALIGNOF" production.
1178         (ident_tokens): Add _Alignof and alignof.
1179
1180 2018-04-30  Tom Tromey  <tom@tromey.com>
1181
1182         * i386-tdep.c (i386_type_align): New function.
1183         (i386_gdbarch_init): Update.
1184         * gdbarch.sh (type_align): New method.
1185         * gdbarch.c, gdbarch.h: Rebuild.
1186         * arch-utils.h (default_type_align): Declare.
1187         * arch-utils.c (default_type_align): New function.
1188         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
1189         (struct type) <align_log2>: New field.
1190         <instance_flags>: Now a bitfield.
1191         (TYPE_RAW_ALIGN): New macro.
1192         (type_align, type_raw_align, set_type_align): Declare.
1193         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
1194         functions.
1195         * dwarf2read.c (quirk_rust_enum): Set type alignment.
1196         (get_alignment, maybe_set_alignment): New functions.
1197         (read_structure_type, read_enumeration_type, read_array_type)
1198         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
1199         (read_subrange_type, read_base_type): Set type alignment.
1200
1201 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
1202
1203         * dwarf2read.c (read_index_from_section): Use bool.
1204
1205 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
1206
1207         PR gdb/22950
1208         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
1209         with #ifdef.
1210
1211 2018-04-29  John Reiser  <jreiser@BitWagon.com>
1212
1213         PR build/22873
1214         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
1215         last step, and do it atomically.
1216
1217 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
1218
1219         * compile/compile-c-types.c (convert_int, convert_float):
1220         Update for C FE v1.
1221
1222 2018-04-27  Tom Tromey  <tom@tromey.com>
1223
1224         PR rust/22545:
1225         * rust-lang.c (rust_inclusive_range_type_p): New function.
1226         (rust_range): Handle inclusive ranges.
1227         (rust_compute_range): Likewise.
1228         * rust-exp.y (struct rust_op) <inclusive>: New field.
1229         (DOTDOTEQ): New constant.
1230         (range_expr): Add "..=" productions.
1231         (operator_tokens): Add "..=" token.
1232         (ast_range): Add "inclusive" parameter.
1233         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
1234         ranges.
1235         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
1236         bounds values.
1237         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
1238         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
1239         Update comments.
1240         * expprint.c (print_subexp_standard): Handle new bounds values.
1241         (dump_subexp_body_standard): Likewise.
1242
1243 2018-04-27  Tom Tromey  <tom@tromey.com>
1244
1245         * configure: Rebuild.
1246         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
1247         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
1248         "OVERRIDE".
1249         (class symbol_needs_eval_context): Likewise.
1250         * dwarf2read.c (mock_mapped_index::symbol_name_count)
1251         (mock_mapped_index::symbol_name_at): Use "override".  Remove
1252         "virtual".
1253         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
1254         "override".
1255         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
1256         * aarch64-tdep.c (instruction_reader::read): Use "override".
1257         (instruction_reader_test::read): Likewise.
1258         * arm-tdep.c (instruction_reader::read): Use "override".
1259         (instruction_reader_thumb::read): Likewise.
1260
1261 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
1262
1263         PR remote/9665
1264         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
1265         instead of remote_send.
1266         (remote_send): Remove.
1267
1268 2018-04-26  Pedro Alves  <palves@redhat.com>
1269
1270         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
1271         find_function_start_sal instead of find_pc_line.
1272
1273 2018-04-26  Pedro Alves  <palves@redhat.com>
1274
1275         * breakpoint.c (set_breakpoint_location_function): Handle
1276         mst_data_gnu_ifunc.
1277         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
1278         * elfread.c (elf_symtab_read): Give data symbols with
1279         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
1280         (elf_rel_plt_read): Update comment.
1281         * linespec.c (convert_linespec_to_sals): Handle
1282         mst_data_gnu_ifunc.
1283         (minsym_found): Handle mst_data_gnu_ifunc.
1284         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
1285         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
1286         * parse.c (find_minsym_type_and_address): Handle
1287         mst_data_gnu_ifunc.
1288         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
1289         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
1290         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
1291         comment.
1292         <mst_data_gnu_ifunc>: New enumerator.
1293
1294 2018-04-26  Pedro Alves  <palves@redhat.com>
1295
1296         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
1297         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
1298         'want_trampoline' parameter by a lookup_msym_prefer parameter.
1299         Handle it.
1300         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
1301         (lookup_minimal_symbol_by_pc): Adjust.
1302         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
1303         (lookup_solib_trampoline_symbol_by_pc): Adjust.
1304         * minsyms.h (lookup_msym_prefer): New enum.
1305         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
1306         parameter by a lookup_msym_prefer parameter.
1307
1308 2018-04-26  Pedro Alves  <palves@redhat.com>
1309
1310         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
1311         ends in "@plt" instead of looking at the symbol's section.
1312
1313 2018-04-26  Pedro Alves  <palves@redhat.com>
1314
1315         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
1316         all references.
1317         (find_pc_partial_function_gnu_ifunc): Rename to ...
1318         (find_pc_partial_function): ... this, and remove references to
1319         'is_gnu_ifunc_p'.
1320         (find_pc_partial_function): Delete old implementation.
1321         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
1322
1323 2018-04-26  Pedro Alves  <palves@redhat.com>
1324
1325         * linespec.c (struct bound_minimal_symbol_search_key): New.
1326         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
1327         skip first line if we found a GNU ifunc minimal symbol by name.
1328         (compare_msymbols): Change parameters to work with a destructured
1329         lhs minsym.
1330         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
1331         functions.
1332
1333 2018-04-26  Pedro Alves  <palves@redhat.com>
1334
1335         * breakpoint.c (set_breakpoint_location_function): Don't resolve
1336         ifunc targets here.  Instead, if we have an ifunc minsym, use its
1337         address/name.
1338         (add_location_to_breakpoint): Store the minsym and the objfile in
1339         the breakpoint location.
1340         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
1341         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
1342         Record the minsym in the sal.
1343         * symtab.h (symtab_and_line) <msymbol>: New field.
1344
1345 2018-04-26  Pedro Alves  <palves@redhat.com>
1346
1347         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
1348         unless we actually resolved the ifunc.
1349
1350 2018-04-26  Pedro Alves  <palves@redhat.com>
1351
1352         * c-exp.y (variable production): Prefer ifunc minsyms over
1353         regular function symbols.
1354         * symtab.c (find_gnu_ifunc): New function.
1355         * minsyms.h (lookup_msym_prefer): New enum.
1356         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
1357         parameter by a lookup_msym_prefer parameter.
1358         * symtab.h (find_gnu_ifunc): New declaration.
1359
1360 2018-04-26  Pedro Alves  <palves@redhat.com>
1361
1362         * blockframe.c (find_gnu_ifunc_target_type): New function.
1363         (find_function_type): New.
1364         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
1365         return a value with a memory address.
1366         (eval_call): For calls to GNU ifunc functions, try to find the
1367         type of the target function from the type that the resolver
1368         returns.
1369         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
1370         symbols.
1371         * infcall.c (find_function_return_type): Delete.
1372         (find_function_addr): Add 'function_type' parameter.  For calls to
1373         GNU ifunc functions, try to find the type of the target function
1374         from the type that the resolver returns, and return it via
1375         FUNCTION_TYPE.
1376         (call_function_by_hand_dummy): Adjust to use the function type
1377         returned by find_function_addr.
1378         (find_function_addr): Add 'function_type' parameter and move
1379         description here.
1380         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
1381         declarations.
1382
1383 2018-04-26  Pedro Alves  <palves@redhat.com>
1384
1385         * c-exp.y (variable production): Skip finding an alias for ifunc
1386         symbols.
1387
1388 2018-04-26  Pedro Alves  <palves@redhat.com>
1389
1390         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
1391
1392 2018-04-25  Pedro Alves  <palves@redhat.com>
1393
1394         * infcmd.c (kill_command): Print the pid as string, not the whole
1395         thread's ptid.  Add comment.  s/has been killed/killed/ in output
1396         message.
1397         * remote.c (remote_detach_1): Print the pid as string, not the
1398         whole thread's ptid.
1399
1400 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
1401             Sergio Durigan Junior  <sergiodj@redhat.com>
1402             Pedro Alves  <palves@redhat.com>
1403
1404         * infcmd.c (kill_command): Print message when inferior has
1405         been killed.
1406         * inferior.c (print_inferior_events): Remove 'static'.  Set as
1407         '1'.
1408         (add_inferior): Improve message printed when
1409         'print_inferior_events' is on.
1410         (exit_inferior): Remove message printed when
1411         'print_inferior_events' is on.
1412         (detach_inferior): Improve message printed when
1413         'print_inferior_events' is on.
1414         (initialize_inferiors): Use 'add_inferior_silent' to set
1415         'current_inferior_'.
1416         * inferior.h (print_inferior_events): Declare here as
1417         'extern'.
1418         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
1419         '[Detaching...]' messages when 'print_inferior_events' is on.
1420         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
1421         as prefix/suffix for messages.  Remove periods.  Fix erroneous
1422         'Detaching after fork from child...', replace it by '... from
1423         parent...'.
1424         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
1425         prefix/suffix when printing 'Detaching...' messages.  Print
1426         them when 'print_inferior_events' is on.
1427         * remote.c (remote_detach_1): Print message when detaching
1428         from inferior and '!is_fork_parent'.
1429
1430 2018-04-24  Tom Tromey  <tom@tromey.com>
1431
1432         * cli-out.h: Reindent.
1433
1434 2018-04-24  Tom Tromey  <tom@tromey.com>
1435
1436         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
1437         (cli_ui_out::do_field_string): Use fputs_filtered.
1438         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
1439
1440 2018-04-23  Tom Tromey  <tom@tromey.com>
1441
1442         * guile/scm-frame.c (gdbscm_frame_read_var): Use
1443         gdb::unique_xmalloc_ptr.
1444
1445 2018-04-23  Tom Tromey  <tom@tromey.com>
1446
1447         * configure: Rebuild.
1448
1449 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
1450
1451         PR gdb/23095
1452         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
1453         prepare_for_testing.  Set normal_bp to r_debug_state if target
1454         is bsd.
1455
1456 2018-04-21  Pedro Alves  <palves@redhat.com>
1457             Rajendra SY  <rajendra.sy@gmail.com>
1458
1459         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
1460         * remote.c (extended_remote_attach): In all-stop mode, mark the
1461         thread as executing.
1462
1463 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1464
1465         * thread.c (thread_apply_all_command): Fix comment.
1466         (thread_command): Fix comment.
1467
1468 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
1469
1470         * common/tdesc.h (tdesc_create_feature): Remove xml filename
1471         parameter.
1472         * features/aarch64-core.c (create_feature_aarch64_core):
1473         Regenerate.
1474         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
1475         Likewise.
1476         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
1477         Likewise.
1478         * features/i386/32bit-avx512.c
1479         (create_feature_i386_32bit_avx512): Likewise.
1480         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
1481         Likewise.
1482         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
1483         Likewise.
1484         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
1485         Likewise.
1486         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
1487         Likewise.
1488         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
1489         Likewise.
1490         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
1491         Likewise.
1492         * features/i386/64bit-avx512.c
1493         (create_feature_i386_64bit_avx512): Likewise.
1494         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
1495         Likewise.
1496         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
1497         Likewise.
1498         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
1499         Likewise.
1500         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
1501         Likewise.
1502         * features/i386/64bit-segments.c
1503         (create_feature_i386_64bit_segments): Likewise.
1504         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
1505         Likewise.
1506         * features/i386/x32-core.c
1507         (create_feature_i386_x32_core): Likewise.
1508         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
1509         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
1510         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
1511         * target-descriptions.c: In generated code, don't pass xml
1512         filename.
1513
1514 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
1515
1516         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
1517         (print_xml_feature::visit_post): Likewise.
1518         (print_xml_feature::visit): Likewise.
1519         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
1520         (print_xml_feature): Add new class.
1521         * regformats/regdat.sh: Null xmltarget on feature targets.
1522         * target-descriptions.c (struct target_desc): Add xmltarget.
1523         (maintenance_check_tdesc_xml_convert): Add unittest function.
1524         (tdesc_get_features_xml): Add function to get xml.
1525         (maintenance_check_xml_descriptions): Test xml generation.
1526         * xml-tdesc.c (string_read_description_xml): Add function.
1527         * xml-tdesc.h (string_read_description_xml): Add declaration.
1528
1529 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
1530
1531         * features/Makefile: Add feature marker to targets with new style
1532         target descriptions.
1533         * regformats/aarch64.dat: Regenerate.
1534         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
1535         * regformats/i386/amd64-avx-linux.dat: Likewise.
1536         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
1537         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
1538         * regformats/i386/amd64-linux.dat: Likewise.
1539         * regformats/i386/amd64-mpx-linux.dat: Likewise.
1540         * regformats/i386/amd64.dat: Likewise.
1541         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
1542         * regformats/i386/i386-avx-linux.dat: Likewise.
1543         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
1544         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
1545         * regformats/i386/i386-linux.dat: Likewise.
1546         * regformats/i386/i386-mmx-linux.dat: Likewise.
1547         * regformats/i386/i386-mpx-linux.dat: Likewise.
1548         * regformats/i386/i386.dat: Likewise.
1549         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
1550         * regformats/i386/x32-avx-linux.dat: Likewise.
1551         * regformats/i386/x32-linux.dat: Likewise.
1552         * regformats/tic6x-c62x-linux.dat: Likewise.
1553         * regformats/tic6x-c64x-linux.dat: Likewise.
1554         * regformats/tic6x-c64xp-linux.dat: Likewise.
1555         * regformats/regdat.sh: Parse feature marker.
1556
1557 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
1558
1559         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
1560         (tdesc_osabi_name): Likewise.
1561         * target-descriptions.c (tdesc_architecture_name): Add new
1562         function.
1563         (tdesc_osabi_name): Likewise.
1564
1565 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
1566
1567         * common/tdesc.c (tdesc_predefined_type): Move to here.
1568         (tdesc_named_type): Likewise.
1569         (tdesc_create_vector): Likewise.
1570         (tdesc_create_struct): Likewise.
1571         (tdesc_set_struct_size): Likewise.
1572         (tdesc_create_union): Likewise.
1573         (tdesc_create_flags): Likewise.
1574         (tdesc_create_enum): Likewise.
1575         (tdesc_add_field): Likewise.
1576         (tdesc_add_typed_bitfield): Likewise.
1577         (tdesc_add_bitfield): Likewise.
1578         (tdesc_add_flag): Likewise.
1579         (tdesc_add_enum_value): Likewise.
1580         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
1581         (struct tdesc_type_vector): Likewise.
1582         (struct tdesc_type_field): Likewise.
1583         (struct tdesc_type_with_fields): Likewise.
1584         (tdesc_create_enum): Add declaration.
1585         (tdesc_add_typed_bitfield): Likewise.
1586         (tdesc_add_enum_value): Likewise.
1587         * target-descriptions.c (tdesc_type_field): Move from here.
1588         (tdesc_type_builtin): Likewise.
1589         (tdesc_type_vector): Likewise.
1590         (tdesc_type_with_fields): Likewise.
1591         (tdesc_predefined_types): Likewise.
1592         (tdesc_named_type): Likewise.
1593         (tdesc_create_vector): Likewise.
1594         (tdesc_create_struct): Likewise.
1595         (tdesc_set_struct_size): Likewise.
1596         (tdesc_create_union): Likewise.
1597         (tdesc_create_flags): Likewise.
1598         (tdesc_create_enum): Likewise.
1599         (tdesc_add_field): Likewise.
1600         (tdesc_add_typed_bitfield): Likewise.
1601         (tdesc_add_bitfield): Likewise.
1602         (tdesc_add_flag): Likewise.
1603         (tdesc_add_enum_value): Likewise.
1604         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
1605         (tdesc_add_typed_bitfield): Likewise.
1606         (tdesc_add_enum_value): Likewise.
1607
1608 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
1609
1610         * common/tdesc.c (tdesc_feature::accept): Move to here.
1611         (tdesc_feature::operator==): Likewise.
1612         (tdesc_create_reg): Likewise.
1613         * common/tdesc.h (tdesc_type_kind): Likewise.
1614         (struct tdesc_type): Likewise.
1615         (struct tdesc_feature): Likewise.
1616         * regformats/regdat.sh: Create a feature.
1617         * target-descriptions.c (tdesc_type_kind): Move from here.
1618         (tdesc_type): Likewise.
1619         (tdesc_type_up): Likewise.
1620         (tdesc_feature): Likewise.
1621         (tdesc_create_reg): Likewise.
1622
1623 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
1624
1625         * Makefile.in: Add arch/tdesc.c
1626         * common/tdesc.c: New file.
1627         * common/tdesc.h (tdesc_element_visitor): Move to here.
1628         (tdesc_element): Likewise.
1629         (tdesc_reg): Likewise.
1630         (tdesc_reg_up): Likewise.
1631         * regformats/regdef.h (reg): Add offset to constructors.
1632         * target-descriptions.c (tdesc_element_visitor): Move from here.
1633         (tdesc_element): Likewise.
1634         (tdesc_reg): Likewise.
1635         (tdesc_reg_up): Likewise.
1636
1637 2018-04-17  Tom Tromey  <tom@tromey.com>
1638
1639         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
1640         discriminant field.
1641
1642 2018-04-17  Tom Tromey  <tom@tromey.com>
1643
1644         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
1645
1646 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1647
1648         * symtab.c (print_symbol_info): Skip printing filename and line
1649         number when `last' is NULL.
1650         (symtab_symbol_info): Use empty string instead of NULL for first
1651         invocation of print_symbol_info.
1652         (rbreak_command): Pass NULL to `last' parameter of
1653         print_symbol_info.
1654
1655 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
1656
1657         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
1658         instead of nullptr.
1659
1660 2018-04-16  Pedro Alves  <palves@redhat.com>
1661
1662         * MAINTAINERS (sh): Remove.
1663         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
1664         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
1665         (ALLDEPFILES): Remove sh64-tdep.c.
1666         * NEWS: Mentions that support for SH-5/SH64 is removed.
1667         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
1668         (sh*-*-openbsd*): Ditto.
1669         (sh64-*-elf*): Remove.
1670         (sh*): Remove.
1671         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
1672         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
1673         * sh-tdep.c: No longer include "sh64-tdep.h".
1674         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
1675         * sh64-tdep.c, sh64-tdep.h: Remove files.
1676
1677 2018-04-16  Pedro Alves  <palves@redhat.com>
1678
1679         * MAINTAINERS: Remove m88k.
1680         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
1681         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
1682         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
1683         * NEWS: Mention that support for m88k was removed.
1684         * configure.host (m88*-*-*): Remove support.
1685         * configure.nat (m88k-*-*): Remove support.
1686         * configure.tgt (m88*-*-openbsd*): Remove.
1687         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
1688
1689 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
1690
1691         * configure.tgt (x86_tobjs): New variable.
1692         (amd64_tobjs, i386_tobjs): Use it.
1693
1694 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1695
1696         * symtab.c (print_symbol_info): Precede the symbol definition by
1697         the line number when available.
1698         * NEWS: Advertise this enhancement.
1699
1700 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
1701
1702         * NEWS (New options): announce set/show record btrace cpu.
1703         * btrace.c: Include record-btrace.h.
1704         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
1705         the vendor is unknown.
1706         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
1707         Maybe overwrite the btrace configuration's cpu.
1708         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
1709         (btrace_fetch): Add cpu parameter.  Update callers.
1710         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
1711         Maybe overwrite the btrace configuration's cpu.  Skip enabling
1712         errata workarounds if the vendor is unknown.
1713         * python/py-record-btrace.c: Include record-btrace.h.
1714         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
1715         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
1716         * record-btrace.c (record_btrace_cpu_state_kind): New.
1717         (record_btrace_cpu): New.
1718         (set_record_btrace_cpu_cmdlist): New.
1719         (record_btrace_get_cpu): New.
1720         (require_btrace_thread, record_btrace_info)
1721         (record_btrace_resume_thread): Call record_btrace_get_cpu.
1722         (cmd_set_record_btrace_cpu_none): New.
1723         (cmd_set_record_btrace_cpu_auto): New.
1724         (cmd_set_record_btrace_cpu): New.
1725         (cmd_show_record_btrace_cpu): New.
1726         (_initialize_record_btrace): Initialize set/show record btrace cpu
1727         commands.
1728         * record-btrace.h (record_btrace_get_cpu): New.
1729
1730 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
1731
1732         * record.c (set_record_command): Fix typo in message.
1733
1734 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
1735
1736         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
1737
1738 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
1739
1740         * infrun.c (process_event_stop_test): Call
1741         gdbarch_in_indirect_branch_thunk.
1742         * gdbarch.sh (in_indirect_branch_thunk): New.
1743         * gdbarch.c: Regenerated.
1744         * gdbarch.h: Regenerated.
1745         * x86-tdep.h: New.
1746         * x86-tdep.c: New.
1747         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
1748         (HFILES_NO_SRCDIR): Add x86-tdep.h.
1749         (ALLDEPFILES): Add x86-tdep.c.
1750         * arch-utils.h (default_in_indirect_branch_thunk): New.
1751         * arch-utils.c (default_in_indirect_branch_thunk): New.
1752         * i386-tdep: Include x86-tdep.h.
1753         (i386_in_indirect_branch_thunk): New.
1754         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
1755         function.
1756         * amd64-tdep: Include x86-tdep.h.
1757         (amd64_in_indirect_branch_thunk): New.
1758         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
1759
1760 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
1761
1762         PR gdb/23053
1763         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
1764         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
1765         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
1766         regression.
1767
1768 2018-04-12  Tom Tromey  <tom@tromey.com>
1769
1770         * rust-lang.c (rust_print_struct_def): Remove univariant code.
1771         (rust_evaluate_subexp): Likewise.
1772
1773 2018-04-12  Pedro Alves  <palves@redhat.com>
1774
1775         * procfs.c (procfs_detach): Make forward declaration's prototype
1776         match definition's protototype.
1777         (proc_get_LDT_entry): Remove stale do_cleanups call.
1778
1779 2018-04-12  Pedro Alves  <palves@redhat.com>
1780
1781         * target.h (target_ops::to_has_exited): Delete.
1782         (target_has_exited): Delete.
1783         * target-delegates.c: Regenerate.
1784
1785 2018-04-11  Pedro Alves  <palves@redhat.com>
1786
1787         * target.c (fileio_fh_t::t): Add comment.
1788         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
1789         (target_fileio_close): Handle a NULL target.
1790         (invalidate_fileio_fh): New.
1791         (target_close): Call it.
1792         * remote.c (remote_hostio_send_command): No longer check whether
1793         remote_desc is open.
1794
1795 2018-04-11  Pedro Alves  <palves@redhat.com>
1796
1797         * target.c (fileio_fh_t): Make it a named struct instead of a
1798         typedef.
1799         (fileio_fh_t::is_closed): New method.
1800         (DEF_VEC_O (fileio_fh_t)): Remove.
1801         (fileio_fhandles): Now a std::vector.
1802         (is_closed_fileio_fh): Delete.
1803         (acquire_fileio_fd): Adjust.  Rename parameters.
1804         (release_fileio_fd): Adjust.
1805         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
1806         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
1807         (target_fileio_close): Adjust.
1808
1809 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
1810
1811         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
1812         index.
1813
1814 2018-04-10  Pedro Alves  <palves@redhat.com>
1815
1816         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
1817         (scoped_finish_thread_state): New class.
1818         * infcmd.c (run_command_1): Use it instead of finish_thread_state
1819         cleanup.
1820         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
1821         (fetch_inferior_event, normal_stop): Likewise.
1822         * thread.c (finish_thread_state_cleanup): Delete.
1823
1824 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
1825             Pedro Alves  <palves@redhat.com>
1826
1827         * value.c: Include "selftest.h" and "common/array-view.h".
1828         (struct range) <operator ==>: New.
1829         (test_ranges_contain): New.
1830         (check_ranges_vector): New.
1831         (test_insert_into_bit_range_vector): New.
1832         (_initialize_values): Register selftests.
1833         * common/array-view.h (operator==, operator!=): New.
1834
1835 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
1836
1837         * common/gdb_vecs.h (unordered_remove): Add overload that takes
1838         an iterator.
1839         * inline-frame.c: Include <algorithm>.
1840         (struct inline_state): Add constructor.
1841         (inline_state_s): Remove.
1842         (DEF_VEC_O(inline_state_s)): Remove.
1843         (inline_states): Change type to std::vector.
1844         (find_inline_frame_state): Adjust to std::vector.
1845         (allocate_inline_frame_state): Remove.
1846         (clear_inline_frame_state): Adjust to std::vector.
1847         (skip_inline_frames): Adjust to std::vector.
1848
1849 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
1850
1851         * tracepoint.h (struct trace_state_variable): Add constructor.
1852         <name>: Change type to std::string.
1853         * tracepoint.c (tsv_s): Remove.
1854         (DEF_VEC_O(tsv_s)): Remove.
1855         (tvariables): Change to std::vector.
1856         (create_trace_state_variable): Adjust to std::vector.
1857         (find_trace_state_variable): Likewise.
1858         (find_trace_state_variable_by_number): Likewise.
1859         (delete_trace_state_variable): Likewise.
1860         (trace_variable_command): Adjust to std::string.
1861         (delete_trace_variable_command): Likewise.
1862         (tvariables_info_1): Adjust to std::vector.
1863         (save_trace_state_variables): Likewise.
1864         (start_tracing): Likewise.
1865         (merge_uploaded_trace_state_variables): Adjust to std::vector
1866         and std::string.
1867         * target.h (struct target_ops)
1868         <to_download_trace_state_variable>: Pass reference to
1869         trace_state_variable.
1870         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
1871         * target-delegates.c: Re-generate.
1872         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
1873         (mi_tsv_deleted): Likewise.
1874         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
1875         * remote.c (remote_download_trace_state_variable): Change
1876         pointer to reference and adjust.
1877         * make-target-delegates (parse_argtypes): Handle references.
1878         (write_function_header): Likewise.
1879         (munge_type): Likewise.
1880
1881 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
1882
1883         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1884         string_view-selftests.c.
1885         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
1886         testsuite.
1887         * unittests/basic_string_view/cons/char/1.cc: Likewise.
1888         * unittests/basic_string_view/cons/char/2.cc: Likewise.
1889         * unittests/basic_string_view/cons/char/3.cc: Likewise.
1890         * unittests/basic_string_view/element_access/char/1.cc:
1891         Likewise.
1892         * unittests/basic_string_view/element_access/char/empty.cc:
1893         Likewise.
1894         * unittests/basic_string_view/element_access/char/front_back.cc:
1895         Likewise.
1896         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
1897         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
1898         Likewise.
1899         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
1900         Likewise.
1901         * unittests/basic_string_view/modifiers/swap/char/1.cc:
1902         Likewise.
1903         * unittests/basic_string_view/operations/compare/char/1.cc:
1904         Likewise.
1905         * unittests/basic_string_view/operations/compare/char/13650.cc:
1906         Likewise.
1907         * unittests/basic_string_view/operations/copy/char/1.cc:
1908         Likewise.
1909         * unittests/basic_string_view/operations/data/char/1.cc:
1910         Likewise.
1911         * unittests/basic_string_view/operations/find/char/1.cc:
1912         Likewise.
1913         * unittests/basic_string_view/operations/find/char/2.cc:
1914         Likewise.
1915         * unittests/basic_string_view/operations/find/char/3.cc:
1916         Likewise.
1917         * unittests/basic_string_view/operations/find/char/4.cc:
1918         Likewise.
1919         * unittests/basic_string_view/operations/rfind/char/1.cc:
1920         Likewise.
1921         * unittests/basic_string_view/operations/rfind/char/2.cc:
1922         Likewise.
1923         * unittests/basic_string_view/operations/rfind/char/3.cc:
1924         Likewise.
1925         * unittests/basic_string_view/operations/substr/char/1.cc:
1926         Likewise.
1927         * unittests/basic_string_view/operators/char/2.cc: Likewise.
1928         * unittests/string_view-selftests.c: New file.
1929
1930 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
1931
1932         * unittests/basic_string_view/capacity/1.cc: New file.
1933         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
1934         * unittests/basic_string_view/cons/char/1.cc: New file.
1935         * unittests/basic_string_view/cons/char/2.cc: New file.
1936         * unittests/basic_string_view/cons/char/3.cc: New file.
1937         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
1938         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
1939         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
1940         * unittests/basic_string_view/element_access/char/1.cc: New file.
1941         * unittests/basic_string_view/element_access/char/2.cc: New file.
1942         * unittests/basic_string_view/element_access/char/empty.cc: New file.
1943         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
1944         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
1945         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
1946         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
1947         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
1948         * unittests/basic_string_view/include.cc: New file.
1949         * unittests/basic_string_view/inserters/char/1.cc: New file.
1950         * unittests/basic_string_view/inserters/char/2.cc: New file.
1951         * unittests/basic_string_view/inserters/char/3.cc: New file.
1952         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
1953         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
1954         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
1955         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
1956         * unittests/basic_string_view/literals/types.cc: New file.
1957         * unittests/basic_string_view/literals/values.cc: New file.
1958         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
1959         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
1960         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
1961         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
1962         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
1963         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
1964         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
1965         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
1966         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
1967         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
1968         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
1969         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
1970         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
1971         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
1972         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
1973         * unittests/basic_string_view/operations/data/char/1.cc: New file.
1974         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
1975         * unittests/basic_string_view/operations/find/char/1.cc: New file.
1976         * unittests/basic_string_view/operations/find/char/2.cc: New file.
1977         * unittests/basic_string_view/operations/find/char/3.cc: New file.
1978         * unittests/basic_string_view/operations/find/char/4.cc: New file.
1979         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
1980         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
1981         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
1982         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
1983         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
1984         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
1985         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
1986         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
1987         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
1988         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
1989         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
1990         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
1991         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
1992         * unittests/basic_string_view/operators/char/2.cc: New file.
1993         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
1994         * unittests/basic_string_view/range_access/char/1.cc: New file.
1995         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
1996         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
1997         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
1998         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
1999         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
2000         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
2001         * unittests/basic_string_view/requirements/typedefs.cc: New file.
2002         * unittests/basic_string_view/typedefs.cc: New file.
2003         * unittests/basic_string_view/types/1.cc: New file.
2004
2005 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2006
2007         * common/gdb_string_view.h: Remove libstdc++ implementation
2008         details, adjust to gdb reality.
2009         * common/gdb_string_view.tcc: Likewise.
2010         * cli/cli-script.c (struct string_view): Remove.
2011         (user_args) <m_args>: Change element type to gdb::string_view.
2012         (user_args::insert_args): Adjust.
2013
2014 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2015
2016         * common/gdb_string_view.h: New file.
2017         * common/gdb_string_view.tcc: New file.
2018
2019 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
2020
2021         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
2022         * configure: Re-generate.
2023
2024 2018-04-09  Pedro Alves  <palves@redhat.com>
2025
2026         * gdbarch.sh: Include "observable.h" instead of "observer.h".
2027         (set_target_gdbarch): Call
2028         gdb::observers::architecture_changed.notify instead of
2029         observer_notify_architecture_changed.
2030
2031 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2032
2033         * tracepoint.c (struct current_traceframe_cleanup): Remove.
2034         (do_restore_current_traceframe_cleanup): Remove.
2035         (restore_current_traceframe_cleanup_dtor): Remove.
2036         (make_cleanup_restore_current_traceframe): Remove.
2037         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
2038         New.
2039         * tracepoint.h (struct scoped_restore_current_traceframe): New.
2040         * infrun.c (fetch_inferior_event): Use
2041         scoped_restore_current_traceframe.
2042
2043 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2044
2045         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
2046         Remove.
2047         <n_allocated_type_units>: Remove.
2048         <all_type_units>: Change to std::vector.
2049         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2050         to std::vector change.
2051         (dwarf2_per_objfile::get_cutu): Likewise.
2052         (dwarf2_per_objfile::get_tu): Likewise.
2053         (create_signatured_type_table_from_index): Likewise.
2054         (create_signatured_type_table_from_debug_names): Likewise.
2055         (dw2_symtab_iter_next): Likewise.
2056         (dw2_print_stats): Likewise.
2057         (dw2_expand_all_symtabs): Likewise.
2058         (dw2_expand_marked_cus): Likewise.
2059         (dw2_debug_names_iterator::next): Likewise.
2060         (dwarf2_initialize_objfile): Likewise.
2061         (add_signatured_type_cu_to_table): Likewise.
2062         (create_all_type_units): Likewise.
2063         (add_type_unit): Likewise.
2064         (struct tu_abbrev_offset): Add constructor.
2065         (build_type_psymtabs_1): Adjust to std::vector change.
2066         (print_tu_stats): Likewise.
2067         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2068         (write_debug_names): Likewise.
2069
2070 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2071
2072         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
2073         Make an std::vector.
2074         <n_comp_units>: Remove.
2075         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2076         to std::vector change.
2077         (dwarf2_per_objfile::get_cutu): Likewise.
2078         (dwarf2_per_objfile::get_cu): Likewise.
2079         (create_cus_from_index): Likewise.
2080         (create_addrmap_from_index): Likewise.
2081         (create_addrmap_from_aranges): Likewise.
2082         (dwarf2_read_index): Likewise.
2083         (dw2_find_last_source_symtab): Likewise.
2084         (dw2_map_symtabs_matching_filename): Likewise.
2085         (dw2_symtab_iter_next): Likewise.
2086         (dw2_print_stats): Likewise.
2087         (dw2_expand_all_symtabs): Likewise.
2088         (dw2_expand_symtabs_with_fullname): Likewise.
2089         (dw2_expand_marked_cus): Likewise.
2090         (dw2_map_symbol_filenames): Likewise.
2091         (create_cus_from_debug_names): Likewise.
2092         (dwarf2_read_debug_names): Likewise.
2093         (dw2_debug_names_iterator::next): Likewise.
2094         (dwarf2_initialize_objfile): Likewise.
2095         (set_partial_user): Likewise.
2096         (dwarf2_build_psymtabs_hard): Likewise.
2097         (read_comp_units_from_section): Remove arguments, adjust to
2098         std::vector change.
2099         (create_all_comp_units): Adjust to std::vector and
2100         read_comp_units_from_section changes.
2101         (dwarf2_find_containing_comp_unit): Adjust to std::vector
2102         change.
2103         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2104         (psyms_seen_size): Likewise.
2105         (write_gdbindex): Likewise.
2106         (write_debug_names): Likewise.
2107
2108 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2109
2110         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
2111         with dwarf2_per_objfile.
2112         (create_cus_from_index): Likewise.
2113         (create_signatured_type_table_from_index): Likewise.
2114         (dwarf2_read_index): Likewise.
2115         (dwarf2_initialize_objfile): Likewise.
2116         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
2117         per_cu rather than get_dwarf2_per_objfile.
2118
2119 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2120
2121         * dwarf2read.h (struct signatured_type): Forward declare.
2122         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
2123         New methods.
2124         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
2125         (dw2_get_cutu): ...this.
2126         (dwarf2_per_objfile::get_cu): Rename from...
2127         (dw2_get_cu): ...this.
2128         (dwarf2_per_objfile::get_tu): New.
2129         (create_addrmap_from_index): Adjust.
2130         (create_addrmap_from_aranges): Adjust.
2131         (dw2_find_last_source_symtab): Adjust.
2132         (dw2_map_symtabs_matching_filename): Adjust.
2133         (dw2_symtab_iter_next): Adjust.
2134         (dw2_print_stats): Adjust.
2135         (dw2_expand_all_symtabs): Adjust.
2136         (dw2_expand_symtabs_with_fullname): Adjust.
2137         (dw2_expand_marked_cus): Adjust.
2138         (dw_expand_symtabs_matching_file_matcher): Adjust.
2139         (dw2_map_symbol_filenames): Adjust.
2140         (dw2_debug_names_iterator::next): Adjust.
2141         (dwarf2_initialize_objfile): Adjust.
2142         (set_partial_user): Adjust.
2143         (dwarf2_build_psymtabs_hard): Adjust.
2144
2145 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2146
2147         * dwarf2read.c (create_signatured_type_table_from_debug_names):
2148         Remove unused variables.
2149         (dw2_map_symtabs_matching_filename): Likewise.
2150         (dwarf2_record_block_ranges): Likewise.
2151         (dwarf2_read_addr_index): Likewise.
2152         (follow_die_offset): Likewise.
2153
2154 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2155
2156         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
2157         to symbol_file_add_main.
2158
2159 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2160
2161         PR mi/22299
2162         * mi/mi-console.c (do_fputc_async_safe): New.
2163         (mi_console_file::write_async_safe): New.
2164         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
2165         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
2166         New.
2167         * ui-file.c (ui_file::putstrn): Adjust call to
2168         fputstrn_unfiltered.
2169         * utils.c (printchar): Replace do_fputs and do_fprintf
2170         parameters by do_fputc.
2171         (fputstr_filtered): Adjust call to printchar.
2172         (fputstr_unfiltered): Likewise.
2173         (fputstrn_filtered): Likewise.
2174         (fputstrn_unfiltered): Add do_fputc parameter, pass to
2175         printchar.
2176         * utils.h (do_fputc_ftype): New typedef.
2177         (fputstrn_unfiltered): Add do_fputc parameter.
2178
2179 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
2180
2181         * regformats/i386/i386-avx.dat: Remove.
2182
2183 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
2184
2185         PR gdb/22979
2186         * amd64-tdep.c (amd64_none_init_abi): New function.
2187         (amd64_x32_none_init_abi): New function.
2188         (_initialize_amd64_tdep): Register handlers for x86-64 and
2189         x64_32 with GDB_OSABI_NONE.
2190         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
2191         GDB_OSABI_NONE osabi.
2192
2193 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
2194
2195         PR gdb/22980
2196         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
2197         GDB_OSABI_NONE.
2198         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
2199         * osabi.c (gdb_osabi_names): Add "unknown" entry.
2200
2201 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
2202
2203         * common/byte-vector.h (char_vector): New type.
2204         * target.h (target_read_alloc): Return
2205         gdb::optional<byte_vector>.
2206         (target_read_stralloc): Return gdb::optional<char_vector>.
2207         (target_get_osdata): Return gdb::optional<char_vector>.
2208         * target.c (target_read_alloc_1): Templatize.  Replacement
2209         manual memory management with vector.
2210         (target_read_alloc): Change return type, adjust.
2211         (target_read_stralloc): Change return type, adjust.
2212         (target_get_osdata): Change return type, adjust.
2213         * auxv.c (struct auxv_info) <length>: Remove.
2214         <data>: Change type to gdb::optional<byte_vector>.
2215         (auxv_inferior_data_cleanup): Free auxv_info with delete.
2216         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
2217         (target_auxv_search): Adjust.
2218         (fprint_target_auxv): Adjust.
2219         * avr-tdep.c (avr_io_reg_read_command): Adjust.
2220         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
2221         (linux_make_corefile_notes): Adjust.
2222         * osdata.c (get_osdata): Adjust.
2223         * remote.c (remote_get_threads_with_qxfer): Adjust.
2224         (remote_memory_map): Adjust.
2225         (remote_traceframe_info): Adjust.
2226         (btrace_read_config): Adjust.
2227         (remote_read_btrace): Adjust.
2228         (remote_pid_to_exec_file): Adjust.
2229         * solib-aix.c (solib_aix_get_library_list): Adjust.
2230         * solib-dsbt.c (decode_loadmap): Don't free buf.
2231         (dsbt_get_initial_loadmaps): Adjust.
2232         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
2233         * solib-target.c (solib_target_current_sos): Adjust.
2234         * tracepoint.c (sdata_make_value): Adjust.
2235         * xml-support.c (xinclude_start_include): Adjust.
2236         (xml_fetch_content_from_file): Adjust.
2237         * xml-support.h (xml_fetch_another): Change return type.
2238         (xml_fetch_content_from_file): Change return type.
2239         * xml-syscall.c (xml_init_syscalls_info): Adjust.
2240         * xml-tdesc.c (file_read_description_xml): Adjust.
2241         (fetch_available_features_from_target): Change return type.
2242         (target_fetch_description_xml): Adjust.
2243         (target_read_description_xml): Adjust.
2244
2245 2018-04-06  Tom Tromey  <tom@tromey.com>
2246
2247         * value.c (~value): Update.
2248         (struct value) <contents>: Now unique_xmalloc_ptr.
2249         (value_contents_bits_eq, allocate_value_contents)
2250         (value_contents_raw, value_contents_all_raw)
2251         (value_contents_for_printing, value_contents_for_printing_const)
2252         (set_value_enclosing_type): Update.
2253
2254 2018-04-06  Tom Tromey  <tom@tromey.com>
2255
2256         * value.c (range_s): Remove typedef, VEC.
2257         (struct range): Add operator<.
2258         (range_lessthan): Remove.
2259         (ranges_contain): Change type.
2260         (~value): Update.
2261         (struct value) <unavailable, optimized_out>: Now std::vector.
2262         (value_entirely_available)
2263         (value_entirely_covered_by_range_vector)
2264         (value_entirely_unavailable, value_entirely_optimized_out):
2265         Update.
2266         (insert_into_bit_range_vector): Change argument type.
2267         (find_first_range_overlap): Likewise.
2268         (struct ranges_and_idx, value_contents_bits_eq)
2269         (require_not_optimized_out, require_available): Update.
2270         (ranges_copy_adjusted): Change argument types.
2271         (value_optimized_out, value_copy, value_fetch_lazy): Update.
2272
2273 2018-04-06  Tom Tromey  <tom@tromey.com>
2274
2275         * value.c (~value): Update.
2276         (struct value) <parent>: Now a value_ref_ptr.
2277         (value_parent, set_value_parent, value_address, value_copy):
2278         Update.
2279
2280 2018-04-06  Tom Tromey  <tom@tromey.com>
2281
2282         * value.c (struct value): Add constructor, destructor, and member
2283         initializers.
2284         (allocate_value_lazy, value_decref): Update.
2285
2286 2018-04-06  Tom Tromey  <tom@tromey.com>
2287
2288         * value.c (struct value) <released, next>: Remove.
2289         (all_values): Now a std::vector.
2290         (allocate_value_lazy): Update.
2291         (value_next): Remove.
2292         (value_mark, value_free_to_mark, release_value)
2293         (value_release_to_mark): Update.
2294
2295 2018-04-06  Tom Tromey  <tom@tromey.com>
2296
2297         * value.h (fetch_subexp_value, value_release_to_mark): Update.
2298         (free_value_chain): Remove.
2299         * value.c (free_value_chain): Remove.
2300         (value_release_to_mark): Return a std::vector.
2301         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
2302         std::vector.
2303         (check_condition): Update.
2304         * eval.c (fetch_subexp_value): Change "val_chain" to a
2305         std::vector.
2306         * breakpoint.c (update_watchpoint): Update.
2307         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
2308
2309 2018-04-06  Tom Tromey  <tom@tromey.com>
2310
2311         * value.h (free_all_values): Remove.
2312         * value.c (free_all_values): Remove.
2313
2314 2018-04-06  Tom Tromey  <tom@tromey.com>
2315
2316         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
2317         (value_history_chain, value_history_count): Remove.
2318         (value_history): New global.
2319         (record_latest_value, access_value_history, show_values)
2320         (preserve_values): Update.
2321
2322 2018-04-06  Tom Tromey  <tom@tromey.com>
2323
2324         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
2325         * varobj.c (varobj_set_display_format, varobj_set_value)
2326         (install_default_visualizer, construct_visualizer)
2327         (install_new_value, ~varobj, varobj_get_value_type)
2328         (my_value_of_variable, varobj_editable_p): Update.
2329         * c-varobj.c (c_describe_child, c_value_of_variable)
2330         (cplus_number_of_children, cplus_describe_child): Update.
2331         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
2332         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
2333         (ada_value_of_variable, ada_value_is_changeable_p): Update.
2334
2335 2018-04-06  Tom Tromey  <tom@tromey.com>
2336
2337         * printcmd.c (last_examine_address): Change type to
2338         value_ref_ptr.
2339         (do_examine, x_command): Update.
2340
2341 2018-04-06  Tom Tromey  <tom@tromey.com>
2342
2343         * value.c (release_value): Update.
2344         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
2345         (struct bpstats) <val>: Now a value_ref_ptr.
2346         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
2347         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
2348         (~watchpoint, print_it_watchpoint, watch_command_1)
2349         (invalidate_bp_value_on_memory_change): Update.
2350
2351 2018-04-06  Tom Tromey  <tom@tromey.com>
2352
2353         * varobj.c (varobj_clear_saved_item)
2354         (update_dynamic_varobj_children, install_new_value, ~varobj):
2355         Update.
2356         * value.h (value_incref): Move declaration earlier.
2357         (value_decref): Rename from value_free.
2358         (struct value_ref_policy): New.
2359         (value_ref_ptr): New typedef.
2360         (struct value_deleter): Remove.
2361         (gdb_value_up): Remove typedef.
2362         (release_value): Change return type.
2363         (release_value_or_incref): Remove.
2364         * value.c (set_value_parent): Update.
2365         (value_incref): Change return type.
2366         (value_decref): Rename from value_free.
2367         (value_free_to_mark, free_all_values, free_value_chain): Update.
2368         (release_value): Return value_ref_ptr.
2369         (release_value_or_incref): Remove.
2370         (record_latest_value, set_internalvar, clear_internalvar):
2371         Update.
2372         * stack.c (info_frame_command): Don't call value_free.
2373         * python/py-value.c (valpy_dealloc, valpy_new)
2374         (value_to_value_object): Update.
2375         * printcmd.c (do_examine): Update.
2376         * opencl-lang.c (lval_func_free_closure): Update.
2377         * mi/mi-main.c (register_changed_p): Don't call value_free.
2378         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
2379         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
2380         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
2381         value_free.
2382         * guile/scm-value.c (vlscm_free_value_smob)
2383         (vlscm_scm_from_value): Update.
2384         * frame.c (frame_register_unwind, frame_unwind_register_signed)
2385         (frame_unwind_register_unsigned, get_frame_register_bytes)
2386         (put_frame_register_bytes): Don't call value_free.
2387         * findvar.c (address_from_register): Don't call value_free.
2388         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
2389         * dwarf2loc.c (entry_data_value_free_closure)
2390         (value_of_dwarf_reg_entry, free_pieced_value_closure)
2391         (dwarf2_evaluate_loc_desc_full): Update.
2392         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
2393         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
2394         (~watchpoint, watch_command_1)
2395         (invalidate_bp_value_on_memory_change): Update.
2396         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
2397
2398 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
2399
2400         PR gdb/23022
2401         * warning.m4: Add -Wno-error=deprecated-register.
2402         * configure: Re-generate.
2403
2404 2018-04-05  Tom Tromey  <tom@tromey.com>
2405
2406         * linespec.h: Remove include of "vec.h".
2407
2408 2018-04-05  Tom Tromey  <tom@tromey.com>
2409
2410         * linespec.c (typep): Remove typedef.
2411         (find_methods, find_superclass_methods): Take a std::vector.
2412         (find_method): Use std::vector.
2413
2414 2018-04-05  Tom Tromey  <tom@tromey.com>
2415
2416         * utils.c (compare_strings): Remove.
2417         * utils.h (compare_strings): Remove.
2418         * objc-lang.h (find_imps): Update.
2419         * objc-lang.c (find_methods): Take a std::vector.
2420         (uniquify_strings, find_imps): Likewise.
2421         * linespec.c (find_methods): Take a std::vector.
2422         (decode_objc): Use std::vector.
2423         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
2424         a std::vector.
2425         (find_method, find_function_symbols): Use std::vector.
2426
2427 2018-04-05  Tom Tromey  <tom@tromey.com>
2428
2429         * completer.c (completion_tracker::completion_tracker): Remove
2430         cast.
2431         (completion_tracker::discard_completions): Likewise.
2432         * breakpoint.c (ambiguous_names_p): Remove cast.
2433         * ada-lang.c (_initialize_ada_language): Remove cast.
2434         * utils.h (streq): Update.
2435         (streq_hash): Add new declaration.
2436         * utils.c (streq): Return bool.
2437         (streq_hash): New function.
2438
2439 2018-04-05  Tom Tromey  <tom@tromey.com>
2440
2441         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
2442         Remove a string copy.
2443
2444 2018-04-05  Tom Tromey  <tom@tromey.com>
2445
2446         * linespec.c (filter_results): Use std::vector.
2447         (decode_line_2, decode_line_full): Update.
2448
2449 2018-04-05  Tom Tromey  <tom@tromey.com>
2450
2451         * linespec.c (canonical_to_fullform): Return std::string.
2452         (filter_results): Update.
2453         (struct decode_line_2_item): Add constructor.
2454         <fullform, displayform>: Now std::string.
2455         (decode_line_2_compare_items): Now a std::sort comparator.
2456         (decode_line_2): Update.
2457
2458 2018-04-05  Tom Tromey  <tom@tromey.com>
2459
2460         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
2461         (unexpected_linespec_error): Update.
2462         (linespec_parse_basic, parse_linespec): Update.
2463
2464 2018-04-05  Tom Tromey  <tom@tromey.com>
2465
2466         * linespec.c (linespec_parse_basic): Reindent.
2467
2468 2018-04-05  Tom Tromey  <tom@tromey.com>
2469
2470         * minsyms.h (iterate_over_minimal_symbols): Update.
2471         * minsyms.c (iterate_over_minimal_symbols): Take a
2472         gdb::function_view.
2473         * linespec.c (struct collect_minsyms): Remove.
2474         (compare_msyms): Now a std::sort comparator.
2475         (add_minsym): Add parameters.
2476         (search_minsyms_for_name): Update.  Use std::vector.
2477
2478 2018-04-03  Tom Tromey  <tom@tromey.com>
2479
2480         * mipsread.c (read_alphacoff_dynamic_symtab): Use
2481         gdb::byte_vector.
2482
2483 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
2484
2485         * MAINTAINERS (Write After Approval): Add Weimin Pan.
2486
2487 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
2488
2489         PR gdb/16959
2490         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
2491         printing static type.
2492
2493 2018-04-01  Tom Tromey  <tom@tromey.com>
2494
2495         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
2496         (rs6000_xfer_shared_libraries): Update.
2497
2498 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
2499
2500         * common/gdb_vecs.h (char_ptr): Remove.
2501         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
2502
2503 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
2504
2505         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
2506         with std::vector.
2507         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
2508
2509 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
2510
2511         * tracepoint.h (struct uploaded_tp): Initialize fields.
2512         <actions, step_actions, cmd_strings>: Change type to
2513         std::vector<char *>.
2514         * tracepoint.c (get_uploaded_tp): Allocate with new.
2515         (free_uploaded_tps): Free with delete.
2516         (parse_tracepoint_definition): Adjust to std::vector change.
2517         * breakpoint.c (read_uploaded_action): Likewise.
2518         (create_tracepoint_from_upload): Likewise.
2519         * ctf.c (ctf_write_uploaded_tp): Likewise.
2520         (SET_ARRAY_FIELD): Likewise.
2521         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
2522
2523 2018-03-30  Tom Tromey  <tom@tromey.com>
2524
2525         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
2526         std::unique_ptr.
2527         (svr4_keep_data_in_core): Update.
2528         (svr4_read_so_list): Update.
2529
2530 2018-03-30  Tom Tromey  <tom@tromey.com>
2531
2532         * windows-nat.c (handle_output_debug_string, handle_exception):
2533         Update.
2534         * target.h (target_read_string): Update.
2535         * target.c (target_read_string): Change "string" to
2536         unique_xmalloc_ptr.
2537         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
2538         Update.
2539         * solib-frv.c (frv_current_sos): Update.
2540         * solib-dsbt.c (dsbt_current_sos): Update.
2541         * solib-darwin.c (darwin_current_sos): Update.
2542         * linux-thread-db.c (inferior_has_bug): Update.
2543         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
2544         Update.  Remove alloca.
2545         * ada-lang.c (ada_main_name): Update.
2546
2547 2018-03-30  Tom Tromey  <tom@tromey.com>
2548
2549         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
2550         (struct dwo_file_deleter): New.
2551         (dwo_file_up): New typedef.
2552         (open_and_init_dwo_file): Use dwo_file_up.
2553         (free_dwo_file_cleanup): Remove.
2554
2555 2018-03-30  Tom Tromey  <tom@tromey.com>
2556
2557         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
2558         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
2559
2560 2018-03-30  Tom Tromey  <tom@tromey.com>
2561
2562         * dwarf2read.c (class free_cached_comp_units): New class.
2563         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
2564         (free_cached_comp_units): Remove function.
2565
2566 2018-03-30  Tom Tromey  <tom@tromey.com>
2567
2568         * utils.h (make_cleanup_unpush_target): Remove.
2569         * inf-ptrace.c (struct target_unpusher): New.
2570         (target_unpush_up) New typedef.
2571         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
2572         target_unpush_up.
2573         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
2574
2575 2018-03-27  Tom Tromey  <tom@tromey.com>
2576
2577         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
2578
2579 2018-03-27  Pedro Alves  <palves@redhat.com>
2580             Tom Tromey  <tom@tromey.com>
2581
2582         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
2583         destructor.  Now a class.
2584         (gdb_readline_wrapper_cleanup): Remove function.
2585         (gdb_readline_wrapper): Remove cleanups.
2586
2587 2018-03-27  Tom Tromey  <tom@tromey.com>
2588
2589         * typeprint.h (struct type_print_options) <local_typedefs,
2590         global_typedefs>: Remove "struct" keyword.
2591         (class typedef_hash_table): New class.
2592         (recursively_update_typedef_hash, add_template_parameters)
2593         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
2594         (find_typedef_in_hash): Don't declare.
2595         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
2596         (typedef_hash_table::recursively_update): Rename from
2597         recursively_update_typedef_hash.  Now a member.
2598         (typedef_hash_table::add_template_parameters): Rename from
2599         add_template_parameters.  Now a member.
2600         (typedef_hash_table::typedef_hash_table): Now a constructor;
2601         rename from create_typedef_hash.
2602         (typedef_hash_table::~typedef_hash_table): Now a destructor;
2603         rename from free_typedef_hash.
2604         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
2605         (do_free_global_table): Remove.
2606         (typedef_hash_table::typedef_hash_table): New constructor; renamed
2607         from copy_type_recursive.
2608         (create_global_typedef_table): Remove.
2609         (typedef_hash_table::find_global_typedef): Now a member of
2610         typedef_hash_table.
2611         (typedef_hash_table::find_typedef): Rename from
2612         find_typedef_in_hash; now a member.
2613         (whatis_exp): Update.
2614         * extension.h (struct ext_lang_type_printers): Add constructor and
2615         destructor.
2616         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
2617         declare.
2618         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
2619         Now a constructor; rename from start_ext_lang_type_printers.
2620         (ext_lang_type_printers): Now a destructor; rename from
2621         free_ext_lang_type_printers.
2622         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
2623         Update.
2624         (c_type_print_base_struct_union): Update.  Remove cleanups.
2625
2626 2018-03-27  Tom Tromey  <tom@tromey.com>
2627
2628         * dwarf-index-write.c: Include <cmath>.
2629
2630 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
2631
2632         * NEWS: Add entry describing new "set|show varsize-limit" command.
2633         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
2634         command.
2635         * printcmd.c (_initialize_printcmd): Add "set var" alias of
2636         "set variable".
2637
2638 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
2639
2640         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
2641         dwarf-index-write.c
2642         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
2643         * dwarf-index-common.c: New file.
2644         * dwarf-index-common.h: New file.
2645         * dwarf-index-write.c: New file.
2646         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
2647         (struct dwarf2_section_info): Move from here.
2648         (dwarf2_section_info_def): Likewise.
2649         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
2650         (offset_type): Likewise.
2651         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
2652         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
2653         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
2654         (byte_swap): Likewise.
2655         (MAYBE_SWAP): Likewise.
2656         (dwarf2_per_cu_ptr): Likewise.
2657         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
2658         (struct tu_stats): Likewise.
2659         (struct dwarf2_per_objfile): Likewise.
2660         (struct dwarf2_per_cu_data): Likewise.
2661         (struct signatured_type): Likewise.
2662         (sig_type_ptr): Likewise.
2663         (DEF_VEC_P (sig_type_ptr)): Likewise.
2664         (INDEX4_SUFFIX): Likewise.
2665         (INDEX5_SUFFIX): Likewise.
2666         (DEBUG_STR_SUFFIX): Likewise.
2667         (dwarf2_read_section): Make non-static.
2668         (mapped_index_string_hash): Move from here.
2669         (dwarf5_djb_hash): Likewise.
2670         (file_write): Likewise.
2671         (class data_buf): Likewise.
2672         (struct symtab_index_entry): Likewise.
2673         (struct mapped_symtab): Likewise.
2674         (find_slot): Likewise.
2675         (hash_expand): Likewise.
2676         (add_index_entry): Likewise.
2677         (uniquify_cu_indices): Likewise.
2678         (class c_str_view): Likewise.
2679         (class c_str_view_hasher): Likewise.
2680         (class vector_hasher): Likewise.
2681         (write_hash_table): Likewise.
2682         (psym_index_map): Likewise.
2683         (struct addrmap_index_data): Likewise.
2684         (add_address_entry): Likewise.
2685         (add_address_entry_worker): Likewise.
2686         (write_address_map): Likewise.
2687         (symbol_kind): Likewise.
2688         (write_psymbols): Likewise.
2689         (struct signatured_type_index_data): Likewise.
2690         (write_one_signatured_type): Likewise.
2691         (recursively_count_psymbols): Likewise.
2692         (recursively_write_psymbols): Likewise.
2693         (class debug_names): Likewise.
2694         (check_dwarf64_offsets): Likewise.
2695         (psyms_seen_size): Likewise.
2696         (write_gdbindex): Likewise.
2697         (write_debug_names): Likewise.
2698         (assert_file_size): Likewise.
2699         (write_psymtabs_to_index): Likewise.
2700         (save_gdb_index_command): Likewise.
2701         (_initialize_dwarf2_read): Don't register the "save gdb-index"
2702         command.
2703         * dwarf2read.h: New file.
2704
2705 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
2706
2707         PR gdb/22670
2708         * dwarf2read.c (dwarf2_physname): Do not return the demangled
2709         symbol name if the CU's language stores symbol names in linkage
2710         format.
2711         * language.h (struct language_defn)
2712         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
2713         all instances of this struct.
2714
2715 2018-03-26  Tom Tromey  <tom@tromey.com>
2716
2717         * stack.c (backtrace_command_1): Remove verbose code.
2718
2719 2018-03-26  Tom Tromey  <tom@tromey.com>
2720
2721         * python/py-framefilter.c (py_print_type): Don't catch
2722         exceptions.  Return void.
2723         (py_print_value): Likewise.
2724         (py_print_single_arg): Likewise.
2725         (enumerate_args): Don't catch exceptions.
2726         (py_print_args): Likewise.
2727         (py_print_frame): Likewise.
2728         (gdbpy_apply_frame_filter): Catch exceptions here.
2729
2730 2018-03-26  Tom Tromey  <tom@tromey.com>
2731
2732         * stack.c (_initialize_stack): Remove trailing newlines from help
2733         text.  Add "Usage" line to "backtrace" help.
2734
2735 2018-03-26  Tom Tromey  <tom@tromey.com>
2736
2737         PR python/16486:
2738         * python/py-framefilter.c (py_print_args): Call wrap_hint.
2739
2740 2018-03-26  Tom Tromey  <tom@tromey.com>
2741
2742         * python/py-framefilter.c (py_print_single_arg): Return
2743         EXT_LANG_BT_ERROR from catch.
2744
2745 2018-03-26  Tom Tromey  <tom@tromey.com>
2746
2747         PR backtrace/15584:
2748         * stack.c (backtrace_command_1): Move some code into no-filters
2749         "if".
2750
2751 2018-03-26  Tom Tromey  <tom@tromey.com>
2752
2753         * python/py-framefilter.c (throw_quit_or_print_exception): New
2754         function.
2755         (gdbpy_apply_frame_filter): Use it.
2756
2757 2018-03-26  Tom Tromey  <tom@tromey.com>
2758
2759         PR cli/17716:
2760         * python/py-framefilter.c (py_print_type, py_print_value)
2761         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
2762         RETURN_MASK_ERROR.
2763
2764 2018-03-26  Tom Tromey  <tom@tromey.com>
2765
2766         * python/py-framefilter.c (enumerate_args): Use
2767         gdb::unique_xmalloc_ptr.
2768
2769 2018-03-26  Tom Tromey  <tom@tromey.com>
2770
2771         * python/py-framefilter.c (py_print_frame): Return
2772         EXT_LANG_BT_OK.
2773         (gdbpy_apply_frame_filter): Update comment.
2774         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
2775         Remove.
2776         <EXT_LANG_BT_NO_FILTERS>: Change value.
2777
2778 2018-03-26  Tom Tromey  <tom@tromey.com>
2779
2780         PR backtrace/15582:
2781         * stack.c (backtrace_command): Parse "hide" argument.
2782         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
2783         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
2784         constant.
2785
2786 2018-03-26  Tom Tromey  <tom@tromey.com>
2787
2788         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
2789         add "flags".
2790         (backtrace_command): Remove "fulltrace", add "flags".
2791
2792 2018-03-26  Tom Tromey  <tom@tromey.com>
2793
2794         * stack.c (backtrace_command): Rewrite command line parsing.
2795
2796 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
2797
2798         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
2799
2800 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
2801
2802         * filename-seen-cache.h: Add include guard.
2803
2804 2018-03-26  Keith Seitz  <keiths@redhat.com>
2805
2806         * symfile.c (place_section): Remove "struct" from section_addr_info
2807         in comment.
2808         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
2809         "struct" keyword from section_addr_info.
2810
2811 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
2812
2813         * regformats/regdef.h (reg): Add constructors.
2814
2815 2018-03-25  Pedro Alves  <palves@redhat.com>
2816
2817         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
2818         if then/else bodies in var_func_name extraction.
2819
2820 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
2821
2822         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
2823         lookup_minimal_symbol() to find symbol entry.
2824         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
2825
2826 2018-03-23  Keith Seitz  <keiths@redhat.com>
2827
2828         PR c++/22968
2829         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
2830         nested type definitions for C++, too.
2831
2832 2018-03-23  Tom Tromey  <tom@tromey.com>
2833
2834         * machoread.c (struct oso_el): Add a constructor.  Don't define as
2835         a typedef.
2836         (macho_register_oso): Remove.
2837         (macho_symtab_read): Take a std::vector.
2838         (oso_el_compare_name): Now a std::sort comparator.
2839         (macho_symfile_read_all_oso): Take a std::vector.
2840         (macho_symfile_read): Use std::vector.  Remove cleanups.
2841
2842 2018-03-22  Tom Tromey  <tom@tromey.com>
2843
2844         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
2845         (record_full_goto_bookmark): Use std::string.
2846
2847 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
2848
2849         PR tdep/18295
2850         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
2851         a single mask.
2852
2853 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
2854
2855         * rs6000-tdep.c (store_insn_p): New function.
2856         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
2857         and cr_reg to their unshifted values. Use store_insn_p to
2858         match LR saves using either R1 or fdata->alloca_reg. Use
2859         store_insn_p to match CR saves. Set alloca_reg_offset
2860         when alloca_reg and framep are set. Remove lr_reg shift
2861         when assigning to fdata->lr_register.
2862
2863 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2864
2865         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
2866         command line args instead of emitting a warning.
2867
2868 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
2869
2870         * tracepoint.h (struct static_tracepoint_marker): Initialize
2871         fields, define default constructor, move constructor and move
2872         assignment, disable the rest.
2873         <str_id, extra>: Make std::string.
2874         (release_static_tracepoint_marker): Remove.
2875         (free_current_marker): Remove.
2876         * tracepoint.c (free_current_marker): Remove.
2877         (parse_static_tracepoint_marker_definition): Adjust to
2878         std::string, use new hex2str overload.
2879         (release_static_tracepoint_marker): Remove.
2880         (print_one_static_tracepoint_marker): Get marker by reference
2881         and adjust to std::string.
2882         (info_static_tracepoint_markers_command): Adjust to std::vector
2883         changes
2884         * target.h (static_tracepoint_marker_p): Remove typedef.
2885         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
2886         (struct target_ops) <to_static_tracepoint_marker_at>: Return
2887         bool.
2888         <to_static_tracepoint_markers_by_strid>: Return std::vector.
2889         * target-debug.h
2890         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
2891         (target_debug_print_std_vector_static_tracepoint_marker): New.
2892         (target_debug_print_struct_static_tracepoint_marker_p): Rename
2893         to...
2894         (target_debug_print_static_tracepoint_marker_p): ... this.
2895         * target-delegates.c: Re-generate.
2896         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
2897         Make std::string.
2898         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
2899         (decode_static_tracepoint_spec): Adjust to std::vector.
2900         (tracepoint_print_one_detail): Adjust to std::string.
2901         (strace_marker_decode_location): Adjust to std::string.
2902         (update_static_tracepoint): Adjust to std::string, remove call
2903         to release_static_tracepoint_marker.
2904         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2905         Adjust to std::vector.
2906         * remote.c (remote_static_tracepoint_marker_at): Return bool.
2907         (remote_static_tracepoint_markers_by_strid): Adjust to
2908         std::vector.
2909         * common/rsp-low.h (hex2str): New overload with explicit count
2910         of bytes.
2911         * common/rsp-low.c (hex2str): New overload with explicit count
2912         of bytes.
2913         * unittests/rsp-low-selftests.c (test_hex2str): New function.
2914         (_initialize_rsp_low_selftests): Add test_hex2str test.
2915         * unittests/tracepoint-selftests.c
2916         (test_parse_static_tracepoint_marker_definition): Adjust to
2917         std::string.
2918
2919 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
2920
2921         * tracepoint.c (parse_static_tracepoint_marker_definition):
2922         Consider case where the definition is followed by more
2923         definitions.
2924         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2925         tracepoint-selftests.c.
2926         * unittests/tracepoint-selftests.c: New.
2927
2928 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
2929
2930         * MAINTAINERS (Write After Approval): Add Pedro Franco de
2931         Carvalho.
2932
2933 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
2934
2935         * symtab.c (find_pc_sect_line): fixed indentation.
2936
2937 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
2938
2939         * symtab.c (find_pc_sect_line): now uses binary search.
2940
2941 2018-03-19  Tom Tromey  <tom@tromey.com>
2942
2943         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
2944         "IDENT" production.
2945
2946 2018-03-19  Pedro Alves  <palves@redhat.com>
2947             Tom Tromey  <tom@tromey.com>
2948
2949         * unittests/observable-selftests.c: New file.
2950         * common/observable.h: New file.
2951         * observable.h: New file.
2952         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
2953         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
2954         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
2955         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
2956         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
2957         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
2958         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
2959         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
2960         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
2961         python/py-breakpoint.c, python/py-finishbreakpoint.c,
2962         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
2963         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
2964         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
2965         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
2966         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
2967         tui/tui-interp.c, valops.c: Update all users.
2968         * tui/tui-hooks.c (tui_bp_created_observer)
2969         (tui_bp_deleted_observer, tui_bp_modified_observer)
2970         (tui_inferior_exit_observer, tui_before_prompt_observer)
2971         (tui_normal_stop_observer, tui_register_changed_observer):
2972         Remove.
2973         (tui_observers_token): New global.
2974         (attach_or_detach, tui_attach_detach_observers): New functions.
2975         (tui_install_hooks, tui_remove_hooks): Use
2976         tui_attach_detach_observers.
2977         * record-btrace.c (record_btrace_thread_observer): Remove.
2978         (record_btrace_thread_observer_token): New global.
2979         * observer.sh: Remove.
2980         * observer.c: Rename to observable.c.
2981         * observable.c (namespace gdb_observers): Define new objects.
2982         (observer_debug): Move into gdb_observers namespace.
2983         (struct observer, struct observer_list, xalloc_observer_list_node)
2984         (xfree_observer_list_node, generic_observer_attach)
2985         (generic_observer_detach, generic_observer_notify): Remove.
2986         (_initialize_observer): Update.
2987         Don't include observer.inc.
2988         * Makefile.in (generated_files): Remove observer.h, observer.inc.
2989         (clean mostlyclean): Likewise.
2990         (observer.h, observer.inc): Remove targets.
2991         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
2992         (COMMON_SFILES): Use observable.c, not observer.c.
2993         * .gitignore: Remove observer.h.
2994
2995 2018-03-18  Tom Tromey  <tom@tromey.com>
2996
2997         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
2998         gdb::def_vector.
2999         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
3000
3001 2018-03-17  Tom Tromey  <tom@tromey.com>
3002
3003         * auto-load.c (auto_load_objfile_script_1): Use std::string.
3004
3005 2018-03-17  Tom Tromey  <tom@tromey.com>
3006
3007         * target.c (class scoped_target_fd): New.
3008         (target_fileio_close_cleanup): Remove.
3009         (target_fileio_read_alloc_1): Use scoped_target_fd.
3010
3011 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
3012
3013         * silent-rules.mk: New.
3014         * Makefile.in: Include silent-rules.mk
3015         (srcdir, VPATH, top_srcdir): Move up.
3016         (COMPILE): Add ECHO_CXX.
3017         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
3018         (init.c): Add ECHO_INIT_C.
3019         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3020         (version.c): Add ECHO_GEN.
3021         (printcmd.o): Add ECHO_CXX.
3022         (target-float.o): Add ECHO_CXX.
3023         (ada-exp.o): Add ECHO_CXX.
3024         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
3025         (insight$(EXEEXT)): Add ECHO_CXXLD.
3026         * gnulib/configure.ac: Add AM_SILENT_RULES.
3027         * gnulib/aclocal.m4: Re-generate.
3028         * gnulib/configure: Re-generate.
3029         * gnulib/import/Makefile.in: Re-generate.
3030
3031 2018-03-16  Tom Tromey  <tom@tromey.com>
3032
3033         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
3034         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
3035         * utils.c (do_free_section_addr_info)
3036         (make_cleanup_free_section_addr_info): Remove.
3037         * symfile.h (struct other_sections): Add constructor.
3038         (struct section_addr_info): Remove.
3039         (section_addr_info): New typedef.
3040         (struct sym_fns) <sym_offsets>: Change type of parameter.
3041         (build_section_addr_info_from_objfile)
3042         (relative_addr_info_to_section_offsets, addr_info_make_relative)
3043         (default_symfile_offsets, symbol_file_add)
3044         (symbol_file_add_from_bfd)
3045         (build_section_addr_info_from_section_table): Update.
3046         (alloc_section_addr_info, free_section_addr_info): Don't declare.
3047         * symfile.c (alloc_section_addr_info): Remove.
3048         (build_section_addr_info_from_section_table): Change return type.
3049         Update.
3050         (build_section_addr_info_from_bfd)
3051         (build_section_addr_info_from_objfile): Likewise.
3052         (free_section_addr_info): Remove.
3053         (relative_addr_info_to_section_offsets): Change type of "addrs".
3054         (addrs_section_compar): Now a std::sort comparator.
3055         (addrs_section_sort): Change return type.
3056         (addr_info_make_relative): Change type of "addrs".  Update.
3057         (default_symfile_offsets, syms_from_objfile_1)
3058         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
3059         (symbol_file_add_separate): Update.
3060         (symbol_file_add): Change type of "addrs".  Update.
3061         (add_symbol_file_command): Update.  Remove cleanups.
3062         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
3063         cleanups.
3064         * symfile-debug.c (debug_sym_offsets): Change type of "info".
3065         * solib.c (solib_read_symbols): Update.
3066         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
3067         * machoread.c (macho_symfile_offsets): Update.
3068         * jit.c (jit_bfd_try_read_symtab): Update.
3069
3070 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
3071
3072         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3073         unittests/utils-selftests.c.
3074         * unittests/utils-selftests.c: New file.
3075
3076 2018-03-14  Tom Tromey  <tom@tromey.com>
3077
3078         PR cli/14977:
3079         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
3080         for NULL.
3081
3082 2018-03-14  Tom Tromey  <tom@tromey.com>
3083
3084         PR cli/19918:
3085         * printcmd.c (printf_pointer): Allow "-" in format.
3086
3087 2018-03-14  Tom Tromey  <tom@tromey.com>
3088
3089         * printcmd.c (_initialize_printcmd): Add usage to printf.
3090
3091 2018-03-14  Yao Qi  <qiyao@sourceware.org>
3092
3093         * MAINTAINERS: Update my email address.
3094
3095 2018-03-13  Tom Tromey  <tom@tromey.com>
3096
3097         * machoread.c (macho_check_dsym): Change filenamep to a
3098         std::string*.
3099         (macho_symfile_read): Update.
3100         * symfile.c (load_command): Use std::string.
3101
3102 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3103
3104         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
3105         to error message string.
3106         (riscv_register_name): Use xsnprintf instead of sprintf.
3107         (riscv_insn::fetch_instruction): Use gdb_assert instead of
3108         internal_error.
3109         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
3110         error.
3111         (riscv_push_dummy_call): Likewise.
3112
3113 2018-03-12  Tom Tromey  <tom@tromey.com>
3114
3115         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
3116         Use gdb::byte_vector.
3117         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
3118
3119 2018-03-12  Yao Qi  <yao.qi@linaro.org>
3120
3121         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
3122         parameter type to readable_regcache.
3123         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
3124         the declaration.
3125
3126 2018-03-11  Tom Tromey  <tom@tromey.com>
3127
3128         * dwarf2read.c (struct nextfield): Add initializers.
3129         (struct nextfnfield): Remove.
3130         (struct fnfieldlist): Add initializers.  Remove "length" and
3131         "head", use std::vector.
3132         (struct decl_field_list): Remove.
3133         (struct field_info): Add initializers.
3134         <fields, baseclasses>: Now std::vector.
3135         <nbaseclasses, nfnfields, typedef_field_list_count,
3136         nested_types_list_count>: Remove.
3137         (dwarf2_add_field, dwarf2_add_type_defn)
3138         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
3139         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
3140         (process_structure_scope): Update.
3141
3142 2018-03-11  Tom Tromey  <tom@tromey.com>
3143
3144         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
3145         for use by std::sort.
3146         (build_type_psymtabs_1): Use std::vector.
3147
3148 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
3149
3150         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
3151         and LIBMPFR in the printed configuration.
3152
3153 2018-03-08  Tom Tromey  <tom@tromey.com>
3154
3155         * source.c (get_filename_and_charpos): Use scoped_fd.
3156         * nto-procfs.c (procfs_open_1): Use scoped_fd.
3157         (procfs_pidlist): Likewise.
3158         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
3159         (iterate_over_mappings): Likewise.
3160
3161 2018-03-08  Tom Tromey  <tom@tromey.com>
3162
3163         * infcall.c (struct call_return_meta_info)
3164         <stack_temporaries_enabled>: Remove.
3165         (get_call_return_value, call_function_by_hand_dummy): Update.
3166         * thread.c (disable_thread_stack_temporaries): Remove.
3167         (enable_thread_stack_temporaries): Remove.
3168         (thread_stack_temporaries_enabled_p): Return bool.
3169         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
3170         (get_last_thread_stack_temporary): Update.
3171         * eval.c (evaluate_subexp): Update.
3172         * gdbthread.h (class enable_thread_stack_temporaries): Now a
3173         class, not a function.
3174         (value_ptr, value_vec): Remove typedefs.
3175         (class thread_info) <stack_temporaries_enabled>: Now bool.
3176         <stack_temporaries>: Now a std::vector.
3177         (thread_stack_temporaries_enabled_p)
3178         (value_in_thread_stack_temporaries): Return bool.
3179
3180 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
3181
3182         * remote.c (putpkt_binary): Fix omitted bytes reporting.
3183         (getpkt_or_notif_sane_1): Likewise.
3184
3185 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
3186
3187         * build-id.c (build_id_to_debug_bfd): Use std::string.
3188
3189 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
3190
3191         * build-id.c (find_separate_debug_file_by_buildid): Return
3192         std::string.
3193         * build-id.h (find_separate_debug_file_by_buildid): Return
3194         std::string.
3195         * coffread.c (coff_symfile_read): Adjust to std::string.
3196         * elfread.c (elf_symfile_read): Adjust to std::string.
3197         * symfile.c (separate_debug_file_exists): Change parameter to
3198         std::string.
3199         (find_separate_debug_file): Return std::string.
3200         (find_separate_debug_file_by_debuglink): Return std::string.
3201         * symfile.h (find_separate_debug_file_by_debuglink): Return
3202         std::string.
3203
3204 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
3205
3206         * common/xml-utils.c (xml_escape_text): Move code to...
3207         (xml_escape_text_append): ... this new function.
3208         * common/xml-utils.h (xml_escape_text_append): New declaration.
3209         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
3210         New function.
3211         (_initialize_xml_utils): register test_xml_escape_text_append as
3212         a selftest.
3213
3214 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
3215
3216         * defs.h: Remove MAX_REGISTER_SIZE.
3217         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
3218         asserts.
3219         * python/py-unwind.c (pyuw_sniffer): Likewise.
3220
3221 2018-03-07  Tom Tromey  <tom@tromey.com>
3222
3223         * linux-tdep.c (linux_info_proc): Update.
3224         * target.h (struct target_ops) <to_fileio_readlink>: Return
3225         optional<string>.
3226         (target_fileio_readlink): Return optional<string>.
3227         * remote.c (remote_hostio_readlink): Return optional<string>.
3228         * inf-child.c (inf_child_fileio_readlink): Return
3229         optional<string>.
3230         * target.c (target_fileio_readlink): Return optional<string>.
3231
3232 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
3233
3234         * regcache.c (cooked_read_test): Add riscv to the list of
3235         architectures that have a save_reggroup.
3236
3237 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3238
3239         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
3240         value is not a dynamic class object.
3241
3242 2018-03-06  Tom Tromey  <tom@tromey.com>
3243
3244         * rust-exp.y: Formatting fixes.
3245
3246 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3247
3248         * riscv-tdep.c (riscv_register_name): Remove target description
3249         support.
3250         (riscv_gdbarch_init): Remove target description check.
3251
3252 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3253
3254         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
3255         comment.
3256         * riscv-tdep.h: Likewise.
3257
3258 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3259
3260         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
3261         (riscv_pseudo_register_write): Delete.
3262         (riscv_gdbarch_init): Remove all use of pseudo registers.
3263
3264 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
3265
3266         * record-btrace.c (btrace_print_lines): Replace cleanup
3267         parameter with RAII equivalents.
3268         (btrace_insn_history): Replace cleanup with RAII equivalents.
3269         * ui-out.h (make_cleanup_ui_out_list_begin_end,
3270         make_cleanup_ui_out_tuple_begin_end): Remove.
3271         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
3272         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
3273         make_cleanup_ui_out_list_begin_end): Remove.
3274
3275 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
3276
3277         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
3278         parameter types to std::vector.  Use bool.
3279         (record_btrace_wait): Replace VEC(tp_t) with
3280         std::vector<thread_info *>.
3281         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
3282
3283 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
3284
3285         * record-btrace.c (record_btrace_disable_callback): Remove.
3286         (struct scoped_btrace_disable): New.
3287         (record_btrace_open): Use scoped_btrace_disable.
3288
3289 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3290
3291         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
3292         reading values from registers.
3293
3294 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3295
3296         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
3297         where appropriate.
3298
3299 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3300
3301         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
3302         change parameter type.  Use GDB's print functions, and use
3303         core_addr_to_string where appropriate.
3304         (riscv_push_dummy_call): Use core_addr_to_string where
3305         appropriate, update call to riscv_print_arg_location, and reindent
3306         a few lines.
3307         (riscv_return_value): Update call to riscv_print_arg_location.
3308
3309 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3310             Tim Newsome <tim@sifive.com>
3311             Albert Ou <a0u@eecs.berkeley.edu>
3312             Darius Rad <darius@bluespec.com>
3313
3314         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
3315         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
3316         (ALLDEPFILES): Add riscv-tdep.c
3317         * configure.tgt: Add riscv support.
3318         * riscv-tdep.c: New file.
3319         * riscv-tdep.h: New file.
3320         * NEWS: Mention new target.
3321         * MAINTAINERS: Add entry for riscv.
3322
3323 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
3324
3325         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
3326         fields within aggregates.
3327
3328 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
3329
3330         * record-btrace.c (btrace_print_lines): Change type of flags to
3331         gdb_disassembly_flags.
3332
3333 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
3334
3335         * fbsd-nat.c: Include "inf-ptrace.h".
3336         (USE_SIGTRAP_SIGINFO): Conditionally define.
3337         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
3338         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
3339         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
3340         function.
3341         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
3342         Likewise.
3343         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
3344         Likewise.
3345         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
3346         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
3347         "supports_stopped_by_hw_breakpoint" target methods.
3348
3349 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
3350
3351         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
3352         * fbsd-nat.c (debug_fbsd_nat): New variable.
3353         (show_fbsd_nat_debug): New function.
3354         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
3355         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
3356
3357 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
3358
3359         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
3360         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
3361         prototype.
3362         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
3363         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
3364         method.
3365
3366 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
3367
3368         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
3369         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
3370
3371 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
3372
3373         * charset.c (struct charset_vector): New.
3374         (charsets): Change type to charset_vector.
3375         (find_charset_names): Adjust.
3376         (add_one): Adjust.
3377         (_initialize_charset): Adjust.
3378
3379 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
3380
3381         * progspace.h (struct program_space) <deleted_solibs>: Change
3382         type to std::vector<std::string>.
3383         * progspace.c (clear_program_space_solib_cache): Adjust.
3384         * breakpoint.c (print_solib_event): Adjust.
3385         (check_status_catch_solib): Adjust.
3386         * solib.c (update_solib_list): Adjust.
3387         * ui-out.h (class ui_out) <field_string>: New overload.
3388         * ui-out.c (ui_out::field_string): New overload.
3389
3390 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
3391
3392         * progspace.h (struct program_space): Add constructor and
3393         destructor, initialize fields.
3394         (add_program_space): Remove.
3395         * progspace.c (add_program_space): Rename to...
3396         (program_space::program_space): ... this.
3397         (release_program_space): Rename to...
3398         (program_space::~program_space): ... this.
3399         (delete_program_space): Use delete to delete program_space.
3400         (initialize_progspace): Use new to allocate program_space.
3401         * inferior.c (add_inferior_with_spaces): Likewise.
3402         (clone_inferior_command): Likewise.
3403         * infrun.c (follow_fork_inferior): Likewise.
3404         (handle_vfork_child_exec_or_exit): Likewise.
3405
3406 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
3407
3408         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
3409         (delim_string_to_char_ptr_vec): Return std::vector of
3410         gdb::unique_xmalloc_ptr.
3411         (dirnames_to_char_ptr_vec_append): Take std::vector of
3412         gdb::unique_xmalloc_ptr.
3413         (dirnames_to_char_ptr_vec): Return std::vector of
3414         gdb::unique_xmalloc_ptr.
3415         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
3416         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
3417         (delim_string_to_char_ptr_vec): Return an std::vector of
3418         gdb::unique_xmalloc_ptr, adjust the code.
3419         (dirnames_to_char_ptr_vec_append): Take an std::vector of
3420         gdb::unique_xmalloc_ptr, adjust the code.
3421         (dirnames_to_char_ptr_vec): Return an std::vector of
3422         gdb::unique_xmalloc_ptr, adjust the code.
3423         * auto-load.c (auto_load_safe_path_vec): Change type to
3424         std::vector of gdb::unique_xmalloc_ptr.
3425         (auto_load_expand_dir_vars): Return an std::vector of
3426         gdb::unique_xmalloc_ptr, adjust the code.
3427         (auto_load_safe_path_vec_update): Adjust.
3428         (filename_is_in_auto_load_safe_path_vec): Adjust.
3429         (auto_load_objfile_script_1): Adjust.
3430         * build-id.c (build_id_to_debug_bfd): Adjust.
3431         * linux-thread-db.c (thread_db_load_search): Adjust.
3432         * source.c (add_path): Adjust.
3433         (openp): Adjust.
3434         * symfile.c (find_separate_debug_file): Adjust.
3435         * utils.c (do_free_char_ptr_vec): Remove.
3436         (make_cleanup_free_char_ptr_vec): Remove.
3437
3438 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
3439
3440         PR gdb/22907
3441         * common/pathstuff.c: Conditionally include "<windows.h>".
3442
3443 2018-03-01  Georg Sauthoff  <mail@georg.so>
3444
3445         PR gdb/22888
3446         * gcore.in: Quote variables and switch interpreter to bash.
3447
3448 2018-03-01  Tom Tromey  <tom@tromey.com>
3449
3450         * dwarf2read.c (alloc_discriminant_info): Fix default_index
3451         assertion.  Add assertion for discriminant_index.
3452         (quirk_rust_enum): Use correct base type name in univariant case.
3453
3454 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
3455
3456         * record.c (get_call_history_modifiers): Return a
3457         record_print_flags.
3458         (cmd_record_call_history): Adjust.
3459         * record-btrace.c (record_btrace_call_history): Adjust.
3460         (record_btrace_call_history_range): Adjust.
3461         (record_btrace_call_history_from): Adjust.
3462         * target-debug.h (target_debug_print_record_print_flags): New.
3463         * target-delegates.c: Re-generate.
3464         * target.c (target_call_history): Change flags type.
3465         (target_call_history_from): Likewise.
3466         (target_call_history_range): Likewise.
3467         * target.h (struct target_ops) <target_call_history>: Likewise.
3468         (target_call_history_from): Likewise.
3469         (target_call_history_range): Likewise.
3470
3471 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
3472             Simon Marchi  <simon.marchi@polymtl.ca>
3473
3474         * common/common-utils.c: Include "sys/stat.h".
3475         (is_regular_file): Move here from "source.c"; change return
3476         type to "bool".
3477         * common/common-utils.h (is_regular_file): New prototype.
3478         * common/pathstuff.c (contains_dir_separator): New function.
3479         * common/pathstuff.h (contains_dir_separator): New prototype.
3480         * source.c: Don't include "sys/stat.h".
3481         (is_regular_file): Move to "common/common-utils.c".
3482
3483 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
3484
3485         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
3486         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
3487         * auto-load.c: Include "common/pathstuff.h".
3488         * common/common-def.h (current_directory): Move here.
3489         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
3490         function.
3491         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
3492         prototype.
3493         * common/pathstuff.c: New file.
3494         * common/pathstuff.h: New file.
3495         * compile/compile.c: Include "common/pathstuff.h".
3496         * defs.h (current_directory): Move to "common/common-defs.h".
3497         * dwarf2read.c: Include "common/pathstuff.h".
3498         * exec.c: Likewise.
3499         * guile/scm-safe-call.c: Likewise.
3500         * linux-thread-db.c: Likewise.
3501         * main.c: Likewise.
3502         * nto-tdep.c: Likewise.
3503         * objfiles.c: Likewise.
3504         * source.c: Likewise.
3505         * symtab.c: Likewise.
3506         * utils.c: Include "common/pathstuff.h".
3507         (gdb_realpath): Move to "common/pathstuff.c".
3508         (gdb_realpath_keepfile): Likewise.
3509         (gdb_abspath): Likewise.
3510         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
3511         (gdb_realpath_keepfile): Likewise.
3512         (gdb_abspath): Likewise.
3513
3514 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
3515
3516         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
3517         wildcard process pid for super_resume for kernels with a
3518         specific bug.
3519
3520 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
3521
3522         * compile/compile.c (get_args): Add additional comments
3523         explaining function.
3524
3525 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
3526             Tom Tromey  <tom@tromey.com>
3527
3528         * target.h (memory_write_request_s): Remove typedef.  Don't define
3529         VEC.
3530         (target_write_memory_blocks): Change argument to std::vector.
3531         (struct memory_write_request): Add constructor.
3532         * target-memory.c (compare_block_starting_address): Return bool.
3533         Change argument types.
3534         (claim_memory): Change arguments to use std::vector.
3535         (split_regular_and_flash_blocks, blocks_to_erase)
3536         (compute_garbled_blocks): Likewise.
3537         (cleanup_request_data, cleanup_write_requests_vector): Remove.
3538         (target_write_memory_blocks): Change argument to std::vector.
3539         * symfile.c (struct load_section_data): Add constructor and
3540         destructor.  Use std::vector for "requests".
3541         (struct load_progress_data): Add initializers.
3542         (load_section_callback): Update.  Use "new".
3543         (clear_memory_write_data): Remove.
3544         (generic_load): Update.
3545
3546 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
3547
3548         * arch/aarch64.h: Use common/tdesc.h.
3549
3550 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
3551
3552         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
3553         architecture with a 64-bit ABI.
3554
3555 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
3556
3557         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
3558         ahead of target description loading.
3559
3560 2018-02-26  Tom Tromey  <tom@tromey.com>
3561
3562         * stack.c (backtrace_command_1): Update.
3563         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
3564         of "flags".
3565         * python/py-framefilter.c (py_print_frame)
3566         (gdbpy_apply_frame_filter): Change type of "flags".
3567         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
3568         of "flags".
3569         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
3570         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
3571         * extension.h (enum frame_filter_flag): Rename from
3572         frame_filter_flags.
3573         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
3574         (apply_ext_lang_frame_filter): Change type of "flags".
3575         * extension.c (apply_ext_lang_frame_filter): Change type of
3576         "flags".
3577         * extension-priv.h (struct extension_language_ops)
3578         <apply_frame_filter>: Change type of "flags".
3579
3580 2018-02-26  Tom Tromey  <tom@tromey.com>
3581
3582         PR python/16497:
3583         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
3584         off-by-one in py_end computation.
3585         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
3586         PRINT_MORE_FRAMES.
3587         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
3588         constant.
3589
3590 2018-02-26  Tom Tromey  <tom@tromey.com>
3591
3592         * dwarf2read.c (struct variant_field): New.
3593         (struct nextfield) <variant>: New field.
3594         (dwarf2_add_field): Handle DW_TAG_variant_part.
3595         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
3596         discriminated union.
3597         (read_structure_type): Handle DW_TAG_variant_part.
3598         (handle_struct_member_die): New function, extracted from
3599         process_structure_scope.  Handle DW_TAG_variant.
3600         (process_structure_scope): Handle discriminated unions.  Call
3601         handle_struct_member_die.
3602
3603 2018-02-26  Tom Tromey  <tom@tromey.com>
3604
3605         * rust-lang.h (rust_last_path_segment): Declare.
3606         * rust-lang.c (rust_last_path_segment): Now public.  Change
3607         contract.
3608         (struct disr_info): Remove.
3609         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
3610         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
3611         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
3612         (rust_enum_p, rust_enum_variant): New function.
3613         (rust_underscore_fields): Remove "offset" parameter.
3614         (rust_print_enum): New function.
3615         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
3616         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
3617         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
3618         enums.
3619         (rust_internal_print_type): New function, from rust_print_type.
3620         Remove enum code.
3621         (rust_print_type): Call rust_internal_print_type.
3622         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
3623         Update enum handling.
3624         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
3625         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
3626         (rust_union_quirks): New functions.
3627         (process_full_comp_unit, process_full_type_unit): Call
3628         rust_union_quirks.
3629         (process_structure_scope): Update rust_unions if necessary.
3630
3631 2018-02-26  Tom Tromey  <tom@tromey.com>
3632
3633         * value.h (value_union_variant): Declare.
3634         * valops.c (value_union_variant): New function.
3635         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
3636         (struct discriminant_info): New.
3637         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
3638         enumerator.
3639         (struct main_type) <flag_discriminated_union>: New field.
3640
3641 2018-02-26  Tom Tromey  <tom@tromey.com>
3642
3643         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3644         unittests/unpack-selftests.c.
3645         * unittests/unpack-selftests.c: New file.
3646         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
3647
3648 2018-02-26  Yao Qi  <yao.qi@linaro.org>
3649
3650         * dwarf2read.c (struct partial_die_info) <read>: New method.
3651         (read_partial_die): Remove the declaration.
3652         (load_partial_dies): Update.
3653         (partial_die_info::partial_die_info):
3654         (read_partial_die): Change it to partial_die_info::read.
3655
3656 2018-02-26  Yao Qi  <yao.qi@linaro.org>
3657
3658         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
3659         (fixup_partial_die): Remove declaration.
3660         (scan_partial_symbols): Update.
3661         (partial_die_parent_scope): Likewise.
3662         (partial_die_full_name): Likewise.
3663         (fixup_partial_die): Change it to partial_die_info::fixup.
3664
3665 2018-02-26  Yao Qi  <yao.qi@linaro.org>
3666
3667         * dwarf2read.c (read_partial_die): Update the declaration.
3668         (load_partial_dies): Caller update.
3669         (read_partial_die): Remove one argument abbrev_len.
3670
3671 2018-02-26  Yao Qi  <yao.qi@linaro.org>
3672
3673         * dwarf2read.c (struct partial_die_info): Add ctor, delete
3674         assignment operator.
3675         (load_partial_dies): Use ctor and copy ctor.
3676         (read_partial_die): Update.
3677         (dwarf2_cu::find_partial_die): Use ctor.
3678
3679 2018-02-26  Yao Qi  <yao.qi@linaro.org>
3680
3681         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
3682         (find_partial_die_in_comp_unit): Change it to
3683         dwarf2_cu::find_partial_die.
3684         (find_partial_die): Update.
3685
3686 2018-02-26  Yao Qi  <yao.qi@linaro.org>
3687
3688         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
3689         is NULL.
3690
3691 2018-02-26  Yao Qi  <yao.qi@linaro.org>
3692
3693         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
3694
3695 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
3696
3697         * arch/amd64.h: Use common/tdesc.h.
3698         * arch/i386.c: Likewise.
3699         * arch/i386.h: Likewise.
3700         * arch/tic6x.c: Likewise.
3701         * arch/tdesc.h: Move file from here...
3702         * common/tdesc.h: ...to here.
3703         * features/aarch64-core.c: Regenerate.
3704         * features/aarch64-fpu.c: Regenerate.
3705         * features/i386/32bit-avx.c: Regenerate.
3706         * features/i386/32bit-avx512.c: Regenerate.
3707         * features/i386/32bit-core.c: Regenerate.
3708         * features/i386/32bit-linux.c: Regenerate.
3709         * features/i386/32bit-mpx.c: Regenerate.
3710         * features/i386/32bit-pkeys.c: Regenerate.
3711         * features/i386/32bit-sse.c: Regenerate.
3712         * features/i386/64bit-avx.c: Regenerate.
3713         * features/i386/64bit-avx512.c: Regenerate.
3714         * features/i386/64bit-core.c: Regenerate.
3715         * features/i386/64bit-linux.c: Regenerate.
3716         * features/i386/64bit-mpx.c: Regenerate.
3717         * features/i386/64bit-pkeys.c: Regenerate.
3718         * features/i386/64bit-segments.c: Regenerate.
3719         * features/i386/64bit-sse.c: Regenerate.
3720         * features/i386/x32-core.c: Regenerate.
3721         * features/tic6x-c6xp.c: Regenerate.
3722         * features/tic6x-core.c: Regenerate.
3723         * features/tic6x-gp.c: Regenerate.
3724         * target-descriptions.c: Use common/tdesc.h.
3725         * target-descriptions.h: Likewise.
3726
3727 2018-02-24  Tom Tromey  <tom@tromey.com>
3728
3729         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
3730         (try_thread_db_load_from_dir, thread_db_load_search): Use
3731         std::string.
3732         (info_auto_load_libthread_db_compare): Return bool.  Change
3733         argument types.
3734         (info_auto_load_libthread_db): Use std::vector, std::string.
3735         Remove cleanups.
3736
3737 2018-02-24  Tom Tromey  <tom@tromey.com>
3738
3739         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
3740         std::string.
3741         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
3742         std::string*.
3743         * gdbarch.c: Rebuild.
3744         * gdbarch.h: Rebuild.
3745         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
3746         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
3747         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
3748         std::string*.
3749
3750 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
3751
3752         * gdbtypes.h (sect_offset): Change type to uint64_t.
3753         (sect_offset_str): New function.
3754         * dwarf2read.c (create_addrmap_from_aranges): Use
3755         sect_offset_str.
3756         (error_check_comp_unit_head): Likewise.
3757         (create_debug_type_hash_table): Likewise.
3758         (read_cutu_die_from_dwo): Likewise.
3759         (init_cutu_and_read_dies): Likewise.
3760         (init_cutu_and_read_dies_no_follow): Likewise.
3761         (process_psymtab_comp_unit_reader): Likewise.
3762         (partial_die_parent_scope): Likewise.
3763         (peek_die_abbrev): Likewise.
3764         (process_queue): Likewise.
3765         (dwarf2_physname): Likewise.
3766         (read_namespace_alias): Likewise.
3767         (read_import_statement): Likewise.
3768         (create_dwo_cu_reader): Likewise.
3769         (create_cus_hash_table): Likewise.
3770         (lookup_dwo_cutu): Likewise.
3771         (inherit_abstract_dies): Likewise.
3772         (read_func_scope): Likewise.
3773         (read_call_site_scope): Likewise.
3774         (dwarf2_add_member_fn): Likewise.
3775         (read_common_block): Likewise.
3776         (read_module_type): Likewise.
3777         (read_typedef): Likewise.
3778         (read_subrange_type): Likewise.
3779         (load_partial_dies): Likewise.
3780         (read_partial_die): Likewise.
3781         (find_partial_die): Likewise.
3782         (read_str_index): Likewise.
3783         (dwarf2_string_attr): Likewise.
3784         (build_error_marker_type): Likewise.
3785         (lookup_die_type): Likewise.
3786         (dump_die_shallow): Likewise.
3787         (follow_die_ref): Likewise.
3788         (dwarf2_fetch_die_loc_sect_off): Likewise.
3789         (dwarf2_fetch_constant_bytes): Likewise.
3790         (follow_die_sig): Likewise.
3791         (get_signatured_type): Likewise.
3792         (get_DW_AT_signature_type): Likewise.
3793         (dwarf2_find_containing_comp_unit): Likewise.
3794         (set_die_type): Likewise.
3795
3796 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
3797
3798         * arch/aarch64.c: Include "common-defs.h".
3799         * arch/amd64.c: Likewise.
3800         * arch/i386.c: Likewise.
3801
3802 2018-02-21  Tom Tromey  <tom@tromey.com>
3803
3804         * value.h: (extract_field_op): Update.
3805         * eval.c (extract_field_op): Return a const char *.
3806         * expression.h (parse_expression_for_completion): Update.
3807         * completer.c (complete_expression): Update.
3808         (add_struct_fields): Make fieldname const.
3809         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
3810         (mark_completion_tag, parse_exp_in_context_1): Update.
3811         (parse_expression_for_completion): Change "name" to
3812         unique_xmalloc_ptr*.
3813
3814 2018-02-21  Tom Tromey  <tom@tromey.com>
3815
3816         * infcall.c (call_function_by_hand_dummy): Use std::vector.
3817
3818 2018-02-21  Yao Qi  <yao.qi@linaro.org>
3819
3820         * avr-tdep.c (avr_read_pc): Change parameter type to
3821         readable_regcache.
3822         * gdbarch.sh (read_pc): Likewise.
3823         * gdbarch.c: Re-generated.
3824         * gdbarch.h: Re-generated.
3825         * hppa-tdep.c (hppa_read_pc): Change parameter type to
3826         readable_regcache.
3827         * ia64-tdep.c (ia64_read_pc): Likewise.
3828         * mips-tdep.c (mips_read_pc): Likewise.
3829         * spu-tdep.c (spu_read_pc): Likewise.
3830
3831 2018-02-21  Yao Qi  <yao.qi@linaro.org>
3832
3833         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
3834         * regcache-dump.c: New file.
3835         * regcache.c: Move register_dump to regcache-dump.c.
3836         (maintenance_print_registers): Likewise.
3837         (maintenance_print_raw_registers): Likewise.
3838         (maintenance_print_cooked_registers): Likewise.
3839         (maintenance_print_register_groups): Likewise.
3840         (maintenance_print_remote_registers): Likewise.
3841         (_initialize_regcache): Likewise.
3842         * regcache.h (register_dump): Moved from regcache.c.
3843
3844 2018-02-21  Yao Qi  <yao.qi@linaro.org>
3845
3846         * regcache.c (regcache::regcache): Update.
3847         (regcache::invalidate): Move it to detached_regcache::invalidate.
3848         (get_thread_arch_aspace_regcache): Update.
3849         (regcache::raw_update): Update.
3850         (regcache::cooked_read): Remove some code.
3851         (regcache::cooked_read_value): Likewise.
3852         (regcache::raw_write): Remove assert on m_readonly_p.
3853         (regcache::raw_supply_integer): Move it to
3854         detached_regcache::raw_supply_integer.
3855         (regcache::raw_supply_zeroed): Likewise.
3856         * regcache.h (detached_regcache) <raw_supply_integer>: New
3857         declaration.
3858         <raw_supply_zeroed, invalidate>: Likewise.
3859         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
3860         <invalidate>: Likewise.
3861         <m_readonly_p>: Removed.
3862
3863 2018-02-21  Yao Qi  <yao.qi@linaro.org>
3864
3865         * infcmd.c (get_return_value): Let stop_regs point to
3866         get_current_regcache.
3867         * regcache.c (regcache::regcache): Remove.
3868         (register_dump_reg_buffer): New class.
3869         (regcache_print): Adjust.
3870         * regcache.h (regcache): Remove constructors.
3871
3872 2018-02-21  Yao Qi  <yao.qi@linaro.org>
3873
3874         * regcache.c (class register_dump): New class.
3875         (register_dump_regcache, register_dump_none): New class.
3876         (register_dump_remote, register_dump_groups): New class.
3877         (regcache_print): Update.
3878         * regcache.h (regcache_dump_what): Move it to regcache.c.
3879         (regcache) <dump>: Remove.
3880
3881 2018-02-21  Yao Qi  <yao.qi@linaro.org>
3882
3883         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
3884          reg_buffer_rw *.
3885         (jit_unwind_reg_set_impl): Call raw_supply.
3886         (jit_frame_sniffer): Use reg_buffer_rw.
3887         * record-full.c (record_full_core_regbuf): Change its type.
3888         (record_full_core_open_1): Use reg_buffer_rw.
3889         (record_full_close): Likewise.
3890         (record_full_core_fetch_registers): Use regcache->raw_supply.
3891         (record_full_core_store_registers): Likewise.
3892         * regcache.c (regcache::get_register_status): Move it to
3893         reg_buffer.
3894         (regcache_raw_set_cached_value): Remove.
3895         (regcache::raw_set_cached_value): Remove.
3896         (regcache::raw_write): Call raw_supply.
3897         (regcache::raw_supply): Move it to reg_buffer_rw.
3898         * regcache.h (regcache_raw_set_cached_value): Remove.
3899         (reg_buffer_rw): New class.
3900
3901 2018-02-21  Yao Qi  <yao.qi@linaro.org>
3902
3903         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
3904         readonly_detached_regcache.
3905         (dummy_frame_prev_register): Use regcache->cooked_read.
3906         * frame.c (frame_save_as_regcache): Change return type.
3907         (frame_pop): Update.
3908         * frame.h (frame_save_as_regcache): Update declaration.
3909         * inferior.h (get_infcall_suspend_state_regcache): Update
3910         declaration.
3911         * infrun.c (infcall_suspend_state) <registers>: use
3912         readonly_detached_regcache.
3913         (save_infcall_suspend_state): Don't use regcache_dup.
3914         (get_infcall_suspend_state_regcache): Change return type.
3915         * linux-fork.c (struct fork_info) <savedregs>: Change to
3916         readonly_detached_regcache.
3917         <pc>: New field.
3918         (fork_save_infrun_state): Don't use regcache_dup.
3919         (info_checkpoints_command): Adjust.
3920         * mi/mi-main.c (register_changed_p): Update declaration.
3921         (mi_cmd_data_list_changed_registers): Use
3922         readonly_detached_regcache.
3923         (register_changed_p): Change parameter type to
3924         readonly_detached_regcache.
3925         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
3926         readonly_detached_regcache.
3927         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
3928         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
3929         New.
3930         (regcache::save): Move it to reg_buffer.
3931         (regcache::restore): Change parameter type.
3932         (regcache_dup): Remove.
3933         * regcache.h (reg_buffer) <save>: New method.
3934         (readonly_detached_regcache): New class.
3935         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
3936         readonly_detached_regcache.
3937         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
3938
3939 2018-02-21  Yao Qi  <yao.qi@linaro.org>
3940
3941         * frame.c (frame_save_as_regcache): Use regcache method save.
3942         (frame_pop): Use regcache method restore.
3943         * infrun.c (restore_infcall_suspend_state): Likewise.
3944         * linux-fork.c (fork_load_infrun_state): Likewise.
3945         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
3946         save.
3947         * regcache.c (regcache_save): Remove.
3948         (regcache::restore): More asserts.
3949         (regcache_cpy): Remove.
3950         * regcache.h (regcache_save): Remove the declaration.
3951         (regcache::restore): Move from private to public.
3952         Remove the friend declaration of regcache_cpy.
3953         (regcache_cpy): Remove declaration.
3954
3955 2018-02-21  Yao Qi  <yao.qi@linaro.org>
3956
3957         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
3958         parameter type to 'readable_regcache *'.
3959         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
3960         * arm-tdep.c (arm_neon_quad_read): Likewise.
3961         (arm_pseudo_read): Likewise.
3962         * avr-tdep.c (avr_pseudo_register_read): Likewise.
3963         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
3964         * frv-tdep.c (frv_pseudo_register_read): Likewise.
3965         * gdbarch.c: Re-generated.
3966         * gdbarch.h: Re-generated.
3967         * gdbarch.sh (pseudo_register_read): Change parameter type to
3968         'readable_regcache *'.
3969         (pseudo_register_read_value): Likewise.
3970         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
3971         (h8300_pseudo_register_read): Likewise.
3972         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
3973         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3974         (i386_pseudo_register_read_into_value): Likewise.
3975         (i386_pseudo_register_read_value): Likewise.
3976         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
3977         declaration.
3978         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
3979         * m32c-tdep.c (m32c_raw_read): Likewise.
3980         (m32c_read_flg): Likewise.
3981         (m32c_banked_register): Likewise.
3982         (m32c_banked_read): Likewise.
3983         (m32c_sb_read): Likewise.
3984         (m32c_part_read): Likewise.
3985         (m32c_cat_read): Likewise.
3986         (m32c_r3r2r1r0_read): Likewise.
3987         (m32c_pseudo_register_read): Likewise.
3988         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
3989         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
3990         (mep_pseudo_cr64_read): Likewise.
3991         (mep_pseudo_register_read): Likewise.
3992         * mips-tdep.c (mips_pseudo_register_read): Likewise.
3993         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
3994         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
3995         * regcache.c (regcache::raw_read): Move it to readable_regcache.
3996         (regcache::cooked_read): Likewise.
3997         (regcache::cooked_read_value): Likewise.
3998         (regcache_cooked_read_signed):
3999         (regcache::cooked_read): Likewise.
4000         * regcache.h (readable_regcache): New class.
4001         (regcache): Inherit readable_regcache.  Move some methods to
4002         readable_regcache.
4003         * rl78-tdep.c (rl78_pseudo_register_read): Change
4004         parameter type to 'readable_regcache *'.
4005         * rs6000-tdep.c (do_regcache_raw_read): Remove.
4006         (e500_pseudo_register_read): Change parameter type to
4007         'readable_regcache *'.
4008         (dfp_pseudo_register_read): Likewise.
4009         (vsx_pseudo_register_read): Likewise.
4010         (efpr_pseudo_register_read): Likewise.
4011         * s390-tdep.c (s390_pseudo_register_read): Likewise.
4012         * sh-tdep.c (sh_pseudo_register_read): Likewise.
4013         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
4014         (sh64_pseudo_register_read): Likewise.
4015         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
4016         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
4017         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
4018         (spu_pseudo_register_read): Likewise.
4019         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
4020         (xtensa_pseudo_register_read): Likewise.
4021
4022 2018-02-21  Yao Qi  <yao.qi@linaro.org>
4023
4024         * regcache.c (regcache::regcache): Call reg_buffer ctor.
4025         (regcache::arch): Move it to reg_buffer::arch.
4026         (regcache::register_buffer): Likewise.
4027         (regcache::assert_regnum): Likewise.
4028         (regcache::num_raw_registers): Likewise.
4029         * regcache.h (reg_buffer): New class.
4030         (regcache): Inherit reg_buffer.
4031
4032 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
4033
4034         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
4035         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
4036
4037 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
4038
4039         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
4040
4041 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
4042
4043         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
4044         (SFILES): Remove common/*.c files.
4045         (COMMON_OBS): Remove some *.o files built from common/*.c files.
4046         * common/common.host: Add common reference.
4047         * configure.ac: Likewise.
4048         * configure: Regenerate.
4049
4050 2018-02-16  Yao Qi  <yao.qi@linaro.org>
4051
4052         * block.c (block_namespace_info): Inherit allocate_on_obstack.
4053         (block_initialize_namespace): Use new.
4054         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
4055         (dwarf2_free_objfile): Use delete.
4056         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
4057         (copy_type_recursive): Use new.
4058         * gdb_obstack.h (allocate_on_obstack): New.
4059
4060 2018-02-15  Yao Qi  <yao.qi@linaro.org>
4061
4062         PR gdb/22849
4063         * inferior.c (exit_inferior_1): Reset inf->control.
4064
4065 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
4066
4067         * ada-lang.c (ada_to_fixed_value_create): Delete advance
4068         declaration.
4069
4070 2018-02-14  Pedro Alves  <palves@redhat.com>
4071
4072         * frame-unwind.c (frame_unwind_try_unwinder): Always call
4073         frame_cleanup_after_sniffer on exception.
4074
4075 2018-02-14  Tom Tromey  <tom@tromey.com>
4076
4077         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
4078         const.
4079         (solib_bfd_open): Make pathname const.
4080         * solib.c (solib_bfd_open): Make pathname const.
4081         * solib-spu.c (spu_bfd_fopen): Make name const.
4082         (spu_bfd_open): Make pathname const.
4083         * solib-darwin.c (darwin_bfd_open): Make pathname const.
4084         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
4085
4086 2018-02-14  Tom Tromey  <tom@tromey.com>
4087
4088         * symfile.c (symfile_bfd_open): Update.
4089         * source.h (openp, source_full_path_of, find_and_open_source):
4090         Change argument type to unique_xmalloc_ptr.
4091         * source.c (openp): Take a unique_xmalloc_ptr.
4092         (source_full_path_of, find_and_open_source): Likewise.
4093         (open_source_file, symtab_to_fullname): Update.
4094         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
4095         unique_xmalloc_ptr.
4096         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
4097         (exec_file_find): Update.
4098         * psymtab.c (psymtab_to_fullname): Update.
4099         * nto-tdep.h (nto_find_and_open_solib): Update.
4100         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
4101         unique_xmalloc_ptr.
4102         * exec.c (exec_file_attach): Update.
4103         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
4104         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
4105
4106 2018-02-14  Tom Tromey  <tom@tromey.com>
4107
4108         * solib.c: Include source.h.
4109         * nto-tdep.c: Include source.h.
4110         * mi/mi-cmd-env.c: Include source.h.
4111         * infcmd.c: Include source.h.
4112         * exec.c: Include source.h.
4113         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
4114         (add_path, directory_switch, source_path, init_source_path): Move
4115         declarations...
4116         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
4117         (add_path, directory_switch, source_path, init_source_path):
4118         ...here.
4119
4120 2018-02-14  Tom Tromey  <tom@tromey.com>
4121
4122         * solist.h (exec_file_find, solib_find): Return
4123         unique_xmalloc_ptr.
4124         (solib_bfd_fopen): Take a const char *.
4125         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
4126         (exec_file_find, solib_find): Likewise.
4127         (solib_bfd_fopen): Do not take ownership of "pathname".
4128         (solib_bfd_open): Use unique_xmalloc_ptr.
4129         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
4130         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
4131         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
4132         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
4133
4134 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
4135
4136         * ada-lang.c (name_match_type_from_name): Remove reference to
4137         ada_name_for_lookup in function's documentation.
4138         * ada-lang.h (ada_name_for_lookup): Delete declaration.
4139
4140 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
4141
4142         * defs.h (enum openp_flags): New enum.
4143         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
4144         Move to enum openp_flags.
4145         (openp_flags): New enum flags.
4146         (openp): Change parameter type to openp_flags.
4147         * source.c (openp): Change parameter type to openp_flags.
4148         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
4149         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
4150
4151 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
4152
4153         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
4154         per-command.
4155
4156 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4157
4158         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
4159         into...
4160         (class dwarf2_queue_guard): ...the destructor of this new class.
4161         (dw2_do_instantiate_symtab): Create instance of the new class
4162         dwarf2_queue_guard, remove cleanup.
4163
4164 2018-02-09  Tom Tromey  <tom@tromey.com>
4165
4166         * source.c (find_source_lines): Don't reference past the end of
4167         the vector.
4168
4169 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4170
4171         * remote.c (remote_btrace_maybe_reopen): Change error message.
4172         * btrace.c (btrace_enable): Likewise.
4173         (parse_xml_btrace): Likewise.
4174         (parse_xml_btrace_conf): Likewise.
4175
4176 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4177
4178         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
4179         (linux_enable_pt, linux_enable_bts): Call
4180         diagnose_perf_event_open_fail.
4181
4182 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4183
4184         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
4185         Remove parameter and change return type.  Update callers.  Move it.
4186         (linux_enable_bts, linux_enable_pt): Improve error message.
4187         (linux_enable_pt): Remove zero buffer size check.
4188         (linux_enable_btrace): Improve error messages.  Remove NULL return
4189         check.
4190
4191 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4192
4193         * btrace.c (btrace_enable): Remove target_supports_btrace call.
4194         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
4195         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
4196         (linux_supports_pt, linux_supports_btrace): Remove.
4197         (linux_enable_bts): Call cpu_supports_bts.
4198         * nat/linux-btrace.h (linux_supports_btrace): Remove.
4199         * remote.c (remote_supports_btrace): Remove.
4200         (init_remote_ops): Remove remote_supports_btrace.
4201         * target-delegates.c: Regenerated.
4202         * target.c (target_supports_btrace): Remove.
4203         * target.h (target_ops) <to_supports_btrace>: Remove
4204         (target_supports_btrace): Remove.
4205         * x86-linux-nat.c (x86_linux_create_target): Remove
4206         linux_supports_btrace.
4207
4208 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4209
4210         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
4211         btrace failed.
4212         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
4213         exception and use message in own exception.
4214
4215 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4216
4217         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
4218         (perf_event_pt_event_type): Use gdb_file_up.
4219         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
4220         scoped_fd, and scoped_mmap.
4221
4222 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4223
4224         * common/scoped_mmap.h: New.
4225         * unittests/scoped_mmap-selftest.c: New.
4226         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4227         unittests/scoped_mmap-selftest.c.
4228
4229 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4230
4231         * common/scoped_fd.h: New.
4232         * unittests/scoped_fd-selftest.c: New.
4233         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4234         unittests/scoped_fd-selftest.c.
4235
4236 2018-02-09  Tom Tromey  <tom@tromey.com>
4237
4238         * auto-load.c (auto_load_section_scripts): Use
4239         gdb::unique_xmalloc_ptr.
4240
4241 2018-02-09  Tom Tromey  <tom@tromey.com>
4242
4243         * auto-load.c (execute_script_contents): Use std::string.
4244
4245 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
4246
4247         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
4248         Python function, rather than a new command.
4249
4250 2018-02-08  Tom Tromey  <tom@tromey.com>
4251
4252         * solib.c (solib_find_1): Use std::string.
4253         (solib_bfd_fopen): Use unique_xmalloc_ptr.
4254
4255 2018-02-08  Tom Tromey  <tom@tromey.com>
4256
4257         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
4258
4259 2018-02-08  Tom Tromey  <tom@tromey.com>
4260
4261         * source.c (find_source_lines): Use gdb::def_vector.
4262
4263 2018-02-08  Tom Tromey  <tom@tromey.com>
4264
4265         * macrocmd.c (struct temporary_macro_definition): New.
4266         (macro_define_command): Use temporary_macro_definition.  Remove
4267         cleanups.
4268         (free_macro_definition_ptr): Remove.
4269
4270 2018-02-08  Tom Tromey  <tom@tromey.com>
4271
4272         * macroexp.c (maybe_expand): Use std::string.
4273
4274 2018-02-08  Tom Tromey  <tom@tromey.com>
4275
4276         * macroexp.c (struct macro_buffer): Add initializers for some
4277         members.
4278         (init_buffer, init_shared_buffer, free_buffer)
4279         (free_buffer_return_text): Remove.
4280         (macro_buffer): New constructors.
4281         (~macro_buffer): New destructor.
4282         (macro_buffer::set_shared): New method.
4283         (macro_buffer::resize_buffer, macro_buffer::appendc)
4284         (macro_buffer::appendmem): Now methods, not free functions.
4285         (set_token, append_tokens_without_splicing, stringify)
4286         (macro_stringify): Update.
4287         (gather_arguments): Change return type.  Remove argc_p argument,
4288         add args_ptr argument.  Use std::vector.
4289         (substitute_args): Remove argc argument.  Accept std::vector.
4290         (expand): Update.  Use std::vector.
4291         (scan, macro_expand, macro_expand_next): Update.
4292
4293 2018-02-08  Tom Tromey  <tom@tromey.com>
4294
4295         * symtab.c (default_collect_symbol_completion_matches_break_on):
4296         Use unique_xmalloc_ptr.
4297         * macroscope.h: (sal_macro_scope, user_macro_scope)
4298         (default_macro_scope): Return unique_xmalloc_ptr.
4299         * macroscope.c (sal_macro_scope, user_macro_scope)
4300         (default_macro_scope): Return unique_xmalloc_ptr.
4301         * macroexp.h (macro_expand, macro_expand_once): Return
4302         unique_xmalloc_ptr.
4303         * macroexp.c (macro_expand, macro_expand_once): Return
4304         unique_xmalloc_ptr.
4305         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4306         (info_macro_command, info_macros_command): Use
4307         unique_xmalloc_ptr.
4308         * compile/compile-c-support.c (write_macro_definitions): Use
4309         unique_xmalloc_ptr.
4310         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
4311
4312 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
4313
4314         * value.c (value_static_field): Assign field type instead of
4315         containing type when returning an optimized out value.
4316
4317 2018-02-06  Yao Qi  <yao.qi@linaro.org>
4318
4319         * ft32-tdep.c (ft32_read_pc): Remove.
4320         (ft32_write_pc): Remove.
4321         (ft32_gdbarch_init): Update.
4322         * m32r-tdep.c (m32r_read_pc): Remove.
4323         (m32r_gdbarch_init): Update.
4324         * mep-tdep.c (mep_read_pc): Remove.
4325         (mep_gdbarch_init): Update.
4326         * microblaze-tdep.c (microblaze_write_pc): Remove.
4327         (microblaze_gdbarch_init): Update.
4328         * mn10300-tdep.c (mn10300_read_pc): Remove.
4329         (mn10300_write_pc): Remove.
4330         (mn10300_gdbarch_init): Update.
4331         * moxie-tdep.c (moxie_read_pc): Remove.
4332         (moxie_write_pc): Remove.
4333         (moxie_gdbarch_init): Update.
4334
4335 2018-02-06  Yao Qi  <yao.qi@linaro.org>
4336
4337         * expprint.c (print_subexp_standard): Handle
4338         OP_F77_UNDETERMINED_ARGLIST.
4339         (dump_subexp_body_standard): Likewise.
4340
4341 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
4342
4343         * target-descriptions.c (tdesc_element_visitor) Add empty
4344         implementations.
4345         (tdesc_type): Move make_gdb_type from here.
4346         (tdesc_type_builtin): Likewise.
4347         (tdesc_type_vector): Likewise.
4348         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
4349         (make_gdb_type_struct): Move from tdesc_type_with_fields.
4350         (make_gdb_type_union): Likewise.
4351         (make_gdb_type_flags): Likewise.
4352         (make_gdb_type_enum): Likewise.
4353         (make_gdb_type): New function.
4354         (tdesc_register_type): Use static make_gdb_type.
4355
4356 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
4357
4358         * infcmd.c (default_print_one_register_info): Align natural-format
4359         column values consistently one under another.
4360         (pad_to_column): New function.
4361
4362 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
4363
4364         * dwarf2read.c (dwarf2_physname): Move commment.
4365
4366 2018-02-01  Leszek Swirski  <leszeks@google.com>
4367
4368         * varobj.c (varobj_formatted_print_options): Allow recursive
4369         pretty printing if pretty printing is enabled.
4370
4371 2018-02-01  Leszek Swirski  <leszeks@google.com>
4372
4373         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
4374         names after a structop as a filename.
4375
4376 2018-02-01  Yao Qi  <yao.qi@linaro.org>
4377
4378         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
4379         (arm_record_coproc_data_proc): Likewise.
4380
4381 2018-02-01  Yao Qi  <yao.qi@linaro.org>
4382
4383         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
4384
4385 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
4386
4387         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
4388         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
4389
4390 2018-01-31  Pedro Alves  <palves@redhat.com>
4391
4392         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
4393         * inflow.c (child_terminal_save_inferior): Wrap reference to
4394         tcgetpgrp in HAVE_TERMIOS_H.
4395         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
4396         _WIN32.
4397         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
4398         always iterate over all inferiors.
4399         (gdbsim_cntrl_c): Adjust.
4400         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
4401
4402 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
4403
4404         * gdbtypes.c (lookup_array_range_type): Make sure the array's
4405         index type is objfile-owned if the element type is as well.
4406
4407 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
4408
4409         GDB 8.1 released.
4410
4411 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
4412
4413         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
4414         "features/s390x-linux64.c".
4415         (_initialize_s390_linux_tdep): Remove initialization of tdescs
4416         s390_linux32 and s390x_linux64.
4417         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
4418         default tdesc.
4419         * s390-tdep.c: Include "features/s390-linux32.c" and
4420         "features/s390x-linux64.c".
4421         (s390_tdesc_valid): Add check for tdesc_has_registers.
4422         (s390_gdbarch_init): Make sure there is always a valid tdesc.
4423         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
4424         tdesc_s390x_linux64.
4425         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
4426         tdesc_s390x_linux64 to...
4427         * s390-tdep.h: ...here.
4428
4429 2018-01-30  Pedro Alves  <palves@redhat.com>
4430
4431         PR gdb/13211
4432         * config.in, configure: Regenerate.
4433         * configure.ac: Check for getpgid.
4434         * go32-nat.c (go32_pass_ctrlc): New.
4435         (go32_target): Install it.
4436         * inf-child.c (inf_child_target): Install
4437         child_terminal_save_inferior, child_pass_ctrlc and
4438         child_interrupt.
4439         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
4440         (inf_ptrace_target): No longer install it.
4441         * infcmd.c (interrupt_target_1): Adjust.
4442         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
4443         (child_interrupt): Declare.
4444         (inferior::terminal_state): New.
4445         * inflow.c (struct terminal_info): Update comments.
4446         (inferior_process_group): Delete.
4447         (terminal_is_ours): Delete.
4448         (gdb_tty_state): New.
4449         (child_terminal_init): Adjust.
4450         (is_gdb_terminal, sharing_input_terminal_1)
4451         (sharing_input_terminal): New functions.
4452         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
4453         Set the process's actual process group in the foreground if
4454         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
4455         mark terminal as the inferior's if not sharing GDB's terminal.
4456         Don't check attach_flag.
4457         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
4458         pass down a target_terminal_state.
4459         (child_terminal_save_inferior): New, factored out from ...
4460         (child_terminal_ours_1): ... this.  Handle
4461         target_terminal_state::is_ours_for_output.
4462         (child_interrupt, child_pass_ctrlc): New.
4463         (inflow_inferior_exit): Clear the inferior's terminal_state.
4464         (copy_terminal_info): Copy the inferior's terminal state.
4465         (_initialize_inflow): Remove reference to terminal_is_ours.
4466         * inflow.h (inferior_process_group): Delete.
4467         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
4468         * procfs.c (procfs_target): Don't install procfs_interrupt.
4469         (procfs_interrupt): Delete.
4470         * remote.c (remote_serial_quit_handler): Adjust.
4471         (remote_interrupt): Remove ptid parameter.  Adjust.
4472         * target-delegates.c: Regenerate.
4473         * target.c: Include "terminal.h".
4474         (target_terminal::terminal_state): Rename to ...
4475         (target_terminal::m_terminal_state): ... this.
4476         (target_terminal::init): Adjust.
4477         (target_terminal::inferior): Adjust to per-inferior
4478         terminal_state.
4479         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
4480         (target_terminal::ours, target_terminal::ours_for_output): Use
4481         target_terminal_is_ours_kind.
4482         (target_interrupt): Remove ptid parameter.  Adjust.
4483         (default_target_pass_ctrlc): Adjust.
4484         * target.h (target_ops::to_terminal_save_inferior): New field.
4485         (target_ops::to_interrupt): Remove ptid_t parameter.
4486         (target_interrupt): Remove ptid_t parameter.  Update comment.
4487         (target_pass_ctrlc): Update comment.
4488         * target/target.h (target_terminal_state): New scoped enum,
4489         factored out of ...
4490         (target_terminal::terminal_state): ... here.
4491         (target_terminal::inferior): Update comments.
4492         (target_terminal::restore_inferior): New.
4493         (target_terminal::is_inferior, target_terminal::is_ours)
4494         (target_terminal::is_ours_for_output): Adjust.
4495         (target_terminal::scoped_restore_terminal_state): Adjust to
4496         rename, and call restore_inferior() instead of inferior().
4497         (target_terminal::scoped_restore_terminal_state::m_state): Change
4498         type.
4499         (target_terminal::terminal_state): Rename to ...
4500         (target_terminal::m_terminal_state): ... this and change type.
4501
4502 2018-01-30  Pedro Alves  <palves@redhat.com>
4503
4504         * linux-nat.c (wait_for_signal): New function.
4505         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
4506         directly.
4507         (async_terminal_is_ours)
4508         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
4509         (linux_nat_add_target): Don't override
4510         to_terminal_inferior/to_terminal_ours.
4511
4512 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
4513
4514         * remote.c (remote_follow_fork): Don't call "detach_inferior".
4515
4516 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
4517
4518         * dwarf2read.c (free_dwo_files): Add forward-declaration.
4519         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
4520         dwarf2_per_objfile_free here.
4521         (dwarf2_per_objfile_free): Remove.
4522         (_initialize_dwarf2_read): Don't register
4523         dwarf2_per_objfile_free as a registry cleanup.
4524
4525 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
4526
4527         Avoid compilation errors in MinGW native builds
4528
4529         The error is triggered by including python-internal.h, and the
4530         error message is:
4531
4532              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
4533                       from build-gnulib/import/math.h:27,
4534                       from d:/usr/Python26/include/pyport.h:235,
4535                       from d:/usr/Python26/include/Python.h:58,
4536                       from python/python-internal.h:94,
4537                       from python/py-arch.c:24:
4538              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
4539         using ::hypot;
4540                 ^~~~~
4541
4542         This happens because Python headers define 'hypot' to expand t
4543         '_hypot' in the Windows builds.
4544         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
4545         'hypoth'.  This avoids a compilation error.
4546
4547 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
4548
4549         * MAINTAINERS (Write After Approval): Fix ordering.
4550
4551 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
4552
4553         * MAINTAINERS (Write After Approval): Add Alan Hayward.
4554
4555 2018-01-26  Alan Modra  <amodra@gmail.com>
4556
4557         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
4558         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
4559         Remove nop.  Make const.  Comment.
4560         (powerpc32_plt_stub_so_2): New.
4561         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
4562         Correct count.  Update uses.
4563         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
4564         Move common code reading PLT entry word.  Correct
4565         powerpc32_plt_stub PLT address calculation.
4566         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
4567         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
4568         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
4569         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
4570         (ppc64_standard_linkage8): Likewise.
4571         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
4572         Correct insns description.
4573         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
4574
4575 2018-01-24  Pedro Alves  <palves@redhat.com>
4576
4577         GCC PR libstdc++/83906
4578         * gdbtypes.c (operator==(const dynamic_prop &,
4579         const dynamic_prop &)): New.
4580         (operator==(const range_bounds &, const range_bounds &)): New.
4581         (check_types_equal): Use them instead of memcmp.
4582         * gdbtypes.h (operator==(const dynamic_prop &,
4583         const dynamic_prop &)): Declare.
4584         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
4585         (operator==(const range_bounds &, const range_bounds &)): Declare.
4586         (operator!=(const range_bounds &, const range_bounds &)): Declare.
4587
4588 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
4589
4590         * s390-linux-tdep.c (s390_record_address_mask)
4591         (s390_record_calc_disp_common, s390_record_calc_disp)
4592         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
4593         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
4594         (s390_process_record): Move to s390-tdep.c.
4595         (s390_linux_init_abi_any): Adjust.
4596         * s390-tdep.c (s390_record_address_mask)
4597         (s390_record_calc_disp_common, s390_record_calc_disp)
4598         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
4599         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
4600         (s390_process_record): Moved from s390-linux-tdep.c
4601         (s390_gdbarch_init): Adjust.
4602
4603 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
4604
4605         * s390-linux-nat.c (s390-tdep.h): New include.
4606         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
4607         (HFILES_NO_SRCDIR): Add s390-tdep.h.
4608         (ALLDEPFILES): Add s390-tdep.c.
4609         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
4610         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
4611         * s390-tdep.h: ...this.  New file.
4612         * s390-linux-tdep.c (s390-tdep.h): New include.
4613         (_initialize_s390_tdep): Rename to...
4614         (_initialize_s390_linux_tdep): ...this and adjust.
4615         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
4616         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
4617         s390-tdep.h.
4618         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
4619         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
4620         (s390_is_partial_instruction, s390_software_single_step)
4621         (is_non_branch_ril, s390_displaced_step_copy_insn)
4622         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
4623         (s390_prologue_data, s390_addr, s390_store, s390_load)
4624         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
4625         (s390_register_call_saved, s390_guess_tracepoint_registers)
4626         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
4627         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
4628         (s390_pseudo_register_name, s390_pseudo_register_type)
4629         (s390_pseudo_register_read, s390_pseudo_register_write)
4630         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
4631         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
4632         (s390_addr_bits_remove, s390_address_class_type_flags)
4633         (s390_address_class_type_flags_to_name)
4634         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
4635         (s390_function_arg_float, s390_function_arg_vector)
4636         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
4637         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
4638         (s390_frame_align, s390_register_return_value, s390_return_value)
4639         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
4640         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
4641         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
4642         (s390_trad_frame_prev_register, s390_unwind_cache)
4643         (s390_prologue_frame_unwind_cache)
4644         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
4645         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
4646         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
4647         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
4648         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
4649         (s390_frame_base_address, s390_local_base_address)
4650         (s390_frame_base, s390_gcc_target_options)
4651         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
4652         (s390_validate_reg_range, s390_tdesc_valid)
4653         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
4654         * s390-tdep.c: ...this.  New file.
4655
4656 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
4657
4658         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
4659         (s390_process_record, s390_gdbarch_tdep_alloc)
4660         (s390_linux_init_abi_any): Use/set new hook.
4661
4662 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
4663
4664         * s390-linux-tdep.c (osabi.h): New include.
4665         (s390_linux_init_abi_31, s390_linux_init_abi_64)
4666         (s390_linux_init_abi_any): New functions.
4667         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
4668
4669 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
4670
4671         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
4672         tdesc_has_registers check
4673
4674 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
4675
4676         * s390-linux-tdep.c (s390_tdesc_valid): New function.
4677         (s390_validate_reg_range): New macro.
4678         (s390_gdbarch_init): Adjust.
4679
4680 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
4681
4682         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
4683         (s390_gdbarch_tdep_alloc): Adjust.
4684         (s390_gdbarch_init): Adjust.
4685
4686 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
4687
4688         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
4689         <have_tdb>: Change type to bool.
4690         (s390_gdbarch_tdep_alloc): Adjust.
4691         (s390_gdbarch_init): Adjust.
4692
4693 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
4694
4695         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
4696         (gdbarch_tdep) <have_upper, have_vx>: New fields.
4697         (s390_gdbarch_tdep_alloc): New function.
4698         (s390_gdbarch_init): Allocate tdep at start and use its fields
4699         instead of separate variables.
4700
4701 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
4702
4703         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
4704         when looking for cached gdbarch and add comment for remaining.
4705
4706 2018-01-22  Pedro Alves  <palves@redhat.com>
4707             Sergio Durigan Junior  <sergiodj@redhat.com>
4708
4709         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
4710         case.
4711
4712 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
4713
4714         * MAINTAINERS: Update my company e-mail address.
4715
4716 2018-01-22  Yao Qi  <yao.qi@linaro.org>
4717
4718         * regcache.c (cooked_write_test): New function.
4719         (_initialize_regcache): Register the test.
4720
4721 2018-01-22  Yao Qi  <yao.qi@linaro.org>
4722
4723         * ia64-tdep.c (ia64_pseudo_register_read): Call
4724         regcache->cooked_read instead of regcache_cooked_read_unsigned.
4725         * m32c-tdep.c (m32c_cat_read): Likewise.
4726         (m32c_r3r2r1r0_read): Likewise.
4727         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
4728         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
4729
4730 2018-01-22  Yao Qi  <yao.qi@linaro.org>
4731
4732         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
4733         method raw_read instead of regcache_raw_read.
4734         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
4735         * arm-tdep.c (arm_neon_quad_read): Likewise.
4736         * avr-tdep.c (avr_pseudo_register_read): Likewise.
4737         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
4738         * frv-tdep.c (frv_pseudo_register_read): Likewise.
4739         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
4740         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4741         (i386_pseudo_register_read_into_value): Likewise.
4742         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
4743         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
4744         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
4745         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
4746         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
4747         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
4748         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
4749         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
4750         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
4751
4752 2018-01-22  Yao Qi  <yao.qi@linaro.org>
4753
4754         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
4755         * configure.tgt: Remove target mt.
4756         * mt-tdep.c: Remove.
4757         * regcache.c (cooked_read_test): Remove the check for mt.
4758
4759 2018-01-22  Yao Qi  <yao.qi@linaro.org>
4760
4761         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
4762         instead of gdbarch_pseudo_register_read_value.
4763
4764 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
4765
4766         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
4767         language is Ada.
4768
4769 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
4770
4771         * linespec.c (create_sals_line_offset): Remove code that preserved
4772         the symtab_and_line's line number.
4773
4774 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
4775
4776         * varobj.c (varobj_create): Don't set valid_block when creating a
4777         floating varobj.
4778
4779 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
4780
4781         * varobj.c (varobj_create): Remove out of date comment.
4782
4783 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
4784
4785         PR mi/20395
4786         * ada-exp.y (write_var_from_sym): Pass extra parameter when
4787         updating innermost block.
4788         * parse.c (innermost_block_tracker::update): Take extra type
4789         parameter, and check types match before updating innermost block.
4790         (write_dollar_variable): Update innermost block for registers.
4791         * parser-defs.h (enum innermost_block_tracker_type): New enum.
4792         (innermost_block_tracker::innermost_block_tracker): Initialise
4793         m_types member.
4794         (innermost_block_tracker::reset): Take type parameter.
4795         (innermost_block_tracker::update): Take type parameter, and pass
4796         type through as needed.
4797         (innermost_block_tracker::m_types): New member.
4798         * varobj.c (varobj_create): Pass type when reseting innermost
4799         block.
4800
4801 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
4802
4803         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
4804         * ada-lang.c (resolve_subexp): Likewise.
4805         * breakpoint.c (set_breakpoint_condition) Likewise.
4806         (watch_command_1) Likewise.
4807         * c-exp.y (variable): Likewise.
4808         * d-exp.y (PrimaryExpression): Likewise.
4809         * f-exp.y (variable): Likewise.
4810         * go-exp.y (variable): Likewise.
4811         * m2-exp.y (variable): Likewise.
4812         * objfiles.c (objfile::~objfile): Likewise.
4813         * p-exp.y (variable): Likewise.
4814         * parse.c (innermost_block): Change type.
4815         * parser-defs.h (class innermost_block_tracker): New.
4816         (innermost_block): Change to innermost_block_tracker.
4817         * printcmd.c (display_command): Switch to innermost_block API.
4818         (do_one_display): Likewise.
4819         * rust-exp.y (do_one_display): Likewise.
4820         * symfile.c (clear_symtab_users): Likewise.
4821         * varobj.c (varobj_create): Switch to innermost_block API, replace
4822         use of innermost_block with block stored on varobj object.
4823
4824 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
4825
4826         * expression.h (innermost_block): Remove declaration.
4827         * varobj.c: Add 'parser-defs.h' include.
4828
4829 2018-01-19  Tom Tromey  <tom@tromey.com>
4830
4831         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
4832         symbols in the static and global blocks.
4833
4834 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
4835
4836         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
4837         gdb_ptrace.h, and move including gdb_wait.h ...
4838         * nat/linux-ptrace.h: ... to here.
4839
4840 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
4841
4842         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
4843         inf_ptrace_detach_success.
4844         (inf_ptrace_detach_success): Add inferior parameter, use it
4845         instead of inferior_ptid, pass it to detach_inferior.
4846         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
4847         parameter.
4848         * inferior.c (detach_inferior): Add overload that takes an
4849         inferior object.
4850         * inferior.h (detach_inferior): Likewise.
4851         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
4852         use inferior_ptid, adjust call to inf_ptrace_detach_success.
4853         * linux-thread-db.c (thread_db_detach): Use inf parameter.
4854
4855 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
4856
4857         * target.h (struct target_ops) <to_detach>: Add inferior
4858         parameter.
4859         (target_detach): Likewise.
4860         * target.c (dispose_inferior): Pass inferior down.
4861         (target_detach): Pass inferior down.  Assert that it is equal to
4862         the current inferior.
4863         * aix-thread.c (aix_thread_detach): Pass inferior down.
4864         * corefile.c (core_file_command): Pass current_inferior() down.
4865         * corelow.c (core_detach): Add inferior parameter.
4866         * darwin-nat.c (darwin_detach): Likewise.
4867         * gnu-nat.c (gnu_detach): Likewise.
4868         * inf-ptrace.c (inf_ptrace_detach): Likewise.
4869         * infcmd.c (detach_command): Pass current_inferior() down to
4870         target_detach.
4871         * infrun.c (follow_fork_inferior): Pass parent_inf to
4872         target_detach.
4873         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
4874         target_detach.
4875         * linux-nat.c (linux_nat_detach): Add inferior parameter.
4876         * linux-thread-db.c (thread_db_detach): Likewise.
4877         * nto-procfs.c (procfs_detach): Likewise.
4878         * procfs.c (procfs_detach): Likewise.
4879         * record.c (record_detach): Likewise.
4880         * record.h (struct inferior): Forward-declare.
4881         (record_detach): Add inferior parameter.
4882         * remote-sim.c (gdbsim_detach): Likewise.
4883         * remote.c (remote_detach_1): Likewise.
4884         (remote_detach): Likewise.
4885         (extended_remote_detach): Likewise.
4886         * sol-thread.c (sol_thread_detach): Likewise.
4887         * target-debug.h (target_debug_print_inferior_p): New macro.
4888         * target-delegates.c: Re-generate.
4889         * top.c (kill_or_detach): Pass inferior down to target_detach.
4890         * windows-nat.c (windows_detach): Add inferior parameter.
4891
4892 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
4893
4894         * target.h (struct target_ops) <to_detach>: Remove args
4895         parameter.
4896         (target_detach): Likewise.
4897         * target.c (dispose_inferior): Adjust.
4898         (target_detach): Remove args parameter, adjust.
4899         * aix-thread.c (aix_thread_detach): Adjust.
4900         * corefile.c (core_file_command): Adjust.
4901         * corelow.c (core_detach): Adjust.
4902         * darwin-nat.c (darwin_detach): Adjust.
4903         * gnu-nat.c (gnu_detach): Adjust.
4904         * inf-ptrace.c (inf_ptrace_detach): Adjust.
4905         * infcmd.c (detach_command): Adjust
4906         * infrun.c (follow_fork_inferior): Adjust.
4907         (handle_vfork_child_exec_or_exit): Adjust.
4908         * linux-fork.c (linux_fork_detach): Remove args parameter.
4909         * linux-fork.h (linux_fork_detach): Likewise.
4910         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
4911         * linux-thread-db.c (thread_db_detach): Likewise.
4912         * nto-procfs.c (procfs_detach): Likewise.
4913         * procfs.c (procfs_detach): Likewise.
4914         (do_detach): Remove signo parameter.
4915         * record.c (record_detach): Remove args parameter.
4916         * record.h (record_detach): Likewise.
4917         * remote-sim.c (gdbsim_detach): Likewise.
4918         * remote.c (remote_detach_1): Likewise.
4919         (remote_detach): Likewise.
4920         (extended_remote_detach): Likewise.
4921         * sol-thread.c (sol_thread_detach): Likewise.
4922         * target-delegates.c: Re-generate.
4923         * top.c (struct qt_args) <args>: Remove field.
4924         (kill_or_detach): Don't pass args.
4925         (quit_force): Don't set args.
4926         * windows-nat.c (windows_detach): Remove args parameter.
4927
4928 2018-01-19  Yao Qi  <yao.qi@linaro.org>
4929
4930         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
4931         (arm_linux_init_abi): Install it.
4932
4933 2018-01-19  Yao Qi  <yao.qi@linaro.org>
4934
4935         * osabi.c (gdb_osabi_names): Extend the regexp for
4936         arm-linux-gnueabihf.
4937
4938 2018-01-18  Yao Qi  <yao.qi@linaro.org>
4939
4940         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
4941         m_abbrevs.
4942         (abbrev_table::add_abbrev): Update.
4943         (abbrev_table::lookup_abbrev): Update.
4944
4945 2018-01-18  Yao Qi  <yao.qi@linaro.org>
4946
4947         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
4948
4949 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
4950
4951         * compile/compile.c (compile_to_object): Convert "triplet_rx"
4952         to "std::string".
4953
4954 2018-01-17  Tom Tromey  <tom@tromey.com>
4955
4956         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
4957
4958 2018-01-17  Tom Tromey  <tom@tromey.com>
4959
4960         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
4961         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
4962         (create_array_type_with_stride): Update.
4963         * dwarf2read.c (set_die_type): Update.
4964
4965 2018-01-17  Tom Tromey  <tom@tromey.com>
4966
4967         * dwarf2read.c (delayed_method_info): Remove typedef.
4968         (dwarf2_cu::method_info): Now a std::vector.
4969         (add_to_method_list): Update.
4970         (free_delayed_list): Remove.
4971         (compute_delayed_physnames): Update.
4972         (process_full_comp_unit, process_full_type_unit): Clear the method
4973         list.  Remove cleanups.
4974         (psymtab_include_file_name): Add name_holder parameter.  Use
4975         unique_xmalloc_ptr.
4976         (dwarf_decode_lines): Update.
4977
4978 2018-01-17  Tom Tromey  <tom@tromey.com>
4979             Simon Marchi  <simon.marchi@ericsson.com>
4980
4981         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
4982         (dwarf2_per_objfile::free_cached_comp_units)
4983         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
4984         (init_cutu_and_read_dies_no_follow): Update.
4985         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
4986         (dwarf2_cu::~dwarf2_cu): New.
4987         (free_heap_comp_unit, free_stack_comp_unit): Remove.
4988         (age_cached_comp_units, free_one_cached_comp_unit): Update.
4989
4990 2018-01-17  Tom Tromey  <tom@tromey.com>
4991             Simon Marchi  <simon.marchi@ericsson.com>
4992
4993         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
4994         (struct die_reader_specs) <abbrev_table>: New member.
4995         (struct abbrev_table): Add constructor.
4996         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
4997         <abbrev_obstack>: Now an auto_obstack.
4998         (abbrev_table_up): New typedef.
4999         (init_cu_die_reader): Add abbrev_table parameter.
5000         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
5001         Add result_dwo_abbrev_table.
5002         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5003         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
5004         Update.
5005         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
5006         parameter.
5007         (skip_children): Update.
5008         (abbrev_table::alloc_abbrev): Rename from
5009         abbrev_table_alloc_abbrev.
5010         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
5011         (abbrev_table::lookup_abbrev): Rename from
5012         abbrev_table_lookup_abbrev.
5013         (abbrev_table_read_table): Return abbrev_table_up.
5014         (abbrev_table_free, abbrev_table_free_cleanup)
5015         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
5016         (load_partial_dies): Update.
5017
5018 2018-01-17  Tom Tromey  <tom@tromey.com>
5019
5020         * dwarf2read.c (dwarf2_compute_name): Update comment.
5021         (read_func_scope, read_variable): Update.
5022         (new_symbol): Remove.
5023         (new_symbol_full): Rename to new_symbol.
5024
5025 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
5026
5027         PR gdb/16577
5028         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
5029         a warning instead of throwing an error, set section size to 0 and return
5030         NULL.
5031         * gdb_bfd.h (gdb_bfd_map_section): Update description.
5032
5033 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
5034
5035         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
5036         std::string.
5037         (linux_ptrace_attach_fail_reason_string): Likewise.
5038         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
5039         Likewise.
5040         (linux_ptrace_attach_fail_reason_string): Likewise.
5041         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
5042
5043 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
5044
5045         * linux-nat.c (linux_nat_attach): Remove xstrdup.
5046
5047 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
5048
5049         PR gdb/21559
5050         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5051         checking for fs_base/gs_base fields in struct user_regs_struct.
5052         * configure: Regenerate.
5053
5054 2018-01-17  Yao Qi  <yao.qi@linaro.org>
5055
5056         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
5057         function.
5058         (aarch64_linux_init_abi): Install it to gdbarch hook
5059         gcc_target_options.
5060
5061 2018-01-15  Pedro Alves  <palves@redhat.com>
5062
5063         * common/signals-state-save-restore.c
5064         (save_original_signals_state): Fix typos.
5065
5066 2017-01-12  Tom Tromey  <tom@tromey.com>
5067             Sergio Durigan Junior  <sergiodj@redhat.com>
5068
5069         * Makefile.in (install-only): Install gdb-add-index.
5070
5071 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
5072
5073         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
5074
5075 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5076
5077         * infrun.c (keep_going_pass_signal): Clear step-over info when
5078         insert_breakpoints fails.
5079
5080 2018-01-11  Pedro Alves  <palves@redhat.com>
5081
5082         PR gdb/22583
5083         * infrun.c (resume): Rename to ...
5084         (resume_1): ... this.
5085         (resume): Reimplement as wrapper around resume_1.
5086
5087 2018-01-11  Pedro Alves  <palves@redhat.com>
5088
5089         PR remote/22597
5090         * remote.c (remote_parse_stop_reply): Default to the last-set
5091         general thread instead of to 'magic_null_ptid'.
5092
5093 2018-01-10  Pedro Alves  <palves@redhat.com>
5094
5095         * language.h (language_get_symbol_name_matcher): Rename ...
5096         (get_symbol_name_matcher): ... this.
5097         * language.c (language_get_symbol_name_matcher): Ditto.
5098         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
5099         callers adjusted.
5100
5101 2018-01-10  Pedro Alves  <palves@redhat.com>
5102
5103         PR gdb/22670
5104         * dwarf2read.c
5105         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
5106         Adjust to use language_get_symbol_name_matcher instead of
5107         language_defn::la_get_symbol_name_matcher.
5108         * language.c (language_get_symbol_name_matcher): If in Ada mode
5109         and the lookup name is a verbatim match, return Ada's matcher.
5110         * language.h (language_get_symbol_name_matcher): Adjust comment.
5111         (ada_lookup_name_info::verbatim_p):: New method.
5112
5113 2018-01-10  Pedro Alves  <palves@redhat.com>
5114
5115         PR gdb/22670
5116         * ada-lang.c (ada_collect_symbol_completion_matches): If the
5117         minsym's language is language_auto or language_cplus, pass down
5118         language_ada instead.
5119         * symtab.c (compare_symbol_name): Don't frob symbol language here.
5120
5121 2018-01-10  Pedro Alves  <palves@redhat.com>
5122
5123         PR gdb/22670
5124         * minsyms.c (linkage_name_str): New function.
5125         (iterate_over_minimal_symbols): Use it.
5126
5127 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
5128
5129         * NEWS: Document that 'info proc' now works on FreeBSD.
5130
5131 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
5132
5133         * configure.ac: Check for kinfo_getfile in libutil.
5134         * configure: Regenerate.
5135         * config.in: Regenerate.
5136         * fbsd-nat.c: Include "fbsd-tdep.h".
5137         (fbsd_fetch_cmdline): New.
5138         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
5139         rather than calling error.
5140         (fbsd_info_proc): New.
5141         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
5142         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
5143         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
5144
5145 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
5146
5147         * fbsd-nat.c (struct free_deleter): Remove.
5148         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
5149
5150 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
5151
5152         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
5153         NULL for an empty pathname.
5154
5155 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
5156
5157         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
5158         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
5159         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
5160         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
5161         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
5162         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
5163         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
5164         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
5165         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
5166         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
5167         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
5168         (fbsd_core_fetch_timeval, fbsd_print_sigset)
5169         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
5170         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
5171         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
5172
5173 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
5174
5175         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
5176         (gnu_xfer_auxv): New function.
5177         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
5178         TARGET_OBJECT_AUXV.
5179
5180 2018-01-08  Yao Qi  <yao.qi@linaro.org>
5181             Simon Marchi  <simon.marchi@ericsson.com>
5182
5183         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
5184         common/selftest.c.
5185         (COMMON_OBS): Remove selftest.o.
5186         * configure.ac: Append selftest-arch.c and common/selftest.c to
5187         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
5188         * configure: Re-generated.
5189         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
5190         GDB_SELF_TEST.
5191         (maintenance_info_selftests): Likewise.
5192
5193 2018-01-08  Xavier Roirand  <roirand@adacore.com>
5194
5195         * ada-valprint.c (val_print_packed_array_elements): Use
5196         proper number of elements when printing an array indexed
5197         by an enumeration type.
5198
5199 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
5200
5201         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
5202         (dw2_get_file_names_reader): Adjust.
5203         (lookup_dwo_signatured_type): Adjust.
5204         (lookup_dwp_signatured_type): Adjust.
5205         (lookup_signatured_type): Adjust.
5206         (create_type_unit_group): Adjust.
5207         (get_type_unit_group): Adjust.
5208         (process_psymtab_comp_unit_reader): Adjust.
5209         (build_type_psymtabs_reader): Adjust.
5210         (scan_partial_symbols): Adjust.
5211         (add_partial_symbol): Adjust.
5212         (add_partial_subprogram): Adjust.
5213         (peek_die_abbrev): Adjust.
5214         (fixup_go_packaging): Adjust.
5215         (process_imported_unit_die): Adjust.
5216         (dwarf2_compute_name): Adjust.
5217         (dwarf2_physname): Adjust.
5218         (read_import_statement): Adjust.
5219         (handle_DW_AT_stmt_list): Adjust.
5220         (read_file_scope): Adjust.
5221         (read_func_scope): Adjust.
5222         (read_lexical_block_scope): Adjust.
5223         (read_call_site_scope): Adjust.
5224         (read_variable): Adjust.
5225         (dwarf2_rnglists_process): Adjust.
5226         (dwarf2_ranges_process): Adjust.
5227         (dwarf2_ranges_read): Adjust.
5228         (dwarf2_get_pc_bounds): Adjust.
5229         (dwarf2_record_block_ranges): Adjust.
5230         (dwarf2_add_field): Adjust.
5231         (dwarf2_add_member_fn): Adjust.
5232         (read_structure_type): Adjust.
5233         (process_structure_scope): Adjust.
5234         (read_enumeration_type): Adjust.
5235         (read_array_type): Adjust.
5236         (mark_common_block_symbol_computed): Adjust.
5237         (read_common_block): Adjust.
5238         (read_namespace_type): Adjust.
5239         (read_namespace): Adjust.
5240         (read_module_type): Adjust.
5241         (read_tag_pointer_type): Adjust.
5242         (read_tag_ptr_to_member_type): Adjust.
5243         (read_tag_string_type): Adjust.
5244         (read_subroutine_type): Adjust.
5245         (read_typedef): Adjust.
5246         (read_base_type): Adjust.
5247         (attr_to_dynamic_prop): Adjust.
5248         (read_subrange_type): Adjust.
5249         (read_unspecified_type): Adjust.
5250         (dwarf2_read_abbrevs): Adjust.
5251         (load_partial_dies): Adjust.
5252         (read_partial_die): Adjust.
5253         (find_partial_die): Adjust.
5254         (guess_partial_die_structure_name): Adjust.
5255         (fixup_partial_die): Adjust.
5256         (read_attribute_value): Adjust.
5257         (read_addr_index): Adjust.
5258         (read_addr_index_from_leb128): Adjust.
5259         (read_str_index): Adjust.
5260         (dwarf2_string_attr): Adjust.
5261         (get_debug_line_section): Adjust.
5262         (dwarf_decode_line_header): Adjust.
5263         (lnp_state_machine::check_line_address): Adjust.
5264         (dwarf_decode_lines_1): Adjust.
5265         (dwarf_decode_lines): Adjust.
5266         (dwarf2_start_symtab): Adjust.
5267         (var_decode_location): Adjust.
5268         (new_symbol_full): Adjust.
5269         (dwarf2_const_value_data): Adjust.
5270         (dwarf2_const_value_attr): Adjust.
5271         (dwarf2_const_value): Adjust.
5272         (die_type): Adjust.
5273         (die_containing_type): Adjust.
5274         (build_error_marker_type): Adjust.
5275         (lookup_die_type): Adjust.
5276         (guess_full_die_structure_name): Adjust.
5277         (anonymous_struct_prefix): Adjust.
5278         (determine_prefix): Adjust.
5279         (dwarf2_name): Adjust.
5280         (follow_die_ref_or_sig): Adjust.
5281         (follow_die_offset): Adjust.
5282         (follow_die_ref): Adjust.
5283         (follow_die_sig_1): Adjust.
5284         (follow_die_sig): Adjust.
5285         (get_signatured_type): Adjust.
5286         (get_DW_AT_signature_type): Adjust.
5287         (decode_locdesc): Adjust.
5288         (dwarf_decode_macros): Adjust.
5289         (cu_debug_loc_section): Adjust.
5290         (fill_in_loclist_baton): Adjust.
5291         (dwarf2_symbol_mark_computed): Adjust.
5292         (init_one_comp_unit): Don't assign
5293         dwarf2_cu::dwarf2_per_objfile.
5294         (set_die_type): Adjust.
5295
5296 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
5297
5298         * dwarf2read.c (struct mapped_debug_names): Add constructor.
5299         <dwarf2_per_objfile>: New field.
5300         (dwarf2_per_objfile): Remove global.
5301         (get_dwarf2_per_objfile): New function.
5302         (set_dwarf2_per_objfile): New function.
5303         (dwarf2_build_psymtabs_hard): Change objfile parameter to
5304         dwarf2_per_objfile.
5305         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
5306         (read_abbrev_offset): Likewise.
5307         (read_indirect_string): Likewise.
5308         (read_indirect_line_string): Likewise.
5309         (read_indirect_string_at_offset): Likewise.
5310         (read_indirect_string_from_dwz): Likewise.
5311         (dwarf2_find_containing_comp_unit): Change objfile parameter to
5312         dwarf2_per_objfile.
5313         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
5314         (create_all_comp_units): Change objfile parameter to
5315         dwarf2_per_objfile.
5316         (create_all_type_units): Likewise.
5317         (process_queue): Add dwarf2_per_objfile parameter.
5318         (read_and_check_comp_unit_head): Likewise.
5319         (lookup_dwo_unit_in_dwp): Likewise.
5320         (get_dwp_file): Likewise.
5321         (process_cu_includes): Likewise.
5322         (struct free_dwo_file_cleanup_data): New struct.
5323         (dwarf2_has_info): Use get_dwarf2_per_objfile and
5324         set_dwarf2_per_objfile.
5325         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
5326         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
5327         context, adjust calls.
5328         (dw2_instantiate_symtab): Likewise.
5329         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
5330         (dw2_get_cu): Likewise.
5331         (create_cu_from_index_list): Change objfile parameter to
5332         dwarf2_per_objfile.
5333         (create_cus_from_index_list): Get dwarf2_per_objfile from
5334         context, adjust calls.
5335         (create_cus_from_index): Likewise.
5336         (create_signatured_type_table_from_index): Change objfile
5337         parameter to dwarf2_per_objfile.
5338         (create_signatured_type_table_from_debug_names): Change objfile
5339         parameter to dwarf2_per_objfile.
5340         (create_addrmap_from_index): Likewise.
5341         (create_addrmap_from_aranges): Likewise.
5342         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
5343         (dw2_setup): Remove.
5344         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
5345         context.
5346         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
5347         get_dwarf2_per_objfile.
5348         (dw2_forget_cached_source_info): Likewise.
5349         (dw2_map_symtabs_matching_filename): Likewise.
5350         (struct dw2_symtab_iterator) <index>: Remove.
5351         <dwarf2_per_objfile>: New field.
5352         (dw2_symtab_iter_init): Replace index parameter with
5353         dwarf2_per_objfile.
5354         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
5355         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
5356         (dw2_print_stats): Likewise.
5357         (dw2_dump): Likewise.
5358         (dw2_expand_symtabs_for_function): Likewise.
5359         (dw2_expand_all_symtabs): Likewise.
5360         (dw2_expand_symtabs_with_fullname): Likewise.
5361         (dw2_expand_marked_cus): Replace index and objfile parameters
5362         with dwarf2_per_objfile.
5363         (dw_expand_symtabs_matching_file_matcher): Add
5364         dwarf2_per_objfile parameter and adjust calls.
5365         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
5366         adjust calls.
5367         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
5368         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
5369         adjust calls.
5370         (create_cus_from_debug_names_list): Replace objfile parameter
5371         with dwarf2_per_objfile and adjust calls.
5372         (create_cus_from_debug_names): Likewise.
5373         (dwarf2_read_debug_names): Likewise.
5374         (mapped_debug_names::namei_to_name): Adjust call.
5375         (dw2_debug_names_iterator::next): Likewise.
5376         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
5377         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
5378         (dw2_debug_names_dump): Likewise.
5379         (dw2_debug_names_expand_symtabs_for_function): Likewise.
5380         (dw2_debug_names_expand_symtabs_matching): Likewise.
5381         (dwarf2_initialize_objfile): Likewise.
5382         (dwarf2_build_psymtabs): Likewise.
5383         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
5384         this_cu.
5385         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
5386         (read_and_check_comp_unit_head): Likewise.
5387         (read_abbrev_offset): Likewise.
5388         (create_debug_type_hash_table): Likewise.
5389         (create_debug_types_hash_table): Likewise.
5390         (create_all_type_units): Replace objfile parameter with
5391         dwarf2_per_objfile.
5392         (add_type_unit): Add dwarf2_per_objfile parameter.
5393         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
5394         with dwarf2_per_objfile.
5395         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
5396         (lookup_dwp_signatured_type): Likewise.
5397         (lookup_signatured_type): Likewise.
5398         (read_cutu_die_from_dwo): Likewise.
5399         (init_tu_and_read_dwo_dies): Likewise.
5400         (init_cutu_and_read_dies): Likewise.
5401         (init_cutu_and_read_dies_no_follow): Likewise.
5402         (allocate_type_unit_groups_table): Add objfile parameter.
5403         (create_type_unit_group): Use dwarf2_per_objfile from cu.
5404         (get_type_unit_group): Likewise.
5405         (process_psymtab_comp_unit): Update call.
5406         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
5407         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
5408         (print_tu_stats): Likewise.
5409         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
5410         in void* parameter.
5411         (build_type_psymtabs): Change objfile parameter to
5412         dwarf2_per_objfile.
5413         (process_skeletonless_type_unit): Use dwarf2_per_objfile
5414         passed in void* parameter.
5415         (process_skeletonless_type_units): Change objfile parameter to
5416         dwarf2_per_objfile.
5417         (set_partial_user): Likewise.
5418         (dwarf2_build_psymtabs_hard): Likewise.
5419         (read_comp_units_from_section): Likewise.
5420         (create_all_comp_units): Likewise.
5421         (scan_partial_symbols): Update calls.
5422         (add_partial_symbol): Likewise.
5423         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
5424         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
5425         (process_queue): Add dwarf2_per_objfile parameter.
5426         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
5427         (compute_compunit_symtab_includes): Likewise.
5428         (process_cu_includes): Add dwarf2_per_objfile parameter.
5429         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
5430         (process_full_type_unit): Likewise.
5431         (process_imported_unit_die): Update call.
5432         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
5433         (read_file_scope): Likewise.
5434         (allocate_dwo_file_hash_table): Add objfile parameter.
5435         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
5436         (create_cus_hash_table): Likewise.
5437         (create_dwp_hash_table): Likewise.
5438         (create_dwo_unit_in_dwp_v1): Likewise.
5439         (create_dwp_v2_section): Likewise.
5440         (create_dwo_unit_in_dwp_v2): Likewise.
5441         (lookup_dwo_unit_in_dwp): Likewise.
5442         (try_open_dwop_file): Likewise.
5443         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
5444         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
5445         cleanup to include a reference to dwarf2_per_objfile.
5446         (open_dwp_file): Add dwarf2_per_objfile parameter.
5447         (open_and_init_dwp_file): Likewise.
5448         (get_dwp_file): Likewise.
5449         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
5450         (queue_and_load_all_dwo_tus): Update call.
5451         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
5452         data.
5453         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
5454         (dwarf2_ranges_process): Likewise.
5455         (dwarf2_get_pc_bounds): Likewise.
5456         (mark_common_block_symbol_computed): Likewise.
5457         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
5458         (dwarf2_read_abbrevs): Update call.
5459         (read_partial_die): Use dwarf2_per_objfile from cu.
5460         (find_partial_die): Likewise.
5461         (fixup_partial_die): Likewise.
5462         (read_attribute_value): Likewise.
5463         (read_indirect_string_at_offset_from): Add objfile parameter.
5464         (read_indirect_string_at_offset): Add dwarf2_per_objfile
5465         parameter.
5466         (read_indirect_string_from_dwz): Add objfile parameter.
5467         (read_indirect_string): Add objfile parameter.
5468         (read_addr_index_1): Add dwarf2_per_objfile parameter.
5469         (read_addr_index): Use dwarf2_per_objfile from cu.
5470         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
5471         call dw2_setup.
5472         (read_str_index): Use dwarf2_per_objfile from cu.
5473         (get_debug_line_section): Likewise.
5474         (read_formatted_entries): Add dwarf2_per_objfile parameter.
5475         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
5476         (new_symbol_full): Use dwarf2_per_objfile from cu.
5477         (build_error_marker_type): Likewise.
5478         (lookup_die_type): Likewise.
5479         (determine_prefix): Likewise.
5480         (follow_die_offset): Likewise.
5481         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
5482         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
5483         (dwarf2_fetch_die_type_sect_off): Likewise.
5484         (dwarf2_get_die_type): Likewise.
5485         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
5486         (get_signatured_type): Likewise.
5487         (get_DW_AT_signature_type): Likewise.
5488         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
5489         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
5490         (cu_debug_loc_section): Likewise.
5491         (fill_in_loclist_baton): Likewise.
5492         (dwarf2_symbol_mark_computed): Likewise.
5493         (dwarf2_find_containing_comp_unit): Change objfile parameter to
5494         dwarf2_per_objfile.
5495         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
5496         parameter.
5497         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
5498         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
5499         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
5500         (set_die_type): Use dwarf2_free_objfile from cu.
5501         (get_die_type_at_offset): Likewise.
5502         (dwarf2_per_objfile_free): Don't assign global variable.
5503         (debug_names) <constructor>: Add dwarf2_per_objfile
5504         parameter, update m_debugstrlookup construction.
5505         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
5506         parameter.
5507         <m_dwarf2_per_objfile>: New field.
5508         <lookup>: Use m_dwarf2_per_objfile.
5509         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
5510         (psyms_seen_size): Likewise.
5511         (write_gdbindex): Replace objfile parameter with
5512         dwarf2_per_objfile.
5513         (write_debug_names): Likewise.
5514         (write_psymtabs_to_index): Likewise.
5515         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
5516         calls.
5517
5518 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
5519
5520         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
5521         <dwarf2_per_objfile>: New field.
5522         (struct dwarf2_per_cu_data) <objfile>: Remove.
5523         <dwarf2_per_objfile>: New field.
5524         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
5525         of objfile.
5526         (create_signatured_type_table_from_index): Likewise.
5527         (create_debug_type_hash_table): Likewise.
5528         (fill_in_sig_entry_from_dwo_entry): Likewise.
5529         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
5530         (create_type_unit_group): Assign dwarf2_per_objfile instead of
5531         objfile.
5532         (create_partial_symtab): Access objfile through
5533         dwarf2_per_objfile.
5534         (process_psymtab_comp_unit_reader): Likewise.
5535         (read_comp_units_from_section): Likewise.
5536         (scan_partial_symbols): Likewise.
5537         (add_partial_symbol): Likewise.
5538         (add_partial_subprogram): Likewise.
5539         (peek_die_abbrev): Likewise.
5540         (fixup_go_packaging): Likewise.
5541         (process_full_comp_unit): Likewise.
5542         (process_full_type_unit): Likewise.
5543         (process_imported_unit_die): Likewise.
5544         (dwarf2_compute_name): Likewise.
5545         (dwarf2_physname): Likewise.
5546         (read_import_statement): Likewise.
5547         (create_cus_hash_table): Assign dwarf2_physname instead of
5548         objfile.
5549         (read_func_scope): Access objfile through dwarf2_per_objfile.
5550         (read_lexical_block_scope): Likewise.
5551         (read_call_site_scope): Likewise.
5552         (read_variable): Likewise.
5553         (dwarf2_rnglists_process): Likewise.
5554         (dwarf2_ranges_process): Likewise.
5555         (dwarf2_ranges_read): Likewise.
5556         (dwarf2_record_block_ranges): Likewise.
5557         (dwarf2_add_field): Likewise.
5558         (dwarf2_add_member_fn): Likewise.
5559         (read_structure_type): Likewise.
5560         (process_structure_scope): Likewise.
5561         (read_enumeration_type): Likewise.
5562         (read_array_type): Likewise.
5563         (read_common_block): Likewise.
5564         (read_namespace_type): Likewise.
5565         (read_namespace): Likewise.
5566         (read_module_type): Likewise.
5567         (read_tag_pointer_type): Likewise.
5568         (read_tag_ptr_to_member_type): Likewise.
5569         (read_tag_string_type): Likewise.
5570         (read_subroutine_type): Likewise.
5571         (read_typedef): Likewise.
5572         (read_base_type): Likewise.
5573         (attr_to_dynamic_prop): Likewise.
5574         (read_subrange_type): Likewise.
5575         (read_unspecified_type): Likewise.
5576         (load_partial_dies): Likewise.
5577         (read_partial_die): Likewise.
5578         (find_partial_die): Likewise.
5579         (guess_partial_die_structure_name): Likewise.
5580         (fixup_partial_die): Likewise.
5581         (read_attribute_value): Likewise.
5582         (read_addr_index_from_leb128): Likewise.
5583         (dwarf2_read_addr_index): Likewise.
5584         (dwarf2_string_attr): Likewise.
5585         (lnp_state_machine::check_line_address): Likewise.
5586         (dwarf_decode_lines_1): Likewise.
5587         (dwarf_decode_lines): Likewise.
5588         (dwarf2_start_symtab): Likewise.
5589         (var_decode_location): Likewise.
5590         (new_symbol_full): Likewise.
5591         (dwarf2_const_value_data): Likewise.
5592         (dwarf2_const_value_attr): Likewise.
5593         (dwarf2_const_value): Likewise.
5594         (die_type): Likewise.
5595         (die_containing_type): Likewise.
5596         (lookup_die_type): Likewise.
5597         (guess_full_die_structure_name): Likewise.
5598         (anonymous_struct_prefix): Likewise.
5599         (dwarf2_name): Likewise.
5600         (follow_die_ref_or_sig): Likewise.
5601         (follow_die_offset): Likewise.
5602         (follow_die_ref): Likewise.
5603         (dwarf2_fetch_die_loc_sect_off): Likewise.
5604         (dwarf2_fetch_constant_bytes): Likewise.
5605         (dwarf2_fetch_die_type_sect_off): Likewise.
5606         (dwarf2_get_die_type): Likewise.
5607         (follow_die_sig): Likewise.
5608         (decode_locdesc): Likewise.
5609         (dwarf2_per_cu_objfile): Likewise.
5610         (dwarf2_per_cu_text_offset): Likewise.
5611         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
5612         objfile.
5613         (set_die_type): Access objfile through
5614         dwarf2_per_objfile.
5615
5616 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
5617
5618         * valprint.c (converted_character_d): Remove typedef.
5619         (DEF_VEC_O (converted_character_d)): Remove.
5620         (count_next_character): Use std::vector.
5621         (print_converted_chars_to_obstack): Likewise.
5622         (generic_printstr): Likewise.
5623
5624 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
5625
5626         * xml-support.h (struct gdb_xml_value): Add constructor.
5627         <value>: Change type to unique_xmalloc_ptr.
5628         (gdb_xml_value_s): Remove typedef.
5629         (DEF_VEC_O (gdb_xml_value_s)): Remove.
5630         (gdb_xml_element_start_handler): Change parameter type to
5631         std::vector.
5632         (xml_find_attribute): Likewise.
5633         * xml-support.c (xml_find_attribute): Change parameter type to
5634         std::vector and adjust.
5635         (gdb_xml_values_cleanup): Remove.
5636         (gdb_xml_parser::start_element): Adjust to std::vector.
5637         (xinclude_start_include): Change paraeter type to std::vector
5638         and adjust.
5639         * btrace.c (check_xml_btrace_version): Likewise.
5640         (parse_xml_btrace_block): Likewise.
5641         (parse_xml_btrace_pt_config_cpu): Likewise.
5642         (parse_xml_btrace_pt): Likewise.
5643         (parse_xml_btrace_conf_bts): Likewise.
5644         (parse_xml_btrace_conf_pt): Likewise.
5645         * memory-map.c (memory_map_start_memory): Likewise.
5646         (memory_map_start_property): Likewise.
5647         * osdata.c (osdata_start_osdata): Likewise.
5648         (osdata_start_item): Likewise.
5649         (osdata_start_column): Likewise.
5650         * remote.c (start_thread): Likewise.
5651         * solib-aix.c (library_list_start_library): Likewise.
5652         (library_list_start_list): Likewise.
5653         * solib-svr4.c (library_list_start_library): Likewise.
5654         (svr4_library_list_start_list): Likewise.
5655         * solib-target.c (library_list_start_segment): Likewise.
5656         (library_list_start_section): Likewise.
5657         (library_list_start_library): Likewise.
5658         (library_list_start_list): Likewise.
5659         * tracepoint.c (traceframe_info_start_memory): Likewise.
5660         (traceframe_info_start_tvar): Likewise.
5661         * xml-syscall.c (syscall_start_syscall): Likewise.
5662         * xml-tdesc.c (tdesc_start_target): Likewise.
5663         (tdesc_start_feature): Likewise.
5664         (tdesc_start_reg): Likewise.
5665         (tdesc_start_union): Likewise.
5666         (tdesc_start_struct): Likewise.
5667         (tdesc_start_flags): Likewise.
5668         (tdesc_start_enum): Likewise.
5669         (tdesc_start_field): Likewise.
5670         (tdesc_start_enum_value): Likewise.
5671         (tdesc_start_vector): Likewise.
5672
5673 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
5674
5675         * extension.h (struct xmethod_worker) <clone>: Remove.
5676         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
5677         Remove.
5678         (python_xmethod_worker::clone): Remove.
5679         * valops.c (find_overload_match): Use std::move instead of
5680         clone.
5681
5682 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
5683
5684         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
5685         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
5686         <free_xmethod_worker_data>: Remove.
5687         <get_matching_xmethod_workers>: Chance VEC to std::vector.
5688         <get_xmethod_arg_types>: Remove.
5689         <get_xmethod_result_type>: Remove.
5690         <invoke_xmethod>: Remove.
5691         * extension.c (new_xmethod_worker): Remove.
5692         (clone_xmethod_worker): Remove.
5693         (get_matching_xmethod_workers): Return void, pass std::vector by
5694         pointer.
5695         (get_xmethod_arg_types): Rename to...
5696         (xmethod_worker::get_arg_types): ... this, and adjust.
5697         (get_xmethod_result_type): Rename to...
5698         (xmethod_worker::get_result_type): ... this, and adjust.
5699         (invoke_xmethod): Remove.
5700         (free_xmethod_worker): Remove.
5701         (free_xmethod_worker_vec): Remove.
5702         * extension.h (enum ext_lang_rc): Move here from
5703         extension-priv.h.
5704         (struct xmethod_worker): Add constructor and destructor.
5705         <data>: Remove.
5706         <value>: Remove.
5707         <invoke, clone, do_get_result_type, do_get_arg_types>: New
5708         virtual pure methods.
5709         <get_arg_types, get_result_type>: New methods.
5710         (xmethod_worker_ptr): Remove typedef.
5711         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
5712         (xmethod_worker_vec): Remove typedef.
5713         (xmethod_worker_up): New typedef.
5714         (invoke_xmethod): Remove.
5715         (clone_xmethod_worker): Remove.
5716         (free_xmethod_worker): Remove.
5717         (free_xmethod_worker_vec): Remove.
5718         (get_xmethod_arg_types): Remove.
5719         (get_xmethod_result_type): Remove.
5720         * valops.c (find_method_list): Use std::vector, don't use
5721         intermediate vector.
5722         (value_find_oload_method_list): Use std::vector.
5723         (find_overload_match): Use std::vector.
5724         (find_oload_champ): Use std::vector.
5725         * value.c (value_free): Use operator delete.
5726         (value_of_xmethod): Rename to...
5727         (value_from_xmethod): ... this.  Don't assign
5728         xmethod_worker::value, take rvalue-reference.
5729         (result_type_of_xmethod): Adjust.
5730         (call_xmethod): Adjust.
5731         * value.h: Include extension.h.
5732         (struct xmethod_worker): Don't forward-declare.
5733         (value_of_xmethod): Rename to...
5734         (value_from_xmethod): ... this, take rvalue-reference.
5735         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
5736         (struct python_xmethod_worker): ... this, add constructor and
5737         destructor.
5738         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
5739         (gdbpy_free_xmethod_worker_data): Rename to...
5740         (python_xmethod_worker::~python_xmethod_worker): ... this and
5741         adjust.
5742         (gdbpy_clone_xmethod_worker_data): Rename to...
5743         (python_xmethod_worker::clone): ... this and adjust.
5744         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
5745         temporary vector.
5746         (gdbpy_get_xmethod_arg_types): Rename to...
5747         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
5748         (gdbpy_get_xmethod_result_type): Rename to...
5749         (python_xmethod_worker::do_get_result_type): ... this and
5750         adjust.
5751         (gdbpy_invoke_xmethod): Rename to...
5752         (python_xmethod_worker::invoke): ... this and adjust.
5753         (new_python_xmethod_worker): Rename to...
5754         (python_xmethod_worker::python_xmethod_worker): ... this and
5755         adjust.
5756         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
5757         Remove.
5758         (gdbpy_free_xmethod_worker_data): Remove.
5759         (gdbpy_get_matching_xmethod_workers): Use std::vector.
5760         (gdbpy_get_xmethod_arg_types): Remove.
5761         (gdbpy_get_xmethod_result_type): Remove.
5762         (gdbpy_invoke_xmethod): Remove.
5763         * python/python.c (python_extension_ops): Remove obsolete
5764         callbacks.
5765
5766 2018-01-05  Pedro Alves  <palves@redhat.com>
5767
5768         PR gdb/18653
5769         * common/signals-state-save-restore.c
5770         (save_original_signals_state): New parameter 'quiet'.  Warn if we
5771         find a custom handler preinstalled, instead of internal erroring.
5772         But only warn if !quiet.
5773         * common/signals-state-save-restore.h
5774         (save_original_signals_state): New parameter 'quiet'.
5775         * main.c (captured_main_1): Move save_original_signals_state call
5776         after option handling, and pass QUIET.
5777
5778 2018-01-05  Pedro Alves  <palves@redhat.com>
5779
5780         * spu-tdep.c (spu_catch_start): Pass
5781         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
5782
5783 2018-01-05  Pedro Alves  <palves@redhat.com>
5784
5785         PR gdb/22670
5786         * ada-lang.c (literal_symbol_name_matcher): New function.
5787         (ada_get_symbol_name_matcher): Use it for
5788         symbol_name_match_type::SEARCH_NAME.
5789         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
5790         it down instead of assuming symbol_name_match_type::FULL.
5791         * block.h (block_lookup_symbol): New parameter 'match_type'.
5792         * c-valprint.c (print_unpacked_pointer): Use
5793         lookup_symbol_search_name instead of lookup_symbol.
5794         * compile/compile-object-load.c (get_out_value_type): Pass down
5795         symbol_name_match_type::SEARCH_NAME.
5796         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
5797         symbol_name_match_type::FULL.
5798         * cp-support.c (cp_get_symbol_name_matcher): Handle
5799         symbol_name_match_type::SEARCH_NAME.
5800         * infrun.c (insert_exception_resume_breakpoint): Use
5801         lookup_symbol_search_name.
5802         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
5803         * psymtab.c (maintenance_check_psymtabs): Use
5804         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
5805         * stack.c (print_frame_args): Use lookup_symbol_search_name and
5806         SYMBOL_SEARCH_NAME.
5807         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
5808         if symbol_name_match_type::SEARCH_NAME.
5809         (lookup_symbol_in_language): Pass down
5810         symbol_name_match_type::FULL.
5811         (lookup_symbol_search_name): New.
5812         (lookup_language_this): Pass down
5813         symbol_name_match_type::SEARCH_NAME.
5814         (lookup_symbol_aux, lookup_local_symbol): New parameter
5815         'match_type'.  Pass it down.
5816         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
5817         (lookup_symbol_search_name): New declaration.
5818         (lookup_symbol_in_block): New 'match_type' parameter.
5819
5820 2018-01-05  Pedro Alves  <palves@redhat.com>
5821
5822         PR gdb/22670
5823         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
5824         ada_lookup_symbol.
5825         (ada_lookup_symbol): Reimplement in terms of
5826         ada_lookup_symbol_list, bits factored out from
5827         ada_lookup_encoded_symbol.
5828
5829 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
5830
5831         * ada-exp.y (write_object_renaming): When subscripting an array
5832         using a symbol as the index, pass the block in call to
5833         ada_lookup_encoded_symbol when looking that symbol up.
5834
5835 2018-01-05  Jerome Guitton  <guitton@adacore.com>
5836
5837         * ada-lang.c (ada_array_length): Use ada_index_type instead of
5838         TYPE_INDEX_TYPE.
5839
5840 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
5841
5842         * ada-lang.c (ada_to_fixed_value_create): Add handling of
5843         the case where VALUE_LVAL (val0) is not lval_memory.
5844
5845 2018-01-05  Xavier Roirand  <roirand@adacore.com>
5846
5847         * ada-valprint.c (print_optional_low_bound): Handle
5848         character-indexed array printing like boolean-indexed array
5849         printing.
5850
5851 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
5852
5853         * NEWS: Create a new section for the next release branch.
5854         Rename the section of the current branch, now that it has
5855         been cut.
5856
5857 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
5858
5859         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
5860         * version.in: Bump version to 8.1.50.DATE-git.
5861
5862 2018-01-03  Xavier Roirand  <roirand@adacore.com>
5863
5864         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
5865         Add field.
5866         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
5867         Add field.
5868         (default_exception_support_info) <catch_handlers_sym>: Add field.
5869         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
5870         (ada_exception_name_addr_1): Add "catch handlers" handling.
5871         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
5872         Update all callers.
5873         (create_excep_cond_exprs) <ex>: Add parameter.
5874         (re_set_exception): Update create_excep_cond_exprs call.
5875         (print_it_exception, print_one_exception, print_mention_exception)
5876         (print_recreate_exception): Add "catch handler" handling.
5877         (allocate_location_catch_handlers, re_set_catch_handlers)
5878         (check_status_catch_handlers, print_it_catch_handlers)
5879         (print_one_catch_handlers, print_mention_catch_handlers)
5880         (print_recreate_catch_handlers): New function.
5881         (catch_handlers_breakpoint_ops): New variable.
5882         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
5883         Add parameter.  Add "catch handler" handling.
5884         (ada_exception_sym_name, ada_exception_breakpoint_ops):
5885         Add "catch handler" handling.
5886         (ada_exception_catchpoint_cond_string): Add "catch handler"
5887         handling.
5888         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
5889         call.
5890         (catch_ada_handlers_command): New function.
5891         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
5892         operations structure.
5893         (_initialize_ada_language): Add "catch handlers" command entry.
5894         * NEWS: Document "catch handlers" feature.
5895
5896 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
5897
5898         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
5899         account when creating the array type of the slice.
5900         (ada_value_slice): Likewise.
5901
5902 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
5903
5904         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
5905         New enum value.
5906         (create_array_type_with_stride): Add byte_stride_prop parameter.
5907         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
5908         New parameter.  Update all callers in this file.
5909         (array_type_has_dynamic_stride): New function.
5910         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
5911         of arrays with dynamic byte strides.
5912         * dwarf2read.c (read_array_type): Add support for dynamic
5913         DW_AT_byte_stride attributes.
5914
5915 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
5916
5917         * dwarf2read.c (read_unspecified_type): Treat
5918         DW_TAG_enumeration_type DIEs from Ada units as stubs.
5919
5920 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
5921
5922         Update copyright year range in all GDB files.
5923
5924 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
5925
5926         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
5927         and gdb/testsuite/gdb.base/step-line.c.
5928
5929 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
5930
5931         * copyright.py (main): Dump the contents of
5932         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
5933         even if BY_HAND is empty.
5934
5935 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
5936
5937         * top.c (print_gdb_version): Update Copyright year in version
5938         message.
5939
5940 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
5941
5942         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
5943
5944 For older changes see ChangeLog-2017.
5945 \f
5946 Local Variables:
5947 mode: change-log
5948 left-margin: 8
5949 fill-column: 74
5950 version-control: never
5951 coding: utf-8
5952 End: