Introduce process_stratum_target
[external/binutils.git] / gdb / ChangeLog
1 2018-11-30  Pedro Alves  <palves@redhat.com>
2
3         * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
4         * bsd-kvm.c: Include "process-stratum-target.h".
5         (bsd_kvm_target): Now inherits from process_stratum_target.
6         (bsd_kvm_target::bsd_kvm_target): Default it.
7         * corelow.c: Include "process-stratum-target.h".
8         (core_target): Now inherits from process_stratum_target.
9         (core_target::core_target): Don't set to_stratum here.
10         * inf-child.c (inf_child_target::inf_child_target): Delete.
11         * inf-child.h: Include "process-stratum-target.h".
12         (inf_child_target): Inherit from process_stratum_target.
13         (inf_child_target) <inf_child_target>: Default it.
14         <can_async_p, supports_non_stop, supports_disable_randomization>:
15         Delete overrides.
16         * process-stratum-target.c: New file.
17         * process-stratum-target.h: New file.
18         * remote-sim.c: Include "process-stratum-target.h".
19         (gdbsim_target): Inherit from process_stratum_target.
20         <gdbsim_target>: Default it.
21         * remote.c: Include "process-stratum-target.h".
22         (remote_target): Inherit from process_stratum_target.
23         <remote_target>: Default it.
24         * target.c (default_thread_address_space)
25         (default_thread_architecture): Delete.
26         * target.h (target_ops) <thread_architecture>: Now returns NULL by
27         default.
28         <thread_address_space>: Ditto.
29         * test-target.h: Include "process-stratum-target.h" instead of
30         "target.h".
31         (test_target_ops): Inherit from process_stratum_target.
32         <test_target_ops>: Default it.
33         * tracefile.c (tracefile_target::tracefile_target): Delete.
34         * tracefile.h: Include "process-stratum-target.h".
35         (tracefile_target): Inherit from process_stratum_target.
36         <tracefile_target>: Default it.
37         * target-delegates.c: Regenerate.
38
39 2018-11-30  Pedro Alves  <palves@redhat.com>
40
41         * Makefile.in (COMMON_SFILES): Add test-target.c.
42         * gdbarch-selftests.c: Include "test-target.h".
43         * regcache.c: Include "test-target.h".
44         * target.c (test_target_info, test_target_ops::info): Move to ...
45         * test-target.c: ... this new file.
46         * target.h (test_target_ops): Move to ...
47         * test-target.h: ... this new file.
48
49 2018-11-29  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
50
51         * source.c (forward_search_command): Fix leak by using
52         xrealloc even for the first allocation in the loop, as buf
53         is static.
54
55 2018-11-29  Rajendra SY  <rajendra.sy@gmail.com>
56
57         PR gdb/23093
58         * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
59         (fbsd_gdb_signal_to_target): New.
60         (fbsd_init_abi): Install gdbarch "signal_from_target" and
61         "signal_to_target" methods.
62
63 2018-11-29  Tom Tromey  <tom@tromey.com>
64
65         * valarith.c (value_x_unop): Don't set argvec[3].
66
67 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
68
69         PR gdb/23917
70         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
71         semicolon.
72
73 2018-11-26  Pedro Alves  <palves@redhat.com>
74
75         * procfs.c (procfs_notice_thread): Replace uses of
76         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
77         * sol-thread.c (sol_thread_target::wait)
78         (sol_update_thread_list_callback): Likewise.
79
80 2018-11-25  Tom Tromey  <tom@tromey.com>
81
82         * ui-out.c (ui_out::field_fmt): Remove comment.
83         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
84         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
85
86 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
87
88         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
89         leak in open_source_file' has been partially undone by '2179fbc36d23
90         Return scoped_fd from open_source_file'. Re-add the transfer of
91         current s->fullname to the unique_xmalloc_ptr fullname given
92         to find_and_open_source.
93
94 2018-11-23  Pedro Alves  <palves@redhat.com>
95
96         * gdbthread.h (enum thread_state): Move comments here.
97         (is_running, is_stopped, is_exited): Remove declarations.
98
99 2018-11-22  Pedro Alves  <palves@redhat.com>
100
101         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
102         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
103         ALL_NON_EXITED_THREADS with all_non_exited_threads.
104         (print_one_breakpoint_location): Replace ALL_INFERIORS with
105         all_inferiors.
106         * bsd-kvm.c: Include inferior.h.
107         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
108         with all_non_exited_threads.
109         * common/filtered-iterator.h: New.
110         * common/safe-iterator.h: New.
111         * corelow.c (core_target_open): Don't call init_thread_list here.
112         * darwin-nat.c (thread_info_from_private_thread_info): Replace
113         ALL_THREADS with all_threads.
114         * fbsd-nat.c (fbsd_nat_target::resume): Replace
115         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
116         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
117         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
118         * fork-child.c (postfork_hook): Don't call init_thread_list here.
119         * gdbarch-selftests.c (register_to_value_test): Adjust.
120         * gdbthread.h: Don't include "inferior.h" here.
121         (struct inferior): Forward declare.
122         (enum step_over_calls_kind): Moved here from inferior.h.
123         (thread_info::deletable): Definition moved to thread.c.
124         (find_thread_ptid (inferior *, ptid_t)): Declare.
125         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
126         Include "thread-iter.h".
127         (all_threads, all_non_exited_threads, all_threads_safe): New.
128         (any_thread_p): Declare.
129         (thread_list): Delete.
130         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
131         all_non_exited_threads.
132         (proceed_after_attach_callback): Delete.
133         (proceed_after_attach): Take an inferior pointer instead of an
134         integer PID.  Adjust to use range-for.
135         (attach_post_wait): Pass down inferior pointer instead of pid.
136         Use range-for instead of ALL_NON_EXITED_THREADS.
137         (detach_command): Remove init_thread_list call.
138         * inferior-iter.h: New.
139         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
140         (delete_thread_of_inferior): Delete.
141         (delete_inferior, exit_inferior_1): Use range-for with
142         inf->threads_safe() instead of iterate_over_threads.
143         (inferior_appeared): Call init_thread_list here.
144         (discard_all_inferiors): Use all_non_exited_inferiors.
145         (find_inferior_id, find_inferior_pid): Use all_inferiors.
146         (iterate_over_inferiors): Use all_inferiors_safe.
147         (have_inferiors, number_of_live_inferiors): Use
148         all_non_exited_inferiors.
149         (number_of_inferiors): Use all_inferiors and std::distance.
150         (print_inferior): Use all_inferiors.
151         * inferior.h: Include gdbthread.h.
152         (enum step_over_calls_kind): Moved to gdbthread.h.
153         (struct inferior) <thread_list>: New field.
154         <threads, non_exited_threads, threads_safe>: New methods.
155         (ALL_INFERIORS): Delete.
156         Include "inferior-iter.h".
157         (ALL_NON_EXITED_INFERIORS): Delete.
158         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
159         functions.
160         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
161         ALL_NON_EXITED_THREADS with all_non_exited_threads.
162         * infrun.c (follow_exec): Use all_threads_safe.
163         (clear_proceed_status, proceed): Use all_non_exited_threads.
164         (init_wait_for_inferior): Don't clear inline frame state here.
165         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
166         all_threads instead of ALL_NON_EXITED_THREADS.
167         (random_pending_event_thread): Use all_non_exited_threads instead
168         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
169         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
170         instead of ALL_NON_EXITED_THREADS.
171         (handle_no_resumed): Use all_non_exited_threads instead of
172         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
173         ALL_INFERIORS.
174         (restart_threads, switch_back_to_stepped_thread): Use
175         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
176         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
177         all_inferiors.
178         (kill_unfollowed_fork_children): Use inf->non_exited_threads
179         instead of ALL_NON_EXITED_THREADS.
180         * linux-tdep.c (linux_make_corefile_notes): Use
181         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
182         * linux-thread-db.c (thread_db_target::update_thread_list):
183         Replace ALL_INFERIORS with all_inferiors.
184         (thread_db_target::thread_handle_to_thread_info): Use
185         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
186         * mi/mi-interp.c (multiple_inferiors_p): New.
187         (mi_on_resume_1): Simplify using all_non_exited_threads and
188         multiple_inferiors_p.
189         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
190         instead of ALL_NON_EXITED_THREADS.
191         * nto-procfs.c (nto_procfs_target::open): Don't call
192         init_thread_list here.
193         * record-btrace.c (record_btrace_target_open)
194         (record_btrace_target::stop_recording)
195         (record_btrace_target::close)
196         (record_btrace_target::record_is_replaying)
197         (record_btrace_target::resume, record_btrace_target::wait)
198         (record_btrace_target::record_stop_replaying): Use
199         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
200         * record-full.c (record_full_wait_1): Use all_non_exited_threads
201         instead of ALL_NON_EXITED_THREADS.
202         * regcache.c (cooked_read_test): Remove reference to global
203         thread_list.
204         * remote-sim.c (gdbsim_target::create_inferior): Don't call
205         init_thread_list here.
206         * remote.c (remote_target::update_thread_list): Use
207         all_threads_safe instead of ALL_NON_EXITED_THREADS.
208         (remote_target::process_initial_stop_replies): Replace
209         ALL_INFERIORS with all_non_exited_inferiors and use
210         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
211         (remote_target::open_1): Don't call init_thread_list here.
212         (remote_target::append_pending_thread_resumptions)
213         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
214         instead of ALL_NON_EXITED_THREADS.
215         (remote_target::commit_resume)
216         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
217         with all_non_exited_inferiors and use all_non_exited_threads
218         instead of ALL_NON_EXITED_THREADS.
219         (remote_target::kill_new_fork_children): Use
220         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
221         init_thread_list and init_wait_for_inferior calls.
222         (remote_target::remote_btrace_maybe_reopen)
223         (remote_target::thread_handle_to_thread_info): Use
224         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
225         * target.c (target_terminal::restore_inferior)
226         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
227         all_non_exited_inferiors.
228         * thread-iter.c: New file.
229         * thread-iter.h: New file.
230         * thread.c: Include "inline-frame.h".
231         (thread_list): Delete.
232         (clear_thread_inferior_resources): Call clear_inline_frame_state.
233         (init_thread_list): Use all_threads_safe instead of
234         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
235         (new_thread): Adjust to per-inferior thread lists.
236         (add_thread_silent): Pass inferior to find_thread_ptid.
237         (thread_info::deletable): New, moved from the header.
238         (delete_thread_1): Adjust to per-inferior thread lists.
239         (find_thread_global_id): Use inf->threads().
240         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
241         find_thread_ptid.
242         (find_thread_ptid(inferior*, ptid_t)): New overload.
243         (iterate_over_threads): Use all_threads_safe.
244         (any_thread_p): New.
245         (thread_count): Use all_threads and std::distance.
246         (live_threads_count): Use all_non_exited_threads and
247         std::distance.
248         (valid_global_thread_id): Use all_threads.
249         (in_thread_list): Use find_thread_ptid.
250         (first_thread_of_inferior): Adjust to per-inferior thread lists.
251         (any_thread_of_inferior, any_live_thread_of_inferior): Use
252         inf->non_exited_threads().
253         (prune_threads, delete_exited_threads): Use all_threads_safe.
254         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
255         (set_resumed, set_running): Use all_non_exited_threads.
256         (is_thread_state, is_stopped, is_exited, is_running)
257         (is_executing): Delete.
258         (set_executing, set_stop_requested, finish_thread_state): Use
259         all_non_exited_threads.
260         (print_thread_info_1): Use all_inferiors and all_threads.
261         (thread_apply_all_command): Use all_non_exited_threads.
262         (thread_find_command): Use all_threads.
263         (update_threads_executing): Use all_non_exited_threads.
264         * tid-parse.c (parse_thread_id): Use inf->threads.
265         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
266
267 2018-11-22  Pedro Alves  <palves@redhat.com>
268
269         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
270         switch to it before calling into try_open_exec_file.
271
272 2018-11-22  Pedro Alves  <palves@redhat.com>
273
274         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
275         inferior_thread instead of find_thread_ptid, and only when
276         inferior_ptid is not null_ptid.
277         * inferior.c (add_inferior): Don't include target_pid_to_str
278         output when the inferior is not started.
279         * python/py-inferior.c (python_on_normal_stop): Don't use
280         find_thread_ptid.
281         (tui_on_user_selected_context_changed): Use inferior_thread
282         instead of find_thread_ptid, and only when inferior_ptid is not
283         null_ptid.
284
285 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
286
287         PR python/23714
288         * gdb/python/python.c (execute_gdb_command): Call
289         prevent_dont_repeat earlier to avoid affecting dont_repeat.
290
291 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
292
293         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
294         (HFILES_NO_SRCDIR): Add arch/riscv.h.
295         * arch/riscv.c: New file.
296         * arch/riscv.h: New file.
297         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
298         this list, and add arch/riscv.o.
299         * features/Makefile: Add riscv features.
300         * features/riscv/32bit-cpu.c: New file.
301         * features/riscv/32bit-cpu.xml: New file.
302         * features/riscv/32bit-csr.c: New file.
303         * features/riscv/32bit-csr.xml: New file.
304         * features/riscv/32bit-fpu.c: New file.
305         * features/riscv/32bit-fpu.xml: New file.
306         * features/riscv/64bit-cpu.c: New file.
307         * features/riscv/64bit-cpu.xml: New file.
308         * features/riscv/64bit-csr.c: New file.
309         * features/riscv/64bit-csr.xml: New file.
310         * features/riscv/64bit-fpu.c: New file.
311         * features/riscv/64bit-fpu.xml: New file.
312         * features/riscv/rebuild-csr-xml.sh: New file.
313         * riscv-tdep.c: Add 'arch/riscv.h' include.
314         (riscv_gdb_reg_names): Delete.
315         (csr_reggroup): New global.
316         (struct riscv_register_alias): Delete.
317         (struct riscv_register_feature): New structure.
318         (riscv_register_aliases): Delete.
319         (riscv_xreg_feature): New global.
320         (riscv_freg_feature): New global.
321         (riscv_virtual_feature): New global.
322         (riscv_csr_feature): New global.
323         (riscv_create_csr_aliases): New function.
324         (riscv_read_misa_reg): Delete.
325         (riscv_has_feature): Delete.
326         (riscv_isa_xlen): Simplify, just return cached xlen.
327         (riscv_isa_flen): Simplify, just return cached flen.
328         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
329         (riscv_register_name): Update to make use of tdesc_register_name.
330         Look up xreg and freg names in the new globals riscv_xreg_feature
331         and riscv_freg_feature.  Don't supply csr aliases here.
332         (riscv_fpreg_q_type): Delete.
333         (riscv_register_type): Use tdesc_register_type in almost all
334         cases, override the returned type in a few specific cases only.
335         (riscv_print_one_register_info): Handle errors reading registers.
336         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
337         registers that are otherwise unknown to GDB.  Also check the
338         csr_reggroup.
339         (riscv_print_registers_info): Remove assert about upper register
340         number, and use gdbarch_register_reggroup_p instead of
341         short-cutting.
342         (riscv_find_default_target_description): New function.
343         (riscv_check_tdesc_feature): New function.
344         (riscv_add_reggroups): New function.
345         (riscv_setup_register_aliases): New function.
346         (riscv_init_reggroups): New function.
347         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
348         setup register groups.  Register new riscv debug variable.
349         * riscv-tdep.h: Add 'arch/riscv.h' include.
350         (struct gdbarch_tdep): Remove abi union, and add
351         riscv_gdbarch_features field.  Remove cached quad floating point
352         type, and provide initialisation for double type field.
353         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
354         the list of targets using the feature based target descriptions.
355         * NEWS: Mention target description support.
356
357 2018-11-21  Pedro Alves  <palves@redhat.com>
358
359         * valops.c (find_method_list, value_find_oload_method_list)
360         (find_overload_match, find_oload_champ): Rename parameters and
361         locals.
362
363 2018-11-21  Pedro Alves  <palves@redhat.com>
364
365         * valops.c (find_method_list): Replace pointer and length
366         parameters with an gdb::array_view.  Adjust.
367         (value_find_oload_method_list): Likewise.
368         (find_overload_match): Use gdb::array_view for methods list.
369         Adjust to find_oload_champ interface change.
370         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
371         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
372
373 2018-11-21  Pedro Alves  <palves@redhat.com>
374
375         * gdbtypes.c (compare_badness): Change type of parameters to const
376         reference.  Adjust to badness_vector being a std::vector now.
377         (rank_function): Adjust to badness_vector being a std::vector now.
378         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
379         (LENGTH_MATCH): Delete.
380         (compare_badness): Change type of parameters to const reference.
381         (rank_function): Return a badness_vector by value now.
382         (find_overload_match): Adjust to badness_vector being a
383         std::vector now.  Remove cleanups.
384         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
385         badness_vector pointer.
386         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
387         a badness_vector pointer.  Adjust to badness_vector being a
388         std::vector now.  Remove cleanups.
389         (find_oload_champ): 'oload_champ_bv' parameter now
390         a badness_vector pointer.  Adjust to badness_vector being a
391         std::vector now.  Remove cleanups.
392
393 2018-11-21  Pedro Alves  <palves@redhat.com>
394
395         * cp-support.c (sym_return_val_size, sym_return_val_index)
396         (sym_return_val): Delete.
397         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
398         add to the vector.
399         (make_symbol_overload_list): Adjust to return a std::vector
400         instead of maintaining a global open coded vector.
401         (make_symbol_overload_list_block): Add std::vector parameter.
402         (make_symbol_overload_list_block): Rename to ...
403         (add_symbol_overload_list_block): ... this and add std::vector
404         parameter.
405         (make_symbol_overload_list_namespace): Rename to ...
406         (add_symbol_overload_list_namespace): ... this and add std::vector
407         parameter.
408         (make_symbol_overload_list_adl_namespace): Rename to ...
409         (add_symbol_overload_list_adl_namespace): ... this and add
410         std::vector parameter.
411         (make_symbol_overload_list_adl): Delete.
412         (add_symbol_overload_list_adl): New.
413         (make_symbol_overload_list_using): Rename to ...
414         (add_symbol_overload_list_using): ... this and add std::vector
415         parameter.
416         (make_symbol_overload_list_qualified): Rename to ...
417         (add_symbol_overload_list_qualified): ... this and add std::vector
418         parameter.
419         * cp-support.h: Include "common/array-view.h" and <vector>.
420         (make_symbol_overload_list): Change return type to std::vector.
421         (make_symbol_overload_list_adl): Delete declaration.
422         (add_symbol_overload_list_adl): New declaration.
423         * valops.c (find_overload_match): Local 'oload_syms' now a
424         std::vector.
425         (find_oload_champ_namespace): 'oload_syms' parameter now a
426         std::vector pointer.
427         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
428         std::vector pointer.  Adjust to new make_symbol_overload_list
429         interface.
430
431 2018-11-21  Pedro Alves  <palves@redhat.com>
432
433         * common/array-view.h (array_view::splice(size_type, size_t)): New.
434         (array_view::splice(size_type)): New.
435         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
436         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
437         std::vector.
438         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
439         * extension.h: Include "common/array-view.h".
440         (xmethod_worker::invoke): Adjust to use gdb::array_view.
441         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
442         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
443         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
444         (xmethod_worker::do_get_result_type): Adjust to use
445         gdb::array_view.
446         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
447         * gdbtypes.h: Include "common/array-view.h".
448         (rank_function): Adjust to use gdb::array_view.
449         * python/py-xmethods.c (python_xmethod_worker::invoke)
450         (python_xmethod_worker::do_get_arg_types)
451         (python_xmethod_worker::do_get_result_type)
452         (python_xmethod_worker::invoke): Adjust to new interfaces.
453         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
454         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
455         * valops.c (find_overload_match, find_oload_champ_namespace)
456         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
457         gdb:array_view and the new xmethod_worker interfaces.
458         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
459         gdb::array_view.
460         * value.h (find_overload_match, result_type_of_xmethod)
461         (call_xmethod): Adjust to use gdb::array_view.
462         * unittests/array-view-selftests.c: Add slicing tests.
463
464 2018-11-21  Pedro Alves  <palves@redhat.com>
465
466         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
467         * common/array-view.h (make_array_view): New.
468         * compile/compile-object-run.c (compile_object_run): Adjust to
469         pass an array_view.
470         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
471         * eval.c (eval_call): Adjust to pass an array_view.
472         (evaluate_subexp_standard): Adjust to pass an array_view.
473         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
474         * guile/scm-value.c (gdbscm_value_call): Likewise.
475         * infcall.c (push_dummy_code): Replace pointer + size parameters
476         with an array_view parameter.
477         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
478         adjust.
479         * infcall.h: Include "common/array-view.h".
480         (call_function_by_hand, call_function_by_hand_dummy): Replace
481         pointer + size parameters with an array_view parameter.
482         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
483         * linux-tdep.c (linux_infcall_mmap): Likewise.
484         * objc-lang.c (lookup_objc_class, lookup_child_selector)
485         (value_nsstring, print_object_command): Likewise.
486         * python/py-value.c (valpy_call): Likewise.
487         * rust-lang.c (rust_evaluate_funcall): Likewise.
488         * spu-tdep.c (flush_ea_cache): Likewise.
489         * valarith.c (value_x_binop, value_x_unop): Likewise.
490         * valops.c (value_allocate_space_in_inferior): Likewise.
491         * unittests/array-view-selftests.c (run_tests): Add
492         gdb::make_array_view test.
493
494 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
495
496         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
497         than a fixed size buffer.
498
499 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
500
501         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
502         and remove insertion of extra spaces in GDB's output.
503         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
504         Layout field into a temporary buffer, and then output it as a
505         string field.
506
507 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
508
509         * NEWS: Document the language choice done by
510         'info [types|functions|variables]|rbreak'.
511
512 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
513
514         * symtab.c (treg_matches_sym_type_name): Use
515         scoped_switch_to_sym_language_if_auto instead of local logic.
516         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
517         to switch to SYM language when language mode is auto.
518
519 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
520
521         * language.h (scoped_switch_to_sym_language_if_auto): New class.
522
523 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
524
525         * symtab.c (search_symbols): Properly check absence of type regexp
526         before entering the loop scanning the minimal symbols.
527
528 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
529
530         * s12z-tdep.c (s12z_extract_return_value): New function.
531         (inv_reg_perm) New array.
532         (s12z_return_value): Populate readbuf if non-null.
533
534 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
535
536         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
537         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
538         to MinGW fixed by Gnulib.
539         (O_NOINHERIT): Define if not defined.
540
541 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
542
543         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
544
545 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
546
547         * infrun.c (displaced_step_inferior_state) <next>: Remove.
548
549 2018-11-19  Tom Tromey  <tom@tromey.com>
550
551         * source.c (get_filename_and_charpos): Return void.
552
553 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
554
555         * skip.c (_initialize_step_skip): Fix "info skip" help.
556
557 2018-11-16  Tom Tromey  <tom@tromey.com>
558
559         PR rust/23625:
560         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
561
562 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
563
564         * infrun.c (displaced_step_inferior_states): Change type to
565         std::forward_list.
566         (get_displaced_stepping_state): Adjust.
567         (displaced_step_in_progress_any_inferior): Adjust.
568         (add_displaced_stepping_state): Adjust.
569         (remove_displaced_stepping_state): Adjust.
570
571 2018-11-18  Tom Tromey  <tom@tromey.com>
572
573         PR build/23814:
574         * target-delegates.c: Rebuild.
575         * ia64-linux-nat.c (class ia64_linux_nat_target)
576         <have_steppable_watchpoint>: Use override.  Return true, not 1.
577         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
578         "self" argument.
579         (ia64_linux_nat_target::low_new_thread): Rename.
580         (class ia64_linux_nat_target) <read_description>: Don't declare.
581         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
582         bool.
583
584 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
585
586         PR gdb/22736:
587         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
588         lang_struct_return code.
589
590 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
591
592         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
593         return_method.
594         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
595         * amd64-tdep.c (amd64_push_arguments): Likewise.
596         (amd64_push_dummy_call): Likewise.
597         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
598         * arc-tdep.c (arc_push_dummy_call): Likewise.
599         * arm-tdep.c (arm_push_dummy_call): Likewise.
600         * avr-tdep.c (avr_push_dummy_call): Likewise.
601         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
602         * cris-tdep.c (cris_push_dummy_call): Likewise.
603         * csky-tdep.c (csky_push_dummy_call): Likewise.
604         * frv-tdep.c (frv_push_dummy_call): Likewise.
605         * gdbarch.c: Regenerate.
606         * gdbarch.h: Regenerate.
607         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
608         return_method.
609         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
610         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
611         (hppa64_push_dummy_call): Likewise.
612         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
613         * i386-tdep.c (i386_push_dummy_call): Likewise.
614         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
615         * infcall.c (call_function_by_hand_dummy): Likewise.
616         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
617         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
618         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
619         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
620         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
621         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
622         * mep-tdep.c (mep_push_dummy_call): Likewise.
623         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
624         (mips_n32n64_push_dummy_call): Likewise.
625         (mips_o32_push_dummy_call): Likewise.
626         (mips_o64_push_dummy_call): Likewise.
627         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
628         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
629         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
630         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
631         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
632         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
633         (ppc64_sysv_abi_push_dummy_call): Likewise.
634         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
635         (ppc64_sysv_abi_push_dummy_call): Likewise.
636         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
637         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
638         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
639         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
640         * rx-tdep.c (rx_push_dummy_call): Likewise.
641         * s390-tdep.c (s390_push_dummy_call): Likewise.
642         * score-tdep.c (score_push_dummy_call): Likewise.
643         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
644         (sh_push_dummy_call_nofpu): Likewise.
645         * sparc-tdep.c (sparc32_store_arguments): Likewise.
646         (sparc32_push_dummy_call): Likewise.
647         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
648         (sparc64_push_dummy_call): Likewise.
649         * spu-tdep.c (spu_push_dummy_call): Likewise.
650         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
651         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
652         * v850-tdep.c (v850_push_dummy_call): Likewise.
653         * vax-tdep.c (vax_push_dummy_call): Likewise.
654         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
655         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
656
657 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
658
659         * gdbarch.sh (enum function_call_return_method): Add enum.
660         * gdbarch.h: Regenerate.
661         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
662
663 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
664
665         * unittests/copy_bitwise-selftests.c: New file.
666         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
667         (selftests::copy_bitwise_tests): Delete, moving this code to
668         unittests/copy_bitwise-selftests.c instead.
669         (_initialize_utils): Do not register copy_bitwise tests.
670         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
671         unittests/copy_bitwise-selftests.c.
672
673 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
674
675         * ada-lang.c (move_bits): Delete. Update all callers to use
676         copy_bitwise instead.
677         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
678         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
679         Move from here to utils.c.
680         (_initialize_dwarf2loc): Remove call to register copy_bitwise
681         selftests.
682         * utils.h (copy_bitwise): Add declaration.
683         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
684         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
685         Moved here from dwarf2loc.c.
686         (_initialize_utils): Register copy_bitwise selftests.
687
688 2018-11-14  Jim Wilson  <jimw@sifive.com>
689
690         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
691         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
692         then increment next_regnum if odd.
693         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
694         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
695         function type.  Pass new arg to riscv_arg_location based on function
696         type.
697         (riscv_return_value): Pass new arg to riscv_arg_location.
698
699         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
700         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
701         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
702
703         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
704         setting len.  New local align, set to max of arg align and xlen,
705         and pass to first riscv_assign_stack_location call.
706
707 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
708
709         * skip.c (complete_skip_number): New function.
710         (_initialize_step_skip): Add completers to some skip commands.
711
712 2018-11-09  Tom Tromey  <tom@tromey.com>
713
714         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
715         (struct remote_g_packet_data): Derive from allocate_on_obstack.
716         <guesses>: Now a std::vector.
717         (remote_g_packet_data_init, register_remote_g_packet_guess):
718         Update.
719         (remote_read_description_p): Update.  Return bool.
720         (remote_target::read_description): Update.
721         (struct remote_g_packet_guess): Add constructor.
722
723 2018-11-09  Tom Tromey  <tom@tromey.com>
724
725         * common/scoped_fd.h (class scoped_fd): Add move constructor and
726         move assignment operator.
727         * psymtab.c (psymtab_to_fullname): Update.
728         * source.h (open_source_file): Return scoped_fd.
729         (find_and_open_source): Likewise.
730         * source.c (open_source_file): Return scoped_fd.
731         (get_filename_and_charpos): Update.
732         (print_source_lines_base): Update.  Use scoped_fd::to_file.
733         (forward_search_command): Likewise.
734         (reverse_search_command): Likewise.
735         (find_and_open_source): Return scoped_fd.
736         * tui/tui-source.c (tui_set_source_content): Update.  Use
737         gdb_file_up.
738
739 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
740
741         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
742         overflow.
743
744 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
745
746         * configure: Regenerate.
747
748 2018-11-09  Tom de Vries  <tdevries@suse.de>
749
750         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
751         unconditionally, to set the language of the symbol.  Manage freeing
752         returned pointer using gdb::unique_xmalloc_ptr.
753
754 2018-11-08  Tom Tromey  <tom@tromey.com>
755
756         * record.c (require_record_target): Upper-case "<TAB>".
757
758 2018-11-08  Tom Tromey  <tom@tromey.com>
759
760         * python/lib/gdb/command/pretty_printers.py
761         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
762
763 2018-11-08  Tom Tromey  <tom@tromey.com>
764
765         PR gdb/23555:
766         PR gdb/23838:
767         * target.h (target_supports_terminal_ours): Return bool.
768         * target.c (target_supports_terminal_ours): Handle case where
769         current_top_target returns nullptr.  Return bool.
770
771 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
772
773         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
774         return the correct count for potential HFAs.
775
776 2018-11-08  Jan Beulich  <jbeulich@suse.com>
777
778         * i387-tdep.c (i387_supply_xsave): Split handling of
779         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
780         (i387_collect_xsave): Likewise.
781
782 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
783
784         * riscv-tdep.c (riscv_insn::decode): Update header comment.
785         (riscv_frame_this_id): Catch errors thrown while building the
786         frame cache, leave the frame id as the default, which is the outer
787         frame id.
788
789 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
790
791         * ada-lang.c (read_atcb): Only set task_info->called_task if
792         task_info->state == Entry_Caller_Sleep.
793         (print_ada_task_info): Do not check task_info->state before
794         checking task_info->called_task.
795         (info_task): Likewise.
796
797 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
798
799         * ada-tasks.c (read_atcb): Clear task_info before computing
800         the value of each of its fields.
801
802 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
803
804         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
805         NULL before dereferencing it.
806
807 2018-11-06  Tom de Vries  <tdevries@suse.de>
808
809         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
810         program headers.
811
812 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
813
814         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
815         so that it applies to uclinux as well.
816
817 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
818
819         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
820         when on AAPCS.
821
822 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
823
824         * riscv-fbsd-nat.c (getregs_supplies): Return true for
825         RISCV_CSR_SSTATUS_REGNUM.
826
827 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
828
829         * source.c (open_source_file): Fix leak by transferring the
830         current s->fullname to the unique_xmalloc_ptr fullname given
831         to find_and_open_source.
832
833 2018-11-04  Tom Tromey  <tom@tromey.com>
834
835         * varobj.c (install_default_visualizer): Update.
836         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
837         Return gdbpy_ref.
838         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
839         (find_pretty_printer_from_progspace)
840         (find_pretty_printer_from_gdb, find_pretty_printer)
841         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
842         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
843         Update.
844
845 2018-11-04  Tom Tromey  <tom@tromey.com>
846
847         * python/python.c (gdbpy_parameter_value): Update.
848         * python/python-internal.h (python_string_to_unicode)
849         (python_string_to_target_python_string)
850         (host_string_to_python_string): Return gdbpy_ref.
851         * python/py-utils.c (python_string_to_unicode)
852         (unicode_to_encoded_python_string)
853         (unicode_to_target_python_string)
854         (python_string_to_target_string)
855         (python_string_to_target_python_string): Return gdbpy_ref.
856         (python_string_to_host_string): Update.
857         (host_string_to_python_string): Return gdbpy_ref.
858         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
859         (stpy_fullname): Update.
860         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
861         Update.
862         * python/py-prettyprint.c (print_string_repr): Update.
863         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
864         (objfpy_get_build_id): Update.
865         * python/py-breakpoint.c (bppy_get_location)
866         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
867         Update.
868
869 2018-11-04  Tom Tromey  <tom@tromey.com>
870
871         * python/python-internal.h (gdb_py_object_from_longest)
872         (gdb_py_object_from_ulongest): Return gdbpy_ref.
873         * python/py-value.c (valpy_int): Update.
874         * python/py-utils.c (gdb_py_object_from_longest): Return
875         gdbpy_ref.
876         (gdb_py_object_from_ulongest): Likewise.
877         * python/py-type.c (typy_get_alignof): Update.
878         * python/py-linetable.c (ltpy_get_all_source_lines)
879         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
880         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
881
882 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
883
884         * ada-lang.c (_initialize_ada_language): Fix typo.
885
886 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
887
888         * language.c (type): Remove.
889         (_initialize_language): Remove assignment to type.
890
891 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
892
893         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
894         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
895         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
896         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
897         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
898         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
899         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
900         and aarch64-ravenscar-thread.o.
901         * NEWS: Add entry documenting Ravenscar tasking support
902         on AArch64 ELF.
903
904 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
905
906         * symtab.c (info_functions_command): Initialize quiet flag.
907         * stack.c (info_args_command): Likewise.
908
909 2018-11-01  Jim Wilson  <jimw@sifive.com>
910
911         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
912         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
913         debugging messages.
914
915 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
916
917         * ada-lang.c (ada_watch_location_expression): New function.
918         (ada_language_defn): Set la_watch_location_expression to
919         ada_watch_location_expression.
920
921 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
922
923         * print-utils.c (int_string): Remove unnecessary trailing spaces.
924
925 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
926
927         * rs6000-tdep.c (skip_prologue): Fix potential negative left
928         shifting.
929
930 2018-11-01  Jerome Guitton  <guitton@adacore.com>
931             Joel Brobecker  <brobecker@adacore.com>
932
933         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
934         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
935         * arm-pikeos-tdep.c: New file.
936         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
937         embedded system.
938         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
939
940 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
941
942         * common/pathstuff.c (get_standard_temp_dir): New.
943         * common/pathstuff.h (get_standard_temp_dir): New.
944         * config.in: Re-generate.
945         * configure: Re-generate.
946         * configure.ac: Don't check for mkdtemp.
947         * gnulib/aclocal-m4-deps.mk: Re-generate.
948         * gnulib/aclocal.m4: Re-generate.
949         * gnulib/config.in: Re-generate.
950         * gnulib/configure: Re-generate.
951         * gnulib/import/Makefile.am: Re-generate.
952         * gnulib/import/Makefile.in: Re-generate.
953         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
954         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
955         * gnulib/import/m4/mkdtemp.m4: New file.
956         * gnulib/import/mkdtemp.c: New file.
957         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
958         Add mkdtemp module.
959         * unittests/mkdir-recursive-selftests.c (test): Use
960         get_standard_temp_dir.
961         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
962         ifdef.
963         * compile/compile.c (get_compile_file_tempdir): Likewise.
964
965 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
966
967         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
968         (SIG_FRAME_LR_OFFSET64): New define.
969         (SIG_FRAME_FP_OFFSET64): New define.
970         (aix_sighandle_frame_cache): New Function.
971         (aix_sighandle_frame_this_id): New Function.
972         (aix_sighandle_frame_prev_register): New Function.
973         (aix_sighandle_frame_sniffer): New Function.
974         (aix_sighandle_frame_unwind): New global variable.
975         (rs6000_aix_init_osabi): Install new frame unwinder.
976
977 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
978
979         PR gdb/23835
980         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
981         already defined.
982
983 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
984
985         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
986
987 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
988
989         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
990         (producer_is_icc): New function.
991         (check_producer): Set producer_is_icc field on dwarf2_cu.
992         (dwarf2_init_integer_type): New function.
993         (read_base_type): Call dwarf2_init_integer_type instead of
994         init_integer_type in all cases.
995         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
996         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
997         LEN is greater than 0.
998
999 2018-10-30  Tom Tromey  <tom@tromey.com>
1000
1001         * main.c (captured_main_1): Check return value of bfd_init.
1002
1003 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1004
1005         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1006         Adjust comments.
1007
1008 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1009
1010         * procfs.c: Include common/pathstuff.h.
1011
1012 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1013
1014         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1015         Add missing braces.  No functional change.
1016
1017 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1018
1019         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1020         to report a bad option and fix indentation.
1021         * demangle.c (demangle_command): Use report_unrecognized_option_error
1022         to report a bad option and correctly report the bad option.
1023
1024 2018-10-27  Tom Tromey  <tom@tromey.com>
1025
1026         PR cli/23364:
1027         * darwin-nat.c (copied_shell): New global.
1028         (may_have_sip): Rename from should_disable_startup_with_shell.
1029         (copy_shell_to_cache, maybe_cache_shell): New functions.
1030         (darwin_nat_target::create_inferior): Update.  Use
1031         copied_shell.
1032
1033 2018-10-27  Tom Tromey  <tom@tromey.com>
1034
1035         * unittests/scoped_fd-selftests.c (test_to_file): New function.
1036         (run_tests): Call test_to_file.
1037         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1038         temporary files.
1039         * common/scoped_fd.h (scoped_fd::to_file): New method.
1040
1041 2018-10-27  Tom Tromey  <tom@tromey.com>
1042
1043         * unittests/scoped_mmap-selftests.c (test_normal): Use
1044         gdb_mkostemp_cloexec.
1045         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1046         Use gdb_mkostemp_cloexec.
1047         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1048         gnulib/config.in, gnulib/configure,
1049         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1050         gnulib/import/m4/gnulib-cache.m4,
1051         gnulib/import/m4/gnulib-comp.m4: Update.
1052         * gnulib/import/m4/mkostemp.m4: New file.
1053         * gnulib/import/m4/mkstemp.m4: Remove.
1054         * gnulib/import/mkostemp.c: New file.
1055         * gnulib/import/mkstemp.m4: Remove.
1056         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1057         mkstemp, add mkostemp.  Apply new patch.
1058         * gnulib/import/stdlib.in.h: Apply patch.
1059         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1060         New file.
1061         * dwarf-index-write.c (write_psymtabs_to_index): Use
1062         gdb_mkostemp_cloexec.
1063         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1064
1065 2018-10-27  Tom Tromey  <tom@tromey.com>
1066
1067         * unittests/mkdir-recursive-selftests.c: New file.
1068         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1069         unittests/mkdir-recursive-selftests.c.
1070         * dwarf-index-cache.c (mkdir_recursive): Move to
1071         common/filestuff.c.
1072         (index_cache::store): Check return value of mkdir_recursive.
1073         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1074         (_initialize_index_cache): Don't register test.
1075         * common/filestuff.h (mkdir_recursive): Declare.
1076         * common/filestuff.c (mkdir_recursive): Move from
1077         dwarf-index-cache.c.  Return bool.
1078
1079 2018-10-27  Tom Tromey  <tom@tromey.com>
1080
1081         * dwarf-index-write.c (write_psymtabs_to_index): Move
1082         make_temp_filename to common/pathstuff.c.
1083         * common/pathstuff.h (make_temp_filename): Declare.
1084         * common/pathstuff.c (make_temp_filename): New function, moved
1085         from dwarf-index-write.c.
1086
1087 2018-10-27  Tom Tromey  <tom@tromey.com>
1088
1089         * procfs.c (procfs_target::create_inferior): Use get_shell.
1090         * cli/cli-cmds.c (shell_escape): Use get_shell.
1091         * windows-nat.c (windows_nat_target::create_inferior): Use
1092         get_shell.
1093         * common/pathstuff.c (get_shell): New function.
1094         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1095         (fork_inferior): Use get_shell.
1096         * common/pathstuff.h (get_shell): Declare.
1097
1098 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1099
1100         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1101
1102 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1103
1104         * stack.c (print_variable_and_value_data): Add preg and treg.
1105         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1106         and update callers.
1107         (print_frame_arg_vars): Likewise.
1108         (prepare_reg): New function.
1109         (info_locals_command): Extract info print args and use them.
1110         (info_args_command): Likewise.
1111         (_initialize_stack): Modify on-line help.
1112         * symtab.c (treg_matches_sym_type_name): New function.
1113         (search_symbols): New arg t_regexp.
1114         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1115         (info_variables_command): Extract info print args and use them.
1116         (info_functions_command): Likewise.
1117         (info_types_command): Update call to symtab_symbol_info.
1118         (_initialize_symtab): Modify on-line help.
1119         * symtab.h (treg_matches_sym_type_name): New function.
1120         (search_symbols): New t_regexp arg.
1121
1122 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1123
1124         * cli-utils.c (extract_arg_maybe_quoted): New function.
1125         (extract_info_print_args): New function.
1126         (info_print_args_help): New function.
1127         (report_unrecognized_option_error): New function.
1128         * cli-utils.h (extract_arg_maybe_quoted): New function.
1129         (extract_info_print_args): New function.
1130         (info_print_args_help): New function.
1131         (report_unrecognized_option_error): New function.
1132
1133 2018-10-26  Tom Tromey  <tom@tromey.com>
1134
1135         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1136         (compute_compunit_symtab_includes): Update.
1137         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1138         (compunit_symtab_ptr): Likewise.
1139
1140 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1141
1142         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1143         default_print_auxv_entry for specific tag values.
1144
1145 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1146
1147         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1148
1149 2018-10-26  Jim Wilson  <jimw@sifive.com>
1150
1151         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1152         (riscv_linux_sigframe_init): Declare.
1153         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1154         (riscv_linux_sigframe): New.
1155         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1156         (riscv_linux_sigframe_init): Define.
1157         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1158
1159         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1160         (riscv_isa_flen): Likewise.  Drop static.
1161         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1162         (riscv_isa_flen): Likewise.  Declare.
1163
1164 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1165             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1166
1167         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1168         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1169         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1170         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1171         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1172         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1173         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1174         Define.
1175         (struct ppc_linux_features) <htm>: New field.
1176         (ppc_linux_no_features): Add initializer for htm field.
1177         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1178         new tdescs.
1179         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1180         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1181         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1182         Define if not already defined.
1183         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1184         and rs6000/powerpc-isa207-htm-vsx64l.
1185         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1186         rs6000/powerpc-isa207-htm-vsx64l.xml.
1187         * features/rs6000/power-htm-spr.xml: New file.
1188         * features/rs6000/power-htm-core.xml: New file.
1189         * features/rs6000/power64-htm-core.xml: New file.
1190         * features/rs6000/power-htm-fpu.xml: New file.
1191         * features/rs6000/power-htm-altivec.xml: New file.
1192         * features/rs6000/power-htm-vsx.xml: New file.
1193         * features/rs6000/power-htm-ppr.xml: New file.
1194         * features/rs6000/power-htm-dscr.xml: New file.
1195         * features/rs6000/power-htm-tar.xml: New file.
1196         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1197         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1198         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1199         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1200         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1201         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1202         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1203         fetch_regset with HTM regsets.
1204         (store_register, store_ppc_registers): Call store_regset with HTM
1205         regsets.
1206         (ppc_linux_nat_target::read_description): Set htm field in the
1207         features struct if needed.
1208         * ppc-linux-tdep.c: Include
1209         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1210         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1211         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1212         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1213         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1214         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1215         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1216         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1217         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1218         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1219         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1220         (ppc32_linux_ctarregset): New globals.
1221         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1222         (ppc_linux_collect_core_cpgrregset): New function.
1223         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1224         regsets.
1225         (ppc_linux_core_read_description): Check if the tm spr section is
1226         present and set htm in the features struct.
1227         (_initialize_ppc_linux_tdep): Call
1228         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1229         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1230         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1231         Declare.
1232         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1233         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1234         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1235         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1236         New fields.
1237         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1238         Likewise.
1239         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1240         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1241         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1242         New enum fields.
1243         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1244         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1245         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1246         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1247         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1248         <PPC_CTAR_REGNUM>: Likewise.
1249         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1250         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1251         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1252         (IS_CEFP_PSEUDOREG): Define.
1253         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1254         registers.  Return names for the checkpointed DFP, VSX, and EFP
1255         pseudo registers.
1256         (rs6000_pseudo_register_type): Remove initial assert and raise an
1257         internal error in the else clause instead.  Return types for the
1258         checkpointed DFP, VSX, and EFP pseudo registers.
1259         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1260         checkpointed DFP pseudo registers.
1261         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1262         checkpointed VSX pseudo registers.
1263         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1264         from efpr_pseudo_register_read and
1265         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1266         registers.
1267         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1268         Handle checkpointed DFP, VSX, and EFP registers.
1269         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1270         (efp_ax_pseudo_register_collect): New functions.
1271         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1272         register logic to new functions.  Handle checkpointed DFP, VSX,
1273         and EFP pseudo registers.
1274         (rs6000_gdbarch_init): Look for and validate the htm features.
1275         Include checkpointed DFP, VSX and EFP pseudo-registers.
1276         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1277         HTM registers.
1278
1279 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1280
1281         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1282         without altivec or fpu.
1283
1284 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1285             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1286
1287         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1288         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1289         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1290         Define if not already defined.
1291         * features/rs6000/power-ebb.xml: New file.
1292         * features/rs6000/power-linux-pmu.xml: New file.
1293         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1294         features.
1295         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1296         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1297         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1298         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1299         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1300         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1301         fetch_regset with ebb and pmu regsets.
1302         (store_register, store_ppc_registers): Call store_regset with ebb
1303         and pmu regsets.
1304         (ppc_linux_nat_target::read_description): Set isa207 field in the
1305         features struct if ebb and pmu are avaiable.
1306         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1307         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1308         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1309         and pmu regsets.
1310         (ppc_linux_core_read_description): Check if the pmu section is
1311         present and set isa207 in the features struct.
1312         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1313         (ppc32_linux_pmuregset): Declare.
1314         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1315         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1316         <ppc_sier_regnum>: New field.
1317         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1318         New enum values.
1319         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1320         values.
1321         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1322         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1323         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1324         ebb and pmu features.
1325
1326 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1327             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1328
1329         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1330         (tdesc_powerpc_isa207_vsx64l): Declare.
1331         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1332         (struct ppc_linux_features) <isa207>: New field.
1333         (ppc_linux_no_features): Add initializer for isa207 field.
1334         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1335         new tdescs.
1336         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1337         (NT_PPC_TAR): Define if not already defined.
1338         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1339         rs6000/powerpc-isa207-vsx64l.
1340         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1341         rs6000/powerpc-isa207-vsx64l.xml.
1342         * features/rs6000/power-tar.xml: New file.
1343         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1344         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1345         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1346         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1347         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1348         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1349         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1350         fetch_regset with the TAR regset.
1351         (store_register, store_ppc_registers): Call store_regset with the
1352         TAR regset.
1353         (ppc_linux_nat_target::read_description): Set isa207 field in the
1354         features struct if needed.
1355         * ppc-linux-tdep.c: Include
1356         features/rs6000/powerpc-isa207-vsx32l.c and
1357         features/rs6000/powerpc-isa207-vsx64l.c.
1358         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1359         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1360         regset.
1361         (ppc_linux_core_read_description): Check if the tar section is
1362         present and set isa207 in the features struct.
1363         (_initialize_ppc_linux_tdep): Call
1364         initialize_tdesc_powerpc_isa207_vsx32l and
1365         initialize_tdesc_powerpc_isa207_vsx64l.
1366         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1367         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1368         (enum) <PPC_TAR_REGNUM>: New enum value.
1369         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1370         feature.
1371         (ppc_process_record_op31): Record changes to TAR.
1372
1373 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1374             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1375
1376         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1377         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1378         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1379         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1380         (struct ppc_linux_features) <ppr_dscr>: New field.
1381         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1382         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1383         new tdescs.
1384         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1385         Define if not already defined.
1386         * features/Makefile (WHICH): Add
1387         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1388         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1389         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1390         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1391         * features/rs6000/power-dscr.xml: New file.
1392         * features/rs6000/power-ppr.xml: New file.
1393         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1394         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1395         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1396         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1397         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1398         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1399         * ppc-linux-nat.c: Include <sys/uio.h>.
1400         (fetch_regset, store_regset, check_regset): New functions.
1401         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1402         DSCR and PPR regsets.
1403         (store_register, store_ppc_registers): Call store_regset with
1404         DSCR and PPR regsets.
1405         (ppc_linux_get_hwcap2): New function.
1406         (ppc_linux_nat_target::read_description): Call
1407         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1408         features struct if needed.
1409         * ppc-linux-tdep.c: Include
1410         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1411         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1412         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1413         (ppc32_linux_dscrregset): New globals.
1414         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1415         and dscr regsets.
1416         (ppc_linux_core_read_description): Check if the ppr and dscr
1417         sections are present and set ppr_dscr in the features struct.
1418         (_initialize_ppc_linux_tdep): Call
1419         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1420         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1421         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1422         (ppc32_linux_dscrregset): Declare.
1423         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1424         <ppc_dscr_regnum>: New field.
1425         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1426         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1427         and dscr features.
1428         (ppc_process_record_op31): Record changes to PPR and DSCR.
1429
1430 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1431
1432         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1433         second initializer line for the have_* variables.  Initialize
1434         have_fpu to 0 instead of 1.
1435
1436 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1437
1438         * arch/ppc-linux-common.c (ppc_linux_match_description):
1439         Parenthesize tdesc assignements and indent them properly.
1440
1441 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1442
1443         * ppc-linux-nat.c (fetch_register): Change if statement to else
1444         if.
1445         (store_register): Likewise.
1446
1447 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1448
1449         * rs6000-tdep.c: Remove reggroups.h include.
1450         (rs6000_pseudo_register_reggroup_p): Remove.
1451         (rs6000_gdbarch_init): Remove call to
1452         set_tdesc_pseudo_register_reggroup_p.
1453
1454 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1455
1456         * reggroups.c (default_register_reggroup_p): Return true for
1457         decfloat registers and float_reggroup.
1458
1459 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1460
1461         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1462         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1463         ppc_linux_collect_vrregset by regcache_collect_regset.
1464
1465 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1466
1467         * linux-tdep.c (linux_collect_regset_section_cb): Use
1468         std::vector<gdb_byte> instead of char * and malloc for buf.
1469         Remove xfree.
1470
1471 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1472
1473         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1474         symtab_start instead of always using language_unknown.
1475
1476 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1477
1478         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1479         READ_P parameter, catch and ignore register access errors from
1480         either the old or new MISA location.
1481         (riscv_has_feature): Update call to riscv_read_misa_reg.
1482
1483 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1484
1485         * python/py-function.c (convert_values_to_python): Return
1486         gdbpy_ref<>.  Add header comment.
1487         (fnpy_call): Adjust.
1488
1489 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1490
1491         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1492         (cmdpy_completer_handle_brkchars): Adjust.
1493         (cmdpy_completer): Adjust.
1494
1495 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1496
1497         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1498         Pass correct regnum to raw_supply_zeroed.
1499
1500 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1501
1502         * regcache.c (cooked_read_test): Add CSKY to the list of
1503         architectures with a save_reggroup
1504
1505 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
1506
1507         PR gdb/23368
1508         * infrun.c (follow_exec): In the follow_exec_mode_new case,
1509         transfer terminal state from old new new inferior.
1510         * terminal.h (swap_terminal_info): New function.
1511         * inflow.c (swap_terminal_info): New function.
1512
1513 2018-10-23  Tom Tromey  <tom@tromey.com>
1514
1515         * record-btrace.c (get_thread_current_frame_id): Rename from
1516         get_thread_current_frame.  Return a frame_id.
1517         (record_btrace_start_replaying): Update.
1518
1519 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1520
1521         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
1522         for CSRs.
1523
1524 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
1525
1526         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
1527         have_nonsteppable_watchpoint attribute to 1.
1528
1529 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1530
1531         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
1532         register names.
1533         (struct register_alias): Rename to...
1534         (struct riscv_register_alias): ...this, and update comment.
1535         (riscv_register_aliases): Update type, and alias names.  Remove
1536         CSR names from this list.
1537         (riscv_register_name): Use riscv_gdb_reg_names for int and float
1538         register names.  Add an extra assertion.
1539         (riscv_is_regnum_a_named_csr): New function.
1540         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
1541
1542 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
1543
1544         * configure.tgt: Add configuration for s12z.
1545         * s12z-tdep.c:  New file.
1546         * NEWS: Mention new target.
1547
1548 2018-10-22  Jim Wilson  <jimw@sifive.com>
1549
1550         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
1551         FP reg smaller than FP reg size, and fill with -1 instead of 0.
1552
1553         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
1554         (riscv_register_type): Use them.
1555         (riscv_print_one_register_info): Handle union of floats same as float.
1556         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
1557         riscv_fpreg_q_type fields.
1558
1559 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1560
1561         * gdbarch.sh (gdbarch_num_cooked_regs): New.
1562         * gdbarch.h: Re-generate.
1563         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
1564         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
1565         * eval.c (evaluate_subexp_standard): Likewise.
1566         * findvar.c (value_of_register): Likewise.
1567         (value_of_register_lazy): Likewise.
1568         (address_from_register): Likewise.
1569         * frame.c (get_frame_register_bytes): Likewise.
1570         * gdbarch-selftests.c (register_to_value_test): Likewise.
1571         * h8300-tdep.c (h8300_register_type): Likewise.
1572         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
1573         (i386_svr4_reg_to_regnum): Likewise.
1574         * infcmd.c (default_print_registers_info): Likewise.
1575         (registers_info): Likewise.
1576         (print_vector_info): Likewise.
1577         (default_print_float_info): Likewise.
1578         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
1579         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
1580         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
1581         (mi_cmd_data_list_changed_registers): Likewise.
1582         (mi_cmd_data_list_register_values): Likewise.
1583         (mi_cmd_data_write_register_values): Likewise.
1584         (mi_cmd_trace_frame_collected): Likewise.
1585         * mips-tdep.c (print_gp_register_row): Likewise.
1586         (mips_print_registers_info): Likewise.
1587         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1588         * regcache.c (init_regcache_descr): Likewise.
1589         (register_size): Likewise.
1590         (register_dump::dump): Likewise.
1591         (cooked_read_test): Likewise.
1592         (cooked_write_test): Likewise.
1593         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
1594         (rs6000_gdbarch_init): Likewise.
1595         * stabsread.c (stab_reg_to_regnum): Likewise.
1596         * stack.c (info_frame_command): Likewise.
1597         * target-descriptions.c (tdesc_register_name): Likewise.
1598         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
1599         * tui/tui-regs.c (tui_show_register_group): Likewise.
1600         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
1601         (user_reg_map_regnum_to_name): Likewise.
1602         (value_of_user_reg): Likewise.
1603         (maintenance_print_user_registers): Likewise.
1604         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
1605         (xtensa_register_name): Likewise.
1606         (xtensa_register_type): Likewise.
1607         (xtensa_reg_to_regnum): Likewise.
1608         (xtensa_pseudo_register_read): Likewise.
1609         (xtensa_pseudo_register_write): Likewise.
1610
1611 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1612
1613         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
1614         correctly-sized buffer with raw_read.
1615         (amd64_pseudo_register_write): Use correctly-sized buffer for
1616         raw_read/raw_write.
1617
1618 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1619
1620         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
1621         in add_prefix_cmd of set print type.
1622
1623 2018-10-19  Tom Tromey  <tom@tromey.com>
1624
1625         PR tui/18388:
1626         * NEWS: Mention tabset deprecation.
1627         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
1628         (update_tab_width): New function.
1629         (tui_set_tab_width, tui_show_tab_width): New functions.
1630         (tui_set_tab_width_command): Use update_tab_width.
1631         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
1632         Add new "set tui tab-width" command.
1633         * tui/tui-source.c (tui_set_source_content): Update.
1634         * tui/tui-disasm.c (tui_set_disassem_content): Update.
1635         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
1636         Don't declare.
1637         (tui_tab_width): Declare.
1638         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
1639         (tui_set_default_tab_len): Remove.
1640
1641 2018-10-19  Tom Tromey  <tom@tromey.com>
1642
1643         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
1644         (key_is_backspace, tui_getc): Don't declare.
1645         * tui/tui-io.c (key_is_start_sequence): Now static.
1646         (key_is_end_sequence, key_is_backspace): Remove.
1647         (tui_getc): Now static.
1648
1649 2018-10-19  Tom Tromey  <tom@tromey.com>
1650
1651         * symfile.c (reread_symbols): Clear "static_links".
1652
1653 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
1654
1655         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
1656         define.
1657         (aarch64_linux_sigframe_init): Extra boundary checks.
1658
1659 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
1660
1661         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
1662         the possibly non-existent tdesc type 'vec128', but the type of raw
1663         register v16 instead.
1664
1665 2018-10-19  Gary Benson <gbenson@redhat.com>
1666
1667         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
1668
1669 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
1670
1671         PR cli/23785
1672         * cli/cli-dump.c (restore_binary_file): Check if "file" is
1673         NULL.
1674
1675 2018-10-17  Paul Koning  <paul_koning@dell.com>
1676
1677         * charset.c (convert_between_encodings): Fix unsigned overflow.
1678
1679 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
1680
1681         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
1682         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
1683         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
1684         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1685         New functions.
1686         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
1687         and fbsd_info_proc_mappings_header.
1688         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
1689         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1690         New.
1691
1692 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
1693
1694         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
1695         Solaris Maintainer.
1696
1697 2018-10-15  Tom Tromey  <tom@tromey.com>
1698
1699         * tui/tui.c (strcat_to_buf): Remove casts.
1700         * tui/tui-winsource.c (tui_show_source_line)
1701         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
1702         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
1703         * tui/tui-windata.c (tui_first_data_item_displayed)
1704         (tui_delete_data_content_windows, tui_erase_data_content)
1705         (tui_display_all_data, tui_display_data_from)
1706         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
1707         * tui/tui-win.c (tui_set_win_height)
1708         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
1709         casts.
1710         * tui/tui-win.c (tui_resize_all): Remove casts.
1711         (tui_scroll_backward_command, tui_set_focus)
1712         (tui_set_tab_width_command): Likewise.
1713         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
1714         * tui/tui-regs.c (tui_show_register_group): Remove cast.
1715         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
1716         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
1717         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
1718         Remove casts.
1719
1720 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1721
1722         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
1723         AArch64/ARM maintainer.
1724
1725 2018-10-11  Gary Benson <gbenson@redhat.com>
1726
1727         * interps.h (interp::m_name): Make private and mutable.
1728         * interps.c (interp::~interp): Free m_name.
1729
1730 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1731             Simon Marchi <simark@simark.ca>
1732
1733         * README (`configure' options): Add documentation for new
1734         "--enable-unit-tests" option.
1735         * acinclude.m4: Include "selftest.m4".
1736         * configure: Regenerate.
1737         * configure.ac: Use "GDB_AC_SELFTEST".
1738         * maint.c (maintenance_selftest): Update message informing
1739         that selftests have been disabled.
1740         (maintenance_info_selftests): Likewise.
1741         * selftest.m4: New file.
1742
1743 2018-10-10  Gary Benson <gbenson@redhat.com>
1744
1745         * remote.c (remote_target::remote_send_printf): Add
1746         missing va_end found by Coverity.
1747
1748 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
1749
1750         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
1751
1752 2018-10-09  Tom Tromey  <tom@tromey.com>
1753
1754         * configure: Rebuild.
1755         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
1756         * NEWS: Update --enable-ubsan documentation.
1757
1758 2018-10-09  Gary Benson <gbenson@redhat.com>
1759
1760         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
1761         found by Coverity.
1762
1763 2018-10-08  Tom Tromey  <tom@tromey.com>
1764
1765         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
1766         variable.
1767         (riscv_fbsd_init_abi): Likewise.
1768
1769 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1770         * valops.c (value_struct_elt_for_reference): Rename local variable
1771         to work around the shadowing a previous local warning.
1772
1773 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1774
1775         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
1776         * NEWS: Mention new FreeBSD/riscv native configuration.
1777         * configure.host: Add riscv*-*-freebsd*.
1778         * configure.nat: Likewise.
1779         * riscv-fbsd-nat.c: New file.
1780
1781 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1782
1783         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
1784         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
1785         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
1786         * NEWS: Mention new FreeBSD/riscv target.
1787         * configure.tgt: Add riscv*-*-freebsd*.
1788         * riscv-fbsd-tdep.c: New file.
1789         * riscv-fbsd-tdep.h: New file.
1790
1791 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1792
1793         * regcache.h (struct regcache_map_entry): Note that this type can
1794         be used with traditional frame caches.
1795         * trad-frame.c (trad_frame_set_reg_regmap): New.
1796         * trad-frame.h (trad_frame_set_reg_regmap): New.
1797
1798 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1799
1800         PR c++/16841
1801         * valops.c (get_virtual_base_offset): New function.
1802         (value_struct_elt_for_reference): Use it to get virtual base offset
1803         and add it in calculating class member address.
1804
1805 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
1806
1807         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1808         (check_producer): Check if the producer is codewarrior.
1809         (producer_is_codewarrior): New function.
1810         (lnp_state_machine::record_line): Ignore is_stmt flag for records
1811         produced by codewarrior.
1812         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1813
1814 2018-10-06  Tom Tromey  <tom@tromey.com>
1815
1816         PR python/19399:
1817         * python/py-inferior.c: Add "architecture" entry.
1818         (infpy_architecture): New function.
1819
1820 2018-10-06  Tom Tromey  <tom@tromey.com>
1821
1822         PR python/21765:
1823         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1824         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1825         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
1826         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1827
1828 2018-10-06  Tom Tromey  <tom@tromey.com>
1829
1830         PR build/17077:
1831         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1832         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1833         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1834         #include.
1835
1836 2018-10-06  Tom Tromey  <tom@tromey.com>
1837
1838         * python/py-breakpoint.c (bppy_get_location): Handle a
1839         bp_breakpoint without a location.
1840
1841 2018-10-06  Tom Tromey  <tom@tromey.com>
1842
1843         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1844         (_RegEx): Reformat help text.
1845         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1846         (AnyCallerIs, AnyCallerMatches): Reformat help text.
1847         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1848         text.
1849         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1850         (EnableXMethod, DisableXMethod): Remove help indentation.
1851         Capitalize meta-syntactic variables.
1852         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1853         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1854         Capitalize meta-syntactic variables.
1855         * python/lib/gdb/command/explore.py (ExploreCommand)
1856         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1857         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1858         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1859         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1860         Remove help indentation.
1861         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1862         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1863         (DisableFrameFilter, SetFrameFilterPriority)
1864         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1865
1866 2018-10-06  Tom Tromey  <tom@tromey.com>
1867
1868         PR tui/28819:
1869         * tui/tui-io.c (gdb_wgetch): New function.
1870         (tui_mld_getc, tui_getc): Use it.
1871
1872 2018-10-05  Tom Tromey  <tom@tromey.com>
1873
1874         * sol-thread.c (sol_thread_target::wait): Rename inner
1875         "save_ptid".
1876
1877 2018-10-04  Tom Tromey  <tom@tromey.com>
1878
1879         * configure: Rebuild.
1880         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1881
1882 2018-10-04  Tom Tromey  <tom@tromey.com>
1883
1884         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1885         declaration of "block".
1886
1887 2018-10-04  Tom Tromey  <tom@tromey.com>
1888
1889         * common/filestuff.c (fdwalk): Remove inner declaration of
1890         "result".
1891
1892 2018-10-04  Tom Tromey  <tom@tromey.com>
1893
1894         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1895         "structs_addr" and hoist declaration.
1896
1897 2018-10-04  Tom Tromey  <tom@tromey.com>
1898
1899         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1900         variable "size".
1901
1902 2018-10-04  Tom Tromey  <tom@tromey.com>
1903
1904         * mdebugread.c (parse_partial_symbols): Use std::string.
1905
1906 2018-10-04  Tom Tromey  <tom@tromey.com>
1907
1908         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1909         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1910         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1911         header.
1912         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1913         more inner scope.
1914         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1915         * varobj.c (varobj_update): Rename inner "newobj",
1916         "type_changed".
1917         * valprint.c (generic_emit_char): Rename inner "buf".
1918         * valops.c (find_overload_match): Rename inner "temp".
1919         (value_struct_elt_for_reference): Declare "v" in more inner
1920         scope.
1921         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1922         * unittests/array-view-selftests.c (run_tests): Rename inner
1923         "vec".
1924         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1925         header.
1926         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1927         "tsv" in more inner scope.
1928         (print_one_static_tracepoint_marker): Rename inner
1929         "tuple_emitter".
1930         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1931         (tic6x_push_dummy_call): Don't redeclare "addr".
1932         * target-float.c: Declare "dto" lower.
1933         * symtab.c (lookup_local_symbol): Rename inner "sym".
1934         (find_pc_sect_line): Rename inner "pc".
1935         * stack.c (print_frame): Don't redeclare "gdbarch".
1936         (return_command): Rename inner "gdbarch".
1937         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1938         "sp".
1939         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1940         header.
1941         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1942         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1943         scope.
1944         * remote.c (remote_target::update_thread_list): Don't redeclare
1945         "tp".
1946         (remote_target::process_initial_stop_replies): Rename inner
1947         "thread".
1948         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1949         (remote_target::wait_as): Don't redeclare "stop_reply".
1950         (remote_target::get_thread_local_address): Rename inner
1951         "result".
1952         (remote_target::get_tib_address): Likewise.
1953
1954         * regcache.c (cooked_read_test): Rename "regnum".
1955         * record-btrace.c (cmd_record_btrace_start): Rename inner
1956         "exception".
1957         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1958         loop header.
1959         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1960         header.
1961         (ppu2spu_sniffer): Rename inner "buf".
1962         * parse.c (operator_check_standard): Rename inner "type",
1963         "objfile".
1964         * p-valprint.c (pascal_val_print): Introduce new scope for
1965         "low_bound", "high_bound".
1966         * p-exp.y (yylex): Declare "i" in loop header.
1967         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1968         Lower declaration of "s".
1969         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1970         header.
1971         (nios2_push_dummy_call): Rename "len".
1972         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1973         "buf".
1974         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1975         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1976         (linux_xfer_osdata_modules): Likewise.
1977         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1978         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1979         (mips_o64_push_dummy_call): Likewise.
1980         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1981         "op".
1982         * mi/mi-main.c (list_available_thread_groups): Rename inner
1983         "tuple_emitter".
1984         (mi_cmd_data_read_memory): Rename inner "opts".
1985         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1986         "tuple_emitter".
1987         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1988         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1989         more inner scope.
1990         (parse_partial_symbols): Rename inner "pst", "p", "name"
1991         * main.c (captured_main_1): Rename inner "i"s.
1992         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1993         "oso2".
1994         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1995         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1996         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1997         (handle_signal_stop): Rename inner "gdbarch".
1998         (handle_command): Declare "signum" in loop header.
1999         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2000         "status".
2001         (examine_prologue): Rename inner "sol" and "sof".
2002         (ia64_extract_return_value): Rename inner "val".  Declare another
2003         "val" in a more inner scope.
2004         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2005         inner scope.
2006         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2007         "except".
2008         * findvar.c (default_read_var_value): Don't redeclare "addr".
2009         * f-exp.y (yylex): Declare "i" in loop header.
2010         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2011         Rename inner "type", "expect_type".
2012         (evaluate_subexp_for_sizeof): Rename inner "pc".
2013         * elfread.c (elf_symfile_read): Rename inner "abfd".
2014         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2015         "bytes_read".
2016         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2017         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2018         (dwarf_decode_line_header): Rename inner "lh".
2019         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2020         "offset".  Declare "i" in loop header.
2021         (disassemble_dwarf_expression): Rename inner "addr_size".
2022         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2023         inner "result".
2024         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2025         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2026         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2027         "inner_list_emitter".
2028         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2029         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2030         declaration in a block.
2031         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2032         * cp-valprint.c (cp_print_value_fields): Don't redeclare
2033         "obstack_final_size".
2034         * cp-support.c (inspect_type): Declare "i" in loop header.
2035         * compile/compile.c (compile_instance::insert_symbol_error):
2036         Rename inner "e".
2037         * common/agent.c (agent_run_command): Remove inner "ret"
2038         declaration.
2039         * coffread.c (coff_symfile_read): Rename inner "name".
2040         (coff_symfile_read): Rename inner "abfd".
2041         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2042         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2043         "high".
2044         * c-exp.y (lex_one_token): Move "len" declaration lower.
2045         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2046         "gdbarch".
2047         (create_exception_master_breakpoint): Likewise.  Don't redeclare
2048         "b".
2049         (watch_command_1): Declare "mark" later.
2050         (clear_command): Don't shadow "a" or "b".
2051         (delete_command): Rename inner "b".
2052         (delete_trace_command): Likewise.
2053         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2054         "op".
2055         (arm_gdbarch_init): Remove inner "e_flags".
2056         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2057         "offset" in inner blocks.
2058
2059 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2060
2061         * dwarf-index-write.c (file_write): Don't write if the vector is
2062         empty.
2063
2064 2018-10-05  Tom de Vries  <tdevries@suse.de>
2065
2066         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2067         PyArg_ParseTuple call.
2068
2069 2018-10-05  Tom de Vries  <tdevries@suse.de>
2070
2071         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2072         PyArg_ParseTuple call.
2073
2074 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2075
2076         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2077         to avoid exceeding 80 characters per line limit.
2078
2079 2018-10-04  Tom Tromey  <tom@tromey.com>
2080
2081         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2082         (reread_symbols): Update.
2083         * complaints.h (clear_complaints): Remove argument.
2084         * complaints.c (enum complaint_series): Remove.
2085         (series): Remove global.
2086         (complaint_internal): Update.
2087         (clear_complaints): Remove argument.
2088
2089 2018-10-04  Tom Tromey  <tom@tromey.com>
2090
2091         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2092         debugging symbols" message if there is a separate debug objfile.
2093
2094 2018-10-04  Tom Tromey  <tom@tromey.com>
2095
2096         PR cli/19551:
2097         * symfile.c (symbol_file_add_with_addrs): Update output.
2098         * psymtab.c (require_partial_symbols): Update output.
2099
2100 2018-10-04  Tom Tromey  <tom@tromey.com>
2101
2102         PR cli/22234:
2103         * complaints.c: Emit \n.
2104
2105 2018-10-04  Tom Tromey  <tom@tromey.com>
2106
2107         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2108         (separate_debug_file_exists, find_separate_debug_file)
2109         (add_symbol_file_command, reread_symbols, allocate_symtab)
2110         (allocate_compunit_symtab): Use filtered printing, not
2111         unfiltered.
2112         * psymtab.c (require_partial_symbols, dump_psymtab)
2113         (allocate_psymtab): Use filtered printing, not unfiltered.
2114
2115 2018-10-04  Tom Tromey  <tom@tromey.com>
2116
2117         * complaints.c (complaint_internal): Correctly check complaint
2118         count.
2119
2120 2018-10-04  Tom Tromey  <tom@tromey.com>
2121
2122         * complaints.h (struct complaints): Remove declaration.
2123         * complaints.c (clear_complaints): Remove an unused variable.
2124
2125 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2126
2127         * MAINTAINERS (Write After Approval): Add self.
2128
2129 2018-10-03  Tom Tromey  <tom@tromey.com>
2130
2131         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2132         "buffer_contents".
2133         * coffread.c (coff_symtab_read): Initialize "newobj".
2134
2135 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2136
2137         * dwarf2read.c (read_func_scope): Remove struct keyword in
2138         range-based for.
2139
2140 2018-10-03  Tom Tromey  <tom@tromey.com>
2141
2142         * README: Mention --enable-ubsan.
2143         * NEWS: Mention --enable-ubsan.
2144         * acinclude.m4: Include sanitize.m4.
2145         * configure: Rebuild.
2146         * configure.ac: Call AM_GDB_UBSAN.
2147         * sanitize.m4: New file.
2148
2149 2018-10-03  Tom Tromey  <tom@tromey.com>
2150
2151         * expression.h (enum exp_opcode): Use uint8_t as base type.
2152         * expprint.c (op_name): Handle invalid opcodes.
2153
2154 2018-10-03  Tom Tromey  <tom@tromey.com>
2155
2156         * parse.c (prefixify_expression): Add assert.
2157         (parse_exp_in_context_1): Throw exception if the expression is
2158         empty.
2159
2160 2018-10-03  Tom Tromey  <tom@tromey.com>
2161
2162         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2163
2164 2018-10-03  Tom Tromey  <tom@tromey.com>
2165
2166         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2167
2168 2018-10-03  Tom Tromey  <tom@tromey.com>
2169
2170         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2171         unsigned.
2172
2173 2018-10-03  Tom Tromey  <tom@tromey.com>
2174
2175         * findvar.c (extract_integer): Do work in an unsigned type.
2176
2177 2018-10-03  Tom Tromey  <tom@tromey.com>
2178
2179         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2180         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2181         base type.
2182         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2183         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2184         type.
2185         * c-lang.h (enum c_string_type_values): Use unsigned as base
2186         type.
2187         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2188
2189 2018-10-03  Tom Tromey  <tom@tromey.com>
2190
2191         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2192         <~dwarf2_frame_state_reg_info>: Update.
2193         <dwarf2_frame_state_reg_info>: Update.
2194         <alloc_regs>: Add assertion.  Update.
2195         <reg>: Now a std::vector.
2196         <num_regs>: Remove.
2197         <swap>: Update.
2198         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2199         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2200
2201 2018-10-03  Tom Tromey  <tom@tromey.com>
2202
2203         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2204
2205 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2206
2207         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2208
2209 2018-10-02  Tom Tromey  <tom@tromey.com>
2210
2211         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2212
2213 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2214
2215         * NEWS: Mention changed commands.
2216         * ser-uds.c: New file.
2217         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2218         * configure: Regenerate.
2219         * Makefile.in: Add new file.
2220         * serial.c (serial_open): Check if filename is a socket
2221         and lookup the appropriate interface accordingly.
2222
2223 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2224
2225         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2226         define.
2227         (AARCH64_EXTRA_MAGIC): Likewise.
2228         (AARCH64_FPSIMD_MAGIC): Likewise.
2229         (AARCH64_SVE_MAGIC): Likewise.
2230         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2231         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2232         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2233         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2234         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2235         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2236         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2237         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2238         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2239         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2240         (read_aarch64_ctx): Add function.
2241         (aarch64_linux_sigframe_init): Detect FP registers.
2242
2243 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2244
2245         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2246         (AARCH64_D0_REGNUM): Likewise.
2247         (AARCH64_S0_REGNUM): Likewise.
2248         (AARCH64_H0_REGNUM): Likewise.
2249         (AARCH64_B0_REGNUM): Likewise.
2250         (AARCH64_SVE_V0_REGNUM): Likewise.
2251         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2252         (AARCH64_D0_REGNUM): Likewise.
2253         (AARCH64_S0_REGNUM): Likewise.
2254         (AARCH64_H0_REGNUM): Likewise.
2255         (AARCH64_B0_REGNUM): Likewise.
2256         (AARCH64_SVE_V0_REGNUM): Likewise.
2257
2258 2018-10-01  Gary Benson <gbenson@redhat.com>
2259
2260         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2261         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2262         prfpregset_t instead of gdb_prfpregset_t.
2263         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2264         * configure, config.in: Rebuild.
2265
2266 2018-10-01  Gary Benson <gbenson@redhat.com>
2267
2268         * common/gdb_proc_service.h: New file, factored out from...
2269         * gdb_proc_service.h: Moved common code to the above file.
2270         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2271
2272 2018-10-01  Gary Benson <gbenson@redhat.com>
2273
2274         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2275         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2276
2277 2018-10-01  Gary Benson <gbenson@redhat.com>
2278
2279         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2280         (AC_CHECK_HEADERS): Check for linux/elf.h.
2281         * configure, config.in: Rebuild.
2282         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2283         doesn't define elf_fpregset_t.
2284
2285 2018-10-01  Gary Benson <gbenson@redhat.com>
2286
2287         * gdb_proc_service.h: Whitespace change.
2288
2289 2018-10-01  Tom Tromey  <tom@tromey.com>
2290
2291         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2292         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2293         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2294
2295 2018-10-01  Tom Tromey  <tom@tromey.com>
2296
2297         * README: Minor change.
2298
2299 2018-09-30  Pedro Alves  <palves@redhat.com>
2300
2301         * darwin-nat-info.c (darwin_debug_regions_recurse)
2302         (info_mach_exceptions_command): Remove unused local variables.
2303         * darwin-nat.c (darwin_decode_notify_message)
2304         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2305         (darwin_stop_inferior, darwin_setup_exceptions)
2306         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2307         (darwin_nat_target::attach, darwin_nat_target::detach)
2308         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2309         local variables.
2310         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2311         variables.
2312
2313 2018-09-29  Tom Tromey  <tom@tromey.com>
2314
2315         * README: Remove some leftover text.
2316
2317 2018-09-29  Tom Tromey  <tom@tromey.com>
2318
2319         * PROBLEMS: Rewrite.
2320         * README: Update.
2321
2322 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2323
2324         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2325         case with explicit breakpoint kind.
2326         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2327         'additional_info' and related logic.
2328         (riscv_debug_breakpoints): New variable.
2329         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2330         instruction to determine the breakpoint kind.
2331         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2332         flag.  Update description of 'set/show riscv
2333         use-compressed-breakpoints' flag.
2334
2335 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2336
2337         (NEWS): Mention changes to frame related commands.
2338         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2339         (add_prefix_cmd_suppress_notification): New function.
2340         (add_com_suppress_notification): Call
2341         add_cmd_suppress_notification.
2342         * command.h (add_cmd_suppress_notification): Declare.
2343         (add_prefix_cmd_suppress_notification): Declare.
2344         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2345         (parse_frame_specification): Moved from stack.c, with
2346         simplification to handle a single argument.
2347         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2348         switch to the selected frame.  Add a header comment.
2349         * stack.c: Remove 'safe-ctype.h' include.
2350         (find_frame_for_function): Add declaration.
2351         (find_frame_for_address): New function.
2352         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2353         (frame_selection_by_function_completer): New function.
2354         (info_frame_command): Rename to...
2355         (info_frame_command_core): ...this, and update parameter types.
2356         (select_frame_command): Rename to...
2357         (select_frame_command_core): ...this, and update parameter types.
2358         (frame_command): Rename to...
2359         (frame_command_core): ...this, and update parameter types.
2360         (class frame_command_helper): New class to wrap implementations of
2361         frame related sub-commands.
2362         (frame_apply_cmd_list): New static global.
2363         (frame_cmd_list): Make static.
2364         (select_frame_cmd_list): New global for sub-commands.
2365         (info_frame_cmd_list): New global for sub-commands.
2366         (_initialize_stack): Register sub-commands for 'frame',
2367         'select-frame', and 'info frame'.  Update 'frame apply' commands
2368         to use frame_apply_cmd_list.  Move function local static
2369         frame_apply_list to file static frame_apply_cmd_list for
2370         consistency.
2371         * stack.h (select_frame_command): Delete declarationn.
2372         (select_frame_for_mi): Declare new function.
2373
2374 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2375
2376         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2377         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2378         and NOP.
2379
2380 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2381
2382         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2383
2384 2018-09-26  Tom Tromey  <tom@tromey.com>
2385
2386         * valops.c (auto_abandon): Remove dead code.
2387
2388 2018-09-26  Tom Tromey  <tom@tromey.com>
2389
2390         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2391
2392 2018-09-24  Tom Tromey  <tom@tromey.com>
2393
2394         * common/pathstuff.c (get_standard_cache_dir): Make
2395         "xdg_cache_home" and "home" const.
2396         * top.c (init_history): Make "tmpenv" const.
2397         * main.c (get_init_files): Make "homedir" const.
2398
2399 2018-09-23  Tom Tromey  <tom@tromey.com>
2400
2401         PR python/18852:
2402         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2403
2404 2018-09-23  Tom Tromey  <tom@tromey.com>
2405
2406         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2407         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2408         * python/python-internal.h (gdbpy_handle_exception): Declare.
2409         * python/py-utils.c (gdbpy_handle_exception): New function.
2410
2411 2018-09-23  Tom Tromey  <tom@tromey.com>
2412
2413         PR python/17284:
2414         * python/py-type.c (typy_template_argument): Check for negative
2415         argument number.
2416
2417 2018-09-23  Tom Tromey  <tom@tromey.com>
2418
2419         PR python/14062:
2420         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2421
2422 2018-09-23  Tom Tromey  <tom@tromey.com>
2423
2424         PR python/18170:
2425         * python/py-value.c (valpy_int): Allow conversion from pointer
2426         type.
2427
2428 2018-09-23  Tom Tromey  <tom@tromey.com>
2429
2430         PR python/20126:
2431         * python/py-value.c (valpy_int): Respect type sign.
2432
2433 2018-09-23  Tom Tromey  <tom@tromey.com>
2434
2435         PR python/18352;
2436         * python/py-value.c (valpy_float): Allow conversions from int or
2437         char.
2438         (valpy_int, valpy_long): Allow conversions from float.
2439
2440 2018-09-23  Tom Tromey  <tom@tromey.com>
2441
2442         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2443         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2444
2445 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2446
2447         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2448         __sighndlr.
2449         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2450
2451 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2452
2453         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2454         target_terminal::ours().
2455
2456 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2457
2458         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2459         of vl to ULONGEST.
2460
2461 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2462
2463         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2464         redundant condition.
2465
2466 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2467
2468         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2469
2470         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2471         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2472         * sol-thread.c (ps_pdmodel): Don't guard definition.
2473
2474         * procfs.c: Fix formatting.
2475
2476         * procfs.c (sysset_t_alloc): Remove.
2477         (create_procinfo): Use XNEW instead of sysset_t_alloc.
2478         (procfs_debug_inferior): Likewise.
2479         (procfs_set_exec_trap): Likewise.
2480         (proc_set_traced_sysentry): Don't allocate argp dynamically.
2481         (proc_set_traced_sysexit): Likewise.
2482
2483         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2484         (dead_procinfo): Likewise.
2485         (proc_warn): Likewise.
2486         (proc_error): Likewise.
2487         (proc_get_LDT_entry): Likewise.
2488         (do_attach): Likewise.
2489         (procfs_target::pid_to_str): Likewise.
2490         (iterate_over_mappings): Likewise.
2491
2492         * procfs.c (create_procinfo): Fix ARI warning.
2493         (proc_get_status): Likewise.
2494         (proc_stop_process): Likewise.
2495         (proc_run_process): Likewise.
2496         (proc_kill): Likewise.
2497         (proc_get_LDT_entry): Likewise.
2498         (procfs_find_LDT_entry): Likewise.
2499         (proc_update_threads): Likewise.
2500         (proc_iterate_over_threads): Likewise.
2501         (do_attach): Likewise.
2502         (procfs_xfer_memory): Likewise.
2503         (invalidate_cache): Likewise.
2504         (procfs_target::resume): Likewise.
2505         (procfs_init_inferior): Likewise.
2506         (procfs_set_exec_trap): Likewise.
2507         (procfs_target::thread_alive): Likewise.
2508         (procfs_target::pid_to_exec_file): Likewise.
2509         (iterate_over_mappings): Likewise.
2510         (procfs_target::make_corefile_notes): Likewise.
2511         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2512
2513         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
2514         (procfs_find_LDT_entry): Likewise.
2515         * sol-thread.c (ps_lgetLDT): Likewise.
2516
2517 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2518
2519         PR tdep/17903
2520         * procfs.c (procfs_target): Declare pid_to_exec_file.
2521         (procfs_target::pid_to_exec_file): New.
2522
2523 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2524
2525         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
2526         renaming.
2527         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
2528         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
2529
2530 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2531
2532         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
2533         (supply_fpregset, fill_fpregset): Move ...
2534         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
2535         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
2536         Remove references to ioctl-based procfs.
2537         Include <sys/reg.h>.
2538         Remove PR_MODEL_NATIVE guards.
2539         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
2540         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
2541
2542 2018-09-19  Xavier Roirand  <roirand@adacore.com>
2543
2544         PR gdb/20981:
2545         * solib-darwin.c (darwin_get_dyld_bfd): New function.
2546         (darwin_solib_get_all_image_info_addr_at_init): Update call.
2547         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
2548
2549 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
2550
2551         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
2552         (fbsd_print_sockaddr_in6): Likewise.
2553
2554 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
2555             Chris January  <chris.january@arm.com>
2556
2557         * eval.c (skip_undetermined_arglist): Skip argument list helper.
2558         (evaluate_subexp_standard): Return a dummy type when
2559         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
2560         OP_F77_UNDETERMINED_ARGLIST case.
2561         * expression.h (enum noside): Update comment.
2562
2563 2018-09-19  George Vasick <george.vasick@oracle.com>
2564
2565         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
2566
2567 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
2568             April Chin <april.chin@oracle.com>
2569             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2570
2571         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
2572         uint_t lwpid_t.
2573         (create_procinfo): Print pids in /proc without leading zeros.
2574
2575 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
2576
2577         * nios2-tdep.c (nios2_gcc_target_options): New.
2578         (nios2_gdb_arch_init): Install new hook.
2579
2580 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2581
2582         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
2583         New file.
2584         * update-gnulib.sh: Apply patch.
2585         * configure: Re-generate.
2586
2587 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2588
2589         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
2590         description.  Make "info proc" command descriptions more
2591         consistent.
2592
2593 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2594
2595         * NEWS: Mention 'info proc files' command.
2596
2597 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2598
2599         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
2600         descriptors for IP_FILES and IP_ALL.
2601
2602 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2603
2604         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
2605         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
2606         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
2607         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
2608         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
2609         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
2610         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
2611         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
2612         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
2613         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
2614         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
2615         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
2616         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
2617         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
2618         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
2619         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
2620         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
2621         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
2622         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
2623         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
2624         (struct fbsd_sockaddr_un): New types.
2625         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
2626         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
2627         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
2628         (fbsd_core_info_proc_files): New functions.
2629         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
2630         IP_ALL.
2631         * fbsd-tdep.h (fbsd_info_proc_files_header)
2632         (fbsd_info_proc_files_entry): New.
2633
2634 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2635
2636         * defs.h (enum info_proc_what) [IP_FILES]: New value.
2637         * infcmd.c (info_proc_cmd_files): New function.
2638         (_initialize_infcmd): Register 'info proc files' command.
2639
2640 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2641
2642         * gnulib/aclocal-m4-deps.mk: Re-generate.
2643         * gnulib/aclocal.m4: Re-generate.
2644         * gnulib/config.in: Re-generate.
2645         * gnulib/configure: Re-generate.
2646         * gnulib/import/Makefile.am: Re-generate.
2647         * gnulib/import/Makefile.in: Re-generate.
2648         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2649         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2650         * gnulib/import/arpa_inet.in.h: New file.
2651         * gnulib/import/inet_ntop.c: New file.
2652         * gnulib/import/m4/arpa_inet_h.m4: New file.
2653         * gnulib/import/m4/inet_ntop.m4: New file.
2654         * gnulib/import/m4/netinet_in_h.m4: New file.
2655         * gnulib/import/m4/socklen.m4: New file.
2656         * gnulib/import/m4/sockpfaf.m4: New file.
2657         * gnulib/import/m4/stdalign.m4: New file.
2658         * gnulib/import/m4/sys_uio_h.m4: New file.
2659         * gnulib/import/netinet_in.in.h: New file.
2660         * gnulib/import/stdalign.in.h: New file.
2661         * gnulib/import/sys_socket.c: New file.
2662         * gnulib/import/sys_socket.in.h: New file.
2663         * gnulib/import/sys_uio.in.h: New file.
2664         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
2665         module.
2666
2667 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2668
2669         * gnulib/aclocal-m4-deps.mk: New file.
2670         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
2671         deterministically.
2672
2673 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2674
2675         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
2676         KVE_PATH.
2677
2678 2018-09-18  Tom Tromey  <tom@tromey.com>
2679
2680         * compile/compile-object-load.c (struct
2681         link_hash_table_cleanup_data): Add constructor and destructor.
2682         Use DISABLE_COPY_AND_ASSIGN.
2683         (~link_hash_table_cleanup_data): Rename from
2684         link_hash_table_free.  Now a destructor.
2685         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
2686
2687 2018-09-18  Tom Tromey  <tom@tromey.com>
2688
2689         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2690         * compile/compile-object-load.c (struct munmap_list): Move to
2691         header file.
2692         (munmap_list::add): Rename from munmap_list_add; rewrite.
2693         (munmap_list::~munmap_list): Rename from munmap_list_free.
2694         (munmap_listp_free_cleanup): Remove.
2695         (compile_object_load): Update.
2696         * compile/compile-object-load.h (struct munmap_list): Move from
2697         compile-object-load.c.  Rewrite.
2698
2699 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
2700
2701         * aarch64-tdep.c (pass_in_v): Use register size.
2702         (aarch64_extract_return_value): Likewise.
2703         (aarch64_store_return_value): Likewise.
2704
2705 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2706
2707         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
2708         rlim_t.
2709
2710 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2711
2712         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
2713         Fix short help line.
2714
2715 2018-09-17  Tom Tromey  <tom@tromey.com>
2716
2717         PR python/20445:
2718         * configure: Rebuild.
2719         * configure.ac: Conditionally use -DNDEBUG for Python.
2720
2721 2018-09-17  Tom Tromey  <tom@tromey.com>
2722
2723         * configure: Rebuild.
2724         * configure.ac: Use gmp as a library dependency when checking for
2725         mpfr.
2726
2727 2018-09-17  Pedro Alves  <palves@redhat.com>
2728
2729         * python/py-inferior.c (find_inferior_object): Delete.
2730
2731 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
2732
2733         * compile/compile-cplus-types.c
2734         (compile_cplus_instance::enter_scope): Don't use new_scope after
2735         std::move.
2736
2737 2018-09-17  Tom Tromey  <tom@tromey.com>
2738
2739         * common/pathstuff.c (get_standard_cache_dir): Use
2740         ~/Library/Caches on macOS.
2741         * common/pathstuff.h (get_standard_cache_dir): Update comment.
2742
2743 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
2744
2745         PR python/23669
2746         * breakpoint.c (commands_cmd_element): New.
2747         (_initialize_breakpoint): Assign commands_cmd_element.
2748         * breakpoint.h (commands_cmd_element): New.
2749         * cli/cli-script.c (while_cmd_element, if_command,
2750         define_cmd_element): New.
2751         (command_name_equals): Remove.
2752         (process_next_line): Compare commands by pointer, not by name.
2753         (_initialize_cli_script): Assign the various cmd_list_element
2754         variables.
2755         * compile/compile.c (compile_cmd_element): New.
2756         (_initialize_compile): Assign compile_cmd_element.
2757         * compile/compile.h (compile_cmd_element): New.
2758         * guile/guile.c (guile_cmd_element): New.
2759         (install_gdb_commands): Assign guile_cmd_element.
2760         * guile/guile.h (guile_cmd_element): New.
2761         * python/python.c (python_cmd_element): New.
2762         (_initialize_python): Assign python_cmd_element.
2763         * python/python.h (python_cmd_element): New.
2764         * tracepoint.c (while_stepping_cmd_element): New.
2765         (_initialize_tracepoint): Assign while_stepping_cmd_element.
2766         * tracepoint.h (while_stepping_cmd_element): New.
2767
2768 2018-09-17  Tom Tromey  <tom@tromey.com>
2769
2770         * infrun.c (save_infcall_suspend_state): Return
2771         infcall_suspend_state_up.
2772         (save_infcall_control_state): Return infcall_control_state_up.
2773         * inferior.h (save_infcall_suspend_state)
2774         (save_infcall_control_state): Declare later.  Return unique
2775         pointers.
2776
2777 2018-09-17  Tom Tromey  <tom@tromey.com>
2778
2779         * infrun.c (struct stop_context): Declare constructor,
2780         destructor, "changed" method.
2781         (stop_context::stop_context): Rename from save_stop_context.
2782         (stop_context::~stop_context): Rename from
2783         release_stop_context_cleanup.
2784         (normal_stop): Update.
2785         (stop_context::changed): Rename from stop_context_changed.  Return
2786         bool.
2787
2788 2018-09-17  Tom Tromey  <tom@tromey.com>
2789
2790         * inferior.h (struct infcall_suspend_state_deleter): New.
2791         (infcall_suspend_state_up): New typedef.
2792         (struct infcall_control_state_deleter): New.
2793         (infcall_control_state_up): New typedef.
2794         (make_cleanup_restore_infcall_suspend_state)
2795         (make_cleanup_restore_infcall_control_state): Don't declare.
2796         * infcall.c (call_function_by_hand_dummy): Update.
2797         * infrun.c (do_restore_infcall_suspend_state_cleanup)
2798         (make_cleanup_restore_infcall_suspend_state): Remove.
2799         (do_restore_infcall_control_state_cleanup)
2800         (make_cleanup_restore_infcall_control_state): Remove.
2801
2802 2018-09-17  Tom Tromey  <tom@tromey.com>
2803
2804         * gdbthread.h (struct thread_control_state): Add initializer.
2805         (class thread_info) <control>: Remove initializer.
2806         * inferior.h (struct inferior_control_state): Add initializer.
2807         (class inferior) <control>: Remove initializer.
2808         (exit_inferior_1): Update.
2809         * infrun.c (struct infcall_control_state): Add constructors.
2810         (save_infcall_control_state): Use new.
2811         (restore_infcall_control_state, discard_infcall_control_state):
2812         Use delete.
2813
2814 2018-09-17  Tom Tromey  <tom@tromey.com>
2815
2816         * infrun.c (struct infcall_suspend_state) <registers>: Now a
2817         unique_ptr.
2818         <siginfo_data>: Now a unique_xmalloc_ptr.
2819         (save_infcall_suspend_state, restore_infcall_suspend_state)
2820         (discard_infcall_suspend_state)
2821         (get_infcall_suspend_state_regcache): Update.
2822
2823 2018-09-17  Tom Tromey  <tom@tromey.com>
2824
2825         * gdbthread.h (struct thread_suspend_state): Add initializers.
2826         (class thread_info) <suspend>: Remove initializer.
2827         * infrun.c (struct infcall_suspend_state): Add initializers.
2828         (save_infcall_suspend_state): Use new.
2829         (discard_infcall_suspend_state): Use delete.
2830
2831 2018-09-16  Tom Tromey  <tom@tromey.com>
2832
2833         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2834         Remove.
2835         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2836         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2837         (py_varobj_iter_new): Likewise.
2838         (py_varobj_get_iterator): Use gdbpy_ref.
2839
2840 2018-09-16  Tom Tromey  <tom@tromey.com>
2841
2842         * python/py-threadevent.c (py_get_event_thread): Simplify.
2843         * python/py-inferior.c (infpy_thread_from_thread_handle):
2844         Return immediately after calling thread_to_thread_object.  Use
2845         Py_RETURN_NONE.
2846         (thread_to_thread_object): Set the exception on a NULL return.
2847
2848 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2849
2850         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2851
2852 2018-09-16  Tom Tromey  <tom@tromey.com>
2853
2854         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2855         Remove.
2856
2857 2018-09-16  Tom Tromey  <tom@tromey.com>
2858
2859         * python/python-internal.h (thread_to_thread_object): Change
2860         return type.
2861         * python/py-inferior.c (thread_to_thread_object): Return a new
2862         reference.
2863         (infpy_thread_from_thread_handle): Update.
2864         * python/py-infthread.c (gdbpy_selected_thread): Update.
2865         * python/py-stopevent.c (create_stop_event_object): Update.
2866         * python/py-threadevent.c (py_get_event_thread): Return a new
2867         reference.
2868         (py_get_event_thread): Update.
2869         * python/py-event.h (py_get_event_thread): Change return type.
2870         * python/py-continueevent.c (create_continue_event_object):
2871         Update.
2872
2873 2018-09-16  Tom Tromey  <tom@tromey.com>
2874
2875         * python/py-progspace.c (pspy_get_objfiles): Update.
2876         * python/python-internal.h (objfile_to_objfile_object): Change
2877         return type.
2878         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2879         Update.
2880         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2881         Update.
2882         * python/python.c (gdbpy_get_current_objfile): Update.
2883         (gdbpy_objfiles): Update.
2884         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2885         Update.
2886         (objfile_to_objfile_object): Return a new reference.
2887         * python/py-symtab.c (stpy_get_objfile): Update.
2888         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2889         Update.
2890
2891 2018-09-16  Tom Tromey  <tom@tromey.com>
2892
2893         * python/py-inferior.c (infpy_get_progspace): Update.
2894         * python/python-internal.h (pspace_to_pspace_object): Change
2895         return type.
2896         * python/py-newobjfileevent.c
2897         (create_clear_objfiles_event_object): Update.
2898         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2899         Update.
2900         * python/python.c (gdbpy_get_current_progspace): Update.
2901         (gdbpy_progspaces): Update.
2902         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2903         reference.
2904         * python/py-objfile.c (objfpy_get_progspace): Update.
2905         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2906         Update.
2907
2908 2018-09-16  Tom Tromey  <tom@tromey.com>
2909
2910         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2911         (solib_name, block_for_pc, find_pc_line): New functions.
2912         (execute_unwinders): Update.
2913         * python/py-block.c (gdbpy_block_for_pc): Remove.
2914         * python/py-inferior.c (infpy_get_progspace): New function.
2915         (inferior_object_getset) <progspace>: Add.
2916         * python/py-progspace.c (pspy_objfiles): Rewrite.
2917         (pspy_solib_name, pspy_block_for_pc)
2918         (pspy_find_pc_line, pspy_is_valid): New functions.
2919         (progspace_object_methods): Add entries for solib_name,
2920         block_for_pc, find_pc_line, is_valid.
2921         * python/python-internal.h (gdbpy_block_for_pc)
2922         (build_objfiles_list): Don't declare.
2923         * python/python.c: Don't include solib.h.
2924         (gdbpy_solib_name, gdbpy_find_pc_line)
2925         (gdbpy_get_current_progspace, build_objfiles_list)
2926         (gdbpy_objfiles): Remove.
2927         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2928         solib_name, find_pc_line>: Remove entries.
2929
2930 2018-09-16  Tom Tromey  <tom@tromey.com>
2931
2932         * top.c (new_ui_command): Use GNU style for metasyntactic
2933         variables.
2934         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2935         variables.
2936         * maint.c (maintenance_translate_address): Remove "<>" around
2937         text.
2938         * interps.c (interpreter_exec_cmd): Use GNU style for
2939         metasyntactic variables.
2940         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2941         metasyntactic variables.
2942         * tracepoint.c (tfind_range_command): Use GNU style for
2943         metasyntactic variables.
2944         (tfind_outside_command): Likewise.
2945         (_initialize_tracepoint): Likewise.
2946         * remote.c (extended_remote_target::create_inferior): Use GNU
2947         style for metasyntactic variables.
2948         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2949         metasyntactic variables.
2950         (adi_assign_command): Likewise.
2951
2952 2018-09-16  Tom Tromey  <tom@tromey.com>
2953
2954         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2955         metasyntactic variables.  Print message if no disassembler options
2956         are available.
2957
2958 2018-09-15  Tom Tromey  <tom@tromey.com>
2959
2960         * infcmd.c (get_inferior_args): Return const char *.
2961         * inferior.h (get_inferior_args): Return type now const.
2962         * linux-tdep.c (linux_fill_prpsinfo): Update.
2963         * procfs.c (procfs_target::make_corefile_notes): Update.
2964
2965 2018-09-07  Tom Tromey  <tom@tromey.com>
2966
2967         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2968         inside the TRY.
2969
2970 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2971
2972         * nios2-tdep.c (nios2_type_align): New.
2973         (nios2_gdb_arch_init): Install type_align hook.
2974
2975 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2976
2977         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2978         type that is neither object file owned, nor gdbarch owned.
2979         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2980         gdbarch is non-NULL.
2981         (alloc_type_instance): Allocate non-objfile owned types on the
2982         gdbarch obstack.
2983         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2984         using TYPE_ALLOC to ensure memory is allocated on the correct
2985         obstack.
2986         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2987         obstack, or the gdbarch obstack.
2988         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2989
2990 2018-09-14  Tom Tromey  <tom@tromey.com>
2991
2992         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2993         block.
2994
2995 2018-09-14  Tom Tromey  <tom@tromey.com>
2996
2997         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2998
2999 2018-09-13  Tom Tromey  <tom@tromey.com>
3000
3001         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3002         static.
3003
3004 2018-09-13  Tom Tromey  <tom@tromey.com>
3005
3006         * exec.c (try_open_exec_file): Use std::string.
3007
3008 2018-09-13  Tom Tromey  <tom@tromey.com>
3009
3010         * utils.h (gdb_bfd_errmsg): Return std::string.
3011         * exec.c (exec_file_attach): Update.
3012         * compile/compile-object-load.c (compile_object_load): Update.
3013         * utils.c (gdb_bfd_errmsg): Return std::string.
3014
3015 2018-09-13  Tom Tromey  <tom@tromey.com>
3016
3017         * procfs.c (struct procinfo_deleter): New.
3018         (procinfo_up): New typedef.
3019         (do_destroy_procinfo_cleanup): Remove.
3020         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
3021
3022 2018-09-13  Tom Tromey  <tom@tromey.com>
3023
3024         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3025
3026 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3027 2018-09-13  Tom Tromey  <tom@tromey.com>
3028
3029         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3030         (pspy_get_objfiles): New function.
3031         (progspace_object_methods): New.
3032         (pspace_object_type): Add tp_methods callback.
3033         * python/python-internal.h (build_objfiles_list): New
3034         declaration.
3035         * python/python.c (build_objfiles_list): New function.
3036         (gdbpy_objfiles): Implement using build_objfiles_list.
3037         * NEWS: Mention the Progspace.objfiles method.
3038
3039 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3040
3041         * python/py-inferior.c (infpy_get_progspace): New function.
3042         (inferior_object_getset): Add progspace property.
3043         * NEWS: Mention the new property.
3044
3045 2018-09-13  Tom Tromey  <tom@tromey.com>
3046
3047         PR rust/23650:
3048         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3049
3050 2018-09-13  Tom Tromey  <tom@tromey.com>
3051
3052         PR rust/23626:
3053         * rust-lang.c (rust_enum_variant): Now static.
3054         (rust_empty_enum_p): New function.
3055         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3056         Handle empty enum.
3057
3058 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3059
3060         * python/py-inferior.c (infpy_repr): New.
3061         (inferior_object_type): Register infpy_repr.
3062         * python/py-objfile.c (objfpy_repr): New.
3063         (objfile_object_type): Register objfpy_repr.
3064
3065 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3066
3067         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3068
3069 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3070
3071         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3072         typo.
3073
3074 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3075
3076         * common/common-utils.c: Don't include '<sys/stat.h>'.
3077         (is_regular_file): Move to...
3078         * common/filestuff.c (is_regular_file): ... here.
3079         * common/common-utils.h (is_regular_file): Move to...
3080         * common/filestuff.h (is_regular_file): ... here.
3081
3082 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3083
3084         * skip.c (debug_skip): New variable.
3085         (skiplist_entry::do_skip_file_p): Add debug output.
3086         (skiplist_entry::do_skip_gfile_p): Likewise.
3087         (skiplist_entry::skip_function_p): Likewise.
3088         (_initialize_step_skip): Create debug command.
3089         * NEWS: Mention set/show debug skip.
3090
3091 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3092
3093         * darwin-nat.c (should_disable_startup_with_shell):
3094         New function.
3095         (darwin_nat_target::create_inferior): Add call.
3096
3097 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3098
3099         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3100         inf_port, msg_state>: Initialize.
3101         (struct darwin_thread_info) <signaled, single_step>: Change
3102         type and initialize.
3103         (struct darwin_thread_info) <event>: Initialize.
3104
3105 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3106
3107         PR gdb/23555
3108         PR gdb/23558
3109         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3110         guesses.
3111
3112 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3113
3114         Revert:
3115         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3116
3117         PR gdb/23555
3118         PR gdb/23558
3119         * gnulib/aclocal.m4: Regenerate.
3120         * gnulib/config.in: Regenerate.
3121         * gnulib/configure: Regenerate.
3122         * gnulib/import/Makefile.am: Update.
3123         * gnulib/import/Makefile.in: Update.
3124         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3125         * gnulib/import/_Noreturn.h: ... this.
3126         * gnulib/import/alloca.in.h: Update.
3127         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3128         * gnulib/import/arg-nonnull.h: ... this.
3129         * gnulib/import/assure.h: Update.
3130         * gnulib/import/at-func.c: Update.
3131         * gnulib/import/basename-lgpl.c: Update.
3132         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3133         * gnulib/import/c++defs.h: ... this.
3134         * gnulib/import/canonicalize-lgpl.c: Update.
3135         * gnulib/import/cdefs.h: Update.
3136         * gnulib/import/chdir-long.c: Update.
3137         * gnulib/import/chdir-long.h: Update.
3138         * gnulib/import/cloexec.c: Update.
3139         * gnulib/import/cloexec.h: Update.
3140         * gnulib/import/close.c: Update.
3141         * gnulib/import/closedir.c: Update.
3142         * gnulib/import/config.charset: Update.
3143         * gnulib/import/dirent-private.h: Update.
3144         * gnulib/import/dirent.in.h: Update.
3145         * gnulib/import/dirfd.c: Update.
3146         * gnulib/import/dirname-lgpl.c: Update.
3147         * gnulib/import/dirname.h: Update.
3148         * gnulib/import/dosname.h: Update.
3149         * gnulib/import/dup-safer-flag.c: Update.
3150         * gnulib/import/dup-safer.c: Update.
3151         * gnulib/import/dup.c: Update.
3152         * gnulib/import/dup2.c: Update.
3153         * gnulib/import/errno.in.h: Update.
3154         * gnulib/import/error.c: Update.
3155         * gnulib/import/error.h: Update.
3156         * gnulib/import/exitfail.c: Update.
3157         * gnulib/import/exitfail.h: Update.
3158         * gnulib/import/extra/update-copyright: Update.
3159         * gnulib/import/fchdir.c: Update.
3160         * gnulib/import/fcntl.c: Update.
3161         * gnulib/import/fcntl.in.h: Update.
3162         * gnulib/import/fd-hook.c: Update.
3163         * gnulib/import/fd-hook.h: Update.
3164         * gnulib/import/fd-safer-flag.c: Update.
3165         * gnulib/import/fd-safer.c: Update.
3166         * gnulib/import/fdopendir.c: Update.
3167         * gnulib/import/filename.h: Update.
3168         * gnulib/import/filenamecat-lgpl.c: Update.
3169         * gnulib/import/filenamecat.h: Update.
3170         * gnulib/import/flexmember.h: Update.
3171         * gnulib/import/float+.h: Update.
3172         * gnulib/import/float.c: Update.
3173         * gnulib/import/float.in.h: Update.
3174         * gnulib/import/fnmatch.c: Update.
3175         * gnulib/import/fnmatch.in.h: Update.
3176         * gnulib/import/fnmatch_loop.c: Update.
3177         * gnulib/import/fpucw.h: Update.
3178         * gnulib/import/frexp.c: Update.
3179         * gnulib/import/frexpl.c: Update.
3180         * gnulib/import/fstat.c: Update.
3181         * gnulib/import/fstatat.c: Update.
3182         * gnulib/import/getcwd-lgpl.c: Update.
3183         * gnulib/import/getcwd.c: Update.
3184         * gnulib/import/getdtablesize.c: Update.
3185         * gnulib/import/getlogin_r.c: Update.
3186         * gnulib/import/getprogname.c: Update.
3187         * gnulib/import/getprogname.h: Update.
3188         * gnulib/import/gettext.h: Update.
3189         * gnulib/import/gettimeofday.c: Update.
3190         * gnulib/import/glob-libc.h: Update.
3191         * gnulib/import/glob.c: Update.
3192         * gnulib/import/glob.in.h: Update.
3193         * gnulib/import/glob_internal.h: Update.
3194         * gnulib/import/glob_pattern_p.c: Update.
3195         * gnulib/import/globfree.c: Update.
3196         * gnulib/import/hard-locale.c: Update.
3197         * gnulib/import/hard-locale.h: Update.
3198         * gnulib/import/intprops.h: Update.
3199         * gnulib/import/inttypes.in.h: Update.
3200         * gnulib/import/isnan.c: Update.
3201         * gnulib/import/isnand-nolibm.h: Update.
3202         * gnulib/import/isnand.c: Update.
3203         * gnulib/import/isnanl-nolibm.h: Update.
3204         * gnulib/import/isnanl.c: Update.
3205         * gnulib/import/itold.c: Update.
3206         * gnulib/import/libc-config.h: Update.
3207         * gnulib/import/limits.in.h: Update.
3208         * gnulib/import/localcharset.c: Update.
3209         * gnulib/import/localcharset.h: Update.
3210         * gnulib/import/localtime-buffer.c: Update.
3211         * gnulib/import/localtime-buffer.h: Update.
3212         * gnulib/import/lstat.c: Update.
3213         * gnulib/import/m4/00gnulib.m4: Update.
3214         * gnulib/import/m4/__inline.m4: Update.
3215         * gnulib/import/m4/absolute-header.m4: Update.
3216         * gnulib/import/m4/alloca.m4: Update.
3217         * gnulib/import/m4/builtin-expect.m4: Update.
3218         * gnulib/import/m4/canonicalize.m4: Update.
3219         * gnulib/import/m4/chdir-long.m4: Update.
3220         * gnulib/import/m4/close.m4: Update.
3221         * gnulib/import/m4/closedir.m4: Update.
3222         * gnulib/import/m4/configmake.m4: Update.
3223         * gnulib/import/m4/d-ino.m4: Update.
3224         * gnulib/import/m4/d-type.m4: Update.
3225         * gnulib/import/m4/dirent_h.m4: Update.
3226         * gnulib/import/m4/dirfd.m4: Update.
3227         * gnulib/import/m4/dirname.m4: Update.
3228         * gnulib/import/m4/double-slash-root.m4: Update.
3229         * gnulib/import/m4/dup.m4: Update.
3230         * gnulib/import/m4/dup2.m4: Update.
3231         * gnulib/import/m4/eealloc.m4: Update.
3232         * gnulib/import/m4/environ.m4: Update.
3233         * gnulib/import/m4/errno_h.m4: Update.
3234         * gnulib/import/m4/error.m4: Update.
3235         * gnulib/import/m4/exponentd.m4: Update.
3236         * gnulib/import/m4/exponentl.m4: Update.
3237         * gnulib/import/m4/extensions.m4: Update.
3238         * gnulib/import/m4/extern-inline.m4: Update.
3239         * gnulib/import/m4/fchdir.m4: Update.
3240         * gnulib/import/m4/fcntl-o.m4: Update.
3241         * gnulib/import/m4/fcntl.m4: Update.
3242         * gnulib/import/m4/fcntl_h.m4: Update.
3243         * gnulib/import/m4/fdopendir.m4: Update.
3244         * gnulib/import/m4/filenamecat.m4: Update.
3245         * gnulib/import/m4/flexmember.m4: Update.
3246         * gnulib/import/m4/float_h.m4: Update.
3247         * gnulib/import/m4/fnmatch.m4: Update.
3248         * gnulib/import/m4/fnmatch_h.m4: Update.
3249         * gnulib/import/m4/fpieee.m4: Update.
3250         * gnulib/import/m4/frexp.m4: Update.
3251         * gnulib/import/m4/frexpl.m4: Update.
3252         * gnulib/import/m4/fstat.m4: Update.
3253         * gnulib/import/m4/fstatat.m4: Update.
3254         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3255         * gnulib/import/m4/getcwd-path-max.m4: Update.
3256         * gnulib/import/m4/getcwd.m4: Update.
3257         * gnulib/import/m4/getdtablesize.m4: Update.
3258         * gnulib/import/m4/getlogin.m4: Update.
3259         * gnulib/import/m4/getlogin_r.m4: Update.
3260         * gnulib/import/m4/getpagesize.m4: Update.
3261         * gnulib/import/m4/getprogname.m4: Update.
3262         * gnulib/import/m4/gettimeofday.m4: Update.
3263         * gnulib/import/m4/glibc21.m4: Update.
3264         * gnulib/import/m4/glob.m4: Update.
3265         * gnulib/import/m4/glob_h.m4: Update.
3266         * gnulib/import/m4/gnulib-cache.m4: Update.
3267         * gnulib/import/m4/gnulib-common.m4: Update.
3268         * gnulib/import/m4/gnulib-comp.m4: Update.
3269         * gnulib/import/m4/gnulib-tool.m4: Update.
3270         * gnulib/import/m4/hard-locale.m4: Update.
3271         * gnulib/import/m4/include_next.m4: Update.
3272         * gnulib/import/m4/inttypes-pri.m4: Update.
3273         * gnulib/import/m4/inttypes.m4: Update.
3274         * gnulib/import/m4/isnand.m4: Update.
3275         * gnulib/import/m4/isnanl.m4: Update.
3276         * gnulib/import/m4/largefile.m4: Update.
3277         * gnulib/import/m4/limits-h.m4: Update.
3278         * gnulib/import/m4/localcharset.m4: Update.
3279         * gnulib/import/m4/locale-fr.m4: Update.
3280         * gnulib/import/m4/locale-ja.m4: Update.
3281         * gnulib/import/m4/locale-zh.m4: Update.
3282         * gnulib/import/m4/localtime-buffer.m4: Update.
3283         * gnulib/import/m4/longlong.m4: Update.
3284         * gnulib/import/m4/lstat.m4: Update.
3285         * gnulib/import/m4/malloc.m4: Update.
3286         * gnulib/import/m4/malloca.m4: Update.
3287         * gnulib/import/m4/math_h.m4: Update.
3288         * gnulib/import/m4/mbrtowc.m4: Update.
3289         * gnulib/import/m4/mbsinit.m4: Update.
3290         * gnulib/import/m4/mbsrtowcs.m4: Update.
3291         * gnulib/import/m4/mbstate_t.m4: Update.
3292         * gnulib/import/m4/memchr.m4: Update.
3293         * gnulib/import/m4/memmem.m4: Update.
3294         * gnulib/import/m4/mempcpy.m4: Update.
3295         * gnulib/import/m4/memrchr.m4: Update.
3296         * gnulib/import/m4/mkdir.m4: Update.
3297         * gnulib/import/m4/mkstemp.m4: Update.
3298         * gnulib/import/m4/mmap-anon.m4: Update.
3299         * gnulib/import/m4/mode_t.m4: Update.
3300         * gnulib/import/m4/msvc-inval.m4: Update.
3301         * gnulib/import/m4/msvc-nothrow.m4: Update.
3302         * gnulib/import/m4/multiarch.m4: Update.
3303         * gnulib/import/m4/nocrash.m4: Update.
3304         * gnulib/import/m4/off_t.m4: Update.
3305         * gnulib/import/m4/onceonly.m4: Update.
3306         * gnulib/import/m4/open-cloexec.m4: Update.
3307         * gnulib/import/m4/open.m4: Update.
3308         * gnulib/import/m4/openat.m4: Update.
3309         * gnulib/import/m4/opendir.m4: Update.
3310         * gnulib/import/m4/pathmax.m4: Update.
3311         * gnulib/import/m4/rawmemchr.m4: Update.
3312         * gnulib/import/m4/readdir.m4: Update.
3313         * gnulib/import/m4/readlink.m4: Update.
3314         * gnulib/import/m4/realloc.m4: Update.
3315         * gnulib/import/m4/rename.m4: Update.
3316         * gnulib/import/m4/rewinddir.m4: Update.
3317         * gnulib/import/m4/rmdir.m4: Update.
3318         * gnulib/import/m4/save-cwd.m4: Update.
3319         * gnulib/import/m4/secure_getenv.m4: Update.
3320         * gnulib/import/m4/setenv.m4: Update.
3321         * gnulib/import/m4/signal_h.m4: Update.
3322         * gnulib/import/m4/ssize_t.m4: Update.
3323         * gnulib/import/m4/stat-time.m4: Update.
3324         * gnulib/import/m4/stat.m4: Update.
3325         * gnulib/import/m4/std-gnu11.m4: Update.
3326         * gnulib/import/m4/stdbool.m4: Update.
3327         * gnulib/import/m4/stddef_h.m4: Update.
3328         * gnulib/import/m4/stdint.m4: Update.
3329         * gnulib/import/m4/stdio_h.m4: Update.
3330         * gnulib/import/m4/stdlib_h.m4: Update.
3331         * gnulib/import/m4/strchrnul.m4: Update.
3332         * gnulib/import/m4/strdup.m4: Update.
3333         * gnulib/import/m4/strerror.m4: Update.
3334         * gnulib/import/m4/string_h.m4: Update.
3335         * gnulib/import/m4/strstr.m4: Update.
3336         * gnulib/import/m4/strtok_r.m4: Update.
3337         * gnulib/import/m4/sys_socket_h.m4: Update.
3338         * gnulib/import/m4/sys_stat_h.m4: Update.
3339         * gnulib/import/m4/sys_time_h.m4: Update.
3340         * gnulib/import/m4/sys_types_h.m4: Update.
3341         * gnulib/import/m4/tempname.m4: Update.
3342         * gnulib/import/m4/time_h.m4: Update.
3343         * gnulib/import/m4/unistd-safer.m4: Update.
3344         * gnulib/import/m4/unistd_h.m4: Update.
3345         * gnulib/import/m4/warn-on-use.m4: Update.
3346         * gnulib/import/m4/wchar_h.m4: Update.
3347         * gnulib/import/m4/wchar_t.m4: Update.
3348         * gnulib/import/m4/wctype_h.m4: Update.
3349         * gnulib/import/m4/wint_t.m4: Update.
3350         * gnulib/import/malloc.c: Update.
3351         * gnulib/import/malloc/scratch_buffer.h: Update.
3352         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3353         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3354         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3355         * gnulib/import/malloca.c: Update.
3356         * gnulib/import/malloca.h: Update.
3357         * gnulib/import/malloca.valgrind: Update.
3358         * gnulib/import/math.in.h: Update.
3359         * gnulib/import/mbrtowc.c: Update.
3360         * gnulib/import/mbsinit.c: Update.
3361         * gnulib/import/mbsrtowcs-impl.h: Update.
3362         * gnulib/import/mbsrtowcs-state.c: Update.
3363         * gnulib/import/mbsrtowcs.c: Update.
3364         * gnulib/import/memchr.c: Update.
3365         * gnulib/import/memmem.c: Update.
3366         * gnulib/import/mempcpy.c: Update.
3367         * gnulib/import/memrchr.c: Update.
3368         * gnulib/import/mkdir.c: Update.
3369         * gnulib/import/mkstemp.c: Update.
3370         * gnulib/import/msvc-inval.c: Update.
3371         * gnulib/import/msvc-inval.h: Update.
3372         * gnulib/import/msvc-nothrow.c: Update.
3373         * gnulib/import/msvc-nothrow.h: Update.
3374         * gnulib/import/open.c: Update.
3375         * gnulib/import/openat-die.c: Update.
3376         * gnulib/import/openat-priv.h: Update.
3377         * gnulib/import/openat-proc.c: Update.
3378         * gnulib/import/openat.c: Update.
3379         * gnulib/import/openat.h: Update.
3380         * gnulib/import/opendir.c: Update.
3381         * gnulib/import/pathmax.h: Update.
3382         * gnulib/import/pipe-safer.c: Update.
3383         * gnulib/import/rawmemchr.c: Update.
3384         * gnulib/import/readdir.c: Update.
3385         * gnulib/import/readlink.c: Update.
3386         * gnulib/import/realloc.c: Update.
3387         * gnulib/import/ref-add.sin: Update.
3388         * gnulib/import/ref-del.sin: Update.
3389         * gnulib/import/rename.c: Update.
3390         * gnulib/import/rewinddir.c: Update.
3391         * gnulib/import/rmdir.c: Update.
3392         * gnulib/import/same-inode.h: Update.
3393         * gnulib/import/save-cwd.c: Update.
3394         * gnulib/import/save-cwd.h: Update.
3395         * gnulib/import/scratch_buffer.h: Update.
3396         * gnulib/import/secure_getenv.c: Update.
3397         * gnulib/import/setenv.c: Update.
3398         * gnulib/import/signal.in.h: Update.
3399         * gnulib/import/stat-time.c: Update.
3400         * gnulib/import/stat-time.h: Update.
3401         * gnulib/import/stat-w32.c: Update.
3402         * gnulib/import/stat-w32.h: Update.
3403         * gnulib/import/stat.c: Update.
3404         * gnulib/import/stdbool.in.h: Update.
3405         * gnulib/import/stddef.in.h: Update.
3406         * gnulib/import/stdint.in.h: Update.
3407         * gnulib/import/stdio.in.h: Update.
3408         * gnulib/import/stdlib.in.h: Update.
3409         * gnulib/import/str-two-way.h: Update.
3410         * gnulib/import/strchrnul.c: Update.
3411         * gnulib/import/strdup.c: Update.
3412         * gnulib/import/streq.h: Update.
3413         * gnulib/import/strerror-override.c: Update.
3414         * gnulib/import/strerror-override.h: Update.
3415         * gnulib/import/strerror.c: Update.
3416         * gnulib/import/string.in.h: Update.
3417         * gnulib/import/stripslash.c: Update.
3418         * gnulib/import/strnlen1.c: Update.
3419         * gnulib/import/strnlen1.h: Update.
3420         * gnulib/import/strstr.c: Update.
3421         * gnulib/import/strtok_r.c: Update.
3422         * gnulib/import/sys_stat.in.h: Update.
3423         * gnulib/import/sys_time.in.h: Update.
3424         * gnulib/import/sys_types.in.h: Update.
3425         * gnulib/import/tempname.c: Update.
3426         * gnulib/import/tempname.h: Update.
3427         * gnulib/import/time.in.h: Update.
3428         * gnulib/import/unistd--.h: Update.
3429         * gnulib/import/unistd-safer.h: Update.
3430         * gnulib/import/unistd.in.h: Update.
3431         * gnulib/import/unsetenv.c: Update.
3432         * gnulib/import/verify.h: Update.
3433         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3434         * gnulib/import/wchar.in.h: Update.
3435         * gnulib/import/wctype.in.h: Update.
3436         * gnulib/import/xalloc-oversized.h: Update.
3437         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3438         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3439
3440 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3441
3442         * record-btrace.c (get_thread_current_frame): Remove
3443         old_inferior_ptid.
3444
3445 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3446
3447         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3448         with check_tag to 1 if and only if the type is tagged and the
3449         component being searched cannot been found in the current
3450         view. Otherwise, always call ada_to_fixed_type with
3451         check_tag to 0.
3452
3453 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3454
3455         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3456         declaration.
3457         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3458         * ada-varobj.c (ada_varobj_get_number_of_children,
3459         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3460
3461 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3462
3463         * ada-valprint.c (ada_value_print): Use type instead of
3464         enclosing type.
3465
3466 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3467
3468         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3469         an array of access to unconstrained array.
3470
3471 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3472
3473         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3474         (ada_check_typedef): Use it.
3475
3476 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3477
3478         * ada-varobj.c (ada_varobj_describe_struct_child)
3479         (ada_varobj_describe_child): Handle union case like struct one.
3480
3481 2018-09-10  Tom Tromey  <tom@tromey.com>
3482
3483         PR python/18380:
3484         * python/python.c (_initialize_python): Make example in "python"
3485         help work in Python 3.
3486
3487 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
3488
3489         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3490         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
3491         $(EXEEXT) to the script, as it is not a program.
3492
3493 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3494
3495         * python/py-prettyprint.c (pretty_print_one_value): Return
3496         gdbpy_ref<>.
3497         (print_string_repr): Adjust.
3498         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3499         * python/python-internal.h (apply_varobj_pretty_printer): Return
3500         gdbpy_ref<>.
3501         * varobj.c (varobj_value_get_print_value): Adjust.
3502
3503 2018-09-08  Tom Tromey  <tom@tromey.com>
3504
3505         PR python/16047:
3506         * python/py-prettyprint.c (pretty_print_one_value): Check for
3507         to_string method.
3508
3509 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3510
3511         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3512         replace_operator_with_call.
3513
3514 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3515
3516         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
3517
3518 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3519
3520         * ada-typeprint.c (print_range): Print the bounds using TYPE
3521         rather than its TYPE_TARGET_TYPE.
3522
3523 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3524
3525         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
3526         call to ada_to_fixed_value_create.
3527
3528 2018-09-08  Jerome Guitton  <guitton@adacore.com>
3529
3530         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
3531
3532 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3533
3534         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
3535         by calls to error.
3536
3537 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3538
3539         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
3540         Move update of loop variable "fi".
3541
3542 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3543
3544         * ada-lang.c (value_assign_to_component): In the case of
3545         big-endian targets, extract the bits of the given VAL
3546         using an src_offset of zero if container is not a scalar.
3547
3548 2018-09-06  Simon Ser  <contact@emersion.fr>
3549
3550         PR gdb/23105
3551         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
3552         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3553         * fbsd-tdep.c (fbsd_make_note_desc): New.
3554         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
3555         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
3556         * target.h (enum target_object) Add FreeBSD-specific
3557         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3558
3559 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3560
3561         * compile/compile-c.h (generate_c_for_variable_locations):
3562         Change reference to pointer.
3563         * compile/compile-c-support.c (compile_program) <compute>:
3564         Likewise.
3565         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
3566         (generate_c_for_for_one_variable): Likewise
3567         (generate_c_for_variable_locations): Likewise
3568         * compile/compile-c-types.c (compile_c_instance::convert_type):
3569         Likewise
3570         * compile/compile-cplus-symbols.c (convert_one_symbol):
3571         std::move the scope passed to enter_scope.
3572         * compile/compile-cplus-types.c
3573         (compile_cplus_instance::enter_scope): Make parameter
3574         rvalue-reference.
3575         (compile_cplus_instance::new_scope): Change reference to
3576         pointer.
3577         (compile_cplus_instance::convert_type): Likewise
3578         (compile_cplus_convert_typedef): std::move the scope passed to
3579         enter_scope.
3580         (compile_cplus_convert_struct_or_union): Likewise.
3581         (compile_cplus_convert_enum): Likewise.
3582         (compile_cplus_convert_namespace): Likewise.
3583         * compile/compile-cplus.h (compile_cplus_instance)
3584         <enter_scope>: Make parameter rvalue-reference.
3585         * compile/compile-internal.h (compile_instance)
3586         <get_cached_type>: Likewise
3587         * compile/compile-loc2c.c (push): Likewise
3588         (pushf): Likewise
3589         (unary): Likewise
3590         (binary): Likewise
3591         (print_label): Likewise
3592         (pushf_register_address): Likewise
3593         (pushf_register): Likewise
3594         (do_compile_dwarf_expr_to_c): Likewise
3595         (compile_dwarf_expr_to_c): Likewise
3596         (compile_dwarf_bounds_to_c): Likewise
3597         * compile/compile.c (compile_instance::get_cached_type):
3598         Likewise
3599         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
3600         (compile_dwarf_bounds_to_c): Likewise
3601         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
3602         (dwarf2_compile_property_to_c): Likewise
3603         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
3604         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
3605         Likewise
3606
3607 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3608
3609         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
3610         * tui/tui-data.c (init_content_element): Don't initialize it.
3611
3612 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3613
3614         * tui/tui-data.h (struct tui_win_info)
3615         <detail::opaque>: Remove.
3616         * tui/tui-data.c (init_win_info): Remove assignment.
3617
3618 2018-09-05  Tom Tromey  <tom@tromey.com>
3619
3620         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
3621         -Wformat-nonliteral.
3622         * target-float.c (host_float_ops<T>::to_string)
3623         (host_float_ops<T>::from_string): Use
3624         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3625         * configure: Rebuild.
3626
3627 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3628
3629         * printcmd.c (printf_c_string): Use
3630         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3631         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
3632
3633 2018-09-05  Tom Tromey  <tom@tromey.com>
3634
3635         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
3636
3637 2018-09-05  Tom de Vries  <tdevries@suse.de>
3638
3639         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
3640         with resolve_abstract_p == true.
3641         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
3642         defaulting to false. Propagate resolve_abstract_p to
3643         dwarf2_fetch_die_loc_sect_off.
3644         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
3645         parameter, defaulting to false.
3646         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
3647         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
3648         parameter.
3649         * dwarf2read.h (struct die_info): Forward-declare.
3650         (die_info_ptr): New typedef.
3651         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
3652
3653 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
3654
3655         GDB 8.2 released.
3656
3657 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3658             Pedro Alves  <palves@redhat.com>
3659
3660         * gnulib/Makefile.in (aclocal_m4_deps): Move to
3661         "aclocal-m4-deps.mk".  Include file here.
3662         $(srcdir)/aclocal.m4: Add "configure.ac".
3663         * gnulib/aclocal-m4-deps.mk: New file.
3664         * gnulib/update-gnulib.sh: Automatically update
3665         "aclocal-m4-deps.mk".
3666
3667 2018-09-04  Tom Tromey  <tom@tromey.com>
3668
3669         * configure: Rebuild.
3670         * configure.ac: Remove multi-ice code.
3671
3672 2018-09-04  Tom Tromey  <tom@tromey.com>
3673
3674         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
3675         (ada-exp.o): Update.
3676
3677 2018-09-04  Tom Tromey  <tom@tromey.com>
3678
3679         * Makefile.in (printcmd.o, target-float.o): Remove.
3680         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
3681
3682 2018-09-04  Tom Tromey  <tom@tromey.com>
3683
3684         * gnulib/Makefile.in: Remove obsolete comment.
3685         * Makefile.in: Remove obsolete comment.
3686
3687 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
3688
3689         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
3690         line with '+'.
3691
3692 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3693
3694         * riscv-tdep.c: Add 'prologue-value.h' include.
3695         (struct riscv_unwind_cache): New struct.
3696         (riscv_debug_unwinder): New global.
3697         (riscv_scan_prologue): Update arguments, capture register details
3698         from prologue scan.
3699         (riscv_skip_prologue): Reformat arguments line, move end of
3700         prologue calculation into riscv_scan_prologue.
3701         (riscv_frame_cache): Update return type, create
3702         riscv_unwind_cache, scan the prologue, and fill in remaining cache
3703         details.
3704         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
3705         (riscv_frame_prev_register): Use the trad_frame within the
3706         riscv_unwind_cache.
3707         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
3708         flag.
3709
3710 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3711
3712         * trad-frame.h (trad_frame_set_realreg): Declare.
3713         (trad_frame_set_addr): Declare.
3714         * trad-frame.c (trad_frame_set_realreg): Define new function.
3715         (trad_frame_set_addr): Define new function.
3716         (trad_frame_set_reg_realreg): Use new function.
3717         (trad_frame_set_reg_addr): Use new function.
3718
3719 2018-09-01  Keith Seitz  <keiths@redhat.com>
3720
3721         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
3722         pulongest instead of "%lld".
3723         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
3724         ATTRIBUTE_UNUSED.
3725
3726 2018-08-31  Tom Tromey  <tom@tromey.com>
3727
3728         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
3729         variant part type.
3730
3731 2018-08-31  Pedro Alves  <palves@redhat.com>
3732
3733         * gdbarch.h: Regenerate.
3734
3735 2018-08-31  Pedro Alves  <palves@redhat.com>
3736
3737         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
3738         * target.h (Hardware watchpoint interfaces): Describe
3739         continuable/steppable/non-steppable watchpoints.
3740         * gdbarch.h, gdbarch.c: Regenerate.
3741
3742 2018-08-31  Pedro Alves  <palves@redhat.com>
3743
3744         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
3745         Delete.
3746         * s390-linux-nat.c
3747         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
3748         * target.h (target_ops::have_continuable_watchpoint): Delete.
3749         (target_have_continuable_watchpoint): Delete.
3750         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
3751         * target-delegates.c: Regenerate.
3752
3753 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3754
3755         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
3756         the files present in "gnulib/import/m4/".
3757
3758 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3759
3760         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
3761         c.sw, c.swsp, and c.sdsp.
3762
3763 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3764
3765         * riscv-tdep.c (struct riscv_inferior_data): Delete.
3766         (riscv_read_misa_reg): Don't cache value read into inferior data.
3767         (riscv_new_inferior_data): Delete.
3768         (riscv_inferior_data_cleanup): Delete.
3769         (riscv_inferior_data): Delete.
3770         (riscv_invalidate_inferior_data): Delete.
3771         (_initialize_riscv_tdep): Remove initialisation of inferior data.
3772
3773 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
3774
3775         * compile/compile-cplus-types.c
3776         (compile_cplus_instance::leave_scope): Take the address of scope
3777         object.
3778         (compile_cplus_instance::convert_qualified_base): Compare quals
3779         to 0.
3780
3781 2018-08-30  Keith Seitz  <keiths@redhat.com>
3782
3783         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
3784         Use "%s" and host_address_to_string instead of "%p" in printf.
3785
3786 2018-08-29  Keith Seitz  <keiths@redhat.com>
3787
3788         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3789         and compile-cplus-types.c.
3790         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3791         * c-lang.c (cplus_language_defn): Set C++ compile functions.
3792         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3793         Declare.
3794         * compile/compile-c-support.c: Include compile-cplus.h.
3795         (load_libcompile): Templatize.
3796         (get_compile_context): "New" function.
3797         (c_get_compile_context): Use get_compile_context.
3798         (cplus_get_compile_context): New function.
3799         (cplus_push_user_expression, cplus_pop_user_expression)
3800         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3801         (cplus_compute_program): Define new structs/functions.
3802         * compile/compile-cplus-symmbols.c: New file.
3803         * compile/compile-cplus-types.c: New file.
3804         * compile/compile-cplus.h: New file.
3805         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3806         Declare.
3807         * compile/compile-object-load.c (get_out_value_type): Use
3808         strncmp_iw when comparing symbol names.
3809         (compile_object_load): Add mst_bss and mst_data.
3810         * compile/compile.c (_initialize_compile): Remove
3811         -Wno-implicit-function-declaration from `compile_args'.
3812         * compile/gcc-cp-plugin.h: New file.
3813         * NEWS: Mention C++ compile support and new debug options.
3814
3815 2018-08-29  Keith Seitz  <keiths@redhat.com>
3816
3817         * linespec.c (collect_info::add_symbol): Make virtual.
3818         (struct symbol_searcher_collect_info): New struct.
3819         (symbol_searcher::find_all_symbols): New method.
3820         * symtab.h (class symbol_searcher): New class.
3821
3822 2018-08-29  Keith Seitz  <keiths@redhat.com>
3823
3824         * linespec.c (struct linespec) <function_symbols, label_symbols>:
3825         Change to vector of block_symbol.  Update all users.
3826         (struct collect_info) <symbols>: Likewise.
3827         (collect_info::add_symbol): Take block_symbol as argument.
3828         Update all callers.
3829         (decode_compound_collector) <m_symbols>: Change type to vector
3830         of block_symbol.  Update all users.
3831         (decode_compound_collector::operator ()): Change parameter type
3832         to block_symbol.
3833         (find_method, find_function_symbols, find_linespec_symbols)
3834         (find_label_symbols_in_block, find_label_symbols): Change symbol
3835         vectors to block_symbol vectors.
3836         * symtab.h (symbol_found_callback_ftype): Change parameter type to
3837         block_symbol.
3838
3839 2018-08-29  Keith Seitz  <keiths@redhat.com>
3840
3841         * linespec.c (symbolp): Remove typedef and VEC definitions.
3842         (bound_minimal_symbol_d): Likewise.
3843
3844 2018-08-29  Keith Seitz  <keiths@redhat.com>
3845
3846         * linespec.c (decode_compound_collector::decode_compound_collector):
3847         Remove initialization for `m_symtabs'.
3848         (decode_compound_collector::release_symbols): Change return type
3849         to std::vector.  Update all callers.
3850         (class decode_compound_collector) <m_symbols>: Change type to
3851         std::vector.
3852         (lookup_prefix_sym): Change return type to std::vector.  Update all
3853         callers.
3854         (compare_symbols): Remove.
3855         (std_compare_symbols): Rename to `compare_symbols'.
3856         (find_method): Change `sym_classes' parameter to std::vector.
3857         Update all callers.  Use std::sort to sort sym_classes.
3858         (find_linespec_symbols): Remove cleanup.
3859
3860 2018-08-29  Keith Seitz  <keiths@redhat.com>
3861
3862         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3863         std::vector.  Update all users.
3864         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3865         (struct collect_info) <minimal_symbols>: Likewise.
3866         (compare_msymbols): Return bool.  Change parameters to const
3867         bound_minimal_symbol references.
3868         (find_method, find_function_symbols, find_linespec_symbols): Change
3869         `minsyms' parameter to std::vector.  Update all callers.
3870
3871 2018-08-29  Keith Seitz  <keiths@redhat.com>
3872
3873         * linespec.c (struct linespec) <label_symbols>: Change type to
3874         std::vector.  Update all users.
3875         (find_label_symbols_in_block): Change `result' parameter to
3876         std::vector.  Update all callers.
3877         (find_label_symbols): Return std::vector.  Update all callers.
3878
3879 2018-08-29  Keith Seitz  <keiths@redhat.com>
3880
3881         * linespec.c (struct linespec) <function_symbols>: Change type to
3882         std::vector.  Update all users.
3883         (struct collect_info) <function_symbols>: Likewise.
3884         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3885         (std_compare_symbols): New function.
3886         (find_method, find_function_symbols, find_linespec_symbols)
3887         (find_label_symbols_in_block): Change `symbols' parameter to
3888         std::vector.  Update all callers.
3889         (find_label_symbols): Likewise for `function_symbols' and
3890         `label_funcs_ret'.
3891
3892 2018-08-29  Keith Seitz  <keiths@redhat.com>
3893
3894         * linespec.c (symtab_vector_up): Define.
3895         (struct linespec) <file_symtabs>: Change type to std::vector *.
3896         Update all uses.
3897         (struct collect_info) <file_symtabs>: Likewise.
3898         (collect_symtabs_from_filename): Return symtab_vector_up.
3899         Update all callers.
3900         (decode_objc): Remove cleanup.
3901         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3902         (symtab_collector::release_symtabs): Return symtab_vector_up.
3903         Update all callers.
3904         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3905         Update all users.
3906         (collect_symtabs_from_filename, symtabs_from_filename): Return
3907         symtab_vector_up.  Update all callers.
3908
3909 2018-08-29  Tom Tromey  <tom@tromey.com>
3910
3911         * csky-tdep.c (csky_analyze_prologue): Use
3912         core_addr_to_string_nz.
3913
3914 2018-08-29  Tom Tromey  <tom@tromey.com>
3915
3916         * windows-nat.c (struct xlate_exception) <them>: Change type to
3917         DWORD.
3918         (xlate): Fix formatting.  Remove last entry.
3919         (struct xlate_exception, xlate): Comment out.
3920         (windows_nat_target::resume): Use ranged for.
3921
3922 2018-08-29  Jim Wilson  <jimw@sifive.com>
3923
3924         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3925         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3926         of NT_PRFPREG.
3927         (riscv_linux_nat_target::store_registers): Likewise.
3928
3929 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3930
3931         PR gdb/23555
3932         PR gdb/23558
3933         * gnulib/aclocal.m4: Regenerate.
3934         * gnulib/config.in: Regenerate.
3935         * gnulib/configure: Regenerate.
3936         * gnulib/import/Makefile.am: Update.
3937         * gnulib/import/Makefile.in: Update.
3938         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3939         * gnulib/import/_Noreturn.h: ... this.
3940         * gnulib/import/alloca.in.h: Update.
3941         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3942         * gnulib/import/arg-nonnull.h: ... this.
3943         * gnulib/import/assure.h: Update.
3944         * gnulib/import/at-func.c: Update.
3945         * gnulib/import/basename-lgpl.c: Update.
3946         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3947         * gnulib/import/c++defs.h: ... this.
3948         * gnulib/import/canonicalize-lgpl.c: Update.
3949         * gnulib/import/cdefs.h: Update.
3950         * gnulib/import/chdir-long.c: Update.
3951         * gnulib/import/chdir-long.h: Update.
3952         * gnulib/import/cloexec.c: Update.
3953         * gnulib/import/cloexec.h: Update.
3954         * gnulib/import/close.c: Update.
3955         * gnulib/import/closedir.c: Update.
3956         * gnulib/import/config.charset: Update.
3957         * gnulib/import/dirent-private.h: Update.
3958         * gnulib/import/dirent.in.h: Update.
3959         * gnulib/import/dirfd.c: Update.
3960         * gnulib/import/dirname-lgpl.c: Update.
3961         * gnulib/import/dirname.h: Update.
3962         * gnulib/import/dosname.h: Update.
3963         * gnulib/import/dup-safer-flag.c: Update.
3964         * gnulib/import/dup-safer.c: Update.
3965         * gnulib/import/dup.c: Update.
3966         * gnulib/import/dup2.c: Update.
3967         * gnulib/import/errno.in.h: Update.
3968         * gnulib/import/error.c: Update.
3969         * gnulib/import/error.h: Update.
3970         * gnulib/import/exitfail.c: Update.
3971         * gnulib/import/exitfail.h: Update.
3972         * gnulib/import/extra/update-copyright: Update.
3973         * gnulib/import/fchdir.c: Update.
3974         * gnulib/import/fcntl.c: Update.
3975         * gnulib/import/fcntl.in.h: Update.
3976         * gnulib/import/fd-hook.c: Update.
3977         * gnulib/import/fd-hook.h: Update.
3978         * gnulib/import/fd-safer-flag.c: Update.
3979         * gnulib/import/fd-safer.c: Update.
3980         * gnulib/import/fdopendir.c: Update.
3981         * gnulib/import/filename.h: Update.
3982         * gnulib/import/filenamecat-lgpl.c: Update.
3983         * gnulib/import/filenamecat.h: Update.
3984         * gnulib/import/flexmember.h: Update.
3985         * gnulib/import/float+.h: Update.
3986         * gnulib/import/float.c: Update.
3987         * gnulib/import/float.in.h: Update.
3988         * gnulib/import/fnmatch.c: Update.
3989         * gnulib/import/fnmatch.in.h: Update.
3990         * gnulib/import/fnmatch_loop.c: Update.
3991         * gnulib/import/fpucw.h: Update.
3992         * gnulib/import/frexp.c: Update.
3993         * gnulib/import/frexpl.c: Update.
3994         * gnulib/import/fstat.c: Update.
3995         * gnulib/import/fstatat.c: Update.
3996         * gnulib/import/getcwd-lgpl.c: Update.
3997         * gnulib/import/getcwd.c: Update.
3998         * gnulib/import/getdtablesize.c: Update.
3999         * gnulib/import/getlogin_r.c: Update.
4000         * gnulib/import/getprogname.c: Update.
4001         * gnulib/import/getprogname.h: Update.
4002         * gnulib/import/gettext.h: Update.
4003         * gnulib/import/gettimeofday.c: Update.
4004         * gnulib/import/glob-libc.h: Update.
4005         * gnulib/import/glob.c: Update.
4006         * gnulib/import/glob.in.h: Update.
4007         * gnulib/import/glob_internal.h: Update.
4008         * gnulib/import/glob_pattern_p.c: Update.
4009         * gnulib/import/globfree.c: Update.
4010         * gnulib/import/hard-locale.c: Update.
4011         * gnulib/import/hard-locale.h: Update.
4012         * gnulib/import/intprops.h: Update.
4013         * gnulib/import/inttypes.in.h: Update.
4014         * gnulib/import/isnan.c: Update.
4015         * gnulib/import/isnand-nolibm.h: Update.
4016         * gnulib/import/isnand.c: Update.
4017         * gnulib/import/isnanl-nolibm.h: Update.
4018         * gnulib/import/isnanl.c: Update.
4019         * gnulib/import/itold.c: Update.
4020         * gnulib/import/libc-config.h: Update.
4021         * gnulib/import/limits.in.h: Update.
4022         * gnulib/import/localcharset.c: Update.
4023         * gnulib/import/localcharset.h: Update.
4024         * gnulib/import/localtime-buffer.c: Update.
4025         * gnulib/import/localtime-buffer.h: Update.
4026         * gnulib/import/lstat.c: Update.
4027         * gnulib/import/m4/00gnulib.m4: Update.
4028         * gnulib/import/m4/__inline.m4: Update.
4029         * gnulib/import/m4/absolute-header.m4: Update.
4030         * gnulib/import/m4/alloca.m4: Update.
4031         * gnulib/import/m4/builtin-expect.m4: Update.
4032         * gnulib/import/m4/canonicalize.m4: Update.
4033         * gnulib/import/m4/chdir-long.m4: Update.
4034         * gnulib/import/m4/close.m4: Update.
4035         * gnulib/import/m4/closedir.m4: Update.
4036         * gnulib/import/m4/configmake.m4: Update.
4037         * gnulib/import/m4/d-ino.m4: Update.
4038         * gnulib/import/m4/d-type.m4: Update.
4039         * gnulib/import/m4/dirent_h.m4: Update.
4040         * gnulib/import/m4/dirfd.m4: Update.
4041         * gnulib/import/m4/dirname.m4: Update.
4042         * gnulib/import/m4/double-slash-root.m4: Update.
4043         * gnulib/import/m4/dup.m4: Update.
4044         * gnulib/import/m4/dup2.m4: Update.
4045         * gnulib/import/m4/eealloc.m4: Update.
4046         * gnulib/import/m4/environ.m4: Update.
4047         * gnulib/import/m4/errno_h.m4: Update.
4048         * gnulib/import/m4/error.m4: Update.
4049         * gnulib/import/m4/exponentd.m4: Update.
4050         * gnulib/import/m4/exponentl.m4: Update.
4051         * gnulib/import/m4/extensions.m4: Update.
4052         * gnulib/import/m4/extern-inline.m4: Update.
4053         * gnulib/import/m4/fchdir.m4: Update.
4054         * gnulib/import/m4/fcntl-o.m4: Update.
4055         * gnulib/import/m4/fcntl.m4: Update.
4056         * gnulib/import/m4/fcntl_h.m4: Update.
4057         * gnulib/import/m4/fdopendir.m4: Update.
4058         * gnulib/import/m4/filenamecat.m4: Update.
4059         * gnulib/import/m4/flexmember.m4: Update.
4060         * gnulib/import/m4/float_h.m4: Update.
4061         * gnulib/import/m4/fnmatch.m4: Update.
4062         * gnulib/import/m4/fnmatch_h.m4: Update.
4063         * gnulib/import/m4/fpieee.m4: Update.
4064         * gnulib/import/m4/frexp.m4: Update.
4065         * gnulib/import/m4/frexpl.m4: Update.
4066         * gnulib/import/m4/fstat.m4: Update.
4067         * gnulib/import/m4/fstatat.m4: Update.
4068         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4069         * gnulib/import/m4/getcwd-path-max.m4: Update.
4070         * gnulib/import/m4/getcwd.m4: Update.
4071         * gnulib/import/m4/getdtablesize.m4: Update.
4072         * gnulib/import/m4/getlogin.m4: Update.
4073         * gnulib/import/m4/getlogin_r.m4: Update.
4074         * gnulib/import/m4/getpagesize.m4: Update.
4075         * gnulib/import/m4/getprogname.m4: Update.
4076         * gnulib/import/m4/gettimeofday.m4: Update.
4077         * gnulib/import/m4/glibc21.m4: Update.
4078         * gnulib/import/m4/glob.m4: Update.
4079         * gnulib/import/m4/glob_h.m4: Update.
4080         * gnulib/import/m4/gnulib-cache.m4: Update.
4081         * gnulib/import/m4/gnulib-common.m4: Update.
4082         * gnulib/import/m4/gnulib-comp.m4: Update.
4083         * gnulib/import/m4/gnulib-tool.m4: Update.
4084         * gnulib/import/m4/hard-locale.m4: Update.
4085         * gnulib/import/m4/include_next.m4: Update.
4086         * gnulib/import/m4/inttypes-pri.m4: Update.
4087         * gnulib/import/m4/inttypes.m4: Update.
4088         * gnulib/import/m4/isnand.m4: Update.
4089         * gnulib/import/m4/isnanl.m4: Update.
4090         * gnulib/import/m4/largefile.m4: Update.
4091         * gnulib/import/m4/limits-h.m4: Update.
4092         * gnulib/import/m4/localcharset.m4: Update.
4093         * gnulib/import/m4/locale-fr.m4: Update.
4094         * gnulib/import/m4/locale-ja.m4: Update.
4095         * gnulib/import/m4/locale-zh.m4: Update.
4096         * gnulib/import/m4/localtime-buffer.m4: Update.
4097         * gnulib/import/m4/longlong.m4: Update.
4098         * gnulib/import/m4/lstat.m4: Update.
4099         * gnulib/import/m4/malloc.m4: Update.
4100         * gnulib/import/m4/malloca.m4: Update.
4101         * gnulib/import/m4/math_h.m4: Update.
4102         * gnulib/import/m4/mbrtowc.m4: Update.
4103         * gnulib/import/m4/mbsinit.m4: Update.
4104         * gnulib/import/m4/mbsrtowcs.m4: Update.
4105         * gnulib/import/m4/mbstate_t.m4: Update.
4106         * gnulib/import/m4/memchr.m4: Update.
4107         * gnulib/import/m4/memmem.m4: Update.
4108         * gnulib/import/m4/mempcpy.m4: Update.
4109         * gnulib/import/m4/memrchr.m4: Update.
4110         * gnulib/import/m4/mkdir.m4: Update.
4111         * gnulib/import/m4/mkstemp.m4: Update.
4112         * gnulib/import/m4/mmap-anon.m4: Update.
4113         * gnulib/import/m4/mode_t.m4: Update.
4114         * gnulib/import/m4/msvc-inval.m4: Update.
4115         * gnulib/import/m4/msvc-nothrow.m4: Update.
4116         * gnulib/import/m4/multiarch.m4: Update.
4117         * gnulib/import/m4/nocrash.m4: Update.
4118         * gnulib/import/m4/off_t.m4: Update.
4119         * gnulib/import/m4/onceonly.m4: Update.
4120         * gnulib/import/m4/open-cloexec.m4: Update.
4121         * gnulib/import/m4/open.m4: Update.
4122         * gnulib/import/m4/openat.m4: Update.
4123         * gnulib/import/m4/opendir.m4: Update.
4124         * gnulib/import/m4/pathmax.m4: Update.
4125         * gnulib/import/m4/rawmemchr.m4: Update.
4126         * gnulib/import/m4/readdir.m4: Update.
4127         * gnulib/import/m4/readlink.m4: Update.
4128         * gnulib/import/m4/realloc.m4: Update.
4129         * gnulib/import/m4/rename.m4: Update.
4130         * gnulib/import/m4/rewinddir.m4: Update.
4131         * gnulib/import/m4/rmdir.m4: Update.
4132         * gnulib/import/m4/save-cwd.m4: Update.
4133         * gnulib/import/m4/secure_getenv.m4: Update.
4134         * gnulib/import/m4/setenv.m4: Update.
4135         * gnulib/import/m4/signal_h.m4: Update.
4136         * gnulib/import/m4/ssize_t.m4: Update.
4137         * gnulib/import/m4/stat-time.m4: Update.
4138         * gnulib/import/m4/stat.m4: Update.
4139         * gnulib/import/m4/std-gnu11.m4: Update.
4140         * gnulib/import/m4/stdbool.m4: Update.
4141         * gnulib/import/m4/stddef_h.m4: Update.
4142         * gnulib/import/m4/stdint.m4: Update.
4143         * gnulib/import/m4/stdio_h.m4: Update.
4144         * gnulib/import/m4/stdlib_h.m4: Update.
4145         * gnulib/import/m4/strchrnul.m4: Update.
4146         * gnulib/import/m4/strdup.m4: Update.
4147         * gnulib/import/m4/strerror.m4: Update.
4148         * gnulib/import/m4/string_h.m4: Update.
4149         * gnulib/import/m4/strstr.m4: Update.
4150         * gnulib/import/m4/strtok_r.m4: Update.
4151         * gnulib/import/m4/sys_socket_h.m4: Update.
4152         * gnulib/import/m4/sys_stat_h.m4: Update.
4153         * gnulib/import/m4/sys_time_h.m4: Update.
4154         * gnulib/import/m4/sys_types_h.m4: Update.
4155         * gnulib/import/m4/tempname.m4: Update.
4156         * gnulib/import/m4/time_h.m4: Update.
4157         * gnulib/import/m4/unistd-safer.m4: Update.
4158         * gnulib/import/m4/unistd_h.m4: Update.
4159         * gnulib/import/m4/warn-on-use.m4: Update.
4160         * gnulib/import/m4/wchar_h.m4: Update.
4161         * gnulib/import/m4/wchar_t.m4: Update.
4162         * gnulib/import/m4/wctype_h.m4: Update.
4163         * gnulib/import/m4/wint_t.m4: Update.
4164         * gnulib/import/malloc.c: Update.
4165         * gnulib/import/malloc/scratch_buffer.h: Update.
4166         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4167         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4168         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4169         * gnulib/import/malloca.c: Update.
4170         * gnulib/import/malloca.h: Update.
4171         * gnulib/import/malloca.valgrind: Update.
4172         * gnulib/import/math.in.h: Update.
4173         * gnulib/import/mbrtowc.c: Update.
4174         * gnulib/import/mbsinit.c: Update.
4175         * gnulib/import/mbsrtowcs-impl.h: Update.
4176         * gnulib/import/mbsrtowcs-state.c: Update.
4177         * gnulib/import/mbsrtowcs.c: Update.
4178         * gnulib/import/memchr.c: Update.
4179         * gnulib/import/memmem.c: Update.
4180         * gnulib/import/mempcpy.c: Update.
4181         * gnulib/import/memrchr.c: Update.
4182         * gnulib/import/mkdir.c: Update.
4183         * gnulib/import/mkstemp.c: Update.
4184         * gnulib/import/msvc-inval.c: Update.
4185         * gnulib/import/msvc-inval.h: Update.
4186         * gnulib/import/msvc-nothrow.c: Update.
4187         * gnulib/import/msvc-nothrow.h: Update.
4188         * gnulib/import/open.c: Update.
4189         * gnulib/import/openat-die.c: Update.
4190         * gnulib/import/openat-priv.h: Update.
4191         * gnulib/import/openat-proc.c: Update.
4192         * gnulib/import/openat.c: Update.
4193         * gnulib/import/openat.h: Update.
4194         * gnulib/import/opendir.c: Update.
4195         * gnulib/import/pathmax.h: Update.
4196         * gnulib/import/pipe-safer.c: Update.
4197         * gnulib/import/rawmemchr.c: Update.
4198         * gnulib/import/readdir.c: Update.
4199         * gnulib/import/readlink.c: Update.
4200         * gnulib/import/realloc.c: Update.
4201         * gnulib/import/ref-add.sin: Update.
4202         * gnulib/import/ref-del.sin: Update.
4203         * gnulib/import/rename.c: Update.
4204         * gnulib/import/rewinddir.c: Update.
4205         * gnulib/import/rmdir.c: Update.
4206         * gnulib/import/same-inode.h: Update.
4207         * gnulib/import/save-cwd.c: Update.
4208         * gnulib/import/save-cwd.h: Update.
4209         * gnulib/import/scratch_buffer.h: Update.
4210         * gnulib/import/secure_getenv.c: Update.
4211         * gnulib/import/setenv.c: Update.
4212         * gnulib/import/signal.in.h: Update.
4213         * gnulib/import/stat-time.c: Update.
4214         * gnulib/import/stat-time.h: Update.
4215         * gnulib/import/stat-w32.c: Update.
4216         * gnulib/import/stat-w32.h: Update.
4217         * gnulib/import/stat.c: Update.
4218         * gnulib/import/stdbool.in.h: Update.
4219         * gnulib/import/stddef.in.h: Update.
4220         * gnulib/import/stdint.in.h: Update.
4221         * gnulib/import/stdio.in.h: Update.
4222         * gnulib/import/stdlib.in.h: Update.
4223         * gnulib/import/str-two-way.h: Update.
4224         * gnulib/import/strchrnul.c: Update.
4225         * gnulib/import/strdup.c: Update.
4226         * gnulib/import/streq.h: Update.
4227         * gnulib/import/strerror-override.c: Update.
4228         * gnulib/import/strerror-override.h: Update.
4229         * gnulib/import/strerror.c: Update.
4230         * gnulib/import/string.in.h: Update.
4231         * gnulib/import/stripslash.c: Update.
4232         * gnulib/import/strnlen1.c: Update.
4233         * gnulib/import/strnlen1.h: Update.
4234         * gnulib/import/strstr.c: Update.
4235         * gnulib/import/strtok_r.c: Update.
4236         * gnulib/import/sys_stat.in.h: Update.
4237         * gnulib/import/sys_time.in.h: Update.
4238         * gnulib/import/sys_types.in.h: Update.
4239         * gnulib/import/tempname.c: Update.
4240         * gnulib/import/tempname.h: Update.
4241         * gnulib/import/time.in.h: Update.
4242         * gnulib/import/unistd--.h: Update.
4243         * gnulib/import/unistd-safer.h: Update.
4244         * gnulib/import/unistd.in.h: Update.
4245         * gnulib/import/unsetenv.c: Update.
4246         * gnulib/import/verify.h: Update.
4247         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4248         * gnulib/import/wchar.in.h: Update.
4249         * gnulib/import/wctype.in.h: Update.
4250         * gnulib/import/xalloc-oversized.h: Update.
4251         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4252         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4253
4254 2018-08-16  Gary Benson <gbenson@redhat.com>
4255
4256         PR gdb/13000:
4257         * gdb/main.c (captured_main_1): Exit with nonzero status
4258         in batch mode if the last command to be executed failed.
4259         * NEWS: Mention the above.
4260
4261 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4262
4263         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4264         end of warning message.
4265
4266 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4267
4268         PR gdb/22943:
4269         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4270         (aarch64_extract_return_value): Use
4271         aapcs_is_vfp_call_or_return_candidate.
4272         (aarch64_return_in_memory): Likewise.
4273         (aarch64_store_return_value): Likewise.
4274
4275 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4276
4277         * aarch64-tdep.c
4278         (aapcs_is_vfp_call_or_return_candidate): Make static
4279         (pass_in_v_or_stack): Remove function.
4280         (pass_in_v_vfp_candidate): New function.
4281         (aarch64_push_dummy_call): Check for float register candidates.
4282
4283 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4284
4285         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4286         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4287         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4288
4289 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4290
4291         PR build/23399
4292         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4293         (struct ipa_sym_addresses): Rename to...
4294         (struct ipa_sym_addresses_common): ... this.
4295         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4296
4297 2018-08-28  Tom Tromey  <tom@tromey.com>
4298
4299         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4300         (token_fifo): Now a std::vector.
4301         (yylex, c_parse): Update.
4302         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4303         (token_fifo): Now a std::vector.
4304         (yylex, d_parse): Update.
4305         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4306         (token_fifo): Now a std::vector.
4307         (yylex, go_parse): Update.
4308
4309 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4310
4311         * parser-defs.h (struct type_stack) <elements>: Change type to
4312         std::vector<union type_stack_elt>.
4313         <depth, size>: Remove.
4314         * parse.c (parse_exp_in_context_1): Adjust.
4315         (type_stack_reserve): Remove.
4316         (check_type_stack_depth): Remove.
4317         (insert_into_type_stack): Adjust to std::vector.
4318         (insert_type): Likewise.
4319         (push_type): Likewise.
4320         (push_type_int): Likewise.
4321         (insert_type_address_space): Likewise.
4322         (pop_type): Likewise.
4323         (pop_type_int): Likewise.
4324         (pop_typelist): Likewise.
4325         (pop_type_stack): Likewise.
4326         (append_type_stack): Likewise.
4327         (push_type_stack): Likewise.
4328         (get_type_stack): Likewise.
4329         (type_stack_cleanup): Likewise.
4330         (push_typelist): Likewise.
4331         (follow_types): Likewise.
4332         (_initialize_parse): Likewise.
4333
4334 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4335
4336         * NEWS: Mention csky target.
4337
4338 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4339             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4340             Don Breazeal  <donb@codesourcery.com>
4341
4342         * csky-linux-tdep.c: New file.
4343         * csky-tdep.c: Likewise.
4344         * csky-tdep.h: Likewise.
4345         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4346         csky-tdep.o.
4347         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4348         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4349         * configure.tgt: Add csky support.
4350
4351 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4352
4353         * python/py-framefilter.c (py_print_frame): Print frame architecture
4354         when printing on an MI output.
4355
4356 2018-08-27  Tom Tromey  <tom@tromey.com>
4357
4358         PR build/23087:
4359         * configure: Rebuild.
4360         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4361
4362 2018-08-27  Tom Tromey  <tom@tromey.com>
4363
4364         * aarch64-linux-tdep.c
4365         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4366         casts to int.
4367
4368 2018-08-27  Tom Tromey  <tom@tromey.com>
4369
4370         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4371         unsigned.
4372         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4373         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4374         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4375         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4376         unsigned.
4377
4378 2018-08-27  Tom Tromey  <tom@tromey.com>
4379
4380         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4381         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4382
4383 2018-08-27  Tom Tromey  <tom@tromey.com>
4384
4385         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4386         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4387         ULONGEST_MAX.
4388         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4389         ULONGEST_MAX.
4390         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4391         ULONGEST_MAX.
4392         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4393         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4394         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4395         ULONGEST_MAX.
4396         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4397         (ppc64_linux_sigaction_tramp_frame)
4398         (ppc32_linux_sighandler_tramp_frame)
4399         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4400         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4401         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4402         * mn10300-linux-tdep.c (am33_linux_sigframe)
4403         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4404         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4405         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4406         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4407         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4408         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4409         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4410         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4411         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4412         * microblaze-linux-tdep.c
4413         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4414         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4415         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4416         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4417         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4418         * common/common-types.h (ULONGEST_MAX): New define.
4419         (CORE_ADDR_MAX): Fix formatting.
4420         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4421         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4422         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4423         (arm_linux_rt_sigreturn_tramp_frame)
4424         (arm_eabi_linux_sigreturn_tramp_frame)
4425         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4426         (thumb2_eabi_linux_sigreturn_tramp_frame)
4427         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4428         (arm_linux_restart_syscall_tramp_frame)
4429         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4430         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4431         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4432         ULONGEST_MAX.
4433         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4434
4435 2018-08-27  Tom Tromey  <tom@tromey.com>
4436
4437         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4438         CORE_ADDR_MAX.
4439         * mips-tdep.c (mips_deal_with_atomic_sequence)
4440         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4441         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4442         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4443         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4444         CORE_ADDR_MAX.
4445         * aarch64-tdep.c (aarch64_software_single_step): Use
4446         CORE_ADDR_MAX.
4447
4448 2018-08-27  Tom Tromey  <tom@tromey.com>
4449
4450         * linespec.c (complete_linespec_component): Add cast to "char".
4451         * completer.c (completion_tracker::build_completion_result): Add
4452         cast to "char".
4453
4454 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4455
4456         * solist.h (struct solist, struct target_so_ops): Fix
4457         indentation.
4458
4459 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4460
4461         * ada-tasks.c (ada_task_info_s): Remove typedef.
4462         (DEF_VEC_O(ada_task_info_s)): Remove.
4463         (struct ada_tasks_inferior_data): Initialize fields.
4464         <task_list>: Make an std::vector.
4465         (get_ada_tasks_inferior_data): Allocate with new.
4466         (ada_get_task_number): Adjust.
4467         (get_task_number_from_id): Likewise.
4468         (valid_task_id): Likewise.
4469         (ada_get_task_info_from_ptid): Likewise.
4470         (iterate_over_live_ada_tasks): Likewise.
4471         (add_ada_task): Likewise.
4472         (read_known_tasks): Likewise.
4473         (ada_build_task_list): Likewise.
4474         (print_ada_task_info): Likewise.
4475         (info_task): Likewise.
4476         (task_command_1): Likewise.
4477
4478 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4479
4480         * ada-lang.c (add_angle_brackets): Return std::string.
4481
4482 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
4483
4484         * python/py-threadevent.c (py_get_event_thread): Initialize
4485         pythread.
4486
4487 2018-08-24  Pedro Alves  <palves@redhat.com>
4488
4489         * python/py-bpevent.c (create_breakpoint_event_object): Use
4490         copy-initialization.
4491         * python/py-continueevent.c (emit_continue_event): Use
4492         copy-initialization.
4493         * python/py-exitedevent.c (create_exited_event_object): Return a
4494         gdbpy_ref<>.
4495         (emit_exited_event): Use copy-initialization.
4496         * python/py-inferior.c (python_new_inferior)
4497         (python_inferior_deleted, add_thread_object): Use
4498         copy-initialization.
4499         * python/py-infevents.c (create_inferior_call_event_object)
4500         (create_register_changed_event_object)
4501         (create_memory_changed_event_object): Return a gdbpy_ref<>.
4502         (emit_inferior_call_event, emit_memory_changed_event)
4503         (emit_register_changed_event): Use copy-initialization.
4504         * python/py-newobjfileevent.c (create_new_objfile_event_object):
4505         Return a gdbpy_ref<>.
4506         (emit_new_objfile_event): Use copy-initialization.
4507         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4508         (emit_clear_objfiles_event): Use copy-initialization.
4509         * python/py-signalevent.c (create_signal_event_object): Use
4510         copy-initialization.
4511         * python/py-threadevent.c (create_thread_event_object): Use
4512         copy-initialization.
4513
4514 2018-08-24  Pedro Alves  <palves@redhat.com>
4515             Simon Marchi  <simon.marchi@ericsson.com>
4516
4517         PR gdb/23379
4518         * python/py-continueevent.c: Include "gdbthread.h".
4519         (create_continue_event_object): Add intro comment.  Add 'ptid'
4520         parameter.  Use it to find thread to pass to
4521         create_thread_event_object.
4522         (emit_continue_event): Pass PTID down to
4523         create_continue_event_object.
4524         * python/py-event.h (py_get_event_thread): Declare.
4525         (create_thread_event_object): Remove default from 'thread'
4526         parameter.
4527         * python/py-stopevent.c (create_stop_event_object): Use
4528         py_get_event_thread.
4529         * python/py-threadevent.c (get_event_thread): Rename to ...
4530         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
4531         and use it to find the thread.
4532         (create_thread_event_object): Assert that THREAD isn't null.
4533         Don't find the event thread here.
4534
4535 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
4536
4537         * block.h (blockrange, blockranges): New struct declarations.
4538         (struct block): Add new field named `ranges'.
4539         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
4540         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
4541         macros for accessing ranges in struct block.
4542         (make_blockranges): New declaration.
4543         block.c (make_blockranges): New function.
4544         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
4545         for block.
4546         * symtab.h (find_pc_partial_function): Add new parameter `block'.
4547         * blockframe.c (cache_pc_function_block): New static global.
4548         (clear_pc_function_cache): Clear cache_pc_function_block.
4549         (find_pc_partial_function): Move comment to symtab.h.  Add
4550         support for non-contiguous blocks.
4551         * cli/cli-cmds.c (block.h): Include.
4552         (print_disassembly): Handle printing of non-contiguous blocks.
4553         (disassemble_current_function): Likewise.
4554         (disassemble_command): Likewise.
4555
4556         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
4557         BLOCK_START.
4558         * blockframe.c (get_pc_function_start): Likewise.
4559         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
4560         (gcc_symbol_address): Likewise.
4561         * compile/compile-object-run.c (compile_object_run): Likewise.
4562         * compile/compile.c (get_expr_block_and_pc): Likewise.
4563         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
4564         (func_addr_to_tail_call_list): Likewise.
4565         * findvar.c (default_read_var_value): Likewise.
4566         * inline-frame.c (inline_frame_this_id): Likewise.
4567         (skip-inline_frames): Likewise.
4568         * infcmd.c (until_next_command): Likewise.
4569         * linespec.c (convert_linespec_to_sals): Likewise.
4570         * parse.c (parse_exp_in_context_1): Likewise.
4571         * printcmd.c (build_address_symbolic): likewise.
4572         (info_address_command): Likewise.
4573         symtab.c (find_function_start_sal): Likewise.
4574         (skip_prologue_sal): Likewise.
4575         (find_function_alias_target): Likewise.
4576         (find_gnu_ifunc): Likewise.
4577         * stack.c (find_frame_funname): Likewise.
4578         * symtab.c (fixup_symbol_section): Likewise.
4579         (find_function_start_sal): Likewise.
4580         (skip_prologue_sal): Likewsie.
4581         (find_function_alias_target): Likewise.
4582         (find_gnu_ifunc): Likewise.
4583         * tracepoint.c (info_scope_command): Likewise.
4584         * value.c (value_fn_field): Likewise.
4585
4586         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
4587         in place of find_pc_partial_function.
4588         * blockframe.c (find_function_entry_range_from_pc): New function.
4589         * symtab.h (find_function_entry_range_from_pc): Declare and document.
4590         * objfiles.c (objfile_relocate1): Relocate start and end addresses
4591         for each range in a block.
4592
4593
4594 2018-08-23  Xavier Roirand  <roirand@adacore.com>
4595
4596         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
4597         incrementation.
4598
4599 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4600
4601         * solib-svr4.c (read_program_headers_from_bfd): Return
4602         gdb::optional<gdb::byte_vector>.
4603         (svr4_exec_displacement): Adjust.
4604
4605 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4606
4607         * solib-svr4.c (read_program_header): Return
4608         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
4609         (find_program_interpreter): Return
4610         gdb::optional<gdb::byte_vector>.
4611         (scan_dyntag_auxv): Adjust.
4612         (enable_break): Adjust.
4613         (svr4_exec_displacement): Adjust.
4614
4615 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4616
4617         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
4618         * inf-child.c (inf_child_target::terminal_save_inferior): New.
4619
4620 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4621
4622         * guile/scm-string.c (gdbscm_scm_from_printf): Use
4623         string_vprintf.
4624         * guile/scm-utils.c (gdbscm_printf): Likewise.
4625         * serial.c (serial_printf): Likewise.
4626         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
4627
4628 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
4629
4630         * stack.c (print_frame): Print frame architecture when printing on
4631         an MI output.
4632         * NEWS: Mention new "arch" attribute in frame output.
4633
4634 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4635
4636         * arch/aarch64.h (aarch64_regnum): Update comment.
4637
4638 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4639
4640         * NEWS: Add SVE to 8.2 section.
4641
4642 2018-08-21  Pedro Alves  <palves@redhat.com>
4643
4644         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
4645         out from gdbscm_parse_function_args.
4646         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
4647         gdbscm_parse_function_args_1.
4648
4649 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
4650
4651         PR gdb/17816
4652         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
4653         operator.
4654
4655 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
4656
4657         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
4658
4659 2018-08-19  Michael Spang  <spang@google.com>
4660
4661         PR gdb/11786
4662         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
4663         for PT_TLS segments.
4664
4665 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
4666
4667         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
4668         dwarf_variable_value.
4669         * dwarf2-frame.c (class dwarf_expr_executor):
4670         Add override for dwarf_variable_value.
4671         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
4672         (class symbol_needs_eval_context): Likewise.
4673         (indirect_synthetic_pointer): Add forward declaration.
4674         (sect_variable_value): New function.
4675         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
4676         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
4677         for DW_OP_GNU_variable_value.
4678
4679 2018-08-16  Tom Tromey  <tom@tromey.com>
4680
4681         * top.c (read_command_file): Update.
4682         (command_line_input): Remove "repeat" argument.
4683         * ada-lang.c (get_selections): Update.
4684         * linespec.c (decode_line_2): Update.
4685         * defs.h (command_line_input): Remove argument.
4686         * cli/cli-script.c (read_next_line): Update.
4687         * python/py-gdb-readline.c: Update.
4688
4689 2018-08-17  Tom Tromey  <tom@tromey.com>
4690
4691         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
4692         command_line_input.
4693
4694 2018-08-15  Tom Tromey  <tom@tromey.com>
4695
4696         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
4697
4698 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
4699
4700         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
4701         If used, use find_pc_partial_function to find address range
4702         to disassemble.
4703         * mi/mi-main.c (mi_cmd_list_features): Report
4704         "data-disassemble-a-option" feature.
4705         * NEWS: Mention new -data-disassemble option -a.
4706
4707 2018-08-13  Tom Tromey  <tom@tromey.com>
4708
4709         * common/common-defs.h (_FORTIFY_SOURCE): Define.
4710
4711 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4712
4713         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
4714         (aarch64_linux_collect_sve_regset): Likewise.
4715         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
4716         * regcache.h (regcache_map_entry_size): New function.
4717
4718 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4719
4720         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
4721         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
4722         (SVE_HEADER_VL_LENGTH): Likewise.
4723         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
4724         (SVE_HEADER_FLAGS_LENGTH): Likewise.
4725         (SVE_HEADER_RESERVED_LENGTH): Likewise.
4726         (SVE_HEADER_SIZE_OFFSET): Likewise.
4727         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
4728         (SVE_HEADER_VL_OFFSET): Likewise.
4729         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
4730         (SVE_HEADER_FLAGS_OFFSET): Likewise.
4731         (SVE_HEADER_RESERVED_OFFSET): Likewise.
4732         (SVE_HEADER_SIZE): Likewise.
4733         (aarch64_linux_core_read_vq): Add function.
4734         (aarch64_linux_core_read_description): Check for SVE section.
4735
4736 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4737
4738         * aarch64-fbsd-tdep.c
4739         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
4740         collect_size.
4741         * aarch64-linux-tdep.c
4742         (aarch64_linux_iterate_over_regset_sections): Likewise.
4743         * alpha-linux-tdep.c
4744         (alpha_linux_iterate_over_regset_sections):
4745         * alpha-nbsd-tdep.c
4746         (alphanbsd_iterate_over_regset_sections): Likewise.
4747         * amd64-fbsd-tdep.c
4748         (amd64fbsd_iterate_over_regset_sections): Likewise.
4749         * amd64-linux-tdep.c
4750         (amd64_linux_iterate_over_regset_sections): Likewise.
4751         * arm-bsd-tdep.c
4752         (armbsd_iterate_over_regset_sections): Likewise.
4753         * arm-fbsd-tdep.c
4754         (arm_fbsd_iterate_over_regset_sections): Likewise.
4755         * arm-linux-tdep.c
4756         (arm_linux_iterate_over_regset_sections): Likewise.
4757         * corelow.c (get_core_registers_cb): Likewise.
4758         (core_target::fetch_registers): Likewise.
4759         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
4760         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
4761         * gdbarch.h (void): Regenerate.
4762         * gdbarch.sh: Add supply_size and collect_size.
4763         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
4764         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
4765         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
4766         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
4767         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
4768         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
4769         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
4770         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
4771         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
4772         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
4773         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
4774         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
4775         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
4776         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
4777         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
4778         Likewise.
4779         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
4780         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
4781         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
4782         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
4783         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
4784         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
4785         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
4786         Likewise.
4787         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
4788         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4789         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4790         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4791         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4792         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4793         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4794         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4795
4796 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
4797
4798         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4799         with string_printf.
4800
4801 2018-08-10  Keith Seitz  <keiths@redhat.com>
4802
4803         * compile/compile-c-support.c (add_code_header, add_code_footer):
4804         Move into policy class.
4805         (c_push_user_expression, pop_user_expression_nop)
4806         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4807         (compile_program): New host class.
4808         (c_compile_program): New typedef.
4809         (c_compute_porgram): Use c_compile_program.
4810
4811 2018-08-10  Keith Seitz  <keiths@redhat.com>
4812
4813         * compile/compile-internal.h (compile_instance::~compile_instance):
4814         Remove calls to htab_delete.
4815         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4816         * compile.c (compile_instance::compile_instance): Initialize
4817         htab unique pointers.
4818         (compile_instance::get_cached_type, compile_instance::insert_type)
4819         (compile_instance::error_symbol_once): Update for unique_ptr.
4820
4821 2018-08-10  Keith Seitz  <keiths@redhat.com>
4822
4823         * compile/compile-c-symbols.c (struct symbol_error)
4824         (hash_symbol_error, eq_symbol_error, del_symbol_error)
4825         (compile_instance::insert_symbol_error)
4826         (compile_instance::error_symbol_once): Move to ...
4827         * compile/compile.c: ... here.
4828
4829 2018-08-10  Keith Seitz  <keiths@redhat.com>
4830
4831         * compile/compile-c-support.c (c_get_compile_context): Use `new'
4832         instead of `new_compile_instance'.
4833         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4834         Update description.
4835         If the symbol error map is not initialized, create it.
4836         (generate_c_for_for_one_symbol): Do not check/initialize
4837         the symbol error map.
4838         * compile/compile-c-types.c (compile_c_instance): Make a class.
4839         Update all callers.
4840         (compile_instance::compile_instance): Initialize the type cache.
4841         (get_cached_type): New function.
4842         (insert_type): Update description.
4843         (compile_c_instance::m_default_cflags): Define.
4844         (convert_type): Update description.  Use get_cached_type.
4845         (delete_instance): Moved to destructor.
4846         (new_compile_instance): Moved to constructor.
4847         * compile/compile-c.h (compile_c_instance): Make class inheriting
4848         from compile_instance.
4849         <base>: Remove field.
4850         <type_map, symbol_err_map>: Move to base class.
4851         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4852         * compile/compile-internal.h (compile_instance): Make class.
4853         <type_map_t, symbol_err_map_t>: Define.
4854         <fe>: Rename to `m_gcc_fe'.
4855         <scope, block, gcc_target_options>: Add `m_' prefix.
4856         <m_type_map, m_symbol_err_map>: New fields, moved from
4857         compile_c_instance.
4858         <destroy>: Remove.
4859         (convert_type, new_compile_instance): Remove.
4860         * compile/compile.c (cleanup_compile_instance): Remove.
4861         (compile_to_object): Use unique_ptr to eliminate cleanups.
4862         (compile_instance::set_print_callback, compile_instance::version)
4863         (compile_instance::set_verbose)
4864         (compile_instance::set_driver_filename)
4865         (compile_instance::set_triplet_regexp)
4866         (compile_instance::set_arguments)
4867         (compile_instance::set_source_file)
4868         (compile_instance::compile): Define.
4869
4870 2018-08-10  Keith Seitz  <keiths@redhat.com>
4871
4872         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4873         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4874         gcc-c-fe.def to define C plugin.
4875         (delete_instance): Delete `c_plugin'.
4876         (new_compile_instance): Initialize `c_plugin'.
4877         * compile/compile-c.h: Include gcc_c_plugin.h.
4878         (struct compile_c_instance) <c_plugin>: New member.
4879         * gcc-c-plugin.h: New file.
4880         Update all callers with API change.
4881
4882 2018-08-10  Keith Seitz  <keiths@redhat.com>
4883
4884         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4885         (HFILES_NO_SRCDIR): ... to here.
4886         Add compile-internal.h and compile-c.h.
4887         * compile/compile-c-support.c: Include compile-c.h.
4888         * compile/compile-c-symbols.c: Include compile-c.h.
4889         (generate_c_for_variable_locations): Update comment.
4890         * compile/compile-c-types.c: Include compile-c.h.
4891         * compile/compile-c.h: New file -- moved C language declarations
4892         from other files here.
4893         * compile/compile-internal.h: Do not include hashtab.h or
4894         common/enum-flags.h.
4895         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4896         (gcc_convert_symbol, gcc_symbol_address)
4897         (generate_c_for_variable_locations, c_get_mode_for_size)
4898         (c_get_range_decl_name): Definitions moved to compile-c.h.
4899         * compile/compile-loc2c.c: Include compile-c.h.
4900
4901 2018-08-10  Keith Seitz  <keiths@redhat.com>
4902
4903         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4904         (c_symbol_substitution_name): ... this.
4905         Update all callers.
4906
4907 2018-08-10  Keith Seitz  <keiths@redhat.com>
4908
4909         * compile/compile-c-support.c (c_compute_program): Use
4910         unique_xmalloc_ptr to eliminate cleanup.
4911         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4912         Return a unique_xmalloc_ptr and eliminate cleanup.
4913         * compile/compile-internal.h (generate_c_for_variable_locations):
4914         Return unique_xmalloc_ptr and update description.
4915
4916 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4917
4918         * corelow.c (core_target::get_core_register_section): Rename
4919         min_size to section_min_size.
4920
4921 2018-08-09  Jim Wilson  <jimw@sifive.com>
4922
4923         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4924         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4925         * NEWS: Mention new GNU/Linux RISC-V target.
4926         * configure.host: Add riscv*-*-linux*.
4927         * configure.nat: Add riscv*.
4928         * configure.tgt: Add riscv*-*-linux*.
4929         * riscv-linux-nat.c: New file.
4930         * riscv-linux-tdep.c: New file.
4931
4932 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4933
4934         * infrun.c (resume): Make static, add forward declaration.
4935         (proceed): Update header comment.
4936         * infrun.h (resume): Delete declaration.
4937
4938 2018-08-09  Tom Tromey  <tom@tromey.com>
4939
4940         * riscv-tdep.h: Minor formatting fixes.
4941
4942 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4943
4944         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4945         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4946         (test_mkdir_recursive): Likewise.
4947         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4948
4949 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4950
4951         * valarith.c (value_subscripted_rvalue): If an array is not in
4952         memory, and we don't know the upper bound, then we can't know that
4953         the requested element exists or not.
4954
4955 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4956
4957         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4958         (target_options_to_string): Add comment.
4959
4960 2018-08-08  Tom Tromey  <tom@tromey.com>
4961
4962         * unittests/scoped_mmap-selftests.c: Check result of "write".
4963
4964 2018-08-08  Jim Wilson  <jimw@sifive.com>
4965
4966         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4967         (decode_register_index_short): New.
4968         (decode_j_type_insn, decode_cj_type_insn): New.
4969         (decode_b_type_insn, decode_cb_type_insn): New.
4970         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4971         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4972         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4973         is_c_sw_insn instead of is_sw_insn.
4974         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4975         (riscv_software_single_step): New.
4976         * riscv-tdep.h (riscv_software_single_step): Declare.
4977
4978         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4979         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4980
4981 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4982
4983         PR gdb/18050:
4984         * target.c (dispose_inferior): Don't dispose of inferiors that are
4985         already killed.
4986
4987 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4988
4989         * remote.c (remote_target::download_tracepoint): Change char* to
4990         const char*.
4991
4992 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4993
4994         * target.h (target_options_to_string): Return an std::string.
4995         * target.c (str_comma_list_concat_elem): Return void, use
4996         std::string.
4997         (do_option): Likewise.
4998         (target_options_to_string): Return an std::string.
4999         * linux-nat.c (linux_nat_target::wait): Adjust.
5000         * target-debug.h (target_debug_print_options): Adjust.
5001
5002 2018-08-07  Tom Tromey  <tom@tromey.com>
5003
5004         * Makefile.in (CPPFLAGS): New variable.
5005         (INTERNAL_CPPFLAGS): Use it.
5006
5007 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5008
5009         * NEWS: Mention the index cache.
5010
5011 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5012
5013         * common/pathstuff.h (get_standard_cache_dir): New.
5014         * common/pathstuff.c (get_standard_cache_dir): New.
5015         * build-id.h (build_id_to_string): New.
5016         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5017         DEBUG_STR_SUFFIX): Move to here.
5018         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5019         DEBUG_STR_SUFFIX): Move from there.
5020         (write_psymtabs_to_index): Make non-static, add basename
5021         parameter.  Write to temporary files, rename when done.
5022         (save_gdb_index_command): Adjust call to
5023         write_psymtabs_to_index.
5024         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5025         field.
5026         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5027         (get_gdb_index_contents_from_cache): New.
5028         (get_gdb_index_contents_from_cache_dwz): New.
5029         (dwarf2_initialize_objfile): Read index from cache.
5030         (dwarf2_build_psymtabs): Save to index.
5031         * dwarf-index-cache.h: New file.
5032         * dwarf-index-cache.c: New file.
5033         * dwarf-index-write.h: New file.
5034
5035 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5036
5037         * gnulib/aclocal.m4: Re-generate.
5038         * gnulib/config.in: Re-generate.
5039         * gnulib/configure: Re-generate.
5040         * gnulib/import/Makefile.am: Re-generate.
5041         * gnulib/import/Makefile.in: Re-generate.
5042         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5043         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5044         * gnulib/import/m4/mkdir.m4: New file.
5045         * gnulib/import/mkdir.c: New file.
5046         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5047         module.
5048
5049 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5050
5051         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5052         * common/scoped_mmap.c: New file.
5053         * common/scoped_mmap.h (destroy): New method.
5054         (~scoped_mmap, reset): Use destroy.
5055         (scoped_mmap): New move constructor.
5056         (mmap_file): New declaration.
5057         * unittests/scoped_mmap-selftests.c (test_normal,
5058         test_invalid_filename, run_tests): New functions.
5059         (_initialize_scoped_mmap_selftests): Register selftest.
5060
5061 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5062
5063         * dwarf2read.c (read_gdb_index_from_section): Rename to...
5064         (read_gdb_index_from_buffer): ... this.  Remove section
5065         parameter, add buffer parameter.
5066         (get_gdb_index_contents_ftype,
5067         get_gdb_index_contents_dwz_ftype): New typedefs.
5068         (dwarf2_read_gdb_index): Add callback parameters to get the
5069         index contents.
5070         (get_gdb_index_contents_from_section): New.
5071         (dwarf2_initialize_objfile): Update call to
5072         dwarf2_read_gdb_index.
5073
5074 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5075
5076         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5077         (gdb_open_cloexec): Likewise.
5078         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5079         (commandline_from_pid): Likewise.
5080         (linux_xfer_osdata_threads): Likewise.
5081         (linux_xfer_osdata_fds): Likewise.
5082         * ada-lang.c (is_package_name): Likewise.
5083         * auxv.c (procfs_xfer_auxv): Likewise.
5084         * breakpoint.c (print_one_breakpoint_location): Use
5085         uiout::field_fmt.
5086         (print_one_catch_solib): Use string_printf.
5087         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5088         (add_pe_forwarded_sym): Likewise.
5089         * dwarf2read.c (create_type_unit_group): Likewise.
5090         (build_error_marker_type): Likewise.
5091         * infcall.c (get_function_name): Likewise.
5092         * valprint.c (print_converted_chars_to_obstack): Likewise.
5093         * xtensa-tdep.c (xtensa_register_type): Likewise.
5094
5095 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5096
5097         * remote.c (remote_target::download_tracepoint): Fix format
5098         string errors.
5099
5100 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5101
5102         * tracefile.c: Include common/byte-vector.h.
5103         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5104         with trace_regblock_size if needed.  Update uses of buf.
5105
5106 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5107
5108         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5109         std::vector<unsigned char>.
5110         * tracepoint.c (collection_list::collection_list): Remove
5111         m_regs_mask initializer from initializer list.  Resize
5112         m_regs_mask using the largest remote register number.
5113         (collection_list::add_remote_register): Remove size check on
5114         m_regs_mask.  Use at to access element.
5115         (collection_list::stringify): Change type of temp_buf to
5116         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5117         stringify the register mask.  Use pack_hex_byte for the register
5118         mask.
5119
5120 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5121
5122         * tracepoint.h (class collection_list) <add_register>: Remove.
5123         <add_remote_register, add_ax_registers, add_local_register>:
5124         Declare.
5125         <add_memrange>: Add scope parameter.
5126         * tracepoint.c (encode_actions_1): Likewise.
5127         (collection_list::add_register): Rename to ...
5128         (collection_list::add_remote_register): ... this.  Update
5129         comment.
5130         (collection_list::add_ax_registers, add_local_register): New
5131         methods.
5132         (collection_list::add_memrange): Add scope parameter.  Call
5133         add_local_register instead of add_register.
5134         (finalize_tracepoint_aexpr): New function.
5135         (collection_list::collect_symbol): Update calls to add_memrange.
5136         Call add_local_register instead of add_register.  Call
5137         add_ax_registers.  Call finalize_tracepoint_aexpr.
5138         (encode_actions_1): Get remote regnos for $reg action.  Call
5139         add_remote_register, add_ax_registers, and add_local_register.
5140         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5141         (validate_actionline): Call finalize_tracepoint_aexpr.
5142
5143 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5144
5145         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5146         Replace array buf with gdb::char_vector buf, of size
5147         get_remote_packet_size ().  Replace references to buf and
5148         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5149         and xsnprintf with snprintf.  Raise errors if the buffer is too
5150         small.
5151
5152 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5153
5154         * remote.c (remote_target::download_tracepoint): Fix the has_more
5155         predicate in the QTDP action list iteration.
5156
5157 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5158
5159         * remote.c (remote_target::download_tracepoint): Fix indentation
5160         in for block.
5161
5162 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5163
5164         * proc-api.c (_initialize_proc_api): Remove c, unused.
5165         * procfs.c (procfs_init_inferior): Remove signals, unused.
5166         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5167         unused.
5168
5169 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5170             Andrew Burgess  <andrew.burgess@embecosm.com>
5171
5172         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5173         'W_STOPCODE (0)' as this could be ambiguous.
5174
5175 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5176
5177         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5178         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5179         "ai_socktype").
5180
5181 2018-08-02  Tom Tromey  <tom@tromey.com>
5182
5183         PR symtab/16842.
5184         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5185         symbols.
5186         (process_structure_scope): Likewise.
5187
5188 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5189
5190         PR gdb/22629:
5191         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5192         kill inferior.
5193
5194 2018-08-02  Tom Tromey  <tom@tromey.com>
5195
5196         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5197         (darwin_suspend_inferior, darwin_resume_inferior)
5198         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5199         (darwin_check_new_threads): Check result of get_darwin_inferior.
5200
5201 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5202
5203         GDB 8.1.1 released.
5204
5205 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5206
5207         * varobj.c (varobj_get_path_expr_parent): Report an error if
5208         parent is a dynamic varobj.
5209
5210 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5211
5212         * gnulib/aclocal.m4: Re-generate.
5213         * gnulib/config.in: Re-generate.
5214         * gnulib/configure: Re-generate.
5215         * gnulib/import/Makefile.in: Re-generate.
5216         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5217         * gnulib/import/m4/onceonly.m4: Re-generate.
5218
5219 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5220
5221         * target-descriptions.c (struct xml_test_tdesc): New.
5222         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5223         (record_xml_tdesc): Update.
5224         (maintenance_check_xml_descriptions): Update.
5225         * target-descriptions.h (record_xml_tdesc): Update comment.
5226
5227 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5228
5229         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5230         checking array bounds are defined.
5231
5232 2018-07-30  Tom Tromey  <tom@tromey.com>
5233
5234         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5235         irreflexivity violation.
5236
5237 2018-07-30  Tom Tromey  <tom@tromey.com>
5238
5239         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5240         * value.c (unpack_long): Remove lint code.
5241         * valops.c (value_ind): Remove lint code.
5242         * valarith.c (value_x_binop, value_x_unop, value_equal)
5243         (value_pos): Remove lint code.
5244
5245 2018-07-28  Tom de Vries  <tdevries@suse.de>
5246
5247         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5248         with undefined upper bound as <optimized out>.
5249
5250 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5251
5252         * gcore.in: Rename variable "name" to "prefix".  Expand
5253         "usage" text.
5254
5255 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5256
5257         * windows-nat.c (windows_nat_target::create_inferior): Update to
5258         call close() in global namespace.
5259
5260 2018-07-26  Tom Tromey  <tom@tromey.com>
5261
5262         * dwarf-index-write.c (add_address_entry): Don't add objfile
5263         offsets.
5264         * dbxread.c (find_stab_function): Rename from
5265         find_stab_function_addr.  Return a bound_minimal_symbol.
5266         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5267         Don't add objfile offsets.
5268         (end_psymtab): Use raw_text_low, raw_text_high,
5269         MSYMBOL_VALUE_RAW_ADDRESS.
5270         (read_ofile_symtab): Update.
5271         (process_one_symbol): Update.
5272         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5273         offsets.
5274         (dw2_relocate): Remove.
5275         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5276         searching addrmap.
5277         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5278         Update.
5279         (process_psymtab_comp_unit_reader, add_partial_symbol)
5280         (add_partial_subprogram, dwarf2_ranges_read): Update.
5281         (load_partial_dies): Update.
5282         (add_address_entry): Don't add objfile offsets.
5283         (dwarf2_build_include_psymtabs): Update.
5284         (create_addrmap_from_aranges): Don't add objfile offsets.
5285         (dw2_find_pc_sect_compunit_symtab): Update.
5286         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5287         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5288         Update.
5289         (parse_partial_symbols): Don't add objfile offsets.  Use
5290         raw_text_low, raw_text_high.  Update.
5291         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5292         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5293         or call 'relocate' quick function.  Clear psymbol_map.
5294         * psympriv.h (struct partial_symbol) <address>: Add section
5295         offset.
5296         <set_unrelocated_address>: Rename from set_address.
5297         <raw_text_low, raw_text_high>: New methods.
5298         <text_low, text_high>: Add objfile parameter.
5299         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5300         set_unrelocated_address.
5301         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5302         (find_pc_psymbol): Update.
5303         (fixup_psymbol_section, relocate_psymtabs): Remove.
5304         (dump_psymtab, psym_functions): Update.
5305         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5306         parameter.
5307         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5308         (start_psymtab_common): Update.
5309         * symfile-debug.c (debug_qf_relocate): Remove.
5310         (debug_sym_quick_functions): Update.
5311         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5312         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5313         Update.
5314
5315 2018-07-26  Tom Tromey  <tromey@redhat.com>
5316
5317         * dbxread.c (end_psymtab): Use text_high_valid and
5318         text_low_valid.
5319         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5320         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5321         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5322         Update comment.
5323         <text_low_valid, text_high_valid>: New fields.
5324         <set_text_low, set_text_high>: Update.
5325         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5326
5327 2018-07-26  Tom Tromey  <tom@tromey.com>
5328
5329         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5330         Update.
5331         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5332         textlow and texthigh fields.
5333         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5334         Update.
5335         * mdebugread.c (parse_lines, parse_partial_symbols)
5336         (psymtab_to_symtab_1): Update.
5337         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5338         Rename fields.  Update comment.  Now private.
5339         <text_low, text_high, set_text_low, set_text_high>: New methods.
5340         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5341         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5342         (start_psymtab_common, maintenance_info_psymtabs)
5343         (maintenance_check_psymtabs): Update.
5344         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5345         texthigh fields.
5346         (scan_xcoff_symtab): Update.
5347
5348 2018-07-26  Tom Tromey  <tromey@redhat.com>
5349
5350         * psympriv.h (struct partial_symbol) <unrelocated_address,
5351         address, set_address>: New methods.
5352         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5353         (fixup_psymbol_section, relocate_psymtabs): Update.
5354         (print_partial_symbols): Add 'objfile' parameter.  Update.
5355         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5356         Update.
5357
5358 2018-07-26  Tom Tromey  <tom@tromey.com>
5359
5360         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5361         (debug_names::write_psymbols): Update.
5362         * psympriv.h (struct partial_symbol): Derive from
5363         general_symbol_info.
5364         <obj_section>: New method.
5365         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5366         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5367         (find_pc_sect_psymbol, fixup_psymbol_section)
5368         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5369         (print_partial_symbols, recursively_search_psymtabs)
5370         (compare_psymbols, psymbol_hash, psymbol_compare)
5371         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5372         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5373
5374 2018-07-26  Tom Tromey  <tromey@redhat.com>
5375
5376         * dbxread.c (end_psymtab): Remove dead code.
5377
5378 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5379
5380         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5381         DWARF unwinders are disabled.
5382         * dwarf2-frame.c: Add dwarf2read.h include.
5383         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5384         disabled.
5385         (dwarf2_frame_unwinders_enabled_p): Define.
5386         (show_dwarf_unwinders_enabled_p): New function.
5387         (_initialize_dwarf2_frame): Register switch to control DWARF
5388         unwinder use.
5389         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5390         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5391         (show_dwarf_cmdlist): Remove static keyword.
5392         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5393         (show_dwarf_cmdlist): Declare.
5394         * NEWS: Document new feature.
5395
5396 2018-07-26  Tom de Vries  <tdevries@suse.de>
5397
5398         PR breakpoints/23366
5399         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5400
5401 2018-07-26  Tom de Vries  <tdevries@suse.de>
5402
5403         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5404         DW_AT_count can't be translated to a dynamic prop.
5405
5406 2018-07-25  Tom de Vries  <tdevries@suse.de>
5407
5408         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5409         try/catch.
5410
5411 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5412
5413         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5414
5415 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5416
5417         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5418
5419 2018-07-24  Keith Seitz  <keiths@redhat.comt
5420
5421         PR symtab/23010
5422         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5423         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5424         instead of add_symbol_to_list.
5425         (read_file_scope): Call prepare_one_comp_unit before reading
5426         any other DIEs.
5427
5428 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5429
5430         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5431
5432 2018-07-24  Tom Tromey  <tom@tromey.com>
5433
5434         * utils.c (malloc, realloc, free): Don't declare.
5435         * configure, config.in: Rebuild.
5436         * configure.ac: Don't check for declarations of free, malloc, or
5437         realloc.
5438
5439 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5440
5441         * aarch64-linux-nat.c
5442         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5443         variable.
5444         * arm-linux-nat.c (fetch_regs): Likewise.
5445         (store_regs): Likewise.
5446         (fetch_vfp_regs): Likewise.
5447         (store_vfp_regs): Likewise.
5448         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5449         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5450         (arm_linux_nat_target::insert_watchpoint): Likewise.
5451         (arm_linux_nat_target::remove_watchpoint): Likewise.
5452         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5453         Likewise.
5454         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5455         Likewise.
5456         * ppc-linux-nat.c (fetch_register): Likewise.
5457         (fetch_all_gp_regs): Likewise.
5458         (fetch_ppc_registers): Likewise.
5459         (store_all_gp_regs): Likewise.
5460         (store_ppc_registers): Likewise.
5461         (hwdebug_insert_point): Likewise.
5462         (can_use_watchpoint_cond_accel): Likewise.
5463         * remote-sim.c (gdb_os_write_stdout): Likewise.
5464
5465 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5466             Tom Tromey  <tom@tromey.com>
5467
5468         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5469         test for it.
5470         * configure: Rebuild.
5471
5472 2018-07-22  Tom Tromey  <tom@tromey.com>
5473
5474         * regformats/regdat.sh: Define xmltarget_${name} inside
5475         #ifndef IN_PROCESS_AGENT.
5476
5477 2018-07-22  Tom Tromey  <tom@tromey.com>
5478
5479         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5480
5481 2018-07-22  Tom Tromey  <tom@tromey.com>
5482
5483         * symfile.c (reread_symbols): Notify iter, not objfile.
5484
5485 2018-07-22  Tom Tromey  <tom@tromey.com>
5486
5487         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5488         Use arch_ops.
5489         (ravenscar_thread_target::prepare_to_store): Likewise.
5490
5491 2018-07-22  Tom Tromey  <tom@tromey.com>
5492
5493         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5494         unused variable.  Call value_fetch_lazy when needed.
5495         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5496         Remove unused variable.  Call value_fetch_lazy when needed.
5497
5498 2018-07-22  Tom Tromey  <tom@tromey.com>
5499
5500         * m32c-tdep.c (mark_dma): Return void.
5501         (make_regs): Remove unused declarations.
5502
5503 2018-07-22  Tom Tromey  <tom@tromey.com>
5504
5505         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5506         cmdscm_get_valid_command_smob_arg_unsafe for effect.
5507         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5508         bkscm_get_valid_block_smob_arg_unsafe for effect.
5509
5510 2018-07-22  Tom Tromey  <tom@tromey.com>
5511
5512         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5513         value_type.
5514
5515 2018-07-22  Tom Tromey  <tom@tromey.com>
5516
5517         * windows-nat.c (saved_context): Conditionally define.
5518         * remote.c (remote_target::remote_btrace_maybe_reopen):
5519         Conditionally declare "warned".
5520         * inflow.c (sigquit_ours): Conditionally define.
5521         (new_tty): Move "tty" declaration inside #if.
5522         * guile/guile.c (guile_datadir): Conditionally define.
5523         * charset.c (set_be_le_names): Move some declarations inside #if.
5524         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
5525         #if.
5526         (parse_xml_btrace_conf): Likewise.
5527
5528 2018-07-22  Tom Tromey  <tom@tromey.com>
5529
5530         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
5531
5532 2018-07-22  Tom Tromey  <tom@tromey.com>
5533
5534         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
5535         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
5536         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
5537         * buildsym-legacy.c (get_macro_table): Remove unused variable.
5538         * stack.c (frame_apply_level_command): Remove unused variable.
5539         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
5540         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
5541         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
5542         unused variable.
5543         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
5544         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
5545         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
5546         variable.
5547         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
5548         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
5549         variable.
5550         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
5551         Remove unused variable.
5552         * cli/cli-script.c (recurse_read_control_structure): Remove unused
5553         variable.
5554         * common/tdesc.c (print_xml_feature::visit): Remove unused
5555         variable.
5556         * compile/compile-object-load.c (store_regs): Remove unused
5557         variables.
5558         * complaints.c (clear_complaints): Remove unused variable.
5559         * corelow.c (core_target_open): Remove unused variable.
5560         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
5561         variable.
5562         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
5563         variable.
5564         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
5565         variable.
5566         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
5567         variable.
5568         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
5569         variable.
5570         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
5571         variable.
5572         * ia64-tdep.c (examine_prologue): Remove unused variable.
5573         * infcall.c (run_inferior_call): Remove unused variable.
5574         * inferior.c (exit_inferior): Remove unused variable.
5575         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
5576         * linespec.c (decode_line_2): Remove unused variable.
5577         * linux-nat.c (super_close): Remove.
5578         * linux-tdep.c (linux_info_proc): Remove unused variable.
5579         * mi/mi-main.c (mi_execute_command): Remove unused variable.
5580         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
5581         Remove unused variable.
5582         * parse.c (find_minsym_type_and_address): Remove unused variable.
5583         * printcmd.c (info_symbol_command, printf_floating): Remove unused
5584         variable.
5585         * python/py-breakpoint.c (bppy_set_commands): Remove unused
5586         variable.
5587         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
5588         variables.
5589         * record-btrace.c (record_btrace_target::store_registers): Remove
5590         unused variable.
5591         (cmd_show_record_btrace_cpu): Remove unused variable.
5592         * riscv-tdep.c (riscv_register_reggroup_p)
5593         (riscv_push_dummy_call, riscv_return_value): Remove unused
5594         variable.
5595         * rust-exp.y (literal): Remove unused variable.
5596         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
5597         unused variable.
5598         <STRUCTOP_ANONYMOUS>: Likewise.
5599         * s390-linux-tdep.c (s390_linux_init_abi_31)
5600         (s390_linux_init_abi_64): Remove unused variable.
5601         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
5602         (file_select_thread, net_windows_open, _initialize_ser_windows):
5603         Remove unused variables.
5604         * symtab.c (find_pc_sect_line): Remove unused variable.
5605         * target-memory.c (compute_garbled_blocks): Remove unused
5606         variable.
5607         (target_write_memory_blocks): Remove unused variable.
5608         * target.c (target_stack::unpush): Remove unused variables.
5609         * tracepoint.c (start_tracing, all_tracepoint_actions)
5610         (merge_uploaded_trace_state_variables)
5611         (print_one_static_tracepoint_marker): Remove unused variable.
5612         * unittests/basic_string_view/element_access/char/1.cc (test01):
5613         Remove unused variable.
5614         * windows-nat.c (windows_continue, windows_add_all_dlls)
5615         (do_initial_windows_stuff, windows_nat_target::create_inferior):
5616         Remove unused variables.
5617
5618 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
5619
5620         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
5621         attr_profile in HAVE_ELF.
5622         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
5623         HAVE_ELF.
5624
5625 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
5626
5627         * frame.c (frame_register_unwind): Change parameter name.
5628         (frame_unwind_register): Likewise.
5629         (frame_unwind_register_value): Likewise.
5630         (frame_unwind_register_signed): Likewise.
5631         (frame_unwind_register_unsigned): Likewise.
5632         * frame.h (frame_register_unwind): Likewise.
5633         (frame_unwind_register): Likewise.
5634         (frame_unwind_register_value): Likewise.
5635         (frame_unwind_register_signed): Likewise.
5636         (frame_unwind_register_unsigned): Likewise.
5637         (frame_unwind_arch): Likewise.
5638
5639 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5640
5641         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
5642         ISA maintenance.
5643
5644 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5645
5646         * mips-linux-nat.c (mips_linux_nat_target::read_description):
5647         Call `get_ptrace_pid' rather than extracting the ptrace PID by
5648         hand.
5649
5650 2018-07-20  Keith Seitz  <keiths@redhat.com>
5651
5652         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
5653         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
5654         m_compunit_symtab, m_language>: Add "m_" prefix.
5655         Update all uses.
5656         * buildsym.c: Update all uses.
5657
5658 2018-07-20  Tom Tromey  <tom@tromey.com>
5659
5660         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
5661         * buildsym.h (record_line_ftype): Remove typedef.
5662
5663 2018-07-20  Tom Tromey  <tom@tromey.com>
5664
5665         * buildsym-legacy.h (augment_type_symtab): Don't declare.
5666         (end_expandable_symtab): Likewise.
5667         (end_symtab_get_static_block): Likewise.
5668         (end_symtab_from_static_block): Likewise.
5669         * buildsym-legacy.c (augment_type_symtab): Remove.
5670         (end_expandable_symtab): Remove.
5671         (end_symtab_get_static_block): Remove.
5672         (end_symtab_from_static_block): Remove.
5673
5674 2018-07-20  Tom Tromey  <tom@tromey.com>
5675
5676         * dwarf2read.c: Include buildsym.h.
5677         (struct dwarf2_cu) <builder>: New method.
5678         (fixup_go_packaging): Update.
5679         (process_full_comp_unit, process_full_type_unit): Update.  Don't
5680         use scoped_free_pendings.
5681         (using_directives): Add "cu" parameter, remove "language".
5682         (read_import_statement, setup_type_unit_groups, )
5683         (read_func_scope, read_lexical_block_scope)
5684         (dwarf2_record_block_ranges, read_namespace): Update.
5685         (lnp_state_machine::lnp_state_machine): Add cu parameter.
5686         (lnp_state_machine::handle_end_sequence): Update.
5687         (class lnp_state_machine) <m_cu>: New member.
5688         <m_record_line_callback>: Remove.
5689         <m_currently_recording_lines>: New member.
5690         (lnp_state_machine::handle_set_file): Update.
5691         (noop_record_line): Remove.
5692         (dwarf_record_line_p): Add cu parameter.
5693         (dwarf_record_line_1, dwarf_finish_line): Likewise.
5694         (lnp_state_machine::record_line)
5695         (lnp_state_machine::lnp_state_machine)
5696         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5697         (dwarf_decode_lines): Update.
5698         (dwarf2_start_subfile): Add cu parameter.
5699         (dwarf2_start_symtab, new_symbol): Update.
5700         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
5701         Remove dwarf2_per_objfile parameter.
5702         (dwarf_decode_macros): Update.
5703
5704 2018-07-20  Tom Tromey  <tom@tromey.com>
5705
5706         * stabsread.c (define_symbol): Update.
5707         * buildsym-legacy.h (get_buildsym_compunit): Declare.
5708         * dwarf2read.c (new_symbol): Update.
5709         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
5710         * cp-namespace.c: Include buildsym.h.
5711         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
5712         * buildsym-legacy.c (get_buildsym_compunit): New function.
5713
5714 2018-07-20  Tom Tromey  <tom@tromey.com>
5715
5716         * xcoffread.c: Include buildsym-legacy.h.
5717         * windows-nat.c: Include buildsym-legacy.h.
5718         * stabsread.c: Include buildsym-legacy.h.
5719         * mdebugread.c: Include buildsym-legacy.h.
5720         * buildsym-legacy.h: New file.
5721         * buildsym-legacy.c: New file, from buildsym.c.
5722         * go32-nat.c: Include buildsym-legacy.h.
5723         * dwarf2read.c: Include buildsym-legacy.h.
5724         * dbxread.c: Include buildsym-legacy.h.
5725         * cp-namespace.c: Include buildsym-legacy.h.
5726         * coffread.c: Include buildsym-legacy.h.
5727         * buildsym.h: Move some contents to buildsym-legacy.h.
5728         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
5729         buildsym-legacy.c.
5730         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
5731
5732 2018-07-20  Tom Tromey  <tom@tromey.com>
5733
5734         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
5735         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
5736         (buildsym_compunit::buildsym_compunit)
5737         (buildsym_compunit::~buildsym_compunit)
5738         (buildsym_compunit::get_macro_table): Define.
5739
5740 2018-07-20  Tom Tromey  <tom@tromey.com>
5741
5742         * buildsym.c (reset_symtab_globals): Remove.
5743         (buildsym_compunit::end_symtab_from_static_block): Update.
5744         (buildsym_compunit::augment_type_symtab): Update.
5745         (end_symtab_from_static_block): Call free_buildsym_compunit.
5746         (augment_type_symtab, end_symtab, end_expandable_symtab):
5747         Likewise.
5748
5749 2018-07-20  Tom Tromey  <tom@tromey.com>
5750
5751         * arch-utils.c: Do not include buildsym.h.
5752         * mipsread.c: Do not include buildsym.h.
5753         * machoread.c: Do not include buildsym.h.
5754         * elfread.c: Do not include buildsym.h.
5755
5756 2018-07-20  Tom Tromey  <tom@tromey.com>
5757
5758         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
5759         initialization.
5760         (buildsym_compunit): Add new constructor.
5761         (struct buildsym_compunit) <get_last_source_file, finish_block,
5762         record_block_range, start_subfile, patch_subfile_names,
5763         push_subfile, pop_subfile, record_line, get_compunit_symtab,
5764         set_last_source_start_addr, get_last_source_start_addr,
5765         get_local_using_directives, set_local_using_directives,
5766         get_global_using_directives, outermost_context_p,
5767         get_current_context_stack, get_context_stack_depth,
5768         get_current_subfile, get_local_symbols, get_file_symbols,
5769         get_global_symbols, record_debugformat, record_producer,
5770         push_context, pop_context, end_symtab_get_static_block,
5771         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
5772         New public methods.
5773         <record_pending_block, finish_block_internal, make_blockvector,
5774         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
5775         private methods.
5776         Update all users.
5777
5778 2018-05-22  Tom Tromey  <tom@tromey.com>
5779
5780         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5781         parameter.
5782         (finish_block_internal): Update.
5783
5784 2018-07-20  Tom Tromey  <tom@tromey.com>
5785
5786         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5787         parameter.
5788         (finish_block_internal): Update.
5789
5790 2018-07-20  Tom Tromey  <tom@tromey.com>
5791
5792         * buildsym.h (EXTERN): Don't define or undef.
5793         * buildsym.c (EXTERN): Don't define.
5794
5795 2018-07-20  Tom Tromey  <tom@tromey.com>
5796
5797         * buildsym.c: Remove TODO comment.
5798
5799 2018-07-20  Tom Tromey  <tom@tromey.com>
5800
5801         * coffread.c (coff_symtab_read): Update.
5802         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5803         (xcoff_new_init): Update.
5804         * mipsread.c (mipscoff_new_init): Update.
5805         * mdebugread.c (mdebug_build_psymtabs): Update.
5806         * elfread.c (elf_new_init): Update.
5807         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5808         Update.
5809         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5810         (coffstab_build_psymtabs, elfstab_build_psymtabs)
5811         (stabsect_build_psymtabs): Update.
5812         * buildsym.h (buildsym_init): Don't declare.
5813         * buildsym.c: Update comment.
5814         (prepare_for_building): Remove.
5815         (start_symtab, restart_symtab): Update.
5816         (reset_symtab_globals): Update comment.
5817         (buildsym_init): Remove.
5818
5819 2018-07-20  Tom Tromey  <tom@tromey.com>
5820
5821         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5822         * stabsread.c (patch_block_stabs, define_symbol, read_type)
5823         (read_enum_type, common_block_start, common_block_end)
5824         (cleanup_undefined_types_1, finish_global_stabs): Update.
5825         * mdebugread.c (psymtab_to_symtab_1): Update.
5826         * dwarf2read.c (fixup_go_packaging, read_func_scope)
5827         (read_lexical_block_scope, new_symbol): Update.
5828         * dbxread.c (process_one_symbol): Update.
5829         * coffread.c (coff_symtab_read, process_coff_symbol)
5830         (coff_read_enum_type): Update.
5831         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5832         declare.
5833         (get_local_symbols, get_file_symbols, get_global_symbols): New
5834         functions.
5835         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5836         m_global_symbols.
5837         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5838         (~scoped_free_pendings): Update.
5839         (finish_block, prepare_for_building, reset_symtab_globals)
5840         (end_symtab_get_static_block, end_symtab_with_blockvector)
5841         (augment_type_symtab, push_context): Update.
5842         (get_local_symbols, get_file_symbols, get_global_symbols): New
5843         functions.
5844         (buildsym_init): Update.
5845
5846 2018-07-20  Tom Tromey  <tom@tromey.com>
5847
5848         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5849         (process_full_type_unit): Likewise.
5850         (dwarf2_start_symtab): Set list_in_scope.
5851
5852 2018-07-20  Tom Tromey  <tom@tromey.com>
5853
5854         * dwarf2read.c (process_psymtab_comp_unit_reader)
5855         (build_type_psymtabs_reader): Do not set list_in_scope.
5856
5857 2018-07-20  Tom Tromey  <tom@tromey.com>
5858
5859         * buildsym.c (free_pendings): Remove.
5860         (add_symbol_to_list, scoped_free_pendings)
5861         (finish_block_internal, buildsym_init): Update.
5862
5863 2018-07-20  Tom Tromey  <tom@tromey.com>
5864
5865         * xcoffread.c (read_xcoff_symtab): Update.
5866         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5867         Update.
5868         * dbxread.c (process_one_symbol): Update.
5869         * coffread.c (coff_symtab_read): Update.
5870         * buildsym.h (finish_block): Update.
5871         * buildsym.c (finish_block): Remove "listhead" argument.
5872         (end_symtab_get_static_block): Update.
5873
5874 2018-07-20  Tom Tromey  <tom@tromey.com>
5875
5876         * buildsym.h (class scoped_free_pendings): Remove constructor.
5877         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5878         method.
5879         <m_pending_block_obstack, m_pending_blocks>: New members.
5880         (pending_block_obstack, pending_blocks): Remove.
5881         (scoped_free_pendings::scoped_free_pendings): Default.
5882         (~scoped_free_pendings): Update.
5883         (free_pending_blocks): Remove.
5884         (finish_block_internal, record_pending_block, make_blockvector)
5885         (end_symtab_get_static_block, augment_type_symtab, push_context)
5886         (buildsym_init): Update.
5887
5888 2018-07-20  Tom Tromey  <tom@tromey.com>
5889
5890         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5891         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5892         members.
5893         (pending_addrmap, pending_addrmap_obstack)
5894         (pending_addrmap_interesting): Remove.
5895         (scoped_free_pendings, record_block_range, make_blockvector)
5896         (prepare_for_building, reset_symtab_globals, buildsym_init):
5897         Update.
5898
5899 2018-07-20  Tom Tromey  <tom@tromey.com>
5900
5901         * xcoffread.c (process_linenos): Update.
5902         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5903         * mdebugread.c (psymtab_to_symtab_1): Update.
5904         * dwarf2read.c (setup_type_unit_groups)
5905         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5906         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5907         * dbxread.c (process_one_symbol): Update.
5908         * coffread.c (coff_symtab_read, enter_linenos)
5909         (process_coff_symbol): Update.
5910         * buildsym.h (current_subfile): Don't declare.
5911         (get_current_subfile): Declare.
5912         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5913         member.
5914         (start_subfile, free_buildsym_compunit, push_subfile)
5915         (prepare_for_building, start_symtab): Update.
5916         (get_current_subfile): New function.
5917
5918 2018-07-20  Tom Tromey  <tom@tromey.com>
5919
5920         * coffread.c (coff_symtab_read): Update.
5921         * xcoffread.c (read_xcoff_symtab): Update.
5922         * dwarf2read.c (new_symbol): Update.
5923         (read_func_scope, read_lexical_block_scope): Update.
5924         * dbxread.c (process_one_symbol): Update.
5925         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5926         (outermost_context_p): Remove macro.
5927         (outermost_context_p, get_current_context_stack)
5928         (get_context_stack_depth): Declare.
5929         (pop_context): Return struct context_stack.
5930         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5931         member.
5932         (context_stack_size): Remove.
5933         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5934         (prepare_for_building, end_symtab_get_static_block)
5935         (augment_type_symtab, push_context): Update.
5936         (pop_context): Return struct context_stack.
5937         (outermost_context_p, get_current_context_stack)
5938         (get_context_stack_depth): New functions.
5939         (buildsym_init): Update.
5940
5941 2018-07-20  Tom Tromey  <tom@tromey.com>
5942
5943         * rust-exp.y: Now a pure parser.  Update all rules.
5944         (%union): Move earlier.
5945         (current_parser, work_obstack): Remove globals.
5946         (rust_parser, ~rust_parser): Update.
5947         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5948         lex_character, lex_number, lex_string, lex_identifier,
5949         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5950         convert_name, convert_params_to_expression,
5951         convert_ast_to_expression, ast_basic_type, ast_operation,
5952         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5953         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5954         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5955         ast_array_type, ast_slice_type, ast_reference_type,
5956         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5957         (rust_parse): Update.
5958         (rustyyerror, rustyylex): Add parser parameter.
5959         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5960         (rust_lex_stringish_test, rust_lex_test_sequence)
5961         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5962         (rust_lex_test_push_back, rust_lex_tests): Update.
5963
5964 2018-07-19  Pedro Alves  <palves@redhat.com>
5965
5966         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5967         gdb::unique_xmalloc_ptr.
5968         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5969         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5970         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5971         copy-initialization.
5972         * guile/scm-pretty-print.c (ppscm_print_children): Use
5973         gdb::unique_xmalloc_ptr instead of cleanups.
5974         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5975         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5976         gdb::unique_xmalloc_ptr.
5977         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5978         Adjust to use gdb::unique_xmalloc_ptr.
5979         * guile/scm-utils.c (extract_arg): Adjust.
5980         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5981         gdb::unique_xmalloc_ptr instead of a cleanup.
5982
5983 2018-07-19  Tom Tromey  <tom@tromey.com>
5984
5985         * utils.c (do_value_free_to_mark)
5986         (make_cleanup_value_free_to_mark): Remove.
5987         * utils.h (make_cleanup_value_free_to_mark): Remove.
5988
5989 2018-07-19  Pedro Alves  <palves@redhat.com>
5990
5991         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5992         forwarding reference.
5993
5994 2018-07-18  Pedro Alves  <palves@redhat.com>
5995
5996         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5997         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5998         cleanup.
5999
6000 2018-07-18  Pedro Alves  <palves@redhat.com>
6001
6002         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6003         exceptions.
6004         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6005         (gdbscm_wrap): New.
6006         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6007         directly instead of a cleanup.
6008         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6009         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
6010         (vlscm_binop_gdbthrow): New, factored out from ...
6011         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
6012         (vlscm_rich_compare): Use gdbscm_wrap.
6013         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6014         instead of a cleanup.
6015         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6016         cleanup.
6017         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6018         Use xfree directly instead of a cleanup.
6019         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6020         Adjust to use gdbscm_wrap and scoped_value_mark.
6021         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6022         (gdbscm_value_address, gdbscm_value_dereference)
6023         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6024         scoped_value_mark.
6025         (gdbscm_value_dynamic_type): Use scoped_value_mark.
6026         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6027         scoped_value_mark.
6028         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6029         gdbscm_wrap and scoped_value_mark.
6030         (gdbscm_value_to_string): Use xfree directly instead of a
6031         cleanup.  Move 'buffer' unique_ptr to TRY scope.
6032         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6033         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
6034         scoped_value_mark.
6035         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6036         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6037         scoped_value_mark.
6038         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6039         gdbscm_wrap.
6040
6041 2018-07-18  Tom de Vries  <tdevries@suse.de>
6042
6043         * findvar.c (default_read_var_value): Also resolve dynamic type for
6044         LOC_OPTIMIZED_OUT vars.
6045
6046 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
6047
6048         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6049         decoding.
6050
6051 2018-07-17  Tom Tromey  <tom@tromey.com>
6052
6053         * guile/scm-param.c (pascm_set_func, pascm_show_func)
6054         (compute_enum_list, pascm_set_param_value_x)
6055         (gdbscm_parameter_value): Update.
6056         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6057         (gdbscm_scm_to_host_string): Update.
6058         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6059         Update.
6060         * guile/scm-cmd.c (cmdscm_add_completion): Update.
6061         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6062         * guile/scm-string.c (gdbscm_scm_to_string): Return
6063         unique_xmalloc_ptr.
6064         (gdbscm_scm_to_host_string): Likewise.
6065
6066 2018-07-17  Tom Tromey  <tom@tromey.com>
6067
6068         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6069         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6070         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6071         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6072         unique_xmalloc_ptr.
6073
6074 2018-07-17  Tom Tromey  <tom@tromey.com>
6075
6076         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6077         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6078         Update.
6079         * guile/scm-cmd.c (cmdscm_function): Update.
6080         * guile/scm-pretty-print.c
6081         (ppscm_print_exception_unless_memory_error): Update.
6082         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6083         Return unique_xmalloc_ptr.
6084
6085 2018-07-17  Tom Tromey  <tom@tromey.com>
6086
6087         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6088         Use string_printf.
6089
6090 2018-07-17  Jim Wilson  <jimw@sifive.com>
6091
6092         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6093         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6094         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6095         unecessary braces after EF_RISCV_RVC test.  Delete call to
6096         set_gdbarch_decr_pc_after_break.
6097
6098         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6099         RISCV_LAST_FP_REGNUM + 1.
6100         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6101
6102 2018-07-17  Tom Tromey  <tom@tromey.com>
6103
6104         * configure.ac: Remove --disable-gdbcli.
6105         * configure: Rebuild.
6106         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6107         (SUBDIR_CLI_CFLAGS): Remove.
6108         (SFILES): Use SUBDIR_CLI_SRCS.
6109         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6110
6111 2018-07-17  Tom Tromey  <tom@tromey.com>
6112
6113         PR gdb/18624:
6114         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6115
6116 2018-07-16  Jim Wilson  <jimw@sifive.com>
6117
6118         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6119
6120 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6121
6122         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6123         variable.
6124         (libunwind_frame_sniffer): Likewise.
6125         (libunwind_frame_prev_register): Likewise.
6126         (libunwind_sigtramp_frame_sniffer): Likewise.
6127         * ia64-tdep.c (ia64_access_reg): Likewise.
6128         (ia64_access_rse_reg): Likewise.
6129         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6130         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6131
6132 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6133
6134         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6135
6136 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6137
6138         * remote-sim.c (gdbsim_target::close,
6139         gdbsim_target::mourn_inferior): Remove unused variables.
6140
6141 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6142
6143         * ia64-tdep.c (ktab_buf): New global.
6144         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6145         (get_kernel_table): Adjust.
6146
6147 2018-07-16  Tom Tromey  <tom@tromey.com>
6148
6149         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6150         * dwarf2read.c (using_directives, new_symbol): Use
6151         outermost_context_p.
6152         * dbxread.c (process_one_symbol): Use outermost_context_p.
6153         * coffread.c (coff_symtab_read): Use outermost_context_p.
6154
6155 2018-07-16  Tom Tromey  <tom@tromey.com>
6156
6157         * dwarf2read.c (using_directives, read_func_scope)
6158         (read_lexical_block_scope): Update.
6159         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6160         * buildsym.h (local_using_directives, global_using_directives):
6161         Don't declare.
6162         (get_local_using_directives, set_local_using_directives)
6163         (get_global_using_directives): Declare.
6164         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6165         m_global_using_directives>: New members.
6166         (finish_block_internal, prepare_for_building)
6167         (reset_symtab_globals, end_symtab_get_static_block)
6168         (push_context): Update.
6169         (get_local_using_directives, set_local_using_directives)
6170         (get_global_using_directives): New functions.
6171         (buildsym_init): Update.
6172
6173 2018-07-16  Tom Tromey  <tom@tromey.com>
6174
6175         * xcoffread.c (xcoff_initial_scan): Don't call
6176         free_pending_blocks.
6177         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6178         * buildsym.h (class scoped_free_pendings): Add constructor.
6179         (free_pending_blocks): Don't declare.
6180         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6181         (free_pending_blocks): Now static.
6182
6183 2018-07-16  Tom Tromey  <tom@tromey.com>
6184
6185         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6186         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6187         member.
6188         (struct subfile_stack): Remove.
6189         (subfile_stack): Remove.
6190         (push_subfile, pop_subfile, buildsym_init): Update.
6191
6192 2018-07-16  Tom Tromey  <tom@tromey.com>
6193
6194         * buildsym.c (push_subfile): Use gdb_assert.
6195         (pop_subfile): Use gdb_assert.
6196
6197 2018-07-16  Tom Tromey  <tom@tromey.com>
6198
6199         * buildsym.h (merge_symbol_lists): Remove.
6200         * buildsym.c (merge_symbol_lists): Remove.
6201
6202 2018-07-16  Tom Tromey  <tom@tromey.com>
6203
6204         * stabsread.c (scan_file_globals): Update comment.
6205         * stabsread.h (scan_file_globals): Move from buildsym.h.
6206         * buildsym.h (scan_file_globals): Move to stabsread.h.
6207
6208 2018-07-16  Tom Tromey  <tom@tromey.com>
6209
6210         * xcoffread.c (xcoff_new_init): Update.
6211         * mipsread.c (mipscoff_new_init): Update.
6212         * mdebugread.c (mdebug_build_psymtabs): Update.
6213         * elfread.c (elf_new_init): Update.
6214         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6215         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6216         * buildsym.h (buildsym_new_init): Don't declare.
6217         * buildsym.c (buildsym_new_init): Remove.
6218
6219 2018-07-16  Tom Tromey  <tom@tromey.com>
6220
6221         * stabsread.h (within_function): Move from buildsym.h.
6222         * stabsread.c (start_stabs): Clear within_function.
6223         * coffread.c (coff_start_symtab): Clear within_function.
6224         * buildsym.h (within_function): Move to stabsread.h.
6225         * buildsym.c (prepare_for_building): Update.
6226
6227 2018-07-16  Tom Tromey  <tom@tromey.com>
6228
6229         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6230         * dwarf2read.c (dwarf2_start_symtab): Don't set
6231         processing_gcc_compilation.
6232         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6233
6234 2018-07-16  Tom Tromey  <tom@tromey.com>
6235
6236         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6237         (next_symbol_text_func): Move from buildsym.h.
6238         * stabsread.c (hashname): Move from buildsym.c.
6239         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6240         (next_symbol_text_func, hashname): Move to stabsread.h.
6241         * buildsym.c: Don't include bcache.h
6242         (hashname): Move to stasbread.c.
6243
6244 2018-07-16  Tom Tromey  <tom@tromey.com>
6245
6246         * buildsym.h (context_stack_size): Don't declare.
6247         * buildsym.c (context_stack_size): New global.
6248
6249 2018-07-16  Tom Tromey  <tom@tromey.com>
6250
6251         * dbxread.c (processing_acc_compilation): New global.
6252         * buildsym.h (processing_acc_compilation): Don't declare.
6253
6254 2018-07-16  Tom Tromey  <tom@tromey.com>
6255
6256         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6257         * dbxread.c (read_ofile_symtab): Update.
6258         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6259         * buildsym.h (last_source_start_addr): Remove.
6260         (set_last_source_start_addr, get_last_source_start_addr):
6261         Declare.
6262         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6263         parameter.
6264         (struct buildsym_compunit) <m_last_source_start_addr>: New
6265         member.
6266         (prepare_for_building): Remove start_addr parameter.
6267         (start_symtab, restart_symtab, end_symtab_get_static_block)
6268         (end_symtab_with_blockvector): Update.
6269         (set_last_source_start_addr, get_last_source_start_addr): New
6270         functions.
6271
6272 2018-07-16  Tom Tromey  <tom@tromey.com>
6273
6274         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6275         member.
6276         (have_line_numbers): Remove.
6277         (record_line, prepare_for_building, end_symtab_get_static_block)
6278         (augment_type_symtab): Update.
6279
6280 2018-07-16  Tom Tromey  <tom@tromey.com>
6281
6282         * buildsym.c (~buildsym_compunit): Free the macro table.
6283         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6284         methods.
6285         <m_pending_macros>: New member.
6286         (pending_macros): Remove.
6287         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6288         (reset_symtab_globals, end_symtab_get_static_block)
6289         (end_symtab_with_blockvector, augment_type_symtab)
6290         (buildsym_init): Update.
6291
6292 2018-07-16  Tom Tromey  <tom@tromey.com>
6293
6294         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6295         parameter.
6296         (buildsym_compunit::set_last_source_file): New method.
6297         <m_last_source_file>: New member.
6298         (prepare_for_building): Remove "name" parameter.
6299         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6300         (last_source_file): Remove.
6301         (set_last_source_file, get_last_source_file): Update.
6302
6303 2018-07-16  Tom Tromey  <tom@tromey.com>
6304
6305         * buildsym.c (prepare_for_building): Add assert.
6306
6307 2018-07-16  Tom Tromey  <tom@tromey.com>
6308
6309         * buildsym.c (~buildsym_compunit): Update.
6310         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6311         (start_subfile, patch_subfile_names)
6312         (end_symtab_with_blockvector): Update.
6313
6314 2018-07-16  Tom Tromey  <tom@tromey.com>
6315
6316         * buildsym.c (struct buildsym_compunit): Add constructor,
6317         destructor, initializers.
6318         (start_buildsym_compunit): Remove.
6319         (free_buildsym_compunit): Use "delete".
6320         (start_symtab, restart_symtab): Use "new".
6321
6322 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6323
6324         * symfile.c (set_objfile_default_section_offset): Remove struct
6325         keyword.
6326
6327 2018-07-14  Stafford Horne  <shorne@gmail.com>
6328
6329         * (Responsible Maintainers): Add myself as or1k maintainer.
6330
6331 2018-07-13  Tom Tromey  <tom@tromey.com>
6332
6333         * symfile.c (set_objfile_default_section_offset): Use extra braces
6334         around initializer.
6335
6336 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6337
6338         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6339         non-branching basr.
6340
6341 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6342
6343         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6344         unittests/cli-utils-selftests.c
6345         * unittests/cli-utils-selftests.c: New file.
6346
6347 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6348
6349         * NEWS: Mention new commands. Mention change to 'thread apply'.
6350
6351 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6352
6353         * thread.c (thr_try_catch_cmd): New function.
6354         (thread_apply_all_command): Handle qcs flags.
6355         (thread_apply_command): Handle qcs flags.
6356         (taas_command): New function.
6357         (tfaas_command): New function.
6358         (_initialize_thread): Update to setup the new commands 'taas
6359         and 'tfaas'. Change doc string for 'thread apply'.
6360
6361 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6362
6363         * stack.c: (trailing_outermost_frame): New function, mostly
6364         extracted from backtrace_command_1.
6365         (leading_innermost_frame): New function.
6366         (backtrace_command_1): Update to call trailing_outermost_frame.
6367         (frame_apply_command_count): New function.
6368         (frame_apply_level_command): New function.
6369         (frame_apply_all_command): New function.
6370         (frame_apply_command): New function.
6371         (faas_command): New function.
6372         (frame_cmd_list): New variable.
6373         (_initialize_stack): Update to setup the new commands 'frame apply'
6374         and 'faas'.
6375
6376 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6377
6378         * cli-utils.c (number_or_range_parser::get_number): Only handle
6379         numbers or convenience var as numbers.
6380         (parse_flags): New function.
6381         (parse_flags_qcs): New function.
6382         (number_or_range_parser::finished): Ensure parsing end is detected
6383         before end of string.
6384         * cli-utils.h (parse_flags): New function.
6385         (parse_flags_qcs): New function.
6386         (number_or_range_parser): Remove m_finished bool.
6387         (number_or_range_parser::skip_range): Set m_in_range to false.
6388
6389 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6390
6391         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6392         on Windows.
6393
6394 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6395             Jan Kratochvil  <jan.kratochvil@redhat.com>
6396             Paul Fertser  <fercerpav@gmail.com>
6397             Tsutomu Seki  <sekiriki@gmail.com>
6398             Pedro Alves  <palves@redhat.com>
6399
6400         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6401         'unittests/parse-connection-spec-selftests.c'.
6402         (COMMON_SFILES): Add 'common/netstuff.c'.
6403         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6404         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6405         * common/netstuff.c: New file.
6406         * common/netstuff.h: New file.
6407         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6408         (wait_for_connect): Update comment.  New parameter
6409         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6410         Use 'sock' directly instead of 'scb->fd'.
6411         (try_connect): New function, with code from 'net_open'.
6412         (net_open): Rewrite main loop to deal with multiple
6413         sockets/addresses.  Handle IPv6-style hostnames; implement
6414         support for IPv6 connections.
6415         * unittests/parse-connection-spec-selftests.c: New file.
6416
6417 2018-07-11  Pedro Alves  <palves@redhat.com>
6418
6419         PR gdb/23377
6420         * remote.c (remote_target::remote_detach_pid): Call
6421         set_current_process.
6422
6423 2018-07-11  Pedro Alves  <palves@redhat.com>
6424
6425         * h8300-tdep.c (h8300_gdbarch_init): Remove
6426         set_gdbarch_ecoff_reg_to_regnum calls.
6427
6428 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6429
6430         PR c++/23373
6431         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6432         offsets/sizes for static members of a class/struct.
6433
6434 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6435
6436         * target-descriptions.c (tdesc_register_bitsize): Rename.
6437         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6438         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6439         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6440
6441 2018-07-10  Tom Tromey  <tom@tromey.com>
6442
6443         * breakpoint.c (moribund_locations): Now static and a
6444         std::vector.
6445         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6446         (build_bpstat_chain, update_global_location_list)
6447         (breakpoint_retire_moribund): Update.
6448         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6449         VEC.
6450
6451 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6452
6453         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6454         (riscv_register_reggroup_p): Use new function, remove unneeded
6455         parenthesis.
6456         (riscv_push_dummy_call): Extend assert to compare against xlen or
6457         flen based on register type.
6458
6459 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6460
6461         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6462
6463 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6464
6465         * remote.c (show_hardware_watchpoint_limit): New function.
6466         (show_hardware_watchpoint_length_limit): New function.
6467         (show_hardware_breakpoint_limit): New function.
6468         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6469         where appropriate, update help text.
6470
6471 2018-07-09  Tom Tromey  <tom@tromey.com>
6472
6473         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6474         (CLIBS): Don't mention NAT_CLIBS.
6475
6476 2018-07-09  Tom Tromey  <tom@tromey.com>
6477
6478         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6479         (LIBGDB_OBS, clean mostlyclean): Update.
6480         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6481
6482 2018-07-09  Tom Tromey  <tom@tromey.com>
6483
6484         * Makefile.in (%.c: %.y): Use ECHO_YACC.
6485         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
6486         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6487
6488 2018-07-09  Tom Tromey  <tom@tromey.com>
6489
6490         * Makefile.in (ALLDEPFILES): Remove exec.c.
6491         (COMMON_OBS): Remove exec.o.
6492         (COMMON_SFILES): Add exec.c.
6493
6494 2018-07-09  Tom Tromey  <tom@tromey.com>
6495
6496         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6497
6498 2018-07-09  Tom Tromey  <tom@tromey.com>
6499
6500         * Makefile.in (clean mostlyclean): Remove stamp-version.
6501         (version.c): Depend on stamp-version.
6502         (stamp-version): New rule, from version.c rule.
6503
6504 2018-07-09  Tom Tromey  <tom@tromey.com>
6505
6506         * Makefile.in (init.c): Depend on stamp-init.
6507         (stamp-init): New rule, from init.c rule.
6508         (clean mostlyclean): Remove stamp-init.
6509
6510 2018-07-09  Tom Tromey  <tom@tromey.com>
6511
6512         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6513         SUBDIR_GCC_COMPILE_SRCS.
6514
6515 2018-07-09  Tom Tromey  <tom@tromey.com>
6516
6517         * Makefile.in (init.c): Remove some unused sed rules.
6518
6519 2018-07-09  Tom Tromey  <tom@tromey.com>
6520
6521         * Makefile.in (TSOBS): Remove.
6522         (INIT_FILES): Update.
6523         (LIBGDB_OBS): Update.
6524         (COMMON_SFILES): Add inflow.c.
6525         (SFILES): Remove inflow.c.
6526
6527 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6528
6529         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
6530
6531 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
6532
6533         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
6534         get_saveloc_name, is_signal_frame_name, step_name,
6535         init_remote_name, create_addr_space_name,
6536         destroy_addr_space_name, search_unwind_table_name,
6537         find_dyn_list_name): Constify.
6538
6539 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
6540
6541         * darwin-nat.c (darwin_pthread_kill): New function.
6542         (darwin_resume_thread): Use darwin_pthread_kill.
6543
6544 2018-07-05  Tom de Vries  <tdevries@suse.de>
6545
6546         * macroexp.c (macro_buffer) <operator=>: New member function.
6547
6548 2018-07-04  Tom Tromey  <tom@tromey.com>
6549
6550         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
6551
6552 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
6553
6554         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
6555         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
6556         * maint.c: Likewise.
6557         * top.c: Likewise.
6558
6559 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6560
6561         * NEWS: Create a new section for the next release branch.
6562         Rename the section of the current branch, now that it has
6563         been cut.
6564
6565 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6566
6567         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
6568         * version.in: Bump version to 8.2.50.DATE-git.
6569
6570 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
6571             Pedro Alves  <palves@redhat.com>
6572
6573         * linux-nat.c (linux_init_ptrace): Rename to ...
6574         (linux_init_ptrace_procfs): ... this.  Call
6575         linux_proc_init_warnings.
6576         (linux_nat_target::post_attach)
6577         (linux_nat_target::post_startup_inferior): Adjust.
6578         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
6579         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
6580
6581 2018-07-04  Tom de Vries  <tdevries@suse.de>
6582
6583         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
6584         check ...
6585         (read_comp_unit_head): ... here.
6586
6587 2018-07-03  Tom Tromey  <tom@tromey.com>
6588
6589         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
6590         (stop_tracing, tstatus_command)
6591         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
6592         (print_one_static_tracepoint_marker): Update.
6593         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
6594         std::vector.
6595         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
6596         VEC.
6597         (all_tracepoints, static_tracepoints_here): Return std::vector.
6598
6599 2018-07-03  Tom Tromey  <tom@tromey.com>
6600
6601         * common/ptid.c (ptid_equal): Remove.
6602         * common/ptid.h (ptid_equal): Don't declare.
6603         * ada-tasks.c: Update.
6604         * breakpoint.c: Update.
6605         * common/agent.c: Update.
6606         * corelow.c: Update.
6607         * darwin-nat-info.c: Update.
6608         * darwin-nat.c: Update.
6609         * dcache.c: Update.
6610         * dtrace-probe.c: Update.
6611         * dummy-frame.c: Update.
6612         * fbsd-nat.c: Update.
6613         * frame.c: Update.
6614         * gdbthread.h: Update.
6615         * gnu-nat.c: Update.
6616         * go32-nat.c: Update.
6617         * inf-loop.c: Update.
6618         * inf-ptrace.c: Update.
6619         * infcall.c: Update.
6620         * infcmd.c: Update.
6621         * inflow.c: Update.
6622         * infrun.c: Update.
6623         * linux-fork.c: Update.
6624         * linux-nat.c: Update.
6625         * linux-thread-db.c: Update.
6626         * mi/mi-cmd-var.c: Update.
6627         * mi/mi-interp.c: Update.
6628         * mi/mi-main.c: Update.
6629         * nto-procfs.c: Update.
6630         * ppc-linux-tdep.c: Update.
6631         * procfs.c: Update.
6632         * python/py-inferior.c: Update.
6633         * python/py-record-btrace.c: Update.
6634         * python/py-record.c: Update.
6635         * ravenscar-thread.c: Update.
6636         * regcache.c: Update.
6637         * remote-sim.c: Update.
6638         * remote.c: Update.
6639         * sol-thread.c: Update.
6640         * solib.c: Update.
6641         * target.c: Update.
6642         * tui/tui-stack.c: Update.
6643         * varobj.c: Update.
6644         * windows-nat.c: Update.
6645         * windows-tdep.c: Update.
6646
6647 2018-07-03  Tom Tromey  <tom@tromey.com>
6648
6649         * common/ptid.c (ptid_match): Remove.
6650         * common/ptid.h (ptid_match): Don't declare.
6651         * fbsd-nat.c: Update.
6652         * infcmd.c: Update.
6653         * infrun.c: Update.
6654         * linux-nat.c: Update.
6655         * record-btrace.c: Update.
6656         * regcache.c: Update.
6657         * remote.c: Update.
6658
6659 2018-07-03  Tom Tromey  <tom@tromey.com>
6660
6661         * common/ptid.c (ptid_tid_p): Remove.
6662         * common/ptid.h (ptid_tid_p): Don't declare.
6663         * sol-thread.c: Update.
6664
6665 2018-07-03  Tom Tromey  <tom@tromey.com>
6666
6667         * common/ptid.c (ptid_lwp_p): Remove.
6668         * common/ptid.h (ptid_lwp_p): Don't declare.
6669         * fbsd-nat.c: Update.
6670         * linux-nat.c: Update.
6671         * nat/linux-procfs.c: Update.
6672         * nat/x86-linux-dregs.c: Update.
6673         * sol-thread.c: Update.
6674
6675 2018-07-03  Tom Tromey  <tom@tromey.com>
6676
6677         * common/ptid.c (ptid_is_pid): Remove.
6678         * common/ptid.h (ptid_is_pid): Don't declare.
6679         * infrun.c: Update.
6680         * linux-nat.c: Update.
6681         * mi/mi-interp.c: Update.
6682         * remote.c: Update.
6683         * thread.c: Update.
6684
6685 2018-07-03  Tom Tromey  <tom@tromey.com>
6686
6687         * common/ptid.c (ptid_get_tid): Remove.
6688         * common/ptid.h (ptid_get_tid): Don't declare.
6689         * ada-tasks.c: Update.
6690         * aix-thread.c: Update.
6691         * bsd-uthread.c: Update.
6692         * darwin-nat.c: Update.
6693         * fbsd-nat.c: Update.
6694         * i386-darwin-nat.c: Update.
6695         * infrun.c: Update.
6696         * linux-tdep.c: Update.
6697         * nto-procfs.c: Update.
6698         * ppc-ravenscar-thread.c: Update.
6699         * python/py-infthread.c: Update.
6700         * ravenscar-thread.c: Update.
6701         * sol-thread.c: Update.
6702         * sparc-ravenscar-thread.c: Update.
6703         * windows-nat.c: Update.
6704
6705 2018-07-03  Tom Tromey  <tom@tromey.com>
6706
6707         * common/ptid.c (ptid_get_lwp): Remove.
6708         * common/ptid.h (ptid_get_lwp): Don't declare.
6709         * aarch64-linux-nat.c: Update.
6710         * ada-tasks.c: Update.
6711         * aix-thread.c: Update.
6712         * amd64-linux-nat.c: Update.
6713         * arm-linux-nat.c: Update.
6714         * corelow.c: Update.
6715         * fbsd-nat.c: Update.
6716         * fbsd-tdep.c: Update.
6717         * gnu-nat.c: Update.
6718         * i386-cygwin-tdep.c: Update.
6719         * i386-gnu-nat.c: Update.
6720         * i386-linux-nat.c: Update.
6721         * ia64-linux-nat.c: Update.
6722         * inf-ptrace.c: Update.
6723         * infrun.c: Update.
6724         * linux-fork.c: Update.
6725         * linux-nat.c: Update.
6726         * linux-tdep.c: Update.
6727         * linux-thread-db.c: Update.
6728         * mips-linux-nat.c: Update.
6729         * nat/aarch64-linux-hw-point.c: Update.
6730         * nat/aarch64-linux.c: Update.
6731         * nat/linux-btrace.c: Update.
6732         * nat/linux-osdata.c: Update.
6733         * nat/linux-procfs.c: Update.
6734         * nat/x86-linux-dregs.c: Update.
6735         * obsd-nat.c: Update.
6736         * ppc-fbsd-nat.c: Update.
6737         * ppc-linux-nat.c: Update.
6738         * procfs.c: Update.
6739         * python/py-infthread.c: Update.
6740         * ravenscar-thread.c: Update.
6741         * remote.c: Update.
6742         * s390-linux-nat.c: Update.
6743         * sol-thread.c: Update.
6744         * sol2-tdep.c: Update.
6745         * spu-linux-nat.c: Update.
6746         * x86-linux-nat.c: Update.
6747         * xtensa-linux-nat.c: Update.
6748
6749 2018-07-03  Tom Tromey  <tom@tromey.com>
6750
6751         * common/ptid.c (ptid_get_pid): Remove.
6752         * common/ptid.h (ptid_get_pid): Don't declare.
6753         * aarch64-linux-nat.c: Update.
6754         * ada-lang.c: Update.
6755         * aix-thread.c: Update.
6756         * alpha-bsd-nat.c: Update.
6757         * amd64-fbsd-nat.c: Update.
6758         * amd64-linux-nat.c: Update.
6759         * arm-linux-nat.c: Update.
6760         * arm-nbsd-nat.c: Update.
6761         * auxv.c: Update.
6762         * break-catch-syscall.c: Update.
6763         * breakpoint.c: Update.
6764         * bsd-uthread.c: Update.
6765         * corelow.c: Update.
6766         * ctf.c: Update.
6767         * darwin-nat.c: Update.
6768         * fbsd-nat.c: Update.
6769         * fbsd-tdep.c: Update.
6770         * gcore.c: Update.
6771         * gnu-nat.c: Update.
6772         * hppa-nbsd-nat.c: Update.
6773         * hppa-obsd-nat.c: Update.
6774         * i386-fbsd-nat.c: Update.
6775         * ia64-linux-nat.c: Update.
6776         * inf-ptrace.c: Update.
6777         * infcmd.c: Update.
6778         * inferior.c: Update.
6779         * inferior.h: Update.
6780         * inflow.c: Update.
6781         * infrun.c: Update.
6782         * linux-fork.c: Update.
6783         * linux-nat.c: Update.
6784         * linux-tdep.c: Update.
6785         * linux-thread-db.c: Update.
6786         * m68k-bsd-nat.c: Update.
6787         * mi/mi-interp.c: Update.
6788         * mi/mi-main.c: Update.
6789         * mips-linux-nat.c: Update.
6790         * mips-nbsd-nat.c: Update.
6791         * mips64-obsd-nat.c: Update.
6792         * nat/aarch64-linux-hw-point.c: Update.
6793         * nat/aarch64-linux.c: Update.
6794         * nat/linux-btrace.c: Update.
6795         * nat/linux-osdata.c: Update.
6796         * nat/linux-procfs.c: Update.
6797         * nat/x86-linux-dregs.c: Update.
6798         * nto-procfs.c: Update.
6799         * obsd-nat.c: Update.
6800         * ppc-linux-nat.c: Update.
6801         * ppc-nbsd-nat.c: Update.
6802         * ppc-obsd-nat.c: Update.
6803         * proc-service.c: Update.
6804         * procfs.c: Update.
6805         * python/py-inferior.c: Update.
6806         * python/py-infthread.c: Update.
6807         * ravenscar-thread.c: Update.
6808         * record.c: Update.
6809         * remote-sim.c: Update.
6810         * remote.c: Update.
6811         * rs6000-nat.c: Update.
6812         * s390-linux-nat.c: Update.
6813         * sh-nbsd-nat.c: Update.
6814         * sol-thread.c: Update.
6815         * sparc-nat.c: Update.
6816         * sparc64-tdep.c: Update.
6817         * spu-linux-nat.c: Update.
6818         * spu-tdep.c: Update.
6819         * target-debug.h: Update.
6820         * target.c: Update.
6821         * thread.c: Update.
6822         * tid-parse.c: Update.
6823         * tracefile-tfile.c: Update.
6824         * vax-bsd-nat.c: Update.
6825         * windows-nat.c: Update.
6826         * x86-linux-nat.c: Update.
6827         * x86-nat.c: Update.
6828
6829 2018-07-03  Tom Tromey  <tom@tromey.com>
6830
6831         * common/ptid.c (pid_to_ptid): Remove.
6832         * common/ptid.h (pid_to_ptid): Don't declare.
6833         * aix-thread.c: Update.
6834         * arm-linux-nat.c: Update.
6835         * common/ptid.c: Update.
6836         * common/ptid.h: Update.
6837         * corelow.c: Update.
6838         * ctf.c: Update.
6839         * darwin-nat.c: Update.
6840         * fbsd-nat.c: Update.
6841         * fork-child.c: Update.
6842         * gnu-nat.c: Update.
6843         * go32-nat.c: Update.
6844         * inf-ptrace.c: Update.
6845         * infcmd.c: Update.
6846         * inferior.c: Update.
6847         * infrun.c: Update.
6848         * linux-fork.c: Update.
6849         * linux-nat.c: Update.
6850         * nat/aarch64-linux-hw-point.c: Update.
6851         * nat/fork-inferior.c: Update.
6852         * nat/x86-linux-dregs.c: Update.
6853         * nto-procfs.c: Update.
6854         * obsd-nat.c: Update.
6855         * procfs.c: Update.
6856         * progspace.c: Update.
6857         * remote.c: Update.
6858         * rs6000-nat.c: Update.
6859         * s390-linux-nat.c: Update.
6860         * sol-thread.c: Update.
6861         * spu-linux-nat.c: Update.
6862         * target.c: Update.
6863         * top.c: Update.
6864         * tracefile-tfile.c: Update.
6865         * windows-nat.c: Update.
6866
6867 2018-07-03  Tom Tromey  <tom@tromey.com>
6868
6869         * common/ptid.h (ptid_build): Don't declare.
6870         * common/ptid.c (ptid_build): Remove.
6871         * aix-thread.c: Update.
6872         * bsd-kvm.c: Update.
6873         * bsd-uthread.c: Update.
6874         * common/agent.c: Update.
6875         * common/ptid.c: Update.
6876         * common/ptid.h: Update.
6877         * corelow.c: Update.
6878         * darwin-nat.c: Update.
6879         * fbsd-nat.c: Update.
6880         * gnu-nat.c: Update.
6881         * linux-fork.c: Update.
6882         * linux-nat.c: Update.
6883         * linux-thread-db.c: Update.
6884         * nat/linux-osdata.c: Update.
6885         * nat/linux-procfs.c: Update.
6886         * nto-procfs.c: Update.
6887         * obsd-nat.c: Update.
6888         * proc-service.c: Update.
6889         * procfs.c: Update.
6890         * ravenscar-thread.c: Update.
6891         * remote-sim.c: Update.
6892         * remote.c: Update.
6893         * sol-thread.c: Update.
6894         * target.c: Update.
6895         * windows-nat.c: Update.
6896
6897 2018-07-03  Tom Tromey  <tom@tromey.com>
6898
6899         * infrun.c (follow_exec): Use exit_inferior_silent.
6900         * inferior.c (exit_inferior_num_silent): Remove.
6901         * inferior.h (exit_inferior_num_silent): Don't declare.
6902
6903 2018-07-03  Tom Tromey  <tom@tromey.com>
6904
6905         PR cli/23340:
6906         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6907         inferior_ptid on error.
6908
6909 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
6910             Simon Marchi  <simon.marchi@polymtl.ca>
6911
6912         PR tdep/8282
6913         * disasm.h (gdb_disassembler): Add
6914         `m_disassembler_options_holder'. member
6915         * disasm.c (get_all_disassembler_options): New function.
6916         (gdb_disassembler::gdb_disassembler): Use it.
6917         (gdb_buffered_insn_length_init_dis): Likewise.
6918         (gdb_buffered_insn_length): Adjust accordingly.
6919         (set_disassembler_options): Handle options with arguments.
6920         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6921         line if showing options with descriptions.
6922         (disassembler_options_completer): Adapt to using the
6923         `disasm_options_and_args_t' structure.
6924         * mips-tdep.c (mips_disassembler_options): New variable.
6925         (mips_disassembler_options_o32): Likewise.
6926         (mips_disassembler_options_n32): Likewise.
6927         (mips_disassembler_options_n64): Likewise.
6928         (gdb_print_insn_mips): Don't set `disassembler_options'.
6929         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6930         functions.
6931         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6932         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6933         `gdbarch_disassembler_options_implicit' and
6934         `gdbarch_valid_disassembler_options'.
6935         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6936         `disasm_options_and_args_t' structure.
6937         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6938         method.
6939         (valid_disassembler_options): Switch from `disasm_options_t' to
6940         the `disasm_options_and_args_t' structure.
6941         * NEWS: Document `set disassembler-options' support for the MIPS
6942         target.
6943         * gdbarch.h: Regenerate.
6944         * gdbarch.c: Regenerate.
6945
6946 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6947
6948         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6949
6950 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6951
6952         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6953         parameter in call to amd64_target_description.
6954         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6955         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6956         (amd64fbsd_init_abi): Likewise.
6957         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6958         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6959         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6960         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6961
6962 2018-06-29  Pedro Alves  <palves@redhat.com>
6963
6964         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6965         "segments" parameter.
6966         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6967         (_initialize_amd64_tdep): Update call to
6968         amd64_create_target_description.
6969         (amd64_target_description): Add "segments" parameter.  Adjust
6970         the implementation to use it.
6971         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6972         call to amd64_create_target_description.
6973         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6974         * gdb/arch/amd64.h (amd64_create_target_description): Add
6975         "segments" register.
6976         * gdb/arch/amd64.c (amd64_create_target_description): Add
6977         "segments" parameter.  Call create_feature_i386_64bit_segments
6978         only if SEGMENTS is true.
6979         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6980         call to amd64_create_target_description.
6981
6982 2018-06-29  Pedro Alves  <palves@redhat.com>
6983
6984         * thread.c (thread_target_id_str): New, factored out from ...
6985         (print_thread_info_1): ... here.  Use it to compute the max
6986         "Target Id" column width.
6987
6988 2018-06-29  Pedro Alves  <palves@redhat.com>
6989
6990         * remote.c (remote_target::extra_thread_info): Delete
6991         'display_buf' and 'n' locals.  from the cache, regardless of
6992         packet mechanims is in use.  Use cache for qThreadExtra and qP
6993         methods too.
6994
6995 2018-06-29  Pedro Alves  <palves@redhat.com>
6996
6997         * blockframe.c (find_pc_sect_containing_function): New function.
6998         * breakpoint.c (print_breakpoint_location): Don't call
6999         find_pc_sect_function.
7000         * linespec.c (create_sals_line_offset): Record the location's
7001         symbol in the sal.
7002         * linespec.c (convert_address_location_to_sals): Fill in sal's
7003         symbol with find_pc_sect_containing_function.
7004         * symtab.c (find_function_start_sal): Rename to ...
7005         (find_function_start_sal_1): ... this.
7006         (find_function_start_sal): Reimplement as wrapper around
7007         find_function_start_sal_1, and use
7008         find_pc_sect_containing_function to fill in the sal's symbol.
7009         (find_function_start_sal(symbol*, bool)): Adjust.
7010         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7011         comments.
7012         (find_pc_sect_containing_function): Declare.
7013
7014 2018-06-29  Pedro Alves  <palves@redhat.com>
7015
7016         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7017         true if the the location has no symbol.
7018
7019 2018-06-28  Tom Tromey  <tom@tromey.com>
7020
7021         * NEWS: Mention --enable-codesign.
7022         * silent-rules.mk (ECHO_SIGN): New variable.
7023         * configure.ac: Add --enable-codesign.
7024         * configure: Rebuild.
7025         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7026         (gdb$(EXEEXT)): Optionally invoke codesign.
7027
7028 2018-06-28  Pedro Alves  <palves@redhat.com>
7029
7030         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7031         comments.
7032         (switch_to_thread_no_regs): Adjust comment.
7033         * infcmd.c (stop_pc): Delete.
7034         (post_create_inferior, info_program_command): Replace references
7035         to stop_pc with references to thread_info->suspend.stop_pc.
7036         * inferior.h (stop_pc): Delete declaration.
7037         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7038         (handle_inferior_event_1, handle_signal_stop)
7039         (process_event_stop_test, keep_going_stepped_thread)
7040         (handle_step_into_function, handle_step_into_function_backward)
7041         (print_stop_location): Replace references to stop_pc with
7042         references to thread_info->suspend.stop_pc.
7043         (struct infcall_suspend_state) <stop_pc>: Delete field.
7044         (save_infcall_suspend_state, restore_infcall_suspend_state):
7045         Remove references to inf_stat->stop_pc.
7046         * linux-fork.c (fork_load_infrun_state): Likewise.
7047         * record-btrace.c (record_btrace_set_replay): Likewise.
7048         * record-full.c (record_full_goto_entry): Likewise.
7049         * remote.c (print_one_stopped_thread): Likewise.
7050         * target.c (target_resume): Extend comment.
7051         * thread.c (set_executing_thread): New.
7052         (set_executing): Use it.
7053         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7054         Remove references to stop_pc.
7055
7056 2018-06-28  Pedro Alves  <palves@redhat.com>
7057
7058         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7059         Moving fetching stop_pc until after ecs->event_thread is refreshed.
7060
7061 2018-06-28  Tom Tromey  <tom@tromey.com>
7062
7063         * coffread.c (coff_symfile_finish): Update.
7064         * xcoffread.c (xcoff_symfile_finish): Update.
7065         * elfread.c (elf_symfile_finish): Update.
7066         * symfile.h (dwarf2_free_objfile): Don't declare.
7067         * dwarf2read.c (_initialize_dwarf2_read): Use
7068         register_objfile_data_with_cleanup.
7069         (dwarf2_free_objfile): Now static.  Change signature.
7070
7071 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7072
7073         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7074         option "-o" to add-symbol-file-load to add an offset to each
7075         section's load address.
7076         * symfile.c (set_objfile_default_section_offset): New function.
7077
7078 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7079
7080         * symfile.c (add_symbol_file_command): Make sure that sections
7081         with the same name are sorted in the same order.
7082
7083 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7084
7085         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7086         require the second argument.  If omitted, load sections at the
7087         addresses specified in the file.
7088
7089 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7090
7091         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7092         (_initialize_symfile): Add option "-o" to symbol-file to add an
7093         offset to each section of the symbol file.
7094
7095 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7096
7097         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7098
7099 2018-06-27  Tom Tromey  <tom@tromey.com>
7100
7101         * stack.c (_initialize_stack): Update "func" help text.
7102
7103 2018-06-27  Tom Tromey  <tom@tromey.com>
7104
7105         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7106         std::vector.
7107         (unwind_infopy_str, pyuw_create_unwind_info)
7108         (unwind_infopy_add_saved_register, pyuw_sniffer)
7109         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7110         Update.
7111         (struct saved_reg): Add constructor.
7112         <value>: Now a gdbpy_ref<>.
7113
7114 2018-06-27  Tom Tromey  <tom@tromey.com>
7115
7116         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7117
7118 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7119
7120         * gdb-gdb.py.in: Format using autopep8.
7121
7122 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7123
7124         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7125         (type_lookup_function): Recognize CORE_ADDR values.
7126
7127 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7128
7129         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7130         print tag_name.
7131
7132 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7133
7134         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7135         <__lt__>: Add.
7136
7137 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7138
7139         * gdb-gdb.py: Move to...
7140         * gdb-gdb.py.in: ... here.
7141         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7142         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7143         dependencies.
7144         (distclean): Remove gdb-gdb.py when cleaning.
7145         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7146         * configure: Re-generate.
7147
7148 2018-06-27  Pedro Alves  <palves@redhat.com>
7149
7150         * proc-service.c (get_ps_regcache): New.
7151         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7152         (ps_lsetfpregs): Use it.
7153
7154 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7155
7156         PR gdb/21695
7157         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7158         declaration.
7159         (dwarf_decode_lines_1): Adjust.
7160
7161 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7162
7163         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7164         override.
7165         <info_proc>: Likewise.
7166
7167 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7168
7169         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7170         to windows_fetch_one_register, and only handle the case of
7171         fetching one register.  Move the code that reloads the context
7172         and iterates over all registers if R is negative to...
7173         (windows_nat_target::fetch_registers): ... here.
7174         (do_windows_store_inferior_registers): Rename to
7175         windows_store_one_register, and only handle the case of storing
7176         one register.  Move the code that handles the case where r is
7177         negative to...
7178         (windows_nat_target::store_registers) ... here.
7179
7180 2018-06-26  Tom Tromey  <tom@tromey.com>
7181
7182         PR rust/22574:
7183         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7184         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7185         Update.
7186         (rust_internal_print_type): Add podata parameter.
7187         (rust_print_type): Update.
7188
7189 2018-06-26  Tom Tromey  <tom@tromey.com>
7190
7191         * typeprint.h (struct print_offset_data) <update, finish,
7192         maybe_print_hole>: New methods.
7193         <indentation>: New constant.
7194         * typeprint.c (print_offset_data::indentation): Define.
7195         (print_offset_data::maybe_print_hole, print_offset_data::update)
7196         (print_offset_data::finish): Move from c-typeprint.c and rename.
7197         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7198         (print_spaces_filtered_with_print_options): Update.
7199         (c_print_type_union_field_offset, maybe_print_hole)
7200         (c_print_type_struct_field_offset): Move to typeprint.c and
7201         rename.
7202         (c_type_print_base_struct_union): Update.
7203
7204 2018-06-25  Pedro Alves  <palves@redhat.com>
7205
7206         * gdbthread.h (thread_info_ref, delete_thread)
7207         (delete_thread_silent, first_thread_of_inferior)
7208         (any_thread_of_inferior, switch_to_thread)
7209         (enable_thread_stack_temporaries)
7210         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7211         (get_last_thread_stack_temporary)
7212         (value_in_thread_stack_temporaries, can_access_registers_thread):
7213         Spell out "struct thread_info" instead of just "thread_info".
7214         * inferior.h (notice_new_inferior): Likewise.
7215
7216 2018-06-25  Pedro Alves  <palves@redhat.com>
7217
7218         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7219         pass thread_info pointer to delete_thread.
7220         (windows_nat_target::detach): Pass inferior pointer to
7221         detach_inferior.
7222         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7223         delete_thread.
7224         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7225         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7226         and pass a thread_info pointer to delete_thread.
7227         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7228         pass thread_info pointer to delete_thread.
7229         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7230         delete_thread_silent call.
7231         * procfs.c (procfs_target::detach): Pass inferior pointer to
7232         detach_inferior.
7233         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7234         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7235         delete_thread_silent call.
7236         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7237         pass thread_info pointer to delete_thread.
7238         (windows_nat_target::detach): Pass inferior pointer to
7239         delete_inferior.
7240
7241 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7242
7243         * regcache.c (readable_regcache::read_part): Fix asserts.
7244         (reg_buffer::raw_collect_part): New function.
7245         (regcache::write_part): Fix asserts.
7246         (reg_buffer::raw_supply_part): New function.
7247         (regcache::transfer_regset_register): New helper function.
7248         (regcache::transfer_regset): Call new functions.
7249         (regcache_supply_regset): Use gdb_byte*.
7250         (regcache::supply_regset): Likewise.
7251         (regcache_collect_regset): Likewise.
7252         (regcache::collect_regset): Likewise.
7253         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7254         (reg_buffer::raw_supply_part): Likewise.
7255         (regcache::transfer_regset_register): Likewise.
7256         (regcache::transfer_regset): Use gdb_byte*.
7257
7258 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7259
7260         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7261
7262 2018-06-21  Pedro Alves  <palves@redhat.com>
7263
7264         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7265         instead of a ptid_t.  All callers adjusted.
7266         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7267         adjusted.
7268         (print_ada_task_info, display_current_task_id, task_command_1):
7269         Adjust.
7270         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7271         inferior_thread.
7272         (breakpoint_kind): Adjust.
7273         (remove_breakpoints_pid): Rename to ...
7274         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7275         pointer.  All callers adjusted.
7276         (bpstat_clear_actions): Use inferior_thread.
7277         (get_bpstat_thread): New.
7278         (bpstat_do_actions): Use it.
7279         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7280         to take a thread_info pointer.  All callers adjusted.
7281         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7282         (breakpoint_re_set_thread): Use inferior_thread.
7283         * breakpoint.h (struct inferior): Forward declare.
7284         (bpstat_stop_status): Update.
7285         (remove_breakpoints_pid): Delete.
7286         (remove_breakpoints_inf): New.
7287         * bsd-uthread.c (bsd_uthread_target::wait)
7288         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7289         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7290         (maint_btrace_packet_history_cmd)
7291         (maint_btrace_clear_packet_history_cmd): Adjust.
7292         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7293         inferior_thread.
7294         * cli/cli-interp.c: Include "inferior.h".
7295         * common/refcounted-object.h (struct
7296         refcounted_object_ref_policy): New.
7297         * compile/compile-object-load.c: Include gdbthread.h.
7298         (store_regs): Use inferior_thread.
7299         * corelow.c (core_target::close): Use current_inferior.
7300         (core_target_open): Adjust to use first_thread_of_inferior and use
7301         the current inferior.
7302         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7303         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7304         <thread>: ... this new field.  All references adjusted.
7305         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7306         Take a thread_info pointer instead of a ptid_t.
7307         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7308         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7309         thread_info pointer instead of a ptid_t.
7310         * elfread.c: Include "inferior.h".
7311         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7312         Use inferior_thread.
7313         * eval.c (evaluate_subexp): Likewise.
7314         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7315         inferior_thread.
7316         * gdb_proc_service.h (struct thread_info): Forward declare.
7317         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7318         <thread>: ... this new field.  All references adjusted.
7319         * gdbarch.h, gdbarch.c: Regenerate.
7320         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7321         'thread' parameter.  All implementations and callers adjusted.
7322         * gdbthread.h (thread_info) <set_running>: New method.
7323         (delete_thread, delete_thread_silent): Take a thread_info pointer
7324         instead of a ptid.
7325         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7326         (first_thread_of_process): Delete, replaced by ...
7327         (first_thread_of_inferior): ... this new function.  All callers
7328         adjusted.
7329         (any_live_thread_of_process): Delete, replaced by ...
7330         (any_live_thread_of_inferior): ... this new function.  All callers
7331         adjusted.
7332         (switch_to_thread, switch_to_no_thread): Declare.
7333         (is_executing): Delete.
7334         (enable_thread_stack_temporaries): Update comment.
7335         <enable_thread_stack_temporaries>: Take a thread_info pointer
7336         instead of a ptid_t.  Incref the thread.
7337         <~enable_thread_stack_temporaries>: Decref the thread.
7338         <m_ptid>: Delete
7339         <m_thr>: New.
7340         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7341         (get_last_thread_stack_temporary)
7342         (value_in_thread_stack_temporaries, can_access_registers_thread):
7343         Take a thread_info pointer instead of a ptid_t.  All callers
7344         adjusted.
7345         * infcall.c (get_call_return_value): Use inferior_thread.
7346         (run_inferior_call): Work with thread pointers instead of ptid_t.
7347         (call_function_by_hand_dummy): Work with thread pointers instead
7348         of ptid_t.  Use thread_info_ref.
7349         * infcmd.c (proceed_thread_callback): Access thread's state
7350         directly.
7351         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7352         access thread's state directly.
7353         (continue_command): Use inferior_thread.
7354         (info_program_command): Use find_thread_ptid and access thread
7355         state directly.
7356         (proceed_after_attach_callback): Use thread state directly.
7357         (notice_new_inferior): Take a thread_info pointer instead of a
7358         ptid_t.  All callers adjusted.
7359         (exit_inferior): Take an inferior pointer instead of a pid.  All
7360         callers adjusted.
7361         (exit_inferior_silent): New.
7362         (detach_inferior): Delete.
7363         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7364         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7365         (detach_inferior_command, kill_inferior_command): Use
7366         find_inferior_id instead of valid_gdb_inferior_id and
7367         gdb_inferior_id_to_pid.
7368         (inferior_command): Use inferior and thread pointers.
7369         * inferior.h (struct thread_info): Forward declare.
7370         (notice_new_inferior): Take a thread_info pointer instead of a
7371         ptid_t.  All callers adjusted.
7372         (detach_inferior): Delete declaration.
7373         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7374         instead of a pid.  All callers adjusted.
7375         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7376         (valid_gdb_inferior_id): Delete.
7377         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7378         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7379         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7380         ...
7381         <inf>: ... this new field.
7382         <step_ptid>: Delete, replaced by ...
7383         <step_thread>: ... this new field.
7384         (get_displaced_stepping_state): Take an inferior pointer instead
7385         of a pid.  All callers adjusted.
7386         (displaced_step_in_progress_any_inferior): Adjust.
7387         (displaced_step_in_progress_thread): Take a thread pointer instead
7388         of a ptid_t.  All callers adjusted.
7389         (displaced_step_in_progress, add_displaced_stepping_state): Take
7390         an inferior pointer instead of a pid.  All callers adjusted.
7391         (get_displaced_step_closure_by_addr): Adjust.
7392         (remove_displaced_stepping_state): Take an inferior pointer
7393         instead of a pid.  All callers adjusted.
7394         (displaced_step_prepare_throw, displaced_step_prepare)
7395         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7396         All callers adjusted.
7397         (start_step_over): Adjust.
7398         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7399         displaced step queue.
7400         (do_target_resume): Adjust.
7401         (fetch_inferior_event): Use inferior_thread.
7402         (context_switch, get_inferior_stop_soon): Take an
7403         execution_control_state pointer instead of a ptid_t.  All callers
7404         adjusted.
7405         (switch_to_thread_cleanup): Delete.
7406         (stop_all_threads): Use scoped_restore_current_thread.
7407         * inline-frame.c: Include "gdbthread.h".
7408         (inline_state) <inline_state>: Take a thread pointer instead of a
7409         ptid_t.  All callers adjusted.
7410         <ptid>: Delete, replaced by ...
7411         <thread>: ... this new field.
7412         (find_inline_frame_state): Take a thread pointer instead of a
7413         ptid_t.  All callers adjusted.
7414         (skip_inline_frames, step_into_inline_frame)
7415         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7416         pointer instead of a ptid_t.  All callers adjusted.
7417         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7418         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7419         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7420         pointers directly.
7421         * linux-nat.c (get_detach_signal): Likewise.
7422         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7423         (thread_db_notice_clone): Adjust.
7424         (thread_db_find_new_threads_silently)
7425         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7426         a thread pointer instead of a ptid_t.  All callers adjusted.
7427         * mi/mi-cmd-var.c: Include "inferior.h".
7428         (mi_cmd_var_update_iter): Update to use thread pointers.
7429         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7430         inferior directly.
7431         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7432         out to ...
7433         (mi_output_running): ... this new function.
7434         (mi_on_resume_1): Adjust to use it.
7435         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7436         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7437         directly.
7438         (interrupt_thread_callback): : Adjust to use thread and inferior
7439         pointers.
7440         * proc-service.c: Include "gdbthread.h".
7441         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7442         * progspace-and-thread.c: Include "inferior.h".
7443         * progspace.c: Include "inferior.h".
7444         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7445         hold a reference to an inferior_object.
7446         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7447         inferior_thread.
7448         * python/py-inferior.c (struct inferior_object): Give the type a
7449         tag name instead of a typedef.
7450         (python_on_normal_stop): No need to check if the current thread is
7451         listed.
7452         (inferior_to_inferior_object): Change return type to
7453         inferior_object.  All callers adjusted.
7454         (find_thread_object): Delete, bits factored out to ...
7455         (thread_to_thread_object): ... this new function.
7456         * python/py-infthread.c (create_thread_object): Use
7457         inferior_to_inferior_object.
7458         (thpy_is_stopped): Use thread pointer directly.
7459         (gdbpy_selected_thread): Use inferior_thread.
7460         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7461         field, replaced with ...
7462         <thread>: ... this new field.  All users adjusted.
7463         (btpy_insn_or_gap_new): Drop const.
7464         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7465         callers adjusted.
7466         * python/py-record.c: Include "gdbthread.h".
7467         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7468         a ptid_t.  All callers adjusted.
7469         (gdbpy_current_recording): Use inferior_thread.
7470         * python/py-record.h (recpy_record_object) <ptid>: Delete
7471         field, replaced with ...
7472         <thread>: ... this new field.  All users adjusted.
7473         (recpy_element_object) <ptid>: Delete
7474         field, replaced with ...
7475         <thread>: ... this new field.  All users adjusted.
7476         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7477         a ptid_t.  All callers adjusted.
7478         * python/py-threadevent.c: Include "gdbthread.h".
7479         (get_event_thread): Use thread_to_thread_object.
7480         * python/python-internal.h (struct inferior_object): Forward
7481         declare.
7482         (find_thread_object, find_inferior_object): Delete declarations.
7483         (thread_to_thread_object, inferior_to_inferior_object): New
7484         declarations.
7485         * record-btrace.c: Include "inferior.h".
7486         (require_btrace_thread): Use inferior_thread.
7487         (record_btrace_frame_sniffer)
7488         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7489         (get_thread_current_frame): Use scoped_restore_current_thread and
7490         switch_to_thread.
7491         (get_thread_current_frame): Use thread pointer directly.
7492         (record_btrace_replay_at_breakpoint): Use thread's inferior
7493         pointer directly.
7494         * record-full.c: Include "inferior.h".
7495         * regcache.c: Include "gdbthread.h".
7496         (get_thread_arch_regcache): Use the inferior's address space
7497         directly.
7498         (get_thread_regcache, registers_changed_thread): New.
7499         * regcache.h (get_thread_regcache(thread_info *thread)): New
7500         overload.
7501         (registers_changed_thread): New.
7502         (remote_target) <remote_detach_1>: Swap order of parameters.
7503         (remote_add_thread): <remote_add_thread>: Return the new thread.
7504         (get_remote_thread_info(ptid_t)): New overload.
7505         (remote_target::remote_notice_new_inferior): Use thread pointers
7506         directly.
7507         (remote_target::process_initial_stop_replies): Use
7508         thread_info::set_running.
7509         (remote_target::remote_detach_1, remote_target::detach)
7510         (extended_remote_target::detach): Adjust.
7511         * stack.c (frame_show_address): Use inferior_thread.
7512         * target-debug.h (target_debug_print_thread_info_pp): New.
7513         * target-delegates.c: Regenerate.
7514         * target.c (default_thread_address_space): Delete.
7515         (memory_xfer_partial_1): Use current_inferior.
7516         (target_detach): Use current_inferior.
7517         (target_thread_address_space): Delete.
7518         (generic_mourn_inferior): Use current_inferior.
7519         * target.h (struct target_ops) <thread_address_space>: Delete.
7520         (target_thread_address_space): Delete.
7521         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
7522         pointers directly.
7523         (delete_thread_1, delete_thread, delete_thread_silent): Take a
7524         thread pointer instead of a ptid_t.  Adjust all callers.
7525         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
7526         (first_thread_of_process): Delete, replaced by ...
7527         (first_thread_of_inferior): ... this new function.  All callers
7528         adjusted.
7529         (any_thread_of_process): Rename to ...
7530         (any_thread_of_inferior): ... this, and take an inferior pointer.
7531         (any_live_thread_of_process): Rename to ...
7532         (any_live_thread_of_inferior): ... this, and take an inferior
7533         pointer.
7534         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7535         (value_in_thread_stack_temporaries)
7536         (get_last_thread_stack_temporary): Take a thread pointer instead
7537         of a ptid_t.  Adjust all callers.
7538         (thread_info::set_running): New.
7539         (validate_registers_access): Use inferior_thread.
7540         (can_access_registers_ptid): Rename to ...
7541         (can_access_registers_thread): ... this, and take a thread
7542         pointer.
7543         (print_thread_info_1): Adjust to compare thread pointers instead
7544         of ptids.
7545         (switch_to_no_thread, switch_to_thread): Make extern.
7546         (scoped_restore_current_thread::~scoped_restore_current_thread):
7547         Use m_thread pointer directly.
7548         (scoped_restore_current_thread::scoped_restore_current_thread):
7549         Use inferior_thread.
7550         (thread_command): Use thread pointer directly.
7551         (thread_num_make_value_helper): Use inferior_thread.
7552         * top.c (execute_command): Use inferior_thread.
7553         * tui/tui-interp.c: Include "inferior.h".
7554         * varobj.c (varobj_create): Use inferior_thread.
7555         (value_of_root_1): Use find_thread_global_id instead of
7556         global_thread_id_to_ptid.
7557
7558 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
7559
7560         * regcache.c (readable_regcache::read_part): Avoid memcpy when
7561         possible.
7562         (regcache::write_part): Likewise.
7563         (readable_regcache::cooked_read_part): Update comment.
7564         (readable_regcache::cooked_write_part): Likewise.
7565         * regcache.h: (readable_regcache::read_part): Likewise.
7566         (regcache::write_part): Likewise.
7567
7568 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
7569             Dirk Schubert  <dirk.schubert@arm.com>
7570
7571         * aarch64-linux-nat.c (post_attach): New.
7572         (aarch64_linux_nat_target::post_attach): Override post_attach to
7573         record the number of hardware debug registers.
7574
7575 2018-06-20  Tom Tromey  <tom@tromey.com>
7576
7577         * python/py-param.c (add_setshow_generic): Make parameters const.
7578         (parmpy_init): Update.
7579
7580 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7581
7582         * regcache.h (regcache_cooked_read_ftype): Rename to...
7583         (register_read_ftype): ...this, change type to function_view.
7584         (class reg_buffer) <save>: Remove src parameter.
7585         (readonly_detached_regcache) <readonly_detached_regcache>: Make
7586         parameter non-const in first overload.  Remove src parameter in
7587         second overload.
7588         * regcache.c (do_cooked_read): Remove.
7589         (readonly_detached_regcache::readonly_detached_regcache): Make
7590         parameter non-const, adjust call to other constructor.
7591         (reg_buffer::save): Remove src parameter.
7592         * frame.c (do_frame_register_read): Remove.
7593         (frame_save_as_regcache): Use lambda function.
7594         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
7595         parameter to ppu2spu_data *.
7596         (ppu2spu_sniffer): Use lambda function.
7597
7598 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7599
7600         * record-full.c (record_full_target::insert_breakpoint): Remove
7601         "struct" keyword, add const.
7602
7603 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
7604
7605         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
7606         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
7607         * configure.ac: Remove AC_PREREQ, add missing quoting.
7608         * gnulib/configure.ac: Modernize usage of
7609         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
7610         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
7611         (AUTOMAKE_VERSION): Bump to 1.15.1.
7612         * configure: Re-generate.
7613         * config.in: Re-generate.
7614         * aclocal.m4: Re-generate.
7615         * gnulib/aclocal.m4: Re-generate.
7616         * gnulib/config.in: Re-generate.
7617         * gnulib/configure: Re-generate.
7618         * gnulib/import/Makefile.in: Re-generate.
7619
7620 2018-06-19  Pedro Alves  <palves@redhat.com>
7621
7622         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
7623         (lookup_minimal_symbol_by_pc_section): ... here with
7624         gdb_assert_not_reached added.
7625
7626 2018-06-19  Pedro Alves  <palves@redhat.com>
7627
7628         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
7629         parameter with a block parameter.  Compare location's block symbol
7630         with the frame's block instead of addresses.
7631         (skip_inline_frames): Pass the current block instead of the
7632         frame's address.  Break out as soon as we determine the frame
7633         should not be skipped.
7634
7635 2018-06-18  Tom Tromey  <tom@tromey.com>
7636
7637         * solib-aix.c (solib_aix_get_section_offsets): Return
7638         unique_xmalloc_ptr.
7639         (solib_aix_solib_create_inferior_hook): Update.
7640
7641 2018-06-18  Tom Tromey  <tom@tromey.com>
7642
7643         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
7644
7645 2018-06-18  Tom Tromey  <tom@tromey.com>
7646
7647         * solib-frv.c (frv_relocate_main_executable): Use
7648         unique_xmalloc_ptr.
7649         * solib-dsbt.c (dsbt_relocate_main_executable): Use
7650         unique_xmalloc_ptr.
7651
7652 2018-06-18  Tom Tromey  <tom@tromey.com>
7653
7654         * objfiles.h (inhibit_section_map_updates): Update.
7655         (resume_section_map_updates, resume_section_map_updates_cleanup):
7656         Remove.
7657         * solib-svr4.c (svr4_handle_solib_event): Update.
7658         * objfiles.c (inhibit_section_map_updates): Return
7659         scoped_restore_tmpl<int>.
7660         (resume_section_map_updates, resume_section_map_updates_cleanup):
7661         Remove.
7662
7663 2018-06-18  Tom Tromey  <tom@tromey.com>
7664
7665         * valprint.h (read_string): Update.
7666         * valprint.c (read_string): Change type of "buffer".
7667         (val_print_string): Update.
7668         * python/py-value.c (valpy_string): Update.
7669         * language.h (struct language_defn) <la_get_string>: Change
7670         type of "buffer".
7671         (default_get_string, c_get_string): Update.
7672         * language.c (default_get_string): Change type of "buffer".
7673         * guile/scm-value.c (gdbscm_value_to_string): Update.
7674         * c-lang.c (c_get_string): Change type of "buffer".
7675
7676 2018-06-18  Tom Tromey  <tom@tromey.com>
7677
7678         * ser-mingw.c (struct pipe_state_destroyer): New.
7679         (pipe_state_up): New typedef.
7680         (cleanup_pipe_state): Remove.
7681         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
7682
7683 2018-06-18  Tom Tromey  <tom@tromey.com>
7684
7685         * rust-lang.h (rust_yyerror): Don't declare.
7686         * rust-lang.c (rust_language_defn): Update.
7687         * rust-exp.y (yyerror): Now static.
7688         * parse.c (parse_exp_in_context_1): Update.
7689         * p-lang.h (p_yyerror): Don't declare.
7690         * p-lang.c (p_language_defn): Update.
7691         * p-exp.y (yyerror): Now static.
7692         * opencl-lang.c (opencl_language_defn): Update.
7693         * objc-lang.c (objc_language_defn): Update.
7694         * m2-lang.h (m2_yyerror): Don't declare.
7695         * m2-lang.c (m2_language_defn): Update.
7696         * m2-exp.y (yyerror): Now static.
7697         * language.h (struct language_defn) <la_error>: Remove.
7698         * language.c (unk_lang_error): Remove.
7699         (unknown_language_defn, auto_language_defn): Remove.
7700         * go-lang.h (go_yyerror): Don't declare.
7701         * go-lang.c (go_language_defn): Update.
7702         * go-exp.y (yyerror): Now static.
7703         * f-lang.h (f_yyerror): Don't declare.
7704         * f-lang.c (f_language_defn): Update.
7705         * f-exp.y (yyerror): Now static.
7706         * d-lang.h (d_yyerror): Don't declare.
7707         * d-lang.c (d_language_defn): Update.
7708         * d-exp.y (yyerror): Now static.
7709         * c-lang.h (c_yyerror): Don't declare.
7710         * c-lang.c (c_language_defn, cplus_language_defn)
7711         (asm_language_defn, minimal_language_defn): Update.
7712         * c-exp.y (yyerror): Now static.
7713         * ada-lang.h (ada_yyerror): Don't declare.
7714         * ada-lang.c (ada_language_defn): Update.
7715         * ada-exp.y (yyerror): Now static.
7716
7717 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7718
7719         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
7720         (store_sveregs_to_thread): Likewise.
7721         (aarch64_linux_fetch_inferior_registers): Check for SVE.
7722         (aarch64_linux_store_inferior_registers): Likewise.
7723         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
7724         function.
7725         (aarch64_sve_regs_copy_to_regcache): Likewise.
7726         (aarch64_sve_regs_copy_from_regcache): Likewise.
7727         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
7728         declaration.
7729         (aarch64_sve_regs_copy_to_regcache): Likewise.
7730         (aarch64_sve_regs_copy_from_regcache): Likewise.
7731         (sve_context): Structure from Linux headers.
7732         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
7733         (SVE_SIG_ZREG_SIZE): Likewise.
7734         (SVE_SIG_PREG_SIZE): Likewise.
7735         (SVE_SIG_FFR_SIZE): Likewise.
7736         (SVE_SIG_REGS_OFFSET): Likewise.
7737         (SVE_SIG_ZREGS_OFFSET): Likewise.
7738         (SVE_SIG_ZREG_OFFSET): Likewise.
7739         (SVE_SIG_ZREGS_SIZE): Likewise.
7740         (SVE_SIG_PREGS_OFFSET): Likewise.
7741         (SVE_SIG_PREG_OFFSET): Likewise.
7742         (SVE_SIG_PREGS_SIZE): Likewise.
7743         (SVE_SIG_FFR_OFFSET): Likewise.
7744         (SVE_SIG_REGS_SIZE): Likewise.
7745         (SVE_SIG_CONTEXT_SIZE): Likewise.
7746         (SVE_PT_REGS_MASK): Likewise.
7747         (SVE_PT_REGS_FPSIMD): Likewise.
7748         (SVE_PT_REGS_SVE): Likewise.
7749         (SVE_PT_VL_INHERIT): Likewise.
7750         (SVE_PT_VL_ONEXEC): Likewise.
7751         (SVE_PT_REGS_OFFSET): Likewise.
7752         (SVE_PT_FPSIMD_OFFSET): Likewise.
7753         (SVE_PT_FPSIMD_SIZE): Likewise.
7754         (SVE_PT_SVE_ZREG_SIZE): Likewise.
7755         (SVE_PT_SVE_PREG_SIZE): Likewise.
7756         (SVE_PT_SVE_FFR_SIZE): Likewise.
7757         (SVE_PT_SVE_FPSR_SIZE): Likewise.
7758         (SVE_PT_SVE_FPCR_SIZE): Likewise.
7759         (__SVE_SIG_TO_PT): Likewise.
7760         (SVE_PT_SVE_OFFSET): Likewise.
7761         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
7762         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
7763         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
7764         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
7765         (SVE_PT_SVE_PREG_OFFSET): Likewise.
7766         (SVE_PT_SVE_PREGS_SIZE): Likewise.
7767         (SVE_PT_SVE_FFR_OFFSET): Likewise.
7768         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
7769         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
7770         (SVE_PT_SVE_SIZE): Likewise.
7771         (SVE_PT_SIZE): Likewise.
7772         (HAS_SVE_STATE): New define.
7773
7774 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7775
7776         * nat/aarch64-sve-linux-sigcontext.h: New file.
7777         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
7778         new files.
7779         (SVE_VQ_MIN): Likewise.
7780         (SVE_VQ_MAX): Likewise.
7781         (SVE_VL_MIN): Likewise.
7782         (SVE_VL_MAX): Likewise.
7783         (SVE_NUM_ZREGS): Likewise.
7784         (SVE_NUM_PREGS): Likewise.
7785         (sve_vl_valid): Likewise.
7786         (struct user_sve_header): Likewise.
7787
7788 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
7789             Richard Bunt <Richard.Bunt@arm.com>
7790
7791         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7792         was requested by GDB.
7793
7794 2018-06-15  Tom de Vries  <tdevries@suse.de>
7795
7796         * MAINTAINERS (Write After Approval): Add Tom de Vries.
7797
7798 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
7799
7800         * gnulib/update-gnulib.sh: Print expected versions of
7801         autoconf/aclocal.
7802
7803 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
7804
7805         * arch-utils.c (default_type_align): Use type_length_units.
7806         * gdbtypes.c (type_align): Use type_length_units.
7807
7808 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7809
7810         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7811         of 'define' command.
7812
7813 2018-06-14  Tom de Vries  <tdevries@suse.de>
7814
7815         PR cli/22573
7816         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7817         get_no_prettyformat_print_options.
7818
7819 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7820
7821         * sparc-nat.h: Include target.h.
7822         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7823         <fetch_registers>: Remove this argument in function call.
7824         <store_registers>: Remove this argument in function call, remove
7825         extra semicolon.
7826         <low_forget_process>: Call sparc64_forget_process instead of
7827         sparc_forget_process.
7828
7829 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7830
7831         * procfs.c (_initialize_procfs): Use add_inf_child_target.
7832         (procfs_target::make_corefile_notes): Adjust to new
7833         target_read_alloc return type.
7834
7835 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7836             Stephen Roberts  <stephen.roberts@arm.com>
7837
7838         PR gdb/22882
7839         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7840         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7841         Move should_notify_stop local into more inner scope.
7842
7843 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7844             Stephen Roberts  <stephen.roberts@arm.com>
7845
7846         PR gdb/22882
7847         * infrun.c (resume_1): Add call to mark_async_event_handler.
7848
7849 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7850
7851         * infrun.c (do_target_wait): Change old version of $pc printed.
7852
7853 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7854
7855         * dwarf2read.c (read_index_from_section): Rename to...
7856         (read_gdb_index_from_section): ... this, update all callers.
7857         (dwarf2_read_index): Rename to...
7858         (dwarf2_read_gdb_index): ... this, update all callers.
7859
7860 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7861
7862         * hppa-linux-nat.c
7863         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7864         hppa_linux_nat_target::fetch_registers.
7865
7866 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7867
7868         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7869         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7870         (AARCH64_DWARF_SVE_FFR): Likewise.
7871         (AARCH64_DWARF_SVE_P0): Likewise.
7872         (AARCH64_DWARF_SVE_Z0): Likewise.
7873
7874 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7875
7876         * common/common-regcache.h (raw_compare): New function.
7877         * regcache.c (regcache::raw_compare): Likewise.
7878         * regcache.h (regcache::raw_compare): New declaration.
7879
7880 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7881
7882         * common/common-regcache.h (reg_buffer_common): New structure.
7883         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7884         (reg_buffer::raw_supply): Likewise.
7885         (reg_buffer::raw_supply_integer): Likewise.
7886         (reg_buffer::raw_supply_zeroed): Likewise.
7887         (reg_buffer::raw_collect): Likewise.
7888         (reg_buffer::raw_collect_integer): Likewise.
7889         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7890         (reg_buffer::raw_supply): Likewise.
7891         (reg_buffer::raw_supply_integer): Likewise.
7892         (reg_buffer::raw_supply_zeroed): Likewise.
7893         (reg_buffer::raw_collect): Likewise.
7894         (reg_buffer::raw_collect_integer): Likewise.
7895
7896 2018-06-10  Tom Tromey  <tom@tromey.com>
7897
7898         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7899         (class remote_state) <stop_reply_queue>: Now std::vector.
7900         (remote_state::~remote_state)
7901         (remote_target::stop_reply_queue_length): Update.
7902         (struct queue_iter_param, remove_child_of_pending_fork)
7903         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7904         (check_pending_event_prevents_wildcard_vcont_callback)
7905         (remove_stop_reply_for_inferior)
7906         (remove_stop_reply_of_remote_state)
7907         (remote_notif_remove_once_on_match)
7908         (stop_reply_match_ptid_and_ws)
7909         (remote_kill_child_of_pending_fork): Remove.
7910         (remote_target::remove_new_fork_children)
7911         (remote_target::check_pending_events_prevent_wildcard_vcont)
7912         (remote_target::discard_pending_stop_replies)
7913         (remote_target::discard_pending_stop_replies_in_queue)
7914         (remote_target::remote_notif_remove_queued_reply)
7915         (remote_target::queued_stop_reply)
7916         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7917         (remote_target::wait, remote_target::kill_new_fork_children)
7918         (remote_target::async): Update.
7919
7920 2018-06-10  Tom Tromey  <tom@tromey.com>
7921
7922         * record-full.c (record_full_arch_list_cleanups): Remove.
7923         (record_full_message): Use try/catch.
7924         (record_full_wait_cleanups): Remove.
7925         (record_full_wait_1): Use try/catch.
7926         (record_full_restore): Likewise.
7927
7928 2018-06-10  Tom Tromey  <tom@tromey.com>
7929
7930         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7931         declare VEC.  Add constructor.
7932         <in_target_beneath>: Now bool.
7933         (record_full_breakpoints): Now a std::vector, static.
7934         (record_full_sync_record_breakpoints)
7935         (record_full_init_record_breakpoints)
7936         (record_full_target::insert_breakpoint)
7937         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7938
7939 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7940
7941         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7942         * serial.c (serial_interface_lookup): Remove struct keyword.
7943
7944 2018-06-10  Tom Tromey  <tom@tromey.com>
7945
7946         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7947         method.
7948         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7949         a method.
7950         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7951         method.
7952         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7953         "beneath" as a method.
7954         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7955         Use "beneath" as a method.
7956
7957 2018-06-10  Tom Tromey  <tom@tromey.com>
7958
7959         * tracefile.c (struct trace_file_writer_deleter): New.
7960         <operator()>: Rename from trace_file_writer_xfree.
7961         (trace_file_writer_up): New typedef.
7962         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7963
7964 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7965
7966         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7967         <m_registers, m_register_status>: Change type to
7968         std::unique_ptr.
7969         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7970         XCNEWVEC.
7971
7972 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7973
7974         * common/common-regcache.h (enum register_status): Add
7975         underlying type "signed char".
7976         * regcache.h (reg_buffer) <m_register_status>: Change type to
7977         register_status *.
7978         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7979         register_status instead of signed char.
7980         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7981         (reg_buffer::get_register_status): Remove cast.
7982         (readable_regcache::raw_read): Remove cast.
7983         (readable_regcache::cooked_read): Remove cast.
7984
7985 2018-06-09  Tom Tromey  <tom@tromey.com>
7986
7987         * source.c (reverse_search_command, forward_search_command): Use
7988         scoped_fd.
7989
7990 2018-06-09  Tom Tromey  <tom@tromey.com>
7991
7992         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7993         (serial_ops_list): Now static, std::vector.
7994         (serial_interface_lookup, serial_add_interface): Update.
7995
7996 2018-06-09  Tom Tromey  <tom@tromey.com>
7997
7998         * dwarf2read.c (process_cu_includes): Update.
7999         (process_full_comp_unit): Update.
8000         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8001         std::vector.
8002
8003 2018-06-08  Paul Koning  <paul_koning@dell.com>
8004
8005         PR gdb/23252
8006
8007         * python/python.c (do_start_initialization):
8008         Avoid call to internal Python API.
8009         (init__gdb_module): New function.
8010
8011 2018-06-08  Gary Benson <gbenson@redhat.com>
8012
8013         * linux-thread-db.c (valprint.h): New include.
8014         (struct check_thread_db_info): New structure.
8015         (check_thread_db_on_load, tdb_testinfo): New static globals.
8016         (check_thread_db, check_thread_db_callback): New functions.
8017         (try_thread_db_load_1): Run integrity checks if requested.
8018         (maintenance_check_libthread_db): New function.
8019         (_initialize_thread_db): Register "maint check libthread-db"
8020         and "maint set/show check-libthread-db".
8021         * NEWS: Mention the above new commands.
8022
8023 2018-06-08  Tom Tromey  <tom@tromey.com>
8024
8025         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8026         now a method.
8027
8028 2018-06-08  Tom Tromey  <tom@tromey.com>
8029
8030         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8031
8032 2018-06-08  Tom Tromey  <tom@tromey.com>
8033
8034         * common/btrace-common.h (struct btrace_data): Add constructor,
8035         destructor, move assignment operator.
8036         <empty, clear, fini>: New methods.
8037         <format>: Initialize.
8038         (btrace_data_init, btrace_data_fini, btrace_data_clear)
8039         (btrace_data_empty): Don't declare.
8040         * common/btrace-common.c (btrace_data_init): Remove.
8041         (btrace_data::fini): Rename from btrace_data_fini.
8042         (btrace_data::empty): Rename from btrace_data_empty.
8043         (btrace_data::clear): Rename from btrace_data_clear.  Return
8044         bool.
8045         * btrace.h (make_cleanup_btrace_data): Don't declare.
8046         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8047         (parse_xml_btrace): Update.
8048         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8049         (maint_btrace_clear_packet_history_cmd): Update.
8050
8051 2018-06-07  Pedro Alves  <palves@redhat.com>
8052
8053         * target.h (target_ops) <beneath>: Now a method.  All references
8054         updated.
8055         (class target_stack): New.
8056         * target.c (g_target_stack): New.
8057         (g_current_top_target): Delete.
8058         (current_top_target): Get the top target out of g_target_stack.
8059         (target_stack::push, target_stack::unpush): New.
8060         (push_target, unpush_target): Reimplement.
8061         (target_is_pushed): Reimplement in terms of g_target_stack.
8062         (target_ops::beneath, target_stack::find_beneath): New.
8063
8064 2018-06-07  Pedro Alves  <palves@redhat.com>
8065
8066         * target.h (find_target_beneath): Delete declaration.
8067         * target.c (find_target_beneath): Delete definition.
8068         * aix-thread.c: All callers of find_target_beneath adjusted to
8069         call target_ops::beneath instead.
8070         * bsd-uthread.c: Likewise.
8071         * linux-thread-db.c: Likewise.
8072         * ravenscar-thread.c: Likewise.
8073         * sol-thread.c: Likewise.
8074         * spu-multiarch.c: Likewise.
8075
8076 2018-06-07  Pedro Alves  <palves@redhat.com>
8077
8078         * target.h (target_ops) <beneath>: Now a method.  All references
8079         updated.
8080         (target_ops) <m_beneath>: New.
8081         * target.c (target_ops::beneath): New.
8082         * corelow.c: Adjust all references to target_ops::beneath.
8083         * linux-thread-db.c: Likewise.
8084         * make-target-delegates: Likewise.
8085         * record-btrace.c: Likewise.
8086         * record-full.c: Likewise.
8087         * remote.c: Likewise.
8088         * target.c: Likewise.
8089         * target-delegates.c: Regenerate.
8090
8091 2018-06-07  Pedro Alves  <palves@redhat.com>
8092
8093         * target.h (target_stack): Delete.
8094         (current_top_target): Declare function.
8095         * target.c (target_stack): Delete.
8096         (g_current_top_target): New.
8097         (current_top_target): New function.
8098         * auxv.c: Use current_top_target instead of target_stack
8099         throughout.
8100         * avr-tdep.c: Likewise.
8101         * breakpoint.c: Likewise.
8102         * corefile.c: Likewise.
8103         * elfread.c: Likewise.
8104         * eval.c: Likewise.
8105         * exceptions.c: Likewise.
8106         * frame.c: Likewise.
8107         * gdbarch-selftests.c: Likewise.
8108         * gnu-v3-abi.c: Likewise.
8109         * ia64-tdep.c: Likewise.
8110         * ia64-vms-tdep.c: Likewise.
8111         * infcall.c: Likewise.
8112         * infcmd.c: Likewise.
8113         * infrun.c: Likewise.
8114         * linespec.c: Likewise.
8115         * linux-tdep.c: Likewise.
8116         * minsyms.c: Likewise.
8117         * ppc-linux-nat.c: Likewise.
8118         * ppc-linux-tdep.c: Likewise.
8119         * procfs.c: Likewise.
8120         * regcache.c: Likewise.
8121         * remote.c: Likewise.
8122         * rs6000-tdep.c: Likewise.
8123         * s390-linux-nat.c: Likewise.
8124         * s390-tdep.c: Likewise.
8125         * solib-aix.c: Likewise.
8126         * solib-darwin.c: Likewise.
8127         * solib-dsbt.c: Likewise.
8128         * solib-spu.c: Likewise.
8129         * solib-svr4.c: Likewise.
8130         * solib-target.c: Likewise.
8131         * sparc-tdep.c: Likewise.
8132         * sparc64-tdep.c: Likewise.
8133         * spu-tdep.c: Likewise.
8134         * symfile.c: Likewise.
8135         * symtab.c: Likewise.
8136         * target-descriptions.c: Likewise.
8137         * target-memory.c: Likewise.
8138         * target.c: Likewise.
8139         * target.h: Likewise.
8140         * tracefile-tfile.c: Likewise.
8141         * tracepoint.c: Likewise.
8142         * valops.c: Likewise.
8143         * valprint.c: Likewise.
8144         * value.c: Likewise.
8145         * windows-tdep.c: Likewise.
8146         * mi/mi-main.c: Likewise.
8147
8148 2018-06-07  Tom Tromey  <tom@tromey.com>
8149
8150         * valprint.h (build_address_symbolic): Declare.
8151         * printcmd.c (print_address_symbolic): Update.
8152         (build_address_symbolic): Change "name" and "filename" to
8153         std::string.
8154         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8155         Update.
8156         * defs.h (build_address_symbolic): Remove declaration.
8157
8158 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8159
8160         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8161         (aarch64_vnv_type): Add function.
8162         (aarch64_pseudo_register_name): Add V regs for SVE.
8163         (aarch64_pseudo_register_type): Likewise.
8164         (aarch64_pseudo_register_reggroup_p): Likewise.
8165         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8166         (aarch64_pseudo_read_value): Add V regs for SVE.
8167         (aarch64_pseudo_write_2): Use V0 offset for SVE
8168         (aarch64_pseudo_write): Add V regs for SVE.
8169         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8170
8171 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8172
8173         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8174         (sve_vl_from_vq): Likewise.
8175
8176 2018-06-05  Tom Tromey  <tom@tromey.com>
8177
8178         * cli/cli-cmds.c (show_version): Update.
8179         * top.c (print_gdb_version): Add "interactive" parameter.
8180         Update.
8181         * main.c (captured_main_1): Update.
8182         * top.h (print_gdb_version): Add "interactive" parameter and a
8183         comment.
8184
8185 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8186
8187         * common/enum-flags.h: Add trailing semicolon to example in
8188         comment.
8189
8190 2018-06-05  Tom Tromey  <tom@tromey.com>
8191
8192         PR cli/12326:
8193         * NEWS: Add entry about pager.
8194         * utils.c (pagination_disabled_for_command): New global.
8195         (prompt_for_continue): Allow "c" response to prompt.
8196         (reinitialize_more_filter): Clear
8197         pagination_disabled_for_command.
8198         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8199
8200 2018-06-04  Tom Tromey  <tom@tromey.com>
8201
8202         * ada-lang.h (ada_lookup_symbol_list): Update.
8203         * ada-lang.c (resolve_subexp): Update.
8204         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8205         parameter.
8206         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8207         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8208         results parameter to std::vector.
8209         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8210         Update.
8211         * ada-exp.y (block_lookup): Update.
8212         (select_possible_type_sym): Change type of syms.  Remove nsyms
8213         parameter.
8214         (write_var_or_type, write_name_assoc): Update.
8215
8216 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8217
8218         * windows-nat.c (windows_nat_target::xfer_partial): Return
8219         TARGET_XFER_E_IO if we need to delegate to the target beneath
8220         but BENEATH is NULL.
8221
8222 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8223
8224         * Makefile.in (config.status): Add configure.nat as a
8225         dependency.
8226
8227 2018-06-04  Tom Tromey  <tom@tromey.com>
8228
8229         * cp-name-parser.y (cpname_state): Add method declarations.
8230         (HANDLE_QUAL): Update.
8231         (cpname_state::d_grab, cpname_state::fill_comp)
8232         (cpname_state::make_operator, cpname_state::make_dtor)
8233         (cpname_state::make_builtin_type, cpname_state::make_name)
8234         (cpname_state::d_qualify, cpname_state::d_int_type)
8235         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8236         (%union): Move earlier.
8237
8238 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8239
8240         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8241
8242 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8243
8244         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8245         (aarch64_pseudo_write_1): Likewise.
8246         (aarch64_pseudo_read_value): Use helper.
8247         (aarch64_pseudo_write): Likewise.
8248
8249 2018-06-04  Pedro Alves  <palves@redhat.com>
8250
8251         * darwin-nat.c (darwin_ops): Delete.
8252         (darwin_attach_pid): Use get_native_target.
8253
8254 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8255
8256         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8257         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8258
8259 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8260
8261         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8262         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8263         (aarch64_gdbarch_init): Check for SVE.
8264         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8265
8266 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8267
8268         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8269         * aarch64-tdep.h (aarch64_read_description): Likewise.
8270         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8271         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8272         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8273         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8274         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8275
8276 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8277
8278         * value.c (value_fetch_lazy_bitfield): New.
8279         (value_fetch_lazy_memory): New.
8280         (value_fetch_lazy_register): New.
8281         (value_fetch_lazy): Factor out to smaller functions.
8282
8283 2018-06-01  Tom Tromey  <tom@tromey.com>
8284
8285         * cp-name-parser.y (backslashable, represented): Now const.
8286
8287 2018-06-01  Tom Tromey  <tom@tromey.com>
8288
8289         * cp-name-parser.y: Include parser-defs.h.
8290         (parser_fprintf): Remove declaration.
8291
8292 2018-06-01  Tom Tromey  <tom@tromey.com>
8293
8294         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8295         %parse-param.
8296         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8297         (global_result): Remove globals.
8298         (struct cpname_state): New.
8299         (yyparse): Don't declare.
8300         (yylex, yyerror): Move declarations after %union.
8301         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8302         (make_name): Add state parameter.
8303         Update all callers.
8304         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8305         parameter.
8306         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8307         Update.
8308         (yylex): Add lvalp, state parameters.
8309         (yyerror): Add state parameter.
8310         (cp_demangled_name_to_comp): Update.
8311
8312 2018-06-01  Tom Tromey  <tom@tromey.com>
8313
8314         * cp-name-parser.y (parser_fprintf): Declare.
8315         (GDB_YY_REMAP_PREFIX): Define.
8316         Include yy-remap.h.  Don't redefine yy* identifiers.
8317
8318 2018-06-01  Tom Tromey  <tom@tromey.com>
8319
8320         * python/py-type.c (typy_legacy_template_argument): Update.
8321         * cp-support.h (cp_demangled_name_to_comp): Update.
8322         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8323         parameter to be a "std::string *".
8324         (main): Update.
8325
8326 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8327
8328         * ada-lex.l: Include "diagnostics.h" instead of
8329         "common/diagnostics.h".
8330         * unittests/environ-selftests.c: Likewise.
8331         * common/diagnostics.h: Moved to ../include.
8332
8333 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8334
8335         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8336         to language_mode_manual while calling breakpoint_re_set_one.
8337
8338 2018-06-01  Tom Tromey  <tom@tromey.com>
8339
8340         * valops.c (value_cast_structs, destructor_name_p): Update.
8341         * symtab.c (gdb_mangle_name): Update.
8342         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8343         Update.
8344         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8345         (pascal_object_print_value_fields, pascal_object_print_value):
8346         Update.
8347         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8348         * linespec.c (find_methods): Update.
8349         * gdbtypes.h (type_name_no_tag): Remove.
8350         (type_name_or_error): Rename from type_name_no_tag_or_error.
8351         * gdbtypes.c (type_name_no_tag): Remove.
8352         (type_name_or_error): Rename from type_name_no_tag_or_error.
8353         (lookup_struct_elt_type, check_typedef): Update.
8354         * expprint.c (print_subexp_standard): Update.
8355         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8356         * d-namespace.c (d_lookup_nested_symbol): Update.
8357         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8358         (cp_print_class_member): Update.
8359         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8360         * completer.c (add_struct_fields): Update.
8361         * c-typeprint.c (cp_type_print_derivation_info)
8362         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8363         Update.
8364         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8365         (ada_prefer_type, ada_is_exception_sym): Update.
8366
8367 2018-06-01  Tom Tromey  <tom@tromey.com>
8368
8369         * valops.c (enum_constant_from_type, value_namespace_elt)
8370         (value_maybe_namespace_elt): Update.
8371         * valarith.c (find_size_for_pointer_math): Update.
8372         * target-descriptions.c (make_gdb_type): Update.
8373         * symmisc.c (print_symbol): Update.
8374         * stabsread.c (define_symbol, read_type)
8375         (complain_about_struct_wipeout, add_undefined_type)
8376         (cleanup_undefined_types_1): Update.
8377         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8378         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8379         (rust_internal_print_type, rust_composite_type)
8380         (rust_evaluate_funcall, rust_evaluate_subexp)
8381         (rust_inclusive_range_type_p): Update.
8382         * python/py-type.c (typy_get_tag): Update.
8383         * p-typeprint.c (pascal_type_print_base): Update.
8384         * mdebugread.c (parse_symbol, parse_type): Update.
8385         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8386         Update.
8387         * guile/scm-type.c (gdbscm_type_tag): Update.
8388         * go-lang.c (sixg_string_p): Update.
8389         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8390         Update.
8391         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8392         (TYPE_TAG_NAME): Remove.
8393         * gdbtypes.c (type_name_no_tag): Simplify.
8394         (check_typedef, check_types_equal, recursive_dump_type)
8395         (copy_type_recursive, arch_composite_type): Update.
8396         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8397         in summary mode when needed.
8398         * eval.c (evaluate_funcall): Update.
8399         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8400         (process_structure_scope, read_enumeration_type)
8401         (read_namespace_type, read_module_type, determine_prefix): Update.
8402         * cp-support.c (inspect_type): Update.
8403         * coffread.c (process_coff_symbol, decode_base_type): Update.
8404         * c-varobj.c (c_is_path_expr_parent): Update.
8405         * c-typeprint.c (c_type_print_base_struct_union): Update.
8406         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8407         summary when using C language.
8408         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8409         (gen_maybe_namespace_elt): Update.
8410         * ada-lang.c (ada_type_name): Simplify.
8411         (empty_record, ada_template_to_fixed_record_type_1)
8412         (template_to_static_fixed_type)
8413         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8414
8415 2018-06-01  Tom Tromey  <tom@tromey.com>
8416
8417         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8418         c_print_type.
8419         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8420         (c_print_type): Update.
8421         (c_print_type): New overload.
8422         (c_type_print_varspec_prefix, c_type_print_args)
8423         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8424         (c_type_print_base_struct_union, c_type_print_base_1)
8425         (cp_type_print_method_args): Add "language" parameter.
8426         (c_type_print_base): Update.
8427         * c-lang.h (c_print_type): Add new overload.
8428
8429 2018-06-01  Tom Tromey  <tom@tromey.com>
8430
8431         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8432         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8433
8434 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8435
8436         * aarch64-tdep.c (aarch64_sve_register_names): New const
8437         var.
8438         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8439         (AARCH64_SVE_Z_REGS_NUM): New define.
8440         (AARCH64_SVE_P_REGS_NUM): Likewise.
8441         (AARCH64_SVE_NUM_REGS): Likewise.
8442
8443 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8444
8445         * nat/linux-ptrace.h [__alpha__]
8446         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8447         definitions.
8448
8449 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8450
8451         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8452         the endianness selected.
8453         * NEWS: Document `set endian auto' mode operation update.
8454
8455 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8456
8457         * Makefile.in: Add new header.
8458         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8459         (sve_vl_from_vg): Likewise.
8460         (sve_vq_from_vl): Likewise.
8461         (sve_vl_from_vq): Likewise.
8462         (sve_vq_from_vg): Likewise.
8463         (sve_vg_from_vq): Likewise.
8464         * configure.nat: Add new c file.
8465         * nat/aarch64-sve-linux-ptrace.c: New file.
8466         * nat/aarch64-sve-linux-ptrace.h: New file.
8467
8468 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8469
8470         * aarch64-linux-nat.c (aarch64_linux_read_description):
8471         Add parmeter zero.
8472         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8473         Likewise.
8474         * aarch64-tdep.c (tdesc_aarch64_list): Add.
8475         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8476         (aarch64_gdbarch_init): Add parmeter zero.
8477         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8478         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8479         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8480         parmeter.
8481         * doc/gdb.texinfo: Describe SVE feature
8482         * features/aarch64-sve.c: New file.
8483
8484 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
8485
8486         PR gdb/23210
8487         * gdbarch.sh (significant_addr_bit): Default to zero when
8488         not set by target architecture.
8489         * gdbarch.c: Re-generated.
8490         * utils.c (address_significant): Update.
8491
8492 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
8493
8494         * stack.c (func_command): Remove trailing newline in call to error.
8495
8496 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8497
8498         * regcache.h (regcache_raw_collect): Remove, update callers to
8499         use regcache::raw_collect.
8500         * regcache.c (regcache_raw_collect): Remove.
8501
8502 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8503
8504         * regcache.h (regcache_raw_supply): Remove, update callers to
8505         use detached_regcache::raw_supply.
8506         * regcache.c (regcache_raw_supply): Remove.
8507
8508 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8509
8510         * regcache.h (regcache_cooked_write_part): Remove, update
8511         callers to use regcache::cooked_write_part.
8512         * regcache.c (regcache_cooked_write_part): Remove.
8513
8514 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8515
8516         * regcache.h (regcache_cooked_read_part): Remove, update callers
8517         to use readable_regcache::cooked_read_part.
8518         * regcache.c (regcache_cooked_read_part): Remove.
8519
8520 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8521
8522         * regcache.h (regcache_cooked_read_value): Remove, update
8523         callers to use readable_regcache::cooked_read_value.
8524         * regcache.c (regcache_cooked_read_value): Remove.
8525
8526 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8527
8528         * regcache.h (regcache_cooked_write): Remove, update callers to
8529         use regcache::cooked_write.
8530         * regcache.c (regcache_cooked_write): Remove.
8531
8532 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8533
8534         * regcache.h (regcache_invalidate): Remove, update callers to
8535         use detached_regcache::invalidate instead.
8536         * regcache.c (regcache_invalidate): Remove.
8537
8538 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8539
8540         * regcache.h (regcache_raw_write_part): Remove, update callers
8541         to use regcache::raw_write_part instead.
8542         * regcache.c (regcache_raw_write_part): Remove.
8543
8544 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8545
8546         * regcache.h (regcache_raw_read_part): Remove, update callers to
8547         use readable_regcache::raw_read_part instead.
8548         * regcache.c (regcache_raw_read_part): Remove.
8549
8550 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8551
8552         * regcache.h (regcache_cooked_read): Remove, update callers to
8553         use readable_regcache::cooked_read instead.
8554         * regcache.c (regcache_cooked_read): Remove.
8555
8556 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8557
8558         * regcache.h (regcache_raw_write): Remove, update callers to use
8559         regcache::raw_write instead.
8560         * regcache.c (regcache_raw_write): Remove.
8561
8562 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8563
8564         * regcache.h (regcache_raw_read): Remove, update callers to use
8565         readable_regcache::raw_read instead.
8566         * regcache.c (regcache_raw_read): Remove.
8567
8568 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8569
8570         * regcache.h (regcache_raw_update): Remove, update callers to
8571         use readable_regcache::raw_update instead.
8572         * regcache.c (regcache_raw_update): Remove.
8573
8574 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8575
8576         * regcache.h (regcache_register_status): Remove, update callers
8577         to use reg_buffer::get_register_status directly instead.
8578         * regcache.c (regcache_register_status): Remove.
8579
8580 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8581
8582         * regcache.h (regcache_get_ptid): Remove, update all callers to
8583         call regcache::ptid instead.
8584         * regcache.c (regcache_get_ptid): Remove.
8585
8586 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8587
8588         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
8589
8590 2018-05-30  Pedro Alves  <palves@redhat.com>
8591
8592         * common/common-exceptions.h (exception_rethrow): Use
8593         ATTRIBUTE_NORETURN.
8594
8595 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
8596
8597         * breakpoint.c (print_solib_event, check_status_catch_solib):
8598         Remove struct keyword in range-based for loops.
8599         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
8600         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
8601         Likewise.
8602         * linespec.c (find_superclass_methods, search_minsyms_for_name):
8603         Likewise.
8604         * symfile.c (addr_info_make_relative): Likewise.
8605         * thread.c (value_in_thread_stack_temporaries): Likewise.
8606
8607 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
8608
8609         PR gdb/16841
8610         * valops.c (value_struct_elt_for_reference): Call check_typedef on
8611         aggregate type to get its real type before accessing it.
8612
8613 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
8614
8615         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
8616         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
8617         * coff-pe-read.c (add_pe_forwarded_sym): Replace
8618         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
8619         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
8620         * jit.c (jit_breakpoint_re_set_internal): Likewise.
8621         * printcmd.c (info_address_command): Likewise.
8622
8623 2018-05-29  Tom Tromey  <tom@tromey.com>
8624
8625         * windows-nat.c (handle_exception): Update fall-through comment.
8626
8627 2018-05-29  Tom Tromey  <tom@tromey.com>
8628
8629         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
8630         (struct program_space) <added_solibs>: Now a std::vector.
8631         * breakpoint.c (print_solib_event): Update.
8632         (check_status_catch_solib): Update.
8633         * progspace.c (clear_program_space_solib_cache): Update.
8634         * solib.c (update_solib_list): Update.
8635
8636 2018-05-29  Tom Tromey  <tom@tromey.com>
8637
8638         * python/py-type.c (typy_richcompare): Update.
8639         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
8640         * gdbtypes.h (types_deeply_equal): Return bool.
8641         (types_equal): Likewise.
8642         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
8643         declare VEC.
8644         (check_types_equal): Change worklist to std::vector.  Return
8645         bool.
8646         (struct type_equality_entry): Add constructor.
8647         (compare_maybe_null_strings): Return bool.
8648         (check_types_worklist): Return bool.  Change worklist to
8649         std::vector.
8650         (types_deeply_equal): Use std::vector.
8651         (types_equal): Return bool.
8652         (compare_maybe_null_strings): Simplify.
8653
8654 2018-05-29  Tom Tromey  <tom@tromey.com>
8655
8656         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
8657
8658 2018-05-29  Tom Tromey  <tom@tromey.com>
8659
8660         * objc-lang.h: Don't include cp-support.h.
8661         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
8662         declare VEC.
8663
8664 2018-05-27  Tom Tromey  <tom@tromey.com>
8665
8666         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
8667
8668 2018-05-25  Tom Tromey  <tom@tromey.com>
8669
8670         * value.c (value::location): Initialize.
8671
8672 2018-05-25  Tom Tromey  <tom@tromey.com>
8673
8674         * dbxread.c (init_bincl_list): Remove.
8675         (bincl_list): Now a std::vector.
8676         (bincls_allocated, next_bincl): Remove.
8677         (free_bincl_list, do_free_bincl_list_cleanup)
8678         (make_cleanup_free_bincl_list): Remove.
8679         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
8680         unique_xmalloc_ptr.
8681         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
8682         (struct header_file_location): Add constructor.
8683         (add_bincl_to_list): Remove.
8684
8685 2018-05-25  Tom Tromey  <tom@tromey.com>
8686
8687         * tui/tui.c (tui_enable): Update.
8688         * mi/mi-interp.c (mi_interp::init): Update.
8689         * interps.h (class interp) <name>: New method.
8690         <m_name>: Rename from name.
8691         (~scoped_restore_interp): Update.
8692         * interps.c (interp::interp): Update.
8693         (interp_add, interp_set, interp_lookup_existing)
8694         (current_interp_named_p): Update.
8695
8696 2018-05-25  Tom Tromey  <tom@tromey.com>
8697
8698         * interps.c (interp_name): Remove.
8699         * mi/mi-interp.c (mi_interp::init): Update.
8700         * interps.h (interp_name): Remove.
8701         (~scoped_restore_interp): Update.
8702         * tui/tui.c (tui_enable): Update.
8703
8704 2018-05-25  Tom Tromey  <tom@tromey.com>
8705
8706         * utils.c (fputs_maybe_filtered): Update.
8707         * linespec.c (decode_line_full): Update.
8708         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
8709         (mi_print_breakpoint_for_event, mi_solib_loaded)
8710         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
8711         (mi_user_selected_context_changed): Update.
8712         * mi/mi-main.c (mi_execute_command): Update.
8713         * cli/cli-script.c (execute_control_command): Update.
8714         * python/python.c (execute_gdb_command): Update.
8715         * solib.c (info_sharedlibrary_command): Update.
8716         * interps.c (interp_ui_out): Remove.
8717         * interps.h (interp_ui_out): Remove.
8718
8719 2018-05-25  Tom Tromey  <tom@tromey.com>
8720
8721         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
8722         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
8723         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
8724
8725 2018-05-25  Tom Tromey  <tom@tromey.com>
8726
8727         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
8728         * interps.c (interp_exec): Use scoped_restore.
8729
8730 2018-05-25  Tom Tromey  <tom@tromey.com>
8731
8732         * remote.c (remote_target::remote_file_get): Use
8733         gdb::byte_vector.
8734         (remote_target::remote_file_put): Likewise.
8735
8736 2018-05-25  Tom Tromey  <tom@tromey.com>
8737
8738         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
8739         a std::string.
8740         (get_pe_section_index, add_pe_exported_sym): Update.
8741         (read_pe_exported_syms): Use gdb::def_vector.
8742
8743 2018-05-25  Tom Tromey  <tom@tromey.com>
8744
8745         * frame.c (remove_prev_frame): Remove.
8746         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
8747
8748 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
8749
8750         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
8751         Remove prototypes.
8752         * mips-linux-nat.c (supply_fpregset): Always call
8753         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
8754         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
8755         `mips_fill_fpregset'.
8756         * mips-linux-tdep.c (mips_supply_fpregset)
8757         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
8758         (mips_fill_fpregset_wrapper): Remove functions.
8759         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
8760         (mips_linux_fpregset): Remove variable.
8761         (mips_linux_iterate_over_regset_sections): Use
8762         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
8763         (mips_linux_o32_sigframe_init): Remove comment.
8764
8765 2018-05-25  Pedro Alves  <palves@redhat.com>
8766
8767         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
8768         (struct readahead_cache, struct packet_reg, struct
8769         remote_arch_state, class remote_state): Move higher up in the
8770         file.
8771         (remote_target::m_remote_state): Now an object instead of a pointer.
8772         (remote_target::get_remote_state): Adjust.
8773
8774 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8775
8776         * stack.c (select_and_print_frame): Delete.
8777         (struct function_bounds): Move struct within function.
8778         (func_command): Most content moved into new function
8779         find_frame_for_function, use new function, print result, add
8780         function comment.
8781         (find_frame_for_function): New function, now returns a result.
8782
8783 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8784
8785         * stack.c (iterate_over_block_arg_vars): Fix comment.
8786         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
8787
8788 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8789
8790         PR gdb/23203
8791         * frame.c
8792         (scoped_restore_selected_frame::scoped_restore_selected_frame):
8793         Define.
8794         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8795         Define.
8796         * frame.h (class scoped_restore_selected_frame): New class.
8797         * stack.c (print_frame_local_vars): Remove catching and rethrowing
8798         of any exception, use scoped_restore_selected_frame to restore the
8799         frame instead.
8800
8801 2018-05-24  Pedro Alves  <palves@redhat.com>
8802
8803         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8804         override.
8805
8806 2018-05-23  Tom Tromey  <tom@tromey.com>
8807
8808         * complaints.c (struct complaints): Remove.
8809         (symfile_complaint_book): Remove.
8810         (series): New global.
8811         (complaint_internal): Update.
8812         (clear_complaints): Update.
8813
8814 2018-05-23  Tom Tromey  <tom@tromey.com>
8815
8816         * complaints.c (counters): New global.
8817         (struct complain): Remove.
8818         (struct complaints) <root>: Remove.
8819         (complaint_sentinel): Remove.
8820         (symfile_complaint_book): Update.
8821         (find_complaint) Remove.
8822         (complaint_internal, clear_complaints): Update.
8823
8824 2018-05-23  Tom Tromey  <tom@tromey.com>
8825
8826         * complaints.c (struct complain) <file, line>: Remove.
8827         (find_complaint): Remove file, line parameters.
8828         (complaint_internal): Update.
8829
8830 2018-05-23  Tom Tromey  <tom@tromey.com>
8831
8832         * complaints.c (vcomplaint): Remove.
8833         (complaint_internal) Merge in contents of vcomplaint.
8834
8835 2018-05-23  Tom Tromey  <tom@tromey.com>
8836
8837         * complaints.c (struct complaints) <explanation>: Remove.
8838         (symfile_explanations): Remove.
8839         (symfile_complaint_book): Update.
8840         (vcomplaint): Update.
8841         (struct explanation): Remove.
8842
8843 2018-05-23  Tom Tromey  <tom@tromey.com>
8844
8845         * complaints.c (symfile_complaints): Remove.
8846         (complaint_internal): Remove "complaints" parameter.
8847         (clear_complaints, vcomplaint): Remove "c" parameter.
8848         (get_complaints): Remove.
8849         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8850         (dwarf2_debug_line_missing_file_complaint)
8851         (dwarf2_debug_line_missing_end_sequence_complaint)
8852         (dwarf2_complex_location_expr_complaint)
8853         (dwarf2_const_value_length_mismatch_complaint)
8854         (dwarf2_section_buffer_overflow_complaint)
8855         (dwarf2_macro_malformed_definition_complaint)
8856         (dwarf2_invalid_attrib_class_complaint)
8857         (create_addrmap_from_index, dw2_symtab_iter_next)
8858         (dw2_expand_marked_cus)
8859         (dw2_debug_names_iterator::find_vec_in_debug_names)
8860         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8861         (create_debug_type_hash_table, init_cutu_and_read_dies)
8862         (partial_die_parent_scope, add_partial_enumeration)
8863         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8864         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8865         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8866         (create_cus_hash_table, create_dwp_hash_table)
8867         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8868         (dwarf2_rnglists_process, dwarf2_ranges_process)
8869         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8870         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8871         (handle_struct_member_die, process_structure_scope)
8872         (read_array_type, read_common_block, read_module_type)
8873         (read_tag_pointer_type, read_typedef, read_base_type)
8874         (read_subrange_type, load_partial_dies, partial_die_info::read)
8875         (partial_die_info::read, partial_die_info::read)
8876         (partial_die_info::read, read_checked_initial_length_and_offset)
8877         (dwarf2_string_attr, read_formatted_entries)
8878         (dwarf_decode_line_header)
8879         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8880         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8881         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8882         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8883         (get_signatured_type, get_DW_AT_signature_type)
8884         (decode_locdesc, file_file_name, consume_improper_spaces)
8885         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8886         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8887         (dwarf2_symbol_mark_computed, set_die_type)
8888         (read_attribute_value): Update.
8889         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8890         Update.
8891         * dbxread.c (unknown_symtype_complaint)
8892         (lbrac_mismatch_complaint, repeated_header_complaint)
8893         (set_namestring, function_outside_compilation_unit_complaint)
8894         (read_dbx_symtab, process_one_symbol): Update.
8895         * gdbtypes.c (stub_noname_complaint): Update.
8896         * windows-nat.c (handle_unload_dll): Update.
8897         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8898         (decode_base_type): Update.
8899         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8900         (eb_complaint, record_include_begin, record_include_end)
8901         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8902         (process_xcoff_symbol, read_symbol)
8903         (function_outside_compilation_unit_complaint)
8904         (scan_xcoff_symtab): Update.
8905         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8906         * buildsym.c (finish_block_internal, make_blockvector)
8907         (end_symtab_get_static_block, augment_type_symtab): Update.
8908         * dtrace-probe.c (dtrace_process_dof)
8909         (dtrace_static_probe_ops::get_probes): Update.
8910         * complaints.h (struct complaint): Don't declare.
8911         (symfile_complaints): Remove.
8912         (complaint_internal): Remove "complaints" parameter.
8913         (complaint): Likewise.
8914         (clear_complaints): Likewise.
8915         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8916         (reread_symbols): Update.
8917         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8918         (dwarf2_frame_cache, decode_frame_entry): Update.
8919         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8920         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8921         (info_selectors_command): Update.
8922         * macrotab.c (macro_include, check_for_redefinition)
8923         (macro_undef): Update.
8924         * objfiles.c (filter_overlapping_sections): Update.
8925         * stabsread.c (invalid_cpp_abbrev_complaint)
8926         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8927         (define_symbol, error_type, read_type, rs6000_builtin_type)
8928         (stabs_method_name_from_physname, read_member_functions)
8929         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8930         (attach_fields_to_type, complain_about_struct_wipeout)
8931         (read_range_type, read_args, common_block_start)
8932         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8933         Update.
8934         * mdebugread.c (index_complaint, unknown_ext_complaint)
8935         (basic_type_complaint, bad_tag_guess_complaint)
8936         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8937         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8938         (parse_procedure, parse_lines)
8939         (function_outside_compilation_unit_complaint)
8940         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8941         (bad_tag_guess_complaint, reg_value_complaint): Update.
8942         * cp-support.c (demangled_name_complaint): Update.
8943         * macroscope.c (sal_macro_scope): Update.
8944         * dwarf-index-write.c (class debug_names): Update.
8945
8946 2018-05-23  Tom Tromey  <tom@tromey.com>
8947
8948         * complaints.c (clear_complaints): Remove "noisy" parameter.
8949         * complaints.h (clear_complaints): Update.
8950         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8951         (reread_symbols): Update.
8952
8953 2018-05-23  Tom Tromey  <tom@tromey.com>
8954
8955         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8956         SUBSEQUENT_MESSAGE.
8957         (vcomplaint, clear_complaints): Update.
8958         (symfile_explanations): Remove some messages.
8959
8960 2018-05-23  Tom Tromey  <tom@tromey.com>
8961
8962         * complaints.c (internal_complaint): Remove.
8963         * complaints.h (internal_complaint): Remove.
8964
8965 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8966
8967         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8968
8969 2018-05-22  Pedro Alves  <palves@redhat.com>
8970
8971         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8972         (remote_fileio_badfd, remote_fileio_return_errno)
8973         (remote_fileio_return_success, remote_fileio_func_open)
8974         (remote_fileio_func_open, remote_fileio_func_close)
8975         (remote_fileio_func_read, remote_fileio_func_write)
8976         (remote_fileio_func_lseek, remote_fileio_func_rename)
8977         (remote_fileio_func_unlink, remote_fileio_func_stat)
8978         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8979         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8980         remote_target parameter.
8981         (remote_fio_func_map) <func>: Add remote_target parameter.
8982         (do_remote_fileio_request, remote_fileio_request):
8983         * remote-fileio.h (remote_fileio_request):
8984         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8985         remote_target parameter.
8986         (remote_notif_process, handle_notification): Adjust to pass down
8987         the remote.
8988         (remote_notif_state_allocate): Add remote_target parameter.  Save
8989         it.
8990         * remote-notif.h (struct remote_target): Forward declare.
8991         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8992         remote_target parameter.
8993         (struct remote_notif_state) <remote>: New field.
8994         (remote_notif_ack, remote_notif_parse): Add remote_target
8995         parameter.
8996         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8997         remote_target parameter.
8998         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8999         (threads_listing_context, rmt_thread_action, protocol_feature)
9000         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9001         (packet_result, struct threads_listing_context, remote_state):
9002         Move definitions and declarations higher up.
9003         (remote_target) <~remote_target>: Declare.
9004         (remote_download_command_source, remote_file_put, remote_file_get)
9005         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9006         (remote_hostio_pread_vFile, remote_hostio_send_command)
9007         (remote_hostio_set_filesystem, remote_hostio_open)
9008         (remote_hostio_close, remote_hostio_unlink, remote_state)
9009         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9010         (get_memory_write_packet_size, get_memory_read_packet_size)
9011         (append_pending_thread_resumptions, remote_detach_1)
9012         (append_resumption, remote_resume_with_vcont)
9013         (add_current_inferior_and_thread, wait_ns, wait_as)
9014         (process_stop_reply, remote_notice_new_inferior)
9015         (process_initial_stop_replies, remote_add_thread)
9016         (btrace_sync_conf, remote_btrace_maybe_reopen)
9017         (remove_new_fork_children, kill_new_fork_children)
9018         (discard_pending_stop_replies, stop_reply_queue_length)
9019         (check_pending_events_prevent_wildcard_vcont)
9020         (discard_pending_stop_replies_in_queue, stop_reply)
9021         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9022         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9023         (remote_interrupt_as, remote_interrupt_ns)
9024         (remote_get_noisy_reply, remote_query_attached)
9025         (remote_add_inferior, remote_current_thread, get_current_thread)
9026         (set_thread, set_general_thread, set_continue_thread)
9027         (set_general_process, write_ptid)
9028         (remote_unpack_thread_info_response, remote_get_threadinfo)
9029         (parse_threadlist_response, remote_get_threadlist)
9030         (remote_threadlist_iterator, remote_get_threads_with_ql)
9031         (remote_get_threads_with_qxfer)
9032         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9033         (get_offsets, remote_check_symbols, remote_supported_packet)
9034         (remote_query_supported, remote_packet_size)
9035         (remote_serial_quit_handler, remote_detach_pid)
9036         (remote_vcont_probe, remote_resume_with_hc)
9037         (send_interrupt_sequence, interrupt_query)
9038         (remote_notif_get_pending_events, fetch_register_using_p)
9039         (send_g_packet, process_g_packet, fetch_registers_using_g)
9040         (store_register_using_P, store_registers_using_G)
9041         (set_remote_traceframe, check_binary_download)
9042         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9043         (remote_xfer_live_readonly_partial, remote_read_bytes)
9044         (remote_send_printf, remote_flash_write, readchar)
9045         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9046         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9047         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9048         (extended_remote_disable_randomization, extended_remote_run)
9049         (send_environment_packet, extended_remote_environment_support)
9050         (extended_remote_set_inferior_cwd, remote_write_qxfer)
9051         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9052         (packet_command): Now methods of ...
9053         (remote_target): ... this class.
9054         (m_remote_state) <remote_target>: New field.
9055         (struct remote_state) <stop_reply_queue,
9056         remote_async_inferior_event_token, wait_forever_enabled_p>: New
9057         fields.
9058         (remote_state::remote_state): Allocate stop_reply_queue.
9059         (remote_state): Delete global.
9060         (get_remote_state_raw): Delete.
9061         (remote_target::get_remote_state): Allocate m_remote_state on
9062         demand.
9063         (get_current_remote_target): New.
9064         (remote_ops, extended_remote_ops): Delete.
9065         (wait_forever_enabled_p, remote_async_inferior_event_token):
9066         Delete, moved to struct remote_state.
9067         (remote_target::close): Delete self.  Destruction bits split to
9068         ...
9069         (remote_target::~remote_target): ... this.
9070         (show_memory_packet_size): Adjust to use
9071         get_current_remote_target.
9072         (struct protocol_feature) <func>: Add remote_target parameter.
9073         All callers adjusted.
9074         (curr_quit_handler_target): New.
9075         (remote_serial_quit_handler): Reimplement.
9076         (remote_target::open_1): Adjust to use get_current_remote_target.
9077         Heap-allocate remote_target/extended_remote_target instances.
9078         (vcont_builder::vcont_builder): Add remote_target parameter, and
9079         save it in m_remote.  All callers adjusted.
9080         (vcont_builder::m_remote): New field.
9081         (vcont_builder::restart, vcont_builder::flush)
9082         (vcont_builder::push_action): Use it.
9083         (remote_target::commit_resume): Use it.
9084         (struct queue_iter_param) <remote>: New field.
9085         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9086         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9087         (check_pending_event_prevents_wildcard_vcont_callback)
9088         (remote_target::check_pending_events_prevent_wildcard_vcont)
9089         (remote_target::discard_pending_stop_replies)
9090         (remote_target::discard_pending_stop_replies_in_queue)
9091         (remote_target::remote_notif_remove_queued_reply): Fill in
9092         'remote' field.
9093         (remote_notif_get_pending_events): New.
9094         (remote_target::readchar, remote_target::remote_serial_write):
9095         Save/restore curr_quit_handler_target.
9096         (putpkt): New.
9097         (kill_new_fork_children): Fill in 'remote' field.
9098         (packet_command): Use get_current_remote_target, defer to
9099         remote_target method of same name.
9100         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9101         parameter, and save it in m_remote.  All callers adjusted.
9102         (scoped_remote_fd::release): Use m_remote.
9103         (scoped_remote_fd::m_remote): New field.
9104         (remote_file_put, remote_file_get, remote_file_delete): Use
9105         get_current_remote_target, defer to remote_target method of same
9106         name.
9107         (remote_btrace_reset): Add remote_state paremeter.  Update all
9108         callers.
9109         (remote_async_inferior_event_handler). Pass down 'data'.
9110         (remote_new_objfile): Use get_current_remote_target.
9111         (remote_target::vcont_r_supported): New.
9112         (set_range_stepping): Use get_current_remote_target and
9113         remote_target::vcont_r_supported.
9114         (_initialize_remote): Don't allocate 'remote_state' and
9115         'stop_reply_queue' globals.
9116         * remote.h (struct remote_target): Forward declare.
9117         (getpkt, putpkt, remote_notif_get_pending_events): Add
9118         'remote_target' parameter.
9119
9120 2018-05-22  Pedro Alves  <palves@redhat.com>
9121
9122         * remote.c (vcont_builder): Now a class.  Make all data members
9123         private.
9124         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9125         Declare methods.
9126         (vcont_builder_restart): Rename to ...
9127         (vcont_builder::restart): ... this.
9128         (vcont_builder_flush): Rename to ...
9129         (vcont_builder::flush): ... this.
9130         (vcont_builder_push_action): Rename to ...
9131         (vcont_builder::push_action): ... this.
9132         (remote_target::commit_resume): Adjust.
9133
9134 2018-05-22  Pedro Alves  <palves@redhat.com>
9135
9136         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9137         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9138         (get_fixed_memory_packet_size): New.
9139         (get_memory_packet_size): Use it.
9140         (set_memory_packet_size): Don't override the config size with
9141         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9142         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9143         Don't refer to get_memory_packet_size if not connected to a remote
9144         target.  Show "(default)" if configured size is 0.
9145
9146 2018-05-22  Pedro Alves  <palves@redhat.com>
9147
9148         * remote.c (remote_target::mourn_inferior): Move
9149         discard_pending_stop_replies call here from ...
9150         (_initialize_remote): ... here.
9151
9152 2018-05-22  Pedro Alves  <palves@redhat.com>
9153
9154         * remote.c (compare_section_command): Remove set_general_process
9155         call.
9156
9157 2018-05-22  Pedro Alves  <palves@redhat.com>
9158
9159         * remote.c (struct packet_reg, struct remote_arch_state):
9160         Move higher up in the file.
9161         (remote_state) <m_arch_states>: Store remote_arch_state values
9162         instead of remote_arch_state pointers.
9163         (remote_state::get_remote_arch_state): Adjust.
9164
9165 2018-05-22  Pedro Alves  <palves@redhat.com>
9166
9167         * remote.c: Include <unordered_map>.
9168         (remote_state): Now a class.
9169         (remote_state) <get_remote_arch_state>: Declare method.
9170         <get_remote_arch_state>: New field.
9171         (remote_arch_state) <remote_arch_state>: Declare ctor.
9172         <regs>: Now a unique_ptr.
9173         (remote_gdbarch_data_handle): Delete.
9174         (get_remote_arch_state): Delete.
9175         (remote_state::get_remote_arch_state): New.
9176         (get_remote_state): Adjust to call remote_state's
9177         get_remote_arch_state method.
9178         (init_remote_state): Delete, bits factored out to ...
9179         (remote_arch_state::remote_arch_state): ... this new method.
9180         (get_remote_packet_size, get_memory_packet_size)
9181         (process_g_packet, remote_target::fetch_registers)
9182         (remote_target::prepare_to_store, store_registers_using_G)
9183         (remote_target::store_registers, remote_target::get_trace_status):
9184         Adjust to call remote_state's method.
9185         (_initialize_remote): Remove reference to
9186         remote_gdbarch_data_handle.
9187
9188 2018-05-22  Pedro Alves  <palves@redhat.com>
9189
9190         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9191         pread>: New method declarations.
9192         (remote_target::open_1): Adjust.
9193         (readahead_cache_invalidate): Rename to ...
9194         (readahead_cache::invalidate): ... this, and adjust to be a class
9195         method.
9196         (readahead_cache_invalidate_fd): Rename to ...
9197         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9198         class method.
9199         (remote_hostio_pwrite): Adjust.
9200         (remote_hostio_pread_from_cache): Rename to ...
9201         (readahead_cache::pread): ... this, and adjust to be a class
9202         method.
9203         (remote_hostio_close): Adjust.
9204
9205 2018-05-22  Pedro Alves  <palves@redhat.com>
9206
9207         * remote.c (remote_hostio_close_cleanup): Delete.
9208         (class scoped_remote_fd): New.
9209         (remote_file_put, remote_file_get): Use it.
9210
9211 2018-05-22  Pedro Alves  <palves@redhat.com>
9212
9213         (struct vCont_action_support): Use bool and initialize all fields.
9214         (struct readahead_cache): Initialize all fields.
9215         (remote_state): Use bool and initialize all fields.
9216         (remote_state::remote_state, remote_state::~remote_state): New.
9217         (new_remote_state): Delete.
9218         (_initialize_remote): Use new to allocate remote_state.
9219
9220 2018-05-22  Pedro Alves  <palves@redhat.com>
9221             張俊芝  <zjz@zjz.name>
9222
9223         PR gdb/22973
9224         * c-exp.y: Include "c-support.h".
9225         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9226         of tolower.  Use c_ident_is_alpha to scan names.
9227         * c-lang.c: Include "c-support.h".
9228         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9229         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9230         * c-support.h: New file, with bits factored out from ...
9231         * cp-name-parser.y: ... this file.
9232         Include "c-support.h".
9233         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9234         c-support.h and renamed.
9235         (symbol_end, yylex): Adjust.
9236
9237 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9238
9239         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9240         parameter type to CORE_ADDR.
9241         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9242         parameter type in declaration to CORE_ADDR.
9243         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9244         target_auxv_search to get AT_HWCAP and use the result to get the
9245         target description.
9246         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9247         to CORE_ADDR. Remove the cast of the return value to unsigned
9248         long. Fix error predicate of target_auxv_search.
9249         (ppc_linux_nat_target::read_description): Change the type of the
9250         hwcap variable to CORE_ADDR.
9251
9252 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9253
9254         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9255         if the size of fpscr is larger than 32 bits.
9256
9257 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9258
9259         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9260         (ppc32_linux_vsxregmap): New global.
9261         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9262         regcache_supply_regset, and regcache_collect_regset.
9263         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9264         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9265         (fetch_vsx_register, store_vsx_register): Remove.
9266         (fetch_vsx_registers): Add regno parameter. Get regset using
9267         ppc_linux_vsxregset. Use regset to supply registers.
9268         (store_vsx_registers): Add regno parameter. Get regset using
9269         ppc_linux_vsxregset. Use regset to collect registers.
9270         (fetch_register): Call fetch_vsx_registers instead of
9271         fetch_vsx_register.
9272         (store_register): Call store_vsx_registers instead of
9273         store_vsx_register.
9274         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9275         new regno parameter.
9276         (store_ppc_registers): Call store_vsx_registers with -1 for the
9277         new regno parameter.
9278         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9279         (ppc_collect_vsxregset): Remove.
9280
9281 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9282
9283         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9284         offset fields.
9285         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9286         for vector register offset fields.
9287         (ppc64_fbsd_reg_offsets): Likewise.
9288         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9289         to vector register offset fields.
9290         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9291         to vector register offset fields.
9292         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9293         vector register offset fields.
9294         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9295         initializers for vector register offset fields.
9296         (rs6000_aix64_reg_offsets): Likewise.
9297         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9298         (ppc_supply_vrregset): Remove.
9299         (ppc_collect_vrregset): Remove.
9300         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9301         (ppc_linux_vrregset) : New function.
9302         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9303         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9304         (ppc32_linux_vrregset): Remove.
9305         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9306         and use result instead of ppc32_linux_vrregset.
9307         (ppc32_linux_reg_offsets): Remove initializers for vector register
9308         offset fields.
9309         (ppc64_linux_reg_offsets): Likewise.
9310         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9311         * ppc-linux-nat.c: Include regset.h.
9312         (gdb_vrregset_t): Adjust comment to account for little-endian
9313         mode.
9314         (supply_vrregset, fill_vrregset): Remove.
9315         (fetch_altivec_register, store_altivec_register): Remove.
9316         (fetch_altivec_registers): Add regno parameter. Get regset using
9317         ppc_linux_vrregset. Use regset to supply registers.
9318         (store_altivec_registers): Add regno parameter. Get regset using
9319         ppc_linux_vrregset. Use regset to collect registers.
9320         (fetch_register): Call fetch_altivec_registers instead of
9321         fetch_altivec_register.
9322         (store_register): Call store_altivec_registers instead of
9323         store_altivec_register.
9324         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9325         the new regno parameter.
9326         (store_ppc_registers): Call store_altivec_registers with -1 for
9327         the new regno parameter.
9328
9329 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9330
9331         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9332         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9333         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9334         (gdb_vrregset_t): Change array type size to
9335         PPC_LINUX_SIZEOF_VRREGSET.
9336         (gdb_vsxregset_t): Change array type size to
9337         PPC_LINUX_SIZEOF_VSXREGSET.
9338         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9339         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9340         PPC_LINUX_SIZEOF_VSXREGSET.
9341
9342 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9343
9344         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9345         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9346         nat/ppc-linux.c.
9347         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9348         ppc_linux_target_wordsize with tid.
9349         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9350         wordsize with tid.
9351         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9352         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9353         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9354         tid parameter. Remove static specifier.
9355         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9356         (ppc_linux_target_wordsize): New declaration.
9357
9358 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9359
9360         * arch/ppc-linux-common.c: New file.
9361         * arch/ppc-linux-common.h: New file.
9362         * arch/ppc-linux-tdesc.h: New file.
9363         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9364         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9365         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9366         arch/ppc-linux-tdesc.h.
9367         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9368         arch/ppc-linux-tdesc.h.
9369         (ppc_linux_nat_target::read_description): Remove target
9370         description matching code. Fill a ppc_linux_features struct and
9371         call ppc_linux_match_description with it. Move comment about ISA
9372         2.05 to ppc-linux-common.c.
9373         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9374         arch/ppc-linux-tdesc.h.
9375         (ppc_linux_core_read_description): Remove target description
9376         matching code. Fill a ppc_linux_features struct and call
9377         ppc_linux_match_description with it.
9378         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9379         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9380         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9381         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9382         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9383         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9384         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9385         (tdesc_powerpc_e500l): Remove.
9386
9387 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9388
9389         * ada-lang.c (catch_assert_command): Pass empty string instead
9390         of NULL for excep_string argument.
9391
9392 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9393
9394         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9395         the width of the requested register exceeds the width of the
9396         `ptrace' data type.
9397
9398 2018-05-21  Tom Tromey  <tom@tromey.com>
9399
9400         * printcmd.c (output_command): Remove.
9401         (output_command_const): Rename to output_command.
9402         * valprint.h (output_command): Rename from output_command_const.
9403         * tracepoint.c (trace_dump_actions): Call output_command.
9404
9405 2018-05-21  Tom Tromey  <tom@tromey.com>
9406
9407         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9408         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9409         * ada-lang.h (create_ada_exception_catchpoint): Update.
9410         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9411         std::string.
9412         (create_excep_cond_exprs, ~ada_catchpoint)
9413         (should_stop_exception, print_one_exception)
9414         (print_mention_exception, print_recreate_exception): Update.
9415         (ada_get_next_arg): Remove.
9416         (catch_ada_exception_command_split): Use std::string.  Change type
9417         of "excep_string", "cond_string".
9418         (catch_ada_exception_command): Update.
9419         (create_ada_exception_catchpoint): Change type of excep_string.
9420         (ada_exception_sal): Remove excep_string parameter.
9421         (~ada_catchpoint): Remove.
9422
9423 2018-05-21  Tom Tromey  <tom@tromey.com>
9424
9425         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9426         cleanup.
9427
9428 2018-05-21  Tom Tromey  <tom@tromey.com>
9429
9430         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9431         Return unique_xmalloc_ptr.
9432         (print_it_exception): Update.
9433
9434 2018-05-21  Tom Tromey  <tom@tromey.com>
9435
9436         * tracepoint.c (trace_dump_actions): Use std::string.
9437
9438 2018-05-21  Tom Tromey  <tom@tromey.com>
9439
9440         * symfile.c (reread_symbols): Use std::string for original_name.
9441
9442 2018-05-21  Tom Tromey  <tom@tromey.com>
9443
9444         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9445         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9446         constructor.
9447
9448 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9449
9450         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9451         instance to...
9452         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9453         * objfiles.c (get_objfile_bfd_data): Allocate
9454         objfile_per_bfd_storage with obstack_new when allocating on
9455         obstack.
9456
9457 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9458
9459         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9460         OBSTACK_ZALLOC.
9461         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9462         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9463         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9464         (add_pending): Likewise.
9465         (parse_symbol): Likewise.
9466         (parse_partial_symbols): Likewise.
9467         (psymtab_to_symtab_1): Likewise.
9468         (new_psymtab): Likewise.
9469         (elfmdebug_build_psymtabs): Likewise.
9470         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9471         * objfiles.c (get_objfile_bfd_data): Likewise.
9472         (objfile_register_static_link): Likewise.
9473         * psymtab.c (allocate_psymtab): Likewise.
9474         * stabsread.c (read_member_functions): Likewise.
9475         * xcoffread.c (xcoff_end_psymtab): Likewise.
9476
9477 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9478
9479         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9480         compiler supports std::is_trivially_constructible.
9481         * common/poison.h: Include obstack.h.
9482         (IsMallocable): Define to is_trivially_constructible if the
9483         compiler supports it, define to true_type otherwise.
9484         (xobnew): New.
9485         (XOBNEW): Redefine.
9486         (xobnewvec): New.
9487         (XOBNEWVEC): Redefine.
9488         * gdb_obstack.h (obstack_zalloc): New.
9489         (OBSTACK_ZALLOC): Redefine.
9490         (obstack_calloc): New.
9491         (OBSTACK_CALLOC): Redefine.
9492         (obstack_new): New.
9493         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9494         (gdbarch_obstack): New declaration in gdbarch.h, definition in
9495         gdbarch.c.
9496         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9497         obstack_calloc/obstack_zalloc.
9498         (gdbarch_obstack_zalloc): Remove.
9499         * target-descriptions.c (tdesc_data_init): Use obstack_new.
9500
9501 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9502
9503         * stack.c (backtrace_command_1): Remove useless variable int i.
9504
9505 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9506
9507         * stack.c (print_frame_info): Fix comment.
9508
9509 2018-05-18  Tom Tromey  <tom@tromey.com>
9510
9511         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9512         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9513         (~dwarf2_per_objfile): Update
9514         (dwarf2_get_dwz_file): Use new.
9515         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
9516         unique_ptr.
9517
9518 2018-05-18  Tom Tromey  <tom@tromey.com>
9519
9520         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
9521         unique_ptr.
9522         * dwarf2read.c (struct dwp_file): Add constructor and
9523         initializers.
9524         (open_and_init_dwp_file): Return a unique_ptr.
9525         (dwarf2_per_objfile, create_dwp_hash_table)
9526         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
9527         (lookup_dwo_unit_in_dwp): Update.
9528         (open_and_init_dwp_file, get_dwp_file): Update.
9529
9530 2018-05-18  Tom Tromey  <tom@tromey.com>
9531
9532         * dwarf2read.c (dwarf2_per_objfile): Update.
9533         (struct mapped_index): Add initializers.
9534         (dwarf2_read_index): Use new.
9535         (dw2_symtab_iter_init): Update.
9536         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
9537         unique_ptr.
9538
9539 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9540
9541         * dwarf2read.c (mapped_index) <total_size>: Remove.
9542
9543 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9544
9545         * unittests/format_pieces-selftests.c (test_format_specifier):
9546         Add ARI comments.
9547
9548 2018-05-18  Tom Tromey  <tom@tromey.com>
9549
9550         * c-typeprint.c (maybe_print_hole): New function.
9551         (c_print_type_struct_field_offset): Update.
9552         (c_type_print_base_struct_union): Call maybe_print_hole.
9553
9554 2018-05-17  Keith Seitz  <keiths@redhat.com>
9555
9556         * breakpoint.c (build_bpstat_chain): New function, moved from
9557         bpstat_stop_status.
9558         (bpstat_stop_status): Add optional parameter, `stop_chain'.
9559         If no stop chain is passed, call build_bpstat_chain to build it.
9560         * breakpoint.h (build_bpstat_chain): Declare.
9561         (bpstat_stop_status): Move documentation here from breakpoint.c.
9562         * infrun.c (handle_signal_stop): Before eliding inlined frames,
9563         build the stop chain and pass it to skip_inline_frames.
9564         Pass this stop chain to bpstat_stop_status.
9565         * inline-frame.c: Include breakpoint.h.
9566         (stopped_by_user_bp_inline_frame): New function.
9567         (skip_inline_frames): Add parameter `stop_chain'.
9568         Move documention to inline-frame.h.
9569         If non-NULL, use stopped_by_user_bp_inline_frame to determine
9570         whether the frame should be elided.
9571         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
9572         Add moved documentation and update for new parameter.
9573
9574 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9575
9576         PR cli/14975
9577         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9578         unittests/format_pieces-selftests.c.
9579         * common/format.h (format_piece) <operator==>: New.
9580         (format_pieces) <operator[]>: Remove.
9581         * common/format.c (format_pieces::format_pieces): Handle \e.
9582         * unittests/format_pieces-selftests.c: New.
9583
9584 2018-05-17  Tom Tromey  <tom@tromey.com>
9585
9586         PR symtab/23010:
9587         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
9588         (dw2_instantiate_symtab): Add skip_partial parameter.
9589         (dw2_find_last_source_symtab, dw2_map_expand_apply)
9590         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
9591         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
9592         (dw2_expand_symtabs_matching_one)
9593         (dw2_find_pc_sect_compunit_symtab)
9594         (dw2_debug_names_lookup_symbol)
9595         (dw2_debug_names_expand_symtabs_for_function): Update.
9596         (init_cutu_and_read_dies): Add skip_partial parameter.
9597         (process_psymtab_comp_unit, build_type_psymtabs_1)
9598         (process_skeletonless_type_unit, load_partial_comp_unit)
9599         (psymtab_to_symtab_1): Update.
9600         (load_full_comp_unit): Add skip_partial parameter.
9601         (process_imported_unit_die, dwarf2_read_addr_index)
9602         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
9603         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
9604         (read_signatured_type): Update.
9605
9606 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9607
9608         * value.c (release_value): Remove unused variable.
9609         (record_latest_value): Likewise.
9610         (access_value_history): Likewise.
9611         (preserve_values): Likewise.
9612
9613 2018-05-17  Tom Tromey  <tom@tromey.com>
9614
9615         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
9616         Initialize.
9617
9618 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
9619
9620         PR gdb/22286
9621         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
9622         Also handle registers whose width is not a multiple of
9623         PTRACE_TYPE_RET.
9624         (linux_nat_trad_target::store_register): Likewise.
9625
9626 2018-05-16  Tom Tromey  <tom@tromey.com>
9627
9628         * gdbcore.h (core_bfd): Redefine.
9629         * corelow.c (core_target::close): Update.
9630         (core_target_open): Update.
9631         * progspace.h (struct program_space) <cbfd>: Now a
9632         gdb_bfd_ref_ptr.
9633
9634 2018-05-16  Tom Tromey  <tom@tromey.com>
9635
9636         PR cli/19551:
9637         * symfile-add-flags.h (enum symfile_add_flags)
9638         <SYMFILE_NOT_FILENAME>: New constant.
9639         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
9640         objfile name from BFD.
9641         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
9642         * minidebug.c (find_separate_debug_file_in_section): Put
9643         ".gnu_debugdata" into BFD's file name.
9644
9645 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
9646
9647         * regcache.c (regcache_read_ftype, regcache_write_ftype):
9648         Remove.
9649
9650 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
9651
9652         PR binutils/21446
9653         * aarch64-tdep.c (aarch64_analyze_prologue,
9654         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
9655         Indicate not interested in errors.
9656
9657 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9658
9659         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
9660         Supply the MIPS_ZERO_REGNUM register.
9661
9662 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9663
9664         * mips-tdep.c (mask_address_var): Make variable static.
9665
9666 2018-05-14  Tom Tromey  <tom@tromey.com>
9667
9668         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
9669
9670 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
9671
9672         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
9673         FXSAVE_ADDR for the mxcsr register.
9674
9675 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
9676
9677         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
9678
9679 2018-05-11  Pedro Alves  <palves@redhat.com>
9680
9681         * corelow.c (core_target) <core_target>: No longer inline.
9682         Initialize m_core_gdbarch, m_core_vec and build the section table
9683         here.
9684         <~core_target>: New.
9685         <core_gdbarch, get_core_register_section>: New methods.
9686         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
9687         factored out from ...
9688         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
9689         (core_ops): Delete.
9690         (sniff_core_bfd): Add gdbarch parameter.
9691         (core_close): Delete, merged into ...
9692         (core_target::close): ... here.  Delete self.
9693         (core_close_cleanup): Delete.
9694         (core_target_open): Allocate a core_target on the heap.  Use a
9695         unique_ptr instead of a cleanup.  Bits moved into the core_target
9696         ctor.  Adjust to use core_target methods instead of globals.
9697         (get_core_register_section): Rename to ...
9698         (core_target::get_core_register_section): ... this and adjust.
9699         (struct get_core_registers_cb_data): New.
9700         (get_core_registers_cb): Use it.  Use bool.
9701         (core_target::fetch_registers, core_target::files_info)
9702         (core_target::xfer_partial, core_target::read_description)
9703         (core_target::pid_to, core_target::thread_name): Adjust to
9704         reference class fields instead of globals.
9705         * target.h (struct target_ops_deleter, target_ops_up): New.
9706
9707 2018-05-11  Pedro Alves  <palves@redhat.com>
9708
9709         * corefile.c (core_file_command): Move to corelow.c.
9710         * corelow.c (the_core_target): Delete.
9711         (core_file_command): Moved from corefile.c.  Check exec_bfd
9712         instead of the_core_target.  Use target_detach instead of calling
9713         into the_core_target directly.
9714         (maybe_say_no_core_file_now): New.
9715         (core_target::detach): Use it.
9716         (_initialize_corelow): Remove references to the_core_target.
9717         * gdbcore.h (the_core_target): Delete.
9718
9719 2018-05-11  Tom Tromey  <tromey@redhat.com>
9720             Pedro Alves  <palves@redhat.com>
9721
9722         * corefile.c (core_bfd): Remove.
9723         * gdbcore.h (core_bfd): Now a macro.
9724         * progspace.h (struct program_space) <cbfd>: New field.
9725
9726 2018-05-11  Tom Tromey  <tom@tromey.com>
9727
9728         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
9729         gdb::def_vector.
9730
9731 2018-05-10  Tom Tromey  <tom@tromey.com>
9732
9733         * configure: Rebuild.
9734         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
9735
9736 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
9737
9738         PR server/23158:
9739         * regformats/regdat.sh: Adjust script, following the addition
9740         of the new expedite_regs parameter to init_target_desc.
9741
9742 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
9743     
9744         PR gdb/23127
9745         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
9746         set_gdbarch_significant_addr_bit.
9747         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
9748         set_gdbarch_significant_addr_bit.
9749         * utils.c (address_significant): Update to sign extend addr.
9750
9751 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
9752
9753         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
9754         (xtensa_linux_init_abi): Limit tdep->num_regs by
9755         tdep->num_nopriv_regs.
9756         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
9757         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
9758         not initialized.
9759
9760 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
9761
9762         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
9763
9764 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
9765
9766         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
9767         (I387_MXCSR_INIT_VAL): New constant.
9768         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
9769         buffer if it was supplied by the inferior.
9770         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
9771         (i387_xsave_get_clear_bv): New function.
9772         (i387_supply_xsave): Only read x87 control registers from the
9773         xsave buffer if the feature is enabled, and the state will have
9774         been written, otherwise, provide a suitable default.
9775         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
9776         including x87 control registers.  Update control registers if they
9777         have changed from the default value, and mark features as enabled
9778         as required.
9779         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
9780
9781 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
9782
9783         * spu-tdep.c (info_spu_event_command): Fix output formatting.
9784
9785 2018-05-07  Tom Tromey  <tom@tromey.com>
9786
9787         * configure: Rebuild.
9788         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
9789
9790 2018-05-07  Tom Tromey  <tom@tromey.com>
9791
9792         PR tdep/20362:
9793         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9794         bit.  Use correct value for VDIV.
9795
9796 2018-05-04  Tom Tromey  <tom@tromey.com>
9797
9798         * configure: Rebuild.
9799         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9800
9801 2018-05-04  Tom Tromey  <tom@tromey.com>
9802
9803         * linux-record.c (record_linux_system_call) <case
9804         RECORD_SYS_RECVFROM>: Add "break".
9805
9806 2018-05-04  Tom Tromey  <tom@tromey.com>
9807
9808         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9809         Add missing "break".
9810         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9811         Add missing "break".
9812
9813 2018-05-04  Tom Tromey  <tom@tromey.com>
9814
9815         * rs6000-tdep.c (ppc_process_record_op4)
9816         (ppc_process_record_op63): Add fall-through comment.
9817
9818 2018-05-04  Tom Tromey  <tom@tromey.com>
9819
9820         * i386-tdep.c (i386_process_record): Add fall-through comment.
9821
9822 2018-05-04  Tom Tromey  <tom@tromey.com>
9823
9824         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9825         comment.
9826
9827 2018-05-04  Tom Tromey  <tom@tromey.com>
9828
9829         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9830         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9831         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9832         comment.
9833         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9834         comment.
9835         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9836         comment.
9837
9838 2018-05-04  Tom Tromey  <tom@tromey.com>
9839
9840         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9841
9842 2018-05-04  Tom Tromey  <tom@tromey.com>
9843
9844         * s390-tdep.c (s390_process_record): Fix fall-through comments.
9845         * xcoffread.c (scan_xcoff_symtab): Move comment later.
9846         * symfile.c (section_is_mapped): Fix fall-through comment.
9847         * stabsread.c (define_symbol, read_member_functions): Fix
9848         fall-through comment.
9849         * s390-linux-tdep.c (s390_process_record): Fix fall-through
9850         comment.
9851         * remote.c (remote_wait_as): Fix fall-through comment.
9852         * p-exp.y (yylex): Fix fall-through comment.
9853         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9854         comment.
9855         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9856         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9857         * jv-exp.y (yylex): Fix fall-through comment.
9858         * go-exp.y (lex_one_token): Fix fall-through comment.
9859         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9860         fall-through comment.
9861         * f-exp.y (yylex): Fix fall-through comment.
9862         * dwarf2read.c (process_die): Fix fall-through comments.
9863         * dbxread.c (process_one_symbol): Fix fall-through comment.
9864         * d-exp.y (lex_one_token): Fix fall-through comment.
9865         * cp-name-parser.y (yylex): Fix fall-through comment.
9866         * coffread.c (coff_symtab_read): Fix fall-through comment.
9867         * c-exp.y (lex_one_token): Fix fall-through comment.
9868         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9869         comment.
9870         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9871         comment.
9872
9873 2018-05-04  Tom Tromey  <tom@tromey.com>
9874
9875         PR python/22730:
9876         * NEWS: Mention gdb.execute change.
9877         * gdbcmd.h (execute_control_command): Don't declare.
9878         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9879         execute_control_commands, execute_control_commands_to_string.
9880         * cli/cli-script.h (execute_control_commands)
9881         (execute_control_commands_to_string): Declare.
9882         (execute_control_command): Add from_tty parameter.
9883         * cli/cli-script.c (execute_control_commands)
9884         (execute_control_commands_to_string): New functions.
9885         (execute_user_command): Use execute_control_commands.
9886         (execute_control_command_1): Add "from_tty" parameter.  Update.
9887         (execute_control_command): Likewise.
9888
9889 2018-05-04  Tom Tromey  <tom@tromey.com>
9890
9891         PR python/22731:
9892         * NEWS: Mention that breakpoint commands are writable.
9893         * python/py-breakpoint.c (bppy_set_commands): New function.
9894         (breakpoint_object_getset) <"commands">: Use it.
9895
9896 2018-05-04  Tom Tromey  <tom@tromey.com>
9897
9898         * tracepoint.c (actions_command): Update.
9899         * mi/mi-cmd-break.c (mi_command_line_array)
9900         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9901         (mi_read_next_line): Remove.
9902         (mi_cmd_break_commands): Update.
9903         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9904         function_view.
9905         * cli/cli-script.c (get_command_line): Update.
9906         (process_next_line): Use function_view.  Constify.
9907         (recurse_read_control_structure, read_command_lines)
9908         (read_command_lines_1): Change argument types to function_view.
9909         (do_define_command, document_command): Update.
9910         * breakpoint.h (check_tracepoint_command): Don't declare.
9911         * breakpoint.c (check_tracepoint_command): Remove.
9912         (commands_command_1, create_tracepoint_from_upload): Update.
9913
9914 2018-05-04  Tom Tromey  <tom@tromey.com>
9915
9916         PR gdb/11750:
9917         * cli/cli-script.h (enum command_control_type) <define_control>:
9918         New constant.
9919         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9920         (build_command_line, execute_control_command_1)
9921         (process_next_line): Likewise.
9922         (do_define_command): New function, extracted from define_command.
9923         (define_command): Use it.
9924
9925 2018-05-04  Tom Tromey  <tom@tromey.com>
9926
9927         * tracepoint.c (actions_command): Update.
9928         * cli/cli-script.h (read_command_lines): Update.
9929         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9930         (MAX_TMPBUF): Remove define.
9931         (define_command): Use string_printf.
9932         (document_command): Likewise.
9933         * breakpoint.c (commands_command_1): Update.
9934
9935 2018-05-04  Tom Tromey  <tom@tromey.com>
9936
9937         * top.c (execute_command): Update.
9938         * cli/cli-script.h (print_command_lines): Now varargs.
9939         * cli/cli-script.c (print_command_lines): Now varargs.
9940         (execute_control_command_1) <case while_control, case if_control>:
9941         Update.
9942
9943 2018-05-04  Tom Tromey  <tom@tromey.com>
9944
9945         * tracepoint.c (all_tracepoint_actions): Rename from
9946         all_tracepoint_actions_and_cleanup.  Change return type.
9947         (actions_command, encode_actions_1, encode_actions)
9948         (trace_dump_actions, tdump_command): Update.
9949         * remote.c (remote_download_command_source): Update.
9950         * python/python.c (gdbpy_eval_from_control_command)
9951         (python_command, python_interactive_command): Update.
9952         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9953         * guile/guile.c (guile_command)
9954         (gdbscm_eval_from_control_command, guile_command): Update.
9955         * compile/compile.c (compile_code_command)
9956         (compile_print_command, compile_to_object): Update.
9957         * cli/cli-script.h (struct command_lines_deleter): New.
9958         (counted_command_line): New typedef.
9959         (struct command_line): Add constructor, destructor.
9960         <body_list>: Remove.
9961         <body_list_0, body_list_1>: New members.
9962         (command_line_up): Remove typedef.
9963         (read_command_lines, read_command_lines_1, get_command_line):
9964         Update.
9965         (copy_command_lines): Don't declare.
9966         * cli/cli-script.c (build_command_line): Use "new".
9967         (get_command_line): Return counted_command_line.
9968         (print_command_lines, execute_user_command)
9969         (execute_control_command_1, while_command, if_command): Update.
9970         (realloc_body_list): Remove.
9971         (process_next_line, recurse_read_control_structure): Update.
9972         (read_command_lines, read_command_lines_1): Return counted_command_line.
9973         (free_command_lines): Use "delete".
9974         (copy_command_lines): Remove.
9975         (define_command, document_command, show_user_1): Update.
9976         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9977         a counted_command_line.
9978         * breakpoint.h (counted_command_line): Remove typedef.
9979         (breakpoint_set_commands): Update.
9980         * breakpoint.c (check_no_tracepoint_commands)
9981         (validate_commands_for_breakpoint): Update.
9982         (breakpoint_set_commands): Change commands to be a
9983         counted_command_line.
9984         (commands_command_1, update_dprintf_command_list)
9985         (create_tracepoint_from_upload): Update.
9986
9987 2018-05-04  Tom Tromey  <tom@tromey.com>
9988
9989         * cli/cli-decode.h (cmd_list_element): New constructor.
9990         (~cmd_list_element): New destructor.
9991         (struct cmd_list_element): Add initializers.
9992         * cli/cli-decode.c (do_add_cmd): Use "new".
9993         (delete_cmd): Use "delete".
9994
9995 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9996             Pedro Alves <palves@redhat.com>
9997
9998         PR breakpoints/19806 and support for PR external/20207.
9999         * NEWS: Mention Aarch64 watchpoint improvements.
10000         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10001         watchpoints and PR external/20207 watchpoints.
10002         * nat/aarch64-linux-hw-point.c
10003         (kernel_supports_any_contiguous_range): New.
10004         (aarch64_watchpoint_offset): New.
10005         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10006         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10007         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10008         (aarch64_align_watchpoint): New parameters aligned_offset_p and
10009         next_addr_orig_p.  Support PR external/20207 watchpoints.
10010         (aarch64_downgrade_regs): New.
10011         (aarch64_dr_state_insert_one_point): New parameters offset and
10012         addr_orig.
10013         (aarch64_dr_state_remove_one_point): Likewise.
10014         (aarch64_handle_breakpoint): Update caller.
10015         (aarch64_handle_aligned_watchpoint): Likewise.
10016         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10017         aligned_offset.
10018         (aarch64_linux_set_debug_regs): Remove const from state.  Call
10019         aarch64_downgrade_regs.
10020         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10021         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10022         (DR_CONTROL_MASK): ... this.
10023         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10024         (unsigned int aarch64_watchpoint_offset): New prototype.
10025         (aarch64_linux_set_debug_regs): Remove const from state.
10026         * utils.c (align_up, align_down): Move to ...
10027         * common/common-utils.c (align_up, align_down): ... here.
10028         * utils.h (align_up, align_down): Move to ...
10029         * common/common-utils.h (align_up, align_down): ... here.
10030
10031 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
10032
10033         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10034         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10035         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10036         Re-implement to match the ABI as summarized in GCC's
10037         gcc/config/sparc/sparc.c.  All callers updated.
10038         (sparc32_store_arguments): Remove assertion.
10039
10040 2018-05-04  Tom Tromey  <tom@tromey.com>
10041
10042         * printcmd.c: Don't include tui.h.
10043         (decode_format): Use skip_spaces.
10044
10045 2018-05-04  Tom Tromey  <tom@tromey.com>
10046
10047         PR gdb/22619:
10048         * printcmd.c (last_count): New global.
10049         (x_command): Use saved count when repeating.
10050
10051 2018-05-04  Tom Tromey  <tom@tromey.com>
10052
10053         * nto-procfs.c (do_closedir_cleanup): Remove.
10054         (procfs_pidlist): Use gdb_dir_up.
10055         * procfs.c (do_closedir_cleanup): Remove.
10056         (proc_update_threads): Use gdb_dir_up.
10057         * common/filestuff.h (struct gdb_dir_deleter): New.
10058         (gdb_dir_up): New typedef.
10059
10060 2018-05-04  Tom Tromey  <tom@tromey.com>
10061
10062         * ada-lang.c (print_mention_exception): Use std::string.
10063
10064 2018-05-04  Tom Tromey  <tom@tromey.com>
10065
10066         * ada-lang.c (create_excep_cond_exprs): Update.
10067         (ada_exception_catchpoint_cond_string): Use std::string.
10068
10069 2018-05-04  Tom Tromey  <tom@tromey.com>
10070
10071         * ada-lang.c (xget_renaming_scope): Return std::string.
10072         (old_renaming_is_invisible): Update.
10073
10074 2018-05-04  Tom Tromey  <tom@tromey.com>
10075
10076         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10077         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10078
10079 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10080
10081         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10082
10083 2018-05-04  Tom Tromey  <tom@tromey.com>
10084
10085         * remote.c (remote_query_supported_append): Change type.
10086         (remote_check_symbols): Update.
10087
10088 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10089
10090         PR gdb/11420
10091         * configure.ac: Prepend libpython.
10092         * python/python-config.py: Likewise.
10093         * configure: Regenerate.
10094
10095 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10096
10097         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10098
10099 2018-05-03  Pedro Alves  <palves@redhat.com>
10100
10101         * s390-linux-nat.c
10102         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10103         override.  Write 'true' instead of '1'.
10104         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10105         declaration.
10106
10107 2018-05-02  Pedro Alves  <palves@redhat.com>
10108
10109         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10110         add_inf_child_target.
10111         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10112         add_inf_child_target.
10113         * aix-thread.c (aix_thread_target_info): New.
10114         (aix_thread_target) <shortname, longname, doc>: Delete.
10115         <info>: New.
10116         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10117         add_inf_child_target.
10118         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10119         add_inf_child_target.
10120         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10121         add_inf_child_target.
10122         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10123         add_inf_child_target.
10124         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10125         add_inf_child_target.
10126         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10127         add_inf_child_target.
10128         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10129         add_inf_child_target.
10130         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10131         add_inf_child_target.
10132         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10133         add_inf_child_target.
10134         * bfd-target.c (target_bfd_target_info): New.
10135         (target_bfd) <shortname, longname, doc>: Delete.
10136         <info>: New.
10137         * bsd-kvm.c (bsd_kvm_target_info): New.
10138         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10139         <info>: New.
10140         (bsd_kvm_target::open): Rename to ...
10141         (bsd_kvm_target_open): ... this.  Adjust.
10142         * bsd-uthread.c (bsd_uthread_target_info): New.
10143         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10144         <info>: New.
10145         * corefile.c (core_file_command): Adjust.
10146         * corelow.c (core_target_info): New.
10147         (core_target) <shortname, longname, doc>: Delete.
10148         <info>: New.
10149         (core_target::open): Rename to ...
10150         (core_target_open): ... this.  Adjust.
10151         * ctf.c (ctf_target_info): New.
10152         (ctf_target) <shortname, longname, doc>: Delete.
10153         <info>: New.
10154         (ctf_target::open): Rename to ...
10155         (ctf_target_open): ... this.
10156         (_initialize_ctf): Adjust.
10157         * exec.c (exec_target_info): New.
10158         (exec_target) <shortname, longname, doc>: Delete.
10159         <info>: New.
10160         (exec_target::open): Rename to ...
10161         (exec_target_open): ... this.
10162         * gdbcore.h (core_target_open): Declare.
10163         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10164         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10165         add_inf_child_target.
10166         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10167         add_inf_child_target.
10168         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10169         add_inf_child_target.
10170         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10171         add_inf_child_target.
10172         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10173         add_inf_child_target.
10174         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10175         add_inf_child_target.
10176         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10177         add_inf_child_target.
10178         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10179         add_inf_child_target.
10180         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10181         add_inf_child_target.
10182         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10183         add_inf_child_target.
10184         * inf-child.c (inf_child_target_info): New.
10185         (inf_child_target::info): New.
10186         (inf_child_open_target): Remove 'target' parameter.  Use
10187         get_native_target instead.
10188         (inf_child_target::open): Delete.
10189         (add_inf_child_target): New.
10190         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10191         Delete.
10192         <info>: New.
10193         (add_inf_child_target): Declare.
10194         (inf_child_open_target): Declare.
10195         * linux-thread-db.c (thread_db_target_info): New.
10196         (thread_db_target) <shortname, longname, doc>: Delete.
10197         <info>: New.
10198         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10199         add_inf_child_target.
10200         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10201         add_inf_child_target.
10202         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10203         add_inf_child_target.
10204         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10205         add_inf_child_target.
10206         * make-target-delegates (print_class): Adjust.
10207         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10208         add_inf_child_target.
10209         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10210         add_inf_child_target.
10211         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10212         add_inf_child_target.
10213         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10214         add_inf_child_target.
10215         * nto-procfs.c (nto_native_target_info): New.
10216         (nto_procfs_target_native) <shortname, longname, doc>:
10217         Delete.
10218         <info>: New.
10219         (nto_procfs_target_info): New.
10220         (nto_procfs_target_procfs) <shortname, longname, doc>:
10221         Delete.
10222         <info>: New.
10223         (init_procfs_targets): Adjust.
10224         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10225         add_inf_child_target.
10226         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10227         add_inf_child_target.
10228         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10229         add_inf_child_target.
10230         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10231         add_inf_child_target.
10232         * ravenscar-thread.c (ravenscar_target_info): New.
10233         (ravenscar_thread_target) <shortname, longname, doc>:
10234         Delete.
10235         <info>: New.
10236         * record-btrace.c (record_btrace_target_info):
10237         (record_btrace_target) <shortname, longname, doc>: Delete.
10238         <info>: New.
10239         (record_btrace_target::open): Rename to ...
10240         (record_btrace_target_open): ... this.  Adjust.
10241         * record-full.c (record_longname, record_doc): New.
10242         (record_full_base_target) <shortname, longname, doc>: Delete.
10243         <info>: New.
10244         (record_full_target_info): New.
10245         (record_full_target): <shortname>: Delete.
10246         <info>: New.
10247         (record_full_core_open_1, record_full_open_1): Update comments.
10248         (record_full_base_target::open): Rename to ...
10249         (record_full_open): ... this.
10250         (cmd_record_full_restore): Update.
10251         (_initialize_record_full): Update.
10252         * remote-sim.c (remote_sim_target_info): New.
10253         (gdbsim_target) <shortname, longname, doc>: Delete.
10254         <info>: New.
10255         (gdbsim_target::open): Rename to ...
10256         (gdbsim_target_open): ... this.
10257         (_initialize_remote_sim): Adjust.
10258         * remote.c (remote_doc): New.
10259         (remote_target_info): New.
10260         (remote_target) <shortname, longname, doc>: Delete.
10261         <info>: New.
10262         (extended_remote_target_info): New.
10263         (extended_remote_target) <shortname, longname, doc>: Delete.
10264         <info>: New.
10265         (remote_target::open_1): Make static.  Adjust.
10266         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10267         * s390-linux-nat.c (_initialize_s390_nat): Use
10268         add_inf_child_target.
10269         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10270         add_inf_child_target.
10271         * sol-thread.c (thread_db_target_info): New.
10272         (sol_thread_target) <shortname, longname, doc>: Delete.
10273         <info>: New.
10274         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10275         add_inf_child_target.
10276         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10277         add_inf_child_target.
10278         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10279         add_inf_child_target.
10280         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10281         add_inf_child_target.
10282         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10283         add_inf_child_target.
10284         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10285         add_inf_child_target.
10286         * spu-linux-nat.c (_initialize_spu_nat): Use
10287         add_inf_child_target.
10288         * spu-multiarch.c (spu_multiarch_target_info): New.
10289         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10290         <info>: New.
10291         * target-delegates.c: Regenerate.
10292         * target.c: Include <unordered_map>.
10293         (target_ops_p): Delete.
10294         (DEF_VEC_P(target_ops_p)): Delete.
10295         (target_factories): New.
10296         (test_target_info): New.
10297         (test_target_ops::info): New.
10298         (open_target): Adjust to use target_factories.
10299         (add_target_with_completer): Rename to ...
10300         (add_target): ... this.  Change prototype.  Register target_info
10301         and open callback in target_factories.  Register target_info in
10302         command context instead of target_ops.
10303         (add_target): Delete old implementation.
10304         (add_deprecated_target_alias): Change prototype.  Adjust.
10305         (the_native_target): New.
10306         (set_native_target, get_native_target): New.
10307         (find_default_run_target): Use the_native_target.
10308         (find_attach_target, find_run_target): Simplify.
10309         (target_ops::open): Delete.
10310         (dummy_target_info): New.
10311         (dummy_target::shortname, dummy_target::longname)
10312         (dummy_target::doc): Delete.
10313         (dummy_target::info): New.
10314         (debug_target::shortname, debug_target::longname)
10315         (debug_target::doc): Delete.
10316         (debug_target::info): New.
10317         * target.h (struct target_info): New.
10318         (target_ops::~target_ops): Add comment.
10319         (target_ops::info): New.
10320         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10321         longer virtual.  Implement in terms of target_info.
10322         (set_native_target, get_native_target): Declare.
10323         (target_open_ftype): New.
10324         (add_target, add_target_with_completer)
10325         (add_deprecated_target_alias): Change prototype.
10326         (test_target) <shortname, longname, doc>: Delete.
10327         <info>: New.
10328         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10329         add_inf_child_target.
10330         * tracefile-tfile.c (tfile_target_info): New.
10331         (tfile_target) <shortname, longname, doc>: Delete.
10332         <info>: New.
10333         (tfile_target::open): Rename to ...
10334         (tfile_target_open): ... this.
10335         (_initialize_tracefile_tfile): Adjust.
10336         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10337         add_inf_child_target.
10338         * windows-nat.c (_initialize_windows_nat): Use
10339         add_inf_child_target.
10340         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10341         add_inf_child_target.
10342
10343 2018-05-02  Pedro Alves  <palves@redhat.com>
10344
10345         * linux-nat.h (linux_nat_target) <low_new_thread,
10346         low_delete_thread, low_new_fork, low_forget_process,
10347         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10348         New virtual methods.
10349         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10350         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10351         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10352         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10353         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10354         Delete.
10355         * linux-fork.c (delete_fork): Adjust to call low method.
10356         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10357         (linux_nat_new_fork, linux_nat_forget_process_hook)
10358         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10359         (linux_nat_status_is_event):
10360         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10361         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10362         to call low method.
10363         (sigtrap_is_event): Rename to ...
10364         (linux_nat_target::low_status_is_event): ... this.
10365         (linux_nat_set_status_is_event): Delete.
10366         (save_stop_reason, linux_nat_wait_1)
10367         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10368         low methods.
10369         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10370         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10371         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10372         (linux_nat_set_prepare_to_resume): Delete.
10373         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10374         low virtual methods.
10375         * amd64-linux-nat.c: Likewise.
10376         * arm-linux-nat.c: Likewise.
10377         * i386-linux-nat.c: Likewise.
10378         * ia64-linux-nat.c: Likewise.
10379         * mips-linux-nat.c: Likewise.
10380         * ppc-linux-nat.c: Likewise.
10381         * s390-linux-nat.c: Likewise.
10382         * sparc64-linux-nat.c: Likewise.
10383         * x86-linux-nat.c: Likewise.
10384         * x86-linux-nat.h: Include "nat/x86-linux.h".
10385         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10386         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10387         Override methods.
10388
10389 2018-05-02  Pedro Alves  <palves@redhat.com>
10390
10391         * target.h (target_ops)
10392         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10393         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10394         stopped_by_watchpoint, have_continuable_watchpoint,
10395         stopped_data_address, watchpoint_addr_within_range,
10396         can_accel_watchpoint_condition, can_run, thread_alive,
10397         has_all_memory, has_memory, has_stack, has_registers,
10398         has_execution, can_async_p, is_async_p, supports_non_stop,
10399         always_non_stop_p, can_execute_reverse, supports_multi_process,
10400         supports_enable_disable_tracepoint,
10401         supports_disable_randomization, supports_string_tracing,
10402         supports_evaluation_of_breakpoint_conditions,
10403         can_run_breakpoint_commands, filesystem_is_local,
10404         can_download_tracepoint, get_trace_state_variable_value,
10405         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10406         record_is_replaying, record_will_replay,
10407         augmented_libraries_svr4_read>: Adjust to return bool.
10408         * aarch64-linux-nat.c: All implementations adjusted.
10409         * aix-thread.c: All implementations adjusted.
10410         * arm-linux-nat.c: All implementations adjusted.
10411         * breakpoint.c: All implementations adjusted.
10412         * bsd-kvm.c: All implementations adjusted.
10413         * bsd-uthread.c: All implementations adjusted.
10414         * corelow.c: All implementations adjusted.
10415         * ctf.c: All implementations adjusted.
10416         * darwin-nat.c: All implementations adjusted.
10417         * darwin-nat.h: All implementations adjusted.
10418         * exec.c: All implementations adjusted.
10419         * fbsd-nat.c: All implementations adjusted.
10420         * fbsd-nat.h: All implementations adjusted.
10421         * gnu-nat.c: All implementations adjusted.
10422         * gnu-nat.h: All implementations adjusted.
10423         * go32-nat.c: All implementations adjusted.
10424         * ia64-linux-nat.c: All implementations adjusted.
10425         * inf-child.c: All implementations adjusted.
10426         * inf-child.h: All implementations adjusted.
10427         * inf-ptrace.c: All implementations adjusted.
10428         * inf-ptrace.h: All implementations adjusted.
10429         * linux-nat.c: All implementations adjusted.
10430         * linux-nat.h: All implementations adjusted.
10431         * mips-linux-nat.c: All implementations adjusted.
10432         * nto-procfs.c: All implementations adjusted.
10433         * ppc-linux-nat.c: All implementations adjusted.
10434         * procfs.c: All implementations adjusted.
10435         * ravenscar-thread.c: All implementations adjusted.
10436         * record-btrace.c: All implementations adjusted.
10437         * record-full.c: All implementations adjusted.
10438         * remote-sim.c: All implementations adjusted.
10439         * remote.c: All implementations adjusted.
10440         * s390-linux-nat.c: All implementations adjusted.
10441         * sol-thread.c: All implementations adjusted.
10442         * spu-multiarch.c: All implementations adjusted.
10443         * target-delegates.c: All implementations adjusted.
10444         * target.c: All implementations adjusted.
10445         * target.h: All implementations adjusted.
10446         * tracefile-tfile.c: All implementations adjusted.
10447         * tracefile.c: All implementations adjusted.
10448         * tracefile.h: All implementations adjusted.
10449         * windows-nat.c: All implementations adjusted.
10450         * x86-linux-nat.h: All implementations adjusted.
10451         * x86-nat.h: All implementations adjusted.
10452
10453 2018-05-02  Pedro Alves  <palves@redhat.com>
10454
10455         * make-target-delegates (scan_target_h): Don't trim lines here.
10456         Replace sequences of tabs and/or whitespace with a single
10457         whitespace.
10458         (top level, parsing methods): Trim each line before processing it
10459         here.
10460
10461 2018-05-02  Pedro Alves  <palves@redhat.com>
10462             John Baldwin  <jhb@freebsd.org>
10463
10464         * target.h (enum strata) <debug_stratum>: New.
10465         (struct target_ops) <all delegation methods>: Replace by C++
10466         virtual methods, and drop "to_" prefix.  All references updated
10467         throughout.
10468         <to_shortname, to_longname, to_doc, to_data,
10469         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10470         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10471         virtual methods.  All references updated throughout.
10472         <can_attach, supports_terminal_ours, can_create_inferior,
10473         get_thread_control_capabilities, attach_no_wait>: New
10474         virtual methods.
10475         <insert_breakpoint, remove_breakpoint>: Now
10476         TARGET_DEFAULT_NORETURN methods.
10477         <info_proc>: Now returns bool.
10478         <to_magic>: Delete.
10479         (OPS_MAGIC): Delete.
10480         (current_target): Delete.  All references replaced by references
10481         to ...
10482         (target_stack): ... this.  New.
10483         (target_shortname, target_longname): Adjust.
10484         (target_can_run): Now a function declaration.
10485         (default_child_has_all_memory, default_child_has_memory)
10486         (default_child_has_stack, default_child_has_registers)
10487         (default_child_has_execution): Remove target_ops parameter.
10488         (complete_target_initialization): Delete.
10489         (memory_breakpoint_target): New template class.
10490         (test_target_ops): Refactor as a C++ class with virtual methods.
10491         * make-target-delegates (NAME_PART): Tighten.
10492         (POINTER_PART, CP_SYMBOL): New.
10493         (SIMPLE_RETURN_PART): Reimplement.
10494         (VEC_RETURN_PART): Expect less.
10495         (RETURN_PART, VIRTUAL_PART): New.
10496         (METHOD): Adjust to C++ virtual methods.
10497         (scan_target_h): Remove reference to C99.
10498         (dname): Output "target_ops::" prefix.
10499         (write_function_header): Adjust to output a C++ class method.
10500         (write_declaration): New.
10501         (write_delegator): Adjust to output a C++ class method.
10502         (tdname): Output "dummy_target::" prefix.
10503         (write_tdefault, write_debugmethod): Adjust to output a C++ class
10504         method.
10505         (tdefault_names, debug_names): Delete.
10506         (return_types, tdefaults, styles, argtypes_array): New.
10507         (top level): All methods are delegators.
10508         (print_class): New.
10509         (top level): Print dummy_target and debug_target classes.
10510         * target-delegates.c: Regenerate.
10511         * target-debug.h (target_debug_print_enum_info_proc_what)
10512         (target_debug_print_thread_control_capabilities)
10513         (target_debug_print_thread_info_p): New.
10514         * target.c (dummy_target): Delete.
10515         (the_dummy_target, the_debug_target): New.
10516         (target_stack): Now extern.
10517         (set_targetdebug): Push/unpush debug target.
10518         (default_child_has_all_memory, default_child_has_memory)
10519         (default_child_has_stack, default_child_has_registers)
10520         (default_child_has_execution): Remove target_ops parameter.
10521         (complete_target_initialization): Delete.
10522         (add_target_with_completer): No longer call
10523         complete_target_initialization.
10524         (target_supports_terminal_ours): Use regular delegation.
10525         (update_current_target): Delete.
10526         (push_target): No longer check magic number.  Don't call
10527         update_current_target.
10528         (unpush_target): Don't call update_current_target.
10529         (target_is_pushed): No longer check magic number.
10530         (target_require_runnable): Skip for all stratums over
10531         process_stratum.
10532         (target_ops::info_proc): New.
10533         (target_info_proc): Use find_target_at and
10534         find_default_run_target.
10535         (target_supports_disable_randomization): Use regular delegation.
10536         (target_get_osdata): Use find_target_at.
10537         (target_ops::open, target_ops::close, target_ops::can_attach)
10538         (target_ops::attach, target_ops::can_create_inferior)
10539         (target_ops::create_inferior, target_ops::can_run)
10540         (target_can_run): New.
10541         (default_fileio_target): Use regular delegation.
10542         (target_ops::fileio_open, target_ops::fileio_pwrite)
10543         (target_ops::fileio_pread, target_ops::fileio_fstat)
10544         (target_ops::fileio_close, target_ops::fileio_unlink)
10545         (target_ops::fileio_readlink): New.
10546         (target_fileio_open_1, target_fileio_unlink)
10547         (target_fileio_readlink): Always call the target method.  Handle
10548         FILEIO_ENOSYS.
10549         (return_zero, return_zero_has_execution): Delete.
10550         (init_dummy_target): Delete.
10551         (dummy_target::dummy_target, dummy_target::shortname)
10552         (dummy_target::longname, dummy_target::doc)
10553         (debug_target::debug_target, debug_target::shortname)
10554         (debug_target::longname, debug_target::doc): New.
10555         (target_supports_delete_record): Use regular delegation.
10556         (setup_target_debug): Delete.
10557         (maintenance_print_target_stack): Skip debug_stratum.
10558         (initialize_targets): Instantiate the_dummy_target and
10559         the_debug_target.
10560         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
10561         use target_stack.
10562         (target_auxv_search, fprint_target_auxv): Adjust.
10563         (info_auxv_command): Adjust to use target_stack.
10564         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
10565         * exceptions.c (print_flush): Handle a NULL target_stack.
10566         * regcache.c (target_ops_no_register): Refactor as class with
10567         virtual methods.
10568
10569         * exec.c (exec_target): New class.
10570         (exec_ops): Now an exec_target.
10571         (exec_open, exec_close_1, exec_get_section_table)
10572         (exec_xfer_partial, exec_files_info, exec_has_memory)
10573         (exec_make_note_section): Refactor as exec_target methods.
10574         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
10575         Delete.
10576         (exec_target::find_memory_regions): New.
10577         (_initialize_exec): Don't call init_exec_ops.
10578         * gdbcore.h (exec_file_clear): Delete.
10579
10580         * corefile.c (core_target): Delete.
10581         (core_file_command): Adjust.
10582         * corelow.c (core_target): New class.
10583         (the_core_target): New.
10584         (core_close): Remove target_ops parameter.
10585         (core_close_cleanup): Adjust.
10586         (core_target::close): New.
10587         (core_open, core_detach, get_core_registers, core_files_info)
10588         (core_xfer_partial, core_thread_alive, core_read_description)
10589         (core_pid_to_str, core_thread_name, core_has_memory)
10590         (core_has_stack, core_has_registers, core_info_proc): Rework as
10591         core_target methods.
10592         (ignore, core_remove_breakpoint, init_core_ops): Delete.
10593         (_initialize_corelow): Initialize the_core_target.
10594         * gdbcore.h (core_target): Delete.
10595         (the_core_target): New.
10596
10597         * ctf.c: (ctf_target): New class.
10598         (ctf_ops): Now a ctf_target.
10599         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
10600         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
10601         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
10602         methods.
10603         (init_ctf_ops): Delete.
10604         (_initialize_ctf): Don't call it.
10605         * tracefile-tfile.c (tfile_target): New class.
10606         (tfile_ops): Now a tfile_target.
10607         (tfile_open, tfile_close, tfile_files_info)
10608         (tfile_get_tracepoint_status, tfile_trace_find)
10609         (tfile_fetch_registers, tfile_xfer_partial)
10610         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
10611         Refactor as tfile_target methods.
10612         (tfile_xfer_partial_features): Remove target_ops parameter.
10613         (init_tfile_ops): Delete.
10614         (_initialize_tracefile_tfile): Don't call it.
10615         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
10616         (tracefile_has_stack, tracefile_has_registers)
10617         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
10618         tracefile_target methods.
10619         (init_tracefile_ops): Delete.
10620         (tracefile_target::tracefile_target): New.
10621         * tracefile.h: Include "target.h".
10622         (tracefile_target): New class.
10623         (init_tracefile_ops): Delete.
10624
10625         * spu-multiarch.c (spu_multiarch_target): New class.
10626         (spu_ops): Now a spu_multiarch_target.
10627         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
10628         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
10629         (spu_search_memory, spu_mourn_inferior): Refactor as
10630         spu_multiarch_target methods.
10631         (init_spu_ops): Delete.
10632         (_initialize_spu_multiarch): Remove references to init_spu_ops,
10633         complete_target_initialization.
10634
10635         * ravenscar-thread.c (ravenscar_thread_target): New class.
10636         (ravenscar_ops): Now a ravenscar_thread_target.
10637         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
10638         (ravenscar_thread_alive, ravenscar_pid_to_str)
10639         (ravenscar_fetch_registers, ravenscar_store_registers)
10640         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
10641         (ravenscar_stopped_by_hw_breakpoint)
10642         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
10643         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
10644         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
10645         methods.
10646         (init_ravenscar_thread_ops): Delete.
10647         (_initialize_ravenscar): Remove references to
10648         init_ravenscar_thread_ops and complete_target_initialization.
10649
10650         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
10651         (bsd_uthread_target): New class.
10652         (bsd_uthread_ops): Now a bsd_uthread_target.
10653         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
10654         (bsd_uthread_close, bsd_uthread_mourn_inferior)
10655         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
10656         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
10657         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
10658         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
10659         (bsd_uthread_target): Delete function.
10660         (_initialize_bsd_uthread): Remove reference to
10661         complete_target_initialization.
10662
10663         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
10664         (target_bfd): ... this new class.
10665         (target_bfd_xfer_partial, target_bfd_get_section_table)
10666         (target_bfd_close): Refactor as target_bfd methods.
10667         (target_bfd::~target_bfd): New.
10668         (target_bfd_reopen): Adjust.
10669         (target_bfd::close): New.
10670
10671         * record-btrace.c (record_btrace_target): New class.
10672         (record_btrace_ops): Now a record_btrace_target.
10673         (record_btrace_open, record_btrace_stop_recording)
10674         (record_btrace_disconnect, record_btrace_close)
10675         (record_btrace_async, record_btrace_info)
10676         (record_btrace_insn_history, record_btrace_insn_history_range)
10677         (record_btrace_insn_history_from, record_btrace_call_history)
10678         (record_btrace_call_history_range)
10679         (record_btrace_call_history_from, record_btrace_record_method)
10680         (record_btrace_is_replaying, record_btrace_will_replay)
10681         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
10682         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
10683         (record_btrace_store_registers, record_btrace_prepare_to_store)
10684         (record_btrace_to_get_unwinder)
10685         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
10686         (record_btrace_commit_resume, record_btrace_wait)
10687         (record_btrace_stop, record_btrace_can_execute_reverse)
10688         (record_btrace_stopped_by_sw_breakpoint)
10689         (record_btrace_supports_stopped_by_sw_breakpoint)
10690         (record_btrace_stopped_by_hw_breakpoint)
10691         (record_btrace_supports_stopped_by_hw_breakpoint)
10692         (record_btrace_update_thread_list, record_btrace_thread_alive)
10693         (record_btrace_goto_begin, record_btrace_goto_end)
10694         (record_btrace_goto, record_btrace_stop_replaying_all)
10695         (record_btrace_execution_direction)
10696         (record_btrace_prepare_to_generate_core)
10697         (record_btrace_done_generating_core): Refactor as
10698         record_btrace_target methods.
10699         (init_record_btrace_ops): Delete.
10700         (_initialize_record_btrace): Remove reference to
10701         init_record_btrace_ops.
10702         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
10703         the execution_direction global.
10704         (record_full_base_target, record_full_target)
10705         (record_full_core_target): New classes.
10706         (record_full_ops): Now a record_full_target.
10707         (record_full_core_ops): Now a record_full_core_target.
10708         (record_full_target::detach, record_full_target::disconnect)
10709         (record_full_core_target::disconnect)
10710         (record_full_target::mourn_inferior, record_full_target::kill):
10711         New.
10712         (record_full_open, record_full_close, record_full_async): Refactor
10713         as methods of the record_full_base_target class.
10714         (record_full_resume, record_full_commit_resume): Refactor
10715         as methods of the record_full_target class.
10716         (record_full_wait, record_full_stopped_by_watchpoint)
10717         (record_full_stopped_data_address)
10718         (record_full_stopped_by_sw_breakpoint)
10719         (record_full_supports_stopped_by_sw_breakpoint)
10720         (record_full_stopped_by_hw_breakpoint)
10721         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
10722         methods of the record_full_base_target class.
10723         (record_full_store_registers, record_full_xfer_partial)
10724         (record_full_insert_breakpoint, record_full_remove_breakpoint):
10725         Refactor as methods of the record_full_target class.
10726         (record_full_can_execute_reverse, record_full_get_bookmark)
10727         (record_full_goto_bookmark, record_full_execution_direction)
10728         (record_full_record_method, record_full_info, record_full_delete)
10729         (record_full_is_replaying, record_full_will_replay)
10730         (record_full_goto_begin, record_full_goto_end, record_full_goto)
10731         (record_full_stop_replaying): Refactor as methods of the
10732         record_full_base_target class.
10733         (record_full_core_resume, record_full_core_kill)
10734         (record_full_core_fetch_registers)
10735         (record_full_core_prepare_to_store)
10736         (record_full_core_store_registers, record_full_core_xfer_partial)
10737         (record_full_core_insert_breakpoint)
10738         (record_full_core_remove_breakpoint)
10739         (record_full_core_has_execution): Refactor
10740         as methods of the record_full_core_target class.
10741         (record_full_base_target::supports_delete_record): New.
10742         (init_record_full_ops): Delete.
10743         (init_record_full_core_ops): Delete.
10744         (record_full_save): Refactor as method of the
10745         record_full_base_target class.
10746         (_initialize_record_full): Remove references to
10747         init_record_full_ops and init_record_full_core_ops.
10748
10749         * remote.c (remote_target, extended_remote_target): New classes.
10750         (remote_ops): Now a remote_target.
10751         (extended_remote_ops): Now an extended_remote_target.
10752         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
10753         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
10754         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
10755         (remote_pass_signals, remote_set_syscall_catchpoint)
10756         (remote_program_signals, )
10757         (remote_thread_always_alive): Remove target_ops parameter.
10758         (remote_thread_alive, remote_thread_name)
10759         (remote_update_thread_list, remote_threads_extra_info)
10760         (remote_static_tracepoint_marker_at)
10761         (remote_static_tracepoint_markers_by_strid)
10762         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
10763         (remote_open): Refactor as methods of remote_target.
10764         (extended_remote_open, extended_remote_detach)
10765         (extended_remote_attach, extended_remote_post_attach):
10766         (extended_remote_supports_disable_randomization)
10767         (extended_remote_create_inferior): : Refactor as method of
10768         extended_remote_target.
10769         (remote_set_permissions, remote_open_1, remote_detach)
10770         (remote_follow_fork, remote_follow_exec, remote_disconnect)
10771         (remote_resume, remote_commit_resume, remote_stop)
10772         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
10773         (remote_terminal_ours, remote_wait, remote_fetch_registers)
10774         (remote_prepare_to_store, remote_store_registers)
10775         (remote_flash_erase, remote_flash_done, remote_files_info)
10776         (remote_kill, remote_mourn, remote_insert_breakpoint)
10777         (remote_remove_breakpoint, remote_insert_watchpoint)
10778         (remote_watchpoint_addr_within_range)
10779         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
10780         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
10781         (remote_supports_stopped_by_sw_breakpoint)
10782         (remote_stopped_by_hw_breakpoint)
10783         (remote_supports_stopped_by_hw_breakpoint)
10784         (remote_stopped_by_watchpoint, remote_stopped_data_address)
10785         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
10786         (remote_verify_memory): Refactor as methods of remote_target.
10787         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
10788         parameter.
10789         (remote_xfer_partial, remote_get_memory_xfer_limit)
10790         (remote_search_memory, remote_rcmd, remote_memory_map)
10791         (remote_pid_to_str, remote_get_thread_local_address)
10792         (remote_get_tib_address, remote_read_description): Refactor as
10793         methods of remote_target.
10794         (remote_target::fileio_open, remote_target::fileio_pwrite)
10795         (remote_target::fileio_pread, remote_target::fileio_close): New.
10796         (remote_hostio_readlink, remote_hostio_fstat)
10797         (remote_filesystem_is_local, remote_can_execute_reverse)
10798         (remote_supports_non_stop, remote_supports_disable_randomization)
10799         (remote_supports_multi_process, remote_supports_cond_breakpoints)
10800         (remote_supports_enable_disable_tracepoint)
10801         (remote_supports_string_tracing)
10802         (remote_can_run_breakpoint_commands, remote_trace_init)
10803         (remote_download_tracepoint, remote_can_download_tracepoint)
10804         (remote_download_trace_state_variable, remote_enable_tracepoint)
10805         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10806         (remote_trace_start, remote_get_trace_status)
10807         (remote_get_tracepoint_status, remote_trace_stop)
10808         (remote_trace_find, remote_get_trace_state_variable_value)
10809         (remote_save_trace_data, remote_get_raw_trace_data)
10810         (remote_set_disconnected_tracing, remote_core_of_thread)
10811         (remote_set_circular_trace_buffer, remote_traceframe_info)
10812         (remote_get_min_fast_tracepoint_insn_len)
10813         (remote_set_trace_buffer_size, remote_set_trace_notes)
10814         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10815         (remote_disable_btrace, remote_teardown_btrace)
10816         (remote_read_btrace, remote_btrace_conf)
10817         (remote_augmented_libraries_svr4_read, remote_load)
10818         (remote_pid_to_exec_file, remote_can_do_single_step)
10819         (remote_execution_direction, remote_thread_handle_to_thread_info):
10820         Refactor as methods of remote_target.
10821         (init_remote_ops, init_extended_remote_ops): Delete.
10822         (remote_can_async_p, remote_is_async_p, remote_async)
10823         (remote_thread_events, remote_upload_tracepoints)
10824         (remote_upload_trace_state_variables): Refactor as methods of
10825         remote_target.
10826         (_initialize_remote): Remove references to init_remote_ops and
10827         init_extended_remote_ops.
10828
10829         * remote-sim.c (gdbsim_target): New class.
10830         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10831         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10832         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10833         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10834         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10835         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10836         Refactor as methods of gdbsim_target.
10837         (gdbsim_ops): Now a gdbsim_target.
10838         (init_gdbsim_ops): Delete.
10839         (gdbsim_cntrl_c): Adjust.
10840         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10841
10842         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10843         (the_amd64_linux_nat_target): New.
10844         (amd64_linux_fetch_inferior_registers)
10845         (amd64_linux_store_inferior_registers): Refactor as methods of
10846         amd64_linux_nat_target.
10847         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
10848         * i386-linux-nat.c: Don't include "linux-nat.h".
10849         (i386_linux_nat_target): New class.
10850         (the_i386_linux_nat_target): New.
10851         (i386_linux_fetch_inferior_registers)
10852         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10853         as methods of i386_linux_nat_target.
10854         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10855         * inf-child.c (inf_child_ops): Delete.
10856         (inf_child_fetch_inferior_registers)
10857         (inf_child_store_inferior_registers): Delete.
10858         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10859         methods of inf_child_target.
10860         (inf_child_target::supports_terminal_ours)
10861         (inf_child_target::terminal_init)
10862         (inf_child_target::terminal_inferior)
10863         (inf_child_target::terminal_ours_for_output)
10864         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10865         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10866         New.
10867         (inf_child_open, inf_child_disconnect, inf_child_close)
10868         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10869         (inf_child_post_startup_inferior, inf_child_can_run)
10870         (inf_child_pid_to_exec_file): Refactor as methods of
10871         inf_child_target.
10872         (inf_child_follow_fork): Delete.
10873         (inf_child_target::can_create_inferior)
10874         (inf_child_target::can_attach): New.
10875         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10876         (inf_child_target::has_stack, inf_child_target::has_registers)
10877         (inf_child_target::has_execution): New.
10878         (inf_child_fileio_open, inf_child_fileio_pwrite)
10879         (inf_child_fileio_pread, inf_child_fileio_fstat)
10880         (inf_child_fileio_close, inf_child_fileio_unlink)
10881         (inf_child_fileio_readlink, inf_child_use_agent)
10882         (inf_child_can_use_agent): Refactor as methods of
10883         inf_child_target.
10884         (return_zero, inf_child_target): Delete.
10885         (inf_child_target::inf_child_target): New.
10886         * inf-child.h: Include "target.h".
10887         (inf_child_target): Delete function prototype.
10888         (inf_child_target): New class.
10889         (inf_child_open_target, inf_child_mourn_inferior)
10890         (inf_child_maybe_unpush_target): Delete.
10891         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10892         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10893         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10894         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10895         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10896         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10897         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10898         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10899         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10900         methods of inf_ptrace_target.
10901         (inf_ptrace_target): Delete function.
10902         * inf-ptrace.h: Include "inf-child.h".
10903         (inf_ptrace_target): Delete function declaration.
10904         (inf_ptrace_target): New class.
10905         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10906         * linux-nat.c (linux_target): New.
10907         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10908         (linux_nat_target::~linux_nat_target): New.
10909         (linux_child_post_attach, linux_child_post_startup_inferior)
10910         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10911         (linux_child_remove_fork_catchpoint)
10912         (linux_child_insert_vfork_catchpoint)
10913         (linux_child_remove_vfork_catchpoint)
10914         (linux_child_insert_exec_catchpoint)
10915         (linux_child_remove_exec_catchpoint)
10916         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10917         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10918         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10919         (linux_nat_stopped_data_address)
10920         (linux_nat_stopped_by_sw_breakpoint)
10921         (linux_nat_supports_stopped_by_sw_breakpoint)
10922         (linux_nat_stopped_by_hw_breakpoint)
10923         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10924         (linux_nat_kill, linux_nat_mourn_inferior)
10925         (linux_nat_xfer_partial, linux_nat_thread_alive)
10926         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10927         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10928         (linux_child_static_tracepoint_markers_by_strid)
10929         (linux_nat_is_async_p, linux_nat_can_async_p)
10930         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10931         (linux_nat_supports_multi_process)
10932         (linux_nat_supports_disable_randomization, linux_nat_async)
10933         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10934         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10935         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10936         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10937         methods of linux_nat_target.
10938         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10939         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10940         parameter.
10941         (check_stopped_by_watchpoint): Adjust.
10942         (linux_xfer_partial): Delete.
10943         (linux_target_install_ops, linux_target, linux_nat_add_target):
10944         Delete.
10945         (linux_nat_target::linux_nat_target): New.
10946         * linux-nat.h: Include "inf-ptrace.h".
10947         (linux_nat_target): New.
10948         (linux_target, linux_target_install_ops, linux_nat_add_target):
10949         Delete function declarations.
10950         (linux_target): Declare global.
10951         * linux-thread-db.c (thread_db_target): New.
10952         (thread_db_target::thread_db_target): New.
10953         (thread_db_ops): Delete.
10954         (the_thread_db_target): New.
10955         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10956         (thread_db_update_thread_list, thread_db_pid_to_str)
10957         (thread_db_extra_thread_info)
10958         (thread_db_thread_handle_to_thread_info)
10959         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10960         (thread_db_resume): Refactor as methods of thread_db_target.
10961         (init_thread_db_ops): Delete.
10962         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10963         * x86-linux-nat.c: Don't include "linux-nat.h".
10964         (super_post_startup_inferior): Delete.
10965         (x86_linux_nat_target::~x86_linux_nat_target): New.
10966         (x86_linux_child_post_startup_inferior)
10967         (x86_linux_read_description, x86_linux_enable_btrace)
10968         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10969         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10970         methods of x86_linux_nat_target.
10971         (x86_linux_create_target): Delete.  Bits folded ...
10972         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10973         pointer.
10974         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10975         (x86_linux_nat_target): New class.
10976         (x86_linux_create_target): Delete.
10977         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10978         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10979         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10980         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10981         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10982         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10983         make extern.
10984         (x86_use_watchpoints): Delete.
10985         * x86-nat.h: Include "breakpoint.h" and "target.h".
10986         (x86_use_watchpoints): Delete.
10987         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10988         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10989         (x86_insert_watchpoint, x86_remove_watchpoint)
10990         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10991         (x86_stopped_by_hw_breakpoint): New declarations.
10992         (x86_nat_target): New template class.
10993
10994         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10995         (the_ppc_linux_nat_target): New.
10996         (ppc_linux_fetch_inferior_registers)
10997         (ppc_linux_can_use_hw_breakpoint)
10998         (ppc_linux_region_ok_for_hw_watchpoint)
10999         (ppc_linux_ranged_break_num_registers)
11000         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11001         (ppc_linux_insert_mask_watchpoint)
11002         (ppc_linux_remove_mask_watchpoint)
11003         (ppc_linux_can_accel_watchpoint_condition)
11004         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11005         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11006         (ppc_linux_watchpoint_addr_within_range)
11007         (ppc_linux_masked_watch_num_registers)
11008         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11009         (ppc_linux_read_description): Refactor as methods of
11010         ppc_linux_nat_target.
11011         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
11012
11013         * procfs.c (procfs_xfer_partial): Delete forward declaration.
11014         (procfs_target): New class.
11015         (the_procfs_target): New.
11016         (procfs_target): Delete function.
11017         (procfs_auxv_parse, procfs_attach, procfs_detach)
11018         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11019         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11020         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11021         (procfs_create_inferior, procfs_update_thread_list)
11022         (procfs_thread_alive, procfs_pid_to_str)
11023         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11024         (procfs_stopped_data_address, procfs_insert_watchpoint)
11025         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11026         (proc_find_memory_regions, procfs_info_proc)
11027         (procfs_make_note_section): Refactor as methods of procfs_target.
11028         (_initialize_procfs): Adjust.
11029         * sol-thread.c (sol_thread_target): New class.
11030         (sol_thread_ops): Now a sol_thread_target.
11031         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11032         (sol_thread_fetch_registers, sol_thread_store_registers)
11033         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11034         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11035         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11036         (init_sol_thread_ops): Delete.
11037         (_initialize_sol_thread): Adjust.  Remove references to
11038         init_sol_thread_ops and complete_target_initialization.
11039
11040         * windows-nat.c (windows_nat_target): New class.
11041         (windows_fetch_inferior_registers)
11042         (windows_store_inferior_registers, windows_resume, windows_wait)
11043         (windows_attach, windows_detach, windows_pid_to_exec_file)
11044         (windows_files_info, windows_create_inferior)
11045         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11046         (windows_close, windows_pid_to_str, windows_xfer_partial)
11047         (windows_get_tib_address, windows_get_ada_task_ptid)
11048         (windows_thread_name, windows_thread_alive): Refactor as
11049         windows_nat_target methods.
11050         (do_initial_windows_stuff): Adjust.
11051         (windows_target): Delete function.
11052         (_initialize_windows_nat): Adjust.
11053
11054         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11055         (darwin_mourn_inferior, darwin_kill_inferior)
11056         (darwin_create_inferior, darwin_attach, darwin_detach)
11057         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11058         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11059         (darwin_supports_multi_process): Refactor as darwin_nat_target
11060         methods.
11061         (darwin_resume_to, darwin_files_info): Delete.
11062         (_initialize_darwin_inferior): Rename to ...
11063         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
11064         * darwin-nat.h: Include "inf-child.h".
11065         (darwin_nat_target): New class.
11066         (darwin_complete_target): Delete.
11067         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11068         (darwin_target): New.
11069         (i386_darwin_fetch_inferior_registers)
11070         (i386_darwin_store_inferior_registers): Refactor as methods of
11071         darwin_nat_target.
11072         (darwin_complete_target): Delete, with ...
11073         (_initialize_i386_darwin_nat): ... bits factored out here.
11074
11075         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11076         (the_alpha_linux_nat_target): New.
11077         (alpha_linux_register_u_offset): Refactor as
11078         alpha_linux_nat_target method.
11079         (_initialize_alpha_linux_nat): Adjust.
11080         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11081         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11082         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11083         methods of linux_nat_trad_target.
11084         (linux_trad_target): Delete.
11085         * linux-nat-trad.h (linux_trad_target): Delete function.
11086         (linux_nat_trad_target): New class.
11087         * mips-linux-nat.c (mips_linux_nat_target): New class.
11088         (super_fetch_registers, super_store_registers, super_close):
11089         Delete.
11090         (the_mips_linux_nat_target): New.
11091         (mips64_linux_regsets_fetch_registers)
11092         (mips64_linux_regsets_store_registers)
11093         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11094         (mips_linux_register_u_offset, mips_linux_read_description)
11095         (mips_linux_can_use_hw_breakpoint)
11096         (mips_linux_stopped_by_watchpoint)
11097         (mips_linux_stopped_data_address)
11098         (mips_linux_region_ok_for_hw_watchpoint)
11099         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11100         (mips_linux_close): Refactor as methods of mips_linux_nat.
11101         (_initialize_mips_linux_nat): Adjust to C++ification.
11102
11103         * aix-thread.c (aix_thread_target): New class.
11104         (aix_thread_ops): Now an aix_thread_target.
11105         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11106         (aix_thread_fetch_registers, aix_thread_store_registers)
11107         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11108         (aix_thread_thread_alive, aix_thread_pid_to_str)
11109         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11110         Refactor as methods of aix_thread_target.
11111         (init_aix_thread_ops): Delete.
11112         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11113         and complete_target_initialization.
11114         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11115         (rs6000_nat_target): New class.
11116         (the_rs6000_nat_target): New.
11117         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11118         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11119         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11120         (super_create_inferior): Delete.
11121         (_initialize_rs6000_nat): Adjust to C++ification.
11122
11123         * arm-linux-nat.c (arm_linux_nat_target): New class.
11124         (the_arm_linux_nat_target): New.
11125         (arm_linux_fetch_inferior_registers)
11126         (arm_linux_store_inferior_registers, arm_linux_read_description)
11127         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11128         (arm_linux_remove_hw_breakpoint)
11129         (arm_linux_region_ok_for_hw_watchpoint)
11130         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11131         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11132         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11133         arm_linux_nat_target.
11134         (_initialize_arm_linux_nat): Adjust to C++ification.
11135
11136         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11137         (the_aarch64_linux_nat_target): New.
11138         (aarch64_linux_fetch_inferior_registers)
11139         (aarch64_linux_store_inferior_registers)
11140         (aarch64_linux_child_post_startup_inferior)
11141         (aarch64_linux_read_description)
11142         (aarch64_linux_can_use_hw_breakpoint)
11143         (aarch64_linux_insert_hw_breakpoint)
11144         (aarch64_linux_remove_hw_breakpoint)
11145         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11146         (aarch64_linux_region_ok_for_hw_watchpoint)
11147         (aarch64_linux_stopped_data_address)
11148         (aarch64_linux_stopped_by_watchpoint)
11149         (aarch64_linux_watchpoint_addr_within_range)
11150         (aarch64_linux_can_do_single_step): Refactor as methods of
11151         aarch64_linux_nat_target.
11152         (super_post_startup_inferior): Delete.
11153         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11154
11155         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11156         (the_hppa_linux_nat_target): New.
11157         (hppa_linux_fetch_inferior_registers)
11158         (hppa_linux_store_inferior_registers): Refactor as methods of
11159         hppa_linux_nat_target.
11160         (_initialize_hppa_linux_nat): Adjust to C++ification.
11161
11162         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11163         (the_ia64_linux_nat_target): New.
11164         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11165         (ia64_linux_stopped_data_address)
11166         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11167         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11168         ia64_linux_nat_target methods.
11169         (super_xfer_partial): Delete.
11170         (_initialize_ia64_linux_nat): Adjust to C++ification.
11171
11172         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11173         (the_m32r_linux_nat_target): New.
11174         (m32r_linux_fetch_inferior_registers)
11175         (m32r_linux_store_inferior_registers): Refactor as
11176         m32r_linux_nat_target methods.
11177         (_initialize_m32r_linux_nat): Adjust to C++ification.
11178
11179         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11180         (the_m68k_linux_nat_target): New.
11181         (m68k_linux_fetch_inferior_registers)
11182         (m68k_linux_store_inferior_registers): Refactor as
11183         m68k_linux_nat_target methods.
11184         (_initialize_m68k_linux_nat): Adjust to C++ification.
11185
11186         * s390-linux-nat.c (s390_linux_nat_target): New class.
11187         (the_s390_linux_nat_target): New.
11188         (s390_linux_fetch_inferior_registers)
11189         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11190         (s390_insert_watchpoint, s390_remove_watchpoint)
11191         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11192         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11193         (s390_auxv_parse, s390_read_description): Refactor as methods of
11194         s390_linux_nat_target.
11195         (_initialize_s390_nat): Adjust to C++ification.
11196
11197         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11198         (the_sparc_linux_nat_target): New.
11199         (_initialize_sparc_linux_nat): Adjust to C++ification.
11200         * sparc-nat.c (sparc_fetch_inferior_registers)
11201         (sparc_store_inferior_registers): Remove target_ops parameter.
11202         * sparc-nat.h (sparc_fetch_inferior_registers)
11203         (sparc_store_inferior_registers): Remove target_ops parameter.
11204         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11205         (the_sparc64_linux_nat_target): New.
11206         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11207
11208         * spu-linux-nat.c (spu_linux_nat_target): New class.
11209         (the_spu_linux_nat_target): New.
11210         (spu_child_post_startup_inferior, spu_child_post_attach)
11211         (spu_child_wait, spu_fetch_inferior_registers)
11212         (spu_store_inferior_registers, spu_xfer_partial)
11213         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11214         methods.
11215         (_initialize_spu_nat): Adjust to C++ification.
11216
11217         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11218         (the_tilegx_linux_nat_target): New.
11219         (fetch_inferior_registers, store_inferior_registers):
11220         Refactor as methods.
11221         (_initialize_tile_linux_nat): Adjust to C++ification.
11222
11223         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11224         (the_xtensa_linux_nat_target): New.
11225         (xtensa_linux_fetch_inferior_registers)
11226         (xtensa_linux_store_inferior_registers): Refactor as
11227         xtensa_linux_nat_target methods.
11228         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11229
11230         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11231         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11232         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11233         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11234         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11235         (fbsd_stopped_by_sw_breakpoint)
11236         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11237         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11238         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11239         (fbsd_post_startup_inferior, fbsd_post_attach)
11240         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11241         (fbsd_set_syscall_catchpoint)
11242         (super_xfer_partial, super_resume, super_wait)
11243         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11244         (fbsd_handle_debug_trap): Remove target_ops parameter.
11245         (fbsd_nat_add_target): Delete.
11246         * fbsd-nat.h: Include "inf-ptrace.h".
11247         (fbsd_nat_add_target): Delete.
11248         (USE_SIGTRAP_SIGINFO): Define.
11249         (fbsd_nat_target): New class.
11250
11251         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11252         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11253         (amd64bsd_target): Delete.
11254         * amd64-bsd-nat.h: New file.
11255         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11256         "x86-bsd-nat.h".
11257         (amd64_fbsd_nat_target): New class.
11258         (the_amd64_fbsd_nat_target): New.
11259         (amd64fbsd_read_description): Refactor as method of
11260         amd64_fbsd_nat_target.
11261         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11262         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11263         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11264         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11265         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11266         (i386bsd_target): Delete.
11267         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11268         (i386bsd_fetch_inferior_registers)
11269         (i386bsd_store_inferior_registers): Declare.
11270         (i386_bsd_nat_target): New class.
11271         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11272         (the_i386_fbsd_nat_target): New.
11273         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11274         i386_fbsd_nat_target methods.
11275         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11276         (_initialize_i386fbsd_nat): Adjust to C++ification.
11277         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11278         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11279         (_initialize_x86_bsd_nat): Adjust to C++ification.
11280         * x86-bsd-nat.h: Include "x86-nat.h".
11281         (x86bsd_target): Delete declaration.
11282         (x86bsd_nat_target): New class.
11283
11284         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11285         (the_aarch64_fbsd_nat_target): New.
11286         (aarch64_fbsd_fetch_inferior_registers)
11287         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11288         aarch64_fbsd_nat_target.
11289         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11290         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11291         (the_alpha_bsd_nat_target): New.
11292         (alphabsd_fetch_inferior_registers)
11293         (alphabsd_store_inferior_registers): Refactor as
11294         alpha_bsd_nat_target methods.
11295         (_initialize_alphabsd_nat): Refactor as methods of
11296         alpha_bsd_nat_target.
11297         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11298         (the_amd64_nbsd_nat_target): New.
11299         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11300         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11301         (the_amd64_obsd_nat_target): New.
11302         (_initialize_amd64obsd_nat): Adjust to C++ification.
11303         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11304         (the_arm_fbsd_nat_target): New.
11305         (arm_fbsd_fetch_inferior_registers)
11306         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11307         (_initialize_arm_fbsd_nat): Refactor as methods of
11308         arm_fbsd_nat_target.
11309         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11310         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11311         (the_arm_netbsd_nat_target): New.
11312         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11313         arm_netbsd_nat_target.
11314         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11315         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11316         (the_hppa_nbsd_nat_target): New.
11317         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11318         hppa_nbsd_nat_target methods.
11319         (_initialize_hppanbsd_nat): Adjust to C++ification.
11320         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11321         (the_hppa_obsd_nat_target): New.
11322         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11323         methods of hppa_obsd_nat_target.
11324         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11325         add_target.
11326         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11327         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11328         add_target.
11329         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11330         (_initialize_i386obsd_nat): Use add_target.
11331         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11332         (the_m68k_bsd_nat_target): New.
11333         (m68kbsd_fetch_inferior_registers)
11334         (m68kbsd_store_inferior_registers): Refactor as methods of
11335         m68k_bsd_nat_target.
11336         (_initialize_m68kbsd_nat): Adjust to C++ification.
11337         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11338         (the_mips_fbsd_nat_target): New.
11339         (mips_fbsd_fetch_inferior_registers)
11340         (mips_fbsd_store_inferior_registers): Refactor as methods of
11341         mips_fbsd_nat_target.
11342         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11343         add_target.
11344         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11345         (the_mips_nbsd_nat_target): New.
11346         (mipsnbsd_fetch_inferior_registers)
11347         (mipsnbsd_store_inferior_registers): Refactor as methods of
11348         mips_nbsd_nat_target.
11349         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11350         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11351         (the_mips64_obsd_nat_target): New.
11352         (mips64obsd_fetch_inferior_registers)
11353         (mips64obsd_store_inferior_registers): Refactor as methods of
11354         mips64_obsd_nat_target.
11355         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11356         add_target.
11357         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11358         nbsd_nat_target.
11359         * nbsd-nat.h: Include "inf-ptrace.h".
11360         (nbsd_nat_target): New class.
11361         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11362         (obsd_wait): Refactor as methods of obsd_nat_target.
11363         (obsd_add_target): Delete.
11364         * obsd-nat.h: Include "inf-ptrace.h".
11365         (obsd_nat_target): New class.
11366         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11367         (the_ppc_fbsd_nat_target): New.
11368         (ppcfbsd_fetch_inferior_registers)
11369         (ppcfbsd_store_inferior_registers): Refactor as methods of
11370         ppc_fbsd_nat_target.
11371         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11372         add_target.
11373         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11374         (the_ppc_nbsd_nat_target): New.
11375         (ppcnbsd_fetch_inferior_registers)
11376         (ppcnbsd_store_inferior_registers): Refactor as methods of
11377         ppc_nbsd_nat_target.
11378         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11379         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11380         (the_ppc_obsd_nat_target): New.
11381         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11382         methods of ppc_obsd_nat_target.
11383         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11384         add_target.
11385         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11386         (the_sh_nbsd_nat_target): New.
11387         (shnbsd_fetch_inferior_registers)
11388         (shnbsd_store_inferior_registers): Refactor as methods of
11389         sh_nbsd_nat_target.
11390         (_initialize_shnbsd_nat): Adjust to C++ification.
11391         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11392         (inf_ptrace_xfer_partial): Delete.
11393         (sparc_xfer_partial, sparc_target): Delete.
11394         * sparc-nat.h (sparc_fetch_inferior_registers)
11395         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11396         (sparc_target): Delete function declaration.
11397         (sparc_target): New template class.
11398         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11399         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11400         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11401         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11402         add_target.
11403         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11404         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11405         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11406         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11407         add_target.
11408         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11409         (the_vax_bsd_nat_target): New.
11410         (vaxbsd_fetch_inferior_registers)
11411         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11412         methods.
11413         (_initialize_vaxbsd_nat): Adjust to C++ification.
11414
11415         * bsd-kvm.c (bsd_kvm_target): New class.
11416         (bsd_kvm_ops): Now a bsd_kvm_target.
11417         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11418         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11419         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11420         bsd_kvm_target.
11421         (bsd_kvm_return_one): Delete.
11422         (bsd_kvm_add_target): Adjust to C++ification.
11423
11424         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11425         (nto_procfs_target_procfs): New classes.
11426         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11427         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11428         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11429         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11430         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11431         (procfs_remove_hw_breakpoint, procfs_resume)
11432         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11433         (procfs_kill_inferior, procfs_store_registers)
11434         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11435         as methods of nto_procfs_target.
11436         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11437         (nto_native_ops): Delete.
11438         (procfs_open, procfs_native_open): Delete.
11439         (nto_native_ops): Now an nto_procfs_target_native.
11440         (init_procfs_targets): Adjust to C++ification.
11441         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11442         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11443         Refactor as methods of nto_procfs_target.
11444
11445         * go32-nat.c (go32_nat_target): New class.
11446         (the_go32_nat_target): New.
11447         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11448         (go32_store_registers, go32_xfer_partial, go32_files_info)
11449         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11450         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11451         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11452         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11453         (go32_target): Delete.
11454         (_initialize_go32_nat): Adjust to C++ification.
11455
11456         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11457         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11458         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11459         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11460         gnu_nat_target.
11461         (gnu_target): Delete.
11462         * gnu-nat.h (gnu_target): Delete.
11463         (gnu_nat_target): New class.
11464         * i386-gnu-nat.c (gnu_base_target): New.
11465         (i386_gnu_nat_target): New class.
11466         (the_i386_gnu_nat_target): New.
11467         (_initialize_i386gnu_nat): Adjust to C++ification.
11468
11469 2018-05-02  Pedro Alves  <palves@redhat.com>
11470
11471         * bfd-target.c (target_bfd_xclose): Rename to ...
11472         (target_bfd_close): ... this.
11473         (target_bfd_reopen): Adjust.
11474         * target.c (target_close): Remove references to to_xclose.
11475         * target.h (target_ops::to_xclose): Delete.
11476         (target_ops::to_close): Update comments.
11477
11478 2018-05-02  Pedro Alves  <palves@redhat.com>
11479
11480         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11481         "linux-nat.h".
11482         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11483         * inf-ptrace.c (inf_ptrace_register_u_offset)
11484         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11485         (inf_ptrace_store_register, inf_ptrace_store_registers)
11486         (inf_ptrace_trad_target): Move to ...
11487         * linux-nat-trad.c: ... this new file.
11488         * linux-nat-trad.h: New file.
11489         * linux-nat.c (linux_target_install_ops): Make extern.
11490         (linux_trad_target): Delete.
11491         * linux-nat.h (linux_trad_target): Delete declaration.
11492         (linux_target_install_ops): Declare.
11493         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11494         "linux-nat.h".
11495
11496 2018-05-02  Pedro Alves  <palves@redhat.com>
11497
11498         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11499         procfs_target/add_target here.
11500         * procfs.c (procfs_target): Make static.
11501         (_initialize_procfs): Call add_target here.
11502         * procfs.h (struct target_ops): Remove forward declaration.
11503         (procfs_target): Remove declaration.
11504         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11505
11506 2018-05-02  Pedro Alves  <palves@redhat.com>
11507
11508         * procfs.c (procfs_stopped_by_watchpoint)
11509         (procfs_insert_watchpoint, procfs_remove_watchpoint)
11510         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11511         Forward declare.
11512         (procfs_use_watchpoints): Delete, move contents...
11513         (procfs_target): ... here.
11514         * procfs.h (procfs_use_watchpoints): Delete declaration.
11515         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11516         procfs_use_watchpoints.
11517         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
11518         procfs_use_watchpoints.
11519
11520 2018-05-02  Tom Tromey  <tom@tromey.com>
11521
11522         PR python/20084:
11523         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
11524         and var_zuinteger_unlimited.
11525         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
11526         and PARAM_ZUINTEGER_UNLIMITED.
11527         (set_parameter_value): Handle var_zuinteger and
11528         var_zuinteger_unlimited.
11529         (add_setshow_generic): Likewise.
11530         (parmpy_init): Likewise.
11531
11532 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
11533
11534         PR rust/23124
11535         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
11536         pointer is not null before dereferencing it.
11537
11538 2018-04-30  Tom Tromey  <tom@tromey.com>
11539
11540         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
11541         is_mi_like_p.
11542
11543 2018-04-30  Tom Tromey  <tom@tromey.com>
11544
11545         * breakpoint.c (mention): Remove use of is_mi_like_p.
11546         (print_mention_ranged_breakpoint): Likewise.
11547         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
11548         of is_mi_like_p.
11549
11550 2018-04-30  Tom Tromey  <tom@tromey.com>
11551
11552         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
11553
11554 2018-04-30  Tom Tromey  <tom@tromey.com>
11555
11556         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
11557         (info_spu_event_command): Remove some uses of is_mi_like_p.
11558
11559 2018-04-30  Tom Tromey  <tom@tromey.com>
11560
11561         * python/py-framefilter.c (py_print_single_arg)
11562         (enumerate_locals, py_print_args, py_print_frame): Remove some
11563         uses of is_mi_like_p.
11564
11565 2018-04-30  Tom Tromey  <tom@tromey.com>
11566
11567         * ui-out.c: Update.
11568         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
11569         * ui-out.h (ui_out::is_mi_like_p): Now const.
11570         (ui_out::do_is_mi_like_p): Now const.
11571         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
11572
11573 2018-04-30  Tom Tromey  <tom@tromey.com>
11574
11575         * varobj.c (varobj_set_visualizer): Use new_reference.
11576         * python/python.c (gdbpy_decode_line): Use new_reference.
11577         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
11578         new_reference.
11579
11580 2018-04-30  Tom Tromey  <tom@tromey.com>
11581
11582         * varobj.c (install_new_value): Use new_reference.
11583         * value.h (value_incref): Return void.  Swap intro comment with
11584         value_decref.
11585         * value.c (set_value_parent): Use new_reference.
11586         (value_incref): Return void.  Update intro comment.
11587         (release_value): Use new_reference.
11588         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
11589
11590 2018-04-30  Tom Tromey  <tom@tromey.com>
11591
11592         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
11593         * gdb_bfd.h (new_bfd_ref): Remove.
11594         (gdb_bfd_open): Update comment.
11595         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11596         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
11597         (gdb_bfd_fdopenr): Use new_reference.
11598         * exec.c (exec_file_attach): Use new_reference.
11599
11600 2018-04-30  Tom Tromey  <tom@tromey.com>
11601
11602         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
11603         method.
11604
11605 2018-04-30  Tom Tromey  <tom@tromey.com>
11606
11607         * jit.c (jit_read_code_entry): Use type_align.
11608         * i386-tdep.c (i386_gdbarch_init): Don't call
11609         set_gdbarch_long_long_align_bit.
11610         * gdbarch.sh: Remove long_long_align_bit.
11611         * gdbarch.c, gdbarch.h: Rebuild.
11612         * arc-tdep.c (arc_type_align): New function.
11613         (arc_gdbarch_init): Use arc_type_align.  Don't call
11614         set_gdbarch_long_long_align_bit.
11615
11616 2018-04-30  Tom Tromey  <tom@tromey.com>
11617
11618         * rust-lang.c (rust_type_alignment): Remove.
11619         (rust_composite_type): Use type_align.
11620
11621 2018-04-30  Tom Tromey  <tom@tromey.com>
11622
11623         * NEWS: Mention Type.align.
11624         * python/py-type.c (typy_get_alignof): New function.
11625         (type_object_getset): Add "alignof".
11626
11627 2018-04-30  Tom Tromey  <tom@tromey.com>
11628
11629         PR exp/17095:
11630         * NEWS: Update.
11631         * std-operator.def (UNOP_ALIGNOF): New operator.
11632         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
11633         New.
11634         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
11635         * c-lang.c (c_op_print_tab): Add alignof.
11636         * c-exp.y (ALIGNOF): New token.
11637         (exp): Add "ALIGNOF" production.
11638         (ident_tokens): Add _Alignof and alignof.
11639
11640 2018-04-30  Tom Tromey  <tom@tromey.com>
11641
11642         * i386-tdep.c (i386_type_align): New function.
11643         (i386_gdbarch_init): Update.
11644         * gdbarch.sh (type_align): New method.
11645         * gdbarch.c, gdbarch.h: Rebuild.
11646         * arch-utils.h (default_type_align): Declare.
11647         * arch-utils.c (default_type_align): New function.
11648         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
11649         (struct type) <align_log2>: New field.
11650         <instance_flags>: Now a bitfield.
11651         (TYPE_RAW_ALIGN): New macro.
11652         (type_align, type_raw_align, set_type_align): Declare.
11653         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
11654         functions.
11655         * dwarf2read.c (quirk_rust_enum): Set type alignment.
11656         (get_alignment, maybe_set_alignment): New functions.
11657         (read_structure_type, read_enumeration_type, read_array_type)
11658         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
11659         (read_subrange_type, read_base_type): Set type alignment.
11660
11661 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
11662
11663         * dwarf2read.c (read_index_from_section): Use bool.
11664
11665 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
11666
11667         PR gdb/22950
11668         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
11669         with #ifdef.
11670
11671 2018-04-29  John Reiser  <jreiser@BitWagon.com>
11672
11673         PR build/22873
11674         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
11675         last step, and do it atomically.
11676
11677 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
11678
11679         * compile/compile-c-types.c (convert_int, convert_float):
11680         Update for C FE v1.
11681
11682 2018-04-27  Tom Tromey  <tom@tromey.com>
11683
11684         PR rust/22545:
11685         * rust-lang.c (rust_inclusive_range_type_p): New function.
11686         (rust_range): Handle inclusive ranges.
11687         (rust_compute_range): Likewise.
11688         * rust-exp.y (struct rust_op) <inclusive>: New field.
11689         (DOTDOTEQ): New constant.
11690         (range_expr): Add "..=" productions.
11691         (operator_tokens): Add "..=" token.
11692         (ast_range): Add "inclusive" parameter.
11693         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
11694         ranges.
11695         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
11696         bounds values.
11697         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
11698         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
11699         Update comments.
11700         * expprint.c (print_subexp_standard): Handle new bounds values.
11701         (dump_subexp_body_standard): Likewise.
11702
11703 2018-04-27  Tom Tromey  <tom@tromey.com>
11704
11705         * configure: Rebuild.
11706         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
11707         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
11708         "OVERRIDE".
11709         (class symbol_needs_eval_context): Likewise.
11710         * dwarf2read.c (mock_mapped_index::symbol_name_count)
11711         (mock_mapped_index::symbol_name_at): Use "override".  Remove
11712         "virtual".
11713         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
11714         "override".
11715         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
11716         * aarch64-tdep.c (instruction_reader::read): Use "override".
11717         (instruction_reader_test::read): Likewise.
11718         * arm-tdep.c (instruction_reader::read): Use "override".
11719         (instruction_reader_thumb::read): Likewise.
11720
11721 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
11722
11723         PR remote/9665
11724         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
11725         instead of remote_send.
11726         (remote_send): Remove.
11727
11728 2018-04-26  Pedro Alves  <palves@redhat.com>
11729
11730         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
11731         find_function_start_sal instead of find_pc_line.
11732
11733 2018-04-26  Pedro Alves  <palves@redhat.com>
11734
11735         * breakpoint.c (set_breakpoint_location_function): Handle
11736         mst_data_gnu_ifunc.
11737         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
11738         * elfread.c (elf_symtab_read): Give data symbols with
11739         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
11740         (elf_rel_plt_read): Update comment.
11741         * linespec.c (convert_linespec_to_sals): Handle
11742         mst_data_gnu_ifunc.
11743         (minsym_found): Handle mst_data_gnu_ifunc.
11744         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
11745         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
11746         * parse.c (find_minsym_type_and_address): Handle
11747         mst_data_gnu_ifunc.
11748         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
11749         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
11750         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
11751         comment.
11752         <mst_data_gnu_ifunc>: New enumerator.
11753
11754 2018-04-26  Pedro Alves  <palves@redhat.com>
11755
11756         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
11757         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
11758         'want_trampoline' parameter by a lookup_msym_prefer parameter.
11759         Handle it.
11760         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
11761         (lookup_minimal_symbol_by_pc): Adjust.
11762         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
11763         (lookup_solib_trampoline_symbol_by_pc): Adjust.
11764         * minsyms.h (lookup_msym_prefer): New enum.
11765         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11766         parameter by a lookup_msym_prefer parameter.
11767
11768 2018-04-26  Pedro Alves  <palves@redhat.com>
11769
11770         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
11771         ends in "@plt" instead of looking at the symbol's section.
11772
11773 2018-04-26  Pedro Alves  <palves@redhat.com>
11774
11775         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
11776         all references.
11777         (find_pc_partial_function_gnu_ifunc): Rename to ...
11778         (find_pc_partial_function): ... this, and remove references to
11779         'is_gnu_ifunc_p'.
11780         (find_pc_partial_function): Delete old implementation.
11781         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
11782
11783 2018-04-26  Pedro Alves  <palves@redhat.com>
11784
11785         * linespec.c (struct bound_minimal_symbol_search_key): New.
11786         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
11787         skip first line if we found a GNU ifunc minimal symbol by name.
11788         (compare_msymbols): Change parameters to work with a destructured
11789         lhs minsym.
11790         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11791         functions.
11792
11793 2018-04-26  Pedro Alves  <palves@redhat.com>
11794
11795         * breakpoint.c (set_breakpoint_location_function): Don't resolve
11796         ifunc targets here.  Instead, if we have an ifunc minsym, use its
11797         address/name.
11798         (add_location_to_breakpoint): Store the minsym and the objfile in
11799         the breakpoint location.
11800         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11801         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11802         Record the minsym in the sal.
11803         * symtab.h (symtab_and_line) <msymbol>: New field.
11804
11805 2018-04-26  Pedro Alves  <palves@redhat.com>
11806
11807         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11808         unless we actually resolved the ifunc.
11809
11810 2018-04-26  Pedro Alves  <palves@redhat.com>
11811
11812         * c-exp.y (variable production): Prefer ifunc minsyms over
11813         regular function symbols.
11814         * symtab.c (find_gnu_ifunc): New function.
11815         * minsyms.h (lookup_msym_prefer): New enum.
11816         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11817         parameter by a lookup_msym_prefer parameter.
11818         * symtab.h (find_gnu_ifunc): New declaration.
11819
11820 2018-04-26  Pedro Alves  <palves@redhat.com>
11821
11822         * blockframe.c (find_gnu_ifunc_target_type): New function.
11823         (find_function_type): New.
11824         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11825         return a value with a memory address.
11826         (eval_call): For calls to GNU ifunc functions, try to find the
11827         type of the target function from the type that the resolver
11828         returns.
11829         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11830         symbols.
11831         * infcall.c (find_function_return_type): Delete.
11832         (find_function_addr): Add 'function_type' parameter.  For calls to
11833         GNU ifunc functions, try to find the type of the target function
11834         from the type that the resolver returns, and return it via
11835         FUNCTION_TYPE.
11836         (call_function_by_hand_dummy): Adjust to use the function type
11837         returned by find_function_addr.
11838         (find_function_addr): Add 'function_type' parameter and move
11839         description here.
11840         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11841         declarations.
11842
11843 2018-04-26  Pedro Alves  <palves@redhat.com>
11844
11845         * c-exp.y (variable production): Skip finding an alias for ifunc
11846         symbols.
11847
11848 2018-04-26  Pedro Alves  <palves@redhat.com>
11849
11850         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11851
11852 2018-04-25  Pedro Alves  <palves@redhat.com>
11853
11854         * infcmd.c (kill_command): Print the pid as string, not the whole
11855         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11856         message.
11857         * remote.c (remote_detach_1): Print the pid as string, not the
11858         whole thread's ptid.
11859
11860 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11861             Sergio Durigan Junior  <sergiodj@redhat.com>
11862             Pedro Alves  <palves@redhat.com>
11863
11864         * infcmd.c (kill_command): Print message when inferior has
11865         been killed.
11866         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11867         '1'.
11868         (add_inferior): Improve message printed when
11869         'print_inferior_events' is on.
11870         (exit_inferior): Remove message printed when
11871         'print_inferior_events' is on.
11872         (detach_inferior): Improve message printed when
11873         'print_inferior_events' is on.
11874         (initialize_inferiors): Use 'add_inferior_silent' to set
11875         'current_inferior_'.
11876         * inferior.h (print_inferior_events): Declare here as
11877         'extern'.
11878         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11879         '[Detaching...]' messages when 'print_inferior_events' is on.
11880         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11881         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11882         'Detaching after fork from child...', replace it by '... from
11883         parent...'.
11884         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11885         prefix/suffix when printing 'Detaching...' messages.  Print
11886         them when 'print_inferior_events' is on.
11887         * remote.c (remote_detach_1): Print message when detaching
11888         from inferior and '!is_fork_parent'.
11889
11890 2018-04-24  Tom Tromey  <tom@tromey.com>
11891
11892         * cli-out.h: Reindent.
11893
11894 2018-04-24  Tom Tromey  <tom@tromey.com>
11895
11896         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11897         (cli_ui_out::do_field_string): Use fputs_filtered.
11898         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11899
11900 2018-04-23  Tom Tromey  <tom@tromey.com>
11901
11902         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11903         gdb::unique_xmalloc_ptr.
11904
11905 2018-04-23  Tom Tromey  <tom@tromey.com>
11906
11907         * configure: Rebuild.
11908
11909 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
11910
11911         PR gdb/23095
11912         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11913         prepare_for_testing.  Set normal_bp to r_debug_state if target
11914         is bsd.
11915
11916 2018-04-21  Pedro Alves  <palves@redhat.com>
11917             Rajendra SY  <rajendra.sy@gmail.com>
11918
11919         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11920         * remote.c (extended_remote_attach): In all-stop mode, mark the
11921         thread as executing.
11922
11923 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11924
11925         * thread.c (thread_apply_all_command): Fix comment.
11926         (thread_command): Fix comment.
11927
11928 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11929
11930         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11931         parameter.
11932         * features/aarch64-core.c (create_feature_aarch64_core):
11933         Regenerate.
11934         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11935         Likewise.
11936         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11937         Likewise.
11938         * features/i386/32bit-avx512.c
11939         (create_feature_i386_32bit_avx512): Likewise.
11940         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11941         Likewise.
11942         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11943         Likewise.
11944         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11945         Likewise.
11946         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11947         Likewise.
11948         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11949         Likewise.
11950         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11951         Likewise.
11952         * features/i386/64bit-avx512.c
11953         (create_feature_i386_64bit_avx512): Likewise.
11954         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11955         Likewise.
11956         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11957         Likewise.
11958         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11959         Likewise.
11960         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11961         Likewise.
11962         * features/i386/64bit-segments.c
11963         (create_feature_i386_64bit_segments): Likewise.
11964         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11965         Likewise.
11966         * features/i386/x32-core.c
11967         (create_feature_i386_x32_core): Likewise.
11968         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11969         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11970         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11971         * target-descriptions.c: In generated code, don't pass xml
11972         filename.
11973
11974 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11975
11976         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11977         (print_xml_feature::visit_post): Likewise.
11978         (print_xml_feature::visit): Likewise.
11979         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11980         (print_xml_feature): Add new class.
11981         * regformats/regdat.sh: Null xmltarget on feature targets.
11982         * target-descriptions.c (struct target_desc): Add xmltarget.
11983         (maintenance_check_tdesc_xml_convert): Add unittest function.
11984         (tdesc_get_features_xml): Add function to get xml.
11985         (maintenance_check_xml_descriptions): Test xml generation.
11986         * xml-tdesc.c (string_read_description_xml): Add function.
11987         * xml-tdesc.h (string_read_description_xml): Add declaration.
11988
11989 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11990
11991         * features/Makefile: Add feature marker to targets with new style
11992         target descriptions.
11993         * regformats/aarch64.dat: Regenerate.
11994         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11995         * regformats/i386/amd64-avx-linux.dat: Likewise.
11996         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11997         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11998         * regformats/i386/amd64-linux.dat: Likewise.
11999         * regformats/i386/amd64-mpx-linux.dat: Likewise.
12000         * regformats/i386/amd64.dat: Likewise.
12001         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12002         * regformats/i386/i386-avx-linux.dat: Likewise.
12003         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12004         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12005         * regformats/i386/i386-linux.dat: Likewise.
12006         * regformats/i386/i386-mmx-linux.dat: Likewise.
12007         * regformats/i386/i386-mpx-linux.dat: Likewise.
12008         * regformats/i386/i386.dat: Likewise.
12009         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12010         * regformats/i386/x32-avx-linux.dat: Likewise.
12011         * regformats/i386/x32-linux.dat: Likewise.
12012         * regformats/tic6x-c62x-linux.dat: Likewise.
12013         * regformats/tic6x-c64x-linux.dat: Likewise.
12014         * regformats/tic6x-c64xp-linux.dat: Likewise.
12015         * regformats/regdat.sh: Parse feature marker.
12016
12017 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12018
12019         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12020         (tdesc_osabi_name): Likewise.
12021         * target-descriptions.c (tdesc_architecture_name): Add new
12022         function.
12023         (tdesc_osabi_name): Likewise.
12024
12025 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12026
12027         * common/tdesc.c (tdesc_predefined_type): Move to here.
12028         (tdesc_named_type): Likewise.
12029         (tdesc_create_vector): Likewise.
12030         (tdesc_create_struct): Likewise.
12031         (tdesc_set_struct_size): Likewise.
12032         (tdesc_create_union): Likewise.
12033         (tdesc_create_flags): Likewise.
12034         (tdesc_create_enum): Likewise.
12035         (tdesc_add_field): Likewise.
12036         (tdesc_add_typed_bitfield): Likewise.
12037         (tdesc_add_bitfield): Likewise.
12038         (tdesc_add_flag): Likewise.
12039         (tdesc_add_enum_value): Likewise.
12040         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12041         (struct tdesc_type_vector): Likewise.
12042         (struct tdesc_type_field): Likewise.
12043         (struct tdesc_type_with_fields): Likewise.
12044         (tdesc_create_enum): Add declaration.
12045         (tdesc_add_typed_bitfield): Likewise.
12046         (tdesc_add_enum_value): Likewise.
12047         * target-descriptions.c (tdesc_type_field): Move from here.
12048         (tdesc_type_builtin): Likewise.
12049         (tdesc_type_vector): Likewise.
12050         (tdesc_type_with_fields): Likewise.
12051         (tdesc_predefined_types): Likewise.
12052         (tdesc_named_type): Likewise.
12053         (tdesc_create_vector): Likewise.
12054         (tdesc_create_struct): Likewise.
12055         (tdesc_set_struct_size): Likewise.
12056         (tdesc_create_union): Likewise.
12057         (tdesc_create_flags): Likewise.
12058         (tdesc_create_enum): Likewise.
12059         (tdesc_add_field): Likewise.
12060         (tdesc_add_typed_bitfield): Likewise.
12061         (tdesc_add_bitfield): Likewise.
12062         (tdesc_add_flag): Likewise.
12063         (tdesc_add_enum_value): Likewise.
12064         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12065         (tdesc_add_typed_bitfield): Likewise.
12066         (tdesc_add_enum_value): Likewise.
12067
12068 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12069
12070         * common/tdesc.c (tdesc_feature::accept): Move to here.
12071         (tdesc_feature::operator==): Likewise.
12072         (tdesc_create_reg): Likewise.
12073         * common/tdesc.h (tdesc_type_kind): Likewise.
12074         (struct tdesc_type): Likewise.
12075         (struct tdesc_feature): Likewise.
12076         * regformats/regdat.sh: Create a feature.
12077         * target-descriptions.c (tdesc_type_kind): Move from here.
12078         (tdesc_type): Likewise.
12079         (tdesc_type_up): Likewise.
12080         (tdesc_feature): Likewise.
12081         (tdesc_create_reg): Likewise.
12082
12083 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12084
12085         * Makefile.in: Add arch/tdesc.c
12086         * common/tdesc.c: New file.
12087         * common/tdesc.h (tdesc_element_visitor): Move to here.
12088         (tdesc_element): Likewise.
12089         (tdesc_reg): Likewise.
12090         (tdesc_reg_up): Likewise.
12091         * regformats/regdef.h (reg): Add offset to constructors.
12092         * target-descriptions.c (tdesc_element_visitor): Move from here.
12093         (tdesc_element): Likewise.
12094         (tdesc_reg): Likewise.
12095         (tdesc_reg_up): Likewise.
12096
12097 2018-04-17  Tom Tromey  <tom@tromey.com>
12098
12099         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12100         discriminant field.
12101
12102 2018-04-17  Tom Tromey  <tom@tromey.com>
12103
12104         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12105
12106 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12107
12108         * symtab.c (print_symbol_info): Skip printing filename and line
12109         number when `last' is NULL.
12110         (symtab_symbol_info): Use empty string instead of NULL for first
12111         invocation of print_symbol_info.
12112         (rbreak_command): Pass NULL to `last' parameter of
12113         print_symbol_info.
12114
12115 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12116
12117         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12118         instead of nullptr.
12119
12120 2018-04-16  Pedro Alves  <palves@redhat.com>
12121
12122         * MAINTAINERS (sh): Remove.
12123         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12124         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12125         (ALLDEPFILES): Remove sh64-tdep.c.
12126         * NEWS: Mentions that support for SH-5/SH64 is removed.
12127         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12128         (sh*-*-openbsd*): Ditto.
12129         (sh64-*-elf*): Remove.
12130         (sh*): Remove.
12131         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12132         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12133         * sh-tdep.c: No longer include "sh64-tdep.h".
12134         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12135         * sh64-tdep.c, sh64-tdep.h: Remove files.
12136
12137 2018-04-16  Pedro Alves  <palves@redhat.com>
12138
12139         * MAINTAINERS: Remove m88k.
12140         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12141         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12142         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12143         * NEWS: Mention that support for m88k was removed.
12144         * configure.host (m88*-*-*): Remove support.
12145         * configure.nat (m88k-*-*): Remove support.
12146         * configure.tgt (m88*-*-openbsd*): Remove.
12147         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12148
12149 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12150
12151         * configure.tgt (x86_tobjs): New variable.
12152         (amd64_tobjs, i386_tobjs): Use it.
12153
12154 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12155
12156         * symtab.c (print_symbol_info): Precede the symbol definition by
12157         the line number when available.
12158         * NEWS: Advertise this enhancement.
12159
12160 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12161
12162         * NEWS (New options): announce set/show record btrace cpu.
12163         * btrace.c: Include record-btrace.h.
12164         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12165         the vendor is unknown.
12166         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12167         Maybe overwrite the btrace configuration's cpu.
12168         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12169         (btrace_fetch): Add cpu parameter.  Update callers.
12170         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12171         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12172         errata workarounds if the vendor is unknown.
12173         * python/py-record-btrace.c: Include record-btrace.h.
12174         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12175         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12176         * record-btrace.c (record_btrace_cpu_state_kind): New.
12177         (record_btrace_cpu): New.
12178         (set_record_btrace_cpu_cmdlist): New.
12179         (record_btrace_get_cpu): New.
12180         (require_btrace_thread, record_btrace_info)
12181         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12182         (cmd_set_record_btrace_cpu_none): New.
12183         (cmd_set_record_btrace_cpu_auto): New.
12184         (cmd_set_record_btrace_cpu): New.
12185         (cmd_show_record_btrace_cpu): New.
12186         (_initialize_record_btrace): Initialize set/show record btrace cpu
12187         commands.
12188         * record-btrace.h (record_btrace_get_cpu): New.
12189
12190 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12191
12192         * record.c (set_record_command): Fix typo in message.
12193
12194 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12195
12196         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12197
12198 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12199
12200         * infrun.c (process_event_stop_test): Call
12201         gdbarch_in_indirect_branch_thunk.
12202         * gdbarch.sh (in_indirect_branch_thunk): New.
12203         * gdbarch.c: Regenerated.
12204         * gdbarch.h: Regenerated.
12205         * x86-tdep.h: New.
12206         * x86-tdep.c: New.
12207         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12208         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12209         (ALLDEPFILES): Add x86-tdep.c.
12210         * arch-utils.h (default_in_indirect_branch_thunk): New.
12211         * arch-utils.c (default_in_indirect_branch_thunk): New.
12212         * i386-tdep: Include x86-tdep.h.
12213         (i386_in_indirect_branch_thunk): New.
12214         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12215         function.
12216         * amd64-tdep: Include x86-tdep.h.
12217         (amd64_in_indirect_branch_thunk): New.
12218         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12219
12220 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12221
12222         PR gdb/23053
12223         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12224         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12225         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12226         regression.
12227
12228 2018-04-12  Tom Tromey  <tom@tromey.com>
12229
12230         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12231         (rust_evaluate_subexp): Likewise.
12232
12233 2018-04-12  Pedro Alves  <palves@redhat.com>
12234
12235         * procfs.c (procfs_detach): Make forward declaration's prototype
12236         match definition's protototype.
12237         (proc_get_LDT_entry): Remove stale do_cleanups call.
12238
12239 2018-04-12  Pedro Alves  <palves@redhat.com>
12240
12241         * target.h (target_ops::to_has_exited): Delete.
12242         (target_has_exited): Delete.
12243         * target-delegates.c: Regenerate.
12244
12245 2018-04-11  Pedro Alves  <palves@redhat.com>
12246
12247         * target.c (fileio_fh_t::t): Add comment.
12248         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12249         (target_fileio_close): Handle a NULL target.
12250         (invalidate_fileio_fh): New.
12251         (target_close): Call it.
12252         * remote.c (remote_hostio_send_command): No longer check whether
12253         remote_desc is open.
12254
12255 2018-04-11  Pedro Alves  <palves@redhat.com>
12256
12257         * target.c (fileio_fh_t): Make it a named struct instead of a
12258         typedef.
12259         (fileio_fh_t::is_closed): New method.
12260         (DEF_VEC_O (fileio_fh_t)): Remove.
12261         (fileio_fhandles): Now a std::vector.
12262         (is_closed_fileio_fh): Delete.
12263         (acquire_fileio_fd): Adjust.  Rename parameters.
12264         (release_fileio_fd): Adjust.
12265         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12266         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12267         (target_fileio_close): Adjust.
12268
12269 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12270
12271         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12272         index.
12273
12274 2018-04-10  Pedro Alves  <palves@redhat.com>
12275
12276         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12277         (scoped_finish_thread_state): New class.
12278         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12279         cleanup.
12280         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12281         (fetch_inferior_event, normal_stop): Likewise.
12282         * thread.c (finish_thread_state_cleanup): Delete.
12283
12284 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12285             Pedro Alves  <palves@redhat.com>
12286
12287         * value.c: Include "selftest.h" and "common/array-view.h".
12288         (struct range) <operator ==>: New.
12289         (test_ranges_contain): New.
12290         (check_ranges_vector): New.
12291         (test_insert_into_bit_range_vector): New.
12292         (_initialize_values): Register selftests.
12293         * common/array-view.h (operator==, operator!=): New.
12294
12295 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12296
12297         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12298         an iterator.
12299         * inline-frame.c: Include <algorithm>.
12300         (struct inline_state): Add constructor.
12301         (inline_state_s): Remove.
12302         (DEF_VEC_O(inline_state_s)): Remove.
12303         (inline_states): Change type to std::vector.
12304         (find_inline_frame_state): Adjust to std::vector.
12305         (allocate_inline_frame_state): Remove.
12306         (clear_inline_frame_state): Adjust to std::vector.
12307         (skip_inline_frames): Adjust to std::vector.
12308
12309 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12310
12311         * tracepoint.h (struct trace_state_variable): Add constructor.
12312         <name>: Change type to std::string.
12313         * tracepoint.c (tsv_s): Remove.
12314         (DEF_VEC_O(tsv_s)): Remove.
12315         (tvariables): Change to std::vector.
12316         (create_trace_state_variable): Adjust to std::vector.
12317         (find_trace_state_variable): Likewise.
12318         (find_trace_state_variable_by_number): Likewise.
12319         (delete_trace_state_variable): Likewise.
12320         (trace_variable_command): Adjust to std::string.
12321         (delete_trace_variable_command): Likewise.
12322         (tvariables_info_1): Adjust to std::vector.
12323         (save_trace_state_variables): Likewise.
12324         (start_tracing): Likewise.
12325         (merge_uploaded_trace_state_variables): Adjust to std::vector
12326         and std::string.
12327         * target.h (struct target_ops)
12328         <to_download_trace_state_variable>: Pass reference to
12329         trace_state_variable.
12330         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12331         * target-delegates.c: Re-generate.
12332         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12333         (mi_tsv_deleted): Likewise.
12334         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12335         * remote.c (remote_download_trace_state_variable): Change
12336         pointer to reference and adjust.
12337         * make-target-delegates (parse_argtypes): Handle references.
12338         (write_function_header): Likewise.
12339         (munge_type): Likewise.
12340
12341 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12342
12343         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12344         string_view-selftests.c.
12345         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12346         testsuite.
12347         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12348         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12349         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12350         * unittests/basic_string_view/element_access/char/1.cc:
12351         Likewise.
12352         * unittests/basic_string_view/element_access/char/empty.cc:
12353         Likewise.
12354         * unittests/basic_string_view/element_access/char/front_back.cc:
12355         Likewise.
12356         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12357         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12358         Likewise.
12359         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12360         Likewise.
12361         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12362         Likewise.
12363         * unittests/basic_string_view/operations/compare/char/1.cc:
12364         Likewise.
12365         * unittests/basic_string_view/operations/compare/char/13650.cc:
12366         Likewise.
12367         * unittests/basic_string_view/operations/copy/char/1.cc:
12368         Likewise.
12369         * unittests/basic_string_view/operations/data/char/1.cc:
12370         Likewise.
12371         * unittests/basic_string_view/operations/find/char/1.cc:
12372         Likewise.
12373         * unittests/basic_string_view/operations/find/char/2.cc:
12374         Likewise.
12375         * unittests/basic_string_view/operations/find/char/3.cc:
12376         Likewise.
12377         * unittests/basic_string_view/operations/find/char/4.cc:
12378         Likewise.
12379         * unittests/basic_string_view/operations/rfind/char/1.cc:
12380         Likewise.
12381         * unittests/basic_string_view/operations/rfind/char/2.cc:
12382         Likewise.
12383         * unittests/basic_string_view/operations/rfind/char/3.cc:
12384         Likewise.
12385         * unittests/basic_string_view/operations/substr/char/1.cc:
12386         Likewise.
12387         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12388         * unittests/string_view-selftests.c: New file.
12389
12390 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12391
12392         * unittests/basic_string_view/capacity/1.cc: New file.
12393         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12394         * unittests/basic_string_view/cons/char/1.cc: New file.
12395         * unittests/basic_string_view/cons/char/2.cc: New file.
12396         * unittests/basic_string_view/cons/char/3.cc: New file.
12397         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12398         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12399         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12400         * unittests/basic_string_view/element_access/char/1.cc: New file.
12401         * unittests/basic_string_view/element_access/char/2.cc: New file.
12402         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12403         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12404         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12405         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12406         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12407         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12408         * unittests/basic_string_view/include.cc: New file.
12409         * unittests/basic_string_view/inserters/char/1.cc: New file.
12410         * unittests/basic_string_view/inserters/char/2.cc: New file.
12411         * unittests/basic_string_view/inserters/char/3.cc: New file.
12412         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12413         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12414         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12415         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12416         * unittests/basic_string_view/literals/types.cc: New file.
12417         * unittests/basic_string_view/literals/values.cc: New file.
12418         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12419         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12420         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12421         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12422         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12423         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12424         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12425         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12426         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12427         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12428         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12429         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12430         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12431         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12432         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12433         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12434         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12435         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12436         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12437         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12438         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12439         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12440         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12441         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12442         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12443         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12444         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12445         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12446         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12447         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12448         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12449         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12450         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12451         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12452         * unittests/basic_string_view/operators/char/2.cc: New file.
12453         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12454         * unittests/basic_string_view/range_access/char/1.cc: New file.
12455         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12456         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12457         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12458         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12459         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12460         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12461         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12462         * unittests/basic_string_view/typedefs.cc: New file.
12463         * unittests/basic_string_view/types/1.cc: New file.
12464
12465 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12466
12467         * common/gdb_string_view.h: Remove libstdc++ implementation
12468         details, adjust to gdb reality.
12469         * common/gdb_string_view.tcc: Likewise.
12470         * cli/cli-script.c (struct string_view): Remove.
12471         (user_args) <m_args>: Change element type to gdb::string_view.
12472         (user_args::insert_args): Adjust.
12473
12474 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12475
12476         * common/gdb_string_view.h: New file.
12477         * common/gdb_string_view.tcc: New file.
12478
12479 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12480
12481         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12482         * configure: Re-generate.
12483
12484 2018-04-09  Pedro Alves  <palves@redhat.com>
12485
12486         * gdbarch.sh: Include "observable.h" instead of "observer.h".
12487         (set_target_gdbarch): Call
12488         gdb::observers::architecture_changed.notify instead of
12489         observer_notify_architecture_changed.
12490
12491 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12492
12493         * tracepoint.c (struct current_traceframe_cleanup): Remove.
12494         (do_restore_current_traceframe_cleanup): Remove.
12495         (restore_current_traceframe_cleanup_dtor): Remove.
12496         (make_cleanup_restore_current_traceframe): Remove.
12497         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12498         New.
12499         * tracepoint.h (struct scoped_restore_current_traceframe): New.
12500         * infrun.c (fetch_inferior_event): Use
12501         scoped_restore_current_traceframe.
12502
12503 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12504
12505         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12506         Remove.
12507         <n_allocated_type_units>: Remove.
12508         <all_type_units>: Change to std::vector.
12509         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12510         to std::vector change.
12511         (dwarf2_per_objfile::get_cutu): Likewise.
12512         (dwarf2_per_objfile::get_tu): Likewise.
12513         (create_signatured_type_table_from_index): Likewise.
12514         (create_signatured_type_table_from_debug_names): Likewise.
12515         (dw2_symtab_iter_next): Likewise.
12516         (dw2_print_stats): Likewise.
12517         (dw2_expand_all_symtabs): Likewise.
12518         (dw2_expand_marked_cus): Likewise.
12519         (dw2_debug_names_iterator::next): Likewise.
12520         (dwarf2_initialize_objfile): Likewise.
12521         (add_signatured_type_cu_to_table): Likewise.
12522         (create_all_type_units): Likewise.
12523         (add_type_unit): Likewise.
12524         (struct tu_abbrev_offset): Add constructor.
12525         (build_type_psymtabs_1): Adjust to std::vector change.
12526         (print_tu_stats): Likewise.
12527         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12528         (write_debug_names): Likewise.
12529
12530 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12531
12532         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
12533         Make an std::vector.
12534         <n_comp_units>: Remove.
12535         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12536         to std::vector change.
12537         (dwarf2_per_objfile::get_cutu): Likewise.
12538         (dwarf2_per_objfile::get_cu): Likewise.
12539         (create_cus_from_index): Likewise.
12540         (create_addrmap_from_index): Likewise.
12541         (create_addrmap_from_aranges): Likewise.
12542         (dwarf2_read_index): Likewise.
12543         (dw2_find_last_source_symtab): Likewise.
12544         (dw2_map_symtabs_matching_filename): Likewise.
12545         (dw2_symtab_iter_next): Likewise.
12546         (dw2_print_stats): Likewise.
12547         (dw2_expand_all_symtabs): Likewise.
12548         (dw2_expand_symtabs_with_fullname): Likewise.
12549         (dw2_expand_marked_cus): Likewise.
12550         (dw2_map_symbol_filenames): Likewise.
12551         (create_cus_from_debug_names): Likewise.
12552         (dwarf2_read_debug_names): Likewise.
12553         (dw2_debug_names_iterator::next): Likewise.
12554         (dwarf2_initialize_objfile): Likewise.
12555         (set_partial_user): Likewise.
12556         (dwarf2_build_psymtabs_hard): Likewise.
12557         (read_comp_units_from_section): Remove arguments, adjust to
12558         std::vector change.
12559         (create_all_comp_units): Adjust to std::vector and
12560         read_comp_units_from_section changes.
12561         (dwarf2_find_containing_comp_unit): Adjust to std::vector
12562         change.
12563         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12564         (psyms_seen_size): Likewise.
12565         (write_gdbindex): Likewise.
12566         (write_debug_names): Likewise.
12567
12568 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12569
12570         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
12571         with dwarf2_per_objfile.
12572         (create_cus_from_index): Likewise.
12573         (create_signatured_type_table_from_index): Likewise.
12574         (dwarf2_read_index): Likewise.
12575         (dwarf2_initialize_objfile): Likewise.
12576         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
12577         per_cu rather than get_dwarf2_per_objfile.
12578
12579 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12580
12581         * dwarf2read.h (struct signatured_type): Forward declare.
12582         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
12583         New methods.
12584         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
12585         (dw2_get_cutu): ...this.
12586         (dwarf2_per_objfile::get_cu): Rename from...
12587         (dw2_get_cu): ...this.
12588         (dwarf2_per_objfile::get_tu): New.
12589         (create_addrmap_from_index): Adjust.
12590         (create_addrmap_from_aranges): Adjust.
12591         (dw2_find_last_source_symtab): Adjust.
12592         (dw2_map_symtabs_matching_filename): Adjust.
12593         (dw2_symtab_iter_next): Adjust.
12594         (dw2_print_stats): Adjust.
12595         (dw2_expand_all_symtabs): Adjust.
12596         (dw2_expand_symtabs_with_fullname): Adjust.
12597         (dw2_expand_marked_cus): Adjust.
12598         (dw_expand_symtabs_matching_file_matcher): Adjust.
12599         (dw2_map_symbol_filenames): Adjust.
12600         (dw2_debug_names_iterator::next): Adjust.
12601         (dwarf2_initialize_objfile): Adjust.
12602         (set_partial_user): Adjust.
12603         (dwarf2_build_psymtabs_hard): Adjust.
12604
12605 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12606
12607         * dwarf2read.c (create_signatured_type_table_from_debug_names):
12608         Remove unused variables.
12609         (dw2_map_symtabs_matching_filename): Likewise.
12610         (dwarf2_record_block_ranges): Likewise.
12611         (dwarf2_read_addr_index): Likewise.
12612         (follow_die_offset): Likewise.
12613
12614 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12615
12616         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
12617         to symbol_file_add_main.
12618
12619 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12620
12621         PR mi/22299
12622         * mi/mi-console.c (do_fputc_async_safe): New.
12623         (mi_console_file::write_async_safe): New.
12624         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
12625         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
12626         New.
12627         * ui-file.c (ui_file::putstrn): Adjust call to
12628         fputstrn_unfiltered.
12629         * utils.c (printchar): Replace do_fputs and do_fprintf
12630         parameters by do_fputc.
12631         (fputstr_filtered): Adjust call to printchar.
12632         (fputstr_unfiltered): Likewise.
12633         (fputstrn_filtered): Likewise.
12634         (fputstrn_unfiltered): Add do_fputc parameter, pass to
12635         printchar.
12636         * utils.h (do_fputc_ftype): New typedef.
12637         (fputstrn_unfiltered): Add do_fputc parameter.
12638
12639 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12640
12641         * regformats/i386/i386-avx.dat: Remove.
12642
12643 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12644
12645         PR gdb/22979
12646         * amd64-tdep.c (amd64_none_init_abi): New function.
12647         (amd64_x32_none_init_abi): New function.
12648         (_initialize_amd64_tdep): Register handlers for x86-64 and
12649         x64_32 with GDB_OSABI_NONE.
12650         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
12651         GDB_OSABI_NONE osabi.
12652
12653 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12654
12655         PR gdb/22980
12656         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
12657         GDB_OSABI_NONE.
12658         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
12659         * osabi.c (gdb_osabi_names): Add "unknown" entry.
12660
12661 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12662
12663         * common/byte-vector.h (char_vector): New type.
12664         * target.h (target_read_alloc): Return
12665         gdb::optional<byte_vector>.
12666         (target_read_stralloc): Return gdb::optional<char_vector>.
12667         (target_get_osdata): Return gdb::optional<char_vector>.
12668         * target.c (target_read_alloc_1): Templatize.  Replacement
12669         manual memory management with vector.
12670         (target_read_alloc): Change return type, adjust.
12671         (target_read_stralloc): Change return type, adjust.
12672         (target_get_osdata): Change return type, adjust.
12673         * auxv.c (struct auxv_info) <length>: Remove.
12674         <data>: Change type to gdb::optional<byte_vector>.
12675         (auxv_inferior_data_cleanup): Free auxv_info with delete.
12676         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
12677         (target_auxv_search): Adjust.
12678         (fprint_target_auxv): Adjust.
12679         * avr-tdep.c (avr_io_reg_read_command): Adjust.
12680         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
12681         (linux_make_corefile_notes): Adjust.
12682         * osdata.c (get_osdata): Adjust.
12683         * remote.c (remote_get_threads_with_qxfer): Adjust.
12684         (remote_memory_map): Adjust.
12685         (remote_traceframe_info): Adjust.
12686         (btrace_read_config): Adjust.
12687         (remote_read_btrace): Adjust.
12688         (remote_pid_to_exec_file): Adjust.
12689         * solib-aix.c (solib_aix_get_library_list): Adjust.
12690         * solib-dsbt.c (decode_loadmap): Don't free buf.
12691         (dsbt_get_initial_loadmaps): Adjust.
12692         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
12693         * solib-target.c (solib_target_current_sos): Adjust.
12694         * tracepoint.c (sdata_make_value): Adjust.
12695         * xml-support.c (xinclude_start_include): Adjust.
12696         (xml_fetch_content_from_file): Adjust.
12697         * xml-support.h (xml_fetch_another): Change return type.
12698         (xml_fetch_content_from_file): Change return type.
12699         * xml-syscall.c (xml_init_syscalls_info): Adjust.
12700         * xml-tdesc.c (file_read_description_xml): Adjust.
12701         (fetch_available_features_from_target): Change return type.
12702         (target_fetch_description_xml): Adjust.
12703         (target_read_description_xml): Adjust.
12704
12705 2018-04-06  Tom Tromey  <tom@tromey.com>
12706
12707         * value.c (~value): Update.
12708         (struct value) <contents>: Now unique_xmalloc_ptr.
12709         (value_contents_bits_eq, allocate_value_contents)
12710         (value_contents_raw, value_contents_all_raw)
12711         (value_contents_for_printing, value_contents_for_printing_const)
12712         (set_value_enclosing_type): Update.
12713
12714 2018-04-06  Tom Tromey  <tom@tromey.com>
12715
12716         * value.c (range_s): Remove typedef, VEC.
12717         (struct range): Add operator<.
12718         (range_lessthan): Remove.
12719         (ranges_contain): Change type.
12720         (~value): Update.
12721         (struct value) <unavailable, optimized_out>: Now std::vector.
12722         (value_entirely_available)
12723         (value_entirely_covered_by_range_vector)
12724         (value_entirely_unavailable, value_entirely_optimized_out):
12725         Update.
12726         (insert_into_bit_range_vector): Change argument type.
12727         (find_first_range_overlap): Likewise.
12728         (struct ranges_and_idx, value_contents_bits_eq)
12729         (require_not_optimized_out, require_available): Update.
12730         (ranges_copy_adjusted): Change argument types.
12731         (value_optimized_out, value_copy, value_fetch_lazy): Update.
12732
12733 2018-04-06  Tom Tromey  <tom@tromey.com>
12734
12735         * value.c (~value): Update.
12736         (struct value) <parent>: Now a value_ref_ptr.
12737         (value_parent, set_value_parent, value_address, value_copy):
12738         Update.
12739
12740 2018-04-06  Tom Tromey  <tom@tromey.com>
12741
12742         * value.c (struct value): Add constructor, destructor, and member
12743         initializers.
12744         (allocate_value_lazy, value_decref): Update.
12745
12746 2018-04-06  Tom Tromey  <tom@tromey.com>
12747
12748         * value.c (struct value) <released, next>: Remove.
12749         (all_values): Now a std::vector.
12750         (allocate_value_lazy): Update.
12751         (value_next): Remove.
12752         (value_mark, value_free_to_mark, release_value)
12753         (value_release_to_mark): Update.
12754
12755 2018-04-06  Tom Tromey  <tom@tromey.com>
12756
12757         * value.h (fetch_subexp_value, value_release_to_mark): Update.
12758         (free_value_chain): Remove.
12759         * value.c (free_value_chain): Remove.
12760         (value_release_to_mark): Return a std::vector.
12761         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
12762         std::vector.
12763         (check_condition): Update.
12764         * eval.c (fetch_subexp_value): Change "val_chain" to a
12765         std::vector.
12766         * breakpoint.c (update_watchpoint): Update.
12767         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
12768
12769 2018-04-06  Tom Tromey  <tom@tromey.com>
12770
12771         * value.h (free_all_values): Remove.
12772         * value.c (free_all_values): Remove.
12773
12774 2018-04-06  Tom Tromey  <tom@tromey.com>
12775
12776         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
12777         (value_history_chain, value_history_count): Remove.
12778         (value_history): New global.
12779         (record_latest_value, access_value_history, show_values)
12780         (preserve_values): Update.
12781
12782 2018-04-06  Tom Tromey  <tom@tromey.com>
12783
12784         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
12785         * varobj.c (varobj_set_display_format, varobj_set_value)
12786         (install_default_visualizer, construct_visualizer)
12787         (install_new_value, ~varobj, varobj_get_value_type)
12788         (my_value_of_variable, varobj_editable_p): Update.
12789         * c-varobj.c (c_describe_child, c_value_of_variable)
12790         (cplus_number_of_children, cplus_describe_child): Update.
12791         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12792         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12793         (ada_value_of_variable, ada_value_is_changeable_p): Update.
12794
12795 2018-04-06  Tom Tromey  <tom@tromey.com>
12796
12797         * printcmd.c (last_examine_address): Change type to
12798         value_ref_ptr.
12799         (do_examine, x_command): Update.
12800
12801 2018-04-06  Tom Tromey  <tom@tromey.com>
12802
12803         * value.c (release_value): Update.
12804         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12805         (struct bpstats) <val>: Now a value_ref_ptr.
12806         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12807         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12808         (~watchpoint, print_it_watchpoint, watch_command_1)
12809         (invalidate_bp_value_on_memory_change): Update.
12810
12811 2018-04-06  Tom Tromey  <tom@tromey.com>
12812
12813         * varobj.c (varobj_clear_saved_item)
12814         (update_dynamic_varobj_children, install_new_value, ~varobj):
12815         Update.
12816         * value.h (value_incref): Move declaration earlier.
12817         (value_decref): Rename from value_free.
12818         (struct value_ref_policy): New.
12819         (value_ref_ptr): New typedef.
12820         (struct value_deleter): Remove.
12821         (gdb_value_up): Remove typedef.
12822         (release_value): Change return type.
12823         (release_value_or_incref): Remove.
12824         * value.c (set_value_parent): Update.
12825         (value_incref): Change return type.
12826         (value_decref): Rename from value_free.
12827         (value_free_to_mark, free_all_values, free_value_chain): Update.
12828         (release_value): Return value_ref_ptr.
12829         (release_value_or_incref): Remove.
12830         (record_latest_value, set_internalvar, clear_internalvar):
12831         Update.
12832         * stack.c (info_frame_command): Don't call value_free.
12833         * python/py-value.c (valpy_dealloc, valpy_new)
12834         (value_to_value_object): Update.
12835         * printcmd.c (do_examine): Update.
12836         * opencl-lang.c (lval_func_free_closure): Update.
12837         * mi/mi-main.c (register_changed_p): Don't call value_free.
12838         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12839         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12840         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12841         value_free.
12842         * guile/scm-value.c (vlscm_free_value_smob)
12843         (vlscm_scm_from_value): Update.
12844         * frame.c (frame_register_unwind, frame_unwind_register_signed)
12845         (frame_unwind_register_unsigned, get_frame_register_bytes)
12846         (put_frame_register_bytes): Don't call value_free.
12847         * findvar.c (address_from_register): Don't call value_free.
12848         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12849         * dwarf2loc.c (entry_data_value_free_closure)
12850         (value_of_dwarf_reg_entry, free_pieced_value_closure)
12851         (dwarf2_evaluate_loc_desc_full): Update.
12852         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12853         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12854         (~watchpoint, watch_command_1)
12855         (invalidate_bp_value_on_memory_change): Update.
12856         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12857
12858 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12859
12860         PR gdb/23022
12861         * warning.m4: Add -Wno-error=deprecated-register.
12862         * configure: Re-generate.
12863
12864 2018-04-05  Tom Tromey  <tom@tromey.com>
12865
12866         * linespec.h: Remove include of "vec.h".
12867
12868 2018-04-05  Tom Tromey  <tom@tromey.com>
12869
12870         * linespec.c (typep): Remove typedef.
12871         (find_methods, find_superclass_methods): Take a std::vector.
12872         (find_method): Use std::vector.
12873
12874 2018-04-05  Tom Tromey  <tom@tromey.com>
12875
12876         * utils.c (compare_strings): Remove.
12877         * utils.h (compare_strings): Remove.
12878         * objc-lang.h (find_imps): Update.
12879         * objc-lang.c (find_methods): Take a std::vector.
12880         (uniquify_strings, find_imps): Likewise.
12881         * linespec.c (find_methods): Take a std::vector.
12882         (decode_objc): Use std::vector.
12883         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12884         a std::vector.
12885         (find_method, find_function_symbols): Use std::vector.
12886
12887 2018-04-05  Tom Tromey  <tom@tromey.com>
12888
12889         * completer.c (completion_tracker::completion_tracker): Remove
12890         cast.
12891         (completion_tracker::discard_completions): Likewise.
12892         * breakpoint.c (ambiguous_names_p): Remove cast.
12893         * ada-lang.c (_initialize_ada_language): Remove cast.
12894         * utils.h (streq): Update.
12895         (streq_hash): Add new declaration.
12896         * utils.c (streq): Return bool.
12897         (streq_hash): New function.
12898
12899 2018-04-05  Tom Tromey  <tom@tromey.com>
12900
12901         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12902         Remove a string copy.
12903
12904 2018-04-05  Tom Tromey  <tom@tromey.com>
12905
12906         * linespec.c (filter_results): Use std::vector.
12907         (decode_line_2, decode_line_full): Update.
12908
12909 2018-04-05  Tom Tromey  <tom@tromey.com>
12910
12911         * linespec.c (canonical_to_fullform): Return std::string.
12912         (filter_results): Update.
12913         (struct decode_line_2_item): Add constructor.
12914         <fullform, displayform>: Now std::string.
12915         (decode_line_2_compare_items): Now a std::sort comparator.
12916         (decode_line_2): Update.
12917
12918 2018-04-05  Tom Tromey  <tom@tromey.com>
12919
12920         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12921         (unexpected_linespec_error): Update.
12922         (linespec_parse_basic, parse_linespec): Update.
12923
12924 2018-04-05  Tom Tromey  <tom@tromey.com>
12925
12926         * linespec.c (linespec_parse_basic): Reindent.
12927
12928 2018-04-05  Tom Tromey  <tom@tromey.com>
12929
12930         * minsyms.h (iterate_over_minimal_symbols): Update.
12931         * minsyms.c (iterate_over_minimal_symbols): Take a
12932         gdb::function_view.
12933         * linespec.c (struct collect_minsyms): Remove.
12934         (compare_msyms): Now a std::sort comparator.
12935         (add_minsym): Add parameters.
12936         (search_minsyms_for_name): Update.  Use std::vector.
12937
12938 2018-04-03  Tom Tromey  <tom@tromey.com>
12939
12940         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12941         gdb::byte_vector.
12942
12943 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12944
12945         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12946
12947 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12948
12949         PR gdb/16959
12950         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12951         printing static type.
12952
12953 2018-04-01  Tom Tromey  <tom@tromey.com>
12954
12955         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12956         (rs6000_xfer_shared_libraries): Update.
12957
12958 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12959
12960         * common/gdb_vecs.h (char_ptr): Remove.
12961         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12962
12963 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12964
12965         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12966         with std::vector.
12967         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12968
12969 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12970
12971         * tracepoint.h (struct uploaded_tp): Initialize fields.
12972         <actions, step_actions, cmd_strings>: Change type to
12973         std::vector<char *>.
12974         * tracepoint.c (get_uploaded_tp): Allocate with new.
12975         (free_uploaded_tps): Free with delete.
12976         (parse_tracepoint_definition): Adjust to std::vector change.
12977         * breakpoint.c (read_uploaded_action): Likewise.
12978         (create_tracepoint_from_upload): Likewise.
12979         * ctf.c (ctf_write_uploaded_tp): Likewise.
12980         (SET_ARRAY_FIELD): Likewise.
12981         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12982
12983 2018-03-30  Tom Tromey  <tom@tromey.com>
12984
12985         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12986         std::unique_ptr.
12987         (svr4_keep_data_in_core): Update.
12988         (svr4_read_so_list): Update.
12989
12990 2018-03-30  Tom Tromey  <tom@tromey.com>
12991
12992         * windows-nat.c (handle_output_debug_string, handle_exception):
12993         Update.
12994         * target.h (target_read_string): Update.
12995         * target.c (target_read_string): Change "string" to
12996         unique_xmalloc_ptr.
12997         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12998         Update.
12999         * solib-frv.c (frv_current_sos): Update.
13000         * solib-dsbt.c (dsbt_current_sos): Update.
13001         * solib-darwin.c (darwin_current_sos): Update.
13002         * linux-thread-db.c (inferior_has_bug): Update.
13003         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13004         Update.  Remove alloca.
13005         * ada-lang.c (ada_main_name): Update.
13006
13007 2018-03-30  Tom Tromey  <tom@tromey.com>
13008
13009         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13010         (struct dwo_file_deleter): New.
13011         (dwo_file_up): New typedef.
13012         (open_and_init_dwo_file): Use dwo_file_up.
13013         (free_dwo_file_cleanup): Remove.
13014
13015 2018-03-30  Tom Tromey  <tom@tromey.com>
13016
13017         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13018         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13019
13020 2018-03-30  Tom Tromey  <tom@tromey.com>
13021
13022         * dwarf2read.c (class free_cached_comp_units): New class.
13023         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13024         (free_cached_comp_units): Remove function.
13025
13026 2018-03-30  Tom Tromey  <tom@tromey.com>
13027
13028         * utils.h (make_cleanup_unpush_target): Remove.
13029         * inf-ptrace.c (struct target_unpusher): New.
13030         (target_unpush_up) New typedef.
13031         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13032         target_unpush_up.
13033         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13034
13035 2018-03-27  Tom Tromey  <tom@tromey.com>
13036
13037         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13038
13039 2018-03-27  Pedro Alves  <palves@redhat.com>
13040             Tom Tromey  <tom@tromey.com>
13041
13042         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13043         destructor.  Now a class.
13044         (gdb_readline_wrapper_cleanup): Remove function.
13045         (gdb_readline_wrapper): Remove cleanups.
13046
13047 2018-03-27  Tom Tromey  <tom@tromey.com>
13048
13049         * typeprint.h (struct type_print_options) <local_typedefs,
13050         global_typedefs>: Remove "struct" keyword.
13051         (class typedef_hash_table): New class.
13052         (recursively_update_typedef_hash, add_template_parameters)
13053         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13054         (find_typedef_in_hash): Don't declare.
13055         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13056         (typedef_hash_table::recursively_update): Rename from
13057         recursively_update_typedef_hash.  Now a member.
13058         (typedef_hash_table::add_template_parameters): Rename from
13059         add_template_parameters.  Now a member.
13060         (typedef_hash_table::typedef_hash_table): Now a constructor;
13061         rename from create_typedef_hash.
13062         (typedef_hash_table::~typedef_hash_table): Now a destructor;
13063         rename from free_typedef_hash.
13064         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13065         (do_free_global_table): Remove.
13066         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13067         from copy_type_recursive.
13068         (create_global_typedef_table): Remove.
13069         (typedef_hash_table::find_global_typedef): Now a member of
13070         typedef_hash_table.
13071         (typedef_hash_table::find_typedef): Rename from
13072         find_typedef_in_hash; now a member.
13073         (whatis_exp): Update.
13074         * extension.h (struct ext_lang_type_printers): Add constructor and
13075         destructor.
13076         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13077         declare.
13078         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13079         Now a constructor; rename from start_ext_lang_type_printers.
13080         (ext_lang_type_printers): Now a destructor; rename from
13081         free_ext_lang_type_printers.
13082         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13083         Update.
13084         (c_type_print_base_struct_union): Update.  Remove cleanups.
13085
13086 2018-03-27  Tom Tromey  <tom@tromey.com>
13087
13088         * dwarf-index-write.c: Include <cmath>.
13089
13090 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13091
13092         * NEWS: Add entry describing new "set|show varsize-limit" command.
13093         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13094         command.
13095         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13096         "set variable".
13097
13098 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13099
13100         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13101         dwarf-index-write.c
13102         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13103         * dwarf-index-common.c: New file.
13104         * dwarf-index-common.h: New file.
13105         * dwarf-index-write.c: New file.
13106         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13107         (struct dwarf2_section_info): Move from here.
13108         (dwarf2_section_info_def): Likewise.
13109         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13110         (offset_type): Likewise.
13111         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13112         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13113         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13114         (byte_swap): Likewise.
13115         (MAYBE_SWAP): Likewise.
13116         (dwarf2_per_cu_ptr): Likewise.
13117         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13118         (struct tu_stats): Likewise.
13119         (struct dwarf2_per_objfile): Likewise.
13120         (struct dwarf2_per_cu_data): Likewise.
13121         (struct signatured_type): Likewise.
13122         (sig_type_ptr): Likewise.
13123         (DEF_VEC_P (sig_type_ptr)): Likewise.
13124         (INDEX4_SUFFIX): Likewise.
13125         (INDEX5_SUFFIX): Likewise.
13126         (DEBUG_STR_SUFFIX): Likewise.
13127         (dwarf2_read_section): Make non-static.
13128         (mapped_index_string_hash): Move from here.
13129         (dwarf5_djb_hash): Likewise.
13130         (file_write): Likewise.
13131         (class data_buf): Likewise.
13132         (struct symtab_index_entry): Likewise.
13133         (struct mapped_symtab): Likewise.
13134         (find_slot): Likewise.
13135         (hash_expand): Likewise.
13136         (add_index_entry): Likewise.
13137         (uniquify_cu_indices): Likewise.
13138         (class c_str_view): Likewise.
13139         (class c_str_view_hasher): Likewise.
13140         (class vector_hasher): Likewise.
13141         (write_hash_table): Likewise.
13142         (psym_index_map): Likewise.
13143         (struct addrmap_index_data): Likewise.
13144         (add_address_entry): Likewise.
13145         (add_address_entry_worker): Likewise.
13146         (write_address_map): Likewise.
13147         (symbol_kind): Likewise.
13148         (write_psymbols): Likewise.
13149         (struct signatured_type_index_data): Likewise.
13150         (write_one_signatured_type): Likewise.
13151         (recursively_count_psymbols): Likewise.
13152         (recursively_write_psymbols): Likewise.
13153         (class debug_names): Likewise.
13154         (check_dwarf64_offsets): Likewise.
13155         (psyms_seen_size): Likewise.
13156         (write_gdbindex): Likewise.
13157         (write_debug_names): Likewise.
13158         (assert_file_size): Likewise.
13159         (write_psymtabs_to_index): Likewise.
13160         (save_gdb_index_command): Likewise.
13161         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13162         command.
13163         * dwarf2read.h: New file.
13164
13165 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13166
13167         PR gdb/22670
13168         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13169         symbol name if the CU's language stores symbol names in linkage
13170         format.
13171         * language.h (struct language_defn)
13172         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13173         all instances of this struct.
13174
13175 2018-03-26  Tom Tromey  <tom@tromey.com>
13176
13177         * stack.c (backtrace_command_1): Remove verbose code.
13178
13179 2018-03-26  Tom Tromey  <tom@tromey.com>
13180
13181         * python/py-framefilter.c (py_print_type): Don't catch
13182         exceptions.  Return void.
13183         (py_print_value): Likewise.
13184         (py_print_single_arg): Likewise.
13185         (enumerate_args): Don't catch exceptions.
13186         (py_print_args): Likewise.
13187         (py_print_frame): Likewise.
13188         (gdbpy_apply_frame_filter): Catch exceptions here.
13189
13190 2018-03-26  Tom Tromey  <tom@tromey.com>
13191
13192         * stack.c (_initialize_stack): Remove trailing newlines from help
13193         text.  Add "Usage" line to "backtrace" help.
13194
13195 2018-03-26  Tom Tromey  <tom@tromey.com>
13196
13197         PR python/16486:
13198         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13199
13200 2018-03-26  Tom Tromey  <tom@tromey.com>
13201
13202         * python/py-framefilter.c (py_print_single_arg): Return
13203         EXT_LANG_BT_ERROR from catch.
13204
13205 2018-03-26  Tom Tromey  <tom@tromey.com>
13206
13207         PR backtrace/15584:
13208         * stack.c (backtrace_command_1): Move some code into no-filters
13209         "if".
13210
13211 2018-03-26  Tom Tromey  <tom@tromey.com>
13212
13213         * python/py-framefilter.c (throw_quit_or_print_exception): New
13214         function.
13215         (gdbpy_apply_frame_filter): Use it.
13216
13217 2018-03-26  Tom Tromey  <tom@tromey.com>
13218
13219         PR cli/17716:
13220         * python/py-framefilter.c (py_print_type, py_print_value)
13221         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13222         RETURN_MASK_ERROR.
13223
13224 2018-03-26  Tom Tromey  <tom@tromey.com>
13225
13226         * python/py-framefilter.c (enumerate_args): Use
13227         gdb::unique_xmalloc_ptr.
13228
13229 2018-03-26  Tom Tromey  <tom@tromey.com>
13230
13231         * python/py-framefilter.c (py_print_frame): Return
13232         EXT_LANG_BT_OK.
13233         (gdbpy_apply_frame_filter): Update comment.
13234         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13235         Remove.
13236         <EXT_LANG_BT_NO_FILTERS>: Change value.
13237
13238 2018-03-26  Tom Tromey  <tom@tromey.com>
13239
13240         PR backtrace/15582:
13241         * stack.c (backtrace_command): Parse "hide" argument.
13242         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13243         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13244         constant.
13245
13246 2018-03-26  Tom Tromey  <tom@tromey.com>
13247
13248         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13249         add "flags".
13250         (backtrace_command): Remove "fulltrace", add "flags".
13251
13252 2018-03-26  Tom Tromey  <tom@tromey.com>
13253
13254         * stack.c (backtrace_command): Rewrite command line parsing.
13255
13256 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13257
13258         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13259
13260 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13261
13262         * filename-seen-cache.h: Add include guard.
13263
13264 2018-03-26  Keith Seitz  <keiths@redhat.com>
13265
13266         * symfile.c (place_section): Remove "struct" from section_addr_info
13267         in comment.
13268         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13269         "struct" keyword from section_addr_info.
13270
13271 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13272
13273         * regformats/regdef.h (reg): Add constructors.
13274
13275 2018-03-25  Pedro Alves  <palves@redhat.com>
13276
13277         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13278         if then/else bodies in var_func_name extraction.
13279
13280 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13281
13282         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13283         lookup_minimal_symbol() to find symbol entry.
13284         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13285
13286 2018-03-23  Keith Seitz  <keiths@redhat.com>
13287
13288         PR c++/22968
13289         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13290         nested type definitions for C++, too.
13291
13292 2018-03-23  Tom Tromey  <tom@tromey.com>
13293
13294         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13295         a typedef.
13296         (macho_register_oso): Remove.
13297         (macho_symtab_read): Take a std::vector.
13298         (oso_el_compare_name): Now a std::sort comparator.
13299         (macho_symfile_read_all_oso): Take a std::vector.
13300         (macho_symfile_read): Use std::vector.  Remove cleanups.
13301
13302 2018-03-22  Tom Tromey  <tom@tromey.com>
13303
13304         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13305         (record_full_goto_bookmark): Use std::string.
13306
13307 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13308
13309         PR tdep/18295
13310         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13311         a single mask.
13312
13313 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13314
13315         * rs6000-tdep.c (store_insn_p): New function.
13316         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13317         and cr_reg to their unshifted values. Use store_insn_p to
13318         match LR saves using either R1 or fdata->alloca_reg. Use
13319         store_insn_p to match CR saves. Set alloca_reg_offset
13320         when alloca_reg and framep are set. Remove lr_reg shift
13321         when assigning to fdata->lr_register.
13322
13323 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13324
13325         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13326         command line args instead of emitting a warning.
13327
13328 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13329
13330         * tracepoint.h (struct static_tracepoint_marker): Initialize
13331         fields, define default constructor, move constructor and move
13332         assignment, disable the rest.
13333         <str_id, extra>: Make std::string.
13334         (release_static_tracepoint_marker): Remove.
13335         (free_current_marker): Remove.
13336         * tracepoint.c (free_current_marker): Remove.
13337         (parse_static_tracepoint_marker_definition): Adjust to
13338         std::string, use new hex2str overload.
13339         (release_static_tracepoint_marker): Remove.
13340         (print_one_static_tracepoint_marker): Get marker by reference
13341         and adjust to std::string.
13342         (info_static_tracepoint_markers_command): Adjust to std::vector
13343         changes
13344         * target.h (static_tracepoint_marker_p): Remove typedef.
13345         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13346         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13347         bool.
13348         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13349         * target-debug.h
13350         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13351         (target_debug_print_std_vector_static_tracepoint_marker): New.
13352         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13353         to...
13354         (target_debug_print_static_tracepoint_marker_p): ... this.
13355         * target-delegates.c: Re-generate.
13356         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13357         Make std::string.
13358         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13359         (decode_static_tracepoint_spec): Adjust to std::vector.
13360         (tracepoint_print_one_detail): Adjust to std::string.
13361         (strace_marker_decode_location): Adjust to std::string.
13362         (update_static_tracepoint): Adjust to std::string, remove call
13363         to release_static_tracepoint_marker.
13364         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13365         Adjust to std::vector.
13366         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13367         (remote_static_tracepoint_markers_by_strid): Adjust to
13368         std::vector.
13369         * common/rsp-low.h (hex2str): New overload with explicit count
13370         of bytes.
13371         * common/rsp-low.c (hex2str): New overload with explicit count
13372         of bytes.
13373         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13374         (_initialize_rsp_low_selftests): Add test_hex2str test.
13375         * unittests/tracepoint-selftests.c
13376         (test_parse_static_tracepoint_marker_definition): Adjust to
13377         std::string.
13378
13379 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13380
13381         * tracepoint.c (parse_static_tracepoint_marker_definition):
13382         Consider case where the definition is followed by more
13383         definitions.
13384         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13385         tracepoint-selftests.c.
13386         * unittests/tracepoint-selftests.c: New.
13387
13388 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13389
13390         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13391         Carvalho.
13392
13393 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13394
13395         * symtab.c (find_pc_sect_line): fixed indentation.
13396
13397 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13398
13399         * symtab.c (find_pc_sect_line): now uses binary search.
13400
13401 2018-03-19  Tom Tromey  <tom@tromey.com>
13402
13403         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13404         "IDENT" production.
13405
13406 2018-03-19  Pedro Alves  <palves@redhat.com>
13407             Tom Tromey  <tom@tromey.com>
13408
13409         * unittests/observable-selftests.c: New file.
13410         * common/observable.h: New file.
13411         * observable.h: New file.
13412         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13413         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13414         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13415         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13416         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13417         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13418         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13419         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13420         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13421         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13422         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13423         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13424         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13425         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13426         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13427         tui/tui-interp.c, valops.c: Update all users.
13428         * tui/tui-hooks.c (tui_bp_created_observer)
13429         (tui_bp_deleted_observer, tui_bp_modified_observer)
13430         (tui_inferior_exit_observer, tui_before_prompt_observer)
13431         (tui_normal_stop_observer, tui_register_changed_observer):
13432         Remove.
13433         (tui_observers_token): New global.
13434         (attach_or_detach, tui_attach_detach_observers): New functions.
13435         (tui_install_hooks, tui_remove_hooks): Use
13436         tui_attach_detach_observers.
13437         * record-btrace.c (record_btrace_thread_observer): Remove.
13438         (record_btrace_thread_observer_token): New global.
13439         * observer.sh: Remove.
13440         * observer.c: Rename to observable.c.
13441         * observable.c (namespace gdb_observers): Define new objects.
13442         (observer_debug): Move into gdb_observers namespace.
13443         (struct observer, struct observer_list, xalloc_observer_list_node)
13444         (xfree_observer_list_node, generic_observer_attach)
13445         (generic_observer_detach, generic_observer_notify): Remove.
13446         (_initialize_observer): Update.
13447         Don't include observer.inc.
13448         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13449         (clean mostlyclean): Likewise.
13450         (observer.h, observer.inc): Remove targets.
13451         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13452         (COMMON_SFILES): Use observable.c, not observer.c.
13453         * .gitignore: Remove observer.h.
13454
13455 2018-03-18  Tom Tromey  <tom@tromey.com>
13456
13457         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13458         gdb::def_vector.
13459         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13460
13461 2018-03-17  Tom Tromey  <tom@tromey.com>
13462
13463         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13464
13465 2018-03-17  Tom Tromey  <tom@tromey.com>
13466
13467         * target.c (class scoped_target_fd): New.
13468         (target_fileio_close_cleanup): Remove.
13469         (target_fileio_read_alloc_1): Use scoped_target_fd.
13470
13471 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13472
13473         * silent-rules.mk: New.
13474         * Makefile.in: Include silent-rules.mk
13475         (srcdir, VPATH, top_srcdir): Move up.
13476         (COMPILE): Add ECHO_CXX.
13477         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13478         (init.c): Add ECHO_INIT_C.
13479         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13480         (version.c): Add ECHO_GEN.
13481         (printcmd.o): Add ECHO_CXX.
13482         (target-float.o): Add ECHO_CXX.
13483         (ada-exp.o): Add ECHO_CXX.
13484         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13485         (insight$(EXEEXT)): Add ECHO_CXXLD.
13486         * gnulib/configure.ac: Add AM_SILENT_RULES.
13487         * gnulib/aclocal.m4: Re-generate.
13488         * gnulib/configure: Re-generate.
13489         * gnulib/import/Makefile.in: Re-generate.
13490
13491 2018-03-16  Tom Tromey  <tom@tromey.com>
13492
13493         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13494         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13495         * utils.c (do_free_section_addr_info)
13496         (make_cleanup_free_section_addr_info): Remove.
13497         * symfile.h (struct other_sections): Add constructor.
13498         (struct section_addr_info): Remove.
13499         (section_addr_info): New typedef.
13500         (struct sym_fns) <sym_offsets>: Change type of parameter.
13501         (build_section_addr_info_from_objfile)
13502         (relative_addr_info_to_section_offsets, addr_info_make_relative)
13503         (default_symfile_offsets, symbol_file_add)
13504         (symbol_file_add_from_bfd)
13505         (build_section_addr_info_from_section_table): Update.
13506         (alloc_section_addr_info, free_section_addr_info): Don't declare.
13507         * symfile.c (alloc_section_addr_info): Remove.
13508         (build_section_addr_info_from_section_table): Change return type.
13509         Update.
13510         (build_section_addr_info_from_bfd)
13511         (build_section_addr_info_from_objfile): Likewise.
13512         (free_section_addr_info): Remove.
13513         (relative_addr_info_to_section_offsets): Change type of "addrs".
13514         (addrs_section_compar): Now a std::sort comparator.
13515         (addrs_section_sort): Change return type.
13516         (addr_info_make_relative): Change type of "addrs".  Update.
13517         (default_symfile_offsets, syms_from_objfile_1)
13518         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
13519         (symbol_file_add_separate): Update.
13520         (symbol_file_add): Change type of "addrs".  Update.
13521         (add_symbol_file_command): Update.  Remove cleanups.
13522         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
13523         cleanups.
13524         * symfile-debug.c (debug_sym_offsets): Change type of "info".
13525         * solib.c (solib_read_symbols): Update.
13526         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
13527         * machoread.c (macho_symfile_offsets): Update.
13528         * jit.c (jit_bfd_try_read_symtab): Update.
13529
13530 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
13531
13532         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13533         unittests/utils-selftests.c.
13534         * unittests/utils-selftests.c: New file.
13535
13536 2018-03-14  Tom Tromey  <tom@tromey.com>
13537
13538         PR cli/14977:
13539         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
13540         for NULL.
13541
13542 2018-03-14  Tom Tromey  <tom@tromey.com>
13543
13544         PR cli/19918:
13545         * printcmd.c (printf_pointer): Allow "-" in format.
13546
13547 2018-03-14  Tom Tromey  <tom@tromey.com>
13548
13549         * printcmd.c (_initialize_printcmd): Add usage to printf.
13550
13551 2018-03-14  Yao Qi  <qiyao@sourceware.org>
13552
13553         * MAINTAINERS: Update my email address.
13554
13555 2018-03-13  Tom Tromey  <tom@tromey.com>
13556
13557         * machoread.c (macho_check_dsym): Change filenamep to a
13558         std::string*.
13559         (macho_symfile_read): Update.
13560         * symfile.c (load_command): Use std::string.
13561
13562 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13563
13564         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
13565         to error message string.
13566         (riscv_register_name): Use xsnprintf instead of sprintf.
13567         (riscv_insn::fetch_instruction): Use gdb_assert instead of
13568         internal_error.
13569         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
13570         error.
13571         (riscv_push_dummy_call): Likewise.
13572
13573 2018-03-12  Tom Tromey  <tom@tromey.com>
13574
13575         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
13576         Use gdb::byte_vector.
13577         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
13578
13579 2018-03-12  Yao Qi  <yao.qi@linaro.org>
13580
13581         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
13582         parameter type to readable_regcache.
13583         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
13584         the declaration.
13585
13586 2018-03-11  Tom Tromey  <tom@tromey.com>
13587
13588         * dwarf2read.c (struct nextfield): Add initializers.
13589         (struct nextfnfield): Remove.
13590         (struct fnfieldlist): Add initializers.  Remove "length" and
13591         "head", use std::vector.
13592         (struct decl_field_list): Remove.
13593         (struct field_info): Add initializers.
13594         <fields, baseclasses>: Now std::vector.
13595         <nbaseclasses, nfnfields, typedef_field_list_count,
13596         nested_types_list_count>: Remove.
13597         (dwarf2_add_field, dwarf2_add_type_defn)
13598         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
13599         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
13600         (process_structure_scope): Update.
13601
13602 2018-03-11  Tom Tromey  <tom@tromey.com>
13603
13604         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
13605         for use by std::sort.
13606         (build_type_psymtabs_1): Use std::vector.
13607
13608 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
13609
13610         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
13611         and LIBMPFR in the printed configuration.
13612
13613 2018-03-08  Tom Tromey  <tom@tromey.com>
13614
13615         * source.c (get_filename_and_charpos): Use scoped_fd.
13616         * nto-procfs.c (procfs_open_1): Use scoped_fd.
13617         (procfs_pidlist): Likewise.
13618         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
13619         (iterate_over_mappings): Likewise.
13620
13621 2018-03-08  Tom Tromey  <tom@tromey.com>
13622
13623         * infcall.c (struct call_return_meta_info)
13624         <stack_temporaries_enabled>: Remove.
13625         (get_call_return_value, call_function_by_hand_dummy): Update.
13626         * thread.c (disable_thread_stack_temporaries): Remove.
13627         (enable_thread_stack_temporaries): Remove.
13628         (thread_stack_temporaries_enabled_p): Return bool.
13629         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
13630         (get_last_thread_stack_temporary): Update.
13631         * eval.c (evaluate_subexp): Update.
13632         * gdbthread.h (class enable_thread_stack_temporaries): Now a
13633         class, not a function.
13634         (value_ptr, value_vec): Remove typedefs.
13635         (class thread_info) <stack_temporaries_enabled>: Now bool.
13636         <stack_temporaries>: Now a std::vector.
13637         (thread_stack_temporaries_enabled_p)
13638         (value_in_thread_stack_temporaries): Return bool.
13639
13640 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
13641
13642         * remote.c (putpkt_binary): Fix omitted bytes reporting.
13643         (getpkt_or_notif_sane_1): Likewise.
13644
13645 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13646
13647         * build-id.c (build_id_to_debug_bfd): Use std::string.
13648
13649 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13650
13651         * build-id.c (find_separate_debug_file_by_buildid): Return
13652         std::string.
13653         * build-id.h (find_separate_debug_file_by_buildid): Return
13654         std::string.
13655         * coffread.c (coff_symfile_read): Adjust to std::string.
13656         * elfread.c (elf_symfile_read): Adjust to std::string.
13657         * symfile.c (separate_debug_file_exists): Change parameter to
13658         std::string.
13659         (find_separate_debug_file): Return std::string.
13660         (find_separate_debug_file_by_debuglink): Return std::string.
13661         * symfile.h (find_separate_debug_file_by_debuglink): Return
13662         std::string.
13663
13664 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13665
13666         * common/xml-utils.c (xml_escape_text): Move code to...
13667         (xml_escape_text_append): ... this new function.
13668         * common/xml-utils.h (xml_escape_text_append): New declaration.
13669         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
13670         New function.
13671         (_initialize_xml_utils): register test_xml_escape_text_append as
13672         a selftest.
13673
13674 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
13675
13676         * defs.h: Remove MAX_REGISTER_SIZE.
13677         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
13678         asserts.
13679         * python/py-unwind.c (pyuw_sniffer): Likewise.
13680
13681 2018-03-07  Tom Tromey  <tom@tromey.com>
13682
13683         * linux-tdep.c (linux_info_proc): Update.
13684         * target.h (struct target_ops) <to_fileio_readlink>: Return
13685         optional<string>.
13686         (target_fileio_readlink): Return optional<string>.
13687         * remote.c (remote_hostio_readlink): Return optional<string>.
13688         * inf-child.c (inf_child_fileio_readlink): Return
13689         optional<string>.
13690         * target.c (target_fileio_readlink): Return optional<string>.
13691
13692 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
13693
13694         * regcache.c (cooked_read_test): Add riscv to the list of
13695         architectures that have a save_reggroup.
13696
13697 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13698
13699         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
13700         value is not a dynamic class object.
13701
13702 2018-03-06  Tom Tromey  <tom@tromey.com>
13703
13704         * rust-exp.y: Formatting fixes.
13705
13706 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13707
13708         * riscv-tdep.c (riscv_register_name): Remove target description
13709         support.
13710         (riscv_gdbarch_init): Remove target description check.
13711
13712 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13713
13714         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
13715         comment.
13716         * riscv-tdep.h: Likewise.
13717
13718 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13719
13720         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
13721         (riscv_pseudo_register_write): Delete.
13722         (riscv_gdbarch_init): Remove all use of pseudo registers.
13723
13724 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13725
13726         * record-btrace.c (btrace_print_lines): Replace cleanup
13727         parameter with RAII equivalents.
13728         (btrace_insn_history): Replace cleanup with RAII equivalents.
13729         * ui-out.h (make_cleanup_ui_out_list_begin_end,
13730         make_cleanup_ui_out_tuple_begin_end): Remove.
13731         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
13732         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
13733         make_cleanup_ui_out_list_begin_end): Remove.
13734
13735 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13736
13737         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
13738         parameter types to std::vector.  Use bool.
13739         (record_btrace_wait): Replace VEC(tp_t) with
13740         std::vector<thread_info *>.
13741         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
13742
13743 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13744
13745         * record-btrace.c (record_btrace_disable_callback): Remove.
13746         (struct scoped_btrace_disable): New.
13747         (record_btrace_open): Use scoped_btrace_disable.
13748
13749 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13750
13751         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
13752         reading values from registers.
13753
13754 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13755
13756         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
13757         where appropriate.
13758
13759 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13760
13761         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
13762         change parameter type.  Use GDB's print functions, and use
13763         core_addr_to_string where appropriate.
13764         (riscv_push_dummy_call): Use core_addr_to_string where
13765         appropriate, update call to riscv_print_arg_location, and reindent
13766         a few lines.
13767         (riscv_return_value): Update call to riscv_print_arg_location.
13768
13769 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13770             Tim Newsome <tim@sifive.com>
13771             Albert Ou <a0u@eecs.berkeley.edu>
13772             Darius Rad <darius@bluespec.com>
13773
13774         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
13775         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
13776         (ALLDEPFILES): Add riscv-tdep.c
13777         * configure.tgt: Add riscv support.
13778         * riscv-tdep.c: New file.
13779         * riscv-tdep.h: New file.
13780         * NEWS: Mention new target.
13781         * MAINTAINERS: Add entry for riscv.
13782
13783 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13784
13785         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
13786         fields within aggregates.
13787
13788 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
13789
13790         * record-btrace.c (btrace_print_lines): Change type of flags to
13791         gdb_disassembly_flags.
13792
13793 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13794
13795         * fbsd-nat.c: Include "inf-ptrace.h".
13796         (USE_SIGTRAP_SIGINFO): Conditionally define.
13797         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13798         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13799         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13800         function.
13801         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13802         Likewise.
13803         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13804         Likewise.
13805         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13806         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13807         "supports_stopped_by_hw_breakpoint" target methods.
13808
13809 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13810
13811         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13812         * fbsd-nat.c (debug_fbsd_nat): New variable.
13813         (show_fbsd_nat_debug): New function.
13814         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13815         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13816
13817 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13818
13819         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13820         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13821         prototype.
13822         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13823         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13824         method.
13825
13826 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13827
13828         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13829         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13830
13831 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13832
13833         * charset.c (struct charset_vector): New.
13834         (charsets): Change type to charset_vector.
13835         (find_charset_names): Adjust.
13836         (add_one): Adjust.
13837         (_initialize_charset): Adjust.
13838
13839 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13840
13841         * progspace.h (struct program_space) <deleted_solibs>: Change
13842         type to std::vector<std::string>.
13843         * progspace.c (clear_program_space_solib_cache): Adjust.
13844         * breakpoint.c (print_solib_event): Adjust.
13845         (check_status_catch_solib): Adjust.
13846         * solib.c (update_solib_list): Adjust.
13847         * ui-out.h (class ui_out) <field_string>: New overload.
13848         * ui-out.c (ui_out::field_string): New overload.
13849
13850 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13851
13852         * progspace.h (struct program_space): Add constructor and
13853         destructor, initialize fields.
13854         (add_program_space): Remove.
13855         * progspace.c (add_program_space): Rename to...
13856         (program_space::program_space): ... this.
13857         (release_program_space): Rename to...
13858         (program_space::~program_space): ... this.
13859         (delete_program_space): Use delete to delete program_space.
13860         (initialize_progspace): Use new to allocate program_space.
13861         * inferior.c (add_inferior_with_spaces): Likewise.
13862         (clone_inferior_command): Likewise.
13863         * infrun.c (follow_fork_inferior): Likewise.
13864         (handle_vfork_child_exec_or_exit): Likewise.
13865
13866 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13867
13868         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13869         (delim_string_to_char_ptr_vec): Return std::vector of
13870         gdb::unique_xmalloc_ptr.
13871         (dirnames_to_char_ptr_vec_append): Take std::vector of
13872         gdb::unique_xmalloc_ptr.
13873         (dirnames_to_char_ptr_vec): Return std::vector of
13874         gdb::unique_xmalloc_ptr.
13875         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13876         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13877         (delim_string_to_char_ptr_vec): Return an std::vector of
13878         gdb::unique_xmalloc_ptr, adjust the code.
13879         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13880         gdb::unique_xmalloc_ptr, adjust the code.
13881         (dirnames_to_char_ptr_vec): Return an std::vector of
13882         gdb::unique_xmalloc_ptr, adjust the code.
13883         * auto-load.c (auto_load_safe_path_vec): Change type to
13884         std::vector of gdb::unique_xmalloc_ptr.
13885         (auto_load_expand_dir_vars): Return an std::vector of
13886         gdb::unique_xmalloc_ptr, adjust the code.
13887         (auto_load_safe_path_vec_update): Adjust.
13888         (filename_is_in_auto_load_safe_path_vec): Adjust.
13889         (auto_load_objfile_script_1): Adjust.
13890         * build-id.c (build_id_to_debug_bfd): Adjust.
13891         * linux-thread-db.c (thread_db_load_search): Adjust.
13892         * source.c (add_path): Adjust.
13893         (openp): Adjust.
13894         * symfile.c (find_separate_debug_file): Adjust.
13895         * utils.c (do_free_char_ptr_vec): Remove.
13896         (make_cleanup_free_char_ptr_vec): Remove.
13897
13898 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13899
13900         PR gdb/22907
13901         * common/pathstuff.c: Conditionally include "<windows.h>".
13902
13903 2018-03-01  Georg Sauthoff  <mail@georg.so>
13904
13905         PR gdb/22888
13906         * gcore.in: Quote variables and switch interpreter to bash.
13907
13908 2018-03-01  Tom Tromey  <tom@tromey.com>
13909
13910         * dwarf2read.c (alloc_discriminant_info): Fix default_index
13911         assertion.  Add assertion for discriminant_index.
13912         (quirk_rust_enum): Use correct base type name in univariant case.
13913
13914 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13915
13916         * record.c (get_call_history_modifiers): Return a
13917         record_print_flags.
13918         (cmd_record_call_history): Adjust.
13919         * record-btrace.c (record_btrace_call_history): Adjust.
13920         (record_btrace_call_history_range): Adjust.
13921         (record_btrace_call_history_from): Adjust.
13922         * target-debug.h (target_debug_print_record_print_flags): New.
13923         * target-delegates.c: Re-generate.
13924         * target.c (target_call_history): Change flags type.
13925         (target_call_history_from): Likewise.
13926         (target_call_history_range): Likewise.
13927         * target.h (struct target_ops) <target_call_history>: Likewise.
13928         (target_call_history_from): Likewise.
13929         (target_call_history_range): Likewise.
13930
13931 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13932             Simon Marchi  <simon.marchi@polymtl.ca>
13933
13934         * common/common-utils.c: Include "sys/stat.h".
13935         (is_regular_file): Move here from "source.c"; change return
13936         type to "bool".
13937         * common/common-utils.h (is_regular_file): New prototype.
13938         * common/pathstuff.c (contains_dir_separator): New function.
13939         * common/pathstuff.h (contains_dir_separator): New prototype.
13940         * source.c: Don't include "sys/stat.h".
13941         (is_regular_file): Move to "common/common-utils.c".
13942
13943 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13944
13945         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13946         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13947         * auto-load.c: Include "common/pathstuff.h".
13948         * common/common-def.h (current_directory): Move here.
13949         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13950         function.
13951         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13952         prototype.
13953         * common/pathstuff.c: New file.
13954         * common/pathstuff.h: New file.
13955         * compile/compile.c: Include "common/pathstuff.h".
13956         * defs.h (current_directory): Move to "common/common-defs.h".
13957         * dwarf2read.c: Include "common/pathstuff.h".
13958         * exec.c: Likewise.
13959         * guile/scm-safe-call.c: Likewise.
13960         * linux-thread-db.c: Likewise.
13961         * main.c: Likewise.
13962         * nto-tdep.c: Likewise.
13963         * objfiles.c: Likewise.
13964         * source.c: Likewise.
13965         * symtab.c: Likewise.
13966         * utils.c: Include "common/pathstuff.h".
13967         (gdb_realpath): Move to "common/pathstuff.c".
13968         (gdb_realpath_keepfile): Likewise.
13969         (gdb_abspath): Likewise.
13970         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13971         (gdb_realpath_keepfile): Likewise.
13972         (gdb_abspath): Likewise.
13973
13974 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13975
13976         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13977         wildcard process pid for super_resume for kernels with a
13978         specific bug.
13979
13980 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13981
13982         * compile/compile.c (get_args): Add additional comments
13983         explaining function.
13984
13985 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13986             Tom Tromey  <tom@tromey.com>
13987
13988         * target.h (memory_write_request_s): Remove typedef.  Don't define
13989         VEC.
13990         (target_write_memory_blocks): Change argument to std::vector.
13991         (struct memory_write_request): Add constructor.
13992         * target-memory.c (compare_block_starting_address): Return bool.
13993         Change argument types.
13994         (claim_memory): Change arguments to use std::vector.
13995         (split_regular_and_flash_blocks, blocks_to_erase)
13996         (compute_garbled_blocks): Likewise.
13997         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13998         (target_write_memory_blocks): Change argument to std::vector.
13999         * symfile.c (struct load_section_data): Add constructor and
14000         destructor.  Use std::vector for "requests".
14001         (struct load_progress_data): Add initializers.
14002         (load_section_callback): Update.  Use "new".
14003         (clear_memory_write_data): Remove.
14004         (generic_load): Update.
14005
14006 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
14007
14008         * arch/aarch64.h: Use common/tdesc.h.
14009
14010 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14011
14012         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14013         architecture with a 64-bit ABI.
14014
14015 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14016
14017         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14018         ahead of target description loading.
14019
14020 2018-02-26  Tom Tromey  <tom@tromey.com>
14021
14022         * stack.c (backtrace_command_1): Update.
14023         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14024         of "flags".
14025         * python/py-framefilter.c (py_print_frame)
14026         (gdbpy_apply_frame_filter): Change type of "flags".
14027         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14028         of "flags".
14029         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14030         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14031         * extension.h (enum frame_filter_flag): Rename from
14032         frame_filter_flags.
14033         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14034         (apply_ext_lang_frame_filter): Change type of "flags".
14035         * extension.c (apply_ext_lang_frame_filter): Change type of
14036         "flags".
14037         * extension-priv.h (struct extension_language_ops)
14038         <apply_frame_filter>: Change type of "flags".
14039
14040 2018-02-26  Tom Tromey  <tom@tromey.com>
14041
14042         PR python/16497:
14043         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
14044         off-by-one in py_end computation.
14045         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14046         PRINT_MORE_FRAMES.
14047         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14048         constant.
14049
14050 2018-02-26  Tom Tromey  <tom@tromey.com>
14051
14052         * dwarf2read.c (struct variant_field): New.
14053         (struct nextfield) <variant>: New field.
14054         (dwarf2_add_field): Handle DW_TAG_variant_part.
14055         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14056         discriminated union.
14057         (read_structure_type): Handle DW_TAG_variant_part.
14058         (handle_struct_member_die): New function, extracted from
14059         process_structure_scope.  Handle DW_TAG_variant.
14060         (process_structure_scope): Handle discriminated unions.  Call
14061         handle_struct_member_die.
14062
14063 2018-02-26  Tom Tromey  <tom@tromey.com>
14064
14065         * rust-lang.h (rust_last_path_segment): Declare.
14066         * rust-lang.c (rust_last_path_segment): Now public.  Change
14067         contract.
14068         (struct disr_info): Remove.
14069         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14070         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14071         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14072         (rust_enum_p, rust_enum_variant): New function.
14073         (rust_underscore_fields): Remove "offset" parameter.
14074         (rust_print_enum): New function.
14075         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14076         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14077         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14078         enums.
14079         (rust_internal_print_type): New function, from rust_print_type.
14080         Remove enum code.
14081         (rust_print_type): Call rust_internal_print_type.
14082         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14083         Update enum handling.
14084         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14085         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14086         (rust_union_quirks): New functions.
14087         (process_full_comp_unit, process_full_type_unit): Call
14088         rust_union_quirks.
14089         (process_structure_scope): Update rust_unions if necessary.
14090
14091 2018-02-26  Tom Tromey  <tom@tromey.com>
14092
14093         * value.h (value_union_variant): Declare.
14094         * valops.c (value_union_variant): New function.
14095         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14096         (struct discriminant_info): New.
14097         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14098         enumerator.
14099         (struct main_type) <flag_discriminated_union>: New field.
14100
14101 2018-02-26  Tom Tromey  <tom@tromey.com>
14102
14103         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14104         unittests/unpack-selftests.c.
14105         * unittests/unpack-selftests.c: New file.
14106         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14107
14108 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14109
14110         * dwarf2read.c (struct partial_die_info) <read>: New method.
14111         (read_partial_die): Remove the declaration.
14112         (load_partial_dies): Update.
14113         (partial_die_info::partial_die_info):
14114         (read_partial_die): Change it to partial_die_info::read.
14115
14116 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14117
14118         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14119         (fixup_partial_die): Remove declaration.
14120         (scan_partial_symbols): Update.
14121         (partial_die_parent_scope): Likewise.
14122         (partial_die_full_name): Likewise.
14123         (fixup_partial_die): Change it to partial_die_info::fixup.
14124
14125 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14126
14127         * dwarf2read.c (read_partial_die): Update the declaration.
14128         (load_partial_dies): Caller update.
14129         (read_partial_die): Remove one argument abbrev_len.
14130
14131 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14132
14133         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14134         assignment operator.
14135         (load_partial_dies): Use ctor and copy ctor.
14136         (read_partial_die): Update.
14137         (dwarf2_cu::find_partial_die): Use ctor.
14138
14139 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14140
14141         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14142         (find_partial_die_in_comp_unit): Change it to
14143         dwarf2_cu::find_partial_die.
14144         (find_partial_die): Update.
14145
14146 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14147
14148         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14149         is NULL.
14150
14151 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14152
14153         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14154
14155 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14156
14157         * arch/amd64.h: Use common/tdesc.h.
14158         * arch/i386.c: Likewise.
14159         * arch/i386.h: Likewise.
14160         * arch/tic6x.c: Likewise.
14161         * arch/tdesc.h: Move file from here...
14162         * common/tdesc.h: ...to here.
14163         * features/aarch64-core.c: Regenerate.
14164         * features/aarch64-fpu.c: Regenerate.
14165         * features/i386/32bit-avx.c: Regenerate.
14166         * features/i386/32bit-avx512.c: Regenerate.
14167         * features/i386/32bit-core.c: Regenerate.
14168         * features/i386/32bit-linux.c: Regenerate.
14169         * features/i386/32bit-mpx.c: Regenerate.
14170         * features/i386/32bit-pkeys.c: Regenerate.
14171         * features/i386/32bit-sse.c: Regenerate.
14172         * features/i386/64bit-avx.c: Regenerate.
14173         * features/i386/64bit-avx512.c: Regenerate.
14174         * features/i386/64bit-core.c: Regenerate.
14175         * features/i386/64bit-linux.c: Regenerate.
14176         * features/i386/64bit-mpx.c: Regenerate.
14177         * features/i386/64bit-pkeys.c: Regenerate.
14178         * features/i386/64bit-segments.c: Regenerate.
14179         * features/i386/64bit-sse.c: Regenerate.
14180         * features/i386/x32-core.c: Regenerate.
14181         * features/tic6x-c6xp.c: Regenerate.
14182         * features/tic6x-core.c: Regenerate.
14183         * features/tic6x-gp.c: Regenerate.
14184         * target-descriptions.c: Use common/tdesc.h.
14185         * target-descriptions.h: Likewise.
14186
14187 2018-02-24  Tom Tromey  <tom@tromey.com>
14188
14189         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14190         (try_thread_db_load_from_dir, thread_db_load_search): Use
14191         std::string.
14192         (info_auto_load_libthread_db_compare): Return bool.  Change
14193         argument types.
14194         (info_auto_load_libthread_db): Use std::vector, std::string.
14195         Remove cleanups.
14196
14197 2018-02-24  Tom Tromey  <tom@tromey.com>
14198
14199         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14200         std::string.
14201         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14202         std::string*.
14203         * gdbarch.c: Rebuild.
14204         * gdbarch.h: Rebuild.
14205         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14206         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14207         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14208         std::string*.
14209
14210 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14211
14212         * gdbtypes.h (sect_offset): Change type to uint64_t.
14213         (sect_offset_str): New function.
14214         * dwarf2read.c (create_addrmap_from_aranges): Use
14215         sect_offset_str.
14216         (error_check_comp_unit_head): Likewise.
14217         (create_debug_type_hash_table): Likewise.
14218         (read_cutu_die_from_dwo): Likewise.
14219         (init_cutu_and_read_dies): Likewise.
14220         (init_cutu_and_read_dies_no_follow): Likewise.
14221         (process_psymtab_comp_unit_reader): Likewise.
14222         (partial_die_parent_scope): Likewise.
14223         (peek_die_abbrev): Likewise.
14224         (process_queue): Likewise.
14225         (dwarf2_physname): Likewise.
14226         (read_namespace_alias): Likewise.
14227         (read_import_statement): Likewise.
14228         (create_dwo_cu_reader): Likewise.
14229         (create_cus_hash_table): Likewise.
14230         (lookup_dwo_cutu): Likewise.
14231         (inherit_abstract_dies): Likewise.
14232         (read_func_scope): Likewise.
14233         (read_call_site_scope): Likewise.
14234         (dwarf2_add_member_fn): Likewise.
14235         (read_common_block): Likewise.
14236         (read_module_type): Likewise.
14237         (read_typedef): Likewise.
14238         (read_subrange_type): Likewise.
14239         (load_partial_dies): Likewise.
14240         (read_partial_die): Likewise.
14241         (find_partial_die): Likewise.
14242         (read_str_index): Likewise.
14243         (dwarf2_string_attr): Likewise.
14244         (build_error_marker_type): Likewise.
14245         (lookup_die_type): Likewise.
14246         (dump_die_shallow): Likewise.
14247         (follow_die_ref): Likewise.
14248         (dwarf2_fetch_die_loc_sect_off): Likewise.
14249         (dwarf2_fetch_constant_bytes): Likewise.
14250         (follow_die_sig): Likewise.
14251         (get_signatured_type): Likewise.
14252         (get_DW_AT_signature_type): Likewise.
14253         (dwarf2_find_containing_comp_unit): Likewise.
14254         (set_die_type): Likewise.
14255
14256 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14257
14258         * arch/aarch64.c: Include "common-defs.h".
14259         * arch/amd64.c: Likewise.
14260         * arch/i386.c: Likewise.
14261
14262 2018-02-21  Tom Tromey  <tom@tromey.com>
14263
14264         * value.h: (extract_field_op): Update.
14265         * eval.c (extract_field_op): Return a const char *.
14266         * expression.h (parse_expression_for_completion): Update.
14267         * completer.c (complete_expression): Update.
14268         (add_struct_fields): Make fieldname const.
14269         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14270         (mark_completion_tag, parse_exp_in_context_1): Update.
14271         (parse_expression_for_completion): Change "name" to
14272         unique_xmalloc_ptr*.
14273
14274 2018-02-21  Tom Tromey  <tom@tromey.com>
14275
14276         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14277
14278 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14279
14280         * avr-tdep.c (avr_read_pc): Change parameter type to
14281         readable_regcache.
14282         * gdbarch.sh (read_pc): Likewise.
14283         * gdbarch.c: Re-generated.
14284         * gdbarch.h: Re-generated.
14285         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14286         readable_regcache.
14287         * ia64-tdep.c (ia64_read_pc): Likewise.
14288         * mips-tdep.c (mips_read_pc): Likewise.
14289         * spu-tdep.c (spu_read_pc): Likewise.
14290
14291 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14292
14293         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14294         * regcache-dump.c: New file.
14295         * regcache.c: Move register_dump to regcache-dump.c.
14296         (maintenance_print_registers): Likewise.
14297         (maintenance_print_raw_registers): Likewise.
14298         (maintenance_print_cooked_registers): Likewise.
14299         (maintenance_print_register_groups): Likewise.
14300         (maintenance_print_remote_registers): Likewise.
14301         (_initialize_regcache): Likewise.
14302         * regcache.h (register_dump): Moved from regcache.c.
14303
14304 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14305
14306         * regcache.c (regcache::regcache): Update.
14307         (regcache::invalidate): Move it to detached_regcache::invalidate.
14308         (get_thread_arch_aspace_regcache): Update.
14309         (regcache::raw_update): Update.
14310         (regcache::cooked_read): Remove some code.
14311         (regcache::cooked_read_value): Likewise.
14312         (regcache::raw_write): Remove assert on m_readonly_p.
14313         (regcache::raw_supply_integer): Move it to
14314         detached_regcache::raw_supply_integer.
14315         (regcache::raw_supply_zeroed): Likewise.
14316         * regcache.h (detached_regcache) <raw_supply_integer>: New
14317         declaration.
14318         <raw_supply_zeroed, invalidate>: Likewise.
14319         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14320         <invalidate>: Likewise.
14321         <m_readonly_p>: Removed.
14322
14323 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14324
14325         * infcmd.c (get_return_value): Let stop_regs point to
14326         get_current_regcache.
14327         * regcache.c (regcache::regcache): Remove.
14328         (register_dump_reg_buffer): New class.
14329         (regcache_print): Adjust.
14330         * regcache.h (regcache): Remove constructors.
14331
14332 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14333
14334         * regcache.c (class register_dump): New class.
14335         (register_dump_regcache, register_dump_none): New class.
14336         (register_dump_remote, register_dump_groups): New class.
14337         (regcache_print): Update.
14338         * regcache.h (regcache_dump_what): Move it to regcache.c.
14339         (regcache) <dump>: Remove.
14340
14341 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14342
14343         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14344          reg_buffer_rw *.
14345         (jit_unwind_reg_set_impl): Call raw_supply.
14346         (jit_frame_sniffer): Use reg_buffer_rw.
14347         * record-full.c (record_full_core_regbuf): Change its type.
14348         (record_full_core_open_1): Use reg_buffer_rw.
14349         (record_full_close): Likewise.
14350         (record_full_core_fetch_registers): Use regcache->raw_supply.
14351         (record_full_core_store_registers): Likewise.
14352         * regcache.c (regcache::get_register_status): Move it to
14353         reg_buffer.
14354         (regcache_raw_set_cached_value): Remove.
14355         (regcache::raw_set_cached_value): Remove.
14356         (regcache::raw_write): Call raw_supply.
14357         (regcache::raw_supply): Move it to reg_buffer_rw.
14358         * regcache.h (regcache_raw_set_cached_value): Remove.
14359         (reg_buffer_rw): New class.
14360
14361 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14362
14363         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14364         readonly_detached_regcache.
14365         (dummy_frame_prev_register): Use regcache->cooked_read.
14366         * frame.c (frame_save_as_regcache): Change return type.
14367         (frame_pop): Update.
14368         * frame.h (frame_save_as_regcache): Update declaration.
14369         * inferior.h (get_infcall_suspend_state_regcache): Update
14370         declaration.
14371         * infrun.c (infcall_suspend_state) <registers>: use
14372         readonly_detached_regcache.
14373         (save_infcall_suspend_state): Don't use regcache_dup.
14374         (get_infcall_suspend_state_regcache): Change return type.
14375         * linux-fork.c (struct fork_info) <savedregs>: Change to
14376         readonly_detached_regcache.
14377         <pc>: New field.
14378         (fork_save_infrun_state): Don't use regcache_dup.
14379         (info_checkpoints_command): Adjust.
14380         * mi/mi-main.c (register_changed_p): Update declaration.
14381         (mi_cmd_data_list_changed_registers): Use
14382         readonly_detached_regcache.
14383         (register_changed_p): Change parameter type to
14384         readonly_detached_regcache.
14385         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14386         readonly_detached_regcache.
14387         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14388         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14389         New.
14390         (regcache::save): Move it to reg_buffer.
14391         (regcache::restore): Change parameter type.
14392         (regcache_dup): Remove.
14393         * regcache.h (reg_buffer) <save>: New method.
14394         (readonly_detached_regcache): New class.
14395         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14396         readonly_detached_regcache.
14397         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14398
14399 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14400
14401         * frame.c (frame_save_as_regcache): Use regcache method save.
14402         (frame_pop): Use regcache method restore.
14403         * infrun.c (restore_infcall_suspend_state): Likewise.
14404         * linux-fork.c (fork_load_infrun_state): Likewise.
14405         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14406         save.
14407         * regcache.c (regcache_save): Remove.
14408         (regcache::restore): More asserts.
14409         (regcache_cpy): Remove.
14410         * regcache.h (regcache_save): Remove the declaration.
14411         (regcache::restore): Move from private to public.
14412         Remove the friend declaration of regcache_cpy.
14413         (regcache_cpy): Remove declaration.
14414
14415 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14416
14417         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14418         parameter type to 'readable_regcache *'.
14419         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14420         * arm-tdep.c (arm_neon_quad_read): Likewise.
14421         (arm_pseudo_read): Likewise.
14422         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14423         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14424         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14425         * gdbarch.c: Re-generated.
14426         * gdbarch.h: Re-generated.
14427         * gdbarch.sh (pseudo_register_read): Change parameter type to
14428         'readable_regcache *'.
14429         (pseudo_register_read_value): Likewise.
14430         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14431         (h8300_pseudo_register_read): Likewise.
14432         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14433         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14434         (i386_pseudo_register_read_into_value): Likewise.
14435         (i386_pseudo_register_read_value): Likewise.
14436         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14437         declaration.
14438         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14439         * m32c-tdep.c (m32c_raw_read): Likewise.
14440         (m32c_read_flg): Likewise.
14441         (m32c_banked_register): Likewise.
14442         (m32c_banked_read): Likewise.
14443         (m32c_sb_read): Likewise.
14444         (m32c_part_read): Likewise.
14445         (m32c_cat_read): Likewise.
14446         (m32c_r3r2r1r0_read): Likewise.
14447         (m32c_pseudo_register_read): Likewise.
14448         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14449         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14450         (mep_pseudo_cr64_read): Likewise.
14451         (mep_pseudo_register_read): Likewise.
14452         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14453         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14454         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14455         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14456         (regcache::cooked_read): Likewise.
14457         (regcache::cooked_read_value): Likewise.
14458         (regcache_cooked_read_signed):
14459         (regcache::cooked_read): Likewise.
14460         * regcache.h (readable_regcache): New class.
14461         (regcache): Inherit readable_regcache.  Move some methods to
14462         readable_regcache.
14463         * rl78-tdep.c (rl78_pseudo_register_read): Change
14464         parameter type to 'readable_regcache *'.
14465         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14466         (e500_pseudo_register_read): Change parameter type to
14467         'readable_regcache *'.
14468         (dfp_pseudo_register_read): Likewise.
14469         (vsx_pseudo_register_read): Likewise.
14470         (efpr_pseudo_register_read): Likewise.
14471         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14472         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14473         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14474         (sh64_pseudo_register_read): Likewise.
14475         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14476         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14477         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14478         (spu_pseudo_register_read): Likewise.
14479         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14480         (xtensa_pseudo_register_read): Likewise.
14481
14482 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14483
14484         * regcache.c (regcache::regcache): Call reg_buffer ctor.
14485         (regcache::arch): Move it to reg_buffer::arch.
14486         (regcache::register_buffer): Likewise.
14487         (regcache::assert_regnum): Likewise.
14488         (regcache::num_raw_registers): Likewise.
14489         * regcache.h (reg_buffer): New class.
14490         (regcache): Inherit reg_buffer.
14491
14492 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
14493
14494         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14495         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14496
14497 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
14498
14499         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14500
14501 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
14502
14503         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14504         (SFILES): Remove common/*.c files.
14505         (COMMON_OBS): Remove some *.o files built from common/*.c files.
14506         * common/common.host: Add common reference.
14507         * configure.ac: Likewise.
14508         * configure: Regenerate.
14509
14510 2018-02-16  Yao Qi  <yao.qi@linaro.org>
14511
14512         * block.c (block_namespace_info): Inherit allocate_on_obstack.
14513         (block_initialize_namespace): Use new.
14514         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
14515         (dwarf2_free_objfile): Use delete.
14516         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
14517         (copy_type_recursive): Use new.
14518         * gdb_obstack.h (allocate_on_obstack): New.
14519
14520 2018-02-15  Yao Qi  <yao.qi@linaro.org>
14521
14522         PR gdb/22849
14523         * inferior.c (exit_inferior_1): Reset inf->control.
14524
14525 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
14526
14527         * ada-lang.c (ada_to_fixed_value_create): Delete advance
14528         declaration.
14529
14530 2018-02-14  Pedro Alves  <palves@redhat.com>
14531
14532         * frame-unwind.c (frame_unwind_try_unwinder): Always call
14533         frame_cleanup_after_sniffer on exception.
14534
14535 2018-02-14  Tom Tromey  <tom@tromey.com>
14536
14537         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
14538         const.
14539         (solib_bfd_open): Make pathname const.
14540         * solib.c (solib_bfd_open): Make pathname const.
14541         * solib-spu.c (spu_bfd_fopen): Make name const.
14542         (spu_bfd_open): Make pathname const.
14543         * solib-darwin.c (darwin_bfd_open): Make pathname const.
14544         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
14545
14546 2018-02-14  Tom Tromey  <tom@tromey.com>
14547
14548         * symfile.c (symfile_bfd_open): Update.
14549         * source.h (openp, source_full_path_of, find_and_open_source):
14550         Change argument type to unique_xmalloc_ptr.
14551         * source.c (openp): Take a unique_xmalloc_ptr.
14552         (source_full_path_of, find_and_open_source): Likewise.
14553         (open_source_file, symtab_to_fullname): Update.
14554         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
14555         unique_xmalloc_ptr.
14556         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
14557         (exec_file_find): Update.
14558         * psymtab.c (psymtab_to_fullname): Update.
14559         * nto-tdep.h (nto_find_and_open_solib): Update.
14560         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
14561         unique_xmalloc_ptr.
14562         * exec.c (exec_file_attach): Update.
14563         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
14564         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
14565
14566 2018-02-14  Tom Tromey  <tom@tromey.com>
14567
14568         * solib.c: Include source.h.
14569         * nto-tdep.c: Include source.h.
14570         * mi/mi-cmd-env.c: Include source.h.
14571         * infcmd.c: Include source.h.
14572         * exec.c: Include source.h.
14573         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
14574         (add_path, directory_switch, source_path, init_source_path): Move
14575         declarations...
14576         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
14577         (add_path, directory_switch, source_path, init_source_path):
14578         ...here.
14579
14580 2018-02-14  Tom Tromey  <tom@tromey.com>
14581
14582         * solist.h (exec_file_find, solib_find): Return
14583         unique_xmalloc_ptr.
14584         (solib_bfd_fopen): Take a const char *.
14585         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
14586         (exec_file_find, solib_find): Likewise.
14587         (solib_bfd_fopen): Do not take ownership of "pathname".
14588         (solib_bfd_open): Use unique_xmalloc_ptr.
14589         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
14590         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
14591         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
14592         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
14593
14594 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
14595
14596         * ada-lang.c (name_match_type_from_name): Remove reference to
14597         ada_name_for_lookup in function's documentation.
14598         * ada-lang.h (ada_name_for_lookup): Delete declaration.
14599
14600 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14601
14602         * defs.h (enum openp_flags): New enum.
14603         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
14604         Move to enum openp_flags.
14605         (openp_flags): New enum flags.
14606         (openp): Change parameter type to openp_flags.
14607         * source.c (openp): Change parameter type to openp_flags.
14608         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
14609         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
14610
14611 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14612
14613         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
14614         per-command.
14615
14616 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14617
14618         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
14619         into...
14620         (class dwarf2_queue_guard): ...the destructor of this new class.
14621         (dw2_do_instantiate_symtab): Create instance of the new class
14622         dwarf2_queue_guard, remove cleanup.
14623
14624 2018-02-09  Tom Tromey  <tom@tromey.com>
14625
14626         * source.c (find_source_lines): Don't reference past the end of
14627         the vector.
14628
14629 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14630
14631         * remote.c (remote_btrace_maybe_reopen): Change error message.
14632         * btrace.c (btrace_enable): Likewise.
14633         (parse_xml_btrace): Likewise.
14634         (parse_xml_btrace_conf): Likewise.
14635
14636 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14637
14638         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
14639         (linux_enable_pt, linux_enable_bts): Call
14640         diagnose_perf_event_open_fail.
14641
14642 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14643
14644         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
14645         Remove parameter and change return type.  Update callers.  Move it.
14646         (linux_enable_bts, linux_enable_pt): Improve error message.
14647         (linux_enable_pt): Remove zero buffer size check.
14648         (linux_enable_btrace): Improve error messages.  Remove NULL return
14649         check.
14650
14651 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14652
14653         * btrace.c (btrace_enable): Remove target_supports_btrace call.
14654         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
14655         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
14656         (linux_supports_pt, linux_supports_btrace): Remove.
14657         (linux_enable_bts): Call cpu_supports_bts.
14658         * nat/linux-btrace.h (linux_supports_btrace): Remove.
14659         * remote.c (remote_supports_btrace): Remove.
14660         (init_remote_ops): Remove remote_supports_btrace.
14661         * target-delegates.c: Regenerated.
14662         * target.c (target_supports_btrace): Remove.
14663         * target.h (target_ops) <to_supports_btrace>: Remove
14664         (target_supports_btrace): Remove.
14665         * x86-linux-nat.c (x86_linux_create_target): Remove
14666         linux_supports_btrace.
14667
14668 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14669
14670         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
14671         btrace failed.
14672         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
14673         exception and use message in own exception.
14674
14675 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14676
14677         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
14678         (perf_event_pt_event_type): Use gdb_file_up.
14679         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
14680         scoped_fd, and scoped_mmap.
14681
14682 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14683
14684         * common/scoped_mmap.h: New.
14685         * unittests/scoped_mmap-selftest.c: New.
14686         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14687         unittests/scoped_mmap-selftest.c.
14688
14689 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14690
14691         * common/scoped_fd.h: New.
14692         * unittests/scoped_fd-selftest.c: New.
14693         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14694         unittests/scoped_fd-selftest.c.
14695
14696 2018-02-09  Tom Tromey  <tom@tromey.com>
14697
14698         * auto-load.c (auto_load_section_scripts): Use
14699         gdb::unique_xmalloc_ptr.
14700
14701 2018-02-09  Tom Tromey  <tom@tromey.com>
14702
14703         * auto-load.c (execute_script_contents): Use std::string.
14704
14705 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
14706
14707         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
14708         Python function, rather than a new command.
14709
14710 2018-02-08  Tom Tromey  <tom@tromey.com>
14711
14712         * solib.c (solib_find_1): Use std::string.
14713         (solib_bfd_fopen): Use unique_xmalloc_ptr.
14714
14715 2018-02-08  Tom Tromey  <tom@tromey.com>
14716
14717         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
14718
14719 2018-02-08  Tom Tromey  <tom@tromey.com>
14720
14721         * source.c (find_source_lines): Use gdb::def_vector.
14722
14723 2018-02-08  Tom Tromey  <tom@tromey.com>
14724
14725         * macrocmd.c (struct temporary_macro_definition): New.
14726         (macro_define_command): Use temporary_macro_definition.  Remove
14727         cleanups.
14728         (free_macro_definition_ptr): Remove.
14729
14730 2018-02-08  Tom Tromey  <tom@tromey.com>
14731
14732         * macroexp.c (maybe_expand): Use std::string.
14733
14734 2018-02-08  Tom Tromey  <tom@tromey.com>
14735
14736         * macroexp.c (struct macro_buffer): Add initializers for some
14737         members.
14738         (init_buffer, init_shared_buffer, free_buffer)
14739         (free_buffer_return_text): Remove.
14740         (macro_buffer): New constructors.
14741         (~macro_buffer): New destructor.
14742         (macro_buffer::set_shared): New method.
14743         (macro_buffer::resize_buffer, macro_buffer::appendc)
14744         (macro_buffer::appendmem): Now methods, not free functions.
14745         (set_token, append_tokens_without_splicing, stringify)
14746         (macro_stringify): Update.
14747         (gather_arguments): Change return type.  Remove argc_p argument,
14748         add args_ptr argument.  Use std::vector.
14749         (substitute_args): Remove argc argument.  Accept std::vector.
14750         (expand): Update.  Use std::vector.
14751         (scan, macro_expand, macro_expand_next): Update.
14752
14753 2018-02-08  Tom Tromey  <tom@tromey.com>
14754
14755         * symtab.c (default_collect_symbol_completion_matches_break_on):
14756         Use unique_xmalloc_ptr.
14757         * macroscope.h: (sal_macro_scope, user_macro_scope)
14758         (default_macro_scope): Return unique_xmalloc_ptr.
14759         * macroscope.c (sal_macro_scope, user_macro_scope)
14760         (default_macro_scope): Return unique_xmalloc_ptr.
14761         * macroexp.h (macro_expand, macro_expand_once): Return
14762         unique_xmalloc_ptr.
14763         * macroexp.c (macro_expand, macro_expand_once): Return
14764         unique_xmalloc_ptr.
14765         * macrocmd.c (macro_expand_command, macro_expand_once_command)
14766         (info_macro_command, info_macros_command): Use
14767         unique_xmalloc_ptr.
14768         * compile/compile-c-support.c (write_macro_definitions): Use
14769         unique_xmalloc_ptr.
14770         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
14771
14772 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
14773
14774         * value.c (value_static_field): Assign field type instead of
14775         containing type when returning an optimized out value.
14776
14777 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14778
14779         * ft32-tdep.c (ft32_read_pc): Remove.
14780         (ft32_write_pc): Remove.
14781         (ft32_gdbarch_init): Update.
14782         * m32r-tdep.c (m32r_read_pc): Remove.
14783         (m32r_gdbarch_init): Update.
14784         * mep-tdep.c (mep_read_pc): Remove.
14785         (mep_gdbarch_init): Update.
14786         * microblaze-tdep.c (microblaze_write_pc): Remove.
14787         (microblaze_gdbarch_init): Update.
14788         * mn10300-tdep.c (mn10300_read_pc): Remove.
14789         (mn10300_write_pc): Remove.
14790         (mn10300_gdbarch_init): Update.
14791         * moxie-tdep.c (moxie_read_pc): Remove.
14792         (moxie_write_pc): Remove.
14793         (moxie_gdbarch_init): Update.
14794
14795 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14796
14797         * expprint.c (print_subexp_standard): Handle
14798         OP_F77_UNDETERMINED_ARGLIST.
14799         (dump_subexp_body_standard): Likewise.
14800
14801 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
14802
14803         * target-descriptions.c (tdesc_element_visitor) Add empty
14804         implementations.
14805         (tdesc_type): Move make_gdb_type from here.
14806         (tdesc_type_builtin): Likewise.
14807         (tdesc_type_vector): Likewise.
14808         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14809         (make_gdb_type_struct): Move from tdesc_type_with_fields.
14810         (make_gdb_type_union): Likewise.
14811         (make_gdb_type_flags): Likewise.
14812         (make_gdb_type_enum): Likewise.
14813         (make_gdb_type): New function.
14814         (tdesc_register_type): Use static make_gdb_type.
14815
14816 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
14817
14818         * infcmd.c (default_print_one_register_info): Align natural-format
14819         column values consistently one under another.
14820         (pad_to_column): New function.
14821
14822 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
14823
14824         * dwarf2read.c (dwarf2_physname): Move commment.
14825
14826 2018-02-01  Leszek Swirski  <leszeks@google.com>
14827
14828         * varobj.c (varobj_formatted_print_options): Allow recursive
14829         pretty printing if pretty printing is enabled.
14830
14831 2018-02-01  Leszek Swirski  <leszeks@google.com>
14832
14833         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14834         names after a structop as a filename.
14835
14836 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14837
14838         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14839         (arm_record_coproc_data_proc): Likewise.
14840
14841 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14842
14843         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14844
14845 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
14846
14847         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14848         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14849
14850 2018-01-31  Pedro Alves  <palves@redhat.com>
14851
14852         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14853         * inflow.c (child_terminal_save_inferior): Wrap reference to
14854         tcgetpgrp in HAVE_TERMIOS_H.
14855         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14856         _WIN32.
14857         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14858         always iterate over all inferiors.
14859         (gdbsim_cntrl_c): Adjust.
14860         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14861
14862 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14863
14864         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14865         index type is objfile-owned if the element type is as well.
14866
14867 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14868
14869         GDB 8.1 released.
14870
14871 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14872
14873         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14874         "features/s390x-linux64.c".
14875         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14876         s390_linux32 and s390x_linux64.
14877         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14878         default tdesc.
14879         * s390-tdep.c: Include "features/s390-linux32.c" and
14880         "features/s390x-linux64.c".
14881         (s390_tdesc_valid): Add check for tdesc_has_registers.
14882         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14883         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14884         tdesc_s390x_linux64.
14885         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14886         tdesc_s390x_linux64 to...
14887         * s390-tdep.h: ...here.
14888
14889 2018-01-30  Pedro Alves  <palves@redhat.com>
14890
14891         PR gdb/13211
14892         * config.in, configure: Regenerate.
14893         * configure.ac: Check for getpgid.
14894         * go32-nat.c (go32_pass_ctrlc): New.
14895         (go32_target): Install it.
14896         * inf-child.c (inf_child_target): Install
14897         child_terminal_save_inferior, child_pass_ctrlc and
14898         child_interrupt.
14899         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14900         (inf_ptrace_target): No longer install it.
14901         * infcmd.c (interrupt_target_1): Adjust.
14902         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14903         (child_interrupt): Declare.
14904         (inferior::terminal_state): New.
14905         * inflow.c (struct terminal_info): Update comments.
14906         (inferior_process_group): Delete.
14907         (terminal_is_ours): Delete.
14908         (gdb_tty_state): New.
14909         (child_terminal_init): Adjust.
14910         (is_gdb_terminal, sharing_input_terminal_1)
14911         (sharing_input_terminal): New functions.
14912         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14913         Set the process's actual process group in the foreground if
14914         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14915         mark terminal as the inferior's if not sharing GDB's terminal.
14916         Don't check attach_flag.
14917         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14918         pass down a target_terminal_state.
14919         (child_terminal_save_inferior): New, factored out from ...
14920         (child_terminal_ours_1): ... this.  Handle
14921         target_terminal_state::is_ours_for_output.
14922         (child_interrupt, child_pass_ctrlc): New.
14923         (inflow_inferior_exit): Clear the inferior's terminal_state.
14924         (copy_terminal_info): Copy the inferior's terminal state.
14925         (_initialize_inflow): Remove reference to terminal_is_ours.
14926         * inflow.h (inferior_process_group): Delete.
14927         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14928         * procfs.c (procfs_target): Don't install procfs_interrupt.
14929         (procfs_interrupt): Delete.
14930         * remote.c (remote_serial_quit_handler): Adjust.
14931         (remote_interrupt): Remove ptid parameter.  Adjust.
14932         * target-delegates.c: Regenerate.
14933         * target.c: Include "terminal.h".
14934         (target_terminal::terminal_state): Rename to ...
14935         (target_terminal::m_terminal_state): ... this.
14936         (target_terminal::init): Adjust.
14937         (target_terminal::inferior): Adjust to per-inferior
14938         terminal_state.
14939         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14940         (target_terminal::ours, target_terminal::ours_for_output): Use
14941         target_terminal_is_ours_kind.
14942         (target_interrupt): Remove ptid parameter.  Adjust.
14943         (default_target_pass_ctrlc): Adjust.
14944         * target.h (target_ops::to_terminal_save_inferior): New field.
14945         (target_ops::to_interrupt): Remove ptid_t parameter.
14946         (target_interrupt): Remove ptid_t parameter.  Update comment.
14947         (target_pass_ctrlc): Update comment.
14948         * target/target.h (target_terminal_state): New scoped enum,
14949         factored out of ...
14950         (target_terminal::terminal_state): ... here.
14951         (target_terminal::inferior): Update comments.
14952         (target_terminal::restore_inferior): New.
14953         (target_terminal::is_inferior, target_terminal::is_ours)
14954         (target_terminal::is_ours_for_output): Adjust.
14955         (target_terminal::scoped_restore_terminal_state): Adjust to
14956         rename, and call restore_inferior() instead of inferior().
14957         (target_terminal::scoped_restore_terminal_state::m_state): Change
14958         type.
14959         (target_terminal::terminal_state): Rename to ...
14960         (target_terminal::m_terminal_state): ... this and change type.
14961
14962 2018-01-30  Pedro Alves  <palves@redhat.com>
14963
14964         * linux-nat.c (wait_for_signal): New function.
14965         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14966         directly.
14967         (async_terminal_is_ours)
14968         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14969         (linux_nat_add_target): Don't override
14970         to_terminal_inferior/to_terminal_ours.
14971
14972 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14973
14974         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14975
14976 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14977
14978         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14979         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14980         dwarf2_per_objfile_free here.
14981         (dwarf2_per_objfile_free): Remove.
14982         (_initialize_dwarf2_read): Don't register
14983         dwarf2_per_objfile_free as a registry cleanup.
14984
14985 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14986
14987         Avoid compilation errors in MinGW native builds
14988
14989         The error is triggered by including python-internal.h, and the
14990         error message is:
14991
14992              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14993                       from build-gnulib/import/math.h:27,
14994                       from d:/usr/Python26/include/pyport.h:235,
14995                       from d:/usr/Python26/include/Python.h:58,
14996                       from python/python-internal.h:94,
14997                       from python/py-arch.c:24:
14998              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14999         using ::hypot;
15000                 ^~~~~
15001
15002         This happens because Python headers define 'hypot' to expand t
15003         '_hypot' in the Windows builds.
15004         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15005         'hypoth'.  This avoids a compilation error.
15006
15007 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15008
15009         * MAINTAINERS (Write After Approval): Fix ordering.
15010
15011 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15012
15013         * MAINTAINERS (Write After Approval): Add Alan Hayward.
15014
15015 2018-01-26  Alan Modra  <amodra@gmail.com>
15016
15017         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15018         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15019         Remove nop.  Make const.  Comment.
15020         (powerpc32_plt_stub_so_2): New.
15021         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15022         Correct count.  Update uses.
15023         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15024         Move common code reading PLT entry word.  Correct
15025         powerpc32_plt_stub PLT address calculation.
15026         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15027         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15028         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15029         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15030         (ppc64_standard_linkage8): Likewise.
15031         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15032         Correct insns description.
15033         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15034
15035 2018-01-24  Pedro Alves  <palves@redhat.com>
15036
15037         GCC PR libstdc++/83906
15038         * gdbtypes.c (operator==(const dynamic_prop &,
15039         const dynamic_prop &)): New.
15040         (operator==(const range_bounds &, const range_bounds &)): New.
15041         (check_types_equal): Use them instead of memcmp.
15042         * gdbtypes.h (operator==(const dynamic_prop &,
15043         const dynamic_prop &)): Declare.
15044         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15045         (operator==(const range_bounds &, const range_bounds &)): Declare.
15046         (operator!=(const range_bounds &, const range_bounds &)): Declare.
15047
15048 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15049
15050         * s390-linux-tdep.c (s390_record_address_mask)
15051         (s390_record_calc_disp_common, s390_record_calc_disp)
15052         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15053         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15054         (s390_process_record): Move to s390-tdep.c.
15055         (s390_linux_init_abi_any): Adjust.
15056         * s390-tdep.c (s390_record_address_mask)
15057         (s390_record_calc_disp_common, s390_record_calc_disp)
15058         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15059         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15060         (s390_process_record): Moved from s390-linux-tdep.c
15061         (s390_gdbarch_init): Adjust.
15062
15063 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15064
15065         * s390-linux-nat.c (s390-tdep.h): New include.
15066         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15067         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15068         (ALLDEPFILES): Add s390-tdep.c.
15069         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15070         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15071         * s390-tdep.h: ...this.  New file.
15072         * s390-linux-tdep.c (s390-tdep.h): New include.
15073         (_initialize_s390_tdep): Rename to...
15074         (_initialize_s390_linux_tdep): ...this and adjust.
15075         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15076         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15077         s390-tdep.h.
15078         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15079         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15080         (s390_is_partial_instruction, s390_software_single_step)
15081         (is_non_branch_ril, s390_displaced_step_copy_insn)
15082         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15083         (s390_prologue_data, s390_addr, s390_store, s390_load)
15084         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15085         (s390_register_call_saved, s390_guess_tracepoint_registers)
15086         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15087         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15088         (s390_pseudo_register_name, s390_pseudo_register_type)
15089         (s390_pseudo_register_read, s390_pseudo_register_write)
15090         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15091         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15092         (s390_addr_bits_remove, s390_address_class_type_flags)
15093         (s390_address_class_type_flags_to_name)
15094         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15095         (s390_function_arg_float, s390_function_arg_vector)
15096         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15097         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15098         (s390_frame_align, s390_register_return_value, s390_return_value)
15099         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15100         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15101         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15102         (s390_trad_frame_prev_register, s390_unwind_cache)
15103         (s390_prologue_frame_unwind_cache)
15104         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15105         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15106         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15107         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15108         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15109         (s390_frame_base_address, s390_local_base_address)
15110         (s390_frame_base, s390_gcc_target_options)
15111         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15112         (s390_validate_reg_range, s390_tdesc_valid)
15113         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15114         * s390-tdep.c: ...this.  New file.
15115
15116 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15117
15118         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15119         (s390_process_record, s390_gdbarch_tdep_alloc)
15120         (s390_linux_init_abi_any): Use/set new hook.
15121
15122 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15123
15124         * s390-linux-tdep.c (osabi.h): New include.
15125         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15126         (s390_linux_init_abi_any): New functions.
15127         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15128
15129 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15130
15131         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15132         tdesc_has_registers check
15133
15134 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15135
15136         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15137         (s390_validate_reg_range): New macro.
15138         (s390_gdbarch_init): Adjust.
15139
15140 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15141
15142         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15143         (s390_gdbarch_tdep_alloc): Adjust.
15144         (s390_gdbarch_init): Adjust.
15145
15146 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15147
15148         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15149         <have_tdb>: Change type to bool.
15150         (s390_gdbarch_tdep_alloc): Adjust.
15151         (s390_gdbarch_init): Adjust.
15152
15153 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15154
15155         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15156         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15157         (s390_gdbarch_tdep_alloc): New function.
15158         (s390_gdbarch_init): Allocate tdep at start and use its fields
15159         instead of separate variables.
15160
15161 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15162
15163         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15164         when looking for cached gdbarch and add comment for remaining.
15165
15166 2018-01-22  Pedro Alves  <palves@redhat.com>
15167             Sergio Durigan Junior  <sergiodj@redhat.com>
15168
15169         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15170         case.
15171
15172 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15173
15174         * MAINTAINERS: Update my company e-mail address.
15175
15176 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15177
15178         * regcache.c (cooked_write_test): New function.
15179         (_initialize_regcache): Register the test.
15180
15181 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15182
15183         * ia64-tdep.c (ia64_pseudo_register_read): Call
15184         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15185         * m32c-tdep.c (m32c_cat_read): Likewise.
15186         (m32c_r3r2r1r0_read): Likewise.
15187         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15188         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15189
15190 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15191
15192         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15193         method raw_read instead of regcache_raw_read.
15194         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15195         * arm-tdep.c (arm_neon_quad_read): Likewise.
15196         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15197         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15198         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15199         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15200         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15201         (i386_pseudo_register_read_into_value): Likewise.
15202         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15203         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15204         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15205         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15206         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15207         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15208         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15209         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15210         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15211
15212 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15213
15214         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15215         * configure.tgt: Remove target mt.
15216         * mt-tdep.c: Remove.
15217         * regcache.c (cooked_read_test): Remove the check for mt.
15218
15219 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15220
15221         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15222         instead of gdbarch_pseudo_register_read_value.
15223
15224 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15225
15226         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15227         language is Ada.
15228
15229 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15230
15231         * linespec.c (create_sals_line_offset): Remove code that preserved
15232         the symtab_and_line's line number.
15233
15234 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15235
15236         * varobj.c (varobj_create): Don't set valid_block when creating a
15237         floating varobj.
15238
15239 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15240
15241         * varobj.c (varobj_create): Remove out of date comment.
15242
15243 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15244
15245         PR mi/20395
15246         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15247         updating innermost block.
15248         * parse.c (innermost_block_tracker::update): Take extra type
15249         parameter, and check types match before updating innermost block.
15250         (write_dollar_variable): Update innermost block for registers.
15251         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15252         (innermost_block_tracker::innermost_block_tracker): Initialise
15253         m_types member.
15254         (innermost_block_tracker::reset): Take type parameter.
15255         (innermost_block_tracker::update): Take type parameter, and pass
15256         type through as needed.
15257         (innermost_block_tracker::m_types): New member.
15258         * varobj.c (varobj_create): Pass type when reseting innermost
15259         block.
15260
15261 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15262
15263         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15264         * ada-lang.c (resolve_subexp): Likewise.
15265         * breakpoint.c (set_breakpoint_condition) Likewise.
15266         (watch_command_1) Likewise.
15267         * c-exp.y (variable): Likewise.
15268         * d-exp.y (PrimaryExpression): Likewise.
15269         * f-exp.y (variable): Likewise.
15270         * go-exp.y (variable): Likewise.
15271         * m2-exp.y (variable): Likewise.
15272         * objfiles.c (objfile::~objfile): Likewise.
15273         * p-exp.y (variable): Likewise.
15274         * parse.c (innermost_block): Change type.
15275         * parser-defs.h (class innermost_block_tracker): New.
15276         (innermost_block): Change to innermost_block_tracker.
15277         * printcmd.c (display_command): Switch to innermost_block API.
15278         (do_one_display): Likewise.
15279         * rust-exp.y (do_one_display): Likewise.
15280         * symfile.c (clear_symtab_users): Likewise.
15281         * varobj.c (varobj_create): Switch to innermost_block API, replace
15282         use of innermost_block with block stored on varobj object.
15283
15284 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15285
15286         * expression.h (innermost_block): Remove declaration.
15287         * varobj.c: Add 'parser-defs.h' include.
15288
15289 2018-01-19  Tom Tromey  <tom@tromey.com>
15290
15291         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15292         symbols in the static and global blocks.
15293
15294 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15295
15296         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15297         gdb_ptrace.h, and move including gdb_wait.h ...
15298         * nat/linux-ptrace.h: ... to here.
15299
15300 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15301
15302         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15303         inf_ptrace_detach_success.
15304         (inf_ptrace_detach_success): Add inferior parameter, use it
15305         instead of inferior_ptid, pass it to detach_inferior.
15306         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15307         parameter.
15308         * inferior.c (detach_inferior): Add overload that takes an
15309         inferior object.
15310         * inferior.h (detach_inferior): Likewise.
15311         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15312         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15313         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15314
15315 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15316
15317         * target.h (struct target_ops) <to_detach>: Add inferior
15318         parameter.
15319         (target_detach): Likewise.
15320         * target.c (dispose_inferior): Pass inferior down.
15321         (target_detach): Pass inferior down.  Assert that it is equal to
15322         the current inferior.
15323         * aix-thread.c (aix_thread_detach): Pass inferior down.
15324         * corefile.c (core_file_command): Pass current_inferior() down.
15325         * corelow.c (core_detach): Add inferior parameter.
15326         * darwin-nat.c (darwin_detach): Likewise.
15327         * gnu-nat.c (gnu_detach): Likewise.
15328         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15329         * infcmd.c (detach_command): Pass current_inferior() down to
15330         target_detach.
15331         * infrun.c (follow_fork_inferior): Pass parent_inf to
15332         target_detach.
15333         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15334         target_detach.
15335         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15336         * linux-thread-db.c (thread_db_detach): Likewise.
15337         * nto-procfs.c (procfs_detach): Likewise.
15338         * procfs.c (procfs_detach): Likewise.
15339         * record.c (record_detach): Likewise.
15340         * record.h (struct inferior): Forward-declare.
15341         (record_detach): Add inferior parameter.
15342         * remote-sim.c (gdbsim_detach): Likewise.
15343         * remote.c (remote_detach_1): Likewise.
15344         (remote_detach): Likewise.
15345         (extended_remote_detach): Likewise.
15346         * sol-thread.c (sol_thread_detach): Likewise.
15347         * target-debug.h (target_debug_print_inferior_p): New macro.
15348         * target-delegates.c: Re-generate.
15349         * top.c (kill_or_detach): Pass inferior down to target_detach.
15350         * windows-nat.c (windows_detach): Add inferior parameter.
15351
15352 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15353
15354         * target.h (struct target_ops) <to_detach>: Remove args
15355         parameter.
15356         (target_detach): Likewise.
15357         * target.c (dispose_inferior): Adjust.
15358         (target_detach): Remove args parameter, adjust.
15359         * aix-thread.c (aix_thread_detach): Adjust.
15360         * corefile.c (core_file_command): Adjust.
15361         * corelow.c (core_detach): Adjust.
15362         * darwin-nat.c (darwin_detach): Adjust.
15363         * gnu-nat.c (gnu_detach): Adjust.
15364         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15365         * infcmd.c (detach_command): Adjust
15366         * infrun.c (follow_fork_inferior): Adjust.
15367         (handle_vfork_child_exec_or_exit): Adjust.
15368         * linux-fork.c (linux_fork_detach): Remove args parameter.
15369         * linux-fork.h (linux_fork_detach): Likewise.
15370         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15371         * linux-thread-db.c (thread_db_detach): Likewise.
15372         * nto-procfs.c (procfs_detach): Likewise.
15373         * procfs.c (procfs_detach): Likewise.
15374         (do_detach): Remove signo parameter.
15375         * record.c (record_detach): Remove args parameter.
15376         * record.h (record_detach): Likewise.
15377         * remote-sim.c (gdbsim_detach): Likewise.
15378         * remote.c (remote_detach_1): Likewise.
15379         (remote_detach): Likewise.
15380         (extended_remote_detach): Likewise.
15381         * sol-thread.c (sol_thread_detach): Likewise.
15382         * target-delegates.c: Re-generate.
15383         * top.c (struct qt_args) <args>: Remove field.
15384         (kill_or_detach): Don't pass args.
15385         (quit_force): Don't set args.
15386         * windows-nat.c (windows_detach): Remove args parameter.
15387
15388 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15389
15390         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15391         (arm_linux_init_abi): Install it.
15392
15393 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15394
15395         * osabi.c (gdb_osabi_names): Extend the regexp for
15396         arm-linux-gnueabihf.
15397
15398 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15399
15400         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15401         m_abbrevs.
15402         (abbrev_table::add_abbrev): Update.
15403         (abbrev_table::lookup_abbrev): Update.
15404
15405 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15406
15407         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15408
15409 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15410
15411         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15412         to "std::string".
15413
15414 2018-01-17  Tom Tromey  <tom@tromey.com>
15415
15416         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15417
15418 2018-01-17  Tom Tromey  <tom@tromey.com>
15419
15420         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15421         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15422         (create_array_type_with_stride): Update.
15423         * dwarf2read.c (set_die_type): Update.
15424
15425 2018-01-17  Tom Tromey  <tom@tromey.com>
15426
15427         * dwarf2read.c (delayed_method_info): Remove typedef.
15428         (dwarf2_cu::method_info): Now a std::vector.
15429         (add_to_method_list): Update.
15430         (free_delayed_list): Remove.
15431         (compute_delayed_physnames): Update.
15432         (process_full_comp_unit, process_full_type_unit): Clear the method
15433         list.  Remove cleanups.
15434         (psymtab_include_file_name): Add name_holder parameter.  Use
15435         unique_xmalloc_ptr.
15436         (dwarf_decode_lines): Update.
15437
15438 2018-01-17  Tom Tromey  <tom@tromey.com>
15439             Simon Marchi  <simon.marchi@ericsson.com>
15440
15441         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15442         (dwarf2_per_objfile::free_cached_comp_units)
15443         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15444         (init_cutu_and_read_dies_no_follow): Update.
15445         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15446         (dwarf2_cu::~dwarf2_cu): New.
15447         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15448         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15449
15450 2018-01-17  Tom Tromey  <tom@tromey.com>
15451             Simon Marchi  <simon.marchi@ericsson.com>
15452
15453         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15454         (struct die_reader_specs) <abbrev_table>: New member.
15455         (struct abbrev_table): Add constructor.
15456         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15457         <abbrev_obstack>: Now an auto_obstack.
15458         (abbrev_table_up): New typedef.
15459         (init_cu_die_reader): Add abbrev_table parameter.
15460         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15461         Add result_dwo_abbrev_table.
15462         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15463         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15464         Update.
15465         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15466         parameter.
15467         (skip_children): Update.
15468         (abbrev_table::alloc_abbrev): Rename from
15469         abbrev_table_alloc_abbrev.
15470         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15471         (abbrev_table::lookup_abbrev): Rename from
15472         abbrev_table_lookup_abbrev.
15473         (abbrev_table_read_table): Return abbrev_table_up.
15474         (abbrev_table_free, abbrev_table_free_cleanup)
15475         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15476         (load_partial_dies): Update.
15477
15478 2018-01-17  Tom Tromey  <tom@tromey.com>
15479
15480         * dwarf2read.c (dwarf2_compute_name): Update comment.
15481         (read_func_scope, read_variable): Update.
15482         (new_symbol): Remove.
15483         (new_symbol_full): Rename to new_symbol.
15484
15485 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
15486
15487         PR gdb/16577
15488         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15489         a warning instead of throwing an error, set section size to 0 and return
15490         NULL.
15491         * gdb_bfd.h (gdb_bfd_map_section): Update description.
15492
15493 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15494
15495         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15496         std::string.
15497         (linux_ptrace_attach_fail_reason_string): Likewise.
15498         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15499         Likewise.
15500         (linux_ptrace_attach_fail_reason_string): Likewise.
15501         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15502
15503 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15504
15505         * linux-nat.c (linux_nat_attach): Remove xstrdup.
15506
15507 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
15508
15509         PR gdb/21559
15510         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15511         checking for fs_base/gs_base fields in struct user_regs_struct.
15512         * configure: Regenerate.
15513
15514 2018-01-17  Yao Qi  <yao.qi@linaro.org>
15515
15516         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
15517         function.
15518         (aarch64_linux_init_abi): Install it to gdbarch hook
15519         gcc_target_options.
15520
15521 2018-01-15  Pedro Alves  <palves@redhat.com>
15522
15523         * common/signals-state-save-restore.c
15524         (save_original_signals_state): Fix typos.
15525
15526 2017-01-12  Tom Tromey  <tom@tromey.com>
15527             Sergio Durigan Junior  <sergiodj@redhat.com>
15528
15529         * Makefile.in (install-only): Install gdb-add-index.
15530
15531 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
15532
15533         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
15534
15535 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15536
15537         * infrun.c (keep_going_pass_signal): Clear step-over info when
15538         insert_breakpoints fails.
15539
15540 2018-01-11  Pedro Alves  <palves@redhat.com>
15541
15542         PR gdb/22583
15543         * infrun.c (resume): Rename to ...
15544         (resume_1): ... this.
15545         (resume): Reimplement as wrapper around resume_1.
15546
15547 2018-01-11  Pedro Alves  <palves@redhat.com>
15548
15549         PR remote/22597
15550         * remote.c (remote_parse_stop_reply): Default to the last-set
15551         general thread instead of to 'magic_null_ptid'.
15552
15553 2018-01-10  Pedro Alves  <palves@redhat.com>
15554
15555         * language.h (language_get_symbol_name_matcher): Rename ...
15556         (get_symbol_name_matcher): ... this.
15557         * language.c (language_get_symbol_name_matcher): Ditto.
15558         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
15559         callers adjusted.
15560
15561 2018-01-10  Pedro Alves  <palves@redhat.com>
15562
15563         PR gdb/22670
15564         * dwarf2read.c
15565         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
15566         Adjust to use language_get_symbol_name_matcher instead of
15567         language_defn::la_get_symbol_name_matcher.
15568         * language.c (language_get_symbol_name_matcher): If in Ada mode
15569         and the lookup name is a verbatim match, return Ada's matcher.
15570         * language.h (language_get_symbol_name_matcher): Adjust comment.
15571         (ada_lookup_name_info::verbatim_p):: New method.
15572
15573 2018-01-10  Pedro Alves  <palves@redhat.com>
15574
15575         PR gdb/22670
15576         * ada-lang.c (ada_collect_symbol_completion_matches): If the
15577         minsym's language is language_auto or language_cplus, pass down
15578         language_ada instead.
15579         * symtab.c (compare_symbol_name): Don't frob symbol language here.
15580
15581 2018-01-10  Pedro Alves  <palves@redhat.com>
15582
15583         PR gdb/22670
15584         * minsyms.c (linkage_name_str): New function.
15585         (iterate_over_minimal_symbols): Use it.
15586
15587 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15588
15589         * NEWS: Document that 'info proc' now works on FreeBSD.
15590
15591 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15592
15593         * configure.ac: Check for kinfo_getfile in libutil.
15594         * configure: Regenerate.
15595         * config.in: Regenerate.
15596         * fbsd-nat.c: Include "fbsd-tdep.h".
15597         (fbsd_fetch_cmdline): New.
15598         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
15599         rather than calling error.
15600         (fbsd_info_proc): New.
15601         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
15602         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
15603         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
15604
15605 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15606
15607         * fbsd-nat.c (struct free_deleter): Remove.
15608         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
15609
15610 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15611
15612         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
15613         NULL for an empty pathname.
15614
15615 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15616
15617         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
15618         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
15619         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
15620         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
15621         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
15622         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
15623         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
15624         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
15625         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
15626         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
15627         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
15628         (fbsd_core_fetch_timeval, fbsd_print_sigset)
15629         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
15630         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
15631         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
15632
15633 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
15634
15635         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
15636         (gnu_xfer_auxv): New function.
15637         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
15638         TARGET_OBJECT_AUXV.
15639
15640 2018-01-08  Yao Qi  <yao.qi@linaro.org>
15641             Simon Marchi  <simon.marchi@ericsson.com>
15642
15643         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
15644         common/selftest.c.
15645         (COMMON_OBS): Remove selftest.o.
15646         * configure.ac: Append selftest-arch.c and common/selftest.c to
15647         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
15648         * configure: Re-generated.
15649         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
15650         GDB_SELF_TEST.
15651         (maintenance_info_selftests): Likewise.
15652
15653 2018-01-08  Xavier Roirand  <roirand@adacore.com>
15654
15655         * ada-valprint.c (val_print_packed_array_elements): Use
15656         proper number of elements when printing an array indexed
15657         by an enumeration type.
15658
15659 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15660
15661         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
15662         (dw2_get_file_names_reader): Adjust.
15663         (lookup_dwo_signatured_type): Adjust.
15664         (lookup_dwp_signatured_type): Adjust.
15665         (lookup_signatured_type): Adjust.
15666         (create_type_unit_group): Adjust.
15667         (get_type_unit_group): Adjust.
15668         (process_psymtab_comp_unit_reader): Adjust.
15669         (build_type_psymtabs_reader): Adjust.
15670         (scan_partial_symbols): Adjust.
15671         (add_partial_symbol): Adjust.
15672         (add_partial_subprogram): Adjust.
15673         (peek_die_abbrev): Adjust.
15674         (fixup_go_packaging): Adjust.
15675         (process_imported_unit_die): Adjust.
15676         (dwarf2_compute_name): Adjust.
15677         (dwarf2_physname): Adjust.
15678         (read_import_statement): Adjust.
15679         (handle_DW_AT_stmt_list): Adjust.
15680         (read_file_scope): Adjust.
15681         (read_func_scope): Adjust.
15682         (read_lexical_block_scope): Adjust.
15683         (read_call_site_scope): Adjust.
15684         (read_variable): Adjust.
15685         (dwarf2_rnglists_process): Adjust.
15686         (dwarf2_ranges_process): Adjust.
15687         (dwarf2_ranges_read): Adjust.
15688         (dwarf2_get_pc_bounds): Adjust.
15689         (dwarf2_record_block_ranges): Adjust.
15690         (dwarf2_add_field): Adjust.
15691         (dwarf2_add_member_fn): Adjust.
15692         (read_structure_type): Adjust.
15693         (process_structure_scope): Adjust.
15694         (read_enumeration_type): Adjust.
15695         (read_array_type): Adjust.
15696         (mark_common_block_symbol_computed): Adjust.
15697         (read_common_block): Adjust.
15698         (read_namespace_type): Adjust.
15699         (read_namespace): Adjust.
15700         (read_module_type): Adjust.
15701         (read_tag_pointer_type): Adjust.
15702         (read_tag_ptr_to_member_type): Adjust.
15703         (read_tag_string_type): Adjust.
15704         (read_subroutine_type): Adjust.
15705         (read_typedef): Adjust.
15706         (read_base_type): Adjust.
15707         (attr_to_dynamic_prop): Adjust.
15708         (read_subrange_type): Adjust.
15709         (read_unspecified_type): Adjust.
15710         (dwarf2_read_abbrevs): Adjust.
15711         (load_partial_dies): Adjust.
15712         (read_partial_die): Adjust.
15713         (find_partial_die): Adjust.
15714         (guess_partial_die_structure_name): Adjust.
15715         (fixup_partial_die): Adjust.
15716         (read_attribute_value): Adjust.
15717         (read_addr_index): Adjust.
15718         (read_addr_index_from_leb128): Adjust.
15719         (read_str_index): Adjust.
15720         (dwarf2_string_attr): Adjust.
15721         (get_debug_line_section): Adjust.
15722         (dwarf_decode_line_header): Adjust.
15723         (lnp_state_machine::check_line_address): Adjust.
15724         (dwarf_decode_lines_1): Adjust.
15725         (dwarf_decode_lines): Adjust.
15726         (dwarf2_start_symtab): Adjust.
15727         (var_decode_location): Adjust.
15728         (new_symbol_full): Adjust.
15729         (dwarf2_const_value_data): Adjust.
15730         (dwarf2_const_value_attr): Adjust.
15731         (dwarf2_const_value): Adjust.
15732         (die_type): Adjust.
15733         (die_containing_type): Adjust.
15734         (build_error_marker_type): Adjust.
15735         (lookup_die_type): Adjust.
15736         (guess_full_die_structure_name): Adjust.
15737         (anonymous_struct_prefix): Adjust.
15738         (determine_prefix): Adjust.
15739         (dwarf2_name): Adjust.
15740         (follow_die_ref_or_sig): Adjust.
15741         (follow_die_offset): Adjust.
15742         (follow_die_ref): Adjust.
15743         (follow_die_sig_1): Adjust.
15744         (follow_die_sig): Adjust.
15745         (get_signatured_type): Adjust.
15746         (get_DW_AT_signature_type): Adjust.
15747         (decode_locdesc): Adjust.
15748         (dwarf_decode_macros): Adjust.
15749         (cu_debug_loc_section): Adjust.
15750         (fill_in_loclist_baton): Adjust.
15751         (dwarf2_symbol_mark_computed): Adjust.
15752         (init_one_comp_unit): Don't assign
15753         dwarf2_cu::dwarf2_per_objfile.
15754         (set_die_type): Adjust.
15755
15756 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15757
15758         * dwarf2read.c (struct mapped_debug_names): Add constructor.
15759         <dwarf2_per_objfile>: New field.
15760         (dwarf2_per_objfile): Remove global.
15761         (get_dwarf2_per_objfile): New function.
15762         (set_dwarf2_per_objfile): New function.
15763         (dwarf2_build_psymtabs_hard): Change objfile parameter to
15764         dwarf2_per_objfile.
15765         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15766         (read_abbrev_offset): Likewise.
15767         (read_indirect_string): Likewise.
15768         (read_indirect_line_string): Likewise.
15769         (read_indirect_string_at_offset): Likewise.
15770         (read_indirect_string_from_dwz): Likewise.
15771         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15772         dwarf2_per_objfile.
15773         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15774         (create_all_comp_units): Change objfile parameter to
15775         dwarf2_per_objfile.
15776         (create_all_type_units): Likewise.
15777         (process_queue): Add dwarf2_per_objfile parameter.
15778         (read_and_check_comp_unit_head): Likewise.
15779         (lookup_dwo_unit_in_dwp): Likewise.
15780         (get_dwp_file): Likewise.
15781         (process_cu_includes): Likewise.
15782         (struct free_dwo_file_cleanup_data): New struct.
15783         (dwarf2_has_info): Use get_dwarf2_per_objfile and
15784         set_dwarf2_per_objfile.
15785         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
15786         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
15787         context, adjust calls.
15788         (dw2_instantiate_symtab): Likewise.
15789         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15790         (dw2_get_cu): Likewise.
15791         (create_cu_from_index_list): Change objfile parameter to
15792         dwarf2_per_objfile.
15793         (create_cus_from_index_list): Get dwarf2_per_objfile from
15794         context, adjust calls.
15795         (create_cus_from_index): Likewise.
15796         (create_signatured_type_table_from_index): Change objfile
15797         parameter to dwarf2_per_objfile.
15798         (create_signatured_type_table_from_debug_names): Change objfile
15799         parameter to dwarf2_per_objfile.
15800         (create_addrmap_from_index): Likewise.
15801         (create_addrmap_from_aranges): Likewise.
15802         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15803         (dw2_setup): Remove.
15804         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15805         context.
15806         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15807         get_dwarf2_per_objfile.
15808         (dw2_forget_cached_source_info): Likewise.
15809         (dw2_map_symtabs_matching_filename): Likewise.
15810         (struct dw2_symtab_iterator) <index>: Remove.
15811         <dwarf2_per_objfile>: New field.
15812         (dw2_symtab_iter_init): Replace index parameter with
15813         dwarf2_per_objfile.
15814         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15815         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15816         (dw2_print_stats): Likewise.
15817         (dw2_dump): Likewise.
15818         (dw2_expand_symtabs_for_function): Likewise.
15819         (dw2_expand_all_symtabs): Likewise.
15820         (dw2_expand_symtabs_with_fullname): Likewise.
15821         (dw2_expand_marked_cus): Replace index and objfile parameters
15822         with dwarf2_per_objfile.
15823         (dw_expand_symtabs_matching_file_matcher): Add
15824         dwarf2_per_objfile parameter and adjust calls.
15825         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15826         adjust calls.
15827         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15828         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15829         adjust calls.
15830         (create_cus_from_debug_names_list): Replace objfile parameter
15831         with dwarf2_per_objfile and adjust calls.
15832         (create_cus_from_debug_names): Likewise.
15833         (dwarf2_read_debug_names): Likewise.
15834         (mapped_debug_names::namei_to_name): Adjust call.
15835         (dw2_debug_names_iterator::next): Likewise.
15836         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15837         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15838         (dw2_debug_names_dump): Likewise.
15839         (dw2_debug_names_expand_symtabs_for_function): Likewise.
15840         (dw2_debug_names_expand_symtabs_matching): Likewise.
15841         (dwarf2_initialize_objfile): Likewise.
15842         (dwarf2_build_psymtabs): Likewise.
15843         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15844         this_cu.
15845         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15846         (read_and_check_comp_unit_head): Likewise.
15847         (read_abbrev_offset): Likewise.
15848         (create_debug_type_hash_table): Likewise.
15849         (create_debug_types_hash_table): Likewise.
15850         (create_all_type_units): Replace objfile parameter with
15851         dwarf2_per_objfile.
15852         (add_type_unit): Add dwarf2_per_objfile parameter.
15853         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15854         with dwarf2_per_objfile.
15855         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15856         (lookup_dwp_signatured_type): Likewise.
15857         (lookup_signatured_type): Likewise.
15858         (read_cutu_die_from_dwo): Likewise.
15859         (init_tu_and_read_dwo_dies): Likewise.
15860         (init_cutu_and_read_dies): Likewise.
15861         (init_cutu_and_read_dies_no_follow): Likewise.
15862         (allocate_type_unit_groups_table): Add objfile parameter.
15863         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15864         (get_type_unit_group): Likewise.
15865         (process_psymtab_comp_unit): Update call.
15866         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15867         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15868         (print_tu_stats): Likewise.
15869         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15870         in void* parameter.
15871         (build_type_psymtabs): Change objfile parameter to
15872         dwarf2_per_objfile.
15873         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15874         passed in void* parameter.
15875         (process_skeletonless_type_units): Change objfile parameter to
15876         dwarf2_per_objfile.
15877         (set_partial_user): Likewise.
15878         (dwarf2_build_psymtabs_hard): Likewise.
15879         (read_comp_units_from_section): Likewise.
15880         (create_all_comp_units): Likewise.
15881         (scan_partial_symbols): Update calls.
15882         (add_partial_symbol): Likewise.
15883         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15884         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15885         (process_queue): Add dwarf2_per_objfile parameter.
15886         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15887         (compute_compunit_symtab_includes): Likewise.
15888         (process_cu_includes): Add dwarf2_per_objfile parameter.
15889         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15890         (process_full_type_unit): Likewise.
15891         (process_imported_unit_die): Update call.
15892         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15893         (read_file_scope): Likewise.
15894         (allocate_dwo_file_hash_table): Add objfile parameter.
15895         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15896         (create_cus_hash_table): Likewise.
15897         (create_dwp_hash_table): Likewise.
15898         (create_dwo_unit_in_dwp_v1): Likewise.
15899         (create_dwp_v2_section): Likewise.
15900         (create_dwo_unit_in_dwp_v2): Likewise.
15901         (lookup_dwo_unit_in_dwp): Likewise.
15902         (try_open_dwop_file): Likewise.
15903         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15904         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15905         cleanup to include a reference to dwarf2_per_objfile.
15906         (open_dwp_file): Add dwarf2_per_objfile parameter.
15907         (open_and_init_dwp_file): Likewise.
15908         (get_dwp_file): Likewise.
15909         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15910         (queue_and_load_all_dwo_tus): Update call.
15911         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15912         data.
15913         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15914         (dwarf2_ranges_process): Likewise.
15915         (dwarf2_get_pc_bounds): Likewise.
15916         (mark_common_block_symbol_computed): Likewise.
15917         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15918         (dwarf2_read_abbrevs): Update call.
15919         (read_partial_die): Use dwarf2_per_objfile from cu.
15920         (find_partial_die): Likewise.
15921         (fixup_partial_die): Likewise.
15922         (read_attribute_value): Likewise.
15923         (read_indirect_string_at_offset_from): Add objfile parameter.
15924         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15925         parameter.
15926         (read_indirect_string_from_dwz): Add objfile parameter.
15927         (read_indirect_string): Add objfile parameter.
15928         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15929         (read_addr_index): Use dwarf2_per_objfile from cu.
15930         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15931         call dw2_setup.
15932         (read_str_index): Use dwarf2_per_objfile from cu.
15933         (get_debug_line_section): Likewise.
15934         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15935         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15936         (new_symbol_full): Use dwarf2_per_objfile from cu.
15937         (build_error_marker_type): Likewise.
15938         (lookup_die_type): Likewise.
15939         (determine_prefix): Likewise.
15940         (follow_die_offset): Likewise.
15941         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15942         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15943         (dwarf2_fetch_die_type_sect_off): Likewise.
15944         (dwarf2_get_die_type): Likewise.
15945         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15946         (get_signatured_type): Likewise.
15947         (get_DW_AT_signature_type): Likewise.
15948         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15949         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15950         (cu_debug_loc_section): Likewise.
15951         (fill_in_loclist_baton): Likewise.
15952         (dwarf2_symbol_mark_computed): Likewise.
15953         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15954         dwarf2_per_objfile.
15955         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15956         parameter.
15957         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15958         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15959         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15960         (set_die_type): Use dwarf2_free_objfile from cu.
15961         (get_die_type_at_offset): Likewise.
15962         (dwarf2_per_objfile_free): Don't assign global variable.
15963         (debug_names) <constructor>: Add dwarf2_per_objfile
15964         parameter, update m_debugstrlookup construction.
15965         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15966         parameter.
15967         <m_dwarf2_per_objfile>: New field.
15968         <lookup>: Use m_dwarf2_per_objfile.
15969         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15970         (psyms_seen_size): Likewise.
15971         (write_gdbindex): Replace objfile parameter with
15972         dwarf2_per_objfile.
15973         (write_debug_names): Likewise.
15974         (write_psymtabs_to_index): Likewise.
15975         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15976         calls.
15977
15978 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15979
15980         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15981         <dwarf2_per_objfile>: New field.
15982         (struct dwarf2_per_cu_data) <objfile>: Remove.
15983         <dwarf2_per_objfile>: New field.
15984         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15985         of objfile.
15986         (create_signatured_type_table_from_index): Likewise.
15987         (create_debug_type_hash_table): Likewise.
15988         (fill_in_sig_entry_from_dwo_entry): Likewise.
15989         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15990         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15991         objfile.
15992         (create_partial_symtab): Access objfile through
15993         dwarf2_per_objfile.
15994         (process_psymtab_comp_unit_reader): Likewise.
15995         (read_comp_units_from_section): Likewise.
15996         (scan_partial_symbols): Likewise.
15997         (add_partial_symbol): Likewise.
15998         (add_partial_subprogram): Likewise.
15999         (peek_die_abbrev): Likewise.
16000         (fixup_go_packaging): Likewise.
16001         (process_full_comp_unit): Likewise.
16002         (process_full_type_unit): Likewise.
16003         (process_imported_unit_die): Likewise.
16004         (dwarf2_compute_name): Likewise.
16005         (dwarf2_physname): Likewise.
16006         (read_import_statement): Likewise.
16007         (create_cus_hash_table): Assign dwarf2_physname instead of
16008         objfile.
16009         (read_func_scope): Access objfile through dwarf2_per_objfile.
16010         (read_lexical_block_scope): Likewise.
16011         (read_call_site_scope): Likewise.
16012         (read_variable): Likewise.
16013         (dwarf2_rnglists_process): Likewise.
16014         (dwarf2_ranges_process): Likewise.
16015         (dwarf2_ranges_read): Likewise.
16016         (dwarf2_record_block_ranges): Likewise.
16017         (dwarf2_add_field): Likewise.
16018         (dwarf2_add_member_fn): Likewise.
16019         (read_structure_type): Likewise.
16020         (process_structure_scope): Likewise.
16021         (read_enumeration_type): Likewise.
16022         (read_array_type): Likewise.
16023         (read_common_block): Likewise.
16024         (read_namespace_type): Likewise.
16025         (read_namespace): Likewise.
16026         (read_module_type): Likewise.
16027         (read_tag_pointer_type): Likewise.
16028         (read_tag_ptr_to_member_type): Likewise.
16029         (read_tag_string_type): Likewise.
16030         (read_subroutine_type): Likewise.
16031         (read_typedef): Likewise.
16032         (read_base_type): Likewise.
16033         (attr_to_dynamic_prop): Likewise.
16034         (read_subrange_type): Likewise.
16035         (read_unspecified_type): Likewise.
16036         (load_partial_dies): Likewise.
16037         (read_partial_die): Likewise.
16038         (find_partial_die): Likewise.
16039         (guess_partial_die_structure_name): Likewise.
16040         (fixup_partial_die): Likewise.
16041         (read_attribute_value): Likewise.
16042         (read_addr_index_from_leb128): Likewise.
16043         (dwarf2_read_addr_index): Likewise.
16044         (dwarf2_string_attr): Likewise.
16045         (lnp_state_machine::check_line_address): Likewise.
16046         (dwarf_decode_lines_1): Likewise.
16047         (dwarf_decode_lines): Likewise.
16048         (dwarf2_start_symtab): Likewise.
16049         (var_decode_location): Likewise.
16050         (new_symbol_full): Likewise.
16051         (dwarf2_const_value_data): Likewise.
16052         (dwarf2_const_value_attr): Likewise.
16053         (dwarf2_const_value): Likewise.
16054         (die_type): Likewise.
16055         (die_containing_type): Likewise.
16056         (lookup_die_type): Likewise.
16057         (guess_full_die_structure_name): Likewise.
16058         (anonymous_struct_prefix): Likewise.
16059         (dwarf2_name): Likewise.
16060         (follow_die_ref_or_sig): Likewise.
16061         (follow_die_offset): Likewise.
16062         (follow_die_ref): Likewise.
16063         (dwarf2_fetch_die_loc_sect_off): Likewise.
16064         (dwarf2_fetch_constant_bytes): Likewise.
16065         (dwarf2_fetch_die_type_sect_off): Likewise.
16066         (dwarf2_get_die_type): Likewise.
16067         (follow_die_sig): Likewise.
16068         (decode_locdesc): Likewise.
16069         (dwarf2_per_cu_objfile): Likewise.
16070         (dwarf2_per_cu_text_offset): Likewise.
16071         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16072         objfile.
16073         (set_die_type): Access objfile through
16074         dwarf2_per_objfile.
16075
16076 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16077
16078         * valprint.c (converted_character_d): Remove typedef.
16079         (DEF_VEC_O (converted_character_d)): Remove.
16080         (count_next_character): Use std::vector.
16081         (print_converted_chars_to_obstack): Likewise.
16082         (generic_printstr): Likewise.
16083
16084 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16085
16086         * xml-support.h (struct gdb_xml_value): Add constructor.
16087         <value>: Change type to unique_xmalloc_ptr.
16088         (gdb_xml_value_s): Remove typedef.
16089         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16090         (gdb_xml_element_start_handler): Change parameter type to
16091         std::vector.
16092         (xml_find_attribute): Likewise.
16093         * xml-support.c (xml_find_attribute): Change parameter type to
16094         std::vector and adjust.
16095         (gdb_xml_values_cleanup): Remove.
16096         (gdb_xml_parser::start_element): Adjust to std::vector.
16097         (xinclude_start_include): Change paraeter type to std::vector
16098         and adjust.
16099         * btrace.c (check_xml_btrace_version): Likewise.
16100         (parse_xml_btrace_block): Likewise.
16101         (parse_xml_btrace_pt_config_cpu): Likewise.
16102         (parse_xml_btrace_pt): Likewise.
16103         (parse_xml_btrace_conf_bts): Likewise.
16104         (parse_xml_btrace_conf_pt): Likewise.
16105         * memory-map.c (memory_map_start_memory): Likewise.
16106         (memory_map_start_property): Likewise.
16107         * osdata.c (osdata_start_osdata): Likewise.
16108         (osdata_start_item): Likewise.
16109         (osdata_start_column): Likewise.
16110         * remote.c (start_thread): Likewise.
16111         * solib-aix.c (library_list_start_library): Likewise.
16112         (library_list_start_list): Likewise.
16113         * solib-svr4.c (library_list_start_library): Likewise.
16114         (svr4_library_list_start_list): Likewise.
16115         * solib-target.c (library_list_start_segment): Likewise.
16116         (library_list_start_section): Likewise.
16117         (library_list_start_library): Likewise.
16118         (library_list_start_list): Likewise.
16119         * tracepoint.c (traceframe_info_start_memory): Likewise.
16120         (traceframe_info_start_tvar): Likewise.
16121         * xml-syscall.c (syscall_start_syscall): Likewise.
16122         * xml-tdesc.c (tdesc_start_target): Likewise.
16123         (tdesc_start_feature): Likewise.
16124         (tdesc_start_reg): Likewise.
16125         (tdesc_start_union): Likewise.
16126         (tdesc_start_struct): Likewise.
16127         (tdesc_start_flags): Likewise.
16128         (tdesc_start_enum): Likewise.
16129         (tdesc_start_field): Likewise.
16130         (tdesc_start_enum_value): Likewise.
16131         (tdesc_start_vector): Likewise.
16132
16133 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16134
16135         * extension.h (struct xmethod_worker) <clone>: Remove.
16136         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16137         Remove.
16138         (python_xmethod_worker::clone): Remove.
16139         * valops.c (find_overload_match): Use std::move instead of
16140         clone.
16141
16142 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16143
16144         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16145         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16146         <free_xmethod_worker_data>: Remove.
16147         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16148         <get_xmethod_arg_types>: Remove.
16149         <get_xmethod_result_type>: Remove.
16150         <invoke_xmethod>: Remove.
16151         * extension.c (new_xmethod_worker): Remove.
16152         (clone_xmethod_worker): Remove.
16153         (get_matching_xmethod_workers): Return void, pass std::vector by
16154         pointer.
16155         (get_xmethod_arg_types): Rename to...
16156         (xmethod_worker::get_arg_types): ... this, and adjust.
16157         (get_xmethod_result_type): Rename to...
16158         (xmethod_worker::get_result_type): ... this, and adjust.
16159         (invoke_xmethod): Remove.
16160         (free_xmethod_worker): Remove.
16161         (free_xmethod_worker_vec): Remove.
16162         * extension.h (enum ext_lang_rc): Move here from
16163         extension-priv.h.
16164         (struct xmethod_worker): Add constructor and destructor.
16165         <data>: Remove.
16166         <value>: Remove.
16167         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16168         virtual pure methods.
16169         <get_arg_types, get_result_type>: New methods.
16170         (xmethod_worker_ptr): Remove typedef.
16171         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16172         (xmethod_worker_vec): Remove typedef.
16173         (xmethod_worker_up): New typedef.
16174         (invoke_xmethod): Remove.
16175         (clone_xmethod_worker): Remove.
16176         (free_xmethod_worker): Remove.
16177         (free_xmethod_worker_vec): Remove.
16178         (get_xmethod_arg_types): Remove.
16179         (get_xmethod_result_type): Remove.
16180         * valops.c (find_method_list): Use std::vector, don't use
16181         intermediate vector.
16182         (value_find_oload_method_list): Use std::vector.
16183         (find_overload_match): Use std::vector.
16184         (find_oload_champ): Use std::vector.
16185         * value.c (value_free): Use operator delete.
16186         (value_of_xmethod): Rename to...
16187         (value_from_xmethod): ... this.  Don't assign
16188         xmethod_worker::value, take rvalue-reference.
16189         (result_type_of_xmethod): Adjust.
16190         (call_xmethod): Adjust.
16191         * value.h: Include extension.h.
16192         (struct xmethod_worker): Don't forward-declare.
16193         (value_of_xmethod): Rename to...
16194         (value_from_xmethod): ... this, take rvalue-reference.
16195         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16196         (struct python_xmethod_worker): ... this, add constructor and
16197         destructor.
16198         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16199         (gdbpy_free_xmethod_worker_data): Rename to...
16200         (python_xmethod_worker::~python_xmethod_worker): ... this and
16201         adjust.
16202         (gdbpy_clone_xmethod_worker_data): Rename to...
16203         (python_xmethod_worker::clone): ... this and adjust.
16204         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16205         temporary vector.
16206         (gdbpy_get_xmethod_arg_types): Rename to...
16207         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16208         (gdbpy_get_xmethod_result_type): Rename to...
16209         (python_xmethod_worker::do_get_result_type): ... this and
16210         adjust.
16211         (gdbpy_invoke_xmethod): Rename to...
16212         (python_xmethod_worker::invoke): ... this and adjust.
16213         (new_python_xmethod_worker): Rename to...
16214         (python_xmethod_worker::python_xmethod_worker): ... this and
16215         adjust.
16216         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16217         Remove.
16218         (gdbpy_free_xmethod_worker_data): Remove.
16219         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16220         (gdbpy_get_xmethod_arg_types): Remove.
16221         (gdbpy_get_xmethod_result_type): Remove.
16222         (gdbpy_invoke_xmethod): Remove.
16223         * python/python.c (python_extension_ops): Remove obsolete
16224         callbacks.
16225
16226 2018-01-05  Pedro Alves  <palves@redhat.com>
16227
16228         PR gdb/18653
16229         * common/signals-state-save-restore.c
16230         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16231         find a custom handler preinstalled, instead of internal erroring.
16232         But only warn if !quiet.
16233         * common/signals-state-save-restore.h
16234         (save_original_signals_state): New parameter 'quiet'.
16235         * main.c (captured_main_1): Move save_original_signals_state call
16236         after option handling, and pass QUIET.
16237
16238 2018-01-05  Pedro Alves  <palves@redhat.com>
16239
16240         * spu-tdep.c (spu_catch_start): Pass
16241         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16242
16243 2018-01-05  Pedro Alves  <palves@redhat.com>
16244
16245         PR gdb/22670
16246         * ada-lang.c (literal_symbol_name_matcher): New function.
16247         (ada_get_symbol_name_matcher): Use it for
16248         symbol_name_match_type::SEARCH_NAME.
16249         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16250         it down instead of assuming symbol_name_match_type::FULL.
16251         * block.h (block_lookup_symbol): New parameter 'match_type'.
16252         * c-valprint.c (print_unpacked_pointer): Use
16253         lookup_symbol_search_name instead of lookup_symbol.
16254         * compile/compile-object-load.c (get_out_value_type): Pass down
16255         symbol_name_match_type::SEARCH_NAME.
16256         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16257         symbol_name_match_type::FULL.
16258         * cp-support.c (cp_get_symbol_name_matcher): Handle
16259         symbol_name_match_type::SEARCH_NAME.
16260         * infrun.c (insert_exception_resume_breakpoint): Use
16261         lookup_symbol_search_name.
16262         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16263         * psymtab.c (maintenance_check_psymtabs): Use
16264         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16265         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16266         SYMBOL_SEARCH_NAME.
16267         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16268         if symbol_name_match_type::SEARCH_NAME.
16269         (lookup_symbol_in_language): Pass down
16270         symbol_name_match_type::FULL.
16271         (lookup_symbol_search_name): New.
16272         (lookup_language_this): Pass down
16273         symbol_name_match_type::SEARCH_NAME.
16274         (lookup_symbol_aux, lookup_local_symbol): New parameter
16275         'match_type'.  Pass it down.
16276         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16277         (lookup_symbol_search_name): New declaration.
16278         (lookup_symbol_in_block): New 'match_type' parameter.
16279
16280 2018-01-05  Pedro Alves  <palves@redhat.com>
16281
16282         PR gdb/22670
16283         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16284         ada_lookup_symbol.
16285         (ada_lookup_symbol): Reimplement in terms of
16286         ada_lookup_symbol_list, bits factored out from
16287         ada_lookup_encoded_symbol.
16288
16289 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16290
16291         * ada-exp.y (write_object_renaming): When subscripting an array
16292         using a symbol as the index, pass the block in call to
16293         ada_lookup_encoded_symbol when looking that symbol up.
16294
16295 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16296
16297         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16298         TYPE_INDEX_TYPE.
16299
16300 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16301
16302         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16303         the case where VALUE_LVAL (val0) is not lval_memory.
16304
16305 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16306
16307         * ada-valprint.c (print_optional_low_bound): Handle
16308         character-indexed array printing like boolean-indexed array
16309         printing.
16310
16311 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16312
16313         * NEWS: Create a new section for the next release branch.
16314         Rename the section of the current branch, now that it has
16315         been cut.
16316
16317 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16318
16319         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16320         * version.in: Bump version to 8.1.50.DATE-git.
16321
16322 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16323
16324         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16325         Add field.
16326         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16327         Add field.
16328         (default_exception_support_info) <catch_handlers_sym>: Add field.
16329         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16330         (ada_exception_name_addr_1): Add "catch handlers" handling.
16331         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16332         Update all callers.
16333         (create_excep_cond_exprs) <ex>: Add parameter.
16334         (re_set_exception): Update create_excep_cond_exprs call.
16335         (print_it_exception, print_one_exception, print_mention_exception)
16336         (print_recreate_exception): Add "catch handler" handling.
16337         (allocate_location_catch_handlers, re_set_catch_handlers)
16338         (check_status_catch_handlers, print_it_catch_handlers)
16339         (print_one_catch_handlers, print_mention_catch_handlers)
16340         (print_recreate_catch_handlers): New function.
16341         (catch_handlers_breakpoint_ops): New variable.
16342         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16343         Add parameter.  Add "catch handler" handling.
16344         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16345         Add "catch handler" handling.
16346         (ada_exception_catchpoint_cond_string): Add "catch handler"
16347         handling.
16348         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16349         call.
16350         (catch_ada_handlers_command): New function.
16351         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16352         operations structure.
16353         (_initialize_ada_language): Add "catch handlers" command entry.
16354         * NEWS: Document "catch handlers" feature.
16355
16356 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16357
16358         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16359         account when creating the array type of the slice.
16360         (ada_value_slice): Likewise.
16361
16362 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16363
16364         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16365         New enum value.
16366         (create_array_type_with_stride): Add byte_stride_prop parameter.
16367         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16368         New parameter.  Update all callers in this file.
16369         (array_type_has_dynamic_stride): New function.
16370         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16371         of arrays with dynamic byte strides.
16372         * dwarf2read.c (read_array_type): Add support for dynamic
16373         DW_AT_byte_stride attributes.
16374
16375 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16376
16377         * dwarf2read.c (read_unspecified_type): Treat
16378         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16379
16380 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16381
16382         Update copyright year range in all GDB files.
16383
16384 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16385
16386         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16387         and gdb/testsuite/gdb.base/step-line.c.
16388
16389 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16390
16391         * copyright.py (main): Dump the contents of
16392         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16393         even if BY_HAND is empty.
16394
16395 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16396
16397         * top.c (print_gdb_version): Update Copyright year in version
16398         message.
16399
16400 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16401
16402         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16403
16404 For older changes see ChangeLog-2017.
16405 \f
16406 Local Variables:
16407 mode: change-log
16408 left-margin: 8
16409 fill-column: 74
16410 version-control: never
16411 coding: utf-8
16412 End: