Move test_target_ops to a separate file
[external/binutils.git] / gdb / ChangeLog
1 2018-11-30  Pedro Alves  <palves@redhat.com>
2
3         * Makefile.in (COMMON_SFILES): Add test-target.c.
4         * gdbarch-selftests.c: Include "test-target.h".
5         * regcache.c: Include "test-target.h".
6         * target.c (test_target_info, test_target_ops::info): Move to ...
7         * test-target.c: ... this new file.
8         * target.h (test_target_ops): Move to ...
9         * test-target.h: ... this new file.
10
11 2018-11-29  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
12
13         * source.c (forward_search_command): Fix leak by using
14         xrealloc even for the first allocation in the loop, as buf
15         is static.
16
17 2018-11-29  Rajendra SY  <rajendra.sy@gmail.com>
18
19         PR gdb/23093
20         * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
21         (fbsd_gdb_signal_to_target): New.
22         (fbsd_init_abi): Install gdbarch "signal_from_target" and
23         "signal_to_target" methods.
24
25 2018-11-29  Tom Tromey  <tom@tromey.com>
26
27         * valarith.c (value_x_unop): Don't set argvec[3].
28
29 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
30
31         PR gdb/23917
32         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
33         semicolon.
34
35 2018-11-26  Pedro Alves  <palves@redhat.com>
36
37         * procfs.c (procfs_notice_thread): Replace uses of
38         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
39         * sol-thread.c (sol_thread_target::wait)
40         (sol_update_thread_list_callback): Likewise.
41
42 2018-11-25  Tom Tromey  <tom@tromey.com>
43
44         * ui-out.c (ui_out::field_fmt): Remove comment.
45         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
46         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
47
48 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
49
50         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
51         leak in open_source_file' has been partially undone by '2179fbc36d23
52         Return scoped_fd from open_source_file'. Re-add the transfer of
53         current s->fullname to the unique_xmalloc_ptr fullname given
54         to find_and_open_source.
55
56 2018-11-23  Pedro Alves  <palves@redhat.com>
57
58         * gdbthread.h (enum thread_state): Move comments here.
59         (is_running, is_stopped, is_exited): Remove declarations.
60
61 2018-11-22  Pedro Alves  <palves@redhat.com>
62
63         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
64         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
65         ALL_NON_EXITED_THREADS with all_non_exited_threads.
66         (print_one_breakpoint_location): Replace ALL_INFERIORS with
67         all_inferiors.
68         * bsd-kvm.c: Include inferior.h.
69         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
70         with all_non_exited_threads.
71         * common/filtered-iterator.h: New.
72         * common/safe-iterator.h: New.
73         * corelow.c (core_target_open): Don't call init_thread_list here.
74         * darwin-nat.c (thread_info_from_private_thread_info): Replace
75         ALL_THREADS with all_threads.
76         * fbsd-nat.c (fbsd_nat_target::resume): Replace
77         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
78         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
79         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
80         * fork-child.c (postfork_hook): Don't call init_thread_list here.
81         * gdbarch-selftests.c (register_to_value_test): Adjust.
82         * gdbthread.h: Don't include "inferior.h" here.
83         (struct inferior): Forward declare.
84         (enum step_over_calls_kind): Moved here from inferior.h.
85         (thread_info::deletable): Definition moved to thread.c.
86         (find_thread_ptid (inferior *, ptid_t)): Declare.
87         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
88         Include "thread-iter.h".
89         (all_threads, all_non_exited_threads, all_threads_safe): New.
90         (any_thread_p): Declare.
91         (thread_list): Delete.
92         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
93         all_non_exited_threads.
94         (proceed_after_attach_callback): Delete.
95         (proceed_after_attach): Take an inferior pointer instead of an
96         integer PID.  Adjust to use range-for.
97         (attach_post_wait): Pass down inferior pointer instead of pid.
98         Use range-for instead of ALL_NON_EXITED_THREADS.
99         (detach_command): Remove init_thread_list call.
100         * inferior-iter.h: New.
101         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
102         (delete_thread_of_inferior): Delete.
103         (delete_inferior, exit_inferior_1): Use range-for with
104         inf->threads_safe() instead of iterate_over_threads.
105         (inferior_appeared): Call init_thread_list here.
106         (discard_all_inferiors): Use all_non_exited_inferiors.
107         (find_inferior_id, find_inferior_pid): Use all_inferiors.
108         (iterate_over_inferiors): Use all_inferiors_safe.
109         (have_inferiors, number_of_live_inferiors): Use
110         all_non_exited_inferiors.
111         (number_of_inferiors): Use all_inferiors and std::distance.
112         (print_inferior): Use all_inferiors.
113         * inferior.h: Include gdbthread.h.
114         (enum step_over_calls_kind): Moved to gdbthread.h.
115         (struct inferior) <thread_list>: New field.
116         <threads, non_exited_threads, threads_safe>: New methods.
117         (ALL_INFERIORS): Delete.
118         Include "inferior-iter.h".
119         (ALL_NON_EXITED_INFERIORS): Delete.
120         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
121         functions.
122         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
123         ALL_NON_EXITED_THREADS with all_non_exited_threads.
124         * infrun.c (follow_exec): Use all_threads_safe.
125         (clear_proceed_status, proceed): Use all_non_exited_threads.
126         (init_wait_for_inferior): Don't clear inline frame state here.
127         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
128         all_threads instead of ALL_NON_EXITED_THREADS.
129         (random_pending_event_thread): Use all_non_exited_threads instead
130         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
131         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
132         instead of ALL_NON_EXITED_THREADS.
133         (handle_no_resumed): Use all_non_exited_threads instead of
134         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
135         ALL_INFERIORS.
136         (restart_threads, switch_back_to_stepped_thread): Use
137         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
138         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
139         all_inferiors.
140         (kill_unfollowed_fork_children): Use inf->non_exited_threads
141         instead of ALL_NON_EXITED_THREADS.
142         * linux-tdep.c (linux_make_corefile_notes): Use
143         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
144         * linux-thread-db.c (thread_db_target::update_thread_list):
145         Replace ALL_INFERIORS with all_inferiors.
146         (thread_db_target::thread_handle_to_thread_info): Use
147         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
148         * mi/mi-interp.c (multiple_inferiors_p): New.
149         (mi_on_resume_1): Simplify using all_non_exited_threads and
150         multiple_inferiors_p.
151         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
152         instead of ALL_NON_EXITED_THREADS.
153         * nto-procfs.c (nto_procfs_target::open): Don't call
154         init_thread_list here.
155         * record-btrace.c (record_btrace_target_open)
156         (record_btrace_target::stop_recording)
157         (record_btrace_target::close)
158         (record_btrace_target::record_is_replaying)
159         (record_btrace_target::resume, record_btrace_target::wait)
160         (record_btrace_target::record_stop_replaying): Use
161         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
162         * record-full.c (record_full_wait_1): Use all_non_exited_threads
163         instead of ALL_NON_EXITED_THREADS.
164         * regcache.c (cooked_read_test): Remove reference to global
165         thread_list.
166         * remote-sim.c (gdbsim_target::create_inferior): Don't call
167         init_thread_list here.
168         * remote.c (remote_target::update_thread_list): Use
169         all_threads_safe instead of ALL_NON_EXITED_THREADS.
170         (remote_target::process_initial_stop_replies): Replace
171         ALL_INFERIORS with all_non_exited_inferiors and use
172         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
173         (remote_target::open_1): Don't call init_thread_list here.
174         (remote_target::append_pending_thread_resumptions)
175         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
176         instead of ALL_NON_EXITED_THREADS.
177         (remote_target::commit_resume)
178         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
179         with all_non_exited_inferiors and use all_non_exited_threads
180         instead of ALL_NON_EXITED_THREADS.
181         (remote_target::kill_new_fork_children): Use
182         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
183         init_thread_list and init_wait_for_inferior calls.
184         (remote_target::remote_btrace_maybe_reopen)
185         (remote_target::thread_handle_to_thread_info): Use
186         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
187         * target.c (target_terminal::restore_inferior)
188         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
189         all_non_exited_inferiors.
190         * thread-iter.c: New file.
191         * thread-iter.h: New file.
192         * thread.c: Include "inline-frame.h".
193         (thread_list): Delete.
194         (clear_thread_inferior_resources): Call clear_inline_frame_state.
195         (init_thread_list): Use all_threads_safe instead of
196         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
197         (new_thread): Adjust to per-inferior thread lists.
198         (add_thread_silent): Pass inferior to find_thread_ptid.
199         (thread_info::deletable): New, moved from the header.
200         (delete_thread_1): Adjust to per-inferior thread lists.
201         (find_thread_global_id): Use inf->threads().
202         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
203         find_thread_ptid.
204         (find_thread_ptid(inferior*, ptid_t)): New overload.
205         (iterate_over_threads): Use all_threads_safe.
206         (any_thread_p): New.
207         (thread_count): Use all_threads and std::distance.
208         (live_threads_count): Use all_non_exited_threads and
209         std::distance.
210         (valid_global_thread_id): Use all_threads.
211         (in_thread_list): Use find_thread_ptid.
212         (first_thread_of_inferior): Adjust to per-inferior thread lists.
213         (any_thread_of_inferior, any_live_thread_of_inferior): Use
214         inf->non_exited_threads().
215         (prune_threads, delete_exited_threads): Use all_threads_safe.
216         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
217         (set_resumed, set_running): Use all_non_exited_threads.
218         (is_thread_state, is_stopped, is_exited, is_running)
219         (is_executing): Delete.
220         (set_executing, set_stop_requested, finish_thread_state): Use
221         all_non_exited_threads.
222         (print_thread_info_1): Use all_inferiors and all_threads.
223         (thread_apply_all_command): Use all_non_exited_threads.
224         (thread_find_command): Use all_threads.
225         (update_threads_executing): Use all_non_exited_threads.
226         * tid-parse.c (parse_thread_id): Use inf->threads.
227         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
228
229 2018-11-22  Pedro Alves  <palves@redhat.com>
230
231         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
232         switch to it before calling into try_open_exec_file.
233
234 2018-11-22  Pedro Alves  <palves@redhat.com>
235
236         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
237         inferior_thread instead of find_thread_ptid, and only when
238         inferior_ptid is not null_ptid.
239         * inferior.c (add_inferior): Don't include target_pid_to_str
240         output when the inferior is not started.
241         * python/py-inferior.c (python_on_normal_stop): Don't use
242         find_thread_ptid.
243         (tui_on_user_selected_context_changed): Use inferior_thread
244         instead of find_thread_ptid, and only when inferior_ptid is not
245         null_ptid.
246
247 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
248
249         PR python/23714
250         * gdb/python/python.c (execute_gdb_command): Call
251         prevent_dont_repeat earlier to avoid affecting dont_repeat.
252
253 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
254
255         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
256         (HFILES_NO_SRCDIR): Add arch/riscv.h.
257         * arch/riscv.c: New file.
258         * arch/riscv.h: New file.
259         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
260         this list, and add arch/riscv.o.
261         * features/Makefile: Add riscv features.
262         * features/riscv/32bit-cpu.c: New file.
263         * features/riscv/32bit-cpu.xml: New file.
264         * features/riscv/32bit-csr.c: New file.
265         * features/riscv/32bit-csr.xml: New file.
266         * features/riscv/32bit-fpu.c: New file.
267         * features/riscv/32bit-fpu.xml: New file.
268         * features/riscv/64bit-cpu.c: New file.
269         * features/riscv/64bit-cpu.xml: New file.
270         * features/riscv/64bit-csr.c: New file.
271         * features/riscv/64bit-csr.xml: New file.
272         * features/riscv/64bit-fpu.c: New file.
273         * features/riscv/64bit-fpu.xml: New file.
274         * features/riscv/rebuild-csr-xml.sh: New file.
275         * riscv-tdep.c: Add 'arch/riscv.h' include.
276         (riscv_gdb_reg_names): Delete.
277         (csr_reggroup): New global.
278         (struct riscv_register_alias): Delete.
279         (struct riscv_register_feature): New structure.
280         (riscv_register_aliases): Delete.
281         (riscv_xreg_feature): New global.
282         (riscv_freg_feature): New global.
283         (riscv_virtual_feature): New global.
284         (riscv_csr_feature): New global.
285         (riscv_create_csr_aliases): New function.
286         (riscv_read_misa_reg): Delete.
287         (riscv_has_feature): Delete.
288         (riscv_isa_xlen): Simplify, just return cached xlen.
289         (riscv_isa_flen): Simplify, just return cached flen.
290         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
291         (riscv_register_name): Update to make use of tdesc_register_name.
292         Look up xreg and freg names in the new globals riscv_xreg_feature
293         and riscv_freg_feature.  Don't supply csr aliases here.
294         (riscv_fpreg_q_type): Delete.
295         (riscv_register_type): Use tdesc_register_type in almost all
296         cases, override the returned type in a few specific cases only.
297         (riscv_print_one_register_info): Handle errors reading registers.
298         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
299         registers that are otherwise unknown to GDB.  Also check the
300         csr_reggroup.
301         (riscv_print_registers_info): Remove assert about upper register
302         number, and use gdbarch_register_reggroup_p instead of
303         short-cutting.
304         (riscv_find_default_target_description): New function.
305         (riscv_check_tdesc_feature): New function.
306         (riscv_add_reggroups): New function.
307         (riscv_setup_register_aliases): New function.
308         (riscv_init_reggroups): New function.
309         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
310         setup register groups.  Register new riscv debug variable.
311         * riscv-tdep.h: Add 'arch/riscv.h' include.
312         (struct gdbarch_tdep): Remove abi union, and add
313         riscv_gdbarch_features field.  Remove cached quad floating point
314         type, and provide initialisation for double type field.
315         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
316         the list of targets using the feature based target descriptions.
317         * NEWS: Mention target description support.
318
319 2018-11-21  Pedro Alves  <palves@redhat.com>
320
321         * valops.c (find_method_list, value_find_oload_method_list)
322         (find_overload_match, find_oload_champ): Rename parameters and
323         locals.
324
325 2018-11-21  Pedro Alves  <palves@redhat.com>
326
327         * valops.c (find_method_list): Replace pointer and length
328         parameters with an gdb::array_view.  Adjust.
329         (value_find_oload_method_list): Likewise.
330         (find_overload_match): Use gdb::array_view for methods list.
331         Adjust to find_oload_champ interface change.
332         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
333         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
334
335 2018-11-21  Pedro Alves  <palves@redhat.com>
336
337         * gdbtypes.c (compare_badness): Change type of parameters to const
338         reference.  Adjust to badness_vector being a std::vector now.
339         (rank_function): Adjust to badness_vector being a std::vector now.
340         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
341         (LENGTH_MATCH): Delete.
342         (compare_badness): Change type of parameters to const reference.
343         (rank_function): Return a badness_vector by value now.
344         (find_overload_match): Adjust to badness_vector being a
345         std::vector now.  Remove cleanups.
346         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
347         badness_vector pointer.
348         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
349         a badness_vector pointer.  Adjust to badness_vector being a
350         std::vector now.  Remove cleanups.
351         (find_oload_champ): 'oload_champ_bv' parameter now
352         a badness_vector pointer.  Adjust to badness_vector being a
353         std::vector now.  Remove cleanups.
354
355 2018-11-21  Pedro Alves  <palves@redhat.com>
356
357         * cp-support.c (sym_return_val_size, sym_return_val_index)
358         (sym_return_val): Delete.
359         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
360         add to the vector.
361         (make_symbol_overload_list): Adjust to return a std::vector
362         instead of maintaining a global open coded vector.
363         (make_symbol_overload_list_block): Add std::vector parameter.
364         (make_symbol_overload_list_block): Rename to ...
365         (add_symbol_overload_list_block): ... this and add std::vector
366         parameter.
367         (make_symbol_overload_list_namespace): Rename to ...
368         (add_symbol_overload_list_namespace): ... this and add std::vector
369         parameter.
370         (make_symbol_overload_list_adl_namespace): Rename to ...
371         (add_symbol_overload_list_adl_namespace): ... this and add
372         std::vector parameter.
373         (make_symbol_overload_list_adl): Delete.
374         (add_symbol_overload_list_adl): New.
375         (make_symbol_overload_list_using): Rename to ...
376         (add_symbol_overload_list_using): ... this and add std::vector
377         parameter.
378         (make_symbol_overload_list_qualified): Rename to ...
379         (add_symbol_overload_list_qualified): ... this and add std::vector
380         parameter.
381         * cp-support.h: Include "common/array-view.h" and <vector>.
382         (make_symbol_overload_list): Change return type to std::vector.
383         (make_symbol_overload_list_adl): Delete declaration.
384         (add_symbol_overload_list_adl): New declaration.
385         * valops.c (find_overload_match): Local 'oload_syms' now a
386         std::vector.
387         (find_oload_champ_namespace): 'oload_syms' parameter now a
388         std::vector pointer.
389         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
390         std::vector pointer.  Adjust to new make_symbol_overload_list
391         interface.
392
393 2018-11-21  Pedro Alves  <palves@redhat.com>
394
395         * common/array-view.h (array_view::splice(size_type, size_t)): New.
396         (array_view::splice(size_type)): New.
397         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
398         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
399         std::vector.
400         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
401         * extension.h: Include "common/array-view.h".
402         (xmethod_worker::invoke): Adjust to use gdb::array_view.
403         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
404         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
405         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
406         (xmethod_worker::do_get_result_type): Adjust to use
407         gdb::array_view.
408         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
409         * gdbtypes.h: Include "common/array-view.h".
410         (rank_function): Adjust to use gdb::array_view.
411         * python/py-xmethods.c (python_xmethod_worker::invoke)
412         (python_xmethod_worker::do_get_arg_types)
413         (python_xmethod_worker::do_get_result_type)
414         (python_xmethod_worker::invoke): Adjust to new interfaces.
415         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
416         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
417         * valops.c (find_overload_match, find_oload_champ_namespace)
418         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
419         gdb:array_view and the new xmethod_worker interfaces.
420         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
421         gdb::array_view.
422         * value.h (find_overload_match, result_type_of_xmethod)
423         (call_xmethod): Adjust to use gdb::array_view.
424         * unittests/array-view-selftests.c: Add slicing tests.
425
426 2018-11-21  Pedro Alves  <palves@redhat.com>
427
428         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
429         * common/array-view.h (make_array_view): New.
430         * compile/compile-object-run.c (compile_object_run): Adjust to
431         pass an array_view.
432         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
433         * eval.c (eval_call): Adjust to pass an array_view.
434         (evaluate_subexp_standard): Adjust to pass an array_view.
435         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
436         * guile/scm-value.c (gdbscm_value_call): Likewise.
437         * infcall.c (push_dummy_code): Replace pointer + size parameters
438         with an array_view parameter.
439         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
440         adjust.
441         * infcall.h: Include "common/array-view.h".
442         (call_function_by_hand, call_function_by_hand_dummy): Replace
443         pointer + size parameters with an array_view parameter.
444         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
445         * linux-tdep.c (linux_infcall_mmap): Likewise.
446         * objc-lang.c (lookup_objc_class, lookup_child_selector)
447         (value_nsstring, print_object_command): Likewise.
448         * python/py-value.c (valpy_call): Likewise.
449         * rust-lang.c (rust_evaluate_funcall): Likewise.
450         * spu-tdep.c (flush_ea_cache): Likewise.
451         * valarith.c (value_x_binop, value_x_unop): Likewise.
452         * valops.c (value_allocate_space_in_inferior): Likewise.
453         * unittests/array-view-selftests.c (run_tests): Add
454         gdb::make_array_view test.
455
456 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
457
458         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
459         than a fixed size buffer.
460
461 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
462
463         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
464         and remove insertion of extra spaces in GDB's output.
465         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
466         Layout field into a temporary buffer, and then output it as a
467         string field.
468
469 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
470
471         * NEWS: Document the language choice done by
472         'info [types|functions|variables]|rbreak'.
473
474 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
475
476         * symtab.c (treg_matches_sym_type_name): Use
477         scoped_switch_to_sym_language_if_auto instead of local logic.
478         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
479         to switch to SYM language when language mode is auto.
480
481 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
482
483         * language.h (scoped_switch_to_sym_language_if_auto): New class.
484
485 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
486
487         * symtab.c (search_symbols): Properly check absence of type regexp
488         before entering the loop scanning the minimal symbols.
489
490 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
491
492         * s12z-tdep.c (s12z_extract_return_value): New function.
493         (inv_reg_perm) New array.
494         (s12z_return_value): Populate readbuf if non-null.
495
496 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
497
498         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
499         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
500         to MinGW fixed by Gnulib.
501         (O_NOINHERIT): Define if not defined.
502
503 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
504
505         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
506
507 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
508
509         * infrun.c (displaced_step_inferior_state) <next>: Remove.
510
511 2018-11-19  Tom Tromey  <tom@tromey.com>
512
513         * source.c (get_filename_and_charpos): Return void.
514
515 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
516
517         * skip.c (_initialize_step_skip): Fix "info skip" help.
518
519 2018-11-16  Tom Tromey  <tom@tromey.com>
520
521         PR rust/23625:
522         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
523
524 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
525
526         * infrun.c (displaced_step_inferior_states): Change type to
527         std::forward_list.
528         (get_displaced_stepping_state): Adjust.
529         (displaced_step_in_progress_any_inferior): Adjust.
530         (add_displaced_stepping_state): Adjust.
531         (remove_displaced_stepping_state): Adjust.
532
533 2018-11-18  Tom Tromey  <tom@tromey.com>
534
535         PR build/23814:
536         * target-delegates.c: Rebuild.
537         * ia64-linux-nat.c (class ia64_linux_nat_target)
538         <have_steppable_watchpoint>: Use override.  Return true, not 1.
539         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
540         "self" argument.
541         (ia64_linux_nat_target::low_new_thread): Rename.
542         (class ia64_linux_nat_target) <read_description>: Don't declare.
543         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
544         bool.
545
546 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
547
548         PR gdb/22736:
549         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
550         lang_struct_return code.
551
552 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
553
554         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
555         return_method.
556         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
557         * amd64-tdep.c (amd64_push_arguments): Likewise.
558         (amd64_push_dummy_call): Likewise.
559         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
560         * arc-tdep.c (arc_push_dummy_call): Likewise.
561         * arm-tdep.c (arm_push_dummy_call): Likewise.
562         * avr-tdep.c (avr_push_dummy_call): Likewise.
563         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
564         * cris-tdep.c (cris_push_dummy_call): Likewise.
565         * csky-tdep.c (csky_push_dummy_call): Likewise.
566         * frv-tdep.c (frv_push_dummy_call): Likewise.
567         * gdbarch.c: Regenerate.
568         * gdbarch.h: Regenerate.
569         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
570         return_method.
571         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
572         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
573         (hppa64_push_dummy_call): Likewise.
574         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
575         * i386-tdep.c (i386_push_dummy_call): Likewise.
576         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
577         * infcall.c (call_function_by_hand_dummy): Likewise.
578         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
579         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
580         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
581         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
582         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
583         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
584         * mep-tdep.c (mep_push_dummy_call): Likewise.
585         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
586         (mips_n32n64_push_dummy_call): Likewise.
587         (mips_o32_push_dummy_call): Likewise.
588         (mips_o64_push_dummy_call): Likewise.
589         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
590         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
591         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
592         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
593         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
594         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
595         (ppc64_sysv_abi_push_dummy_call): Likewise.
596         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
597         (ppc64_sysv_abi_push_dummy_call): Likewise.
598         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
599         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
600         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
601         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
602         * rx-tdep.c (rx_push_dummy_call): Likewise.
603         * s390-tdep.c (s390_push_dummy_call): Likewise.
604         * score-tdep.c (score_push_dummy_call): Likewise.
605         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
606         (sh_push_dummy_call_nofpu): Likewise.
607         * sparc-tdep.c (sparc32_store_arguments): Likewise.
608         (sparc32_push_dummy_call): Likewise.
609         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
610         (sparc64_push_dummy_call): Likewise.
611         * spu-tdep.c (spu_push_dummy_call): Likewise.
612         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
613         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
614         * v850-tdep.c (v850_push_dummy_call): Likewise.
615         * vax-tdep.c (vax_push_dummy_call): Likewise.
616         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
617         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
618
619 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
620
621         * gdbarch.sh (enum function_call_return_method): Add enum.
622         * gdbarch.h: Regenerate.
623         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
624
625 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
626
627         * unittests/copy_bitwise-selftests.c: New file.
628         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
629         (selftests::copy_bitwise_tests): Delete, moving this code to
630         unittests/copy_bitwise-selftests.c instead.
631         (_initialize_utils): Do not register copy_bitwise tests.
632         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
633         unittests/copy_bitwise-selftests.c.
634
635 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
636
637         * ada-lang.c (move_bits): Delete. Update all callers to use
638         copy_bitwise instead.
639         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
640         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
641         Move from here to utils.c.
642         (_initialize_dwarf2loc): Remove call to register copy_bitwise
643         selftests.
644         * utils.h (copy_bitwise): Add declaration.
645         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
646         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
647         Moved here from dwarf2loc.c.
648         (_initialize_utils): Register copy_bitwise selftests.
649
650 2018-11-14  Jim Wilson  <jimw@sifive.com>
651
652         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
653         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
654         then increment next_regnum if odd.
655         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
656         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
657         function type.  Pass new arg to riscv_arg_location based on function
658         type.
659         (riscv_return_value): Pass new arg to riscv_arg_location.
660
661         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
662         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
663         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
664
665         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
666         setting len.  New local align, set to max of arg align and xlen,
667         and pass to first riscv_assign_stack_location call.
668
669 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
670
671         * skip.c (complete_skip_number): New function.
672         (_initialize_step_skip): Add completers to some skip commands.
673
674 2018-11-09  Tom Tromey  <tom@tromey.com>
675
676         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
677         (struct remote_g_packet_data): Derive from allocate_on_obstack.
678         <guesses>: Now a std::vector.
679         (remote_g_packet_data_init, register_remote_g_packet_guess):
680         Update.
681         (remote_read_description_p): Update.  Return bool.
682         (remote_target::read_description): Update.
683         (struct remote_g_packet_guess): Add constructor.
684
685 2018-11-09  Tom Tromey  <tom@tromey.com>
686
687         * common/scoped_fd.h (class scoped_fd): Add move constructor and
688         move assignment operator.
689         * psymtab.c (psymtab_to_fullname): Update.
690         * source.h (open_source_file): Return scoped_fd.
691         (find_and_open_source): Likewise.
692         * source.c (open_source_file): Return scoped_fd.
693         (get_filename_and_charpos): Update.
694         (print_source_lines_base): Update.  Use scoped_fd::to_file.
695         (forward_search_command): Likewise.
696         (reverse_search_command): Likewise.
697         (find_and_open_source): Return scoped_fd.
698         * tui/tui-source.c (tui_set_source_content): Update.  Use
699         gdb_file_up.
700
701 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
702
703         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
704         overflow.
705
706 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
707
708         * configure: Regenerate.
709
710 2018-11-09  Tom de Vries  <tdevries@suse.de>
711
712         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
713         unconditionally, to set the language of the symbol.  Manage freeing
714         returned pointer using gdb::unique_xmalloc_ptr.
715
716 2018-11-08  Tom Tromey  <tom@tromey.com>
717
718         * record.c (require_record_target): Upper-case "<TAB>".
719
720 2018-11-08  Tom Tromey  <tom@tromey.com>
721
722         * python/lib/gdb/command/pretty_printers.py
723         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
724
725 2018-11-08  Tom Tromey  <tom@tromey.com>
726
727         PR gdb/23555:
728         PR gdb/23838:
729         * target.h (target_supports_terminal_ours): Return bool.
730         * target.c (target_supports_terminal_ours): Handle case where
731         current_top_target returns nullptr.  Return bool.
732
733 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
734
735         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
736         return the correct count for potential HFAs.
737
738 2018-11-08  Jan Beulich  <jbeulich@suse.com>
739
740         * i387-tdep.c (i387_supply_xsave): Split handling of
741         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
742         (i387_collect_xsave): Likewise.
743
744 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
745
746         * riscv-tdep.c (riscv_insn::decode): Update header comment.
747         (riscv_frame_this_id): Catch errors thrown while building the
748         frame cache, leave the frame id as the default, which is the outer
749         frame id.
750
751 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
752
753         * ada-lang.c (read_atcb): Only set task_info->called_task if
754         task_info->state == Entry_Caller_Sleep.
755         (print_ada_task_info): Do not check task_info->state before
756         checking task_info->called_task.
757         (info_task): Likewise.
758
759 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
760
761         * ada-tasks.c (read_atcb): Clear task_info before computing
762         the value of each of its fields.
763
764 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
765
766         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
767         NULL before dereferencing it.
768
769 2018-11-06  Tom de Vries  <tdevries@suse.de>
770
771         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
772         program headers.
773
774 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
775
776         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
777         so that it applies to uclinux as well.
778
779 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
780
781         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
782         when on AAPCS.
783
784 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
785
786         * riscv-fbsd-nat.c (getregs_supplies): Return true for
787         RISCV_CSR_SSTATUS_REGNUM.
788
789 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
790
791         * source.c (open_source_file): Fix leak by transferring the
792         current s->fullname to the unique_xmalloc_ptr fullname given
793         to find_and_open_source.
794
795 2018-11-04  Tom Tromey  <tom@tromey.com>
796
797         * varobj.c (install_default_visualizer): Update.
798         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
799         Return gdbpy_ref.
800         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
801         (find_pretty_printer_from_progspace)
802         (find_pretty_printer_from_gdb, find_pretty_printer)
803         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
804         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
805         Update.
806
807 2018-11-04  Tom Tromey  <tom@tromey.com>
808
809         * python/python.c (gdbpy_parameter_value): Update.
810         * python/python-internal.h (python_string_to_unicode)
811         (python_string_to_target_python_string)
812         (host_string_to_python_string): Return gdbpy_ref.
813         * python/py-utils.c (python_string_to_unicode)
814         (unicode_to_encoded_python_string)
815         (unicode_to_target_python_string)
816         (python_string_to_target_string)
817         (python_string_to_target_python_string): Return gdbpy_ref.
818         (python_string_to_host_string): Update.
819         (host_string_to_python_string): Return gdbpy_ref.
820         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
821         (stpy_fullname): Update.
822         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
823         Update.
824         * python/py-prettyprint.c (print_string_repr): Update.
825         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
826         (objfpy_get_build_id): Update.
827         * python/py-breakpoint.c (bppy_get_location)
828         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
829         Update.
830
831 2018-11-04  Tom Tromey  <tom@tromey.com>
832
833         * python/python-internal.h (gdb_py_object_from_longest)
834         (gdb_py_object_from_ulongest): Return gdbpy_ref.
835         * python/py-value.c (valpy_int): Update.
836         * python/py-utils.c (gdb_py_object_from_longest): Return
837         gdbpy_ref.
838         (gdb_py_object_from_ulongest): Likewise.
839         * python/py-type.c (typy_get_alignof): Update.
840         * python/py-linetable.c (ltpy_get_all_source_lines)
841         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
842         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
843
844 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
845
846         * ada-lang.c (_initialize_ada_language): Fix typo.
847
848 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
849
850         * language.c (type): Remove.
851         (_initialize_language): Remove assignment to type.
852
853 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
854
855         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
856         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
857         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
858         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
859         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
860         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
861         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
862         and aarch64-ravenscar-thread.o.
863         * NEWS: Add entry documenting Ravenscar tasking support
864         on AArch64 ELF.
865
866 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
867
868         * symtab.c (info_functions_command): Initialize quiet flag.
869         * stack.c (info_args_command): Likewise.
870
871 2018-11-01  Jim Wilson  <jimw@sifive.com>
872
873         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
874         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
875         debugging messages.
876
877 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
878
879         * ada-lang.c (ada_watch_location_expression): New function.
880         (ada_language_defn): Set la_watch_location_expression to
881         ada_watch_location_expression.
882
883 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
884
885         * print-utils.c (int_string): Remove unnecessary trailing spaces.
886
887 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
888
889         * rs6000-tdep.c (skip_prologue): Fix potential negative left
890         shifting.
891
892 2018-11-01  Jerome Guitton  <guitton@adacore.com>
893             Joel Brobecker  <brobecker@adacore.com>
894
895         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
896         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
897         * arm-pikeos-tdep.c: New file.
898         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
899         embedded system.
900         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
901
902 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
903
904         * common/pathstuff.c (get_standard_temp_dir): New.
905         * common/pathstuff.h (get_standard_temp_dir): New.
906         * config.in: Re-generate.
907         * configure: Re-generate.
908         * configure.ac: Don't check for mkdtemp.
909         * gnulib/aclocal-m4-deps.mk: Re-generate.
910         * gnulib/aclocal.m4: Re-generate.
911         * gnulib/config.in: Re-generate.
912         * gnulib/configure: Re-generate.
913         * gnulib/import/Makefile.am: Re-generate.
914         * gnulib/import/Makefile.in: Re-generate.
915         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
916         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
917         * gnulib/import/m4/mkdtemp.m4: New file.
918         * gnulib/import/mkdtemp.c: New file.
919         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
920         Add mkdtemp module.
921         * unittests/mkdir-recursive-selftests.c (test): Use
922         get_standard_temp_dir.
923         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
924         ifdef.
925         * compile/compile.c (get_compile_file_tempdir): Likewise.
926
927 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
928
929         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
930         (SIG_FRAME_LR_OFFSET64): New define.
931         (SIG_FRAME_FP_OFFSET64): New define.
932         (aix_sighandle_frame_cache): New Function.
933         (aix_sighandle_frame_this_id): New Function.
934         (aix_sighandle_frame_prev_register): New Function.
935         (aix_sighandle_frame_sniffer): New Function.
936         (aix_sighandle_frame_unwind): New global variable.
937         (rs6000_aix_init_osabi): Install new frame unwinder.
938
939 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
940
941         PR gdb/23835
942         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
943         already defined.
944
945 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
946
947         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
948
949 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
950
951         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
952         (producer_is_icc): New function.
953         (check_producer): Set producer_is_icc field on dwarf2_cu.
954         (dwarf2_init_integer_type): New function.
955         (read_base_type): Call dwarf2_init_integer_type instead of
956         init_integer_type in all cases.
957         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
958         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
959         LEN is greater than 0.
960
961 2018-10-30  Tom Tromey  <tom@tromey.com>
962
963         * main.c (captured_main_1): Check return value of bfd_init.
964
965 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
966
967         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
968         Adjust comments.
969
970 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
971
972         * procfs.c: Include common/pathstuff.h.
973
974 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
975
976         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
977         Add missing braces.  No functional change.
978
979 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
980
981         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
982         to report a bad option and fix indentation.
983         * demangle.c (demangle_command): Use report_unrecognized_option_error
984         to report a bad option and correctly report the bad option.
985
986 2018-10-27  Tom Tromey  <tom@tromey.com>
987
988         PR cli/23364:
989         * darwin-nat.c (copied_shell): New global.
990         (may_have_sip): Rename from should_disable_startup_with_shell.
991         (copy_shell_to_cache, maybe_cache_shell): New functions.
992         (darwin_nat_target::create_inferior): Update.  Use
993         copied_shell.
994
995 2018-10-27  Tom Tromey  <tom@tromey.com>
996
997         * unittests/scoped_fd-selftests.c (test_to_file): New function.
998         (run_tests): Call test_to_file.
999         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1000         temporary files.
1001         * common/scoped_fd.h (scoped_fd::to_file): New method.
1002
1003 2018-10-27  Tom Tromey  <tom@tromey.com>
1004
1005         * unittests/scoped_mmap-selftests.c (test_normal): Use
1006         gdb_mkostemp_cloexec.
1007         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1008         Use gdb_mkostemp_cloexec.
1009         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1010         gnulib/config.in, gnulib/configure,
1011         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1012         gnulib/import/m4/gnulib-cache.m4,
1013         gnulib/import/m4/gnulib-comp.m4: Update.
1014         * gnulib/import/m4/mkostemp.m4: New file.
1015         * gnulib/import/m4/mkstemp.m4: Remove.
1016         * gnulib/import/mkostemp.c: New file.
1017         * gnulib/import/mkstemp.m4: Remove.
1018         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1019         mkstemp, add mkostemp.  Apply new patch.
1020         * gnulib/import/stdlib.in.h: Apply patch.
1021         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1022         New file.
1023         * dwarf-index-write.c (write_psymtabs_to_index): Use
1024         gdb_mkostemp_cloexec.
1025         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1026
1027 2018-10-27  Tom Tromey  <tom@tromey.com>
1028
1029         * unittests/mkdir-recursive-selftests.c: New file.
1030         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1031         unittests/mkdir-recursive-selftests.c.
1032         * dwarf-index-cache.c (mkdir_recursive): Move to
1033         common/filestuff.c.
1034         (index_cache::store): Check return value of mkdir_recursive.
1035         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1036         (_initialize_index_cache): Don't register test.
1037         * common/filestuff.h (mkdir_recursive): Declare.
1038         * common/filestuff.c (mkdir_recursive): Move from
1039         dwarf-index-cache.c.  Return bool.
1040
1041 2018-10-27  Tom Tromey  <tom@tromey.com>
1042
1043         * dwarf-index-write.c (write_psymtabs_to_index): Move
1044         make_temp_filename to common/pathstuff.c.
1045         * common/pathstuff.h (make_temp_filename): Declare.
1046         * common/pathstuff.c (make_temp_filename): New function, moved
1047         from dwarf-index-write.c.
1048
1049 2018-10-27  Tom Tromey  <tom@tromey.com>
1050
1051         * procfs.c (procfs_target::create_inferior): Use get_shell.
1052         * cli/cli-cmds.c (shell_escape): Use get_shell.
1053         * windows-nat.c (windows_nat_target::create_inferior): Use
1054         get_shell.
1055         * common/pathstuff.c (get_shell): New function.
1056         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1057         (fork_inferior): Use get_shell.
1058         * common/pathstuff.h (get_shell): Declare.
1059
1060 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1061
1062         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1063
1064 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1065
1066         * stack.c (print_variable_and_value_data): Add preg and treg.
1067         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1068         and update callers.
1069         (print_frame_arg_vars): Likewise.
1070         (prepare_reg): New function.
1071         (info_locals_command): Extract info print args and use them.
1072         (info_args_command): Likewise.
1073         (_initialize_stack): Modify on-line help.
1074         * symtab.c (treg_matches_sym_type_name): New function.
1075         (search_symbols): New arg t_regexp.
1076         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1077         (info_variables_command): Extract info print args and use them.
1078         (info_functions_command): Likewise.
1079         (info_types_command): Update call to symtab_symbol_info.
1080         (_initialize_symtab): Modify on-line help.
1081         * symtab.h (treg_matches_sym_type_name): New function.
1082         (search_symbols): New t_regexp arg.
1083
1084 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1085
1086         * cli-utils.c (extract_arg_maybe_quoted): New function.
1087         (extract_info_print_args): New function.
1088         (info_print_args_help): New function.
1089         (report_unrecognized_option_error): New function.
1090         * cli-utils.h (extract_arg_maybe_quoted): New function.
1091         (extract_info_print_args): New function.
1092         (info_print_args_help): New function.
1093         (report_unrecognized_option_error): New function.
1094
1095 2018-10-26  Tom Tromey  <tom@tromey.com>
1096
1097         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1098         (compute_compunit_symtab_includes): Update.
1099         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1100         (compunit_symtab_ptr): Likewise.
1101
1102 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1103
1104         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1105         default_print_auxv_entry for specific tag values.
1106
1107 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1108
1109         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1110
1111 2018-10-26  Jim Wilson  <jimw@sifive.com>
1112
1113         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1114         (riscv_linux_sigframe_init): Declare.
1115         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1116         (riscv_linux_sigframe): New.
1117         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1118         (riscv_linux_sigframe_init): Define.
1119         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1120
1121         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1122         (riscv_isa_flen): Likewise.  Drop static.
1123         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1124         (riscv_isa_flen): Likewise.  Declare.
1125
1126 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1127             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1128
1129         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1130         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1131         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1132         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1133         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1134         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1135         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1136         Define.
1137         (struct ppc_linux_features) <htm>: New field.
1138         (ppc_linux_no_features): Add initializer for htm field.
1139         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1140         new tdescs.
1141         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1142         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1143         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1144         Define if not already defined.
1145         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1146         and rs6000/powerpc-isa207-htm-vsx64l.
1147         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1148         rs6000/powerpc-isa207-htm-vsx64l.xml.
1149         * features/rs6000/power-htm-spr.xml: New file.
1150         * features/rs6000/power-htm-core.xml: New file.
1151         * features/rs6000/power64-htm-core.xml: New file.
1152         * features/rs6000/power-htm-fpu.xml: New file.
1153         * features/rs6000/power-htm-altivec.xml: New file.
1154         * features/rs6000/power-htm-vsx.xml: New file.
1155         * features/rs6000/power-htm-ppr.xml: New file.
1156         * features/rs6000/power-htm-dscr.xml: New file.
1157         * features/rs6000/power-htm-tar.xml: New file.
1158         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1159         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1160         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1161         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1162         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1163         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1164         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1165         fetch_regset with HTM regsets.
1166         (store_register, store_ppc_registers): Call store_regset with HTM
1167         regsets.
1168         (ppc_linux_nat_target::read_description): Set htm field in the
1169         features struct if needed.
1170         * ppc-linux-tdep.c: Include
1171         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1172         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1173         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1174         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1175         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1176         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1177         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1178         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1179         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1180         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1181         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1182         (ppc32_linux_ctarregset): New globals.
1183         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1184         (ppc_linux_collect_core_cpgrregset): New function.
1185         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1186         regsets.
1187         (ppc_linux_core_read_description): Check if the tm spr section is
1188         present and set htm in the features struct.
1189         (_initialize_ppc_linux_tdep): Call
1190         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1191         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1192         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1193         Declare.
1194         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1195         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1196         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1197         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1198         New fields.
1199         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1200         Likewise.
1201         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1202         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1203         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1204         New enum fields.
1205         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1206         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1207         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1208         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1209         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1210         <PPC_CTAR_REGNUM>: Likewise.
1211         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1212         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1213         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1214         (IS_CEFP_PSEUDOREG): Define.
1215         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1216         registers.  Return names for the checkpointed DFP, VSX, and EFP
1217         pseudo registers.
1218         (rs6000_pseudo_register_type): Remove initial assert and raise an
1219         internal error in the else clause instead.  Return types for the
1220         checkpointed DFP, VSX, and EFP pseudo registers.
1221         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1222         checkpointed DFP pseudo registers.
1223         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1224         checkpointed VSX pseudo registers.
1225         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1226         from efpr_pseudo_register_read and
1227         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1228         registers.
1229         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1230         Handle checkpointed DFP, VSX, and EFP registers.
1231         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1232         (efp_ax_pseudo_register_collect): New functions.
1233         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1234         register logic to new functions.  Handle checkpointed DFP, VSX,
1235         and EFP pseudo registers.
1236         (rs6000_gdbarch_init): Look for and validate the htm features.
1237         Include checkpointed DFP, VSX and EFP pseudo-registers.
1238         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1239         HTM registers.
1240
1241 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1242
1243         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1244         without altivec or fpu.
1245
1246 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1247             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1248
1249         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1250         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1251         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1252         Define if not already defined.
1253         * features/rs6000/power-ebb.xml: New file.
1254         * features/rs6000/power-linux-pmu.xml: New file.
1255         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1256         features.
1257         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1258         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1259         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1260         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1261         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1262         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1263         fetch_regset with ebb and pmu regsets.
1264         (store_register, store_ppc_registers): Call store_regset with ebb
1265         and pmu regsets.
1266         (ppc_linux_nat_target::read_description): Set isa207 field in the
1267         features struct if ebb and pmu are avaiable.
1268         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1269         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1270         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1271         and pmu regsets.
1272         (ppc_linux_core_read_description): Check if the pmu section is
1273         present and set isa207 in the features struct.
1274         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1275         (ppc32_linux_pmuregset): Declare.
1276         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1277         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1278         <ppc_sier_regnum>: New field.
1279         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1280         New enum values.
1281         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1282         values.
1283         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1284         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1285         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1286         ebb and pmu features.
1287
1288 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1289             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1290
1291         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1292         (tdesc_powerpc_isa207_vsx64l): Declare.
1293         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1294         (struct ppc_linux_features) <isa207>: New field.
1295         (ppc_linux_no_features): Add initializer for isa207 field.
1296         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1297         new tdescs.
1298         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1299         (NT_PPC_TAR): Define if not already defined.
1300         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1301         rs6000/powerpc-isa207-vsx64l.
1302         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1303         rs6000/powerpc-isa207-vsx64l.xml.
1304         * features/rs6000/power-tar.xml: New file.
1305         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1306         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1307         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1308         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1309         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1310         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1311         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1312         fetch_regset with the TAR regset.
1313         (store_register, store_ppc_registers): Call store_regset with the
1314         TAR regset.
1315         (ppc_linux_nat_target::read_description): Set isa207 field in the
1316         features struct if needed.
1317         * ppc-linux-tdep.c: Include
1318         features/rs6000/powerpc-isa207-vsx32l.c and
1319         features/rs6000/powerpc-isa207-vsx64l.c.
1320         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1321         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1322         regset.
1323         (ppc_linux_core_read_description): Check if the tar section is
1324         present and set isa207 in the features struct.
1325         (_initialize_ppc_linux_tdep): Call
1326         initialize_tdesc_powerpc_isa207_vsx32l and
1327         initialize_tdesc_powerpc_isa207_vsx64l.
1328         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1329         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1330         (enum) <PPC_TAR_REGNUM>: New enum value.
1331         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1332         feature.
1333         (ppc_process_record_op31): Record changes to TAR.
1334
1335 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1336             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1337
1338         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1339         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1340         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1341         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1342         (struct ppc_linux_features) <ppr_dscr>: New field.
1343         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1344         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1345         new tdescs.
1346         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1347         Define if not already defined.
1348         * features/Makefile (WHICH): Add
1349         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1350         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1351         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1352         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1353         * features/rs6000/power-dscr.xml: New file.
1354         * features/rs6000/power-ppr.xml: New file.
1355         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1356         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1357         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1358         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1359         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1360         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1361         * ppc-linux-nat.c: Include <sys/uio.h>.
1362         (fetch_regset, store_regset, check_regset): New functions.
1363         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1364         DSCR and PPR regsets.
1365         (store_register, store_ppc_registers): Call store_regset with
1366         DSCR and PPR regsets.
1367         (ppc_linux_get_hwcap2): New function.
1368         (ppc_linux_nat_target::read_description): Call
1369         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1370         features struct if needed.
1371         * ppc-linux-tdep.c: Include
1372         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1373         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1374         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1375         (ppc32_linux_dscrregset): New globals.
1376         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1377         and dscr regsets.
1378         (ppc_linux_core_read_description): Check if the ppr and dscr
1379         sections are present and set ppr_dscr in the features struct.
1380         (_initialize_ppc_linux_tdep): Call
1381         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1382         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1383         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1384         (ppc32_linux_dscrregset): Declare.
1385         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1386         <ppc_dscr_regnum>: New field.
1387         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1388         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1389         and dscr features.
1390         (ppc_process_record_op31): Record changes to PPR and DSCR.
1391
1392 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1393
1394         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1395         second initializer line for the have_* variables.  Initialize
1396         have_fpu to 0 instead of 1.
1397
1398 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1399
1400         * arch/ppc-linux-common.c (ppc_linux_match_description):
1401         Parenthesize tdesc assignements and indent them properly.
1402
1403 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1404
1405         * ppc-linux-nat.c (fetch_register): Change if statement to else
1406         if.
1407         (store_register): Likewise.
1408
1409 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1410
1411         * rs6000-tdep.c: Remove reggroups.h include.
1412         (rs6000_pseudo_register_reggroup_p): Remove.
1413         (rs6000_gdbarch_init): Remove call to
1414         set_tdesc_pseudo_register_reggroup_p.
1415
1416 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1417
1418         * reggroups.c (default_register_reggroup_p): Return true for
1419         decfloat registers and float_reggroup.
1420
1421 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1422
1423         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1424         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1425         ppc_linux_collect_vrregset by regcache_collect_regset.
1426
1427 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1428
1429         * linux-tdep.c (linux_collect_regset_section_cb): Use
1430         std::vector<gdb_byte> instead of char * and malloc for buf.
1431         Remove xfree.
1432
1433 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1434
1435         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1436         symtab_start instead of always using language_unknown.
1437
1438 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1439
1440         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1441         READ_P parameter, catch and ignore register access errors from
1442         either the old or new MISA location.
1443         (riscv_has_feature): Update call to riscv_read_misa_reg.
1444
1445 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1446
1447         * python/py-function.c (convert_values_to_python): Return
1448         gdbpy_ref<>.  Add header comment.
1449         (fnpy_call): Adjust.
1450
1451 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1452
1453         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1454         (cmdpy_completer_handle_brkchars): Adjust.
1455         (cmdpy_completer): Adjust.
1456
1457 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1458
1459         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1460         Pass correct regnum to raw_supply_zeroed.
1461
1462 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1463
1464         * regcache.c (cooked_read_test): Add CSKY to the list of
1465         architectures with a save_reggroup
1466
1467 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
1468
1469         PR gdb/23368
1470         * infrun.c (follow_exec): In the follow_exec_mode_new case,
1471         transfer terminal state from old new new inferior.
1472         * terminal.h (swap_terminal_info): New function.
1473         * inflow.c (swap_terminal_info): New function.
1474
1475 2018-10-23  Tom Tromey  <tom@tromey.com>
1476
1477         * record-btrace.c (get_thread_current_frame_id): Rename from
1478         get_thread_current_frame.  Return a frame_id.
1479         (record_btrace_start_replaying): Update.
1480
1481 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1482
1483         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
1484         for CSRs.
1485
1486 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
1487
1488         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
1489         have_nonsteppable_watchpoint attribute to 1.
1490
1491 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1492
1493         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
1494         register names.
1495         (struct register_alias): Rename to...
1496         (struct riscv_register_alias): ...this, and update comment.
1497         (riscv_register_aliases): Update type, and alias names.  Remove
1498         CSR names from this list.
1499         (riscv_register_name): Use riscv_gdb_reg_names for int and float
1500         register names.  Add an extra assertion.
1501         (riscv_is_regnum_a_named_csr): New function.
1502         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
1503
1504 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
1505
1506         * configure.tgt: Add configuration for s12z.
1507         * s12z-tdep.c:  New file.
1508         * NEWS: Mention new target.
1509
1510 2018-10-22  Jim Wilson  <jimw@sifive.com>
1511
1512         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
1513         FP reg smaller than FP reg size, and fill with -1 instead of 0.
1514
1515         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
1516         (riscv_register_type): Use them.
1517         (riscv_print_one_register_info): Handle union of floats same as float.
1518         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
1519         riscv_fpreg_q_type fields.
1520
1521 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1522
1523         * gdbarch.sh (gdbarch_num_cooked_regs): New.
1524         * gdbarch.h: Re-generate.
1525         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
1526         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
1527         * eval.c (evaluate_subexp_standard): Likewise.
1528         * findvar.c (value_of_register): Likewise.
1529         (value_of_register_lazy): Likewise.
1530         (address_from_register): Likewise.
1531         * frame.c (get_frame_register_bytes): Likewise.
1532         * gdbarch-selftests.c (register_to_value_test): Likewise.
1533         * h8300-tdep.c (h8300_register_type): Likewise.
1534         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
1535         (i386_svr4_reg_to_regnum): Likewise.
1536         * infcmd.c (default_print_registers_info): Likewise.
1537         (registers_info): Likewise.
1538         (print_vector_info): Likewise.
1539         (default_print_float_info): Likewise.
1540         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
1541         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
1542         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
1543         (mi_cmd_data_list_changed_registers): Likewise.
1544         (mi_cmd_data_list_register_values): Likewise.
1545         (mi_cmd_data_write_register_values): Likewise.
1546         (mi_cmd_trace_frame_collected): Likewise.
1547         * mips-tdep.c (print_gp_register_row): Likewise.
1548         (mips_print_registers_info): Likewise.
1549         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1550         * regcache.c (init_regcache_descr): Likewise.
1551         (register_size): Likewise.
1552         (register_dump::dump): Likewise.
1553         (cooked_read_test): Likewise.
1554         (cooked_write_test): Likewise.
1555         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
1556         (rs6000_gdbarch_init): Likewise.
1557         * stabsread.c (stab_reg_to_regnum): Likewise.
1558         * stack.c (info_frame_command): Likewise.
1559         * target-descriptions.c (tdesc_register_name): Likewise.
1560         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
1561         * tui/tui-regs.c (tui_show_register_group): Likewise.
1562         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
1563         (user_reg_map_regnum_to_name): Likewise.
1564         (value_of_user_reg): Likewise.
1565         (maintenance_print_user_registers): Likewise.
1566         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
1567         (xtensa_register_name): Likewise.
1568         (xtensa_register_type): Likewise.
1569         (xtensa_reg_to_regnum): Likewise.
1570         (xtensa_pseudo_register_read): Likewise.
1571         (xtensa_pseudo_register_write): Likewise.
1572
1573 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1574
1575         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
1576         correctly-sized buffer with raw_read.
1577         (amd64_pseudo_register_write): Use correctly-sized buffer for
1578         raw_read/raw_write.
1579
1580 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1581
1582         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
1583         in add_prefix_cmd of set print type.
1584
1585 2018-10-19  Tom Tromey  <tom@tromey.com>
1586
1587         PR tui/18388:
1588         * NEWS: Mention tabset deprecation.
1589         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
1590         (update_tab_width): New function.
1591         (tui_set_tab_width, tui_show_tab_width): New functions.
1592         (tui_set_tab_width_command): Use update_tab_width.
1593         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
1594         Add new "set tui tab-width" command.
1595         * tui/tui-source.c (tui_set_source_content): Update.
1596         * tui/tui-disasm.c (tui_set_disassem_content): Update.
1597         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
1598         Don't declare.
1599         (tui_tab_width): Declare.
1600         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
1601         (tui_set_default_tab_len): Remove.
1602
1603 2018-10-19  Tom Tromey  <tom@tromey.com>
1604
1605         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
1606         (key_is_backspace, tui_getc): Don't declare.
1607         * tui/tui-io.c (key_is_start_sequence): Now static.
1608         (key_is_end_sequence, key_is_backspace): Remove.
1609         (tui_getc): Now static.
1610
1611 2018-10-19  Tom Tromey  <tom@tromey.com>
1612
1613         * symfile.c (reread_symbols): Clear "static_links".
1614
1615 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
1616
1617         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
1618         define.
1619         (aarch64_linux_sigframe_init): Extra boundary checks.
1620
1621 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
1622
1623         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
1624         the possibly non-existent tdesc type 'vec128', but the type of raw
1625         register v16 instead.
1626
1627 2018-10-19  Gary Benson <gbenson@redhat.com>
1628
1629         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
1630
1631 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
1632
1633         PR cli/23785
1634         * cli/cli-dump.c (restore_binary_file): Check if "file" is
1635         NULL.
1636
1637 2018-10-17  Paul Koning  <paul_koning@dell.com>
1638
1639         * charset.c (convert_between_encodings): Fix unsigned overflow.
1640
1641 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
1642
1643         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
1644         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
1645         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
1646         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1647         New functions.
1648         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
1649         and fbsd_info_proc_mappings_header.
1650         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
1651         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1652         New.
1653
1654 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
1655
1656         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
1657         Solaris Maintainer.
1658
1659 2018-10-15  Tom Tromey  <tom@tromey.com>
1660
1661         * tui/tui.c (strcat_to_buf): Remove casts.
1662         * tui/tui-winsource.c (tui_show_source_line)
1663         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
1664         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
1665         * tui/tui-windata.c (tui_first_data_item_displayed)
1666         (tui_delete_data_content_windows, tui_erase_data_content)
1667         (tui_display_all_data, tui_display_data_from)
1668         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
1669         * tui/tui-win.c (tui_set_win_height)
1670         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
1671         casts.
1672         * tui/tui-win.c (tui_resize_all): Remove casts.
1673         (tui_scroll_backward_command, tui_set_focus)
1674         (tui_set_tab_width_command): Likewise.
1675         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
1676         * tui/tui-regs.c (tui_show_register_group): Remove cast.
1677         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
1678         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
1679         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
1680         Remove casts.
1681
1682 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1683
1684         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
1685         AArch64/ARM maintainer.
1686
1687 2018-10-11  Gary Benson <gbenson@redhat.com>
1688
1689         * interps.h (interp::m_name): Make private and mutable.
1690         * interps.c (interp::~interp): Free m_name.
1691
1692 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1693             Simon Marchi <simark@simark.ca>
1694
1695         * README (`configure' options): Add documentation for new
1696         "--enable-unit-tests" option.
1697         * acinclude.m4: Include "selftest.m4".
1698         * configure: Regenerate.
1699         * configure.ac: Use "GDB_AC_SELFTEST".
1700         * maint.c (maintenance_selftest): Update message informing
1701         that selftests have been disabled.
1702         (maintenance_info_selftests): Likewise.
1703         * selftest.m4: New file.
1704
1705 2018-10-10  Gary Benson <gbenson@redhat.com>
1706
1707         * remote.c (remote_target::remote_send_printf): Add
1708         missing va_end found by Coverity.
1709
1710 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
1711
1712         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
1713
1714 2018-10-09  Tom Tromey  <tom@tromey.com>
1715
1716         * configure: Rebuild.
1717         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
1718         * NEWS: Update --enable-ubsan documentation.
1719
1720 2018-10-09  Gary Benson <gbenson@redhat.com>
1721
1722         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
1723         found by Coverity.
1724
1725 2018-10-08  Tom Tromey  <tom@tromey.com>
1726
1727         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
1728         variable.
1729         (riscv_fbsd_init_abi): Likewise.
1730
1731 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1732         * valops.c (value_struct_elt_for_reference): Rename local variable
1733         to work around the shadowing a previous local warning.
1734
1735 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1736
1737         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
1738         * NEWS: Mention new FreeBSD/riscv native configuration.
1739         * configure.host: Add riscv*-*-freebsd*.
1740         * configure.nat: Likewise.
1741         * riscv-fbsd-nat.c: New file.
1742
1743 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1744
1745         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
1746         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
1747         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
1748         * NEWS: Mention new FreeBSD/riscv target.
1749         * configure.tgt: Add riscv*-*-freebsd*.
1750         * riscv-fbsd-tdep.c: New file.
1751         * riscv-fbsd-tdep.h: New file.
1752
1753 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1754
1755         * regcache.h (struct regcache_map_entry): Note that this type can
1756         be used with traditional frame caches.
1757         * trad-frame.c (trad_frame_set_reg_regmap): New.
1758         * trad-frame.h (trad_frame_set_reg_regmap): New.
1759
1760 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1761
1762         PR c++/16841
1763         * valops.c (get_virtual_base_offset): New function.
1764         (value_struct_elt_for_reference): Use it to get virtual base offset
1765         and add it in calculating class member address.
1766
1767 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
1768
1769         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1770         (check_producer): Check if the producer is codewarrior.
1771         (producer_is_codewarrior): New function.
1772         (lnp_state_machine::record_line): Ignore is_stmt flag for records
1773         produced by codewarrior.
1774         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1775
1776 2018-10-06  Tom Tromey  <tom@tromey.com>
1777
1778         PR python/19399:
1779         * python/py-inferior.c: Add "architecture" entry.
1780         (infpy_architecture): New function.
1781
1782 2018-10-06  Tom Tromey  <tom@tromey.com>
1783
1784         PR python/21765:
1785         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1786         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1787         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
1788         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1789
1790 2018-10-06  Tom Tromey  <tom@tromey.com>
1791
1792         PR build/17077:
1793         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1794         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1795         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1796         #include.
1797
1798 2018-10-06  Tom Tromey  <tom@tromey.com>
1799
1800         * python/py-breakpoint.c (bppy_get_location): Handle a
1801         bp_breakpoint without a location.
1802
1803 2018-10-06  Tom Tromey  <tom@tromey.com>
1804
1805         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1806         (_RegEx): Reformat help text.
1807         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1808         (AnyCallerIs, AnyCallerMatches): Reformat help text.
1809         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1810         text.
1811         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1812         (EnableXMethod, DisableXMethod): Remove help indentation.
1813         Capitalize meta-syntactic variables.
1814         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1815         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1816         Capitalize meta-syntactic variables.
1817         * python/lib/gdb/command/explore.py (ExploreCommand)
1818         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1819         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1820         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1821         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1822         Remove help indentation.
1823         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1824         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1825         (DisableFrameFilter, SetFrameFilterPriority)
1826         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1827
1828 2018-10-06  Tom Tromey  <tom@tromey.com>
1829
1830         PR tui/28819:
1831         * tui/tui-io.c (gdb_wgetch): New function.
1832         (tui_mld_getc, tui_getc): Use it.
1833
1834 2018-10-05  Tom Tromey  <tom@tromey.com>
1835
1836         * sol-thread.c (sol_thread_target::wait): Rename inner
1837         "save_ptid".
1838
1839 2018-10-04  Tom Tromey  <tom@tromey.com>
1840
1841         * configure: Rebuild.
1842         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1843
1844 2018-10-04  Tom Tromey  <tom@tromey.com>
1845
1846         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1847         declaration of "block".
1848
1849 2018-10-04  Tom Tromey  <tom@tromey.com>
1850
1851         * common/filestuff.c (fdwalk): Remove inner declaration of
1852         "result".
1853
1854 2018-10-04  Tom Tromey  <tom@tromey.com>
1855
1856         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1857         "structs_addr" and hoist declaration.
1858
1859 2018-10-04  Tom Tromey  <tom@tromey.com>
1860
1861         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1862         variable "size".
1863
1864 2018-10-04  Tom Tromey  <tom@tromey.com>
1865
1866         * mdebugread.c (parse_partial_symbols): Use std::string.
1867
1868 2018-10-04  Tom Tromey  <tom@tromey.com>
1869
1870         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1871         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1872         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1873         header.
1874         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1875         more inner scope.
1876         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1877         * varobj.c (varobj_update): Rename inner "newobj",
1878         "type_changed".
1879         * valprint.c (generic_emit_char): Rename inner "buf".
1880         * valops.c (find_overload_match): Rename inner "temp".
1881         (value_struct_elt_for_reference): Declare "v" in more inner
1882         scope.
1883         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1884         * unittests/array-view-selftests.c (run_tests): Rename inner
1885         "vec".
1886         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1887         header.
1888         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1889         "tsv" in more inner scope.
1890         (print_one_static_tracepoint_marker): Rename inner
1891         "tuple_emitter".
1892         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1893         (tic6x_push_dummy_call): Don't redeclare "addr".
1894         * target-float.c: Declare "dto" lower.
1895         * symtab.c (lookup_local_symbol): Rename inner "sym".
1896         (find_pc_sect_line): Rename inner "pc".
1897         * stack.c (print_frame): Don't redeclare "gdbarch".
1898         (return_command): Rename inner "gdbarch".
1899         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1900         "sp".
1901         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1902         header.
1903         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1904         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1905         scope.
1906         * remote.c (remote_target::update_thread_list): Don't redeclare
1907         "tp".
1908         (remote_target::process_initial_stop_replies): Rename inner
1909         "thread".
1910         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1911         (remote_target::wait_as): Don't redeclare "stop_reply".
1912         (remote_target::get_thread_local_address): Rename inner
1913         "result".
1914         (remote_target::get_tib_address): Likewise.
1915
1916         * regcache.c (cooked_read_test): Rename "regnum".
1917         * record-btrace.c (cmd_record_btrace_start): Rename inner
1918         "exception".
1919         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1920         loop header.
1921         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1922         header.
1923         (ppu2spu_sniffer): Rename inner "buf".
1924         * parse.c (operator_check_standard): Rename inner "type",
1925         "objfile".
1926         * p-valprint.c (pascal_val_print): Introduce new scope for
1927         "low_bound", "high_bound".
1928         * p-exp.y (yylex): Declare "i" in loop header.
1929         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1930         Lower declaration of "s".
1931         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1932         header.
1933         (nios2_push_dummy_call): Rename "len".
1934         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1935         "buf".
1936         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1937         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1938         (linux_xfer_osdata_modules): Likewise.
1939         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1940         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1941         (mips_o64_push_dummy_call): Likewise.
1942         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1943         "op".
1944         * mi/mi-main.c (list_available_thread_groups): Rename inner
1945         "tuple_emitter".
1946         (mi_cmd_data_read_memory): Rename inner "opts".
1947         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1948         "tuple_emitter".
1949         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1950         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1951         more inner scope.
1952         (parse_partial_symbols): Rename inner "pst", "p", "name"
1953         * main.c (captured_main_1): Rename inner "i"s.
1954         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1955         "oso2".
1956         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1957         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1958         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1959         (handle_signal_stop): Rename inner "gdbarch".
1960         (handle_command): Declare "signum" in loop header.
1961         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1962         "status".
1963         (examine_prologue): Rename inner "sol" and "sof".
1964         (ia64_extract_return_value): Rename inner "val".  Declare another
1965         "val" in a more inner scope.
1966         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1967         inner scope.
1968         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1969         "except".
1970         * findvar.c (default_read_var_value): Don't redeclare "addr".
1971         * f-exp.y (yylex): Declare "i" in loop header.
1972         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1973         Rename inner "type", "expect_type".
1974         (evaluate_subexp_for_sizeof): Rename inner "pc".
1975         * elfread.c (elf_symfile_read): Rename inner "abfd".
1976         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1977         "bytes_read".
1978         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1979         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1980         (dwarf_decode_line_header): Rename inner "lh".
1981         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1982         "offset".  Declare "i" in loop header.
1983         (disassemble_dwarf_expression): Rename inner "addr_size".
1984         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1985         inner "result".
1986         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1987         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1988         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1989         "inner_list_emitter".
1990         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1991         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1992         declaration in a block.
1993         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1994         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1995         "obstack_final_size".
1996         * cp-support.c (inspect_type): Declare "i" in loop header.
1997         * compile/compile.c (compile_instance::insert_symbol_error):
1998         Rename inner "e".
1999         * common/agent.c (agent_run_command): Remove inner "ret"
2000         declaration.
2001         * coffread.c (coff_symfile_read): Rename inner "name".
2002         (coff_symfile_read): Rename inner "abfd".
2003         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2004         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2005         "high".
2006         * c-exp.y (lex_one_token): Move "len" declaration lower.
2007         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2008         "gdbarch".
2009         (create_exception_master_breakpoint): Likewise.  Don't redeclare
2010         "b".
2011         (watch_command_1): Declare "mark" later.
2012         (clear_command): Don't shadow "a" or "b".
2013         (delete_command): Rename inner "b".
2014         (delete_trace_command): Likewise.
2015         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2016         "op".
2017         (arm_gdbarch_init): Remove inner "e_flags".
2018         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2019         "offset" in inner blocks.
2020
2021 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2022
2023         * dwarf-index-write.c (file_write): Don't write if the vector is
2024         empty.
2025
2026 2018-10-05  Tom de Vries  <tdevries@suse.de>
2027
2028         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2029         PyArg_ParseTuple call.
2030
2031 2018-10-05  Tom de Vries  <tdevries@suse.de>
2032
2033         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2034         PyArg_ParseTuple call.
2035
2036 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2037
2038         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2039         to avoid exceeding 80 characters per line limit.
2040
2041 2018-10-04  Tom Tromey  <tom@tromey.com>
2042
2043         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2044         (reread_symbols): Update.
2045         * complaints.h (clear_complaints): Remove argument.
2046         * complaints.c (enum complaint_series): Remove.
2047         (series): Remove global.
2048         (complaint_internal): Update.
2049         (clear_complaints): Remove argument.
2050
2051 2018-10-04  Tom Tromey  <tom@tromey.com>
2052
2053         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2054         debugging symbols" message if there is a separate debug objfile.
2055
2056 2018-10-04  Tom Tromey  <tom@tromey.com>
2057
2058         PR cli/19551:
2059         * symfile.c (symbol_file_add_with_addrs): Update output.
2060         * psymtab.c (require_partial_symbols): Update output.
2061
2062 2018-10-04  Tom Tromey  <tom@tromey.com>
2063
2064         PR cli/22234:
2065         * complaints.c: Emit \n.
2066
2067 2018-10-04  Tom Tromey  <tom@tromey.com>
2068
2069         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2070         (separate_debug_file_exists, find_separate_debug_file)
2071         (add_symbol_file_command, reread_symbols, allocate_symtab)
2072         (allocate_compunit_symtab): Use filtered printing, not
2073         unfiltered.
2074         * psymtab.c (require_partial_symbols, dump_psymtab)
2075         (allocate_psymtab): Use filtered printing, not unfiltered.
2076
2077 2018-10-04  Tom Tromey  <tom@tromey.com>
2078
2079         * complaints.c (complaint_internal): Correctly check complaint
2080         count.
2081
2082 2018-10-04  Tom Tromey  <tom@tromey.com>
2083
2084         * complaints.h (struct complaints): Remove declaration.
2085         * complaints.c (clear_complaints): Remove an unused variable.
2086
2087 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2088
2089         * MAINTAINERS (Write After Approval): Add self.
2090
2091 2018-10-03  Tom Tromey  <tom@tromey.com>
2092
2093         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2094         "buffer_contents".
2095         * coffread.c (coff_symtab_read): Initialize "newobj".
2096
2097 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2098
2099         * dwarf2read.c (read_func_scope): Remove struct keyword in
2100         range-based for.
2101
2102 2018-10-03  Tom Tromey  <tom@tromey.com>
2103
2104         * README: Mention --enable-ubsan.
2105         * NEWS: Mention --enable-ubsan.
2106         * acinclude.m4: Include sanitize.m4.
2107         * configure: Rebuild.
2108         * configure.ac: Call AM_GDB_UBSAN.
2109         * sanitize.m4: New file.
2110
2111 2018-10-03  Tom Tromey  <tom@tromey.com>
2112
2113         * expression.h (enum exp_opcode): Use uint8_t as base type.
2114         * expprint.c (op_name): Handle invalid opcodes.
2115
2116 2018-10-03  Tom Tromey  <tom@tromey.com>
2117
2118         * parse.c (prefixify_expression): Add assert.
2119         (parse_exp_in_context_1): Throw exception if the expression is
2120         empty.
2121
2122 2018-10-03  Tom Tromey  <tom@tromey.com>
2123
2124         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2125
2126 2018-10-03  Tom Tromey  <tom@tromey.com>
2127
2128         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2129
2130 2018-10-03  Tom Tromey  <tom@tromey.com>
2131
2132         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2133         unsigned.
2134
2135 2018-10-03  Tom Tromey  <tom@tromey.com>
2136
2137         * findvar.c (extract_integer): Do work in an unsigned type.
2138
2139 2018-10-03  Tom Tromey  <tom@tromey.com>
2140
2141         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2142         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2143         base type.
2144         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2145         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2146         type.
2147         * c-lang.h (enum c_string_type_values): Use unsigned as base
2148         type.
2149         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2150
2151 2018-10-03  Tom Tromey  <tom@tromey.com>
2152
2153         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2154         <~dwarf2_frame_state_reg_info>: Update.
2155         <dwarf2_frame_state_reg_info>: Update.
2156         <alloc_regs>: Add assertion.  Update.
2157         <reg>: Now a std::vector.
2158         <num_regs>: Remove.
2159         <swap>: Update.
2160         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2161         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2162
2163 2018-10-03  Tom Tromey  <tom@tromey.com>
2164
2165         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2166
2167 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2168
2169         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2170
2171 2018-10-02  Tom Tromey  <tom@tromey.com>
2172
2173         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2174
2175 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2176
2177         * NEWS: Mention changed commands.
2178         * ser-uds.c: New file.
2179         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2180         * configure: Regenerate.
2181         * Makefile.in: Add new file.
2182         * serial.c (serial_open): Check if filename is a socket
2183         and lookup the appropriate interface accordingly.
2184
2185 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2186
2187         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2188         define.
2189         (AARCH64_EXTRA_MAGIC): Likewise.
2190         (AARCH64_FPSIMD_MAGIC): Likewise.
2191         (AARCH64_SVE_MAGIC): Likewise.
2192         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2193         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2194         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2195         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2196         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2197         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2198         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2199         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2200         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2201         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2202         (read_aarch64_ctx): Add function.
2203         (aarch64_linux_sigframe_init): Detect FP registers.
2204
2205 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2206
2207         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2208         (AARCH64_D0_REGNUM): Likewise.
2209         (AARCH64_S0_REGNUM): Likewise.
2210         (AARCH64_H0_REGNUM): Likewise.
2211         (AARCH64_B0_REGNUM): Likewise.
2212         (AARCH64_SVE_V0_REGNUM): Likewise.
2213         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2214         (AARCH64_D0_REGNUM): Likewise.
2215         (AARCH64_S0_REGNUM): Likewise.
2216         (AARCH64_H0_REGNUM): Likewise.
2217         (AARCH64_B0_REGNUM): Likewise.
2218         (AARCH64_SVE_V0_REGNUM): Likewise.
2219
2220 2018-10-01  Gary Benson <gbenson@redhat.com>
2221
2222         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2223         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2224         prfpregset_t instead of gdb_prfpregset_t.
2225         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2226         * configure, config.in: Rebuild.
2227
2228 2018-10-01  Gary Benson <gbenson@redhat.com>
2229
2230         * common/gdb_proc_service.h: New file, factored out from...
2231         * gdb_proc_service.h: Moved common code to the above file.
2232         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2233
2234 2018-10-01  Gary Benson <gbenson@redhat.com>
2235
2236         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2237         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2238
2239 2018-10-01  Gary Benson <gbenson@redhat.com>
2240
2241         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2242         (AC_CHECK_HEADERS): Check for linux/elf.h.
2243         * configure, config.in: Rebuild.
2244         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2245         doesn't define elf_fpregset_t.
2246
2247 2018-10-01  Gary Benson <gbenson@redhat.com>
2248
2249         * gdb_proc_service.h: Whitespace change.
2250
2251 2018-10-01  Tom Tromey  <tom@tromey.com>
2252
2253         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2254         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2255         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2256
2257 2018-10-01  Tom Tromey  <tom@tromey.com>
2258
2259         * README: Minor change.
2260
2261 2018-09-30  Pedro Alves  <palves@redhat.com>
2262
2263         * darwin-nat-info.c (darwin_debug_regions_recurse)
2264         (info_mach_exceptions_command): Remove unused local variables.
2265         * darwin-nat.c (darwin_decode_notify_message)
2266         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2267         (darwin_stop_inferior, darwin_setup_exceptions)
2268         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2269         (darwin_nat_target::attach, darwin_nat_target::detach)
2270         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2271         local variables.
2272         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2273         variables.
2274
2275 2018-09-29  Tom Tromey  <tom@tromey.com>
2276
2277         * README: Remove some leftover text.
2278
2279 2018-09-29  Tom Tromey  <tom@tromey.com>
2280
2281         * PROBLEMS: Rewrite.
2282         * README: Update.
2283
2284 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2285
2286         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2287         case with explicit breakpoint kind.
2288         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2289         'additional_info' and related logic.
2290         (riscv_debug_breakpoints): New variable.
2291         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2292         instruction to determine the breakpoint kind.
2293         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2294         flag.  Update description of 'set/show riscv
2295         use-compressed-breakpoints' flag.
2296
2297 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2298
2299         (NEWS): Mention changes to frame related commands.
2300         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2301         (add_prefix_cmd_suppress_notification): New function.
2302         (add_com_suppress_notification): Call
2303         add_cmd_suppress_notification.
2304         * command.h (add_cmd_suppress_notification): Declare.
2305         (add_prefix_cmd_suppress_notification): Declare.
2306         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2307         (parse_frame_specification): Moved from stack.c, with
2308         simplification to handle a single argument.
2309         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2310         switch to the selected frame.  Add a header comment.
2311         * stack.c: Remove 'safe-ctype.h' include.
2312         (find_frame_for_function): Add declaration.
2313         (find_frame_for_address): New function.
2314         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2315         (frame_selection_by_function_completer): New function.
2316         (info_frame_command): Rename to...
2317         (info_frame_command_core): ...this, and update parameter types.
2318         (select_frame_command): Rename to...
2319         (select_frame_command_core): ...this, and update parameter types.
2320         (frame_command): Rename to...
2321         (frame_command_core): ...this, and update parameter types.
2322         (class frame_command_helper): New class to wrap implementations of
2323         frame related sub-commands.
2324         (frame_apply_cmd_list): New static global.
2325         (frame_cmd_list): Make static.
2326         (select_frame_cmd_list): New global for sub-commands.
2327         (info_frame_cmd_list): New global for sub-commands.
2328         (_initialize_stack): Register sub-commands for 'frame',
2329         'select-frame', and 'info frame'.  Update 'frame apply' commands
2330         to use frame_apply_cmd_list.  Move function local static
2331         frame_apply_list to file static frame_apply_cmd_list for
2332         consistency.
2333         * stack.h (select_frame_command): Delete declarationn.
2334         (select_frame_for_mi): Declare new function.
2335
2336 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2337
2338         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2339         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2340         and NOP.
2341
2342 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2343
2344         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2345
2346 2018-09-26  Tom Tromey  <tom@tromey.com>
2347
2348         * valops.c (auto_abandon): Remove dead code.
2349
2350 2018-09-26  Tom Tromey  <tom@tromey.com>
2351
2352         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2353
2354 2018-09-24  Tom Tromey  <tom@tromey.com>
2355
2356         * common/pathstuff.c (get_standard_cache_dir): Make
2357         "xdg_cache_home" and "home" const.
2358         * top.c (init_history): Make "tmpenv" const.
2359         * main.c (get_init_files): Make "homedir" const.
2360
2361 2018-09-23  Tom Tromey  <tom@tromey.com>
2362
2363         PR python/18852:
2364         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2365
2366 2018-09-23  Tom Tromey  <tom@tromey.com>
2367
2368         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2369         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2370         * python/python-internal.h (gdbpy_handle_exception): Declare.
2371         * python/py-utils.c (gdbpy_handle_exception): New function.
2372
2373 2018-09-23  Tom Tromey  <tom@tromey.com>
2374
2375         PR python/17284:
2376         * python/py-type.c (typy_template_argument): Check for negative
2377         argument number.
2378
2379 2018-09-23  Tom Tromey  <tom@tromey.com>
2380
2381         PR python/14062:
2382         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2383
2384 2018-09-23  Tom Tromey  <tom@tromey.com>
2385
2386         PR python/18170:
2387         * python/py-value.c (valpy_int): Allow conversion from pointer
2388         type.
2389
2390 2018-09-23  Tom Tromey  <tom@tromey.com>
2391
2392         PR python/20126:
2393         * python/py-value.c (valpy_int): Respect type sign.
2394
2395 2018-09-23  Tom Tromey  <tom@tromey.com>
2396
2397         PR python/18352;
2398         * python/py-value.c (valpy_float): Allow conversions from int or
2399         char.
2400         (valpy_int, valpy_long): Allow conversions from float.
2401
2402 2018-09-23  Tom Tromey  <tom@tromey.com>
2403
2404         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2405         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2406
2407 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2408
2409         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2410         __sighndlr.
2411         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2412
2413 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2414
2415         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2416         target_terminal::ours().
2417
2418 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2419
2420         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2421         of vl to ULONGEST.
2422
2423 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2424
2425         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2426         redundant condition.
2427
2428 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2429
2430         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2431
2432         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2433         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2434         * sol-thread.c (ps_pdmodel): Don't guard definition.
2435
2436         * procfs.c: Fix formatting.
2437
2438         * procfs.c (sysset_t_alloc): Remove.
2439         (create_procinfo): Use XNEW instead of sysset_t_alloc.
2440         (procfs_debug_inferior): Likewise.
2441         (procfs_set_exec_trap): Likewise.
2442         (proc_set_traced_sysentry): Don't allocate argp dynamically.
2443         (proc_set_traced_sysexit): Likewise.
2444
2445         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2446         (dead_procinfo): Likewise.
2447         (proc_warn): Likewise.
2448         (proc_error): Likewise.
2449         (proc_get_LDT_entry): Likewise.
2450         (do_attach): Likewise.
2451         (procfs_target::pid_to_str): Likewise.
2452         (iterate_over_mappings): Likewise.
2453
2454         * procfs.c (create_procinfo): Fix ARI warning.
2455         (proc_get_status): Likewise.
2456         (proc_stop_process): Likewise.
2457         (proc_run_process): Likewise.
2458         (proc_kill): Likewise.
2459         (proc_get_LDT_entry): Likewise.
2460         (procfs_find_LDT_entry): Likewise.
2461         (proc_update_threads): Likewise.
2462         (proc_iterate_over_threads): Likewise.
2463         (do_attach): Likewise.
2464         (procfs_xfer_memory): Likewise.
2465         (invalidate_cache): Likewise.
2466         (procfs_target::resume): Likewise.
2467         (procfs_init_inferior): Likewise.
2468         (procfs_set_exec_trap): Likewise.
2469         (procfs_target::thread_alive): Likewise.
2470         (procfs_target::pid_to_exec_file): Likewise.
2471         (iterate_over_mappings): Likewise.
2472         (procfs_target::make_corefile_notes): Likewise.
2473         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2474
2475         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
2476         (procfs_find_LDT_entry): Likewise.
2477         * sol-thread.c (ps_lgetLDT): Likewise.
2478
2479 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2480
2481         PR tdep/17903
2482         * procfs.c (procfs_target): Declare pid_to_exec_file.
2483         (procfs_target::pid_to_exec_file): New.
2484
2485 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2486
2487         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
2488         renaming.
2489         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
2490         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
2491
2492 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2493
2494         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
2495         (supply_fpregset, fill_fpregset): Move ...
2496         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
2497         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
2498         Remove references to ioctl-based procfs.
2499         Include <sys/reg.h>.
2500         Remove PR_MODEL_NATIVE guards.
2501         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
2502         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
2503
2504 2018-09-19  Xavier Roirand  <roirand@adacore.com>
2505
2506         PR gdb/20981:
2507         * solib-darwin.c (darwin_get_dyld_bfd): New function.
2508         (darwin_solib_get_all_image_info_addr_at_init): Update call.
2509         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
2510
2511 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
2512
2513         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
2514         (fbsd_print_sockaddr_in6): Likewise.
2515
2516 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
2517             Chris January  <chris.january@arm.com>
2518
2519         * eval.c (skip_undetermined_arglist): Skip argument list helper.
2520         (evaluate_subexp_standard): Return a dummy type when
2521         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
2522         OP_F77_UNDETERMINED_ARGLIST case.
2523         * expression.h (enum noside): Update comment.
2524
2525 2018-09-19  George Vasick <george.vasick@oracle.com>
2526
2527         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
2528
2529 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
2530             April Chin <april.chin@oracle.com>
2531             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2532
2533         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
2534         uint_t lwpid_t.
2535         (create_procinfo): Print pids in /proc without leading zeros.
2536
2537 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
2538
2539         * nios2-tdep.c (nios2_gcc_target_options): New.
2540         (nios2_gdb_arch_init): Install new hook.
2541
2542 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2543
2544         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
2545         New file.
2546         * update-gnulib.sh: Apply patch.
2547         * configure: Re-generate.
2548
2549 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2550
2551         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
2552         description.  Make "info proc" command descriptions more
2553         consistent.
2554
2555 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2556
2557         * NEWS: Mention 'info proc files' command.
2558
2559 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2560
2561         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
2562         descriptors for IP_FILES and IP_ALL.
2563
2564 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2565
2566         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
2567         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
2568         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
2569         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
2570         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
2571         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
2572         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
2573         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
2574         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
2575         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
2576         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
2577         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
2578         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
2579         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
2580         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
2581         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
2582         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
2583         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
2584         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
2585         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
2586         (struct fbsd_sockaddr_un): New types.
2587         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
2588         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
2589         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
2590         (fbsd_core_info_proc_files): New functions.
2591         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
2592         IP_ALL.
2593         * fbsd-tdep.h (fbsd_info_proc_files_header)
2594         (fbsd_info_proc_files_entry): New.
2595
2596 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2597
2598         * defs.h (enum info_proc_what) [IP_FILES]: New value.
2599         * infcmd.c (info_proc_cmd_files): New function.
2600         (_initialize_infcmd): Register 'info proc files' command.
2601
2602 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2603
2604         * gnulib/aclocal-m4-deps.mk: Re-generate.
2605         * gnulib/aclocal.m4: Re-generate.
2606         * gnulib/config.in: Re-generate.
2607         * gnulib/configure: Re-generate.
2608         * gnulib/import/Makefile.am: Re-generate.
2609         * gnulib/import/Makefile.in: Re-generate.
2610         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2611         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2612         * gnulib/import/arpa_inet.in.h: New file.
2613         * gnulib/import/inet_ntop.c: New file.
2614         * gnulib/import/m4/arpa_inet_h.m4: New file.
2615         * gnulib/import/m4/inet_ntop.m4: New file.
2616         * gnulib/import/m4/netinet_in_h.m4: New file.
2617         * gnulib/import/m4/socklen.m4: New file.
2618         * gnulib/import/m4/sockpfaf.m4: New file.
2619         * gnulib/import/m4/stdalign.m4: New file.
2620         * gnulib/import/m4/sys_uio_h.m4: New file.
2621         * gnulib/import/netinet_in.in.h: New file.
2622         * gnulib/import/stdalign.in.h: New file.
2623         * gnulib/import/sys_socket.c: New file.
2624         * gnulib/import/sys_socket.in.h: New file.
2625         * gnulib/import/sys_uio.in.h: New file.
2626         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
2627         module.
2628
2629 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2630
2631         * gnulib/aclocal-m4-deps.mk: New file.
2632         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
2633         deterministically.
2634
2635 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2636
2637         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
2638         KVE_PATH.
2639
2640 2018-09-18  Tom Tromey  <tom@tromey.com>
2641
2642         * compile/compile-object-load.c (struct
2643         link_hash_table_cleanup_data): Add constructor and destructor.
2644         Use DISABLE_COPY_AND_ASSIGN.
2645         (~link_hash_table_cleanup_data): Rename from
2646         link_hash_table_free.  Now a destructor.
2647         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
2648
2649 2018-09-18  Tom Tromey  <tom@tromey.com>
2650
2651         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2652         * compile/compile-object-load.c (struct munmap_list): Move to
2653         header file.
2654         (munmap_list::add): Rename from munmap_list_add; rewrite.
2655         (munmap_list::~munmap_list): Rename from munmap_list_free.
2656         (munmap_listp_free_cleanup): Remove.
2657         (compile_object_load): Update.
2658         * compile/compile-object-load.h (struct munmap_list): Move from
2659         compile-object-load.c.  Rewrite.
2660
2661 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
2662
2663         * aarch64-tdep.c (pass_in_v): Use register size.
2664         (aarch64_extract_return_value): Likewise.
2665         (aarch64_store_return_value): Likewise.
2666
2667 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2668
2669         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
2670         rlim_t.
2671
2672 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2673
2674         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
2675         Fix short help line.
2676
2677 2018-09-17  Tom Tromey  <tom@tromey.com>
2678
2679         PR python/20445:
2680         * configure: Rebuild.
2681         * configure.ac: Conditionally use -DNDEBUG for Python.
2682
2683 2018-09-17  Tom Tromey  <tom@tromey.com>
2684
2685         * configure: Rebuild.
2686         * configure.ac: Use gmp as a library dependency when checking for
2687         mpfr.
2688
2689 2018-09-17  Pedro Alves  <palves@redhat.com>
2690
2691         * python/py-inferior.c (find_inferior_object): Delete.
2692
2693 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
2694
2695         * compile/compile-cplus-types.c
2696         (compile_cplus_instance::enter_scope): Don't use new_scope after
2697         std::move.
2698
2699 2018-09-17  Tom Tromey  <tom@tromey.com>
2700
2701         * common/pathstuff.c (get_standard_cache_dir): Use
2702         ~/Library/Caches on macOS.
2703         * common/pathstuff.h (get_standard_cache_dir): Update comment.
2704
2705 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
2706
2707         PR python/23669
2708         * breakpoint.c (commands_cmd_element): New.
2709         (_initialize_breakpoint): Assign commands_cmd_element.
2710         * breakpoint.h (commands_cmd_element): New.
2711         * cli/cli-script.c (while_cmd_element, if_command,
2712         define_cmd_element): New.
2713         (command_name_equals): Remove.
2714         (process_next_line): Compare commands by pointer, not by name.
2715         (_initialize_cli_script): Assign the various cmd_list_element
2716         variables.
2717         * compile/compile.c (compile_cmd_element): New.
2718         (_initialize_compile): Assign compile_cmd_element.
2719         * compile/compile.h (compile_cmd_element): New.
2720         * guile/guile.c (guile_cmd_element): New.
2721         (install_gdb_commands): Assign guile_cmd_element.
2722         * guile/guile.h (guile_cmd_element): New.
2723         * python/python.c (python_cmd_element): New.
2724         (_initialize_python): Assign python_cmd_element.
2725         * python/python.h (python_cmd_element): New.
2726         * tracepoint.c (while_stepping_cmd_element): New.
2727         (_initialize_tracepoint): Assign while_stepping_cmd_element.
2728         * tracepoint.h (while_stepping_cmd_element): New.
2729
2730 2018-09-17  Tom Tromey  <tom@tromey.com>
2731
2732         * infrun.c (save_infcall_suspend_state): Return
2733         infcall_suspend_state_up.
2734         (save_infcall_control_state): Return infcall_control_state_up.
2735         * inferior.h (save_infcall_suspend_state)
2736         (save_infcall_control_state): Declare later.  Return unique
2737         pointers.
2738
2739 2018-09-17  Tom Tromey  <tom@tromey.com>
2740
2741         * infrun.c (struct stop_context): Declare constructor,
2742         destructor, "changed" method.
2743         (stop_context::stop_context): Rename from save_stop_context.
2744         (stop_context::~stop_context): Rename from
2745         release_stop_context_cleanup.
2746         (normal_stop): Update.
2747         (stop_context::changed): Rename from stop_context_changed.  Return
2748         bool.
2749
2750 2018-09-17  Tom Tromey  <tom@tromey.com>
2751
2752         * inferior.h (struct infcall_suspend_state_deleter): New.
2753         (infcall_suspend_state_up): New typedef.
2754         (struct infcall_control_state_deleter): New.
2755         (infcall_control_state_up): New typedef.
2756         (make_cleanup_restore_infcall_suspend_state)
2757         (make_cleanup_restore_infcall_control_state): Don't declare.
2758         * infcall.c (call_function_by_hand_dummy): Update.
2759         * infrun.c (do_restore_infcall_suspend_state_cleanup)
2760         (make_cleanup_restore_infcall_suspend_state): Remove.
2761         (do_restore_infcall_control_state_cleanup)
2762         (make_cleanup_restore_infcall_control_state): Remove.
2763
2764 2018-09-17  Tom Tromey  <tom@tromey.com>
2765
2766         * gdbthread.h (struct thread_control_state): Add initializer.
2767         (class thread_info) <control>: Remove initializer.
2768         * inferior.h (struct inferior_control_state): Add initializer.
2769         (class inferior) <control>: Remove initializer.
2770         (exit_inferior_1): Update.
2771         * infrun.c (struct infcall_control_state): Add constructors.
2772         (save_infcall_control_state): Use new.
2773         (restore_infcall_control_state, discard_infcall_control_state):
2774         Use delete.
2775
2776 2018-09-17  Tom Tromey  <tom@tromey.com>
2777
2778         * infrun.c (struct infcall_suspend_state) <registers>: Now a
2779         unique_ptr.
2780         <siginfo_data>: Now a unique_xmalloc_ptr.
2781         (save_infcall_suspend_state, restore_infcall_suspend_state)
2782         (discard_infcall_suspend_state)
2783         (get_infcall_suspend_state_regcache): Update.
2784
2785 2018-09-17  Tom Tromey  <tom@tromey.com>
2786
2787         * gdbthread.h (struct thread_suspend_state): Add initializers.
2788         (class thread_info) <suspend>: Remove initializer.
2789         * infrun.c (struct infcall_suspend_state): Add initializers.
2790         (save_infcall_suspend_state): Use new.
2791         (discard_infcall_suspend_state): Use delete.
2792
2793 2018-09-16  Tom Tromey  <tom@tromey.com>
2794
2795         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2796         Remove.
2797         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2798         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2799         (py_varobj_iter_new): Likewise.
2800         (py_varobj_get_iterator): Use gdbpy_ref.
2801
2802 2018-09-16  Tom Tromey  <tom@tromey.com>
2803
2804         * python/py-threadevent.c (py_get_event_thread): Simplify.
2805         * python/py-inferior.c (infpy_thread_from_thread_handle):
2806         Return immediately after calling thread_to_thread_object.  Use
2807         Py_RETURN_NONE.
2808         (thread_to_thread_object): Set the exception on a NULL return.
2809
2810 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2811
2812         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2813
2814 2018-09-16  Tom Tromey  <tom@tromey.com>
2815
2816         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2817         Remove.
2818
2819 2018-09-16  Tom Tromey  <tom@tromey.com>
2820
2821         * python/python-internal.h (thread_to_thread_object): Change
2822         return type.
2823         * python/py-inferior.c (thread_to_thread_object): Return a new
2824         reference.
2825         (infpy_thread_from_thread_handle): Update.
2826         * python/py-infthread.c (gdbpy_selected_thread): Update.
2827         * python/py-stopevent.c (create_stop_event_object): Update.
2828         * python/py-threadevent.c (py_get_event_thread): Return a new
2829         reference.
2830         (py_get_event_thread): Update.
2831         * python/py-event.h (py_get_event_thread): Change return type.
2832         * python/py-continueevent.c (create_continue_event_object):
2833         Update.
2834
2835 2018-09-16  Tom Tromey  <tom@tromey.com>
2836
2837         * python/py-progspace.c (pspy_get_objfiles): Update.
2838         * python/python-internal.h (objfile_to_objfile_object): Change
2839         return type.
2840         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2841         Update.
2842         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2843         Update.
2844         * python/python.c (gdbpy_get_current_objfile): Update.
2845         (gdbpy_objfiles): Update.
2846         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2847         Update.
2848         (objfile_to_objfile_object): Return a new reference.
2849         * python/py-symtab.c (stpy_get_objfile): Update.
2850         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2851         Update.
2852
2853 2018-09-16  Tom Tromey  <tom@tromey.com>
2854
2855         * python/py-inferior.c (infpy_get_progspace): Update.
2856         * python/python-internal.h (pspace_to_pspace_object): Change
2857         return type.
2858         * python/py-newobjfileevent.c
2859         (create_clear_objfiles_event_object): Update.
2860         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2861         Update.
2862         * python/python.c (gdbpy_get_current_progspace): Update.
2863         (gdbpy_progspaces): Update.
2864         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2865         reference.
2866         * python/py-objfile.c (objfpy_get_progspace): Update.
2867         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2868         Update.
2869
2870 2018-09-16  Tom Tromey  <tom@tromey.com>
2871
2872         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2873         (solib_name, block_for_pc, find_pc_line): New functions.
2874         (execute_unwinders): Update.
2875         * python/py-block.c (gdbpy_block_for_pc): Remove.
2876         * python/py-inferior.c (infpy_get_progspace): New function.
2877         (inferior_object_getset) <progspace>: Add.
2878         * python/py-progspace.c (pspy_objfiles): Rewrite.
2879         (pspy_solib_name, pspy_block_for_pc)
2880         (pspy_find_pc_line, pspy_is_valid): New functions.
2881         (progspace_object_methods): Add entries for solib_name,
2882         block_for_pc, find_pc_line, is_valid.
2883         * python/python-internal.h (gdbpy_block_for_pc)
2884         (build_objfiles_list): Don't declare.
2885         * python/python.c: Don't include solib.h.
2886         (gdbpy_solib_name, gdbpy_find_pc_line)
2887         (gdbpy_get_current_progspace, build_objfiles_list)
2888         (gdbpy_objfiles): Remove.
2889         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2890         solib_name, find_pc_line>: Remove entries.
2891
2892 2018-09-16  Tom Tromey  <tom@tromey.com>
2893
2894         * top.c (new_ui_command): Use GNU style for metasyntactic
2895         variables.
2896         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2897         variables.
2898         * maint.c (maintenance_translate_address): Remove "<>" around
2899         text.
2900         * interps.c (interpreter_exec_cmd): Use GNU style for
2901         metasyntactic variables.
2902         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2903         metasyntactic variables.
2904         * tracepoint.c (tfind_range_command): Use GNU style for
2905         metasyntactic variables.
2906         (tfind_outside_command): Likewise.
2907         (_initialize_tracepoint): Likewise.
2908         * remote.c (extended_remote_target::create_inferior): Use GNU
2909         style for metasyntactic variables.
2910         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2911         metasyntactic variables.
2912         (adi_assign_command): Likewise.
2913
2914 2018-09-16  Tom Tromey  <tom@tromey.com>
2915
2916         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2917         metasyntactic variables.  Print message if no disassembler options
2918         are available.
2919
2920 2018-09-15  Tom Tromey  <tom@tromey.com>
2921
2922         * infcmd.c (get_inferior_args): Return const char *.
2923         * inferior.h (get_inferior_args): Return type now const.
2924         * linux-tdep.c (linux_fill_prpsinfo): Update.
2925         * procfs.c (procfs_target::make_corefile_notes): Update.
2926
2927 2018-09-07  Tom Tromey  <tom@tromey.com>
2928
2929         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2930         inside the TRY.
2931
2932 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2933
2934         * nios2-tdep.c (nios2_type_align): New.
2935         (nios2_gdb_arch_init): Install type_align hook.
2936
2937 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2938
2939         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2940         type that is neither object file owned, nor gdbarch owned.
2941         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2942         gdbarch is non-NULL.
2943         (alloc_type_instance): Allocate non-objfile owned types on the
2944         gdbarch obstack.
2945         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2946         using TYPE_ALLOC to ensure memory is allocated on the correct
2947         obstack.
2948         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2949         obstack, or the gdbarch obstack.
2950         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2951
2952 2018-09-14  Tom Tromey  <tom@tromey.com>
2953
2954         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2955         block.
2956
2957 2018-09-14  Tom Tromey  <tom@tromey.com>
2958
2959         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2960
2961 2018-09-13  Tom Tromey  <tom@tromey.com>
2962
2963         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2964         static.
2965
2966 2018-09-13  Tom Tromey  <tom@tromey.com>
2967
2968         * exec.c (try_open_exec_file): Use std::string.
2969
2970 2018-09-13  Tom Tromey  <tom@tromey.com>
2971
2972         * utils.h (gdb_bfd_errmsg): Return std::string.
2973         * exec.c (exec_file_attach): Update.
2974         * compile/compile-object-load.c (compile_object_load): Update.
2975         * utils.c (gdb_bfd_errmsg): Return std::string.
2976
2977 2018-09-13  Tom Tromey  <tom@tromey.com>
2978
2979         * procfs.c (struct procinfo_deleter): New.
2980         (procinfo_up): New typedef.
2981         (do_destroy_procinfo_cleanup): Remove.
2982         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2983
2984 2018-09-13  Tom Tromey  <tom@tromey.com>
2985
2986         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2987
2988 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2989 2018-09-13  Tom Tromey  <tom@tromey.com>
2990
2991         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2992         (pspy_get_objfiles): New function.
2993         (progspace_object_methods): New.
2994         (pspace_object_type): Add tp_methods callback.
2995         * python/python-internal.h (build_objfiles_list): New
2996         declaration.
2997         * python/python.c (build_objfiles_list): New function.
2998         (gdbpy_objfiles): Implement using build_objfiles_list.
2999         * NEWS: Mention the Progspace.objfiles method.
3000
3001 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3002
3003         * python/py-inferior.c (infpy_get_progspace): New function.
3004         (inferior_object_getset): Add progspace property.
3005         * NEWS: Mention the new property.
3006
3007 2018-09-13  Tom Tromey  <tom@tromey.com>
3008
3009         PR rust/23650:
3010         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3011
3012 2018-09-13  Tom Tromey  <tom@tromey.com>
3013
3014         PR rust/23626:
3015         * rust-lang.c (rust_enum_variant): Now static.
3016         (rust_empty_enum_p): New function.
3017         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3018         Handle empty enum.
3019
3020 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3021
3022         * python/py-inferior.c (infpy_repr): New.
3023         (inferior_object_type): Register infpy_repr.
3024         * python/py-objfile.c (objfpy_repr): New.
3025         (objfile_object_type): Register objfpy_repr.
3026
3027 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3028
3029         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3030
3031 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3032
3033         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3034         typo.
3035
3036 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3037
3038         * common/common-utils.c: Don't include '<sys/stat.h>'.
3039         (is_regular_file): Move to...
3040         * common/filestuff.c (is_regular_file): ... here.
3041         * common/common-utils.h (is_regular_file): Move to...
3042         * common/filestuff.h (is_regular_file): ... here.
3043
3044 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3045
3046         * skip.c (debug_skip): New variable.
3047         (skiplist_entry::do_skip_file_p): Add debug output.
3048         (skiplist_entry::do_skip_gfile_p): Likewise.
3049         (skiplist_entry::skip_function_p): Likewise.
3050         (_initialize_step_skip): Create debug command.
3051         * NEWS: Mention set/show debug skip.
3052
3053 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3054
3055         * darwin-nat.c (should_disable_startup_with_shell):
3056         New function.
3057         (darwin_nat_target::create_inferior): Add call.
3058
3059 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3060
3061         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3062         inf_port, msg_state>: Initialize.
3063         (struct darwin_thread_info) <signaled, single_step>: Change
3064         type and initialize.
3065         (struct darwin_thread_info) <event>: Initialize.
3066
3067 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3068
3069         PR gdb/23555
3070         PR gdb/23558
3071         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3072         guesses.
3073
3074 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3075
3076         Revert:
3077         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3078
3079         PR gdb/23555
3080         PR gdb/23558
3081         * gnulib/aclocal.m4: Regenerate.
3082         * gnulib/config.in: Regenerate.
3083         * gnulib/configure: Regenerate.
3084         * gnulib/import/Makefile.am: Update.
3085         * gnulib/import/Makefile.in: Update.
3086         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3087         * gnulib/import/_Noreturn.h: ... this.
3088         * gnulib/import/alloca.in.h: Update.
3089         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3090         * gnulib/import/arg-nonnull.h: ... this.
3091         * gnulib/import/assure.h: Update.
3092         * gnulib/import/at-func.c: Update.
3093         * gnulib/import/basename-lgpl.c: Update.
3094         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3095         * gnulib/import/c++defs.h: ... this.
3096         * gnulib/import/canonicalize-lgpl.c: Update.
3097         * gnulib/import/cdefs.h: Update.
3098         * gnulib/import/chdir-long.c: Update.
3099         * gnulib/import/chdir-long.h: Update.
3100         * gnulib/import/cloexec.c: Update.
3101         * gnulib/import/cloexec.h: Update.
3102         * gnulib/import/close.c: Update.
3103         * gnulib/import/closedir.c: Update.
3104         * gnulib/import/config.charset: Update.
3105         * gnulib/import/dirent-private.h: Update.
3106         * gnulib/import/dirent.in.h: Update.
3107         * gnulib/import/dirfd.c: Update.
3108         * gnulib/import/dirname-lgpl.c: Update.
3109         * gnulib/import/dirname.h: Update.
3110         * gnulib/import/dosname.h: Update.
3111         * gnulib/import/dup-safer-flag.c: Update.
3112         * gnulib/import/dup-safer.c: Update.
3113         * gnulib/import/dup.c: Update.
3114         * gnulib/import/dup2.c: Update.
3115         * gnulib/import/errno.in.h: Update.
3116         * gnulib/import/error.c: Update.
3117         * gnulib/import/error.h: Update.
3118         * gnulib/import/exitfail.c: Update.
3119         * gnulib/import/exitfail.h: Update.
3120         * gnulib/import/extra/update-copyright: Update.
3121         * gnulib/import/fchdir.c: Update.
3122         * gnulib/import/fcntl.c: Update.
3123         * gnulib/import/fcntl.in.h: Update.
3124         * gnulib/import/fd-hook.c: Update.
3125         * gnulib/import/fd-hook.h: Update.
3126         * gnulib/import/fd-safer-flag.c: Update.
3127         * gnulib/import/fd-safer.c: Update.
3128         * gnulib/import/fdopendir.c: Update.
3129         * gnulib/import/filename.h: Update.
3130         * gnulib/import/filenamecat-lgpl.c: Update.
3131         * gnulib/import/filenamecat.h: Update.
3132         * gnulib/import/flexmember.h: Update.
3133         * gnulib/import/float+.h: Update.
3134         * gnulib/import/float.c: Update.
3135         * gnulib/import/float.in.h: Update.
3136         * gnulib/import/fnmatch.c: Update.
3137         * gnulib/import/fnmatch.in.h: Update.
3138         * gnulib/import/fnmatch_loop.c: Update.
3139         * gnulib/import/fpucw.h: Update.
3140         * gnulib/import/frexp.c: Update.
3141         * gnulib/import/frexpl.c: Update.
3142         * gnulib/import/fstat.c: Update.
3143         * gnulib/import/fstatat.c: Update.
3144         * gnulib/import/getcwd-lgpl.c: Update.
3145         * gnulib/import/getcwd.c: Update.
3146         * gnulib/import/getdtablesize.c: Update.
3147         * gnulib/import/getlogin_r.c: Update.
3148         * gnulib/import/getprogname.c: Update.
3149         * gnulib/import/getprogname.h: Update.
3150         * gnulib/import/gettext.h: Update.
3151         * gnulib/import/gettimeofday.c: Update.
3152         * gnulib/import/glob-libc.h: Update.
3153         * gnulib/import/glob.c: Update.
3154         * gnulib/import/glob.in.h: Update.
3155         * gnulib/import/glob_internal.h: Update.
3156         * gnulib/import/glob_pattern_p.c: Update.
3157         * gnulib/import/globfree.c: Update.
3158         * gnulib/import/hard-locale.c: Update.
3159         * gnulib/import/hard-locale.h: Update.
3160         * gnulib/import/intprops.h: Update.
3161         * gnulib/import/inttypes.in.h: Update.
3162         * gnulib/import/isnan.c: Update.
3163         * gnulib/import/isnand-nolibm.h: Update.
3164         * gnulib/import/isnand.c: Update.
3165         * gnulib/import/isnanl-nolibm.h: Update.
3166         * gnulib/import/isnanl.c: Update.
3167         * gnulib/import/itold.c: Update.
3168         * gnulib/import/libc-config.h: Update.
3169         * gnulib/import/limits.in.h: Update.
3170         * gnulib/import/localcharset.c: Update.
3171         * gnulib/import/localcharset.h: Update.
3172         * gnulib/import/localtime-buffer.c: Update.
3173         * gnulib/import/localtime-buffer.h: Update.
3174         * gnulib/import/lstat.c: Update.
3175         * gnulib/import/m4/00gnulib.m4: Update.
3176         * gnulib/import/m4/__inline.m4: Update.
3177         * gnulib/import/m4/absolute-header.m4: Update.
3178         * gnulib/import/m4/alloca.m4: Update.
3179         * gnulib/import/m4/builtin-expect.m4: Update.
3180         * gnulib/import/m4/canonicalize.m4: Update.
3181         * gnulib/import/m4/chdir-long.m4: Update.
3182         * gnulib/import/m4/close.m4: Update.
3183         * gnulib/import/m4/closedir.m4: Update.
3184         * gnulib/import/m4/configmake.m4: Update.
3185         * gnulib/import/m4/d-ino.m4: Update.
3186         * gnulib/import/m4/d-type.m4: Update.
3187         * gnulib/import/m4/dirent_h.m4: Update.
3188         * gnulib/import/m4/dirfd.m4: Update.
3189         * gnulib/import/m4/dirname.m4: Update.
3190         * gnulib/import/m4/double-slash-root.m4: Update.
3191         * gnulib/import/m4/dup.m4: Update.
3192         * gnulib/import/m4/dup2.m4: Update.
3193         * gnulib/import/m4/eealloc.m4: Update.
3194         * gnulib/import/m4/environ.m4: Update.
3195         * gnulib/import/m4/errno_h.m4: Update.
3196         * gnulib/import/m4/error.m4: Update.
3197         * gnulib/import/m4/exponentd.m4: Update.
3198         * gnulib/import/m4/exponentl.m4: Update.
3199         * gnulib/import/m4/extensions.m4: Update.
3200         * gnulib/import/m4/extern-inline.m4: Update.
3201         * gnulib/import/m4/fchdir.m4: Update.
3202         * gnulib/import/m4/fcntl-o.m4: Update.
3203         * gnulib/import/m4/fcntl.m4: Update.
3204         * gnulib/import/m4/fcntl_h.m4: Update.
3205         * gnulib/import/m4/fdopendir.m4: Update.
3206         * gnulib/import/m4/filenamecat.m4: Update.
3207         * gnulib/import/m4/flexmember.m4: Update.
3208         * gnulib/import/m4/float_h.m4: Update.
3209         * gnulib/import/m4/fnmatch.m4: Update.
3210         * gnulib/import/m4/fnmatch_h.m4: Update.
3211         * gnulib/import/m4/fpieee.m4: Update.
3212         * gnulib/import/m4/frexp.m4: Update.
3213         * gnulib/import/m4/frexpl.m4: Update.
3214         * gnulib/import/m4/fstat.m4: Update.
3215         * gnulib/import/m4/fstatat.m4: Update.
3216         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3217         * gnulib/import/m4/getcwd-path-max.m4: Update.
3218         * gnulib/import/m4/getcwd.m4: Update.
3219         * gnulib/import/m4/getdtablesize.m4: Update.
3220         * gnulib/import/m4/getlogin.m4: Update.
3221         * gnulib/import/m4/getlogin_r.m4: Update.
3222         * gnulib/import/m4/getpagesize.m4: Update.
3223         * gnulib/import/m4/getprogname.m4: Update.
3224         * gnulib/import/m4/gettimeofday.m4: Update.
3225         * gnulib/import/m4/glibc21.m4: Update.
3226         * gnulib/import/m4/glob.m4: Update.
3227         * gnulib/import/m4/glob_h.m4: Update.
3228         * gnulib/import/m4/gnulib-cache.m4: Update.
3229         * gnulib/import/m4/gnulib-common.m4: Update.
3230         * gnulib/import/m4/gnulib-comp.m4: Update.
3231         * gnulib/import/m4/gnulib-tool.m4: Update.
3232         * gnulib/import/m4/hard-locale.m4: Update.
3233         * gnulib/import/m4/include_next.m4: Update.
3234         * gnulib/import/m4/inttypes-pri.m4: Update.
3235         * gnulib/import/m4/inttypes.m4: Update.
3236         * gnulib/import/m4/isnand.m4: Update.
3237         * gnulib/import/m4/isnanl.m4: Update.
3238         * gnulib/import/m4/largefile.m4: Update.
3239         * gnulib/import/m4/limits-h.m4: Update.
3240         * gnulib/import/m4/localcharset.m4: Update.
3241         * gnulib/import/m4/locale-fr.m4: Update.
3242         * gnulib/import/m4/locale-ja.m4: Update.
3243         * gnulib/import/m4/locale-zh.m4: Update.
3244         * gnulib/import/m4/localtime-buffer.m4: Update.
3245         * gnulib/import/m4/longlong.m4: Update.
3246         * gnulib/import/m4/lstat.m4: Update.
3247         * gnulib/import/m4/malloc.m4: Update.
3248         * gnulib/import/m4/malloca.m4: Update.
3249         * gnulib/import/m4/math_h.m4: Update.
3250         * gnulib/import/m4/mbrtowc.m4: Update.
3251         * gnulib/import/m4/mbsinit.m4: Update.
3252         * gnulib/import/m4/mbsrtowcs.m4: Update.
3253         * gnulib/import/m4/mbstate_t.m4: Update.
3254         * gnulib/import/m4/memchr.m4: Update.
3255         * gnulib/import/m4/memmem.m4: Update.
3256         * gnulib/import/m4/mempcpy.m4: Update.
3257         * gnulib/import/m4/memrchr.m4: Update.
3258         * gnulib/import/m4/mkdir.m4: Update.
3259         * gnulib/import/m4/mkstemp.m4: Update.
3260         * gnulib/import/m4/mmap-anon.m4: Update.
3261         * gnulib/import/m4/mode_t.m4: Update.
3262         * gnulib/import/m4/msvc-inval.m4: Update.
3263         * gnulib/import/m4/msvc-nothrow.m4: Update.
3264         * gnulib/import/m4/multiarch.m4: Update.
3265         * gnulib/import/m4/nocrash.m4: Update.
3266         * gnulib/import/m4/off_t.m4: Update.
3267         * gnulib/import/m4/onceonly.m4: Update.
3268         * gnulib/import/m4/open-cloexec.m4: Update.
3269         * gnulib/import/m4/open.m4: Update.
3270         * gnulib/import/m4/openat.m4: Update.
3271         * gnulib/import/m4/opendir.m4: Update.
3272         * gnulib/import/m4/pathmax.m4: Update.
3273         * gnulib/import/m4/rawmemchr.m4: Update.
3274         * gnulib/import/m4/readdir.m4: Update.
3275         * gnulib/import/m4/readlink.m4: Update.
3276         * gnulib/import/m4/realloc.m4: Update.
3277         * gnulib/import/m4/rename.m4: Update.
3278         * gnulib/import/m4/rewinddir.m4: Update.
3279         * gnulib/import/m4/rmdir.m4: Update.
3280         * gnulib/import/m4/save-cwd.m4: Update.
3281         * gnulib/import/m4/secure_getenv.m4: Update.
3282         * gnulib/import/m4/setenv.m4: Update.
3283         * gnulib/import/m4/signal_h.m4: Update.
3284         * gnulib/import/m4/ssize_t.m4: Update.
3285         * gnulib/import/m4/stat-time.m4: Update.
3286         * gnulib/import/m4/stat.m4: Update.
3287         * gnulib/import/m4/std-gnu11.m4: Update.
3288         * gnulib/import/m4/stdbool.m4: Update.
3289         * gnulib/import/m4/stddef_h.m4: Update.
3290         * gnulib/import/m4/stdint.m4: Update.
3291         * gnulib/import/m4/stdio_h.m4: Update.
3292         * gnulib/import/m4/stdlib_h.m4: Update.
3293         * gnulib/import/m4/strchrnul.m4: Update.
3294         * gnulib/import/m4/strdup.m4: Update.
3295         * gnulib/import/m4/strerror.m4: Update.
3296         * gnulib/import/m4/string_h.m4: Update.
3297         * gnulib/import/m4/strstr.m4: Update.
3298         * gnulib/import/m4/strtok_r.m4: Update.
3299         * gnulib/import/m4/sys_socket_h.m4: Update.
3300         * gnulib/import/m4/sys_stat_h.m4: Update.
3301         * gnulib/import/m4/sys_time_h.m4: Update.
3302         * gnulib/import/m4/sys_types_h.m4: Update.
3303         * gnulib/import/m4/tempname.m4: Update.
3304         * gnulib/import/m4/time_h.m4: Update.
3305         * gnulib/import/m4/unistd-safer.m4: Update.
3306         * gnulib/import/m4/unistd_h.m4: Update.
3307         * gnulib/import/m4/warn-on-use.m4: Update.
3308         * gnulib/import/m4/wchar_h.m4: Update.
3309         * gnulib/import/m4/wchar_t.m4: Update.
3310         * gnulib/import/m4/wctype_h.m4: Update.
3311         * gnulib/import/m4/wint_t.m4: Update.
3312         * gnulib/import/malloc.c: Update.
3313         * gnulib/import/malloc/scratch_buffer.h: Update.
3314         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3315         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3316         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3317         * gnulib/import/malloca.c: Update.
3318         * gnulib/import/malloca.h: Update.
3319         * gnulib/import/malloca.valgrind: Update.
3320         * gnulib/import/math.in.h: Update.
3321         * gnulib/import/mbrtowc.c: Update.
3322         * gnulib/import/mbsinit.c: Update.
3323         * gnulib/import/mbsrtowcs-impl.h: Update.
3324         * gnulib/import/mbsrtowcs-state.c: Update.
3325         * gnulib/import/mbsrtowcs.c: Update.
3326         * gnulib/import/memchr.c: Update.
3327         * gnulib/import/memmem.c: Update.
3328         * gnulib/import/mempcpy.c: Update.
3329         * gnulib/import/memrchr.c: Update.
3330         * gnulib/import/mkdir.c: Update.
3331         * gnulib/import/mkstemp.c: Update.
3332         * gnulib/import/msvc-inval.c: Update.
3333         * gnulib/import/msvc-inval.h: Update.
3334         * gnulib/import/msvc-nothrow.c: Update.
3335         * gnulib/import/msvc-nothrow.h: Update.
3336         * gnulib/import/open.c: Update.
3337         * gnulib/import/openat-die.c: Update.
3338         * gnulib/import/openat-priv.h: Update.
3339         * gnulib/import/openat-proc.c: Update.
3340         * gnulib/import/openat.c: Update.
3341         * gnulib/import/openat.h: Update.
3342         * gnulib/import/opendir.c: Update.
3343         * gnulib/import/pathmax.h: Update.
3344         * gnulib/import/pipe-safer.c: Update.
3345         * gnulib/import/rawmemchr.c: Update.
3346         * gnulib/import/readdir.c: Update.
3347         * gnulib/import/readlink.c: Update.
3348         * gnulib/import/realloc.c: Update.
3349         * gnulib/import/ref-add.sin: Update.
3350         * gnulib/import/ref-del.sin: Update.
3351         * gnulib/import/rename.c: Update.
3352         * gnulib/import/rewinddir.c: Update.
3353         * gnulib/import/rmdir.c: Update.
3354         * gnulib/import/same-inode.h: Update.
3355         * gnulib/import/save-cwd.c: Update.
3356         * gnulib/import/save-cwd.h: Update.
3357         * gnulib/import/scratch_buffer.h: Update.
3358         * gnulib/import/secure_getenv.c: Update.
3359         * gnulib/import/setenv.c: Update.
3360         * gnulib/import/signal.in.h: Update.
3361         * gnulib/import/stat-time.c: Update.
3362         * gnulib/import/stat-time.h: Update.
3363         * gnulib/import/stat-w32.c: Update.
3364         * gnulib/import/stat-w32.h: Update.
3365         * gnulib/import/stat.c: Update.
3366         * gnulib/import/stdbool.in.h: Update.
3367         * gnulib/import/stddef.in.h: Update.
3368         * gnulib/import/stdint.in.h: Update.
3369         * gnulib/import/stdio.in.h: Update.
3370         * gnulib/import/stdlib.in.h: Update.
3371         * gnulib/import/str-two-way.h: Update.
3372         * gnulib/import/strchrnul.c: Update.
3373         * gnulib/import/strdup.c: Update.
3374         * gnulib/import/streq.h: Update.
3375         * gnulib/import/strerror-override.c: Update.
3376         * gnulib/import/strerror-override.h: Update.
3377         * gnulib/import/strerror.c: Update.
3378         * gnulib/import/string.in.h: Update.
3379         * gnulib/import/stripslash.c: Update.
3380         * gnulib/import/strnlen1.c: Update.
3381         * gnulib/import/strnlen1.h: Update.
3382         * gnulib/import/strstr.c: Update.
3383         * gnulib/import/strtok_r.c: Update.
3384         * gnulib/import/sys_stat.in.h: Update.
3385         * gnulib/import/sys_time.in.h: Update.
3386         * gnulib/import/sys_types.in.h: Update.
3387         * gnulib/import/tempname.c: Update.
3388         * gnulib/import/tempname.h: Update.
3389         * gnulib/import/time.in.h: Update.
3390         * gnulib/import/unistd--.h: Update.
3391         * gnulib/import/unistd-safer.h: Update.
3392         * gnulib/import/unistd.in.h: Update.
3393         * gnulib/import/unsetenv.c: Update.
3394         * gnulib/import/verify.h: Update.
3395         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3396         * gnulib/import/wchar.in.h: Update.
3397         * gnulib/import/wctype.in.h: Update.
3398         * gnulib/import/xalloc-oversized.h: Update.
3399         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3400         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3401
3402 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3403
3404         * record-btrace.c (get_thread_current_frame): Remove
3405         old_inferior_ptid.
3406
3407 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3408
3409         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3410         with check_tag to 1 if and only if the type is tagged and the
3411         component being searched cannot been found in the current
3412         view. Otherwise, always call ada_to_fixed_type with
3413         check_tag to 0.
3414
3415 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3416
3417         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3418         declaration.
3419         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3420         * ada-varobj.c (ada_varobj_get_number_of_children,
3421         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3422
3423 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3424
3425         * ada-valprint.c (ada_value_print): Use type instead of
3426         enclosing type.
3427
3428 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3429
3430         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3431         an array of access to unconstrained array.
3432
3433 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3434
3435         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3436         (ada_check_typedef): Use it.
3437
3438 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3439
3440         * ada-varobj.c (ada_varobj_describe_struct_child)
3441         (ada_varobj_describe_child): Handle union case like struct one.
3442
3443 2018-09-10  Tom Tromey  <tom@tromey.com>
3444
3445         PR python/18380:
3446         * python/python.c (_initialize_python): Make example in "python"
3447         help work in Python 3.
3448
3449 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
3450
3451         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3452         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
3453         $(EXEEXT) to the script, as it is not a program.
3454
3455 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3456
3457         * python/py-prettyprint.c (pretty_print_one_value): Return
3458         gdbpy_ref<>.
3459         (print_string_repr): Adjust.
3460         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3461         * python/python-internal.h (apply_varobj_pretty_printer): Return
3462         gdbpy_ref<>.
3463         * varobj.c (varobj_value_get_print_value): Adjust.
3464
3465 2018-09-08  Tom Tromey  <tom@tromey.com>
3466
3467         PR python/16047:
3468         * python/py-prettyprint.c (pretty_print_one_value): Check for
3469         to_string method.
3470
3471 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3472
3473         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3474         replace_operator_with_call.
3475
3476 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3477
3478         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
3479
3480 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3481
3482         * ada-typeprint.c (print_range): Print the bounds using TYPE
3483         rather than its TYPE_TARGET_TYPE.
3484
3485 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3486
3487         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
3488         call to ada_to_fixed_value_create.
3489
3490 2018-09-08  Jerome Guitton  <guitton@adacore.com>
3491
3492         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
3493
3494 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3495
3496         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
3497         by calls to error.
3498
3499 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3500
3501         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
3502         Move update of loop variable "fi".
3503
3504 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3505
3506         * ada-lang.c (value_assign_to_component): In the case of
3507         big-endian targets, extract the bits of the given VAL
3508         using an src_offset of zero if container is not a scalar.
3509
3510 2018-09-06  Simon Ser  <contact@emersion.fr>
3511
3512         PR gdb/23105
3513         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
3514         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3515         * fbsd-tdep.c (fbsd_make_note_desc): New.
3516         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
3517         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
3518         * target.h (enum target_object) Add FreeBSD-specific
3519         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3520
3521 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3522
3523         * compile/compile-c.h (generate_c_for_variable_locations):
3524         Change reference to pointer.
3525         * compile/compile-c-support.c (compile_program) <compute>:
3526         Likewise.
3527         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
3528         (generate_c_for_for_one_variable): Likewise
3529         (generate_c_for_variable_locations): Likewise
3530         * compile/compile-c-types.c (compile_c_instance::convert_type):
3531         Likewise
3532         * compile/compile-cplus-symbols.c (convert_one_symbol):
3533         std::move the scope passed to enter_scope.
3534         * compile/compile-cplus-types.c
3535         (compile_cplus_instance::enter_scope): Make parameter
3536         rvalue-reference.
3537         (compile_cplus_instance::new_scope): Change reference to
3538         pointer.
3539         (compile_cplus_instance::convert_type): Likewise
3540         (compile_cplus_convert_typedef): std::move the scope passed to
3541         enter_scope.
3542         (compile_cplus_convert_struct_or_union): Likewise.
3543         (compile_cplus_convert_enum): Likewise.
3544         (compile_cplus_convert_namespace): Likewise.
3545         * compile/compile-cplus.h (compile_cplus_instance)
3546         <enter_scope>: Make parameter rvalue-reference.
3547         * compile/compile-internal.h (compile_instance)
3548         <get_cached_type>: Likewise
3549         * compile/compile-loc2c.c (push): Likewise
3550         (pushf): Likewise
3551         (unary): Likewise
3552         (binary): Likewise
3553         (print_label): Likewise
3554         (pushf_register_address): Likewise
3555         (pushf_register): Likewise
3556         (do_compile_dwarf_expr_to_c): Likewise
3557         (compile_dwarf_expr_to_c): Likewise
3558         (compile_dwarf_bounds_to_c): Likewise
3559         * compile/compile.c (compile_instance::get_cached_type):
3560         Likewise
3561         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
3562         (compile_dwarf_bounds_to_c): Likewise
3563         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
3564         (dwarf2_compile_property_to_c): Likewise
3565         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
3566         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
3567         Likewise
3568
3569 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3570
3571         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
3572         * tui/tui-data.c (init_content_element): Don't initialize it.
3573
3574 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3575
3576         * tui/tui-data.h (struct tui_win_info)
3577         <detail::opaque>: Remove.
3578         * tui/tui-data.c (init_win_info): Remove assignment.
3579
3580 2018-09-05  Tom Tromey  <tom@tromey.com>
3581
3582         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
3583         -Wformat-nonliteral.
3584         * target-float.c (host_float_ops<T>::to_string)
3585         (host_float_ops<T>::from_string): Use
3586         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3587         * configure: Rebuild.
3588
3589 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3590
3591         * printcmd.c (printf_c_string): Use
3592         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3593         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
3594
3595 2018-09-05  Tom Tromey  <tom@tromey.com>
3596
3597         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
3598
3599 2018-09-05  Tom de Vries  <tdevries@suse.de>
3600
3601         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
3602         with resolve_abstract_p == true.
3603         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
3604         defaulting to false. Propagate resolve_abstract_p to
3605         dwarf2_fetch_die_loc_sect_off.
3606         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
3607         parameter, defaulting to false.
3608         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
3609         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
3610         parameter.
3611         * dwarf2read.h (struct die_info): Forward-declare.
3612         (die_info_ptr): New typedef.
3613         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
3614
3615 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
3616
3617         GDB 8.2 released.
3618
3619 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3620             Pedro Alves  <palves@redhat.com>
3621
3622         * gnulib/Makefile.in (aclocal_m4_deps): Move to
3623         "aclocal-m4-deps.mk".  Include file here.
3624         $(srcdir)/aclocal.m4: Add "configure.ac".
3625         * gnulib/aclocal-m4-deps.mk: New file.
3626         * gnulib/update-gnulib.sh: Automatically update
3627         "aclocal-m4-deps.mk".
3628
3629 2018-09-04  Tom Tromey  <tom@tromey.com>
3630
3631         * configure: Rebuild.
3632         * configure.ac: Remove multi-ice code.
3633
3634 2018-09-04  Tom Tromey  <tom@tromey.com>
3635
3636         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
3637         (ada-exp.o): Update.
3638
3639 2018-09-04  Tom Tromey  <tom@tromey.com>
3640
3641         * Makefile.in (printcmd.o, target-float.o): Remove.
3642         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
3643
3644 2018-09-04  Tom Tromey  <tom@tromey.com>
3645
3646         * gnulib/Makefile.in: Remove obsolete comment.
3647         * Makefile.in: Remove obsolete comment.
3648
3649 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
3650
3651         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
3652         line with '+'.
3653
3654 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3655
3656         * riscv-tdep.c: Add 'prologue-value.h' include.
3657         (struct riscv_unwind_cache): New struct.
3658         (riscv_debug_unwinder): New global.
3659         (riscv_scan_prologue): Update arguments, capture register details
3660         from prologue scan.
3661         (riscv_skip_prologue): Reformat arguments line, move end of
3662         prologue calculation into riscv_scan_prologue.
3663         (riscv_frame_cache): Update return type, create
3664         riscv_unwind_cache, scan the prologue, and fill in remaining cache
3665         details.
3666         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
3667         (riscv_frame_prev_register): Use the trad_frame within the
3668         riscv_unwind_cache.
3669         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
3670         flag.
3671
3672 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3673
3674         * trad-frame.h (trad_frame_set_realreg): Declare.
3675         (trad_frame_set_addr): Declare.
3676         * trad-frame.c (trad_frame_set_realreg): Define new function.
3677         (trad_frame_set_addr): Define new function.
3678         (trad_frame_set_reg_realreg): Use new function.
3679         (trad_frame_set_reg_addr): Use new function.
3680
3681 2018-09-01  Keith Seitz  <keiths@redhat.com>
3682
3683         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
3684         pulongest instead of "%lld".
3685         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
3686         ATTRIBUTE_UNUSED.
3687
3688 2018-08-31  Tom Tromey  <tom@tromey.com>
3689
3690         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
3691         variant part type.
3692
3693 2018-08-31  Pedro Alves  <palves@redhat.com>
3694
3695         * gdbarch.h: Regenerate.
3696
3697 2018-08-31  Pedro Alves  <palves@redhat.com>
3698
3699         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
3700         * target.h (Hardware watchpoint interfaces): Describe
3701         continuable/steppable/non-steppable watchpoints.
3702         * gdbarch.h, gdbarch.c: Regenerate.
3703
3704 2018-08-31  Pedro Alves  <palves@redhat.com>
3705
3706         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
3707         Delete.
3708         * s390-linux-nat.c
3709         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
3710         * target.h (target_ops::have_continuable_watchpoint): Delete.
3711         (target_have_continuable_watchpoint): Delete.
3712         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
3713         * target-delegates.c: Regenerate.
3714
3715 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3716
3717         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
3718         the files present in "gnulib/import/m4/".
3719
3720 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3721
3722         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
3723         c.sw, c.swsp, and c.sdsp.
3724
3725 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3726
3727         * riscv-tdep.c (struct riscv_inferior_data): Delete.
3728         (riscv_read_misa_reg): Don't cache value read into inferior data.
3729         (riscv_new_inferior_data): Delete.
3730         (riscv_inferior_data_cleanup): Delete.
3731         (riscv_inferior_data): Delete.
3732         (riscv_invalidate_inferior_data): Delete.
3733         (_initialize_riscv_tdep): Remove initialisation of inferior data.
3734
3735 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
3736
3737         * compile/compile-cplus-types.c
3738         (compile_cplus_instance::leave_scope): Take the address of scope
3739         object.
3740         (compile_cplus_instance::convert_qualified_base): Compare quals
3741         to 0.
3742
3743 2018-08-30  Keith Seitz  <keiths@redhat.com>
3744
3745         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
3746         Use "%s" and host_address_to_string instead of "%p" in printf.
3747
3748 2018-08-29  Keith Seitz  <keiths@redhat.com>
3749
3750         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3751         and compile-cplus-types.c.
3752         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3753         * c-lang.c (cplus_language_defn): Set C++ compile functions.
3754         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3755         Declare.
3756         * compile/compile-c-support.c: Include compile-cplus.h.
3757         (load_libcompile): Templatize.
3758         (get_compile_context): "New" function.
3759         (c_get_compile_context): Use get_compile_context.
3760         (cplus_get_compile_context): New function.
3761         (cplus_push_user_expression, cplus_pop_user_expression)
3762         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3763         (cplus_compute_program): Define new structs/functions.
3764         * compile/compile-cplus-symmbols.c: New file.
3765         * compile/compile-cplus-types.c: New file.
3766         * compile/compile-cplus.h: New file.
3767         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3768         Declare.
3769         * compile/compile-object-load.c (get_out_value_type): Use
3770         strncmp_iw when comparing symbol names.
3771         (compile_object_load): Add mst_bss and mst_data.
3772         * compile/compile.c (_initialize_compile): Remove
3773         -Wno-implicit-function-declaration from `compile_args'.
3774         * compile/gcc-cp-plugin.h: New file.
3775         * NEWS: Mention C++ compile support and new debug options.
3776
3777 2018-08-29  Keith Seitz  <keiths@redhat.com>
3778
3779         * linespec.c (collect_info::add_symbol): Make virtual.
3780         (struct symbol_searcher_collect_info): New struct.
3781         (symbol_searcher::find_all_symbols): New method.
3782         * symtab.h (class symbol_searcher): New class.
3783
3784 2018-08-29  Keith Seitz  <keiths@redhat.com>
3785
3786         * linespec.c (struct linespec) <function_symbols, label_symbols>:
3787         Change to vector of block_symbol.  Update all users.
3788         (struct collect_info) <symbols>: Likewise.
3789         (collect_info::add_symbol): Take block_symbol as argument.
3790         Update all callers.
3791         (decode_compound_collector) <m_symbols>: Change type to vector
3792         of block_symbol.  Update all users.
3793         (decode_compound_collector::operator ()): Change parameter type
3794         to block_symbol.
3795         (find_method, find_function_symbols, find_linespec_symbols)
3796         (find_label_symbols_in_block, find_label_symbols): Change symbol
3797         vectors to block_symbol vectors.
3798         * symtab.h (symbol_found_callback_ftype): Change parameter type to
3799         block_symbol.
3800
3801 2018-08-29  Keith Seitz  <keiths@redhat.com>
3802
3803         * linespec.c (symbolp): Remove typedef and VEC definitions.
3804         (bound_minimal_symbol_d): Likewise.
3805
3806 2018-08-29  Keith Seitz  <keiths@redhat.com>
3807
3808         * linespec.c (decode_compound_collector::decode_compound_collector):
3809         Remove initialization for `m_symtabs'.
3810         (decode_compound_collector::release_symbols): Change return type
3811         to std::vector.  Update all callers.
3812         (class decode_compound_collector) <m_symbols>: Change type to
3813         std::vector.
3814         (lookup_prefix_sym): Change return type to std::vector.  Update all
3815         callers.
3816         (compare_symbols): Remove.
3817         (std_compare_symbols): Rename to `compare_symbols'.
3818         (find_method): Change `sym_classes' parameter to std::vector.
3819         Update all callers.  Use std::sort to sort sym_classes.
3820         (find_linespec_symbols): Remove cleanup.
3821
3822 2018-08-29  Keith Seitz  <keiths@redhat.com>
3823
3824         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3825         std::vector.  Update all users.
3826         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3827         (struct collect_info) <minimal_symbols>: Likewise.
3828         (compare_msymbols): Return bool.  Change parameters to const
3829         bound_minimal_symbol references.
3830         (find_method, find_function_symbols, find_linespec_symbols): Change
3831         `minsyms' parameter to std::vector.  Update all callers.
3832
3833 2018-08-29  Keith Seitz  <keiths@redhat.com>
3834
3835         * linespec.c (struct linespec) <label_symbols>: Change type to
3836         std::vector.  Update all users.
3837         (find_label_symbols_in_block): Change `result' parameter to
3838         std::vector.  Update all callers.
3839         (find_label_symbols): Return std::vector.  Update all callers.
3840
3841 2018-08-29  Keith Seitz  <keiths@redhat.com>
3842
3843         * linespec.c (struct linespec) <function_symbols>: Change type to
3844         std::vector.  Update all users.
3845         (struct collect_info) <function_symbols>: Likewise.
3846         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3847         (std_compare_symbols): New function.
3848         (find_method, find_function_symbols, find_linespec_symbols)
3849         (find_label_symbols_in_block): Change `symbols' parameter to
3850         std::vector.  Update all callers.
3851         (find_label_symbols): Likewise for `function_symbols' and
3852         `label_funcs_ret'.
3853
3854 2018-08-29  Keith Seitz  <keiths@redhat.com>
3855
3856         * linespec.c (symtab_vector_up): Define.
3857         (struct linespec) <file_symtabs>: Change type to std::vector *.
3858         Update all uses.
3859         (struct collect_info) <file_symtabs>: Likewise.
3860         (collect_symtabs_from_filename): Return symtab_vector_up.
3861         Update all callers.
3862         (decode_objc): Remove cleanup.
3863         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3864         (symtab_collector::release_symtabs): Return symtab_vector_up.
3865         Update all callers.
3866         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3867         Update all users.
3868         (collect_symtabs_from_filename, symtabs_from_filename): Return
3869         symtab_vector_up.  Update all callers.
3870
3871 2018-08-29  Tom Tromey  <tom@tromey.com>
3872
3873         * csky-tdep.c (csky_analyze_prologue): Use
3874         core_addr_to_string_nz.
3875
3876 2018-08-29  Tom Tromey  <tom@tromey.com>
3877
3878         * windows-nat.c (struct xlate_exception) <them>: Change type to
3879         DWORD.
3880         (xlate): Fix formatting.  Remove last entry.
3881         (struct xlate_exception, xlate): Comment out.
3882         (windows_nat_target::resume): Use ranged for.
3883
3884 2018-08-29  Jim Wilson  <jimw@sifive.com>
3885
3886         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3887         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3888         of NT_PRFPREG.
3889         (riscv_linux_nat_target::store_registers): Likewise.
3890
3891 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3892
3893         PR gdb/23555
3894         PR gdb/23558
3895         * gnulib/aclocal.m4: Regenerate.
3896         * gnulib/config.in: Regenerate.
3897         * gnulib/configure: Regenerate.
3898         * gnulib/import/Makefile.am: Update.
3899         * gnulib/import/Makefile.in: Update.
3900         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3901         * gnulib/import/_Noreturn.h: ... this.
3902         * gnulib/import/alloca.in.h: Update.
3903         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3904         * gnulib/import/arg-nonnull.h: ... this.
3905         * gnulib/import/assure.h: Update.
3906         * gnulib/import/at-func.c: Update.
3907         * gnulib/import/basename-lgpl.c: Update.
3908         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3909         * gnulib/import/c++defs.h: ... this.
3910         * gnulib/import/canonicalize-lgpl.c: Update.
3911         * gnulib/import/cdefs.h: Update.
3912         * gnulib/import/chdir-long.c: Update.
3913         * gnulib/import/chdir-long.h: Update.
3914         * gnulib/import/cloexec.c: Update.
3915         * gnulib/import/cloexec.h: Update.
3916         * gnulib/import/close.c: Update.
3917         * gnulib/import/closedir.c: Update.
3918         * gnulib/import/config.charset: Update.
3919         * gnulib/import/dirent-private.h: Update.
3920         * gnulib/import/dirent.in.h: Update.
3921         * gnulib/import/dirfd.c: Update.
3922         * gnulib/import/dirname-lgpl.c: Update.
3923         * gnulib/import/dirname.h: Update.
3924         * gnulib/import/dosname.h: Update.
3925         * gnulib/import/dup-safer-flag.c: Update.
3926         * gnulib/import/dup-safer.c: Update.
3927         * gnulib/import/dup.c: Update.
3928         * gnulib/import/dup2.c: Update.
3929         * gnulib/import/errno.in.h: Update.
3930         * gnulib/import/error.c: Update.
3931         * gnulib/import/error.h: Update.
3932         * gnulib/import/exitfail.c: Update.
3933         * gnulib/import/exitfail.h: Update.
3934         * gnulib/import/extra/update-copyright: Update.
3935         * gnulib/import/fchdir.c: Update.
3936         * gnulib/import/fcntl.c: Update.
3937         * gnulib/import/fcntl.in.h: Update.
3938         * gnulib/import/fd-hook.c: Update.
3939         * gnulib/import/fd-hook.h: Update.
3940         * gnulib/import/fd-safer-flag.c: Update.
3941         * gnulib/import/fd-safer.c: Update.
3942         * gnulib/import/fdopendir.c: Update.
3943         * gnulib/import/filename.h: Update.
3944         * gnulib/import/filenamecat-lgpl.c: Update.
3945         * gnulib/import/filenamecat.h: Update.
3946         * gnulib/import/flexmember.h: Update.
3947         * gnulib/import/float+.h: Update.
3948         * gnulib/import/float.c: Update.
3949         * gnulib/import/float.in.h: Update.
3950         * gnulib/import/fnmatch.c: Update.
3951         * gnulib/import/fnmatch.in.h: Update.
3952         * gnulib/import/fnmatch_loop.c: Update.
3953         * gnulib/import/fpucw.h: Update.
3954         * gnulib/import/frexp.c: Update.
3955         * gnulib/import/frexpl.c: Update.
3956         * gnulib/import/fstat.c: Update.
3957         * gnulib/import/fstatat.c: Update.
3958         * gnulib/import/getcwd-lgpl.c: Update.
3959         * gnulib/import/getcwd.c: Update.
3960         * gnulib/import/getdtablesize.c: Update.
3961         * gnulib/import/getlogin_r.c: Update.
3962         * gnulib/import/getprogname.c: Update.
3963         * gnulib/import/getprogname.h: Update.
3964         * gnulib/import/gettext.h: Update.
3965         * gnulib/import/gettimeofday.c: Update.
3966         * gnulib/import/glob-libc.h: Update.
3967         * gnulib/import/glob.c: Update.
3968         * gnulib/import/glob.in.h: Update.
3969         * gnulib/import/glob_internal.h: Update.
3970         * gnulib/import/glob_pattern_p.c: Update.
3971         * gnulib/import/globfree.c: Update.
3972         * gnulib/import/hard-locale.c: Update.
3973         * gnulib/import/hard-locale.h: Update.
3974         * gnulib/import/intprops.h: Update.
3975         * gnulib/import/inttypes.in.h: Update.
3976         * gnulib/import/isnan.c: Update.
3977         * gnulib/import/isnand-nolibm.h: Update.
3978         * gnulib/import/isnand.c: Update.
3979         * gnulib/import/isnanl-nolibm.h: Update.
3980         * gnulib/import/isnanl.c: Update.
3981         * gnulib/import/itold.c: Update.
3982         * gnulib/import/libc-config.h: Update.
3983         * gnulib/import/limits.in.h: Update.
3984         * gnulib/import/localcharset.c: Update.
3985         * gnulib/import/localcharset.h: Update.
3986         * gnulib/import/localtime-buffer.c: Update.
3987         * gnulib/import/localtime-buffer.h: Update.
3988         * gnulib/import/lstat.c: Update.
3989         * gnulib/import/m4/00gnulib.m4: Update.
3990         * gnulib/import/m4/__inline.m4: Update.
3991         * gnulib/import/m4/absolute-header.m4: Update.
3992         * gnulib/import/m4/alloca.m4: Update.
3993         * gnulib/import/m4/builtin-expect.m4: Update.
3994         * gnulib/import/m4/canonicalize.m4: Update.
3995         * gnulib/import/m4/chdir-long.m4: Update.
3996         * gnulib/import/m4/close.m4: Update.
3997         * gnulib/import/m4/closedir.m4: Update.
3998         * gnulib/import/m4/configmake.m4: Update.
3999         * gnulib/import/m4/d-ino.m4: Update.
4000         * gnulib/import/m4/d-type.m4: Update.
4001         * gnulib/import/m4/dirent_h.m4: Update.
4002         * gnulib/import/m4/dirfd.m4: Update.
4003         * gnulib/import/m4/dirname.m4: Update.
4004         * gnulib/import/m4/double-slash-root.m4: Update.
4005         * gnulib/import/m4/dup.m4: Update.
4006         * gnulib/import/m4/dup2.m4: Update.
4007         * gnulib/import/m4/eealloc.m4: Update.
4008         * gnulib/import/m4/environ.m4: Update.
4009         * gnulib/import/m4/errno_h.m4: Update.
4010         * gnulib/import/m4/error.m4: Update.
4011         * gnulib/import/m4/exponentd.m4: Update.
4012         * gnulib/import/m4/exponentl.m4: Update.
4013         * gnulib/import/m4/extensions.m4: Update.
4014         * gnulib/import/m4/extern-inline.m4: Update.
4015         * gnulib/import/m4/fchdir.m4: Update.
4016         * gnulib/import/m4/fcntl-o.m4: Update.
4017         * gnulib/import/m4/fcntl.m4: Update.
4018         * gnulib/import/m4/fcntl_h.m4: Update.
4019         * gnulib/import/m4/fdopendir.m4: Update.
4020         * gnulib/import/m4/filenamecat.m4: Update.
4021         * gnulib/import/m4/flexmember.m4: Update.
4022         * gnulib/import/m4/float_h.m4: Update.
4023         * gnulib/import/m4/fnmatch.m4: Update.
4024         * gnulib/import/m4/fnmatch_h.m4: Update.
4025         * gnulib/import/m4/fpieee.m4: Update.
4026         * gnulib/import/m4/frexp.m4: Update.
4027         * gnulib/import/m4/frexpl.m4: Update.
4028         * gnulib/import/m4/fstat.m4: Update.
4029         * gnulib/import/m4/fstatat.m4: Update.
4030         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4031         * gnulib/import/m4/getcwd-path-max.m4: Update.
4032         * gnulib/import/m4/getcwd.m4: Update.
4033         * gnulib/import/m4/getdtablesize.m4: Update.
4034         * gnulib/import/m4/getlogin.m4: Update.
4035         * gnulib/import/m4/getlogin_r.m4: Update.
4036         * gnulib/import/m4/getpagesize.m4: Update.
4037         * gnulib/import/m4/getprogname.m4: Update.
4038         * gnulib/import/m4/gettimeofday.m4: Update.
4039         * gnulib/import/m4/glibc21.m4: Update.
4040         * gnulib/import/m4/glob.m4: Update.
4041         * gnulib/import/m4/glob_h.m4: Update.
4042         * gnulib/import/m4/gnulib-cache.m4: Update.
4043         * gnulib/import/m4/gnulib-common.m4: Update.
4044         * gnulib/import/m4/gnulib-comp.m4: Update.
4045         * gnulib/import/m4/gnulib-tool.m4: Update.
4046         * gnulib/import/m4/hard-locale.m4: Update.
4047         * gnulib/import/m4/include_next.m4: Update.
4048         * gnulib/import/m4/inttypes-pri.m4: Update.
4049         * gnulib/import/m4/inttypes.m4: Update.
4050         * gnulib/import/m4/isnand.m4: Update.
4051         * gnulib/import/m4/isnanl.m4: Update.
4052         * gnulib/import/m4/largefile.m4: Update.
4053         * gnulib/import/m4/limits-h.m4: Update.
4054         * gnulib/import/m4/localcharset.m4: Update.
4055         * gnulib/import/m4/locale-fr.m4: Update.
4056         * gnulib/import/m4/locale-ja.m4: Update.
4057         * gnulib/import/m4/locale-zh.m4: Update.
4058         * gnulib/import/m4/localtime-buffer.m4: Update.
4059         * gnulib/import/m4/longlong.m4: Update.
4060         * gnulib/import/m4/lstat.m4: Update.
4061         * gnulib/import/m4/malloc.m4: Update.
4062         * gnulib/import/m4/malloca.m4: Update.
4063         * gnulib/import/m4/math_h.m4: Update.
4064         * gnulib/import/m4/mbrtowc.m4: Update.
4065         * gnulib/import/m4/mbsinit.m4: Update.
4066         * gnulib/import/m4/mbsrtowcs.m4: Update.
4067         * gnulib/import/m4/mbstate_t.m4: Update.
4068         * gnulib/import/m4/memchr.m4: Update.
4069         * gnulib/import/m4/memmem.m4: Update.
4070         * gnulib/import/m4/mempcpy.m4: Update.
4071         * gnulib/import/m4/memrchr.m4: Update.
4072         * gnulib/import/m4/mkdir.m4: Update.
4073         * gnulib/import/m4/mkstemp.m4: Update.
4074         * gnulib/import/m4/mmap-anon.m4: Update.
4075         * gnulib/import/m4/mode_t.m4: Update.
4076         * gnulib/import/m4/msvc-inval.m4: Update.
4077         * gnulib/import/m4/msvc-nothrow.m4: Update.
4078         * gnulib/import/m4/multiarch.m4: Update.
4079         * gnulib/import/m4/nocrash.m4: Update.
4080         * gnulib/import/m4/off_t.m4: Update.
4081         * gnulib/import/m4/onceonly.m4: Update.
4082         * gnulib/import/m4/open-cloexec.m4: Update.
4083         * gnulib/import/m4/open.m4: Update.
4084         * gnulib/import/m4/openat.m4: Update.
4085         * gnulib/import/m4/opendir.m4: Update.
4086         * gnulib/import/m4/pathmax.m4: Update.
4087         * gnulib/import/m4/rawmemchr.m4: Update.
4088         * gnulib/import/m4/readdir.m4: Update.
4089         * gnulib/import/m4/readlink.m4: Update.
4090         * gnulib/import/m4/realloc.m4: Update.
4091         * gnulib/import/m4/rename.m4: Update.
4092         * gnulib/import/m4/rewinddir.m4: Update.
4093         * gnulib/import/m4/rmdir.m4: Update.
4094         * gnulib/import/m4/save-cwd.m4: Update.
4095         * gnulib/import/m4/secure_getenv.m4: Update.
4096         * gnulib/import/m4/setenv.m4: Update.
4097         * gnulib/import/m4/signal_h.m4: Update.
4098         * gnulib/import/m4/ssize_t.m4: Update.
4099         * gnulib/import/m4/stat-time.m4: Update.
4100         * gnulib/import/m4/stat.m4: Update.
4101         * gnulib/import/m4/std-gnu11.m4: Update.
4102         * gnulib/import/m4/stdbool.m4: Update.
4103         * gnulib/import/m4/stddef_h.m4: Update.
4104         * gnulib/import/m4/stdint.m4: Update.
4105         * gnulib/import/m4/stdio_h.m4: Update.
4106         * gnulib/import/m4/stdlib_h.m4: Update.
4107         * gnulib/import/m4/strchrnul.m4: Update.
4108         * gnulib/import/m4/strdup.m4: Update.
4109         * gnulib/import/m4/strerror.m4: Update.
4110         * gnulib/import/m4/string_h.m4: Update.
4111         * gnulib/import/m4/strstr.m4: Update.
4112         * gnulib/import/m4/strtok_r.m4: Update.
4113         * gnulib/import/m4/sys_socket_h.m4: Update.
4114         * gnulib/import/m4/sys_stat_h.m4: Update.
4115         * gnulib/import/m4/sys_time_h.m4: Update.
4116         * gnulib/import/m4/sys_types_h.m4: Update.
4117         * gnulib/import/m4/tempname.m4: Update.
4118         * gnulib/import/m4/time_h.m4: Update.
4119         * gnulib/import/m4/unistd-safer.m4: Update.
4120         * gnulib/import/m4/unistd_h.m4: Update.
4121         * gnulib/import/m4/warn-on-use.m4: Update.
4122         * gnulib/import/m4/wchar_h.m4: Update.
4123         * gnulib/import/m4/wchar_t.m4: Update.
4124         * gnulib/import/m4/wctype_h.m4: Update.
4125         * gnulib/import/m4/wint_t.m4: Update.
4126         * gnulib/import/malloc.c: Update.
4127         * gnulib/import/malloc/scratch_buffer.h: Update.
4128         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4129         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4130         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4131         * gnulib/import/malloca.c: Update.
4132         * gnulib/import/malloca.h: Update.
4133         * gnulib/import/malloca.valgrind: Update.
4134         * gnulib/import/math.in.h: Update.
4135         * gnulib/import/mbrtowc.c: Update.
4136         * gnulib/import/mbsinit.c: Update.
4137         * gnulib/import/mbsrtowcs-impl.h: Update.
4138         * gnulib/import/mbsrtowcs-state.c: Update.
4139         * gnulib/import/mbsrtowcs.c: Update.
4140         * gnulib/import/memchr.c: Update.
4141         * gnulib/import/memmem.c: Update.
4142         * gnulib/import/mempcpy.c: Update.
4143         * gnulib/import/memrchr.c: Update.
4144         * gnulib/import/mkdir.c: Update.
4145         * gnulib/import/mkstemp.c: Update.
4146         * gnulib/import/msvc-inval.c: Update.
4147         * gnulib/import/msvc-inval.h: Update.
4148         * gnulib/import/msvc-nothrow.c: Update.
4149         * gnulib/import/msvc-nothrow.h: Update.
4150         * gnulib/import/open.c: Update.
4151         * gnulib/import/openat-die.c: Update.
4152         * gnulib/import/openat-priv.h: Update.
4153         * gnulib/import/openat-proc.c: Update.
4154         * gnulib/import/openat.c: Update.
4155         * gnulib/import/openat.h: Update.
4156         * gnulib/import/opendir.c: Update.
4157         * gnulib/import/pathmax.h: Update.
4158         * gnulib/import/pipe-safer.c: Update.
4159         * gnulib/import/rawmemchr.c: Update.
4160         * gnulib/import/readdir.c: Update.
4161         * gnulib/import/readlink.c: Update.
4162         * gnulib/import/realloc.c: Update.
4163         * gnulib/import/ref-add.sin: Update.
4164         * gnulib/import/ref-del.sin: Update.
4165         * gnulib/import/rename.c: Update.
4166         * gnulib/import/rewinddir.c: Update.
4167         * gnulib/import/rmdir.c: Update.
4168         * gnulib/import/same-inode.h: Update.
4169         * gnulib/import/save-cwd.c: Update.
4170         * gnulib/import/save-cwd.h: Update.
4171         * gnulib/import/scratch_buffer.h: Update.
4172         * gnulib/import/secure_getenv.c: Update.
4173         * gnulib/import/setenv.c: Update.
4174         * gnulib/import/signal.in.h: Update.
4175         * gnulib/import/stat-time.c: Update.
4176         * gnulib/import/stat-time.h: Update.
4177         * gnulib/import/stat-w32.c: Update.
4178         * gnulib/import/stat-w32.h: Update.
4179         * gnulib/import/stat.c: Update.
4180         * gnulib/import/stdbool.in.h: Update.
4181         * gnulib/import/stddef.in.h: Update.
4182         * gnulib/import/stdint.in.h: Update.
4183         * gnulib/import/stdio.in.h: Update.
4184         * gnulib/import/stdlib.in.h: Update.
4185         * gnulib/import/str-two-way.h: Update.
4186         * gnulib/import/strchrnul.c: Update.
4187         * gnulib/import/strdup.c: Update.
4188         * gnulib/import/streq.h: Update.
4189         * gnulib/import/strerror-override.c: Update.
4190         * gnulib/import/strerror-override.h: Update.
4191         * gnulib/import/strerror.c: Update.
4192         * gnulib/import/string.in.h: Update.
4193         * gnulib/import/stripslash.c: Update.
4194         * gnulib/import/strnlen1.c: Update.
4195         * gnulib/import/strnlen1.h: Update.
4196         * gnulib/import/strstr.c: Update.
4197         * gnulib/import/strtok_r.c: Update.
4198         * gnulib/import/sys_stat.in.h: Update.
4199         * gnulib/import/sys_time.in.h: Update.
4200         * gnulib/import/sys_types.in.h: Update.
4201         * gnulib/import/tempname.c: Update.
4202         * gnulib/import/tempname.h: Update.
4203         * gnulib/import/time.in.h: Update.
4204         * gnulib/import/unistd--.h: Update.
4205         * gnulib/import/unistd-safer.h: Update.
4206         * gnulib/import/unistd.in.h: Update.
4207         * gnulib/import/unsetenv.c: Update.
4208         * gnulib/import/verify.h: Update.
4209         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4210         * gnulib/import/wchar.in.h: Update.
4211         * gnulib/import/wctype.in.h: Update.
4212         * gnulib/import/xalloc-oversized.h: Update.
4213         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4214         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4215
4216 2018-08-16  Gary Benson <gbenson@redhat.com>
4217
4218         PR gdb/13000:
4219         * gdb/main.c (captured_main_1): Exit with nonzero status
4220         in batch mode if the last command to be executed failed.
4221         * NEWS: Mention the above.
4222
4223 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4224
4225         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4226         end of warning message.
4227
4228 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4229
4230         PR gdb/22943:
4231         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4232         (aarch64_extract_return_value): Use
4233         aapcs_is_vfp_call_or_return_candidate.
4234         (aarch64_return_in_memory): Likewise.
4235         (aarch64_store_return_value): Likewise.
4236
4237 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4238
4239         * aarch64-tdep.c
4240         (aapcs_is_vfp_call_or_return_candidate): Make static
4241         (pass_in_v_or_stack): Remove function.
4242         (pass_in_v_vfp_candidate): New function.
4243         (aarch64_push_dummy_call): Check for float register candidates.
4244
4245 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4246
4247         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4248         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4249         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4250
4251 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4252
4253         PR build/23399
4254         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4255         (struct ipa_sym_addresses): Rename to...
4256         (struct ipa_sym_addresses_common): ... this.
4257         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4258
4259 2018-08-28  Tom Tromey  <tom@tromey.com>
4260
4261         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4262         (token_fifo): Now a std::vector.
4263         (yylex, c_parse): Update.
4264         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4265         (token_fifo): Now a std::vector.
4266         (yylex, d_parse): Update.
4267         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4268         (token_fifo): Now a std::vector.
4269         (yylex, go_parse): Update.
4270
4271 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4272
4273         * parser-defs.h (struct type_stack) <elements>: Change type to
4274         std::vector<union type_stack_elt>.
4275         <depth, size>: Remove.
4276         * parse.c (parse_exp_in_context_1): Adjust.
4277         (type_stack_reserve): Remove.
4278         (check_type_stack_depth): Remove.
4279         (insert_into_type_stack): Adjust to std::vector.
4280         (insert_type): Likewise.
4281         (push_type): Likewise.
4282         (push_type_int): Likewise.
4283         (insert_type_address_space): Likewise.
4284         (pop_type): Likewise.
4285         (pop_type_int): Likewise.
4286         (pop_typelist): Likewise.
4287         (pop_type_stack): Likewise.
4288         (append_type_stack): Likewise.
4289         (push_type_stack): Likewise.
4290         (get_type_stack): Likewise.
4291         (type_stack_cleanup): Likewise.
4292         (push_typelist): Likewise.
4293         (follow_types): Likewise.
4294         (_initialize_parse): Likewise.
4295
4296 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4297
4298         * NEWS: Mention csky target.
4299
4300 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4301             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4302             Don Breazeal  <donb@codesourcery.com>
4303
4304         * csky-linux-tdep.c: New file.
4305         * csky-tdep.c: Likewise.
4306         * csky-tdep.h: Likewise.
4307         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4308         csky-tdep.o.
4309         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4310         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4311         * configure.tgt: Add csky support.
4312
4313 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4314
4315         * python/py-framefilter.c (py_print_frame): Print frame architecture
4316         when printing on an MI output.
4317
4318 2018-08-27  Tom Tromey  <tom@tromey.com>
4319
4320         PR build/23087:
4321         * configure: Rebuild.
4322         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4323
4324 2018-08-27  Tom Tromey  <tom@tromey.com>
4325
4326         * aarch64-linux-tdep.c
4327         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4328         casts to int.
4329
4330 2018-08-27  Tom Tromey  <tom@tromey.com>
4331
4332         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4333         unsigned.
4334         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4335         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4336         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4337         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4338         unsigned.
4339
4340 2018-08-27  Tom Tromey  <tom@tromey.com>
4341
4342         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4343         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4344
4345 2018-08-27  Tom Tromey  <tom@tromey.com>
4346
4347         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4348         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4349         ULONGEST_MAX.
4350         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4351         ULONGEST_MAX.
4352         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4353         ULONGEST_MAX.
4354         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4355         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4356         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4357         ULONGEST_MAX.
4358         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4359         (ppc64_linux_sigaction_tramp_frame)
4360         (ppc32_linux_sighandler_tramp_frame)
4361         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4362         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4363         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4364         * mn10300-linux-tdep.c (am33_linux_sigframe)
4365         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4366         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4367         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4368         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4369         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4370         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4371         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4372         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4373         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4374         * microblaze-linux-tdep.c
4375         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4376         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4377         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4378         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4379         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4380         * common/common-types.h (ULONGEST_MAX): New define.
4381         (CORE_ADDR_MAX): Fix formatting.
4382         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4383         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4384         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4385         (arm_linux_rt_sigreturn_tramp_frame)
4386         (arm_eabi_linux_sigreturn_tramp_frame)
4387         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4388         (thumb2_eabi_linux_sigreturn_tramp_frame)
4389         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4390         (arm_linux_restart_syscall_tramp_frame)
4391         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4392         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4393         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4394         ULONGEST_MAX.
4395         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4396
4397 2018-08-27  Tom Tromey  <tom@tromey.com>
4398
4399         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4400         CORE_ADDR_MAX.
4401         * mips-tdep.c (mips_deal_with_atomic_sequence)
4402         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4403         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4404         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4405         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4406         CORE_ADDR_MAX.
4407         * aarch64-tdep.c (aarch64_software_single_step): Use
4408         CORE_ADDR_MAX.
4409
4410 2018-08-27  Tom Tromey  <tom@tromey.com>
4411
4412         * linespec.c (complete_linespec_component): Add cast to "char".
4413         * completer.c (completion_tracker::build_completion_result): Add
4414         cast to "char".
4415
4416 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4417
4418         * solist.h (struct solist, struct target_so_ops): Fix
4419         indentation.
4420
4421 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4422
4423         * ada-tasks.c (ada_task_info_s): Remove typedef.
4424         (DEF_VEC_O(ada_task_info_s)): Remove.
4425         (struct ada_tasks_inferior_data): Initialize fields.
4426         <task_list>: Make an std::vector.
4427         (get_ada_tasks_inferior_data): Allocate with new.
4428         (ada_get_task_number): Adjust.
4429         (get_task_number_from_id): Likewise.
4430         (valid_task_id): Likewise.
4431         (ada_get_task_info_from_ptid): Likewise.
4432         (iterate_over_live_ada_tasks): Likewise.
4433         (add_ada_task): Likewise.
4434         (read_known_tasks): Likewise.
4435         (ada_build_task_list): Likewise.
4436         (print_ada_task_info): Likewise.
4437         (info_task): Likewise.
4438         (task_command_1): Likewise.
4439
4440 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4441
4442         * ada-lang.c (add_angle_brackets): Return std::string.
4443
4444 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
4445
4446         * python/py-threadevent.c (py_get_event_thread): Initialize
4447         pythread.
4448
4449 2018-08-24  Pedro Alves  <palves@redhat.com>
4450
4451         * python/py-bpevent.c (create_breakpoint_event_object): Use
4452         copy-initialization.
4453         * python/py-continueevent.c (emit_continue_event): Use
4454         copy-initialization.
4455         * python/py-exitedevent.c (create_exited_event_object): Return a
4456         gdbpy_ref<>.
4457         (emit_exited_event): Use copy-initialization.
4458         * python/py-inferior.c (python_new_inferior)
4459         (python_inferior_deleted, add_thread_object): Use
4460         copy-initialization.
4461         * python/py-infevents.c (create_inferior_call_event_object)
4462         (create_register_changed_event_object)
4463         (create_memory_changed_event_object): Return a gdbpy_ref<>.
4464         (emit_inferior_call_event, emit_memory_changed_event)
4465         (emit_register_changed_event): Use copy-initialization.
4466         * python/py-newobjfileevent.c (create_new_objfile_event_object):
4467         Return a gdbpy_ref<>.
4468         (emit_new_objfile_event): Use copy-initialization.
4469         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4470         (emit_clear_objfiles_event): Use copy-initialization.
4471         * python/py-signalevent.c (create_signal_event_object): Use
4472         copy-initialization.
4473         * python/py-threadevent.c (create_thread_event_object): Use
4474         copy-initialization.
4475
4476 2018-08-24  Pedro Alves  <palves@redhat.com>
4477             Simon Marchi  <simon.marchi@ericsson.com>
4478
4479         PR gdb/23379
4480         * python/py-continueevent.c: Include "gdbthread.h".
4481         (create_continue_event_object): Add intro comment.  Add 'ptid'
4482         parameter.  Use it to find thread to pass to
4483         create_thread_event_object.
4484         (emit_continue_event): Pass PTID down to
4485         create_continue_event_object.
4486         * python/py-event.h (py_get_event_thread): Declare.
4487         (create_thread_event_object): Remove default from 'thread'
4488         parameter.
4489         * python/py-stopevent.c (create_stop_event_object): Use
4490         py_get_event_thread.
4491         * python/py-threadevent.c (get_event_thread): Rename to ...
4492         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
4493         and use it to find the thread.
4494         (create_thread_event_object): Assert that THREAD isn't null.
4495         Don't find the event thread here.
4496
4497 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
4498
4499         * block.h (blockrange, blockranges): New struct declarations.
4500         (struct block): Add new field named `ranges'.
4501         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
4502         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
4503         macros for accessing ranges in struct block.
4504         (make_blockranges): New declaration.
4505         block.c (make_blockranges): New function.
4506         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
4507         for block.
4508         * symtab.h (find_pc_partial_function): Add new parameter `block'.
4509         * blockframe.c (cache_pc_function_block): New static global.
4510         (clear_pc_function_cache): Clear cache_pc_function_block.
4511         (find_pc_partial_function): Move comment to symtab.h.  Add
4512         support for non-contiguous blocks.
4513         * cli/cli-cmds.c (block.h): Include.
4514         (print_disassembly): Handle printing of non-contiguous blocks.
4515         (disassemble_current_function): Likewise.
4516         (disassemble_command): Likewise.
4517
4518         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
4519         BLOCK_START.
4520         * blockframe.c (get_pc_function_start): Likewise.
4521         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
4522         (gcc_symbol_address): Likewise.
4523         * compile/compile-object-run.c (compile_object_run): Likewise.
4524         * compile/compile.c (get_expr_block_and_pc): Likewise.
4525         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
4526         (func_addr_to_tail_call_list): Likewise.
4527         * findvar.c (default_read_var_value): Likewise.
4528         * inline-frame.c (inline_frame_this_id): Likewise.
4529         (skip-inline_frames): Likewise.
4530         * infcmd.c (until_next_command): Likewise.
4531         * linespec.c (convert_linespec_to_sals): Likewise.
4532         * parse.c (parse_exp_in_context_1): Likewise.
4533         * printcmd.c (build_address_symbolic): likewise.
4534         (info_address_command): Likewise.
4535         symtab.c (find_function_start_sal): Likewise.
4536         (skip_prologue_sal): Likewise.
4537         (find_function_alias_target): Likewise.
4538         (find_gnu_ifunc): Likewise.
4539         * stack.c (find_frame_funname): Likewise.
4540         * symtab.c (fixup_symbol_section): Likewise.
4541         (find_function_start_sal): Likewise.
4542         (skip_prologue_sal): Likewsie.
4543         (find_function_alias_target): Likewise.
4544         (find_gnu_ifunc): Likewise.
4545         * tracepoint.c (info_scope_command): Likewise.
4546         * value.c (value_fn_field): Likewise.
4547
4548         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
4549         in place of find_pc_partial_function.
4550         * blockframe.c (find_function_entry_range_from_pc): New function.
4551         * symtab.h (find_function_entry_range_from_pc): Declare and document.
4552         * objfiles.c (objfile_relocate1): Relocate start and end addresses
4553         for each range in a block.
4554
4555
4556 2018-08-23  Xavier Roirand  <roirand@adacore.com>
4557
4558         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
4559         incrementation.
4560
4561 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4562
4563         * solib-svr4.c (read_program_headers_from_bfd): Return
4564         gdb::optional<gdb::byte_vector>.
4565         (svr4_exec_displacement): Adjust.
4566
4567 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4568
4569         * solib-svr4.c (read_program_header): Return
4570         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
4571         (find_program_interpreter): Return
4572         gdb::optional<gdb::byte_vector>.
4573         (scan_dyntag_auxv): Adjust.
4574         (enable_break): Adjust.
4575         (svr4_exec_displacement): Adjust.
4576
4577 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4578
4579         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
4580         * inf-child.c (inf_child_target::terminal_save_inferior): New.
4581
4582 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4583
4584         * guile/scm-string.c (gdbscm_scm_from_printf): Use
4585         string_vprintf.
4586         * guile/scm-utils.c (gdbscm_printf): Likewise.
4587         * serial.c (serial_printf): Likewise.
4588         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
4589
4590 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
4591
4592         * stack.c (print_frame): Print frame architecture when printing on
4593         an MI output.
4594         * NEWS: Mention new "arch" attribute in frame output.
4595
4596 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4597
4598         * arch/aarch64.h (aarch64_regnum): Update comment.
4599
4600 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4601
4602         * NEWS: Add SVE to 8.2 section.
4603
4604 2018-08-21  Pedro Alves  <palves@redhat.com>
4605
4606         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
4607         out from gdbscm_parse_function_args.
4608         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
4609         gdbscm_parse_function_args_1.
4610
4611 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
4612
4613         PR gdb/17816
4614         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
4615         operator.
4616
4617 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
4618
4619         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
4620
4621 2018-08-19  Michael Spang  <spang@google.com>
4622
4623         PR gdb/11786
4624         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
4625         for PT_TLS segments.
4626
4627 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
4628
4629         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
4630         dwarf_variable_value.
4631         * dwarf2-frame.c (class dwarf_expr_executor):
4632         Add override for dwarf_variable_value.
4633         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
4634         (class symbol_needs_eval_context): Likewise.
4635         (indirect_synthetic_pointer): Add forward declaration.
4636         (sect_variable_value): New function.
4637         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
4638         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
4639         for DW_OP_GNU_variable_value.
4640
4641 2018-08-16  Tom Tromey  <tom@tromey.com>
4642
4643         * top.c (read_command_file): Update.
4644         (command_line_input): Remove "repeat" argument.
4645         * ada-lang.c (get_selections): Update.
4646         * linespec.c (decode_line_2): Update.
4647         * defs.h (command_line_input): Remove argument.
4648         * cli/cli-script.c (read_next_line): Update.
4649         * python/py-gdb-readline.c: Update.
4650
4651 2018-08-17  Tom Tromey  <tom@tromey.com>
4652
4653         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
4654         command_line_input.
4655
4656 2018-08-15  Tom Tromey  <tom@tromey.com>
4657
4658         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
4659
4660 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
4661
4662         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
4663         If used, use find_pc_partial_function to find address range
4664         to disassemble.
4665         * mi/mi-main.c (mi_cmd_list_features): Report
4666         "data-disassemble-a-option" feature.
4667         * NEWS: Mention new -data-disassemble option -a.
4668
4669 2018-08-13  Tom Tromey  <tom@tromey.com>
4670
4671         * common/common-defs.h (_FORTIFY_SOURCE): Define.
4672
4673 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4674
4675         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
4676         (aarch64_linux_collect_sve_regset): Likewise.
4677         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
4678         * regcache.h (regcache_map_entry_size): New function.
4679
4680 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4681
4682         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
4683         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
4684         (SVE_HEADER_VL_LENGTH): Likewise.
4685         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
4686         (SVE_HEADER_FLAGS_LENGTH): Likewise.
4687         (SVE_HEADER_RESERVED_LENGTH): Likewise.
4688         (SVE_HEADER_SIZE_OFFSET): Likewise.
4689         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
4690         (SVE_HEADER_VL_OFFSET): Likewise.
4691         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
4692         (SVE_HEADER_FLAGS_OFFSET): Likewise.
4693         (SVE_HEADER_RESERVED_OFFSET): Likewise.
4694         (SVE_HEADER_SIZE): Likewise.
4695         (aarch64_linux_core_read_vq): Add function.
4696         (aarch64_linux_core_read_description): Check for SVE section.
4697
4698 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4699
4700         * aarch64-fbsd-tdep.c
4701         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
4702         collect_size.
4703         * aarch64-linux-tdep.c
4704         (aarch64_linux_iterate_over_regset_sections): Likewise.
4705         * alpha-linux-tdep.c
4706         (alpha_linux_iterate_over_regset_sections):
4707         * alpha-nbsd-tdep.c
4708         (alphanbsd_iterate_over_regset_sections): Likewise.
4709         * amd64-fbsd-tdep.c
4710         (amd64fbsd_iterate_over_regset_sections): Likewise.
4711         * amd64-linux-tdep.c
4712         (amd64_linux_iterate_over_regset_sections): Likewise.
4713         * arm-bsd-tdep.c
4714         (armbsd_iterate_over_regset_sections): Likewise.
4715         * arm-fbsd-tdep.c
4716         (arm_fbsd_iterate_over_regset_sections): Likewise.
4717         * arm-linux-tdep.c
4718         (arm_linux_iterate_over_regset_sections): Likewise.
4719         * corelow.c (get_core_registers_cb): Likewise.
4720         (core_target::fetch_registers): Likewise.
4721         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
4722         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
4723         * gdbarch.h (void): Regenerate.
4724         * gdbarch.sh: Add supply_size and collect_size.
4725         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
4726         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
4727         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
4728         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
4729         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
4730         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
4731         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
4732         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
4733         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
4734         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
4735         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
4736         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
4737         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
4738         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
4739         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
4740         Likewise.
4741         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
4742         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
4743         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
4744         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
4745         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
4746         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
4747         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
4748         Likewise.
4749         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
4750         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4751         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4752         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4753         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4754         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4755         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4756         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4757
4758 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
4759
4760         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4761         with string_printf.
4762
4763 2018-08-10  Keith Seitz  <keiths@redhat.com>
4764
4765         * compile/compile-c-support.c (add_code_header, add_code_footer):
4766         Move into policy class.
4767         (c_push_user_expression, pop_user_expression_nop)
4768         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4769         (compile_program): New host class.
4770         (c_compile_program): New typedef.
4771         (c_compute_porgram): Use c_compile_program.
4772
4773 2018-08-10  Keith Seitz  <keiths@redhat.com>
4774
4775         * compile/compile-internal.h (compile_instance::~compile_instance):
4776         Remove calls to htab_delete.
4777         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4778         * compile.c (compile_instance::compile_instance): Initialize
4779         htab unique pointers.
4780         (compile_instance::get_cached_type, compile_instance::insert_type)
4781         (compile_instance::error_symbol_once): Update for unique_ptr.
4782
4783 2018-08-10  Keith Seitz  <keiths@redhat.com>
4784
4785         * compile/compile-c-symbols.c (struct symbol_error)
4786         (hash_symbol_error, eq_symbol_error, del_symbol_error)
4787         (compile_instance::insert_symbol_error)
4788         (compile_instance::error_symbol_once): Move to ...
4789         * compile/compile.c: ... here.
4790
4791 2018-08-10  Keith Seitz  <keiths@redhat.com>
4792
4793         * compile/compile-c-support.c (c_get_compile_context): Use `new'
4794         instead of `new_compile_instance'.
4795         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4796         Update description.
4797         If the symbol error map is not initialized, create it.
4798         (generate_c_for_for_one_symbol): Do not check/initialize
4799         the symbol error map.
4800         * compile/compile-c-types.c (compile_c_instance): Make a class.
4801         Update all callers.
4802         (compile_instance::compile_instance): Initialize the type cache.
4803         (get_cached_type): New function.
4804         (insert_type): Update description.
4805         (compile_c_instance::m_default_cflags): Define.
4806         (convert_type): Update description.  Use get_cached_type.
4807         (delete_instance): Moved to destructor.
4808         (new_compile_instance): Moved to constructor.
4809         * compile/compile-c.h (compile_c_instance): Make class inheriting
4810         from compile_instance.
4811         <base>: Remove field.
4812         <type_map, symbol_err_map>: Move to base class.
4813         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4814         * compile/compile-internal.h (compile_instance): Make class.
4815         <type_map_t, symbol_err_map_t>: Define.
4816         <fe>: Rename to `m_gcc_fe'.
4817         <scope, block, gcc_target_options>: Add `m_' prefix.
4818         <m_type_map, m_symbol_err_map>: New fields, moved from
4819         compile_c_instance.
4820         <destroy>: Remove.
4821         (convert_type, new_compile_instance): Remove.
4822         * compile/compile.c (cleanup_compile_instance): Remove.
4823         (compile_to_object): Use unique_ptr to eliminate cleanups.
4824         (compile_instance::set_print_callback, compile_instance::version)
4825         (compile_instance::set_verbose)
4826         (compile_instance::set_driver_filename)
4827         (compile_instance::set_triplet_regexp)
4828         (compile_instance::set_arguments)
4829         (compile_instance::set_source_file)
4830         (compile_instance::compile): Define.
4831
4832 2018-08-10  Keith Seitz  <keiths@redhat.com>
4833
4834         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4835         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4836         gcc-c-fe.def to define C plugin.
4837         (delete_instance): Delete `c_plugin'.
4838         (new_compile_instance): Initialize `c_plugin'.
4839         * compile/compile-c.h: Include gcc_c_plugin.h.
4840         (struct compile_c_instance) <c_plugin>: New member.
4841         * gcc-c-plugin.h: New file.
4842         Update all callers with API change.
4843
4844 2018-08-10  Keith Seitz  <keiths@redhat.com>
4845
4846         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4847         (HFILES_NO_SRCDIR): ... to here.
4848         Add compile-internal.h and compile-c.h.
4849         * compile/compile-c-support.c: Include compile-c.h.
4850         * compile/compile-c-symbols.c: Include compile-c.h.
4851         (generate_c_for_variable_locations): Update comment.
4852         * compile/compile-c-types.c: Include compile-c.h.
4853         * compile/compile-c.h: New file -- moved C language declarations
4854         from other files here.
4855         * compile/compile-internal.h: Do not include hashtab.h or
4856         common/enum-flags.h.
4857         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4858         (gcc_convert_symbol, gcc_symbol_address)
4859         (generate_c_for_variable_locations, c_get_mode_for_size)
4860         (c_get_range_decl_name): Definitions moved to compile-c.h.
4861         * compile/compile-loc2c.c: Include compile-c.h.
4862
4863 2018-08-10  Keith Seitz  <keiths@redhat.com>
4864
4865         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4866         (c_symbol_substitution_name): ... this.
4867         Update all callers.
4868
4869 2018-08-10  Keith Seitz  <keiths@redhat.com>
4870
4871         * compile/compile-c-support.c (c_compute_program): Use
4872         unique_xmalloc_ptr to eliminate cleanup.
4873         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4874         Return a unique_xmalloc_ptr and eliminate cleanup.
4875         * compile/compile-internal.h (generate_c_for_variable_locations):
4876         Return unique_xmalloc_ptr and update description.
4877
4878 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4879
4880         * corelow.c (core_target::get_core_register_section): Rename
4881         min_size to section_min_size.
4882
4883 2018-08-09  Jim Wilson  <jimw@sifive.com>
4884
4885         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4886         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4887         * NEWS: Mention new GNU/Linux RISC-V target.
4888         * configure.host: Add riscv*-*-linux*.
4889         * configure.nat: Add riscv*.
4890         * configure.tgt: Add riscv*-*-linux*.
4891         * riscv-linux-nat.c: New file.
4892         * riscv-linux-tdep.c: New file.
4893
4894 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4895
4896         * infrun.c (resume): Make static, add forward declaration.
4897         (proceed): Update header comment.
4898         * infrun.h (resume): Delete declaration.
4899
4900 2018-08-09  Tom Tromey  <tom@tromey.com>
4901
4902         * riscv-tdep.h: Minor formatting fixes.
4903
4904 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4905
4906         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4907         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4908         (test_mkdir_recursive): Likewise.
4909         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4910
4911 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4912
4913         * valarith.c (value_subscripted_rvalue): If an array is not in
4914         memory, and we don't know the upper bound, then we can't know that
4915         the requested element exists or not.
4916
4917 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4918
4919         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4920         (target_options_to_string): Add comment.
4921
4922 2018-08-08  Tom Tromey  <tom@tromey.com>
4923
4924         * unittests/scoped_mmap-selftests.c: Check result of "write".
4925
4926 2018-08-08  Jim Wilson  <jimw@sifive.com>
4927
4928         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4929         (decode_register_index_short): New.
4930         (decode_j_type_insn, decode_cj_type_insn): New.
4931         (decode_b_type_insn, decode_cb_type_insn): New.
4932         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4933         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4934         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4935         is_c_sw_insn instead of is_sw_insn.
4936         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4937         (riscv_software_single_step): New.
4938         * riscv-tdep.h (riscv_software_single_step): Declare.
4939
4940         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4941         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4942
4943 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4944
4945         PR gdb/18050:
4946         * target.c (dispose_inferior): Don't dispose of inferiors that are
4947         already killed.
4948
4949 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4950
4951         * remote.c (remote_target::download_tracepoint): Change char* to
4952         const char*.
4953
4954 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4955
4956         * target.h (target_options_to_string): Return an std::string.
4957         * target.c (str_comma_list_concat_elem): Return void, use
4958         std::string.
4959         (do_option): Likewise.
4960         (target_options_to_string): Return an std::string.
4961         * linux-nat.c (linux_nat_target::wait): Adjust.
4962         * target-debug.h (target_debug_print_options): Adjust.
4963
4964 2018-08-07  Tom Tromey  <tom@tromey.com>
4965
4966         * Makefile.in (CPPFLAGS): New variable.
4967         (INTERNAL_CPPFLAGS): Use it.
4968
4969 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4970
4971         * NEWS: Mention the index cache.
4972
4973 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4974
4975         * common/pathstuff.h (get_standard_cache_dir): New.
4976         * common/pathstuff.c (get_standard_cache_dir): New.
4977         * build-id.h (build_id_to_string): New.
4978         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4979         DEBUG_STR_SUFFIX): Move to here.
4980         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4981         DEBUG_STR_SUFFIX): Move from there.
4982         (write_psymtabs_to_index): Make non-static, add basename
4983         parameter.  Write to temporary files, rename when done.
4984         (save_gdb_index_command): Adjust call to
4985         write_psymtabs_to_index.
4986         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4987         field.
4988         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4989         (get_gdb_index_contents_from_cache): New.
4990         (get_gdb_index_contents_from_cache_dwz): New.
4991         (dwarf2_initialize_objfile): Read index from cache.
4992         (dwarf2_build_psymtabs): Save to index.
4993         * dwarf-index-cache.h: New file.
4994         * dwarf-index-cache.c: New file.
4995         * dwarf-index-write.h: New file.
4996
4997 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4998
4999         * gnulib/aclocal.m4: Re-generate.
5000         * gnulib/config.in: Re-generate.
5001         * gnulib/configure: Re-generate.
5002         * gnulib/import/Makefile.am: Re-generate.
5003         * gnulib/import/Makefile.in: Re-generate.
5004         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5005         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5006         * gnulib/import/m4/mkdir.m4: New file.
5007         * gnulib/import/mkdir.c: New file.
5008         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5009         module.
5010
5011 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5012
5013         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5014         * common/scoped_mmap.c: New file.
5015         * common/scoped_mmap.h (destroy): New method.
5016         (~scoped_mmap, reset): Use destroy.
5017         (scoped_mmap): New move constructor.
5018         (mmap_file): New declaration.
5019         * unittests/scoped_mmap-selftests.c (test_normal,
5020         test_invalid_filename, run_tests): New functions.
5021         (_initialize_scoped_mmap_selftests): Register selftest.
5022
5023 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5024
5025         * dwarf2read.c (read_gdb_index_from_section): Rename to...
5026         (read_gdb_index_from_buffer): ... this.  Remove section
5027         parameter, add buffer parameter.
5028         (get_gdb_index_contents_ftype,
5029         get_gdb_index_contents_dwz_ftype): New typedefs.
5030         (dwarf2_read_gdb_index): Add callback parameters to get the
5031         index contents.
5032         (get_gdb_index_contents_from_section): New.
5033         (dwarf2_initialize_objfile): Update call to
5034         dwarf2_read_gdb_index.
5035
5036 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5037
5038         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5039         (gdb_open_cloexec): Likewise.
5040         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5041         (commandline_from_pid): Likewise.
5042         (linux_xfer_osdata_threads): Likewise.
5043         (linux_xfer_osdata_fds): Likewise.
5044         * ada-lang.c (is_package_name): Likewise.
5045         * auxv.c (procfs_xfer_auxv): Likewise.
5046         * breakpoint.c (print_one_breakpoint_location): Use
5047         uiout::field_fmt.
5048         (print_one_catch_solib): Use string_printf.
5049         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5050         (add_pe_forwarded_sym): Likewise.
5051         * dwarf2read.c (create_type_unit_group): Likewise.
5052         (build_error_marker_type): Likewise.
5053         * infcall.c (get_function_name): Likewise.
5054         * valprint.c (print_converted_chars_to_obstack): Likewise.
5055         * xtensa-tdep.c (xtensa_register_type): Likewise.
5056
5057 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5058
5059         * remote.c (remote_target::download_tracepoint): Fix format
5060         string errors.
5061
5062 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5063
5064         * tracefile.c: Include common/byte-vector.h.
5065         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5066         with trace_regblock_size if needed.  Update uses of buf.
5067
5068 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5069
5070         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5071         std::vector<unsigned char>.
5072         * tracepoint.c (collection_list::collection_list): Remove
5073         m_regs_mask initializer from initializer list.  Resize
5074         m_regs_mask using the largest remote register number.
5075         (collection_list::add_remote_register): Remove size check on
5076         m_regs_mask.  Use at to access element.
5077         (collection_list::stringify): Change type of temp_buf to
5078         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5079         stringify the register mask.  Use pack_hex_byte for the register
5080         mask.
5081
5082 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5083
5084         * tracepoint.h (class collection_list) <add_register>: Remove.
5085         <add_remote_register, add_ax_registers, add_local_register>:
5086         Declare.
5087         <add_memrange>: Add scope parameter.
5088         * tracepoint.c (encode_actions_1): Likewise.
5089         (collection_list::add_register): Rename to ...
5090         (collection_list::add_remote_register): ... this.  Update
5091         comment.
5092         (collection_list::add_ax_registers, add_local_register): New
5093         methods.
5094         (collection_list::add_memrange): Add scope parameter.  Call
5095         add_local_register instead of add_register.
5096         (finalize_tracepoint_aexpr): New function.
5097         (collection_list::collect_symbol): Update calls to add_memrange.
5098         Call add_local_register instead of add_register.  Call
5099         add_ax_registers.  Call finalize_tracepoint_aexpr.
5100         (encode_actions_1): Get remote regnos for $reg action.  Call
5101         add_remote_register, add_ax_registers, and add_local_register.
5102         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5103         (validate_actionline): Call finalize_tracepoint_aexpr.
5104
5105 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5106
5107         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5108         Replace array buf with gdb::char_vector buf, of size
5109         get_remote_packet_size ().  Replace references to buf and
5110         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5111         and xsnprintf with snprintf.  Raise errors if the buffer is too
5112         small.
5113
5114 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5115
5116         * remote.c (remote_target::download_tracepoint): Fix the has_more
5117         predicate in the QTDP action list iteration.
5118
5119 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5120
5121         * remote.c (remote_target::download_tracepoint): Fix indentation
5122         in for block.
5123
5124 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5125
5126         * proc-api.c (_initialize_proc_api): Remove c, unused.
5127         * procfs.c (procfs_init_inferior): Remove signals, unused.
5128         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5129         unused.
5130
5131 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5132             Andrew Burgess  <andrew.burgess@embecosm.com>
5133
5134         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5135         'W_STOPCODE (0)' as this could be ambiguous.
5136
5137 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5138
5139         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5140         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5141         "ai_socktype").
5142
5143 2018-08-02  Tom Tromey  <tom@tromey.com>
5144
5145         PR symtab/16842.
5146         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5147         symbols.
5148         (process_structure_scope): Likewise.
5149
5150 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5151
5152         PR gdb/22629:
5153         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5154         kill inferior.
5155
5156 2018-08-02  Tom Tromey  <tom@tromey.com>
5157
5158         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5159         (darwin_suspend_inferior, darwin_resume_inferior)
5160         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5161         (darwin_check_new_threads): Check result of get_darwin_inferior.
5162
5163 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5164
5165         GDB 8.1.1 released.
5166
5167 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5168
5169         * varobj.c (varobj_get_path_expr_parent): Report an error if
5170         parent is a dynamic varobj.
5171
5172 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5173
5174         * gnulib/aclocal.m4: Re-generate.
5175         * gnulib/config.in: Re-generate.
5176         * gnulib/configure: Re-generate.
5177         * gnulib/import/Makefile.in: Re-generate.
5178         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5179         * gnulib/import/m4/onceonly.m4: Re-generate.
5180
5181 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5182
5183         * target-descriptions.c (struct xml_test_tdesc): New.
5184         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5185         (record_xml_tdesc): Update.
5186         (maintenance_check_xml_descriptions): Update.
5187         * target-descriptions.h (record_xml_tdesc): Update comment.
5188
5189 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5190
5191         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5192         checking array bounds are defined.
5193
5194 2018-07-30  Tom Tromey  <tom@tromey.com>
5195
5196         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5197         irreflexivity violation.
5198
5199 2018-07-30  Tom Tromey  <tom@tromey.com>
5200
5201         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5202         * value.c (unpack_long): Remove lint code.
5203         * valops.c (value_ind): Remove lint code.
5204         * valarith.c (value_x_binop, value_x_unop, value_equal)
5205         (value_pos): Remove lint code.
5206
5207 2018-07-28  Tom de Vries  <tdevries@suse.de>
5208
5209         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5210         with undefined upper bound as <optimized out>.
5211
5212 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5213
5214         * gcore.in: Rename variable "name" to "prefix".  Expand
5215         "usage" text.
5216
5217 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5218
5219         * windows-nat.c (windows_nat_target::create_inferior): Update to
5220         call close() in global namespace.
5221
5222 2018-07-26  Tom Tromey  <tom@tromey.com>
5223
5224         * dwarf-index-write.c (add_address_entry): Don't add objfile
5225         offsets.
5226         * dbxread.c (find_stab_function): Rename from
5227         find_stab_function_addr.  Return a bound_minimal_symbol.
5228         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5229         Don't add objfile offsets.
5230         (end_psymtab): Use raw_text_low, raw_text_high,
5231         MSYMBOL_VALUE_RAW_ADDRESS.
5232         (read_ofile_symtab): Update.
5233         (process_one_symbol): Update.
5234         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5235         offsets.
5236         (dw2_relocate): Remove.
5237         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5238         searching addrmap.
5239         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5240         Update.
5241         (process_psymtab_comp_unit_reader, add_partial_symbol)
5242         (add_partial_subprogram, dwarf2_ranges_read): Update.
5243         (load_partial_dies): Update.
5244         (add_address_entry): Don't add objfile offsets.
5245         (dwarf2_build_include_psymtabs): Update.
5246         (create_addrmap_from_aranges): Don't add objfile offsets.
5247         (dw2_find_pc_sect_compunit_symtab): Update.
5248         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5249         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5250         Update.
5251         (parse_partial_symbols): Don't add objfile offsets.  Use
5252         raw_text_low, raw_text_high.  Update.
5253         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5254         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5255         or call 'relocate' quick function.  Clear psymbol_map.
5256         * psympriv.h (struct partial_symbol) <address>: Add section
5257         offset.
5258         <set_unrelocated_address>: Rename from set_address.
5259         <raw_text_low, raw_text_high>: New methods.
5260         <text_low, text_high>: Add objfile parameter.
5261         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5262         set_unrelocated_address.
5263         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5264         (find_pc_psymbol): Update.
5265         (fixup_psymbol_section, relocate_psymtabs): Remove.
5266         (dump_psymtab, psym_functions): Update.
5267         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5268         parameter.
5269         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5270         (start_psymtab_common): Update.
5271         * symfile-debug.c (debug_qf_relocate): Remove.
5272         (debug_sym_quick_functions): Update.
5273         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5274         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5275         Update.
5276
5277 2018-07-26  Tom Tromey  <tromey@redhat.com>
5278
5279         * dbxread.c (end_psymtab): Use text_high_valid and
5280         text_low_valid.
5281         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5282         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5283         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5284         Update comment.
5285         <text_low_valid, text_high_valid>: New fields.
5286         <set_text_low, set_text_high>: Update.
5287         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5288
5289 2018-07-26  Tom Tromey  <tom@tromey.com>
5290
5291         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5292         Update.
5293         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5294         textlow and texthigh fields.
5295         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5296         Update.
5297         * mdebugread.c (parse_lines, parse_partial_symbols)
5298         (psymtab_to_symtab_1): Update.
5299         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5300         Rename fields.  Update comment.  Now private.
5301         <text_low, text_high, set_text_low, set_text_high>: New methods.
5302         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5303         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5304         (start_psymtab_common, maintenance_info_psymtabs)
5305         (maintenance_check_psymtabs): Update.
5306         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5307         texthigh fields.
5308         (scan_xcoff_symtab): Update.
5309
5310 2018-07-26  Tom Tromey  <tromey@redhat.com>
5311
5312         * psympriv.h (struct partial_symbol) <unrelocated_address,
5313         address, set_address>: New methods.
5314         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5315         (fixup_psymbol_section, relocate_psymtabs): Update.
5316         (print_partial_symbols): Add 'objfile' parameter.  Update.
5317         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5318         Update.
5319
5320 2018-07-26  Tom Tromey  <tom@tromey.com>
5321
5322         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5323         (debug_names::write_psymbols): Update.
5324         * psympriv.h (struct partial_symbol): Derive from
5325         general_symbol_info.
5326         <obj_section>: New method.
5327         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5328         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5329         (find_pc_sect_psymbol, fixup_psymbol_section)
5330         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5331         (print_partial_symbols, recursively_search_psymtabs)
5332         (compare_psymbols, psymbol_hash, psymbol_compare)
5333         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5334         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5335
5336 2018-07-26  Tom Tromey  <tromey@redhat.com>
5337
5338         * dbxread.c (end_psymtab): Remove dead code.
5339
5340 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5341
5342         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5343         DWARF unwinders are disabled.
5344         * dwarf2-frame.c: Add dwarf2read.h include.
5345         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5346         disabled.
5347         (dwarf2_frame_unwinders_enabled_p): Define.
5348         (show_dwarf_unwinders_enabled_p): New function.
5349         (_initialize_dwarf2_frame): Register switch to control DWARF
5350         unwinder use.
5351         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5352         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5353         (show_dwarf_cmdlist): Remove static keyword.
5354         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5355         (show_dwarf_cmdlist): Declare.
5356         * NEWS: Document new feature.
5357
5358 2018-07-26  Tom de Vries  <tdevries@suse.de>
5359
5360         PR breakpoints/23366
5361         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5362
5363 2018-07-26  Tom de Vries  <tdevries@suse.de>
5364
5365         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5366         DW_AT_count can't be translated to a dynamic prop.
5367
5368 2018-07-25  Tom de Vries  <tdevries@suse.de>
5369
5370         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5371         try/catch.
5372
5373 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5374
5375         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5376
5377 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5378
5379         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5380
5381 2018-07-24  Keith Seitz  <keiths@redhat.comt
5382
5383         PR symtab/23010
5384         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5385         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5386         instead of add_symbol_to_list.
5387         (read_file_scope): Call prepare_one_comp_unit before reading
5388         any other DIEs.
5389
5390 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5391
5392         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5393
5394 2018-07-24  Tom Tromey  <tom@tromey.com>
5395
5396         * utils.c (malloc, realloc, free): Don't declare.
5397         * configure, config.in: Rebuild.
5398         * configure.ac: Don't check for declarations of free, malloc, or
5399         realloc.
5400
5401 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5402
5403         * aarch64-linux-nat.c
5404         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5405         variable.
5406         * arm-linux-nat.c (fetch_regs): Likewise.
5407         (store_regs): Likewise.
5408         (fetch_vfp_regs): Likewise.
5409         (store_vfp_regs): Likewise.
5410         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5411         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5412         (arm_linux_nat_target::insert_watchpoint): Likewise.
5413         (arm_linux_nat_target::remove_watchpoint): Likewise.
5414         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5415         Likewise.
5416         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5417         Likewise.
5418         * ppc-linux-nat.c (fetch_register): Likewise.
5419         (fetch_all_gp_regs): Likewise.
5420         (fetch_ppc_registers): Likewise.
5421         (store_all_gp_regs): Likewise.
5422         (store_ppc_registers): Likewise.
5423         (hwdebug_insert_point): Likewise.
5424         (can_use_watchpoint_cond_accel): Likewise.
5425         * remote-sim.c (gdb_os_write_stdout): Likewise.
5426
5427 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5428             Tom Tromey  <tom@tromey.com>
5429
5430         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5431         test for it.
5432         * configure: Rebuild.
5433
5434 2018-07-22  Tom Tromey  <tom@tromey.com>
5435
5436         * regformats/regdat.sh: Define xmltarget_${name} inside
5437         #ifndef IN_PROCESS_AGENT.
5438
5439 2018-07-22  Tom Tromey  <tom@tromey.com>
5440
5441         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5442
5443 2018-07-22  Tom Tromey  <tom@tromey.com>
5444
5445         * symfile.c (reread_symbols): Notify iter, not objfile.
5446
5447 2018-07-22  Tom Tromey  <tom@tromey.com>
5448
5449         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5450         Use arch_ops.
5451         (ravenscar_thread_target::prepare_to_store): Likewise.
5452
5453 2018-07-22  Tom Tromey  <tom@tromey.com>
5454
5455         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5456         unused variable.  Call value_fetch_lazy when needed.
5457         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5458         Remove unused variable.  Call value_fetch_lazy when needed.
5459
5460 2018-07-22  Tom Tromey  <tom@tromey.com>
5461
5462         * m32c-tdep.c (mark_dma): Return void.
5463         (make_regs): Remove unused declarations.
5464
5465 2018-07-22  Tom Tromey  <tom@tromey.com>
5466
5467         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5468         cmdscm_get_valid_command_smob_arg_unsafe for effect.
5469         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5470         bkscm_get_valid_block_smob_arg_unsafe for effect.
5471
5472 2018-07-22  Tom Tromey  <tom@tromey.com>
5473
5474         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5475         value_type.
5476
5477 2018-07-22  Tom Tromey  <tom@tromey.com>
5478
5479         * windows-nat.c (saved_context): Conditionally define.
5480         * remote.c (remote_target::remote_btrace_maybe_reopen):
5481         Conditionally declare "warned".
5482         * inflow.c (sigquit_ours): Conditionally define.
5483         (new_tty): Move "tty" declaration inside #if.
5484         * guile/guile.c (guile_datadir): Conditionally define.
5485         * charset.c (set_be_le_names): Move some declarations inside #if.
5486         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
5487         #if.
5488         (parse_xml_btrace_conf): Likewise.
5489
5490 2018-07-22  Tom Tromey  <tom@tromey.com>
5491
5492         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
5493
5494 2018-07-22  Tom Tromey  <tom@tromey.com>
5495
5496         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
5497         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
5498         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
5499         * buildsym-legacy.c (get_macro_table): Remove unused variable.
5500         * stack.c (frame_apply_level_command): Remove unused variable.
5501         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
5502         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
5503         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
5504         unused variable.
5505         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
5506         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
5507         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
5508         variable.
5509         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
5510         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
5511         variable.
5512         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
5513         Remove unused variable.
5514         * cli/cli-script.c (recurse_read_control_structure): Remove unused
5515         variable.
5516         * common/tdesc.c (print_xml_feature::visit): Remove unused
5517         variable.
5518         * compile/compile-object-load.c (store_regs): Remove unused
5519         variables.
5520         * complaints.c (clear_complaints): Remove unused variable.
5521         * corelow.c (core_target_open): Remove unused variable.
5522         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
5523         variable.
5524         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
5525         variable.
5526         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
5527         variable.
5528         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
5529         variable.
5530         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
5531         variable.
5532         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
5533         variable.
5534         * ia64-tdep.c (examine_prologue): Remove unused variable.
5535         * infcall.c (run_inferior_call): Remove unused variable.
5536         * inferior.c (exit_inferior): Remove unused variable.
5537         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
5538         * linespec.c (decode_line_2): Remove unused variable.
5539         * linux-nat.c (super_close): Remove.
5540         * linux-tdep.c (linux_info_proc): Remove unused variable.
5541         * mi/mi-main.c (mi_execute_command): Remove unused variable.
5542         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
5543         Remove unused variable.
5544         * parse.c (find_minsym_type_and_address): Remove unused variable.
5545         * printcmd.c (info_symbol_command, printf_floating): Remove unused
5546         variable.
5547         * python/py-breakpoint.c (bppy_set_commands): Remove unused
5548         variable.
5549         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
5550         variables.
5551         * record-btrace.c (record_btrace_target::store_registers): Remove
5552         unused variable.
5553         (cmd_show_record_btrace_cpu): Remove unused variable.
5554         * riscv-tdep.c (riscv_register_reggroup_p)
5555         (riscv_push_dummy_call, riscv_return_value): Remove unused
5556         variable.
5557         * rust-exp.y (literal): Remove unused variable.
5558         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
5559         unused variable.
5560         <STRUCTOP_ANONYMOUS>: Likewise.
5561         * s390-linux-tdep.c (s390_linux_init_abi_31)
5562         (s390_linux_init_abi_64): Remove unused variable.
5563         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
5564         (file_select_thread, net_windows_open, _initialize_ser_windows):
5565         Remove unused variables.
5566         * symtab.c (find_pc_sect_line): Remove unused variable.
5567         * target-memory.c (compute_garbled_blocks): Remove unused
5568         variable.
5569         (target_write_memory_blocks): Remove unused variable.
5570         * target.c (target_stack::unpush): Remove unused variables.
5571         * tracepoint.c (start_tracing, all_tracepoint_actions)
5572         (merge_uploaded_trace_state_variables)
5573         (print_one_static_tracepoint_marker): Remove unused variable.
5574         * unittests/basic_string_view/element_access/char/1.cc (test01):
5575         Remove unused variable.
5576         * windows-nat.c (windows_continue, windows_add_all_dlls)
5577         (do_initial_windows_stuff, windows_nat_target::create_inferior):
5578         Remove unused variables.
5579
5580 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
5581
5582         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
5583         attr_profile in HAVE_ELF.
5584         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
5585         HAVE_ELF.
5586
5587 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
5588
5589         * frame.c (frame_register_unwind): Change parameter name.
5590         (frame_unwind_register): Likewise.
5591         (frame_unwind_register_value): Likewise.
5592         (frame_unwind_register_signed): Likewise.
5593         (frame_unwind_register_unsigned): Likewise.
5594         * frame.h (frame_register_unwind): Likewise.
5595         (frame_unwind_register): Likewise.
5596         (frame_unwind_register_value): Likewise.
5597         (frame_unwind_register_signed): Likewise.
5598         (frame_unwind_register_unsigned): Likewise.
5599         (frame_unwind_arch): Likewise.
5600
5601 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5602
5603         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
5604         ISA maintenance.
5605
5606 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5607
5608         * mips-linux-nat.c (mips_linux_nat_target::read_description):
5609         Call `get_ptrace_pid' rather than extracting the ptrace PID by
5610         hand.
5611
5612 2018-07-20  Keith Seitz  <keiths@redhat.com>
5613
5614         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
5615         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
5616         m_compunit_symtab, m_language>: Add "m_" prefix.
5617         Update all uses.
5618         * buildsym.c: Update all uses.
5619
5620 2018-07-20  Tom Tromey  <tom@tromey.com>
5621
5622         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
5623         * buildsym.h (record_line_ftype): Remove typedef.
5624
5625 2018-07-20  Tom Tromey  <tom@tromey.com>
5626
5627         * buildsym-legacy.h (augment_type_symtab): Don't declare.
5628         (end_expandable_symtab): Likewise.
5629         (end_symtab_get_static_block): Likewise.
5630         (end_symtab_from_static_block): Likewise.
5631         * buildsym-legacy.c (augment_type_symtab): Remove.
5632         (end_expandable_symtab): Remove.
5633         (end_symtab_get_static_block): Remove.
5634         (end_symtab_from_static_block): Remove.
5635
5636 2018-07-20  Tom Tromey  <tom@tromey.com>
5637
5638         * dwarf2read.c: Include buildsym.h.
5639         (struct dwarf2_cu) <builder>: New method.
5640         (fixup_go_packaging): Update.
5641         (process_full_comp_unit, process_full_type_unit): Update.  Don't
5642         use scoped_free_pendings.
5643         (using_directives): Add "cu" parameter, remove "language".
5644         (read_import_statement, setup_type_unit_groups, )
5645         (read_func_scope, read_lexical_block_scope)
5646         (dwarf2_record_block_ranges, read_namespace): Update.
5647         (lnp_state_machine::lnp_state_machine): Add cu parameter.
5648         (lnp_state_machine::handle_end_sequence): Update.
5649         (class lnp_state_machine) <m_cu>: New member.
5650         <m_record_line_callback>: Remove.
5651         <m_currently_recording_lines>: New member.
5652         (lnp_state_machine::handle_set_file): Update.
5653         (noop_record_line): Remove.
5654         (dwarf_record_line_p): Add cu parameter.
5655         (dwarf_record_line_1, dwarf_finish_line): Likewise.
5656         (lnp_state_machine::record_line)
5657         (lnp_state_machine::lnp_state_machine)
5658         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5659         (dwarf_decode_lines): Update.
5660         (dwarf2_start_subfile): Add cu parameter.
5661         (dwarf2_start_symtab, new_symbol): Update.
5662         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
5663         Remove dwarf2_per_objfile parameter.
5664         (dwarf_decode_macros): Update.
5665
5666 2018-07-20  Tom Tromey  <tom@tromey.com>
5667
5668         * stabsread.c (define_symbol): Update.
5669         * buildsym-legacy.h (get_buildsym_compunit): Declare.
5670         * dwarf2read.c (new_symbol): Update.
5671         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
5672         * cp-namespace.c: Include buildsym.h.
5673         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
5674         * buildsym-legacy.c (get_buildsym_compunit): New function.
5675
5676 2018-07-20  Tom Tromey  <tom@tromey.com>
5677
5678         * xcoffread.c: Include buildsym-legacy.h.
5679         * windows-nat.c: Include buildsym-legacy.h.
5680         * stabsread.c: Include buildsym-legacy.h.
5681         * mdebugread.c: Include buildsym-legacy.h.
5682         * buildsym-legacy.h: New file.
5683         * buildsym-legacy.c: New file, from buildsym.c.
5684         * go32-nat.c: Include buildsym-legacy.h.
5685         * dwarf2read.c: Include buildsym-legacy.h.
5686         * dbxread.c: Include buildsym-legacy.h.
5687         * cp-namespace.c: Include buildsym-legacy.h.
5688         * coffread.c: Include buildsym-legacy.h.
5689         * buildsym.h: Move some contents to buildsym-legacy.h.
5690         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
5691         buildsym-legacy.c.
5692         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
5693
5694 2018-07-20  Tom Tromey  <tom@tromey.com>
5695
5696         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
5697         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
5698         (buildsym_compunit::buildsym_compunit)
5699         (buildsym_compunit::~buildsym_compunit)
5700         (buildsym_compunit::get_macro_table): Define.
5701
5702 2018-07-20  Tom Tromey  <tom@tromey.com>
5703
5704         * buildsym.c (reset_symtab_globals): Remove.
5705         (buildsym_compunit::end_symtab_from_static_block): Update.
5706         (buildsym_compunit::augment_type_symtab): Update.
5707         (end_symtab_from_static_block): Call free_buildsym_compunit.
5708         (augment_type_symtab, end_symtab, end_expandable_symtab):
5709         Likewise.
5710
5711 2018-07-20  Tom Tromey  <tom@tromey.com>
5712
5713         * arch-utils.c: Do not include buildsym.h.
5714         * mipsread.c: Do not include buildsym.h.
5715         * machoread.c: Do not include buildsym.h.
5716         * elfread.c: Do not include buildsym.h.
5717
5718 2018-07-20  Tom Tromey  <tom@tromey.com>
5719
5720         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
5721         initialization.
5722         (buildsym_compunit): Add new constructor.
5723         (struct buildsym_compunit) <get_last_source_file, finish_block,
5724         record_block_range, start_subfile, patch_subfile_names,
5725         push_subfile, pop_subfile, record_line, get_compunit_symtab,
5726         set_last_source_start_addr, get_last_source_start_addr,
5727         get_local_using_directives, set_local_using_directives,
5728         get_global_using_directives, outermost_context_p,
5729         get_current_context_stack, get_context_stack_depth,
5730         get_current_subfile, get_local_symbols, get_file_symbols,
5731         get_global_symbols, record_debugformat, record_producer,
5732         push_context, pop_context, end_symtab_get_static_block,
5733         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
5734         New public methods.
5735         <record_pending_block, finish_block_internal, make_blockvector,
5736         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
5737         private methods.
5738         Update all users.
5739
5740 2018-05-22  Tom Tromey  <tom@tromey.com>
5741
5742         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5743         parameter.
5744         (finish_block_internal): Update.
5745
5746 2018-07-20  Tom Tromey  <tom@tromey.com>
5747
5748         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5749         parameter.
5750         (finish_block_internal): Update.
5751
5752 2018-07-20  Tom Tromey  <tom@tromey.com>
5753
5754         * buildsym.h (EXTERN): Don't define or undef.
5755         * buildsym.c (EXTERN): Don't define.
5756
5757 2018-07-20  Tom Tromey  <tom@tromey.com>
5758
5759         * buildsym.c: Remove TODO comment.
5760
5761 2018-07-20  Tom Tromey  <tom@tromey.com>
5762
5763         * coffread.c (coff_symtab_read): Update.
5764         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5765         (xcoff_new_init): Update.
5766         * mipsread.c (mipscoff_new_init): Update.
5767         * mdebugread.c (mdebug_build_psymtabs): Update.
5768         * elfread.c (elf_new_init): Update.
5769         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5770         Update.
5771         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5772         (coffstab_build_psymtabs, elfstab_build_psymtabs)
5773         (stabsect_build_psymtabs): Update.
5774         * buildsym.h (buildsym_init): Don't declare.
5775         * buildsym.c: Update comment.
5776         (prepare_for_building): Remove.
5777         (start_symtab, restart_symtab): Update.
5778         (reset_symtab_globals): Update comment.
5779         (buildsym_init): Remove.
5780
5781 2018-07-20  Tom Tromey  <tom@tromey.com>
5782
5783         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5784         * stabsread.c (patch_block_stabs, define_symbol, read_type)
5785         (read_enum_type, common_block_start, common_block_end)
5786         (cleanup_undefined_types_1, finish_global_stabs): Update.
5787         * mdebugread.c (psymtab_to_symtab_1): Update.
5788         * dwarf2read.c (fixup_go_packaging, read_func_scope)
5789         (read_lexical_block_scope, new_symbol): Update.
5790         * dbxread.c (process_one_symbol): Update.
5791         * coffread.c (coff_symtab_read, process_coff_symbol)
5792         (coff_read_enum_type): Update.
5793         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5794         declare.
5795         (get_local_symbols, get_file_symbols, get_global_symbols): New
5796         functions.
5797         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5798         m_global_symbols.
5799         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5800         (~scoped_free_pendings): Update.
5801         (finish_block, prepare_for_building, reset_symtab_globals)
5802         (end_symtab_get_static_block, end_symtab_with_blockvector)
5803         (augment_type_symtab, push_context): Update.
5804         (get_local_symbols, get_file_symbols, get_global_symbols): New
5805         functions.
5806         (buildsym_init): Update.
5807
5808 2018-07-20  Tom Tromey  <tom@tromey.com>
5809
5810         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5811         (process_full_type_unit): Likewise.
5812         (dwarf2_start_symtab): Set list_in_scope.
5813
5814 2018-07-20  Tom Tromey  <tom@tromey.com>
5815
5816         * dwarf2read.c (process_psymtab_comp_unit_reader)
5817         (build_type_psymtabs_reader): Do not set list_in_scope.
5818
5819 2018-07-20  Tom Tromey  <tom@tromey.com>
5820
5821         * buildsym.c (free_pendings): Remove.
5822         (add_symbol_to_list, scoped_free_pendings)
5823         (finish_block_internal, buildsym_init): Update.
5824
5825 2018-07-20  Tom Tromey  <tom@tromey.com>
5826
5827         * xcoffread.c (read_xcoff_symtab): Update.
5828         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5829         Update.
5830         * dbxread.c (process_one_symbol): Update.
5831         * coffread.c (coff_symtab_read): Update.
5832         * buildsym.h (finish_block): Update.
5833         * buildsym.c (finish_block): Remove "listhead" argument.
5834         (end_symtab_get_static_block): Update.
5835
5836 2018-07-20  Tom Tromey  <tom@tromey.com>
5837
5838         * buildsym.h (class scoped_free_pendings): Remove constructor.
5839         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5840         method.
5841         <m_pending_block_obstack, m_pending_blocks>: New members.
5842         (pending_block_obstack, pending_blocks): Remove.
5843         (scoped_free_pendings::scoped_free_pendings): Default.
5844         (~scoped_free_pendings): Update.
5845         (free_pending_blocks): Remove.
5846         (finish_block_internal, record_pending_block, make_blockvector)
5847         (end_symtab_get_static_block, augment_type_symtab, push_context)
5848         (buildsym_init): Update.
5849
5850 2018-07-20  Tom Tromey  <tom@tromey.com>
5851
5852         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5853         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5854         members.
5855         (pending_addrmap, pending_addrmap_obstack)
5856         (pending_addrmap_interesting): Remove.
5857         (scoped_free_pendings, record_block_range, make_blockvector)
5858         (prepare_for_building, reset_symtab_globals, buildsym_init):
5859         Update.
5860
5861 2018-07-20  Tom Tromey  <tom@tromey.com>
5862
5863         * xcoffread.c (process_linenos): Update.
5864         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5865         * mdebugread.c (psymtab_to_symtab_1): Update.
5866         * dwarf2read.c (setup_type_unit_groups)
5867         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5868         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5869         * dbxread.c (process_one_symbol): Update.
5870         * coffread.c (coff_symtab_read, enter_linenos)
5871         (process_coff_symbol): Update.
5872         * buildsym.h (current_subfile): Don't declare.
5873         (get_current_subfile): Declare.
5874         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5875         member.
5876         (start_subfile, free_buildsym_compunit, push_subfile)
5877         (prepare_for_building, start_symtab): Update.
5878         (get_current_subfile): New function.
5879
5880 2018-07-20  Tom Tromey  <tom@tromey.com>
5881
5882         * coffread.c (coff_symtab_read): Update.
5883         * xcoffread.c (read_xcoff_symtab): Update.
5884         * dwarf2read.c (new_symbol): Update.
5885         (read_func_scope, read_lexical_block_scope): Update.
5886         * dbxread.c (process_one_symbol): Update.
5887         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5888         (outermost_context_p): Remove macro.
5889         (outermost_context_p, get_current_context_stack)
5890         (get_context_stack_depth): Declare.
5891         (pop_context): Return struct context_stack.
5892         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5893         member.
5894         (context_stack_size): Remove.
5895         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5896         (prepare_for_building, end_symtab_get_static_block)
5897         (augment_type_symtab, push_context): Update.
5898         (pop_context): Return struct context_stack.
5899         (outermost_context_p, get_current_context_stack)
5900         (get_context_stack_depth): New functions.
5901         (buildsym_init): Update.
5902
5903 2018-07-20  Tom Tromey  <tom@tromey.com>
5904
5905         * rust-exp.y: Now a pure parser.  Update all rules.
5906         (%union): Move earlier.
5907         (current_parser, work_obstack): Remove globals.
5908         (rust_parser, ~rust_parser): Update.
5909         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5910         lex_character, lex_number, lex_string, lex_identifier,
5911         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5912         convert_name, convert_params_to_expression,
5913         convert_ast_to_expression, ast_basic_type, ast_operation,
5914         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5915         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5916         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5917         ast_array_type, ast_slice_type, ast_reference_type,
5918         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5919         (rust_parse): Update.
5920         (rustyyerror, rustyylex): Add parser parameter.
5921         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5922         (rust_lex_stringish_test, rust_lex_test_sequence)
5923         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5924         (rust_lex_test_push_back, rust_lex_tests): Update.
5925
5926 2018-07-19  Pedro Alves  <palves@redhat.com>
5927
5928         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5929         gdb::unique_xmalloc_ptr.
5930         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5931         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5932         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5933         copy-initialization.
5934         * guile/scm-pretty-print.c (ppscm_print_children): Use
5935         gdb::unique_xmalloc_ptr instead of cleanups.
5936         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5937         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5938         gdb::unique_xmalloc_ptr.
5939         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5940         Adjust to use gdb::unique_xmalloc_ptr.
5941         * guile/scm-utils.c (extract_arg): Adjust.
5942         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5943         gdb::unique_xmalloc_ptr instead of a cleanup.
5944
5945 2018-07-19  Tom Tromey  <tom@tromey.com>
5946
5947         * utils.c (do_value_free_to_mark)
5948         (make_cleanup_value_free_to_mark): Remove.
5949         * utils.h (make_cleanup_value_free_to_mark): Remove.
5950
5951 2018-07-19  Pedro Alves  <palves@redhat.com>
5952
5953         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5954         forwarding reference.
5955
5956 2018-07-18  Pedro Alves  <palves@redhat.com>
5957
5958         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5959         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5960         cleanup.
5961
5962 2018-07-18  Pedro Alves  <palves@redhat.com>
5963
5964         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5965         exceptions.
5966         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5967         (gdbscm_wrap): New.
5968         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5969         directly instead of a cleanup.
5970         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5971         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5972         (vlscm_binop_gdbthrow): New, factored out from ...
5973         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5974         (vlscm_rich_compare): Use gdbscm_wrap.
5975         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5976         instead of a cleanup.
5977         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5978         cleanup.
5979         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5980         Use xfree directly instead of a cleanup.
5981         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5982         Adjust to use gdbscm_wrap and scoped_value_mark.
5983         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5984         (gdbscm_value_address, gdbscm_value_dereference)
5985         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5986         scoped_value_mark.
5987         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5988         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5989         scoped_value_mark.
5990         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5991         gdbscm_wrap and scoped_value_mark.
5992         (gdbscm_value_to_string): Use xfree directly instead of a
5993         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5994         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5995         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5996         scoped_value_mark.
5997         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5998         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5999         scoped_value_mark.
6000         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6001         gdbscm_wrap.
6002
6003 2018-07-18  Tom de Vries  <tdevries@suse.de>
6004
6005         * findvar.c (default_read_var_value): Also resolve dynamic type for
6006         LOC_OPTIMIZED_OUT vars.
6007
6008 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
6009
6010         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6011         decoding.
6012
6013 2018-07-17  Tom Tromey  <tom@tromey.com>
6014
6015         * guile/scm-param.c (pascm_set_func, pascm_show_func)
6016         (compute_enum_list, pascm_set_param_value_x)
6017         (gdbscm_parameter_value): Update.
6018         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6019         (gdbscm_scm_to_host_string): Update.
6020         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6021         Update.
6022         * guile/scm-cmd.c (cmdscm_add_completion): Update.
6023         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6024         * guile/scm-string.c (gdbscm_scm_to_string): Return
6025         unique_xmalloc_ptr.
6026         (gdbscm_scm_to_host_string): Likewise.
6027
6028 2018-07-17  Tom Tromey  <tom@tromey.com>
6029
6030         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6031         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6032         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6033         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6034         unique_xmalloc_ptr.
6035
6036 2018-07-17  Tom Tromey  <tom@tromey.com>
6037
6038         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6039         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6040         Update.
6041         * guile/scm-cmd.c (cmdscm_function): Update.
6042         * guile/scm-pretty-print.c
6043         (ppscm_print_exception_unless_memory_error): Update.
6044         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6045         Return unique_xmalloc_ptr.
6046
6047 2018-07-17  Tom Tromey  <tom@tromey.com>
6048
6049         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6050         Use string_printf.
6051
6052 2018-07-17  Jim Wilson  <jimw@sifive.com>
6053
6054         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6055         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6056         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6057         unecessary braces after EF_RISCV_RVC test.  Delete call to
6058         set_gdbarch_decr_pc_after_break.
6059
6060         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6061         RISCV_LAST_FP_REGNUM + 1.
6062         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6063
6064 2018-07-17  Tom Tromey  <tom@tromey.com>
6065
6066         * configure.ac: Remove --disable-gdbcli.
6067         * configure: Rebuild.
6068         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6069         (SUBDIR_CLI_CFLAGS): Remove.
6070         (SFILES): Use SUBDIR_CLI_SRCS.
6071         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6072
6073 2018-07-17  Tom Tromey  <tom@tromey.com>
6074
6075         PR gdb/18624:
6076         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6077
6078 2018-07-16  Jim Wilson  <jimw@sifive.com>
6079
6080         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6081
6082 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6083
6084         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6085         variable.
6086         (libunwind_frame_sniffer): Likewise.
6087         (libunwind_frame_prev_register): Likewise.
6088         (libunwind_sigtramp_frame_sniffer): Likewise.
6089         * ia64-tdep.c (ia64_access_reg): Likewise.
6090         (ia64_access_rse_reg): Likewise.
6091         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6092         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6093
6094 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6095
6096         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6097
6098 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6099
6100         * remote-sim.c (gdbsim_target::close,
6101         gdbsim_target::mourn_inferior): Remove unused variables.
6102
6103 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6104
6105         * ia64-tdep.c (ktab_buf): New global.
6106         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6107         (get_kernel_table): Adjust.
6108
6109 2018-07-16  Tom Tromey  <tom@tromey.com>
6110
6111         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6112         * dwarf2read.c (using_directives, new_symbol): Use
6113         outermost_context_p.
6114         * dbxread.c (process_one_symbol): Use outermost_context_p.
6115         * coffread.c (coff_symtab_read): Use outermost_context_p.
6116
6117 2018-07-16  Tom Tromey  <tom@tromey.com>
6118
6119         * dwarf2read.c (using_directives, read_func_scope)
6120         (read_lexical_block_scope): Update.
6121         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6122         * buildsym.h (local_using_directives, global_using_directives):
6123         Don't declare.
6124         (get_local_using_directives, set_local_using_directives)
6125         (get_global_using_directives): Declare.
6126         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6127         m_global_using_directives>: New members.
6128         (finish_block_internal, prepare_for_building)
6129         (reset_symtab_globals, end_symtab_get_static_block)
6130         (push_context): Update.
6131         (get_local_using_directives, set_local_using_directives)
6132         (get_global_using_directives): New functions.
6133         (buildsym_init): Update.
6134
6135 2018-07-16  Tom Tromey  <tom@tromey.com>
6136
6137         * xcoffread.c (xcoff_initial_scan): Don't call
6138         free_pending_blocks.
6139         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6140         * buildsym.h (class scoped_free_pendings): Add constructor.
6141         (free_pending_blocks): Don't declare.
6142         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6143         (free_pending_blocks): Now static.
6144
6145 2018-07-16  Tom Tromey  <tom@tromey.com>
6146
6147         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6148         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6149         member.
6150         (struct subfile_stack): Remove.
6151         (subfile_stack): Remove.
6152         (push_subfile, pop_subfile, buildsym_init): Update.
6153
6154 2018-07-16  Tom Tromey  <tom@tromey.com>
6155
6156         * buildsym.c (push_subfile): Use gdb_assert.
6157         (pop_subfile): Use gdb_assert.
6158
6159 2018-07-16  Tom Tromey  <tom@tromey.com>
6160
6161         * buildsym.h (merge_symbol_lists): Remove.
6162         * buildsym.c (merge_symbol_lists): Remove.
6163
6164 2018-07-16  Tom Tromey  <tom@tromey.com>
6165
6166         * stabsread.c (scan_file_globals): Update comment.
6167         * stabsread.h (scan_file_globals): Move from buildsym.h.
6168         * buildsym.h (scan_file_globals): Move to stabsread.h.
6169
6170 2018-07-16  Tom Tromey  <tom@tromey.com>
6171
6172         * xcoffread.c (xcoff_new_init): Update.
6173         * mipsread.c (mipscoff_new_init): Update.
6174         * mdebugread.c (mdebug_build_psymtabs): Update.
6175         * elfread.c (elf_new_init): Update.
6176         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6177         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6178         * buildsym.h (buildsym_new_init): Don't declare.
6179         * buildsym.c (buildsym_new_init): Remove.
6180
6181 2018-07-16  Tom Tromey  <tom@tromey.com>
6182
6183         * stabsread.h (within_function): Move from buildsym.h.
6184         * stabsread.c (start_stabs): Clear within_function.
6185         * coffread.c (coff_start_symtab): Clear within_function.
6186         * buildsym.h (within_function): Move to stabsread.h.
6187         * buildsym.c (prepare_for_building): Update.
6188
6189 2018-07-16  Tom Tromey  <tom@tromey.com>
6190
6191         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6192         * dwarf2read.c (dwarf2_start_symtab): Don't set
6193         processing_gcc_compilation.
6194         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6195
6196 2018-07-16  Tom Tromey  <tom@tromey.com>
6197
6198         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6199         (next_symbol_text_func): Move from buildsym.h.
6200         * stabsread.c (hashname): Move from buildsym.c.
6201         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6202         (next_symbol_text_func, hashname): Move to stabsread.h.
6203         * buildsym.c: Don't include bcache.h
6204         (hashname): Move to stasbread.c.
6205
6206 2018-07-16  Tom Tromey  <tom@tromey.com>
6207
6208         * buildsym.h (context_stack_size): Don't declare.
6209         * buildsym.c (context_stack_size): New global.
6210
6211 2018-07-16  Tom Tromey  <tom@tromey.com>
6212
6213         * dbxread.c (processing_acc_compilation): New global.
6214         * buildsym.h (processing_acc_compilation): Don't declare.
6215
6216 2018-07-16  Tom Tromey  <tom@tromey.com>
6217
6218         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6219         * dbxread.c (read_ofile_symtab): Update.
6220         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6221         * buildsym.h (last_source_start_addr): Remove.
6222         (set_last_source_start_addr, get_last_source_start_addr):
6223         Declare.
6224         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6225         parameter.
6226         (struct buildsym_compunit) <m_last_source_start_addr>: New
6227         member.
6228         (prepare_for_building): Remove start_addr parameter.
6229         (start_symtab, restart_symtab, end_symtab_get_static_block)
6230         (end_symtab_with_blockvector): Update.
6231         (set_last_source_start_addr, get_last_source_start_addr): New
6232         functions.
6233
6234 2018-07-16  Tom Tromey  <tom@tromey.com>
6235
6236         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6237         member.
6238         (have_line_numbers): Remove.
6239         (record_line, prepare_for_building, end_symtab_get_static_block)
6240         (augment_type_symtab): Update.
6241
6242 2018-07-16  Tom Tromey  <tom@tromey.com>
6243
6244         * buildsym.c (~buildsym_compunit): Free the macro table.
6245         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6246         methods.
6247         <m_pending_macros>: New member.
6248         (pending_macros): Remove.
6249         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6250         (reset_symtab_globals, end_symtab_get_static_block)
6251         (end_symtab_with_blockvector, augment_type_symtab)
6252         (buildsym_init): Update.
6253
6254 2018-07-16  Tom Tromey  <tom@tromey.com>
6255
6256         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6257         parameter.
6258         (buildsym_compunit::set_last_source_file): New method.
6259         <m_last_source_file>: New member.
6260         (prepare_for_building): Remove "name" parameter.
6261         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6262         (last_source_file): Remove.
6263         (set_last_source_file, get_last_source_file): Update.
6264
6265 2018-07-16  Tom Tromey  <tom@tromey.com>
6266
6267         * buildsym.c (prepare_for_building): Add assert.
6268
6269 2018-07-16  Tom Tromey  <tom@tromey.com>
6270
6271         * buildsym.c (~buildsym_compunit): Update.
6272         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6273         (start_subfile, patch_subfile_names)
6274         (end_symtab_with_blockvector): Update.
6275
6276 2018-07-16  Tom Tromey  <tom@tromey.com>
6277
6278         * buildsym.c (struct buildsym_compunit): Add constructor,
6279         destructor, initializers.
6280         (start_buildsym_compunit): Remove.
6281         (free_buildsym_compunit): Use "delete".
6282         (start_symtab, restart_symtab): Use "new".
6283
6284 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6285
6286         * symfile.c (set_objfile_default_section_offset): Remove struct
6287         keyword.
6288
6289 2018-07-14  Stafford Horne  <shorne@gmail.com>
6290
6291         * (Responsible Maintainers): Add myself as or1k maintainer.
6292
6293 2018-07-13  Tom Tromey  <tom@tromey.com>
6294
6295         * symfile.c (set_objfile_default_section_offset): Use extra braces
6296         around initializer.
6297
6298 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6299
6300         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6301         non-branching basr.
6302
6303 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6304
6305         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6306         unittests/cli-utils-selftests.c
6307         * unittests/cli-utils-selftests.c: New file.
6308
6309 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6310
6311         * NEWS: Mention new commands. Mention change to 'thread apply'.
6312
6313 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6314
6315         * thread.c (thr_try_catch_cmd): New function.
6316         (thread_apply_all_command): Handle qcs flags.
6317         (thread_apply_command): Handle qcs flags.
6318         (taas_command): New function.
6319         (tfaas_command): New function.
6320         (_initialize_thread): Update to setup the new commands 'taas
6321         and 'tfaas'. Change doc string for 'thread apply'.
6322
6323 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6324
6325         * stack.c: (trailing_outermost_frame): New function, mostly
6326         extracted from backtrace_command_1.
6327         (leading_innermost_frame): New function.
6328         (backtrace_command_1): Update to call trailing_outermost_frame.
6329         (frame_apply_command_count): New function.
6330         (frame_apply_level_command): New function.
6331         (frame_apply_all_command): New function.
6332         (frame_apply_command): New function.
6333         (faas_command): New function.
6334         (frame_cmd_list): New variable.
6335         (_initialize_stack): Update to setup the new commands 'frame apply'
6336         and 'faas'.
6337
6338 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6339
6340         * cli-utils.c (number_or_range_parser::get_number): Only handle
6341         numbers or convenience var as numbers.
6342         (parse_flags): New function.
6343         (parse_flags_qcs): New function.
6344         (number_or_range_parser::finished): Ensure parsing end is detected
6345         before end of string.
6346         * cli-utils.h (parse_flags): New function.
6347         (parse_flags_qcs): New function.
6348         (number_or_range_parser): Remove m_finished bool.
6349         (number_or_range_parser::skip_range): Set m_in_range to false.
6350
6351 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6352
6353         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6354         on Windows.
6355
6356 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6357             Jan Kratochvil  <jan.kratochvil@redhat.com>
6358             Paul Fertser  <fercerpav@gmail.com>
6359             Tsutomu Seki  <sekiriki@gmail.com>
6360             Pedro Alves  <palves@redhat.com>
6361
6362         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6363         'unittests/parse-connection-spec-selftests.c'.
6364         (COMMON_SFILES): Add 'common/netstuff.c'.
6365         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6366         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6367         * common/netstuff.c: New file.
6368         * common/netstuff.h: New file.
6369         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6370         (wait_for_connect): Update comment.  New parameter
6371         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6372         Use 'sock' directly instead of 'scb->fd'.
6373         (try_connect): New function, with code from 'net_open'.
6374         (net_open): Rewrite main loop to deal with multiple
6375         sockets/addresses.  Handle IPv6-style hostnames; implement
6376         support for IPv6 connections.
6377         * unittests/parse-connection-spec-selftests.c: New file.
6378
6379 2018-07-11  Pedro Alves  <palves@redhat.com>
6380
6381         PR gdb/23377
6382         * remote.c (remote_target::remote_detach_pid): Call
6383         set_current_process.
6384
6385 2018-07-11  Pedro Alves  <palves@redhat.com>
6386
6387         * h8300-tdep.c (h8300_gdbarch_init): Remove
6388         set_gdbarch_ecoff_reg_to_regnum calls.
6389
6390 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6391
6392         PR c++/23373
6393         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6394         offsets/sizes for static members of a class/struct.
6395
6396 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6397
6398         * target-descriptions.c (tdesc_register_bitsize): Rename.
6399         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6400         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6401         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6402
6403 2018-07-10  Tom Tromey  <tom@tromey.com>
6404
6405         * breakpoint.c (moribund_locations): Now static and a
6406         std::vector.
6407         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6408         (build_bpstat_chain, update_global_location_list)
6409         (breakpoint_retire_moribund): Update.
6410         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6411         VEC.
6412
6413 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6414
6415         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6416         (riscv_register_reggroup_p): Use new function, remove unneeded
6417         parenthesis.
6418         (riscv_push_dummy_call): Extend assert to compare against xlen or
6419         flen based on register type.
6420
6421 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6422
6423         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6424
6425 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6426
6427         * remote.c (show_hardware_watchpoint_limit): New function.
6428         (show_hardware_watchpoint_length_limit): New function.
6429         (show_hardware_breakpoint_limit): New function.
6430         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6431         where appropriate, update help text.
6432
6433 2018-07-09  Tom Tromey  <tom@tromey.com>
6434
6435         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6436         (CLIBS): Don't mention NAT_CLIBS.
6437
6438 2018-07-09  Tom Tromey  <tom@tromey.com>
6439
6440         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6441         (LIBGDB_OBS, clean mostlyclean): Update.
6442         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6443
6444 2018-07-09  Tom Tromey  <tom@tromey.com>
6445
6446         * Makefile.in (%.c: %.y): Use ECHO_YACC.
6447         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
6448         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6449
6450 2018-07-09  Tom Tromey  <tom@tromey.com>
6451
6452         * Makefile.in (ALLDEPFILES): Remove exec.c.
6453         (COMMON_OBS): Remove exec.o.
6454         (COMMON_SFILES): Add exec.c.
6455
6456 2018-07-09  Tom Tromey  <tom@tromey.com>
6457
6458         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6459
6460 2018-07-09  Tom Tromey  <tom@tromey.com>
6461
6462         * Makefile.in (clean mostlyclean): Remove stamp-version.
6463         (version.c): Depend on stamp-version.
6464         (stamp-version): New rule, from version.c rule.
6465
6466 2018-07-09  Tom Tromey  <tom@tromey.com>
6467
6468         * Makefile.in (init.c): Depend on stamp-init.
6469         (stamp-init): New rule, from init.c rule.
6470         (clean mostlyclean): Remove stamp-init.
6471
6472 2018-07-09  Tom Tromey  <tom@tromey.com>
6473
6474         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6475         SUBDIR_GCC_COMPILE_SRCS.
6476
6477 2018-07-09  Tom Tromey  <tom@tromey.com>
6478
6479         * Makefile.in (init.c): Remove some unused sed rules.
6480
6481 2018-07-09  Tom Tromey  <tom@tromey.com>
6482
6483         * Makefile.in (TSOBS): Remove.
6484         (INIT_FILES): Update.
6485         (LIBGDB_OBS): Update.
6486         (COMMON_SFILES): Add inflow.c.
6487         (SFILES): Remove inflow.c.
6488
6489 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6490
6491         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
6492
6493 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
6494
6495         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
6496         get_saveloc_name, is_signal_frame_name, step_name,
6497         init_remote_name, create_addr_space_name,
6498         destroy_addr_space_name, search_unwind_table_name,
6499         find_dyn_list_name): Constify.
6500
6501 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
6502
6503         * darwin-nat.c (darwin_pthread_kill): New function.
6504         (darwin_resume_thread): Use darwin_pthread_kill.
6505
6506 2018-07-05  Tom de Vries  <tdevries@suse.de>
6507
6508         * macroexp.c (macro_buffer) <operator=>: New member function.
6509
6510 2018-07-04  Tom Tromey  <tom@tromey.com>
6511
6512         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
6513
6514 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
6515
6516         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
6517         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
6518         * maint.c: Likewise.
6519         * top.c: Likewise.
6520
6521 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6522
6523         * NEWS: Create a new section for the next release branch.
6524         Rename the section of the current branch, now that it has
6525         been cut.
6526
6527 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6528
6529         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
6530         * version.in: Bump version to 8.2.50.DATE-git.
6531
6532 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
6533             Pedro Alves  <palves@redhat.com>
6534
6535         * linux-nat.c (linux_init_ptrace): Rename to ...
6536         (linux_init_ptrace_procfs): ... this.  Call
6537         linux_proc_init_warnings.
6538         (linux_nat_target::post_attach)
6539         (linux_nat_target::post_startup_inferior): Adjust.
6540         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
6541         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
6542
6543 2018-07-04  Tom de Vries  <tdevries@suse.de>
6544
6545         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
6546         check ...
6547         (read_comp_unit_head): ... here.
6548
6549 2018-07-03  Tom Tromey  <tom@tromey.com>
6550
6551         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
6552         (stop_tracing, tstatus_command)
6553         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
6554         (print_one_static_tracepoint_marker): Update.
6555         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
6556         std::vector.
6557         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
6558         VEC.
6559         (all_tracepoints, static_tracepoints_here): Return std::vector.
6560
6561 2018-07-03  Tom Tromey  <tom@tromey.com>
6562
6563         * common/ptid.c (ptid_equal): Remove.
6564         * common/ptid.h (ptid_equal): Don't declare.
6565         * ada-tasks.c: Update.
6566         * breakpoint.c: Update.
6567         * common/agent.c: Update.
6568         * corelow.c: Update.
6569         * darwin-nat-info.c: Update.
6570         * darwin-nat.c: Update.
6571         * dcache.c: Update.
6572         * dtrace-probe.c: Update.
6573         * dummy-frame.c: Update.
6574         * fbsd-nat.c: Update.
6575         * frame.c: Update.
6576         * gdbthread.h: Update.
6577         * gnu-nat.c: Update.
6578         * go32-nat.c: Update.
6579         * inf-loop.c: Update.
6580         * inf-ptrace.c: Update.
6581         * infcall.c: Update.
6582         * infcmd.c: Update.
6583         * inflow.c: Update.
6584         * infrun.c: Update.
6585         * linux-fork.c: Update.
6586         * linux-nat.c: Update.
6587         * linux-thread-db.c: Update.
6588         * mi/mi-cmd-var.c: Update.
6589         * mi/mi-interp.c: Update.
6590         * mi/mi-main.c: Update.
6591         * nto-procfs.c: Update.
6592         * ppc-linux-tdep.c: Update.
6593         * procfs.c: Update.
6594         * python/py-inferior.c: Update.
6595         * python/py-record-btrace.c: Update.
6596         * python/py-record.c: Update.
6597         * ravenscar-thread.c: Update.
6598         * regcache.c: Update.
6599         * remote-sim.c: Update.
6600         * remote.c: Update.
6601         * sol-thread.c: Update.
6602         * solib.c: Update.
6603         * target.c: Update.
6604         * tui/tui-stack.c: Update.
6605         * varobj.c: Update.
6606         * windows-nat.c: Update.
6607         * windows-tdep.c: Update.
6608
6609 2018-07-03  Tom Tromey  <tom@tromey.com>
6610
6611         * common/ptid.c (ptid_match): Remove.
6612         * common/ptid.h (ptid_match): Don't declare.
6613         * fbsd-nat.c: Update.
6614         * infcmd.c: Update.
6615         * infrun.c: Update.
6616         * linux-nat.c: Update.
6617         * record-btrace.c: Update.
6618         * regcache.c: Update.
6619         * remote.c: Update.
6620
6621 2018-07-03  Tom Tromey  <tom@tromey.com>
6622
6623         * common/ptid.c (ptid_tid_p): Remove.
6624         * common/ptid.h (ptid_tid_p): Don't declare.
6625         * sol-thread.c: Update.
6626
6627 2018-07-03  Tom Tromey  <tom@tromey.com>
6628
6629         * common/ptid.c (ptid_lwp_p): Remove.
6630         * common/ptid.h (ptid_lwp_p): Don't declare.
6631         * fbsd-nat.c: Update.
6632         * linux-nat.c: Update.
6633         * nat/linux-procfs.c: Update.
6634         * nat/x86-linux-dregs.c: Update.
6635         * sol-thread.c: Update.
6636
6637 2018-07-03  Tom Tromey  <tom@tromey.com>
6638
6639         * common/ptid.c (ptid_is_pid): Remove.
6640         * common/ptid.h (ptid_is_pid): Don't declare.
6641         * infrun.c: Update.
6642         * linux-nat.c: Update.
6643         * mi/mi-interp.c: Update.
6644         * remote.c: Update.
6645         * thread.c: Update.
6646
6647 2018-07-03  Tom Tromey  <tom@tromey.com>
6648
6649         * common/ptid.c (ptid_get_tid): Remove.
6650         * common/ptid.h (ptid_get_tid): Don't declare.
6651         * ada-tasks.c: Update.
6652         * aix-thread.c: Update.
6653         * bsd-uthread.c: Update.
6654         * darwin-nat.c: Update.
6655         * fbsd-nat.c: Update.
6656         * i386-darwin-nat.c: Update.
6657         * infrun.c: Update.
6658         * linux-tdep.c: Update.
6659         * nto-procfs.c: Update.
6660         * ppc-ravenscar-thread.c: Update.
6661         * python/py-infthread.c: Update.
6662         * ravenscar-thread.c: Update.
6663         * sol-thread.c: Update.
6664         * sparc-ravenscar-thread.c: Update.
6665         * windows-nat.c: Update.
6666
6667 2018-07-03  Tom Tromey  <tom@tromey.com>
6668
6669         * common/ptid.c (ptid_get_lwp): Remove.
6670         * common/ptid.h (ptid_get_lwp): Don't declare.
6671         * aarch64-linux-nat.c: Update.
6672         * ada-tasks.c: Update.
6673         * aix-thread.c: Update.
6674         * amd64-linux-nat.c: Update.
6675         * arm-linux-nat.c: Update.
6676         * corelow.c: Update.
6677         * fbsd-nat.c: Update.
6678         * fbsd-tdep.c: Update.
6679         * gnu-nat.c: Update.
6680         * i386-cygwin-tdep.c: Update.
6681         * i386-gnu-nat.c: Update.
6682         * i386-linux-nat.c: Update.
6683         * ia64-linux-nat.c: Update.
6684         * inf-ptrace.c: Update.
6685         * infrun.c: Update.
6686         * linux-fork.c: Update.
6687         * linux-nat.c: Update.
6688         * linux-tdep.c: Update.
6689         * linux-thread-db.c: Update.
6690         * mips-linux-nat.c: Update.
6691         * nat/aarch64-linux-hw-point.c: Update.
6692         * nat/aarch64-linux.c: Update.
6693         * nat/linux-btrace.c: Update.
6694         * nat/linux-osdata.c: Update.
6695         * nat/linux-procfs.c: Update.
6696         * nat/x86-linux-dregs.c: Update.
6697         * obsd-nat.c: Update.
6698         * ppc-fbsd-nat.c: Update.
6699         * ppc-linux-nat.c: Update.
6700         * procfs.c: Update.
6701         * python/py-infthread.c: Update.
6702         * ravenscar-thread.c: Update.
6703         * remote.c: Update.
6704         * s390-linux-nat.c: Update.
6705         * sol-thread.c: Update.
6706         * sol2-tdep.c: Update.
6707         * spu-linux-nat.c: Update.
6708         * x86-linux-nat.c: Update.
6709         * xtensa-linux-nat.c: Update.
6710
6711 2018-07-03  Tom Tromey  <tom@tromey.com>
6712
6713         * common/ptid.c (ptid_get_pid): Remove.
6714         * common/ptid.h (ptid_get_pid): Don't declare.
6715         * aarch64-linux-nat.c: Update.
6716         * ada-lang.c: Update.
6717         * aix-thread.c: Update.
6718         * alpha-bsd-nat.c: Update.
6719         * amd64-fbsd-nat.c: Update.
6720         * amd64-linux-nat.c: Update.
6721         * arm-linux-nat.c: Update.
6722         * arm-nbsd-nat.c: Update.
6723         * auxv.c: Update.
6724         * break-catch-syscall.c: Update.
6725         * breakpoint.c: Update.
6726         * bsd-uthread.c: Update.
6727         * corelow.c: Update.
6728         * ctf.c: Update.
6729         * darwin-nat.c: Update.
6730         * fbsd-nat.c: Update.
6731         * fbsd-tdep.c: Update.
6732         * gcore.c: Update.
6733         * gnu-nat.c: Update.
6734         * hppa-nbsd-nat.c: Update.
6735         * hppa-obsd-nat.c: Update.
6736         * i386-fbsd-nat.c: Update.
6737         * ia64-linux-nat.c: Update.
6738         * inf-ptrace.c: Update.
6739         * infcmd.c: Update.
6740         * inferior.c: Update.
6741         * inferior.h: Update.
6742         * inflow.c: Update.
6743         * infrun.c: Update.
6744         * linux-fork.c: Update.
6745         * linux-nat.c: Update.
6746         * linux-tdep.c: Update.
6747         * linux-thread-db.c: Update.
6748         * m68k-bsd-nat.c: Update.
6749         * mi/mi-interp.c: Update.
6750         * mi/mi-main.c: Update.
6751         * mips-linux-nat.c: Update.
6752         * mips-nbsd-nat.c: Update.
6753         * mips64-obsd-nat.c: Update.
6754         * nat/aarch64-linux-hw-point.c: Update.
6755         * nat/aarch64-linux.c: Update.
6756         * nat/linux-btrace.c: Update.
6757         * nat/linux-osdata.c: Update.
6758         * nat/linux-procfs.c: Update.
6759         * nat/x86-linux-dregs.c: Update.
6760         * nto-procfs.c: Update.
6761         * obsd-nat.c: Update.
6762         * ppc-linux-nat.c: Update.
6763         * ppc-nbsd-nat.c: Update.
6764         * ppc-obsd-nat.c: Update.
6765         * proc-service.c: Update.
6766         * procfs.c: Update.
6767         * python/py-inferior.c: Update.
6768         * python/py-infthread.c: Update.
6769         * ravenscar-thread.c: Update.
6770         * record.c: Update.
6771         * remote-sim.c: Update.
6772         * remote.c: Update.
6773         * rs6000-nat.c: Update.
6774         * s390-linux-nat.c: Update.
6775         * sh-nbsd-nat.c: Update.
6776         * sol-thread.c: Update.
6777         * sparc-nat.c: Update.
6778         * sparc64-tdep.c: Update.
6779         * spu-linux-nat.c: Update.
6780         * spu-tdep.c: Update.
6781         * target-debug.h: Update.
6782         * target.c: Update.
6783         * thread.c: Update.
6784         * tid-parse.c: Update.
6785         * tracefile-tfile.c: Update.
6786         * vax-bsd-nat.c: Update.
6787         * windows-nat.c: Update.
6788         * x86-linux-nat.c: Update.
6789         * x86-nat.c: Update.
6790
6791 2018-07-03  Tom Tromey  <tom@tromey.com>
6792
6793         * common/ptid.c (pid_to_ptid): Remove.
6794         * common/ptid.h (pid_to_ptid): Don't declare.
6795         * aix-thread.c: Update.
6796         * arm-linux-nat.c: Update.
6797         * common/ptid.c: Update.
6798         * common/ptid.h: Update.
6799         * corelow.c: Update.
6800         * ctf.c: Update.
6801         * darwin-nat.c: Update.
6802         * fbsd-nat.c: Update.
6803         * fork-child.c: Update.
6804         * gnu-nat.c: Update.
6805         * go32-nat.c: Update.
6806         * inf-ptrace.c: Update.
6807         * infcmd.c: Update.
6808         * inferior.c: Update.
6809         * infrun.c: Update.
6810         * linux-fork.c: Update.
6811         * linux-nat.c: Update.
6812         * nat/aarch64-linux-hw-point.c: Update.
6813         * nat/fork-inferior.c: Update.
6814         * nat/x86-linux-dregs.c: Update.
6815         * nto-procfs.c: Update.
6816         * obsd-nat.c: Update.
6817         * procfs.c: Update.
6818         * progspace.c: Update.
6819         * remote.c: Update.
6820         * rs6000-nat.c: Update.
6821         * s390-linux-nat.c: Update.
6822         * sol-thread.c: Update.
6823         * spu-linux-nat.c: Update.
6824         * target.c: Update.
6825         * top.c: Update.
6826         * tracefile-tfile.c: Update.
6827         * windows-nat.c: Update.
6828
6829 2018-07-03  Tom Tromey  <tom@tromey.com>
6830
6831         * common/ptid.h (ptid_build): Don't declare.
6832         * common/ptid.c (ptid_build): Remove.
6833         * aix-thread.c: Update.
6834         * bsd-kvm.c: Update.
6835         * bsd-uthread.c: Update.
6836         * common/agent.c: Update.
6837         * common/ptid.c: Update.
6838         * common/ptid.h: Update.
6839         * corelow.c: Update.
6840         * darwin-nat.c: Update.
6841         * fbsd-nat.c: Update.
6842         * gnu-nat.c: Update.
6843         * linux-fork.c: Update.
6844         * linux-nat.c: Update.
6845         * linux-thread-db.c: Update.
6846         * nat/linux-osdata.c: Update.
6847         * nat/linux-procfs.c: Update.
6848         * nto-procfs.c: Update.
6849         * obsd-nat.c: Update.
6850         * proc-service.c: Update.
6851         * procfs.c: Update.
6852         * ravenscar-thread.c: Update.
6853         * remote-sim.c: Update.
6854         * remote.c: Update.
6855         * sol-thread.c: Update.
6856         * target.c: Update.
6857         * windows-nat.c: Update.
6858
6859 2018-07-03  Tom Tromey  <tom@tromey.com>
6860
6861         * infrun.c (follow_exec): Use exit_inferior_silent.
6862         * inferior.c (exit_inferior_num_silent): Remove.
6863         * inferior.h (exit_inferior_num_silent): Don't declare.
6864
6865 2018-07-03  Tom Tromey  <tom@tromey.com>
6866
6867         PR cli/23340:
6868         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6869         inferior_ptid on error.
6870
6871 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
6872             Simon Marchi  <simon.marchi@polymtl.ca>
6873
6874         PR tdep/8282
6875         * disasm.h (gdb_disassembler): Add
6876         `m_disassembler_options_holder'. member
6877         * disasm.c (get_all_disassembler_options): New function.
6878         (gdb_disassembler::gdb_disassembler): Use it.
6879         (gdb_buffered_insn_length_init_dis): Likewise.
6880         (gdb_buffered_insn_length): Adjust accordingly.
6881         (set_disassembler_options): Handle options with arguments.
6882         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6883         line if showing options with descriptions.
6884         (disassembler_options_completer): Adapt to using the
6885         `disasm_options_and_args_t' structure.
6886         * mips-tdep.c (mips_disassembler_options): New variable.
6887         (mips_disassembler_options_o32): Likewise.
6888         (mips_disassembler_options_n32): Likewise.
6889         (mips_disassembler_options_n64): Likewise.
6890         (gdb_print_insn_mips): Don't set `disassembler_options'.
6891         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6892         functions.
6893         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6894         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6895         `gdbarch_disassembler_options_implicit' and
6896         `gdbarch_valid_disassembler_options'.
6897         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6898         `disasm_options_and_args_t' structure.
6899         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6900         method.
6901         (valid_disassembler_options): Switch from `disasm_options_t' to
6902         the `disasm_options_and_args_t' structure.
6903         * NEWS: Document `set disassembler-options' support for the MIPS
6904         target.
6905         * gdbarch.h: Regenerate.
6906         * gdbarch.c: Regenerate.
6907
6908 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6909
6910         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6911
6912 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6913
6914         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6915         parameter in call to amd64_target_description.
6916         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6917         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6918         (amd64fbsd_init_abi): Likewise.
6919         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6920         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6921         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6922         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6923
6924 2018-06-29  Pedro Alves  <palves@redhat.com>
6925
6926         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6927         "segments" parameter.
6928         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6929         (_initialize_amd64_tdep): Update call to
6930         amd64_create_target_description.
6931         (amd64_target_description): Add "segments" parameter.  Adjust
6932         the implementation to use it.
6933         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6934         call to amd64_create_target_description.
6935         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6936         * gdb/arch/amd64.h (amd64_create_target_description): Add
6937         "segments" register.
6938         * gdb/arch/amd64.c (amd64_create_target_description): Add
6939         "segments" parameter.  Call create_feature_i386_64bit_segments
6940         only if SEGMENTS is true.
6941         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6942         call to amd64_create_target_description.
6943
6944 2018-06-29  Pedro Alves  <palves@redhat.com>
6945
6946         * thread.c (thread_target_id_str): New, factored out from ...
6947         (print_thread_info_1): ... here.  Use it to compute the max
6948         "Target Id" column width.
6949
6950 2018-06-29  Pedro Alves  <palves@redhat.com>
6951
6952         * remote.c (remote_target::extra_thread_info): Delete
6953         'display_buf' and 'n' locals.  from the cache, regardless of
6954         packet mechanims is in use.  Use cache for qThreadExtra and qP
6955         methods too.
6956
6957 2018-06-29  Pedro Alves  <palves@redhat.com>
6958
6959         * blockframe.c (find_pc_sect_containing_function): New function.
6960         * breakpoint.c (print_breakpoint_location): Don't call
6961         find_pc_sect_function.
6962         * linespec.c (create_sals_line_offset): Record the location's
6963         symbol in the sal.
6964         * linespec.c (convert_address_location_to_sals): Fill in sal's
6965         symbol with find_pc_sect_containing_function.
6966         * symtab.c (find_function_start_sal): Rename to ...
6967         (find_function_start_sal_1): ... this.
6968         (find_function_start_sal): Reimplement as wrapper around
6969         find_function_start_sal_1, and use
6970         find_pc_sect_containing_function to fill in the sal's symbol.
6971         (find_function_start_sal(symbol*, bool)): Adjust.
6972         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6973         comments.
6974         (find_pc_sect_containing_function): Declare.
6975
6976 2018-06-29  Pedro Alves  <palves@redhat.com>
6977
6978         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6979         true if the the location has no symbol.
6980
6981 2018-06-28  Tom Tromey  <tom@tromey.com>
6982
6983         * NEWS: Mention --enable-codesign.
6984         * silent-rules.mk (ECHO_SIGN): New variable.
6985         * configure.ac: Add --enable-codesign.
6986         * configure: Rebuild.
6987         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6988         (gdb$(EXEEXT)): Optionally invoke codesign.
6989
6990 2018-06-28  Pedro Alves  <palves@redhat.com>
6991
6992         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6993         comments.
6994         (switch_to_thread_no_regs): Adjust comment.
6995         * infcmd.c (stop_pc): Delete.
6996         (post_create_inferior, info_program_command): Replace references
6997         to stop_pc with references to thread_info->suspend.stop_pc.
6998         * inferior.h (stop_pc): Delete declaration.
6999         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7000         (handle_inferior_event_1, handle_signal_stop)
7001         (process_event_stop_test, keep_going_stepped_thread)
7002         (handle_step_into_function, handle_step_into_function_backward)
7003         (print_stop_location): Replace references to stop_pc with
7004         references to thread_info->suspend.stop_pc.
7005         (struct infcall_suspend_state) <stop_pc>: Delete field.
7006         (save_infcall_suspend_state, restore_infcall_suspend_state):
7007         Remove references to inf_stat->stop_pc.
7008         * linux-fork.c (fork_load_infrun_state): Likewise.
7009         * record-btrace.c (record_btrace_set_replay): Likewise.
7010         * record-full.c (record_full_goto_entry): Likewise.
7011         * remote.c (print_one_stopped_thread): Likewise.
7012         * target.c (target_resume): Extend comment.
7013         * thread.c (set_executing_thread): New.
7014         (set_executing): Use it.
7015         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7016         Remove references to stop_pc.
7017
7018 2018-06-28  Pedro Alves  <palves@redhat.com>
7019
7020         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7021         Moving fetching stop_pc until after ecs->event_thread is refreshed.
7022
7023 2018-06-28  Tom Tromey  <tom@tromey.com>
7024
7025         * coffread.c (coff_symfile_finish): Update.
7026         * xcoffread.c (xcoff_symfile_finish): Update.
7027         * elfread.c (elf_symfile_finish): Update.
7028         * symfile.h (dwarf2_free_objfile): Don't declare.
7029         * dwarf2read.c (_initialize_dwarf2_read): Use
7030         register_objfile_data_with_cleanup.
7031         (dwarf2_free_objfile): Now static.  Change signature.
7032
7033 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7034
7035         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7036         option "-o" to add-symbol-file-load to add an offset to each
7037         section's load address.
7038         * symfile.c (set_objfile_default_section_offset): New function.
7039
7040 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7041
7042         * symfile.c (add_symbol_file_command): Make sure that sections
7043         with the same name are sorted in the same order.
7044
7045 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7046
7047         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7048         require the second argument.  If omitted, load sections at the
7049         addresses specified in the file.
7050
7051 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7052
7053         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7054         (_initialize_symfile): Add option "-o" to symbol-file to add an
7055         offset to each section of the symbol file.
7056
7057 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7058
7059         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7060
7061 2018-06-27  Tom Tromey  <tom@tromey.com>
7062
7063         * stack.c (_initialize_stack): Update "func" help text.
7064
7065 2018-06-27  Tom Tromey  <tom@tromey.com>
7066
7067         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7068         std::vector.
7069         (unwind_infopy_str, pyuw_create_unwind_info)
7070         (unwind_infopy_add_saved_register, pyuw_sniffer)
7071         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7072         Update.
7073         (struct saved_reg): Add constructor.
7074         <value>: Now a gdbpy_ref<>.
7075
7076 2018-06-27  Tom Tromey  <tom@tromey.com>
7077
7078         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7079
7080 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7081
7082         * gdb-gdb.py.in: Format using autopep8.
7083
7084 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7085
7086         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7087         (type_lookup_function): Recognize CORE_ADDR values.
7088
7089 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7090
7091         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7092         print tag_name.
7093
7094 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7095
7096         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7097         <__lt__>: Add.
7098
7099 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7100
7101         * gdb-gdb.py: Move to...
7102         * gdb-gdb.py.in: ... here.
7103         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7104         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7105         dependencies.
7106         (distclean): Remove gdb-gdb.py when cleaning.
7107         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7108         * configure: Re-generate.
7109
7110 2018-06-27  Pedro Alves  <palves@redhat.com>
7111
7112         * proc-service.c (get_ps_regcache): New.
7113         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7114         (ps_lsetfpregs): Use it.
7115
7116 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7117
7118         PR gdb/21695
7119         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7120         declaration.
7121         (dwarf_decode_lines_1): Adjust.
7122
7123 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7124
7125         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7126         override.
7127         <info_proc>: Likewise.
7128
7129 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7130
7131         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7132         to windows_fetch_one_register, and only handle the case of
7133         fetching one register.  Move the code that reloads the context
7134         and iterates over all registers if R is negative to...
7135         (windows_nat_target::fetch_registers): ... here.
7136         (do_windows_store_inferior_registers): Rename to
7137         windows_store_one_register, and only handle the case of storing
7138         one register.  Move the code that handles the case where r is
7139         negative to...
7140         (windows_nat_target::store_registers) ... here.
7141
7142 2018-06-26  Tom Tromey  <tom@tromey.com>
7143
7144         PR rust/22574:
7145         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7146         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7147         Update.
7148         (rust_internal_print_type): Add podata parameter.
7149         (rust_print_type): Update.
7150
7151 2018-06-26  Tom Tromey  <tom@tromey.com>
7152
7153         * typeprint.h (struct print_offset_data) <update, finish,
7154         maybe_print_hole>: New methods.
7155         <indentation>: New constant.
7156         * typeprint.c (print_offset_data::indentation): Define.
7157         (print_offset_data::maybe_print_hole, print_offset_data::update)
7158         (print_offset_data::finish): Move from c-typeprint.c and rename.
7159         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7160         (print_spaces_filtered_with_print_options): Update.
7161         (c_print_type_union_field_offset, maybe_print_hole)
7162         (c_print_type_struct_field_offset): Move to typeprint.c and
7163         rename.
7164         (c_type_print_base_struct_union): Update.
7165
7166 2018-06-25  Pedro Alves  <palves@redhat.com>
7167
7168         * gdbthread.h (thread_info_ref, delete_thread)
7169         (delete_thread_silent, first_thread_of_inferior)
7170         (any_thread_of_inferior, switch_to_thread)
7171         (enable_thread_stack_temporaries)
7172         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7173         (get_last_thread_stack_temporary)
7174         (value_in_thread_stack_temporaries, can_access_registers_thread):
7175         Spell out "struct thread_info" instead of just "thread_info".
7176         * inferior.h (notice_new_inferior): Likewise.
7177
7178 2018-06-25  Pedro Alves  <palves@redhat.com>
7179
7180         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7181         pass thread_info pointer to delete_thread.
7182         (windows_nat_target::detach): Pass inferior pointer to
7183         detach_inferior.
7184         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7185         delete_thread.
7186         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7187         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7188         and pass a thread_info pointer to delete_thread.
7189         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7190         pass thread_info pointer to delete_thread.
7191         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7192         delete_thread_silent call.
7193         * procfs.c (procfs_target::detach): Pass inferior pointer to
7194         detach_inferior.
7195         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7196         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7197         delete_thread_silent call.
7198         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7199         pass thread_info pointer to delete_thread.
7200         (windows_nat_target::detach): Pass inferior pointer to
7201         delete_inferior.
7202
7203 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7204
7205         * regcache.c (readable_regcache::read_part): Fix asserts.
7206         (reg_buffer::raw_collect_part): New function.
7207         (regcache::write_part): Fix asserts.
7208         (reg_buffer::raw_supply_part): New function.
7209         (regcache::transfer_regset_register): New helper function.
7210         (regcache::transfer_regset): Call new functions.
7211         (regcache_supply_regset): Use gdb_byte*.
7212         (regcache::supply_regset): Likewise.
7213         (regcache_collect_regset): Likewise.
7214         (regcache::collect_regset): Likewise.
7215         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7216         (reg_buffer::raw_supply_part): Likewise.
7217         (regcache::transfer_regset_register): Likewise.
7218         (regcache::transfer_regset): Use gdb_byte*.
7219
7220 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7221
7222         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7223
7224 2018-06-21  Pedro Alves  <palves@redhat.com>
7225
7226         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7227         instead of a ptid_t.  All callers adjusted.
7228         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7229         adjusted.
7230         (print_ada_task_info, display_current_task_id, task_command_1):
7231         Adjust.
7232         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7233         inferior_thread.
7234         (breakpoint_kind): Adjust.
7235         (remove_breakpoints_pid): Rename to ...
7236         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7237         pointer.  All callers adjusted.
7238         (bpstat_clear_actions): Use inferior_thread.
7239         (get_bpstat_thread): New.
7240         (bpstat_do_actions): Use it.
7241         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7242         to take a thread_info pointer.  All callers adjusted.
7243         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7244         (breakpoint_re_set_thread): Use inferior_thread.
7245         * breakpoint.h (struct inferior): Forward declare.
7246         (bpstat_stop_status): Update.
7247         (remove_breakpoints_pid): Delete.
7248         (remove_breakpoints_inf): New.
7249         * bsd-uthread.c (bsd_uthread_target::wait)
7250         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7251         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7252         (maint_btrace_packet_history_cmd)
7253         (maint_btrace_clear_packet_history_cmd): Adjust.
7254         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7255         inferior_thread.
7256         * cli/cli-interp.c: Include "inferior.h".
7257         * common/refcounted-object.h (struct
7258         refcounted_object_ref_policy): New.
7259         * compile/compile-object-load.c: Include gdbthread.h.
7260         (store_regs): Use inferior_thread.
7261         * corelow.c (core_target::close): Use current_inferior.
7262         (core_target_open): Adjust to use first_thread_of_inferior and use
7263         the current inferior.
7264         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7265         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7266         <thread>: ... this new field.  All references adjusted.
7267         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7268         Take a thread_info pointer instead of a ptid_t.
7269         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7270         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7271         thread_info pointer instead of a ptid_t.
7272         * elfread.c: Include "inferior.h".
7273         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7274         Use inferior_thread.
7275         * eval.c (evaluate_subexp): Likewise.
7276         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7277         inferior_thread.
7278         * gdb_proc_service.h (struct thread_info): Forward declare.
7279         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7280         <thread>: ... this new field.  All references adjusted.
7281         * gdbarch.h, gdbarch.c: Regenerate.
7282         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7283         'thread' parameter.  All implementations and callers adjusted.
7284         * gdbthread.h (thread_info) <set_running>: New method.
7285         (delete_thread, delete_thread_silent): Take a thread_info pointer
7286         instead of a ptid.
7287         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7288         (first_thread_of_process): Delete, replaced by ...
7289         (first_thread_of_inferior): ... this new function.  All callers
7290         adjusted.
7291         (any_live_thread_of_process): Delete, replaced by ...
7292         (any_live_thread_of_inferior): ... this new function.  All callers
7293         adjusted.
7294         (switch_to_thread, switch_to_no_thread): Declare.
7295         (is_executing): Delete.
7296         (enable_thread_stack_temporaries): Update comment.
7297         <enable_thread_stack_temporaries>: Take a thread_info pointer
7298         instead of a ptid_t.  Incref the thread.
7299         <~enable_thread_stack_temporaries>: Decref the thread.
7300         <m_ptid>: Delete
7301         <m_thr>: New.
7302         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7303         (get_last_thread_stack_temporary)
7304         (value_in_thread_stack_temporaries, can_access_registers_thread):
7305         Take a thread_info pointer instead of a ptid_t.  All callers
7306         adjusted.
7307         * infcall.c (get_call_return_value): Use inferior_thread.
7308         (run_inferior_call): Work with thread pointers instead of ptid_t.
7309         (call_function_by_hand_dummy): Work with thread pointers instead
7310         of ptid_t.  Use thread_info_ref.
7311         * infcmd.c (proceed_thread_callback): Access thread's state
7312         directly.
7313         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7314         access thread's state directly.
7315         (continue_command): Use inferior_thread.
7316         (info_program_command): Use find_thread_ptid and access thread
7317         state directly.
7318         (proceed_after_attach_callback): Use thread state directly.
7319         (notice_new_inferior): Take a thread_info pointer instead of a
7320         ptid_t.  All callers adjusted.
7321         (exit_inferior): Take an inferior pointer instead of a pid.  All
7322         callers adjusted.
7323         (exit_inferior_silent): New.
7324         (detach_inferior): Delete.
7325         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7326         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7327         (detach_inferior_command, kill_inferior_command): Use
7328         find_inferior_id instead of valid_gdb_inferior_id and
7329         gdb_inferior_id_to_pid.
7330         (inferior_command): Use inferior and thread pointers.
7331         * inferior.h (struct thread_info): Forward declare.
7332         (notice_new_inferior): Take a thread_info pointer instead of a
7333         ptid_t.  All callers adjusted.
7334         (detach_inferior): Delete declaration.
7335         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7336         instead of a pid.  All callers adjusted.
7337         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7338         (valid_gdb_inferior_id): Delete.
7339         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7340         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7341         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7342         ...
7343         <inf>: ... this new field.
7344         <step_ptid>: Delete, replaced by ...
7345         <step_thread>: ... this new field.
7346         (get_displaced_stepping_state): Take an inferior pointer instead
7347         of a pid.  All callers adjusted.
7348         (displaced_step_in_progress_any_inferior): Adjust.
7349         (displaced_step_in_progress_thread): Take a thread pointer instead
7350         of a ptid_t.  All callers adjusted.
7351         (displaced_step_in_progress, add_displaced_stepping_state): Take
7352         an inferior pointer instead of a pid.  All callers adjusted.
7353         (get_displaced_step_closure_by_addr): Adjust.
7354         (remove_displaced_stepping_state): Take an inferior pointer
7355         instead of a pid.  All callers adjusted.
7356         (displaced_step_prepare_throw, displaced_step_prepare)
7357         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7358         All callers adjusted.
7359         (start_step_over): Adjust.
7360         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7361         displaced step queue.
7362         (do_target_resume): Adjust.
7363         (fetch_inferior_event): Use inferior_thread.
7364         (context_switch, get_inferior_stop_soon): Take an
7365         execution_control_state pointer instead of a ptid_t.  All callers
7366         adjusted.
7367         (switch_to_thread_cleanup): Delete.
7368         (stop_all_threads): Use scoped_restore_current_thread.
7369         * inline-frame.c: Include "gdbthread.h".
7370         (inline_state) <inline_state>: Take a thread pointer instead of a
7371         ptid_t.  All callers adjusted.
7372         <ptid>: Delete, replaced by ...
7373         <thread>: ... this new field.
7374         (find_inline_frame_state): Take a thread pointer instead of a
7375         ptid_t.  All callers adjusted.
7376         (skip_inline_frames, step_into_inline_frame)
7377         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7378         pointer instead of a ptid_t.  All callers adjusted.
7379         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7380         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7381         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7382         pointers directly.
7383         * linux-nat.c (get_detach_signal): Likewise.
7384         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7385         (thread_db_notice_clone): Adjust.
7386         (thread_db_find_new_threads_silently)
7387         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7388         a thread pointer instead of a ptid_t.  All callers adjusted.
7389         * mi/mi-cmd-var.c: Include "inferior.h".
7390         (mi_cmd_var_update_iter): Update to use thread pointers.
7391         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7392         inferior directly.
7393         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7394         out to ...
7395         (mi_output_running): ... this new function.
7396         (mi_on_resume_1): Adjust to use it.
7397         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7398         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7399         directly.
7400         (interrupt_thread_callback): : Adjust to use thread and inferior
7401         pointers.
7402         * proc-service.c: Include "gdbthread.h".
7403         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7404         * progspace-and-thread.c: Include "inferior.h".
7405         * progspace.c: Include "inferior.h".
7406         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7407         hold a reference to an inferior_object.
7408         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7409         inferior_thread.
7410         * python/py-inferior.c (struct inferior_object): Give the type a
7411         tag name instead of a typedef.
7412         (python_on_normal_stop): No need to check if the current thread is
7413         listed.
7414         (inferior_to_inferior_object): Change return type to
7415         inferior_object.  All callers adjusted.
7416         (find_thread_object): Delete, bits factored out to ...
7417         (thread_to_thread_object): ... this new function.
7418         * python/py-infthread.c (create_thread_object): Use
7419         inferior_to_inferior_object.
7420         (thpy_is_stopped): Use thread pointer directly.
7421         (gdbpy_selected_thread): Use inferior_thread.
7422         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7423         field, replaced with ...
7424         <thread>: ... this new field.  All users adjusted.
7425         (btpy_insn_or_gap_new): Drop const.
7426         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7427         callers adjusted.
7428         * python/py-record.c: Include "gdbthread.h".
7429         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7430         a ptid_t.  All callers adjusted.
7431         (gdbpy_current_recording): Use inferior_thread.
7432         * python/py-record.h (recpy_record_object) <ptid>: Delete
7433         field, replaced with ...
7434         <thread>: ... this new field.  All users adjusted.
7435         (recpy_element_object) <ptid>: Delete
7436         field, replaced with ...
7437         <thread>: ... this new field.  All users adjusted.
7438         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7439         a ptid_t.  All callers adjusted.
7440         * python/py-threadevent.c: Include "gdbthread.h".
7441         (get_event_thread): Use thread_to_thread_object.
7442         * python/python-internal.h (struct inferior_object): Forward
7443         declare.
7444         (find_thread_object, find_inferior_object): Delete declarations.
7445         (thread_to_thread_object, inferior_to_inferior_object): New
7446         declarations.
7447         * record-btrace.c: Include "inferior.h".
7448         (require_btrace_thread): Use inferior_thread.
7449         (record_btrace_frame_sniffer)
7450         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7451         (get_thread_current_frame): Use scoped_restore_current_thread and
7452         switch_to_thread.
7453         (get_thread_current_frame): Use thread pointer directly.
7454         (record_btrace_replay_at_breakpoint): Use thread's inferior
7455         pointer directly.
7456         * record-full.c: Include "inferior.h".
7457         * regcache.c: Include "gdbthread.h".
7458         (get_thread_arch_regcache): Use the inferior's address space
7459         directly.
7460         (get_thread_regcache, registers_changed_thread): New.
7461         * regcache.h (get_thread_regcache(thread_info *thread)): New
7462         overload.
7463         (registers_changed_thread): New.
7464         (remote_target) <remote_detach_1>: Swap order of parameters.
7465         (remote_add_thread): <remote_add_thread>: Return the new thread.
7466         (get_remote_thread_info(ptid_t)): New overload.
7467         (remote_target::remote_notice_new_inferior): Use thread pointers
7468         directly.
7469         (remote_target::process_initial_stop_replies): Use
7470         thread_info::set_running.
7471         (remote_target::remote_detach_1, remote_target::detach)
7472         (extended_remote_target::detach): Adjust.
7473         * stack.c (frame_show_address): Use inferior_thread.
7474         * target-debug.h (target_debug_print_thread_info_pp): New.
7475         * target-delegates.c: Regenerate.
7476         * target.c (default_thread_address_space): Delete.
7477         (memory_xfer_partial_1): Use current_inferior.
7478         (target_detach): Use current_inferior.
7479         (target_thread_address_space): Delete.
7480         (generic_mourn_inferior): Use current_inferior.
7481         * target.h (struct target_ops) <thread_address_space>: Delete.
7482         (target_thread_address_space): Delete.
7483         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
7484         pointers directly.
7485         (delete_thread_1, delete_thread, delete_thread_silent): Take a
7486         thread pointer instead of a ptid_t.  Adjust all callers.
7487         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
7488         (first_thread_of_process): Delete, replaced by ...
7489         (first_thread_of_inferior): ... this new function.  All callers
7490         adjusted.
7491         (any_thread_of_process): Rename to ...
7492         (any_thread_of_inferior): ... this, and take an inferior pointer.
7493         (any_live_thread_of_process): Rename to ...
7494         (any_live_thread_of_inferior): ... this, and take an inferior
7495         pointer.
7496         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7497         (value_in_thread_stack_temporaries)
7498         (get_last_thread_stack_temporary): Take a thread pointer instead
7499         of a ptid_t.  Adjust all callers.
7500         (thread_info::set_running): New.
7501         (validate_registers_access): Use inferior_thread.
7502         (can_access_registers_ptid): Rename to ...
7503         (can_access_registers_thread): ... this, and take a thread
7504         pointer.
7505         (print_thread_info_1): Adjust to compare thread pointers instead
7506         of ptids.
7507         (switch_to_no_thread, switch_to_thread): Make extern.
7508         (scoped_restore_current_thread::~scoped_restore_current_thread):
7509         Use m_thread pointer directly.
7510         (scoped_restore_current_thread::scoped_restore_current_thread):
7511         Use inferior_thread.
7512         (thread_command): Use thread pointer directly.
7513         (thread_num_make_value_helper): Use inferior_thread.
7514         * top.c (execute_command): Use inferior_thread.
7515         * tui/tui-interp.c: Include "inferior.h".
7516         * varobj.c (varobj_create): Use inferior_thread.
7517         (value_of_root_1): Use find_thread_global_id instead of
7518         global_thread_id_to_ptid.
7519
7520 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
7521
7522         * regcache.c (readable_regcache::read_part): Avoid memcpy when
7523         possible.
7524         (regcache::write_part): Likewise.
7525         (readable_regcache::cooked_read_part): Update comment.
7526         (readable_regcache::cooked_write_part): Likewise.
7527         * regcache.h: (readable_regcache::read_part): Likewise.
7528         (regcache::write_part): Likewise.
7529
7530 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
7531             Dirk Schubert  <dirk.schubert@arm.com>
7532
7533         * aarch64-linux-nat.c (post_attach): New.
7534         (aarch64_linux_nat_target::post_attach): Override post_attach to
7535         record the number of hardware debug registers.
7536
7537 2018-06-20  Tom Tromey  <tom@tromey.com>
7538
7539         * python/py-param.c (add_setshow_generic): Make parameters const.
7540         (parmpy_init): Update.
7541
7542 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7543
7544         * regcache.h (regcache_cooked_read_ftype): Rename to...
7545         (register_read_ftype): ...this, change type to function_view.
7546         (class reg_buffer) <save>: Remove src parameter.
7547         (readonly_detached_regcache) <readonly_detached_regcache>: Make
7548         parameter non-const in first overload.  Remove src parameter in
7549         second overload.
7550         * regcache.c (do_cooked_read): Remove.
7551         (readonly_detached_regcache::readonly_detached_regcache): Make
7552         parameter non-const, adjust call to other constructor.
7553         (reg_buffer::save): Remove src parameter.
7554         * frame.c (do_frame_register_read): Remove.
7555         (frame_save_as_regcache): Use lambda function.
7556         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
7557         parameter to ppu2spu_data *.
7558         (ppu2spu_sniffer): Use lambda function.
7559
7560 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7561
7562         * record-full.c (record_full_target::insert_breakpoint): Remove
7563         "struct" keyword, add const.
7564
7565 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
7566
7567         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
7568         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
7569         * configure.ac: Remove AC_PREREQ, add missing quoting.
7570         * gnulib/configure.ac: Modernize usage of
7571         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
7572         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
7573         (AUTOMAKE_VERSION): Bump to 1.15.1.
7574         * configure: Re-generate.
7575         * config.in: Re-generate.
7576         * aclocal.m4: Re-generate.
7577         * gnulib/aclocal.m4: Re-generate.
7578         * gnulib/config.in: Re-generate.
7579         * gnulib/configure: Re-generate.
7580         * gnulib/import/Makefile.in: Re-generate.
7581
7582 2018-06-19  Pedro Alves  <palves@redhat.com>
7583
7584         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
7585         (lookup_minimal_symbol_by_pc_section): ... here with
7586         gdb_assert_not_reached added.
7587
7588 2018-06-19  Pedro Alves  <palves@redhat.com>
7589
7590         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
7591         parameter with a block parameter.  Compare location's block symbol
7592         with the frame's block instead of addresses.
7593         (skip_inline_frames): Pass the current block instead of the
7594         frame's address.  Break out as soon as we determine the frame
7595         should not be skipped.
7596
7597 2018-06-18  Tom Tromey  <tom@tromey.com>
7598
7599         * solib-aix.c (solib_aix_get_section_offsets): Return
7600         unique_xmalloc_ptr.
7601         (solib_aix_solib_create_inferior_hook): Update.
7602
7603 2018-06-18  Tom Tromey  <tom@tromey.com>
7604
7605         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
7606
7607 2018-06-18  Tom Tromey  <tom@tromey.com>
7608
7609         * solib-frv.c (frv_relocate_main_executable): Use
7610         unique_xmalloc_ptr.
7611         * solib-dsbt.c (dsbt_relocate_main_executable): Use
7612         unique_xmalloc_ptr.
7613
7614 2018-06-18  Tom Tromey  <tom@tromey.com>
7615
7616         * objfiles.h (inhibit_section_map_updates): Update.
7617         (resume_section_map_updates, resume_section_map_updates_cleanup):
7618         Remove.
7619         * solib-svr4.c (svr4_handle_solib_event): Update.
7620         * objfiles.c (inhibit_section_map_updates): Return
7621         scoped_restore_tmpl<int>.
7622         (resume_section_map_updates, resume_section_map_updates_cleanup):
7623         Remove.
7624
7625 2018-06-18  Tom Tromey  <tom@tromey.com>
7626
7627         * valprint.h (read_string): Update.
7628         * valprint.c (read_string): Change type of "buffer".
7629         (val_print_string): Update.
7630         * python/py-value.c (valpy_string): Update.
7631         * language.h (struct language_defn) <la_get_string>: Change
7632         type of "buffer".
7633         (default_get_string, c_get_string): Update.
7634         * language.c (default_get_string): Change type of "buffer".
7635         * guile/scm-value.c (gdbscm_value_to_string): Update.
7636         * c-lang.c (c_get_string): Change type of "buffer".
7637
7638 2018-06-18  Tom Tromey  <tom@tromey.com>
7639
7640         * ser-mingw.c (struct pipe_state_destroyer): New.
7641         (pipe_state_up): New typedef.
7642         (cleanup_pipe_state): Remove.
7643         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
7644
7645 2018-06-18  Tom Tromey  <tom@tromey.com>
7646
7647         * rust-lang.h (rust_yyerror): Don't declare.
7648         * rust-lang.c (rust_language_defn): Update.
7649         * rust-exp.y (yyerror): Now static.
7650         * parse.c (parse_exp_in_context_1): Update.
7651         * p-lang.h (p_yyerror): Don't declare.
7652         * p-lang.c (p_language_defn): Update.
7653         * p-exp.y (yyerror): Now static.
7654         * opencl-lang.c (opencl_language_defn): Update.
7655         * objc-lang.c (objc_language_defn): Update.
7656         * m2-lang.h (m2_yyerror): Don't declare.
7657         * m2-lang.c (m2_language_defn): Update.
7658         * m2-exp.y (yyerror): Now static.
7659         * language.h (struct language_defn) <la_error>: Remove.
7660         * language.c (unk_lang_error): Remove.
7661         (unknown_language_defn, auto_language_defn): Remove.
7662         * go-lang.h (go_yyerror): Don't declare.
7663         * go-lang.c (go_language_defn): Update.
7664         * go-exp.y (yyerror): Now static.
7665         * f-lang.h (f_yyerror): Don't declare.
7666         * f-lang.c (f_language_defn): Update.
7667         * f-exp.y (yyerror): Now static.
7668         * d-lang.h (d_yyerror): Don't declare.
7669         * d-lang.c (d_language_defn): Update.
7670         * d-exp.y (yyerror): Now static.
7671         * c-lang.h (c_yyerror): Don't declare.
7672         * c-lang.c (c_language_defn, cplus_language_defn)
7673         (asm_language_defn, minimal_language_defn): Update.
7674         * c-exp.y (yyerror): Now static.
7675         * ada-lang.h (ada_yyerror): Don't declare.
7676         * ada-lang.c (ada_language_defn): Update.
7677         * ada-exp.y (yyerror): Now static.
7678
7679 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7680
7681         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
7682         (store_sveregs_to_thread): Likewise.
7683         (aarch64_linux_fetch_inferior_registers): Check for SVE.
7684         (aarch64_linux_store_inferior_registers): Likewise.
7685         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
7686         function.
7687         (aarch64_sve_regs_copy_to_regcache): Likewise.
7688         (aarch64_sve_regs_copy_from_regcache): Likewise.
7689         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
7690         declaration.
7691         (aarch64_sve_regs_copy_to_regcache): Likewise.
7692         (aarch64_sve_regs_copy_from_regcache): Likewise.
7693         (sve_context): Structure from Linux headers.
7694         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
7695         (SVE_SIG_ZREG_SIZE): Likewise.
7696         (SVE_SIG_PREG_SIZE): Likewise.
7697         (SVE_SIG_FFR_SIZE): Likewise.
7698         (SVE_SIG_REGS_OFFSET): Likewise.
7699         (SVE_SIG_ZREGS_OFFSET): Likewise.
7700         (SVE_SIG_ZREG_OFFSET): Likewise.
7701         (SVE_SIG_ZREGS_SIZE): Likewise.
7702         (SVE_SIG_PREGS_OFFSET): Likewise.
7703         (SVE_SIG_PREG_OFFSET): Likewise.
7704         (SVE_SIG_PREGS_SIZE): Likewise.
7705         (SVE_SIG_FFR_OFFSET): Likewise.
7706         (SVE_SIG_REGS_SIZE): Likewise.
7707         (SVE_SIG_CONTEXT_SIZE): Likewise.
7708         (SVE_PT_REGS_MASK): Likewise.
7709         (SVE_PT_REGS_FPSIMD): Likewise.
7710         (SVE_PT_REGS_SVE): Likewise.
7711         (SVE_PT_VL_INHERIT): Likewise.
7712         (SVE_PT_VL_ONEXEC): Likewise.
7713         (SVE_PT_REGS_OFFSET): Likewise.
7714         (SVE_PT_FPSIMD_OFFSET): Likewise.
7715         (SVE_PT_FPSIMD_SIZE): Likewise.
7716         (SVE_PT_SVE_ZREG_SIZE): Likewise.
7717         (SVE_PT_SVE_PREG_SIZE): Likewise.
7718         (SVE_PT_SVE_FFR_SIZE): Likewise.
7719         (SVE_PT_SVE_FPSR_SIZE): Likewise.
7720         (SVE_PT_SVE_FPCR_SIZE): Likewise.
7721         (__SVE_SIG_TO_PT): Likewise.
7722         (SVE_PT_SVE_OFFSET): Likewise.
7723         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
7724         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
7725         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
7726         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
7727         (SVE_PT_SVE_PREG_OFFSET): Likewise.
7728         (SVE_PT_SVE_PREGS_SIZE): Likewise.
7729         (SVE_PT_SVE_FFR_OFFSET): Likewise.
7730         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
7731         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
7732         (SVE_PT_SVE_SIZE): Likewise.
7733         (SVE_PT_SIZE): Likewise.
7734         (HAS_SVE_STATE): New define.
7735
7736 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7737
7738         * nat/aarch64-sve-linux-sigcontext.h: New file.
7739         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
7740         new files.
7741         (SVE_VQ_MIN): Likewise.
7742         (SVE_VQ_MAX): Likewise.
7743         (SVE_VL_MIN): Likewise.
7744         (SVE_VL_MAX): Likewise.
7745         (SVE_NUM_ZREGS): Likewise.
7746         (SVE_NUM_PREGS): Likewise.
7747         (sve_vl_valid): Likewise.
7748         (struct user_sve_header): Likewise.
7749
7750 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
7751             Richard Bunt <Richard.Bunt@arm.com>
7752
7753         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7754         was requested by GDB.
7755
7756 2018-06-15  Tom de Vries  <tdevries@suse.de>
7757
7758         * MAINTAINERS (Write After Approval): Add Tom de Vries.
7759
7760 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
7761
7762         * gnulib/update-gnulib.sh: Print expected versions of
7763         autoconf/aclocal.
7764
7765 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
7766
7767         * arch-utils.c (default_type_align): Use type_length_units.
7768         * gdbtypes.c (type_align): Use type_length_units.
7769
7770 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7771
7772         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7773         of 'define' command.
7774
7775 2018-06-14  Tom de Vries  <tdevries@suse.de>
7776
7777         PR cli/22573
7778         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7779         get_no_prettyformat_print_options.
7780
7781 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7782
7783         * sparc-nat.h: Include target.h.
7784         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7785         <fetch_registers>: Remove this argument in function call.
7786         <store_registers>: Remove this argument in function call, remove
7787         extra semicolon.
7788         <low_forget_process>: Call sparc64_forget_process instead of
7789         sparc_forget_process.
7790
7791 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7792
7793         * procfs.c (_initialize_procfs): Use add_inf_child_target.
7794         (procfs_target::make_corefile_notes): Adjust to new
7795         target_read_alloc return type.
7796
7797 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7798             Stephen Roberts  <stephen.roberts@arm.com>
7799
7800         PR gdb/22882
7801         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7802         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7803         Move should_notify_stop local into more inner scope.
7804
7805 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7806             Stephen Roberts  <stephen.roberts@arm.com>
7807
7808         PR gdb/22882
7809         * infrun.c (resume_1): Add call to mark_async_event_handler.
7810
7811 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7812
7813         * infrun.c (do_target_wait): Change old version of $pc printed.
7814
7815 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7816
7817         * dwarf2read.c (read_index_from_section): Rename to...
7818         (read_gdb_index_from_section): ... this, update all callers.
7819         (dwarf2_read_index): Rename to...
7820         (dwarf2_read_gdb_index): ... this, update all callers.
7821
7822 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7823
7824         * hppa-linux-nat.c
7825         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7826         hppa_linux_nat_target::fetch_registers.
7827
7828 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7829
7830         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7831         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7832         (AARCH64_DWARF_SVE_FFR): Likewise.
7833         (AARCH64_DWARF_SVE_P0): Likewise.
7834         (AARCH64_DWARF_SVE_Z0): Likewise.
7835
7836 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7837
7838         * common/common-regcache.h (raw_compare): New function.
7839         * regcache.c (regcache::raw_compare): Likewise.
7840         * regcache.h (regcache::raw_compare): New declaration.
7841
7842 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7843
7844         * common/common-regcache.h (reg_buffer_common): New structure.
7845         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7846         (reg_buffer::raw_supply): Likewise.
7847         (reg_buffer::raw_supply_integer): Likewise.
7848         (reg_buffer::raw_supply_zeroed): Likewise.
7849         (reg_buffer::raw_collect): Likewise.
7850         (reg_buffer::raw_collect_integer): Likewise.
7851         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7852         (reg_buffer::raw_supply): Likewise.
7853         (reg_buffer::raw_supply_integer): Likewise.
7854         (reg_buffer::raw_supply_zeroed): Likewise.
7855         (reg_buffer::raw_collect): Likewise.
7856         (reg_buffer::raw_collect_integer): Likewise.
7857
7858 2018-06-10  Tom Tromey  <tom@tromey.com>
7859
7860         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7861         (class remote_state) <stop_reply_queue>: Now std::vector.
7862         (remote_state::~remote_state)
7863         (remote_target::stop_reply_queue_length): Update.
7864         (struct queue_iter_param, remove_child_of_pending_fork)
7865         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7866         (check_pending_event_prevents_wildcard_vcont_callback)
7867         (remove_stop_reply_for_inferior)
7868         (remove_stop_reply_of_remote_state)
7869         (remote_notif_remove_once_on_match)
7870         (stop_reply_match_ptid_and_ws)
7871         (remote_kill_child_of_pending_fork): Remove.
7872         (remote_target::remove_new_fork_children)
7873         (remote_target::check_pending_events_prevent_wildcard_vcont)
7874         (remote_target::discard_pending_stop_replies)
7875         (remote_target::discard_pending_stop_replies_in_queue)
7876         (remote_target::remote_notif_remove_queued_reply)
7877         (remote_target::queued_stop_reply)
7878         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7879         (remote_target::wait, remote_target::kill_new_fork_children)
7880         (remote_target::async): Update.
7881
7882 2018-06-10  Tom Tromey  <tom@tromey.com>
7883
7884         * record-full.c (record_full_arch_list_cleanups): Remove.
7885         (record_full_message): Use try/catch.
7886         (record_full_wait_cleanups): Remove.
7887         (record_full_wait_1): Use try/catch.
7888         (record_full_restore): Likewise.
7889
7890 2018-06-10  Tom Tromey  <tom@tromey.com>
7891
7892         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7893         declare VEC.  Add constructor.
7894         <in_target_beneath>: Now bool.
7895         (record_full_breakpoints): Now a std::vector, static.
7896         (record_full_sync_record_breakpoints)
7897         (record_full_init_record_breakpoints)
7898         (record_full_target::insert_breakpoint)
7899         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7900
7901 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7902
7903         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7904         * serial.c (serial_interface_lookup): Remove struct keyword.
7905
7906 2018-06-10  Tom Tromey  <tom@tromey.com>
7907
7908         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7909         method.
7910         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7911         a method.
7912         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7913         method.
7914         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7915         "beneath" as a method.
7916         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7917         Use "beneath" as a method.
7918
7919 2018-06-10  Tom Tromey  <tom@tromey.com>
7920
7921         * tracefile.c (struct trace_file_writer_deleter): New.
7922         <operator()>: Rename from trace_file_writer_xfree.
7923         (trace_file_writer_up): New typedef.
7924         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7925
7926 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7927
7928         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7929         <m_registers, m_register_status>: Change type to
7930         std::unique_ptr.
7931         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7932         XCNEWVEC.
7933
7934 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7935
7936         * common/common-regcache.h (enum register_status): Add
7937         underlying type "signed char".
7938         * regcache.h (reg_buffer) <m_register_status>: Change type to
7939         register_status *.
7940         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7941         register_status instead of signed char.
7942         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7943         (reg_buffer::get_register_status): Remove cast.
7944         (readable_regcache::raw_read): Remove cast.
7945         (readable_regcache::cooked_read): Remove cast.
7946
7947 2018-06-09  Tom Tromey  <tom@tromey.com>
7948
7949         * source.c (reverse_search_command, forward_search_command): Use
7950         scoped_fd.
7951
7952 2018-06-09  Tom Tromey  <tom@tromey.com>
7953
7954         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7955         (serial_ops_list): Now static, std::vector.
7956         (serial_interface_lookup, serial_add_interface): Update.
7957
7958 2018-06-09  Tom Tromey  <tom@tromey.com>
7959
7960         * dwarf2read.c (process_cu_includes): Update.
7961         (process_full_comp_unit): Update.
7962         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7963         std::vector.
7964
7965 2018-06-08  Paul Koning  <paul_koning@dell.com>
7966
7967         PR gdb/23252
7968
7969         * python/python.c (do_start_initialization):
7970         Avoid call to internal Python API.
7971         (init__gdb_module): New function.
7972
7973 2018-06-08  Gary Benson <gbenson@redhat.com>
7974
7975         * linux-thread-db.c (valprint.h): New include.
7976         (struct check_thread_db_info): New structure.
7977         (check_thread_db_on_load, tdb_testinfo): New static globals.
7978         (check_thread_db, check_thread_db_callback): New functions.
7979         (try_thread_db_load_1): Run integrity checks if requested.
7980         (maintenance_check_libthread_db): New function.
7981         (_initialize_thread_db): Register "maint check libthread-db"
7982         and "maint set/show check-libthread-db".
7983         * NEWS: Mention the above new commands.
7984
7985 2018-06-08  Tom Tromey  <tom@tromey.com>
7986
7987         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7988         now a method.
7989
7990 2018-06-08  Tom Tromey  <tom@tromey.com>
7991
7992         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7993
7994 2018-06-08  Tom Tromey  <tom@tromey.com>
7995
7996         * common/btrace-common.h (struct btrace_data): Add constructor,
7997         destructor, move assignment operator.
7998         <empty, clear, fini>: New methods.
7999         <format>: Initialize.
8000         (btrace_data_init, btrace_data_fini, btrace_data_clear)
8001         (btrace_data_empty): Don't declare.
8002         * common/btrace-common.c (btrace_data_init): Remove.
8003         (btrace_data::fini): Rename from btrace_data_fini.
8004         (btrace_data::empty): Rename from btrace_data_empty.
8005         (btrace_data::clear): Rename from btrace_data_clear.  Return
8006         bool.
8007         * btrace.h (make_cleanup_btrace_data): Don't declare.
8008         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8009         (parse_xml_btrace): Update.
8010         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8011         (maint_btrace_clear_packet_history_cmd): Update.
8012
8013 2018-06-07  Pedro Alves  <palves@redhat.com>
8014
8015         * target.h (target_ops) <beneath>: Now a method.  All references
8016         updated.
8017         (class target_stack): New.
8018         * target.c (g_target_stack): New.
8019         (g_current_top_target): Delete.
8020         (current_top_target): Get the top target out of g_target_stack.
8021         (target_stack::push, target_stack::unpush): New.
8022         (push_target, unpush_target): Reimplement.
8023         (target_is_pushed): Reimplement in terms of g_target_stack.
8024         (target_ops::beneath, target_stack::find_beneath): New.
8025
8026 2018-06-07  Pedro Alves  <palves@redhat.com>
8027
8028         * target.h (find_target_beneath): Delete declaration.
8029         * target.c (find_target_beneath): Delete definition.
8030         * aix-thread.c: All callers of find_target_beneath adjusted to
8031         call target_ops::beneath instead.
8032         * bsd-uthread.c: Likewise.
8033         * linux-thread-db.c: Likewise.
8034         * ravenscar-thread.c: Likewise.
8035         * sol-thread.c: Likewise.
8036         * spu-multiarch.c: Likewise.
8037
8038 2018-06-07  Pedro Alves  <palves@redhat.com>
8039
8040         * target.h (target_ops) <beneath>: Now a method.  All references
8041         updated.
8042         (target_ops) <m_beneath>: New.
8043         * target.c (target_ops::beneath): New.
8044         * corelow.c: Adjust all references to target_ops::beneath.
8045         * linux-thread-db.c: Likewise.
8046         * make-target-delegates: Likewise.
8047         * record-btrace.c: Likewise.
8048         * record-full.c: Likewise.
8049         * remote.c: Likewise.
8050         * target.c: Likewise.
8051         * target-delegates.c: Regenerate.
8052
8053 2018-06-07  Pedro Alves  <palves@redhat.com>
8054
8055         * target.h (target_stack): Delete.
8056         (current_top_target): Declare function.
8057         * target.c (target_stack): Delete.
8058         (g_current_top_target): New.
8059         (current_top_target): New function.
8060         * auxv.c: Use current_top_target instead of target_stack
8061         throughout.
8062         * avr-tdep.c: Likewise.
8063         * breakpoint.c: Likewise.
8064         * corefile.c: Likewise.
8065         * elfread.c: Likewise.
8066         * eval.c: Likewise.
8067         * exceptions.c: Likewise.
8068         * frame.c: Likewise.
8069         * gdbarch-selftests.c: Likewise.
8070         * gnu-v3-abi.c: Likewise.
8071         * ia64-tdep.c: Likewise.
8072         * ia64-vms-tdep.c: Likewise.
8073         * infcall.c: Likewise.
8074         * infcmd.c: Likewise.
8075         * infrun.c: Likewise.
8076         * linespec.c: Likewise.
8077         * linux-tdep.c: Likewise.
8078         * minsyms.c: Likewise.
8079         * ppc-linux-nat.c: Likewise.
8080         * ppc-linux-tdep.c: Likewise.
8081         * procfs.c: Likewise.
8082         * regcache.c: Likewise.
8083         * remote.c: Likewise.
8084         * rs6000-tdep.c: Likewise.
8085         * s390-linux-nat.c: Likewise.
8086         * s390-tdep.c: Likewise.
8087         * solib-aix.c: Likewise.
8088         * solib-darwin.c: Likewise.
8089         * solib-dsbt.c: Likewise.
8090         * solib-spu.c: Likewise.
8091         * solib-svr4.c: Likewise.
8092         * solib-target.c: Likewise.
8093         * sparc-tdep.c: Likewise.
8094         * sparc64-tdep.c: Likewise.
8095         * spu-tdep.c: Likewise.
8096         * symfile.c: Likewise.
8097         * symtab.c: Likewise.
8098         * target-descriptions.c: Likewise.
8099         * target-memory.c: Likewise.
8100         * target.c: Likewise.
8101         * target.h: Likewise.
8102         * tracefile-tfile.c: Likewise.
8103         * tracepoint.c: Likewise.
8104         * valops.c: Likewise.
8105         * valprint.c: Likewise.
8106         * value.c: Likewise.
8107         * windows-tdep.c: Likewise.
8108         * mi/mi-main.c: Likewise.
8109
8110 2018-06-07  Tom Tromey  <tom@tromey.com>
8111
8112         * valprint.h (build_address_symbolic): Declare.
8113         * printcmd.c (print_address_symbolic): Update.
8114         (build_address_symbolic): Change "name" and "filename" to
8115         std::string.
8116         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8117         Update.
8118         * defs.h (build_address_symbolic): Remove declaration.
8119
8120 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8121
8122         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8123         (aarch64_vnv_type): Add function.
8124         (aarch64_pseudo_register_name): Add V regs for SVE.
8125         (aarch64_pseudo_register_type): Likewise.
8126         (aarch64_pseudo_register_reggroup_p): Likewise.
8127         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8128         (aarch64_pseudo_read_value): Add V regs for SVE.
8129         (aarch64_pseudo_write_2): Use V0 offset for SVE
8130         (aarch64_pseudo_write): Add V regs for SVE.
8131         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8132
8133 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8134
8135         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8136         (sve_vl_from_vq): Likewise.
8137
8138 2018-06-05  Tom Tromey  <tom@tromey.com>
8139
8140         * cli/cli-cmds.c (show_version): Update.
8141         * top.c (print_gdb_version): Add "interactive" parameter.
8142         Update.
8143         * main.c (captured_main_1): Update.
8144         * top.h (print_gdb_version): Add "interactive" parameter and a
8145         comment.
8146
8147 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8148
8149         * common/enum-flags.h: Add trailing semicolon to example in
8150         comment.
8151
8152 2018-06-05  Tom Tromey  <tom@tromey.com>
8153
8154         PR cli/12326:
8155         * NEWS: Add entry about pager.
8156         * utils.c (pagination_disabled_for_command): New global.
8157         (prompt_for_continue): Allow "c" response to prompt.
8158         (reinitialize_more_filter): Clear
8159         pagination_disabled_for_command.
8160         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8161
8162 2018-06-04  Tom Tromey  <tom@tromey.com>
8163
8164         * ada-lang.h (ada_lookup_symbol_list): Update.
8165         * ada-lang.c (resolve_subexp): Update.
8166         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8167         parameter.
8168         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8169         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8170         results parameter to std::vector.
8171         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8172         Update.
8173         * ada-exp.y (block_lookup): Update.
8174         (select_possible_type_sym): Change type of syms.  Remove nsyms
8175         parameter.
8176         (write_var_or_type, write_name_assoc): Update.
8177
8178 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8179
8180         * windows-nat.c (windows_nat_target::xfer_partial): Return
8181         TARGET_XFER_E_IO if we need to delegate to the target beneath
8182         but BENEATH is NULL.
8183
8184 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8185
8186         * Makefile.in (config.status): Add configure.nat as a
8187         dependency.
8188
8189 2018-06-04  Tom Tromey  <tom@tromey.com>
8190
8191         * cp-name-parser.y (cpname_state): Add method declarations.
8192         (HANDLE_QUAL): Update.
8193         (cpname_state::d_grab, cpname_state::fill_comp)
8194         (cpname_state::make_operator, cpname_state::make_dtor)
8195         (cpname_state::make_builtin_type, cpname_state::make_name)
8196         (cpname_state::d_qualify, cpname_state::d_int_type)
8197         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8198         (%union): Move earlier.
8199
8200 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8201
8202         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8203
8204 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8205
8206         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8207         (aarch64_pseudo_write_1): Likewise.
8208         (aarch64_pseudo_read_value): Use helper.
8209         (aarch64_pseudo_write): Likewise.
8210
8211 2018-06-04  Pedro Alves  <palves@redhat.com>
8212
8213         * darwin-nat.c (darwin_ops): Delete.
8214         (darwin_attach_pid): Use get_native_target.
8215
8216 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8217
8218         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8219         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8220
8221 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8222
8223         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8224         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8225         (aarch64_gdbarch_init): Check for SVE.
8226         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8227
8228 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8229
8230         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8231         * aarch64-tdep.h (aarch64_read_description): Likewise.
8232         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8233         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8234         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8235         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8236         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8237
8238 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8239
8240         * value.c (value_fetch_lazy_bitfield): New.
8241         (value_fetch_lazy_memory): New.
8242         (value_fetch_lazy_register): New.
8243         (value_fetch_lazy): Factor out to smaller functions.
8244
8245 2018-06-01  Tom Tromey  <tom@tromey.com>
8246
8247         * cp-name-parser.y (backslashable, represented): Now const.
8248
8249 2018-06-01  Tom Tromey  <tom@tromey.com>
8250
8251         * cp-name-parser.y: Include parser-defs.h.
8252         (parser_fprintf): Remove declaration.
8253
8254 2018-06-01  Tom Tromey  <tom@tromey.com>
8255
8256         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8257         %parse-param.
8258         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8259         (global_result): Remove globals.
8260         (struct cpname_state): New.
8261         (yyparse): Don't declare.
8262         (yylex, yyerror): Move declarations after %union.
8263         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8264         (make_name): Add state parameter.
8265         Update all callers.
8266         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8267         parameter.
8268         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8269         Update.
8270         (yylex): Add lvalp, state parameters.
8271         (yyerror): Add state parameter.
8272         (cp_demangled_name_to_comp): Update.
8273
8274 2018-06-01  Tom Tromey  <tom@tromey.com>
8275
8276         * cp-name-parser.y (parser_fprintf): Declare.
8277         (GDB_YY_REMAP_PREFIX): Define.
8278         Include yy-remap.h.  Don't redefine yy* identifiers.
8279
8280 2018-06-01  Tom Tromey  <tom@tromey.com>
8281
8282         * python/py-type.c (typy_legacy_template_argument): Update.
8283         * cp-support.h (cp_demangled_name_to_comp): Update.
8284         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8285         parameter to be a "std::string *".
8286         (main): Update.
8287
8288 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8289
8290         * ada-lex.l: Include "diagnostics.h" instead of
8291         "common/diagnostics.h".
8292         * unittests/environ-selftests.c: Likewise.
8293         * common/diagnostics.h: Moved to ../include.
8294
8295 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8296
8297         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8298         to language_mode_manual while calling breakpoint_re_set_one.
8299
8300 2018-06-01  Tom Tromey  <tom@tromey.com>
8301
8302         * valops.c (value_cast_structs, destructor_name_p): Update.
8303         * symtab.c (gdb_mangle_name): Update.
8304         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8305         Update.
8306         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8307         (pascal_object_print_value_fields, pascal_object_print_value):
8308         Update.
8309         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8310         * linespec.c (find_methods): Update.
8311         * gdbtypes.h (type_name_no_tag): Remove.
8312         (type_name_or_error): Rename from type_name_no_tag_or_error.
8313         * gdbtypes.c (type_name_no_tag): Remove.
8314         (type_name_or_error): Rename from type_name_no_tag_or_error.
8315         (lookup_struct_elt_type, check_typedef): Update.
8316         * expprint.c (print_subexp_standard): Update.
8317         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8318         * d-namespace.c (d_lookup_nested_symbol): Update.
8319         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8320         (cp_print_class_member): Update.
8321         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8322         * completer.c (add_struct_fields): Update.
8323         * c-typeprint.c (cp_type_print_derivation_info)
8324         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8325         Update.
8326         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8327         (ada_prefer_type, ada_is_exception_sym): Update.
8328
8329 2018-06-01  Tom Tromey  <tom@tromey.com>
8330
8331         * valops.c (enum_constant_from_type, value_namespace_elt)
8332         (value_maybe_namespace_elt): Update.
8333         * valarith.c (find_size_for_pointer_math): Update.
8334         * target-descriptions.c (make_gdb_type): Update.
8335         * symmisc.c (print_symbol): Update.
8336         * stabsread.c (define_symbol, read_type)
8337         (complain_about_struct_wipeout, add_undefined_type)
8338         (cleanup_undefined_types_1): Update.
8339         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8340         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8341         (rust_internal_print_type, rust_composite_type)
8342         (rust_evaluate_funcall, rust_evaluate_subexp)
8343         (rust_inclusive_range_type_p): Update.
8344         * python/py-type.c (typy_get_tag): Update.
8345         * p-typeprint.c (pascal_type_print_base): Update.
8346         * mdebugread.c (parse_symbol, parse_type): Update.
8347         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8348         Update.
8349         * guile/scm-type.c (gdbscm_type_tag): Update.
8350         * go-lang.c (sixg_string_p): Update.
8351         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8352         Update.
8353         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8354         (TYPE_TAG_NAME): Remove.
8355         * gdbtypes.c (type_name_no_tag): Simplify.
8356         (check_typedef, check_types_equal, recursive_dump_type)
8357         (copy_type_recursive, arch_composite_type): Update.
8358         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8359         in summary mode when needed.
8360         * eval.c (evaluate_funcall): Update.
8361         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8362         (process_structure_scope, read_enumeration_type)
8363         (read_namespace_type, read_module_type, determine_prefix): Update.
8364         * cp-support.c (inspect_type): Update.
8365         * coffread.c (process_coff_symbol, decode_base_type): Update.
8366         * c-varobj.c (c_is_path_expr_parent): Update.
8367         * c-typeprint.c (c_type_print_base_struct_union): Update.
8368         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8369         summary when using C language.
8370         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8371         (gen_maybe_namespace_elt): Update.
8372         * ada-lang.c (ada_type_name): Simplify.
8373         (empty_record, ada_template_to_fixed_record_type_1)
8374         (template_to_static_fixed_type)
8375         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8376
8377 2018-06-01  Tom Tromey  <tom@tromey.com>
8378
8379         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8380         c_print_type.
8381         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8382         (c_print_type): Update.
8383         (c_print_type): New overload.
8384         (c_type_print_varspec_prefix, c_type_print_args)
8385         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8386         (c_type_print_base_struct_union, c_type_print_base_1)
8387         (cp_type_print_method_args): Add "language" parameter.
8388         (c_type_print_base): Update.
8389         * c-lang.h (c_print_type): Add new overload.
8390
8391 2018-06-01  Tom Tromey  <tom@tromey.com>
8392
8393         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8394         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8395
8396 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8397
8398         * aarch64-tdep.c (aarch64_sve_register_names): New const
8399         var.
8400         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8401         (AARCH64_SVE_Z_REGS_NUM): New define.
8402         (AARCH64_SVE_P_REGS_NUM): Likewise.
8403         (AARCH64_SVE_NUM_REGS): Likewise.
8404
8405 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8406
8407         * nat/linux-ptrace.h [__alpha__]
8408         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8409         definitions.
8410
8411 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8412
8413         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8414         the endianness selected.
8415         * NEWS: Document `set endian auto' mode operation update.
8416
8417 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8418
8419         * Makefile.in: Add new header.
8420         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8421         (sve_vl_from_vg): Likewise.
8422         (sve_vq_from_vl): Likewise.
8423         (sve_vl_from_vq): Likewise.
8424         (sve_vq_from_vg): Likewise.
8425         (sve_vg_from_vq): Likewise.
8426         * configure.nat: Add new c file.
8427         * nat/aarch64-sve-linux-ptrace.c: New file.
8428         * nat/aarch64-sve-linux-ptrace.h: New file.
8429
8430 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8431
8432         * aarch64-linux-nat.c (aarch64_linux_read_description):
8433         Add parmeter zero.
8434         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8435         Likewise.
8436         * aarch64-tdep.c (tdesc_aarch64_list): Add.
8437         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8438         (aarch64_gdbarch_init): Add parmeter zero.
8439         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8440         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8441         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8442         parmeter.
8443         * doc/gdb.texinfo: Describe SVE feature
8444         * features/aarch64-sve.c: New file.
8445
8446 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
8447
8448         PR gdb/23210
8449         * gdbarch.sh (significant_addr_bit): Default to zero when
8450         not set by target architecture.
8451         * gdbarch.c: Re-generated.
8452         * utils.c (address_significant): Update.
8453
8454 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
8455
8456         * stack.c (func_command): Remove trailing newline in call to error.
8457
8458 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8459
8460         * regcache.h (regcache_raw_collect): Remove, update callers to
8461         use regcache::raw_collect.
8462         * regcache.c (regcache_raw_collect): Remove.
8463
8464 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8465
8466         * regcache.h (regcache_raw_supply): Remove, update callers to
8467         use detached_regcache::raw_supply.
8468         * regcache.c (regcache_raw_supply): Remove.
8469
8470 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8471
8472         * regcache.h (regcache_cooked_write_part): Remove, update
8473         callers to use regcache::cooked_write_part.
8474         * regcache.c (regcache_cooked_write_part): Remove.
8475
8476 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8477
8478         * regcache.h (regcache_cooked_read_part): Remove, update callers
8479         to use readable_regcache::cooked_read_part.
8480         * regcache.c (regcache_cooked_read_part): Remove.
8481
8482 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8483
8484         * regcache.h (regcache_cooked_read_value): Remove, update
8485         callers to use readable_regcache::cooked_read_value.
8486         * regcache.c (regcache_cooked_read_value): Remove.
8487
8488 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8489
8490         * regcache.h (regcache_cooked_write): Remove, update callers to
8491         use regcache::cooked_write.
8492         * regcache.c (regcache_cooked_write): Remove.
8493
8494 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8495
8496         * regcache.h (regcache_invalidate): Remove, update callers to
8497         use detached_regcache::invalidate instead.
8498         * regcache.c (regcache_invalidate): Remove.
8499
8500 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8501
8502         * regcache.h (regcache_raw_write_part): Remove, update callers
8503         to use regcache::raw_write_part instead.
8504         * regcache.c (regcache_raw_write_part): Remove.
8505
8506 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8507
8508         * regcache.h (regcache_raw_read_part): Remove, update callers to
8509         use readable_regcache::raw_read_part instead.
8510         * regcache.c (regcache_raw_read_part): Remove.
8511
8512 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8513
8514         * regcache.h (regcache_cooked_read): Remove, update callers to
8515         use readable_regcache::cooked_read instead.
8516         * regcache.c (regcache_cooked_read): Remove.
8517
8518 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8519
8520         * regcache.h (regcache_raw_write): Remove, update callers to use
8521         regcache::raw_write instead.
8522         * regcache.c (regcache_raw_write): Remove.
8523
8524 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8525
8526         * regcache.h (regcache_raw_read): Remove, update callers to use
8527         readable_regcache::raw_read instead.
8528         * regcache.c (regcache_raw_read): Remove.
8529
8530 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8531
8532         * regcache.h (regcache_raw_update): Remove, update callers to
8533         use readable_regcache::raw_update instead.
8534         * regcache.c (regcache_raw_update): Remove.
8535
8536 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8537
8538         * regcache.h (regcache_register_status): Remove, update callers
8539         to use reg_buffer::get_register_status directly instead.
8540         * regcache.c (regcache_register_status): Remove.
8541
8542 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8543
8544         * regcache.h (regcache_get_ptid): Remove, update all callers to
8545         call regcache::ptid instead.
8546         * regcache.c (regcache_get_ptid): Remove.
8547
8548 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8549
8550         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
8551
8552 2018-05-30  Pedro Alves  <palves@redhat.com>
8553
8554         * common/common-exceptions.h (exception_rethrow): Use
8555         ATTRIBUTE_NORETURN.
8556
8557 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
8558
8559         * breakpoint.c (print_solib_event, check_status_catch_solib):
8560         Remove struct keyword in range-based for loops.
8561         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
8562         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
8563         Likewise.
8564         * linespec.c (find_superclass_methods, search_minsyms_for_name):
8565         Likewise.
8566         * symfile.c (addr_info_make_relative): Likewise.
8567         * thread.c (value_in_thread_stack_temporaries): Likewise.
8568
8569 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
8570
8571         PR gdb/16841
8572         * valops.c (value_struct_elt_for_reference): Call check_typedef on
8573         aggregate type to get its real type before accessing it.
8574
8575 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
8576
8577         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
8578         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
8579         * coff-pe-read.c (add_pe_forwarded_sym): Replace
8580         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
8581         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
8582         * jit.c (jit_breakpoint_re_set_internal): Likewise.
8583         * printcmd.c (info_address_command): Likewise.
8584
8585 2018-05-29  Tom Tromey  <tom@tromey.com>
8586
8587         * windows-nat.c (handle_exception): Update fall-through comment.
8588
8589 2018-05-29  Tom Tromey  <tom@tromey.com>
8590
8591         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
8592         (struct program_space) <added_solibs>: Now a std::vector.
8593         * breakpoint.c (print_solib_event): Update.
8594         (check_status_catch_solib): Update.
8595         * progspace.c (clear_program_space_solib_cache): Update.
8596         * solib.c (update_solib_list): Update.
8597
8598 2018-05-29  Tom Tromey  <tom@tromey.com>
8599
8600         * python/py-type.c (typy_richcompare): Update.
8601         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
8602         * gdbtypes.h (types_deeply_equal): Return bool.
8603         (types_equal): Likewise.
8604         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
8605         declare VEC.
8606         (check_types_equal): Change worklist to std::vector.  Return
8607         bool.
8608         (struct type_equality_entry): Add constructor.
8609         (compare_maybe_null_strings): Return bool.
8610         (check_types_worklist): Return bool.  Change worklist to
8611         std::vector.
8612         (types_deeply_equal): Use std::vector.
8613         (types_equal): Return bool.
8614         (compare_maybe_null_strings): Simplify.
8615
8616 2018-05-29  Tom Tromey  <tom@tromey.com>
8617
8618         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
8619
8620 2018-05-29  Tom Tromey  <tom@tromey.com>
8621
8622         * objc-lang.h: Don't include cp-support.h.
8623         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
8624         declare VEC.
8625
8626 2018-05-27  Tom Tromey  <tom@tromey.com>
8627
8628         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
8629
8630 2018-05-25  Tom Tromey  <tom@tromey.com>
8631
8632         * value.c (value::location): Initialize.
8633
8634 2018-05-25  Tom Tromey  <tom@tromey.com>
8635
8636         * dbxread.c (init_bincl_list): Remove.
8637         (bincl_list): Now a std::vector.
8638         (bincls_allocated, next_bincl): Remove.
8639         (free_bincl_list, do_free_bincl_list_cleanup)
8640         (make_cleanup_free_bincl_list): Remove.
8641         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
8642         unique_xmalloc_ptr.
8643         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
8644         (struct header_file_location): Add constructor.
8645         (add_bincl_to_list): Remove.
8646
8647 2018-05-25  Tom Tromey  <tom@tromey.com>
8648
8649         * tui/tui.c (tui_enable): Update.
8650         * mi/mi-interp.c (mi_interp::init): Update.
8651         * interps.h (class interp) <name>: New method.
8652         <m_name>: Rename from name.
8653         (~scoped_restore_interp): Update.
8654         * interps.c (interp::interp): Update.
8655         (interp_add, interp_set, interp_lookup_existing)
8656         (current_interp_named_p): Update.
8657
8658 2018-05-25  Tom Tromey  <tom@tromey.com>
8659
8660         * interps.c (interp_name): Remove.
8661         * mi/mi-interp.c (mi_interp::init): Update.
8662         * interps.h (interp_name): Remove.
8663         (~scoped_restore_interp): Update.
8664         * tui/tui.c (tui_enable): Update.
8665
8666 2018-05-25  Tom Tromey  <tom@tromey.com>
8667
8668         * utils.c (fputs_maybe_filtered): Update.
8669         * linespec.c (decode_line_full): Update.
8670         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
8671         (mi_print_breakpoint_for_event, mi_solib_loaded)
8672         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
8673         (mi_user_selected_context_changed): Update.
8674         * mi/mi-main.c (mi_execute_command): Update.
8675         * cli/cli-script.c (execute_control_command): Update.
8676         * python/python.c (execute_gdb_command): Update.
8677         * solib.c (info_sharedlibrary_command): Update.
8678         * interps.c (interp_ui_out): Remove.
8679         * interps.h (interp_ui_out): Remove.
8680
8681 2018-05-25  Tom Tromey  <tom@tromey.com>
8682
8683         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
8684         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
8685         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
8686
8687 2018-05-25  Tom Tromey  <tom@tromey.com>
8688
8689         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
8690         * interps.c (interp_exec): Use scoped_restore.
8691
8692 2018-05-25  Tom Tromey  <tom@tromey.com>
8693
8694         * remote.c (remote_target::remote_file_get): Use
8695         gdb::byte_vector.
8696         (remote_target::remote_file_put): Likewise.
8697
8698 2018-05-25  Tom Tromey  <tom@tromey.com>
8699
8700         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
8701         a std::string.
8702         (get_pe_section_index, add_pe_exported_sym): Update.
8703         (read_pe_exported_syms): Use gdb::def_vector.
8704
8705 2018-05-25  Tom Tromey  <tom@tromey.com>
8706
8707         * frame.c (remove_prev_frame): Remove.
8708         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
8709
8710 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
8711
8712         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
8713         Remove prototypes.
8714         * mips-linux-nat.c (supply_fpregset): Always call
8715         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
8716         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
8717         `mips_fill_fpregset'.
8718         * mips-linux-tdep.c (mips_supply_fpregset)
8719         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
8720         (mips_fill_fpregset_wrapper): Remove functions.
8721         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
8722         (mips_linux_fpregset): Remove variable.
8723         (mips_linux_iterate_over_regset_sections): Use
8724         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
8725         (mips_linux_o32_sigframe_init): Remove comment.
8726
8727 2018-05-25  Pedro Alves  <palves@redhat.com>
8728
8729         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
8730         (struct readahead_cache, struct packet_reg, struct
8731         remote_arch_state, class remote_state): Move higher up in the
8732         file.
8733         (remote_target::m_remote_state): Now an object instead of a pointer.
8734         (remote_target::get_remote_state): Adjust.
8735
8736 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8737
8738         * stack.c (select_and_print_frame): Delete.
8739         (struct function_bounds): Move struct within function.
8740         (func_command): Most content moved into new function
8741         find_frame_for_function, use new function, print result, add
8742         function comment.
8743         (find_frame_for_function): New function, now returns a result.
8744
8745 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8746
8747         * stack.c (iterate_over_block_arg_vars): Fix comment.
8748         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
8749
8750 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8751
8752         PR gdb/23203
8753         * frame.c
8754         (scoped_restore_selected_frame::scoped_restore_selected_frame):
8755         Define.
8756         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8757         Define.
8758         * frame.h (class scoped_restore_selected_frame): New class.
8759         * stack.c (print_frame_local_vars): Remove catching and rethrowing
8760         of any exception, use scoped_restore_selected_frame to restore the
8761         frame instead.
8762
8763 2018-05-24  Pedro Alves  <palves@redhat.com>
8764
8765         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8766         override.
8767
8768 2018-05-23  Tom Tromey  <tom@tromey.com>
8769
8770         * complaints.c (struct complaints): Remove.
8771         (symfile_complaint_book): Remove.
8772         (series): New global.
8773         (complaint_internal): Update.
8774         (clear_complaints): Update.
8775
8776 2018-05-23  Tom Tromey  <tom@tromey.com>
8777
8778         * complaints.c (counters): New global.
8779         (struct complain): Remove.
8780         (struct complaints) <root>: Remove.
8781         (complaint_sentinel): Remove.
8782         (symfile_complaint_book): Update.
8783         (find_complaint) Remove.
8784         (complaint_internal, clear_complaints): Update.
8785
8786 2018-05-23  Tom Tromey  <tom@tromey.com>
8787
8788         * complaints.c (struct complain) <file, line>: Remove.
8789         (find_complaint): Remove file, line parameters.
8790         (complaint_internal): Update.
8791
8792 2018-05-23  Tom Tromey  <tom@tromey.com>
8793
8794         * complaints.c (vcomplaint): Remove.
8795         (complaint_internal) Merge in contents of vcomplaint.
8796
8797 2018-05-23  Tom Tromey  <tom@tromey.com>
8798
8799         * complaints.c (struct complaints) <explanation>: Remove.
8800         (symfile_explanations): Remove.
8801         (symfile_complaint_book): Update.
8802         (vcomplaint): Update.
8803         (struct explanation): Remove.
8804
8805 2018-05-23  Tom Tromey  <tom@tromey.com>
8806
8807         * complaints.c (symfile_complaints): Remove.
8808         (complaint_internal): Remove "complaints" parameter.
8809         (clear_complaints, vcomplaint): Remove "c" parameter.
8810         (get_complaints): Remove.
8811         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8812         (dwarf2_debug_line_missing_file_complaint)
8813         (dwarf2_debug_line_missing_end_sequence_complaint)
8814         (dwarf2_complex_location_expr_complaint)
8815         (dwarf2_const_value_length_mismatch_complaint)
8816         (dwarf2_section_buffer_overflow_complaint)
8817         (dwarf2_macro_malformed_definition_complaint)
8818         (dwarf2_invalid_attrib_class_complaint)
8819         (create_addrmap_from_index, dw2_symtab_iter_next)
8820         (dw2_expand_marked_cus)
8821         (dw2_debug_names_iterator::find_vec_in_debug_names)
8822         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8823         (create_debug_type_hash_table, init_cutu_and_read_dies)
8824         (partial_die_parent_scope, add_partial_enumeration)
8825         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8826         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8827         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8828         (create_cus_hash_table, create_dwp_hash_table)
8829         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8830         (dwarf2_rnglists_process, dwarf2_ranges_process)
8831         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8832         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8833         (handle_struct_member_die, process_structure_scope)
8834         (read_array_type, read_common_block, read_module_type)
8835         (read_tag_pointer_type, read_typedef, read_base_type)
8836         (read_subrange_type, load_partial_dies, partial_die_info::read)
8837         (partial_die_info::read, partial_die_info::read)
8838         (partial_die_info::read, read_checked_initial_length_and_offset)
8839         (dwarf2_string_attr, read_formatted_entries)
8840         (dwarf_decode_line_header)
8841         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8842         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8843         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8844         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8845         (get_signatured_type, get_DW_AT_signature_type)
8846         (decode_locdesc, file_file_name, consume_improper_spaces)
8847         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8848         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8849         (dwarf2_symbol_mark_computed, set_die_type)
8850         (read_attribute_value): Update.
8851         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8852         Update.
8853         * dbxread.c (unknown_symtype_complaint)
8854         (lbrac_mismatch_complaint, repeated_header_complaint)
8855         (set_namestring, function_outside_compilation_unit_complaint)
8856         (read_dbx_symtab, process_one_symbol): Update.
8857         * gdbtypes.c (stub_noname_complaint): Update.
8858         * windows-nat.c (handle_unload_dll): Update.
8859         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8860         (decode_base_type): Update.
8861         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8862         (eb_complaint, record_include_begin, record_include_end)
8863         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8864         (process_xcoff_symbol, read_symbol)
8865         (function_outside_compilation_unit_complaint)
8866         (scan_xcoff_symtab): Update.
8867         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8868         * buildsym.c (finish_block_internal, make_blockvector)
8869         (end_symtab_get_static_block, augment_type_symtab): Update.
8870         * dtrace-probe.c (dtrace_process_dof)
8871         (dtrace_static_probe_ops::get_probes): Update.
8872         * complaints.h (struct complaint): Don't declare.
8873         (symfile_complaints): Remove.
8874         (complaint_internal): Remove "complaints" parameter.
8875         (complaint): Likewise.
8876         (clear_complaints): Likewise.
8877         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8878         (reread_symbols): Update.
8879         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8880         (dwarf2_frame_cache, decode_frame_entry): Update.
8881         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8882         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8883         (info_selectors_command): Update.
8884         * macrotab.c (macro_include, check_for_redefinition)
8885         (macro_undef): Update.
8886         * objfiles.c (filter_overlapping_sections): Update.
8887         * stabsread.c (invalid_cpp_abbrev_complaint)
8888         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8889         (define_symbol, error_type, read_type, rs6000_builtin_type)
8890         (stabs_method_name_from_physname, read_member_functions)
8891         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8892         (attach_fields_to_type, complain_about_struct_wipeout)
8893         (read_range_type, read_args, common_block_start)
8894         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8895         Update.
8896         * mdebugread.c (index_complaint, unknown_ext_complaint)
8897         (basic_type_complaint, bad_tag_guess_complaint)
8898         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8899         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8900         (parse_procedure, parse_lines)
8901         (function_outside_compilation_unit_complaint)
8902         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8903         (bad_tag_guess_complaint, reg_value_complaint): Update.
8904         * cp-support.c (demangled_name_complaint): Update.
8905         * macroscope.c (sal_macro_scope): Update.
8906         * dwarf-index-write.c (class debug_names): Update.
8907
8908 2018-05-23  Tom Tromey  <tom@tromey.com>
8909
8910         * complaints.c (clear_complaints): Remove "noisy" parameter.
8911         * complaints.h (clear_complaints): Update.
8912         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8913         (reread_symbols): Update.
8914
8915 2018-05-23  Tom Tromey  <tom@tromey.com>
8916
8917         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8918         SUBSEQUENT_MESSAGE.
8919         (vcomplaint, clear_complaints): Update.
8920         (symfile_explanations): Remove some messages.
8921
8922 2018-05-23  Tom Tromey  <tom@tromey.com>
8923
8924         * complaints.c (internal_complaint): Remove.
8925         * complaints.h (internal_complaint): Remove.
8926
8927 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8928
8929         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8930
8931 2018-05-22  Pedro Alves  <palves@redhat.com>
8932
8933         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8934         (remote_fileio_badfd, remote_fileio_return_errno)
8935         (remote_fileio_return_success, remote_fileio_func_open)
8936         (remote_fileio_func_open, remote_fileio_func_close)
8937         (remote_fileio_func_read, remote_fileio_func_write)
8938         (remote_fileio_func_lseek, remote_fileio_func_rename)
8939         (remote_fileio_func_unlink, remote_fileio_func_stat)
8940         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8941         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8942         remote_target parameter.
8943         (remote_fio_func_map) <func>: Add remote_target parameter.
8944         (do_remote_fileio_request, remote_fileio_request):
8945         * remote-fileio.h (remote_fileio_request):
8946         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8947         remote_target parameter.
8948         (remote_notif_process, handle_notification): Adjust to pass down
8949         the remote.
8950         (remote_notif_state_allocate): Add remote_target parameter.  Save
8951         it.
8952         * remote-notif.h (struct remote_target): Forward declare.
8953         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8954         remote_target parameter.
8955         (struct remote_notif_state) <remote>: New field.
8956         (remote_notif_ack, remote_notif_parse): Add remote_target
8957         parameter.
8958         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8959         remote_target parameter.
8960         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8961         (threads_listing_context, rmt_thread_action, protocol_feature)
8962         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8963         (packet_result, struct threads_listing_context, remote_state):
8964         Move definitions and declarations higher up.
8965         (remote_target) <~remote_target>: Declare.
8966         (remote_download_command_source, remote_file_put, remote_file_get)
8967         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8968         (remote_hostio_pread_vFile, remote_hostio_send_command)
8969         (remote_hostio_set_filesystem, remote_hostio_open)
8970         (remote_hostio_close, remote_hostio_unlink, remote_state)
8971         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8972         (get_memory_write_packet_size, get_memory_read_packet_size)
8973         (append_pending_thread_resumptions, remote_detach_1)
8974         (append_resumption, remote_resume_with_vcont)
8975         (add_current_inferior_and_thread, wait_ns, wait_as)
8976         (process_stop_reply, remote_notice_new_inferior)
8977         (process_initial_stop_replies, remote_add_thread)
8978         (btrace_sync_conf, remote_btrace_maybe_reopen)
8979         (remove_new_fork_children, kill_new_fork_children)
8980         (discard_pending_stop_replies, stop_reply_queue_length)
8981         (check_pending_events_prevent_wildcard_vcont)
8982         (discard_pending_stop_replies_in_queue, stop_reply)
8983         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8984         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8985         (remote_interrupt_as, remote_interrupt_ns)
8986         (remote_get_noisy_reply, remote_query_attached)
8987         (remote_add_inferior, remote_current_thread, get_current_thread)
8988         (set_thread, set_general_thread, set_continue_thread)
8989         (set_general_process, write_ptid)
8990         (remote_unpack_thread_info_response, remote_get_threadinfo)
8991         (parse_threadlist_response, remote_get_threadlist)
8992         (remote_threadlist_iterator, remote_get_threads_with_ql)
8993         (remote_get_threads_with_qxfer)
8994         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8995         (get_offsets, remote_check_symbols, remote_supported_packet)
8996         (remote_query_supported, remote_packet_size)
8997         (remote_serial_quit_handler, remote_detach_pid)
8998         (remote_vcont_probe, remote_resume_with_hc)
8999         (send_interrupt_sequence, interrupt_query)
9000         (remote_notif_get_pending_events, fetch_register_using_p)
9001         (send_g_packet, process_g_packet, fetch_registers_using_g)
9002         (store_register_using_P, store_registers_using_G)
9003         (set_remote_traceframe, check_binary_download)
9004         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9005         (remote_xfer_live_readonly_partial, remote_read_bytes)
9006         (remote_send_printf, remote_flash_write, readchar)
9007         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9008         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9009         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9010         (extended_remote_disable_randomization, extended_remote_run)
9011         (send_environment_packet, extended_remote_environment_support)
9012         (extended_remote_set_inferior_cwd, remote_write_qxfer)
9013         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9014         (packet_command): Now methods of ...
9015         (remote_target): ... this class.
9016         (m_remote_state) <remote_target>: New field.
9017         (struct remote_state) <stop_reply_queue,
9018         remote_async_inferior_event_token, wait_forever_enabled_p>: New
9019         fields.
9020         (remote_state::remote_state): Allocate stop_reply_queue.
9021         (remote_state): Delete global.
9022         (get_remote_state_raw): Delete.
9023         (remote_target::get_remote_state): Allocate m_remote_state on
9024         demand.
9025         (get_current_remote_target): New.
9026         (remote_ops, extended_remote_ops): Delete.
9027         (wait_forever_enabled_p, remote_async_inferior_event_token):
9028         Delete, moved to struct remote_state.
9029         (remote_target::close): Delete self.  Destruction bits split to
9030         ...
9031         (remote_target::~remote_target): ... this.
9032         (show_memory_packet_size): Adjust to use
9033         get_current_remote_target.
9034         (struct protocol_feature) <func>: Add remote_target parameter.
9035         All callers adjusted.
9036         (curr_quit_handler_target): New.
9037         (remote_serial_quit_handler): Reimplement.
9038         (remote_target::open_1): Adjust to use get_current_remote_target.
9039         Heap-allocate remote_target/extended_remote_target instances.
9040         (vcont_builder::vcont_builder): Add remote_target parameter, and
9041         save it in m_remote.  All callers adjusted.
9042         (vcont_builder::m_remote): New field.
9043         (vcont_builder::restart, vcont_builder::flush)
9044         (vcont_builder::push_action): Use it.
9045         (remote_target::commit_resume): Use it.
9046         (struct queue_iter_param) <remote>: New field.
9047         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9048         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9049         (check_pending_event_prevents_wildcard_vcont_callback)
9050         (remote_target::check_pending_events_prevent_wildcard_vcont)
9051         (remote_target::discard_pending_stop_replies)
9052         (remote_target::discard_pending_stop_replies_in_queue)
9053         (remote_target::remote_notif_remove_queued_reply): Fill in
9054         'remote' field.
9055         (remote_notif_get_pending_events): New.
9056         (remote_target::readchar, remote_target::remote_serial_write):
9057         Save/restore curr_quit_handler_target.
9058         (putpkt): New.
9059         (kill_new_fork_children): Fill in 'remote' field.
9060         (packet_command): Use get_current_remote_target, defer to
9061         remote_target method of same name.
9062         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9063         parameter, and save it in m_remote.  All callers adjusted.
9064         (scoped_remote_fd::release): Use m_remote.
9065         (scoped_remote_fd::m_remote): New field.
9066         (remote_file_put, remote_file_get, remote_file_delete): Use
9067         get_current_remote_target, defer to remote_target method of same
9068         name.
9069         (remote_btrace_reset): Add remote_state paremeter.  Update all
9070         callers.
9071         (remote_async_inferior_event_handler). Pass down 'data'.
9072         (remote_new_objfile): Use get_current_remote_target.
9073         (remote_target::vcont_r_supported): New.
9074         (set_range_stepping): Use get_current_remote_target and
9075         remote_target::vcont_r_supported.
9076         (_initialize_remote): Don't allocate 'remote_state' and
9077         'stop_reply_queue' globals.
9078         * remote.h (struct remote_target): Forward declare.
9079         (getpkt, putpkt, remote_notif_get_pending_events): Add
9080         'remote_target' parameter.
9081
9082 2018-05-22  Pedro Alves  <palves@redhat.com>
9083
9084         * remote.c (vcont_builder): Now a class.  Make all data members
9085         private.
9086         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9087         Declare methods.
9088         (vcont_builder_restart): Rename to ...
9089         (vcont_builder::restart): ... this.
9090         (vcont_builder_flush): Rename to ...
9091         (vcont_builder::flush): ... this.
9092         (vcont_builder_push_action): Rename to ...
9093         (vcont_builder::push_action): ... this.
9094         (remote_target::commit_resume): Adjust.
9095
9096 2018-05-22  Pedro Alves  <palves@redhat.com>
9097
9098         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9099         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9100         (get_fixed_memory_packet_size): New.
9101         (get_memory_packet_size): Use it.
9102         (set_memory_packet_size): Don't override the config size with
9103         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9104         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9105         Don't refer to get_memory_packet_size if not connected to a remote
9106         target.  Show "(default)" if configured size is 0.
9107
9108 2018-05-22  Pedro Alves  <palves@redhat.com>
9109
9110         * remote.c (remote_target::mourn_inferior): Move
9111         discard_pending_stop_replies call here from ...
9112         (_initialize_remote): ... here.
9113
9114 2018-05-22  Pedro Alves  <palves@redhat.com>
9115
9116         * remote.c (compare_section_command): Remove set_general_process
9117         call.
9118
9119 2018-05-22  Pedro Alves  <palves@redhat.com>
9120
9121         * remote.c (struct packet_reg, struct remote_arch_state):
9122         Move higher up in the file.
9123         (remote_state) <m_arch_states>: Store remote_arch_state values
9124         instead of remote_arch_state pointers.
9125         (remote_state::get_remote_arch_state): Adjust.
9126
9127 2018-05-22  Pedro Alves  <palves@redhat.com>
9128
9129         * remote.c: Include <unordered_map>.
9130         (remote_state): Now a class.
9131         (remote_state) <get_remote_arch_state>: Declare method.
9132         <get_remote_arch_state>: New field.
9133         (remote_arch_state) <remote_arch_state>: Declare ctor.
9134         <regs>: Now a unique_ptr.
9135         (remote_gdbarch_data_handle): Delete.
9136         (get_remote_arch_state): Delete.
9137         (remote_state::get_remote_arch_state): New.
9138         (get_remote_state): Adjust to call remote_state's
9139         get_remote_arch_state method.
9140         (init_remote_state): Delete, bits factored out to ...
9141         (remote_arch_state::remote_arch_state): ... this new method.
9142         (get_remote_packet_size, get_memory_packet_size)
9143         (process_g_packet, remote_target::fetch_registers)
9144         (remote_target::prepare_to_store, store_registers_using_G)
9145         (remote_target::store_registers, remote_target::get_trace_status):
9146         Adjust to call remote_state's method.
9147         (_initialize_remote): Remove reference to
9148         remote_gdbarch_data_handle.
9149
9150 2018-05-22  Pedro Alves  <palves@redhat.com>
9151
9152         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9153         pread>: New method declarations.
9154         (remote_target::open_1): Adjust.
9155         (readahead_cache_invalidate): Rename to ...
9156         (readahead_cache::invalidate): ... this, and adjust to be a class
9157         method.
9158         (readahead_cache_invalidate_fd): Rename to ...
9159         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9160         class method.
9161         (remote_hostio_pwrite): Adjust.
9162         (remote_hostio_pread_from_cache): Rename to ...
9163         (readahead_cache::pread): ... this, and adjust to be a class
9164         method.
9165         (remote_hostio_close): Adjust.
9166
9167 2018-05-22  Pedro Alves  <palves@redhat.com>
9168
9169         * remote.c (remote_hostio_close_cleanup): Delete.
9170         (class scoped_remote_fd): New.
9171         (remote_file_put, remote_file_get): Use it.
9172
9173 2018-05-22  Pedro Alves  <palves@redhat.com>
9174
9175         (struct vCont_action_support): Use bool and initialize all fields.
9176         (struct readahead_cache): Initialize all fields.
9177         (remote_state): Use bool and initialize all fields.
9178         (remote_state::remote_state, remote_state::~remote_state): New.
9179         (new_remote_state): Delete.
9180         (_initialize_remote): Use new to allocate remote_state.
9181
9182 2018-05-22  Pedro Alves  <palves@redhat.com>
9183             張俊芝  <zjz@zjz.name>
9184
9185         PR gdb/22973
9186         * c-exp.y: Include "c-support.h".
9187         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9188         of tolower.  Use c_ident_is_alpha to scan names.
9189         * c-lang.c: Include "c-support.h".
9190         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9191         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9192         * c-support.h: New file, with bits factored out from ...
9193         * cp-name-parser.y: ... this file.
9194         Include "c-support.h".
9195         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9196         c-support.h and renamed.
9197         (symbol_end, yylex): Adjust.
9198
9199 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9200
9201         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9202         parameter type to CORE_ADDR.
9203         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9204         parameter type in declaration to CORE_ADDR.
9205         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9206         target_auxv_search to get AT_HWCAP and use the result to get the
9207         target description.
9208         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9209         to CORE_ADDR. Remove the cast of the return value to unsigned
9210         long. Fix error predicate of target_auxv_search.
9211         (ppc_linux_nat_target::read_description): Change the type of the
9212         hwcap variable to CORE_ADDR.
9213
9214 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9215
9216         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9217         if the size of fpscr is larger than 32 bits.
9218
9219 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9220
9221         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9222         (ppc32_linux_vsxregmap): New global.
9223         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9224         regcache_supply_regset, and regcache_collect_regset.
9225         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9226         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9227         (fetch_vsx_register, store_vsx_register): Remove.
9228         (fetch_vsx_registers): Add regno parameter. Get regset using
9229         ppc_linux_vsxregset. Use regset to supply registers.
9230         (store_vsx_registers): Add regno parameter. Get regset using
9231         ppc_linux_vsxregset. Use regset to collect registers.
9232         (fetch_register): Call fetch_vsx_registers instead of
9233         fetch_vsx_register.
9234         (store_register): Call store_vsx_registers instead of
9235         store_vsx_register.
9236         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9237         new regno parameter.
9238         (store_ppc_registers): Call store_vsx_registers with -1 for the
9239         new regno parameter.
9240         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9241         (ppc_collect_vsxregset): Remove.
9242
9243 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9244
9245         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9246         offset fields.
9247         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9248         for vector register offset fields.
9249         (ppc64_fbsd_reg_offsets): Likewise.
9250         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9251         to vector register offset fields.
9252         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9253         to vector register offset fields.
9254         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9255         vector register offset fields.
9256         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9257         initializers for vector register offset fields.
9258         (rs6000_aix64_reg_offsets): Likewise.
9259         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9260         (ppc_supply_vrregset): Remove.
9261         (ppc_collect_vrregset): Remove.
9262         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9263         (ppc_linux_vrregset) : New function.
9264         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9265         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9266         (ppc32_linux_vrregset): Remove.
9267         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9268         and use result instead of ppc32_linux_vrregset.
9269         (ppc32_linux_reg_offsets): Remove initializers for vector register
9270         offset fields.
9271         (ppc64_linux_reg_offsets): Likewise.
9272         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9273         * ppc-linux-nat.c: Include regset.h.
9274         (gdb_vrregset_t): Adjust comment to account for little-endian
9275         mode.
9276         (supply_vrregset, fill_vrregset): Remove.
9277         (fetch_altivec_register, store_altivec_register): Remove.
9278         (fetch_altivec_registers): Add regno parameter. Get regset using
9279         ppc_linux_vrregset. Use regset to supply registers.
9280         (store_altivec_registers): Add regno parameter. Get regset using
9281         ppc_linux_vrregset. Use regset to collect registers.
9282         (fetch_register): Call fetch_altivec_registers instead of
9283         fetch_altivec_register.
9284         (store_register): Call store_altivec_registers instead of
9285         store_altivec_register.
9286         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9287         the new regno parameter.
9288         (store_ppc_registers): Call store_altivec_registers with -1 for
9289         the new regno parameter.
9290
9291 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9292
9293         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9294         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9295         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9296         (gdb_vrregset_t): Change array type size to
9297         PPC_LINUX_SIZEOF_VRREGSET.
9298         (gdb_vsxregset_t): Change array type size to
9299         PPC_LINUX_SIZEOF_VSXREGSET.
9300         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9301         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9302         PPC_LINUX_SIZEOF_VSXREGSET.
9303
9304 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9305
9306         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9307         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9308         nat/ppc-linux.c.
9309         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9310         ppc_linux_target_wordsize with tid.
9311         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9312         wordsize with tid.
9313         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9314         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9315         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9316         tid parameter. Remove static specifier.
9317         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9318         (ppc_linux_target_wordsize): New declaration.
9319
9320 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9321
9322         * arch/ppc-linux-common.c: New file.
9323         * arch/ppc-linux-common.h: New file.
9324         * arch/ppc-linux-tdesc.h: New file.
9325         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9326         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9327         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9328         arch/ppc-linux-tdesc.h.
9329         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9330         arch/ppc-linux-tdesc.h.
9331         (ppc_linux_nat_target::read_description): Remove target
9332         description matching code. Fill a ppc_linux_features struct and
9333         call ppc_linux_match_description with it. Move comment about ISA
9334         2.05 to ppc-linux-common.c.
9335         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9336         arch/ppc-linux-tdesc.h.
9337         (ppc_linux_core_read_description): Remove target description
9338         matching code. Fill a ppc_linux_features struct and call
9339         ppc_linux_match_description with it.
9340         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9341         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9342         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9343         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9344         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9345         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9346         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9347         (tdesc_powerpc_e500l): Remove.
9348
9349 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9350
9351         * ada-lang.c (catch_assert_command): Pass empty string instead
9352         of NULL for excep_string argument.
9353
9354 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9355
9356         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9357         the width of the requested register exceeds the width of the
9358         `ptrace' data type.
9359
9360 2018-05-21  Tom Tromey  <tom@tromey.com>
9361
9362         * printcmd.c (output_command): Remove.
9363         (output_command_const): Rename to output_command.
9364         * valprint.h (output_command): Rename from output_command_const.
9365         * tracepoint.c (trace_dump_actions): Call output_command.
9366
9367 2018-05-21  Tom Tromey  <tom@tromey.com>
9368
9369         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9370         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9371         * ada-lang.h (create_ada_exception_catchpoint): Update.
9372         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9373         std::string.
9374         (create_excep_cond_exprs, ~ada_catchpoint)
9375         (should_stop_exception, print_one_exception)
9376         (print_mention_exception, print_recreate_exception): Update.
9377         (ada_get_next_arg): Remove.
9378         (catch_ada_exception_command_split): Use std::string.  Change type
9379         of "excep_string", "cond_string".
9380         (catch_ada_exception_command): Update.
9381         (create_ada_exception_catchpoint): Change type of excep_string.
9382         (ada_exception_sal): Remove excep_string parameter.
9383         (~ada_catchpoint): Remove.
9384
9385 2018-05-21  Tom Tromey  <tom@tromey.com>
9386
9387         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9388         cleanup.
9389
9390 2018-05-21  Tom Tromey  <tom@tromey.com>
9391
9392         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9393         Return unique_xmalloc_ptr.
9394         (print_it_exception): Update.
9395
9396 2018-05-21  Tom Tromey  <tom@tromey.com>
9397
9398         * tracepoint.c (trace_dump_actions): Use std::string.
9399
9400 2018-05-21  Tom Tromey  <tom@tromey.com>
9401
9402         * symfile.c (reread_symbols): Use std::string for original_name.
9403
9404 2018-05-21  Tom Tromey  <tom@tromey.com>
9405
9406         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9407         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9408         constructor.
9409
9410 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9411
9412         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9413         instance to...
9414         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9415         * objfiles.c (get_objfile_bfd_data): Allocate
9416         objfile_per_bfd_storage with obstack_new when allocating on
9417         obstack.
9418
9419 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9420
9421         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9422         OBSTACK_ZALLOC.
9423         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9424         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9425         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9426         (add_pending): Likewise.
9427         (parse_symbol): Likewise.
9428         (parse_partial_symbols): Likewise.
9429         (psymtab_to_symtab_1): Likewise.
9430         (new_psymtab): Likewise.
9431         (elfmdebug_build_psymtabs): Likewise.
9432         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9433         * objfiles.c (get_objfile_bfd_data): Likewise.
9434         (objfile_register_static_link): Likewise.
9435         * psymtab.c (allocate_psymtab): Likewise.
9436         * stabsread.c (read_member_functions): Likewise.
9437         * xcoffread.c (xcoff_end_psymtab): Likewise.
9438
9439 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9440
9441         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9442         compiler supports std::is_trivially_constructible.
9443         * common/poison.h: Include obstack.h.
9444         (IsMallocable): Define to is_trivially_constructible if the
9445         compiler supports it, define to true_type otherwise.
9446         (xobnew): New.
9447         (XOBNEW): Redefine.
9448         (xobnewvec): New.
9449         (XOBNEWVEC): Redefine.
9450         * gdb_obstack.h (obstack_zalloc): New.
9451         (OBSTACK_ZALLOC): Redefine.
9452         (obstack_calloc): New.
9453         (OBSTACK_CALLOC): Redefine.
9454         (obstack_new): New.
9455         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9456         (gdbarch_obstack): New declaration in gdbarch.h, definition in
9457         gdbarch.c.
9458         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9459         obstack_calloc/obstack_zalloc.
9460         (gdbarch_obstack_zalloc): Remove.
9461         * target-descriptions.c (tdesc_data_init): Use obstack_new.
9462
9463 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9464
9465         * stack.c (backtrace_command_1): Remove useless variable int i.
9466
9467 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9468
9469         * stack.c (print_frame_info): Fix comment.
9470
9471 2018-05-18  Tom Tromey  <tom@tromey.com>
9472
9473         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9474         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9475         (~dwarf2_per_objfile): Update
9476         (dwarf2_get_dwz_file): Use new.
9477         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
9478         unique_ptr.
9479
9480 2018-05-18  Tom Tromey  <tom@tromey.com>
9481
9482         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
9483         unique_ptr.
9484         * dwarf2read.c (struct dwp_file): Add constructor and
9485         initializers.
9486         (open_and_init_dwp_file): Return a unique_ptr.
9487         (dwarf2_per_objfile, create_dwp_hash_table)
9488         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
9489         (lookup_dwo_unit_in_dwp): Update.
9490         (open_and_init_dwp_file, get_dwp_file): Update.
9491
9492 2018-05-18  Tom Tromey  <tom@tromey.com>
9493
9494         * dwarf2read.c (dwarf2_per_objfile): Update.
9495         (struct mapped_index): Add initializers.
9496         (dwarf2_read_index): Use new.
9497         (dw2_symtab_iter_init): Update.
9498         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
9499         unique_ptr.
9500
9501 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9502
9503         * dwarf2read.c (mapped_index) <total_size>: Remove.
9504
9505 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9506
9507         * unittests/format_pieces-selftests.c (test_format_specifier):
9508         Add ARI comments.
9509
9510 2018-05-18  Tom Tromey  <tom@tromey.com>
9511
9512         * c-typeprint.c (maybe_print_hole): New function.
9513         (c_print_type_struct_field_offset): Update.
9514         (c_type_print_base_struct_union): Call maybe_print_hole.
9515
9516 2018-05-17  Keith Seitz  <keiths@redhat.com>
9517
9518         * breakpoint.c (build_bpstat_chain): New function, moved from
9519         bpstat_stop_status.
9520         (bpstat_stop_status): Add optional parameter, `stop_chain'.
9521         If no stop chain is passed, call build_bpstat_chain to build it.
9522         * breakpoint.h (build_bpstat_chain): Declare.
9523         (bpstat_stop_status): Move documentation here from breakpoint.c.
9524         * infrun.c (handle_signal_stop): Before eliding inlined frames,
9525         build the stop chain and pass it to skip_inline_frames.
9526         Pass this stop chain to bpstat_stop_status.
9527         * inline-frame.c: Include breakpoint.h.
9528         (stopped_by_user_bp_inline_frame): New function.
9529         (skip_inline_frames): Add parameter `stop_chain'.
9530         Move documention to inline-frame.h.
9531         If non-NULL, use stopped_by_user_bp_inline_frame to determine
9532         whether the frame should be elided.
9533         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
9534         Add moved documentation and update for new parameter.
9535
9536 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9537
9538         PR cli/14975
9539         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9540         unittests/format_pieces-selftests.c.
9541         * common/format.h (format_piece) <operator==>: New.
9542         (format_pieces) <operator[]>: Remove.
9543         * common/format.c (format_pieces::format_pieces): Handle \e.
9544         * unittests/format_pieces-selftests.c: New.
9545
9546 2018-05-17  Tom Tromey  <tom@tromey.com>
9547
9548         PR symtab/23010:
9549         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
9550         (dw2_instantiate_symtab): Add skip_partial parameter.
9551         (dw2_find_last_source_symtab, dw2_map_expand_apply)
9552         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
9553         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
9554         (dw2_expand_symtabs_matching_one)
9555         (dw2_find_pc_sect_compunit_symtab)
9556         (dw2_debug_names_lookup_symbol)
9557         (dw2_debug_names_expand_symtabs_for_function): Update.
9558         (init_cutu_and_read_dies): Add skip_partial parameter.
9559         (process_psymtab_comp_unit, build_type_psymtabs_1)
9560         (process_skeletonless_type_unit, load_partial_comp_unit)
9561         (psymtab_to_symtab_1): Update.
9562         (load_full_comp_unit): Add skip_partial parameter.
9563         (process_imported_unit_die, dwarf2_read_addr_index)
9564         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
9565         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
9566         (read_signatured_type): Update.
9567
9568 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9569
9570         * value.c (release_value): Remove unused variable.
9571         (record_latest_value): Likewise.
9572         (access_value_history): Likewise.
9573         (preserve_values): Likewise.
9574
9575 2018-05-17  Tom Tromey  <tom@tromey.com>
9576
9577         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
9578         Initialize.
9579
9580 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
9581
9582         PR gdb/22286
9583         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
9584         Also handle registers whose width is not a multiple of
9585         PTRACE_TYPE_RET.
9586         (linux_nat_trad_target::store_register): Likewise.
9587
9588 2018-05-16  Tom Tromey  <tom@tromey.com>
9589
9590         * gdbcore.h (core_bfd): Redefine.
9591         * corelow.c (core_target::close): Update.
9592         (core_target_open): Update.
9593         * progspace.h (struct program_space) <cbfd>: Now a
9594         gdb_bfd_ref_ptr.
9595
9596 2018-05-16  Tom Tromey  <tom@tromey.com>
9597
9598         PR cli/19551:
9599         * symfile-add-flags.h (enum symfile_add_flags)
9600         <SYMFILE_NOT_FILENAME>: New constant.
9601         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
9602         objfile name from BFD.
9603         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
9604         * minidebug.c (find_separate_debug_file_in_section): Put
9605         ".gnu_debugdata" into BFD's file name.
9606
9607 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
9608
9609         * regcache.c (regcache_read_ftype, regcache_write_ftype):
9610         Remove.
9611
9612 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
9613
9614         PR binutils/21446
9615         * aarch64-tdep.c (aarch64_analyze_prologue,
9616         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
9617         Indicate not interested in errors.
9618
9619 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9620
9621         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
9622         Supply the MIPS_ZERO_REGNUM register.
9623
9624 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9625
9626         * mips-tdep.c (mask_address_var): Make variable static.
9627
9628 2018-05-14  Tom Tromey  <tom@tromey.com>
9629
9630         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
9631
9632 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
9633
9634         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
9635         FXSAVE_ADDR for the mxcsr register.
9636
9637 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
9638
9639         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
9640
9641 2018-05-11  Pedro Alves  <palves@redhat.com>
9642
9643         * corelow.c (core_target) <core_target>: No longer inline.
9644         Initialize m_core_gdbarch, m_core_vec and build the section table
9645         here.
9646         <~core_target>: New.
9647         <core_gdbarch, get_core_register_section>: New methods.
9648         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
9649         factored out from ...
9650         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
9651         (core_ops): Delete.
9652         (sniff_core_bfd): Add gdbarch parameter.
9653         (core_close): Delete, merged into ...
9654         (core_target::close): ... here.  Delete self.
9655         (core_close_cleanup): Delete.
9656         (core_target_open): Allocate a core_target on the heap.  Use a
9657         unique_ptr instead of a cleanup.  Bits moved into the core_target
9658         ctor.  Adjust to use core_target methods instead of globals.
9659         (get_core_register_section): Rename to ...
9660         (core_target::get_core_register_section): ... this and adjust.
9661         (struct get_core_registers_cb_data): New.
9662         (get_core_registers_cb): Use it.  Use bool.
9663         (core_target::fetch_registers, core_target::files_info)
9664         (core_target::xfer_partial, core_target::read_description)
9665         (core_target::pid_to, core_target::thread_name): Adjust to
9666         reference class fields instead of globals.
9667         * target.h (struct target_ops_deleter, target_ops_up): New.
9668
9669 2018-05-11  Pedro Alves  <palves@redhat.com>
9670
9671         * corefile.c (core_file_command): Move to corelow.c.
9672         * corelow.c (the_core_target): Delete.
9673         (core_file_command): Moved from corefile.c.  Check exec_bfd
9674         instead of the_core_target.  Use target_detach instead of calling
9675         into the_core_target directly.
9676         (maybe_say_no_core_file_now): New.
9677         (core_target::detach): Use it.
9678         (_initialize_corelow): Remove references to the_core_target.
9679         * gdbcore.h (the_core_target): Delete.
9680
9681 2018-05-11  Tom Tromey  <tromey@redhat.com>
9682             Pedro Alves  <palves@redhat.com>
9683
9684         * corefile.c (core_bfd): Remove.
9685         * gdbcore.h (core_bfd): Now a macro.
9686         * progspace.h (struct program_space) <cbfd>: New field.
9687
9688 2018-05-11  Tom Tromey  <tom@tromey.com>
9689
9690         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
9691         gdb::def_vector.
9692
9693 2018-05-10  Tom Tromey  <tom@tromey.com>
9694
9695         * configure: Rebuild.
9696         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
9697
9698 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
9699
9700         PR server/23158:
9701         * regformats/regdat.sh: Adjust script, following the addition
9702         of the new expedite_regs parameter to init_target_desc.
9703
9704 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
9705     
9706         PR gdb/23127
9707         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
9708         set_gdbarch_significant_addr_bit.
9709         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
9710         set_gdbarch_significant_addr_bit.
9711         * utils.c (address_significant): Update to sign extend addr.
9712
9713 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
9714
9715         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
9716         (xtensa_linux_init_abi): Limit tdep->num_regs by
9717         tdep->num_nopriv_regs.
9718         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
9719         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
9720         not initialized.
9721
9722 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
9723
9724         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
9725
9726 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
9727
9728         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
9729         (I387_MXCSR_INIT_VAL): New constant.
9730         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
9731         buffer if it was supplied by the inferior.
9732         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
9733         (i387_xsave_get_clear_bv): New function.
9734         (i387_supply_xsave): Only read x87 control registers from the
9735         xsave buffer if the feature is enabled, and the state will have
9736         been written, otherwise, provide a suitable default.
9737         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
9738         including x87 control registers.  Update control registers if they
9739         have changed from the default value, and mark features as enabled
9740         as required.
9741         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
9742
9743 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
9744
9745         * spu-tdep.c (info_spu_event_command): Fix output formatting.
9746
9747 2018-05-07  Tom Tromey  <tom@tromey.com>
9748
9749         * configure: Rebuild.
9750         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
9751
9752 2018-05-07  Tom Tromey  <tom@tromey.com>
9753
9754         PR tdep/20362:
9755         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9756         bit.  Use correct value for VDIV.
9757
9758 2018-05-04  Tom Tromey  <tom@tromey.com>
9759
9760         * configure: Rebuild.
9761         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9762
9763 2018-05-04  Tom Tromey  <tom@tromey.com>
9764
9765         * linux-record.c (record_linux_system_call) <case
9766         RECORD_SYS_RECVFROM>: Add "break".
9767
9768 2018-05-04  Tom Tromey  <tom@tromey.com>
9769
9770         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9771         Add missing "break".
9772         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9773         Add missing "break".
9774
9775 2018-05-04  Tom Tromey  <tom@tromey.com>
9776
9777         * rs6000-tdep.c (ppc_process_record_op4)
9778         (ppc_process_record_op63): Add fall-through comment.
9779
9780 2018-05-04  Tom Tromey  <tom@tromey.com>
9781
9782         * i386-tdep.c (i386_process_record): Add fall-through comment.
9783
9784 2018-05-04  Tom Tromey  <tom@tromey.com>
9785
9786         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9787         comment.
9788
9789 2018-05-04  Tom Tromey  <tom@tromey.com>
9790
9791         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9792         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9793         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9794         comment.
9795         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9796         comment.
9797         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9798         comment.
9799
9800 2018-05-04  Tom Tromey  <tom@tromey.com>
9801
9802         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9803
9804 2018-05-04  Tom Tromey  <tom@tromey.com>
9805
9806         * s390-tdep.c (s390_process_record): Fix fall-through comments.
9807         * xcoffread.c (scan_xcoff_symtab): Move comment later.
9808         * symfile.c (section_is_mapped): Fix fall-through comment.
9809         * stabsread.c (define_symbol, read_member_functions): Fix
9810         fall-through comment.
9811         * s390-linux-tdep.c (s390_process_record): Fix fall-through
9812         comment.
9813         * remote.c (remote_wait_as): Fix fall-through comment.
9814         * p-exp.y (yylex): Fix fall-through comment.
9815         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9816         comment.
9817         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9818         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9819         * jv-exp.y (yylex): Fix fall-through comment.
9820         * go-exp.y (lex_one_token): Fix fall-through comment.
9821         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9822         fall-through comment.
9823         * f-exp.y (yylex): Fix fall-through comment.
9824         * dwarf2read.c (process_die): Fix fall-through comments.
9825         * dbxread.c (process_one_symbol): Fix fall-through comment.
9826         * d-exp.y (lex_one_token): Fix fall-through comment.
9827         * cp-name-parser.y (yylex): Fix fall-through comment.
9828         * coffread.c (coff_symtab_read): Fix fall-through comment.
9829         * c-exp.y (lex_one_token): Fix fall-through comment.
9830         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9831         comment.
9832         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9833         comment.
9834
9835 2018-05-04  Tom Tromey  <tom@tromey.com>
9836
9837         PR python/22730:
9838         * NEWS: Mention gdb.execute change.
9839         * gdbcmd.h (execute_control_command): Don't declare.
9840         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9841         execute_control_commands, execute_control_commands_to_string.
9842         * cli/cli-script.h (execute_control_commands)
9843         (execute_control_commands_to_string): Declare.
9844         (execute_control_command): Add from_tty parameter.
9845         * cli/cli-script.c (execute_control_commands)
9846         (execute_control_commands_to_string): New functions.
9847         (execute_user_command): Use execute_control_commands.
9848         (execute_control_command_1): Add "from_tty" parameter.  Update.
9849         (execute_control_command): Likewise.
9850
9851 2018-05-04  Tom Tromey  <tom@tromey.com>
9852
9853         PR python/22731:
9854         * NEWS: Mention that breakpoint commands are writable.
9855         * python/py-breakpoint.c (bppy_set_commands): New function.
9856         (breakpoint_object_getset) <"commands">: Use it.
9857
9858 2018-05-04  Tom Tromey  <tom@tromey.com>
9859
9860         * tracepoint.c (actions_command): Update.
9861         * mi/mi-cmd-break.c (mi_command_line_array)
9862         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9863         (mi_read_next_line): Remove.
9864         (mi_cmd_break_commands): Update.
9865         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9866         function_view.
9867         * cli/cli-script.c (get_command_line): Update.
9868         (process_next_line): Use function_view.  Constify.
9869         (recurse_read_control_structure, read_command_lines)
9870         (read_command_lines_1): Change argument types to function_view.
9871         (do_define_command, document_command): Update.
9872         * breakpoint.h (check_tracepoint_command): Don't declare.
9873         * breakpoint.c (check_tracepoint_command): Remove.
9874         (commands_command_1, create_tracepoint_from_upload): Update.
9875
9876 2018-05-04  Tom Tromey  <tom@tromey.com>
9877
9878         PR gdb/11750:
9879         * cli/cli-script.h (enum command_control_type) <define_control>:
9880         New constant.
9881         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9882         (build_command_line, execute_control_command_1)
9883         (process_next_line): Likewise.
9884         (do_define_command): New function, extracted from define_command.
9885         (define_command): Use it.
9886
9887 2018-05-04  Tom Tromey  <tom@tromey.com>
9888
9889         * tracepoint.c (actions_command): Update.
9890         * cli/cli-script.h (read_command_lines): Update.
9891         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9892         (MAX_TMPBUF): Remove define.
9893         (define_command): Use string_printf.
9894         (document_command): Likewise.
9895         * breakpoint.c (commands_command_1): Update.
9896
9897 2018-05-04  Tom Tromey  <tom@tromey.com>
9898
9899         * top.c (execute_command): Update.
9900         * cli/cli-script.h (print_command_lines): Now varargs.
9901         * cli/cli-script.c (print_command_lines): Now varargs.
9902         (execute_control_command_1) <case while_control, case if_control>:
9903         Update.
9904
9905 2018-05-04  Tom Tromey  <tom@tromey.com>
9906
9907         * tracepoint.c (all_tracepoint_actions): Rename from
9908         all_tracepoint_actions_and_cleanup.  Change return type.
9909         (actions_command, encode_actions_1, encode_actions)
9910         (trace_dump_actions, tdump_command): Update.
9911         * remote.c (remote_download_command_source): Update.
9912         * python/python.c (gdbpy_eval_from_control_command)
9913         (python_command, python_interactive_command): Update.
9914         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9915         * guile/guile.c (guile_command)
9916         (gdbscm_eval_from_control_command, guile_command): Update.
9917         * compile/compile.c (compile_code_command)
9918         (compile_print_command, compile_to_object): Update.
9919         * cli/cli-script.h (struct command_lines_deleter): New.
9920         (counted_command_line): New typedef.
9921         (struct command_line): Add constructor, destructor.
9922         <body_list>: Remove.
9923         <body_list_0, body_list_1>: New members.
9924         (command_line_up): Remove typedef.
9925         (read_command_lines, read_command_lines_1, get_command_line):
9926         Update.
9927         (copy_command_lines): Don't declare.
9928         * cli/cli-script.c (build_command_line): Use "new".
9929         (get_command_line): Return counted_command_line.
9930         (print_command_lines, execute_user_command)
9931         (execute_control_command_1, while_command, if_command): Update.
9932         (realloc_body_list): Remove.
9933         (process_next_line, recurse_read_control_structure): Update.
9934         (read_command_lines, read_command_lines_1): Return counted_command_line.
9935         (free_command_lines): Use "delete".
9936         (copy_command_lines): Remove.
9937         (define_command, document_command, show_user_1): Update.
9938         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9939         a counted_command_line.
9940         * breakpoint.h (counted_command_line): Remove typedef.
9941         (breakpoint_set_commands): Update.
9942         * breakpoint.c (check_no_tracepoint_commands)
9943         (validate_commands_for_breakpoint): Update.
9944         (breakpoint_set_commands): Change commands to be a
9945         counted_command_line.
9946         (commands_command_1, update_dprintf_command_list)
9947         (create_tracepoint_from_upload): Update.
9948
9949 2018-05-04  Tom Tromey  <tom@tromey.com>
9950
9951         * cli/cli-decode.h (cmd_list_element): New constructor.
9952         (~cmd_list_element): New destructor.
9953         (struct cmd_list_element): Add initializers.
9954         * cli/cli-decode.c (do_add_cmd): Use "new".
9955         (delete_cmd): Use "delete".
9956
9957 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9958             Pedro Alves <palves@redhat.com>
9959
9960         PR breakpoints/19806 and support for PR external/20207.
9961         * NEWS: Mention Aarch64 watchpoint improvements.
9962         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9963         watchpoints and PR external/20207 watchpoints.
9964         * nat/aarch64-linux-hw-point.c
9965         (kernel_supports_any_contiguous_range): New.
9966         (aarch64_watchpoint_offset): New.
9967         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9968         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9969         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9970         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9971         next_addr_orig_p.  Support PR external/20207 watchpoints.
9972         (aarch64_downgrade_regs): New.
9973         (aarch64_dr_state_insert_one_point): New parameters offset and
9974         addr_orig.
9975         (aarch64_dr_state_remove_one_point): Likewise.
9976         (aarch64_handle_breakpoint): Update caller.
9977         (aarch64_handle_aligned_watchpoint): Likewise.
9978         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9979         aligned_offset.
9980         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9981         aarch64_downgrade_regs.
9982         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9983         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9984         (DR_CONTROL_MASK): ... this.
9985         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9986         (unsigned int aarch64_watchpoint_offset): New prototype.
9987         (aarch64_linux_set_debug_regs): Remove const from state.
9988         * utils.c (align_up, align_down): Move to ...
9989         * common/common-utils.c (align_up, align_down): ... here.
9990         * utils.h (align_up, align_down): Move to ...
9991         * common/common-utils.h (align_up, align_down): ... here.
9992
9993 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9994
9995         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9996         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9997         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9998         Re-implement to match the ABI as summarized in GCC's
9999         gcc/config/sparc/sparc.c.  All callers updated.
10000         (sparc32_store_arguments): Remove assertion.
10001
10002 2018-05-04  Tom Tromey  <tom@tromey.com>
10003
10004         * printcmd.c: Don't include tui.h.
10005         (decode_format): Use skip_spaces.
10006
10007 2018-05-04  Tom Tromey  <tom@tromey.com>
10008
10009         PR gdb/22619:
10010         * printcmd.c (last_count): New global.
10011         (x_command): Use saved count when repeating.
10012
10013 2018-05-04  Tom Tromey  <tom@tromey.com>
10014
10015         * nto-procfs.c (do_closedir_cleanup): Remove.
10016         (procfs_pidlist): Use gdb_dir_up.
10017         * procfs.c (do_closedir_cleanup): Remove.
10018         (proc_update_threads): Use gdb_dir_up.
10019         * common/filestuff.h (struct gdb_dir_deleter): New.
10020         (gdb_dir_up): New typedef.
10021
10022 2018-05-04  Tom Tromey  <tom@tromey.com>
10023
10024         * ada-lang.c (print_mention_exception): Use std::string.
10025
10026 2018-05-04  Tom Tromey  <tom@tromey.com>
10027
10028         * ada-lang.c (create_excep_cond_exprs): Update.
10029         (ada_exception_catchpoint_cond_string): Use std::string.
10030
10031 2018-05-04  Tom Tromey  <tom@tromey.com>
10032
10033         * ada-lang.c (xget_renaming_scope): Return std::string.
10034         (old_renaming_is_invisible): Update.
10035
10036 2018-05-04  Tom Tromey  <tom@tromey.com>
10037
10038         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10039         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10040
10041 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10042
10043         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10044
10045 2018-05-04  Tom Tromey  <tom@tromey.com>
10046
10047         * remote.c (remote_query_supported_append): Change type.
10048         (remote_check_symbols): Update.
10049
10050 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10051
10052         PR gdb/11420
10053         * configure.ac: Prepend libpython.
10054         * python/python-config.py: Likewise.
10055         * configure: Regenerate.
10056
10057 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10058
10059         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10060
10061 2018-05-03  Pedro Alves  <palves@redhat.com>
10062
10063         * s390-linux-nat.c
10064         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10065         override.  Write 'true' instead of '1'.
10066         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10067         declaration.
10068
10069 2018-05-02  Pedro Alves  <palves@redhat.com>
10070
10071         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10072         add_inf_child_target.
10073         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10074         add_inf_child_target.
10075         * aix-thread.c (aix_thread_target_info): New.
10076         (aix_thread_target) <shortname, longname, doc>: Delete.
10077         <info>: New.
10078         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10079         add_inf_child_target.
10080         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10081         add_inf_child_target.
10082         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10083         add_inf_child_target.
10084         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10085         add_inf_child_target.
10086         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10087         add_inf_child_target.
10088         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10089         add_inf_child_target.
10090         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10091         add_inf_child_target.
10092         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10093         add_inf_child_target.
10094         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10095         add_inf_child_target.
10096         * bfd-target.c (target_bfd_target_info): New.
10097         (target_bfd) <shortname, longname, doc>: Delete.
10098         <info>: New.
10099         * bsd-kvm.c (bsd_kvm_target_info): New.
10100         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10101         <info>: New.
10102         (bsd_kvm_target::open): Rename to ...
10103         (bsd_kvm_target_open): ... this.  Adjust.
10104         * bsd-uthread.c (bsd_uthread_target_info): New.
10105         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10106         <info>: New.
10107         * corefile.c (core_file_command): Adjust.
10108         * corelow.c (core_target_info): New.
10109         (core_target) <shortname, longname, doc>: Delete.
10110         <info>: New.
10111         (core_target::open): Rename to ...
10112         (core_target_open): ... this.  Adjust.
10113         * ctf.c (ctf_target_info): New.
10114         (ctf_target) <shortname, longname, doc>: Delete.
10115         <info>: New.
10116         (ctf_target::open): Rename to ...
10117         (ctf_target_open): ... this.
10118         (_initialize_ctf): Adjust.
10119         * exec.c (exec_target_info): New.
10120         (exec_target) <shortname, longname, doc>: Delete.
10121         <info>: New.
10122         (exec_target::open): Rename to ...
10123         (exec_target_open): ... this.
10124         * gdbcore.h (core_target_open): Declare.
10125         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10126         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10127         add_inf_child_target.
10128         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10129         add_inf_child_target.
10130         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10131         add_inf_child_target.
10132         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10133         add_inf_child_target.
10134         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10135         add_inf_child_target.
10136         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10137         add_inf_child_target.
10138         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10139         add_inf_child_target.
10140         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10141         add_inf_child_target.
10142         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10143         add_inf_child_target.
10144         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10145         add_inf_child_target.
10146         * inf-child.c (inf_child_target_info): New.
10147         (inf_child_target::info): New.
10148         (inf_child_open_target): Remove 'target' parameter.  Use
10149         get_native_target instead.
10150         (inf_child_target::open): Delete.
10151         (add_inf_child_target): New.
10152         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10153         Delete.
10154         <info>: New.
10155         (add_inf_child_target): Declare.
10156         (inf_child_open_target): Declare.
10157         * linux-thread-db.c (thread_db_target_info): New.
10158         (thread_db_target) <shortname, longname, doc>: Delete.
10159         <info>: New.
10160         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10161         add_inf_child_target.
10162         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10163         add_inf_child_target.
10164         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10165         add_inf_child_target.
10166         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10167         add_inf_child_target.
10168         * make-target-delegates (print_class): Adjust.
10169         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10170         add_inf_child_target.
10171         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10172         add_inf_child_target.
10173         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10174         add_inf_child_target.
10175         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10176         add_inf_child_target.
10177         * nto-procfs.c (nto_native_target_info): New.
10178         (nto_procfs_target_native) <shortname, longname, doc>:
10179         Delete.
10180         <info>: New.
10181         (nto_procfs_target_info): New.
10182         (nto_procfs_target_procfs) <shortname, longname, doc>:
10183         Delete.
10184         <info>: New.
10185         (init_procfs_targets): Adjust.
10186         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10187         add_inf_child_target.
10188         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10189         add_inf_child_target.
10190         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10191         add_inf_child_target.
10192         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10193         add_inf_child_target.
10194         * ravenscar-thread.c (ravenscar_target_info): New.
10195         (ravenscar_thread_target) <shortname, longname, doc>:
10196         Delete.
10197         <info>: New.
10198         * record-btrace.c (record_btrace_target_info):
10199         (record_btrace_target) <shortname, longname, doc>: Delete.
10200         <info>: New.
10201         (record_btrace_target::open): Rename to ...
10202         (record_btrace_target_open): ... this.  Adjust.
10203         * record-full.c (record_longname, record_doc): New.
10204         (record_full_base_target) <shortname, longname, doc>: Delete.
10205         <info>: New.
10206         (record_full_target_info): New.
10207         (record_full_target): <shortname>: Delete.
10208         <info>: New.
10209         (record_full_core_open_1, record_full_open_1): Update comments.
10210         (record_full_base_target::open): Rename to ...
10211         (record_full_open): ... this.
10212         (cmd_record_full_restore): Update.
10213         (_initialize_record_full): Update.
10214         * remote-sim.c (remote_sim_target_info): New.
10215         (gdbsim_target) <shortname, longname, doc>: Delete.
10216         <info>: New.
10217         (gdbsim_target::open): Rename to ...
10218         (gdbsim_target_open): ... this.
10219         (_initialize_remote_sim): Adjust.
10220         * remote.c (remote_doc): New.
10221         (remote_target_info): New.
10222         (remote_target) <shortname, longname, doc>: Delete.
10223         <info>: New.
10224         (extended_remote_target_info): New.
10225         (extended_remote_target) <shortname, longname, doc>: Delete.
10226         <info>: New.
10227         (remote_target::open_1): Make static.  Adjust.
10228         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10229         * s390-linux-nat.c (_initialize_s390_nat): Use
10230         add_inf_child_target.
10231         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10232         add_inf_child_target.
10233         * sol-thread.c (thread_db_target_info): New.
10234         (sol_thread_target) <shortname, longname, doc>: Delete.
10235         <info>: New.
10236         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10237         add_inf_child_target.
10238         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10239         add_inf_child_target.
10240         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10241         add_inf_child_target.
10242         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10243         add_inf_child_target.
10244         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10245         add_inf_child_target.
10246         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10247         add_inf_child_target.
10248         * spu-linux-nat.c (_initialize_spu_nat): Use
10249         add_inf_child_target.
10250         * spu-multiarch.c (spu_multiarch_target_info): New.
10251         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10252         <info>: New.
10253         * target-delegates.c: Regenerate.
10254         * target.c: Include <unordered_map>.
10255         (target_ops_p): Delete.
10256         (DEF_VEC_P(target_ops_p)): Delete.
10257         (target_factories): New.
10258         (test_target_info): New.
10259         (test_target_ops::info): New.
10260         (open_target): Adjust to use target_factories.
10261         (add_target_with_completer): Rename to ...
10262         (add_target): ... this.  Change prototype.  Register target_info
10263         and open callback in target_factories.  Register target_info in
10264         command context instead of target_ops.
10265         (add_target): Delete old implementation.
10266         (add_deprecated_target_alias): Change prototype.  Adjust.
10267         (the_native_target): New.
10268         (set_native_target, get_native_target): New.
10269         (find_default_run_target): Use the_native_target.
10270         (find_attach_target, find_run_target): Simplify.
10271         (target_ops::open): Delete.
10272         (dummy_target_info): New.
10273         (dummy_target::shortname, dummy_target::longname)
10274         (dummy_target::doc): Delete.
10275         (dummy_target::info): New.
10276         (debug_target::shortname, debug_target::longname)
10277         (debug_target::doc): Delete.
10278         (debug_target::info): New.
10279         * target.h (struct target_info): New.
10280         (target_ops::~target_ops): Add comment.
10281         (target_ops::info): New.
10282         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10283         longer virtual.  Implement in terms of target_info.
10284         (set_native_target, get_native_target): Declare.
10285         (target_open_ftype): New.
10286         (add_target, add_target_with_completer)
10287         (add_deprecated_target_alias): Change prototype.
10288         (test_target) <shortname, longname, doc>: Delete.
10289         <info>: New.
10290         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10291         add_inf_child_target.
10292         * tracefile-tfile.c (tfile_target_info): New.
10293         (tfile_target) <shortname, longname, doc>: Delete.
10294         <info>: New.
10295         (tfile_target::open): Rename to ...
10296         (tfile_target_open): ... this.
10297         (_initialize_tracefile_tfile): Adjust.
10298         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10299         add_inf_child_target.
10300         * windows-nat.c (_initialize_windows_nat): Use
10301         add_inf_child_target.
10302         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10303         add_inf_child_target.
10304
10305 2018-05-02  Pedro Alves  <palves@redhat.com>
10306
10307         * linux-nat.h (linux_nat_target) <low_new_thread,
10308         low_delete_thread, low_new_fork, low_forget_process,
10309         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10310         New virtual methods.
10311         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10312         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10313         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10314         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10315         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10316         Delete.
10317         * linux-fork.c (delete_fork): Adjust to call low method.
10318         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10319         (linux_nat_new_fork, linux_nat_forget_process_hook)
10320         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10321         (linux_nat_status_is_event):
10322         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10323         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10324         to call low method.
10325         (sigtrap_is_event): Rename to ...
10326         (linux_nat_target::low_status_is_event): ... this.
10327         (linux_nat_set_status_is_event): Delete.
10328         (save_stop_reason, linux_nat_wait_1)
10329         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10330         low methods.
10331         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10332         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10333         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10334         (linux_nat_set_prepare_to_resume): Delete.
10335         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10336         low virtual methods.
10337         * amd64-linux-nat.c: Likewise.
10338         * arm-linux-nat.c: Likewise.
10339         * i386-linux-nat.c: Likewise.
10340         * ia64-linux-nat.c: Likewise.
10341         * mips-linux-nat.c: Likewise.
10342         * ppc-linux-nat.c: Likewise.
10343         * s390-linux-nat.c: Likewise.
10344         * sparc64-linux-nat.c: Likewise.
10345         * x86-linux-nat.c: Likewise.
10346         * x86-linux-nat.h: Include "nat/x86-linux.h".
10347         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10348         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10349         Override methods.
10350
10351 2018-05-02  Pedro Alves  <palves@redhat.com>
10352
10353         * target.h (target_ops)
10354         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10355         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10356         stopped_by_watchpoint, have_continuable_watchpoint,
10357         stopped_data_address, watchpoint_addr_within_range,
10358         can_accel_watchpoint_condition, can_run, thread_alive,
10359         has_all_memory, has_memory, has_stack, has_registers,
10360         has_execution, can_async_p, is_async_p, supports_non_stop,
10361         always_non_stop_p, can_execute_reverse, supports_multi_process,
10362         supports_enable_disable_tracepoint,
10363         supports_disable_randomization, supports_string_tracing,
10364         supports_evaluation_of_breakpoint_conditions,
10365         can_run_breakpoint_commands, filesystem_is_local,
10366         can_download_tracepoint, get_trace_state_variable_value,
10367         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10368         record_is_replaying, record_will_replay,
10369         augmented_libraries_svr4_read>: Adjust to return bool.
10370         * aarch64-linux-nat.c: All implementations adjusted.
10371         * aix-thread.c: All implementations adjusted.
10372         * arm-linux-nat.c: All implementations adjusted.
10373         * breakpoint.c: All implementations adjusted.
10374         * bsd-kvm.c: All implementations adjusted.
10375         * bsd-uthread.c: All implementations adjusted.
10376         * corelow.c: All implementations adjusted.
10377         * ctf.c: All implementations adjusted.
10378         * darwin-nat.c: All implementations adjusted.
10379         * darwin-nat.h: All implementations adjusted.
10380         * exec.c: All implementations adjusted.
10381         * fbsd-nat.c: All implementations adjusted.
10382         * fbsd-nat.h: All implementations adjusted.
10383         * gnu-nat.c: All implementations adjusted.
10384         * gnu-nat.h: All implementations adjusted.
10385         * go32-nat.c: All implementations adjusted.
10386         * ia64-linux-nat.c: All implementations adjusted.
10387         * inf-child.c: All implementations adjusted.
10388         * inf-child.h: All implementations adjusted.
10389         * inf-ptrace.c: All implementations adjusted.
10390         * inf-ptrace.h: All implementations adjusted.
10391         * linux-nat.c: All implementations adjusted.
10392         * linux-nat.h: All implementations adjusted.
10393         * mips-linux-nat.c: All implementations adjusted.
10394         * nto-procfs.c: All implementations adjusted.
10395         * ppc-linux-nat.c: All implementations adjusted.
10396         * procfs.c: All implementations adjusted.
10397         * ravenscar-thread.c: All implementations adjusted.
10398         * record-btrace.c: All implementations adjusted.
10399         * record-full.c: All implementations adjusted.
10400         * remote-sim.c: All implementations adjusted.
10401         * remote.c: All implementations adjusted.
10402         * s390-linux-nat.c: All implementations adjusted.
10403         * sol-thread.c: All implementations adjusted.
10404         * spu-multiarch.c: All implementations adjusted.
10405         * target-delegates.c: All implementations adjusted.
10406         * target.c: All implementations adjusted.
10407         * target.h: All implementations adjusted.
10408         * tracefile-tfile.c: All implementations adjusted.
10409         * tracefile.c: All implementations adjusted.
10410         * tracefile.h: All implementations adjusted.
10411         * windows-nat.c: All implementations adjusted.
10412         * x86-linux-nat.h: All implementations adjusted.
10413         * x86-nat.h: All implementations adjusted.
10414
10415 2018-05-02  Pedro Alves  <palves@redhat.com>
10416
10417         * make-target-delegates (scan_target_h): Don't trim lines here.
10418         Replace sequences of tabs and/or whitespace with a single
10419         whitespace.
10420         (top level, parsing methods): Trim each line before processing it
10421         here.
10422
10423 2018-05-02  Pedro Alves  <palves@redhat.com>
10424             John Baldwin  <jhb@freebsd.org>
10425
10426         * target.h (enum strata) <debug_stratum>: New.
10427         (struct target_ops) <all delegation methods>: Replace by C++
10428         virtual methods, and drop "to_" prefix.  All references updated
10429         throughout.
10430         <to_shortname, to_longname, to_doc, to_data,
10431         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10432         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10433         virtual methods.  All references updated throughout.
10434         <can_attach, supports_terminal_ours, can_create_inferior,
10435         get_thread_control_capabilities, attach_no_wait>: New
10436         virtual methods.
10437         <insert_breakpoint, remove_breakpoint>: Now
10438         TARGET_DEFAULT_NORETURN methods.
10439         <info_proc>: Now returns bool.
10440         <to_magic>: Delete.
10441         (OPS_MAGIC): Delete.
10442         (current_target): Delete.  All references replaced by references
10443         to ...
10444         (target_stack): ... this.  New.
10445         (target_shortname, target_longname): Adjust.
10446         (target_can_run): Now a function declaration.
10447         (default_child_has_all_memory, default_child_has_memory)
10448         (default_child_has_stack, default_child_has_registers)
10449         (default_child_has_execution): Remove target_ops parameter.
10450         (complete_target_initialization): Delete.
10451         (memory_breakpoint_target): New template class.
10452         (test_target_ops): Refactor as a C++ class with virtual methods.
10453         * make-target-delegates (NAME_PART): Tighten.
10454         (POINTER_PART, CP_SYMBOL): New.
10455         (SIMPLE_RETURN_PART): Reimplement.
10456         (VEC_RETURN_PART): Expect less.
10457         (RETURN_PART, VIRTUAL_PART): New.
10458         (METHOD): Adjust to C++ virtual methods.
10459         (scan_target_h): Remove reference to C99.
10460         (dname): Output "target_ops::" prefix.
10461         (write_function_header): Adjust to output a C++ class method.
10462         (write_declaration): New.
10463         (write_delegator): Adjust to output a C++ class method.
10464         (tdname): Output "dummy_target::" prefix.
10465         (write_tdefault, write_debugmethod): Adjust to output a C++ class
10466         method.
10467         (tdefault_names, debug_names): Delete.
10468         (return_types, tdefaults, styles, argtypes_array): New.
10469         (top level): All methods are delegators.
10470         (print_class): New.
10471         (top level): Print dummy_target and debug_target classes.
10472         * target-delegates.c: Regenerate.
10473         * target-debug.h (target_debug_print_enum_info_proc_what)
10474         (target_debug_print_thread_control_capabilities)
10475         (target_debug_print_thread_info_p): New.
10476         * target.c (dummy_target): Delete.
10477         (the_dummy_target, the_debug_target): New.
10478         (target_stack): Now extern.
10479         (set_targetdebug): Push/unpush debug target.
10480         (default_child_has_all_memory, default_child_has_memory)
10481         (default_child_has_stack, default_child_has_registers)
10482         (default_child_has_execution): Remove target_ops parameter.
10483         (complete_target_initialization): Delete.
10484         (add_target_with_completer): No longer call
10485         complete_target_initialization.
10486         (target_supports_terminal_ours): Use regular delegation.
10487         (update_current_target): Delete.
10488         (push_target): No longer check magic number.  Don't call
10489         update_current_target.
10490         (unpush_target): Don't call update_current_target.
10491         (target_is_pushed): No longer check magic number.
10492         (target_require_runnable): Skip for all stratums over
10493         process_stratum.
10494         (target_ops::info_proc): New.
10495         (target_info_proc): Use find_target_at and
10496         find_default_run_target.
10497         (target_supports_disable_randomization): Use regular delegation.
10498         (target_get_osdata): Use find_target_at.
10499         (target_ops::open, target_ops::close, target_ops::can_attach)
10500         (target_ops::attach, target_ops::can_create_inferior)
10501         (target_ops::create_inferior, target_ops::can_run)
10502         (target_can_run): New.
10503         (default_fileio_target): Use regular delegation.
10504         (target_ops::fileio_open, target_ops::fileio_pwrite)
10505         (target_ops::fileio_pread, target_ops::fileio_fstat)
10506         (target_ops::fileio_close, target_ops::fileio_unlink)
10507         (target_ops::fileio_readlink): New.
10508         (target_fileio_open_1, target_fileio_unlink)
10509         (target_fileio_readlink): Always call the target method.  Handle
10510         FILEIO_ENOSYS.
10511         (return_zero, return_zero_has_execution): Delete.
10512         (init_dummy_target): Delete.
10513         (dummy_target::dummy_target, dummy_target::shortname)
10514         (dummy_target::longname, dummy_target::doc)
10515         (debug_target::debug_target, debug_target::shortname)
10516         (debug_target::longname, debug_target::doc): New.
10517         (target_supports_delete_record): Use regular delegation.
10518         (setup_target_debug): Delete.
10519         (maintenance_print_target_stack): Skip debug_stratum.
10520         (initialize_targets): Instantiate the_dummy_target and
10521         the_debug_target.
10522         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
10523         use target_stack.
10524         (target_auxv_search, fprint_target_auxv): Adjust.
10525         (info_auxv_command): Adjust to use target_stack.
10526         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
10527         * exceptions.c (print_flush): Handle a NULL target_stack.
10528         * regcache.c (target_ops_no_register): Refactor as class with
10529         virtual methods.
10530
10531         * exec.c (exec_target): New class.
10532         (exec_ops): Now an exec_target.
10533         (exec_open, exec_close_1, exec_get_section_table)
10534         (exec_xfer_partial, exec_files_info, exec_has_memory)
10535         (exec_make_note_section): Refactor as exec_target methods.
10536         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
10537         Delete.
10538         (exec_target::find_memory_regions): New.
10539         (_initialize_exec): Don't call init_exec_ops.
10540         * gdbcore.h (exec_file_clear): Delete.
10541
10542         * corefile.c (core_target): Delete.
10543         (core_file_command): Adjust.
10544         * corelow.c (core_target): New class.
10545         (the_core_target): New.
10546         (core_close): Remove target_ops parameter.
10547         (core_close_cleanup): Adjust.
10548         (core_target::close): New.
10549         (core_open, core_detach, get_core_registers, core_files_info)
10550         (core_xfer_partial, core_thread_alive, core_read_description)
10551         (core_pid_to_str, core_thread_name, core_has_memory)
10552         (core_has_stack, core_has_registers, core_info_proc): Rework as
10553         core_target methods.
10554         (ignore, core_remove_breakpoint, init_core_ops): Delete.
10555         (_initialize_corelow): Initialize the_core_target.
10556         * gdbcore.h (core_target): Delete.
10557         (the_core_target): New.
10558
10559         * ctf.c: (ctf_target): New class.
10560         (ctf_ops): Now a ctf_target.
10561         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
10562         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
10563         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
10564         methods.
10565         (init_ctf_ops): Delete.
10566         (_initialize_ctf): Don't call it.
10567         * tracefile-tfile.c (tfile_target): New class.
10568         (tfile_ops): Now a tfile_target.
10569         (tfile_open, tfile_close, tfile_files_info)
10570         (tfile_get_tracepoint_status, tfile_trace_find)
10571         (tfile_fetch_registers, tfile_xfer_partial)
10572         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
10573         Refactor as tfile_target methods.
10574         (tfile_xfer_partial_features): Remove target_ops parameter.
10575         (init_tfile_ops): Delete.
10576         (_initialize_tracefile_tfile): Don't call it.
10577         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
10578         (tracefile_has_stack, tracefile_has_registers)
10579         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
10580         tracefile_target methods.
10581         (init_tracefile_ops): Delete.
10582         (tracefile_target::tracefile_target): New.
10583         * tracefile.h: Include "target.h".
10584         (tracefile_target): New class.
10585         (init_tracefile_ops): Delete.
10586
10587         * spu-multiarch.c (spu_multiarch_target): New class.
10588         (spu_ops): Now a spu_multiarch_target.
10589         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
10590         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
10591         (spu_search_memory, spu_mourn_inferior): Refactor as
10592         spu_multiarch_target methods.
10593         (init_spu_ops): Delete.
10594         (_initialize_spu_multiarch): Remove references to init_spu_ops,
10595         complete_target_initialization.
10596
10597         * ravenscar-thread.c (ravenscar_thread_target): New class.
10598         (ravenscar_ops): Now a ravenscar_thread_target.
10599         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
10600         (ravenscar_thread_alive, ravenscar_pid_to_str)
10601         (ravenscar_fetch_registers, ravenscar_store_registers)
10602         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
10603         (ravenscar_stopped_by_hw_breakpoint)
10604         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
10605         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
10606         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
10607         methods.
10608         (init_ravenscar_thread_ops): Delete.
10609         (_initialize_ravenscar): Remove references to
10610         init_ravenscar_thread_ops and complete_target_initialization.
10611
10612         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
10613         (bsd_uthread_target): New class.
10614         (bsd_uthread_ops): Now a bsd_uthread_target.
10615         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
10616         (bsd_uthread_close, bsd_uthread_mourn_inferior)
10617         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
10618         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
10619         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
10620         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
10621         (bsd_uthread_target): Delete function.
10622         (_initialize_bsd_uthread): Remove reference to
10623         complete_target_initialization.
10624
10625         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
10626         (target_bfd): ... this new class.
10627         (target_bfd_xfer_partial, target_bfd_get_section_table)
10628         (target_bfd_close): Refactor as target_bfd methods.
10629         (target_bfd::~target_bfd): New.
10630         (target_bfd_reopen): Adjust.
10631         (target_bfd::close): New.
10632
10633         * record-btrace.c (record_btrace_target): New class.
10634         (record_btrace_ops): Now a record_btrace_target.
10635         (record_btrace_open, record_btrace_stop_recording)
10636         (record_btrace_disconnect, record_btrace_close)
10637         (record_btrace_async, record_btrace_info)
10638         (record_btrace_insn_history, record_btrace_insn_history_range)
10639         (record_btrace_insn_history_from, record_btrace_call_history)
10640         (record_btrace_call_history_range)
10641         (record_btrace_call_history_from, record_btrace_record_method)
10642         (record_btrace_is_replaying, record_btrace_will_replay)
10643         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
10644         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
10645         (record_btrace_store_registers, record_btrace_prepare_to_store)
10646         (record_btrace_to_get_unwinder)
10647         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
10648         (record_btrace_commit_resume, record_btrace_wait)
10649         (record_btrace_stop, record_btrace_can_execute_reverse)
10650         (record_btrace_stopped_by_sw_breakpoint)
10651         (record_btrace_supports_stopped_by_sw_breakpoint)
10652         (record_btrace_stopped_by_hw_breakpoint)
10653         (record_btrace_supports_stopped_by_hw_breakpoint)
10654         (record_btrace_update_thread_list, record_btrace_thread_alive)
10655         (record_btrace_goto_begin, record_btrace_goto_end)
10656         (record_btrace_goto, record_btrace_stop_replaying_all)
10657         (record_btrace_execution_direction)
10658         (record_btrace_prepare_to_generate_core)
10659         (record_btrace_done_generating_core): Refactor as
10660         record_btrace_target methods.
10661         (init_record_btrace_ops): Delete.
10662         (_initialize_record_btrace): Remove reference to
10663         init_record_btrace_ops.
10664         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
10665         the execution_direction global.
10666         (record_full_base_target, record_full_target)
10667         (record_full_core_target): New classes.
10668         (record_full_ops): Now a record_full_target.
10669         (record_full_core_ops): Now a record_full_core_target.
10670         (record_full_target::detach, record_full_target::disconnect)
10671         (record_full_core_target::disconnect)
10672         (record_full_target::mourn_inferior, record_full_target::kill):
10673         New.
10674         (record_full_open, record_full_close, record_full_async): Refactor
10675         as methods of the record_full_base_target class.
10676         (record_full_resume, record_full_commit_resume): Refactor
10677         as methods of the record_full_target class.
10678         (record_full_wait, record_full_stopped_by_watchpoint)
10679         (record_full_stopped_data_address)
10680         (record_full_stopped_by_sw_breakpoint)
10681         (record_full_supports_stopped_by_sw_breakpoint)
10682         (record_full_stopped_by_hw_breakpoint)
10683         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
10684         methods of the record_full_base_target class.
10685         (record_full_store_registers, record_full_xfer_partial)
10686         (record_full_insert_breakpoint, record_full_remove_breakpoint):
10687         Refactor as methods of the record_full_target class.
10688         (record_full_can_execute_reverse, record_full_get_bookmark)
10689         (record_full_goto_bookmark, record_full_execution_direction)
10690         (record_full_record_method, record_full_info, record_full_delete)
10691         (record_full_is_replaying, record_full_will_replay)
10692         (record_full_goto_begin, record_full_goto_end, record_full_goto)
10693         (record_full_stop_replaying): Refactor as methods of the
10694         record_full_base_target class.
10695         (record_full_core_resume, record_full_core_kill)
10696         (record_full_core_fetch_registers)
10697         (record_full_core_prepare_to_store)
10698         (record_full_core_store_registers, record_full_core_xfer_partial)
10699         (record_full_core_insert_breakpoint)
10700         (record_full_core_remove_breakpoint)
10701         (record_full_core_has_execution): Refactor
10702         as methods of the record_full_core_target class.
10703         (record_full_base_target::supports_delete_record): New.
10704         (init_record_full_ops): Delete.
10705         (init_record_full_core_ops): Delete.
10706         (record_full_save): Refactor as method of the
10707         record_full_base_target class.
10708         (_initialize_record_full): Remove references to
10709         init_record_full_ops and init_record_full_core_ops.
10710
10711         * remote.c (remote_target, extended_remote_target): New classes.
10712         (remote_ops): Now a remote_target.
10713         (extended_remote_ops): Now an extended_remote_target.
10714         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
10715         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
10716         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
10717         (remote_pass_signals, remote_set_syscall_catchpoint)
10718         (remote_program_signals, )
10719         (remote_thread_always_alive): Remove target_ops parameter.
10720         (remote_thread_alive, remote_thread_name)
10721         (remote_update_thread_list, remote_threads_extra_info)
10722         (remote_static_tracepoint_marker_at)
10723         (remote_static_tracepoint_markers_by_strid)
10724         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
10725         (remote_open): Refactor as methods of remote_target.
10726         (extended_remote_open, extended_remote_detach)
10727         (extended_remote_attach, extended_remote_post_attach):
10728         (extended_remote_supports_disable_randomization)
10729         (extended_remote_create_inferior): : Refactor as method of
10730         extended_remote_target.
10731         (remote_set_permissions, remote_open_1, remote_detach)
10732         (remote_follow_fork, remote_follow_exec, remote_disconnect)
10733         (remote_resume, remote_commit_resume, remote_stop)
10734         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
10735         (remote_terminal_ours, remote_wait, remote_fetch_registers)
10736         (remote_prepare_to_store, remote_store_registers)
10737         (remote_flash_erase, remote_flash_done, remote_files_info)
10738         (remote_kill, remote_mourn, remote_insert_breakpoint)
10739         (remote_remove_breakpoint, remote_insert_watchpoint)
10740         (remote_watchpoint_addr_within_range)
10741         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
10742         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
10743         (remote_supports_stopped_by_sw_breakpoint)
10744         (remote_stopped_by_hw_breakpoint)
10745         (remote_supports_stopped_by_hw_breakpoint)
10746         (remote_stopped_by_watchpoint, remote_stopped_data_address)
10747         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
10748         (remote_verify_memory): Refactor as methods of remote_target.
10749         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
10750         parameter.
10751         (remote_xfer_partial, remote_get_memory_xfer_limit)
10752         (remote_search_memory, remote_rcmd, remote_memory_map)
10753         (remote_pid_to_str, remote_get_thread_local_address)
10754         (remote_get_tib_address, remote_read_description): Refactor as
10755         methods of remote_target.
10756         (remote_target::fileio_open, remote_target::fileio_pwrite)
10757         (remote_target::fileio_pread, remote_target::fileio_close): New.
10758         (remote_hostio_readlink, remote_hostio_fstat)
10759         (remote_filesystem_is_local, remote_can_execute_reverse)
10760         (remote_supports_non_stop, remote_supports_disable_randomization)
10761         (remote_supports_multi_process, remote_supports_cond_breakpoints)
10762         (remote_supports_enable_disable_tracepoint)
10763         (remote_supports_string_tracing)
10764         (remote_can_run_breakpoint_commands, remote_trace_init)
10765         (remote_download_tracepoint, remote_can_download_tracepoint)
10766         (remote_download_trace_state_variable, remote_enable_tracepoint)
10767         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10768         (remote_trace_start, remote_get_trace_status)
10769         (remote_get_tracepoint_status, remote_trace_stop)
10770         (remote_trace_find, remote_get_trace_state_variable_value)
10771         (remote_save_trace_data, remote_get_raw_trace_data)
10772         (remote_set_disconnected_tracing, remote_core_of_thread)
10773         (remote_set_circular_trace_buffer, remote_traceframe_info)
10774         (remote_get_min_fast_tracepoint_insn_len)
10775         (remote_set_trace_buffer_size, remote_set_trace_notes)
10776         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10777         (remote_disable_btrace, remote_teardown_btrace)
10778         (remote_read_btrace, remote_btrace_conf)
10779         (remote_augmented_libraries_svr4_read, remote_load)
10780         (remote_pid_to_exec_file, remote_can_do_single_step)
10781         (remote_execution_direction, remote_thread_handle_to_thread_info):
10782         Refactor as methods of remote_target.
10783         (init_remote_ops, init_extended_remote_ops): Delete.
10784         (remote_can_async_p, remote_is_async_p, remote_async)
10785         (remote_thread_events, remote_upload_tracepoints)
10786         (remote_upload_trace_state_variables): Refactor as methods of
10787         remote_target.
10788         (_initialize_remote): Remove references to init_remote_ops and
10789         init_extended_remote_ops.
10790
10791         * remote-sim.c (gdbsim_target): New class.
10792         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10793         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10794         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10795         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10796         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10797         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10798         Refactor as methods of gdbsim_target.
10799         (gdbsim_ops): Now a gdbsim_target.
10800         (init_gdbsim_ops): Delete.
10801         (gdbsim_cntrl_c): Adjust.
10802         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10803
10804         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10805         (the_amd64_linux_nat_target): New.
10806         (amd64_linux_fetch_inferior_registers)
10807         (amd64_linux_store_inferior_registers): Refactor as methods of
10808         amd64_linux_nat_target.
10809         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
10810         * i386-linux-nat.c: Don't include "linux-nat.h".
10811         (i386_linux_nat_target): New class.
10812         (the_i386_linux_nat_target): New.
10813         (i386_linux_fetch_inferior_registers)
10814         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10815         as methods of i386_linux_nat_target.
10816         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10817         * inf-child.c (inf_child_ops): Delete.
10818         (inf_child_fetch_inferior_registers)
10819         (inf_child_store_inferior_registers): Delete.
10820         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10821         methods of inf_child_target.
10822         (inf_child_target::supports_terminal_ours)
10823         (inf_child_target::terminal_init)
10824         (inf_child_target::terminal_inferior)
10825         (inf_child_target::terminal_ours_for_output)
10826         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10827         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10828         New.
10829         (inf_child_open, inf_child_disconnect, inf_child_close)
10830         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10831         (inf_child_post_startup_inferior, inf_child_can_run)
10832         (inf_child_pid_to_exec_file): Refactor as methods of
10833         inf_child_target.
10834         (inf_child_follow_fork): Delete.
10835         (inf_child_target::can_create_inferior)
10836         (inf_child_target::can_attach): New.
10837         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10838         (inf_child_target::has_stack, inf_child_target::has_registers)
10839         (inf_child_target::has_execution): New.
10840         (inf_child_fileio_open, inf_child_fileio_pwrite)
10841         (inf_child_fileio_pread, inf_child_fileio_fstat)
10842         (inf_child_fileio_close, inf_child_fileio_unlink)
10843         (inf_child_fileio_readlink, inf_child_use_agent)
10844         (inf_child_can_use_agent): Refactor as methods of
10845         inf_child_target.
10846         (return_zero, inf_child_target): Delete.
10847         (inf_child_target::inf_child_target): New.
10848         * inf-child.h: Include "target.h".
10849         (inf_child_target): Delete function prototype.
10850         (inf_child_target): New class.
10851         (inf_child_open_target, inf_child_mourn_inferior)
10852         (inf_child_maybe_unpush_target): Delete.
10853         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10854         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10855         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10856         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10857         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10858         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10859         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10860         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10861         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10862         methods of inf_ptrace_target.
10863         (inf_ptrace_target): Delete function.
10864         * inf-ptrace.h: Include "inf-child.h".
10865         (inf_ptrace_target): Delete function declaration.
10866         (inf_ptrace_target): New class.
10867         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10868         * linux-nat.c (linux_target): New.
10869         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10870         (linux_nat_target::~linux_nat_target): New.
10871         (linux_child_post_attach, linux_child_post_startup_inferior)
10872         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10873         (linux_child_remove_fork_catchpoint)
10874         (linux_child_insert_vfork_catchpoint)
10875         (linux_child_remove_vfork_catchpoint)
10876         (linux_child_insert_exec_catchpoint)
10877         (linux_child_remove_exec_catchpoint)
10878         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10879         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10880         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10881         (linux_nat_stopped_data_address)
10882         (linux_nat_stopped_by_sw_breakpoint)
10883         (linux_nat_supports_stopped_by_sw_breakpoint)
10884         (linux_nat_stopped_by_hw_breakpoint)
10885         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10886         (linux_nat_kill, linux_nat_mourn_inferior)
10887         (linux_nat_xfer_partial, linux_nat_thread_alive)
10888         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10889         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10890         (linux_child_static_tracepoint_markers_by_strid)
10891         (linux_nat_is_async_p, linux_nat_can_async_p)
10892         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10893         (linux_nat_supports_multi_process)
10894         (linux_nat_supports_disable_randomization, linux_nat_async)
10895         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10896         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10897         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10898         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10899         methods of linux_nat_target.
10900         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10901         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10902         parameter.
10903         (check_stopped_by_watchpoint): Adjust.
10904         (linux_xfer_partial): Delete.
10905         (linux_target_install_ops, linux_target, linux_nat_add_target):
10906         Delete.
10907         (linux_nat_target::linux_nat_target): New.
10908         * linux-nat.h: Include "inf-ptrace.h".
10909         (linux_nat_target): New.
10910         (linux_target, linux_target_install_ops, linux_nat_add_target):
10911         Delete function declarations.
10912         (linux_target): Declare global.
10913         * linux-thread-db.c (thread_db_target): New.
10914         (thread_db_target::thread_db_target): New.
10915         (thread_db_ops): Delete.
10916         (the_thread_db_target): New.
10917         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10918         (thread_db_update_thread_list, thread_db_pid_to_str)
10919         (thread_db_extra_thread_info)
10920         (thread_db_thread_handle_to_thread_info)
10921         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10922         (thread_db_resume): Refactor as methods of thread_db_target.
10923         (init_thread_db_ops): Delete.
10924         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10925         * x86-linux-nat.c: Don't include "linux-nat.h".
10926         (super_post_startup_inferior): Delete.
10927         (x86_linux_nat_target::~x86_linux_nat_target): New.
10928         (x86_linux_child_post_startup_inferior)
10929         (x86_linux_read_description, x86_linux_enable_btrace)
10930         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10931         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10932         methods of x86_linux_nat_target.
10933         (x86_linux_create_target): Delete.  Bits folded ...
10934         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10935         pointer.
10936         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10937         (x86_linux_nat_target): New class.
10938         (x86_linux_create_target): Delete.
10939         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10940         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10941         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10942         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10943         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10944         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10945         make extern.
10946         (x86_use_watchpoints): Delete.
10947         * x86-nat.h: Include "breakpoint.h" and "target.h".
10948         (x86_use_watchpoints): Delete.
10949         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10950         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10951         (x86_insert_watchpoint, x86_remove_watchpoint)
10952         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10953         (x86_stopped_by_hw_breakpoint): New declarations.
10954         (x86_nat_target): New template class.
10955
10956         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10957         (the_ppc_linux_nat_target): New.
10958         (ppc_linux_fetch_inferior_registers)
10959         (ppc_linux_can_use_hw_breakpoint)
10960         (ppc_linux_region_ok_for_hw_watchpoint)
10961         (ppc_linux_ranged_break_num_registers)
10962         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10963         (ppc_linux_insert_mask_watchpoint)
10964         (ppc_linux_remove_mask_watchpoint)
10965         (ppc_linux_can_accel_watchpoint_condition)
10966         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10967         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10968         (ppc_linux_watchpoint_addr_within_range)
10969         (ppc_linux_masked_watch_num_registers)
10970         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10971         (ppc_linux_read_description): Refactor as methods of
10972         ppc_linux_nat_target.
10973         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10974
10975         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10976         (procfs_target): New class.
10977         (the_procfs_target): New.
10978         (procfs_target): Delete function.
10979         (procfs_auxv_parse, procfs_attach, procfs_detach)
10980         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10981         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10982         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10983         (procfs_create_inferior, procfs_update_thread_list)
10984         (procfs_thread_alive, procfs_pid_to_str)
10985         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10986         (procfs_stopped_data_address, procfs_insert_watchpoint)
10987         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10988         (proc_find_memory_regions, procfs_info_proc)
10989         (procfs_make_note_section): Refactor as methods of procfs_target.
10990         (_initialize_procfs): Adjust.
10991         * sol-thread.c (sol_thread_target): New class.
10992         (sol_thread_ops): Now a sol_thread_target.
10993         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10994         (sol_thread_fetch_registers, sol_thread_store_registers)
10995         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10996         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10997         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10998         (init_sol_thread_ops): Delete.
10999         (_initialize_sol_thread): Adjust.  Remove references to
11000         init_sol_thread_ops and complete_target_initialization.
11001
11002         * windows-nat.c (windows_nat_target): New class.
11003         (windows_fetch_inferior_registers)
11004         (windows_store_inferior_registers, windows_resume, windows_wait)
11005         (windows_attach, windows_detach, windows_pid_to_exec_file)
11006         (windows_files_info, windows_create_inferior)
11007         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11008         (windows_close, windows_pid_to_str, windows_xfer_partial)
11009         (windows_get_tib_address, windows_get_ada_task_ptid)
11010         (windows_thread_name, windows_thread_alive): Refactor as
11011         windows_nat_target methods.
11012         (do_initial_windows_stuff): Adjust.
11013         (windows_target): Delete function.
11014         (_initialize_windows_nat): Adjust.
11015
11016         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11017         (darwin_mourn_inferior, darwin_kill_inferior)
11018         (darwin_create_inferior, darwin_attach, darwin_detach)
11019         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11020         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11021         (darwin_supports_multi_process): Refactor as darwin_nat_target
11022         methods.
11023         (darwin_resume_to, darwin_files_info): Delete.
11024         (_initialize_darwin_inferior): Rename to ...
11025         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
11026         * darwin-nat.h: Include "inf-child.h".
11027         (darwin_nat_target): New class.
11028         (darwin_complete_target): Delete.
11029         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11030         (darwin_target): New.
11031         (i386_darwin_fetch_inferior_registers)
11032         (i386_darwin_store_inferior_registers): Refactor as methods of
11033         darwin_nat_target.
11034         (darwin_complete_target): Delete, with ...
11035         (_initialize_i386_darwin_nat): ... bits factored out here.
11036
11037         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11038         (the_alpha_linux_nat_target): New.
11039         (alpha_linux_register_u_offset): Refactor as
11040         alpha_linux_nat_target method.
11041         (_initialize_alpha_linux_nat): Adjust.
11042         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11043         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11044         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11045         methods of linux_nat_trad_target.
11046         (linux_trad_target): Delete.
11047         * linux-nat-trad.h (linux_trad_target): Delete function.
11048         (linux_nat_trad_target): New class.
11049         * mips-linux-nat.c (mips_linux_nat_target): New class.
11050         (super_fetch_registers, super_store_registers, super_close):
11051         Delete.
11052         (the_mips_linux_nat_target): New.
11053         (mips64_linux_regsets_fetch_registers)
11054         (mips64_linux_regsets_store_registers)
11055         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11056         (mips_linux_register_u_offset, mips_linux_read_description)
11057         (mips_linux_can_use_hw_breakpoint)
11058         (mips_linux_stopped_by_watchpoint)
11059         (mips_linux_stopped_data_address)
11060         (mips_linux_region_ok_for_hw_watchpoint)
11061         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11062         (mips_linux_close): Refactor as methods of mips_linux_nat.
11063         (_initialize_mips_linux_nat): Adjust to C++ification.
11064
11065         * aix-thread.c (aix_thread_target): New class.
11066         (aix_thread_ops): Now an aix_thread_target.
11067         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11068         (aix_thread_fetch_registers, aix_thread_store_registers)
11069         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11070         (aix_thread_thread_alive, aix_thread_pid_to_str)
11071         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11072         Refactor as methods of aix_thread_target.
11073         (init_aix_thread_ops): Delete.
11074         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11075         and complete_target_initialization.
11076         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11077         (rs6000_nat_target): New class.
11078         (the_rs6000_nat_target): New.
11079         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11080         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11081         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11082         (super_create_inferior): Delete.
11083         (_initialize_rs6000_nat): Adjust to C++ification.
11084
11085         * arm-linux-nat.c (arm_linux_nat_target): New class.
11086         (the_arm_linux_nat_target): New.
11087         (arm_linux_fetch_inferior_registers)
11088         (arm_linux_store_inferior_registers, arm_linux_read_description)
11089         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11090         (arm_linux_remove_hw_breakpoint)
11091         (arm_linux_region_ok_for_hw_watchpoint)
11092         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11093         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11094         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11095         arm_linux_nat_target.
11096         (_initialize_arm_linux_nat): Adjust to C++ification.
11097
11098         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11099         (the_aarch64_linux_nat_target): New.
11100         (aarch64_linux_fetch_inferior_registers)
11101         (aarch64_linux_store_inferior_registers)
11102         (aarch64_linux_child_post_startup_inferior)
11103         (aarch64_linux_read_description)
11104         (aarch64_linux_can_use_hw_breakpoint)
11105         (aarch64_linux_insert_hw_breakpoint)
11106         (aarch64_linux_remove_hw_breakpoint)
11107         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11108         (aarch64_linux_region_ok_for_hw_watchpoint)
11109         (aarch64_linux_stopped_data_address)
11110         (aarch64_linux_stopped_by_watchpoint)
11111         (aarch64_linux_watchpoint_addr_within_range)
11112         (aarch64_linux_can_do_single_step): Refactor as methods of
11113         aarch64_linux_nat_target.
11114         (super_post_startup_inferior): Delete.
11115         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11116
11117         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11118         (the_hppa_linux_nat_target): New.
11119         (hppa_linux_fetch_inferior_registers)
11120         (hppa_linux_store_inferior_registers): Refactor as methods of
11121         hppa_linux_nat_target.
11122         (_initialize_hppa_linux_nat): Adjust to C++ification.
11123
11124         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11125         (the_ia64_linux_nat_target): New.
11126         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11127         (ia64_linux_stopped_data_address)
11128         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11129         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11130         ia64_linux_nat_target methods.
11131         (super_xfer_partial): Delete.
11132         (_initialize_ia64_linux_nat): Adjust to C++ification.
11133
11134         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11135         (the_m32r_linux_nat_target): New.
11136         (m32r_linux_fetch_inferior_registers)
11137         (m32r_linux_store_inferior_registers): Refactor as
11138         m32r_linux_nat_target methods.
11139         (_initialize_m32r_linux_nat): Adjust to C++ification.
11140
11141         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11142         (the_m68k_linux_nat_target): New.
11143         (m68k_linux_fetch_inferior_registers)
11144         (m68k_linux_store_inferior_registers): Refactor as
11145         m68k_linux_nat_target methods.
11146         (_initialize_m68k_linux_nat): Adjust to C++ification.
11147
11148         * s390-linux-nat.c (s390_linux_nat_target): New class.
11149         (the_s390_linux_nat_target): New.
11150         (s390_linux_fetch_inferior_registers)
11151         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11152         (s390_insert_watchpoint, s390_remove_watchpoint)
11153         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11154         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11155         (s390_auxv_parse, s390_read_description): Refactor as methods of
11156         s390_linux_nat_target.
11157         (_initialize_s390_nat): Adjust to C++ification.
11158
11159         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11160         (the_sparc_linux_nat_target): New.
11161         (_initialize_sparc_linux_nat): Adjust to C++ification.
11162         * sparc-nat.c (sparc_fetch_inferior_registers)
11163         (sparc_store_inferior_registers): Remove target_ops parameter.
11164         * sparc-nat.h (sparc_fetch_inferior_registers)
11165         (sparc_store_inferior_registers): Remove target_ops parameter.
11166         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11167         (the_sparc64_linux_nat_target): New.
11168         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11169
11170         * spu-linux-nat.c (spu_linux_nat_target): New class.
11171         (the_spu_linux_nat_target): New.
11172         (spu_child_post_startup_inferior, spu_child_post_attach)
11173         (spu_child_wait, spu_fetch_inferior_registers)
11174         (spu_store_inferior_registers, spu_xfer_partial)
11175         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11176         methods.
11177         (_initialize_spu_nat): Adjust to C++ification.
11178
11179         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11180         (the_tilegx_linux_nat_target): New.
11181         (fetch_inferior_registers, store_inferior_registers):
11182         Refactor as methods.
11183         (_initialize_tile_linux_nat): Adjust to C++ification.
11184
11185         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11186         (the_xtensa_linux_nat_target): New.
11187         (xtensa_linux_fetch_inferior_registers)
11188         (xtensa_linux_store_inferior_registers): Refactor as
11189         xtensa_linux_nat_target methods.
11190         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11191
11192         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11193         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11194         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11195         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11196         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11197         (fbsd_stopped_by_sw_breakpoint)
11198         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11199         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11200         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11201         (fbsd_post_startup_inferior, fbsd_post_attach)
11202         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11203         (fbsd_set_syscall_catchpoint)
11204         (super_xfer_partial, super_resume, super_wait)
11205         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11206         (fbsd_handle_debug_trap): Remove target_ops parameter.
11207         (fbsd_nat_add_target): Delete.
11208         * fbsd-nat.h: Include "inf-ptrace.h".
11209         (fbsd_nat_add_target): Delete.
11210         (USE_SIGTRAP_SIGINFO): Define.
11211         (fbsd_nat_target): New class.
11212
11213         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11214         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11215         (amd64bsd_target): Delete.
11216         * amd64-bsd-nat.h: New file.
11217         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11218         "x86-bsd-nat.h".
11219         (amd64_fbsd_nat_target): New class.
11220         (the_amd64_fbsd_nat_target): New.
11221         (amd64fbsd_read_description): Refactor as method of
11222         amd64_fbsd_nat_target.
11223         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11224         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11225         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11226         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11227         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11228         (i386bsd_target): Delete.
11229         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11230         (i386bsd_fetch_inferior_registers)
11231         (i386bsd_store_inferior_registers): Declare.
11232         (i386_bsd_nat_target): New class.
11233         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11234         (the_i386_fbsd_nat_target): New.
11235         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11236         i386_fbsd_nat_target methods.
11237         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11238         (_initialize_i386fbsd_nat): Adjust to C++ification.
11239         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11240         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11241         (_initialize_x86_bsd_nat): Adjust to C++ification.
11242         * x86-bsd-nat.h: Include "x86-nat.h".
11243         (x86bsd_target): Delete declaration.
11244         (x86bsd_nat_target): New class.
11245
11246         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11247         (the_aarch64_fbsd_nat_target): New.
11248         (aarch64_fbsd_fetch_inferior_registers)
11249         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11250         aarch64_fbsd_nat_target.
11251         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11252         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11253         (the_alpha_bsd_nat_target): New.
11254         (alphabsd_fetch_inferior_registers)
11255         (alphabsd_store_inferior_registers): Refactor as
11256         alpha_bsd_nat_target methods.
11257         (_initialize_alphabsd_nat): Refactor as methods of
11258         alpha_bsd_nat_target.
11259         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11260         (the_amd64_nbsd_nat_target): New.
11261         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11262         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11263         (the_amd64_obsd_nat_target): New.
11264         (_initialize_amd64obsd_nat): Adjust to C++ification.
11265         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11266         (the_arm_fbsd_nat_target): New.
11267         (arm_fbsd_fetch_inferior_registers)
11268         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11269         (_initialize_arm_fbsd_nat): Refactor as methods of
11270         arm_fbsd_nat_target.
11271         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11272         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11273         (the_arm_netbsd_nat_target): New.
11274         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11275         arm_netbsd_nat_target.
11276         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11277         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11278         (the_hppa_nbsd_nat_target): New.
11279         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11280         hppa_nbsd_nat_target methods.
11281         (_initialize_hppanbsd_nat): Adjust to C++ification.
11282         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11283         (the_hppa_obsd_nat_target): New.
11284         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11285         methods of hppa_obsd_nat_target.
11286         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11287         add_target.
11288         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11289         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11290         add_target.
11291         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11292         (_initialize_i386obsd_nat): Use add_target.
11293         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11294         (the_m68k_bsd_nat_target): New.
11295         (m68kbsd_fetch_inferior_registers)
11296         (m68kbsd_store_inferior_registers): Refactor as methods of
11297         m68k_bsd_nat_target.
11298         (_initialize_m68kbsd_nat): Adjust to C++ification.
11299         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11300         (the_mips_fbsd_nat_target): New.
11301         (mips_fbsd_fetch_inferior_registers)
11302         (mips_fbsd_store_inferior_registers): Refactor as methods of
11303         mips_fbsd_nat_target.
11304         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11305         add_target.
11306         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11307         (the_mips_nbsd_nat_target): New.
11308         (mipsnbsd_fetch_inferior_registers)
11309         (mipsnbsd_store_inferior_registers): Refactor as methods of
11310         mips_nbsd_nat_target.
11311         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11312         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11313         (the_mips64_obsd_nat_target): New.
11314         (mips64obsd_fetch_inferior_registers)
11315         (mips64obsd_store_inferior_registers): Refactor as methods of
11316         mips64_obsd_nat_target.
11317         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11318         add_target.
11319         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11320         nbsd_nat_target.
11321         * nbsd-nat.h: Include "inf-ptrace.h".
11322         (nbsd_nat_target): New class.
11323         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11324         (obsd_wait): Refactor as methods of obsd_nat_target.
11325         (obsd_add_target): Delete.
11326         * obsd-nat.h: Include "inf-ptrace.h".
11327         (obsd_nat_target): New class.
11328         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11329         (the_ppc_fbsd_nat_target): New.
11330         (ppcfbsd_fetch_inferior_registers)
11331         (ppcfbsd_store_inferior_registers): Refactor as methods of
11332         ppc_fbsd_nat_target.
11333         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11334         add_target.
11335         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11336         (the_ppc_nbsd_nat_target): New.
11337         (ppcnbsd_fetch_inferior_registers)
11338         (ppcnbsd_store_inferior_registers): Refactor as methods of
11339         ppc_nbsd_nat_target.
11340         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11341         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11342         (the_ppc_obsd_nat_target): New.
11343         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11344         methods of ppc_obsd_nat_target.
11345         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11346         add_target.
11347         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11348         (the_sh_nbsd_nat_target): New.
11349         (shnbsd_fetch_inferior_registers)
11350         (shnbsd_store_inferior_registers): Refactor as methods of
11351         sh_nbsd_nat_target.
11352         (_initialize_shnbsd_nat): Adjust to C++ification.
11353         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11354         (inf_ptrace_xfer_partial): Delete.
11355         (sparc_xfer_partial, sparc_target): Delete.
11356         * sparc-nat.h (sparc_fetch_inferior_registers)
11357         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11358         (sparc_target): Delete function declaration.
11359         (sparc_target): New template class.
11360         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11361         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11362         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11363         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11364         add_target.
11365         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11366         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11367         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11368         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11369         add_target.
11370         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11371         (the_vax_bsd_nat_target): New.
11372         (vaxbsd_fetch_inferior_registers)
11373         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11374         methods.
11375         (_initialize_vaxbsd_nat): Adjust to C++ification.
11376
11377         * bsd-kvm.c (bsd_kvm_target): New class.
11378         (bsd_kvm_ops): Now a bsd_kvm_target.
11379         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11380         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11381         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11382         bsd_kvm_target.
11383         (bsd_kvm_return_one): Delete.
11384         (bsd_kvm_add_target): Adjust to C++ification.
11385
11386         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11387         (nto_procfs_target_procfs): New classes.
11388         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11389         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11390         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11391         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11392         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11393         (procfs_remove_hw_breakpoint, procfs_resume)
11394         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11395         (procfs_kill_inferior, procfs_store_registers)
11396         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11397         as methods of nto_procfs_target.
11398         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11399         (nto_native_ops): Delete.
11400         (procfs_open, procfs_native_open): Delete.
11401         (nto_native_ops): Now an nto_procfs_target_native.
11402         (init_procfs_targets): Adjust to C++ification.
11403         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11404         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11405         Refactor as methods of nto_procfs_target.
11406
11407         * go32-nat.c (go32_nat_target): New class.
11408         (the_go32_nat_target): New.
11409         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11410         (go32_store_registers, go32_xfer_partial, go32_files_info)
11411         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11412         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11413         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11414         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11415         (go32_target): Delete.
11416         (_initialize_go32_nat): Adjust to C++ification.
11417
11418         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11419         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11420         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11421         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11422         gnu_nat_target.
11423         (gnu_target): Delete.
11424         * gnu-nat.h (gnu_target): Delete.
11425         (gnu_nat_target): New class.
11426         * i386-gnu-nat.c (gnu_base_target): New.
11427         (i386_gnu_nat_target): New class.
11428         (the_i386_gnu_nat_target): New.
11429         (_initialize_i386gnu_nat): Adjust to C++ification.
11430
11431 2018-05-02  Pedro Alves  <palves@redhat.com>
11432
11433         * bfd-target.c (target_bfd_xclose): Rename to ...
11434         (target_bfd_close): ... this.
11435         (target_bfd_reopen): Adjust.
11436         * target.c (target_close): Remove references to to_xclose.
11437         * target.h (target_ops::to_xclose): Delete.
11438         (target_ops::to_close): Update comments.
11439
11440 2018-05-02  Pedro Alves  <palves@redhat.com>
11441
11442         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11443         "linux-nat.h".
11444         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11445         * inf-ptrace.c (inf_ptrace_register_u_offset)
11446         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11447         (inf_ptrace_store_register, inf_ptrace_store_registers)
11448         (inf_ptrace_trad_target): Move to ...
11449         * linux-nat-trad.c: ... this new file.
11450         * linux-nat-trad.h: New file.
11451         * linux-nat.c (linux_target_install_ops): Make extern.
11452         (linux_trad_target): Delete.
11453         * linux-nat.h (linux_trad_target): Delete declaration.
11454         (linux_target_install_ops): Declare.
11455         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11456         "linux-nat.h".
11457
11458 2018-05-02  Pedro Alves  <palves@redhat.com>
11459
11460         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11461         procfs_target/add_target here.
11462         * procfs.c (procfs_target): Make static.
11463         (_initialize_procfs): Call add_target here.
11464         * procfs.h (struct target_ops): Remove forward declaration.
11465         (procfs_target): Remove declaration.
11466         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11467
11468 2018-05-02  Pedro Alves  <palves@redhat.com>
11469
11470         * procfs.c (procfs_stopped_by_watchpoint)
11471         (procfs_insert_watchpoint, procfs_remove_watchpoint)
11472         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11473         Forward declare.
11474         (procfs_use_watchpoints): Delete, move contents...
11475         (procfs_target): ... here.
11476         * procfs.h (procfs_use_watchpoints): Delete declaration.
11477         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11478         procfs_use_watchpoints.
11479         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
11480         procfs_use_watchpoints.
11481
11482 2018-05-02  Tom Tromey  <tom@tromey.com>
11483
11484         PR python/20084:
11485         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
11486         and var_zuinteger_unlimited.
11487         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
11488         and PARAM_ZUINTEGER_UNLIMITED.
11489         (set_parameter_value): Handle var_zuinteger and
11490         var_zuinteger_unlimited.
11491         (add_setshow_generic): Likewise.
11492         (parmpy_init): Likewise.
11493
11494 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
11495
11496         PR rust/23124
11497         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
11498         pointer is not null before dereferencing it.
11499
11500 2018-04-30  Tom Tromey  <tom@tromey.com>
11501
11502         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
11503         is_mi_like_p.
11504
11505 2018-04-30  Tom Tromey  <tom@tromey.com>
11506
11507         * breakpoint.c (mention): Remove use of is_mi_like_p.
11508         (print_mention_ranged_breakpoint): Likewise.
11509         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
11510         of is_mi_like_p.
11511
11512 2018-04-30  Tom Tromey  <tom@tromey.com>
11513
11514         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
11515
11516 2018-04-30  Tom Tromey  <tom@tromey.com>
11517
11518         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
11519         (info_spu_event_command): Remove some uses of is_mi_like_p.
11520
11521 2018-04-30  Tom Tromey  <tom@tromey.com>
11522
11523         * python/py-framefilter.c (py_print_single_arg)
11524         (enumerate_locals, py_print_args, py_print_frame): Remove some
11525         uses of is_mi_like_p.
11526
11527 2018-04-30  Tom Tromey  <tom@tromey.com>
11528
11529         * ui-out.c: Update.
11530         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
11531         * ui-out.h (ui_out::is_mi_like_p): Now const.
11532         (ui_out::do_is_mi_like_p): Now const.
11533         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
11534
11535 2018-04-30  Tom Tromey  <tom@tromey.com>
11536
11537         * varobj.c (varobj_set_visualizer): Use new_reference.
11538         * python/python.c (gdbpy_decode_line): Use new_reference.
11539         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
11540         new_reference.
11541
11542 2018-04-30  Tom Tromey  <tom@tromey.com>
11543
11544         * varobj.c (install_new_value): Use new_reference.
11545         * value.h (value_incref): Return void.  Swap intro comment with
11546         value_decref.
11547         * value.c (set_value_parent): Use new_reference.
11548         (value_incref): Return void.  Update intro comment.
11549         (release_value): Use new_reference.
11550         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
11551
11552 2018-04-30  Tom Tromey  <tom@tromey.com>
11553
11554         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
11555         * gdb_bfd.h (new_bfd_ref): Remove.
11556         (gdb_bfd_open): Update comment.
11557         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11558         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
11559         (gdb_bfd_fdopenr): Use new_reference.
11560         * exec.c (exec_file_attach): Use new_reference.
11561
11562 2018-04-30  Tom Tromey  <tom@tromey.com>
11563
11564         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
11565         method.
11566
11567 2018-04-30  Tom Tromey  <tom@tromey.com>
11568
11569         * jit.c (jit_read_code_entry): Use type_align.
11570         * i386-tdep.c (i386_gdbarch_init): Don't call
11571         set_gdbarch_long_long_align_bit.
11572         * gdbarch.sh: Remove long_long_align_bit.
11573         * gdbarch.c, gdbarch.h: Rebuild.
11574         * arc-tdep.c (arc_type_align): New function.
11575         (arc_gdbarch_init): Use arc_type_align.  Don't call
11576         set_gdbarch_long_long_align_bit.
11577
11578 2018-04-30  Tom Tromey  <tom@tromey.com>
11579
11580         * rust-lang.c (rust_type_alignment): Remove.
11581         (rust_composite_type): Use type_align.
11582
11583 2018-04-30  Tom Tromey  <tom@tromey.com>
11584
11585         * NEWS: Mention Type.align.
11586         * python/py-type.c (typy_get_alignof): New function.
11587         (type_object_getset): Add "alignof".
11588
11589 2018-04-30  Tom Tromey  <tom@tromey.com>
11590
11591         PR exp/17095:
11592         * NEWS: Update.
11593         * std-operator.def (UNOP_ALIGNOF): New operator.
11594         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
11595         New.
11596         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
11597         * c-lang.c (c_op_print_tab): Add alignof.
11598         * c-exp.y (ALIGNOF): New token.
11599         (exp): Add "ALIGNOF" production.
11600         (ident_tokens): Add _Alignof and alignof.
11601
11602 2018-04-30  Tom Tromey  <tom@tromey.com>
11603
11604         * i386-tdep.c (i386_type_align): New function.
11605         (i386_gdbarch_init): Update.
11606         * gdbarch.sh (type_align): New method.
11607         * gdbarch.c, gdbarch.h: Rebuild.
11608         * arch-utils.h (default_type_align): Declare.
11609         * arch-utils.c (default_type_align): New function.
11610         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
11611         (struct type) <align_log2>: New field.
11612         <instance_flags>: Now a bitfield.
11613         (TYPE_RAW_ALIGN): New macro.
11614         (type_align, type_raw_align, set_type_align): Declare.
11615         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
11616         functions.
11617         * dwarf2read.c (quirk_rust_enum): Set type alignment.
11618         (get_alignment, maybe_set_alignment): New functions.
11619         (read_structure_type, read_enumeration_type, read_array_type)
11620         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
11621         (read_subrange_type, read_base_type): Set type alignment.
11622
11623 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
11624
11625         * dwarf2read.c (read_index_from_section): Use bool.
11626
11627 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
11628
11629         PR gdb/22950
11630         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
11631         with #ifdef.
11632
11633 2018-04-29  John Reiser  <jreiser@BitWagon.com>
11634
11635         PR build/22873
11636         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
11637         last step, and do it atomically.
11638
11639 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
11640
11641         * compile/compile-c-types.c (convert_int, convert_float):
11642         Update for C FE v1.
11643
11644 2018-04-27  Tom Tromey  <tom@tromey.com>
11645
11646         PR rust/22545:
11647         * rust-lang.c (rust_inclusive_range_type_p): New function.
11648         (rust_range): Handle inclusive ranges.
11649         (rust_compute_range): Likewise.
11650         * rust-exp.y (struct rust_op) <inclusive>: New field.
11651         (DOTDOTEQ): New constant.
11652         (range_expr): Add "..=" productions.
11653         (operator_tokens): Add "..=" token.
11654         (ast_range): Add "inclusive" parameter.
11655         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
11656         ranges.
11657         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
11658         bounds values.
11659         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
11660         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
11661         Update comments.
11662         * expprint.c (print_subexp_standard): Handle new bounds values.
11663         (dump_subexp_body_standard): Likewise.
11664
11665 2018-04-27  Tom Tromey  <tom@tromey.com>
11666
11667         * configure: Rebuild.
11668         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
11669         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
11670         "OVERRIDE".
11671         (class symbol_needs_eval_context): Likewise.
11672         * dwarf2read.c (mock_mapped_index::symbol_name_count)
11673         (mock_mapped_index::symbol_name_at): Use "override".  Remove
11674         "virtual".
11675         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
11676         "override".
11677         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
11678         * aarch64-tdep.c (instruction_reader::read): Use "override".
11679         (instruction_reader_test::read): Likewise.
11680         * arm-tdep.c (instruction_reader::read): Use "override".
11681         (instruction_reader_thumb::read): Likewise.
11682
11683 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
11684
11685         PR remote/9665
11686         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
11687         instead of remote_send.
11688         (remote_send): Remove.
11689
11690 2018-04-26  Pedro Alves  <palves@redhat.com>
11691
11692         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
11693         find_function_start_sal instead of find_pc_line.
11694
11695 2018-04-26  Pedro Alves  <palves@redhat.com>
11696
11697         * breakpoint.c (set_breakpoint_location_function): Handle
11698         mst_data_gnu_ifunc.
11699         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
11700         * elfread.c (elf_symtab_read): Give data symbols with
11701         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
11702         (elf_rel_plt_read): Update comment.
11703         * linespec.c (convert_linespec_to_sals): Handle
11704         mst_data_gnu_ifunc.
11705         (minsym_found): Handle mst_data_gnu_ifunc.
11706         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
11707         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
11708         * parse.c (find_minsym_type_and_address): Handle
11709         mst_data_gnu_ifunc.
11710         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
11711         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
11712         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
11713         comment.
11714         <mst_data_gnu_ifunc>: New enumerator.
11715
11716 2018-04-26  Pedro Alves  <palves@redhat.com>
11717
11718         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
11719         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
11720         'want_trampoline' parameter by a lookup_msym_prefer parameter.
11721         Handle it.
11722         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
11723         (lookup_minimal_symbol_by_pc): Adjust.
11724         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
11725         (lookup_solib_trampoline_symbol_by_pc): Adjust.
11726         * minsyms.h (lookup_msym_prefer): New enum.
11727         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11728         parameter by a lookup_msym_prefer parameter.
11729
11730 2018-04-26  Pedro Alves  <palves@redhat.com>
11731
11732         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
11733         ends in "@plt" instead of looking at the symbol's section.
11734
11735 2018-04-26  Pedro Alves  <palves@redhat.com>
11736
11737         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
11738         all references.
11739         (find_pc_partial_function_gnu_ifunc): Rename to ...
11740         (find_pc_partial_function): ... this, and remove references to
11741         'is_gnu_ifunc_p'.
11742         (find_pc_partial_function): Delete old implementation.
11743         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
11744
11745 2018-04-26  Pedro Alves  <palves@redhat.com>
11746
11747         * linespec.c (struct bound_minimal_symbol_search_key): New.
11748         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
11749         skip first line if we found a GNU ifunc minimal symbol by name.
11750         (compare_msymbols): Change parameters to work with a destructured
11751         lhs minsym.
11752         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11753         functions.
11754
11755 2018-04-26  Pedro Alves  <palves@redhat.com>
11756
11757         * breakpoint.c (set_breakpoint_location_function): Don't resolve
11758         ifunc targets here.  Instead, if we have an ifunc minsym, use its
11759         address/name.
11760         (add_location_to_breakpoint): Store the minsym and the objfile in
11761         the breakpoint location.
11762         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11763         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11764         Record the minsym in the sal.
11765         * symtab.h (symtab_and_line) <msymbol>: New field.
11766
11767 2018-04-26  Pedro Alves  <palves@redhat.com>
11768
11769         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11770         unless we actually resolved the ifunc.
11771
11772 2018-04-26  Pedro Alves  <palves@redhat.com>
11773
11774         * c-exp.y (variable production): Prefer ifunc minsyms over
11775         regular function symbols.
11776         * symtab.c (find_gnu_ifunc): New function.
11777         * minsyms.h (lookup_msym_prefer): New enum.
11778         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11779         parameter by a lookup_msym_prefer parameter.
11780         * symtab.h (find_gnu_ifunc): New declaration.
11781
11782 2018-04-26  Pedro Alves  <palves@redhat.com>
11783
11784         * blockframe.c (find_gnu_ifunc_target_type): New function.
11785         (find_function_type): New.
11786         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11787         return a value with a memory address.
11788         (eval_call): For calls to GNU ifunc functions, try to find the
11789         type of the target function from the type that the resolver
11790         returns.
11791         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11792         symbols.
11793         * infcall.c (find_function_return_type): Delete.
11794         (find_function_addr): Add 'function_type' parameter.  For calls to
11795         GNU ifunc functions, try to find the type of the target function
11796         from the type that the resolver returns, and return it via
11797         FUNCTION_TYPE.
11798         (call_function_by_hand_dummy): Adjust to use the function type
11799         returned by find_function_addr.
11800         (find_function_addr): Add 'function_type' parameter and move
11801         description here.
11802         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11803         declarations.
11804
11805 2018-04-26  Pedro Alves  <palves@redhat.com>
11806
11807         * c-exp.y (variable production): Skip finding an alias for ifunc
11808         symbols.
11809
11810 2018-04-26  Pedro Alves  <palves@redhat.com>
11811
11812         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11813
11814 2018-04-25  Pedro Alves  <palves@redhat.com>
11815
11816         * infcmd.c (kill_command): Print the pid as string, not the whole
11817         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11818         message.
11819         * remote.c (remote_detach_1): Print the pid as string, not the
11820         whole thread's ptid.
11821
11822 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11823             Sergio Durigan Junior  <sergiodj@redhat.com>
11824             Pedro Alves  <palves@redhat.com>
11825
11826         * infcmd.c (kill_command): Print message when inferior has
11827         been killed.
11828         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11829         '1'.
11830         (add_inferior): Improve message printed when
11831         'print_inferior_events' is on.
11832         (exit_inferior): Remove message printed when
11833         'print_inferior_events' is on.
11834         (detach_inferior): Improve message printed when
11835         'print_inferior_events' is on.
11836         (initialize_inferiors): Use 'add_inferior_silent' to set
11837         'current_inferior_'.
11838         * inferior.h (print_inferior_events): Declare here as
11839         'extern'.
11840         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11841         '[Detaching...]' messages when 'print_inferior_events' is on.
11842         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11843         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11844         'Detaching after fork from child...', replace it by '... from
11845         parent...'.
11846         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11847         prefix/suffix when printing 'Detaching...' messages.  Print
11848         them when 'print_inferior_events' is on.
11849         * remote.c (remote_detach_1): Print message when detaching
11850         from inferior and '!is_fork_parent'.
11851
11852 2018-04-24  Tom Tromey  <tom@tromey.com>
11853
11854         * cli-out.h: Reindent.
11855
11856 2018-04-24  Tom Tromey  <tom@tromey.com>
11857
11858         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11859         (cli_ui_out::do_field_string): Use fputs_filtered.
11860         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11861
11862 2018-04-23  Tom Tromey  <tom@tromey.com>
11863
11864         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11865         gdb::unique_xmalloc_ptr.
11866
11867 2018-04-23  Tom Tromey  <tom@tromey.com>
11868
11869         * configure: Rebuild.
11870
11871 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
11872
11873         PR gdb/23095
11874         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11875         prepare_for_testing.  Set normal_bp to r_debug_state if target
11876         is bsd.
11877
11878 2018-04-21  Pedro Alves  <palves@redhat.com>
11879             Rajendra SY  <rajendra.sy@gmail.com>
11880
11881         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11882         * remote.c (extended_remote_attach): In all-stop mode, mark the
11883         thread as executing.
11884
11885 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11886
11887         * thread.c (thread_apply_all_command): Fix comment.
11888         (thread_command): Fix comment.
11889
11890 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11891
11892         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11893         parameter.
11894         * features/aarch64-core.c (create_feature_aarch64_core):
11895         Regenerate.
11896         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11897         Likewise.
11898         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11899         Likewise.
11900         * features/i386/32bit-avx512.c
11901         (create_feature_i386_32bit_avx512): Likewise.
11902         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11903         Likewise.
11904         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11905         Likewise.
11906         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11907         Likewise.
11908         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11909         Likewise.
11910         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11911         Likewise.
11912         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11913         Likewise.
11914         * features/i386/64bit-avx512.c
11915         (create_feature_i386_64bit_avx512): Likewise.
11916         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11917         Likewise.
11918         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11919         Likewise.
11920         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11921         Likewise.
11922         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11923         Likewise.
11924         * features/i386/64bit-segments.c
11925         (create_feature_i386_64bit_segments): Likewise.
11926         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11927         Likewise.
11928         * features/i386/x32-core.c
11929         (create_feature_i386_x32_core): Likewise.
11930         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11931         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11932         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11933         * target-descriptions.c: In generated code, don't pass xml
11934         filename.
11935
11936 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11937
11938         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11939         (print_xml_feature::visit_post): Likewise.
11940         (print_xml_feature::visit): Likewise.
11941         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11942         (print_xml_feature): Add new class.
11943         * regformats/regdat.sh: Null xmltarget on feature targets.
11944         * target-descriptions.c (struct target_desc): Add xmltarget.
11945         (maintenance_check_tdesc_xml_convert): Add unittest function.
11946         (tdesc_get_features_xml): Add function to get xml.
11947         (maintenance_check_xml_descriptions): Test xml generation.
11948         * xml-tdesc.c (string_read_description_xml): Add function.
11949         * xml-tdesc.h (string_read_description_xml): Add declaration.
11950
11951 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11952
11953         * features/Makefile: Add feature marker to targets with new style
11954         target descriptions.
11955         * regformats/aarch64.dat: Regenerate.
11956         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11957         * regformats/i386/amd64-avx-linux.dat: Likewise.
11958         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11959         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11960         * regformats/i386/amd64-linux.dat: Likewise.
11961         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11962         * regformats/i386/amd64.dat: Likewise.
11963         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11964         * regformats/i386/i386-avx-linux.dat: Likewise.
11965         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11966         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11967         * regformats/i386/i386-linux.dat: Likewise.
11968         * regformats/i386/i386-mmx-linux.dat: Likewise.
11969         * regformats/i386/i386-mpx-linux.dat: Likewise.
11970         * regformats/i386/i386.dat: Likewise.
11971         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11972         * regformats/i386/x32-avx-linux.dat: Likewise.
11973         * regformats/i386/x32-linux.dat: Likewise.
11974         * regformats/tic6x-c62x-linux.dat: Likewise.
11975         * regformats/tic6x-c64x-linux.dat: Likewise.
11976         * regformats/tic6x-c64xp-linux.dat: Likewise.
11977         * regformats/regdat.sh: Parse feature marker.
11978
11979 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11980
11981         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11982         (tdesc_osabi_name): Likewise.
11983         * target-descriptions.c (tdesc_architecture_name): Add new
11984         function.
11985         (tdesc_osabi_name): Likewise.
11986
11987 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11988
11989         * common/tdesc.c (tdesc_predefined_type): Move to here.
11990         (tdesc_named_type): Likewise.
11991         (tdesc_create_vector): Likewise.
11992         (tdesc_create_struct): Likewise.
11993         (tdesc_set_struct_size): Likewise.
11994         (tdesc_create_union): Likewise.
11995         (tdesc_create_flags): Likewise.
11996         (tdesc_create_enum): Likewise.
11997         (tdesc_add_field): Likewise.
11998         (tdesc_add_typed_bitfield): Likewise.
11999         (tdesc_add_bitfield): Likewise.
12000         (tdesc_add_flag): Likewise.
12001         (tdesc_add_enum_value): Likewise.
12002         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12003         (struct tdesc_type_vector): Likewise.
12004         (struct tdesc_type_field): Likewise.
12005         (struct tdesc_type_with_fields): Likewise.
12006         (tdesc_create_enum): Add declaration.
12007         (tdesc_add_typed_bitfield): Likewise.
12008         (tdesc_add_enum_value): Likewise.
12009         * target-descriptions.c (tdesc_type_field): Move from here.
12010         (tdesc_type_builtin): Likewise.
12011         (tdesc_type_vector): Likewise.
12012         (tdesc_type_with_fields): Likewise.
12013         (tdesc_predefined_types): Likewise.
12014         (tdesc_named_type): Likewise.
12015         (tdesc_create_vector): Likewise.
12016         (tdesc_create_struct): Likewise.
12017         (tdesc_set_struct_size): Likewise.
12018         (tdesc_create_union): Likewise.
12019         (tdesc_create_flags): Likewise.
12020         (tdesc_create_enum): Likewise.
12021         (tdesc_add_field): Likewise.
12022         (tdesc_add_typed_bitfield): Likewise.
12023         (tdesc_add_bitfield): Likewise.
12024         (tdesc_add_flag): Likewise.
12025         (tdesc_add_enum_value): Likewise.
12026         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12027         (tdesc_add_typed_bitfield): Likewise.
12028         (tdesc_add_enum_value): Likewise.
12029
12030 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12031
12032         * common/tdesc.c (tdesc_feature::accept): Move to here.
12033         (tdesc_feature::operator==): Likewise.
12034         (tdesc_create_reg): Likewise.
12035         * common/tdesc.h (tdesc_type_kind): Likewise.
12036         (struct tdesc_type): Likewise.
12037         (struct tdesc_feature): Likewise.
12038         * regformats/regdat.sh: Create a feature.
12039         * target-descriptions.c (tdesc_type_kind): Move from here.
12040         (tdesc_type): Likewise.
12041         (tdesc_type_up): Likewise.
12042         (tdesc_feature): Likewise.
12043         (tdesc_create_reg): Likewise.
12044
12045 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12046
12047         * Makefile.in: Add arch/tdesc.c
12048         * common/tdesc.c: New file.
12049         * common/tdesc.h (tdesc_element_visitor): Move to here.
12050         (tdesc_element): Likewise.
12051         (tdesc_reg): Likewise.
12052         (tdesc_reg_up): Likewise.
12053         * regformats/regdef.h (reg): Add offset to constructors.
12054         * target-descriptions.c (tdesc_element_visitor): Move from here.
12055         (tdesc_element): Likewise.
12056         (tdesc_reg): Likewise.
12057         (tdesc_reg_up): Likewise.
12058
12059 2018-04-17  Tom Tromey  <tom@tromey.com>
12060
12061         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12062         discriminant field.
12063
12064 2018-04-17  Tom Tromey  <tom@tromey.com>
12065
12066         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12067
12068 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12069
12070         * symtab.c (print_symbol_info): Skip printing filename and line
12071         number when `last' is NULL.
12072         (symtab_symbol_info): Use empty string instead of NULL for first
12073         invocation of print_symbol_info.
12074         (rbreak_command): Pass NULL to `last' parameter of
12075         print_symbol_info.
12076
12077 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12078
12079         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12080         instead of nullptr.
12081
12082 2018-04-16  Pedro Alves  <palves@redhat.com>
12083
12084         * MAINTAINERS (sh): Remove.
12085         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12086         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12087         (ALLDEPFILES): Remove sh64-tdep.c.
12088         * NEWS: Mentions that support for SH-5/SH64 is removed.
12089         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12090         (sh*-*-openbsd*): Ditto.
12091         (sh64-*-elf*): Remove.
12092         (sh*): Remove.
12093         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12094         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12095         * sh-tdep.c: No longer include "sh64-tdep.h".
12096         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12097         * sh64-tdep.c, sh64-tdep.h: Remove files.
12098
12099 2018-04-16  Pedro Alves  <palves@redhat.com>
12100
12101         * MAINTAINERS: Remove m88k.
12102         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12103         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12104         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12105         * NEWS: Mention that support for m88k was removed.
12106         * configure.host (m88*-*-*): Remove support.
12107         * configure.nat (m88k-*-*): Remove support.
12108         * configure.tgt (m88*-*-openbsd*): Remove.
12109         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12110
12111 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12112
12113         * configure.tgt (x86_tobjs): New variable.
12114         (amd64_tobjs, i386_tobjs): Use it.
12115
12116 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12117
12118         * symtab.c (print_symbol_info): Precede the symbol definition by
12119         the line number when available.
12120         * NEWS: Advertise this enhancement.
12121
12122 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12123
12124         * NEWS (New options): announce set/show record btrace cpu.
12125         * btrace.c: Include record-btrace.h.
12126         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12127         the vendor is unknown.
12128         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12129         Maybe overwrite the btrace configuration's cpu.
12130         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12131         (btrace_fetch): Add cpu parameter.  Update callers.
12132         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12133         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12134         errata workarounds if the vendor is unknown.
12135         * python/py-record-btrace.c: Include record-btrace.h.
12136         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12137         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12138         * record-btrace.c (record_btrace_cpu_state_kind): New.
12139         (record_btrace_cpu): New.
12140         (set_record_btrace_cpu_cmdlist): New.
12141         (record_btrace_get_cpu): New.
12142         (require_btrace_thread, record_btrace_info)
12143         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12144         (cmd_set_record_btrace_cpu_none): New.
12145         (cmd_set_record_btrace_cpu_auto): New.
12146         (cmd_set_record_btrace_cpu): New.
12147         (cmd_show_record_btrace_cpu): New.
12148         (_initialize_record_btrace): Initialize set/show record btrace cpu
12149         commands.
12150         * record-btrace.h (record_btrace_get_cpu): New.
12151
12152 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12153
12154         * record.c (set_record_command): Fix typo in message.
12155
12156 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12157
12158         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12159
12160 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12161
12162         * infrun.c (process_event_stop_test): Call
12163         gdbarch_in_indirect_branch_thunk.
12164         * gdbarch.sh (in_indirect_branch_thunk): New.
12165         * gdbarch.c: Regenerated.
12166         * gdbarch.h: Regenerated.
12167         * x86-tdep.h: New.
12168         * x86-tdep.c: New.
12169         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12170         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12171         (ALLDEPFILES): Add x86-tdep.c.
12172         * arch-utils.h (default_in_indirect_branch_thunk): New.
12173         * arch-utils.c (default_in_indirect_branch_thunk): New.
12174         * i386-tdep: Include x86-tdep.h.
12175         (i386_in_indirect_branch_thunk): New.
12176         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12177         function.
12178         * amd64-tdep: Include x86-tdep.h.
12179         (amd64_in_indirect_branch_thunk): New.
12180         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12181
12182 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12183
12184         PR gdb/23053
12185         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12186         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12187         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12188         regression.
12189
12190 2018-04-12  Tom Tromey  <tom@tromey.com>
12191
12192         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12193         (rust_evaluate_subexp): Likewise.
12194
12195 2018-04-12  Pedro Alves  <palves@redhat.com>
12196
12197         * procfs.c (procfs_detach): Make forward declaration's prototype
12198         match definition's protototype.
12199         (proc_get_LDT_entry): Remove stale do_cleanups call.
12200
12201 2018-04-12  Pedro Alves  <palves@redhat.com>
12202
12203         * target.h (target_ops::to_has_exited): Delete.
12204         (target_has_exited): Delete.
12205         * target-delegates.c: Regenerate.
12206
12207 2018-04-11  Pedro Alves  <palves@redhat.com>
12208
12209         * target.c (fileio_fh_t::t): Add comment.
12210         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12211         (target_fileio_close): Handle a NULL target.
12212         (invalidate_fileio_fh): New.
12213         (target_close): Call it.
12214         * remote.c (remote_hostio_send_command): No longer check whether
12215         remote_desc is open.
12216
12217 2018-04-11  Pedro Alves  <palves@redhat.com>
12218
12219         * target.c (fileio_fh_t): Make it a named struct instead of a
12220         typedef.
12221         (fileio_fh_t::is_closed): New method.
12222         (DEF_VEC_O (fileio_fh_t)): Remove.
12223         (fileio_fhandles): Now a std::vector.
12224         (is_closed_fileio_fh): Delete.
12225         (acquire_fileio_fd): Adjust.  Rename parameters.
12226         (release_fileio_fd): Adjust.
12227         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12228         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12229         (target_fileio_close): Adjust.
12230
12231 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12232
12233         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12234         index.
12235
12236 2018-04-10  Pedro Alves  <palves@redhat.com>
12237
12238         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12239         (scoped_finish_thread_state): New class.
12240         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12241         cleanup.
12242         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12243         (fetch_inferior_event, normal_stop): Likewise.
12244         * thread.c (finish_thread_state_cleanup): Delete.
12245
12246 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12247             Pedro Alves  <palves@redhat.com>
12248
12249         * value.c: Include "selftest.h" and "common/array-view.h".
12250         (struct range) <operator ==>: New.
12251         (test_ranges_contain): New.
12252         (check_ranges_vector): New.
12253         (test_insert_into_bit_range_vector): New.
12254         (_initialize_values): Register selftests.
12255         * common/array-view.h (operator==, operator!=): New.
12256
12257 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12258
12259         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12260         an iterator.
12261         * inline-frame.c: Include <algorithm>.
12262         (struct inline_state): Add constructor.
12263         (inline_state_s): Remove.
12264         (DEF_VEC_O(inline_state_s)): Remove.
12265         (inline_states): Change type to std::vector.
12266         (find_inline_frame_state): Adjust to std::vector.
12267         (allocate_inline_frame_state): Remove.
12268         (clear_inline_frame_state): Adjust to std::vector.
12269         (skip_inline_frames): Adjust to std::vector.
12270
12271 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12272
12273         * tracepoint.h (struct trace_state_variable): Add constructor.
12274         <name>: Change type to std::string.
12275         * tracepoint.c (tsv_s): Remove.
12276         (DEF_VEC_O(tsv_s)): Remove.
12277         (tvariables): Change to std::vector.
12278         (create_trace_state_variable): Adjust to std::vector.
12279         (find_trace_state_variable): Likewise.
12280         (find_trace_state_variable_by_number): Likewise.
12281         (delete_trace_state_variable): Likewise.
12282         (trace_variable_command): Adjust to std::string.
12283         (delete_trace_variable_command): Likewise.
12284         (tvariables_info_1): Adjust to std::vector.
12285         (save_trace_state_variables): Likewise.
12286         (start_tracing): Likewise.
12287         (merge_uploaded_trace_state_variables): Adjust to std::vector
12288         and std::string.
12289         * target.h (struct target_ops)
12290         <to_download_trace_state_variable>: Pass reference to
12291         trace_state_variable.
12292         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12293         * target-delegates.c: Re-generate.
12294         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12295         (mi_tsv_deleted): Likewise.
12296         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12297         * remote.c (remote_download_trace_state_variable): Change
12298         pointer to reference and adjust.
12299         * make-target-delegates (parse_argtypes): Handle references.
12300         (write_function_header): Likewise.
12301         (munge_type): Likewise.
12302
12303 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12304
12305         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12306         string_view-selftests.c.
12307         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12308         testsuite.
12309         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12310         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12311         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12312         * unittests/basic_string_view/element_access/char/1.cc:
12313         Likewise.
12314         * unittests/basic_string_view/element_access/char/empty.cc:
12315         Likewise.
12316         * unittests/basic_string_view/element_access/char/front_back.cc:
12317         Likewise.
12318         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12319         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12320         Likewise.
12321         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12322         Likewise.
12323         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12324         Likewise.
12325         * unittests/basic_string_view/operations/compare/char/1.cc:
12326         Likewise.
12327         * unittests/basic_string_view/operations/compare/char/13650.cc:
12328         Likewise.
12329         * unittests/basic_string_view/operations/copy/char/1.cc:
12330         Likewise.
12331         * unittests/basic_string_view/operations/data/char/1.cc:
12332         Likewise.
12333         * unittests/basic_string_view/operations/find/char/1.cc:
12334         Likewise.
12335         * unittests/basic_string_view/operations/find/char/2.cc:
12336         Likewise.
12337         * unittests/basic_string_view/operations/find/char/3.cc:
12338         Likewise.
12339         * unittests/basic_string_view/operations/find/char/4.cc:
12340         Likewise.
12341         * unittests/basic_string_view/operations/rfind/char/1.cc:
12342         Likewise.
12343         * unittests/basic_string_view/operations/rfind/char/2.cc:
12344         Likewise.
12345         * unittests/basic_string_view/operations/rfind/char/3.cc:
12346         Likewise.
12347         * unittests/basic_string_view/operations/substr/char/1.cc:
12348         Likewise.
12349         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12350         * unittests/string_view-selftests.c: New file.
12351
12352 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12353
12354         * unittests/basic_string_view/capacity/1.cc: New file.
12355         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12356         * unittests/basic_string_view/cons/char/1.cc: New file.
12357         * unittests/basic_string_view/cons/char/2.cc: New file.
12358         * unittests/basic_string_view/cons/char/3.cc: New file.
12359         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12360         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12361         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12362         * unittests/basic_string_view/element_access/char/1.cc: New file.
12363         * unittests/basic_string_view/element_access/char/2.cc: New file.
12364         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12365         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12366         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12367         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12368         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12369         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12370         * unittests/basic_string_view/include.cc: New file.
12371         * unittests/basic_string_view/inserters/char/1.cc: New file.
12372         * unittests/basic_string_view/inserters/char/2.cc: New file.
12373         * unittests/basic_string_view/inserters/char/3.cc: New file.
12374         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12375         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12376         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12377         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12378         * unittests/basic_string_view/literals/types.cc: New file.
12379         * unittests/basic_string_view/literals/values.cc: New file.
12380         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12381         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12382         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12383         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12384         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12385         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12386         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12387         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12388         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12389         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12390         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12391         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12392         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12393         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12394         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12395         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12396         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12397         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12398         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12399         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12400         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12401         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12402         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12403         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12404         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12405         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12406         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12407         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12408         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12409         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12410         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12411         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12412         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12413         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12414         * unittests/basic_string_view/operators/char/2.cc: New file.
12415         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12416         * unittests/basic_string_view/range_access/char/1.cc: New file.
12417         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12418         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12419         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12420         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12421         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12422         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12423         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12424         * unittests/basic_string_view/typedefs.cc: New file.
12425         * unittests/basic_string_view/types/1.cc: New file.
12426
12427 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12428
12429         * common/gdb_string_view.h: Remove libstdc++ implementation
12430         details, adjust to gdb reality.
12431         * common/gdb_string_view.tcc: Likewise.
12432         * cli/cli-script.c (struct string_view): Remove.
12433         (user_args) <m_args>: Change element type to gdb::string_view.
12434         (user_args::insert_args): Adjust.
12435
12436 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12437
12438         * common/gdb_string_view.h: New file.
12439         * common/gdb_string_view.tcc: New file.
12440
12441 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12442
12443         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12444         * configure: Re-generate.
12445
12446 2018-04-09  Pedro Alves  <palves@redhat.com>
12447
12448         * gdbarch.sh: Include "observable.h" instead of "observer.h".
12449         (set_target_gdbarch): Call
12450         gdb::observers::architecture_changed.notify instead of
12451         observer_notify_architecture_changed.
12452
12453 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12454
12455         * tracepoint.c (struct current_traceframe_cleanup): Remove.
12456         (do_restore_current_traceframe_cleanup): Remove.
12457         (restore_current_traceframe_cleanup_dtor): Remove.
12458         (make_cleanup_restore_current_traceframe): Remove.
12459         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12460         New.
12461         * tracepoint.h (struct scoped_restore_current_traceframe): New.
12462         * infrun.c (fetch_inferior_event): Use
12463         scoped_restore_current_traceframe.
12464
12465 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12466
12467         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12468         Remove.
12469         <n_allocated_type_units>: Remove.
12470         <all_type_units>: Change to std::vector.
12471         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12472         to std::vector change.
12473         (dwarf2_per_objfile::get_cutu): Likewise.
12474         (dwarf2_per_objfile::get_tu): Likewise.
12475         (create_signatured_type_table_from_index): Likewise.
12476         (create_signatured_type_table_from_debug_names): Likewise.
12477         (dw2_symtab_iter_next): Likewise.
12478         (dw2_print_stats): Likewise.
12479         (dw2_expand_all_symtabs): Likewise.
12480         (dw2_expand_marked_cus): Likewise.
12481         (dw2_debug_names_iterator::next): Likewise.
12482         (dwarf2_initialize_objfile): Likewise.
12483         (add_signatured_type_cu_to_table): Likewise.
12484         (create_all_type_units): Likewise.
12485         (add_type_unit): Likewise.
12486         (struct tu_abbrev_offset): Add constructor.
12487         (build_type_psymtabs_1): Adjust to std::vector change.
12488         (print_tu_stats): Likewise.
12489         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12490         (write_debug_names): Likewise.
12491
12492 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12493
12494         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
12495         Make an std::vector.
12496         <n_comp_units>: Remove.
12497         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12498         to std::vector change.
12499         (dwarf2_per_objfile::get_cutu): Likewise.
12500         (dwarf2_per_objfile::get_cu): Likewise.
12501         (create_cus_from_index): Likewise.
12502         (create_addrmap_from_index): Likewise.
12503         (create_addrmap_from_aranges): Likewise.
12504         (dwarf2_read_index): Likewise.
12505         (dw2_find_last_source_symtab): Likewise.
12506         (dw2_map_symtabs_matching_filename): Likewise.
12507         (dw2_symtab_iter_next): Likewise.
12508         (dw2_print_stats): Likewise.
12509         (dw2_expand_all_symtabs): Likewise.
12510         (dw2_expand_symtabs_with_fullname): Likewise.
12511         (dw2_expand_marked_cus): Likewise.
12512         (dw2_map_symbol_filenames): Likewise.
12513         (create_cus_from_debug_names): Likewise.
12514         (dwarf2_read_debug_names): Likewise.
12515         (dw2_debug_names_iterator::next): Likewise.
12516         (dwarf2_initialize_objfile): Likewise.
12517         (set_partial_user): Likewise.
12518         (dwarf2_build_psymtabs_hard): Likewise.
12519         (read_comp_units_from_section): Remove arguments, adjust to
12520         std::vector change.
12521         (create_all_comp_units): Adjust to std::vector and
12522         read_comp_units_from_section changes.
12523         (dwarf2_find_containing_comp_unit): Adjust to std::vector
12524         change.
12525         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12526         (psyms_seen_size): Likewise.
12527         (write_gdbindex): Likewise.
12528         (write_debug_names): Likewise.
12529
12530 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12531
12532         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
12533         with dwarf2_per_objfile.
12534         (create_cus_from_index): Likewise.
12535         (create_signatured_type_table_from_index): Likewise.
12536         (dwarf2_read_index): Likewise.
12537         (dwarf2_initialize_objfile): Likewise.
12538         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
12539         per_cu rather than get_dwarf2_per_objfile.
12540
12541 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12542
12543         * dwarf2read.h (struct signatured_type): Forward declare.
12544         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
12545         New methods.
12546         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
12547         (dw2_get_cutu): ...this.
12548         (dwarf2_per_objfile::get_cu): Rename from...
12549         (dw2_get_cu): ...this.
12550         (dwarf2_per_objfile::get_tu): New.
12551         (create_addrmap_from_index): Adjust.
12552         (create_addrmap_from_aranges): Adjust.
12553         (dw2_find_last_source_symtab): Adjust.
12554         (dw2_map_symtabs_matching_filename): Adjust.
12555         (dw2_symtab_iter_next): Adjust.
12556         (dw2_print_stats): Adjust.
12557         (dw2_expand_all_symtabs): Adjust.
12558         (dw2_expand_symtabs_with_fullname): Adjust.
12559         (dw2_expand_marked_cus): Adjust.
12560         (dw_expand_symtabs_matching_file_matcher): Adjust.
12561         (dw2_map_symbol_filenames): Adjust.
12562         (dw2_debug_names_iterator::next): Adjust.
12563         (dwarf2_initialize_objfile): Adjust.
12564         (set_partial_user): Adjust.
12565         (dwarf2_build_psymtabs_hard): Adjust.
12566
12567 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12568
12569         * dwarf2read.c (create_signatured_type_table_from_debug_names):
12570         Remove unused variables.
12571         (dw2_map_symtabs_matching_filename): Likewise.
12572         (dwarf2_record_block_ranges): Likewise.
12573         (dwarf2_read_addr_index): Likewise.
12574         (follow_die_offset): Likewise.
12575
12576 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12577
12578         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
12579         to symbol_file_add_main.
12580
12581 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12582
12583         PR mi/22299
12584         * mi/mi-console.c (do_fputc_async_safe): New.
12585         (mi_console_file::write_async_safe): New.
12586         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
12587         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
12588         New.
12589         * ui-file.c (ui_file::putstrn): Adjust call to
12590         fputstrn_unfiltered.
12591         * utils.c (printchar): Replace do_fputs and do_fprintf
12592         parameters by do_fputc.
12593         (fputstr_filtered): Adjust call to printchar.
12594         (fputstr_unfiltered): Likewise.
12595         (fputstrn_filtered): Likewise.
12596         (fputstrn_unfiltered): Add do_fputc parameter, pass to
12597         printchar.
12598         * utils.h (do_fputc_ftype): New typedef.
12599         (fputstrn_unfiltered): Add do_fputc parameter.
12600
12601 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12602
12603         * regformats/i386/i386-avx.dat: Remove.
12604
12605 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12606
12607         PR gdb/22979
12608         * amd64-tdep.c (amd64_none_init_abi): New function.
12609         (amd64_x32_none_init_abi): New function.
12610         (_initialize_amd64_tdep): Register handlers for x86-64 and
12611         x64_32 with GDB_OSABI_NONE.
12612         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
12613         GDB_OSABI_NONE osabi.
12614
12615 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12616
12617         PR gdb/22980
12618         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
12619         GDB_OSABI_NONE.
12620         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
12621         * osabi.c (gdb_osabi_names): Add "unknown" entry.
12622
12623 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12624
12625         * common/byte-vector.h (char_vector): New type.
12626         * target.h (target_read_alloc): Return
12627         gdb::optional<byte_vector>.
12628         (target_read_stralloc): Return gdb::optional<char_vector>.
12629         (target_get_osdata): Return gdb::optional<char_vector>.
12630         * target.c (target_read_alloc_1): Templatize.  Replacement
12631         manual memory management with vector.
12632         (target_read_alloc): Change return type, adjust.
12633         (target_read_stralloc): Change return type, adjust.
12634         (target_get_osdata): Change return type, adjust.
12635         * auxv.c (struct auxv_info) <length>: Remove.
12636         <data>: Change type to gdb::optional<byte_vector>.
12637         (auxv_inferior_data_cleanup): Free auxv_info with delete.
12638         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
12639         (target_auxv_search): Adjust.
12640         (fprint_target_auxv): Adjust.
12641         * avr-tdep.c (avr_io_reg_read_command): Adjust.
12642         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
12643         (linux_make_corefile_notes): Adjust.
12644         * osdata.c (get_osdata): Adjust.
12645         * remote.c (remote_get_threads_with_qxfer): Adjust.
12646         (remote_memory_map): Adjust.
12647         (remote_traceframe_info): Adjust.
12648         (btrace_read_config): Adjust.
12649         (remote_read_btrace): Adjust.
12650         (remote_pid_to_exec_file): Adjust.
12651         * solib-aix.c (solib_aix_get_library_list): Adjust.
12652         * solib-dsbt.c (decode_loadmap): Don't free buf.
12653         (dsbt_get_initial_loadmaps): Adjust.
12654         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
12655         * solib-target.c (solib_target_current_sos): Adjust.
12656         * tracepoint.c (sdata_make_value): Adjust.
12657         * xml-support.c (xinclude_start_include): Adjust.
12658         (xml_fetch_content_from_file): Adjust.
12659         * xml-support.h (xml_fetch_another): Change return type.
12660         (xml_fetch_content_from_file): Change return type.
12661         * xml-syscall.c (xml_init_syscalls_info): Adjust.
12662         * xml-tdesc.c (file_read_description_xml): Adjust.
12663         (fetch_available_features_from_target): Change return type.
12664         (target_fetch_description_xml): Adjust.
12665         (target_read_description_xml): Adjust.
12666
12667 2018-04-06  Tom Tromey  <tom@tromey.com>
12668
12669         * value.c (~value): Update.
12670         (struct value) <contents>: Now unique_xmalloc_ptr.
12671         (value_contents_bits_eq, allocate_value_contents)
12672         (value_contents_raw, value_contents_all_raw)
12673         (value_contents_for_printing, value_contents_for_printing_const)
12674         (set_value_enclosing_type): Update.
12675
12676 2018-04-06  Tom Tromey  <tom@tromey.com>
12677
12678         * value.c (range_s): Remove typedef, VEC.
12679         (struct range): Add operator<.
12680         (range_lessthan): Remove.
12681         (ranges_contain): Change type.
12682         (~value): Update.
12683         (struct value) <unavailable, optimized_out>: Now std::vector.
12684         (value_entirely_available)
12685         (value_entirely_covered_by_range_vector)
12686         (value_entirely_unavailable, value_entirely_optimized_out):
12687         Update.
12688         (insert_into_bit_range_vector): Change argument type.
12689         (find_first_range_overlap): Likewise.
12690         (struct ranges_and_idx, value_contents_bits_eq)
12691         (require_not_optimized_out, require_available): Update.
12692         (ranges_copy_adjusted): Change argument types.
12693         (value_optimized_out, value_copy, value_fetch_lazy): Update.
12694
12695 2018-04-06  Tom Tromey  <tom@tromey.com>
12696
12697         * value.c (~value): Update.
12698         (struct value) <parent>: Now a value_ref_ptr.
12699         (value_parent, set_value_parent, value_address, value_copy):
12700         Update.
12701
12702 2018-04-06  Tom Tromey  <tom@tromey.com>
12703
12704         * value.c (struct value): Add constructor, destructor, and member
12705         initializers.
12706         (allocate_value_lazy, value_decref): Update.
12707
12708 2018-04-06  Tom Tromey  <tom@tromey.com>
12709
12710         * value.c (struct value) <released, next>: Remove.
12711         (all_values): Now a std::vector.
12712         (allocate_value_lazy): Update.
12713         (value_next): Remove.
12714         (value_mark, value_free_to_mark, release_value)
12715         (value_release_to_mark): Update.
12716
12717 2018-04-06  Tom Tromey  <tom@tromey.com>
12718
12719         * value.h (fetch_subexp_value, value_release_to_mark): Update.
12720         (free_value_chain): Remove.
12721         * value.c (free_value_chain): Remove.
12722         (value_release_to_mark): Return a std::vector.
12723         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
12724         std::vector.
12725         (check_condition): Update.
12726         * eval.c (fetch_subexp_value): Change "val_chain" to a
12727         std::vector.
12728         * breakpoint.c (update_watchpoint): Update.
12729         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
12730
12731 2018-04-06  Tom Tromey  <tom@tromey.com>
12732
12733         * value.h (free_all_values): Remove.
12734         * value.c (free_all_values): Remove.
12735
12736 2018-04-06  Tom Tromey  <tom@tromey.com>
12737
12738         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
12739         (value_history_chain, value_history_count): Remove.
12740         (value_history): New global.
12741         (record_latest_value, access_value_history, show_values)
12742         (preserve_values): Update.
12743
12744 2018-04-06  Tom Tromey  <tom@tromey.com>
12745
12746         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
12747         * varobj.c (varobj_set_display_format, varobj_set_value)
12748         (install_default_visualizer, construct_visualizer)
12749         (install_new_value, ~varobj, varobj_get_value_type)
12750         (my_value_of_variable, varobj_editable_p): Update.
12751         * c-varobj.c (c_describe_child, c_value_of_variable)
12752         (cplus_number_of_children, cplus_describe_child): Update.
12753         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12754         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12755         (ada_value_of_variable, ada_value_is_changeable_p): Update.
12756
12757 2018-04-06  Tom Tromey  <tom@tromey.com>
12758
12759         * printcmd.c (last_examine_address): Change type to
12760         value_ref_ptr.
12761         (do_examine, x_command): Update.
12762
12763 2018-04-06  Tom Tromey  <tom@tromey.com>
12764
12765         * value.c (release_value): Update.
12766         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12767         (struct bpstats) <val>: Now a value_ref_ptr.
12768         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12769         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12770         (~watchpoint, print_it_watchpoint, watch_command_1)
12771         (invalidate_bp_value_on_memory_change): Update.
12772
12773 2018-04-06  Tom Tromey  <tom@tromey.com>
12774
12775         * varobj.c (varobj_clear_saved_item)
12776         (update_dynamic_varobj_children, install_new_value, ~varobj):
12777         Update.
12778         * value.h (value_incref): Move declaration earlier.
12779         (value_decref): Rename from value_free.
12780         (struct value_ref_policy): New.
12781         (value_ref_ptr): New typedef.
12782         (struct value_deleter): Remove.
12783         (gdb_value_up): Remove typedef.
12784         (release_value): Change return type.
12785         (release_value_or_incref): Remove.
12786         * value.c (set_value_parent): Update.
12787         (value_incref): Change return type.
12788         (value_decref): Rename from value_free.
12789         (value_free_to_mark, free_all_values, free_value_chain): Update.
12790         (release_value): Return value_ref_ptr.
12791         (release_value_or_incref): Remove.
12792         (record_latest_value, set_internalvar, clear_internalvar):
12793         Update.
12794         * stack.c (info_frame_command): Don't call value_free.
12795         * python/py-value.c (valpy_dealloc, valpy_new)
12796         (value_to_value_object): Update.
12797         * printcmd.c (do_examine): Update.
12798         * opencl-lang.c (lval_func_free_closure): Update.
12799         * mi/mi-main.c (register_changed_p): Don't call value_free.
12800         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12801         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12802         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12803         value_free.
12804         * guile/scm-value.c (vlscm_free_value_smob)
12805         (vlscm_scm_from_value): Update.
12806         * frame.c (frame_register_unwind, frame_unwind_register_signed)
12807         (frame_unwind_register_unsigned, get_frame_register_bytes)
12808         (put_frame_register_bytes): Don't call value_free.
12809         * findvar.c (address_from_register): Don't call value_free.
12810         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12811         * dwarf2loc.c (entry_data_value_free_closure)
12812         (value_of_dwarf_reg_entry, free_pieced_value_closure)
12813         (dwarf2_evaluate_loc_desc_full): Update.
12814         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12815         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12816         (~watchpoint, watch_command_1)
12817         (invalidate_bp_value_on_memory_change): Update.
12818         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12819
12820 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12821
12822         PR gdb/23022
12823         * warning.m4: Add -Wno-error=deprecated-register.
12824         * configure: Re-generate.
12825
12826 2018-04-05  Tom Tromey  <tom@tromey.com>
12827
12828         * linespec.h: Remove include of "vec.h".
12829
12830 2018-04-05  Tom Tromey  <tom@tromey.com>
12831
12832         * linespec.c (typep): Remove typedef.
12833         (find_methods, find_superclass_methods): Take a std::vector.
12834         (find_method): Use std::vector.
12835
12836 2018-04-05  Tom Tromey  <tom@tromey.com>
12837
12838         * utils.c (compare_strings): Remove.
12839         * utils.h (compare_strings): Remove.
12840         * objc-lang.h (find_imps): Update.
12841         * objc-lang.c (find_methods): Take a std::vector.
12842         (uniquify_strings, find_imps): Likewise.
12843         * linespec.c (find_methods): Take a std::vector.
12844         (decode_objc): Use std::vector.
12845         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12846         a std::vector.
12847         (find_method, find_function_symbols): Use std::vector.
12848
12849 2018-04-05  Tom Tromey  <tom@tromey.com>
12850
12851         * completer.c (completion_tracker::completion_tracker): Remove
12852         cast.
12853         (completion_tracker::discard_completions): Likewise.
12854         * breakpoint.c (ambiguous_names_p): Remove cast.
12855         * ada-lang.c (_initialize_ada_language): Remove cast.
12856         * utils.h (streq): Update.
12857         (streq_hash): Add new declaration.
12858         * utils.c (streq): Return bool.
12859         (streq_hash): New function.
12860
12861 2018-04-05  Tom Tromey  <tom@tromey.com>
12862
12863         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12864         Remove a string copy.
12865
12866 2018-04-05  Tom Tromey  <tom@tromey.com>
12867
12868         * linespec.c (filter_results): Use std::vector.
12869         (decode_line_2, decode_line_full): Update.
12870
12871 2018-04-05  Tom Tromey  <tom@tromey.com>
12872
12873         * linespec.c (canonical_to_fullform): Return std::string.
12874         (filter_results): Update.
12875         (struct decode_line_2_item): Add constructor.
12876         <fullform, displayform>: Now std::string.
12877         (decode_line_2_compare_items): Now a std::sort comparator.
12878         (decode_line_2): Update.
12879
12880 2018-04-05  Tom Tromey  <tom@tromey.com>
12881
12882         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12883         (unexpected_linespec_error): Update.
12884         (linespec_parse_basic, parse_linespec): Update.
12885
12886 2018-04-05  Tom Tromey  <tom@tromey.com>
12887
12888         * linespec.c (linespec_parse_basic): Reindent.
12889
12890 2018-04-05  Tom Tromey  <tom@tromey.com>
12891
12892         * minsyms.h (iterate_over_minimal_symbols): Update.
12893         * minsyms.c (iterate_over_minimal_symbols): Take a
12894         gdb::function_view.
12895         * linespec.c (struct collect_minsyms): Remove.
12896         (compare_msyms): Now a std::sort comparator.
12897         (add_minsym): Add parameters.
12898         (search_minsyms_for_name): Update.  Use std::vector.
12899
12900 2018-04-03  Tom Tromey  <tom@tromey.com>
12901
12902         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12903         gdb::byte_vector.
12904
12905 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12906
12907         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12908
12909 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12910
12911         PR gdb/16959
12912         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12913         printing static type.
12914
12915 2018-04-01  Tom Tromey  <tom@tromey.com>
12916
12917         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12918         (rs6000_xfer_shared_libraries): Update.
12919
12920 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12921
12922         * common/gdb_vecs.h (char_ptr): Remove.
12923         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12924
12925 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12926
12927         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12928         with std::vector.
12929         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12930
12931 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12932
12933         * tracepoint.h (struct uploaded_tp): Initialize fields.
12934         <actions, step_actions, cmd_strings>: Change type to
12935         std::vector<char *>.
12936         * tracepoint.c (get_uploaded_tp): Allocate with new.
12937         (free_uploaded_tps): Free with delete.
12938         (parse_tracepoint_definition): Adjust to std::vector change.
12939         * breakpoint.c (read_uploaded_action): Likewise.
12940         (create_tracepoint_from_upload): Likewise.
12941         * ctf.c (ctf_write_uploaded_tp): Likewise.
12942         (SET_ARRAY_FIELD): Likewise.
12943         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12944
12945 2018-03-30  Tom Tromey  <tom@tromey.com>
12946
12947         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12948         std::unique_ptr.
12949         (svr4_keep_data_in_core): Update.
12950         (svr4_read_so_list): Update.
12951
12952 2018-03-30  Tom Tromey  <tom@tromey.com>
12953
12954         * windows-nat.c (handle_output_debug_string, handle_exception):
12955         Update.
12956         * target.h (target_read_string): Update.
12957         * target.c (target_read_string): Change "string" to
12958         unique_xmalloc_ptr.
12959         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12960         Update.
12961         * solib-frv.c (frv_current_sos): Update.
12962         * solib-dsbt.c (dsbt_current_sos): Update.
12963         * solib-darwin.c (darwin_current_sos): Update.
12964         * linux-thread-db.c (inferior_has_bug): Update.
12965         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12966         Update.  Remove alloca.
12967         * ada-lang.c (ada_main_name): Update.
12968
12969 2018-03-30  Tom Tromey  <tom@tromey.com>
12970
12971         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12972         (struct dwo_file_deleter): New.
12973         (dwo_file_up): New typedef.
12974         (open_and_init_dwo_file): Use dwo_file_up.
12975         (free_dwo_file_cleanup): Remove.
12976
12977 2018-03-30  Tom Tromey  <tom@tromey.com>
12978
12979         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12980         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12981
12982 2018-03-30  Tom Tromey  <tom@tromey.com>
12983
12984         * dwarf2read.c (class free_cached_comp_units): New class.
12985         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12986         (free_cached_comp_units): Remove function.
12987
12988 2018-03-30  Tom Tromey  <tom@tromey.com>
12989
12990         * utils.h (make_cleanup_unpush_target): Remove.
12991         * inf-ptrace.c (struct target_unpusher): New.
12992         (target_unpush_up) New typedef.
12993         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12994         target_unpush_up.
12995         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12996
12997 2018-03-27  Tom Tromey  <tom@tromey.com>
12998
12999         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13000
13001 2018-03-27  Pedro Alves  <palves@redhat.com>
13002             Tom Tromey  <tom@tromey.com>
13003
13004         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13005         destructor.  Now a class.
13006         (gdb_readline_wrapper_cleanup): Remove function.
13007         (gdb_readline_wrapper): Remove cleanups.
13008
13009 2018-03-27  Tom Tromey  <tom@tromey.com>
13010
13011         * typeprint.h (struct type_print_options) <local_typedefs,
13012         global_typedefs>: Remove "struct" keyword.
13013         (class typedef_hash_table): New class.
13014         (recursively_update_typedef_hash, add_template_parameters)
13015         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13016         (find_typedef_in_hash): Don't declare.
13017         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13018         (typedef_hash_table::recursively_update): Rename from
13019         recursively_update_typedef_hash.  Now a member.
13020         (typedef_hash_table::add_template_parameters): Rename from
13021         add_template_parameters.  Now a member.
13022         (typedef_hash_table::typedef_hash_table): Now a constructor;
13023         rename from create_typedef_hash.
13024         (typedef_hash_table::~typedef_hash_table): Now a destructor;
13025         rename from free_typedef_hash.
13026         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13027         (do_free_global_table): Remove.
13028         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13029         from copy_type_recursive.
13030         (create_global_typedef_table): Remove.
13031         (typedef_hash_table::find_global_typedef): Now a member of
13032         typedef_hash_table.
13033         (typedef_hash_table::find_typedef): Rename from
13034         find_typedef_in_hash; now a member.
13035         (whatis_exp): Update.
13036         * extension.h (struct ext_lang_type_printers): Add constructor and
13037         destructor.
13038         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13039         declare.
13040         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13041         Now a constructor; rename from start_ext_lang_type_printers.
13042         (ext_lang_type_printers): Now a destructor; rename from
13043         free_ext_lang_type_printers.
13044         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13045         Update.
13046         (c_type_print_base_struct_union): Update.  Remove cleanups.
13047
13048 2018-03-27  Tom Tromey  <tom@tromey.com>
13049
13050         * dwarf-index-write.c: Include <cmath>.
13051
13052 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13053
13054         * NEWS: Add entry describing new "set|show varsize-limit" command.
13055         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13056         command.
13057         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13058         "set variable".
13059
13060 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13061
13062         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13063         dwarf-index-write.c
13064         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13065         * dwarf-index-common.c: New file.
13066         * dwarf-index-common.h: New file.
13067         * dwarf-index-write.c: New file.
13068         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13069         (struct dwarf2_section_info): Move from here.
13070         (dwarf2_section_info_def): Likewise.
13071         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13072         (offset_type): Likewise.
13073         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13074         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13075         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13076         (byte_swap): Likewise.
13077         (MAYBE_SWAP): Likewise.
13078         (dwarf2_per_cu_ptr): Likewise.
13079         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13080         (struct tu_stats): Likewise.
13081         (struct dwarf2_per_objfile): Likewise.
13082         (struct dwarf2_per_cu_data): Likewise.
13083         (struct signatured_type): Likewise.
13084         (sig_type_ptr): Likewise.
13085         (DEF_VEC_P (sig_type_ptr)): Likewise.
13086         (INDEX4_SUFFIX): Likewise.
13087         (INDEX5_SUFFIX): Likewise.
13088         (DEBUG_STR_SUFFIX): Likewise.
13089         (dwarf2_read_section): Make non-static.
13090         (mapped_index_string_hash): Move from here.
13091         (dwarf5_djb_hash): Likewise.
13092         (file_write): Likewise.
13093         (class data_buf): Likewise.
13094         (struct symtab_index_entry): Likewise.
13095         (struct mapped_symtab): Likewise.
13096         (find_slot): Likewise.
13097         (hash_expand): Likewise.
13098         (add_index_entry): Likewise.
13099         (uniquify_cu_indices): Likewise.
13100         (class c_str_view): Likewise.
13101         (class c_str_view_hasher): Likewise.
13102         (class vector_hasher): Likewise.
13103         (write_hash_table): Likewise.
13104         (psym_index_map): Likewise.
13105         (struct addrmap_index_data): Likewise.
13106         (add_address_entry): Likewise.
13107         (add_address_entry_worker): Likewise.
13108         (write_address_map): Likewise.
13109         (symbol_kind): Likewise.
13110         (write_psymbols): Likewise.
13111         (struct signatured_type_index_data): Likewise.
13112         (write_one_signatured_type): Likewise.
13113         (recursively_count_psymbols): Likewise.
13114         (recursively_write_psymbols): Likewise.
13115         (class debug_names): Likewise.
13116         (check_dwarf64_offsets): Likewise.
13117         (psyms_seen_size): Likewise.
13118         (write_gdbindex): Likewise.
13119         (write_debug_names): Likewise.
13120         (assert_file_size): Likewise.
13121         (write_psymtabs_to_index): Likewise.
13122         (save_gdb_index_command): Likewise.
13123         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13124         command.
13125         * dwarf2read.h: New file.
13126
13127 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13128
13129         PR gdb/22670
13130         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13131         symbol name if the CU's language stores symbol names in linkage
13132         format.
13133         * language.h (struct language_defn)
13134         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13135         all instances of this struct.
13136
13137 2018-03-26  Tom Tromey  <tom@tromey.com>
13138
13139         * stack.c (backtrace_command_1): Remove verbose code.
13140
13141 2018-03-26  Tom Tromey  <tom@tromey.com>
13142
13143         * python/py-framefilter.c (py_print_type): Don't catch
13144         exceptions.  Return void.
13145         (py_print_value): Likewise.
13146         (py_print_single_arg): Likewise.
13147         (enumerate_args): Don't catch exceptions.
13148         (py_print_args): Likewise.
13149         (py_print_frame): Likewise.
13150         (gdbpy_apply_frame_filter): Catch exceptions here.
13151
13152 2018-03-26  Tom Tromey  <tom@tromey.com>
13153
13154         * stack.c (_initialize_stack): Remove trailing newlines from help
13155         text.  Add "Usage" line to "backtrace" help.
13156
13157 2018-03-26  Tom Tromey  <tom@tromey.com>
13158
13159         PR python/16486:
13160         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13161
13162 2018-03-26  Tom Tromey  <tom@tromey.com>
13163
13164         * python/py-framefilter.c (py_print_single_arg): Return
13165         EXT_LANG_BT_ERROR from catch.
13166
13167 2018-03-26  Tom Tromey  <tom@tromey.com>
13168
13169         PR backtrace/15584:
13170         * stack.c (backtrace_command_1): Move some code into no-filters
13171         "if".
13172
13173 2018-03-26  Tom Tromey  <tom@tromey.com>
13174
13175         * python/py-framefilter.c (throw_quit_or_print_exception): New
13176         function.
13177         (gdbpy_apply_frame_filter): Use it.
13178
13179 2018-03-26  Tom Tromey  <tom@tromey.com>
13180
13181         PR cli/17716:
13182         * python/py-framefilter.c (py_print_type, py_print_value)
13183         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13184         RETURN_MASK_ERROR.
13185
13186 2018-03-26  Tom Tromey  <tom@tromey.com>
13187
13188         * python/py-framefilter.c (enumerate_args): Use
13189         gdb::unique_xmalloc_ptr.
13190
13191 2018-03-26  Tom Tromey  <tom@tromey.com>
13192
13193         * python/py-framefilter.c (py_print_frame): Return
13194         EXT_LANG_BT_OK.
13195         (gdbpy_apply_frame_filter): Update comment.
13196         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13197         Remove.
13198         <EXT_LANG_BT_NO_FILTERS>: Change value.
13199
13200 2018-03-26  Tom Tromey  <tom@tromey.com>
13201
13202         PR backtrace/15582:
13203         * stack.c (backtrace_command): Parse "hide" argument.
13204         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13205         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13206         constant.
13207
13208 2018-03-26  Tom Tromey  <tom@tromey.com>
13209
13210         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13211         add "flags".
13212         (backtrace_command): Remove "fulltrace", add "flags".
13213
13214 2018-03-26  Tom Tromey  <tom@tromey.com>
13215
13216         * stack.c (backtrace_command): Rewrite command line parsing.
13217
13218 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13219
13220         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13221
13222 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13223
13224         * filename-seen-cache.h: Add include guard.
13225
13226 2018-03-26  Keith Seitz  <keiths@redhat.com>
13227
13228         * symfile.c (place_section): Remove "struct" from section_addr_info
13229         in comment.
13230         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13231         "struct" keyword from section_addr_info.
13232
13233 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13234
13235         * regformats/regdef.h (reg): Add constructors.
13236
13237 2018-03-25  Pedro Alves  <palves@redhat.com>
13238
13239         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13240         if then/else bodies in var_func_name extraction.
13241
13242 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13243
13244         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13245         lookup_minimal_symbol() to find symbol entry.
13246         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13247
13248 2018-03-23  Keith Seitz  <keiths@redhat.com>
13249
13250         PR c++/22968
13251         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13252         nested type definitions for C++, too.
13253
13254 2018-03-23  Tom Tromey  <tom@tromey.com>
13255
13256         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13257         a typedef.
13258         (macho_register_oso): Remove.
13259         (macho_symtab_read): Take a std::vector.
13260         (oso_el_compare_name): Now a std::sort comparator.
13261         (macho_symfile_read_all_oso): Take a std::vector.
13262         (macho_symfile_read): Use std::vector.  Remove cleanups.
13263
13264 2018-03-22  Tom Tromey  <tom@tromey.com>
13265
13266         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13267         (record_full_goto_bookmark): Use std::string.
13268
13269 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13270
13271         PR tdep/18295
13272         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13273         a single mask.
13274
13275 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13276
13277         * rs6000-tdep.c (store_insn_p): New function.
13278         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13279         and cr_reg to their unshifted values. Use store_insn_p to
13280         match LR saves using either R1 or fdata->alloca_reg. Use
13281         store_insn_p to match CR saves. Set alloca_reg_offset
13282         when alloca_reg and framep are set. Remove lr_reg shift
13283         when assigning to fdata->lr_register.
13284
13285 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13286
13287         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13288         command line args instead of emitting a warning.
13289
13290 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13291
13292         * tracepoint.h (struct static_tracepoint_marker): Initialize
13293         fields, define default constructor, move constructor and move
13294         assignment, disable the rest.
13295         <str_id, extra>: Make std::string.
13296         (release_static_tracepoint_marker): Remove.
13297         (free_current_marker): Remove.
13298         * tracepoint.c (free_current_marker): Remove.
13299         (parse_static_tracepoint_marker_definition): Adjust to
13300         std::string, use new hex2str overload.
13301         (release_static_tracepoint_marker): Remove.
13302         (print_one_static_tracepoint_marker): Get marker by reference
13303         and adjust to std::string.
13304         (info_static_tracepoint_markers_command): Adjust to std::vector
13305         changes
13306         * target.h (static_tracepoint_marker_p): Remove typedef.
13307         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13308         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13309         bool.
13310         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13311         * target-debug.h
13312         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13313         (target_debug_print_std_vector_static_tracepoint_marker): New.
13314         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13315         to...
13316         (target_debug_print_static_tracepoint_marker_p): ... this.
13317         * target-delegates.c: Re-generate.
13318         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13319         Make std::string.
13320         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13321         (decode_static_tracepoint_spec): Adjust to std::vector.
13322         (tracepoint_print_one_detail): Adjust to std::string.
13323         (strace_marker_decode_location): Adjust to std::string.
13324         (update_static_tracepoint): Adjust to std::string, remove call
13325         to release_static_tracepoint_marker.
13326         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13327         Adjust to std::vector.
13328         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13329         (remote_static_tracepoint_markers_by_strid): Adjust to
13330         std::vector.
13331         * common/rsp-low.h (hex2str): New overload with explicit count
13332         of bytes.
13333         * common/rsp-low.c (hex2str): New overload with explicit count
13334         of bytes.
13335         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13336         (_initialize_rsp_low_selftests): Add test_hex2str test.
13337         * unittests/tracepoint-selftests.c
13338         (test_parse_static_tracepoint_marker_definition): Adjust to
13339         std::string.
13340
13341 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13342
13343         * tracepoint.c (parse_static_tracepoint_marker_definition):
13344         Consider case where the definition is followed by more
13345         definitions.
13346         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13347         tracepoint-selftests.c.
13348         * unittests/tracepoint-selftests.c: New.
13349
13350 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13351
13352         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13353         Carvalho.
13354
13355 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13356
13357         * symtab.c (find_pc_sect_line): fixed indentation.
13358
13359 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13360
13361         * symtab.c (find_pc_sect_line): now uses binary search.
13362
13363 2018-03-19  Tom Tromey  <tom@tromey.com>
13364
13365         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13366         "IDENT" production.
13367
13368 2018-03-19  Pedro Alves  <palves@redhat.com>
13369             Tom Tromey  <tom@tromey.com>
13370
13371         * unittests/observable-selftests.c: New file.
13372         * common/observable.h: New file.
13373         * observable.h: New file.
13374         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13375         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13376         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13377         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13378         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13379         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13380         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13381         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13382         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13383         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13384         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13385         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13386         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13387         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13388         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13389         tui/tui-interp.c, valops.c: Update all users.
13390         * tui/tui-hooks.c (tui_bp_created_observer)
13391         (tui_bp_deleted_observer, tui_bp_modified_observer)
13392         (tui_inferior_exit_observer, tui_before_prompt_observer)
13393         (tui_normal_stop_observer, tui_register_changed_observer):
13394         Remove.
13395         (tui_observers_token): New global.
13396         (attach_or_detach, tui_attach_detach_observers): New functions.
13397         (tui_install_hooks, tui_remove_hooks): Use
13398         tui_attach_detach_observers.
13399         * record-btrace.c (record_btrace_thread_observer): Remove.
13400         (record_btrace_thread_observer_token): New global.
13401         * observer.sh: Remove.
13402         * observer.c: Rename to observable.c.
13403         * observable.c (namespace gdb_observers): Define new objects.
13404         (observer_debug): Move into gdb_observers namespace.
13405         (struct observer, struct observer_list, xalloc_observer_list_node)
13406         (xfree_observer_list_node, generic_observer_attach)
13407         (generic_observer_detach, generic_observer_notify): Remove.
13408         (_initialize_observer): Update.
13409         Don't include observer.inc.
13410         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13411         (clean mostlyclean): Likewise.
13412         (observer.h, observer.inc): Remove targets.
13413         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13414         (COMMON_SFILES): Use observable.c, not observer.c.
13415         * .gitignore: Remove observer.h.
13416
13417 2018-03-18  Tom Tromey  <tom@tromey.com>
13418
13419         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13420         gdb::def_vector.
13421         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13422
13423 2018-03-17  Tom Tromey  <tom@tromey.com>
13424
13425         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13426
13427 2018-03-17  Tom Tromey  <tom@tromey.com>
13428
13429         * target.c (class scoped_target_fd): New.
13430         (target_fileio_close_cleanup): Remove.
13431         (target_fileio_read_alloc_1): Use scoped_target_fd.
13432
13433 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13434
13435         * silent-rules.mk: New.
13436         * Makefile.in: Include silent-rules.mk
13437         (srcdir, VPATH, top_srcdir): Move up.
13438         (COMPILE): Add ECHO_CXX.
13439         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13440         (init.c): Add ECHO_INIT_C.
13441         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13442         (version.c): Add ECHO_GEN.
13443         (printcmd.o): Add ECHO_CXX.
13444         (target-float.o): Add ECHO_CXX.
13445         (ada-exp.o): Add ECHO_CXX.
13446         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13447         (insight$(EXEEXT)): Add ECHO_CXXLD.
13448         * gnulib/configure.ac: Add AM_SILENT_RULES.
13449         * gnulib/aclocal.m4: Re-generate.
13450         * gnulib/configure: Re-generate.
13451         * gnulib/import/Makefile.in: Re-generate.
13452
13453 2018-03-16  Tom Tromey  <tom@tromey.com>
13454
13455         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13456         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13457         * utils.c (do_free_section_addr_info)
13458         (make_cleanup_free_section_addr_info): Remove.
13459         * symfile.h (struct other_sections): Add constructor.
13460         (struct section_addr_info): Remove.
13461         (section_addr_info): New typedef.
13462         (struct sym_fns) <sym_offsets>: Change type of parameter.
13463         (build_section_addr_info_from_objfile)
13464         (relative_addr_info_to_section_offsets, addr_info_make_relative)
13465         (default_symfile_offsets, symbol_file_add)
13466         (symbol_file_add_from_bfd)
13467         (build_section_addr_info_from_section_table): Update.
13468         (alloc_section_addr_info, free_section_addr_info): Don't declare.
13469         * symfile.c (alloc_section_addr_info): Remove.
13470         (build_section_addr_info_from_section_table): Change return type.
13471         Update.
13472         (build_section_addr_info_from_bfd)
13473         (build_section_addr_info_from_objfile): Likewise.
13474         (free_section_addr_info): Remove.
13475         (relative_addr_info_to_section_offsets): Change type of "addrs".
13476         (addrs_section_compar): Now a std::sort comparator.
13477         (addrs_section_sort): Change return type.
13478         (addr_info_make_relative): Change type of "addrs".  Update.
13479         (default_symfile_offsets, syms_from_objfile_1)
13480         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
13481         (symbol_file_add_separate): Update.
13482         (symbol_file_add): Change type of "addrs".  Update.
13483         (add_symbol_file_command): Update.  Remove cleanups.
13484         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
13485         cleanups.
13486         * symfile-debug.c (debug_sym_offsets): Change type of "info".
13487         * solib.c (solib_read_symbols): Update.
13488         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
13489         * machoread.c (macho_symfile_offsets): Update.
13490         * jit.c (jit_bfd_try_read_symtab): Update.
13491
13492 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
13493
13494         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13495         unittests/utils-selftests.c.
13496         * unittests/utils-selftests.c: New file.
13497
13498 2018-03-14  Tom Tromey  <tom@tromey.com>
13499
13500         PR cli/14977:
13501         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
13502         for NULL.
13503
13504 2018-03-14  Tom Tromey  <tom@tromey.com>
13505
13506         PR cli/19918:
13507         * printcmd.c (printf_pointer): Allow "-" in format.
13508
13509 2018-03-14  Tom Tromey  <tom@tromey.com>
13510
13511         * printcmd.c (_initialize_printcmd): Add usage to printf.
13512
13513 2018-03-14  Yao Qi  <qiyao@sourceware.org>
13514
13515         * MAINTAINERS: Update my email address.
13516
13517 2018-03-13  Tom Tromey  <tom@tromey.com>
13518
13519         * machoread.c (macho_check_dsym): Change filenamep to a
13520         std::string*.
13521         (macho_symfile_read): Update.
13522         * symfile.c (load_command): Use std::string.
13523
13524 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13525
13526         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
13527         to error message string.
13528         (riscv_register_name): Use xsnprintf instead of sprintf.
13529         (riscv_insn::fetch_instruction): Use gdb_assert instead of
13530         internal_error.
13531         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
13532         error.
13533         (riscv_push_dummy_call): Likewise.
13534
13535 2018-03-12  Tom Tromey  <tom@tromey.com>
13536
13537         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
13538         Use gdb::byte_vector.
13539         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
13540
13541 2018-03-12  Yao Qi  <yao.qi@linaro.org>
13542
13543         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
13544         parameter type to readable_regcache.
13545         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
13546         the declaration.
13547
13548 2018-03-11  Tom Tromey  <tom@tromey.com>
13549
13550         * dwarf2read.c (struct nextfield): Add initializers.
13551         (struct nextfnfield): Remove.
13552         (struct fnfieldlist): Add initializers.  Remove "length" and
13553         "head", use std::vector.
13554         (struct decl_field_list): Remove.
13555         (struct field_info): Add initializers.
13556         <fields, baseclasses>: Now std::vector.
13557         <nbaseclasses, nfnfields, typedef_field_list_count,
13558         nested_types_list_count>: Remove.
13559         (dwarf2_add_field, dwarf2_add_type_defn)
13560         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
13561         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
13562         (process_structure_scope): Update.
13563
13564 2018-03-11  Tom Tromey  <tom@tromey.com>
13565
13566         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
13567         for use by std::sort.
13568         (build_type_psymtabs_1): Use std::vector.
13569
13570 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
13571
13572         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
13573         and LIBMPFR in the printed configuration.
13574
13575 2018-03-08  Tom Tromey  <tom@tromey.com>
13576
13577         * source.c (get_filename_and_charpos): Use scoped_fd.
13578         * nto-procfs.c (procfs_open_1): Use scoped_fd.
13579         (procfs_pidlist): Likewise.
13580         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
13581         (iterate_over_mappings): Likewise.
13582
13583 2018-03-08  Tom Tromey  <tom@tromey.com>
13584
13585         * infcall.c (struct call_return_meta_info)
13586         <stack_temporaries_enabled>: Remove.
13587         (get_call_return_value, call_function_by_hand_dummy): Update.
13588         * thread.c (disable_thread_stack_temporaries): Remove.
13589         (enable_thread_stack_temporaries): Remove.
13590         (thread_stack_temporaries_enabled_p): Return bool.
13591         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
13592         (get_last_thread_stack_temporary): Update.
13593         * eval.c (evaluate_subexp): Update.
13594         * gdbthread.h (class enable_thread_stack_temporaries): Now a
13595         class, not a function.
13596         (value_ptr, value_vec): Remove typedefs.
13597         (class thread_info) <stack_temporaries_enabled>: Now bool.
13598         <stack_temporaries>: Now a std::vector.
13599         (thread_stack_temporaries_enabled_p)
13600         (value_in_thread_stack_temporaries): Return bool.
13601
13602 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
13603
13604         * remote.c (putpkt_binary): Fix omitted bytes reporting.
13605         (getpkt_or_notif_sane_1): Likewise.
13606
13607 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13608
13609         * build-id.c (build_id_to_debug_bfd): Use std::string.
13610
13611 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13612
13613         * build-id.c (find_separate_debug_file_by_buildid): Return
13614         std::string.
13615         * build-id.h (find_separate_debug_file_by_buildid): Return
13616         std::string.
13617         * coffread.c (coff_symfile_read): Adjust to std::string.
13618         * elfread.c (elf_symfile_read): Adjust to std::string.
13619         * symfile.c (separate_debug_file_exists): Change parameter to
13620         std::string.
13621         (find_separate_debug_file): Return std::string.
13622         (find_separate_debug_file_by_debuglink): Return std::string.
13623         * symfile.h (find_separate_debug_file_by_debuglink): Return
13624         std::string.
13625
13626 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13627
13628         * common/xml-utils.c (xml_escape_text): Move code to...
13629         (xml_escape_text_append): ... this new function.
13630         * common/xml-utils.h (xml_escape_text_append): New declaration.
13631         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
13632         New function.
13633         (_initialize_xml_utils): register test_xml_escape_text_append as
13634         a selftest.
13635
13636 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
13637
13638         * defs.h: Remove MAX_REGISTER_SIZE.
13639         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
13640         asserts.
13641         * python/py-unwind.c (pyuw_sniffer): Likewise.
13642
13643 2018-03-07  Tom Tromey  <tom@tromey.com>
13644
13645         * linux-tdep.c (linux_info_proc): Update.
13646         * target.h (struct target_ops) <to_fileio_readlink>: Return
13647         optional<string>.
13648         (target_fileio_readlink): Return optional<string>.
13649         * remote.c (remote_hostio_readlink): Return optional<string>.
13650         * inf-child.c (inf_child_fileio_readlink): Return
13651         optional<string>.
13652         * target.c (target_fileio_readlink): Return optional<string>.
13653
13654 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
13655
13656         * regcache.c (cooked_read_test): Add riscv to the list of
13657         architectures that have a save_reggroup.
13658
13659 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13660
13661         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
13662         value is not a dynamic class object.
13663
13664 2018-03-06  Tom Tromey  <tom@tromey.com>
13665
13666         * rust-exp.y: Formatting fixes.
13667
13668 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13669
13670         * riscv-tdep.c (riscv_register_name): Remove target description
13671         support.
13672         (riscv_gdbarch_init): Remove target description check.
13673
13674 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13675
13676         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
13677         comment.
13678         * riscv-tdep.h: Likewise.
13679
13680 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13681
13682         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
13683         (riscv_pseudo_register_write): Delete.
13684         (riscv_gdbarch_init): Remove all use of pseudo registers.
13685
13686 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13687
13688         * record-btrace.c (btrace_print_lines): Replace cleanup
13689         parameter with RAII equivalents.
13690         (btrace_insn_history): Replace cleanup with RAII equivalents.
13691         * ui-out.h (make_cleanup_ui_out_list_begin_end,
13692         make_cleanup_ui_out_tuple_begin_end): Remove.
13693         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
13694         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
13695         make_cleanup_ui_out_list_begin_end): Remove.
13696
13697 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13698
13699         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
13700         parameter types to std::vector.  Use bool.
13701         (record_btrace_wait): Replace VEC(tp_t) with
13702         std::vector<thread_info *>.
13703         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
13704
13705 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13706
13707         * record-btrace.c (record_btrace_disable_callback): Remove.
13708         (struct scoped_btrace_disable): New.
13709         (record_btrace_open): Use scoped_btrace_disable.
13710
13711 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13712
13713         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
13714         reading values from registers.
13715
13716 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13717
13718         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
13719         where appropriate.
13720
13721 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13722
13723         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
13724         change parameter type.  Use GDB's print functions, and use
13725         core_addr_to_string where appropriate.
13726         (riscv_push_dummy_call): Use core_addr_to_string where
13727         appropriate, update call to riscv_print_arg_location, and reindent
13728         a few lines.
13729         (riscv_return_value): Update call to riscv_print_arg_location.
13730
13731 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13732             Tim Newsome <tim@sifive.com>
13733             Albert Ou <a0u@eecs.berkeley.edu>
13734             Darius Rad <darius@bluespec.com>
13735
13736         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
13737         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
13738         (ALLDEPFILES): Add riscv-tdep.c
13739         * configure.tgt: Add riscv support.
13740         * riscv-tdep.c: New file.
13741         * riscv-tdep.h: New file.
13742         * NEWS: Mention new target.
13743         * MAINTAINERS: Add entry for riscv.
13744
13745 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13746
13747         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
13748         fields within aggregates.
13749
13750 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
13751
13752         * record-btrace.c (btrace_print_lines): Change type of flags to
13753         gdb_disassembly_flags.
13754
13755 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13756
13757         * fbsd-nat.c: Include "inf-ptrace.h".
13758         (USE_SIGTRAP_SIGINFO): Conditionally define.
13759         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13760         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13761         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13762         function.
13763         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13764         Likewise.
13765         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13766         Likewise.
13767         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13768         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13769         "supports_stopped_by_hw_breakpoint" target methods.
13770
13771 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13772
13773         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13774         * fbsd-nat.c (debug_fbsd_nat): New variable.
13775         (show_fbsd_nat_debug): New function.
13776         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13777         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13778
13779 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13780
13781         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13782         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13783         prototype.
13784         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13785         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13786         method.
13787
13788 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13789
13790         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13791         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13792
13793 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13794
13795         * charset.c (struct charset_vector): New.
13796         (charsets): Change type to charset_vector.
13797         (find_charset_names): Adjust.
13798         (add_one): Adjust.
13799         (_initialize_charset): Adjust.
13800
13801 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13802
13803         * progspace.h (struct program_space) <deleted_solibs>: Change
13804         type to std::vector<std::string>.
13805         * progspace.c (clear_program_space_solib_cache): Adjust.
13806         * breakpoint.c (print_solib_event): Adjust.
13807         (check_status_catch_solib): Adjust.
13808         * solib.c (update_solib_list): Adjust.
13809         * ui-out.h (class ui_out) <field_string>: New overload.
13810         * ui-out.c (ui_out::field_string): New overload.
13811
13812 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13813
13814         * progspace.h (struct program_space): Add constructor and
13815         destructor, initialize fields.
13816         (add_program_space): Remove.
13817         * progspace.c (add_program_space): Rename to...
13818         (program_space::program_space): ... this.
13819         (release_program_space): Rename to...
13820         (program_space::~program_space): ... this.
13821         (delete_program_space): Use delete to delete program_space.
13822         (initialize_progspace): Use new to allocate program_space.
13823         * inferior.c (add_inferior_with_spaces): Likewise.
13824         (clone_inferior_command): Likewise.
13825         * infrun.c (follow_fork_inferior): Likewise.
13826         (handle_vfork_child_exec_or_exit): Likewise.
13827
13828 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13829
13830         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13831         (delim_string_to_char_ptr_vec): Return std::vector of
13832         gdb::unique_xmalloc_ptr.
13833         (dirnames_to_char_ptr_vec_append): Take std::vector of
13834         gdb::unique_xmalloc_ptr.
13835         (dirnames_to_char_ptr_vec): Return std::vector of
13836         gdb::unique_xmalloc_ptr.
13837         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13838         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13839         (delim_string_to_char_ptr_vec): Return an std::vector of
13840         gdb::unique_xmalloc_ptr, adjust the code.
13841         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13842         gdb::unique_xmalloc_ptr, adjust the code.
13843         (dirnames_to_char_ptr_vec): Return an std::vector of
13844         gdb::unique_xmalloc_ptr, adjust the code.
13845         * auto-load.c (auto_load_safe_path_vec): Change type to
13846         std::vector of gdb::unique_xmalloc_ptr.
13847         (auto_load_expand_dir_vars): Return an std::vector of
13848         gdb::unique_xmalloc_ptr, adjust the code.
13849         (auto_load_safe_path_vec_update): Adjust.
13850         (filename_is_in_auto_load_safe_path_vec): Adjust.
13851         (auto_load_objfile_script_1): Adjust.
13852         * build-id.c (build_id_to_debug_bfd): Adjust.
13853         * linux-thread-db.c (thread_db_load_search): Adjust.
13854         * source.c (add_path): Adjust.
13855         (openp): Adjust.
13856         * symfile.c (find_separate_debug_file): Adjust.
13857         * utils.c (do_free_char_ptr_vec): Remove.
13858         (make_cleanup_free_char_ptr_vec): Remove.
13859
13860 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13861
13862         PR gdb/22907
13863         * common/pathstuff.c: Conditionally include "<windows.h>".
13864
13865 2018-03-01  Georg Sauthoff  <mail@georg.so>
13866
13867         PR gdb/22888
13868         * gcore.in: Quote variables and switch interpreter to bash.
13869
13870 2018-03-01  Tom Tromey  <tom@tromey.com>
13871
13872         * dwarf2read.c (alloc_discriminant_info): Fix default_index
13873         assertion.  Add assertion for discriminant_index.
13874         (quirk_rust_enum): Use correct base type name in univariant case.
13875
13876 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13877
13878         * record.c (get_call_history_modifiers): Return a
13879         record_print_flags.
13880         (cmd_record_call_history): Adjust.
13881         * record-btrace.c (record_btrace_call_history): Adjust.
13882         (record_btrace_call_history_range): Adjust.
13883         (record_btrace_call_history_from): Adjust.
13884         * target-debug.h (target_debug_print_record_print_flags): New.
13885         * target-delegates.c: Re-generate.
13886         * target.c (target_call_history): Change flags type.
13887         (target_call_history_from): Likewise.
13888         (target_call_history_range): Likewise.
13889         * target.h (struct target_ops) <target_call_history>: Likewise.
13890         (target_call_history_from): Likewise.
13891         (target_call_history_range): Likewise.
13892
13893 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13894             Simon Marchi  <simon.marchi@polymtl.ca>
13895
13896         * common/common-utils.c: Include "sys/stat.h".
13897         (is_regular_file): Move here from "source.c"; change return
13898         type to "bool".
13899         * common/common-utils.h (is_regular_file): New prototype.
13900         * common/pathstuff.c (contains_dir_separator): New function.
13901         * common/pathstuff.h (contains_dir_separator): New prototype.
13902         * source.c: Don't include "sys/stat.h".
13903         (is_regular_file): Move to "common/common-utils.c".
13904
13905 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13906
13907         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13908         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13909         * auto-load.c: Include "common/pathstuff.h".
13910         * common/common-def.h (current_directory): Move here.
13911         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13912         function.
13913         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13914         prototype.
13915         * common/pathstuff.c: New file.
13916         * common/pathstuff.h: New file.
13917         * compile/compile.c: Include "common/pathstuff.h".
13918         * defs.h (current_directory): Move to "common/common-defs.h".
13919         * dwarf2read.c: Include "common/pathstuff.h".
13920         * exec.c: Likewise.
13921         * guile/scm-safe-call.c: Likewise.
13922         * linux-thread-db.c: Likewise.
13923         * main.c: Likewise.
13924         * nto-tdep.c: Likewise.
13925         * objfiles.c: Likewise.
13926         * source.c: Likewise.
13927         * symtab.c: Likewise.
13928         * utils.c: Include "common/pathstuff.h".
13929         (gdb_realpath): Move to "common/pathstuff.c".
13930         (gdb_realpath_keepfile): Likewise.
13931         (gdb_abspath): Likewise.
13932         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13933         (gdb_realpath_keepfile): Likewise.
13934         (gdb_abspath): Likewise.
13935
13936 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13937
13938         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13939         wildcard process pid for super_resume for kernels with a
13940         specific bug.
13941
13942 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13943
13944         * compile/compile.c (get_args): Add additional comments
13945         explaining function.
13946
13947 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13948             Tom Tromey  <tom@tromey.com>
13949
13950         * target.h (memory_write_request_s): Remove typedef.  Don't define
13951         VEC.
13952         (target_write_memory_blocks): Change argument to std::vector.
13953         (struct memory_write_request): Add constructor.
13954         * target-memory.c (compare_block_starting_address): Return bool.
13955         Change argument types.
13956         (claim_memory): Change arguments to use std::vector.
13957         (split_regular_and_flash_blocks, blocks_to_erase)
13958         (compute_garbled_blocks): Likewise.
13959         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13960         (target_write_memory_blocks): Change argument to std::vector.
13961         * symfile.c (struct load_section_data): Add constructor and
13962         destructor.  Use std::vector for "requests".
13963         (struct load_progress_data): Add initializers.
13964         (load_section_callback): Update.  Use "new".
13965         (clear_memory_write_data): Remove.
13966         (generic_load): Update.
13967
13968 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13969
13970         * arch/aarch64.h: Use common/tdesc.h.
13971
13972 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13973
13974         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13975         architecture with a 64-bit ABI.
13976
13977 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13978
13979         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13980         ahead of target description loading.
13981
13982 2018-02-26  Tom Tromey  <tom@tromey.com>
13983
13984         * stack.c (backtrace_command_1): Update.
13985         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13986         of "flags".
13987         * python/py-framefilter.c (py_print_frame)
13988         (gdbpy_apply_frame_filter): Change type of "flags".
13989         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13990         of "flags".
13991         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13992         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13993         * extension.h (enum frame_filter_flag): Rename from
13994         frame_filter_flags.
13995         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13996         (apply_ext_lang_frame_filter): Change type of "flags".
13997         * extension.c (apply_ext_lang_frame_filter): Change type of
13998         "flags".
13999         * extension-priv.h (struct extension_language_ops)
14000         <apply_frame_filter>: Change type of "flags".
14001
14002 2018-02-26  Tom Tromey  <tom@tromey.com>
14003
14004         PR python/16497:
14005         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
14006         off-by-one in py_end computation.
14007         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14008         PRINT_MORE_FRAMES.
14009         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14010         constant.
14011
14012 2018-02-26  Tom Tromey  <tom@tromey.com>
14013
14014         * dwarf2read.c (struct variant_field): New.
14015         (struct nextfield) <variant>: New field.
14016         (dwarf2_add_field): Handle DW_TAG_variant_part.
14017         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14018         discriminated union.
14019         (read_structure_type): Handle DW_TAG_variant_part.
14020         (handle_struct_member_die): New function, extracted from
14021         process_structure_scope.  Handle DW_TAG_variant.
14022         (process_structure_scope): Handle discriminated unions.  Call
14023         handle_struct_member_die.
14024
14025 2018-02-26  Tom Tromey  <tom@tromey.com>
14026
14027         * rust-lang.h (rust_last_path_segment): Declare.
14028         * rust-lang.c (rust_last_path_segment): Now public.  Change
14029         contract.
14030         (struct disr_info): Remove.
14031         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14032         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14033         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14034         (rust_enum_p, rust_enum_variant): New function.
14035         (rust_underscore_fields): Remove "offset" parameter.
14036         (rust_print_enum): New function.
14037         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14038         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14039         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14040         enums.
14041         (rust_internal_print_type): New function, from rust_print_type.
14042         Remove enum code.
14043         (rust_print_type): Call rust_internal_print_type.
14044         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14045         Update enum handling.
14046         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14047         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14048         (rust_union_quirks): New functions.
14049         (process_full_comp_unit, process_full_type_unit): Call
14050         rust_union_quirks.
14051         (process_structure_scope): Update rust_unions if necessary.
14052
14053 2018-02-26  Tom Tromey  <tom@tromey.com>
14054
14055         * value.h (value_union_variant): Declare.
14056         * valops.c (value_union_variant): New function.
14057         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14058         (struct discriminant_info): New.
14059         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14060         enumerator.
14061         (struct main_type) <flag_discriminated_union>: New field.
14062
14063 2018-02-26  Tom Tromey  <tom@tromey.com>
14064
14065         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14066         unittests/unpack-selftests.c.
14067         * unittests/unpack-selftests.c: New file.
14068         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14069
14070 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14071
14072         * dwarf2read.c (struct partial_die_info) <read>: New method.
14073         (read_partial_die): Remove the declaration.
14074         (load_partial_dies): Update.
14075         (partial_die_info::partial_die_info):
14076         (read_partial_die): Change it to partial_die_info::read.
14077
14078 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14079
14080         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14081         (fixup_partial_die): Remove declaration.
14082         (scan_partial_symbols): Update.
14083         (partial_die_parent_scope): Likewise.
14084         (partial_die_full_name): Likewise.
14085         (fixup_partial_die): Change it to partial_die_info::fixup.
14086
14087 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14088
14089         * dwarf2read.c (read_partial_die): Update the declaration.
14090         (load_partial_dies): Caller update.
14091         (read_partial_die): Remove one argument abbrev_len.
14092
14093 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14094
14095         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14096         assignment operator.
14097         (load_partial_dies): Use ctor and copy ctor.
14098         (read_partial_die): Update.
14099         (dwarf2_cu::find_partial_die): Use ctor.
14100
14101 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14102
14103         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14104         (find_partial_die_in_comp_unit): Change it to
14105         dwarf2_cu::find_partial_die.
14106         (find_partial_die): Update.
14107
14108 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14109
14110         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14111         is NULL.
14112
14113 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14114
14115         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14116
14117 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14118
14119         * arch/amd64.h: Use common/tdesc.h.
14120         * arch/i386.c: Likewise.
14121         * arch/i386.h: Likewise.
14122         * arch/tic6x.c: Likewise.
14123         * arch/tdesc.h: Move file from here...
14124         * common/tdesc.h: ...to here.
14125         * features/aarch64-core.c: Regenerate.
14126         * features/aarch64-fpu.c: Regenerate.
14127         * features/i386/32bit-avx.c: Regenerate.
14128         * features/i386/32bit-avx512.c: Regenerate.
14129         * features/i386/32bit-core.c: Regenerate.
14130         * features/i386/32bit-linux.c: Regenerate.
14131         * features/i386/32bit-mpx.c: Regenerate.
14132         * features/i386/32bit-pkeys.c: Regenerate.
14133         * features/i386/32bit-sse.c: Regenerate.
14134         * features/i386/64bit-avx.c: Regenerate.
14135         * features/i386/64bit-avx512.c: Regenerate.
14136         * features/i386/64bit-core.c: Regenerate.
14137         * features/i386/64bit-linux.c: Regenerate.
14138         * features/i386/64bit-mpx.c: Regenerate.
14139         * features/i386/64bit-pkeys.c: Regenerate.
14140         * features/i386/64bit-segments.c: Regenerate.
14141         * features/i386/64bit-sse.c: Regenerate.
14142         * features/i386/x32-core.c: Regenerate.
14143         * features/tic6x-c6xp.c: Regenerate.
14144         * features/tic6x-core.c: Regenerate.
14145         * features/tic6x-gp.c: Regenerate.
14146         * target-descriptions.c: Use common/tdesc.h.
14147         * target-descriptions.h: Likewise.
14148
14149 2018-02-24  Tom Tromey  <tom@tromey.com>
14150
14151         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14152         (try_thread_db_load_from_dir, thread_db_load_search): Use
14153         std::string.
14154         (info_auto_load_libthread_db_compare): Return bool.  Change
14155         argument types.
14156         (info_auto_load_libthread_db): Use std::vector, std::string.
14157         Remove cleanups.
14158
14159 2018-02-24  Tom Tromey  <tom@tromey.com>
14160
14161         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14162         std::string.
14163         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14164         std::string*.
14165         * gdbarch.c: Rebuild.
14166         * gdbarch.h: Rebuild.
14167         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14168         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14169         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14170         std::string*.
14171
14172 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14173
14174         * gdbtypes.h (sect_offset): Change type to uint64_t.
14175         (sect_offset_str): New function.
14176         * dwarf2read.c (create_addrmap_from_aranges): Use
14177         sect_offset_str.
14178         (error_check_comp_unit_head): Likewise.
14179         (create_debug_type_hash_table): Likewise.
14180         (read_cutu_die_from_dwo): Likewise.
14181         (init_cutu_and_read_dies): Likewise.
14182         (init_cutu_and_read_dies_no_follow): Likewise.
14183         (process_psymtab_comp_unit_reader): Likewise.
14184         (partial_die_parent_scope): Likewise.
14185         (peek_die_abbrev): Likewise.
14186         (process_queue): Likewise.
14187         (dwarf2_physname): Likewise.
14188         (read_namespace_alias): Likewise.
14189         (read_import_statement): Likewise.
14190         (create_dwo_cu_reader): Likewise.
14191         (create_cus_hash_table): Likewise.
14192         (lookup_dwo_cutu): Likewise.
14193         (inherit_abstract_dies): Likewise.
14194         (read_func_scope): Likewise.
14195         (read_call_site_scope): Likewise.
14196         (dwarf2_add_member_fn): Likewise.
14197         (read_common_block): Likewise.
14198         (read_module_type): Likewise.
14199         (read_typedef): Likewise.
14200         (read_subrange_type): Likewise.
14201         (load_partial_dies): Likewise.
14202         (read_partial_die): Likewise.
14203         (find_partial_die): Likewise.
14204         (read_str_index): Likewise.
14205         (dwarf2_string_attr): Likewise.
14206         (build_error_marker_type): Likewise.
14207         (lookup_die_type): Likewise.
14208         (dump_die_shallow): Likewise.
14209         (follow_die_ref): Likewise.
14210         (dwarf2_fetch_die_loc_sect_off): Likewise.
14211         (dwarf2_fetch_constant_bytes): Likewise.
14212         (follow_die_sig): Likewise.
14213         (get_signatured_type): Likewise.
14214         (get_DW_AT_signature_type): Likewise.
14215         (dwarf2_find_containing_comp_unit): Likewise.
14216         (set_die_type): Likewise.
14217
14218 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14219
14220         * arch/aarch64.c: Include "common-defs.h".
14221         * arch/amd64.c: Likewise.
14222         * arch/i386.c: Likewise.
14223
14224 2018-02-21  Tom Tromey  <tom@tromey.com>
14225
14226         * value.h: (extract_field_op): Update.
14227         * eval.c (extract_field_op): Return a const char *.
14228         * expression.h (parse_expression_for_completion): Update.
14229         * completer.c (complete_expression): Update.
14230         (add_struct_fields): Make fieldname const.
14231         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14232         (mark_completion_tag, parse_exp_in_context_1): Update.
14233         (parse_expression_for_completion): Change "name" to
14234         unique_xmalloc_ptr*.
14235
14236 2018-02-21  Tom Tromey  <tom@tromey.com>
14237
14238         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14239
14240 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14241
14242         * avr-tdep.c (avr_read_pc): Change parameter type to
14243         readable_regcache.
14244         * gdbarch.sh (read_pc): Likewise.
14245         * gdbarch.c: Re-generated.
14246         * gdbarch.h: Re-generated.
14247         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14248         readable_regcache.
14249         * ia64-tdep.c (ia64_read_pc): Likewise.
14250         * mips-tdep.c (mips_read_pc): Likewise.
14251         * spu-tdep.c (spu_read_pc): Likewise.
14252
14253 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14254
14255         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14256         * regcache-dump.c: New file.
14257         * regcache.c: Move register_dump to regcache-dump.c.
14258         (maintenance_print_registers): Likewise.
14259         (maintenance_print_raw_registers): Likewise.
14260         (maintenance_print_cooked_registers): Likewise.
14261         (maintenance_print_register_groups): Likewise.
14262         (maintenance_print_remote_registers): Likewise.
14263         (_initialize_regcache): Likewise.
14264         * regcache.h (register_dump): Moved from regcache.c.
14265
14266 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14267
14268         * regcache.c (regcache::regcache): Update.
14269         (regcache::invalidate): Move it to detached_regcache::invalidate.
14270         (get_thread_arch_aspace_regcache): Update.
14271         (regcache::raw_update): Update.
14272         (regcache::cooked_read): Remove some code.
14273         (regcache::cooked_read_value): Likewise.
14274         (regcache::raw_write): Remove assert on m_readonly_p.
14275         (regcache::raw_supply_integer): Move it to
14276         detached_regcache::raw_supply_integer.
14277         (regcache::raw_supply_zeroed): Likewise.
14278         * regcache.h (detached_regcache) <raw_supply_integer>: New
14279         declaration.
14280         <raw_supply_zeroed, invalidate>: Likewise.
14281         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14282         <invalidate>: Likewise.
14283         <m_readonly_p>: Removed.
14284
14285 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14286
14287         * infcmd.c (get_return_value): Let stop_regs point to
14288         get_current_regcache.
14289         * regcache.c (regcache::regcache): Remove.
14290         (register_dump_reg_buffer): New class.
14291         (regcache_print): Adjust.
14292         * regcache.h (regcache): Remove constructors.
14293
14294 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14295
14296         * regcache.c (class register_dump): New class.
14297         (register_dump_regcache, register_dump_none): New class.
14298         (register_dump_remote, register_dump_groups): New class.
14299         (regcache_print): Update.
14300         * regcache.h (regcache_dump_what): Move it to regcache.c.
14301         (regcache) <dump>: Remove.
14302
14303 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14304
14305         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14306          reg_buffer_rw *.
14307         (jit_unwind_reg_set_impl): Call raw_supply.
14308         (jit_frame_sniffer): Use reg_buffer_rw.
14309         * record-full.c (record_full_core_regbuf): Change its type.
14310         (record_full_core_open_1): Use reg_buffer_rw.
14311         (record_full_close): Likewise.
14312         (record_full_core_fetch_registers): Use regcache->raw_supply.
14313         (record_full_core_store_registers): Likewise.
14314         * regcache.c (regcache::get_register_status): Move it to
14315         reg_buffer.
14316         (regcache_raw_set_cached_value): Remove.
14317         (regcache::raw_set_cached_value): Remove.
14318         (regcache::raw_write): Call raw_supply.
14319         (regcache::raw_supply): Move it to reg_buffer_rw.
14320         * regcache.h (regcache_raw_set_cached_value): Remove.
14321         (reg_buffer_rw): New class.
14322
14323 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14324
14325         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14326         readonly_detached_regcache.
14327         (dummy_frame_prev_register): Use regcache->cooked_read.
14328         * frame.c (frame_save_as_regcache): Change return type.
14329         (frame_pop): Update.
14330         * frame.h (frame_save_as_regcache): Update declaration.
14331         * inferior.h (get_infcall_suspend_state_regcache): Update
14332         declaration.
14333         * infrun.c (infcall_suspend_state) <registers>: use
14334         readonly_detached_regcache.
14335         (save_infcall_suspend_state): Don't use regcache_dup.
14336         (get_infcall_suspend_state_regcache): Change return type.
14337         * linux-fork.c (struct fork_info) <savedregs>: Change to
14338         readonly_detached_regcache.
14339         <pc>: New field.
14340         (fork_save_infrun_state): Don't use regcache_dup.
14341         (info_checkpoints_command): Adjust.
14342         * mi/mi-main.c (register_changed_p): Update declaration.
14343         (mi_cmd_data_list_changed_registers): Use
14344         readonly_detached_regcache.
14345         (register_changed_p): Change parameter type to
14346         readonly_detached_regcache.
14347         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14348         readonly_detached_regcache.
14349         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14350         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14351         New.
14352         (regcache::save): Move it to reg_buffer.
14353         (regcache::restore): Change parameter type.
14354         (regcache_dup): Remove.
14355         * regcache.h (reg_buffer) <save>: New method.
14356         (readonly_detached_regcache): New class.
14357         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14358         readonly_detached_regcache.
14359         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14360
14361 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14362
14363         * frame.c (frame_save_as_regcache): Use regcache method save.
14364         (frame_pop): Use regcache method restore.
14365         * infrun.c (restore_infcall_suspend_state): Likewise.
14366         * linux-fork.c (fork_load_infrun_state): Likewise.
14367         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14368         save.
14369         * regcache.c (regcache_save): Remove.
14370         (regcache::restore): More asserts.
14371         (regcache_cpy): Remove.
14372         * regcache.h (regcache_save): Remove the declaration.
14373         (regcache::restore): Move from private to public.
14374         Remove the friend declaration of regcache_cpy.
14375         (regcache_cpy): Remove declaration.
14376
14377 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14378
14379         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14380         parameter type to 'readable_regcache *'.
14381         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14382         * arm-tdep.c (arm_neon_quad_read): Likewise.
14383         (arm_pseudo_read): Likewise.
14384         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14385         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14386         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14387         * gdbarch.c: Re-generated.
14388         * gdbarch.h: Re-generated.
14389         * gdbarch.sh (pseudo_register_read): Change parameter type to
14390         'readable_regcache *'.
14391         (pseudo_register_read_value): Likewise.
14392         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14393         (h8300_pseudo_register_read): Likewise.
14394         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14395         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14396         (i386_pseudo_register_read_into_value): Likewise.
14397         (i386_pseudo_register_read_value): Likewise.
14398         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14399         declaration.
14400         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14401         * m32c-tdep.c (m32c_raw_read): Likewise.
14402         (m32c_read_flg): Likewise.
14403         (m32c_banked_register): Likewise.
14404         (m32c_banked_read): Likewise.
14405         (m32c_sb_read): Likewise.
14406         (m32c_part_read): Likewise.
14407         (m32c_cat_read): Likewise.
14408         (m32c_r3r2r1r0_read): Likewise.
14409         (m32c_pseudo_register_read): Likewise.
14410         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14411         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14412         (mep_pseudo_cr64_read): Likewise.
14413         (mep_pseudo_register_read): Likewise.
14414         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14415         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14416         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14417         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14418         (regcache::cooked_read): Likewise.
14419         (regcache::cooked_read_value): Likewise.
14420         (regcache_cooked_read_signed):
14421         (regcache::cooked_read): Likewise.
14422         * regcache.h (readable_regcache): New class.
14423         (regcache): Inherit readable_regcache.  Move some methods to
14424         readable_regcache.
14425         * rl78-tdep.c (rl78_pseudo_register_read): Change
14426         parameter type to 'readable_regcache *'.
14427         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14428         (e500_pseudo_register_read): Change parameter type to
14429         'readable_regcache *'.
14430         (dfp_pseudo_register_read): Likewise.
14431         (vsx_pseudo_register_read): Likewise.
14432         (efpr_pseudo_register_read): Likewise.
14433         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14434         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14435         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14436         (sh64_pseudo_register_read): Likewise.
14437         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14438         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14439         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14440         (spu_pseudo_register_read): Likewise.
14441         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14442         (xtensa_pseudo_register_read): Likewise.
14443
14444 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14445
14446         * regcache.c (regcache::regcache): Call reg_buffer ctor.
14447         (regcache::arch): Move it to reg_buffer::arch.
14448         (regcache::register_buffer): Likewise.
14449         (regcache::assert_regnum): Likewise.
14450         (regcache::num_raw_registers): Likewise.
14451         * regcache.h (reg_buffer): New class.
14452         (regcache): Inherit reg_buffer.
14453
14454 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
14455
14456         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14457         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14458
14459 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
14460
14461         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14462
14463 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
14464
14465         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14466         (SFILES): Remove common/*.c files.
14467         (COMMON_OBS): Remove some *.o files built from common/*.c files.
14468         * common/common.host: Add common reference.
14469         * configure.ac: Likewise.
14470         * configure: Regenerate.
14471
14472 2018-02-16  Yao Qi  <yao.qi@linaro.org>
14473
14474         * block.c (block_namespace_info): Inherit allocate_on_obstack.
14475         (block_initialize_namespace): Use new.
14476         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
14477         (dwarf2_free_objfile): Use delete.
14478         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
14479         (copy_type_recursive): Use new.
14480         * gdb_obstack.h (allocate_on_obstack): New.
14481
14482 2018-02-15  Yao Qi  <yao.qi@linaro.org>
14483
14484         PR gdb/22849
14485         * inferior.c (exit_inferior_1): Reset inf->control.
14486
14487 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
14488
14489         * ada-lang.c (ada_to_fixed_value_create): Delete advance
14490         declaration.
14491
14492 2018-02-14  Pedro Alves  <palves@redhat.com>
14493
14494         * frame-unwind.c (frame_unwind_try_unwinder): Always call
14495         frame_cleanup_after_sniffer on exception.
14496
14497 2018-02-14  Tom Tromey  <tom@tromey.com>
14498
14499         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
14500         const.
14501         (solib_bfd_open): Make pathname const.
14502         * solib.c (solib_bfd_open): Make pathname const.
14503         * solib-spu.c (spu_bfd_fopen): Make name const.
14504         (spu_bfd_open): Make pathname const.
14505         * solib-darwin.c (darwin_bfd_open): Make pathname const.
14506         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
14507
14508 2018-02-14  Tom Tromey  <tom@tromey.com>
14509
14510         * symfile.c (symfile_bfd_open): Update.
14511         * source.h (openp, source_full_path_of, find_and_open_source):
14512         Change argument type to unique_xmalloc_ptr.
14513         * source.c (openp): Take a unique_xmalloc_ptr.
14514         (source_full_path_of, find_and_open_source): Likewise.
14515         (open_source_file, symtab_to_fullname): Update.
14516         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
14517         unique_xmalloc_ptr.
14518         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
14519         (exec_file_find): Update.
14520         * psymtab.c (psymtab_to_fullname): Update.
14521         * nto-tdep.h (nto_find_and_open_solib): Update.
14522         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
14523         unique_xmalloc_ptr.
14524         * exec.c (exec_file_attach): Update.
14525         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
14526         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
14527
14528 2018-02-14  Tom Tromey  <tom@tromey.com>
14529
14530         * solib.c: Include source.h.
14531         * nto-tdep.c: Include source.h.
14532         * mi/mi-cmd-env.c: Include source.h.
14533         * infcmd.c: Include source.h.
14534         * exec.c: Include source.h.
14535         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
14536         (add_path, directory_switch, source_path, init_source_path): Move
14537         declarations...
14538         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
14539         (add_path, directory_switch, source_path, init_source_path):
14540         ...here.
14541
14542 2018-02-14  Tom Tromey  <tom@tromey.com>
14543
14544         * solist.h (exec_file_find, solib_find): Return
14545         unique_xmalloc_ptr.
14546         (solib_bfd_fopen): Take a const char *.
14547         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
14548         (exec_file_find, solib_find): Likewise.
14549         (solib_bfd_fopen): Do not take ownership of "pathname".
14550         (solib_bfd_open): Use unique_xmalloc_ptr.
14551         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
14552         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
14553         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
14554         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
14555
14556 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
14557
14558         * ada-lang.c (name_match_type_from_name): Remove reference to
14559         ada_name_for_lookup in function's documentation.
14560         * ada-lang.h (ada_name_for_lookup): Delete declaration.
14561
14562 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14563
14564         * defs.h (enum openp_flags): New enum.
14565         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
14566         Move to enum openp_flags.
14567         (openp_flags): New enum flags.
14568         (openp): Change parameter type to openp_flags.
14569         * source.c (openp): Change parameter type to openp_flags.
14570         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
14571         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
14572
14573 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14574
14575         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
14576         per-command.
14577
14578 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14579
14580         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
14581         into...
14582         (class dwarf2_queue_guard): ...the destructor of this new class.
14583         (dw2_do_instantiate_symtab): Create instance of the new class
14584         dwarf2_queue_guard, remove cleanup.
14585
14586 2018-02-09  Tom Tromey  <tom@tromey.com>
14587
14588         * source.c (find_source_lines): Don't reference past the end of
14589         the vector.
14590
14591 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14592
14593         * remote.c (remote_btrace_maybe_reopen): Change error message.
14594         * btrace.c (btrace_enable): Likewise.
14595         (parse_xml_btrace): Likewise.
14596         (parse_xml_btrace_conf): Likewise.
14597
14598 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14599
14600         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
14601         (linux_enable_pt, linux_enable_bts): Call
14602         diagnose_perf_event_open_fail.
14603
14604 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14605
14606         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
14607         Remove parameter and change return type.  Update callers.  Move it.
14608         (linux_enable_bts, linux_enable_pt): Improve error message.
14609         (linux_enable_pt): Remove zero buffer size check.
14610         (linux_enable_btrace): Improve error messages.  Remove NULL return
14611         check.
14612
14613 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14614
14615         * btrace.c (btrace_enable): Remove target_supports_btrace call.
14616         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
14617         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
14618         (linux_supports_pt, linux_supports_btrace): Remove.
14619         (linux_enable_bts): Call cpu_supports_bts.
14620         * nat/linux-btrace.h (linux_supports_btrace): Remove.
14621         * remote.c (remote_supports_btrace): Remove.
14622         (init_remote_ops): Remove remote_supports_btrace.
14623         * target-delegates.c: Regenerated.
14624         * target.c (target_supports_btrace): Remove.
14625         * target.h (target_ops) <to_supports_btrace>: Remove
14626         (target_supports_btrace): Remove.
14627         * x86-linux-nat.c (x86_linux_create_target): Remove
14628         linux_supports_btrace.
14629
14630 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14631
14632         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
14633         btrace failed.
14634         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
14635         exception and use message in own exception.
14636
14637 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14638
14639         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
14640         (perf_event_pt_event_type): Use gdb_file_up.
14641         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
14642         scoped_fd, and scoped_mmap.
14643
14644 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14645
14646         * common/scoped_mmap.h: New.
14647         * unittests/scoped_mmap-selftest.c: New.
14648         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14649         unittests/scoped_mmap-selftest.c.
14650
14651 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14652
14653         * common/scoped_fd.h: New.
14654         * unittests/scoped_fd-selftest.c: New.
14655         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14656         unittests/scoped_fd-selftest.c.
14657
14658 2018-02-09  Tom Tromey  <tom@tromey.com>
14659
14660         * auto-load.c (auto_load_section_scripts): Use
14661         gdb::unique_xmalloc_ptr.
14662
14663 2018-02-09  Tom Tromey  <tom@tromey.com>
14664
14665         * auto-load.c (execute_script_contents): Use std::string.
14666
14667 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
14668
14669         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
14670         Python function, rather than a new command.
14671
14672 2018-02-08  Tom Tromey  <tom@tromey.com>
14673
14674         * solib.c (solib_find_1): Use std::string.
14675         (solib_bfd_fopen): Use unique_xmalloc_ptr.
14676
14677 2018-02-08  Tom Tromey  <tom@tromey.com>
14678
14679         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
14680
14681 2018-02-08  Tom Tromey  <tom@tromey.com>
14682
14683         * source.c (find_source_lines): Use gdb::def_vector.
14684
14685 2018-02-08  Tom Tromey  <tom@tromey.com>
14686
14687         * macrocmd.c (struct temporary_macro_definition): New.
14688         (macro_define_command): Use temporary_macro_definition.  Remove
14689         cleanups.
14690         (free_macro_definition_ptr): Remove.
14691
14692 2018-02-08  Tom Tromey  <tom@tromey.com>
14693
14694         * macroexp.c (maybe_expand): Use std::string.
14695
14696 2018-02-08  Tom Tromey  <tom@tromey.com>
14697
14698         * macroexp.c (struct macro_buffer): Add initializers for some
14699         members.
14700         (init_buffer, init_shared_buffer, free_buffer)
14701         (free_buffer_return_text): Remove.
14702         (macro_buffer): New constructors.
14703         (~macro_buffer): New destructor.
14704         (macro_buffer::set_shared): New method.
14705         (macro_buffer::resize_buffer, macro_buffer::appendc)
14706         (macro_buffer::appendmem): Now methods, not free functions.
14707         (set_token, append_tokens_without_splicing, stringify)
14708         (macro_stringify): Update.
14709         (gather_arguments): Change return type.  Remove argc_p argument,
14710         add args_ptr argument.  Use std::vector.
14711         (substitute_args): Remove argc argument.  Accept std::vector.
14712         (expand): Update.  Use std::vector.
14713         (scan, macro_expand, macro_expand_next): Update.
14714
14715 2018-02-08  Tom Tromey  <tom@tromey.com>
14716
14717         * symtab.c (default_collect_symbol_completion_matches_break_on):
14718         Use unique_xmalloc_ptr.
14719         * macroscope.h: (sal_macro_scope, user_macro_scope)
14720         (default_macro_scope): Return unique_xmalloc_ptr.
14721         * macroscope.c (sal_macro_scope, user_macro_scope)
14722         (default_macro_scope): Return unique_xmalloc_ptr.
14723         * macroexp.h (macro_expand, macro_expand_once): Return
14724         unique_xmalloc_ptr.
14725         * macroexp.c (macro_expand, macro_expand_once): Return
14726         unique_xmalloc_ptr.
14727         * macrocmd.c (macro_expand_command, macro_expand_once_command)
14728         (info_macro_command, info_macros_command): Use
14729         unique_xmalloc_ptr.
14730         * compile/compile-c-support.c (write_macro_definitions): Use
14731         unique_xmalloc_ptr.
14732         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
14733
14734 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
14735
14736         * value.c (value_static_field): Assign field type instead of
14737         containing type when returning an optimized out value.
14738
14739 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14740
14741         * ft32-tdep.c (ft32_read_pc): Remove.
14742         (ft32_write_pc): Remove.
14743         (ft32_gdbarch_init): Update.
14744         * m32r-tdep.c (m32r_read_pc): Remove.
14745         (m32r_gdbarch_init): Update.
14746         * mep-tdep.c (mep_read_pc): Remove.
14747         (mep_gdbarch_init): Update.
14748         * microblaze-tdep.c (microblaze_write_pc): Remove.
14749         (microblaze_gdbarch_init): Update.
14750         * mn10300-tdep.c (mn10300_read_pc): Remove.
14751         (mn10300_write_pc): Remove.
14752         (mn10300_gdbarch_init): Update.
14753         * moxie-tdep.c (moxie_read_pc): Remove.
14754         (moxie_write_pc): Remove.
14755         (moxie_gdbarch_init): Update.
14756
14757 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14758
14759         * expprint.c (print_subexp_standard): Handle
14760         OP_F77_UNDETERMINED_ARGLIST.
14761         (dump_subexp_body_standard): Likewise.
14762
14763 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
14764
14765         * target-descriptions.c (tdesc_element_visitor) Add empty
14766         implementations.
14767         (tdesc_type): Move make_gdb_type from here.
14768         (tdesc_type_builtin): Likewise.
14769         (tdesc_type_vector): Likewise.
14770         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14771         (make_gdb_type_struct): Move from tdesc_type_with_fields.
14772         (make_gdb_type_union): Likewise.
14773         (make_gdb_type_flags): Likewise.
14774         (make_gdb_type_enum): Likewise.
14775         (make_gdb_type): New function.
14776         (tdesc_register_type): Use static make_gdb_type.
14777
14778 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
14779
14780         * infcmd.c (default_print_one_register_info): Align natural-format
14781         column values consistently one under another.
14782         (pad_to_column): New function.
14783
14784 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
14785
14786         * dwarf2read.c (dwarf2_physname): Move commment.
14787
14788 2018-02-01  Leszek Swirski  <leszeks@google.com>
14789
14790         * varobj.c (varobj_formatted_print_options): Allow recursive
14791         pretty printing if pretty printing is enabled.
14792
14793 2018-02-01  Leszek Swirski  <leszeks@google.com>
14794
14795         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14796         names after a structop as a filename.
14797
14798 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14799
14800         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14801         (arm_record_coproc_data_proc): Likewise.
14802
14803 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14804
14805         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14806
14807 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
14808
14809         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14810         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14811
14812 2018-01-31  Pedro Alves  <palves@redhat.com>
14813
14814         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14815         * inflow.c (child_terminal_save_inferior): Wrap reference to
14816         tcgetpgrp in HAVE_TERMIOS_H.
14817         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14818         _WIN32.
14819         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14820         always iterate over all inferiors.
14821         (gdbsim_cntrl_c): Adjust.
14822         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14823
14824 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14825
14826         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14827         index type is objfile-owned if the element type is as well.
14828
14829 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14830
14831         GDB 8.1 released.
14832
14833 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14834
14835         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14836         "features/s390x-linux64.c".
14837         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14838         s390_linux32 and s390x_linux64.
14839         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14840         default tdesc.
14841         * s390-tdep.c: Include "features/s390-linux32.c" and
14842         "features/s390x-linux64.c".
14843         (s390_tdesc_valid): Add check for tdesc_has_registers.
14844         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14845         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14846         tdesc_s390x_linux64.
14847         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14848         tdesc_s390x_linux64 to...
14849         * s390-tdep.h: ...here.
14850
14851 2018-01-30  Pedro Alves  <palves@redhat.com>
14852
14853         PR gdb/13211
14854         * config.in, configure: Regenerate.
14855         * configure.ac: Check for getpgid.
14856         * go32-nat.c (go32_pass_ctrlc): New.
14857         (go32_target): Install it.
14858         * inf-child.c (inf_child_target): Install
14859         child_terminal_save_inferior, child_pass_ctrlc and
14860         child_interrupt.
14861         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14862         (inf_ptrace_target): No longer install it.
14863         * infcmd.c (interrupt_target_1): Adjust.
14864         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14865         (child_interrupt): Declare.
14866         (inferior::terminal_state): New.
14867         * inflow.c (struct terminal_info): Update comments.
14868         (inferior_process_group): Delete.
14869         (terminal_is_ours): Delete.
14870         (gdb_tty_state): New.
14871         (child_terminal_init): Adjust.
14872         (is_gdb_terminal, sharing_input_terminal_1)
14873         (sharing_input_terminal): New functions.
14874         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14875         Set the process's actual process group in the foreground if
14876         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14877         mark terminal as the inferior's if not sharing GDB's terminal.
14878         Don't check attach_flag.
14879         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14880         pass down a target_terminal_state.
14881         (child_terminal_save_inferior): New, factored out from ...
14882         (child_terminal_ours_1): ... this.  Handle
14883         target_terminal_state::is_ours_for_output.
14884         (child_interrupt, child_pass_ctrlc): New.
14885         (inflow_inferior_exit): Clear the inferior's terminal_state.
14886         (copy_terminal_info): Copy the inferior's terminal state.
14887         (_initialize_inflow): Remove reference to terminal_is_ours.
14888         * inflow.h (inferior_process_group): Delete.
14889         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14890         * procfs.c (procfs_target): Don't install procfs_interrupt.
14891         (procfs_interrupt): Delete.
14892         * remote.c (remote_serial_quit_handler): Adjust.
14893         (remote_interrupt): Remove ptid parameter.  Adjust.
14894         * target-delegates.c: Regenerate.
14895         * target.c: Include "terminal.h".
14896         (target_terminal::terminal_state): Rename to ...
14897         (target_terminal::m_terminal_state): ... this.
14898         (target_terminal::init): Adjust.
14899         (target_terminal::inferior): Adjust to per-inferior
14900         terminal_state.
14901         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14902         (target_terminal::ours, target_terminal::ours_for_output): Use
14903         target_terminal_is_ours_kind.
14904         (target_interrupt): Remove ptid parameter.  Adjust.
14905         (default_target_pass_ctrlc): Adjust.
14906         * target.h (target_ops::to_terminal_save_inferior): New field.
14907         (target_ops::to_interrupt): Remove ptid_t parameter.
14908         (target_interrupt): Remove ptid_t parameter.  Update comment.
14909         (target_pass_ctrlc): Update comment.
14910         * target/target.h (target_terminal_state): New scoped enum,
14911         factored out of ...
14912         (target_terminal::terminal_state): ... here.
14913         (target_terminal::inferior): Update comments.
14914         (target_terminal::restore_inferior): New.
14915         (target_terminal::is_inferior, target_terminal::is_ours)
14916         (target_terminal::is_ours_for_output): Adjust.
14917         (target_terminal::scoped_restore_terminal_state): Adjust to
14918         rename, and call restore_inferior() instead of inferior().
14919         (target_terminal::scoped_restore_terminal_state::m_state): Change
14920         type.
14921         (target_terminal::terminal_state): Rename to ...
14922         (target_terminal::m_terminal_state): ... this and change type.
14923
14924 2018-01-30  Pedro Alves  <palves@redhat.com>
14925
14926         * linux-nat.c (wait_for_signal): New function.
14927         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14928         directly.
14929         (async_terminal_is_ours)
14930         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14931         (linux_nat_add_target): Don't override
14932         to_terminal_inferior/to_terminal_ours.
14933
14934 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14935
14936         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14937
14938 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14939
14940         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14941         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14942         dwarf2_per_objfile_free here.
14943         (dwarf2_per_objfile_free): Remove.
14944         (_initialize_dwarf2_read): Don't register
14945         dwarf2_per_objfile_free as a registry cleanup.
14946
14947 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14948
14949         Avoid compilation errors in MinGW native builds
14950
14951         The error is triggered by including python-internal.h, and the
14952         error message is:
14953
14954              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14955                       from build-gnulib/import/math.h:27,
14956                       from d:/usr/Python26/include/pyport.h:235,
14957                       from d:/usr/Python26/include/Python.h:58,
14958                       from python/python-internal.h:94,
14959                       from python/py-arch.c:24:
14960              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14961         using ::hypot;
14962                 ^~~~~
14963
14964         This happens because Python headers define 'hypot' to expand t
14965         '_hypot' in the Windows builds.
14966         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14967         'hypoth'.  This avoids a compilation error.
14968
14969 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14970
14971         * MAINTAINERS (Write After Approval): Fix ordering.
14972
14973 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14974
14975         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14976
14977 2018-01-26  Alan Modra  <amodra@gmail.com>
14978
14979         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14980         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14981         Remove nop.  Make const.  Comment.
14982         (powerpc32_plt_stub_so_2): New.
14983         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14984         Correct count.  Update uses.
14985         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14986         Move common code reading PLT entry word.  Correct
14987         powerpc32_plt_stub PLT address calculation.
14988         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14989         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14990         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14991         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14992         (ppc64_standard_linkage8): Likewise.
14993         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14994         Correct insns description.
14995         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14996
14997 2018-01-24  Pedro Alves  <palves@redhat.com>
14998
14999         GCC PR libstdc++/83906
15000         * gdbtypes.c (operator==(const dynamic_prop &,
15001         const dynamic_prop &)): New.
15002         (operator==(const range_bounds &, const range_bounds &)): New.
15003         (check_types_equal): Use them instead of memcmp.
15004         * gdbtypes.h (operator==(const dynamic_prop &,
15005         const dynamic_prop &)): Declare.
15006         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15007         (operator==(const range_bounds &, const range_bounds &)): Declare.
15008         (operator!=(const range_bounds &, const range_bounds &)): Declare.
15009
15010 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15011
15012         * s390-linux-tdep.c (s390_record_address_mask)
15013         (s390_record_calc_disp_common, s390_record_calc_disp)
15014         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15015         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15016         (s390_process_record): Move to s390-tdep.c.
15017         (s390_linux_init_abi_any): Adjust.
15018         * s390-tdep.c (s390_record_address_mask)
15019         (s390_record_calc_disp_common, s390_record_calc_disp)
15020         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15021         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15022         (s390_process_record): Moved from s390-linux-tdep.c
15023         (s390_gdbarch_init): Adjust.
15024
15025 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15026
15027         * s390-linux-nat.c (s390-tdep.h): New include.
15028         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15029         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15030         (ALLDEPFILES): Add s390-tdep.c.
15031         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15032         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15033         * s390-tdep.h: ...this.  New file.
15034         * s390-linux-tdep.c (s390-tdep.h): New include.
15035         (_initialize_s390_tdep): Rename to...
15036         (_initialize_s390_linux_tdep): ...this and adjust.
15037         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15038         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15039         s390-tdep.h.
15040         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15041         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15042         (s390_is_partial_instruction, s390_software_single_step)
15043         (is_non_branch_ril, s390_displaced_step_copy_insn)
15044         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15045         (s390_prologue_data, s390_addr, s390_store, s390_load)
15046         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15047         (s390_register_call_saved, s390_guess_tracepoint_registers)
15048         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15049         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15050         (s390_pseudo_register_name, s390_pseudo_register_type)
15051         (s390_pseudo_register_read, s390_pseudo_register_write)
15052         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15053         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15054         (s390_addr_bits_remove, s390_address_class_type_flags)
15055         (s390_address_class_type_flags_to_name)
15056         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15057         (s390_function_arg_float, s390_function_arg_vector)
15058         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15059         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15060         (s390_frame_align, s390_register_return_value, s390_return_value)
15061         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15062         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15063         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15064         (s390_trad_frame_prev_register, s390_unwind_cache)
15065         (s390_prologue_frame_unwind_cache)
15066         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15067         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15068         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15069         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15070         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15071         (s390_frame_base_address, s390_local_base_address)
15072         (s390_frame_base, s390_gcc_target_options)
15073         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15074         (s390_validate_reg_range, s390_tdesc_valid)
15075         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15076         * s390-tdep.c: ...this.  New file.
15077
15078 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15079
15080         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15081         (s390_process_record, s390_gdbarch_tdep_alloc)
15082         (s390_linux_init_abi_any): Use/set new hook.
15083
15084 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15085
15086         * s390-linux-tdep.c (osabi.h): New include.
15087         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15088         (s390_linux_init_abi_any): New functions.
15089         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15090
15091 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15092
15093         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15094         tdesc_has_registers check
15095
15096 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15097
15098         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15099         (s390_validate_reg_range): New macro.
15100         (s390_gdbarch_init): Adjust.
15101
15102 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15103
15104         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15105         (s390_gdbarch_tdep_alloc): Adjust.
15106         (s390_gdbarch_init): Adjust.
15107
15108 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15109
15110         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15111         <have_tdb>: Change type to bool.
15112         (s390_gdbarch_tdep_alloc): Adjust.
15113         (s390_gdbarch_init): Adjust.
15114
15115 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15116
15117         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15118         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15119         (s390_gdbarch_tdep_alloc): New function.
15120         (s390_gdbarch_init): Allocate tdep at start and use its fields
15121         instead of separate variables.
15122
15123 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15124
15125         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15126         when looking for cached gdbarch and add comment for remaining.
15127
15128 2018-01-22  Pedro Alves  <palves@redhat.com>
15129             Sergio Durigan Junior  <sergiodj@redhat.com>
15130
15131         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15132         case.
15133
15134 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15135
15136         * MAINTAINERS: Update my company e-mail address.
15137
15138 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15139
15140         * regcache.c (cooked_write_test): New function.
15141         (_initialize_regcache): Register the test.
15142
15143 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15144
15145         * ia64-tdep.c (ia64_pseudo_register_read): Call
15146         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15147         * m32c-tdep.c (m32c_cat_read): Likewise.
15148         (m32c_r3r2r1r0_read): Likewise.
15149         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15150         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15151
15152 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15153
15154         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15155         method raw_read instead of regcache_raw_read.
15156         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15157         * arm-tdep.c (arm_neon_quad_read): Likewise.
15158         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15159         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15160         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15161         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15162         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15163         (i386_pseudo_register_read_into_value): Likewise.
15164         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15165         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15166         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15167         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15168         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15169         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15170         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15171         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15172         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15173
15174 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15175
15176         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15177         * configure.tgt: Remove target mt.
15178         * mt-tdep.c: Remove.
15179         * regcache.c (cooked_read_test): Remove the check for mt.
15180
15181 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15182
15183         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15184         instead of gdbarch_pseudo_register_read_value.
15185
15186 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15187
15188         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15189         language is Ada.
15190
15191 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15192
15193         * linespec.c (create_sals_line_offset): Remove code that preserved
15194         the symtab_and_line's line number.
15195
15196 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15197
15198         * varobj.c (varobj_create): Don't set valid_block when creating a
15199         floating varobj.
15200
15201 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15202
15203         * varobj.c (varobj_create): Remove out of date comment.
15204
15205 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15206
15207         PR mi/20395
15208         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15209         updating innermost block.
15210         * parse.c (innermost_block_tracker::update): Take extra type
15211         parameter, and check types match before updating innermost block.
15212         (write_dollar_variable): Update innermost block for registers.
15213         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15214         (innermost_block_tracker::innermost_block_tracker): Initialise
15215         m_types member.
15216         (innermost_block_tracker::reset): Take type parameter.
15217         (innermost_block_tracker::update): Take type parameter, and pass
15218         type through as needed.
15219         (innermost_block_tracker::m_types): New member.
15220         * varobj.c (varobj_create): Pass type when reseting innermost
15221         block.
15222
15223 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15224
15225         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15226         * ada-lang.c (resolve_subexp): Likewise.
15227         * breakpoint.c (set_breakpoint_condition) Likewise.
15228         (watch_command_1) Likewise.
15229         * c-exp.y (variable): Likewise.
15230         * d-exp.y (PrimaryExpression): Likewise.
15231         * f-exp.y (variable): Likewise.
15232         * go-exp.y (variable): Likewise.
15233         * m2-exp.y (variable): Likewise.
15234         * objfiles.c (objfile::~objfile): Likewise.
15235         * p-exp.y (variable): Likewise.
15236         * parse.c (innermost_block): Change type.
15237         * parser-defs.h (class innermost_block_tracker): New.
15238         (innermost_block): Change to innermost_block_tracker.
15239         * printcmd.c (display_command): Switch to innermost_block API.
15240         (do_one_display): Likewise.
15241         * rust-exp.y (do_one_display): Likewise.
15242         * symfile.c (clear_symtab_users): Likewise.
15243         * varobj.c (varobj_create): Switch to innermost_block API, replace
15244         use of innermost_block with block stored on varobj object.
15245
15246 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15247
15248         * expression.h (innermost_block): Remove declaration.
15249         * varobj.c: Add 'parser-defs.h' include.
15250
15251 2018-01-19  Tom Tromey  <tom@tromey.com>
15252
15253         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15254         symbols in the static and global blocks.
15255
15256 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15257
15258         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15259         gdb_ptrace.h, and move including gdb_wait.h ...
15260         * nat/linux-ptrace.h: ... to here.
15261
15262 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15263
15264         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15265         inf_ptrace_detach_success.
15266         (inf_ptrace_detach_success): Add inferior parameter, use it
15267         instead of inferior_ptid, pass it to detach_inferior.
15268         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15269         parameter.
15270         * inferior.c (detach_inferior): Add overload that takes an
15271         inferior object.
15272         * inferior.h (detach_inferior): Likewise.
15273         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15274         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15275         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15276
15277 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15278
15279         * target.h (struct target_ops) <to_detach>: Add inferior
15280         parameter.
15281         (target_detach): Likewise.
15282         * target.c (dispose_inferior): Pass inferior down.
15283         (target_detach): Pass inferior down.  Assert that it is equal to
15284         the current inferior.
15285         * aix-thread.c (aix_thread_detach): Pass inferior down.
15286         * corefile.c (core_file_command): Pass current_inferior() down.
15287         * corelow.c (core_detach): Add inferior parameter.
15288         * darwin-nat.c (darwin_detach): Likewise.
15289         * gnu-nat.c (gnu_detach): Likewise.
15290         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15291         * infcmd.c (detach_command): Pass current_inferior() down to
15292         target_detach.
15293         * infrun.c (follow_fork_inferior): Pass parent_inf to
15294         target_detach.
15295         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15296         target_detach.
15297         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15298         * linux-thread-db.c (thread_db_detach): Likewise.
15299         * nto-procfs.c (procfs_detach): Likewise.
15300         * procfs.c (procfs_detach): Likewise.
15301         * record.c (record_detach): Likewise.
15302         * record.h (struct inferior): Forward-declare.
15303         (record_detach): Add inferior parameter.
15304         * remote-sim.c (gdbsim_detach): Likewise.
15305         * remote.c (remote_detach_1): Likewise.
15306         (remote_detach): Likewise.
15307         (extended_remote_detach): Likewise.
15308         * sol-thread.c (sol_thread_detach): Likewise.
15309         * target-debug.h (target_debug_print_inferior_p): New macro.
15310         * target-delegates.c: Re-generate.
15311         * top.c (kill_or_detach): Pass inferior down to target_detach.
15312         * windows-nat.c (windows_detach): Add inferior parameter.
15313
15314 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15315
15316         * target.h (struct target_ops) <to_detach>: Remove args
15317         parameter.
15318         (target_detach): Likewise.
15319         * target.c (dispose_inferior): Adjust.
15320         (target_detach): Remove args parameter, adjust.
15321         * aix-thread.c (aix_thread_detach): Adjust.
15322         * corefile.c (core_file_command): Adjust.
15323         * corelow.c (core_detach): Adjust.
15324         * darwin-nat.c (darwin_detach): Adjust.
15325         * gnu-nat.c (gnu_detach): Adjust.
15326         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15327         * infcmd.c (detach_command): Adjust
15328         * infrun.c (follow_fork_inferior): Adjust.
15329         (handle_vfork_child_exec_or_exit): Adjust.
15330         * linux-fork.c (linux_fork_detach): Remove args parameter.
15331         * linux-fork.h (linux_fork_detach): Likewise.
15332         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15333         * linux-thread-db.c (thread_db_detach): Likewise.
15334         * nto-procfs.c (procfs_detach): Likewise.
15335         * procfs.c (procfs_detach): Likewise.
15336         (do_detach): Remove signo parameter.
15337         * record.c (record_detach): Remove args parameter.
15338         * record.h (record_detach): Likewise.
15339         * remote-sim.c (gdbsim_detach): Likewise.
15340         * remote.c (remote_detach_1): Likewise.
15341         (remote_detach): Likewise.
15342         (extended_remote_detach): Likewise.
15343         * sol-thread.c (sol_thread_detach): Likewise.
15344         * target-delegates.c: Re-generate.
15345         * top.c (struct qt_args) <args>: Remove field.
15346         (kill_or_detach): Don't pass args.
15347         (quit_force): Don't set args.
15348         * windows-nat.c (windows_detach): Remove args parameter.
15349
15350 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15351
15352         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15353         (arm_linux_init_abi): Install it.
15354
15355 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15356
15357         * osabi.c (gdb_osabi_names): Extend the regexp for
15358         arm-linux-gnueabihf.
15359
15360 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15361
15362         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15363         m_abbrevs.
15364         (abbrev_table::add_abbrev): Update.
15365         (abbrev_table::lookup_abbrev): Update.
15366
15367 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15368
15369         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15370
15371 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15372
15373         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15374         to "std::string".
15375
15376 2018-01-17  Tom Tromey  <tom@tromey.com>
15377
15378         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15379
15380 2018-01-17  Tom Tromey  <tom@tromey.com>
15381
15382         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15383         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15384         (create_array_type_with_stride): Update.
15385         * dwarf2read.c (set_die_type): Update.
15386
15387 2018-01-17  Tom Tromey  <tom@tromey.com>
15388
15389         * dwarf2read.c (delayed_method_info): Remove typedef.
15390         (dwarf2_cu::method_info): Now a std::vector.
15391         (add_to_method_list): Update.
15392         (free_delayed_list): Remove.
15393         (compute_delayed_physnames): Update.
15394         (process_full_comp_unit, process_full_type_unit): Clear the method
15395         list.  Remove cleanups.
15396         (psymtab_include_file_name): Add name_holder parameter.  Use
15397         unique_xmalloc_ptr.
15398         (dwarf_decode_lines): Update.
15399
15400 2018-01-17  Tom Tromey  <tom@tromey.com>
15401             Simon Marchi  <simon.marchi@ericsson.com>
15402
15403         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15404         (dwarf2_per_objfile::free_cached_comp_units)
15405         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15406         (init_cutu_and_read_dies_no_follow): Update.
15407         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15408         (dwarf2_cu::~dwarf2_cu): New.
15409         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15410         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15411
15412 2018-01-17  Tom Tromey  <tom@tromey.com>
15413             Simon Marchi  <simon.marchi@ericsson.com>
15414
15415         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15416         (struct die_reader_specs) <abbrev_table>: New member.
15417         (struct abbrev_table): Add constructor.
15418         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15419         <abbrev_obstack>: Now an auto_obstack.
15420         (abbrev_table_up): New typedef.
15421         (init_cu_die_reader): Add abbrev_table parameter.
15422         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15423         Add result_dwo_abbrev_table.
15424         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15425         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15426         Update.
15427         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15428         parameter.
15429         (skip_children): Update.
15430         (abbrev_table::alloc_abbrev): Rename from
15431         abbrev_table_alloc_abbrev.
15432         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15433         (abbrev_table::lookup_abbrev): Rename from
15434         abbrev_table_lookup_abbrev.
15435         (abbrev_table_read_table): Return abbrev_table_up.
15436         (abbrev_table_free, abbrev_table_free_cleanup)
15437         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15438         (load_partial_dies): Update.
15439
15440 2018-01-17  Tom Tromey  <tom@tromey.com>
15441
15442         * dwarf2read.c (dwarf2_compute_name): Update comment.
15443         (read_func_scope, read_variable): Update.
15444         (new_symbol): Remove.
15445         (new_symbol_full): Rename to new_symbol.
15446
15447 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
15448
15449         PR gdb/16577
15450         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15451         a warning instead of throwing an error, set section size to 0 and return
15452         NULL.
15453         * gdb_bfd.h (gdb_bfd_map_section): Update description.
15454
15455 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15456
15457         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15458         std::string.
15459         (linux_ptrace_attach_fail_reason_string): Likewise.
15460         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15461         Likewise.
15462         (linux_ptrace_attach_fail_reason_string): Likewise.
15463         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15464
15465 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15466
15467         * linux-nat.c (linux_nat_attach): Remove xstrdup.
15468
15469 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
15470
15471         PR gdb/21559
15472         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15473         checking for fs_base/gs_base fields in struct user_regs_struct.
15474         * configure: Regenerate.
15475
15476 2018-01-17  Yao Qi  <yao.qi@linaro.org>
15477
15478         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
15479         function.
15480         (aarch64_linux_init_abi): Install it to gdbarch hook
15481         gcc_target_options.
15482
15483 2018-01-15  Pedro Alves  <palves@redhat.com>
15484
15485         * common/signals-state-save-restore.c
15486         (save_original_signals_state): Fix typos.
15487
15488 2017-01-12  Tom Tromey  <tom@tromey.com>
15489             Sergio Durigan Junior  <sergiodj@redhat.com>
15490
15491         * Makefile.in (install-only): Install gdb-add-index.
15492
15493 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
15494
15495         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
15496
15497 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15498
15499         * infrun.c (keep_going_pass_signal): Clear step-over info when
15500         insert_breakpoints fails.
15501
15502 2018-01-11  Pedro Alves  <palves@redhat.com>
15503
15504         PR gdb/22583
15505         * infrun.c (resume): Rename to ...
15506         (resume_1): ... this.
15507         (resume): Reimplement as wrapper around resume_1.
15508
15509 2018-01-11  Pedro Alves  <palves@redhat.com>
15510
15511         PR remote/22597
15512         * remote.c (remote_parse_stop_reply): Default to the last-set
15513         general thread instead of to 'magic_null_ptid'.
15514
15515 2018-01-10  Pedro Alves  <palves@redhat.com>
15516
15517         * language.h (language_get_symbol_name_matcher): Rename ...
15518         (get_symbol_name_matcher): ... this.
15519         * language.c (language_get_symbol_name_matcher): Ditto.
15520         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
15521         callers adjusted.
15522
15523 2018-01-10  Pedro Alves  <palves@redhat.com>
15524
15525         PR gdb/22670
15526         * dwarf2read.c
15527         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
15528         Adjust to use language_get_symbol_name_matcher instead of
15529         language_defn::la_get_symbol_name_matcher.
15530         * language.c (language_get_symbol_name_matcher): If in Ada mode
15531         and the lookup name is a verbatim match, return Ada's matcher.
15532         * language.h (language_get_symbol_name_matcher): Adjust comment.
15533         (ada_lookup_name_info::verbatim_p):: New method.
15534
15535 2018-01-10  Pedro Alves  <palves@redhat.com>
15536
15537         PR gdb/22670
15538         * ada-lang.c (ada_collect_symbol_completion_matches): If the
15539         minsym's language is language_auto or language_cplus, pass down
15540         language_ada instead.
15541         * symtab.c (compare_symbol_name): Don't frob symbol language here.
15542
15543 2018-01-10  Pedro Alves  <palves@redhat.com>
15544
15545         PR gdb/22670
15546         * minsyms.c (linkage_name_str): New function.
15547         (iterate_over_minimal_symbols): Use it.
15548
15549 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15550
15551         * NEWS: Document that 'info proc' now works on FreeBSD.
15552
15553 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15554
15555         * configure.ac: Check for kinfo_getfile in libutil.
15556         * configure: Regenerate.
15557         * config.in: Regenerate.
15558         * fbsd-nat.c: Include "fbsd-tdep.h".
15559         (fbsd_fetch_cmdline): New.
15560         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
15561         rather than calling error.
15562         (fbsd_info_proc): New.
15563         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
15564         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
15565         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
15566
15567 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15568
15569         * fbsd-nat.c (struct free_deleter): Remove.
15570         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
15571
15572 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15573
15574         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
15575         NULL for an empty pathname.
15576
15577 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15578
15579         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
15580         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
15581         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
15582         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
15583         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
15584         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
15585         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
15586         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
15587         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
15588         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
15589         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
15590         (fbsd_core_fetch_timeval, fbsd_print_sigset)
15591         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
15592         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
15593         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
15594
15595 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
15596
15597         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
15598         (gnu_xfer_auxv): New function.
15599         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
15600         TARGET_OBJECT_AUXV.
15601
15602 2018-01-08  Yao Qi  <yao.qi@linaro.org>
15603             Simon Marchi  <simon.marchi@ericsson.com>
15604
15605         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
15606         common/selftest.c.
15607         (COMMON_OBS): Remove selftest.o.
15608         * configure.ac: Append selftest-arch.c and common/selftest.c to
15609         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
15610         * configure: Re-generated.
15611         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
15612         GDB_SELF_TEST.
15613         (maintenance_info_selftests): Likewise.
15614
15615 2018-01-08  Xavier Roirand  <roirand@adacore.com>
15616
15617         * ada-valprint.c (val_print_packed_array_elements): Use
15618         proper number of elements when printing an array indexed
15619         by an enumeration type.
15620
15621 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15622
15623         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
15624         (dw2_get_file_names_reader): Adjust.
15625         (lookup_dwo_signatured_type): Adjust.
15626         (lookup_dwp_signatured_type): Adjust.
15627         (lookup_signatured_type): Adjust.
15628         (create_type_unit_group): Adjust.
15629         (get_type_unit_group): Adjust.
15630         (process_psymtab_comp_unit_reader): Adjust.
15631         (build_type_psymtabs_reader): Adjust.
15632         (scan_partial_symbols): Adjust.
15633         (add_partial_symbol): Adjust.
15634         (add_partial_subprogram): Adjust.
15635         (peek_die_abbrev): Adjust.
15636         (fixup_go_packaging): Adjust.
15637         (process_imported_unit_die): Adjust.
15638         (dwarf2_compute_name): Adjust.
15639         (dwarf2_physname): Adjust.
15640         (read_import_statement): Adjust.
15641         (handle_DW_AT_stmt_list): Adjust.
15642         (read_file_scope): Adjust.
15643         (read_func_scope): Adjust.
15644         (read_lexical_block_scope): Adjust.
15645         (read_call_site_scope): Adjust.
15646         (read_variable): Adjust.
15647         (dwarf2_rnglists_process): Adjust.
15648         (dwarf2_ranges_process): Adjust.
15649         (dwarf2_ranges_read): Adjust.
15650         (dwarf2_get_pc_bounds): Adjust.
15651         (dwarf2_record_block_ranges): Adjust.
15652         (dwarf2_add_field): Adjust.
15653         (dwarf2_add_member_fn): Adjust.
15654         (read_structure_type): Adjust.
15655         (process_structure_scope): Adjust.
15656         (read_enumeration_type): Adjust.
15657         (read_array_type): Adjust.
15658         (mark_common_block_symbol_computed): Adjust.
15659         (read_common_block): Adjust.
15660         (read_namespace_type): Adjust.
15661         (read_namespace): Adjust.
15662         (read_module_type): Adjust.
15663         (read_tag_pointer_type): Adjust.
15664         (read_tag_ptr_to_member_type): Adjust.
15665         (read_tag_string_type): Adjust.
15666         (read_subroutine_type): Adjust.
15667         (read_typedef): Adjust.
15668         (read_base_type): Adjust.
15669         (attr_to_dynamic_prop): Adjust.
15670         (read_subrange_type): Adjust.
15671         (read_unspecified_type): Adjust.
15672         (dwarf2_read_abbrevs): Adjust.
15673         (load_partial_dies): Adjust.
15674         (read_partial_die): Adjust.
15675         (find_partial_die): Adjust.
15676         (guess_partial_die_structure_name): Adjust.
15677         (fixup_partial_die): Adjust.
15678         (read_attribute_value): Adjust.
15679         (read_addr_index): Adjust.
15680         (read_addr_index_from_leb128): Adjust.
15681         (read_str_index): Adjust.
15682         (dwarf2_string_attr): Adjust.
15683         (get_debug_line_section): Adjust.
15684         (dwarf_decode_line_header): Adjust.
15685         (lnp_state_machine::check_line_address): Adjust.
15686         (dwarf_decode_lines_1): Adjust.
15687         (dwarf_decode_lines): Adjust.
15688         (dwarf2_start_symtab): Adjust.
15689         (var_decode_location): Adjust.
15690         (new_symbol_full): Adjust.
15691         (dwarf2_const_value_data): Adjust.
15692         (dwarf2_const_value_attr): Adjust.
15693         (dwarf2_const_value): Adjust.
15694         (die_type): Adjust.
15695         (die_containing_type): Adjust.
15696         (build_error_marker_type): Adjust.
15697         (lookup_die_type): Adjust.
15698         (guess_full_die_structure_name): Adjust.
15699         (anonymous_struct_prefix): Adjust.
15700         (determine_prefix): Adjust.
15701         (dwarf2_name): Adjust.
15702         (follow_die_ref_or_sig): Adjust.
15703         (follow_die_offset): Adjust.
15704         (follow_die_ref): Adjust.
15705         (follow_die_sig_1): Adjust.
15706         (follow_die_sig): Adjust.
15707         (get_signatured_type): Adjust.
15708         (get_DW_AT_signature_type): Adjust.
15709         (decode_locdesc): Adjust.
15710         (dwarf_decode_macros): Adjust.
15711         (cu_debug_loc_section): Adjust.
15712         (fill_in_loclist_baton): Adjust.
15713         (dwarf2_symbol_mark_computed): Adjust.
15714         (init_one_comp_unit): Don't assign
15715         dwarf2_cu::dwarf2_per_objfile.
15716         (set_die_type): Adjust.
15717
15718 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15719
15720         * dwarf2read.c (struct mapped_debug_names): Add constructor.
15721         <dwarf2_per_objfile>: New field.
15722         (dwarf2_per_objfile): Remove global.
15723         (get_dwarf2_per_objfile): New function.
15724         (set_dwarf2_per_objfile): New function.
15725         (dwarf2_build_psymtabs_hard): Change objfile parameter to
15726         dwarf2_per_objfile.
15727         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15728         (read_abbrev_offset): Likewise.
15729         (read_indirect_string): Likewise.
15730         (read_indirect_line_string): Likewise.
15731         (read_indirect_string_at_offset): Likewise.
15732         (read_indirect_string_from_dwz): Likewise.
15733         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15734         dwarf2_per_objfile.
15735         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15736         (create_all_comp_units): Change objfile parameter to
15737         dwarf2_per_objfile.
15738         (create_all_type_units): Likewise.
15739         (process_queue): Add dwarf2_per_objfile parameter.
15740         (read_and_check_comp_unit_head): Likewise.
15741         (lookup_dwo_unit_in_dwp): Likewise.
15742         (get_dwp_file): Likewise.
15743         (process_cu_includes): Likewise.
15744         (struct free_dwo_file_cleanup_data): New struct.
15745         (dwarf2_has_info): Use get_dwarf2_per_objfile and
15746         set_dwarf2_per_objfile.
15747         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
15748         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
15749         context, adjust calls.
15750         (dw2_instantiate_symtab): Likewise.
15751         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15752         (dw2_get_cu): Likewise.
15753         (create_cu_from_index_list): Change objfile parameter to
15754         dwarf2_per_objfile.
15755         (create_cus_from_index_list): Get dwarf2_per_objfile from
15756         context, adjust calls.
15757         (create_cus_from_index): Likewise.
15758         (create_signatured_type_table_from_index): Change objfile
15759         parameter to dwarf2_per_objfile.
15760         (create_signatured_type_table_from_debug_names): Change objfile
15761         parameter to dwarf2_per_objfile.
15762         (create_addrmap_from_index): Likewise.
15763         (create_addrmap_from_aranges): Likewise.
15764         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15765         (dw2_setup): Remove.
15766         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15767         context.
15768         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15769         get_dwarf2_per_objfile.
15770         (dw2_forget_cached_source_info): Likewise.
15771         (dw2_map_symtabs_matching_filename): Likewise.
15772         (struct dw2_symtab_iterator) <index>: Remove.
15773         <dwarf2_per_objfile>: New field.
15774         (dw2_symtab_iter_init): Replace index parameter with
15775         dwarf2_per_objfile.
15776         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15777         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15778         (dw2_print_stats): Likewise.
15779         (dw2_dump): Likewise.
15780         (dw2_expand_symtabs_for_function): Likewise.
15781         (dw2_expand_all_symtabs): Likewise.
15782         (dw2_expand_symtabs_with_fullname): Likewise.
15783         (dw2_expand_marked_cus): Replace index and objfile parameters
15784         with dwarf2_per_objfile.
15785         (dw_expand_symtabs_matching_file_matcher): Add
15786         dwarf2_per_objfile parameter and adjust calls.
15787         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15788         adjust calls.
15789         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15790         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15791         adjust calls.
15792         (create_cus_from_debug_names_list): Replace objfile parameter
15793         with dwarf2_per_objfile and adjust calls.
15794         (create_cus_from_debug_names): Likewise.
15795         (dwarf2_read_debug_names): Likewise.
15796         (mapped_debug_names::namei_to_name): Adjust call.
15797         (dw2_debug_names_iterator::next): Likewise.
15798         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15799         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15800         (dw2_debug_names_dump): Likewise.
15801         (dw2_debug_names_expand_symtabs_for_function): Likewise.
15802         (dw2_debug_names_expand_symtabs_matching): Likewise.
15803         (dwarf2_initialize_objfile): Likewise.
15804         (dwarf2_build_psymtabs): Likewise.
15805         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15806         this_cu.
15807         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15808         (read_and_check_comp_unit_head): Likewise.
15809         (read_abbrev_offset): Likewise.
15810         (create_debug_type_hash_table): Likewise.
15811         (create_debug_types_hash_table): Likewise.
15812         (create_all_type_units): Replace objfile parameter with
15813         dwarf2_per_objfile.
15814         (add_type_unit): Add dwarf2_per_objfile parameter.
15815         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15816         with dwarf2_per_objfile.
15817         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15818         (lookup_dwp_signatured_type): Likewise.
15819         (lookup_signatured_type): Likewise.
15820         (read_cutu_die_from_dwo): Likewise.
15821         (init_tu_and_read_dwo_dies): Likewise.
15822         (init_cutu_and_read_dies): Likewise.
15823         (init_cutu_and_read_dies_no_follow): Likewise.
15824         (allocate_type_unit_groups_table): Add objfile parameter.
15825         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15826         (get_type_unit_group): Likewise.
15827         (process_psymtab_comp_unit): Update call.
15828         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15829         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15830         (print_tu_stats): Likewise.
15831         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15832         in void* parameter.
15833         (build_type_psymtabs): Change objfile parameter to
15834         dwarf2_per_objfile.
15835         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15836         passed in void* parameter.
15837         (process_skeletonless_type_units): Change objfile parameter to
15838         dwarf2_per_objfile.
15839         (set_partial_user): Likewise.
15840         (dwarf2_build_psymtabs_hard): Likewise.
15841         (read_comp_units_from_section): Likewise.
15842         (create_all_comp_units): Likewise.
15843         (scan_partial_symbols): Update calls.
15844         (add_partial_symbol): Likewise.
15845         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15846         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15847         (process_queue): Add dwarf2_per_objfile parameter.
15848         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15849         (compute_compunit_symtab_includes): Likewise.
15850         (process_cu_includes): Add dwarf2_per_objfile parameter.
15851         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15852         (process_full_type_unit): Likewise.
15853         (process_imported_unit_die): Update call.
15854         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15855         (read_file_scope): Likewise.
15856         (allocate_dwo_file_hash_table): Add objfile parameter.
15857         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15858         (create_cus_hash_table): Likewise.
15859         (create_dwp_hash_table): Likewise.
15860         (create_dwo_unit_in_dwp_v1): Likewise.
15861         (create_dwp_v2_section): Likewise.
15862         (create_dwo_unit_in_dwp_v2): Likewise.
15863         (lookup_dwo_unit_in_dwp): Likewise.
15864         (try_open_dwop_file): Likewise.
15865         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15866         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15867         cleanup to include a reference to dwarf2_per_objfile.
15868         (open_dwp_file): Add dwarf2_per_objfile parameter.
15869         (open_and_init_dwp_file): Likewise.
15870         (get_dwp_file): Likewise.
15871         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15872         (queue_and_load_all_dwo_tus): Update call.
15873         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15874         data.
15875         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15876         (dwarf2_ranges_process): Likewise.
15877         (dwarf2_get_pc_bounds): Likewise.
15878         (mark_common_block_symbol_computed): Likewise.
15879         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15880         (dwarf2_read_abbrevs): Update call.
15881         (read_partial_die): Use dwarf2_per_objfile from cu.
15882         (find_partial_die): Likewise.
15883         (fixup_partial_die): Likewise.
15884         (read_attribute_value): Likewise.
15885         (read_indirect_string_at_offset_from): Add objfile parameter.
15886         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15887         parameter.
15888         (read_indirect_string_from_dwz): Add objfile parameter.
15889         (read_indirect_string): Add objfile parameter.
15890         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15891         (read_addr_index): Use dwarf2_per_objfile from cu.
15892         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15893         call dw2_setup.
15894         (read_str_index): Use dwarf2_per_objfile from cu.
15895         (get_debug_line_section): Likewise.
15896         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15897         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15898         (new_symbol_full): Use dwarf2_per_objfile from cu.
15899         (build_error_marker_type): Likewise.
15900         (lookup_die_type): Likewise.
15901         (determine_prefix): Likewise.
15902         (follow_die_offset): Likewise.
15903         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15904         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15905         (dwarf2_fetch_die_type_sect_off): Likewise.
15906         (dwarf2_get_die_type): Likewise.
15907         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15908         (get_signatured_type): Likewise.
15909         (get_DW_AT_signature_type): Likewise.
15910         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15911         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15912         (cu_debug_loc_section): Likewise.
15913         (fill_in_loclist_baton): Likewise.
15914         (dwarf2_symbol_mark_computed): Likewise.
15915         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15916         dwarf2_per_objfile.
15917         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15918         parameter.
15919         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15920         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15921         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15922         (set_die_type): Use dwarf2_free_objfile from cu.
15923         (get_die_type_at_offset): Likewise.
15924         (dwarf2_per_objfile_free): Don't assign global variable.
15925         (debug_names) <constructor>: Add dwarf2_per_objfile
15926         parameter, update m_debugstrlookup construction.
15927         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15928         parameter.
15929         <m_dwarf2_per_objfile>: New field.
15930         <lookup>: Use m_dwarf2_per_objfile.
15931         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15932         (psyms_seen_size): Likewise.
15933         (write_gdbindex): Replace objfile parameter with
15934         dwarf2_per_objfile.
15935         (write_debug_names): Likewise.
15936         (write_psymtabs_to_index): Likewise.
15937         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15938         calls.
15939
15940 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15941
15942         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15943         <dwarf2_per_objfile>: New field.
15944         (struct dwarf2_per_cu_data) <objfile>: Remove.
15945         <dwarf2_per_objfile>: New field.
15946         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15947         of objfile.
15948         (create_signatured_type_table_from_index): Likewise.
15949         (create_debug_type_hash_table): Likewise.
15950         (fill_in_sig_entry_from_dwo_entry): Likewise.
15951         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15952         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15953         objfile.
15954         (create_partial_symtab): Access objfile through
15955         dwarf2_per_objfile.
15956         (process_psymtab_comp_unit_reader): Likewise.
15957         (read_comp_units_from_section): Likewise.
15958         (scan_partial_symbols): Likewise.
15959         (add_partial_symbol): Likewise.
15960         (add_partial_subprogram): Likewise.
15961         (peek_die_abbrev): Likewise.
15962         (fixup_go_packaging): Likewise.
15963         (process_full_comp_unit): Likewise.
15964         (process_full_type_unit): Likewise.
15965         (process_imported_unit_die): Likewise.
15966         (dwarf2_compute_name): Likewise.
15967         (dwarf2_physname): Likewise.
15968         (read_import_statement): Likewise.
15969         (create_cus_hash_table): Assign dwarf2_physname instead of
15970         objfile.
15971         (read_func_scope): Access objfile through dwarf2_per_objfile.
15972         (read_lexical_block_scope): Likewise.
15973         (read_call_site_scope): Likewise.
15974         (read_variable): Likewise.
15975         (dwarf2_rnglists_process): Likewise.
15976         (dwarf2_ranges_process): Likewise.
15977         (dwarf2_ranges_read): Likewise.
15978         (dwarf2_record_block_ranges): Likewise.
15979         (dwarf2_add_field): Likewise.
15980         (dwarf2_add_member_fn): Likewise.
15981         (read_structure_type): Likewise.
15982         (process_structure_scope): Likewise.
15983         (read_enumeration_type): Likewise.
15984         (read_array_type): Likewise.
15985         (read_common_block): Likewise.
15986         (read_namespace_type): Likewise.
15987         (read_namespace): Likewise.
15988         (read_module_type): Likewise.
15989         (read_tag_pointer_type): Likewise.
15990         (read_tag_ptr_to_member_type): Likewise.
15991         (read_tag_string_type): Likewise.
15992         (read_subroutine_type): Likewise.
15993         (read_typedef): Likewise.
15994         (read_base_type): Likewise.
15995         (attr_to_dynamic_prop): Likewise.
15996         (read_subrange_type): Likewise.
15997         (read_unspecified_type): Likewise.
15998         (load_partial_dies): Likewise.
15999         (read_partial_die): Likewise.
16000         (find_partial_die): Likewise.
16001         (guess_partial_die_structure_name): Likewise.
16002         (fixup_partial_die): Likewise.
16003         (read_attribute_value): Likewise.
16004         (read_addr_index_from_leb128): Likewise.
16005         (dwarf2_read_addr_index): Likewise.
16006         (dwarf2_string_attr): Likewise.
16007         (lnp_state_machine::check_line_address): Likewise.
16008         (dwarf_decode_lines_1): Likewise.
16009         (dwarf_decode_lines): Likewise.
16010         (dwarf2_start_symtab): Likewise.
16011         (var_decode_location): Likewise.
16012         (new_symbol_full): Likewise.
16013         (dwarf2_const_value_data): Likewise.
16014         (dwarf2_const_value_attr): Likewise.
16015         (dwarf2_const_value): Likewise.
16016         (die_type): Likewise.
16017         (die_containing_type): Likewise.
16018         (lookup_die_type): Likewise.
16019         (guess_full_die_structure_name): Likewise.
16020         (anonymous_struct_prefix): Likewise.
16021         (dwarf2_name): Likewise.
16022         (follow_die_ref_or_sig): Likewise.
16023         (follow_die_offset): Likewise.
16024         (follow_die_ref): Likewise.
16025         (dwarf2_fetch_die_loc_sect_off): Likewise.
16026         (dwarf2_fetch_constant_bytes): Likewise.
16027         (dwarf2_fetch_die_type_sect_off): Likewise.
16028         (dwarf2_get_die_type): Likewise.
16029         (follow_die_sig): Likewise.
16030         (decode_locdesc): Likewise.
16031         (dwarf2_per_cu_objfile): Likewise.
16032         (dwarf2_per_cu_text_offset): Likewise.
16033         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16034         objfile.
16035         (set_die_type): Access objfile through
16036         dwarf2_per_objfile.
16037
16038 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16039
16040         * valprint.c (converted_character_d): Remove typedef.
16041         (DEF_VEC_O (converted_character_d)): Remove.
16042         (count_next_character): Use std::vector.
16043         (print_converted_chars_to_obstack): Likewise.
16044         (generic_printstr): Likewise.
16045
16046 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16047
16048         * xml-support.h (struct gdb_xml_value): Add constructor.
16049         <value>: Change type to unique_xmalloc_ptr.
16050         (gdb_xml_value_s): Remove typedef.
16051         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16052         (gdb_xml_element_start_handler): Change parameter type to
16053         std::vector.
16054         (xml_find_attribute): Likewise.
16055         * xml-support.c (xml_find_attribute): Change parameter type to
16056         std::vector and adjust.
16057         (gdb_xml_values_cleanup): Remove.
16058         (gdb_xml_parser::start_element): Adjust to std::vector.
16059         (xinclude_start_include): Change paraeter type to std::vector
16060         and adjust.
16061         * btrace.c (check_xml_btrace_version): Likewise.
16062         (parse_xml_btrace_block): Likewise.
16063         (parse_xml_btrace_pt_config_cpu): Likewise.
16064         (parse_xml_btrace_pt): Likewise.
16065         (parse_xml_btrace_conf_bts): Likewise.
16066         (parse_xml_btrace_conf_pt): Likewise.
16067         * memory-map.c (memory_map_start_memory): Likewise.
16068         (memory_map_start_property): Likewise.
16069         * osdata.c (osdata_start_osdata): Likewise.
16070         (osdata_start_item): Likewise.
16071         (osdata_start_column): Likewise.
16072         * remote.c (start_thread): Likewise.
16073         * solib-aix.c (library_list_start_library): Likewise.
16074         (library_list_start_list): Likewise.
16075         * solib-svr4.c (library_list_start_library): Likewise.
16076         (svr4_library_list_start_list): Likewise.
16077         * solib-target.c (library_list_start_segment): Likewise.
16078         (library_list_start_section): Likewise.
16079         (library_list_start_library): Likewise.
16080         (library_list_start_list): Likewise.
16081         * tracepoint.c (traceframe_info_start_memory): Likewise.
16082         (traceframe_info_start_tvar): Likewise.
16083         * xml-syscall.c (syscall_start_syscall): Likewise.
16084         * xml-tdesc.c (tdesc_start_target): Likewise.
16085         (tdesc_start_feature): Likewise.
16086         (tdesc_start_reg): Likewise.
16087         (tdesc_start_union): Likewise.
16088         (tdesc_start_struct): Likewise.
16089         (tdesc_start_flags): Likewise.
16090         (tdesc_start_enum): Likewise.
16091         (tdesc_start_field): Likewise.
16092         (tdesc_start_enum_value): Likewise.
16093         (tdesc_start_vector): Likewise.
16094
16095 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16096
16097         * extension.h (struct xmethod_worker) <clone>: Remove.
16098         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16099         Remove.
16100         (python_xmethod_worker::clone): Remove.
16101         * valops.c (find_overload_match): Use std::move instead of
16102         clone.
16103
16104 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16105
16106         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16107         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16108         <free_xmethod_worker_data>: Remove.
16109         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16110         <get_xmethod_arg_types>: Remove.
16111         <get_xmethod_result_type>: Remove.
16112         <invoke_xmethod>: Remove.
16113         * extension.c (new_xmethod_worker): Remove.
16114         (clone_xmethod_worker): Remove.
16115         (get_matching_xmethod_workers): Return void, pass std::vector by
16116         pointer.
16117         (get_xmethod_arg_types): Rename to...
16118         (xmethod_worker::get_arg_types): ... this, and adjust.
16119         (get_xmethod_result_type): Rename to...
16120         (xmethod_worker::get_result_type): ... this, and adjust.
16121         (invoke_xmethod): Remove.
16122         (free_xmethod_worker): Remove.
16123         (free_xmethod_worker_vec): Remove.
16124         * extension.h (enum ext_lang_rc): Move here from
16125         extension-priv.h.
16126         (struct xmethod_worker): Add constructor and destructor.
16127         <data>: Remove.
16128         <value>: Remove.
16129         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16130         virtual pure methods.
16131         <get_arg_types, get_result_type>: New methods.
16132         (xmethod_worker_ptr): Remove typedef.
16133         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16134         (xmethod_worker_vec): Remove typedef.
16135         (xmethod_worker_up): New typedef.
16136         (invoke_xmethod): Remove.
16137         (clone_xmethod_worker): Remove.
16138         (free_xmethod_worker): Remove.
16139         (free_xmethod_worker_vec): Remove.
16140         (get_xmethod_arg_types): Remove.
16141         (get_xmethod_result_type): Remove.
16142         * valops.c (find_method_list): Use std::vector, don't use
16143         intermediate vector.
16144         (value_find_oload_method_list): Use std::vector.
16145         (find_overload_match): Use std::vector.
16146         (find_oload_champ): Use std::vector.
16147         * value.c (value_free): Use operator delete.
16148         (value_of_xmethod): Rename to...
16149         (value_from_xmethod): ... this.  Don't assign
16150         xmethod_worker::value, take rvalue-reference.
16151         (result_type_of_xmethod): Adjust.
16152         (call_xmethod): Adjust.
16153         * value.h: Include extension.h.
16154         (struct xmethod_worker): Don't forward-declare.
16155         (value_of_xmethod): Rename to...
16156         (value_from_xmethod): ... this, take rvalue-reference.
16157         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16158         (struct python_xmethod_worker): ... this, add constructor and
16159         destructor.
16160         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16161         (gdbpy_free_xmethod_worker_data): Rename to...
16162         (python_xmethod_worker::~python_xmethod_worker): ... this and
16163         adjust.
16164         (gdbpy_clone_xmethod_worker_data): Rename to...
16165         (python_xmethod_worker::clone): ... this and adjust.
16166         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16167         temporary vector.
16168         (gdbpy_get_xmethod_arg_types): Rename to...
16169         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16170         (gdbpy_get_xmethod_result_type): Rename to...
16171         (python_xmethod_worker::do_get_result_type): ... this and
16172         adjust.
16173         (gdbpy_invoke_xmethod): Rename to...
16174         (python_xmethod_worker::invoke): ... this and adjust.
16175         (new_python_xmethod_worker): Rename to...
16176         (python_xmethod_worker::python_xmethod_worker): ... this and
16177         adjust.
16178         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16179         Remove.
16180         (gdbpy_free_xmethod_worker_data): Remove.
16181         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16182         (gdbpy_get_xmethod_arg_types): Remove.
16183         (gdbpy_get_xmethod_result_type): Remove.
16184         (gdbpy_invoke_xmethod): Remove.
16185         * python/python.c (python_extension_ops): Remove obsolete
16186         callbacks.
16187
16188 2018-01-05  Pedro Alves  <palves@redhat.com>
16189
16190         PR gdb/18653
16191         * common/signals-state-save-restore.c
16192         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16193         find a custom handler preinstalled, instead of internal erroring.
16194         But only warn if !quiet.
16195         * common/signals-state-save-restore.h
16196         (save_original_signals_state): New parameter 'quiet'.
16197         * main.c (captured_main_1): Move save_original_signals_state call
16198         after option handling, and pass QUIET.
16199
16200 2018-01-05  Pedro Alves  <palves@redhat.com>
16201
16202         * spu-tdep.c (spu_catch_start): Pass
16203         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16204
16205 2018-01-05  Pedro Alves  <palves@redhat.com>
16206
16207         PR gdb/22670
16208         * ada-lang.c (literal_symbol_name_matcher): New function.
16209         (ada_get_symbol_name_matcher): Use it for
16210         symbol_name_match_type::SEARCH_NAME.
16211         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16212         it down instead of assuming symbol_name_match_type::FULL.
16213         * block.h (block_lookup_symbol): New parameter 'match_type'.
16214         * c-valprint.c (print_unpacked_pointer): Use
16215         lookup_symbol_search_name instead of lookup_symbol.
16216         * compile/compile-object-load.c (get_out_value_type): Pass down
16217         symbol_name_match_type::SEARCH_NAME.
16218         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16219         symbol_name_match_type::FULL.
16220         * cp-support.c (cp_get_symbol_name_matcher): Handle
16221         symbol_name_match_type::SEARCH_NAME.
16222         * infrun.c (insert_exception_resume_breakpoint): Use
16223         lookup_symbol_search_name.
16224         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16225         * psymtab.c (maintenance_check_psymtabs): Use
16226         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16227         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16228         SYMBOL_SEARCH_NAME.
16229         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16230         if symbol_name_match_type::SEARCH_NAME.
16231         (lookup_symbol_in_language): Pass down
16232         symbol_name_match_type::FULL.
16233         (lookup_symbol_search_name): New.
16234         (lookup_language_this): Pass down
16235         symbol_name_match_type::SEARCH_NAME.
16236         (lookup_symbol_aux, lookup_local_symbol): New parameter
16237         'match_type'.  Pass it down.
16238         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16239         (lookup_symbol_search_name): New declaration.
16240         (lookup_symbol_in_block): New 'match_type' parameter.
16241
16242 2018-01-05  Pedro Alves  <palves@redhat.com>
16243
16244         PR gdb/22670
16245         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16246         ada_lookup_symbol.
16247         (ada_lookup_symbol): Reimplement in terms of
16248         ada_lookup_symbol_list, bits factored out from
16249         ada_lookup_encoded_symbol.
16250
16251 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16252
16253         * ada-exp.y (write_object_renaming): When subscripting an array
16254         using a symbol as the index, pass the block in call to
16255         ada_lookup_encoded_symbol when looking that symbol up.
16256
16257 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16258
16259         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16260         TYPE_INDEX_TYPE.
16261
16262 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16263
16264         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16265         the case where VALUE_LVAL (val0) is not lval_memory.
16266
16267 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16268
16269         * ada-valprint.c (print_optional_low_bound): Handle
16270         character-indexed array printing like boolean-indexed array
16271         printing.
16272
16273 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16274
16275         * NEWS: Create a new section for the next release branch.
16276         Rename the section of the current branch, now that it has
16277         been cut.
16278
16279 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16280
16281         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16282         * version.in: Bump version to 8.1.50.DATE-git.
16283
16284 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16285
16286         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16287         Add field.
16288         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16289         Add field.
16290         (default_exception_support_info) <catch_handlers_sym>: Add field.
16291         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16292         (ada_exception_name_addr_1): Add "catch handlers" handling.
16293         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16294         Update all callers.
16295         (create_excep_cond_exprs) <ex>: Add parameter.
16296         (re_set_exception): Update create_excep_cond_exprs call.
16297         (print_it_exception, print_one_exception, print_mention_exception)
16298         (print_recreate_exception): Add "catch handler" handling.
16299         (allocate_location_catch_handlers, re_set_catch_handlers)
16300         (check_status_catch_handlers, print_it_catch_handlers)
16301         (print_one_catch_handlers, print_mention_catch_handlers)
16302         (print_recreate_catch_handlers): New function.
16303         (catch_handlers_breakpoint_ops): New variable.
16304         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16305         Add parameter.  Add "catch handler" handling.
16306         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16307         Add "catch handler" handling.
16308         (ada_exception_catchpoint_cond_string): Add "catch handler"
16309         handling.
16310         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16311         call.
16312         (catch_ada_handlers_command): New function.
16313         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16314         operations structure.
16315         (_initialize_ada_language): Add "catch handlers" command entry.
16316         * NEWS: Document "catch handlers" feature.
16317
16318 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16319
16320         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16321         account when creating the array type of the slice.
16322         (ada_value_slice): Likewise.
16323
16324 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16325
16326         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16327         New enum value.
16328         (create_array_type_with_stride): Add byte_stride_prop parameter.
16329         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16330         New parameter.  Update all callers in this file.
16331         (array_type_has_dynamic_stride): New function.
16332         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16333         of arrays with dynamic byte strides.
16334         * dwarf2read.c (read_array_type): Add support for dynamic
16335         DW_AT_byte_stride attributes.
16336
16337 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16338
16339         * dwarf2read.c (read_unspecified_type): Treat
16340         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16341
16342 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16343
16344         Update copyright year range in all GDB files.
16345
16346 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16347
16348         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16349         and gdb/testsuite/gdb.base/step-line.c.
16350
16351 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16352
16353         * copyright.py (main): Dump the contents of
16354         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16355         even if BY_HAND is empty.
16356
16357 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16358
16359         * top.c (print_gdb_version): Update Copyright year in version
16360         message.
16361
16362 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16363
16364         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16365
16366 For older changes see ChangeLog-2017.
16367 \f
16368 Local Variables:
16369 mode: change-log
16370 left-margin: 8
16371 fill-column: 74
16372 version-control: never
16373 coding: utf-8
16374 End: