Fix Solaris build
[external/binutils.git] / gdb / ChangeLog
1 2018-11-26  Pedro Alves  <palves@redhat.com>
2
3         * procfs.c (procfs_notice_thread): Replace uses of
4         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
5         * sol-thread.c (sol_thread_target::wait)
6         (sol_update_thread_list_callback): Likewise.
7
8 2018-11-25  Tom Tromey  <tom@tromey.com>
9
10         * ui-out.c (ui_out::field_fmt): Remove comment.
11         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
12         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
13
14 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
15
16         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
17         leak in open_source_file' has been partially undone by '2179fbc36d23
18         Return scoped_fd from open_source_file'. Re-add the transfer of
19         current s->fullname to the unique_xmalloc_ptr fullname given
20         to find_and_open_source.
21
22 2018-11-23  Pedro Alves  <palves@redhat.com>
23
24         * gdbthread.h (enum thread_state): Move comments here.
25         (is_running, is_stopped, is_exited): Remove declarations.
26
27 2018-11-22  Pedro Alves  <palves@redhat.com>
28
29         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
30         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
31         ALL_NON_EXITED_THREADS with all_non_exited_threads.
32         (print_one_breakpoint_location): Replace ALL_INFERIORS with
33         all_inferiors.
34         * bsd-kvm.c: Include inferior.h.
35         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
36         with all_non_exited_threads.
37         * common/filtered-iterator.h: New.
38         * common/safe-iterator.h: New.
39         * corelow.c (core_target_open): Don't call init_thread_list here.
40         * darwin-nat.c (thread_info_from_private_thread_info): Replace
41         ALL_THREADS with all_threads.
42         * fbsd-nat.c (fbsd_nat_target::resume): Replace
43         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
44         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
45         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
46         * fork-child.c (postfork_hook): Don't call init_thread_list here.
47         * gdbarch-selftests.c (register_to_value_test): Adjust.
48         * gdbthread.h: Don't include "inferior.h" here.
49         (struct inferior): Forward declare.
50         (enum step_over_calls_kind): Moved here from inferior.h.
51         (thread_info::deletable): Definition moved to thread.c.
52         (find_thread_ptid (inferior *, ptid_t)): Declare.
53         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
54         Include "thread-iter.h".
55         (all_threads, all_non_exited_threads, all_threads_safe): New.
56         (any_thread_p): Declare.
57         (thread_list): Delete.
58         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
59         all_non_exited_threads.
60         (proceed_after_attach_callback): Delete.
61         (proceed_after_attach): Take an inferior pointer instead of an
62         integer PID.  Adjust to use range-for.
63         (attach_post_wait): Pass down inferior pointer instead of pid.
64         Use range-for instead of ALL_NON_EXITED_THREADS.
65         (detach_command): Remove init_thread_list call.
66         * inferior-iter.h: New.
67         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
68         (delete_thread_of_inferior): Delete.
69         (delete_inferior, exit_inferior_1): Use range-for with
70         inf->threads_safe() instead of iterate_over_threads.
71         (inferior_appeared): Call init_thread_list here.
72         (discard_all_inferiors): Use all_non_exited_inferiors.
73         (find_inferior_id, find_inferior_pid): Use all_inferiors.
74         (iterate_over_inferiors): Use all_inferiors_safe.
75         (have_inferiors, number_of_live_inferiors): Use
76         all_non_exited_inferiors.
77         (number_of_inferiors): Use all_inferiors and std::distance.
78         (print_inferior): Use all_inferiors.
79         * inferior.h: Include gdbthread.h.
80         (enum step_over_calls_kind): Moved to gdbthread.h.
81         (struct inferior) <thread_list>: New field.
82         <threads, non_exited_threads, threads_safe>: New methods.
83         (ALL_INFERIORS): Delete.
84         Include "inferior-iter.h".
85         (ALL_NON_EXITED_INFERIORS): Delete.
86         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
87         functions.
88         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
89         ALL_NON_EXITED_THREADS with all_non_exited_threads.
90         * infrun.c (follow_exec): Use all_threads_safe.
91         (clear_proceed_status, proceed): Use all_non_exited_threads.
92         (init_wait_for_inferior): Don't clear inline frame state here.
93         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
94         all_threads instead of ALL_NON_EXITED_THREADS.
95         (random_pending_event_thread): Use all_non_exited_threads instead
96         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
97         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
98         instead of ALL_NON_EXITED_THREADS.
99         (handle_no_resumed): Use all_non_exited_threads instead of
100         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
101         ALL_INFERIORS.
102         (restart_threads, switch_back_to_stepped_thread): Use
103         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
104         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
105         all_inferiors.
106         (kill_unfollowed_fork_children): Use inf->non_exited_threads
107         instead of ALL_NON_EXITED_THREADS.
108         * linux-tdep.c (linux_make_corefile_notes): Use
109         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
110         * linux-thread-db.c (thread_db_target::update_thread_list):
111         Replace ALL_INFERIORS with all_inferiors.
112         (thread_db_target::thread_handle_to_thread_info): Use
113         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
114         * mi/mi-interp.c (multiple_inferiors_p): New.
115         (mi_on_resume_1): Simplify using all_non_exited_threads and
116         multiple_inferiors_p.
117         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
118         instead of ALL_NON_EXITED_THREADS.
119         * nto-procfs.c (nto_procfs_target::open): Don't call
120         init_thread_list here.
121         * record-btrace.c (record_btrace_target_open)
122         (record_btrace_target::stop_recording)
123         (record_btrace_target::close)
124         (record_btrace_target::record_is_replaying)
125         (record_btrace_target::resume, record_btrace_target::wait)
126         (record_btrace_target::record_stop_replaying): Use
127         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
128         * record-full.c (record_full_wait_1): Use all_non_exited_threads
129         instead of ALL_NON_EXITED_THREADS.
130         * regcache.c (cooked_read_test): Remove reference to global
131         thread_list.
132         * remote-sim.c (gdbsim_target::create_inferior): Don't call
133         init_thread_list here.
134         * remote.c (remote_target::update_thread_list): Use
135         all_threads_safe instead of ALL_NON_EXITED_THREADS.
136         (remote_target::process_initial_stop_replies): Replace
137         ALL_INFERIORS with all_non_exited_inferiors and use
138         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
139         (remote_target::open_1): Don't call init_thread_list here.
140         (remote_target::append_pending_thread_resumptions)
141         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
142         instead of ALL_NON_EXITED_THREADS.
143         (remote_target::commit_resume)
144         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
145         with all_non_exited_inferiors and use all_non_exited_threads
146         instead of ALL_NON_EXITED_THREADS.
147         (remote_target::kill_new_fork_children): Use
148         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
149         init_thread_list and init_wait_for_inferior calls.
150         (remote_target::remote_btrace_maybe_reopen)
151         (remote_target::thread_handle_to_thread_info): Use
152         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
153         * target.c (target_terminal::restore_inferior)
154         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
155         all_non_exited_inferiors.
156         * thread-iter.c: New file.
157         * thread-iter.h: New file.
158         * thread.c: Include "inline-frame.h".
159         (thread_list): Delete.
160         (clear_thread_inferior_resources): Call clear_inline_frame_state.
161         (init_thread_list): Use all_threads_safe instead of
162         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
163         (new_thread): Adjust to per-inferior thread lists.
164         (add_thread_silent): Pass inferior to find_thread_ptid.
165         (thread_info::deletable): New, moved from the header.
166         (delete_thread_1): Adjust to per-inferior thread lists.
167         (find_thread_global_id): Use inf->threads().
168         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
169         find_thread_ptid.
170         (find_thread_ptid(inferior*, ptid_t)): New overload.
171         (iterate_over_threads): Use all_threads_safe.
172         (any_thread_p): New.
173         (thread_count): Use all_threads and std::distance.
174         (live_threads_count): Use all_non_exited_threads and
175         std::distance.
176         (valid_global_thread_id): Use all_threads.
177         (in_thread_list): Use find_thread_ptid.
178         (first_thread_of_inferior): Adjust to per-inferior thread lists.
179         (any_thread_of_inferior, any_live_thread_of_inferior): Use
180         inf->non_exited_threads().
181         (prune_threads, delete_exited_threads): Use all_threads_safe.
182         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
183         (set_resumed, set_running): Use all_non_exited_threads.
184         (is_thread_state, is_stopped, is_exited, is_running)
185         (is_executing): Delete.
186         (set_executing, set_stop_requested, finish_thread_state): Use
187         all_non_exited_threads.
188         (print_thread_info_1): Use all_inferiors and all_threads.
189         (thread_apply_all_command): Use all_non_exited_threads.
190         (thread_find_command): Use all_threads.
191         (update_threads_executing): Use all_non_exited_threads.
192         * tid-parse.c (parse_thread_id): Use inf->threads.
193         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
194
195 2018-11-22  Pedro Alves  <palves@redhat.com>
196
197         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
198         switch to it before calling into try_open_exec_file.
199
200 2018-11-22  Pedro Alves  <palves@redhat.com>
201
202         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
203         inferior_thread instead of find_thread_ptid, and only when
204         inferior_ptid is not null_ptid.
205         * inferior.c (add_inferior): Don't include target_pid_to_str
206         output when the inferior is not started.
207         * python/py-inferior.c (python_on_normal_stop): Don't use
208         find_thread_ptid.
209         (tui_on_user_selected_context_changed): Use inferior_thread
210         instead of find_thread_ptid, and only when inferior_ptid is not
211         null_ptid.
212
213 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
214
215         PR python/23714
216         * gdb/python/python.c (execute_gdb_command): Call
217         prevent_dont_repeat earlier to avoid affecting dont_repeat.
218
219 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
220
221         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
222         (HFILES_NO_SRCDIR): Add arch/riscv.h.
223         * arch/riscv.c: New file.
224         * arch/riscv.h: New file.
225         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
226         this list, and add arch/riscv.o.
227         * features/Makefile: Add riscv features.
228         * features/riscv/32bit-cpu.c: New file.
229         * features/riscv/32bit-cpu.xml: New file.
230         * features/riscv/32bit-csr.c: New file.
231         * features/riscv/32bit-csr.xml: New file.
232         * features/riscv/32bit-fpu.c: New file.
233         * features/riscv/32bit-fpu.xml: New file.
234         * features/riscv/64bit-cpu.c: New file.
235         * features/riscv/64bit-cpu.xml: New file.
236         * features/riscv/64bit-csr.c: New file.
237         * features/riscv/64bit-csr.xml: New file.
238         * features/riscv/64bit-fpu.c: New file.
239         * features/riscv/64bit-fpu.xml: New file.
240         * features/riscv/rebuild-csr-xml.sh: New file.
241         * riscv-tdep.c: Add 'arch/riscv.h' include.
242         (riscv_gdb_reg_names): Delete.
243         (csr_reggroup): New global.
244         (struct riscv_register_alias): Delete.
245         (struct riscv_register_feature): New structure.
246         (riscv_register_aliases): Delete.
247         (riscv_xreg_feature): New global.
248         (riscv_freg_feature): New global.
249         (riscv_virtual_feature): New global.
250         (riscv_csr_feature): New global.
251         (riscv_create_csr_aliases): New function.
252         (riscv_read_misa_reg): Delete.
253         (riscv_has_feature): Delete.
254         (riscv_isa_xlen): Simplify, just return cached xlen.
255         (riscv_isa_flen): Simplify, just return cached flen.
256         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
257         (riscv_register_name): Update to make use of tdesc_register_name.
258         Look up xreg and freg names in the new globals riscv_xreg_feature
259         and riscv_freg_feature.  Don't supply csr aliases here.
260         (riscv_fpreg_q_type): Delete.
261         (riscv_register_type): Use tdesc_register_type in almost all
262         cases, override the returned type in a few specific cases only.
263         (riscv_print_one_register_info): Handle errors reading registers.
264         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
265         registers that are otherwise unknown to GDB.  Also check the
266         csr_reggroup.
267         (riscv_print_registers_info): Remove assert about upper register
268         number, and use gdbarch_register_reggroup_p instead of
269         short-cutting.
270         (riscv_find_default_target_description): New function.
271         (riscv_check_tdesc_feature): New function.
272         (riscv_add_reggroups): New function.
273         (riscv_setup_register_aliases): New function.
274         (riscv_init_reggroups): New function.
275         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
276         setup register groups.  Register new riscv debug variable.
277         * riscv-tdep.h: Add 'arch/riscv.h' include.
278         (struct gdbarch_tdep): Remove abi union, and add
279         riscv_gdbarch_features field.  Remove cached quad floating point
280         type, and provide initialisation for double type field.
281         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
282         the list of targets using the feature based target descriptions.
283         * NEWS: Mention target description support.
284
285 2018-11-21  Pedro Alves  <palves@redhat.com>
286
287         * valops.c (find_method_list, value_find_oload_method_list)
288         (find_overload_match, find_oload_champ): Rename parameters and
289         locals.
290
291 2018-11-21  Pedro Alves  <palves@redhat.com>
292
293         * valops.c (find_method_list): Replace pointer and length
294         parameters with an gdb::array_view.  Adjust.
295         (value_find_oload_method_list): Likewise.
296         (find_overload_match): Use gdb::array_view for methods list.
297         Adjust to find_oload_champ interface change.
298         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
299         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
300
301 2018-11-21  Pedro Alves  <palves@redhat.com>
302
303         * gdbtypes.c (compare_badness): Change type of parameters to const
304         reference.  Adjust to badness_vector being a std::vector now.
305         (rank_function): Adjust to badness_vector being a std::vector now.
306         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
307         (LENGTH_MATCH): Delete.
308         (compare_badness): Change type of parameters to const reference.
309         (rank_function): Return a badness_vector by value now.
310         (find_overload_match): Adjust to badness_vector being a
311         std::vector now.  Remove cleanups.
312         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
313         badness_vector pointer.
314         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
315         a badness_vector pointer.  Adjust to badness_vector being a
316         std::vector now.  Remove cleanups.
317         (find_oload_champ): 'oload_champ_bv' parameter now
318         a badness_vector pointer.  Adjust to badness_vector being a
319         std::vector now.  Remove cleanups.
320
321 2018-11-21  Pedro Alves  <palves@redhat.com>
322
323         * cp-support.c (sym_return_val_size, sym_return_val_index)
324         (sym_return_val): Delete.
325         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
326         add to the vector.
327         (make_symbol_overload_list): Adjust to return a std::vector
328         instead of maintaining a global open coded vector.
329         (make_symbol_overload_list_block): Add std::vector parameter.
330         (make_symbol_overload_list_block): Rename to ...
331         (add_symbol_overload_list_block): ... this and add std::vector
332         parameter.
333         (make_symbol_overload_list_namespace): Rename to ...
334         (add_symbol_overload_list_namespace): ... this and add std::vector
335         parameter.
336         (make_symbol_overload_list_adl_namespace): Rename to ...
337         (add_symbol_overload_list_adl_namespace): ... this and add
338         std::vector parameter.
339         (make_symbol_overload_list_adl): Delete.
340         (add_symbol_overload_list_adl): New.
341         (make_symbol_overload_list_using): Rename to ...
342         (add_symbol_overload_list_using): ... this and add std::vector
343         parameter.
344         (make_symbol_overload_list_qualified): Rename to ...
345         (add_symbol_overload_list_qualified): ... this and add std::vector
346         parameter.
347         * cp-support.h: Include "common/array-view.h" and <vector>.
348         (make_symbol_overload_list): Change return type to std::vector.
349         (make_symbol_overload_list_adl): Delete declaration.
350         (add_symbol_overload_list_adl): New declaration.
351         * valops.c (find_overload_match): Local 'oload_syms' now a
352         std::vector.
353         (find_oload_champ_namespace): 'oload_syms' parameter now a
354         std::vector pointer.
355         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
356         std::vector pointer.  Adjust to new make_symbol_overload_list
357         interface.
358
359 2018-11-21  Pedro Alves  <palves@redhat.com>
360
361         * common/array-view.h (array_view::splice(size_type, size_t)): New.
362         (array_view::splice(size_type)): New.
363         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
364         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
365         std::vector.
366         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
367         * extension.h: Include "common/array-view.h".
368         (xmethod_worker::invoke): Adjust to use gdb::array_view.
369         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
370         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
371         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
372         (xmethod_worker::do_get_result_type): Adjust to use
373         gdb::array_view.
374         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
375         * gdbtypes.h: Include "common/array-view.h".
376         (rank_function): Adjust to use gdb::array_view.
377         * python/py-xmethods.c (python_xmethod_worker::invoke)
378         (python_xmethod_worker::do_get_arg_types)
379         (python_xmethod_worker::do_get_result_type)
380         (python_xmethod_worker::invoke): Adjust to new interfaces.
381         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
382         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
383         * valops.c (find_overload_match, find_oload_champ_namespace)
384         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
385         gdb:array_view and the new xmethod_worker interfaces.
386         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
387         gdb::array_view.
388         * value.h (find_overload_match, result_type_of_xmethod)
389         (call_xmethod): Adjust to use gdb::array_view.
390         * unittests/array-view-selftests.c: Add slicing tests.
391
392 2018-11-21  Pedro Alves  <palves@redhat.com>
393
394         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
395         * common/array-view.h (make_array_view): New.
396         * compile/compile-object-run.c (compile_object_run): Adjust to
397         pass an array_view.
398         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
399         * eval.c (eval_call): Adjust to pass an array_view.
400         (evaluate_subexp_standard): Adjust to pass an array_view.
401         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
402         * guile/scm-value.c (gdbscm_value_call): Likewise.
403         * infcall.c (push_dummy_code): Replace pointer + size parameters
404         with an array_view parameter.
405         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
406         adjust.
407         * infcall.h: Include "common/array-view.h".
408         (call_function_by_hand, call_function_by_hand_dummy): Replace
409         pointer + size parameters with an array_view parameter.
410         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
411         * linux-tdep.c (linux_infcall_mmap): Likewise.
412         * objc-lang.c (lookup_objc_class, lookup_child_selector)
413         (value_nsstring, print_object_command): Likewise.
414         * python/py-value.c (valpy_call): Likewise.
415         * rust-lang.c (rust_evaluate_funcall): Likewise.
416         * spu-tdep.c (flush_ea_cache): Likewise.
417         * valarith.c (value_x_binop, value_x_unop): Likewise.
418         * valops.c (value_allocate_space_in_inferior): Likewise.
419         * unittests/array-view-selftests.c (run_tests): Add
420         gdb::make_array_view test.
421
422 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
423
424         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
425         than a fixed size buffer.
426
427 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
428
429         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
430         and remove insertion of extra spaces in GDB's output.
431         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
432         Layout field into a temporary buffer, and then output it as a
433         string field.
434
435 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
436
437         * NEWS: Document the language choice done by
438         'info [types|functions|variables]|rbreak'.
439
440 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
441
442         * symtab.c (treg_matches_sym_type_name): Use
443         scoped_switch_to_sym_language_if_auto instead of local logic.
444         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
445         to switch to SYM language when language mode is auto.
446
447 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
448
449         * language.h (scoped_switch_to_sym_language_if_auto): New class.
450
451 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
452
453         * symtab.c (search_symbols): Properly check absence of type regexp
454         before entering the loop scanning the minimal symbols.
455
456 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
457
458         * s12z-tdep.c (s12z_extract_return_value): New function.
459         (inv_reg_perm) New array.
460         (s12z_return_value): Populate readbuf if non-null.
461
462 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
463
464         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
465         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
466         to MinGW fixed by Gnulib.
467         (O_NOINHERIT): Define if not defined.
468
469 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
470
471         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
472
473 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
474
475         * infrun.c (displaced_step_inferior_state) <next>: Remove.
476
477 2018-11-19  Tom Tromey  <tom@tromey.com>
478
479         * source.c (get_filename_and_charpos): Return void.
480
481 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
482
483         * skip.c (_initialize_step_skip): Fix "info skip" help.
484
485 2018-11-16  Tom Tromey  <tom@tromey.com>
486
487         PR rust/23625:
488         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
489
490 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
491
492         * infrun.c (displaced_step_inferior_states): Change type to
493         std::forward_list.
494         (get_displaced_stepping_state): Adjust.
495         (displaced_step_in_progress_any_inferior): Adjust.
496         (add_displaced_stepping_state): Adjust.
497         (remove_displaced_stepping_state): Adjust.
498
499 2018-11-18  Tom Tromey  <tom@tromey.com>
500
501         PR build/23814:
502         * target-delegates.c: Rebuild.
503         * ia64-linux-nat.c (class ia64_linux_nat_target)
504         <have_steppable_watchpoint>: Use override.  Return true, not 1.
505         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
506         "self" argument.
507         (ia64_linux_nat_target::low_new_thread): Rename.
508         (class ia64_linux_nat_target) <read_description>: Don't declare.
509         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
510         bool.
511
512 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
513
514         PR gdb/22736:
515         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
516         lang_struct_return code.
517
518 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
519
520         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
521         return_method.
522         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
523         * amd64-tdep.c (amd64_push_arguments): Likewise.
524         (amd64_push_dummy_call): Likewise.
525         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
526         * arc-tdep.c (arc_push_dummy_call): Likewise.
527         * arm-tdep.c (arm_push_dummy_call): Likewise.
528         * avr-tdep.c (avr_push_dummy_call): Likewise.
529         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
530         * cris-tdep.c (cris_push_dummy_call): Likewise.
531         * csky-tdep.c (csky_push_dummy_call): Likewise.
532         * frv-tdep.c (frv_push_dummy_call): Likewise.
533         * gdbarch.c: Regenerate.
534         * gdbarch.h: Regenerate.
535         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
536         return_method.
537         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
538         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
539         (hppa64_push_dummy_call): Likewise.
540         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
541         * i386-tdep.c (i386_push_dummy_call): Likewise.
542         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
543         * infcall.c (call_function_by_hand_dummy): Likewise.
544         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
545         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
546         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
547         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
548         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
549         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
550         * mep-tdep.c (mep_push_dummy_call): Likewise.
551         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
552         (mips_n32n64_push_dummy_call): Likewise.
553         (mips_o32_push_dummy_call): Likewise.
554         (mips_o64_push_dummy_call): Likewise.
555         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
556         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
557         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
558         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
559         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
560         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
561         (ppc64_sysv_abi_push_dummy_call): Likewise.
562         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
563         (ppc64_sysv_abi_push_dummy_call): Likewise.
564         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
565         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
566         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
567         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
568         * rx-tdep.c (rx_push_dummy_call): Likewise.
569         * s390-tdep.c (s390_push_dummy_call): Likewise.
570         * score-tdep.c (score_push_dummy_call): Likewise.
571         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
572         (sh_push_dummy_call_nofpu): Likewise.
573         * sparc-tdep.c (sparc32_store_arguments): Likewise.
574         (sparc32_push_dummy_call): Likewise.
575         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
576         (sparc64_push_dummy_call): Likewise.
577         * spu-tdep.c (spu_push_dummy_call): Likewise.
578         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
579         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
580         * v850-tdep.c (v850_push_dummy_call): Likewise.
581         * vax-tdep.c (vax_push_dummy_call): Likewise.
582         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
583         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
584
585 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
586
587         * gdbarch.sh (enum function_call_return_method): Add enum.
588         * gdbarch.h: Regenerate.
589         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
590
591 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
592
593         * unittests/copy_bitwise-selftests.c: New file.
594         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
595         (selftests::copy_bitwise_tests): Delete, moving this code to
596         unittests/copy_bitwise-selftests.c instead.
597         (_initialize_utils): Do not register copy_bitwise tests.
598         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
599         unittests/copy_bitwise-selftests.c.
600
601 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
602
603         * ada-lang.c (move_bits): Delete. Update all callers to use
604         copy_bitwise instead.
605         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
606         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
607         Move from here to utils.c.
608         (_initialize_dwarf2loc): Remove call to register copy_bitwise
609         selftests.
610         * utils.h (copy_bitwise): Add declaration.
611         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
612         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
613         Moved here from dwarf2loc.c.
614         (_initialize_utils): Register copy_bitwise selftests.
615
616 2018-11-14  Jim Wilson  <jimw@sifive.com>
617
618         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
619         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
620         then increment next_regnum if odd.
621         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
622         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
623         function type.  Pass new arg to riscv_arg_location based on function
624         type.
625         (riscv_return_value): Pass new arg to riscv_arg_location.
626
627         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
628         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
629         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
630
631         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
632         setting len.  New local align, set to max of arg align and xlen,
633         and pass to first riscv_assign_stack_location call.
634
635 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
636
637         * skip.c (complete_skip_number): New function.
638         (_initialize_step_skip): Add completers to some skip commands.
639
640 2018-11-09  Tom Tromey  <tom@tromey.com>
641
642         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
643         (struct remote_g_packet_data): Derive from allocate_on_obstack.
644         <guesses>: Now a std::vector.
645         (remote_g_packet_data_init, register_remote_g_packet_guess):
646         Update.
647         (remote_read_description_p): Update.  Return bool.
648         (remote_target::read_description): Update.
649         (struct remote_g_packet_guess): Add constructor.
650
651 2018-11-09  Tom Tromey  <tom@tromey.com>
652
653         * common/scoped_fd.h (class scoped_fd): Add move constructor and
654         move assignment operator.
655         * psymtab.c (psymtab_to_fullname): Update.
656         * source.h (open_source_file): Return scoped_fd.
657         (find_and_open_source): Likewise.
658         * source.c (open_source_file): Return scoped_fd.
659         (get_filename_and_charpos): Update.
660         (print_source_lines_base): Update.  Use scoped_fd::to_file.
661         (forward_search_command): Likewise.
662         (reverse_search_command): Likewise.
663         (find_and_open_source): Return scoped_fd.
664         * tui/tui-source.c (tui_set_source_content): Update.  Use
665         gdb_file_up.
666
667 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
668
669         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
670         overflow.
671
672 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
673
674         * configure: Regenerate.
675
676 2018-11-09  Tom de Vries  <tdevries@suse.de>
677
678         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
679         unconditionally, to set the language of the symbol.  Manage freeing
680         returned pointer using gdb::unique_xmalloc_ptr.
681
682 2018-11-08  Tom Tromey  <tom@tromey.com>
683
684         * record.c (require_record_target): Upper-case "<TAB>".
685
686 2018-11-08  Tom Tromey  <tom@tromey.com>
687
688         * python/lib/gdb/command/pretty_printers.py
689         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
690
691 2018-11-08  Tom Tromey  <tom@tromey.com>
692
693         PR gdb/23555:
694         PR gdb/23838:
695         * target.h (target_supports_terminal_ours): Return bool.
696         * target.c (target_supports_terminal_ours): Handle case where
697         current_top_target returns nullptr.  Return bool.
698
699 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
700
701         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
702         return the correct count for potential HFAs.
703
704 2018-11-08  Jan Beulich  <jbeulich@suse.com>
705
706         * i387-tdep.c (i387_supply_xsave): Split handling of
707         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
708         (i387_collect_xsave): Likewise.
709
710 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
711
712         * riscv-tdep.c (riscv_insn::decode): Update header comment.
713         (riscv_frame_this_id): Catch errors thrown while building the
714         frame cache, leave the frame id as the default, which is the outer
715         frame id.
716
717 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
718
719         * ada-lang.c (read_atcb): Only set task_info->called_task if
720         task_info->state == Entry_Caller_Sleep.
721         (print_ada_task_info): Do not check task_info->state before
722         checking task_info->called_task.
723         (info_task): Likewise.
724
725 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
726
727         * ada-tasks.c (read_atcb): Clear task_info before computing
728         the value of each of its fields.
729
730 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
731
732         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
733         NULL before dereferencing it.
734
735 2018-11-06  Tom de Vries  <tdevries@suse.de>
736
737         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
738         program headers.
739
740 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
741
742         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
743         so that it applies to uclinux as well.
744
745 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
746
747         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
748         when on AAPCS.
749
750 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
751
752         * riscv-fbsd-nat.c (getregs_supplies): Return true for
753         RISCV_CSR_SSTATUS_REGNUM.
754
755 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
756
757         * source.c (open_source_file): Fix leak by transferring the
758         current s->fullname to the unique_xmalloc_ptr fullname given
759         to find_and_open_source.
760
761 2018-11-04  Tom Tromey  <tom@tromey.com>
762
763         * varobj.c (install_default_visualizer): Update.
764         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
765         Return gdbpy_ref.
766         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
767         (find_pretty_printer_from_progspace)
768         (find_pretty_printer_from_gdb, find_pretty_printer)
769         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
770         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
771         Update.
772
773 2018-11-04  Tom Tromey  <tom@tromey.com>
774
775         * python/python.c (gdbpy_parameter_value): Update.
776         * python/python-internal.h (python_string_to_unicode)
777         (python_string_to_target_python_string)
778         (host_string_to_python_string): Return gdbpy_ref.
779         * python/py-utils.c (python_string_to_unicode)
780         (unicode_to_encoded_python_string)
781         (unicode_to_target_python_string)
782         (python_string_to_target_string)
783         (python_string_to_target_python_string): Return gdbpy_ref.
784         (python_string_to_host_string): Update.
785         (host_string_to_python_string): Return gdbpy_ref.
786         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
787         (stpy_fullname): Update.
788         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
789         Update.
790         * python/py-prettyprint.c (print_string_repr): Update.
791         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
792         (objfpy_get_build_id): Update.
793         * python/py-breakpoint.c (bppy_get_location)
794         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
795         Update.
796
797 2018-11-04  Tom Tromey  <tom@tromey.com>
798
799         * python/python-internal.h (gdb_py_object_from_longest)
800         (gdb_py_object_from_ulongest): Return gdbpy_ref.
801         * python/py-value.c (valpy_int): Update.
802         * python/py-utils.c (gdb_py_object_from_longest): Return
803         gdbpy_ref.
804         (gdb_py_object_from_ulongest): Likewise.
805         * python/py-type.c (typy_get_alignof): Update.
806         * python/py-linetable.c (ltpy_get_all_source_lines)
807         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
808         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
809
810 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
811
812         * ada-lang.c (_initialize_ada_language): Fix typo.
813
814 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
815
816         * language.c (type): Remove.
817         (_initialize_language): Remove assignment to type.
818
819 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
820
821         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
822         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
823         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
824         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
825         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
826         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
827         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
828         and aarch64-ravenscar-thread.o.
829         * NEWS: Add entry documenting Ravenscar tasking support
830         on AArch64 ELF.
831
832 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
833
834         * symtab.c (info_functions_command): Initialize quiet flag.
835         * stack.c (info_args_command): Likewise.
836
837 2018-11-01  Jim Wilson  <jimw@sifive.com>
838
839         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
840         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
841         debugging messages.
842
843 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
844
845         * ada-lang.c (ada_watch_location_expression): New function.
846         (ada_language_defn): Set la_watch_location_expression to
847         ada_watch_location_expression.
848
849 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
850
851         * print-utils.c (int_string): Remove unnecessary trailing spaces.
852
853 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
854
855         * rs6000-tdep.c (skip_prologue): Fix potential negative left
856         shifting.
857
858 2018-11-01  Jerome Guitton  <guitton@adacore.com>
859             Joel Brobecker  <brobecker@adacore.com>
860
861         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
862         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
863         * arm-pikeos-tdep.c: New file.
864         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
865         embedded system.
866         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
867
868 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
869
870         * common/pathstuff.c (get_standard_temp_dir): New.
871         * common/pathstuff.h (get_standard_temp_dir): New.
872         * config.in: Re-generate.
873         * configure: Re-generate.
874         * configure.ac: Don't check for mkdtemp.
875         * gnulib/aclocal-m4-deps.mk: Re-generate.
876         * gnulib/aclocal.m4: Re-generate.
877         * gnulib/config.in: Re-generate.
878         * gnulib/configure: Re-generate.
879         * gnulib/import/Makefile.am: Re-generate.
880         * gnulib/import/Makefile.in: Re-generate.
881         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
882         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
883         * gnulib/import/m4/mkdtemp.m4: New file.
884         * gnulib/import/mkdtemp.c: New file.
885         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
886         Add mkdtemp module.
887         * unittests/mkdir-recursive-selftests.c (test): Use
888         get_standard_temp_dir.
889         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
890         ifdef.
891         * compile/compile.c (get_compile_file_tempdir): Likewise.
892
893 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
894
895         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
896         (SIG_FRAME_LR_OFFSET64): New define.
897         (SIG_FRAME_FP_OFFSET64): New define.
898         (aix_sighandle_frame_cache): New Function.
899         (aix_sighandle_frame_this_id): New Function.
900         (aix_sighandle_frame_prev_register): New Function.
901         (aix_sighandle_frame_sniffer): New Function.
902         (aix_sighandle_frame_unwind): New global variable.
903         (rs6000_aix_init_osabi): Install new frame unwinder.
904
905 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
906
907         PR gdb/23835
908         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
909         already defined.
910
911 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
912
913         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
914
915 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
916
917         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
918         (producer_is_icc): New function.
919         (check_producer): Set producer_is_icc field on dwarf2_cu.
920         (dwarf2_init_integer_type): New function.
921         (read_base_type): Call dwarf2_init_integer_type instead of
922         init_integer_type in all cases.
923         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
924         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
925         LEN is greater than 0.
926
927 2018-10-30  Tom Tromey  <tom@tromey.com>
928
929         * main.c (captured_main_1): Check return value of bfd_init.
930
931 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
932
933         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
934         Adjust comments.
935
936 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
937
938         * procfs.c: Include common/pathstuff.h.
939
940 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
941
942         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
943         Add missing braces.  No functional change.
944
945 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
946
947         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
948         to report a bad option and fix indentation.
949         * demangle.c (demangle_command): Use report_unrecognized_option_error
950         to report a bad option and correctly report the bad option.
951
952 2018-10-27  Tom Tromey  <tom@tromey.com>
953
954         PR cli/23364:
955         * darwin-nat.c (copied_shell): New global.
956         (may_have_sip): Rename from should_disable_startup_with_shell.
957         (copy_shell_to_cache, maybe_cache_shell): New functions.
958         (darwin_nat_target::create_inferior): Update.  Use
959         copied_shell.
960
961 2018-10-27  Tom Tromey  <tom@tromey.com>
962
963         * unittests/scoped_fd-selftests.c (test_to_file): New function.
964         (run_tests): Call test_to_file.
965         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
966         temporary files.
967         * common/scoped_fd.h (scoped_fd::to_file): New method.
968
969 2018-10-27  Tom Tromey  <tom@tromey.com>
970
971         * unittests/scoped_mmap-selftests.c (test_normal): Use
972         gdb_mkostemp_cloexec.
973         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
974         Use gdb_mkostemp_cloexec.
975         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
976         gnulib/config.in, gnulib/configure,
977         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
978         gnulib/import/m4/gnulib-cache.m4,
979         gnulib/import/m4/gnulib-comp.m4: Update.
980         * gnulib/import/m4/mkostemp.m4: New file.
981         * gnulib/import/m4/mkstemp.m4: Remove.
982         * gnulib/import/mkostemp.c: New file.
983         * gnulib/import/mkstemp.m4: Remove.
984         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
985         mkstemp, add mkostemp.  Apply new patch.
986         * gnulib/import/stdlib.in.h: Apply patch.
987         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
988         New file.
989         * dwarf-index-write.c (write_psymtabs_to_index): Use
990         gdb_mkostemp_cloexec.
991         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
992
993 2018-10-27  Tom Tromey  <tom@tromey.com>
994
995         * unittests/mkdir-recursive-selftests.c: New file.
996         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
997         unittests/mkdir-recursive-selftests.c.
998         * dwarf-index-cache.c (mkdir_recursive): Move to
999         common/filestuff.c.
1000         (index_cache::store): Check return value of mkdir_recursive.
1001         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1002         (_initialize_index_cache): Don't register test.
1003         * common/filestuff.h (mkdir_recursive): Declare.
1004         * common/filestuff.c (mkdir_recursive): Move from
1005         dwarf-index-cache.c.  Return bool.
1006
1007 2018-10-27  Tom Tromey  <tom@tromey.com>
1008
1009         * dwarf-index-write.c (write_psymtabs_to_index): Move
1010         make_temp_filename to common/pathstuff.c.
1011         * common/pathstuff.h (make_temp_filename): Declare.
1012         * common/pathstuff.c (make_temp_filename): New function, moved
1013         from dwarf-index-write.c.
1014
1015 2018-10-27  Tom Tromey  <tom@tromey.com>
1016
1017         * procfs.c (procfs_target::create_inferior): Use get_shell.
1018         * cli/cli-cmds.c (shell_escape): Use get_shell.
1019         * windows-nat.c (windows_nat_target::create_inferior): Use
1020         get_shell.
1021         * common/pathstuff.c (get_shell): New function.
1022         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1023         (fork_inferior): Use get_shell.
1024         * common/pathstuff.h (get_shell): Declare.
1025
1026 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1027
1028         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1029
1030 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1031
1032         * stack.c (print_variable_and_value_data): Add preg and treg.
1033         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1034         and update callers.
1035         (print_frame_arg_vars): Likewise.
1036         (prepare_reg): New function.
1037         (info_locals_command): Extract info print args and use them.
1038         (info_args_command): Likewise.
1039         (_initialize_stack): Modify on-line help.
1040         * symtab.c (treg_matches_sym_type_name): New function.
1041         (search_symbols): New arg t_regexp.
1042         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1043         (info_variables_command): Extract info print args and use them.
1044         (info_functions_command): Likewise.
1045         (info_types_command): Update call to symtab_symbol_info.
1046         (_initialize_symtab): Modify on-line help.
1047         * symtab.h (treg_matches_sym_type_name): New function.
1048         (search_symbols): New t_regexp arg.
1049
1050 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1051
1052         * cli-utils.c (extract_arg_maybe_quoted): New function.
1053         (extract_info_print_args): New function.
1054         (info_print_args_help): New function.
1055         (report_unrecognized_option_error): New function.
1056         * cli-utils.h (extract_arg_maybe_quoted): New function.
1057         (extract_info_print_args): New function.
1058         (info_print_args_help): New function.
1059         (report_unrecognized_option_error): New function.
1060
1061 2018-10-26  Tom Tromey  <tom@tromey.com>
1062
1063         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1064         (compute_compunit_symtab_includes): Update.
1065         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1066         (compunit_symtab_ptr): Likewise.
1067
1068 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1069
1070         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1071         default_print_auxv_entry for specific tag values.
1072
1073 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1074
1075         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1076
1077 2018-10-26  Jim Wilson  <jimw@sifive.com>
1078
1079         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1080         (riscv_linux_sigframe_init): Declare.
1081         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1082         (riscv_linux_sigframe): New.
1083         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1084         (riscv_linux_sigframe_init): Define.
1085         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1086
1087         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1088         (riscv_isa_flen): Likewise.  Drop static.
1089         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1090         (riscv_isa_flen): Likewise.  Declare.
1091
1092 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1093             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1094
1095         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1096         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1097         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1098         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1099         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1100         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1101         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1102         Define.
1103         (struct ppc_linux_features) <htm>: New field.
1104         (ppc_linux_no_features): Add initializer for htm field.
1105         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1106         new tdescs.
1107         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1108         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1109         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1110         Define if not already defined.
1111         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1112         and rs6000/powerpc-isa207-htm-vsx64l.
1113         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1114         rs6000/powerpc-isa207-htm-vsx64l.xml.
1115         * features/rs6000/power-htm-spr.xml: New file.
1116         * features/rs6000/power-htm-core.xml: New file.
1117         * features/rs6000/power64-htm-core.xml: New file.
1118         * features/rs6000/power-htm-fpu.xml: New file.
1119         * features/rs6000/power-htm-altivec.xml: New file.
1120         * features/rs6000/power-htm-vsx.xml: New file.
1121         * features/rs6000/power-htm-ppr.xml: New file.
1122         * features/rs6000/power-htm-dscr.xml: New file.
1123         * features/rs6000/power-htm-tar.xml: New file.
1124         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1125         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1126         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1127         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1128         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1129         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1130         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1131         fetch_regset with HTM regsets.
1132         (store_register, store_ppc_registers): Call store_regset with HTM
1133         regsets.
1134         (ppc_linux_nat_target::read_description): Set htm field in the
1135         features struct if needed.
1136         * ppc-linux-tdep.c: Include
1137         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1138         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1139         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1140         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1141         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1142         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1143         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1144         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1145         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1146         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1147         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1148         (ppc32_linux_ctarregset): New globals.
1149         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1150         (ppc_linux_collect_core_cpgrregset): New function.
1151         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1152         regsets.
1153         (ppc_linux_core_read_description): Check if the tm spr section is
1154         present and set htm in the features struct.
1155         (_initialize_ppc_linux_tdep): Call
1156         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1157         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1158         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1159         Declare.
1160         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1161         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1162         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1163         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1164         New fields.
1165         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1166         Likewise.
1167         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1168         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1169         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1170         New enum fields.
1171         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1172         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1173         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1174         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1175         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1176         <PPC_CTAR_REGNUM>: Likewise.
1177         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1178         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1179         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1180         (IS_CEFP_PSEUDOREG): Define.
1181         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1182         registers.  Return names for the checkpointed DFP, VSX, and EFP
1183         pseudo registers.
1184         (rs6000_pseudo_register_type): Remove initial assert and raise an
1185         internal error in the else clause instead.  Return types for the
1186         checkpointed DFP, VSX, and EFP pseudo registers.
1187         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1188         checkpointed DFP pseudo registers.
1189         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1190         checkpointed VSX pseudo registers.
1191         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1192         from efpr_pseudo_register_read and
1193         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1194         registers.
1195         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1196         Handle checkpointed DFP, VSX, and EFP registers.
1197         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1198         (efp_ax_pseudo_register_collect): New functions.
1199         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1200         register logic to new functions.  Handle checkpointed DFP, VSX,
1201         and EFP pseudo registers.
1202         (rs6000_gdbarch_init): Look for and validate the htm features.
1203         Include checkpointed DFP, VSX and EFP pseudo-registers.
1204         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1205         HTM registers.
1206
1207 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1208
1209         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1210         without altivec or fpu.
1211
1212 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1213             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1214
1215         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1216         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1217         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1218         Define if not already defined.
1219         * features/rs6000/power-ebb.xml: New file.
1220         * features/rs6000/power-linux-pmu.xml: New file.
1221         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1222         features.
1223         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1224         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1225         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1226         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1227         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1228         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1229         fetch_regset with ebb and pmu regsets.
1230         (store_register, store_ppc_registers): Call store_regset with ebb
1231         and pmu regsets.
1232         (ppc_linux_nat_target::read_description): Set isa207 field in the
1233         features struct if ebb and pmu are avaiable.
1234         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1235         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1236         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1237         and pmu regsets.
1238         (ppc_linux_core_read_description): Check if the pmu section is
1239         present and set isa207 in the features struct.
1240         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1241         (ppc32_linux_pmuregset): Declare.
1242         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1243         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1244         <ppc_sier_regnum>: New field.
1245         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1246         New enum values.
1247         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1248         values.
1249         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1250         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1251         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1252         ebb and pmu features.
1253
1254 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1255             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1256
1257         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1258         (tdesc_powerpc_isa207_vsx64l): Declare.
1259         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1260         (struct ppc_linux_features) <isa207>: New field.
1261         (ppc_linux_no_features): Add initializer for isa207 field.
1262         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1263         new tdescs.
1264         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1265         (NT_PPC_TAR): Define if not already defined.
1266         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1267         rs6000/powerpc-isa207-vsx64l.
1268         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1269         rs6000/powerpc-isa207-vsx64l.xml.
1270         * features/rs6000/power-tar.xml: New file.
1271         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1272         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1273         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1274         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1275         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1276         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1277         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1278         fetch_regset with the TAR regset.
1279         (store_register, store_ppc_registers): Call store_regset with the
1280         TAR regset.
1281         (ppc_linux_nat_target::read_description): Set isa207 field in the
1282         features struct if needed.
1283         * ppc-linux-tdep.c: Include
1284         features/rs6000/powerpc-isa207-vsx32l.c and
1285         features/rs6000/powerpc-isa207-vsx64l.c.
1286         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1287         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1288         regset.
1289         (ppc_linux_core_read_description): Check if the tar section is
1290         present and set isa207 in the features struct.
1291         (_initialize_ppc_linux_tdep): Call
1292         initialize_tdesc_powerpc_isa207_vsx32l and
1293         initialize_tdesc_powerpc_isa207_vsx64l.
1294         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1295         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1296         (enum) <PPC_TAR_REGNUM>: New enum value.
1297         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1298         feature.
1299         (ppc_process_record_op31): Record changes to TAR.
1300
1301 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1302             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1303
1304         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1305         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1306         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1307         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1308         (struct ppc_linux_features) <ppr_dscr>: New field.
1309         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1310         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1311         new tdescs.
1312         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1313         Define if not already defined.
1314         * features/Makefile (WHICH): Add
1315         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1316         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1317         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1318         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1319         * features/rs6000/power-dscr.xml: New file.
1320         * features/rs6000/power-ppr.xml: New file.
1321         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1322         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1323         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1324         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1325         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1326         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1327         * ppc-linux-nat.c: Include <sys/uio.h>.
1328         (fetch_regset, store_regset, check_regset): New functions.
1329         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1330         DSCR and PPR regsets.
1331         (store_register, store_ppc_registers): Call store_regset with
1332         DSCR and PPR regsets.
1333         (ppc_linux_get_hwcap2): New function.
1334         (ppc_linux_nat_target::read_description): Call
1335         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1336         features struct if needed.
1337         * ppc-linux-tdep.c: Include
1338         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1339         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1340         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1341         (ppc32_linux_dscrregset): New globals.
1342         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1343         and dscr regsets.
1344         (ppc_linux_core_read_description): Check if the ppr and dscr
1345         sections are present and set ppr_dscr in the features struct.
1346         (_initialize_ppc_linux_tdep): Call
1347         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1348         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1349         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1350         (ppc32_linux_dscrregset): Declare.
1351         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1352         <ppc_dscr_regnum>: New field.
1353         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1354         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1355         and dscr features.
1356         (ppc_process_record_op31): Record changes to PPR and DSCR.
1357
1358 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1359
1360         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1361         second initializer line for the have_* variables.  Initialize
1362         have_fpu to 0 instead of 1.
1363
1364 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1365
1366         * arch/ppc-linux-common.c (ppc_linux_match_description):
1367         Parenthesize tdesc assignements and indent them properly.
1368
1369 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1370
1371         * ppc-linux-nat.c (fetch_register): Change if statement to else
1372         if.
1373         (store_register): Likewise.
1374
1375 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1376
1377         * rs6000-tdep.c: Remove reggroups.h include.
1378         (rs6000_pseudo_register_reggroup_p): Remove.
1379         (rs6000_gdbarch_init): Remove call to
1380         set_tdesc_pseudo_register_reggroup_p.
1381
1382 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1383
1384         * reggroups.c (default_register_reggroup_p): Return true for
1385         decfloat registers and float_reggroup.
1386
1387 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1388
1389         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1390         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1391         ppc_linux_collect_vrregset by regcache_collect_regset.
1392
1393 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1394
1395         * linux-tdep.c (linux_collect_regset_section_cb): Use
1396         std::vector<gdb_byte> instead of char * and malloc for buf.
1397         Remove xfree.
1398
1399 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1400
1401         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1402         symtab_start instead of always using language_unknown.
1403
1404 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1405
1406         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1407         READ_P parameter, catch and ignore register access errors from
1408         either the old or new MISA location.
1409         (riscv_has_feature): Update call to riscv_read_misa_reg.
1410
1411 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1412
1413         * python/py-function.c (convert_values_to_python): Return
1414         gdbpy_ref<>.  Add header comment.
1415         (fnpy_call): Adjust.
1416
1417 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1418
1419         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1420         (cmdpy_completer_handle_brkchars): Adjust.
1421         (cmdpy_completer): Adjust.
1422
1423 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1424
1425         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1426         Pass correct regnum to raw_supply_zeroed.
1427
1428 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1429
1430         * regcache.c (cooked_read_test): Add CSKY to the list of
1431         architectures with a save_reggroup
1432
1433 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
1434
1435         PR gdb/23368
1436         * infrun.c (follow_exec): In the follow_exec_mode_new case,
1437         transfer terminal state from old new new inferior.
1438         * terminal.h (swap_terminal_info): New function.
1439         * inflow.c (swap_terminal_info): New function.
1440
1441 2018-10-23  Tom Tromey  <tom@tromey.com>
1442
1443         * record-btrace.c (get_thread_current_frame_id): Rename from
1444         get_thread_current_frame.  Return a frame_id.
1445         (record_btrace_start_replaying): Update.
1446
1447 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1448
1449         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
1450         for CSRs.
1451
1452 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
1453
1454         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
1455         have_nonsteppable_watchpoint attribute to 1.
1456
1457 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1458
1459         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
1460         register names.
1461         (struct register_alias): Rename to...
1462         (struct riscv_register_alias): ...this, and update comment.
1463         (riscv_register_aliases): Update type, and alias names.  Remove
1464         CSR names from this list.
1465         (riscv_register_name): Use riscv_gdb_reg_names for int and float
1466         register names.  Add an extra assertion.
1467         (riscv_is_regnum_a_named_csr): New function.
1468         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
1469
1470 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
1471
1472         * configure.tgt: Add configuration for s12z.
1473         * s12z-tdep.c:  New file.
1474         * NEWS: Mention new target.
1475
1476 2018-10-22  Jim Wilson  <jimw@sifive.com>
1477
1478         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
1479         FP reg smaller than FP reg size, and fill with -1 instead of 0.
1480
1481         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
1482         (riscv_register_type): Use them.
1483         (riscv_print_one_register_info): Handle union of floats same as float.
1484         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
1485         riscv_fpreg_q_type fields.
1486
1487 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1488
1489         * gdbarch.sh (gdbarch_num_cooked_regs): New.
1490         * gdbarch.h: Re-generate.
1491         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
1492         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
1493         * eval.c (evaluate_subexp_standard): Likewise.
1494         * findvar.c (value_of_register): Likewise.
1495         (value_of_register_lazy): Likewise.
1496         (address_from_register): Likewise.
1497         * frame.c (get_frame_register_bytes): Likewise.
1498         * gdbarch-selftests.c (register_to_value_test): Likewise.
1499         * h8300-tdep.c (h8300_register_type): Likewise.
1500         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
1501         (i386_svr4_reg_to_regnum): Likewise.
1502         * infcmd.c (default_print_registers_info): Likewise.
1503         (registers_info): Likewise.
1504         (print_vector_info): Likewise.
1505         (default_print_float_info): Likewise.
1506         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
1507         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
1508         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
1509         (mi_cmd_data_list_changed_registers): Likewise.
1510         (mi_cmd_data_list_register_values): Likewise.
1511         (mi_cmd_data_write_register_values): Likewise.
1512         (mi_cmd_trace_frame_collected): Likewise.
1513         * mips-tdep.c (print_gp_register_row): Likewise.
1514         (mips_print_registers_info): Likewise.
1515         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1516         * regcache.c (init_regcache_descr): Likewise.
1517         (register_size): Likewise.
1518         (register_dump::dump): Likewise.
1519         (cooked_read_test): Likewise.
1520         (cooked_write_test): Likewise.
1521         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
1522         (rs6000_gdbarch_init): Likewise.
1523         * stabsread.c (stab_reg_to_regnum): Likewise.
1524         * stack.c (info_frame_command): Likewise.
1525         * target-descriptions.c (tdesc_register_name): Likewise.
1526         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
1527         * tui/tui-regs.c (tui_show_register_group): Likewise.
1528         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
1529         (user_reg_map_regnum_to_name): Likewise.
1530         (value_of_user_reg): Likewise.
1531         (maintenance_print_user_registers): Likewise.
1532         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
1533         (xtensa_register_name): Likewise.
1534         (xtensa_register_type): Likewise.
1535         (xtensa_reg_to_regnum): Likewise.
1536         (xtensa_pseudo_register_read): Likewise.
1537         (xtensa_pseudo_register_write): Likewise.
1538
1539 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1540
1541         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
1542         correctly-sized buffer with raw_read.
1543         (amd64_pseudo_register_write): Use correctly-sized buffer for
1544         raw_read/raw_write.
1545
1546 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1547
1548         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
1549         in add_prefix_cmd of set print type.
1550
1551 2018-10-19  Tom Tromey  <tom@tromey.com>
1552
1553         PR tui/18388:
1554         * NEWS: Mention tabset deprecation.
1555         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
1556         (update_tab_width): New function.
1557         (tui_set_tab_width, tui_show_tab_width): New functions.
1558         (tui_set_tab_width_command): Use update_tab_width.
1559         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
1560         Add new "set tui tab-width" command.
1561         * tui/tui-source.c (tui_set_source_content): Update.
1562         * tui/tui-disasm.c (tui_set_disassem_content): Update.
1563         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
1564         Don't declare.
1565         (tui_tab_width): Declare.
1566         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
1567         (tui_set_default_tab_len): Remove.
1568
1569 2018-10-19  Tom Tromey  <tom@tromey.com>
1570
1571         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
1572         (key_is_backspace, tui_getc): Don't declare.
1573         * tui/tui-io.c (key_is_start_sequence): Now static.
1574         (key_is_end_sequence, key_is_backspace): Remove.
1575         (tui_getc): Now static.
1576
1577 2018-10-19  Tom Tromey  <tom@tromey.com>
1578
1579         * symfile.c (reread_symbols): Clear "static_links".
1580
1581 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
1582
1583         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
1584         define.
1585         (aarch64_linux_sigframe_init): Extra boundary checks.
1586
1587 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
1588
1589         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
1590         the possibly non-existent tdesc type 'vec128', but the type of raw
1591         register v16 instead.
1592
1593 2018-10-19  Gary Benson <gbenson@redhat.com>
1594
1595         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
1596
1597 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
1598
1599         PR cli/23785
1600         * cli/cli-dump.c (restore_binary_file): Check if "file" is
1601         NULL.
1602
1603 2018-10-17  Paul Koning  <paul_koning@dell.com>
1604
1605         * charset.c (convert_between_encodings): Fix unsigned overflow.
1606
1607 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
1608
1609         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
1610         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
1611         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
1612         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1613         New functions.
1614         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
1615         and fbsd_info_proc_mappings_header.
1616         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
1617         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1618         New.
1619
1620 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
1621
1622         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
1623         Solaris Maintainer.
1624
1625 2018-10-15  Tom Tromey  <tom@tromey.com>
1626
1627         * tui/tui.c (strcat_to_buf): Remove casts.
1628         * tui/tui-winsource.c (tui_show_source_line)
1629         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
1630         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
1631         * tui/tui-windata.c (tui_first_data_item_displayed)
1632         (tui_delete_data_content_windows, tui_erase_data_content)
1633         (tui_display_all_data, tui_display_data_from)
1634         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
1635         * tui/tui-win.c (tui_set_win_height)
1636         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
1637         casts.
1638         * tui/tui-win.c (tui_resize_all): Remove casts.
1639         (tui_scroll_backward_command, tui_set_focus)
1640         (tui_set_tab_width_command): Likewise.
1641         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
1642         * tui/tui-regs.c (tui_show_register_group): Remove cast.
1643         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
1644         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
1645         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
1646         Remove casts.
1647
1648 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1649
1650         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
1651         AArch64/ARM maintainer.
1652
1653 2018-10-11  Gary Benson <gbenson@redhat.com>
1654
1655         * interps.h (interp::m_name): Make private and mutable.
1656         * interps.c (interp::~interp): Free m_name.
1657
1658 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1659             Simon Marchi <simark@simark.ca>
1660
1661         * README (`configure' options): Add documentation for new
1662         "--enable-unit-tests" option.
1663         * acinclude.m4: Include "selftest.m4".
1664         * configure: Regenerate.
1665         * configure.ac: Use "GDB_AC_SELFTEST".
1666         * maint.c (maintenance_selftest): Update message informing
1667         that selftests have been disabled.
1668         (maintenance_info_selftests): Likewise.
1669         * selftest.m4: New file.
1670
1671 2018-10-10  Gary Benson <gbenson@redhat.com>
1672
1673         * remote.c (remote_target::remote_send_printf): Add
1674         missing va_end found by Coverity.
1675
1676 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
1677
1678         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
1679
1680 2018-10-09  Tom Tromey  <tom@tromey.com>
1681
1682         * configure: Rebuild.
1683         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
1684         * NEWS: Update --enable-ubsan documentation.
1685
1686 2018-10-09  Gary Benson <gbenson@redhat.com>
1687
1688         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
1689         found by Coverity.
1690
1691 2018-10-08  Tom Tromey  <tom@tromey.com>
1692
1693         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
1694         variable.
1695         (riscv_fbsd_init_abi): Likewise.
1696
1697 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1698         * valops.c (value_struct_elt_for_reference): Rename local variable
1699         to work around the shadowing a previous local warning.
1700
1701 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1702
1703         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
1704         * NEWS: Mention new FreeBSD/riscv native configuration.
1705         * configure.host: Add riscv*-*-freebsd*.
1706         * configure.nat: Likewise.
1707         * riscv-fbsd-nat.c: New file.
1708
1709 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1710
1711         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
1712         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
1713         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
1714         * NEWS: Mention new FreeBSD/riscv target.
1715         * configure.tgt: Add riscv*-*-freebsd*.
1716         * riscv-fbsd-tdep.c: New file.
1717         * riscv-fbsd-tdep.h: New file.
1718
1719 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1720
1721         * regcache.h (struct regcache_map_entry): Note that this type can
1722         be used with traditional frame caches.
1723         * trad-frame.c (trad_frame_set_reg_regmap): New.
1724         * trad-frame.h (trad_frame_set_reg_regmap): New.
1725
1726 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1727
1728         PR c++/16841
1729         * valops.c (get_virtual_base_offset): New function.
1730         (value_struct_elt_for_reference): Use it to get virtual base offset
1731         and add it in calculating class member address.
1732
1733 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
1734
1735         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1736         (check_producer): Check if the producer is codewarrior.
1737         (producer_is_codewarrior): New function.
1738         (lnp_state_machine::record_line): Ignore is_stmt flag for records
1739         produced by codewarrior.
1740         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1741
1742 2018-10-06  Tom Tromey  <tom@tromey.com>
1743
1744         PR python/19399:
1745         * python/py-inferior.c: Add "architecture" entry.
1746         (infpy_architecture): New function.
1747
1748 2018-10-06  Tom Tromey  <tom@tromey.com>
1749
1750         PR python/21765:
1751         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1752         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1753         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
1754         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1755
1756 2018-10-06  Tom Tromey  <tom@tromey.com>
1757
1758         PR build/17077:
1759         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1760         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1761         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1762         #include.
1763
1764 2018-10-06  Tom Tromey  <tom@tromey.com>
1765
1766         * python/py-breakpoint.c (bppy_get_location): Handle a
1767         bp_breakpoint without a location.
1768
1769 2018-10-06  Tom Tromey  <tom@tromey.com>
1770
1771         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1772         (_RegEx): Reformat help text.
1773         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1774         (AnyCallerIs, AnyCallerMatches): Reformat help text.
1775         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1776         text.
1777         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1778         (EnableXMethod, DisableXMethod): Remove help indentation.
1779         Capitalize meta-syntactic variables.
1780         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1781         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1782         Capitalize meta-syntactic variables.
1783         * python/lib/gdb/command/explore.py (ExploreCommand)
1784         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1785         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1786         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1787         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1788         Remove help indentation.
1789         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1790         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1791         (DisableFrameFilter, SetFrameFilterPriority)
1792         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1793
1794 2018-10-06  Tom Tromey  <tom@tromey.com>
1795
1796         PR tui/28819:
1797         * tui/tui-io.c (gdb_wgetch): New function.
1798         (tui_mld_getc, tui_getc): Use it.
1799
1800 2018-10-05  Tom Tromey  <tom@tromey.com>
1801
1802         * sol-thread.c (sol_thread_target::wait): Rename inner
1803         "save_ptid".
1804
1805 2018-10-04  Tom Tromey  <tom@tromey.com>
1806
1807         * configure: Rebuild.
1808         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1809
1810 2018-10-04  Tom Tromey  <tom@tromey.com>
1811
1812         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1813         declaration of "block".
1814
1815 2018-10-04  Tom Tromey  <tom@tromey.com>
1816
1817         * common/filestuff.c (fdwalk): Remove inner declaration of
1818         "result".
1819
1820 2018-10-04  Tom Tromey  <tom@tromey.com>
1821
1822         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1823         "structs_addr" and hoist declaration.
1824
1825 2018-10-04  Tom Tromey  <tom@tromey.com>
1826
1827         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1828         variable "size".
1829
1830 2018-10-04  Tom Tromey  <tom@tromey.com>
1831
1832         * mdebugread.c (parse_partial_symbols): Use std::string.
1833
1834 2018-10-04  Tom Tromey  <tom@tromey.com>
1835
1836         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1837         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1838         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1839         header.
1840         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1841         more inner scope.
1842         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1843         * varobj.c (varobj_update): Rename inner "newobj",
1844         "type_changed".
1845         * valprint.c (generic_emit_char): Rename inner "buf".
1846         * valops.c (find_overload_match): Rename inner "temp".
1847         (value_struct_elt_for_reference): Declare "v" in more inner
1848         scope.
1849         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1850         * unittests/array-view-selftests.c (run_tests): Rename inner
1851         "vec".
1852         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1853         header.
1854         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1855         "tsv" in more inner scope.
1856         (print_one_static_tracepoint_marker): Rename inner
1857         "tuple_emitter".
1858         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1859         (tic6x_push_dummy_call): Don't redeclare "addr".
1860         * target-float.c: Declare "dto" lower.
1861         * symtab.c (lookup_local_symbol): Rename inner "sym".
1862         (find_pc_sect_line): Rename inner "pc".
1863         * stack.c (print_frame): Don't redeclare "gdbarch".
1864         (return_command): Rename inner "gdbarch".
1865         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1866         "sp".
1867         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1868         header.
1869         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1870         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1871         scope.
1872         * remote.c (remote_target::update_thread_list): Don't redeclare
1873         "tp".
1874         (remote_target::process_initial_stop_replies): Rename inner
1875         "thread".
1876         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1877         (remote_target::wait_as): Don't redeclare "stop_reply".
1878         (remote_target::get_thread_local_address): Rename inner
1879         "result".
1880         (remote_target::get_tib_address): Likewise.
1881
1882         * regcache.c (cooked_read_test): Rename "regnum".
1883         * record-btrace.c (cmd_record_btrace_start): Rename inner
1884         "exception".
1885         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1886         loop header.
1887         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1888         header.
1889         (ppu2spu_sniffer): Rename inner "buf".
1890         * parse.c (operator_check_standard): Rename inner "type",
1891         "objfile".
1892         * p-valprint.c (pascal_val_print): Introduce new scope for
1893         "low_bound", "high_bound".
1894         * p-exp.y (yylex): Declare "i" in loop header.
1895         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1896         Lower declaration of "s".
1897         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1898         header.
1899         (nios2_push_dummy_call): Rename "len".
1900         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1901         "buf".
1902         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1903         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1904         (linux_xfer_osdata_modules): Likewise.
1905         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1906         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1907         (mips_o64_push_dummy_call): Likewise.
1908         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1909         "op".
1910         * mi/mi-main.c (list_available_thread_groups): Rename inner
1911         "tuple_emitter".
1912         (mi_cmd_data_read_memory): Rename inner "opts".
1913         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1914         "tuple_emitter".
1915         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1916         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1917         more inner scope.
1918         (parse_partial_symbols): Rename inner "pst", "p", "name"
1919         * main.c (captured_main_1): Rename inner "i"s.
1920         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1921         "oso2".
1922         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1923         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1924         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1925         (handle_signal_stop): Rename inner "gdbarch".
1926         (handle_command): Declare "signum" in loop header.
1927         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1928         "status".
1929         (examine_prologue): Rename inner "sol" and "sof".
1930         (ia64_extract_return_value): Rename inner "val".  Declare another
1931         "val" in a more inner scope.
1932         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1933         inner scope.
1934         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1935         "except".
1936         * findvar.c (default_read_var_value): Don't redeclare "addr".
1937         * f-exp.y (yylex): Declare "i" in loop header.
1938         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1939         Rename inner "type", "expect_type".
1940         (evaluate_subexp_for_sizeof): Rename inner "pc".
1941         * elfread.c (elf_symfile_read): Rename inner "abfd".
1942         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1943         "bytes_read".
1944         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1945         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1946         (dwarf_decode_line_header): Rename inner "lh".
1947         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1948         "offset".  Declare "i" in loop header.
1949         (disassemble_dwarf_expression): Rename inner "addr_size".
1950         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1951         inner "result".
1952         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1953         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1954         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1955         "inner_list_emitter".
1956         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1957         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1958         declaration in a block.
1959         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1960         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1961         "obstack_final_size".
1962         * cp-support.c (inspect_type): Declare "i" in loop header.
1963         * compile/compile.c (compile_instance::insert_symbol_error):
1964         Rename inner "e".
1965         * common/agent.c (agent_run_command): Remove inner "ret"
1966         declaration.
1967         * coffread.c (coff_symfile_read): Rename inner "name".
1968         (coff_symfile_read): Rename inner "abfd".
1969         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1970         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1971         "high".
1972         * c-exp.y (lex_one_token): Move "len" declaration lower.
1973         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1974         "gdbarch".
1975         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1976         "b".
1977         (watch_command_1): Declare "mark" later.
1978         (clear_command): Don't shadow "a" or "b".
1979         (delete_command): Rename inner "b".
1980         (delete_trace_command): Likewise.
1981         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1982         "op".
1983         (arm_gdbarch_init): Remove inner "e_flags".
1984         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1985         "offset" in inner blocks.
1986
1987 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1988
1989         * dwarf-index-write.c (file_write): Don't write if the vector is
1990         empty.
1991
1992 2018-10-05  Tom de Vries  <tdevries@suse.de>
1993
1994         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1995         PyArg_ParseTuple call.
1996
1997 2018-10-05  Tom de Vries  <tdevries@suse.de>
1998
1999         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2000         PyArg_ParseTuple call.
2001
2002 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2003
2004         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2005         to avoid exceeding 80 characters per line limit.
2006
2007 2018-10-04  Tom Tromey  <tom@tromey.com>
2008
2009         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2010         (reread_symbols): Update.
2011         * complaints.h (clear_complaints): Remove argument.
2012         * complaints.c (enum complaint_series): Remove.
2013         (series): Remove global.
2014         (complaint_internal): Update.
2015         (clear_complaints): Remove argument.
2016
2017 2018-10-04  Tom Tromey  <tom@tromey.com>
2018
2019         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2020         debugging symbols" message if there is a separate debug objfile.
2021
2022 2018-10-04  Tom Tromey  <tom@tromey.com>
2023
2024         PR cli/19551:
2025         * symfile.c (symbol_file_add_with_addrs): Update output.
2026         * psymtab.c (require_partial_symbols): Update output.
2027
2028 2018-10-04  Tom Tromey  <tom@tromey.com>
2029
2030         PR cli/22234:
2031         * complaints.c: Emit \n.
2032
2033 2018-10-04  Tom Tromey  <tom@tromey.com>
2034
2035         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2036         (separate_debug_file_exists, find_separate_debug_file)
2037         (add_symbol_file_command, reread_symbols, allocate_symtab)
2038         (allocate_compunit_symtab): Use filtered printing, not
2039         unfiltered.
2040         * psymtab.c (require_partial_symbols, dump_psymtab)
2041         (allocate_psymtab): Use filtered printing, not unfiltered.
2042
2043 2018-10-04  Tom Tromey  <tom@tromey.com>
2044
2045         * complaints.c (complaint_internal): Correctly check complaint
2046         count.
2047
2048 2018-10-04  Tom Tromey  <tom@tromey.com>
2049
2050         * complaints.h (struct complaints): Remove declaration.
2051         * complaints.c (clear_complaints): Remove an unused variable.
2052
2053 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2054
2055         * MAINTAINERS (Write After Approval): Add self.
2056
2057 2018-10-03  Tom Tromey  <tom@tromey.com>
2058
2059         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2060         "buffer_contents".
2061         * coffread.c (coff_symtab_read): Initialize "newobj".
2062
2063 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2064
2065         * dwarf2read.c (read_func_scope): Remove struct keyword in
2066         range-based for.
2067
2068 2018-10-03  Tom Tromey  <tom@tromey.com>
2069
2070         * README: Mention --enable-ubsan.
2071         * NEWS: Mention --enable-ubsan.
2072         * acinclude.m4: Include sanitize.m4.
2073         * configure: Rebuild.
2074         * configure.ac: Call AM_GDB_UBSAN.
2075         * sanitize.m4: New file.
2076
2077 2018-10-03  Tom Tromey  <tom@tromey.com>
2078
2079         * expression.h (enum exp_opcode): Use uint8_t as base type.
2080         * expprint.c (op_name): Handle invalid opcodes.
2081
2082 2018-10-03  Tom Tromey  <tom@tromey.com>
2083
2084         * parse.c (prefixify_expression): Add assert.
2085         (parse_exp_in_context_1): Throw exception if the expression is
2086         empty.
2087
2088 2018-10-03  Tom Tromey  <tom@tromey.com>
2089
2090         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2091
2092 2018-10-03  Tom Tromey  <tom@tromey.com>
2093
2094         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2095
2096 2018-10-03  Tom Tromey  <tom@tromey.com>
2097
2098         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2099         unsigned.
2100
2101 2018-10-03  Tom Tromey  <tom@tromey.com>
2102
2103         * findvar.c (extract_integer): Do work in an unsigned type.
2104
2105 2018-10-03  Tom Tromey  <tom@tromey.com>
2106
2107         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2108         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2109         base type.
2110         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2111         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2112         type.
2113         * c-lang.h (enum c_string_type_values): Use unsigned as base
2114         type.
2115         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2116
2117 2018-10-03  Tom Tromey  <tom@tromey.com>
2118
2119         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2120         <~dwarf2_frame_state_reg_info>: Update.
2121         <dwarf2_frame_state_reg_info>: Update.
2122         <alloc_regs>: Add assertion.  Update.
2123         <reg>: Now a std::vector.
2124         <num_regs>: Remove.
2125         <swap>: Update.
2126         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2127         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2128
2129 2018-10-03  Tom Tromey  <tom@tromey.com>
2130
2131         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2132
2133 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2134
2135         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2136
2137 2018-10-02  Tom Tromey  <tom@tromey.com>
2138
2139         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2140
2141 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2142
2143         * NEWS: Mention changed commands.
2144         * ser-uds.c: New file.
2145         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2146         * configure: Regenerate.
2147         * Makefile.in: Add new file.
2148         * serial.c (serial_open): Check if filename is a socket
2149         and lookup the appropriate interface accordingly.
2150
2151 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2152
2153         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2154         define.
2155         (AARCH64_EXTRA_MAGIC): Likewise.
2156         (AARCH64_FPSIMD_MAGIC): Likewise.
2157         (AARCH64_SVE_MAGIC): Likewise.
2158         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2159         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2160         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2161         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2162         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2163         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2164         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2165         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2166         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2167         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2168         (read_aarch64_ctx): Add function.
2169         (aarch64_linux_sigframe_init): Detect FP registers.
2170
2171 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2172
2173         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2174         (AARCH64_D0_REGNUM): Likewise.
2175         (AARCH64_S0_REGNUM): Likewise.
2176         (AARCH64_H0_REGNUM): Likewise.
2177         (AARCH64_B0_REGNUM): Likewise.
2178         (AARCH64_SVE_V0_REGNUM): Likewise.
2179         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2180         (AARCH64_D0_REGNUM): Likewise.
2181         (AARCH64_S0_REGNUM): Likewise.
2182         (AARCH64_H0_REGNUM): Likewise.
2183         (AARCH64_B0_REGNUM): Likewise.
2184         (AARCH64_SVE_V0_REGNUM): Likewise.
2185
2186 2018-10-01  Gary Benson <gbenson@redhat.com>
2187
2188         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2189         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2190         prfpregset_t instead of gdb_prfpregset_t.
2191         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2192         * configure, config.in: Rebuild.
2193
2194 2018-10-01  Gary Benson <gbenson@redhat.com>
2195
2196         * common/gdb_proc_service.h: New file, factored out from...
2197         * gdb_proc_service.h: Moved common code to the above file.
2198         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2199
2200 2018-10-01  Gary Benson <gbenson@redhat.com>
2201
2202         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2203         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2204
2205 2018-10-01  Gary Benson <gbenson@redhat.com>
2206
2207         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2208         (AC_CHECK_HEADERS): Check for linux/elf.h.
2209         * configure, config.in: Rebuild.
2210         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2211         doesn't define elf_fpregset_t.
2212
2213 2018-10-01  Gary Benson <gbenson@redhat.com>
2214
2215         * gdb_proc_service.h: Whitespace change.
2216
2217 2018-10-01  Tom Tromey  <tom@tromey.com>
2218
2219         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2220         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2221         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2222
2223 2018-10-01  Tom Tromey  <tom@tromey.com>
2224
2225         * README: Minor change.
2226
2227 2018-09-30  Pedro Alves  <palves@redhat.com>
2228
2229         * darwin-nat-info.c (darwin_debug_regions_recurse)
2230         (info_mach_exceptions_command): Remove unused local variables.
2231         * darwin-nat.c (darwin_decode_notify_message)
2232         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2233         (darwin_stop_inferior, darwin_setup_exceptions)
2234         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2235         (darwin_nat_target::attach, darwin_nat_target::detach)
2236         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2237         local variables.
2238         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2239         variables.
2240
2241 2018-09-29  Tom Tromey  <tom@tromey.com>
2242
2243         * README: Remove some leftover text.
2244
2245 2018-09-29  Tom Tromey  <tom@tromey.com>
2246
2247         * PROBLEMS: Rewrite.
2248         * README: Update.
2249
2250 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2251
2252         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2253         case with explicit breakpoint kind.
2254         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2255         'additional_info' and related logic.
2256         (riscv_debug_breakpoints): New variable.
2257         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2258         instruction to determine the breakpoint kind.
2259         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2260         flag.  Update description of 'set/show riscv
2261         use-compressed-breakpoints' flag.
2262
2263 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2264
2265         (NEWS): Mention changes to frame related commands.
2266         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2267         (add_prefix_cmd_suppress_notification): New function.
2268         (add_com_suppress_notification): Call
2269         add_cmd_suppress_notification.
2270         * command.h (add_cmd_suppress_notification): Declare.
2271         (add_prefix_cmd_suppress_notification): Declare.
2272         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2273         (parse_frame_specification): Moved from stack.c, with
2274         simplification to handle a single argument.
2275         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2276         switch to the selected frame.  Add a header comment.
2277         * stack.c: Remove 'safe-ctype.h' include.
2278         (find_frame_for_function): Add declaration.
2279         (find_frame_for_address): New function.
2280         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2281         (frame_selection_by_function_completer): New function.
2282         (info_frame_command): Rename to...
2283         (info_frame_command_core): ...this, and update parameter types.
2284         (select_frame_command): Rename to...
2285         (select_frame_command_core): ...this, and update parameter types.
2286         (frame_command): Rename to...
2287         (frame_command_core): ...this, and update parameter types.
2288         (class frame_command_helper): New class to wrap implementations of
2289         frame related sub-commands.
2290         (frame_apply_cmd_list): New static global.
2291         (frame_cmd_list): Make static.
2292         (select_frame_cmd_list): New global for sub-commands.
2293         (info_frame_cmd_list): New global for sub-commands.
2294         (_initialize_stack): Register sub-commands for 'frame',
2295         'select-frame', and 'info frame'.  Update 'frame apply' commands
2296         to use frame_apply_cmd_list.  Move function local static
2297         frame_apply_list to file static frame_apply_cmd_list for
2298         consistency.
2299         * stack.h (select_frame_command): Delete declarationn.
2300         (select_frame_for_mi): Declare new function.
2301
2302 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2303
2304         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2305         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2306         and NOP.
2307
2308 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2309
2310         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2311
2312 2018-09-26  Tom Tromey  <tom@tromey.com>
2313
2314         * valops.c (auto_abandon): Remove dead code.
2315
2316 2018-09-26  Tom Tromey  <tom@tromey.com>
2317
2318         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2319
2320 2018-09-24  Tom Tromey  <tom@tromey.com>
2321
2322         * common/pathstuff.c (get_standard_cache_dir): Make
2323         "xdg_cache_home" and "home" const.
2324         * top.c (init_history): Make "tmpenv" const.
2325         * main.c (get_init_files): Make "homedir" const.
2326
2327 2018-09-23  Tom Tromey  <tom@tromey.com>
2328
2329         PR python/18852:
2330         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2331
2332 2018-09-23  Tom Tromey  <tom@tromey.com>
2333
2334         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2335         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2336         * python/python-internal.h (gdbpy_handle_exception): Declare.
2337         * python/py-utils.c (gdbpy_handle_exception): New function.
2338
2339 2018-09-23  Tom Tromey  <tom@tromey.com>
2340
2341         PR python/17284:
2342         * python/py-type.c (typy_template_argument): Check for negative
2343         argument number.
2344
2345 2018-09-23  Tom Tromey  <tom@tromey.com>
2346
2347         PR python/14062:
2348         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2349
2350 2018-09-23  Tom Tromey  <tom@tromey.com>
2351
2352         PR python/18170:
2353         * python/py-value.c (valpy_int): Allow conversion from pointer
2354         type.
2355
2356 2018-09-23  Tom Tromey  <tom@tromey.com>
2357
2358         PR python/20126:
2359         * python/py-value.c (valpy_int): Respect type sign.
2360
2361 2018-09-23  Tom Tromey  <tom@tromey.com>
2362
2363         PR python/18352;
2364         * python/py-value.c (valpy_float): Allow conversions from int or
2365         char.
2366         (valpy_int, valpy_long): Allow conversions from float.
2367
2368 2018-09-23  Tom Tromey  <tom@tromey.com>
2369
2370         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2371         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2372
2373 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2374
2375         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2376         __sighndlr.
2377         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2378
2379 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2380
2381         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2382         target_terminal::ours().
2383
2384 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2385
2386         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2387         of vl to ULONGEST.
2388
2389 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2390
2391         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2392         redundant condition.
2393
2394 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2395
2396         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2397
2398         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2399         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2400         * sol-thread.c (ps_pdmodel): Don't guard definition.
2401
2402         * procfs.c: Fix formatting.
2403
2404         * procfs.c (sysset_t_alloc): Remove.
2405         (create_procinfo): Use XNEW instead of sysset_t_alloc.
2406         (procfs_debug_inferior): Likewise.
2407         (procfs_set_exec_trap): Likewise.
2408         (proc_set_traced_sysentry): Don't allocate argp dynamically.
2409         (proc_set_traced_sysexit): Likewise.
2410
2411         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2412         (dead_procinfo): Likewise.
2413         (proc_warn): Likewise.
2414         (proc_error): Likewise.
2415         (proc_get_LDT_entry): Likewise.
2416         (do_attach): Likewise.
2417         (procfs_target::pid_to_str): Likewise.
2418         (iterate_over_mappings): Likewise.
2419
2420         * procfs.c (create_procinfo): Fix ARI warning.
2421         (proc_get_status): Likewise.
2422         (proc_stop_process): Likewise.
2423         (proc_run_process): Likewise.
2424         (proc_kill): Likewise.
2425         (proc_get_LDT_entry): Likewise.
2426         (procfs_find_LDT_entry): Likewise.
2427         (proc_update_threads): Likewise.
2428         (proc_iterate_over_threads): Likewise.
2429         (do_attach): Likewise.
2430         (procfs_xfer_memory): Likewise.
2431         (invalidate_cache): Likewise.
2432         (procfs_target::resume): Likewise.
2433         (procfs_init_inferior): Likewise.
2434         (procfs_set_exec_trap): Likewise.
2435         (procfs_target::thread_alive): Likewise.
2436         (procfs_target::pid_to_exec_file): Likewise.
2437         (iterate_over_mappings): Likewise.
2438         (procfs_target::make_corefile_notes): Likewise.
2439         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2440
2441         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
2442         (procfs_find_LDT_entry): Likewise.
2443         * sol-thread.c (ps_lgetLDT): Likewise.
2444
2445 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2446
2447         PR tdep/17903
2448         * procfs.c (procfs_target): Declare pid_to_exec_file.
2449         (procfs_target::pid_to_exec_file): New.
2450
2451 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2452
2453         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
2454         renaming.
2455         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
2456         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
2457
2458 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2459
2460         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
2461         (supply_fpregset, fill_fpregset): Move ...
2462         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
2463         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
2464         Remove references to ioctl-based procfs.
2465         Include <sys/reg.h>.
2466         Remove PR_MODEL_NATIVE guards.
2467         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
2468         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
2469
2470 2018-09-19  Xavier Roirand  <roirand@adacore.com>
2471
2472         PR gdb/20981:
2473         * solib-darwin.c (darwin_get_dyld_bfd): New function.
2474         (darwin_solib_get_all_image_info_addr_at_init): Update call.
2475         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
2476
2477 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
2478
2479         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
2480         (fbsd_print_sockaddr_in6): Likewise.
2481
2482 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
2483             Chris January  <chris.january@arm.com>
2484
2485         * eval.c (skip_undetermined_arglist): Skip argument list helper.
2486         (evaluate_subexp_standard): Return a dummy type when
2487         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
2488         OP_F77_UNDETERMINED_ARGLIST case.
2489         * expression.h (enum noside): Update comment.
2490
2491 2018-09-19  George Vasick <george.vasick@oracle.com>
2492
2493         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
2494
2495 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
2496             April Chin <april.chin@oracle.com>
2497             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2498
2499         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
2500         uint_t lwpid_t.
2501         (create_procinfo): Print pids in /proc without leading zeros.
2502
2503 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
2504
2505         * nios2-tdep.c (nios2_gcc_target_options): New.
2506         (nios2_gdb_arch_init): Install new hook.
2507
2508 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2509
2510         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
2511         New file.
2512         * update-gnulib.sh: Apply patch.
2513         * configure: Re-generate.
2514
2515 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2516
2517         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
2518         description.  Make "info proc" command descriptions more
2519         consistent.
2520
2521 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2522
2523         * NEWS: Mention 'info proc files' command.
2524
2525 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2526
2527         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
2528         descriptors for IP_FILES and IP_ALL.
2529
2530 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2531
2532         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
2533         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
2534         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
2535         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
2536         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
2537         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
2538         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
2539         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
2540         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
2541         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
2542         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
2543         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
2544         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
2545         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
2546         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
2547         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
2548         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
2549         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
2550         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
2551         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
2552         (struct fbsd_sockaddr_un): New types.
2553         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
2554         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
2555         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
2556         (fbsd_core_info_proc_files): New functions.
2557         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
2558         IP_ALL.
2559         * fbsd-tdep.h (fbsd_info_proc_files_header)
2560         (fbsd_info_proc_files_entry): New.
2561
2562 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2563
2564         * defs.h (enum info_proc_what) [IP_FILES]: New value.
2565         * infcmd.c (info_proc_cmd_files): New function.
2566         (_initialize_infcmd): Register 'info proc files' command.
2567
2568 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2569
2570         * gnulib/aclocal-m4-deps.mk: Re-generate.
2571         * gnulib/aclocal.m4: Re-generate.
2572         * gnulib/config.in: Re-generate.
2573         * gnulib/configure: Re-generate.
2574         * gnulib/import/Makefile.am: Re-generate.
2575         * gnulib/import/Makefile.in: Re-generate.
2576         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2577         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2578         * gnulib/import/arpa_inet.in.h: New file.
2579         * gnulib/import/inet_ntop.c: New file.
2580         * gnulib/import/m4/arpa_inet_h.m4: New file.
2581         * gnulib/import/m4/inet_ntop.m4: New file.
2582         * gnulib/import/m4/netinet_in_h.m4: New file.
2583         * gnulib/import/m4/socklen.m4: New file.
2584         * gnulib/import/m4/sockpfaf.m4: New file.
2585         * gnulib/import/m4/stdalign.m4: New file.
2586         * gnulib/import/m4/sys_uio_h.m4: New file.
2587         * gnulib/import/netinet_in.in.h: New file.
2588         * gnulib/import/stdalign.in.h: New file.
2589         * gnulib/import/sys_socket.c: New file.
2590         * gnulib/import/sys_socket.in.h: New file.
2591         * gnulib/import/sys_uio.in.h: New file.
2592         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
2593         module.
2594
2595 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2596
2597         * gnulib/aclocal-m4-deps.mk: New file.
2598         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
2599         deterministically.
2600
2601 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2602
2603         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
2604         KVE_PATH.
2605
2606 2018-09-18  Tom Tromey  <tom@tromey.com>
2607
2608         * compile/compile-object-load.c (struct
2609         link_hash_table_cleanup_data): Add constructor and destructor.
2610         Use DISABLE_COPY_AND_ASSIGN.
2611         (~link_hash_table_cleanup_data): Rename from
2612         link_hash_table_free.  Now a destructor.
2613         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
2614
2615 2018-09-18  Tom Tromey  <tom@tromey.com>
2616
2617         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2618         * compile/compile-object-load.c (struct munmap_list): Move to
2619         header file.
2620         (munmap_list::add): Rename from munmap_list_add; rewrite.
2621         (munmap_list::~munmap_list): Rename from munmap_list_free.
2622         (munmap_listp_free_cleanup): Remove.
2623         (compile_object_load): Update.
2624         * compile/compile-object-load.h (struct munmap_list): Move from
2625         compile-object-load.c.  Rewrite.
2626
2627 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
2628
2629         * aarch64-tdep.c (pass_in_v): Use register size.
2630         (aarch64_extract_return_value): Likewise.
2631         (aarch64_store_return_value): Likewise.
2632
2633 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2634
2635         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
2636         rlim_t.
2637
2638 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2639
2640         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
2641         Fix short help line.
2642
2643 2018-09-17  Tom Tromey  <tom@tromey.com>
2644
2645         PR python/20445:
2646         * configure: Rebuild.
2647         * configure.ac: Conditionally use -DNDEBUG for Python.
2648
2649 2018-09-17  Tom Tromey  <tom@tromey.com>
2650
2651         * configure: Rebuild.
2652         * configure.ac: Use gmp as a library dependency when checking for
2653         mpfr.
2654
2655 2018-09-17  Pedro Alves  <palves@redhat.com>
2656
2657         * python/py-inferior.c (find_inferior_object): Delete.
2658
2659 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
2660
2661         * compile/compile-cplus-types.c
2662         (compile_cplus_instance::enter_scope): Don't use new_scope after
2663         std::move.
2664
2665 2018-09-17  Tom Tromey  <tom@tromey.com>
2666
2667         * common/pathstuff.c (get_standard_cache_dir): Use
2668         ~/Library/Caches on macOS.
2669         * common/pathstuff.h (get_standard_cache_dir): Update comment.
2670
2671 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
2672
2673         PR python/23669
2674         * breakpoint.c (commands_cmd_element): New.
2675         (_initialize_breakpoint): Assign commands_cmd_element.
2676         * breakpoint.h (commands_cmd_element): New.
2677         * cli/cli-script.c (while_cmd_element, if_command,
2678         define_cmd_element): New.
2679         (command_name_equals): Remove.
2680         (process_next_line): Compare commands by pointer, not by name.
2681         (_initialize_cli_script): Assign the various cmd_list_element
2682         variables.
2683         * compile/compile.c (compile_cmd_element): New.
2684         (_initialize_compile): Assign compile_cmd_element.
2685         * compile/compile.h (compile_cmd_element): New.
2686         * guile/guile.c (guile_cmd_element): New.
2687         (install_gdb_commands): Assign guile_cmd_element.
2688         * guile/guile.h (guile_cmd_element): New.
2689         * python/python.c (python_cmd_element): New.
2690         (_initialize_python): Assign python_cmd_element.
2691         * python/python.h (python_cmd_element): New.
2692         * tracepoint.c (while_stepping_cmd_element): New.
2693         (_initialize_tracepoint): Assign while_stepping_cmd_element.
2694         * tracepoint.h (while_stepping_cmd_element): New.
2695
2696 2018-09-17  Tom Tromey  <tom@tromey.com>
2697
2698         * infrun.c (save_infcall_suspend_state): Return
2699         infcall_suspend_state_up.
2700         (save_infcall_control_state): Return infcall_control_state_up.
2701         * inferior.h (save_infcall_suspend_state)
2702         (save_infcall_control_state): Declare later.  Return unique
2703         pointers.
2704
2705 2018-09-17  Tom Tromey  <tom@tromey.com>
2706
2707         * infrun.c (struct stop_context): Declare constructor,
2708         destructor, "changed" method.
2709         (stop_context::stop_context): Rename from save_stop_context.
2710         (stop_context::~stop_context): Rename from
2711         release_stop_context_cleanup.
2712         (normal_stop): Update.
2713         (stop_context::changed): Rename from stop_context_changed.  Return
2714         bool.
2715
2716 2018-09-17  Tom Tromey  <tom@tromey.com>
2717
2718         * inferior.h (struct infcall_suspend_state_deleter): New.
2719         (infcall_suspend_state_up): New typedef.
2720         (struct infcall_control_state_deleter): New.
2721         (infcall_control_state_up): New typedef.
2722         (make_cleanup_restore_infcall_suspend_state)
2723         (make_cleanup_restore_infcall_control_state): Don't declare.
2724         * infcall.c (call_function_by_hand_dummy): Update.
2725         * infrun.c (do_restore_infcall_suspend_state_cleanup)
2726         (make_cleanup_restore_infcall_suspend_state): Remove.
2727         (do_restore_infcall_control_state_cleanup)
2728         (make_cleanup_restore_infcall_control_state): Remove.
2729
2730 2018-09-17  Tom Tromey  <tom@tromey.com>
2731
2732         * gdbthread.h (struct thread_control_state): Add initializer.
2733         (class thread_info) <control>: Remove initializer.
2734         * inferior.h (struct inferior_control_state): Add initializer.
2735         (class inferior) <control>: Remove initializer.
2736         (exit_inferior_1): Update.
2737         * infrun.c (struct infcall_control_state): Add constructors.
2738         (save_infcall_control_state): Use new.
2739         (restore_infcall_control_state, discard_infcall_control_state):
2740         Use delete.
2741
2742 2018-09-17  Tom Tromey  <tom@tromey.com>
2743
2744         * infrun.c (struct infcall_suspend_state) <registers>: Now a
2745         unique_ptr.
2746         <siginfo_data>: Now a unique_xmalloc_ptr.
2747         (save_infcall_suspend_state, restore_infcall_suspend_state)
2748         (discard_infcall_suspend_state)
2749         (get_infcall_suspend_state_regcache): Update.
2750
2751 2018-09-17  Tom Tromey  <tom@tromey.com>
2752
2753         * gdbthread.h (struct thread_suspend_state): Add initializers.
2754         (class thread_info) <suspend>: Remove initializer.
2755         * infrun.c (struct infcall_suspend_state): Add initializers.
2756         (save_infcall_suspend_state): Use new.
2757         (discard_infcall_suspend_state): Use delete.
2758
2759 2018-09-16  Tom Tromey  <tom@tromey.com>
2760
2761         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2762         Remove.
2763         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2764         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2765         (py_varobj_iter_new): Likewise.
2766         (py_varobj_get_iterator): Use gdbpy_ref.
2767
2768 2018-09-16  Tom Tromey  <tom@tromey.com>
2769
2770         * python/py-threadevent.c (py_get_event_thread): Simplify.
2771         * python/py-inferior.c (infpy_thread_from_thread_handle):
2772         Return immediately after calling thread_to_thread_object.  Use
2773         Py_RETURN_NONE.
2774         (thread_to_thread_object): Set the exception on a NULL return.
2775
2776 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2777
2778         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2779
2780 2018-09-16  Tom Tromey  <tom@tromey.com>
2781
2782         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2783         Remove.
2784
2785 2018-09-16  Tom Tromey  <tom@tromey.com>
2786
2787         * python/python-internal.h (thread_to_thread_object): Change
2788         return type.
2789         * python/py-inferior.c (thread_to_thread_object): Return a new
2790         reference.
2791         (infpy_thread_from_thread_handle): Update.
2792         * python/py-infthread.c (gdbpy_selected_thread): Update.
2793         * python/py-stopevent.c (create_stop_event_object): Update.
2794         * python/py-threadevent.c (py_get_event_thread): Return a new
2795         reference.
2796         (py_get_event_thread): Update.
2797         * python/py-event.h (py_get_event_thread): Change return type.
2798         * python/py-continueevent.c (create_continue_event_object):
2799         Update.
2800
2801 2018-09-16  Tom Tromey  <tom@tromey.com>
2802
2803         * python/py-progspace.c (pspy_get_objfiles): Update.
2804         * python/python-internal.h (objfile_to_objfile_object): Change
2805         return type.
2806         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2807         Update.
2808         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2809         Update.
2810         * python/python.c (gdbpy_get_current_objfile): Update.
2811         (gdbpy_objfiles): Update.
2812         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2813         Update.
2814         (objfile_to_objfile_object): Return a new reference.
2815         * python/py-symtab.c (stpy_get_objfile): Update.
2816         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2817         Update.
2818
2819 2018-09-16  Tom Tromey  <tom@tromey.com>
2820
2821         * python/py-inferior.c (infpy_get_progspace): Update.
2822         * python/python-internal.h (pspace_to_pspace_object): Change
2823         return type.
2824         * python/py-newobjfileevent.c
2825         (create_clear_objfiles_event_object): Update.
2826         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2827         Update.
2828         * python/python.c (gdbpy_get_current_progspace): Update.
2829         (gdbpy_progspaces): Update.
2830         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2831         reference.
2832         * python/py-objfile.c (objfpy_get_progspace): Update.
2833         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2834         Update.
2835
2836 2018-09-16  Tom Tromey  <tom@tromey.com>
2837
2838         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2839         (solib_name, block_for_pc, find_pc_line): New functions.
2840         (execute_unwinders): Update.
2841         * python/py-block.c (gdbpy_block_for_pc): Remove.
2842         * python/py-inferior.c (infpy_get_progspace): New function.
2843         (inferior_object_getset) <progspace>: Add.
2844         * python/py-progspace.c (pspy_objfiles): Rewrite.
2845         (pspy_solib_name, pspy_block_for_pc)
2846         (pspy_find_pc_line, pspy_is_valid): New functions.
2847         (progspace_object_methods): Add entries for solib_name,
2848         block_for_pc, find_pc_line, is_valid.
2849         * python/python-internal.h (gdbpy_block_for_pc)
2850         (build_objfiles_list): Don't declare.
2851         * python/python.c: Don't include solib.h.
2852         (gdbpy_solib_name, gdbpy_find_pc_line)
2853         (gdbpy_get_current_progspace, build_objfiles_list)
2854         (gdbpy_objfiles): Remove.
2855         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2856         solib_name, find_pc_line>: Remove entries.
2857
2858 2018-09-16  Tom Tromey  <tom@tromey.com>
2859
2860         * top.c (new_ui_command): Use GNU style for metasyntactic
2861         variables.
2862         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2863         variables.
2864         * maint.c (maintenance_translate_address): Remove "<>" around
2865         text.
2866         * interps.c (interpreter_exec_cmd): Use GNU style for
2867         metasyntactic variables.
2868         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2869         metasyntactic variables.
2870         * tracepoint.c (tfind_range_command): Use GNU style for
2871         metasyntactic variables.
2872         (tfind_outside_command): Likewise.
2873         (_initialize_tracepoint): Likewise.
2874         * remote.c (extended_remote_target::create_inferior): Use GNU
2875         style for metasyntactic variables.
2876         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2877         metasyntactic variables.
2878         (adi_assign_command): Likewise.
2879
2880 2018-09-16  Tom Tromey  <tom@tromey.com>
2881
2882         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2883         metasyntactic variables.  Print message if no disassembler options
2884         are available.
2885
2886 2018-09-15  Tom Tromey  <tom@tromey.com>
2887
2888         * infcmd.c (get_inferior_args): Return const char *.
2889         * inferior.h (get_inferior_args): Return type now const.
2890         * linux-tdep.c (linux_fill_prpsinfo): Update.
2891         * procfs.c (procfs_target::make_corefile_notes): Update.
2892
2893 2018-09-07  Tom Tromey  <tom@tromey.com>
2894
2895         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2896         inside the TRY.
2897
2898 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2899
2900         * nios2-tdep.c (nios2_type_align): New.
2901         (nios2_gdb_arch_init): Install type_align hook.
2902
2903 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2904
2905         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2906         type that is neither object file owned, nor gdbarch owned.
2907         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2908         gdbarch is non-NULL.
2909         (alloc_type_instance): Allocate non-objfile owned types on the
2910         gdbarch obstack.
2911         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2912         using TYPE_ALLOC to ensure memory is allocated on the correct
2913         obstack.
2914         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2915         obstack, or the gdbarch obstack.
2916         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2917
2918 2018-09-14  Tom Tromey  <tom@tromey.com>
2919
2920         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2921         block.
2922
2923 2018-09-14  Tom Tromey  <tom@tromey.com>
2924
2925         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2926
2927 2018-09-13  Tom Tromey  <tom@tromey.com>
2928
2929         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2930         static.
2931
2932 2018-09-13  Tom Tromey  <tom@tromey.com>
2933
2934         * exec.c (try_open_exec_file): Use std::string.
2935
2936 2018-09-13  Tom Tromey  <tom@tromey.com>
2937
2938         * utils.h (gdb_bfd_errmsg): Return std::string.
2939         * exec.c (exec_file_attach): Update.
2940         * compile/compile-object-load.c (compile_object_load): Update.
2941         * utils.c (gdb_bfd_errmsg): Return std::string.
2942
2943 2018-09-13  Tom Tromey  <tom@tromey.com>
2944
2945         * procfs.c (struct procinfo_deleter): New.
2946         (procinfo_up): New typedef.
2947         (do_destroy_procinfo_cleanup): Remove.
2948         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2949
2950 2018-09-13  Tom Tromey  <tom@tromey.com>
2951
2952         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2953
2954 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2955 2018-09-13  Tom Tromey  <tom@tromey.com>
2956
2957         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2958         (pspy_get_objfiles): New function.
2959         (progspace_object_methods): New.
2960         (pspace_object_type): Add tp_methods callback.
2961         * python/python-internal.h (build_objfiles_list): New
2962         declaration.
2963         * python/python.c (build_objfiles_list): New function.
2964         (gdbpy_objfiles): Implement using build_objfiles_list.
2965         * NEWS: Mention the Progspace.objfiles method.
2966
2967 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2968
2969         * python/py-inferior.c (infpy_get_progspace): New function.
2970         (inferior_object_getset): Add progspace property.
2971         * NEWS: Mention the new property.
2972
2973 2018-09-13  Tom Tromey  <tom@tromey.com>
2974
2975         PR rust/23650:
2976         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2977
2978 2018-09-13  Tom Tromey  <tom@tromey.com>
2979
2980         PR rust/23626:
2981         * rust-lang.c (rust_enum_variant): Now static.
2982         (rust_empty_enum_p): New function.
2983         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2984         Handle empty enum.
2985
2986 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2987
2988         * python/py-inferior.c (infpy_repr): New.
2989         (inferior_object_type): Register infpy_repr.
2990         * python/py-objfile.c (objfpy_repr): New.
2991         (objfile_object_type): Register objfpy_repr.
2992
2993 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2994
2995         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2996
2997 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2998
2999         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3000         typo.
3001
3002 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3003
3004         * common/common-utils.c: Don't include '<sys/stat.h>'.
3005         (is_regular_file): Move to...
3006         * common/filestuff.c (is_regular_file): ... here.
3007         * common/common-utils.h (is_regular_file): Move to...
3008         * common/filestuff.h (is_regular_file): ... here.
3009
3010 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3011
3012         * skip.c (debug_skip): New variable.
3013         (skiplist_entry::do_skip_file_p): Add debug output.
3014         (skiplist_entry::do_skip_gfile_p): Likewise.
3015         (skiplist_entry::skip_function_p): Likewise.
3016         (_initialize_step_skip): Create debug command.
3017         * NEWS: Mention set/show debug skip.
3018
3019 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3020
3021         * darwin-nat.c (should_disable_startup_with_shell):
3022         New function.
3023         (darwin_nat_target::create_inferior): Add call.
3024
3025 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3026
3027         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3028         inf_port, msg_state>: Initialize.
3029         (struct darwin_thread_info) <signaled, single_step>: Change
3030         type and initialize.
3031         (struct darwin_thread_info) <event>: Initialize.
3032
3033 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3034
3035         PR gdb/23555
3036         PR gdb/23558
3037         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3038         guesses.
3039
3040 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3041
3042         Revert:
3043         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3044
3045         PR gdb/23555
3046         PR gdb/23558
3047         * gnulib/aclocal.m4: Regenerate.
3048         * gnulib/config.in: Regenerate.
3049         * gnulib/configure: Regenerate.
3050         * gnulib/import/Makefile.am: Update.
3051         * gnulib/import/Makefile.in: Update.
3052         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3053         * gnulib/import/_Noreturn.h: ... this.
3054         * gnulib/import/alloca.in.h: Update.
3055         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3056         * gnulib/import/arg-nonnull.h: ... this.
3057         * gnulib/import/assure.h: Update.
3058         * gnulib/import/at-func.c: Update.
3059         * gnulib/import/basename-lgpl.c: Update.
3060         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3061         * gnulib/import/c++defs.h: ... this.
3062         * gnulib/import/canonicalize-lgpl.c: Update.
3063         * gnulib/import/cdefs.h: Update.
3064         * gnulib/import/chdir-long.c: Update.
3065         * gnulib/import/chdir-long.h: Update.
3066         * gnulib/import/cloexec.c: Update.
3067         * gnulib/import/cloexec.h: Update.
3068         * gnulib/import/close.c: Update.
3069         * gnulib/import/closedir.c: Update.
3070         * gnulib/import/config.charset: Update.
3071         * gnulib/import/dirent-private.h: Update.
3072         * gnulib/import/dirent.in.h: Update.
3073         * gnulib/import/dirfd.c: Update.
3074         * gnulib/import/dirname-lgpl.c: Update.
3075         * gnulib/import/dirname.h: Update.
3076         * gnulib/import/dosname.h: Update.
3077         * gnulib/import/dup-safer-flag.c: Update.
3078         * gnulib/import/dup-safer.c: Update.
3079         * gnulib/import/dup.c: Update.
3080         * gnulib/import/dup2.c: Update.
3081         * gnulib/import/errno.in.h: Update.
3082         * gnulib/import/error.c: Update.
3083         * gnulib/import/error.h: Update.
3084         * gnulib/import/exitfail.c: Update.
3085         * gnulib/import/exitfail.h: Update.
3086         * gnulib/import/extra/update-copyright: Update.
3087         * gnulib/import/fchdir.c: Update.
3088         * gnulib/import/fcntl.c: Update.
3089         * gnulib/import/fcntl.in.h: Update.
3090         * gnulib/import/fd-hook.c: Update.
3091         * gnulib/import/fd-hook.h: Update.
3092         * gnulib/import/fd-safer-flag.c: Update.
3093         * gnulib/import/fd-safer.c: Update.
3094         * gnulib/import/fdopendir.c: Update.
3095         * gnulib/import/filename.h: Update.
3096         * gnulib/import/filenamecat-lgpl.c: Update.
3097         * gnulib/import/filenamecat.h: Update.
3098         * gnulib/import/flexmember.h: Update.
3099         * gnulib/import/float+.h: Update.
3100         * gnulib/import/float.c: Update.
3101         * gnulib/import/float.in.h: Update.
3102         * gnulib/import/fnmatch.c: Update.
3103         * gnulib/import/fnmatch.in.h: Update.
3104         * gnulib/import/fnmatch_loop.c: Update.
3105         * gnulib/import/fpucw.h: Update.
3106         * gnulib/import/frexp.c: Update.
3107         * gnulib/import/frexpl.c: Update.
3108         * gnulib/import/fstat.c: Update.
3109         * gnulib/import/fstatat.c: Update.
3110         * gnulib/import/getcwd-lgpl.c: Update.
3111         * gnulib/import/getcwd.c: Update.
3112         * gnulib/import/getdtablesize.c: Update.
3113         * gnulib/import/getlogin_r.c: Update.
3114         * gnulib/import/getprogname.c: Update.
3115         * gnulib/import/getprogname.h: Update.
3116         * gnulib/import/gettext.h: Update.
3117         * gnulib/import/gettimeofday.c: Update.
3118         * gnulib/import/glob-libc.h: Update.
3119         * gnulib/import/glob.c: Update.
3120         * gnulib/import/glob.in.h: Update.
3121         * gnulib/import/glob_internal.h: Update.
3122         * gnulib/import/glob_pattern_p.c: Update.
3123         * gnulib/import/globfree.c: Update.
3124         * gnulib/import/hard-locale.c: Update.
3125         * gnulib/import/hard-locale.h: Update.
3126         * gnulib/import/intprops.h: Update.
3127         * gnulib/import/inttypes.in.h: Update.
3128         * gnulib/import/isnan.c: Update.
3129         * gnulib/import/isnand-nolibm.h: Update.
3130         * gnulib/import/isnand.c: Update.
3131         * gnulib/import/isnanl-nolibm.h: Update.
3132         * gnulib/import/isnanl.c: Update.
3133         * gnulib/import/itold.c: Update.
3134         * gnulib/import/libc-config.h: Update.
3135         * gnulib/import/limits.in.h: Update.
3136         * gnulib/import/localcharset.c: Update.
3137         * gnulib/import/localcharset.h: Update.
3138         * gnulib/import/localtime-buffer.c: Update.
3139         * gnulib/import/localtime-buffer.h: Update.
3140         * gnulib/import/lstat.c: Update.
3141         * gnulib/import/m4/00gnulib.m4: Update.
3142         * gnulib/import/m4/__inline.m4: Update.
3143         * gnulib/import/m4/absolute-header.m4: Update.
3144         * gnulib/import/m4/alloca.m4: Update.
3145         * gnulib/import/m4/builtin-expect.m4: Update.
3146         * gnulib/import/m4/canonicalize.m4: Update.
3147         * gnulib/import/m4/chdir-long.m4: Update.
3148         * gnulib/import/m4/close.m4: Update.
3149         * gnulib/import/m4/closedir.m4: Update.
3150         * gnulib/import/m4/configmake.m4: Update.
3151         * gnulib/import/m4/d-ino.m4: Update.
3152         * gnulib/import/m4/d-type.m4: Update.
3153         * gnulib/import/m4/dirent_h.m4: Update.
3154         * gnulib/import/m4/dirfd.m4: Update.
3155         * gnulib/import/m4/dirname.m4: Update.
3156         * gnulib/import/m4/double-slash-root.m4: Update.
3157         * gnulib/import/m4/dup.m4: Update.
3158         * gnulib/import/m4/dup2.m4: Update.
3159         * gnulib/import/m4/eealloc.m4: Update.
3160         * gnulib/import/m4/environ.m4: Update.
3161         * gnulib/import/m4/errno_h.m4: Update.
3162         * gnulib/import/m4/error.m4: Update.
3163         * gnulib/import/m4/exponentd.m4: Update.
3164         * gnulib/import/m4/exponentl.m4: Update.
3165         * gnulib/import/m4/extensions.m4: Update.
3166         * gnulib/import/m4/extern-inline.m4: Update.
3167         * gnulib/import/m4/fchdir.m4: Update.
3168         * gnulib/import/m4/fcntl-o.m4: Update.
3169         * gnulib/import/m4/fcntl.m4: Update.
3170         * gnulib/import/m4/fcntl_h.m4: Update.
3171         * gnulib/import/m4/fdopendir.m4: Update.
3172         * gnulib/import/m4/filenamecat.m4: Update.
3173         * gnulib/import/m4/flexmember.m4: Update.
3174         * gnulib/import/m4/float_h.m4: Update.
3175         * gnulib/import/m4/fnmatch.m4: Update.
3176         * gnulib/import/m4/fnmatch_h.m4: Update.
3177         * gnulib/import/m4/fpieee.m4: Update.
3178         * gnulib/import/m4/frexp.m4: Update.
3179         * gnulib/import/m4/frexpl.m4: Update.
3180         * gnulib/import/m4/fstat.m4: Update.
3181         * gnulib/import/m4/fstatat.m4: Update.
3182         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3183         * gnulib/import/m4/getcwd-path-max.m4: Update.
3184         * gnulib/import/m4/getcwd.m4: Update.
3185         * gnulib/import/m4/getdtablesize.m4: Update.
3186         * gnulib/import/m4/getlogin.m4: Update.
3187         * gnulib/import/m4/getlogin_r.m4: Update.
3188         * gnulib/import/m4/getpagesize.m4: Update.
3189         * gnulib/import/m4/getprogname.m4: Update.
3190         * gnulib/import/m4/gettimeofday.m4: Update.
3191         * gnulib/import/m4/glibc21.m4: Update.
3192         * gnulib/import/m4/glob.m4: Update.
3193         * gnulib/import/m4/glob_h.m4: Update.
3194         * gnulib/import/m4/gnulib-cache.m4: Update.
3195         * gnulib/import/m4/gnulib-common.m4: Update.
3196         * gnulib/import/m4/gnulib-comp.m4: Update.
3197         * gnulib/import/m4/gnulib-tool.m4: Update.
3198         * gnulib/import/m4/hard-locale.m4: Update.
3199         * gnulib/import/m4/include_next.m4: Update.
3200         * gnulib/import/m4/inttypes-pri.m4: Update.
3201         * gnulib/import/m4/inttypes.m4: Update.
3202         * gnulib/import/m4/isnand.m4: Update.
3203         * gnulib/import/m4/isnanl.m4: Update.
3204         * gnulib/import/m4/largefile.m4: Update.
3205         * gnulib/import/m4/limits-h.m4: Update.
3206         * gnulib/import/m4/localcharset.m4: Update.
3207         * gnulib/import/m4/locale-fr.m4: Update.
3208         * gnulib/import/m4/locale-ja.m4: Update.
3209         * gnulib/import/m4/locale-zh.m4: Update.
3210         * gnulib/import/m4/localtime-buffer.m4: Update.
3211         * gnulib/import/m4/longlong.m4: Update.
3212         * gnulib/import/m4/lstat.m4: Update.
3213         * gnulib/import/m4/malloc.m4: Update.
3214         * gnulib/import/m4/malloca.m4: Update.
3215         * gnulib/import/m4/math_h.m4: Update.
3216         * gnulib/import/m4/mbrtowc.m4: Update.
3217         * gnulib/import/m4/mbsinit.m4: Update.
3218         * gnulib/import/m4/mbsrtowcs.m4: Update.
3219         * gnulib/import/m4/mbstate_t.m4: Update.
3220         * gnulib/import/m4/memchr.m4: Update.
3221         * gnulib/import/m4/memmem.m4: Update.
3222         * gnulib/import/m4/mempcpy.m4: Update.
3223         * gnulib/import/m4/memrchr.m4: Update.
3224         * gnulib/import/m4/mkdir.m4: Update.
3225         * gnulib/import/m4/mkstemp.m4: Update.
3226         * gnulib/import/m4/mmap-anon.m4: Update.
3227         * gnulib/import/m4/mode_t.m4: Update.
3228         * gnulib/import/m4/msvc-inval.m4: Update.
3229         * gnulib/import/m4/msvc-nothrow.m4: Update.
3230         * gnulib/import/m4/multiarch.m4: Update.
3231         * gnulib/import/m4/nocrash.m4: Update.
3232         * gnulib/import/m4/off_t.m4: Update.
3233         * gnulib/import/m4/onceonly.m4: Update.
3234         * gnulib/import/m4/open-cloexec.m4: Update.
3235         * gnulib/import/m4/open.m4: Update.
3236         * gnulib/import/m4/openat.m4: Update.
3237         * gnulib/import/m4/opendir.m4: Update.
3238         * gnulib/import/m4/pathmax.m4: Update.
3239         * gnulib/import/m4/rawmemchr.m4: Update.
3240         * gnulib/import/m4/readdir.m4: Update.
3241         * gnulib/import/m4/readlink.m4: Update.
3242         * gnulib/import/m4/realloc.m4: Update.
3243         * gnulib/import/m4/rename.m4: Update.
3244         * gnulib/import/m4/rewinddir.m4: Update.
3245         * gnulib/import/m4/rmdir.m4: Update.
3246         * gnulib/import/m4/save-cwd.m4: Update.
3247         * gnulib/import/m4/secure_getenv.m4: Update.
3248         * gnulib/import/m4/setenv.m4: Update.
3249         * gnulib/import/m4/signal_h.m4: Update.
3250         * gnulib/import/m4/ssize_t.m4: Update.
3251         * gnulib/import/m4/stat-time.m4: Update.
3252         * gnulib/import/m4/stat.m4: Update.
3253         * gnulib/import/m4/std-gnu11.m4: Update.
3254         * gnulib/import/m4/stdbool.m4: Update.
3255         * gnulib/import/m4/stddef_h.m4: Update.
3256         * gnulib/import/m4/stdint.m4: Update.
3257         * gnulib/import/m4/stdio_h.m4: Update.
3258         * gnulib/import/m4/stdlib_h.m4: Update.
3259         * gnulib/import/m4/strchrnul.m4: Update.
3260         * gnulib/import/m4/strdup.m4: Update.
3261         * gnulib/import/m4/strerror.m4: Update.
3262         * gnulib/import/m4/string_h.m4: Update.
3263         * gnulib/import/m4/strstr.m4: Update.
3264         * gnulib/import/m4/strtok_r.m4: Update.
3265         * gnulib/import/m4/sys_socket_h.m4: Update.
3266         * gnulib/import/m4/sys_stat_h.m4: Update.
3267         * gnulib/import/m4/sys_time_h.m4: Update.
3268         * gnulib/import/m4/sys_types_h.m4: Update.
3269         * gnulib/import/m4/tempname.m4: Update.
3270         * gnulib/import/m4/time_h.m4: Update.
3271         * gnulib/import/m4/unistd-safer.m4: Update.
3272         * gnulib/import/m4/unistd_h.m4: Update.
3273         * gnulib/import/m4/warn-on-use.m4: Update.
3274         * gnulib/import/m4/wchar_h.m4: Update.
3275         * gnulib/import/m4/wchar_t.m4: Update.
3276         * gnulib/import/m4/wctype_h.m4: Update.
3277         * gnulib/import/m4/wint_t.m4: Update.
3278         * gnulib/import/malloc.c: Update.
3279         * gnulib/import/malloc/scratch_buffer.h: Update.
3280         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3281         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3282         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3283         * gnulib/import/malloca.c: Update.
3284         * gnulib/import/malloca.h: Update.
3285         * gnulib/import/malloca.valgrind: Update.
3286         * gnulib/import/math.in.h: Update.
3287         * gnulib/import/mbrtowc.c: Update.
3288         * gnulib/import/mbsinit.c: Update.
3289         * gnulib/import/mbsrtowcs-impl.h: Update.
3290         * gnulib/import/mbsrtowcs-state.c: Update.
3291         * gnulib/import/mbsrtowcs.c: Update.
3292         * gnulib/import/memchr.c: Update.
3293         * gnulib/import/memmem.c: Update.
3294         * gnulib/import/mempcpy.c: Update.
3295         * gnulib/import/memrchr.c: Update.
3296         * gnulib/import/mkdir.c: Update.
3297         * gnulib/import/mkstemp.c: Update.
3298         * gnulib/import/msvc-inval.c: Update.
3299         * gnulib/import/msvc-inval.h: Update.
3300         * gnulib/import/msvc-nothrow.c: Update.
3301         * gnulib/import/msvc-nothrow.h: Update.
3302         * gnulib/import/open.c: Update.
3303         * gnulib/import/openat-die.c: Update.
3304         * gnulib/import/openat-priv.h: Update.
3305         * gnulib/import/openat-proc.c: Update.
3306         * gnulib/import/openat.c: Update.
3307         * gnulib/import/openat.h: Update.
3308         * gnulib/import/opendir.c: Update.
3309         * gnulib/import/pathmax.h: Update.
3310         * gnulib/import/pipe-safer.c: Update.
3311         * gnulib/import/rawmemchr.c: Update.
3312         * gnulib/import/readdir.c: Update.
3313         * gnulib/import/readlink.c: Update.
3314         * gnulib/import/realloc.c: Update.
3315         * gnulib/import/ref-add.sin: Update.
3316         * gnulib/import/ref-del.sin: Update.
3317         * gnulib/import/rename.c: Update.
3318         * gnulib/import/rewinddir.c: Update.
3319         * gnulib/import/rmdir.c: Update.
3320         * gnulib/import/same-inode.h: Update.
3321         * gnulib/import/save-cwd.c: Update.
3322         * gnulib/import/save-cwd.h: Update.
3323         * gnulib/import/scratch_buffer.h: Update.
3324         * gnulib/import/secure_getenv.c: Update.
3325         * gnulib/import/setenv.c: Update.
3326         * gnulib/import/signal.in.h: Update.
3327         * gnulib/import/stat-time.c: Update.
3328         * gnulib/import/stat-time.h: Update.
3329         * gnulib/import/stat-w32.c: Update.
3330         * gnulib/import/stat-w32.h: Update.
3331         * gnulib/import/stat.c: Update.
3332         * gnulib/import/stdbool.in.h: Update.
3333         * gnulib/import/stddef.in.h: Update.
3334         * gnulib/import/stdint.in.h: Update.
3335         * gnulib/import/stdio.in.h: Update.
3336         * gnulib/import/stdlib.in.h: Update.
3337         * gnulib/import/str-two-way.h: Update.
3338         * gnulib/import/strchrnul.c: Update.
3339         * gnulib/import/strdup.c: Update.
3340         * gnulib/import/streq.h: Update.
3341         * gnulib/import/strerror-override.c: Update.
3342         * gnulib/import/strerror-override.h: Update.
3343         * gnulib/import/strerror.c: Update.
3344         * gnulib/import/string.in.h: Update.
3345         * gnulib/import/stripslash.c: Update.
3346         * gnulib/import/strnlen1.c: Update.
3347         * gnulib/import/strnlen1.h: Update.
3348         * gnulib/import/strstr.c: Update.
3349         * gnulib/import/strtok_r.c: Update.
3350         * gnulib/import/sys_stat.in.h: Update.
3351         * gnulib/import/sys_time.in.h: Update.
3352         * gnulib/import/sys_types.in.h: Update.
3353         * gnulib/import/tempname.c: Update.
3354         * gnulib/import/tempname.h: Update.
3355         * gnulib/import/time.in.h: Update.
3356         * gnulib/import/unistd--.h: Update.
3357         * gnulib/import/unistd-safer.h: Update.
3358         * gnulib/import/unistd.in.h: Update.
3359         * gnulib/import/unsetenv.c: Update.
3360         * gnulib/import/verify.h: Update.
3361         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3362         * gnulib/import/wchar.in.h: Update.
3363         * gnulib/import/wctype.in.h: Update.
3364         * gnulib/import/xalloc-oversized.h: Update.
3365         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3366         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3367
3368 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3369
3370         * record-btrace.c (get_thread_current_frame): Remove
3371         old_inferior_ptid.
3372
3373 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3374
3375         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3376         with check_tag to 1 if and only if the type is tagged and the
3377         component being searched cannot been found in the current
3378         view. Otherwise, always call ada_to_fixed_type with
3379         check_tag to 0.
3380
3381 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3382
3383         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3384         declaration.
3385         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3386         * ada-varobj.c (ada_varobj_get_number_of_children,
3387         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3388
3389 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3390
3391         * ada-valprint.c (ada_value_print): Use type instead of
3392         enclosing type.
3393
3394 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3395
3396         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3397         an array of access to unconstrained array.
3398
3399 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3400
3401         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3402         (ada_check_typedef): Use it.
3403
3404 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3405
3406         * ada-varobj.c (ada_varobj_describe_struct_child)
3407         (ada_varobj_describe_child): Handle union case like struct one.
3408
3409 2018-09-10  Tom Tromey  <tom@tromey.com>
3410
3411         PR python/18380:
3412         * python/python.c (_initialize_python): Make example in "python"
3413         help work in Python 3.
3414
3415 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
3416
3417         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3418         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
3419         $(EXEEXT) to the script, as it is not a program.
3420
3421 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3422
3423         * python/py-prettyprint.c (pretty_print_one_value): Return
3424         gdbpy_ref<>.
3425         (print_string_repr): Adjust.
3426         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3427         * python/python-internal.h (apply_varobj_pretty_printer): Return
3428         gdbpy_ref<>.
3429         * varobj.c (varobj_value_get_print_value): Adjust.
3430
3431 2018-09-08  Tom Tromey  <tom@tromey.com>
3432
3433         PR python/16047:
3434         * python/py-prettyprint.c (pretty_print_one_value): Check for
3435         to_string method.
3436
3437 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3438
3439         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3440         replace_operator_with_call.
3441
3442 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3443
3444         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
3445
3446 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3447
3448         * ada-typeprint.c (print_range): Print the bounds using TYPE
3449         rather than its TYPE_TARGET_TYPE.
3450
3451 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3452
3453         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
3454         call to ada_to_fixed_value_create.
3455
3456 2018-09-08  Jerome Guitton  <guitton@adacore.com>
3457
3458         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
3459
3460 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3461
3462         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
3463         by calls to error.
3464
3465 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3466
3467         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
3468         Move update of loop variable "fi".
3469
3470 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3471
3472         * ada-lang.c (value_assign_to_component): In the case of
3473         big-endian targets, extract the bits of the given VAL
3474         using an src_offset of zero if container is not a scalar.
3475
3476 2018-09-06  Simon Ser  <contact@emersion.fr>
3477
3478         PR gdb/23105
3479         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
3480         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3481         * fbsd-tdep.c (fbsd_make_note_desc): New.
3482         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
3483         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
3484         * target.h (enum target_object) Add FreeBSD-specific
3485         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3486
3487 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3488
3489         * compile/compile-c.h (generate_c_for_variable_locations):
3490         Change reference to pointer.
3491         * compile/compile-c-support.c (compile_program) <compute>:
3492         Likewise.
3493         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
3494         (generate_c_for_for_one_variable): Likewise
3495         (generate_c_for_variable_locations): Likewise
3496         * compile/compile-c-types.c (compile_c_instance::convert_type):
3497         Likewise
3498         * compile/compile-cplus-symbols.c (convert_one_symbol):
3499         std::move the scope passed to enter_scope.
3500         * compile/compile-cplus-types.c
3501         (compile_cplus_instance::enter_scope): Make parameter
3502         rvalue-reference.
3503         (compile_cplus_instance::new_scope): Change reference to
3504         pointer.
3505         (compile_cplus_instance::convert_type): Likewise
3506         (compile_cplus_convert_typedef): std::move the scope passed to
3507         enter_scope.
3508         (compile_cplus_convert_struct_or_union): Likewise.
3509         (compile_cplus_convert_enum): Likewise.
3510         (compile_cplus_convert_namespace): Likewise.
3511         * compile/compile-cplus.h (compile_cplus_instance)
3512         <enter_scope>: Make parameter rvalue-reference.
3513         * compile/compile-internal.h (compile_instance)
3514         <get_cached_type>: Likewise
3515         * compile/compile-loc2c.c (push): Likewise
3516         (pushf): Likewise
3517         (unary): Likewise
3518         (binary): Likewise
3519         (print_label): Likewise
3520         (pushf_register_address): Likewise
3521         (pushf_register): Likewise
3522         (do_compile_dwarf_expr_to_c): Likewise
3523         (compile_dwarf_expr_to_c): Likewise
3524         (compile_dwarf_bounds_to_c): Likewise
3525         * compile/compile.c (compile_instance::get_cached_type):
3526         Likewise
3527         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
3528         (compile_dwarf_bounds_to_c): Likewise
3529         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
3530         (dwarf2_compile_property_to_c): Likewise
3531         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
3532         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
3533         Likewise
3534
3535 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3536
3537         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
3538         * tui/tui-data.c (init_content_element): Don't initialize it.
3539
3540 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3541
3542         * tui/tui-data.h (struct tui_win_info)
3543         <detail::opaque>: Remove.
3544         * tui/tui-data.c (init_win_info): Remove assignment.
3545
3546 2018-09-05  Tom Tromey  <tom@tromey.com>
3547
3548         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
3549         -Wformat-nonliteral.
3550         * target-float.c (host_float_ops<T>::to_string)
3551         (host_float_ops<T>::from_string): Use
3552         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3553         * configure: Rebuild.
3554
3555 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3556
3557         * printcmd.c (printf_c_string): Use
3558         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3559         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
3560
3561 2018-09-05  Tom Tromey  <tom@tromey.com>
3562
3563         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
3564
3565 2018-09-05  Tom de Vries  <tdevries@suse.de>
3566
3567         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
3568         with resolve_abstract_p == true.
3569         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
3570         defaulting to false. Propagate resolve_abstract_p to
3571         dwarf2_fetch_die_loc_sect_off.
3572         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
3573         parameter, defaulting to false.
3574         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
3575         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
3576         parameter.
3577         * dwarf2read.h (struct die_info): Forward-declare.
3578         (die_info_ptr): New typedef.
3579         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
3580
3581 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
3582
3583         GDB 8.2 released.
3584
3585 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3586             Pedro Alves  <palves@redhat.com>
3587
3588         * gnulib/Makefile.in (aclocal_m4_deps): Move to
3589         "aclocal-m4-deps.mk".  Include file here.
3590         $(srcdir)/aclocal.m4: Add "configure.ac".
3591         * gnulib/aclocal-m4-deps.mk: New file.
3592         * gnulib/update-gnulib.sh: Automatically update
3593         "aclocal-m4-deps.mk".
3594
3595 2018-09-04  Tom Tromey  <tom@tromey.com>
3596
3597         * configure: Rebuild.
3598         * configure.ac: Remove multi-ice code.
3599
3600 2018-09-04  Tom Tromey  <tom@tromey.com>
3601
3602         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
3603         (ada-exp.o): Update.
3604
3605 2018-09-04  Tom Tromey  <tom@tromey.com>
3606
3607         * Makefile.in (printcmd.o, target-float.o): Remove.
3608         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
3609
3610 2018-09-04  Tom Tromey  <tom@tromey.com>
3611
3612         * gnulib/Makefile.in: Remove obsolete comment.
3613         * Makefile.in: Remove obsolete comment.
3614
3615 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
3616
3617         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
3618         line with '+'.
3619
3620 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3621
3622         * riscv-tdep.c: Add 'prologue-value.h' include.
3623         (struct riscv_unwind_cache): New struct.
3624         (riscv_debug_unwinder): New global.
3625         (riscv_scan_prologue): Update arguments, capture register details
3626         from prologue scan.
3627         (riscv_skip_prologue): Reformat arguments line, move end of
3628         prologue calculation into riscv_scan_prologue.
3629         (riscv_frame_cache): Update return type, create
3630         riscv_unwind_cache, scan the prologue, and fill in remaining cache
3631         details.
3632         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
3633         (riscv_frame_prev_register): Use the trad_frame within the
3634         riscv_unwind_cache.
3635         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
3636         flag.
3637
3638 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3639
3640         * trad-frame.h (trad_frame_set_realreg): Declare.
3641         (trad_frame_set_addr): Declare.
3642         * trad-frame.c (trad_frame_set_realreg): Define new function.
3643         (trad_frame_set_addr): Define new function.
3644         (trad_frame_set_reg_realreg): Use new function.
3645         (trad_frame_set_reg_addr): Use new function.
3646
3647 2018-09-01  Keith Seitz  <keiths@redhat.com>
3648
3649         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
3650         pulongest instead of "%lld".
3651         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
3652         ATTRIBUTE_UNUSED.
3653
3654 2018-08-31  Tom Tromey  <tom@tromey.com>
3655
3656         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
3657         variant part type.
3658
3659 2018-08-31  Pedro Alves  <palves@redhat.com>
3660
3661         * gdbarch.h: Regenerate.
3662
3663 2018-08-31  Pedro Alves  <palves@redhat.com>
3664
3665         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
3666         * target.h (Hardware watchpoint interfaces): Describe
3667         continuable/steppable/non-steppable watchpoints.
3668         * gdbarch.h, gdbarch.c: Regenerate.
3669
3670 2018-08-31  Pedro Alves  <palves@redhat.com>
3671
3672         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
3673         Delete.
3674         * s390-linux-nat.c
3675         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
3676         * target.h (target_ops::have_continuable_watchpoint): Delete.
3677         (target_have_continuable_watchpoint): Delete.
3678         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
3679         * target-delegates.c: Regenerate.
3680
3681 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3682
3683         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
3684         the files present in "gnulib/import/m4/".
3685
3686 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3687
3688         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
3689         c.sw, c.swsp, and c.sdsp.
3690
3691 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3692
3693         * riscv-tdep.c (struct riscv_inferior_data): Delete.
3694         (riscv_read_misa_reg): Don't cache value read into inferior data.
3695         (riscv_new_inferior_data): Delete.
3696         (riscv_inferior_data_cleanup): Delete.
3697         (riscv_inferior_data): Delete.
3698         (riscv_invalidate_inferior_data): Delete.
3699         (_initialize_riscv_tdep): Remove initialisation of inferior data.
3700
3701 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
3702
3703         * compile/compile-cplus-types.c
3704         (compile_cplus_instance::leave_scope): Take the address of scope
3705         object.
3706         (compile_cplus_instance::convert_qualified_base): Compare quals
3707         to 0.
3708
3709 2018-08-30  Keith Seitz  <keiths@redhat.com>
3710
3711         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
3712         Use "%s" and host_address_to_string instead of "%p" in printf.
3713
3714 2018-08-29  Keith Seitz  <keiths@redhat.com>
3715
3716         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3717         and compile-cplus-types.c.
3718         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3719         * c-lang.c (cplus_language_defn): Set C++ compile functions.
3720         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3721         Declare.
3722         * compile/compile-c-support.c: Include compile-cplus.h.
3723         (load_libcompile): Templatize.
3724         (get_compile_context): "New" function.
3725         (c_get_compile_context): Use get_compile_context.
3726         (cplus_get_compile_context): New function.
3727         (cplus_push_user_expression, cplus_pop_user_expression)
3728         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3729         (cplus_compute_program): Define new structs/functions.
3730         * compile/compile-cplus-symmbols.c: New file.
3731         * compile/compile-cplus-types.c: New file.
3732         * compile/compile-cplus.h: New file.
3733         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3734         Declare.
3735         * compile/compile-object-load.c (get_out_value_type): Use
3736         strncmp_iw when comparing symbol names.
3737         (compile_object_load): Add mst_bss and mst_data.
3738         * compile/compile.c (_initialize_compile): Remove
3739         -Wno-implicit-function-declaration from `compile_args'.
3740         * compile/gcc-cp-plugin.h: New file.
3741         * NEWS: Mention C++ compile support and new debug options.
3742
3743 2018-08-29  Keith Seitz  <keiths@redhat.com>
3744
3745         * linespec.c (collect_info::add_symbol): Make virtual.
3746         (struct symbol_searcher_collect_info): New struct.
3747         (symbol_searcher::find_all_symbols): New method.
3748         * symtab.h (class symbol_searcher): New class.
3749
3750 2018-08-29  Keith Seitz  <keiths@redhat.com>
3751
3752         * linespec.c (struct linespec) <function_symbols, label_symbols>:
3753         Change to vector of block_symbol.  Update all users.
3754         (struct collect_info) <symbols>: Likewise.
3755         (collect_info::add_symbol): Take block_symbol as argument.
3756         Update all callers.
3757         (decode_compound_collector) <m_symbols>: Change type to vector
3758         of block_symbol.  Update all users.
3759         (decode_compound_collector::operator ()): Change parameter type
3760         to block_symbol.
3761         (find_method, find_function_symbols, find_linespec_symbols)
3762         (find_label_symbols_in_block, find_label_symbols): Change symbol
3763         vectors to block_symbol vectors.
3764         * symtab.h (symbol_found_callback_ftype): Change parameter type to
3765         block_symbol.
3766
3767 2018-08-29  Keith Seitz  <keiths@redhat.com>
3768
3769         * linespec.c (symbolp): Remove typedef and VEC definitions.
3770         (bound_minimal_symbol_d): Likewise.
3771
3772 2018-08-29  Keith Seitz  <keiths@redhat.com>
3773
3774         * linespec.c (decode_compound_collector::decode_compound_collector):
3775         Remove initialization for `m_symtabs'.
3776         (decode_compound_collector::release_symbols): Change return type
3777         to std::vector.  Update all callers.
3778         (class decode_compound_collector) <m_symbols>: Change type to
3779         std::vector.
3780         (lookup_prefix_sym): Change return type to std::vector.  Update all
3781         callers.
3782         (compare_symbols): Remove.
3783         (std_compare_symbols): Rename to `compare_symbols'.
3784         (find_method): Change `sym_classes' parameter to std::vector.
3785         Update all callers.  Use std::sort to sort sym_classes.
3786         (find_linespec_symbols): Remove cleanup.
3787
3788 2018-08-29  Keith Seitz  <keiths@redhat.com>
3789
3790         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3791         std::vector.  Update all users.
3792         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3793         (struct collect_info) <minimal_symbols>: Likewise.
3794         (compare_msymbols): Return bool.  Change parameters to const
3795         bound_minimal_symbol references.
3796         (find_method, find_function_symbols, find_linespec_symbols): Change
3797         `minsyms' parameter to std::vector.  Update all callers.
3798
3799 2018-08-29  Keith Seitz  <keiths@redhat.com>
3800
3801         * linespec.c (struct linespec) <label_symbols>: Change type to
3802         std::vector.  Update all users.
3803         (find_label_symbols_in_block): Change `result' parameter to
3804         std::vector.  Update all callers.
3805         (find_label_symbols): Return std::vector.  Update all callers.
3806
3807 2018-08-29  Keith Seitz  <keiths@redhat.com>
3808
3809         * linespec.c (struct linespec) <function_symbols>: Change type to
3810         std::vector.  Update all users.
3811         (struct collect_info) <function_symbols>: Likewise.
3812         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3813         (std_compare_symbols): New function.
3814         (find_method, find_function_symbols, find_linespec_symbols)
3815         (find_label_symbols_in_block): Change `symbols' parameter to
3816         std::vector.  Update all callers.
3817         (find_label_symbols): Likewise for `function_symbols' and
3818         `label_funcs_ret'.
3819
3820 2018-08-29  Keith Seitz  <keiths@redhat.com>
3821
3822         * linespec.c (symtab_vector_up): Define.
3823         (struct linespec) <file_symtabs>: Change type to std::vector *.
3824         Update all uses.
3825         (struct collect_info) <file_symtabs>: Likewise.
3826         (collect_symtabs_from_filename): Return symtab_vector_up.
3827         Update all callers.
3828         (decode_objc): Remove cleanup.
3829         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3830         (symtab_collector::release_symtabs): Return symtab_vector_up.
3831         Update all callers.
3832         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3833         Update all users.
3834         (collect_symtabs_from_filename, symtabs_from_filename): Return
3835         symtab_vector_up.  Update all callers.
3836
3837 2018-08-29  Tom Tromey  <tom@tromey.com>
3838
3839         * csky-tdep.c (csky_analyze_prologue): Use
3840         core_addr_to_string_nz.
3841
3842 2018-08-29  Tom Tromey  <tom@tromey.com>
3843
3844         * windows-nat.c (struct xlate_exception) <them>: Change type to
3845         DWORD.
3846         (xlate): Fix formatting.  Remove last entry.
3847         (struct xlate_exception, xlate): Comment out.
3848         (windows_nat_target::resume): Use ranged for.
3849
3850 2018-08-29  Jim Wilson  <jimw@sifive.com>
3851
3852         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3853         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3854         of NT_PRFPREG.
3855         (riscv_linux_nat_target::store_registers): Likewise.
3856
3857 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3858
3859         PR gdb/23555
3860         PR gdb/23558
3861         * gnulib/aclocal.m4: Regenerate.
3862         * gnulib/config.in: Regenerate.
3863         * gnulib/configure: Regenerate.
3864         * gnulib/import/Makefile.am: Update.
3865         * gnulib/import/Makefile.in: Update.
3866         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3867         * gnulib/import/_Noreturn.h: ... this.
3868         * gnulib/import/alloca.in.h: Update.
3869         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3870         * gnulib/import/arg-nonnull.h: ... this.
3871         * gnulib/import/assure.h: Update.
3872         * gnulib/import/at-func.c: Update.
3873         * gnulib/import/basename-lgpl.c: Update.
3874         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3875         * gnulib/import/c++defs.h: ... this.
3876         * gnulib/import/canonicalize-lgpl.c: Update.
3877         * gnulib/import/cdefs.h: Update.
3878         * gnulib/import/chdir-long.c: Update.
3879         * gnulib/import/chdir-long.h: Update.
3880         * gnulib/import/cloexec.c: Update.
3881         * gnulib/import/cloexec.h: Update.
3882         * gnulib/import/close.c: Update.
3883         * gnulib/import/closedir.c: Update.
3884         * gnulib/import/config.charset: Update.
3885         * gnulib/import/dirent-private.h: Update.
3886         * gnulib/import/dirent.in.h: Update.
3887         * gnulib/import/dirfd.c: Update.
3888         * gnulib/import/dirname-lgpl.c: Update.
3889         * gnulib/import/dirname.h: Update.
3890         * gnulib/import/dosname.h: Update.
3891         * gnulib/import/dup-safer-flag.c: Update.
3892         * gnulib/import/dup-safer.c: Update.
3893         * gnulib/import/dup.c: Update.
3894         * gnulib/import/dup2.c: Update.
3895         * gnulib/import/errno.in.h: Update.
3896         * gnulib/import/error.c: Update.
3897         * gnulib/import/error.h: Update.
3898         * gnulib/import/exitfail.c: Update.
3899         * gnulib/import/exitfail.h: Update.
3900         * gnulib/import/extra/update-copyright: Update.
3901         * gnulib/import/fchdir.c: Update.
3902         * gnulib/import/fcntl.c: Update.
3903         * gnulib/import/fcntl.in.h: Update.
3904         * gnulib/import/fd-hook.c: Update.
3905         * gnulib/import/fd-hook.h: Update.
3906         * gnulib/import/fd-safer-flag.c: Update.
3907         * gnulib/import/fd-safer.c: Update.
3908         * gnulib/import/fdopendir.c: Update.
3909         * gnulib/import/filename.h: Update.
3910         * gnulib/import/filenamecat-lgpl.c: Update.
3911         * gnulib/import/filenamecat.h: Update.
3912         * gnulib/import/flexmember.h: Update.
3913         * gnulib/import/float+.h: Update.
3914         * gnulib/import/float.c: Update.
3915         * gnulib/import/float.in.h: Update.
3916         * gnulib/import/fnmatch.c: Update.
3917         * gnulib/import/fnmatch.in.h: Update.
3918         * gnulib/import/fnmatch_loop.c: Update.
3919         * gnulib/import/fpucw.h: Update.
3920         * gnulib/import/frexp.c: Update.
3921         * gnulib/import/frexpl.c: Update.
3922         * gnulib/import/fstat.c: Update.
3923         * gnulib/import/fstatat.c: Update.
3924         * gnulib/import/getcwd-lgpl.c: Update.
3925         * gnulib/import/getcwd.c: Update.
3926         * gnulib/import/getdtablesize.c: Update.
3927         * gnulib/import/getlogin_r.c: Update.
3928         * gnulib/import/getprogname.c: Update.
3929         * gnulib/import/getprogname.h: Update.
3930         * gnulib/import/gettext.h: Update.
3931         * gnulib/import/gettimeofday.c: Update.
3932         * gnulib/import/glob-libc.h: Update.
3933         * gnulib/import/glob.c: Update.
3934         * gnulib/import/glob.in.h: Update.
3935         * gnulib/import/glob_internal.h: Update.
3936         * gnulib/import/glob_pattern_p.c: Update.
3937         * gnulib/import/globfree.c: Update.
3938         * gnulib/import/hard-locale.c: Update.
3939         * gnulib/import/hard-locale.h: Update.
3940         * gnulib/import/intprops.h: Update.
3941         * gnulib/import/inttypes.in.h: Update.
3942         * gnulib/import/isnan.c: Update.
3943         * gnulib/import/isnand-nolibm.h: Update.
3944         * gnulib/import/isnand.c: Update.
3945         * gnulib/import/isnanl-nolibm.h: Update.
3946         * gnulib/import/isnanl.c: Update.
3947         * gnulib/import/itold.c: Update.
3948         * gnulib/import/libc-config.h: Update.
3949         * gnulib/import/limits.in.h: Update.
3950         * gnulib/import/localcharset.c: Update.
3951         * gnulib/import/localcharset.h: Update.
3952         * gnulib/import/localtime-buffer.c: Update.
3953         * gnulib/import/localtime-buffer.h: Update.
3954         * gnulib/import/lstat.c: Update.
3955         * gnulib/import/m4/00gnulib.m4: Update.
3956         * gnulib/import/m4/__inline.m4: Update.
3957         * gnulib/import/m4/absolute-header.m4: Update.
3958         * gnulib/import/m4/alloca.m4: Update.
3959         * gnulib/import/m4/builtin-expect.m4: Update.
3960         * gnulib/import/m4/canonicalize.m4: Update.
3961         * gnulib/import/m4/chdir-long.m4: Update.
3962         * gnulib/import/m4/close.m4: Update.
3963         * gnulib/import/m4/closedir.m4: Update.
3964         * gnulib/import/m4/configmake.m4: Update.
3965         * gnulib/import/m4/d-ino.m4: Update.
3966         * gnulib/import/m4/d-type.m4: Update.
3967         * gnulib/import/m4/dirent_h.m4: Update.
3968         * gnulib/import/m4/dirfd.m4: Update.
3969         * gnulib/import/m4/dirname.m4: Update.
3970         * gnulib/import/m4/double-slash-root.m4: Update.
3971         * gnulib/import/m4/dup.m4: Update.
3972         * gnulib/import/m4/dup2.m4: Update.
3973         * gnulib/import/m4/eealloc.m4: Update.
3974         * gnulib/import/m4/environ.m4: Update.
3975         * gnulib/import/m4/errno_h.m4: Update.
3976         * gnulib/import/m4/error.m4: Update.
3977         * gnulib/import/m4/exponentd.m4: Update.
3978         * gnulib/import/m4/exponentl.m4: Update.
3979         * gnulib/import/m4/extensions.m4: Update.
3980         * gnulib/import/m4/extern-inline.m4: Update.
3981         * gnulib/import/m4/fchdir.m4: Update.
3982         * gnulib/import/m4/fcntl-o.m4: Update.
3983         * gnulib/import/m4/fcntl.m4: Update.
3984         * gnulib/import/m4/fcntl_h.m4: Update.
3985         * gnulib/import/m4/fdopendir.m4: Update.
3986         * gnulib/import/m4/filenamecat.m4: Update.
3987         * gnulib/import/m4/flexmember.m4: Update.
3988         * gnulib/import/m4/float_h.m4: Update.
3989         * gnulib/import/m4/fnmatch.m4: Update.
3990         * gnulib/import/m4/fnmatch_h.m4: Update.
3991         * gnulib/import/m4/fpieee.m4: Update.
3992         * gnulib/import/m4/frexp.m4: Update.
3993         * gnulib/import/m4/frexpl.m4: Update.
3994         * gnulib/import/m4/fstat.m4: Update.
3995         * gnulib/import/m4/fstatat.m4: Update.
3996         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3997         * gnulib/import/m4/getcwd-path-max.m4: Update.
3998         * gnulib/import/m4/getcwd.m4: Update.
3999         * gnulib/import/m4/getdtablesize.m4: Update.
4000         * gnulib/import/m4/getlogin.m4: Update.
4001         * gnulib/import/m4/getlogin_r.m4: Update.
4002         * gnulib/import/m4/getpagesize.m4: Update.
4003         * gnulib/import/m4/getprogname.m4: Update.
4004         * gnulib/import/m4/gettimeofday.m4: Update.
4005         * gnulib/import/m4/glibc21.m4: Update.
4006         * gnulib/import/m4/glob.m4: Update.
4007         * gnulib/import/m4/glob_h.m4: Update.
4008         * gnulib/import/m4/gnulib-cache.m4: Update.
4009         * gnulib/import/m4/gnulib-common.m4: Update.
4010         * gnulib/import/m4/gnulib-comp.m4: Update.
4011         * gnulib/import/m4/gnulib-tool.m4: Update.
4012         * gnulib/import/m4/hard-locale.m4: Update.
4013         * gnulib/import/m4/include_next.m4: Update.
4014         * gnulib/import/m4/inttypes-pri.m4: Update.
4015         * gnulib/import/m4/inttypes.m4: Update.
4016         * gnulib/import/m4/isnand.m4: Update.
4017         * gnulib/import/m4/isnanl.m4: Update.
4018         * gnulib/import/m4/largefile.m4: Update.
4019         * gnulib/import/m4/limits-h.m4: Update.
4020         * gnulib/import/m4/localcharset.m4: Update.
4021         * gnulib/import/m4/locale-fr.m4: Update.
4022         * gnulib/import/m4/locale-ja.m4: Update.
4023         * gnulib/import/m4/locale-zh.m4: Update.
4024         * gnulib/import/m4/localtime-buffer.m4: Update.
4025         * gnulib/import/m4/longlong.m4: Update.
4026         * gnulib/import/m4/lstat.m4: Update.
4027         * gnulib/import/m4/malloc.m4: Update.
4028         * gnulib/import/m4/malloca.m4: Update.
4029         * gnulib/import/m4/math_h.m4: Update.
4030         * gnulib/import/m4/mbrtowc.m4: Update.
4031         * gnulib/import/m4/mbsinit.m4: Update.
4032         * gnulib/import/m4/mbsrtowcs.m4: Update.
4033         * gnulib/import/m4/mbstate_t.m4: Update.
4034         * gnulib/import/m4/memchr.m4: Update.
4035         * gnulib/import/m4/memmem.m4: Update.
4036         * gnulib/import/m4/mempcpy.m4: Update.
4037         * gnulib/import/m4/memrchr.m4: Update.
4038         * gnulib/import/m4/mkdir.m4: Update.
4039         * gnulib/import/m4/mkstemp.m4: Update.
4040         * gnulib/import/m4/mmap-anon.m4: Update.
4041         * gnulib/import/m4/mode_t.m4: Update.
4042         * gnulib/import/m4/msvc-inval.m4: Update.
4043         * gnulib/import/m4/msvc-nothrow.m4: Update.
4044         * gnulib/import/m4/multiarch.m4: Update.
4045         * gnulib/import/m4/nocrash.m4: Update.
4046         * gnulib/import/m4/off_t.m4: Update.
4047         * gnulib/import/m4/onceonly.m4: Update.
4048         * gnulib/import/m4/open-cloexec.m4: Update.
4049         * gnulib/import/m4/open.m4: Update.
4050         * gnulib/import/m4/openat.m4: Update.
4051         * gnulib/import/m4/opendir.m4: Update.
4052         * gnulib/import/m4/pathmax.m4: Update.
4053         * gnulib/import/m4/rawmemchr.m4: Update.
4054         * gnulib/import/m4/readdir.m4: Update.
4055         * gnulib/import/m4/readlink.m4: Update.
4056         * gnulib/import/m4/realloc.m4: Update.
4057         * gnulib/import/m4/rename.m4: Update.
4058         * gnulib/import/m4/rewinddir.m4: Update.
4059         * gnulib/import/m4/rmdir.m4: Update.
4060         * gnulib/import/m4/save-cwd.m4: Update.
4061         * gnulib/import/m4/secure_getenv.m4: Update.
4062         * gnulib/import/m4/setenv.m4: Update.
4063         * gnulib/import/m4/signal_h.m4: Update.
4064         * gnulib/import/m4/ssize_t.m4: Update.
4065         * gnulib/import/m4/stat-time.m4: Update.
4066         * gnulib/import/m4/stat.m4: Update.
4067         * gnulib/import/m4/std-gnu11.m4: Update.
4068         * gnulib/import/m4/stdbool.m4: Update.
4069         * gnulib/import/m4/stddef_h.m4: Update.
4070         * gnulib/import/m4/stdint.m4: Update.
4071         * gnulib/import/m4/stdio_h.m4: Update.
4072         * gnulib/import/m4/stdlib_h.m4: Update.
4073         * gnulib/import/m4/strchrnul.m4: Update.
4074         * gnulib/import/m4/strdup.m4: Update.
4075         * gnulib/import/m4/strerror.m4: Update.
4076         * gnulib/import/m4/string_h.m4: Update.
4077         * gnulib/import/m4/strstr.m4: Update.
4078         * gnulib/import/m4/strtok_r.m4: Update.
4079         * gnulib/import/m4/sys_socket_h.m4: Update.
4080         * gnulib/import/m4/sys_stat_h.m4: Update.
4081         * gnulib/import/m4/sys_time_h.m4: Update.
4082         * gnulib/import/m4/sys_types_h.m4: Update.
4083         * gnulib/import/m4/tempname.m4: Update.
4084         * gnulib/import/m4/time_h.m4: Update.
4085         * gnulib/import/m4/unistd-safer.m4: Update.
4086         * gnulib/import/m4/unistd_h.m4: Update.
4087         * gnulib/import/m4/warn-on-use.m4: Update.
4088         * gnulib/import/m4/wchar_h.m4: Update.
4089         * gnulib/import/m4/wchar_t.m4: Update.
4090         * gnulib/import/m4/wctype_h.m4: Update.
4091         * gnulib/import/m4/wint_t.m4: Update.
4092         * gnulib/import/malloc.c: Update.
4093         * gnulib/import/malloc/scratch_buffer.h: Update.
4094         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4095         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4096         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4097         * gnulib/import/malloca.c: Update.
4098         * gnulib/import/malloca.h: Update.
4099         * gnulib/import/malloca.valgrind: Update.
4100         * gnulib/import/math.in.h: Update.
4101         * gnulib/import/mbrtowc.c: Update.
4102         * gnulib/import/mbsinit.c: Update.
4103         * gnulib/import/mbsrtowcs-impl.h: Update.
4104         * gnulib/import/mbsrtowcs-state.c: Update.
4105         * gnulib/import/mbsrtowcs.c: Update.
4106         * gnulib/import/memchr.c: Update.
4107         * gnulib/import/memmem.c: Update.
4108         * gnulib/import/mempcpy.c: Update.
4109         * gnulib/import/memrchr.c: Update.
4110         * gnulib/import/mkdir.c: Update.
4111         * gnulib/import/mkstemp.c: Update.
4112         * gnulib/import/msvc-inval.c: Update.
4113         * gnulib/import/msvc-inval.h: Update.
4114         * gnulib/import/msvc-nothrow.c: Update.
4115         * gnulib/import/msvc-nothrow.h: Update.
4116         * gnulib/import/open.c: Update.
4117         * gnulib/import/openat-die.c: Update.
4118         * gnulib/import/openat-priv.h: Update.
4119         * gnulib/import/openat-proc.c: Update.
4120         * gnulib/import/openat.c: Update.
4121         * gnulib/import/openat.h: Update.
4122         * gnulib/import/opendir.c: Update.
4123         * gnulib/import/pathmax.h: Update.
4124         * gnulib/import/pipe-safer.c: Update.
4125         * gnulib/import/rawmemchr.c: Update.
4126         * gnulib/import/readdir.c: Update.
4127         * gnulib/import/readlink.c: Update.
4128         * gnulib/import/realloc.c: Update.
4129         * gnulib/import/ref-add.sin: Update.
4130         * gnulib/import/ref-del.sin: Update.
4131         * gnulib/import/rename.c: Update.
4132         * gnulib/import/rewinddir.c: Update.
4133         * gnulib/import/rmdir.c: Update.
4134         * gnulib/import/same-inode.h: Update.
4135         * gnulib/import/save-cwd.c: Update.
4136         * gnulib/import/save-cwd.h: Update.
4137         * gnulib/import/scratch_buffer.h: Update.
4138         * gnulib/import/secure_getenv.c: Update.
4139         * gnulib/import/setenv.c: Update.
4140         * gnulib/import/signal.in.h: Update.
4141         * gnulib/import/stat-time.c: Update.
4142         * gnulib/import/stat-time.h: Update.
4143         * gnulib/import/stat-w32.c: Update.
4144         * gnulib/import/stat-w32.h: Update.
4145         * gnulib/import/stat.c: Update.
4146         * gnulib/import/stdbool.in.h: Update.
4147         * gnulib/import/stddef.in.h: Update.
4148         * gnulib/import/stdint.in.h: Update.
4149         * gnulib/import/stdio.in.h: Update.
4150         * gnulib/import/stdlib.in.h: Update.
4151         * gnulib/import/str-two-way.h: Update.
4152         * gnulib/import/strchrnul.c: Update.
4153         * gnulib/import/strdup.c: Update.
4154         * gnulib/import/streq.h: Update.
4155         * gnulib/import/strerror-override.c: Update.
4156         * gnulib/import/strerror-override.h: Update.
4157         * gnulib/import/strerror.c: Update.
4158         * gnulib/import/string.in.h: Update.
4159         * gnulib/import/stripslash.c: Update.
4160         * gnulib/import/strnlen1.c: Update.
4161         * gnulib/import/strnlen1.h: Update.
4162         * gnulib/import/strstr.c: Update.
4163         * gnulib/import/strtok_r.c: Update.
4164         * gnulib/import/sys_stat.in.h: Update.
4165         * gnulib/import/sys_time.in.h: Update.
4166         * gnulib/import/sys_types.in.h: Update.
4167         * gnulib/import/tempname.c: Update.
4168         * gnulib/import/tempname.h: Update.
4169         * gnulib/import/time.in.h: Update.
4170         * gnulib/import/unistd--.h: Update.
4171         * gnulib/import/unistd-safer.h: Update.
4172         * gnulib/import/unistd.in.h: Update.
4173         * gnulib/import/unsetenv.c: Update.
4174         * gnulib/import/verify.h: Update.
4175         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4176         * gnulib/import/wchar.in.h: Update.
4177         * gnulib/import/wctype.in.h: Update.
4178         * gnulib/import/xalloc-oversized.h: Update.
4179         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4180         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4181
4182 2018-08-16  Gary Benson <gbenson@redhat.com>
4183
4184         PR gdb/13000:
4185         * gdb/main.c (captured_main_1): Exit with nonzero status
4186         in batch mode if the last command to be executed failed.
4187         * NEWS: Mention the above.
4188
4189 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4190
4191         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4192         end of warning message.
4193
4194 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4195
4196         PR gdb/22943:
4197         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4198         (aarch64_extract_return_value): Use
4199         aapcs_is_vfp_call_or_return_candidate.
4200         (aarch64_return_in_memory): Likewise.
4201         (aarch64_store_return_value): Likewise.
4202
4203 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4204
4205         * aarch64-tdep.c
4206         (aapcs_is_vfp_call_or_return_candidate): Make static
4207         (pass_in_v_or_stack): Remove function.
4208         (pass_in_v_vfp_candidate): New function.
4209         (aarch64_push_dummy_call): Check for float register candidates.
4210
4211 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4212
4213         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4214         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4215         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4216
4217 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4218
4219         PR build/23399
4220         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4221         (struct ipa_sym_addresses): Rename to...
4222         (struct ipa_sym_addresses_common): ... this.
4223         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4224
4225 2018-08-28  Tom Tromey  <tom@tromey.com>
4226
4227         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4228         (token_fifo): Now a std::vector.
4229         (yylex, c_parse): Update.
4230         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4231         (token_fifo): Now a std::vector.
4232         (yylex, d_parse): Update.
4233         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4234         (token_fifo): Now a std::vector.
4235         (yylex, go_parse): Update.
4236
4237 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4238
4239         * parser-defs.h (struct type_stack) <elements>: Change type to
4240         std::vector<union type_stack_elt>.
4241         <depth, size>: Remove.
4242         * parse.c (parse_exp_in_context_1): Adjust.
4243         (type_stack_reserve): Remove.
4244         (check_type_stack_depth): Remove.
4245         (insert_into_type_stack): Adjust to std::vector.
4246         (insert_type): Likewise.
4247         (push_type): Likewise.
4248         (push_type_int): Likewise.
4249         (insert_type_address_space): Likewise.
4250         (pop_type): Likewise.
4251         (pop_type_int): Likewise.
4252         (pop_typelist): Likewise.
4253         (pop_type_stack): Likewise.
4254         (append_type_stack): Likewise.
4255         (push_type_stack): Likewise.
4256         (get_type_stack): Likewise.
4257         (type_stack_cleanup): Likewise.
4258         (push_typelist): Likewise.
4259         (follow_types): Likewise.
4260         (_initialize_parse): Likewise.
4261
4262 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4263
4264         * NEWS: Mention csky target.
4265
4266 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4267             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4268             Don Breazeal  <donb@codesourcery.com>
4269
4270         * csky-linux-tdep.c: New file.
4271         * csky-tdep.c: Likewise.
4272         * csky-tdep.h: Likewise.
4273         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4274         csky-tdep.o.
4275         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4276         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4277         * configure.tgt: Add csky support.
4278
4279 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4280
4281         * python/py-framefilter.c (py_print_frame): Print frame architecture
4282         when printing on an MI output.
4283
4284 2018-08-27  Tom Tromey  <tom@tromey.com>
4285
4286         PR build/23087:
4287         * configure: Rebuild.
4288         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4289
4290 2018-08-27  Tom Tromey  <tom@tromey.com>
4291
4292         * aarch64-linux-tdep.c
4293         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4294         casts to int.
4295
4296 2018-08-27  Tom Tromey  <tom@tromey.com>
4297
4298         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4299         unsigned.
4300         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4301         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4302         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4303         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4304         unsigned.
4305
4306 2018-08-27  Tom Tromey  <tom@tromey.com>
4307
4308         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4309         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4310
4311 2018-08-27  Tom Tromey  <tom@tromey.com>
4312
4313         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4314         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4315         ULONGEST_MAX.
4316         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4317         ULONGEST_MAX.
4318         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4319         ULONGEST_MAX.
4320         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4321         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4322         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4323         ULONGEST_MAX.
4324         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4325         (ppc64_linux_sigaction_tramp_frame)
4326         (ppc32_linux_sighandler_tramp_frame)
4327         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4328         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4329         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4330         * mn10300-linux-tdep.c (am33_linux_sigframe)
4331         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4332         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4333         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4334         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4335         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4336         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4337         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4338         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4339         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4340         * microblaze-linux-tdep.c
4341         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4342         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4343         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4344         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4345         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4346         * common/common-types.h (ULONGEST_MAX): New define.
4347         (CORE_ADDR_MAX): Fix formatting.
4348         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4349         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4350         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4351         (arm_linux_rt_sigreturn_tramp_frame)
4352         (arm_eabi_linux_sigreturn_tramp_frame)
4353         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4354         (thumb2_eabi_linux_sigreturn_tramp_frame)
4355         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4356         (arm_linux_restart_syscall_tramp_frame)
4357         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4358         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4359         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4360         ULONGEST_MAX.
4361         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4362
4363 2018-08-27  Tom Tromey  <tom@tromey.com>
4364
4365         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4366         CORE_ADDR_MAX.
4367         * mips-tdep.c (mips_deal_with_atomic_sequence)
4368         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4369         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4370         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4371         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4372         CORE_ADDR_MAX.
4373         * aarch64-tdep.c (aarch64_software_single_step): Use
4374         CORE_ADDR_MAX.
4375
4376 2018-08-27  Tom Tromey  <tom@tromey.com>
4377
4378         * linespec.c (complete_linespec_component): Add cast to "char".
4379         * completer.c (completion_tracker::build_completion_result): Add
4380         cast to "char".
4381
4382 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4383
4384         * solist.h (struct solist, struct target_so_ops): Fix
4385         indentation.
4386
4387 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4388
4389         * ada-tasks.c (ada_task_info_s): Remove typedef.
4390         (DEF_VEC_O(ada_task_info_s)): Remove.
4391         (struct ada_tasks_inferior_data): Initialize fields.
4392         <task_list>: Make an std::vector.
4393         (get_ada_tasks_inferior_data): Allocate with new.
4394         (ada_get_task_number): Adjust.
4395         (get_task_number_from_id): Likewise.
4396         (valid_task_id): Likewise.
4397         (ada_get_task_info_from_ptid): Likewise.
4398         (iterate_over_live_ada_tasks): Likewise.
4399         (add_ada_task): Likewise.
4400         (read_known_tasks): Likewise.
4401         (ada_build_task_list): Likewise.
4402         (print_ada_task_info): Likewise.
4403         (info_task): Likewise.
4404         (task_command_1): Likewise.
4405
4406 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4407
4408         * ada-lang.c (add_angle_brackets): Return std::string.
4409
4410 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
4411
4412         * python/py-threadevent.c (py_get_event_thread): Initialize
4413         pythread.
4414
4415 2018-08-24  Pedro Alves  <palves@redhat.com>
4416
4417         * python/py-bpevent.c (create_breakpoint_event_object): Use
4418         copy-initialization.
4419         * python/py-continueevent.c (emit_continue_event): Use
4420         copy-initialization.
4421         * python/py-exitedevent.c (create_exited_event_object): Return a
4422         gdbpy_ref<>.
4423         (emit_exited_event): Use copy-initialization.
4424         * python/py-inferior.c (python_new_inferior)
4425         (python_inferior_deleted, add_thread_object): Use
4426         copy-initialization.
4427         * python/py-infevents.c (create_inferior_call_event_object)
4428         (create_register_changed_event_object)
4429         (create_memory_changed_event_object): Return a gdbpy_ref<>.
4430         (emit_inferior_call_event, emit_memory_changed_event)
4431         (emit_register_changed_event): Use copy-initialization.
4432         * python/py-newobjfileevent.c (create_new_objfile_event_object):
4433         Return a gdbpy_ref<>.
4434         (emit_new_objfile_event): Use copy-initialization.
4435         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4436         (emit_clear_objfiles_event): Use copy-initialization.
4437         * python/py-signalevent.c (create_signal_event_object): Use
4438         copy-initialization.
4439         * python/py-threadevent.c (create_thread_event_object): Use
4440         copy-initialization.
4441
4442 2018-08-24  Pedro Alves  <palves@redhat.com>
4443             Simon Marchi  <simon.marchi@ericsson.com>
4444
4445         PR gdb/23379
4446         * python/py-continueevent.c: Include "gdbthread.h".
4447         (create_continue_event_object): Add intro comment.  Add 'ptid'
4448         parameter.  Use it to find thread to pass to
4449         create_thread_event_object.
4450         (emit_continue_event): Pass PTID down to
4451         create_continue_event_object.
4452         * python/py-event.h (py_get_event_thread): Declare.
4453         (create_thread_event_object): Remove default from 'thread'
4454         parameter.
4455         * python/py-stopevent.c (create_stop_event_object): Use
4456         py_get_event_thread.
4457         * python/py-threadevent.c (get_event_thread): Rename to ...
4458         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
4459         and use it to find the thread.
4460         (create_thread_event_object): Assert that THREAD isn't null.
4461         Don't find the event thread here.
4462
4463 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
4464
4465         * block.h (blockrange, blockranges): New struct declarations.
4466         (struct block): Add new field named `ranges'.
4467         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
4468         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
4469         macros for accessing ranges in struct block.
4470         (make_blockranges): New declaration.
4471         block.c (make_blockranges): New function.
4472         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
4473         for block.
4474         * symtab.h (find_pc_partial_function): Add new parameter `block'.
4475         * blockframe.c (cache_pc_function_block): New static global.
4476         (clear_pc_function_cache): Clear cache_pc_function_block.
4477         (find_pc_partial_function): Move comment to symtab.h.  Add
4478         support for non-contiguous blocks.
4479         * cli/cli-cmds.c (block.h): Include.
4480         (print_disassembly): Handle printing of non-contiguous blocks.
4481         (disassemble_current_function): Likewise.
4482         (disassemble_command): Likewise.
4483
4484         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
4485         BLOCK_START.
4486         * blockframe.c (get_pc_function_start): Likewise.
4487         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
4488         (gcc_symbol_address): Likewise.
4489         * compile/compile-object-run.c (compile_object_run): Likewise.
4490         * compile/compile.c (get_expr_block_and_pc): Likewise.
4491         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
4492         (func_addr_to_tail_call_list): Likewise.
4493         * findvar.c (default_read_var_value): Likewise.
4494         * inline-frame.c (inline_frame_this_id): Likewise.
4495         (skip-inline_frames): Likewise.
4496         * infcmd.c (until_next_command): Likewise.
4497         * linespec.c (convert_linespec_to_sals): Likewise.
4498         * parse.c (parse_exp_in_context_1): Likewise.
4499         * printcmd.c (build_address_symbolic): likewise.
4500         (info_address_command): Likewise.
4501         symtab.c (find_function_start_sal): Likewise.
4502         (skip_prologue_sal): Likewise.
4503         (find_function_alias_target): Likewise.
4504         (find_gnu_ifunc): Likewise.
4505         * stack.c (find_frame_funname): Likewise.
4506         * symtab.c (fixup_symbol_section): Likewise.
4507         (find_function_start_sal): Likewise.
4508         (skip_prologue_sal): Likewsie.
4509         (find_function_alias_target): Likewise.
4510         (find_gnu_ifunc): Likewise.
4511         * tracepoint.c (info_scope_command): Likewise.
4512         * value.c (value_fn_field): Likewise.
4513
4514         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
4515         in place of find_pc_partial_function.
4516         * blockframe.c (find_function_entry_range_from_pc): New function.
4517         * symtab.h (find_function_entry_range_from_pc): Declare and document.
4518         * objfiles.c (objfile_relocate1): Relocate start and end addresses
4519         for each range in a block.
4520
4521
4522 2018-08-23  Xavier Roirand  <roirand@adacore.com>
4523
4524         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
4525         incrementation.
4526
4527 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4528
4529         * solib-svr4.c (read_program_headers_from_bfd): Return
4530         gdb::optional<gdb::byte_vector>.
4531         (svr4_exec_displacement): Adjust.
4532
4533 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4534
4535         * solib-svr4.c (read_program_header): Return
4536         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
4537         (find_program_interpreter): Return
4538         gdb::optional<gdb::byte_vector>.
4539         (scan_dyntag_auxv): Adjust.
4540         (enable_break): Adjust.
4541         (svr4_exec_displacement): Adjust.
4542
4543 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4544
4545         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
4546         * inf-child.c (inf_child_target::terminal_save_inferior): New.
4547
4548 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4549
4550         * guile/scm-string.c (gdbscm_scm_from_printf): Use
4551         string_vprintf.
4552         * guile/scm-utils.c (gdbscm_printf): Likewise.
4553         * serial.c (serial_printf): Likewise.
4554         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
4555
4556 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
4557
4558         * stack.c (print_frame): Print frame architecture when printing on
4559         an MI output.
4560         * NEWS: Mention new "arch" attribute in frame output.
4561
4562 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4563
4564         * arch/aarch64.h (aarch64_regnum): Update comment.
4565
4566 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4567
4568         * NEWS: Add SVE to 8.2 section.
4569
4570 2018-08-21  Pedro Alves  <palves@redhat.com>
4571
4572         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
4573         out from gdbscm_parse_function_args.
4574         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
4575         gdbscm_parse_function_args_1.
4576
4577 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
4578
4579         PR gdb/17816
4580         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
4581         operator.
4582
4583 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
4584
4585         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
4586
4587 2018-08-19  Michael Spang  <spang@google.com>
4588
4589         PR gdb/11786
4590         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
4591         for PT_TLS segments.
4592
4593 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
4594
4595         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
4596         dwarf_variable_value.
4597         * dwarf2-frame.c (class dwarf_expr_executor):
4598         Add override for dwarf_variable_value.
4599         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
4600         (class symbol_needs_eval_context): Likewise.
4601         (indirect_synthetic_pointer): Add forward declaration.
4602         (sect_variable_value): New function.
4603         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
4604         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
4605         for DW_OP_GNU_variable_value.
4606
4607 2018-08-16  Tom Tromey  <tom@tromey.com>
4608
4609         * top.c (read_command_file): Update.
4610         (command_line_input): Remove "repeat" argument.
4611         * ada-lang.c (get_selections): Update.
4612         * linespec.c (decode_line_2): Update.
4613         * defs.h (command_line_input): Remove argument.
4614         * cli/cli-script.c (read_next_line): Update.
4615         * python/py-gdb-readline.c: Update.
4616
4617 2018-08-17  Tom Tromey  <tom@tromey.com>
4618
4619         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
4620         command_line_input.
4621
4622 2018-08-15  Tom Tromey  <tom@tromey.com>
4623
4624         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
4625
4626 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
4627
4628         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
4629         If used, use find_pc_partial_function to find address range
4630         to disassemble.
4631         * mi/mi-main.c (mi_cmd_list_features): Report
4632         "data-disassemble-a-option" feature.
4633         * NEWS: Mention new -data-disassemble option -a.
4634
4635 2018-08-13  Tom Tromey  <tom@tromey.com>
4636
4637         * common/common-defs.h (_FORTIFY_SOURCE): Define.
4638
4639 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4640
4641         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
4642         (aarch64_linux_collect_sve_regset): Likewise.
4643         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
4644         * regcache.h (regcache_map_entry_size): New function.
4645
4646 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4647
4648         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
4649         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
4650         (SVE_HEADER_VL_LENGTH): Likewise.
4651         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
4652         (SVE_HEADER_FLAGS_LENGTH): Likewise.
4653         (SVE_HEADER_RESERVED_LENGTH): Likewise.
4654         (SVE_HEADER_SIZE_OFFSET): Likewise.
4655         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
4656         (SVE_HEADER_VL_OFFSET): Likewise.
4657         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
4658         (SVE_HEADER_FLAGS_OFFSET): Likewise.
4659         (SVE_HEADER_RESERVED_OFFSET): Likewise.
4660         (SVE_HEADER_SIZE): Likewise.
4661         (aarch64_linux_core_read_vq): Add function.
4662         (aarch64_linux_core_read_description): Check for SVE section.
4663
4664 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4665
4666         * aarch64-fbsd-tdep.c
4667         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
4668         collect_size.
4669         * aarch64-linux-tdep.c
4670         (aarch64_linux_iterate_over_regset_sections): Likewise.
4671         * alpha-linux-tdep.c
4672         (alpha_linux_iterate_over_regset_sections):
4673         * alpha-nbsd-tdep.c
4674         (alphanbsd_iterate_over_regset_sections): Likewise.
4675         * amd64-fbsd-tdep.c
4676         (amd64fbsd_iterate_over_regset_sections): Likewise.
4677         * amd64-linux-tdep.c
4678         (amd64_linux_iterate_over_regset_sections): Likewise.
4679         * arm-bsd-tdep.c
4680         (armbsd_iterate_over_regset_sections): Likewise.
4681         * arm-fbsd-tdep.c
4682         (arm_fbsd_iterate_over_regset_sections): Likewise.
4683         * arm-linux-tdep.c
4684         (arm_linux_iterate_over_regset_sections): Likewise.
4685         * corelow.c (get_core_registers_cb): Likewise.
4686         (core_target::fetch_registers): Likewise.
4687         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
4688         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
4689         * gdbarch.h (void): Regenerate.
4690         * gdbarch.sh: Add supply_size and collect_size.
4691         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
4692         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
4693         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
4694         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
4695         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
4696         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
4697         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
4698         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
4699         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
4700         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
4701         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
4702         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
4703         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
4704         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
4705         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
4706         Likewise.
4707         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
4708         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
4709         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
4710         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
4711         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
4712         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
4713         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
4714         Likewise.
4715         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
4716         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4717         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4718         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4719         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4720         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4721         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4722         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4723
4724 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
4725
4726         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4727         with string_printf.
4728
4729 2018-08-10  Keith Seitz  <keiths@redhat.com>
4730
4731         * compile/compile-c-support.c (add_code_header, add_code_footer):
4732         Move into policy class.
4733         (c_push_user_expression, pop_user_expression_nop)
4734         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4735         (compile_program): New host class.
4736         (c_compile_program): New typedef.
4737         (c_compute_porgram): Use c_compile_program.
4738
4739 2018-08-10  Keith Seitz  <keiths@redhat.com>
4740
4741         * compile/compile-internal.h (compile_instance::~compile_instance):
4742         Remove calls to htab_delete.
4743         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4744         * compile.c (compile_instance::compile_instance): Initialize
4745         htab unique pointers.
4746         (compile_instance::get_cached_type, compile_instance::insert_type)
4747         (compile_instance::error_symbol_once): Update for unique_ptr.
4748
4749 2018-08-10  Keith Seitz  <keiths@redhat.com>
4750
4751         * compile/compile-c-symbols.c (struct symbol_error)
4752         (hash_symbol_error, eq_symbol_error, del_symbol_error)
4753         (compile_instance::insert_symbol_error)
4754         (compile_instance::error_symbol_once): Move to ...
4755         * compile/compile.c: ... here.
4756
4757 2018-08-10  Keith Seitz  <keiths@redhat.com>
4758
4759         * compile/compile-c-support.c (c_get_compile_context): Use `new'
4760         instead of `new_compile_instance'.
4761         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4762         Update description.
4763         If the symbol error map is not initialized, create it.
4764         (generate_c_for_for_one_symbol): Do not check/initialize
4765         the symbol error map.
4766         * compile/compile-c-types.c (compile_c_instance): Make a class.
4767         Update all callers.
4768         (compile_instance::compile_instance): Initialize the type cache.
4769         (get_cached_type): New function.
4770         (insert_type): Update description.
4771         (compile_c_instance::m_default_cflags): Define.
4772         (convert_type): Update description.  Use get_cached_type.
4773         (delete_instance): Moved to destructor.
4774         (new_compile_instance): Moved to constructor.
4775         * compile/compile-c.h (compile_c_instance): Make class inheriting
4776         from compile_instance.
4777         <base>: Remove field.
4778         <type_map, symbol_err_map>: Move to base class.
4779         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4780         * compile/compile-internal.h (compile_instance): Make class.
4781         <type_map_t, symbol_err_map_t>: Define.
4782         <fe>: Rename to `m_gcc_fe'.
4783         <scope, block, gcc_target_options>: Add `m_' prefix.
4784         <m_type_map, m_symbol_err_map>: New fields, moved from
4785         compile_c_instance.
4786         <destroy>: Remove.
4787         (convert_type, new_compile_instance): Remove.
4788         * compile/compile.c (cleanup_compile_instance): Remove.
4789         (compile_to_object): Use unique_ptr to eliminate cleanups.
4790         (compile_instance::set_print_callback, compile_instance::version)
4791         (compile_instance::set_verbose)
4792         (compile_instance::set_driver_filename)
4793         (compile_instance::set_triplet_regexp)
4794         (compile_instance::set_arguments)
4795         (compile_instance::set_source_file)
4796         (compile_instance::compile): Define.
4797
4798 2018-08-10  Keith Seitz  <keiths@redhat.com>
4799
4800         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4801         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4802         gcc-c-fe.def to define C plugin.
4803         (delete_instance): Delete `c_plugin'.
4804         (new_compile_instance): Initialize `c_plugin'.
4805         * compile/compile-c.h: Include gcc_c_plugin.h.
4806         (struct compile_c_instance) <c_plugin>: New member.
4807         * gcc-c-plugin.h: New file.
4808         Update all callers with API change.
4809
4810 2018-08-10  Keith Seitz  <keiths@redhat.com>
4811
4812         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4813         (HFILES_NO_SRCDIR): ... to here.
4814         Add compile-internal.h and compile-c.h.
4815         * compile/compile-c-support.c: Include compile-c.h.
4816         * compile/compile-c-symbols.c: Include compile-c.h.
4817         (generate_c_for_variable_locations): Update comment.
4818         * compile/compile-c-types.c: Include compile-c.h.
4819         * compile/compile-c.h: New file -- moved C language declarations
4820         from other files here.
4821         * compile/compile-internal.h: Do not include hashtab.h or
4822         common/enum-flags.h.
4823         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4824         (gcc_convert_symbol, gcc_symbol_address)
4825         (generate_c_for_variable_locations, c_get_mode_for_size)
4826         (c_get_range_decl_name): Definitions moved to compile-c.h.
4827         * compile/compile-loc2c.c: Include compile-c.h.
4828
4829 2018-08-10  Keith Seitz  <keiths@redhat.com>
4830
4831         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4832         (c_symbol_substitution_name): ... this.
4833         Update all callers.
4834
4835 2018-08-10  Keith Seitz  <keiths@redhat.com>
4836
4837         * compile/compile-c-support.c (c_compute_program): Use
4838         unique_xmalloc_ptr to eliminate cleanup.
4839         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4840         Return a unique_xmalloc_ptr and eliminate cleanup.
4841         * compile/compile-internal.h (generate_c_for_variable_locations):
4842         Return unique_xmalloc_ptr and update description.
4843
4844 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4845
4846         * corelow.c (core_target::get_core_register_section): Rename
4847         min_size to section_min_size.
4848
4849 2018-08-09  Jim Wilson  <jimw@sifive.com>
4850
4851         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4852         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4853         * NEWS: Mention new GNU/Linux RISC-V target.
4854         * configure.host: Add riscv*-*-linux*.
4855         * configure.nat: Add riscv*.
4856         * configure.tgt: Add riscv*-*-linux*.
4857         * riscv-linux-nat.c: New file.
4858         * riscv-linux-tdep.c: New file.
4859
4860 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4861
4862         * infrun.c (resume): Make static, add forward declaration.
4863         (proceed): Update header comment.
4864         * infrun.h (resume): Delete declaration.
4865
4866 2018-08-09  Tom Tromey  <tom@tromey.com>
4867
4868         * riscv-tdep.h: Minor formatting fixes.
4869
4870 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4871
4872         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4873         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4874         (test_mkdir_recursive): Likewise.
4875         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4876
4877 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4878
4879         * valarith.c (value_subscripted_rvalue): If an array is not in
4880         memory, and we don't know the upper bound, then we can't know that
4881         the requested element exists or not.
4882
4883 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4884
4885         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4886         (target_options_to_string): Add comment.
4887
4888 2018-08-08  Tom Tromey  <tom@tromey.com>
4889
4890         * unittests/scoped_mmap-selftests.c: Check result of "write".
4891
4892 2018-08-08  Jim Wilson  <jimw@sifive.com>
4893
4894         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4895         (decode_register_index_short): New.
4896         (decode_j_type_insn, decode_cj_type_insn): New.
4897         (decode_b_type_insn, decode_cb_type_insn): New.
4898         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4899         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4900         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4901         is_c_sw_insn instead of is_sw_insn.
4902         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4903         (riscv_software_single_step): New.
4904         * riscv-tdep.h (riscv_software_single_step): Declare.
4905
4906         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4907         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4908
4909 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4910
4911         PR gdb/18050:
4912         * target.c (dispose_inferior): Don't dispose of inferiors that are
4913         already killed.
4914
4915 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4916
4917         * remote.c (remote_target::download_tracepoint): Change char* to
4918         const char*.
4919
4920 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4921
4922         * target.h (target_options_to_string): Return an std::string.
4923         * target.c (str_comma_list_concat_elem): Return void, use
4924         std::string.
4925         (do_option): Likewise.
4926         (target_options_to_string): Return an std::string.
4927         * linux-nat.c (linux_nat_target::wait): Adjust.
4928         * target-debug.h (target_debug_print_options): Adjust.
4929
4930 2018-08-07  Tom Tromey  <tom@tromey.com>
4931
4932         * Makefile.in (CPPFLAGS): New variable.
4933         (INTERNAL_CPPFLAGS): Use it.
4934
4935 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4936
4937         * NEWS: Mention the index cache.
4938
4939 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4940
4941         * common/pathstuff.h (get_standard_cache_dir): New.
4942         * common/pathstuff.c (get_standard_cache_dir): New.
4943         * build-id.h (build_id_to_string): New.
4944         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4945         DEBUG_STR_SUFFIX): Move to here.
4946         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4947         DEBUG_STR_SUFFIX): Move from there.
4948         (write_psymtabs_to_index): Make non-static, add basename
4949         parameter.  Write to temporary files, rename when done.
4950         (save_gdb_index_command): Adjust call to
4951         write_psymtabs_to_index.
4952         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4953         field.
4954         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4955         (get_gdb_index_contents_from_cache): New.
4956         (get_gdb_index_contents_from_cache_dwz): New.
4957         (dwarf2_initialize_objfile): Read index from cache.
4958         (dwarf2_build_psymtabs): Save to index.
4959         * dwarf-index-cache.h: New file.
4960         * dwarf-index-cache.c: New file.
4961         * dwarf-index-write.h: New file.
4962
4963 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4964
4965         * gnulib/aclocal.m4: Re-generate.
4966         * gnulib/config.in: Re-generate.
4967         * gnulib/configure: Re-generate.
4968         * gnulib/import/Makefile.am: Re-generate.
4969         * gnulib/import/Makefile.in: Re-generate.
4970         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4971         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4972         * gnulib/import/m4/mkdir.m4: New file.
4973         * gnulib/import/mkdir.c: New file.
4974         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4975         module.
4976
4977 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4978
4979         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4980         * common/scoped_mmap.c: New file.
4981         * common/scoped_mmap.h (destroy): New method.
4982         (~scoped_mmap, reset): Use destroy.
4983         (scoped_mmap): New move constructor.
4984         (mmap_file): New declaration.
4985         * unittests/scoped_mmap-selftests.c (test_normal,
4986         test_invalid_filename, run_tests): New functions.
4987         (_initialize_scoped_mmap_selftests): Register selftest.
4988
4989 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4990
4991         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4992         (read_gdb_index_from_buffer): ... this.  Remove section
4993         parameter, add buffer parameter.
4994         (get_gdb_index_contents_ftype,
4995         get_gdb_index_contents_dwz_ftype): New typedefs.
4996         (dwarf2_read_gdb_index): Add callback parameters to get the
4997         index contents.
4998         (get_gdb_index_contents_from_section): New.
4999         (dwarf2_initialize_objfile): Update call to
5000         dwarf2_read_gdb_index.
5001
5002 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5003
5004         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5005         (gdb_open_cloexec): Likewise.
5006         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5007         (commandline_from_pid): Likewise.
5008         (linux_xfer_osdata_threads): Likewise.
5009         (linux_xfer_osdata_fds): Likewise.
5010         * ada-lang.c (is_package_name): Likewise.
5011         * auxv.c (procfs_xfer_auxv): Likewise.
5012         * breakpoint.c (print_one_breakpoint_location): Use
5013         uiout::field_fmt.
5014         (print_one_catch_solib): Use string_printf.
5015         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5016         (add_pe_forwarded_sym): Likewise.
5017         * dwarf2read.c (create_type_unit_group): Likewise.
5018         (build_error_marker_type): Likewise.
5019         * infcall.c (get_function_name): Likewise.
5020         * valprint.c (print_converted_chars_to_obstack): Likewise.
5021         * xtensa-tdep.c (xtensa_register_type): Likewise.
5022
5023 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5024
5025         * remote.c (remote_target::download_tracepoint): Fix format
5026         string errors.
5027
5028 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5029
5030         * tracefile.c: Include common/byte-vector.h.
5031         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5032         with trace_regblock_size if needed.  Update uses of buf.
5033
5034 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5035
5036         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5037         std::vector<unsigned char>.
5038         * tracepoint.c (collection_list::collection_list): Remove
5039         m_regs_mask initializer from initializer list.  Resize
5040         m_regs_mask using the largest remote register number.
5041         (collection_list::add_remote_register): Remove size check on
5042         m_regs_mask.  Use at to access element.
5043         (collection_list::stringify): Change type of temp_buf to
5044         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5045         stringify the register mask.  Use pack_hex_byte for the register
5046         mask.
5047
5048 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5049
5050         * tracepoint.h (class collection_list) <add_register>: Remove.
5051         <add_remote_register, add_ax_registers, add_local_register>:
5052         Declare.
5053         <add_memrange>: Add scope parameter.
5054         * tracepoint.c (encode_actions_1): Likewise.
5055         (collection_list::add_register): Rename to ...
5056         (collection_list::add_remote_register): ... this.  Update
5057         comment.
5058         (collection_list::add_ax_registers, add_local_register): New
5059         methods.
5060         (collection_list::add_memrange): Add scope parameter.  Call
5061         add_local_register instead of add_register.
5062         (finalize_tracepoint_aexpr): New function.
5063         (collection_list::collect_symbol): Update calls to add_memrange.
5064         Call add_local_register instead of add_register.  Call
5065         add_ax_registers.  Call finalize_tracepoint_aexpr.
5066         (encode_actions_1): Get remote regnos for $reg action.  Call
5067         add_remote_register, add_ax_registers, and add_local_register.
5068         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5069         (validate_actionline): Call finalize_tracepoint_aexpr.
5070
5071 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5072
5073         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5074         Replace array buf with gdb::char_vector buf, of size
5075         get_remote_packet_size ().  Replace references to buf and
5076         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5077         and xsnprintf with snprintf.  Raise errors if the buffer is too
5078         small.
5079
5080 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5081
5082         * remote.c (remote_target::download_tracepoint): Fix the has_more
5083         predicate in the QTDP action list iteration.
5084
5085 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5086
5087         * remote.c (remote_target::download_tracepoint): Fix indentation
5088         in for block.
5089
5090 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5091
5092         * proc-api.c (_initialize_proc_api): Remove c, unused.
5093         * procfs.c (procfs_init_inferior): Remove signals, unused.
5094         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5095         unused.
5096
5097 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5098             Andrew Burgess  <andrew.burgess@embecosm.com>
5099
5100         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5101         'W_STOPCODE (0)' as this could be ambiguous.
5102
5103 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5104
5105         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5106         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5107         "ai_socktype").
5108
5109 2018-08-02  Tom Tromey  <tom@tromey.com>
5110
5111         PR symtab/16842.
5112         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5113         symbols.
5114         (process_structure_scope): Likewise.
5115
5116 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5117
5118         PR gdb/22629:
5119         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5120         kill inferior.
5121
5122 2018-08-02  Tom Tromey  <tom@tromey.com>
5123
5124         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5125         (darwin_suspend_inferior, darwin_resume_inferior)
5126         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5127         (darwin_check_new_threads): Check result of get_darwin_inferior.
5128
5129 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5130
5131         GDB 8.1.1 released.
5132
5133 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5134
5135         * varobj.c (varobj_get_path_expr_parent): Report an error if
5136         parent is a dynamic varobj.
5137
5138 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5139
5140         * gnulib/aclocal.m4: Re-generate.
5141         * gnulib/config.in: Re-generate.
5142         * gnulib/configure: Re-generate.
5143         * gnulib/import/Makefile.in: Re-generate.
5144         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5145         * gnulib/import/m4/onceonly.m4: Re-generate.
5146
5147 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5148
5149         * target-descriptions.c (struct xml_test_tdesc): New.
5150         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5151         (record_xml_tdesc): Update.
5152         (maintenance_check_xml_descriptions): Update.
5153         * target-descriptions.h (record_xml_tdesc): Update comment.
5154
5155 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5156
5157         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5158         checking array bounds are defined.
5159
5160 2018-07-30  Tom Tromey  <tom@tromey.com>
5161
5162         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5163         irreflexivity violation.
5164
5165 2018-07-30  Tom Tromey  <tom@tromey.com>
5166
5167         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5168         * value.c (unpack_long): Remove lint code.
5169         * valops.c (value_ind): Remove lint code.
5170         * valarith.c (value_x_binop, value_x_unop, value_equal)
5171         (value_pos): Remove lint code.
5172
5173 2018-07-28  Tom de Vries  <tdevries@suse.de>
5174
5175         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5176         with undefined upper bound as <optimized out>.
5177
5178 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5179
5180         * gcore.in: Rename variable "name" to "prefix".  Expand
5181         "usage" text.
5182
5183 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5184
5185         * windows-nat.c (windows_nat_target::create_inferior): Update to
5186         call close() in global namespace.
5187
5188 2018-07-26  Tom Tromey  <tom@tromey.com>
5189
5190         * dwarf-index-write.c (add_address_entry): Don't add objfile
5191         offsets.
5192         * dbxread.c (find_stab_function): Rename from
5193         find_stab_function_addr.  Return a bound_minimal_symbol.
5194         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5195         Don't add objfile offsets.
5196         (end_psymtab): Use raw_text_low, raw_text_high,
5197         MSYMBOL_VALUE_RAW_ADDRESS.
5198         (read_ofile_symtab): Update.
5199         (process_one_symbol): Update.
5200         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5201         offsets.
5202         (dw2_relocate): Remove.
5203         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5204         searching addrmap.
5205         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5206         Update.
5207         (process_psymtab_comp_unit_reader, add_partial_symbol)
5208         (add_partial_subprogram, dwarf2_ranges_read): Update.
5209         (load_partial_dies): Update.
5210         (add_address_entry): Don't add objfile offsets.
5211         (dwarf2_build_include_psymtabs): Update.
5212         (create_addrmap_from_aranges): Don't add objfile offsets.
5213         (dw2_find_pc_sect_compunit_symtab): Update.
5214         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5215         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5216         Update.
5217         (parse_partial_symbols): Don't add objfile offsets.  Use
5218         raw_text_low, raw_text_high.  Update.
5219         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5220         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5221         or call 'relocate' quick function.  Clear psymbol_map.
5222         * psympriv.h (struct partial_symbol) <address>: Add section
5223         offset.
5224         <set_unrelocated_address>: Rename from set_address.
5225         <raw_text_low, raw_text_high>: New methods.
5226         <text_low, text_high>: Add objfile parameter.
5227         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5228         set_unrelocated_address.
5229         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5230         (find_pc_psymbol): Update.
5231         (fixup_psymbol_section, relocate_psymtabs): Remove.
5232         (dump_psymtab, psym_functions): Update.
5233         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5234         parameter.
5235         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5236         (start_psymtab_common): Update.
5237         * symfile-debug.c (debug_qf_relocate): Remove.
5238         (debug_sym_quick_functions): Update.
5239         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5240         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5241         Update.
5242
5243 2018-07-26  Tom Tromey  <tromey@redhat.com>
5244
5245         * dbxread.c (end_psymtab): Use text_high_valid and
5246         text_low_valid.
5247         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5248         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5249         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5250         Update comment.
5251         <text_low_valid, text_high_valid>: New fields.
5252         <set_text_low, set_text_high>: Update.
5253         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5254
5255 2018-07-26  Tom Tromey  <tom@tromey.com>
5256
5257         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5258         Update.
5259         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5260         textlow and texthigh fields.
5261         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5262         Update.
5263         * mdebugread.c (parse_lines, parse_partial_symbols)
5264         (psymtab_to_symtab_1): Update.
5265         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5266         Rename fields.  Update comment.  Now private.
5267         <text_low, text_high, set_text_low, set_text_high>: New methods.
5268         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5269         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5270         (start_psymtab_common, maintenance_info_psymtabs)
5271         (maintenance_check_psymtabs): Update.
5272         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5273         texthigh fields.
5274         (scan_xcoff_symtab): Update.
5275
5276 2018-07-26  Tom Tromey  <tromey@redhat.com>
5277
5278         * psympriv.h (struct partial_symbol) <unrelocated_address,
5279         address, set_address>: New methods.
5280         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5281         (fixup_psymbol_section, relocate_psymtabs): Update.
5282         (print_partial_symbols): Add 'objfile' parameter.  Update.
5283         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5284         Update.
5285
5286 2018-07-26  Tom Tromey  <tom@tromey.com>
5287
5288         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5289         (debug_names::write_psymbols): Update.
5290         * psympriv.h (struct partial_symbol): Derive from
5291         general_symbol_info.
5292         <obj_section>: New method.
5293         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5294         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5295         (find_pc_sect_psymbol, fixup_psymbol_section)
5296         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5297         (print_partial_symbols, recursively_search_psymtabs)
5298         (compare_psymbols, psymbol_hash, psymbol_compare)
5299         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5300         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5301
5302 2018-07-26  Tom Tromey  <tromey@redhat.com>
5303
5304         * dbxread.c (end_psymtab): Remove dead code.
5305
5306 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5307
5308         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5309         DWARF unwinders are disabled.
5310         * dwarf2-frame.c: Add dwarf2read.h include.
5311         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5312         disabled.
5313         (dwarf2_frame_unwinders_enabled_p): Define.
5314         (show_dwarf_unwinders_enabled_p): New function.
5315         (_initialize_dwarf2_frame): Register switch to control DWARF
5316         unwinder use.
5317         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5318         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5319         (show_dwarf_cmdlist): Remove static keyword.
5320         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5321         (show_dwarf_cmdlist): Declare.
5322         * NEWS: Document new feature.
5323
5324 2018-07-26  Tom de Vries  <tdevries@suse.de>
5325
5326         PR breakpoints/23366
5327         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5328
5329 2018-07-26  Tom de Vries  <tdevries@suse.de>
5330
5331         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5332         DW_AT_count can't be translated to a dynamic prop.
5333
5334 2018-07-25  Tom de Vries  <tdevries@suse.de>
5335
5336         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5337         try/catch.
5338
5339 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5340
5341         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5342
5343 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5344
5345         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5346
5347 2018-07-24  Keith Seitz  <keiths@redhat.comt
5348
5349         PR symtab/23010
5350         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5351         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5352         instead of add_symbol_to_list.
5353         (read_file_scope): Call prepare_one_comp_unit before reading
5354         any other DIEs.
5355
5356 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5357
5358         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5359
5360 2018-07-24  Tom Tromey  <tom@tromey.com>
5361
5362         * utils.c (malloc, realloc, free): Don't declare.
5363         * configure, config.in: Rebuild.
5364         * configure.ac: Don't check for declarations of free, malloc, or
5365         realloc.
5366
5367 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5368
5369         * aarch64-linux-nat.c
5370         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5371         variable.
5372         * arm-linux-nat.c (fetch_regs): Likewise.
5373         (store_regs): Likewise.
5374         (fetch_vfp_regs): Likewise.
5375         (store_vfp_regs): Likewise.
5376         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5377         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5378         (arm_linux_nat_target::insert_watchpoint): Likewise.
5379         (arm_linux_nat_target::remove_watchpoint): Likewise.
5380         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5381         Likewise.
5382         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5383         Likewise.
5384         * ppc-linux-nat.c (fetch_register): Likewise.
5385         (fetch_all_gp_regs): Likewise.
5386         (fetch_ppc_registers): Likewise.
5387         (store_all_gp_regs): Likewise.
5388         (store_ppc_registers): Likewise.
5389         (hwdebug_insert_point): Likewise.
5390         (can_use_watchpoint_cond_accel): Likewise.
5391         * remote-sim.c (gdb_os_write_stdout): Likewise.
5392
5393 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5394             Tom Tromey  <tom@tromey.com>
5395
5396         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5397         test for it.
5398         * configure: Rebuild.
5399
5400 2018-07-22  Tom Tromey  <tom@tromey.com>
5401
5402         * regformats/regdat.sh: Define xmltarget_${name} inside
5403         #ifndef IN_PROCESS_AGENT.
5404
5405 2018-07-22  Tom Tromey  <tom@tromey.com>
5406
5407         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5408
5409 2018-07-22  Tom Tromey  <tom@tromey.com>
5410
5411         * symfile.c (reread_symbols): Notify iter, not objfile.
5412
5413 2018-07-22  Tom Tromey  <tom@tromey.com>
5414
5415         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5416         Use arch_ops.
5417         (ravenscar_thread_target::prepare_to_store): Likewise.
5418
5419 2018-07-22  Tom Tromey  <tom@tromey.com>
5420
5421         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5422         unused variable.  Call value_fetch_lazy when needed.
5423         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5424         Remove unused variable.  Call value_fetch_lazy when needed.
5425
5426 2018-07-22  Tom Tromey  <tom@tromey.com>
5427
5428         * m32c-tdep.c (mark_dma): Return void.
5429         (make_regs): Remove unused declarations.
5430
5431 2018-07-22  Tom Tromey  <tom@tromey.com>
5432
5433         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5434         cmdscm_get_valid_command_smob_arg_unsafe for effect.
5435         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5436         bkscm_get_valid_block_smob_arg_unsafe for effect.
5437
5438 2018-07-22  Tom Tromey  <tom@tromey.com>
5439
5440         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5441         value_type.
5442
5443 2018-07-22  Tom Tromey  <tom@tromey.com>
5444
5445         * windows-nat.c (saved_context): Conditionally define.
5446         * remote.c (remote_target::remote_btrace_maybe_reopen):
5447         Conditionally declare "warned".
5448         * inflow.c (sigquit_ours): Conditionally define.
5449         (new_tty): Move "tty" declaration inside #if.
5450         * guile/guile.c (guile_datadir): Conditionally define.
5451         * charset.c (set_be_le_names): Move some declarations inside #if.
5452         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
5453         #if.
5454         (parse_xml_btrace_conf): Likewise.
5455
5456 2018-07-22  Tom Tromey  <tom@tromey.com>
5457
5458         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
5459
5460 2018-07-22  Tom Tromey  <tom@tromey.com>
5461
5462         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
5463         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
5464         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
5465         * buildsym-legacy.c (get_macro_table): Remove unused variable.
5466         * stack.c (frame_apply_level_command): Remove unused variable.
5467         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
5468         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
5469         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
5470         unused variable.
5471         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
5472         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
5473         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
5474         variable.
5475         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
5476         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
5477         variable.
5478         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
5479         Remove unused variable.
5480         * cli/cli-script.c (recurse_read_control_structure): Remove unused
5481         variable.
5482         * common/tdesc.c (print_xml_feature::visit): Remove unused
5483         variable.
5484         * compile/compile-object-load.c (store_regs): Remove unused
5485         variables.
5486         * complaints.c (clear_complaints): Remove unused variable.
5487         * corelow.c (core_target_open): Remove unused variable.
5488         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
5489         variable.
5490         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
5491         variable.
5492         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
5493         variable.
5494         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
5495         variable.
5496         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
5497         variable.
5498         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
5499         variable.
5500         * ia64-tdep.c (examine_prologue): Remove unused variable.
5501         * infcall.c (run_inferior_call): Remove unused variable.
5502         * inferior.c (exit_inferior): Remove unused variable.
5503         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
5504         * linespec.c (decode_line_2): Remove unused variable.
5505         * linux-nat.c (super_close): Remove.
5506         * linux-tdep.c (linux_info_proc): Remove unused variable.
5507         * mi/mi-main.c (mi_execute_command): Remove unused variable.
5508         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
5509         Remove unused variable.
5510         * parse.c (find_minsym_type_and_address): Remove unused variable.
5511         * printcmd.c (info_symbol_command, printf_floating): Remove unused
5512         variable.
5513         * python/py-breakpoint.c (bppy_set_commands): Remove unused
5514         variable.
5515         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
5516         variables.
5517         * record-btrace.c (record_btrace_target::store_registers): Remove
5518         unused variable.
5519         (cmd_show_record_btrace_cpu): Remove unused variable.
5520         * riscv-tdep.c (riscv_register_reggroup_p)
5521         (riscv_push_dummy_call, riscv_return_value): Remove unused
5522         variable.
5523         * rust-exp.y (literal): Remove unused variable.
5524         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
5525         unused variable.
5526         <STRUCTOP_ANONYMOUS>: Likewise.
5527         * s390-linux-tdep.c (s390_linux_init_abi_31)
5528         (s390_linux_init_abi_64): Remove unused variable.
5529         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
5530         (file_select_thread, net_windows_open, _initialize_ser_windows):
5531         Remove unused variables.
5532         * symtab.c (find_pc_sect_line): Remove unused variable.
5533         * target-memory.c (compute_garbled_blocks): Remove unused
5534         variable.
5535         (target_write_memory_blocks): Remove unused variable.
5536         * target.c (target_stack::unpush): Remove unused variables.
5537         * tracepoint.c (start_tracing, all_tracepoint_actions)
5538         (merge_uploaded_trace_state_variables)
5539         (print_one_static_tracepoint_marker): Remove unused variable.
5540         * unittests/basic_string_view/element_access/char/1.cc (test01):
5541         Remove unused variable.
5542         * windows-nat.c (windows_continue, windows_add_all_dlls)
5543         (do_initial_windows_stuff, windows_nat_target::create_inferior):
5544         Remove unused variables.
5545
5546 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
5547
5548         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
5549         attr_profile in HAVE_ELF.
5550         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
5551         HAVE_ELF.
5552
5553 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
5554
5555         * frame.c (frame_register_unwind): Change parameter name.
5556         (frame_unwind_register): Likewise.
5557         (frame_unwind_register_value): Likewise.
5558         (frame_unwind_register_signed): Likewise.
5559         (frame_unwind_register_unsigned): Likewise.
5560         * frame.h (frame_register_unwind): Likewise.
5561         (frame_unwind_register): Likewise.
5562         (frame_unwind_register_value): Likewise.
5563         (frame_unwind_register_signed): Likewise.
5564         (frame_unwind_register_unsigned): Likewise.
5565         (frame_unwind_arch): Likewise.
5566
5567 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5568
5569         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
5570         ISA maintenance.
5571
5572 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5573
5574         * mips-linux-nat.c (mips_linux_nat_target::read_description):
5575         Call `get_ptrace_pid' rather than extracting the ptrace PID by
5576         hand.
5577
5578 2018-07-20  Keith Seitz  <keiths@redhat.com>
5579
5580         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
5581         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
5582         m_compunit_symtab, m_language>: Add "m_" prefix.
5583         Update all uses.
5584         * buildsym.c: Update all uses.
5585
5586 2018-07-20  Tom Tromey  <tom@tromey.com>
5587
5588         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
5589         * buildsym.h (record_line_ftype): Remove typedef.
5590
5591 2018-07-20  Tom Tromey  <tom@tromey.com>
5592
5593         * buildsym-legacy.h (augment_type_symtab): Don't declare.
5594         (end_expandable_symtab): Likewise.
5595         (end_symtab_get_static_block): Likewise.
5596         (end_symtab_from_static_block): Likewise.
5597         * buildsym-legacy.c (augment_type_symtab): Remove.
5598         (end_expandable_symtab): Remove.
5599         (end_symtab_get_static_block): Remove.
5600         (end_symtab_from_static_block): Remove.
5601
5602 2018-07-20  Tom Tromey  <tom@tromey.com>
5603
5604         * dwarf2read.c: Include buildsym.h.
5605         (struct dwarf2_cu) <builder>: New method.
5606         (fixup_go_packaging): Update.
5607         (process_full_comp_unit, process_full_type_unit): Update.  Don't
5608         use scoped_free_pendings.
5609         (using_directives): Add "cu" parameter, remove "language".
5610         (read_import_statement, setup_type_unit_groups, )
5611         (read_func_scope, read_lexical_block_scope)
5612         (dwarf2_record_block_ranges, read_namespace): Update.
5613         (lnp_state_machine::lnp_state_machine): Add cu parameter.
5614         (lnp_state_machine::handle_end_sequence): Update.
5615         (class lnp_state_machine) <m_cu>: New member.
5616         <m_record_line_callback>: Remove.
5617         <m_currently_recording_lines>: New member.
5618         (lnp_state_machine::handle_set_file): Update.
5619         (noop_record_line): Remove.
5620         (dwarf_record_line_p): Add cu parameter.
5621         (dwarf_record_line_1, dwarf_finish_line): Likewise.
5622         (lnp_state_machine::record_line)
5623         (lnp_state_machine::lnp_state_machine)
5624         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5625         (dwarf_decode_lines): Update.
5626         (dwarf2_start_subfile): Add cu parameter.
5627         (dwarf2_start_symtab, new_symbol): Update.
5628         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
5629         Remove dwarf2_per_objfile parameter.
5630         (dwarf_decode_macros): Update.
5631
5632 2018-07-20  Tom Tromey  <tom@tromey.com>
5633
5634         * stabsread.c (define_symbol): Update.
5635         * buildsym-legacy.h (get_buildsym_compunit): Declare.
5636         * dwarf2read.c (new_symbol): Update.
5637         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
5638         * cp-namespace.c: Include buildsym.h.
5639         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
5640         * buildsym-legacy.c (get_buildsym_compunit): New function.
5641
5642 2018-07-20  Tom Tromey  <tom@tromey.com>
5643
5644         * xcoffread.c: Include buildsym-legacy.h.
5645         * windows-nat.c: Include buildsym-legacy.h.
5646         * stabsread.c: Include buildsym-legacy.h.
5647         * mdebugread.c: Include buildsym-legacy.h.
5648         * buildsym-legacy.h: New file.
5649         * buildsym-legacy.c: New file, from buildsym.c.
5650         * go32-nat.c: Include buildsym-legacy.h.
5651         * dwarf2read.c: Include buildsym-legacy.h.
5652         * dbxread.c: Include buildsym-legacy.h.
5653         * cp-namespace.c: Include buildsym-legacy.h.
5654         * coffread.c: Include buildsym-legacy.h.
5655         * buildsym.h: Move some contents to buildsym-legacy.h.
5656         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
5657         buildsym-legacy.c.
5658         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
5659
5660 2018-07-20  Tom Tromey  <tom@tromey.com>
5661
5662         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
5663         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
5664         (buildsym_compunit::buildsym_compunit)
5665         (buildsym_compunit::~buildsym_compunit)
5666         (buildsym_compunit::get_macro_table): Define.
5667
5668 2018-07-20  Tom Tromey  <tom@tromey.com>
5669
5670         * buildsym.c (reset_symtab_globals): Remove.
5671         (buildsym_compunit::end_symtab_from_static_block): Update.
5672         (buildsym_compunit::augment_type_symtab): Update.
5673         (end_symtab_from_static_block): Call free_buildsym_compunit.
5674         (augment_type_symtab, end_symtab, end_expandable_symtab):
5675         Likewise.
5676
5677 2018-07-20  Tom Tromey  <tom@tromey.com>
5678
5679         * arch-utils.c: Do not include buildsym.h.
5680         * mipsread.c: Do not include buildsym.h.
5681         * machoread.c: Do not include buildsym.h.
5682         * elfread.c: Do not include buildsym.h.
5683
5684 2018-07-20  Tom Tromey  <tom@tromey.com>
5685
5686         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
5687         initialization.
5688         (buildsym_compunit): Add new constructor.
5689         (struct buildsym_compunit) <get_last_source_file, finish_block,
5690         record_block_range, start_subfile, patch_subfile_names,
5691         push_subfile, pop_subfile, record_line, get_compunit_symtab,
5692         set_last_source_start_addr, get_last_source_start_addr,
5693         get_local_using_directives, set_local_using_directives,
5694         get_global_using_directives, outermost_context_p,
5695         get_current_context_stack, get_context_stack_depth,
5696         get_current_subfile, get_local_symbols, get_file_symbols,
5697         get_global_symbols, record_debugformat, record_producer,
5698         push_context, pop_context, end_symtab_get_static_block,
5699         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
5700         New public methods.
5701         <record_pending_block, finish_block_internal, make_blockvector,
5702         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
5703         private methods.
5704         Update all users.
5705
5706 2018-05-22  Tom Tromey  <tom@tromey.com>
5707
5708         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5709         parameter.
5710         (finish_block_internal): Update.
5711
5712 2018-07-20  Tom Tromey  <tom@tromey.com>
5713
5714         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5715         parameter.
5716         (finish_block_internal): Update.
5717
5718 2018-07-20  Tom Tromey  <tom@tromey.com>
5719
5720         * buildsym.h (EXTERN): Don't define or undef.
5721         * buildsym.c (EXTERN): Don't define.
5722
5723 2018-07-20  Tom Tromey  <tom@tromey.com>
5724
5725         * buildsym.c: Remove TODO comment.
5726
5727 2018-07-20  Tom Tromey  <tom@tromey.com>
5728
5729         * coffread.c (coff_symtab_read): Update.
5730         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5731         (xcoff_new_init): Update.
5732         * mipsread.c (mipscoff_new_init): Update.
5733         * mdebugread.c (mdebug_build_psymtabs): Update.
5734         * elfread.c (elf_new_init): Update.
5735         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5736         Update.
5737         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5738         (coffstab_build_psymtabs, elfstab_build_psymtabs)
5739         (stabsect_build_psymtabs): Update.
5740         * buildsym.h (buildsym_init): Don't declare.
5741         * buildsym.c: Update comment.
5742         (prepare_for_building): Remove.
5743         (start_symtab, restart_symtab): Update.
5744         (reset_symtab_globals): Update comment.
5745         (buildsym_init): Remove.
5746
5747 2018-07-20  Tom Tromey  <tom@tromey.com>
5748
5749         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5750         * stabsread.c (patch_block_stabs, define_symbol, read_type)
5751         (read_enum_type, common_block_start, common_block_end)
5752         (cleanup_undefined_types_1, finish_global_stabs): Update.
5753         * mdebugread.c (psymtab_to_symtab_1): Update.
5754         * dwarf2read.c (fixup_go_packaging, read_func_scope)
5755         (read_lexical_block_scope, new_symbol): Update.
5756         * dbxread.c (process_one_symbol): Update.
5757         * coffread.c (coff_symtab_read, process_coff_symbol)
5758         (coff_read_enum_type): Update.
5759         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5760         declare.
5761         (get_local_symbols, get_file_symbols, get_global_symbols): New
5762         functions.
5763         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5764         m_global_symbols.
5765         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5766         (~scoped_free_pendings): Update.
5767         (finish_block, prepare_for_building, reset_symtab_globals)
5768         (end_symtab_get_static_block, end_symtab_with_blockvector)
5769         (augment_type_symtab, push_context): Update.
5770         (get_local_symbols, get_file_symbols, get_global_symbols): New
5771         functions.
5772         (buildsym_init): Update.
5773
5774 2018-07-20  Tom Tromey  <tom@tromey.com>
5775
5776         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5777         (process_full_type_unit): Likewise.
5778         (dwarf2_start_symtab): Set list_in_scope.
5779
5780 2018-07-20  Tom Tromey  <tom@tromey.com>
5781
5782         * dwarf2read.c (process_psymtab_comp_unit_reader)
5783         (build_type_psymtabs_reader): Do not set list_in_scope.
5784
5785 2018-07-20  Tom Tromey  <tom@tromey.com>
5786
5787         * buildsym.c (free_pendings): Remove.
5788         (add_symbol_to_list, scoped_free_pendings)
5789         (finish_block_internal, buildsym_init): Update.
5790
5791 2018-07-20  Tom Tromey  <tom@tromey.com>
5792
5793         * xcoffread.c (read_xcoff_symtab): Update.
5794         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5795         Update.
5796         * dbxread.c (process_one_symbol): Update.
5797         * coffread.c (coff_symtab_read): Update.
5798         * buildsym.h (finish_block): Update.
5799         * buildsym.c (finish_block): Remove "listhead" argument.
5800         (end_symtab_get_static_block): Update.
5801
5802 2018-07-20  Tom Tromey  <tom@tromey.com>
5803
5804         * buildsym.h (class scoped_free_pendings): Remove constructor.
5805         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5806         method.
5807         <m_pending_block_obstack, m_pending_blocks>: New members.
5808         (pending_block_obstack, pending_blocks): Remove.
5809         (scoped_free_pendings::scoped_free_pendings): Default.
5810         (~scoped_free_pendings): Update.
5811         (free_pending_blocks): Remove.
5812         (finish_block_internal, record_pending_block, make_blockvector)
5813         (end_symtab_get_static_block, augment_type_symtab, push_context)
5814         (buildsym_init): Update.
5815
5816 2018-07-20  Tom Tromey  <tom@tromey.com>
5817
5818         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5819         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5820         members.
5821         (pending_addrmap, pending_addrmap_obstack)
5822         (pending_addrmap_interesting): Remove.
5823         (scoped_free_pendings, record_block_range, make_blockvector)
5824         (prepare_for_building, reset_symtab_globals, buildsym_init):
5825         Update.
5826
5827 2018-07-20  Tom Tromey  <tom@tromey.com>
5828
5829         * xcoffread.c (process_linenos): Update.
5830         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5831         * mdebugread.c (psymtab_to_symtab_1): Update.
5832         * dwarf2read.c (setup_type_unit_groups)
5833         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5834         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5835         * dbxread.c (process_one_symbol): Update.
5836         * coffread.c (coff_symtab_read, enter_linenos)
5837         (process_coff_symbol): Update.
5838         * buildsym.h (current_subfile): Don't declare.
5839         (get_current_subfile): Declare.
5840         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5841         member.
5842         (start_subfile, free_buildsym_compunit, push_subfile)
5843         (prepare_for_building, start_symtab): Update.
5844         (get_current_subfile): New function.
5845
5846 2018-07-20  Tom Tromey  <tom@tromey.com>
5847
5848         * coffread.c (coff_symtab_read): Update.
5849         * xcoffread.c (read_xcoff_symtab): Update.
5850         * dwarf2read.c (new_symbol): Update.
5851         (read_func_scope, read_lexical_block_scope): Update.
5852         * dbxread.c (process_one_symbol): Update.
5853         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5854         (outermost_context_p): Remove macro.
5855         (outermost_context_p, get_current_context_stack)
5856         (get_context_stack_depth): Declare.
5857         (pop_context): Return struct context_stack.
5858         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5859         member.
5860         (context_stack_size): Remove.
5861         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5862         (prepare_for_building, end_symtab_get_static_block)
5863         (augment_type_symtab, push_context): Update.
5864         (pop_context): Return struct context_stack.
5865         (outermost_context_p, get_current_context_stack)
5866         (get_context_stack_depth): New functions.
5867         (buildsym_init): Update.
5868
5869 2018-07-20  Tom Tromey  <tom@tromey.com>
5870
5871         * rust-exp.y: Now a pure parser.  Update all rules.
5872         (%union): Move earlier.
5873         (current_parser, work_obstack): Remove globals.
5874         (rust_parser, ~rust_parser): Update.
5875         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5876         lex_character, lex_number, lex_string, lex_identifier,
5877         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5878         convert_name, convert_params_to_expression,
5879         convert_ast_to_expression, ast_basic_type, ast_operation,
5880         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5881         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5882         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5883         ast_array_type, ast_slice_type, ast_reference_type,
5884         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5885         (rust_parse): Update.
5886         (rustyyerror, rustyylex): Add parser parameter.
5887         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5888         (rust_lex_stringish_test, rust_lex_test_sequence)
5889         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5890         (rust_lex_test_push_back, rust_lex_tests): Update.
5891
5892 2018-07-19  Pedro Alves  <palves@redhat.com>
5893
5894         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5895         gdb::unique_xmalloc_ptr.
5896         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5897         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5898         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5899         copy-initialization.
5900         * guile/scm-pretty-print.c (ppscm_print_children): Use
5901         gdb::unique_xmalloc_ptr instead of cleanups.
5902         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5903         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5904         gdb::unique_xmalloc_ptr.
5905         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5906         Adjust to use gdb::unique_xmalloc_ptr.
5907         * guile/scm-utils.c (extract_arg): Adjust.
5908         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5909         gdb::unique_xmalloc_ptr instead of a cleanup.
5910
5911 2018-07-19  Tom Tromey  <tom@tromey.com>
5912
5913         * utils.c (do_value_free_to_mark)
5914         (make_cleanup_value_free_to_mark): Remove.
5915         * utils.h (make_cleanup_value_free_to_mark): Remove.
5916
5917 2018-07-19  Pedro Alves  <palves@redhat.com>
5918
5919         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5920         forwarding reference.
5921
5922 2018-07-18  Pedro Alves  <palves@redhat.com>
5923
5924         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5925         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5926         cleanup.
5927
5928 2018-07-18  Pedro Alves  <palves@redhat.com>
5929
5930         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5931         exceptions.
5932         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5933         (gdbscm_wrap): New.
5934         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5935         directly instead of a cleanup.
5936         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5937         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5938         (vlscm_binop_gdbthrow): New, factored out from ...
5939         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5940         (vlscm_rich_compare): Use gdbscm_wrap.
5941         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5942         instead of a cleanup.
5943         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5944         cleanup.
5945         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5946         Use xfree directly instead of a cleanup.
5947         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5948         Adjust to use gdbscm_wrap and scoped_value_mark.
5949         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5950         (gdbscm_value_address, gdbscm_value_dereference)
5951         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5952         scoped_value_mark.
5953         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5954         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5955         scoped_value_mark.
5956         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5957         gdbscm_wrap and scoped_value_mark.
5958         (gdbscm_value_to_string): Use xfree directly instead of a
5959         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5960         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5961         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5962         scoped_value_mark.
5963         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5964         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5965         scoped_value_mark.
5966         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5967         gdbscm_wrap.
5968
5969 2018-07-18  Tom de Vries  <tdevries@suse.de>
5970
5971         * findvar.c (default_read_var_value): Also resolve dynamic type for
5972         LOC_OPTIMIZED_OUT vars.
5973
5974 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5975
5976         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5977         decoding.
5978
5979 2018-07-17  Tom Tromey  <tom@tromey.com>
5980
5981         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5982         (compute_enum_list, pascm_set_param_value_x)
5983         (gdbscm_parameter_value): Update.
5984         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5985         (gdbscm_scm_to_host_string): Update.
5986         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5987         Update.
5988         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5989         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5990         * guile/scm-string.c (gdbscm_scm_to_string): Return
5991         unique_xmalloc_ptr.
5992         (gdbscm_scm_to_host_string): Likewise.
5993
5994 2018-07-17  Tom Tromey  <tom@tromey.com>
5995
5996         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5997         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5998         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5999         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6000         unique_xmalloc_ptr.
6001
6002 2018-07-17  Tom Tromey  <tom@tromey.com>
6003
6004         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6005         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6006         Update.
6007         * guile/scm-cmd.c (cmdscm_function): Update.
6008         * guile/scm-pretty-print.c
6009         (ppscm_print_exception_unless_memory_error): Update.
6010         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6011         Return unique_xmalloc_ptr.
6012
6013 2018-07-17  Tom Tromey  <tom@tromey.com>
6014
6015         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6016         Use string_printf.
6017
6018 2018-07-17  Jim Wilson  <jimw@sifive.com>
6019
6020         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6021         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6022         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6023         unecessary braces after EF_RISCV_RVC test.  Delete call to
6024         set_gdbarch_decr_pc_after_break.
6025
6026         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6027         RISCV_LAST_FP_REGNUM + 1.
6028         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6029
6030 2018-07-17  Tom Tromey  <tom@tromey.com>
6031
6032         * configure.ac: Remove --disable-gdbcli.
6033         * configure: Rebuild.
6034         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6035         (SUBDIR_CLI_CFLAGS): Remove.
6036         (SFILES): Use SUBDIR_CLI_SRCS.
6037         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6038
6039 2018-07-17  Tom Tromey  <tom@tromey.com>
6040
6041         PR gdb/18624:
6042         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6043
6044 2018-07-16  Jim Wilson  <jimw@sifive.com>
6045
6046         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6047
6048 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6049
6050         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6051         variable.
6052         (libunwind_frame_sniffer): Likewise.
6053         (libunwind_frame_prev_register): Likewise.
6054         (libunwind_sigtramp_frame_sniffer): Likewise.
6055         * ia64-tdep.c (ia64_access_reg): Likewise.
6056         (ia64_access_rse_reg): Likewise.
6057         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6058         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6059
6060 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6061
6062         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6063
6064 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6065
6066         * remote-sim.c (gdbsim_target::close,
6067         gdbsim_target::mourn_inferior): Remove unused variables.
6068
6069 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6070
6071         * ia64-tdep.c (ktab_buf): New global.
6072         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6073         (get_kernel_table): Adjust.
6074
6075 2018-07-16  Tom Tromey  <tom@tromey.com>
6076
6077         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6078         * dwarf2read.c (using_directives, new_symbol): Use
6079         outermost_context_p.
6080         * dbxread.c (process_one_symbol): Use outermost_context_p.
6081         * coffread.c (coff_symtab_read): Use outermost_context_p.
6082
6083 2018-07-16  Tom Tromey  <tom@tromey.com>
6084
6085         * dwarf2read.c (using_directives, read_func_scope)
6086         (read_lexical_block_scope): Update.
6087         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6088         * buildsym.h (local_using_directives, global_using_directives):
6089         Don't declare.
6090         (get_local_using_directives, set_local_using_directives)
6091         (get_global_using_directives): Declare.
6092         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6093         m_global_using_directives>: New members.
6094         (finish_block_internal, prepare_for_building)
6095         (reset_symtab_globals, end_symtab_get_static_block)
6096         (push_context): Update.
6097         (get_local_using_directives, set_local_using_directives)
6098         (get_global_using_directives): New functions.
6099         (buildsym_init): Update.
6100
6101 2018-07-16  Tom Tromey  <tom@tromey.com>
6102
6103         * xcoffread.c (xcoff_initial_scan): Don't call
6104         free_pending_blocks.
6105         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6106         * buildsym.h (class scoped_free_pendings): Add constructor.
6107         (free_pending_blocks): Don't declare.
6108         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6109         (free_pending_blocks): Now static.
6110
6111 2018-07-16  Tom Tromey  <tom@tromey.com>
6112
6113         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6114         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6115         member.
6116         (struct subfile_stack): Remove.
6117         (subfile_stack): Remove.
6118         (push_subfile, pop_subfile, buildsym_init): Update.
6119
6120 2018-07-16  Tom Tromey  <tom@tromey.com>
6121
6122         * buildsym.c (push_subfile): Use gdb_assert.
6123         (pop_subfile): Use gdb_assert.
6124
6125 2018-07-16  Tom Tromey  <tom@tromey.com>
6126
6127         * buildsym.h (merge_symbol_lists): Remove.
6128         * buildsym.c (merge_symbol_lists): Remove.
6129
6130 2018-07-16  Tom Tromey  <tom@tromey.com>
6131
6132         * stabsread.c (scan_file_globals): Update comment.
6133         * stabsread.h (scan_file_globals): Move from buildsym.h.
6134         * buildsym.h (scan_file_globals): Move to stabsread.h.
6135
6136 2018-07-16  Tom Tromey  <tom@tromey.com>
6137
6138         * xcoffread.c (xcoff_new_init): Update.
6139         * mipsread.c (mipscoff_new_init): Update.
6140         * mdebugread.c (mdebug_build_psymtabs): Update.
6141         * elfread.c (elf_new_init): Update.
6142         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6143         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6144         * buildsym.h (buildsym_new_init): Don't declare.
6145         * buildsym.c (buildsym_new_init): Remove.
6146
6147 2018-07-16  Tom Tromey  <tom@tromey.com>
6148
6149         * stabsread.h (within_function): Move from buildsym.h.
6150         * stabsread.c (start_stabs): Clear within_function.
6151         * coffread.c (coff_start_symtab): Clear within_function.
6152         * buildsym.h (within_function): Move to stabsread.h.
6153         * buildsym.c (prepare_for_building): Update.
6154
6155 2018-07-16  Tom Tromey  <tom@tromey.com>
6156
6157         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6158         * dwarf2read.c (dwarf2_start_symtab): Don't set
6159         processing_gcc_compilation.
6160         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6161
6162 2018-07-16  Tom Tromey  <tom@tromey.com>
6163
6164         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6165         (next_symbol_text_func): Move from buildsym.h.
6166         * stabsread.c (hashname): Move from buildsym.c.
6167         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6168         (next_symbol_text_func, hashname): Move to stabsread.h.
6169         * buildsym.c: Don't include bcache.h
6170         (hashname): Move to stasbread.c.
6171
6172 2018-07-16  Tom Tromey  <tom@tromey.com>
6173
6174         * buildsym.h (context_stack_size): Don't declare.
6175         * buildsym.c (context_stack_size): New global.
6176
6177 2018-07-16  Tom Tromey  <tom@tromey.com>
6178
6179         * dbxread.c (processing_acc_compilation): New global.
6180         * buildsym.h (processing_acc_compilation): Don't declare.
6181
6182 2018-07-16  Tom Tromey  <tom@tromey.com>
6183
6184         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6185         * dbxread.c (read_ofile_symtab): Update.
6186         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6187         * buildsym.h (last_source_start_addr): Remove.
6188         (set_last_source_start_addr, get_last_source_start_addr):
6189         Declare.
6190         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6191         parameter.
6192         (struct buildsym_compunit) <m_last_source_start_addr>: New
6193         member.
6194         (prepare_for_building): Remove start_addr parameter.
6195         (start_symtab, restart_symtab, end_symtab_get_static_block)
6196         (end_symtab_with_blockvector): Update.
6197         (set_last_source_start_addr, get_last_source_start_addr): New
6198         functions.
6199
6200 2018-07-16  Tom Tromey  <tom@tromey.com>
6201
6202         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6203         member.
6204         (have_line_numbers): Remove.
6205         (record_line, prepare_for_building, end_symtab_get_static_block)
6206         (augment_type_symtab): Update.
6207
6208 2018-07-16  Tom Tromey  <tom@tromey.com>
6209
6210         * buildsym.c (~buildsym_compunit): Free the macro table.
6211         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6212         methods.
6213         <m_pending_macros>: New member.
6214         (pending_macros): Remove.
6215         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6216         (reset_symtab_globals, end_symtab_get_static_block)
6217         (end_symtab_with_blockvector, augment_type_symtab)
6218         (buildsym_init): Update.
6219
6220 2018-07-16  Tom Tromey  <tom@tromey.com>
6221
6222         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6223         parameter.
6224         (buildsym_compunit::set_last_source_file): New method.
6225         <m_last_source_file>: New member.
6226         (prepare_for_building): Remove "name" parameter.
6227         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6228         (last_source_file): Remove.
6229         (set_last_source_file, get_last_source_file): Update.
6230
6231 2018-07-16  Tom Tromey  <tom@tromey.com>
6232
6233         * buildsym.c (prepare_for_building): Add assert.
6234
6235 2018-07-16  Tom Tromey  <tom@tromey.com>
6236
6237         * buildsym.c (~buildsym_compunit): Update.
6238         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6239         (start_subfile, patch_subfile_names)
6240         (end_symtab_with_blockvector): Update.
6241
6242 2018-07-16  Tom Tromey  <tom@tromey.com>
6243
6244         * buildsym.c (struct buildsym_compunit): Add constructor,
6245         destructor, initializers.
6246         (start_buildsym_compunit): Remove.
6247         (free_buildsym_compunit): Use "delete".
6248         (start_symtab, restart_symtab): Use "new".
6249
6250 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6251
6252         * symfile.c (set_objfile_default_section_offset): Remove struct
6253         keyword.
6254
6255 2018-07-14  Stafford Horne  <shorne@gmail.com>
6256
6257         * (Responsible Maintainers): Add myself as or1k maintainer.
6258
6259 2018-07-13  Tom Tromey  <tom@tromey.com>
6260
6261         * symfile.c (set_objfile_default_section_offset): Use extra braces
6262         around initializer.
6263
6264 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6265
6266         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6267         non-branching basr.
6268
6269 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6270
6271         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6272         unittests/cli-utils-selftests.c
6273         * unittests/cli-utils-selftests.c: New file.
6274
6275 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6276
6277         * NEWS: Mention new commands. Mention change to 'thread apply'.
6278
6279 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6280
6281         * thread.c (thr_try_catch_cmd): New function.
6282         (thread_apply_all_command): Handle qcs flags.
6283         (thread_apply_command): Handle qcs flags.
6284         (taas_command): New function.
6285         (tfaas_command): New function.
6286         (_initialize_thread): Update to setup the new commands 'taas
6287         and 'tfaas'. Change doc string for 'thread apply'.
6288
6289 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6290
6291         * stack.c: (trailing_outermost_frame): New function, mostly
6292         extracted from backtrace_command_1.
6293         (leading_innermost_frame): New function.
6294         (backtrace_command_1): Update to call trailing_outermost_frame.
6295         (frame_apply_command_count): New function.
6296         (frame_apply_level_command): New function.
6297         (frame_apply_all_command): New function.
6298         (frame_apply_command): New function.
6299         (faas_command): New function.
6300         (frame_cmd_list): New variable.
6301         (_initialize_stack): Update to setup the new commands 'frame apply'
6302         and 'faas'.
6303
6304 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6305
6306         * cli-utils.c (number_or_range_parser::get_number): Only handle
6307         numbers or convenience var as numbers.
6308         (parse_flags): New function.
6309         (parse_flags_qcs): New function.
6310         (number_or_range_parser::finished): Ensure parsing end is detected
6311         before end of string.
6312         * cli-utils.h (parse_flags): New function.
6313         (parse_flags_qcs): New function.
6314         (number_or_range_parser): Remove m_finished bool.
6315         (number_or_range_parser::skip_range): Set m_in_range to false.
6316
6317 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6318
6319         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6320         on Windows.
6321
6322 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6323             Jan Kratochvil  <jan.kratochvil@redhat.com>
6324             Paul Fertser  <fercerpav@gmail.com>
6325             Tsutomu Seki  <sekiriki@gmail.com>
6326             Pedro Alves  <palves@redhat.com>
6327
6328         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6329         'unittests/parse-connection-spec-selftests.c'.
6330         (COMMON_SFILES): Add 'common/netstuff.c'.
6331         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6332         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6333         * common/netstuff.c: New file.
6334         * common/netstuff.h: New file.
6335         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6336         (wait_for_connect): Update comment.  New parameter
6337         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6338         Use 'sock' directly instead of 'scb->fd'.
6339         (try_connect): New function, with code from 'net_open'.
6340         (net_open): Rewrite main loop to deal with multiple
6341         sockets/addresses.  Handle IPv6-style hostnames; implement
6342         support for IPv6 connections.
6343         * unittests/parse-connection-spec-selftests.c: New file.
6344
6345 2018-07-11  Pedro Alves  <palves@redhat.com>
6346
6347         PR gdb/23377
6348         * remote.c (remote_target::remote_detach_pid): Call
6349         set_current_process.
6350
6351 2018-07-11  Pedro Alves  <palves@redhat.com>
6352
6353         * h8300-tdep.c (h8300_gdbarch_init): Remove
6354         set_gdbarch_ecoff_reg_to_regnum calls.
6355
6356 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6357
6358         PR c++/23373
6359         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6360         offsets/sizes for static members of a class/struct.
6361
6362 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6363
6364         * target-descriptions.c (tdesc_register_bitsize): Rename.
6365         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6366         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6367         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6368
6369 2018-07-10  Tom Tromey  <tom@tromey.com>
6370
6371         * breakpoint.c (moribund_locations): Now static and a
6372         std::vector.
6373         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6374         (build_bpstat_chain, update_global_location_list)
6375         (breakpoint_retire_moribund): Update.
6376         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6377         VEC.
6378
6379 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6380
6381         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6382         (riscv_register_reggroup_p): Use new function, remove unneeded
6383         parenthesis.
6384         (riscv_push_dummy_call): Extend assert to compare against xlen or
6385         flen based on register type.
6386
6387 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6388
6389         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6390
6391 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6392
6393         * remote.c (show_hardware_watchpoint_limit): New function.
6394         (show_hardware_watchpoint_length_limit): New function.
6395         (show_hardware_breakpoint_limit): New function.
6396         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6397         where appropriate, update help text.
6398
6399 2018-07-09  Tom Tromey  <tom@tromey.com>
6400
6401         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6402         (CLIBS): Don't mention NAT_CLIBS.
6403
6404 2018-07-09  Tom Tromey  <tom@tromey.com>
6405
6406         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6407         (LIBGDB_OBS, clean mostlyclean): Update.
6408         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6409
6410 2018-07-09  Tom Tromey  <tom@tromey.com>
6411
6412         * Makefile.in (%.c: %.y): Use ECHO_YACC.
6413         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
6414         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6415
6416 2018-07-09  Tom Tromey  <tom@tromey.com>
6417
6418         * Makefile.in (ALLDEPFILES): Remove exec.c.
6419         (COMMON_OBS): Remove exec.o.
6420         (COMMON_SFILES): Add exec.c.
6421
6422 2018-07-09  Tom Tromey  <tom@tromey.com>
6423
6424         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6425
6426 2018-07-09  Tom Tromey  <tom@tromey.com>
6427
6428         * Makefile.in (clean mostlyclean): Remove stamp-version.
6429         (version.c): Depend on stamp-version.
6430         (stamp-version): New rule, from version.c rule.
6431
6432 2018-07-09  Tom Tromey  <tom@tromey.com>
6433
6434         * Makefile.in (init.c): Depend on stamp-init.
6435         (stamp-init): New rule, from init.c rule.
6436         (clean mostlyclean): Remove stamp-init.
6437
6438 2018-07-09  Tom Tromey  <tom@tromey.com>
6439
6440         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6441         SUBDIR_GCC_COMPILE_SRCS.
6442
6443 2018-07-09  Tom Tromey  <tom@tromey.com>
6444
6445         * Makefile.in (init.c): Remove some unused sed rules.
6446
6447 2018-07-09  Tom Tromey  <tom@tromey.com>
6448
6449         * Makefile.in (TSOBS): Remove.
6450         (INIT_FILES): Update.
6451         (LIBGDB_OBS): Update.
6452         (COMMON_SFILES): Add inflow.c.
6453         (SFILES): Remove inflow.c.
6454
6455 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6456
6457         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
6458
6459 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
6460
6461         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
6462         get_saveloc_name, is_signal_frame_name, step_name,
6463         init_remote_name, create_addr_space_name,
6464         destroy_addr_space_name, search_unwind_table_name,
6465         find_dyn_list_name): Constify.
6466
6467 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
6468
6469         * darwin-nat.c (darwin_pthread_kill): New function.
6470         (darwin_resume_thread): Use darwin_pthread_kill.
6471
6472 2018-07-05  Tom de Vries  <tdevries@suse.de>
6473
6474         * macroexp.c (macro_buffer) <operator=>: New member function.
6475
6476 2018-07-04  Tom Tromey  <tom@tromey.com>
6477
6478         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
6479
6480 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
6481
6482         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
6483         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
6484         * maint.c: Likewise.
6485         * top.c: Likewise.
6486
6487 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6488
6489         * NEWS: Create a new section for the next release branch.
6490         Rename the section of the current branch, now that it has
6491         been cut.
6492
6493 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6494
6495         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
6496         * version.in: Bump version to 8.2.50.DATE-git.
6497
6498 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
6499             Pedro Alves  <palves@redhat.com>
6500
6501         * linux-nat.c (linux_init_ptrace): Rename to ...
6502         (linux_init_ptrace_procfs): ... this.  Call
6503         linux_proc_init_warnings.
6504         (linux_nat_target::post_attach)
6505         (linux_nat_target::post_startup_inferior): Adjust.
6506         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
6507         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
6508
6509 2018-07-04  Tom de Vries  <tdevries@suse.de>
6510
6511         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
6512         check ...
6513         (read_comp_unit_head): ... here.
6514
6515 2018-07-03  Tom Tromey  <tom@tromey.com>
6516
6517         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
6518         (stop_tracing, tstatus_command)
6519         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
6520         (print_one_static_tracepoint_marker): Update.
6521         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
6522         std::vector.
6523         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
6524         VEC.
6525         (all_tracepoints, static_tracepoints_here): Return std::vector.
6526
6527 2018-07-03  Tom Tromey  <tom@tromey.com>
6528
6529         * common/ptid.c (ptid_equal): Remove.
6530         * common/ptid.h (ptid_equal): Don't declare.
6531         * ada-tasks.c: Update.
6532         * breakpoint.c: Update.
6533         * common/agent.c: Update.
6534         * corelow.c: Update.
6535         * darwin-nat-info.c: Update.
6536         * darwin-nat.c: Update.
6537         * dcache.c: Update.
6538         * dtrace-probe.c: Update.
6539         * dummy-frame.c: Update.
6540         * fbsd-nat.c: Update.
6541         * frame.c: Update.
6542         * gdbthread.h: Update.
6543         * gnu-nat.c: Update.
6544         * go32-nat.c: Update.
6545         * inf-loop.c: Update.
6546         * inf-ptrace.c: Update.
6547         * infcall.c: Update.
6548         * infcmd.c: Update.
6549         * inflow.c: Update.
6550         * infrun.c: Update.
6551         * linux-fork.c: Update.
6552         * linux-nat.c: Update.
6553         * linux-thread-db.c: Update.
6554         * mi/mi-cmd-var.c: Update.
6555         * mi/mi-interp.c: Update.
6556         * mi/mi-main.c: Update.
6557         * nto-procfs.c: Update.
6558         * ppc-linux-tdep.c: Update.
6559         * procfs.c: Update.
6560         * python/py-inferior.c: Update.
6561         * python/py-record-btrace.c: Update.
6562         * python/py-record.c: Update.
6563         * ravenscar-thread.c: Update.
6564         * regcache.c: Update.
6565         * remote-sim.c: Update.
6566         * remote.c: Update.
6567         * sol-thread.c: Update.
6568         * solib.c: Update.
6569         * target.c: Update.
6570         * tui/tui-stack.c: Update.
6571         * varobj.c: Update.
6572         * windows-nat.c: Update.
6573         * windows-tdep.c: Update.
6574
6575 2018-07-03  Tom Tromey  <tom@tromey.com>
6576
6577         * common/ptid.c (ptid_match): Remove.
6578         * common/ptid.h (ptid_match): Don't declare.
6579         * fbsd-nat.c: Update.
6580         * infcmd.c: Update.
6581         * infrun.c: Update.
6582         * linux-nat.c: Update.
6583         * record-btrace.c: Update.
6584         * regcache.c: Update.
6585         * remote.c: Update.
6586
6587 2018-07-03  Tom Tromey  <tom@tromey.com>
6588
6589         * common/ptid.c (ptid_tid_p): Remove.
6590         * common/ptid.h (ptid_tid_p): Don't declare.
6591         * sol-thread.c: Update.
6592
6593 2018-07-03  Tom Tromey  <tom@tromey.com>
6594
6595         * common/ptid.c (ptid_lwp_p): Remove.
6596         * common/ptid.h (ptid_lwp_p): Don't declare.
6597         * fbsd-nat.c: Update.
6598         * linux-nat.c: Update.
6599         * nat/linux-procfs.c: Update.
6600         * nat/x86-linux-dregs.c: Update.
6601         * sol-thread.c: Update.
6602
6603 2018-07-03  Tom Tromey  <tom@tromey.com>
6604
6605         * common/ptid.c (ptid_is_pid): Remove.
6606         * common/ptid.h (ptid_is_pid): Don't declare.
6607         * infrun.c: Update.
6608         * linux-nat.c: Update.
6609         * mi/mi-interp.c: Update.
6610         * remote.c: Update.
6611         * thread.c: Update.
6612
6613 2018-07-03  Tom Tromey  <tom@tromey.com>
6614
6615         * common/ptid.c (ptid_get_tid): Remove.
6616         * common/ptid.h (ptid_get_tid): Don't declare.
6617         * ada-tasks.c: Update.
6618         * aix-thread.c: Update.
6619         * bsd-uthread.c: Update.
6620         * darwin-nat.c: Update.
6621         * fbsd-nat.c: Update.
6622         * i386-darwin-nat.c: Update.
6623         * infrun.c: Update.
6624         * linux-tdep.c: Update.
6625         * nto-procfs.c: Update.
6626         * ppc-ravenscar-thread.c: Update.
6627         * python/py-infthread.c: Update.
6628         * ravenscar-thread.c: Update.
6629         * sol-thread.c: Update.
6630         * sparc-ravenscar-thread.c: Update.
6631         * windows-nat.c: Update.
6632
6633 2018-07-03  Tom Tromey  <tom@tromey.com>
6634
6635         * common/ptid.c (ptid_get_lwp): Remove.
6636         * common/ptid.h (ptid_get_lwp): Don't declare.
6637         * aarch64-linux-nat.c: Update.
6638         * ada-tasks.c: Update.
6639         * aix-thread.c: Update.
6640         * amd64-linux-nat.c: Update.
6641         * arm-linux-nat.c: Update.
6642         * corelow.c: Update.
6643         * fbsd-nat.c: Update.
6644         * fbsd-tdep.c: Update.
6645         * gnu-nat.c: Update.
6646         * i386-cygwin-tdep.c: Update.
6647         * i386-gnu-nat.c: Update.
6648         * i386-linux-nat.c: Update.
6649         * ia64-linux-nat.c: Update.
6650         * inf-ptrace.c: Update.
6651         * infrun.c: Update.
6652         * linux-fork.c: Update.
6653         * linux-nat.c: Update.
6654         * linux-tdep.c: Update.
6655         * linux-thread-db.c: Update.
6656         * mips-linux-nat.c: Update.
6657         * nat/aarch64-linux-hw-point.c: Update.
6658         * nat/aarch64-linux.c: Update.
6659         * nat/linux-btrace.c: Update.
6660         * nat/linux-osdata.c: Update.
6661         * nat/linux-procfs.c: Update.
6662         * nat/x86-linux-dregs.c: Update.
6663         * obsd-nat.c: Update.
6664         * ppc-fbsd-nat.c: Update.
6665         * ppc-linux-nat.c: Update.
6666         * procfs.c: Update.
6667         * python/py-infthread.c: Update.
6668         * ravenscar-thread.c: Update.
6669         * remote.c: Update.
6670         * s390-linux-nat.c: Update.
6671         * sol-thread.c: Update.
6672         * sol2-tdep.c: Update.
6673         * spu-linux-nat.c: Update.
6674         * x86-linux-nat.c: Update.
6675         * xtensa-linux-nat.c: Update.
6676
6677 2018-07-03  Tom Tromey  <tom@tromey.com>
6678
6679         * common/ptid.c (ptid_get_pid): Remove.
6680         * common/ptid.h (ptid_get_pid): Don't declare.
6681         * aarch64-linux-nat.c: Update.
6682         * ada-lang.c: Update.
6683         * aix-thread.c: Update.
6684         * alpha-bsd-nat.c: Update.
6685         * amd64-fbsd-nat.c: Update.
6686         * amd64-linux-nat.c: Update.
6687         * arm-linux-nat.c: Update.
6688         * arm-nbsd-nat.c: Update.
6689         * auxv.c: Update.
6690         * break-catch-syscall.c: Update.
6691         * breakpoint.c: Update.
6692         * bsd-uthread.c: Update.
6693         * corelow.c: Update.
6694         * ctf.c: Update.
6695         * darwin-nat.c: Update.
6696         * fbsd-nat.c: Update.
6697         * fbsd-tdep.c: Update.
6698         * gcore.c: Update.
6699         * gnu-nat.c: Update.
6700         * hppa-nbsd-nat.c: Update.
6701         * hppa-obsd-nat.c: Update.
6702         * i386-fbsd-nat.c: Update.
6703         * ia64-linux-nat.c: Update.
6704         * inf-ptrace.c: Update.
6705         * infcmd.c: Update.
6706         * inferior.c: Update.
6707         * inferior.h: Update.
6708         * inflow.c: Update.
6709         * infrun.c: Update.
6710         * linux-fork.c: Update.
6711         * linux-nat.c: Update.
6712         * linux-tdep.c: Update.
6713         * linux-thread-db.c: Update.
6714         * m68k-bsd-nat.c: Update.
6715         * mi/mi-interp.c: Update.
6716         * mi/mi-main.c: Update.
6717         * mips-linux-nat.c: Update.
6718         * mips-nbsd-nat.c: Update.
6719         * mips64-obsd-nat.c: Update.
6720         * nat/aarch64-linux-hw-point.c: Update.
6721         * nat/aarch64-linux.c: Update.
6722         * nat/linux-btrace.c: Update.
6723         * nat/linux-osdata.c: Update.
6724         * nat/linux-procfs.c: Update.
6725         * nat/x86-linux-dregs.c: Update.
6726         * nto-procfs.c: Update.
6727         * obsd-nat.c: Update.
6728         * ppc-linux-nat.c: Update.
6729         * ppc-nbsd-nat.c: Update.
6730         * ppc-obsd-nat.c: Update.
6731         * proc-service.c: Update.
6732         * procfs.c: Update.
6733         * python/py-inferior.c: Update.
6734         * python/py-infthread.c: Update.
6735         * ravenscar-thread.c: Update.
6736         * record.c: Update.
6737         * remote-sim.c: Update.
6738         * remote.c: Update.
6739         * rs6000-nat.c: Update.
6740         * s390-linux-nat.c: Update.
6741         * sh-nbsd-nat.c: Update.
6742         * sol-thread.c: Update.
6743         * sparc-nat.c: Update.
6744         * sparc64-tdep.c: Update.
6745         * spu-linux-nat.c: Update.
6746         * spu-tdep.c: Update.
6747         * target-debug.h: Update.
6748         * target.c: Update.
6749         * thread.c: Update.
6750         * tid-parse.c: Update.
6751         * tracefile-tfile.c: Update.
6752         * vax-bsd-nat.c: Update.
6753         * windows-nat.c: Update.
6754         * x86-linux-nat.c: Update.
6755         * x86-nat.c: Update.
6756
6757 2018-07-03  Tom Tromey  <tom@tromey.com>
6758
6759         * common/ptid.c (pid_to_ptid): Remove.
6760         * common/ptid.h (pid_to_ptid): Don't declare.
6761         * aix-thread.c: Update.
6762         * arm-linux-nat.c: Update.
6763         * common/ptid.c: Update.
6764         * common/ptid.h: Update.
6765         * corelow.c: Update.
6766         * ctf.c: Update.
6767         * darwin-nat.c: Update.
6768         * fbsd-nat.c: Update.
6769         * fork-child.c: Update.
6770         * gnu-nat.c: Update.
6771         * go32-nat.c: Update.
6772         * inf-ptrace.c: Update.
6773         * infcmd.c: Update.
6774         * inferior.c: Update.
6775         * infrun.c: Update.
6776         * linux-fork.c: Update.
6777         * linux-nat.c: Update.
6778         * nat/aarch64-linux-hw-point.c: Update.
6779         * nat/fork-inferior.c: Update.
6780         * nat/x86-linux-dregs.c: Update.
6781         * nto-procfs.c: Update.
6782         * obsd-nat.c: Update.
6783         * procfs.c: Update.
6784         * progspace.c: Update.
6785         * remote.c: Update.
6786         * rs6000-nat.c: Update.
6787         * s390-linux-nat.c: Update.
6788         * sol-thread.c: Update.
6789         * spu-linux-nat.c: Update.
6790         * target.c: Update.
6791         * top.c: Update.
6792         * tracefile-tfile.c: Update.
6793         * windows-nat.c: Update.
6794
6795 2018-07-03  Tom Tromey  <tom@tromey.com>
6796
6797         * common/ptid.h (ptid_build): Don't declare.
6798         * common/ptid.c (ptid_build): Remove.
6799         * aix-thread.c: Update.
6800         * bsd-kvm.c: Update.
6801         * bsd-uthread.c: Update.
6802         * common/agent.c: Update.
6803         * common/ptid.c: Update.
6804         * common/ptid.h: Update.
6805         * corelow.c: Update.
6806         * darwin-nat.c: Update.
6807         * fbsd-nat.c: Update.
6808         * gnu-nat.c: Update.
6809         * linux-fork.c: Update.
6810         * linux-nat.c: Update.
6811         * linux-thread-db.c: Update.
6812         * nat/linux-osdata.c: Update.
6813         * nat/linux-procfs.c: Update.
6814         * nto-procfs.c: Update.
6815         * obsd-nat.c: Update.
6816         * proc-service.c: Update.
6817         * procfs.c: Update.
6818         * ravenscar-thread.c: Update.
6819         * remote-sim.c: Update.
6820         * remote.c: Update.
6821         * sol-thread.c: Update.
6822         * target.c: Update.
6823         * windows-nat.c: Update.
6824
6825 2018-07-03  Tom Tromey  <tom@tromey.com>
6826
6827         * infrun.c (follow_exec): Use exit_inferior_silent.
6828         * inferior.c (exit_inferior_num_silent): Remove.
6829         * inferior.h (exit_inferior_num_silent): Don't declare.
6830
6831 2018-07-03  Tom Tromey  <tom@tromey.com>
6832
6833         PR cli/23340:
6834         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6835         inferior_ptid on error.
6836
6837 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
6838             Simon Marchi  <simon.marchi@polymtl.ca>
6839
6840         PR tdep/8282
6841         * disasm.h (gdb_disassembler): Add
6842         `m_disassembler_options_holder'. member
6843         * disasm.c (get_all_disassembler_options): New function.
6844         (gdb_disassembler::gdb_disassembler): Use it.
6845         (gdb_buffered_insn_length_init_dis): Likewise.
6846         (gdb_buffered_insn_length): Adjust accordingly.
6847         (set_disassembler_options): Handle options with arguments.
6848         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6849         line if showing options with descriptions.
6850         (disassembler_options_completer): Adapt to using the
6851         `disasm_options_and_args_t' structure.
6852         * mips-tdep.c (mips_disassembler_options): New variable.
6853         (mips_disassembler_options_o32): Likewise.
6854         (mips_disassembler_options_n32): Likewise.
6855         (mips_disassembler_options_n64): Likewise.
6856         (gdb_print_insn_mips): Don't set `disassembler_options'.
6857         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6858         functions.
6859         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6860         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6861         `gdbarch_disassembler_options_implicit' and
6862         `gdbarch_valid_disassembler_options'.
6863         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6864         `disasm_options_and_args_t' structure.
6865         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6866         method.
6867         (valid_disassembler_options): Switch from `disasm_options_t' to
6868         the `disasm_options_and_args_t' structure.
6869         * NEWS: Document `set disassembler-options' support for the MIPS
6870         target.
6871         * gdbarch.h: Regenerate.
6872         * gdbarch.c: Regenerate.
6873
6874 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6875
6876         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6877
6878 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6879
6880         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6881         parameter in call to amd64_target_description.
6882         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6883         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6884         (amd64fbsd_init_abi): Likewise.
6885         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6886         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6887         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6888         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6889
6890 2018-06-29  Pedro Alves  <palves@redhat.com>
6891
6892         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6893         "segments" parameter.
6894         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6895         (_initialize_amd64_tdep): Update call to
6896         amd64_create_target_description.
6897         (amd64_target_description): Add "segments" parameter.  Adjust
6898         the implementation to use it.
6899         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6900         call to amd64_create_target_description.
6901         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6902         * gdb/arch/amd64.h (amd64_create_target_description): Add
6903         "segments" register.
6904         * gdb/arch/amd64.c (amd64_create_target_description): Add
6905         "segments" parameter.  Call create_feature_i386_64bit_segments
6906         only if SEGMENTS is true.
6907         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6908         call to amd64_create_target_description.
6909
6910 2018-06-29  Pedro Alves  <palves@redhat.com>
6911
6912         * thread.c (thread_target_id_str): New, factored out from ...
6913         (print_thread_info_1): ... here.  Use it to compute the max
6914         "Target Id" column width.
6915
6916 2018-06-29  Pedro Alves  <palves@redhat.com>
6917
6918         * remote.c (remote_target::extra_thread_info): Delete
6919         'display_buf' and 'n' locals.  from the cache, regardless of
6920         packet mechanims is in use.  Use cache for qThreadExtra and qP
6921         methods too.
6922
6923 2018-06-29  Pedro Alves  <palves@redhat.com>
6924
6925         * blockframe.c (find_pc_sect_containing_function): New function.
6926         * breakpoint.c (print_breakpoint_location): Don't call
6927         find_pc_sect_function.
6928         * linespec.c (create_sals_line_offset): Record the location's
6929         symbol in the sal.
6930         * linespec.c (convert_address_location_to_sals): Fill in sal's
6931         symbol with find_pc_sect_containing_function.
6932         * symtab.c (find_function_start_sal): Rename to ...
6933         (find_function_start_sal_1): ... this.
6934         (find_function_start_sal): Reimplement as wrapper around
6935         find_function_start_sal_1, and use
6936         find_pc_sect_containing_function to fill in the sal's symbol.
6937         (find_function_start_sal(symbol*, bool)): Adjust.
6938         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6939         comments.
6940         (find_pc_sect_containing_function): Declare.
6941
6942 2018-06-29  Pedro Alves  <palves@redhat.com>
6943
6944         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6945         true if the the location has no symbol.
6946
6947 2018-06-28  Tom Tromey  <tom@tromey.com>
6948
6949         * NEWS: Mention --enable-codesign.
6950         * silent-rules.mk (ECHO_SIGN): New variable.
6951         * configure.ac: Add --enable-codesign.
6952         * configure: Rebuild.
6953         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6954         (gdb$(EXEEXT)): Optionally invoke codesign.
6955
6956 2018-06-28  Pedro Alves  <palves@redhat.com>
6957
6958         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6959         comments.
6960         (switch_to_thread_no_regs): Adjust comment.
6961         * infcmd.c (stop_pc): Delete.
6962         (post_create_inferior, info_program_command): Replace references
6963         to stop_pc with references to thread_info->suspend.stop_pc.
6964         * inferior.h (stop_pc): Delete declaration.
6965         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6966         (handle_inferior_event_1, handle_signal_stop)
6967         (process_event_stop_test, keep_going_stepped_thread)
6968         (handle_step_into_function, handle_step_into_function_backward)
6969         (print_stop_location): Replace references to stop_pc with
6970         references to thread_info->suspend.stop_pc.
6971         (struct infcall_suspend_state) <stop_pc>: Delete field.
6972         (save_infcall_suspend_state, restore_infcall_suspend_state):
6973         Remove references to inf_stat->stop_pc.
6974         * linux-fork.c (fork_load_infrun_state): Likewise.
6975         * record-btrace.c (record_btrace_set_replay): Likewise.
6976         * record-full.c (record_full_goto_entry): Likewise.
6977         * remote.c (print_one_stopped_thread): Likewise.
6978         * target.c (target_resume): Extend comment.
6979         * thread.c (set_executing_thread): New.
6980         (set_executing): Use it.
6981         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6982         Remove references to stop_pc.
6983
6984 2018-06-28  Pedro Alves  <palves@redhat.com>
6985
6986         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6987         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6988
6989 2018-06-28  Tom Tromey  <tom@tromey.com>
6990
6991         * coffread.c (coff_symfile_finish): Update.
6992         * xcoffread.c (xcoff_symfile_finish): Update.
6993         * elfread.c (elf_symfile_finish): Update.
6994         * symfile.h (dwarf2_free_objfile): Don't declare.
6995         * dwarf2read.c (_initialize_dwarf2_read): Use
6996         register_objfile_data_with_cleanup.
6997         (dwarf2_free_objfile): Now static.  Change signature.
6998
6999 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7000
7001         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7002         option "-o" to add-symbol-file-load to add an offset to each
7003         section's load address.
7004         * symfile.c (set_objfile_default_section_offset): New function.
7005
7006 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7007
7008         * symfile.c (add_symbol_file_command): Make sure that sections
7009         with the same name are sorted in the same order.
7010
7011 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7012
7013         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7014         require the second argument.  If omitted, load sections at the
7015         addresses specified in the file.
7016
7017 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7018
7019         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7020         (_initialize_symfile): Add option "-o" to symbol-file to add an
7021         offset to each section of the symbol file.
7022
7023 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7024
7025         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7026
7027 2018-06-27  Tom Tromey  <tom@tromey.com>
7028
7029         * stack.c (_initialize_stack): Update "func" help text.
7030
7031 2018-06-27  Tom Tromey  <tom@tromey.com>
7032
7033         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7034         std::vector.
7035         (unwind_infopy_str, pyuw_create_unwind_info)
7036         (unwind_infopy_add_saved_register, pyuw_sniffer)
7037         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7038         Update.
7039         (struct saved_reg): Add constructor.
7040         <value>: Now a gdbpy_ref<>.
7041
7042 2018-06-27  Tom Tromey  <tom@tromey.com>
7043
7044         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7045
7046 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7047
7048         * gdb-gdb.py.in: Format using autopep8.
7049
7050 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7051
7052         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7053         (type_lookup_function): Recognize CORE_ADDR values.
7054
7055 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7056
7057         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7058         print tag_name.
7059
7060 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7061
7062         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7063         <__lt__>: Add.
7064
7065 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7066
7067         * gdb-gdb.py: Move to...
7068         * gdb-gdb.py.in: ... here.
7069         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7070         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7071         dependencies.
7072         (distclean): Remove gdb-gdb.py when cleaning.
7073         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7074         * configure: Re-generate.
7075
7076 2018-06-27  Pedro Alves  <palves@redhat.com>
7077
7078         * proc-service.c (get_ps_regcache): New.
7079         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7080         (ps_lsetfpregs): Use it.
7081
7082 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7083
7084         PR gdb/21695
7085         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7086         declaration.
7087         (dwarf_decode_lines_1): Adjust.
7088
7089 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7090
7091         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7092         override.
7093         <info_proc>: Likewise.
7094
7095 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7096
7097         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7098         to windows_fetch_one_register, and only handle the case of
7099         fetching one register.  Move the code that reloads the context
7100         and iterates over all registers if R is negative to...
7101         (windows_nat_target::fetch_registers): ... here.
7102         (do_windows_store_inferior_registers): Rename to
7103         windows_store_one_register, and only handle the case of storing
7104         one register.  Move the code that handles the case where r is
7105         negative to...
7106         (windows_nat_target::store_registers) ... here.
7107
7108 2018-06-26  Tom Tromey  <tom@tromey.com>
7109
7110         PR rust/22574:
7111         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7112         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7113         Update.
7114         (rust_internal_print_type): Add podata parameter.
7115         (rust_print_type): Update.
7116
7117 2018-06-26  Tom Tromey  <tom@tromey.com>
7118
7119         * typeprint.h (struct print_offset_data) <update, finish,
7120         maybe_print_hole>: New methods.
7121         <indentation>: New constant.
7122         * typeprint.c (print_offset_data::indentation): Define.
7123         (print_offset_data::maybe_print_hole, print_offset_data::update)
7124         (print_offset_data::finish): Move from c-typeprint.c and rename.
7125         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7126         (print_spaces_filtered_with_print_options): Update.
7127         (c_print_type_union_field_offset, maybe_print_hole)
7128         (c_print_type_struct_field_offset): Move to typeprint.c and
7129         rename.
7130         (c_type_print_base_struct_union): Update.
7131
7132 2018-06-25  Pedro Alves  <palves@redhat.com>
7133
7134         * gdbthread.h (thread_info_ref, delete_thread)
7135         (delete_thread_silent, first_thread_of_inferior)
7136         (any_thread_of_inferior, switch_to_thread)
7137         (enable_thread_stack_temporaries)
7138         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7139         (get_last_thread_stack_temporary)
7140         (value_in_thread_stack_temporaries, can_access_registers_thread):
7141         Spell out "struct thread_info" instead of just "thread_info".
7142         * inferior.h (notice_new_inferior): Likewise.
7143
7144 2018-06-25  Pedro Alves  <palves@redhat.com>
7145
7146         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7147         pass thread_info pointer to delete_thread.
7148         (windows_nat_target::detach): Pass inferior pointer to
7149         detach_inferior.
7150         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7151         delete_thread.
7152         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7153         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7154         and pass a thread_info pointer to delete_thread.
7155         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7156         pass thread_info pointer to delete_thread.
7157         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7158         delete_thread_silent call.
7159         * procfs.c (procfs_target::detach): Pass inferior pointer to
7160         detach_inferior.
7161         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7162         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7163         delete_thread_silent call.
7164         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7165         pass thread_info pointer to delete_thread.
7166         (windows_nat_target::detach): Pass inferior pointer to
7167         delete_inferior.
7168
7169 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7170
7171         * regcache.c (readable_regcache::read_part): Fix asserts.
7172         (reg_buffer::raw_collect_part): New function.
7173         (regcache::write_part): Fix asserts.
7174         (reg_buffer::raw_supply_part): New function.
7175         (regcache::transfer_regset_register): New helper function.
7176         (regcache::transfer_regset): Call new functions.
7177         (regcache_supply_regset): Use gdb_byte*.
7178         (regcache::supply_regset): Likewise.
7179         (regcache_collect_regset): Likewise.
7180         (regcache::collect_regset): Likewise.
7181         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7182         (reg_buffer::raw_supply_part): Likewise.
7183         (regcache::transfer_regset_register): Likewise.
7184         (regcache::transfer_regset): Use gdb_byte*.
7185
7186 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7187
7188         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7189
7190 2018-06-21  Pedro Alves  <palves@redhat.com>
7191
7192         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7193         instead of a ptid_t.  All callers adjusted.
7194         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7195         adjusted.
7196         (print_ada_task_info, display_current_task_id, task_command_1):
7197         Adjust.
7198         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7199         inferior_thread.
7200         (breakpoint_kind): Adjust.
7201         (remove_breakpoints_pid): Rename to ...
7202         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7203         pointer.  All callers adjusted.
7204         (bpstat_clear_actions): Use inferior_thread.
7205         (get_bpstat_thread): New.
7206         (bpstat_do_actions): Use it.
7207         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7208         to take a thread_info pointer.  All callers adjusted.
7209         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7210         (breakpoint_re_set_thread): Use inferior_thread.
7211         * breakpoint.h (struct inferior): Forward declare.
7212         (bpstat_stop_status): Update.
7213         (remove_breakpoints_pid): Delete.
7214         (remove_breakpoints_inf): New.
7215         * bsd-uthread.c (bsd_uthread_target::wait)
7216         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7217         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7218         (maint_btrace_packet_history_cmd)
7219         (maint_btrace_clear_packet_history_cmd): Adjust.
7220         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7221         inferior_thread.
7222         * cli/cli-interp.c: Include "inferior.h".
7223         * common/refcounted-object.h (struct
7224         refcounted_object_ref_policy): New.
7225         * compile/compile-object-load.c: Include gdbthread.h.
7226         (store_regs): Use inferior_thread.
7227         * corelow.c (core_target::close): Use current_inferior.
7228         (core_target_open): Adjust to use first_thread_of_inferior and use
7229         the current inferior.
7230         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7231         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7232         <thread>: ... this new field.  All references adjusted.
7233         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7234         Take a thread_info pointer instead of a ptid_t.
7235         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7236         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7237         thread_info pointer instead of a ptid_t.
7238         * elfread.c: Include "inferior.h".
7239         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7240         Use inferior_thread.
7241         * eval.c (evaluate_subexp): Likewise.
7242         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7243         inferior_thread.
7244         * gdb_proc_service.h (struct thread_info): Forward declare.
7245         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7246         <thread>: ... this new field.  All references adjusted.
7247         * gdbarch.h, gdbarch.c: Regenerate.
7248         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7249         'thread' parameter.  All implementations and callers adjusted.
7250         * gdbthread.h (thread_info) <set_running>: New method.
7251         (delete_thread, delete_thread_silent): Take a thread_info pointer
7252         instead of a ptid.
7253         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7254         (first_thread_of_process): Delete, replaced by ...
7255         (first_thread_of_inferior): ... this new function.  All callers
7256         adjusted.
7257         (any_live_thread_of_process): Delete, replaced by ...
7258         (any_live_thread_of_inferior): ... this new function.  All callers
7259         adjusted.
7260         (switch_to_thread, switch_to_no_thread): Declare.
7261         (is_executing): Delete.
7262         (enable_thread_stack_temporaries): Update comment.
7263         <enable_thread_stack_temporaries>: Take a thread_info pointer
7264         instead of a ptid_t.  Incref the thread.
7265         <~enable_thread_stack_temporaries>: Decref the thread.
7266         <m_ptid>: Delete
7267         <m_thr>: New.
7268         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7269         (get_last_thread_stack_temporary)
7270         (value_in_thread_stack_temporaries, can_access_registers_thread):
7271         Take a thread_info pointer instead of a ptid_t.  All callers
7272         adjusted.
7273         * infcall.c (get_call_return_value): Use inferior_thread.
7274         (run_inferior_call): Work with thread pointers instead of ptid_t.
7275         (call_function_by_hand_dummy): Work with thread pointers instead
7276         of ptid_t.  Use thread_info_ref.
7277         * infcmd.c (proceed_thread_callback): Access thread's state
7278         directly.
7279         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7280         access thread's state directly.
7281         (continue_command): Use inferior_thread.
7282         (info_program_command): Use find_thread_ptid and access thread
7283         state directly.
7284         (proceed_after_attach_callback): Use thread state directly.
7285         (notice_new_inferior): Take a thread_info pointer instead of a
7286         ptid_t.  All callers adjusted.
7287         (exit_inferior): Take an inferior pointer instead of a pid.  All
7288         callers adjusted.
7289         (exit_inferior_silent): New.
7290         (detach_inferior): Delete.
7291         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7292         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7293         (detach_inferior_command, kill_inferior_command): Use
7294         find_inferior_id instead of valid_gdb_inferior_id and
7295         gdb_inferior_id_to_pid.
7296         (inferior_command): Use inferior and thread pointers.
7297         * inferior.h (struct thread_info): Forward declare.
7298         (notice_new_inferior): Take a thread_info pointer instead of a
7299         ptid_t.  All callers adjusted.
7300         (detach_inferior): Delete declaration.
7301         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7302         instead of a pid.  All callers adjusted.
7303         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7304         (valid_gdb_inferior_id): Delete.
7305         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7306         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7307         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7308         ...
7309         <inf>: ... this new field.
7310         <step_ptid>: Delete, replaced by ...
7311         <step_thread>: ... this new field.
7312         (get_displaced_stepping_state): Take an inferior pointer instead
7313         of a pid.  All callers adjusted.
7314         (displaced_step_in_progress_any_inferior): Adjust.
7315         (displaced_step_in_progress_thread): Take a thread pointer instead
7316         of a ptid_t.  All callers adjusted.
7317         (displaced_step_in_progress, add_displaced_stepping_state): Take
7318         an inferior pointer instead of a pid.  All callers adjusted.
7319         (get_displaced_step_closure_by_addr): Adjust.
7320         (remove_displaced_stepping_state): Take an inferior pointer
7321         instead of a pid.  All callers adjusted.
7322         (displaced_step_prepare_throw, displaced_step_prepare)
7323         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7324         All callers adjusted.
7325         (start_step_over): Adjust.
7326         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7327         displaced step queue.
7328         (do_target_resume): Adjust.
7329         (fetch_inferior_event): Use inferior_thread.
7330         (context_switch, get_inferior_stop_soon): Take an
7331         execution_control_state pointer instead of a ptid_t.  All callers
7332         adjusted.
7333         (switch_to_thread_cleanup): Delete.
7334         (stop_all_threads): Use scoped_restore_current_thread.
7335         * inline-frame.c: Include "gdbthread.h".
7336         (inline_state) <inline_state>: Take a thread pointer instead of a
7337         ptid_t.  All callers adjusted.
7338         <ptid>: Delete, replaced by ...
7339         <thread>: ... this new field.
7340         (find_inline_frame_state): Take a thread pointer instead of a
7341         ptid_t.  All callers adjusted.
7342         (skip_inline_frames, step_into_inline_frame)
7343         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7344         pointer instead of a ptid_t.  All callers adjusted.
7345         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7346         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7347         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7348         pointers directly.
7349         * linux-nat.c (get_detach_signal): Likewise.
7350         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7351         (thread_db_notice_clone): Adjust.
7352         (thread_db_find_new_threads_silently)
7353         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7354         a thread pointer instead of a ptid_t.  All callers adjusted.
7355         * mi/mi-cmd-var.c: Include "inferior.h".
7356         (mi_cmd_var_update_iter): Update to use thread pointers.
7357         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7358         inferior directly.
7359         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7360         out to ...
7361         (mi_output_running): ... this new function.
7362         (mi_on_resume_1): Adjust to use it.
7363         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7364         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7365         directly.
7366         (interrupt_thread_callback): : Adjust to use thread and inferior
7367         pointers.
7368         * proc-service.c: Include "gdbthread.h".
7369         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7370         * progspace-and-thread.c: Include "inferior.h".
7371         * progspace.c: Include "inferior.h".
7372         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7373         hold a reference to an inferior_object.
7374         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7375         inferior_thread.
7376         * python/py-inferior.c (struct inferior_object): Give the type a
7377         tag name instead of a typedef.
7378         (python_on_normal_stop): No need to check if the current thread is
7379         listed.
7380         (inferior_to_inferior_object): Change return type to
7381         inferior_object.  All callers adjusted.
7382         (find_thread_object): Delete, bits factored out to ...
7383         (thread_to_thread_object): ... this new function.
7384         * python/py-infthread.c (create_thread_object): Use
7385         inferior_to_inferior_object.
7386         (thpy_is_stopped): Use thread pointer directly.
7387         (gdbpy_selected_thread): Use inferior_thread.
7388         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7389         field, replaced with ...
7390         <thread>: ... this new field.  All users adjusted.
7391         (btpy_insn_or_gap_new): Drop const.
7392         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7393         callers adjusted.
7394         * python/py-record.c: Include "gdbthread.h".
7395         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7396         a ptid_t.  All callers adjusted.
7397         (gdbpy_current_recording): Use inferior_thread.
7398         * python/py-record.h (recpy_record_object) <ptid>: Delete
7399         field, replaced with ...
7400         <thread>: ... this new field.  All users adjusted.
7401         (recpy_element_object) <ptid>: Delete
7402         field, replaced with ...
7403         <thread>: ... this new field.  All users adjusted.
7404         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7405         a ptid_t.  All callers adjusted.
7406         * python/py-threadevent.c: Include "gdbthread.h".
7407         (get_event_thread): Use thread_to_thread_object.
7408         * python/python-internal.h (struct inferior_object): Forward
7409         declare.
7410         (find_thread_object, find_inferior_object): Delete declarations.
7411         (thread_to_thread_object, inferior_to_inferior_object): New
7412         declarations.
7413         * record-btrace.c: Include "inferior.h".
7414         (require_btrace_thread): Use inferior_thread.
7415         (record_btrace_frame_sniffer)
7416         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7417         (get_thread_current_frame): Use scoped_restore_current_thread and
7418         switch_to_thread.
7419         (get_thread_current_frame): Use thread pointer directly.
7420         (record_btrace_replay_at_breakpoint): Use thread's inferior
7421         pointer directly.
7422         * record-full.c: Include "inferior.h".
7423         * regcache.c: Include "gdbthread.h".
7424         (get_thread_arch_regcache): Use the inferior's address space
7425         directly.
7426         (get_thread_regcache, registers_changed_thread): New.
7427         * regcache.h (get_thread_regcache(thread_info *thread)): New
7428         overload.
7429         (registers_changed_thread): New.
7430         (remote_target) <remote_detach_1>: Swap order of parameters.
7431         (remote_add_thread): <remote_add_thread>: Return the new thread.
7432         (get_remote_thread_info(ptid_t)): New overload.
7433         (remote_target::remote_notice_new_inferior): Use thread pointers
7434         directly.
7435         (remote_target::process_initial_stop_replies): Use
7436         thread_info::set_running.
7437         (remote_target::remote_detach_1, remote_target::detach)
7438         (extended_remote_target::detach): Adjust.
7439         * stack.c (frame_show_address): Use inferior_thread.
7440         * target-debug.h (target_debug_print_thread_info_pp): New.
7441         * target-delegates.c: Regenerate.
7442         * target.c (default_thread_address_space): Delete.
7443         (memory_xfer_partial_1): Use current_inferior.
7444         (target_detach): Use current_inferior.
7445         (target_thread_address_space): Delete.
7446         (generic_mourn_inferior): Use current_inferior.
7447         * target.h (struct target_ops) <thread_address_space>: Delete.
7448         (target_thread_address_space): Delete.
7449         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
7450         pointers directly.
7451         (delete_thread_1, delete_thread, delete_thread_silent): Take a
7452         thread pointer instead of a ptid_t.  Adjust all callers.
7453         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
7454         (first_thread_of_process): Delete, replaced by ...
7455         (first_thread_of_inferior): ... this new function.  All callers
7456         adjusted.
7457         (any_thread_of_process): Rename to ...
7458         (any_thread_of_inferior): ... this, and take an inferior pointer.
7459         (any_live_thread_of_process): Rename to ...
7460         (any_live_thread_of_inferior): ... this, and take an inferior
7461         pointer.
7462         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7463         (value_in_thread_stack_temporaries)
7464         (get_last_thread_stack_temporary): Take a thread pointer instead
7465         of a ptid_t.  Adjust all callers.
7466         (thread_info::set_running): New.
7467         (validate_registers_access): Use inferior_thread.
7468         (can_access_registers_ptid): Rename to ...
7469         (can_access_registers_thread): ... this, and take a thread
7470         pointer.
7471         (print_thread_info_1): Adjust to compare thread pointers instead
7472         of ptids.
7473         (switch_to_no_thread, switch_to_thread): Make extern.
7474         (scoped_restore_current_thread::~scoped_restore_current_thread):
7475         Use m_thread pointer directly.
7476         (scoped_restore_current_thread::scoped_restore_current_thread):
7477         Use inferior_thread.
7478         (thread_command): Use thread pointer directly.
7479         (thread_num_make_value_helper): Use inferior_thread.
7480         * top.c (execute_command): Use inferior_thread.
7481         * tui/tui-interp.c: Include "inferior.h".
7482         * varobj.c (varobj_create): Use inferior_thread.
7483         (value_of_root_1): Use find_thread_global_id instead of
7484         global_thread_id_to_ptid.
7485
7486 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
7487
7488         * regcache.c (readable_regcache::read_part): Avoid memcpy when
7489         possible.
7490         (regcache::write_part): Likewise.
7491         (readable_regcache::cooked_read_part): Update comment.
7492         (readable_regcache::cooked_write_part): Likewise.
7493         * regcache.h: (readable_regcache::read_part): Likewise.
7494         (regcache::write_part): Likewise.
7495
7496 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
7497             Dirk Schubert  <dirk.schubert@arm.com>
7498
7499         * aarch64-linux-nat.c (post_attach): New.
7500         (aarch64_linux_nat_target::post_attach): Override post_attach to
7501         record the number of hardware debug registers.
7502
7503 2018-06-20  Tom Tromey  <tom@tromey.com>
7504
7505         * python/py-param.c (add_setshow_generic): Make parameters const.
7506         (parmpy_init): Update.
7507
7508 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7509
7510         * regcache.h (regcache_cooked_read_ftype): Rename to...
7511         (register_read_ftype): ...this, change type to function_view.
7512         (class reg_buffer) <save>: Remove src parameter.
7513         (readonly_detached_regcache) <readonly_detached_regcache>: Make
7514         parameter non-const in first overload.  Remove src parameter in
7515         second overload.
7516         * regcache.c (do_cooked_read): Remove.
7517         (readonly_detached_regcache::readonly_detached_regcache): Make
7518         parameter non-const, adjust call to other constructor.
7519         (reg_buffer::save): Remove src parameter.
7520         * frame.c (do_frame_register_read): Remove.
7521         (frame_save_as_regcache): Use lambda function.
7522         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
7523         parameter to ppu2spu_data *.
7524         (ppu2spu_sniffer): Use lambda function.
7525
7526 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7527
7528         * record-full.c (record_full_target::insert_breakpoint): Remove
7529         "struct" keyword, add const.
7530
7531 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
7532
7533         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
7534         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
7535         * configure.ac: Remove AC_PREREQ, add missing quoting.
7536         * gnulib/configure.ac: Modernize usage of
7537         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
7538         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
7539         (AUTOMAKE_VERSION): Bump to 1.15.1.
7540         * configure: Re-generate.
7541         * config.in: Re-generate.
7542         * aclocal.m4: Re-generate.
7543         * gnulib/aclocal.m4: Re-generate.
7544         * gnulib/config.in: Re-generate.
7545         * gnulib/configure: Re-generate.
7546         * gnulib/import/Makefile.in: Re-generate.
7547
7548 2018-06-19  Pedro Alves  <palves@redhat.com>
7549
7550         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
7551         (lookup_minimal_symbol_by_pc_section): ... here with
7552         gdb_assert_not_reached added.
7553
7554 2018-06-19  Pedro Alves  <palves@redhat.com>
7555
7556         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
7557         parameter with a block parameter.  Compare location's block symbol
7558         with the frame's block instead of addresses.
7559         (skip_inline_frames): Pass the current block instead of the
7560         frame's address.  Break out as soon as we determine the frame
7561         should not be skipped.
7562
7563 2018-06-18  Tom Tromey  <tom@tromey.com>
7564
7565         * solib-aix.c (solib_aix_get_section_offsets): Return
7566         unique_xmalloc_ptr.
7567         (solib_aix_solib_create_inferior_hook): Update.
7568
7569 2018-06-18  Tom Tromey  <tom@tromey.com>
7570
7571         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
7572
7573 2018-06-18  Tom Tromey  <tom@tromey.com>
7574
7575         * solib-frv.c (frv_relocate_main_executable): Use
7576         unique_xmalloc_ptr.
7577         * solib-dsbt.c (dsbt_relocate_main_executable): Use
7578         unique_xmalloc_ptr.
7579
7580 2018-06-18  Tom Tromey  <tom@tromey.com>
7581
7582         * objfiles.h (inhibit_section_map_updates): Update.
7583         (resume_section_map_updates, resume_section_map_updates_cleanup):
7584         Remove.
7585         * solib-svr4.c (svr4_handle_solib_event): Update.
7586         * objfiles.c (inhibit_section_map_updates): Return
7587         scoped_restore_tmpl<int>.
7588         (resume_section_map_updates, resume_section_map_updates_cleanup):
7589         Remove.
7590
7591 2018-06-18  Tom Tromey  <tom@tromey.com>
7592
7593         * valprint.h (read_string): Update.
7594         * valprint.c (read_string): Change type of "buffer".
7595         (val_print_string): Update.
7596         * python/py-value.c (valpy_string): Update.
7597         * language.h (struct language_defn) <la_get_string>: Change
7598         type of "buffer".
7599         (default_get_string, c_get_string): Update.
7600         * language.c (default_get_string): Change type of "buffer".
7601         * guile/scm-value.c (gdbscm_value_to_string): Update.
7602         * c-lang.c (c_get_string): Change type of "buffer".
7603
7604 2018-06-18  Tom Tromey  <tom@tromey.com>
7605
7606         * ser-mingw.c (struct pipe_state_destroyer): New.
7607         (pipe_state_up): New typedef.
7608         (cleanup_pipe_state): Remove.
7609         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
7610
7611 2018-06-18  Tom Tromey  <tom@tromey.com>
7612
7613         * rust-lang.h (rust_yyerror): Don't declare.
7614         * rust-lang.c (rust_language_defn): Update.
7615         * rust-exp.y (yyerror): Now static.
7616         * parse.c (parse_exp_in_context_1): Update.
7617         * p-lang.h (p_yyerror): Don't declare.
7618         * p-lang.c (p_language_defn): Update.
7619         * p-exp.y (yyerror): Now static.
7620         * opencl-lang.c (opencl_language_defn): Update.
7621         * objc-lang.c (objc_language_defn): Update.
7622         * m2-lang.h (m2_yyerror): Don't declare.
7623         * m2-lang.c (m2_language_defn): Update.
7624         * m2-exp.y (yyerror): Now static.
7625         * language.h (struct language_defn) <la_error>: Remove.
7626         * language.c (unk_lang_error): Remove.
7627         (unknown_language_defn, auto_language_defn): Remove.
7628         * go-lang.h (go_yyerror): Don't declare.
7629         * go-lang.c (go_language_defn): Update.
7630         * go-exp.y (yyerror): Now static.
7631         * f-lang.h (f_yyerror): Don't declare.
7632         * f-lang.c (f_language_defn): Update.
7633         * f-exp.y (yyerror): Now static.
7634         * d-lang.h (d_yyerror): Don't declare.
7635         * d-lang.c (d_language_defn): Update.
7636         * d-exp.y (yyerror): Now static.
7637         * c-lang.h (c_yyerror): Don't declare.
7638         * c-lang.c (c_language_defn, cplus_language_defn)
7639         (asm_language_defn, minimal_language_defn): Update.
7640         * c-exp.y (yyerror): Now static.
7641         * ada-lang.h (ada_yyerror): Don't declare.
7642         * ada-lang.c (ada_language_defn): Update.
7643         * ada-exp.y (yyerror): Now static.
7644
7645 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7646
7647         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
7648         (store_sveregs_to_thread): Likewise.
7649         (aarch64_linux_fetch_inferior_registers): Check for SVE.
7650         (aarch64_linux_store_inferior_registers): Likewise.
7651         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
7652         function.
7653         (aarch64_sve_regs_copy_to_regcache): Likewise.
7654         (aarch64_sve_regs_copy_from_regcache): Likewise.
7655         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
7656         declaration.
7657         (aarch64_sve_regs_copy_to_regcache): Likewise.
7658         (aarch64_sve_regs_copy_from_regcache): Likewise.
7659         (sve_context): Structure from Linux headers.
7660         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
7661         (SVE_SIG_ZREG_SIZE): Likewise.
7662         (SVE_SIG_PREG_SIZE): Likewise.
7663         (SVE_SIG_FFR_SIZE): Likewise.
7664         (SVE_SIG_REGS_OFFSET): Likewise.
7665         (SVE_SIG_ZREGS_OFFSET): Likewise.
7666         (SVE_SIG_ZREG_OFFSET): Likewise.
7667         (SVE_SIG_ZREGS_SIZE): Likewise.
7668         (SVE_SIG_PREGS_OFFSET): Likewise.
7669         (SVE_SIG_PREG_OFFSET): Likewise.
7670         (SVE_SIG_PREGS_SIZE): Likewise.
7671         (SVE_SIG_FFR_OFFSET): Likewise.
7672         (SVE_SIG_REGS_SIZE): Likewise.
7673         (SVE_SIG_CONTEXT_SIZE): Likewise.
7674         (SVE_PT_REGS_MASK): Likewise.
7675         (SVE_PT_REGS_FPSIMD): Likewise.
7676         (SVE_PT_REGS_SVE): Likewise.
7677         (SVE_PT_VL_INHERIT): Likewise.
7678         (SVE_PT_VL_ONEXEC): Likewise.
7679         (SVE_PT_REGS_OFFSET): Likewise.
7680         (SVE_PT_FPSIMD_OFFSET): Likewise.
7681         (SVE_PT_FPSIMD_SIZE): Likewise.
7682         (SVE_PT_SVE_ZREG_SIZE): Likewise.
7683         (SVE_PT_SVE_PREG_SIZE): Likewise.
7684         (SVE_PT_SVE_FFR_SIZE): Likewise.
7685         (SVE_PT_SVE_FPSR_SIZE): Likewise.
7686         (SVE_PT_SVE_FPCR_SIZE): Likewise.
7687         (__SVE_SIG_TO_PT): Likewise.
7688         (SVE_PT_SVE_OFFSET): Likewise.
7689         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
7690         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
7691         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
7692         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
7693         (SVE_PT_SVE_PREG_OFFSET): Likewise.
7694         (SVE_PT_SVE_PREGS_SIZE): Likewise.
7695         (SVE_PT_SVE_FFR_OFFSET): Likewise.
7696         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
7697         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
7698         (SVE_PT_SVE_SIZE): Likewise.
7699         (SVE_PT_SIZE): Likewise.
7700         (HAS_SVE_STATE): New define.
7701
7702 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7703
7704         * nat/aarch64-sve-linux-sigcontext.h: New file.
7705         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
7706         new files.
7707         (SVE_VQ_MIN): Likewise.
7708         (SVE_VQ_MAX): Likewise.
7709         (SVE_VL_MIN): Likewise.
7710         (SVE_VL_MAX): Likewise.
7711         (SVE_NUM_ZREGS): Likewise.
7712         (SVE_NUM_PREGS): Likewise.
7713         (sve_vl_valid): Likewise.
7714         (struct user_sve_header): Likewise.
7715
7716 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
7717             Richard Bunt <Richard.Bunt@arm.com>
7718
7719         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7720         was requested by GDB.
7721
7722 2018-06-15  Tom de Vries  <tdevries@suse.de>
7723
7724         * MAINTAINERS (Write After Approval): Add Tom de Vries.
7725
7726 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
7727
7728         * gnulib/update-gnulib.sh: Print expected versions of
7729         autoconf/aclocal.
7730
7731 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
7732
7733         * arch-utils.c (default_type_align): Use type_length_units.
7734         * gdbtypes.c (type_align): Use type_length_units.
7735
7736 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7737
7738         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7739         of 'define' command.
7740
7741 2018-06-14  Tom de Vries  <tdevries@suse.de>
7742
7743         PR cli/22573
7744         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7745         get_no_prettyformat_print_options.
7746
7747 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7748
7749         * sparc-nat.h: Include target.h.
7750         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7751         <fetch_registers>: Remove this argument in function call.
7752         <store_registers>: Remove this argument in function call, remove
7753         extra semicolon.
7754         <low_forget_process>: Call sparc64_forget_process instead of
7755         sparc_forget_process.
7756
7757 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7758
7759         * procfs.c (_initialize_procfs): Use add_inf_child_target.
7760         (procfs_target::make_corefile_notes): Adjust to new
7761         target_read_alloc return type.
7762
7763 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7764             Stephen Roberts  <stephen.roberts@arm.com>
7765
7766         PR gdb/22882
7767         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7768         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7769         Move should_notify_stop local into more inner scope.
7770
7771 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7772             Stephen Roberts  <stephen.roberts@arm.com>
7773
7774         PR gdb/22882
7775         * infrun.c (resume_1): Add call to mark_async_event_handler.
7776
7777 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7778
7779         * infrun.c (do_target_wait): Change old version of $pc printed.
7780
7781 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7782
7783         * dwarf2read.c (read_index_from_section): Rename to...
7784         (read_gdb_index_from_section): ... this, update all callers.
7785         (dwarf2_read_index): Rename to...
7786         (dwarf2_read_gdb_index): ... this, update all callers.
7787
7788 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7789
7790         * hppa-linux-nat.c
7791         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7792         hppa_linux_nat_target::fetch_registers.
7793
7794 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7795
7796         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7797         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7798         (AARCH64_DWARF_SVE_FFR): Likewise.
7799         (AARCH64_DWARF_SVE_P0): Likewise.
7800         (AARCH64_DWARF_SVE_Z0): Likewise.
7801
7802 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7803
7804         * common/common-regcache.h (raw_compare): New function.
7805         * regcache.c (regcache::raw_compare): Likewise.
7806         * regcache.h (regcache::raw_compare): New declaration.
7807
7808 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7809
7810         * common/common-regcache.h (reg_buffer_common): New structure.
7811         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7812         (reg_buffer::raw_supply): Likewise.
7813         (reg_buffer::raw_supply_integer): Likewise.
7814         (reg_buffer::raw_supply_zeroed): Likewise.
7815         (reg_buffer::raw_collect): Likewise.
7816         (reg_buffer::raw_collect_integer): Likewise.
7817         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7818         (reg_buffer::raw_supply): Likewise.
7819         (reg_buffer::raw_supply_integer): Likewise.
7820         (reg_buffer::raw_supply_zeroed): Likewise.
7821         (reg_buffer::raw_collect): Likewise.
7822         (reg_buffer::raw_collect_integer): Likewise.
7823
7824 2018-06-10  Tom Tromey  <tom@tromey.com>
7825
7826         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7827         (class remote_state) <stop_reply_queue>: Now std::vector.
7828         (remote_state::~remote_state)
7829         (remote_target::stop_reply_queue_length): Update.
7830         (struct queue_iter_param, remove_child_of_pending_fork)
7831         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7832         (check_pending_event_prevents_wildcard_vcont_callback)
7833         (remove_stop_reply_for_inferior)
7834         (remove_stop_reply_of_remote_state)
7835         (remote_notif_remove_once_on_match)
7836         (stop_reply_match_ptid_and_ws)
7837         (remote_kill_child_of_pending_fork): Remove.
7838         (remote_target::remove_new_fork_children)
7839         (remote_target::check_pending_events_prevent_wildcard_vcont)
7840         (remote_target::discard_pending_stop_replies)
7841         (remote_target::discard_pending_stop_replies_in_queue)
7842         (remote_target::remote_notif_remove_queued_reply)
7843         (remote_target::queued_stop_reply)
7844         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7845         (remote_target::wait, remote_target::kill_new_fork_children)
7846         (remote_target::async): Update.
7847
7848 2018-06-10  Tom Tromey  <tom@tromey.com>
7849
7850         * record-full.c (record_full_arch_list_cleanups): Remove.
7851         (record_full_message): Use try/catch.
7852         (record_full_wait_cleanups): Remove.
7853         (record_full_wait_1): Use try/catch.
7854         (record_full_restore): Likewise.
7855
7856 2018-06-10  Tom Tromey  <tom@tromey.com>
7857
7858         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7859         declare VEC.  Add constructor.
7860         <in_target_beneath>: Now bool.
7861         (record_full_breakpoints): Now a std::vector, static.
7862         (record_full_sync_record_breakpoints)
7863         (record_full_init_record_breakpoints)
7864         (record_full_target::insert_breakpoint)
7865         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7866
7867 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7868
7869         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7870         * serial.c (serial_interface_lookup): Remove struct keyword.
7871
7872 2018-06-10  Tom Tromey  <tom@tromey.com>
7873
7874         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7875         method.
7876         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7877         a method.
7878         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7879         method.
7880         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7881         "beneath" as a method.
7882         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7883         Use "beneath" as a method.
7884
7885 2018-06-10  Tom Tromey  <tom@tromey.com>
7886
7887         * tracefile.c (struct trace_file_writer_deleter): New.
7888         <operator()>: Rename from trace_file_writer_xfree.
7889         (trace_file_writer_up): New typedef.
7890         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7891
7892 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7893
7894         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7895         <m_registers, m_register_status>: Change type to
7896         std::unique_ptr.
7897         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7898         XCNEWVEC.
7899
7900 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7901
7902         * common/common-regcache.h (enum register_status): Add
7903         underlying type "signed char".
7904         * regcache.h (reg_buffer) <m_register_status>: Change type to
7905         register_status *.
7906         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7907         register_status instead of signed char.
7908         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7909         (reg_buffer::get_register_status): Remove cast.
7910         (readable_regcache::raw_read): Remove cast.
7911         (readable_regcache::cooked_read): Remove cast.
7912
7913 2018-06-09  Tom Tromey  <tom@tromey.com>
7914
7915         * source.c (reverse_search_command, forward_search_command): Use
7916         scoped_fd.
7917
7918 2018-06-09  Tom Tromey  <tom@tromey.com>
7919
7920         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7921         (serial_ops_list): Now static, std::vector.
7922         (serial_interface_lookup, serial_add_interface): Update.
7923
7924 2018-06-09  Tom Tromey  <tom@tromey.com>
7925
7926         * dwarf2read.c (process_cu_includes): Update.
7927         (process_full_comp_unit): Update.
7928         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7929         std::vector.
7930
7931 2018-06-08  Paul Koning  <paul_koning@dell.com>
7932
7933         PR gdb/23252
7934
7935         * python/python.c (do_start_initialization):
7936         Avoid call to internal Python API.
7937         (init__gdb_module): New function.
7938
7939 2018-06-08  Gary Benson <gbenson@redhat.com>
7940
7941         * linux-thread-db.c (valprint.h): New include.
7942         (struct check_thread_db_info): New structure.
7943         (check_thread_db_on_load, tdb_testinfo): New static globals.
7944         (check_thread_db, check_thread_db_callback): New functions.
7945         (try_thread_db_load_1): Run integrity checks if requested.
7946         (maintenance_check_libthread_db): New function.
7947         (_initialize_thread_db): Register "maint check libthread-db"
7948         and "maint set/show check-libthread-db".
7949         * NEWS: Mention the above new commands.
7950
7951 2018-06-08  Tom Tromey  <tom@tromey.com>
7952
7953         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7954         now a method.
7955
7956 2018-06-08  Tom Tromey  <tom@tromey.com>
7957
7958         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7959
7960 2018-06-08  Tom Tromey  <tom@tromey.com>
7961
7962         * common/btrace-common.h (struct btrace_data): Add constructor,
7963         destructor, move assignment operator.
7964         <empty, clear, fini>: New methods.
7965         <format>: Initialize.
7966         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7967         (btrace_data_empty): Don't declare.
7968         * common/btrace-common.c (btrace_data_init): Remove.
7969         (btrace_data::fini): Rename from btrace_data_fini.
7970         (btrace_data::empty): Rename from btrace_data_empty.
7971         (btrace_data::clear): Rename from btrace_data_clear.  Return
7972         bool.
7973         * btrace.h (make_cleanup_btrace_data): Don't declare.
7974         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7975         (parse_xml_btrace): Update.
7976         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7977         (maint_btrace_clear_packet_history_cmd): Update.
7978
7979 2018-06-07  Pedro Alves  <palves@redhat.com>
7980
7981         * target.h (target_ops) <beneath>: Now a method.  All references
7982         updated.
7983         (class target_stack): New.
7984         * target.c (g_target_stack): New.
7985         (g_current_top_target): Delete.
7986         (current_top_target): Get the top target out of g_target_stack.
7987         (target_stack::push, target_stack::unpush): New.
7988         (push_target, unpush_target): Reimplement.
7989         (target_is_pushed): Reimplement in terms of g_target_stack.
7990         (target_ops::beneath, target_stack::find_beneath): New.
7991
7992 2018-06-07  Pedro Alves  <palves@redhat.com>
7993
7994         * target.h (find_target_beneath): Delete declaration.
7995         * target.c (find_target_beneath): Delete definition.
7996         * aix-thread.c: All callers of find_target_beneath adjusted to
7997         call target_ops::beneath instead.
7998         * bsd-uthread.c: Likewise.
7999         * linux-thread-db.c: Likewise.
8000         * ravenscar-thread.c: Likewise.
8001         * sol-thread.c: Likewise.
8002         * spu-multiarch.c: Likewise.
8003
8004 2018-06-07  Pedro Alves  <palves@redhat.com>
8005
8006         * target.h (target_ops) <beneath>: Now a method.  All references
8007         updated.
8008         (target_ops) <m_beneath>: New.
8009         * target.c (target_ops::beneath): New.
8010         * corelow.c: Adjust all references to target_ops::beneath.
8011         * linux-thread-db.c: Likewise.
8012         * make-target-delegates: Likewise.
8013         * record-btrace.c: Likewise.
8014         * record-full.c: Likewise.
8015         * remote.c: Likewise.
8016         * target.c: Likewise.
8017         * target-delegates.c: Regenerate.
8018
8019 2018-06-07  Pedro Alves  <palves@redhat.com>
8020
8021         * target.h (target_stack): Delete.
8022         (current_top_target): Declare function.
8023         * target.c (target_stack): Delete.
8024         (g_current_top_target): New.
8025         (current_top_target): New function.
8026         * auxv.c: Use current_top_target instead of target_stack
8027         throughout.
8028         * avr-tdep.c: Likewise.
8029         * breakpoint.c: Likewise.
8030         * corefile.c: Likewise.
8031         * elfread.c: Likewise.
8032         * eval.c: Likewise.
8033         * exceptions.c: Likewise.
8034         * frame.c: Likewise.
8035         * gdbarch-selftests.c: Likewise.
8036         * gnu-v3-abi.c: Likewise.
8037         * ia64-tdep.c: Likewise.
8038         * ia64-vms-tdep.c: Likewise.
8039         * infcall.c: Likewise.
8040         * infcmd.c: Likewise.
8041         * infrun.c: Likewise.
8042         * linespec.c: Likewise.
8043         * linux-tdep.c: Likewise.
8044         * minsyms.c: Likewise.
8045         * ppc-linux-nat.c: Likewise.
8046         * ppc-linux-tdep.c: Likewise.
8047         * procfs.c: Likewise.
8048         * regcache.c: Likewise.
8049         * remote.c: Likewise.
8050         * rs6000-tdep.c: Likewise.
8051         * s390-linux-nat.c: Likewise.
8052         * s390-tdep.c: Likewise.
8053         * solib-aix.c: Likewise.
8054         * solib-darwin.c: Likewise.
8055         * solib-dsbt.c: Likewise.
8056         * solib-spu.c: Likewise.
8057         * solib-svr4.c: Likewise.
8058         * solib-target.c: Likewise.
8059         * sparc-tdep.c: Likewise.
8060         * sparc64-tdep.c: Likewise.
8061         * spu-tdep.c: Likewise.
8062         * symfile.c: Likewise.
8063         * symtab.c: Likewise.
8064         * target-descriptions.c: Likewise.
8065         * target-memory.c: Likewise.
8066         * target.c: Likewise.
8067         * target.h: Likewise.
8068         * tracefile-tfile.c: Likewise.
8069         * tracepoint.c: Likewise.
8070         * valops.c: Likewise.
8071         * valprint.c: Likewise.
8072         * value.c: Likewise.
8073         * windows-tdep.c: Likewise.
8074         * mi/mi-main.c: Likewise.
8075
8076 2018-06-07  Tom Tromey  <tom@tromey.com>
8077
8078         * valprint.h (build_address_symbolic): Declare.
8079         * printcmd.c (print_address_symbolic): Update.
8080         (build_address_symbolic): Change "name" and "filename" to
8081         std::string.
8082         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8083         Update.
8084         * defs.h (build_address_symbolic): Remove declaration.
8085
8086 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8087
8088         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8089         (aarch64_vnv_type): Add function.
8090         (aarch64_pseudo_register_name): Add V regs for SVE.
8091         (aarch64_pseudo_register_type): Likewise.
8092         (aarch64_pseudo_register_reggroup_p): Likewise.
8093         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8094         (aarch64_pseudo_read_value): Add V regs for SVE.
8095         (aarch64_pseudo_write_2): Use V0 offset for SVE
8096         (aarch64_pseudo_write): Add V regs for SVE.
8097         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8098
8099 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8100
8101         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8102         (sve_vl_from_vq): Likewise.
8103
8104 2018-06-05  Tom Tromey  <tom@tromey.com>
8105
8106         * cli/cli-cmds.c (show_version): Update.
8107         * top.c (print_gdb_version): Add "interactive" parameter.
8108         Update.
8109         * main.c (captured_main_1): Update.
8110         * top.h (print_gdb_version): Add "interactive" parameter and a
8111         comment.
8112
8113 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8114
8115         * common/enum-flags.h: Add trailing semicolon to example in
8116         comment.
8117
8118 2018-06-05  Tom Tromey  <tom@tromey.com>
8119
8120         PR cli/12326:
8121         * NEWS: Add entry about pager.
8122         * utils.c (pagination_disabled_for_command): New global.
8123         (prompt_for_continue): Allow "c" response to prompt.
8124         (reinitialize_more_filter): Clear
8125         pagination_disabled_for_command.
8126         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8127
8128 2018-06-04  Tom Tromey  <tom@tromey.com>
8129
8130         * ada-lang.h (ada_lookup_symbol_list): Update.
8131         * ada-lang.c (resolve_subexp): Update.
8132         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8133         parameter.
8134         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8135         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8136         results parameter to std::vector.
8137         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8138         Update.
8139         * ada-exp.y (block_lookup): Update.
8140         (select_possible_type_sym): Change type of syms.  Remove nsyms
8141         parameter.
8142         (write_var_or_type, write_name_assoc): Update.
8143
8144 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8145
8146         * windows-nat.c (windows_nat_target::xfer_partial): Return
8147         TARGET_XFER_E_IO if we need to delegate to the target beneath
8148         but BENEATH is NULL.
8149
8150 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8151
8152         * Makefile.in (config.status): Add configure.nat as a
8153         dependency.
8154
8155 2018-06-04  Tom Tromey  <tom@tromey.com>
8156
8157         * cp-name-parser.y (cpname_state): Add method declarations.
8158         (HANDLE_QUAL): Update.
8159         (cpname_state::d_grab, cpname_state::fill_comp)
8160         (cpname_state::make_operator, cpname_state::make_dtor)
8161         (cpname_state::make_builtin_type, cpname_state::make_name)
8162         (cpname_state::d_qualify, cpname_state::d_int_type)
8163         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8164         (%union): Move earlier.
8165
8166 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8167
8168         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8169
8170 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8171
8172         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8173         (aarch64_pseudo_write_1): Likewise.
8174         (aarch64_pseudo_read_value): Use helper.
8175         (aarch64_pseudo_write): Likewise.
8176
8177 2018-06-04  Pedro Alves  <palves@redhat.com>
8178
8179         * darwin-nat.c (darwin_ops): Delete.
8180         (darwin_attach_pid): Use get_native_target.
8181
8182 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8183
8184         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8185         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8186
8187 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8188
8189         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8190         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8191         (aarch64_gdbarch_init): Check for SVE.
8192         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8193
8194 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8195
8196         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8197         * aarch64-tdep.h (aarch64_read_description): Likewise.
8198         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8199         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8200         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8201         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8202         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8203
8204 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8205
8206         * value.c (value_fetch_lazy_bitfield): New.
8207         (value_fetch_lazy_memory): New.
8208         (value_fetch_lazy_register): New.
8209         (value_fetch_lazy): Factor out to smaller functions.
8210
8211 2018-06-01  Tom Tromey  <tom@tromey.com>
8212
8213         * cp-name-parser.y (backslashable, represented): Now const.
8214
8215 2018-06-01  Tom Tromey  <tom@tromey.com>
8216
8217         * cp-name-parser.y: Include parser-defs.h.
8218         (parser_fprintf): Remove declaration.
8219
8220 2018-06-01  Tom Tromey  <tom@tromey.com>
8221
8222         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8223         %parse-param.
8224         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8225         (global_result): Remove globals.
8226         (struct cpname_state): New.
8227         (yyparse): Don't declare.
8228         (yylex, yyerror): Move declarations after %union.
8229         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8230         (make_name): Add state parameter.
8231         Update all callers.
8232         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8233         parameter.
8234         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8235         Update.
8236         (yylex): Add lvalp, state parameters.
8237         (yyerror): Add state parameter.
8238         (cp_demangled_name_to_comp): Update.
8239
8240 2018-06-01  Tom Tromey  <tom@tromey.com>
8241
8242         * cp-name-parser.y (parser_fprintf): Declare.
8243         (GDB_YY_REMAP_PREFIX): Define.
8244         Include yy-remap.h.  Don't redefine yy* identifiers.
8245
8246 2018-06-01  Tom Tromey  <tom@tromey.com>
8247
8248         * python/py-type.c (typy_legacy_template_argument): Update.
8249         * cp-support.h (cp_demangled_name_to_comp): Update.
8250         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8251         parameter to be a "std::string *".
8252         (main): Update.
8253
8254 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8255
8256         * ada-lex.l: Include "diagnostics.h" instead of
8257         "common/diagnostics.h".
8258         * unittests/environ-selftests.c: Likewise.
8259         * common/diagnostics.h: Moved to ../include.
8260
8261 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8262
8263         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8264         to language_mode_manual while calling breakpoint_re_set_one.
8265
8266 2018-06-01  Tom Tromey  <tom@tromey.com>
8267
8268         * valops.c (value_cast_structs, destructor_name_p): Update.
8269         * symtab.c (gdb_mangle_name): Update.
8270         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8271         Update.
8272         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8273         (pascal_object_print_value_fields, pascal_object_print_value):
8274         Update.
8275         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8276         * linespec.c (find_methods): Update.
8277         * gdbtypes.h (type_name_no_tag): Remove.
8278         (type_name_or_error): Rename from type_name_no_tag_or_error.
8279         * gdbtypes.c (type_name_no_tag): Remove.
8280         (type_name_or_error): Rename from type_name_no_tag_or_error.
8281         (lookup_struct_elt_type, check_typedef): Update.
8282         * expprint.c (print_subexp_standard): Update.
8283         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8284         * d-namespace.c (d_lookup_nested_symbol): Update.
8285         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8286         (cp_print_class_member): Update.
8287         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8288         * completer.c (add_struct_fields): Update.
8289         * c-typeprint.c (cp_type_print_derivation_info)
8290         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8291         Update.
8292         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8293         (ada_prefer_type, ada_is_exception_sym): Update.
8294
8295 2018-06-01  Tom Tromey  <tom@tromey.com>
8296
8297         * valops.c (enum_constant_from_type, value_namespace_elt)
8298         (value_maybe_namespace_elt): Update.
8299         * valarith.c (find_size_for_pointer_math): Update.
8300         * target-descriptions.c (make_gdb_type): Update.
8301         * symmisc.c (print_symbol): Update.
8302         * stabsread.c (define_symbol, read_type)
8303         (complain_about_struct_wipeout, add_undefined_type)
8304         (cleanup_undefined_types_1): Update.
8305         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8306         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8307         (rust_internal_print_type, rust_composite_type)
8308         (rust_evaluate_funcall, rust_evaluate_subexp)
8309         (rust_inclusive_range_type_p): Update.
8310         * python/py-type.c (typy_get_tag): Update.
8311         * p-typeprint.c (pascal_type_print_base): Update.
8312         * mdebugread.c (parse_symbol, parse_type): Update.
8313         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8314         Update.
8315         * guile/scm-type.c (gdbscm_type_tag): Update.
8316         * go-lang.c (sixg_string_p): Update.
8317         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8318         Update.
8319         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8320         (TYPE_TAG_NAME): Remove.
8321         * gdbtypes.c (type_name_no_tag): Simplify.
8322         (check_typedef, check_types_equal, recursive_dump_type)
8323         (copy_type_recursive, arch_composite_type): Update.
8324         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8325         in summary mode when needed.
8326         * eval.c (evaluate_funcall): Update.
8327         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8328         (process_structure_scope, read_enumeration_type)
8329         (read_namespace_type, read_module_type, determine_prefix): Update.
8330         * cp-support.c (inspect_type): Update.
8331         * coffread.c (process_coff_symbol, decode_base_type): Update.
8332         * c-varobj.c (c_is_path_expr_parent): Update.
8333         * c-typeprint.c (c_type_print_base_struct_union): Update.
8334         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8335         summary when using C language.
8336         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8337         (gen_maybe_namespace_elt): Update.
8338         * ada-lang.c (ada_type_name): Simplify.
8339         (empty_record, ada_template_to_fixed_record_type_1)
8340         (template_to_static_fixed_type)
8341         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8342
8343 2018-06-01  Tom Tromey  <tom@tromey.com>
8344
8345         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8346         c_print_type.
8347         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8348         (c_print_type): Update.
8349         (c_print_type): New overload.
8350         (c_type_print_varspec_prefix, c_type_print_args)
8351         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8352         (c_type_print_base_struct_union, c_type_print_base_1)
8353         (cp_type_print_method_args): Add "language" parameter.
8354         (c_type_print_base): Update.
8355         * c-lang.h (c_print_type): Add new overload.
8356
8357 2018-06-01  Tom Tromey  <tom@tromey.com>
8358
8359         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8360         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8361
8362 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8363
8364         * aarch64-tdep.c (aarch64_sve_register_names): New const
8365         var.
8366         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8367         (AARCH64_SVE_Z_REGS_NUM): New define.
8368         (AARCH64_SVE_P_REGS_NUM): Likewise.
8369         (AARCH64_SVE_NUM_REGS): Likewise.
8370
8371 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8372
8373         * nat/linux-ptrace.h [__alpha__]
8374         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8375         definitions.
8376
8377 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8378
8379         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8380         the endianness selected.
8381         * NEWS: Document `set endian auto' mode operation update.
8382
8383 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8384
8385         * Makefile.in: Add new header.
8386         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8387         (sve_vl_from_vg): Likewise.
8388         (sve_vq_from_vl): Likewise.
8389         (sve_vl_from_vq): Likewise.
8390         (sve_vq_from_vg): Likewise.
8391         (sve_vg_from_vq): Likewise.
8392         * configure.nat: Add new c file.
8393         * nat/aarch64-sve-linux-ptrace.c: New file.
8394         * nat/aarch64-sve-linux-ptrace.h: New file.
8395
8396 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8397
8398         * aarch64-linux-nat.c (aarch64_linux_read_description):
8399         Add parmeter zero.
8400         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8401         Likewise.
8402         * aarch64-tdep.c (tdesc_aarch64_list): Add.
8403         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8404         (aarch64_gdbarch_init): Add parmeter zero.
8405         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8406         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8407         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8408         parmeter.
8409         * doc/gdb.texinfo: Describe SVE feature
8410         * features/aarch64-sve.c: New file.
8411
8412 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
8413
8414         PR gdb/23210
8415         * gdbarch.sh (significant_addr_bit): Default to zero when
8416         not set by target architecture.
8417         * gdbarch.c: Re-generated.
8418         * utils.c (address_significant): Update.
8419
8420 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
8421
8422         * stack.c (func_command): Remove trailing newline in call to error.
8423
8424 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8425
8426         * regcache.h (regcache_raw_collect): Remove, update callers to
8427         use regcache::raw_collect.
8428         * regcache.c (regcache_raw_collect): Remove.
8429
8430 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8431
8432         * regcache.h (regcache_raw_supply): Remove, update callers to
8433         use detached_regcache::raw_supply.
8434         * regcache.c (regcache_raw_supply): Remove.
8435
8436 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8437
8438         * regcache.h (regcache_cooked_write_part): Remove, update
8439         callers to use regcache::cooked_write_part.
8440         * regcache.c (regcache_cooked_write_part): Remove.
8441
8442 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8443
8444         * regcache.h (regcache_cooked_read_part): Remove, update callers
8445         to use readable_regcache::cooked_read_part.
8446         * regcache.c (regcache_cooked_read_part): Remove.
8447
8448 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8449
8450         * regcache.h (regcache_cooked_read_value): Remove, update
8451         callers to use readable_regcache::cooked_read_value.
8452         * regcache.c (regcache_cooked_read_value): Remove.
8453
8454 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8455
8456         * regcache.h (regcache_cooked_write): Remove, update callers to
8457         use regcache::cooked_write.
8458         * regcache.c (regcache_cooked_write): Remove.
8459
8460 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8461
8462         * regcache.h (regcache_invalidate): Remove, update callers to
8463         use detached_regcache::invalidate instead.
8464         * regcache.c (regcache_invalidate): Remove.
8465
8466 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8467
8468         * regcache.h (regcache_raw_write_part): Remove, update callers
8469         to use regcache::raw_write_part instead.
8470         * regcache.c (regcache_raw_write_part): Remove.
8471
8472 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8473
8474         * regcache.h (regcache_raw_read_part): Remove, update callers to
8475         use readable_regcache::raw_read_part instead.
8476         * regcache.c (regcache_raw_read_part): Remove.
8477
8478 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8479
8480         * regcache.h (regcache_cooked_read): Remove, update callers to
8481         use readable_regcache::cooked_read instead.
8482         * regcache.c (regcache_cooked_read): Remove.
8483
8484 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8485
8486         * regcache.h (regcache_raw_write): Remove, update callers to use
8487         regcache::raw_write instead.
8488         * regcache.c (regcache_raw_write): Remove.
8489
8490 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8491
8492         * regcache.h (regcache_raw_read): Remove, update callers to use
8493         readable_regcache::raw_read instead.
8494         * regcache.c (regcache_raw_read): Remove.
8495
8496 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8497
8498         * regcache.h (regcache_raw_update): Remove, update callers to
8499         use readable_regcache::raw_update instead.
8500         * regcache.c (regcache_raw_update): Remove.
8501
8502 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8503
8504         * regcache.h (regcache_register_status): Remove, update callers
8505         to use reg_buffer::get_register_status directly instead.
8506         * regcache.c (regcache_register_status): Remove.
8507
8508 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8509
8510         * regcache.h (regcache_get_ptid): Remove, update all callers to
8511         call regcache::ptid instead.
8512         * regcache.c (regcache_get_ptid): Remove.
8513
8514 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8515
8516         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
8517
8518 2018-05-30  Pedro Alves  <palves@redhat.com>
8519
8520         * common/common-exceptions.h (exception_rethrow): Use
8521         ATTRIBUTE_NORETURN.
8522
8523 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
8524
8525         * breakpoint.c (print_solib_event, check_status_catch_solib):
8526         Remove struct keyword in range-based for loops.
8527         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
8528         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
8529         Likewise.
8530         * linespec.c (find_superclass_methods, search_minsyms_for_name):
8531         Likewise.
8532         * symfile.c (addr_info_make_relative): Likewise.
8533         * thread.c (value_in_thread_stack_temporaries): Likewise.
8534
8535 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
8536
8537         PR gdb/16841
8538         * valops.c (value_struct_elt_for_reference): Call check_typedef on
8539         aggregate type to get its real type before accessing it.
8540
8541 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
8542
8543         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
8544         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
8545         * coff-pe-read.c (add_pe_forwarded_sym): Replace
8546         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
8547         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
8548         * jit.c (jit_breakpoint_re_set_internal): Likewise.
8549         * printcmd.c (info_address_command): Likewise.
8550
8551 2018-05-29  Tom Tromey  <tom@tromey.com>
8552
8553         * windows-nat.c (handle_exception): Update fall-through comment.
8554
8555 2018-05-29  Tom Tromey  <tom@tromey.com>
8556
8557         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
8558         (struct program_space) <added_solibs>: Now a std::vector.
8559         * breakpoint.c (print_solib_event): Update.
8560         (check_status_catch_solib): Update.
8561         * progspace.c (clear_program_space_solib_cache): Update.
8562         * solib.c (update_solib_list): Update.
8563
8564 2018-05-29  Tom Tromey  <tom@tromey.com>
8565
8566         * python/py-type.c (typy_richcompare): Update.
8567         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
8568         * gdbtypes.h (types_deeply_equal): Return bool.
8569         (types_equal): Likewise.
8570         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
8571         declare VEC.
8572         (check_types_equal): Change worklist to std::vector.  Return
8573         bool.
8574         (struct type_equality_entry): Add constructor.
8575         (compare_maybe_null_strings): Return bool.
8576         (check_types_worklist): Return bool.  Change worklist to
8577         std::vector.
8578         (types_deeply_equal): Use std::vector.
8579         (types_equal): Return bool.
8580         (compare_maybe_null_strings): Simplify.
8581
8582 2018-05-29  Tom Tromey  <tom@tromey.com>
8583
8584         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
8585
8586 2018-05-29  Tom Tromey  <tom@tromey.com>
8587
8588         * objc-lang.h: Don't include cp-support.h.
8589         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
8590         declare VEC.
8591
8592 2018-05-27  Tom Tromey  <tom@tromey.com>
8593
8594         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
8595
8596 2018-05-25  Tom Tromey  <tom@tromey.com>
8597
8598         * value.c (value::location): Initialize.
8599
8600 2018-05-25  Tom Tromey  <tom@tromey.com>
8601
8602         * dbxread.c (init_bincl_list): Remove.
8603         (bincl_list): Now a std::vector.
8604         (bincls_allocated, next_bincl): Remove.
8605         (free_bincl_list, do_free_bincl_list_cleanup)
8606         (make_cleanup_free_bincl_list): Remove.
8607         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
8608         unique_xmalloc_ptr.
8609         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
8610         (struct header_file_location): Add constructor.
8611         (add_bincl_to_list): Remove.
8612
8613 2018-05-25  Tom Tromey  <tom@tromey.com>
8614
8615         * tui/tui.c (tui_enable): Update.
8616         * mi/mi-interp.c (mi_interp::init): Update.
8617         * interps.h (class interp) <name>: New method.
8618         <m_name>: Rename from name.
8619         (~scoped_restore_interp): Update.
8620         * interps.c (interp::interp): Update.
8621         (interp_add, interp_set, interp_lookup_existing)
8622         (current_interp_named_p): Update.
8623
8624 2018-05-25  Tom Tromey  <tom@tromey.com>
8625
8626         * interps.c (interp_name): Remove.
8627         * mi/mi-interp.c (mi_interp::init): Update.
8628         * interps.h (interp_name): Remove.
8629         (~scoped_restore_interp): Update.
8630         * tui/tui.c (tui_enable): Update.
8631
8632 2018-05-25  Tom Tromey  <tom@tromey.com>
8633
8634         * utils.c (fputs_maybe_filtered): Update.
8635         * linespec.c (decode_line_full): Update.
8636         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
8637         (mi_print_breakpoint_for_event, mi_solib_loaded)
8638         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
8639         (mi_user_selected_context_changed): Update.
8640         * mi/mi-main.c (mi_execute_command): Update.
8641         * cli/cli-script.c (execute_control_command): Update.
8642         * python/python.c (execute_gdb_command): Update.
8643         * solib.c (info_sharedlibrary_command): Update.
8644         * interps.c (interp_ui_out): Remove.
8645         * interps.h (interp_ui_out): Remove.
8646
8647 2018-05-25  Tom Tromey  <tom@tromey.com>
8648
8649         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
8650         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
8651         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
8652
8653 2018-05-25  Tom Tromey  <tom@tromey.com>
8654
8655         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
8656         * interps.c (interp_exec): Use scoped_restore.
8657
8658 2018-05-25  Tom Tromey  <tom@tromey.com>
8659
8660         * remote.c (remote_target::remote_file_get): Use
8661         gdb::byte_vector.
8662         (remote_target::remote_file_put): Likewise.
8663
8664 2018-05-25  Tom Tromey  <tom@tromey.com>
8665
8666         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
8667         a std::string.
8668         (get_pe_section_index, add_pe_exported_sym): Update.
8669         (read_pe_exported_syms): Use gdb::def_vector.
8670
8671 2018-05-25  Tom Tromey  <tom@tromey.com>
8672
8673         * frame.c (remove_prev_frame): Remove.
8674         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
8675
8676 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
8677
8678         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
8679         Remove prototypes.
8680         * mips-linux-nat.c (supply_fpregset): Always call
8681         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
8682         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
8683         `mips_fill_fpregset'.
8684         * mips-linux-tdep.c (mips_supply_fpregset)
8685         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
8686         (mips_fill_fpregset_wrapper): Remove functions.
8687         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
8688         (mips_linux_fpregset): Remove variable.
8689         (mips_linux_iterate_over_regset_sections): Use
8690         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
8691         (mips_linux_o32_sigframe_init): Remove comment.
8692
8693 2018-05-25  Pedro Alves  <palves@redhat.com>
8694
8695         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
8696         (struct readahead_cache, struct packet_reg, struct
8697         remote_arch_state, class remote_state): Move higher up in the
8698         file.
8699         (remote_target::m_remote_state): Now an object instead of a pointer.
8700         (remote_target::get_remote_state): Adjust.
8701
8702 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8703
8704         * stack.c (select_and_print_frame): Delete.
8705         (struct function_bounds): Move struct within function.
8706         (func_command): Most content moved into new function
8707         find_frame_for_function, use new function, print result, add
8708         function comment.
8709         (find_frame_for_function): New function, now returns a result.
8710
8711 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8712
8713         * stack.c (iterate_over_block_arg_vars): Fix comment.
8714         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
8715
8716 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8717
8718         PR gdb/23203
8719         * frame.c
8720         (scoped_restore_selected_frame::scoped_restore_selected_frame):
8721         Define.
8722         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8723         Define.
8724         * frame.h (class scoped_restore_selected_frame): New class.
8725         * stack.c (print_frame_local_vars): Remove catching and rethrowing
8726         of any exception, use scoped_restore_selected_frame to restore the
8727         frame instead.
8728
8729 2018-05-24  Pedro Alves  <palves@redhat.com>
8730
8731         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8732         override.
8733
8734 2018-05-23  Tom Tromey  <tom@tromey.com>
8735
8736         * complaints.c (struct complaints): Remove.
8737         (symfile_complaint_book): Remove.
8738         (series): New global.
8739         (complaint_internal): Update.
8740         (clear_complaints): Update.
8741
8742 2018-05-23  Tom Tromey  <tom@tromey.com>
8743
8744         * complaints.c (counters): New global.
8745         (struct complain): Remove.
8746         (struct complaints) <root>: Remove.
8747         (complaint_sentinel): Remove.
8748         (symfile_complaint_book): Update.
8749         (find_complaint) Remove.
8750         (complaint_internal, clear_complaints): Update.
8751
8752 2018-05-23  Tom Tromey  <tom@tromey.com>
8753
8754         * complaints.c (struct complain) <file, line>: Remove.
8755         (find_complaint): Remove file, line parameters.
8756         (complaint_internal): Update.
8757
8758 2018-05-23  Tom Tromey  <tom@tromey.com>
8759
8760         * complaints.c (vcomplaint): Remove.
8761         (complaint_internal) Merge in contents of vcomplaint.
8762
8763 2018-05-23  Tom Tromey  <tom@tromey.com>
8764
8765         * complaints.c (struct complaints) <explanation>: Remove.
8766         (symfile_explanations): Remove.
8767         (symfile_complaint_book): Update.
8768         (vcomplaint): Update.
8769         (struct explanation): Remove.
8770
8771 2018-05-23  Tom Tromey  <tom@tromey.com>
8772
8773         * complaints.c (symfile_complaints): Remove.
8774         (complaint_internal): Remove "complaints" parameter.
8775         (clear_complaints, vcomplaint): Remove "c" parameter.
8776         (get_complaints): Remove.
8777         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8778         (dwarf2_debug_line_missing_file_complaint)
8779         (dwarf2_debug_line_missing_end_sequence_complaint)
8780         (dwarf2_complex_location_expr_complaint)
8781         (dwarf2_const_value_length_mismatch_complaint)
8782         (dwarf2_section_buffer_overflow_complaint)
8783         (dwarf2_macro_malformed_definition_complaint)
8784         (dwarf2_invalid_attrib_class_complaint)
8785         (create_addrmap_from_index, dw2_symtab_iter_next)
8786         (dw2_expand_marked_cus)
8787         (dw2_debug_names_iterator::find_vec_in_debug_names)
8788         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8789         (create_debug_type_hash_table, init_cutu_and_read_dies)
8790         (partial_die_parent_scope, add_partial_enumeration)
8791         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8792         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8793         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8794         (create_cus_hash_table, create_dwp_hash_table)
8795         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8796         (dwarf2_rnglists_process, dwarf2_ranges_process)
8797         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8798         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8799         (handle_struct_member_die, process_structure_scope)
8800         (read_array_type, read_common_block, read_module_type)
8801         (read_tag_pointer_type, read_typedef, read_base_type)
8802         (read_subrange_type, load_partial_dies, partial_die_info::read)
8803         (partial_die_info::read, partial_die_info::read)
8804         (partial_die_info::read, read_checked_initial_length_and_offset)
8805         (dwarf2_string_attr, read_formatted_entries)
8806         (dwarf_decode_line_header)
8807         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8808         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8809         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8810         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8811         (get_signatured_type, get_DW_AT_signature_type)
8812         (decode_locdesc, file_file_name, consume_improper_spaces)
8813         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8814         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8815         (dwarf2_symbol_mark_computed, set_die_type)
8816         (read_attribute_value): Update.
8817         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8818         Update.
8819         * dbxread.c (unknown_symtype_complaint)
8820         (lbrac_mismatch_complaint, repeated_header_complaint)
8821         (set_namestring, function_outside_compilation_unit_complaint)
8822         (read_dbx_symtab, process_one_symbol): Update.
8823         * gdbtypes.c (stub_noname_complaint): Update.
8824         * windows-nat.c (handle_unload_dll): Update.
8825         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8826         (decode_base_type): Update.
8827         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8828         (eb_complaint, record_include_begin, record_include_end)
8829         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8830         (process_xcoff_symbol, read_symbol)
8831         (function_outside_compilation_unit_complaint)
8832         (scan_xcoff_symtab): Update.
8833         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8834         * buildsym.c (finish_block_internal, make_blockvector)
8835         (end_symtab_get_static_block, augment_type_symtab): Update.
8836         * dtrace-probe.c (dtrace_process_dof)
8837         (dtrace_static_probe_ops::get_probes): Update.
8838         * complaints.h (struct complaint): Don't declare.
8839         (symfile_complaints): Remove.
8840         (complaint_internal): Remove "complaints" parameter.
8841         (complaint): Likewise.
8842         (clear_complaints): Likewise.
8843         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8844         (reread_symbols): Update.
8845         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8846         (dwarf2_frame_cache, decode_frame_entry): Update.
8847         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8848         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8849         (info_selectors_command): Update.
8850         * macrotab.c (macro_include, check_for_redefinition)
8851         (macro_undef): Update.
8852         * objfiles.c (filter_overlapping_sections): Update.
8853         * stabsread.c (invalid_cpp_abbrev_complaint)
8854         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8855         (define_symbol, error_type, read_type, rs6000_builtin_type)
8856         (stabs_method_name_from_physname, read_member_functions)
8857         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8858         (attach_fields_to_type, complain_about_struct_wipeout)
8859         (read_range_type, read_args, common_block_start)
8860         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8861         Update.
8862         * mdebugread.c (index_complaint, unknown_ext_complaint)
8863         (basic_type_complaint, bad_tag_guess_complaint)
8864         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8865         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8866         (parse_procedure, parse_lines)
8867         (function_outside_compilation_unit_complaint)
8868         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8869         (bad_tag_guess_complaint, reg_value_complaint): Update.
8870         * cp-support.c (demangled_name_complaint): Update.
8871         * macroscope.c (sal_macro_scope): Update.
8872         * dwarf-index-write.c (class debug_names): Update.
8873
8874 2018-05-23  Tom Tromey  <tom@tromey.com>
8875
8876         * complaints.c (clear_complaints): Remove "noisy" parameter.
8877         * complaints.h (clear_complaints): Update.
8878         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8879         (reread_symbols): Update.
8880
8881 2018-05-23  Tom Tromey  <tom@tromey.com>
8882
8883         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8884         SUBSEQUENT_MESSAGE.
8885         (vcomplaint, clear_complaints): Update.
8886         (symfile_explanations): Remove some messages.
8887
8888 2018-05-23  Tom Tromey  <tom@tromey.com>
8889
8890         * complaints.c (internal_complaint): Remove.
8891         * complaints.h (internal_complaint): Remove.
8892
8893 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8894
8895         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8896
8897 2018-05-22  Pedro Alves  <palves@redhat.com>
8898
8899         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8900         (remote_fileio_badfd, remote_fileio_return_errno)
8901         (remote_fileio_return_success, remote_fileio_func_open)
8902         (remote_fileio_func_open, remote_fileio_func_close)
8903         (remote_fileio_func_read, remote_fileio_func_write)
8904         (remote_fileio_func_lseek, remote_fileio_func_rename)
8905         (remote_fileio_func_unlink, remote_fileio_func_stat)
8906         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8907         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8908         remote_target parameter.
8909         (remote_fio_func_map) <func>: Add remote_target parameter.
8910         (do_remote_fileio_request, remote_fileio_request):
8911         * remote-fileio.h (remote_fileio_request):
8912         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8913         remote_target parameter.
8914         (remote_notif_process, handle_notification): Adjust to pass down
8915         the remote.
8916         (remote_notif_state_allocate): Add remote_target parameter.  Save
8917         it.
8918         * remote-notif.h (struct remote_target): Forward declare.
8919         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8920         remote_target parameter.
8921         (struct remote_notif_state) <remote>: New field.
8922         (remote_notif_ack, remote_notif_parse): Add remote_target
8923         parameter.
8924         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8925         remote_target parameter.
8926         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8927         (threads_listing_context, rmt_thread_action, protocol_feature)
8928         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8929         (packet_result, struct threads_listing_context, remote_state):
8930         Move definitions and declarations higher up.
8931         (remote_target) <~remote_target>: Declare.
8932         (remote_download_command_source, remote_file_put, remote_file_get)
8933         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8934         (remote_hostio_pread_vFile, remote_hostio_send_command)
8935         (remote_hostio_set_filesystem, remote_hostio_open)
8936         (remote_hostio_close, remote_hostio_unlink, remote_state)
8937         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8938         (get_memory_write_packet_size, get_memory_read_packet_size)
8939         (append_pending_thread_resumptions, remote_detach_1)
8940         (append_resumption, remote_resume_with_vcont)
8941         (add_current_inferior_and_thread, wait_ns, wait_as)
8942         (process_stop_reply, remote_notice_new_inferior)
8943         (process_initial_stop_replies, remote_add_thread)
8944         (btrace_sync_conf, remote_btrace_maybe_reopen)
8945         (remove_new_fork_children, kill_new_fork_children)
8946         (discard_pending_stop_replies, stop_reply_queue_length)
8947         (check_pending_events_prevent_wildcard_vcont)
8948         (discard_pending_stop_replies_in_queue, stop_reply)
8949         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8950         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8951         (remote_interrupt_as, remote_interrupt_ns)
8952         (remote_get_noisy_reply, remote_query_attached)
8953         (remote_add_inferior, remote_current_thread, get_current_thread)
8954         (set_thread, set_general_thread, set_continue_thread)
8955         (set_general_process, write_ptid)
8956         (remote_unpack_thread_info_response, remote_get_threadinfo)
8957         (parse_threadlist_response, remote_get_threadlist)
8958         (remote_threadlist_iterator, remote_get_threads_with_ql)
8959         (remote_get_threads_with_qxfer)
8960         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8961         (get_offsets, remote_check_symbols, remote_supported_packet)
8962         (remote_query_supported, remote_packet_size)
8963         (remote_serial_quit_handler, remote_detach_pid)
8964         (remote_vcont_probe, remote_resume_with_hc)
8965         (send_interrupt_sequence, interrupt_query)
8966         (remote_notif_get_pending_events, fetch_register_using_p)
8967         (send_g_packet, process_g_packet, fetch_registers_using_g)
8968         (store_register_using_P, store_registers_using_G)
8969         (set_remote_traceframe, check_binary_download)
8970         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8971         (remote_xfer_live_readonly_partial, remote_read_bytes)
8972         (remote_send_printf, remote_flash_write, readchar)
8973         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8974         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8975         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8976         (extended_remote_disable_randomization, extended_remote_run)
8977         (send_environment_packet, extended_remote_environment_support)
8978         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8979         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8980         (packet_command): Now methods of ...
8981         (remote_target): ... this class.
8982         (m_remote_state) <remote_target>: New field.
8983         (struct remote_state) <stop_reply_queue,
8984         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8985         fields.
8986         (remote_state::remote_state): Allocate stop_reply_queue.
8987         (remote_state): Delete global.
8988         (get_remote_state_raw): Delete.
8989         (remote_target::get_remote_state): Allocate m_remote_state on
8990         demand.
8991         (get_current_remote_target): New.
8992         (remote_ops, extended_remote_ops): Delete.
8993         (wait_forever_enabled_p, remote_async_inferior_event_token):
8994         Delete, moved to struct remote_state.
8995         (remote_target::close): Delete self.  Destruction bits split to
8996         ...
8997         (remote_target::~remote_target): ... this.
8998         (show_memory_packet_size): Adjust to use
8999         get_current_remote_target.
9000         (struct protocol_feature) <func>: Add remote_target parameter.
9001         All callers adjusted.
9002         (curr_quit_handler_target): New.
9003         (remote_serial_quit_handler): Reimplement.
9004         (remote_target::open_1): Adjust to use get_current_remote_target.
9005         Heap-allocate remote_target/extended_remote_target instances.
9006         (vcont_builder::vcont_builder): Add remote_target parameter, and
9007         save it in m_remote.  All callers adjusted.
9008         (vcont_builder::m_remote): New field.
9009         (vcont_builder::restart, vcont_builder::flush)
9010         (vcont_builder::push_action): Use it.
9011         (remote_target::commit_resume): Use it.
9012         (struct queue_iter_param) <remote>: New field.
9013         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9014         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9015         (check_pending_event_prevents_wildcard_vcont_callback)
9016         (remote_target::check_pending_events_prevent_wildcard_vcont)
9017         (remote_target::discard_pending_stop_replies)
9018         (remote_target::discard_pending_stop_replies_in_queue)
9019         (remote_target::remote_notif_remove_queued_reply): Fill in
9020         'remote' field.
9021         (remote_notif_get_pending_events): New.
9022         (remote_target::readchar, remote_target::remote_serial_write):
9023         Save/restore curr_quit_handler_target.
9024         (putpkt): New.
9025         (kill_new_fork_children): Fill in 'remote' field.
9026         (packet_command): Use get_current_remote_target, defer to
9027         remote_target method of same name.
9028         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9029         parameter, and save it in m_remote.  All callers adjusted.
9030         (scoped_remote_fd::release): Use m_remote.
9031         (scoped_remote_fd::m_remote): New field.
9032         (remote_file_put, remote_file_get, remote_file_delete): Use
9033         get_current_remote_target, defer to remote_target method of same
9034         name.
9035         (remote_btrace_reset): Add remote_state paremeter.  Update all
9036         callers.
9037         (remote_async_inferior_event_handler). Pass down 'data'.
9038         (remote_new_objfile): Use get_current_remote_target.
9039         (remote_target::vcont_r_supported): New.
9040         (set_range_stepping): Use get_current_remote_target and
9041         remote_target::vcont_r_supported.
9042         (_initialize_remote): Don't allocate 'remote_state' and
9043         'stop_reply_queue' globals.
9044         * remote.h (struct remote_target): Forward declare.
9045         (getpkt, putpkt, remote_notif_get_pending_events): Add
9046         'remote_target' parameter.
9047
9048 2018-05-22  Pedro Alves  <palves@redhat.com>
9049
9050         * remote.c (vcont_builder): Now a class.  Make all data members
9051         private.
9052         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9053         Declare methods.
9054         (vcont_builder_restart): Rename to ...
9055         (vcont_builder::restart): ... this.
9056         (vcont_builder_flush): Rename to ...
9057         (vcont_builder::flush): ... this.
9058         (vcont_builder_push_action): Rename to ...
9059         (vcont_builder::push_action): ... this.
9060         (remote_target::commit_resume): Adjust.
9061
9062 2018-05-22  Pedro Alves  <palves@redhat.com>
9063
9064         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9065         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9066         (get_fixed_memory_packet_size): New.
9067         (get_memory_packet_size): Use it.
9068         (set_memory_packet_size): Don't override the config size with
9069         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9070         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9071         Don't refer to get_memory_packet_size if not connected to a remote
9072         target.  Show "(default)" if configured size is 0.
9073
9074 2018-05-22  Pedro Alves  <palves@redhat.com>
9075
9076         * remote.c (remote_target::mourn_inferior): Move
9077         discard_pending_stop_replies call here from ...
9078         (_initialize_remote): ... here.
9079
9080 2018-05-22  Pedro Alves  <palves@redhat.com>
9081
9082         * remote.c (compare_section_command): Remove set_general_process
9083         call.
9084
9085 2018-05-22  Pedro Alves  <palves@redhat.com>
9086
9087         * remote.c (struct packet_reg, struct remote_arch_state):
9088         Move higher up in the file.
9089         (remote_state) <m_arch_states>: Store remote_arch_state values
9090         instead of remote_arch_state pointers.
9091         (remote_state::get_remote_arch_state): Adjust.
9092
9093 2018-05-22  Pedro Alves  <palves@redhat.com>
9094
9095         * remote.c: Include <unordered_map>.
9096         (remote_state): Now a class.
9097         (remote_state) <get_remote_arch_state>: Declare method.
9098         <get_remote_arch_state>: New field.
9099         (remote_arch_state) <remote_arch_state>: Declare ctor.
9100         <regs>: Now a unique_ptr.
9101         (remote_gdbarch_data_handle): Delete.
9102         (get_remote_arch_state): Delete.
9103         (remote_state::get_remote_arch_state): New.
9104         (get_remote_state): Adjust to call remote_state's
9105         get_remote_arch_state method.
9106         (init_remote_state): Delete, bits factored out to ...
9107         (remote_arch_state::remote_arch_state): ... this new method.
9108         (get_remote_packet_size, get_memory_packet_size)
9109         (process_g_packet, remote_target::fetch_registers)
9110         (remote_target::prepare_to_store, store_registers_using_G)
9111         (remote_target::store_registers, remote_target::get_trace_status):
9112         Adjust to call remote_state's method.
9113         (_initialize_remote): Remove reference to
9114         remote_gdbarch_data_handle.
9115
9116 2018-05-22  Pedro Alves  <palves@redhat.com>
9117
9118         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9119         pread>: New method declarations.
9120         (remote_target::open_1): Adjust.
9121         (readahead_cache_invalidate): Rename to ...
9122         (readahead_cache::invalidate): ... this, and adjust to be a class
9123         method.
9124         (readahead_cache_invalidate_fd): Rename to ...
9125         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9126         class method.
9127         (remote_hostio_pwrite): Adjust.
9128         (remote_hostio_pread_from_cache): Rename to ...
9129         (readahead_cache::pread): ... this, and adjust to be a class
9130         method.
9131         (remote_hostio_close): Adjust.
9132
9133 2018-05-22  Pedro Alves  <palves@redhat.com>
9134
9135         * remote.c (remote_hostio_close_cleanup): Delete.
9136         (class scoped_remote_fd): New.
9137         (remote_file_put, remote_file_get): Use it.
9138
9139 2018-05-22  Pedro Alves  <palves@redhat.com>
9140
9141         (struct vCont_action_support): Use bool and initialize all fields.
9142         (struct readahead_cache): Initialize all fields.
9143         (remote_state): Use bool and initialize all fields.
9144         (remote_state::remote_state, remote_state::~remote_state): New.
9145         (new_remote_state): Delete.
9146         (_initialize_remote): Use new to allocate remote_state.
9147
9148 2018-05-22  Pedro Alves  <palves@redhat.com>
9149             張俊芝  <zjz@zjz.name>
9150
9151         PR gdb/22973
9152         * c-exp.y: Include "c-support.h".
9153         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9154         of tolower.  Use c_ident_is_alpha to scan names.
9155         * c-lang.c: Include "c-support.h".
9156         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9157         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9158         * c-support.h: New file, with bits factored out from ...
9159         * cp-name-parser.y: ... this file.
9160         Include "c-support.h".
9161         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9162         c-support.h and renamed.
9163         (symbol_end, yylex): Adjust.
9164
9165 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9166
9167         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9168         parameter type to CORE_ADDR.
9169         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9170         parameter type in declaration to CORE_ADDR.
9171         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9172         target_auxv_search to get AT_HWCAP and use the result to get the
9173         target description.
9174         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9175         to CORE_ADDR. Remove the cast of the return value to unsigned
9176         long. Fix error predicate of target_auxv_search.
9177         (ppc_linux_nat_target::read_description): Change the type of the
9178         hwcap variable to CORE_ADDR.
9179
9180 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9181
9182         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9183         if the size of fpscr is larger than 32 bits.
9184
9185 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9186
9187         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9188         (ppc32_linux_vsxregmap): New global.
9189         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9190         regcache_supply_regset, and regcache_collect_regset.
9191         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9192         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9193         (fetch_vsx_register, store_vsx_register): Remove.
9194         (fetch_vsx_registers): Add regno parameter. Get regset using
9195         ppc_linux_vsxregset. Use regset to supply registers.
9196         (store_vsx_registers): Add regno parameter. Get regset using
9197         ppc_linux_vsxregset. Use regset to collect registers.
9198         (fetch_register): Call fetch_vsx_registers instead of
9199         fetch_vsx_register.
9200         (store_register): Call store_vsx_registers instead of
9201         store_vsx_register.
9202         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9203         new regno parameter.
9204         (store_ppc_registers): Call store_vsx_registers with -1 for the
9205         new regno parameter.
9206         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9207         (ppc_collect_vsxregset): Remove.
9208
9209 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9210
9211         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9212         offset fields.
9213         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9214         for vector register offset fields.
9215         (ppc64_fbsd_reg_offsets): Likewise.
9216         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9217         to vector register offset fields.
9218         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9219         to vector register offset fields.
9220         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9221         vector register offset fields.
9222         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9223         initializers for vector register offset fields.
9224         (rs6000_aix64_reg_offsets): Likewise.
9225         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9226         (ppc_supply_vrregset): Remove.
9227         (ppc_collect_vrregset): Remove.
9228         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9229         (ppc_linux_vrregset) : New function.
9230         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9231         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9232         (ppc32_linux_vrregset): Remove.
9233         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9234         and use result instead of ppc32_linux_vrregset.
9235         (ppc32_linux_reg_offsets): Remove initializers for vector register
9236         offset fields.
9237         (ppc64_linux_reg_offsets): Likewise.
9238         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9239         * ppc-linux-nat.c: Include regset.h.
9240         (gdb_vrregset_t): Adjust comment to account for little-endian
9241         mode.
9242         (supply_vrregset, fill_vrregset): Remove.
9243         (fetch_altivec_register, store_altivec_register): Remove.
9244         (fetch_altivec_registers): Add regno parameter. Get regset using
9245         ppc_linux_vrregset. Use regset to supply registers.
9246         (store_altivec_registers): Add regno parameter. Get regset using
9247         ppc_linux_vrregset. Use regset to collect registers.
9248         (fetch_register): Call fetch_altivec_registers instead of
9249         fetch_altivec_register.
9250         (store_register): Call store_altivec_registers instead of
9251         store_altivec_register.
9252         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9253         the new regno parameter.
9254         (store_ppc_registers): Call store_altivec_registers with -1 for
9255         the new regno parameter.
9256
9257 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9258
9259         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9260         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9261         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9262         (gdb_vrregset_t): Change array type size to
9263         PPC_LINUX_SIZEOF_VRREGSET.
9264         (gdb_vsxregset_t): Change array type size to
9265         PPC_LINUX_SIZEOF_VSXREGSET.
9266         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9267         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9268         PPC_LINUX_SIZEOF_VSXREGSET.
9269
9270 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9271
9272         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9273         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9274         nat/ppc-linux.c.
9275         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9276         ppc_linux_target_wordsize with tid.
9277         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9278         wordsize with tid.
9279         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9280         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9281         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9282         tid parameter. Remove static specifier.
9283         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9284         (ppc_linux_target_wordsize): New declaration.
9285
9286 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9287
9288         * arch/ppc-linux-common.c: New file.
9289         * arch/ppc-linux-common.h: New file.
9290         * arch/ppc-linux-tdesc.h: New file.
9291         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9292         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9293         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9294         arch/ppc-linux-tdesc.h.
9295         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9296         arch/ppc-linux-tdesc.h.
9297         (ppc_linux_nat_target::read_description): Remove target
9298         description matching code. Fill a ppc_linux_features struct and
9299         call ppc_linux_match_description with it. Move comment about ISA
9300         2.05 to ppc-linux-common.c.
9301         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9302         arch/ppc-linux-tdesc.h.
9303         (ppc_linux_core_read_description): Remove target description
9304         matching code. Fill a ppc_linux_features struct and call
9305         ppc_linux_match_description with it.
9306         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9307         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9308         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9309         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9310         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9311         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9312         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9313         (tdesc_powerpc_e500l): Remove.
9314
9315 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9316
9317         * ada-lang.c (catch_assert_command): Pass empty string instead
9318         of NULL for excep_string argument.
9319
9320 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9321
9322         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9323         the width of the requested register exceeds the width of the
9324         `ptrace' data type.
9325
9326 2018-05-21  Tom Tromey  <tom@tromey.com>
9327
9328         * printcmd.c (output_command): Remove.
9329         (output_command_const): Rename to output_command.
9330         * valprint.h (output_command): Rename from output_command_const.
9331         * tracepoint.c (trace_dump_actions): Call output_command.
9332
9333 2018-05-21  Tom Tromey  <tom@tromey.com>
9334
9335         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9336         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9337         * ada-lang.h (create_ada_exception_catchpoint): Update.
9338         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9339         std::string.
9340         (create_excep_cond_exprs, ~ada_catchpoint)
9341         (should_stop_exception, print_one_exception)
9342         (print_mention_exception, print_recreate_exception): Update.
9343         (ada_get_next_arg): Remove.
9344         (catch_ada_exception_command_split): Use std::string.  Change type
9345         of "excep_string", "cond_string".
9346         (catch_ada_exception_command): Update.
9347         (create_ada_exception_catchpoint): Change type of excep_string.
9348         (ada_exception_sal): Remove excep_string parameter.
9349         (~ada_catchpoint): Remove.
9350
9351 2018-05-21  Tom Tromey  <tom@tromey.com>
9352
9353         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9354         cleanup.
9355
9356 2018-05-21  Tom Tromey  <tom@tromey.com>
9357
9358         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9359         Return unique_xmalloc_ptr.
9360         (print_it_exception): Update.
9361
9362 2018-05-21  Tom Tromey  <tom@tromey.com>
9363
9364         * tracepoint.c (trace_dump_actions): Use std::string.
9365
9366 2018-05-21  Tom Tromey  <tom@tromey.com>
9367
9368         * symfile.c (reread_symbols): Use std::string for original_name.
9369
9370 2018-05-21  Tom Tromey  <tom@tromey.com>
9371
9372         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9373         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9374         constructor.
9375
9376 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9377
9378         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9379         instance to...
9380         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9381         * objfiles.c (get_objfile_bfd_data): Allocate
9382         objfile_per_bfd_storage with obstack_new when allocating on
9383         obstack.
9384
9385 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9386
9387         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9388         OBSTACK_ZALLOC.
9389         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9390         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9391         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9392         (add_pending): Likewise.
9393         (parse_symbol): Likewise.
9394         (parse_partial_symbols): Likewise.
9395         (psymtab_to_symtab_1): Likewise.
9396         (new_psymtab): Likewise.
9397         (elfmdebug_build_psymtabs): Likewise.
9398         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9399         * objfiles.c (get_objfile_bfd_data): Likewise.
9400         (objfile_register_static_link): Likewise.
9401         * psymtab.c (allocate_psymtab): Likewise.
9402         * stabsread.c (read_member_functions): Likewise.
9403         * xcoffread.c (xcoff_end_psymtab): Likewise.
9404
9405 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9406
9407         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9408         compiler supports std::is_trivially_constructible.
9409         * common/poison.h: Include obstack.h.
9410         (IsMallocable): Define to is_trivially_constructible if the
9411         compiler supports it, define to true_type otherwise.
9412         (xobnew): New.
9413         (XOBNEW): Redefine.
9414         (xobnewvec): New.
9415         (XOBNEWVEC): Redefine.
9416         * gdb_obstack.h (obstack_zalloc): New.
9417         (OBSTACK_ZALLOC): Redefine.
9418         (obstack_calloc): New.
9419         (OBSTACK_CALLOC): Redefine.
9420         (obstack_new): New.
9421         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9422         (gdbarch_obstack): New declaration in gdbarch.h, definition in
9423         gdbarch.c.
9424         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9425         obstack_calloc/obstack_zalloc.
9426         (gdbarch_obstack_zalloc): Remove.
9427         * target-descriptions.c (tdesc_data_init): Use obstack_new.
9428
9429 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9430
9431         * stack.c (backtrace_command_1): Remove useless variable int i.
9432
9433 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9434
9435         * stack.c (print_frame_info): Fix comment.
9436
9437 2018-05-18  Tom Tromey  <tom@tromey.com>
9438
9439         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9440         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9441         (~dwarf2_per_objfile): Update
9442         (dwarf2_get_dwz_file): Use new.
9443         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
9444         unique_ptr.
9445
9446 2018-05-18  Tom Tromey  <tom@tromey.com>
9447
9448         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
9449         unique_ptr.
9450         * dwarf2read.c (struct dwp_file): Add constructor and
9451         initializers.
9452         (open_and_init_dwp_file): Return a unique_ptr.
9453         (dwarf2_per_objfile, create_dwp_hash_table)
9454         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
9455         (lookup_dwo_unit_in_dwp): Update.
9456         (open_and_init_dwp_file, get_dwp_file): Update.
9457
9458 2018-05-18  Tom Tromey  <tom@tromey.com>
9459
9460         * dwarf2read.c (dwarf2_per_objfile): Update.
9461         (struct mapped_index): Add initializers.
9462         (dwarf2_read_index): Use new.
9463         (dw2_symtab_iter_init): Update.
9464         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
9465         unique_ptr.
9466
9467 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9468
9469         * dwarf2read.c (mapped_index) <total_size>: Remove.
9470
9471 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9472
9473         * unittests/format_pieces-selftests.c (test_format_specifier):
9474         Add ARI comments.
9475
9476 2018-05-18  Tom Tromey  <tom@tromey.com>
9477
9478         * c-typeprint.c (maybe_print_hole): New function.
9479         (c_print_type_struct_field_offset): Update.
9480         (c_type_print_base_struct_union): Call maybe_print_hole.
9481
9482 2018-05-17  Keith Seitz  <keiths@redhat.com>
9483
9484         * breakpoint.c (build_bpstat_chain): New function, moved from
9485         bpstat_stop_status.
9486         (bpstat_stop_status): Add optional parameter, `stop_chain'.
9487         If no stop chain is passed, call build_bpstat_chain to build it.
9488         * breakpoint.h (build_bpstat_chain): Declare.
9489         (bpstat_stop_status): Move documentation here from breakpoint.c.
9490         * infrun.c (handle_signal_stop): Before eliding inlined frames,
9491         build the stop chain and pass it to skip_inline_frames.
9492         Pass this stop chain to bpstat_stop_status.
9493         * inline-frame.c: Include breakpoint.h.
9494         (stopped_by_user_bp_inline_frame): New function.
9495         (skip_inline_frames): Add parameter `stop_chain'.
9496         Move documention to inline-frame.h.
9497         If non-NULL, use stopped_by_user_bp_inline_frame to determine
9498         whether the frame should be elided.
9499         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
9500         Add moved documentation and update for new parameter.
9501
9502 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9503
9504         PR cli/14975
9505         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9506         unittests/format_pieces-selftests.c.
9507         * common/format.h (format_piece) <operator==>: New.
9508         (format_pieces) <operator[]>: Remove.
9509         * common/format.c (format_pieces::format_pieces): Handle \e.
9510         * unittests/format_pieces-selftests.c: New.
9511
9512 2018-05-17  Tom Tromey  <tom@tromey.com>
9513
9514         PR symtab/23010:
9515         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
9516         (dw2_instantiate_symtab): Add skip_partial parameter.
9517         (dw2_find_last_source_symtab, dw2_map_expand_apply)
9518         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
9519         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
9520         (dw2_expand_symtabs_matching_one)
9521         (dw2_find_pc_sect_compunit_symtab)
9522         (dw2_debug_names_lookup_symbol)
9523         (dw2_debug_names_expand_symtabs_for_function): Update.
9524         (init_cutu_and_read_dies): Add skip_partial parameter.
9525         (process_psymtab_comp_unit, build_type_psymtabs_1)
9526         (process_skeletonless_type_unit, load_partial_comp_unit)
9527         (psymtab_to_symtab_1): Update.
9528         (load_full_comp_unit): Add skip_partial parameter.
9529         (process_imported_unit_die, dwarf2_read_addr_index)
9530         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
9531         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
9532         (read_signatured_type): Update.
9533
9534 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9535
9536         * value.c (release_value): Remove unused variable.
9537         (record_latest_value): Likewise.
9538         (access_value_history): Likewise.
9539         (preserve_values): Likewise.
9540
9541 2018-05-17  Tom Tromey  <tom@tromey.com>
9542
9543         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
9544         Initialize.
9545
9546 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
9547
9548         PR gdb/22286
9549         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
9550         Also handle registers whose width is not a multiple of
9551         PTRACE_TYPE_RET.
9552         (linux_nat_trad_target::store_register): Likewise.
9553
9554 2018-05-16  Tom Tromey  <tom@tromey.com>
9555
9556         * gdbcore.h (core_bfd): Redefine.
9557         * corelow.c (core_target::close): Update.
9558         (core_target_open): Update.
9559         * progspace.h (struct program_space) <cbfd>: Now a
9560         gdb_bfd_ref_ptr.
9561
9562 2018-05-16  Tom Tromey  <tom@tromey.com>
9563
9564         PR cli/19551:
9565         * symfile-add-flags.h (enum symfile_add_flags)
9566         <SYMFILE_NOT_FILENAME>: New constant.
9567         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
9568         objfile name from BFD.
9569         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
9570         * minidebug.c (find_separate_debug_file_in_section): Put
9571         ".gnu_debugdata" into BFD's file name.
9572
9573 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
9574
9575         * regcache.c (regcache_read_ftype, regcache_write_ftype):
9576         Remove.
9577
9578 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
9579
9580         PR binutils/21446
9581         * aarch64-tdep.c (aarch64_analyze_prologue,
9582         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
9583         Indicate not interested in errors.
9584
9585 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9586
9587         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
9588         Supply the MIPS_ZERO_REGNUM register.
9589
9590 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9591
9592         * mips-tdep.c (mask_address_var): Make variable static.
9593
9594 2018-05-14  Tom Tromey  <tom@tromey.com>
9595
9596         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
9597
9598 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
9599
9600         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
9601         FXSAVE_ADDR for the mxcsr register.
9602
9603 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
9604
9605         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
9606
9607 2018-05-11  Pedro Alves  <palves@redhat.com>
9608
9609         * corelow.c (core_target) <core_target>: No longer inline.
9610         Initialize m_core_gdbarch, m_core_vec and build the section table
9611         here.
9612         <~core_target>: New.
9613         <core_gdbarch, get_core_register_section>: New methods.
9614         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
9615         factored out from ...
9616         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
9617         (core_ops): Delete.
9618         (sniff_core_bfd): Add gdbarch parameter.
9619         (core_close): Delete, merged into ...
9620         (core_target::close): ... here.  Delete self.
9621         (core_close_cleanup): Delete.
9622         (core_target_open): Allocate a core_target on the heap.  Use a
9623         unique_ptr instead of a cleanup.  Bits moved into the core_target
9624         ctor.  Adjust to use core_target methods instead of globals.
9625         (get_core_register_section): Rename to ...
9626         (core_target::get_core_register_section): ... this and adjust.
9627         (struct get_core_registers_cb_data): New.
9628         (get_core_registers_cb): Use it.  Use bool.
9629         (core_target::fetch_registers, core_target::files_info)
9630         (core_target::xfer_partial, core_target::read_description)
9631         (core_target::pid_to, core_target::thread_name): Adjust to
9632         reference class fields instead of globals.
9633         * target.h (struct target_ops_deleter, target_ops_up): New.
9634
9635 2018-05-11  Pedro Alves  <palves@redhat.com>
9636
9637         * corefile.c (core_file_command): Move to corelow.c.
9638         * corelow.c (the_core_target): Delete.
9639         (core_file_command): Moved from corefile.c.  Check exec_bfd
9640         instead of the_core_target.  Use target_detach instead of calling
9641         into the_core_target directly.
9642         (maybe_say_no_core_file_now): New.
9643         (core_target::detach): Use it.
9644         (_initialize_corelow): Remove references to the_core_target.
9645         * gdbcore.h (the_core_target): Delete.
9646
9647 2018-05-11  Tom Tromey  <tromey@redhat.com>
9648             Pedro Alves  <palves@redhat.com>
9649
9650         * corefile.c (core_bfd): Remove.
9651         * gdbcore.h (core_bfd): Now a macro.
9652         * progspace.h (struct program_space) <cbfd>: New field.
9653
9654 2018-05-11  Tom Tromey  <tom@tromey.com>
9655
9656         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
9657         gdb::def_vector.
9658
9659 2018-05-10  Tom Tromey  <tom@tromey.com>
9660
9661         * configure: Rebuild.
9662         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
9663
9664 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
9665
9666         PR server/23158:
9667         * regformats/regdat.sh: Adjust script, following the addition
9668         of the new expedite_regs parameter to init_target_desc.
9669
9670 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
9671     
9672         PR gdb/23127
9673         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
9674         set_gdbarch_significant_addr_bit.
9675         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
9676         set_gdbarch_significant_addr_bit.
9677         * utils.c (address_significant): Update to sign extend addr.
9678
9679 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
9680
9681         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
9682         (xtensa_linux_init_abi): Limit tdep->num_regs by
9683         tdep->num_nopriv_regs.
9684         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
9685         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
9686         not initialized.
9687
9688 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
9689
9690         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
9691
9692 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
9693
9694         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
9695         (I387_MXCSR_INIT_VAL): New constant.
9696         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
9697         buffer if it was supplied by the inferior.
9698         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
9699         (i387_xsave_get_clear_bv): New function.
9700         (i387_supply_xsave): Only read x87 control registers from the
9701         xsave buffer if the feature is enabled, and the state will have
9702         been written, otherwise, provide a suitable default.
9703         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
9704         including x87 control registers.  Update control registers if they
9705         have changed from the default value, and mark features as enabled
9706         as required.
9707         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
9708
9709 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
9710
9711         * spu-tdep.c (info_spu_event_command): Fix output formatting.
9712
9713 2018-05-07  Tom Tromey  <tom@tromey.com>
9714
9715         * configure: Rebuild.
9716         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
9717
9718 2018-05-07  Tom Tromey  <tom@tromey.com>
9719
9720         PR tdep/20362:
9721         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9722         bit.  Use correct value for VDIV.
9723
9724 2018-05-04  Tom Tromey  <tom@tromey.com>
9725
9726         * configure: Rebuild.
9727         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9728
9729 2018-05-04  Tom Tromey  <tom@tromey.com>
9730
9731         * linux-record.c (record_linux_system_call) <case
9732         RECORD_SYS_RECVFROM>: Add "break".
9733
9734 2018-05-04  Tom Tromey  <tom@tromey.com>
9735
9736         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9737         Add missing "break".
9738         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9739         Add missing "break".
9740
9741 2018-05-04  Tom Tromey  <tom@tromey.com>
9742
9743         * rs6000-tdep.c (ppc_process_record_op4)
9744         (ppc_process_record_op63): Add fall-through comment.
9745
9746 2018-05-04  Tom Tromey  <tom@tromey.com>
9747
9748         * i386-tdep.c (i386_process_record): Add fall-through comment.
9749
9750 2018-05-04  Tom Tromey  <tom@tromey.com>
9751
9752         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9753         comment.
9754
9755 2018-05-04  Tom Tromey  <tom@tromey.com>
9756
9757         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9758         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9759         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9760         comment.
9761         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9762         comment.
9763         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9764         comment.
9765
9766 2018-05-04  Tom Tromey  <tom@tromey.com>
9767
9768         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9769
9770 2018-05-04  Tom Tromey  <tom@tromey.com>
9771
9772         * s390-tdep.c (s390_process_record): Fix fall-through comments.
9773         * xcoffread.c (scan_xcoff_symtab): Move comment later.
9774         * symfile.c (section_is_mapped): Fix fall-through comment.
9775         * stabsread.c (define_symbol, read_member_functions): Fix
9776         fall-through comment.
9777         * s390-linux-tdep.c (s390_process_record): Fix fall-through
9778         comment.
9779         * remote.c (remote_wait_as): Fix fall-through comment.
9780         * p-exp.y (yylex): Fix fall-through comment.
9781         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9782         comment.
9783         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9784         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9785         * jv-exp.y (yylex): Fix fall-through comment.
9786         * go-exp.y (lex_one_token): Fix fall-through comment.
9787         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9788         fall-through comment.
9789         * f-exp.y (yylex): Fix fall-through comment.
9790         * dwarf2read.c (process_die): Fix fall-through comments.
9791         * dbxread.c (process_one_symbol): Fix fall-through comment.
9792         * d-exp.y (lex_one_token): Fix fall-through comment.
9793         * cp-name-parser.y (yylex): Fix fall-through comment.
9794         * coffread.c (coff_symtab_read): Fix fall-through comment.
9795         * c-exp.y (lex_one_token): Fix fall-through comment.
9796         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9797         comment.
9798         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9799         comment.
9800
9801 2018-05-04  Tom Tromey  <tom@tromey.com>
9802
9803         PR python/22730:
9804         * NEWS: Mention gdb.execute change.
9805         * gdbcmd.h (execute_control_command): Don't declare.
9806         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9807         execute_control_commands, execute_control_commands_to_string.
9808         * cli/cli-script.h (execute_control_commands)
9809         (execute_control_commands_to_string): Declare.
9810         (execute_control_command): Add from_tty parameter.
9811         * cli/cli-script.c (execute_control_commands)
9812         (execute_control_commands_to_string): New functions.
9813         (execute_user_command): Use execute_control_commands.
9814         (execute_control_command_1): Add "from_tty" parameter.  Update.
9815         (execute_control_command): Likewise.
9816
9817 2018-05-04  Tom Tromey  <tom@tromey.com>
9818
9819         PR python/22731:
9820         * NEWS: Mention that breakpoint commands are writable.
9821         * python/py-breakpoint.c (bppy_set_commands): New function.
9822         (breakpoint_object_getset) <"commands">: Use it.
9823
9824 2018-05-04  Tom Tromey  <tom@tromey.com>
9825
9826         * tracepoint.c (actions_command): Update.
9827         * mi/mi-cmd-break.c (mi_command_line_array)
9828         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9829         (mi_read_next_line): Remove.
9830         (mi_cmd_break_commands): Update.
9831         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9832         function_view.
9833         * cli/cli-script.c (get_command_line): Update.
9834         (process_next_line): Use function_view.  Constify.
9835         (recurse_read_control_structure, read_command_lines)
9836         (read_command_lines_1): Change argument types to function_view.
9837         (do_define_command, document_command): Update.
9838         * breakpoint.h (check_tracepoint_command): Don't declare.
9839         * breakpoint.c (check_tracepoint_command): Remove.
9840         (commands_command_1, create_tracepoint_from_upload): Update.
9841
9842 2018-05-04  Tom Tromey  <tom@tromey.com>
9843
9844         PR gdb/11750:
9845         * cli/cli-script.h (enum command_control_type) <define_control>:
9846         New constant.
9847         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9848         (build_command_line, execute_control_command_1)
9849         (process_next_line): Likewise.
9850         (do_define_command): New function, extracted from define_command.
9851         (define_command): Use it.
9852
9853 2018-05-04  Tom Tromey  <tom@tromey.com>
9854
9855         * tracepoint.c (actions_command): Update.
9856         * cli/cli-script.h (read_command_lines): Update.
9857         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9858         (MAX_TMPBUF): Remove define.
9859         (define_command): Use string_printf.
9860         (document_command): Likewise.
9861         * breakpoint.c (commands_command_1): Update.
9862
9863 2018-05-04  Tom Tromey  <tom@tromey.com>
9864
9865         * top.c (execute_command): Update.
9866         * cli/cli-script.h (print_command_lines): Now varargs.
9867         * cli/cli-script.c (print_command_lines): Now varargs.
9868         (execute_control_command_1) <case while_control, case if_control>:
9869         Update.
9870
9871 2018-05-04  Tom Tromey  <tom@tromey.com>
9872
9873         * tracepoint.c (all_tracepoint_actions): Rename from
9874         all_tracepoint_actions_and_cleanup.  Change return type.
9875         (actions_command, encode_actions_1, encode_actions)
9876         (trace_dump_actions, tdump_command): Update.
9877         * remote.c (remote_download_command_source): Update.
9878         * python/python.c (gdbpy_eval_from_control_command)
9879         (python_command, python_interactive_command): Update.
9880         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9881         * guile/guile.c (guile_command)
9882         (gdbscm_eval_from_control_command, guile_command): Update.
9883         * compile/compile.c (compile_code_command)
9884         (compile_print_command, compile_to_object): Update.
9885         * cli/cli-script.h (struct command_lines_deleter): New.
9886         (counted_command_line): New typedef.
9887         (struct command_line): Add constructor, destructor.
9888         <body_list>: Remove.
9889         <body_list_0, body_list_1>: New members.
9890         (command_line_up): Remove typedef.
9891         (read_command_lines, read_command_lines_1, get_command_line):
9892         Update.
9893         (copy_command_lines): Don't declare.
9894         * cli/cli-script.c (build_command_line): Use "new".
9895         (get_command_line): Return counted_command_line.
9896         (print_command_lines, execute_user_command)
9897         (execute_control_command_1, while_command, if_command): Update.
9898         (realloc_body_list): Remove.
9899         (process_next_line, recurse_read_control_structure): Update.
9900         (read_command_lines, read_command_lines_1): Return counted_command_line.
9901         (free_command_lines): Use "delete".
9902         (copy_command_lines): Remove.
9903         (define_command, document_command, show_user_1): Update.
9904         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9905         a counted_command_line.
9906         * breakpoint.h (counted_command_line): Remove typedef.
9907         (breakpoint_set_commands): Update.
9908         * breakpoint.c (check_no_tracepoint_commands)
9909         (validate_commands_for_breakpoint): Update.
9910         (breakpoint_set_commands): Change commands to be a
9911         counted_command_line.
9912         (commands_command_1, update_dprintf_command_list)
9913         (create_tracepoint_from_upload): Update.
9914
9915 2018-05-04  Tom Tromey  <tom@tromey.com>
9916
9917         * cli/cli-decode.h (cmd_list_element): New constructor.
9918         (~cmd_list_element): New destructor.
9919         (struct cmd_list_element): Add initializers.
9920         * cli/cli-decode.c (do_add_cmd): Use "new".
9921         (delete_cmd): Use "delete".
9922
9923 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9924             Pedro Alves <palves@redhat.com>
9925
9926         PR breakpoints/19806 and support for PR external/20207.
9927         * NEWS: Mention Aarch64 watchpoint improvements.
9928         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9929         watchpoints and PR external/20207 watchpoints.
9930         * nat/aarch64-linux-hw-point.c
9931         (kernel_supports_any_contiguous_range): New.
9932         (aarch64_watchpoint_offset): New.
9933         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9934         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9935         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9936         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9937         next_addr_orig_p.  Support PR external/20207 watchpoints.
9938         (aarch64_downgrade_regs): New.
9939         (aarch64_dr_state_insert_one_point): New parameters offset and
9940         addr_orig.
9941         (aarch64_dr_state_remove_one_point): Likewise.
9942         (aarch64_handle_breakpoint): Update caller.
9943         (aarch64_handle_aligned_watchpoint): Likewise.
9944         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9945         aligned_offset.
9946         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9947         aarch64_downgrade_regs.
9948         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9949         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9950         (DR_CONTROL_MASK): ... this.
9951         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9952         (unsigned int aarch64_watchpoint_offset): New prototype.
9953         (aarch64_linux_set_debug_regs): Remove const from state.
9954         * utils.c (align_up, align_down): Move to ...
9955         * common/common-utils.c (align_up, align_down): ... here.
9956         * utils.h (align_up, align_down): Move to ...
9957         * common/common-utils.h (align_up, align_down): ... here.
9958
9959 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9960
9961         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9962         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9963         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9964         Re-implement to match the ABI as summarized in GCC's
9965         gcc/config/sparc/sparc.c.  All callers updated.
9966         (sparc32_store_arguments): Remove assertion.
9967
9968 2018-05-04  Tom Tromey  <tom@tromey.com>
9969
9970         * printcmd.c: Don't include tui.h.
9971         (decode_format): Use skip_spaces.
9972
9973 2018-05-04  Tom Tromey  <tom@tromey.com>
9974
9975         PR gdb/22619:
9976         * printcmd.c (last_count): New global.
9977         (x_command): Use saved count when repeating.
9978
9979 2018-05-04  Tom Tromey  <tom@tromey.com>
9980
9981         * nto-procfs.c (do_closedir_cleanup): Remove.
9982         (procfs_pidlist): Use gdb_dir_up.
9983         * procfs.c (do_closedir_cleanup): Remove.
9984         (proc_update_threads): Use gdb_dir_up.
9985         * common/filestuff.h (struct gdb_dir_deleter): New.
9986         (gdb_dir_up): New typedef.
9987
9988 2018-05-04  Tom Tromey  <tom@tromey.com>
9989
9990         * ada-lang.c (print_mention_exception): Use std::string.
9991
9992 2018-05-04  Tom Tromey  <tom@tromey.com>
9993
9994         * ada-lang.c (create_excep_cond_exprs): Update.
9995         (ada_exception_catchpoint_cond_string): Use std::string.
9996
9997 2018-05-04  Tom Tromey  <tom@tromey.com>
9998
9999         * ada-lang.c (xget_renaming_scope): Return std::string.
10000         (old_renaming_is_invisible): Update.
10001
10002 2018-05-04  Tom Tromey  <tom@tromey.com>
10003
10004         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10005         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10006
10007 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10008
10009         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10010
10011 2018-05-04  Tom Tromey  <tom@tromey.com>
10012
10013         * remote.c (remote_query_supported_append): Change type.
10014         (remote_check_symbols): Update.
10015
10016 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10017
10018         PR gdb/11420
10019         * configure.ac: Prepend libpython.
10020         * python/python-config.py: Likewise.
10021         * configure: Regenerate.
10022
10023 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10024
10025         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10026
10027 2018-05-03  Pedro Alves  <palves@redhat.com>
10028
10029         * s390-linux-nat.c
10030         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10031         override.  Write 'true' instead of '1'.
10032         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10033         declaration.
10034
10035 2018-05-02  Pedro Alves  <palves@redhat.com>
10036
10037         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10038         add_inf_child_target.
10039         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10040         add_inf_child_target.
10041         * aix-thread.c (aix_thread_target_info): New.
10042         (aix_thread_target) <shortname, longname, doc>: Delete.
10043         <info>: New.
10044         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10045         add_inf_child_target.
10046         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10047         add_inf_child_target.
10048         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10049         add_inf_child_target.
10050         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10051         add_inf_child_target.
10052         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10053         add_inf_child_target.
10054         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10055         add_inf_child_target.
10056         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10057         add_inf_child_target.
10058         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10059         add_inf_child_target.
10060         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10061         add_inf_child_target.
10062         * bfd-target.c (target_bfd_target_info): New.
10063         (target_bfd) <shortname, longname, doc>: Delete.
10064         <info>: New.
10065         * bsd-kvm.c (bsd_kvm_target_info): New.
10066         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10067         <info>: New.
10068         (bsd_kvm_target::open): Rename to ...
10069         (bsd_kvm_target_open): ... this.  Adjust.
10070         * bsd-uthread.c (bsd_uthread_target_info): New.
10071         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10072         <info>: New.
10073         * corefile.c (core_file_command): Adjust.
10074         * corelow.c (core_target_info): New.
10075         (core_target) <shortname, longname, doc>: Delete.
10076         <info>: New.
10077         (core_target::open): Rename to ...
10078         (core_target_open): ... this.  Adjust.
10079         * ctf.c (ctf_target_info): New.
10080         (ctf_target) <shortname, longname, doc>: Delete.
10081         <info>: New.
10082         (ctf_target::open): Rename to ...
10083         (ctf_target_open): ... this.
10084         (_initialize_ctf): Adjust.
10085         * exec.c (exec_target_info): New.
10086         (exec_target) <shortname, longname, doc>: Delete.
10087         <info>: New.
10088         (exec_target::open): Rename to ...
10089         (exec_target_open): ... this.
10090         * gdbcore.h (core_target_open): Declare.
10091         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10092         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10093         add_inf_child_target.
10094         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10095         add_inf_child_target.
10096         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10097         add_inf_child_target.
10098         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10099         add_inf_child_target.
10100         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10101         add_inf_child_target.
10102         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10103         add_inf_child_target.
10104         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10105         add_inf_child_target.
10106         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10107         add_inf_child_target.
10108         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10109         add_inf_child_target.
10110         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10111         add_inf_child_target.
10112         * inf-child.c (inf_child_target_info): New.
10113         (inf_child_target::info): New.
10114         (inf_child_open_target): Remove 'target' parameter.  Use
10115         get_native_target instead.
10116         (inf_child_target::open): Delete.
10117         (add_inf_child_target): New.
10118         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10119         Delete.
10120         <info>: New.
10121         (add_inf_child_target): Declare.
10122         (inf_child_open_target): Declare.
10123         * linux-thread-db.c (thread_db_target_info): New.
10124         (thread_db_target) <shortname, longname, doc>: Delete.
10125         <info>: New.
10126         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10127         add_inf_child_target.
10128         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10129         add_inf_child_target.
10130         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10131         add_inf_child_target.
10132         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10133         add_inf_child_target.
10134         * make-target-delegates (print_class): Adjust.
10135         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10136         add_inf_child_target.
10137         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10138         add_inf_child_target.
10139         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10140         add_inf_child_target.
10141         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10142         add_inf_child_target.
10143         * nto-procfs.c (nto_native_target_info): New.
10144         (nto_procfs_target_native) <shortname, longname, doc>:
10145         Delete.
10146         <info>: New.
10147         (nto_procfs_target_info): New.
10148         (nto_procfs_target_procfs) <shortname, longname, doc>:
10149         Delete.
10150         <info>: New.
10151         (init_procfs_targets): Adjust.
10152         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10153         add_inf_child_target.
10154         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10155         add_inf_child_target.
10156         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10157         add_inf_child_target.
10158         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10159         add_inf_child_target.
10160         * ravenscar-thread.c (ravenscar_target_info): New.
10161         (ravenscar_thread_target) <shortname, longname, doc>:
10162         Delete.
10163         <info>: New.
10164         * record-btrace.c (record_btrace_target_info):
10165         (record_btrace_target) <shortname, longname, doc>: Delete.
10166         <info>: New.
10167         (record_btrace_target::open): Rename to ...
10168         (record_btrace_target_open): ... this.  Adjust.
10169         * record-full.c (record_longname, record_doc): New.
10170         (record_full_base_target) <shortname, longname, doc>: Delete.
10171         <info>: New.
10172         (record_full_target_info): New.
10173         (record_full_target): <shortname>: Delete.
10174         <info>: New.
10175         (record_full_core_open_1, record_full_open_1): Update comments.
10176         (record_full_base_target::open): Rename to ...
10177         (record_full_open): ... this.
10178         (cmd_record_full_restore): Update.
10179         (_initialize_record_full): Update.
10180         * remote-sim.c (remote_sim_target_info): New.
10181         (gdbsim_target) <shortname, longname, doc>: Delete.
10182         <info>: New.
10183         (gdbsim_target::open): Rename to ...
10184         (gdbsim_target_open): ... this.
10185         (_initialize_remote_sim): Adjust.
10186         * remote.c (remote_doc): New.
10187         (remote_target_info): New.
10188         (remote_target) <shortname, longname, doc>: Delete.
10189         <info>: New.
10190         (extended_remote_target_info): New.
10191         (extended_remote_target) <shortname, longname, doc>: Delete.
10192         <info>: New.
10193         (remote_target::open_1): Make static.  Adjust.
10194         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10195         * s390-linux-nat.c (_initialize_s390_nat): Use
10196         add_inf_child_target.
10197         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10198         add_inf_child_target.
10199         * sol-thread.c (thread_db_target_info): New.
10200         (sol_thread_target) <shortname, longname, doc>: Delete.
10201         <info>: New.
10202         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10203         add_inf_child_target.
10204         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10205         add_inf_child_target.
10206         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10207         add_inf_child_target.
10208         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10209         add_inf_child_target.
10210         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10211         add_inf_child_target.
10212         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10213         add_inf_child_target.
10214         * spu-linux-nat.c (_initialize_spu_nat): Use
10215         add_inf_child_target.
10216         * spu-multiarch.c (spu_multiarch_target_info): New.
10217         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10218         <info>: New.
10219         * target-delegates.c: Regenerate.
10220         * target.c: Include <unordered_map>.
10221         (target_ops_p): Delete.
10222         (DEF_VEC_P(target_ops_p)): Delete.
10223         (target_factories): New.
10224         (test_target_info): New.
10225         (test_target_ops::info): New.
10226         (open_target): Adjust to use target_factories.
10227         (add_target_with_completer): Rename to ...
10228         (add_target): ... this.  Change prototype.  Register target_info
10229         and open callback in target_factories.  Register target_info in
10230         command context instead of target_ops.
10231         (add_target): Delete old implementation.
10232         (add_deprecated_target_alias): Change prototype.  Adjust.
10233         (the_native_target): New.
10234         (set_native_target, get_native_target): New.
10235         (find_default_run_target): Use the_native_target.
10236         (find_attach_target, find_run_target): Simplify.
10237         (target_ops::open): Delete.
10238         (dummy_target_info): New.
10239         (dummy_target::shortname, dummy_target::longname)
10240         (dummy_target::doc): Delete.
10241         (dummy_target::info): New.
10242         (debug_target::shortname, debug_target::longname)
10243         (debug_target::doc): Delete.
10244         (debug_target::info): New.
10245         * target.h (struct target_info): New.
10246         (target_ops::~target_ops): Add comment.
10247         (target_ops::info): New.
10248         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10249         longer virtual.  Implement in terms of target_info.
10250         (set_native_target, get_native_target): Declare.
10251         (target_open_ftype): New.
10252         (add_target, add_target_with_completer)
10253         (add_deprecated_target_alias): Change prototype.
10254         (test_target) <shortname, longname, doc>: Delete.
10255         <info>: New.
10256         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10257         add_inf_child_target.
10258         * tracefile-tfile.c (tfile_target_info): New.
10259         (tfile_target) <shortname, longname, doc>: Delete.
10260         <info>: New.
10261         (tfile_target::open): Rename to ...
10262         (tfile_target_open): ... this.
10263         (_initialize_tracefile_tfile): Adjust.
10264         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10265         add_inf_child_target.
10266         * windows-nat.c (_initialize_windows_nat): Use
10267         add_inf_child_target.
10268         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10269         add_inf_child_target.
10270
10271 2018-05-02  Pedro Alves  <palves@redhat.com>
10272
10273         * linux-nat.h (linux_nat_target) <low_new_thread,
10274         low_delete_thread, low_new_fork, low_forget_process,
10275         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10276         New virtual methods.
10277         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10278         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10279         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10280         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10281         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10282         Delete.
10283         * linux-fork.c (delete_fork): Adjust to call low method.
10284         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10285         (linux_nat_new_fork, linux_nat_forget_process_hook)
10286         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10287         (linux_nat_status_is_event):
10288         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10289         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10290         to call low method.
10291         (sigtrap_is_event): Rename to ...
10292         (linux_nat_target::low_status_is_event): ... this.
10293         (linux_nat_set_status_is_event): Delete.
10294         (save_stop_reason, linux_nat_wait_1)
10295         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10296         low methods.
10297         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10298         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10299         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10300         (linux_nat_set_prepare_to_resume): Delete.
10301         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10302         low virtual methods.
10303         * amd64-linux-nat.c: Likewise.
10304         * arm-linux-nat.c: Likewise.
10305         * i386-linux-nat.c: Likewise.
10306         * ia64-linux-nat.c: Likewise.
10307         * mips-linux-nat.c: Likewise.
10308         * ppc-linux-nat.c: Likewise.
10309         * s390-linux-nat.c: Likewise.
10310         * sparc64-linux-nat.c: Likewise.
10311         * x86-linux-nat.c: Likewise.
10312         * x86-linux-nat.h: Include "nat/x86-linux.h".
10313         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10314         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10315         Override methods.
10316
10317 2018-05-02  Pedro Alves  <palves@redhat.com>
10318
10319         * target.h (target_ops)
10320         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10321         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10322         stopped_by_watchpoint, have_continuable_watchpoint,
10323         stopped_data_address, watchpoint_addr_within_range,
10324         can_accel_watchpoint_condition, can_run, thread_alive,
10325         has_all_memory, has_memory, has_stack, has_registers,
10326         has_execution, can_async_p, is_async_p, supports_non_stop,
10327         always_non_stop_p, can_execute_reverse, supports_multi_process,
10328         supports_enable_disable_tracepoint,
10329         supports_disable_randomization, supports_string_tracing,
10330         supports_evaluation_of_breakpoint_conditions,
10331         can_run_breakpoint_commands, filesystem_is_local,
10332         can_download_tracepoint, get_trace_state_variable_value,
10333         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10334         record_is_replaying, record_will_replay,
10335         augmented_libraries_svr4_read>: Adjust to return bool.
10336         * aarch64-linux-nat.c: All implementations adjusted.
10337         * aix-thread.c: All implementations adjusted.
10338         * arm-linux-nat.c: All implementations adjusted.
10339         * breakpoint.c: All implementations adjusted.
10340         * bsd-kvm.c: All implementations adjusted.
10341         * bsd-uthread.c: All implementations adjusted.
10342         * corelow.c: All implementations adjusted.
10343         * ctf.c: All implementations adjusted.
10344         * darwin-nat.c: All implementations adjusted.
10345         * darwin-nat.h: All implementations adjusted.
10346         * exec.c: All implementations adjusted.
10347         * fbsd-nat.c: All implementations adjusted.
10348         * fbsd-nat.h: All implementations adjusted.
10349         * gnu-nat.c: All implementations adjusted.
10350         * gnu-nat.h: All implementations adjusted.
10351         * go32-nat.c: All implementations adjusted.
10352         * ia64-linux-nat.c: All implementations adjusted.
10353         * inf-child.c: All implementations adjusted.
10354         * inf-child.h: All implementations adjusted.
10355         * inf-ptrace.c: All implementations adjusted.
10356         * inf-ptrace.h: All implementations adjusted.
10357         * linux-nat.c: All implementations adjusted.
10358         * linux-nat.h: All implementations adjusted.
10359         * mips-linux-nat.c: All implementations adjusted.
10360         * nto-procfs.c: All implementations adjusted.
10361         * ppc-linux-nat.c: All implementations adjusted.
10362         * procfs.c: All implementations adjusted.
10363         * ravenscar-thread.c: All implementations adjusted.
10364         * record-btrace.c: All implementations adjusted.
10365         * record-full.c: All implementations adjusted.
10366         * remote-sim.c: All implementations adjusted.
10367         * remote.c: All implementations adjusted.
10368         * s390-linux-nat.c: All implementations adjusted.
10369         * sol-thread.c: All implementations adjusted.
10370         * spu-multiarch.c: All implementations adjusted.
10371         * target-delegates.c: All implementations adjusted.
10372         * target.c: All implementations adjusted.
10373         * target.h: All implementations adjusted.
10374         * tracefile-tfile.c: All implementations adjusted.
10375         * tracefile.c: All implementations adjusted.
10376         * tracefile.h: All implementations adjusted.
10377         * windows-nat.c: All implementations adjusted.
10378         * x86-linux-nat.h: All implementations adjusted.
10379         * x86-nat.h: All implementations adjusted.
10380
10381 2018-05-02  Pedro Alves  <palves@redhat.com>
10382
10383         * make-target-delegates (scan_target_h): Don't trim lines here.
10384         Replace sequences of tabs and/or whitespace with a single
10385         whitespace.
10386         (top level, parsing methods): Trim each line before processing it
10387         here.
10388
10389 2018-05-02  Pedro Alves  <palves@redhat.com>
10390             John Baldwin  <jhb@freebsd.org>
10391
10392         * target.h (enum strata) <debug_stratum>: New.
10393         (struct target_ops) <all delegation methods>: Replace by C++
10394         virtual methods, and drop "to_" prefix.  All references updated
10395         throughout.
10396         <to_shortname, to_longname, to_doc, to_data,
10397         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10398         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10399         virtual methods.  All references updated throughout.
10400         <can_attach, supports_terminal_ours, can_create_inferior,
10401         get_thread_control_capabilities, attach_no_wait>: New
10402         virtual methods.
10403         <insert_breakpoint, remove_breakpoint>: Now
10404         TARGET_DEFAULT_NORETURN methods.
10405         <info_proc>: Now returns bool.
10406         <to_magic>: Delete.
10407         (OPS_MAGIC): Delete.
10408         (current_target): Delete.  All references replaced by references
10409         to ...
10410         (target_stack): ... this.  New.
10411         (target_shortname, target_longname): Adjust.
10412         (target_can_run): Now a function declaration.
10413         (default_child_has_all_memory, default_child_has_memory)
10414         (default_child_has_stack, default_child_has_registers)
10415         (default_child_has_execution): Remove target_ops parameter.
10416         (complete_target_initialization): Delete.
10417         (memory_breakpoint_target): New template class.
10418         (test_target_ops): Refactor as a C++ class with virtual methods.
10419         * make-target-delegates (NAME_PART): Tighten.
10420         (POINTER_PART, CP_SYMBOL): New.
10421         (SIMPLE_RETURN_PART): Reimplement.
10422         (VEC_RETURN_PART): Expect less.
10423         (RETURN_PART, VIRTUAL_PART): New.
10424         (METHOD): Adjust to C++ virtual methods.
10425         (scan_target_h): Remove reference to C99.
10426         (dname): Output "target_ops::" prefix.
10427         (write_function_header): Adjust to output a C++ class method.
10428         (write_declaration): New.
10429         (write_delegator): Adjust to output a C++ class method.
10430         (tdname): Output "dummy_target::" prefix.
10431         (write_tdefault, write_debugmethod): Adjust to output a C++ class
10432         method.
10433         (tdefault_names, debug_names): Delete.
10434         (return_types, tdefaults, styles, argtypes_array): New.
10435         (top level): All methods are delegators.
10436         (print_class): New.
10437         (top level): Print dummy_target and debug_target classes.
10438         * target-delegates.c: Regenerate.
10439         * target-debug.h (target_debug_print_enum_info_proc_what)
10440         (target_debug_print_thread_control_capabilities)
10441         (target_debug_print_thread_info_p): New.
10442         * target.c (dummy_target): Delete.
10443         (the_dummy_target, the_debug_target): New.
10444         (target_stack): Now extern.
10445         (set_targetdebug): Push/unpush debug target.
10446         (default_child_has_all_memory, default_child_has_memory)
10447         (default_child_has_stack, default_child_has_registers)
10448         (default_child_has_execution): Remove target_ops parameter.
10449         (complete_target_initialization): Delete.
10450         (add_target_with_completer): No longer call
10451         complete_target_initialization.
10452         (target_supports_terminal_ours): Use regular delegation.
10453         (update_current_target): Delete.
10454         (push_target): No longer check magic number.  Don't call
10455         update_current_target.
10456         (unpush_target): Don't call update_current_target.
10457         (target_is_pushed): No longer check magic number.
10458         (target_require_runnable): Skip for all stratums over
10459         process_stratum.
10460         (target_ops::info_proc): New.
10461         (target_info_proc): Use find_target_at and
10462         find_default_run_target.
10463         (target_supports_disable_randomization): Use regular delegation.
10464         (target_get_osdata): Use find_target_at.
10465         (target_ops::open, target_ops::close, target_ops::can_attach)
10466         (target_ops::attach, target_ops::can_create_inferior)
10467         (target_ops::create_inferior, target_ops::can_run)
10468         (target_can_run): New.
10469         (default_fileio_target): Use regular delegation.
10470         (target_ops::fileio_open, target_ops::fileio_pwrite)
10471         (target_ops::fileio_pread, target_ops::fileio_fstat)
10472         (target_ops::fileio_close, target_ops::fileio_unlink)
10473         (target_ops::fileio_readlink): New.
10474         (target_fileio_open_1, target_fileio_unlink)
10475         (target_fileio_readlink): Always call the target method.  Handle
10476         FILEIO_ENOSYS.
10477         (return_zero, return_zero_has_execution): Delete.
10478         (init_dummy_target): Delete.
10479         (dummy_target::dummy_target, dummy_target::shortname)
10480         (dummy_target::longname, dummy_target::doc)
10481         (debug_target::debug_target, debug_target::shortname)
10482         (debug_target::longname, debug_target::doc): New.
10483         (target_supports_delete_record): Use regular delegation.
10484         (setup_target_debug): Delete.
10485         (maintenance_print_target_stack): Skip debug_stratum.
10486         (initialize_targets): Instantiate the_dummy_target and
10487         the_debug_target.
10488         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
10489         use target_stack.
10490         (target_auxv_search, fprint_target_auxv): Adjust.
10491         (info_auxv_command): Adjust to use target_stack.
10492         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
10493         * exceptions.c (print_flush): Handle a NULL target_stack.
10494         * regcache.c (target_ops_no_register): Refactor as class with
10495         virtual methods.
10496
10497         * exec.c (exec_target): New class.
10498         (exec_ops): Now an exec_target.
10499         (exec_open, exec_close_1, exec_get_section_table)
10500         (exec_xfer_partial, exec_files_info, exec_has_memory)
10501         (exec_make_note_section): Refactor as exec_target methods.
10502         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
10503         Delete.
10504         (exec_target::find_memory_regions): New.
10505         (_initialize_exec): Don't call init_exec_ops.
10506         * gdbcore.h (exec_file_clear): Delete.
10507
10508         * corefile.c (core_target): Delete.
10509         (core_file_command): Adjust.
10510         * corelow.c (core_target): New class.
10511         (the_core_target): New.
10512         (core_close): Remove target_ops parameter.
10513         (core_close_cleanup): Adjust.
10514         (core_target::close): New.
10515         (core_open, core_detach, get_core_registers, core_files_info)
10516         (core_xfer_partial, core_thread_alive, core_read_description)
10517         (core_pid_to_str, core_thread_name, core_has_memory)
10518         (core_has_stack, core_has_registers, core_info_proc): Rework as
10519         core_target methods.
10520         (ignore, core_remove_breakpoint, init_core_ops): Delete.
10521         (_initialize_corelow): Initialize the_core_target.
10522         * gdbcore.h (core_target): Delete.
10523         (the_core_target): New.
10524
10525         * ctf.c: (ctf_target): New class.
10526         (ctf_ops): Now a ctf_target.
10527         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
10528         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
10529         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
10530         methods.
10531         (init_ctf_ops): Delete.
10532         (_initialize_ctf): Don't call it.
10533         * tracefile-tfile.c (tfile_target): New class.
10534         (tfile_ops): Now a tfile_target.
10535         (tfile_open, tfile_close, tfile_files_info)
10536         (tfile_get_tracepoint_status, tfile_trace_find)
10537         (tfile_fetch_registers, tfile_xfer_partial)
10538         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
10539         Refactor as tfile_target methods.
10540         (tfile_xfer_partial_features): Remove target_ops parameter.
10541         (init_tfile_ops): Delete.
10542         (_initialize_tracefile_tfile): Don't call it.
10543         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
10544         (tracefile_has_stack, tracefile_has_registers)
10545         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
10546         tracefile_target methods.
10547         (init_tracefile_ops): Delete.
10548         (tracefile_target::tracefile_target): New.
10549         * tracefile.h: Include "target.h".
10550         (tracefile_target): New class.
10551         (init_tracefile_ops): Delete.
10552
10553         * spu-multiarch.c (spu_multiarch_target): New class.
10554         (spu_ops): Now a spu_multiarch_target.
10555         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
10556         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
10557         (spu_search_memory, spu_mourn_inferior): Refactor as
10558         spu_multiarch_target methods.
10559         (init_spu_ops): Delete.
10560         (_initialize_spu_multiarch): Remove references to init_spu_ops,
10561         complete_target_initialization.
10562
10563         * ravenscar-thread.c (ravenscar_thread_target): New class.
10564         (ravenscar_ops): Now a ravenscar_thread_target.
10565         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
10566         (ravenscar_thread_alive, ravenscar_pid_to_str)
10567         (ravenscar_fetch_registers, ravenscar_store_registers)
10568         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
10569         (ravenscar_stopped_by_hw_breakpoint)
10570         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
10571         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
10572         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
10573         methods.
10574         (init_ravenscar_thread_ops): Delete.
10575         (_initialize_ravenscar): Remove references to
10576         init_ravenscar_thread_ops and complete_target_initialization.
10577
10578         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
10579         (bsd_uthread_target): New class.
10580         (bsd_uthread_ops): Now a bsd_uthread_target.
10581         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
10582         (bsd_uthread_close, bsd_uthread_mourn_inferior)
10583         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
10584         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
10585         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
10586         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
10587         (bsd_uthread_target): Delete function.
10588         (_initialize_bsd_uthread): Remove reference to
10589         complete_target_initialization.
10590
10591         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
10592         (target_bfd): ... this new class.
10593         (target_bfd_xfer_partial, target_bfd_get_section_table)
10594         (target_bfd_close): Refactor as target_bfd methods.
10595         (target_bfd::~target_bfd): New.
10596         (target_bfd_reopen): Adjust.
10597         (target_bfd::close): New.
10598
10599         * record-btrace.c (record_btrace_target): New class.
10600         (record_btrace_ops): Now a record_btrace_target.
10601         (record_btrace_open, record_btrace_stop_recording)
10602         (record_btrace_disconnect, record_btrace_close)
10603         (record_btrace_async, record_btrace_info)
10604         (record_btrace_insn_history, record_btrace_insn_history_range)
10605         (record_btrace_insn_history_from, record_btrace_call_history)
10606         (record_btrace_call_history_range)
10607         (record_btrace_call_history_from, record_btrace_record_method)
10608         (record_btrace_is_replaying, record_btrace_will_replay)
10609         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
10610         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
10611         (record_btrace_store_registers, record_btrace_prepare_to_store)
10612         (record_btrace_to_get_unwinder)
10613         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
10614         (record_btrace_commit_resume, record_btrace_wait)
10615         (record_btrace_stop, record_btrace_can_execute_reverse)
10616         (record_btrace_stopped_by_sw_breakpoint)
10617         (record_btrace_supports_stopped_by_sw_breakpoint)
10618         (record_btrace_stopped_by_hw_breakpoint)
10619         (record_btrace_supports_stopped_by_hw_breakpoint)
10620         (record_btrace_update_thread_list, record_btrace_thread_alive)
10621         (record_btrace_goto_begin, record_btrace_goto_end)
10622         (record_btrace_goto, record_btrace_stop_replaying_all)
10623         (record_btrace_execution_direction)
10624         (record_btrace_prepare_to_generate_core)
10625         (record_btrace_done_generating_core): Refactor as
10626         record_btrace_target methods.
10627         (init_record_btrace_ops): Delete.
10628         (_initialize_record_btrace): Remove reference to
10629         init_record_btrace_ops.
10630         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
10631         the execution_direction global.
10632         (record_full_base_target, record_full_target)
10633         (record_full_core_target): New classes.
10634         (record_full_ops): Now a record_full_target.
10635         (record_full_core_ops): Now a record_full_core_target.
10636         (record_full_target::detach, record_full_target::disconnect)
10637         (record_full_core_target::disconnect)
10638         (record_full_target::mourn_inferior, record_full_target::kill):
10639         New.
10640         (record_full_open, record_full_close, record_full_async): Refactor
10641         as methods of the record_full_base_target class.
10642         (record_full_resume, record_full_commit_resume): Refactor
10643         as methods of the record_full_target class.
10644         (record_full_wait, record_full_stopped_by_watchpoint)
10645         (record_full_stopped_data_address)
10646         (record_full_stopped_by_sw_breakpoint)
10647         (record_full_supports_stopped_by_sw_breakpoint)
10648         (record_full_stopped_by_hw_breakpoint)
10649         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
10650         methods of the record_full_base_target class.
10651         (record_full_store_registers, record_full_xfer_partial)
10652         (record_full_insert_breakpoint, record_full_remove_breakpoint):
10653         Refactor as methods of the record_full_target class.
10654         (record_full_can_execute_reverse, record_full_get_bookmark)
10655         (record_full_goto_bookmark, record_full_execution_direction)
10656         (record_full_record_method, record_full_info, record_full_delete)
10657         (record_full_is_replaying, record_full_will_replay)
10658         (record_full_goto_begin, record_full_goto_end, record_full_goto)
10659         (record_full_stop_replaying): Refactor as methods of the
10660         record_full_base_target class.
10661         (record_full_core_resume, record_full_core_kill)
10662         (record_full_core_fetch_registers)
10663         (record_full_core_prepare_to_store)
10664         (record_full_core_store_registers, record_full_core_xfer_partial)
10665         (record_full_core_insert_breakpoint)
10666         (record_full_core_remove_breakpoint)
10667         (record_full_core_has_execution): Refactor
10668         as methods of the record_full_core_target class.
10669         (record_full_base_target::supports_delete_record): New.
10670         (init_record_full_ops): Delete.
10671         (init_record_full_core_ops): Delete.
10672         (record_full_save): Refactor as method of the
10673         record_full_base_target class.
10674         (_initialize_record_full): Remove references to
10675         init_record_full_ops and init_record_full_core_ops.
10676
10677         * remote.c (remote_target, extended_remote_target): New classes.
10678         (remote_ops): Now a remote_target.
10679         (extended_remote_ops): Now an extended_remote_target.
10680         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
10681         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
10682         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
10683         (remote_pass_signals, remote_set_syscall_catchpoint)
10684         (remote_program_signals, )
10685         (remote_thread_always_alive): Remove target_ops parameter.
10686         (remote_thread_alive, remote_thread_name)
10687         (remote_update_thread_list, remote_threads_extra_info)
10688         (remote_static_tracepoint_marker_at)
10689         (remote_static_tracepoint_markers_by_strid)
10690         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
10691         (remote_open): Refactor as methods of remote_target.
10692         (extended_remote_open, extended_remote_detach)
10693         (extended_remote_attach, extended_remote_post_attach):
10694         (extended_remote_supports_disable_randomization)
10695         (extended_remote_create_inferior): : Refactor as method of
10696         extended_remote_target.
10697         (remote_set_permissions, remote_open_1, remote_detach)
10698         (remote_follow_fork, remote_follow_exec, remote_disconnect)
10699         (remote_resume, remote_commit_resume, remote_stop)
10700         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
10701         (remote_terminal_ours, remote_wait, remote_fetch_registers)
10702         (remote_prepare_to_store, remote_store_registers)
10703         (remote_flash_erase, remote_flash_done, remote_files_info)
10704         (remote_kill, remote_mourn, remote_insert_breakpoint)
10705         (remote_remove_breakpoint, remote_insert_watchpoint)
10706         (remote_watchpoint_addr_within_range)
10707         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
10708         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
10709         (remote_supports_stopped_by_sw_breakpoint)
10710         (remote_stopped_by_hw_breakpoint)
10711         (remote_supports_stopped_by_hw_breakpoint)
10712         (remote_stopped_by_watchpoint, remote_stopped_data_address)
10713         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
10714         (remote_verify_memory): Refactor as methods of remote_target.
10715         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
10716         parameter.
10717         (remote_xfer_partial, remote_get_memory_xfer_limit)
10718         (remote_search_memory, remote_rcmd, remote_memory_map)
10719         (remote_pid_to_str, remote_get_thread_local_address)
10720         (remote_get_tib_address, remote_read_description): Refactor as
10721         methods of remote_target.
10722         (remote_target::fileio_open, remote_target::fileio_pwrite)
10723         (remote_target::fileio_pread, remote_target::fileio_close): New.
10724         (remote_hostio_readlink, remote_hostio_fstat)
10725         (remote_filesystem_is_local, remote_can_execute_reverse)
10726         (remote_supports_non_stop, remote_supports_disable_randomization)
10727         (remote_supports_multi_process, remote_supports_cond_breakpoints)
10728         (remote_supports_enable_disable_tracepoint)
10729         (remote_supports_string_tracing)
10730         (remote_can_run_breakpoint_commands, remote_trace_init)
10731         (remote_download_tracepoint, remote_can_download_tracepoint)
10732         (remote_download_trace_state_variable, remote_enable_tracepoint)
10733         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10734         (remote_trace_start, remote_get_trace_status)
10735         (remote_get_tracepoint_status, remote_trace_stop)
10736         (remote_trace_find, remote_get_trace_state_variable_value)
10737         (remote_save_trace_data, remote_get_raw_trace_data)
10738         (remote_set_disconnected_tracing, remote_core_of_thread)
10739         (remote_set_circular_trace_buffer, remote_traceframe_info)
10740         (remote_get_min_fast_tracepoint_insn_len)
10741         (remote_set_trace_buffer_size, remote_set_trace_notes)
10742         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10743         (remote_disable_btrace, remote_teardown_btrace)
10744         (remote_read_btrace, remote_btrace_conf)
10745         (remote_augmented_libraries_svr4_read, remote_load)
10746         (remote_pid_to_exec_file, remote_can_do_single_step)
10747         (remote_execution_direction, remote_thread_handle_to_thread_info):
10748         Refactor as methods of remote_target.
10749         (init_remote_ops, init_extended_remote_ops): Delete.
10750         (remote_can_async_p, remote_is_async_p, remote_async)
10751         (remote_thread_events, remote_upload_tracepoints)
10752         (remote_upload_trace_state_variables): Refactor as methods of
10753         remote_target.
10754         (_initialize_remote): Remove references to init_remote_ops and
10755         init_extended_remote_ops.
10756
10757         * remote-sim.c (gdbsim_target): New class.
10758         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10759         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10760         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10761         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10762         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10763         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10764         Refactor as methods of gdbsim_target.
10765         (gdbsim_ops): Now a gdbsim_target.
10766         (init_gdbsim_ops): Delete.
10767         (gdbsim_cntrl_c): Adjust.
10768         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10769
10770         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10771         (the_amd64_linux_nat_target): New.
10772         (amd64_linux_fetch_inferior_registers)
10773         (amd64_linux_store_inferior_registers): Refactor as methods of
10774         amd64_linux_nat_target.
10775         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
10776         * i386-linux-nat.c: Don't include "linux-nat.h".
10777         (i386_linux_nat_target): New class.
10778         (the_i386_linux_nat_target): New.
10779         (i386_linux_fetch_inferior_registers)
10780         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10781         as methods of i386_linux_nat_target.
10782         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10783         * inf-child.c (inf_child_ops): Delete.
10784         (inf_child_fetch_inferior_registers)
10785         (inf_child_store_inferior_registers): Delete.
10786         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10787         methods of inf_child_target.
10788         (inf_child_target::supports_terminal_ours)
10789         (inf_child_target::terminal_init)
10790         (inf_child_target::terminal_inferior)
10791         (inf_child_target::terminal_ours_for_output)
10792         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10793         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10794         New.
10795         (inf_child_open, inf_child_disconnect, inf_child_close)
10796         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10797         (inf_child_post_startup_inferior, inf_child_can_run)
10798         (inf_child_pid_to_exec_file): Refactor as methods of
10799         inf_child_target.
10800         (inf_child_follow_fork): Delete.
10801         (inf_child_target::can_create_inferior)
10802         (inf_child_target::can_attach): New.
10803         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10804         (inf_child_target::has_stack, inf_child_target::has_registers)
10805         (inf_child_target::has_execution): New.
10806         (inf_child_fileio_open, inf_child_fileio_pwrite)
10807         (inf_child_fileio_pread, inf_child_fileio_fstat)
10808         (inf_child_fileio_close, inf_child_fileio_unlink)
10809         (inf_child_fileio_readlink, inf_child_use_agent)
10810         (inf_child_can_use_agent): Refactor as methods of
10811         inf_child_target.
10812         (return_zero, inf_child_target): Delete.
10813         (inf_child_target::inf_child_target): New.
10814         * inf-child.h: Include "target.h".
10815         (inf_child_target): Delete function prototype.
10816         (inf_child_target): New class.
10817         (inf_child_open_target, inf_child_mourn_inferior)
10818         (inf_child_maybe_unpush_target): Delete.
10819         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10820         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10821         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10822         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10823         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10824         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10825         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10826         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10827         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10828         methods of inf_ptrace_target.
10829         (inf_ptrace_target): Delete function.
10830         * inf-ptrace.h: Include "inf-child.h".
10831         (inf_ptrace_target): Delete function declaration.
10832         (inf_ptrace_target): New class.
10833         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10834         * linux-nat.c (linux_target): New.
10835         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10836         (linux_nat_target::~linux_nat_target): New.
10837         (linux_child_post_attach, linux_child_post_startup_inferior)
10838         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10839         (linux_child_remove_fork_catchpoint)
10840         (linux_child_insert_vfork_catchpoint)
10841         (linux_child_remove_vfork_catchpoint)
10842         (linux_child_insert_exec_catchpoint)
10843         (linux_child_remove_exec_catchpoint)
10844         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10845         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10846         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10847         (linux_nat_stopped_data_address)
10848         (linux_nat_stopped_by_sw_breakpoint)
10849         (linux_nat_supports_stopped_by_sw_breakpoint)
10850         (linux_nat_stopped_by_hw_breakpoint)
10851         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10852         (linux_nat_kill, linux_nat_mourn_inferior)
10853         (linux_nat_xfer_partial, linux_nat_thread_alive)
10854         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10855         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10856         (linux_child_static_tracepoint_markers_by_strid)
10857         (linux_nat_is_async_p, linux_nat_can_async_p)
10858         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10859         (linux_nat_supports_multi_process)
10860         (linux_nat_supports_disable_randomization, linux_nat_async)
10861         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10862         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10863         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10864         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10865         methods of linux_nat_target.
10866         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10867         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10868         parameter.
10869         (check_stopped_by_watchpoint): Adjust.
10870         (linux_xfer_partial): Delete.
10871         (linux_target_install_ops, linux_target, linux_nat_add_target):
10872         Delete.
10873         (linux_nat_target::linux_nat_target): New.
10874         * linux-nat.h: Include "inf-ptrace.h".
10875         (linux_nat_target): New.
10876         (linux_target, linux_target_install_ops, linux_nat_add_target):
10877         Delete function declarations.
10878         (linux_target): Declare global.
10879         * linux-thread-db.c (thread_db_target): New.
10880         (thread_db_target::thread_db_target): New.
10881         (thread_db_ops): Delete.
10882         (the_thread_db_target): New.
10883         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10884         (thread_db_update_thread_list, thread_db_pid_to_str)
10885         (thread_db_extra_thread_info)
10886         (thread_db_thread_handle_to_thread_info)
10887         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10888         (thread_db_resume): Refactor as methods of thread_db_target.
10889         (init_thread_db_ops): Delete.
10890         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10891         * x86-linux-nat.c: Don't include "linux-nat.h".
10892         (super_post_startup_inferior): Delete.
10893         (x86_linux_nat_target::~x86_linux_nat_target): New.
10894         (x86_linux_child_post_startup_inferior)
10895         (x86_linux_read_description, x86_linux_enable_btrace)
10896         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10897         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10898         methods of x86_linux_nat_target.
10899         (x86_linux_create_target): Delete.  Bits folded ...
10900         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10901         pointer.
10902         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10903         (x86_linux_nat_target): New class.
10904         (x86_linux_create_target): Delete.
10905         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10906         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10907         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10908         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10909         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10910         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10911         make extern.
10912         (x86_use_watchpoints): Delete.
10913         * x86-nat.h: Include "breakpoint.h" and "target.h".
10914         (x86_use_watchpoints): Delete.
10915         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10916         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10917         (x86_insert_watchpoint, x86_remove_watchpoint)
10918         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10919         (x86_stopped_by_hw_breakpoint): New declarations.
10920         (x86_nat_target): New template class.
10921
10922         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10923         (the_ppc_linux_nat_target): New.
10924         (ppc_linux_fetch_inferior_registers)
10925         (ppc_linux_can_use_hw_breakpoint)
10926         (ppc_linux_region_ok_for_hw_watchpoint)
10927         (ppc_linux_ranged_break_num_registers)
10928         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10929         (ppc_linux_insert_mask_watchpoint)
10930         (ppc_linux_remove_mask_watchpoint)
10931         (ppc_linux_can_accel_watchpoint_condition)
10932         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10933         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10934         (ppc_linux_watchpoint_addr_within_range)
10935         (ppc_linux_masked_watch_num_registers)
10936         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10937         (ppc_linux_read_description): Refactor as methods of
10938         ppc_linux_nat_target.
10939         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10940
10941         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10942         (procfs_target): New class.
10943         (the_procfs_target): New.
10944         (procfs_target): Delete function.
10945         (procfs_auxv_parse, procfs_attach, procfs_detach)
10946         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10947         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10948         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10949         (procfs_create_inferior, procfs_update_thread_list)
10950         (procfs_thread_alive, procfs_pid_to_str)
10951         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10952         (procfs_stopped_data_address, procfs_insert_watchpoint)
10953         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10954         (proc_find_memory_regions, procfs_info_proc)
10955         (procfs_make_note_section): Refactor as methods of procfs_target.
10956         (_initialize_procfs): Adjust.
10957         * sol-thread.c (sol_thread_target): New class.
10958         (sol_thread_ops): Now a sol_thread_target.
10959         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10960         (sol_thread_fetch_registers, sol_thread_store_registers)
10961         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10962         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10963         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10964         (init_sol_thread_ops): Delete.
10965         (_initialize_sol_thread): Adjust.  Remove references to
10966         init_sol_thread_ops and complete_target_initialization.
10967
10968         * windows-nat.c (windows_nat_target): New class.
10969         (windows_fetch_inferior_registers)
10970         (windows_store_inferior_registers, windows_resume, windows_wait)
10971         (windows_attach, windows_detach, windows_pid_to_exec_file)
10972         (windows_files_info, windows_create_inferior)
10973         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10974         (windows_close, windows_pid_to_str, windows_xfer_partial)
10975         (windows_get_tib_address, windows_get_ada_task_ptid)
10976         (windows_thread_name, windows_thread_alive): Refactor as
10977         windows_nat_target methods.
10978         (do_initial_windows_stuff): Adjust.
10979         (windows_target): Delete function.
10980         (_initialize_windows_nat): Adjust.
10981
10982         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10983         (darwin_mourn_inferior, darwin_kill_inferior)
10984         (darwin_create_inferior, darwin_attach, darwin_detach)
10985         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10986         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10987         (darwin_supports_multi_process): Refactor as darwin_nat_target
10988         methods.
10989         (darwin_resume_to, darwin_files_info): Delete.
10990         (_initialize_darwin_inferior): Rename to ...
10991         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10992         * darwin-nat.h: Include "inf-child.h".
10993         (darwin_nat_target): New class.
10994         (darwin_complete_target): Delete.
10995         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10996         (darwin_target): New.
10997         (i386_darwin_fetch_inferior_registers)
10998         (i386_darwin_store_inferior_registers): Refactor as methods of
10999         darwin_nat_target.
11000         (darwin_complete_target): Delete, with ...
11001         (_initialize_i386_darwin_nat): ... bits factored out here.
11002
11003         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11004         (the_alpha_linux_nat_target): New.
11005         (alpha_linux_register_u_offset): Refactor as
11006         alpha_linux_nat_target method.
11007         (_initialize_alpha_linux_nat): Adjust.
11008         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11009         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11010         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11011         methods of linux_nat_trad_target.
11012         (linux_trad_target): Delete.
11013         * linux-nat-trad.h (linux_trad_target): Delete function.
11014         (linux_nat_trad_target): New class.
11015         * mips-linux-nat.c (mips_linux_nat_target): New class.
11016         (super_fetch_registers, super_store_registers, super_close):
11017         Delete.
11018         (the_mips_linux_nat_target): New.
11019         (mips64_linux_regsets_fetch_registers)
11020         (mips64_linux_regsets_store_registers)
11021         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11022         (mips_linux_register_u_offset, mips_linux_read_description)
11023         (mips_linux_can_use_hw_breakpoint)
11024         (mips_linux_stopped_by_watchpoint)
11025         (mips_linux_stopped_data_address)
11026         (mips_linux_region_ok_for_hw_watchpoint)
11027         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11028         (mips_linux_close): Refactor as methods of mips_linux_nat.
11029         (_initialize_mips_linux_nat): Adjust to C++ification.
11030
11031         * aix-thread.c (aix_thread_target): New class.
11032         (aix_thread_ops): Now an aix_thread_target.
11033         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11034         (aix_thread_fetch_registers, aix_thread_store_registers)
11035         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11036         (aix_thread_thread_alive, aix_thread_pid_to_str)
11037         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11038         Refactor as methods of aix_thread_target.
11039         (init_aix_thread_ops): Delete.
11040         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11041         and complete_target_initialization.
11042         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11043         (rs6000_nat_target): New class.
11044         (the_rs6000_nat_target): New.
11045         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11046         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11047         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11048         (super_create_inferior): Delete.
11049         (_initialize_rs6000_nat): Adjust to C++ification.
11050
11051         * arm-linux-nat.c (arm_linux_nat_target): New class.
11052         (the_arm_linux_nat_target): New.
11053         (arm_linux_fetch_inferior_registers)
11054         (arm_linux_store_inferior_registers, arm_linux_read_description)
11055         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11056         (arm_linux_remove_hw_breakpoint)
11057         (arm_linux_region_ok_for_hw_watchpoint)
11058         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11059         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11060         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11061         arm_linux_nat_target.
11062         (_initialize_arm_linux_nat): Adjust to C++ification.
11063
11064         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11065         (the_aarch64_linux_nat_target): New.
11066         (aarch64_linux_fetch_inferior_registers)
11067         (aarch64_linux_store_inferior_registers)
11068         (aarch64_linux_child_post_startup_inferior)
11069         (aarch64_linux_read_description)
11070         (aarch64_linux_can_use_hw_breakpoint)
11071         (aarch64_linux_insert_hw_breakpoint)
11072         (aarch64_linux_remove_hw_breakpoint)
11073         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11074         (aarch64_linux_region_ok_for_hw_watchpoint)
11075         (aarch64_linux_stopped_data_address)
11076         (aarch64_linux_stopped_by_watchpoint)
11077         (aarch64_linux_watchpoint_addr_within_range)
11078         (aarch64_linux_can_do_single_step): Refactor as methods of
11079         aarch64_linux_nat_target.
11080         (super_post_startup_inferior): Delete.
11081         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11082
11083         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11084         (the_hppa_linux_nat_target): New.
11085         (hppa_linux_fetch_inferior_registers)
11086         (hppa_linux_store_inferior_registers): Refactor as methods of
11087         hppa_linux_nat_target.
11088         (_initialize_hppa_linux_nat): Adjust to C++ification.
11089
11090         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11091         (the_ia64_linux_nat_target): New.
11092         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11093         (ia64_linux_stopped_data_address)
11094         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11095         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11096         ia64_linux_nat_target methods.
11097         (super_xfer_partial): Delete.
11098         (_initialize_ia64_linux_nat): Adjust to C++ification.
11099
11100         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11101         (the_m32r_linux_nat_target): New.
11102         (m32r_linux_fetch_inferior_registers)
11103         (m32r_linux_store_inferior_registers): Refactor as
11104         m32r_linux_nat_target methods.
11105         (_initialize_m32r_linux_nat): Adjust to C++ification.
11106
11107         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11108         (the_m68k_linux_nat_target): New.
11109         (m68k_linux_fetch_inferior_registers)
11110         (m68k_linux_store_inferior_registers): Refactor as
11111         m68k_linux_nat_target methods.
11112         (_initialize_m68k_linux_nat): Adjust to C++ification.
11113
11114         * s390-linux-nat.c (s390_linux_nat_target): New class.
11115         (the_s390_linux_nat_target): New.
11116         (s390_linux_fetch_inferior_registers)
11117         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11118         (s390_insert_watchpoint, s390_remove_watchpoint)
11119         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11120         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11121         (s390_auxv_parse, s390_read_description): Refactor as methods of
11122         s390_linux_nat_target.
11123         (_initialize_s390_nat): Adjust to C++ification.
11124
11125         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11126         (the_sparc_linux_nat_target): New.
11127         (_initialize_sparc_linux_nat): Adjust to C++ification.
11128         * sparc-nat.c (sparc_fetch_inferior_registers)
11129         (sparc_store_inferior_registers): Remove target_ops parameter.
11130         * sparc-nat.h (sparc_fetch_inferior_registers)
11131         (sparc_store_inferior_registers): Remove target_ops parameter.
11132         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11133         (the_sparc64_linux_nat_target): New.
11134         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11135
11136         * spu-linux-nat.c (spu_linux_nat_target): New class.
11137         (the_spu_linux_nat_target): New.
11138         (spu_child_post_startup_inferior, spu_child_post_attach)
11139         (spu_child_wait, spu_fetch_inferior_registers)
11140         (spu_store_inferior_registers, spu_xfer_partial)
11141         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11142         methods.
11143         (_initialize_spu_nat): Adjust to C++ification.
11144
11145         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11146         (the_tilegx_linux_nat_target): New.
11147         (fetch_inferior_registers, store_inferior_registers):
11148         Refactor as methods.
11149         (_initialize_tile_linux_nat): Adjust to C++ification.
11150
11151         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11152         (the_xtensa_linux_nat_target): New.
11153         (xtensa_linux_fetch_inferior_registers)
11154         (xtensa_linux_store_inferior_registers): Refactor as
11155         xtensa_linux_nat_target methods.
11156         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11157
11158         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11159         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11160         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11161         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11162         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11163         (fbsd_stopped_by_sw_breakpoint)
11164         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11165         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11166         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11167         (fbsd_post_startup_inferior, fbsd_post_attach)
11168         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11169         (fbsd_set_syscall_catchpoint)
11170         (super_xfer_partial, super_resume, super_wait)
11171         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11172         (fbsd_handle_debug_trap): Remove target_ops parameter.
11173         (fbsd_nat_add_target): Delete.
11174         * fbsd-nat.h: Include "inf-ptrace.h".
11175         (fbsd_nat_add_target): Delete.
11176         (USE_SIGTRAP_SIGINFO): Define.
11177         (fbsd_nat_target): New class.
11178
11179         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11180         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11181         (amd64bsd_target): Delete.
11182         * amd64-bsd-nat.h: New file.
11183         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11184         "x86-bsd-nat.h".
11185         (amd64_fbsd_nat_target): New class.
11186         (the_amd64_fbsd_nat_target): New.
11187         (amd64fbsd_read_description): Refactor as method of
11188         amd64_fbsd_nat_target.
11189         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11190         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11191         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11192         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11193         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11194         (i386bsd_target): Delete.
11195         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11196         (i386bsd_fetch_inferior_registers)
11197         (i386bsd_store_inferior_registers): Declare.
11198         (i386_bsd_nat_target): New class.
11199         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11200         (the_i386_fbsd_nat_target): New.
11201         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11202         i386_fbsd_nat_target methods.
11203         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11204         (_initialize_i386fbsd_nat): Adjust to C++ification.
11205         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11206         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11207         (_initialize_x86_bsd_nat): Adjust to C++ification.
11208         * x86-bsd-nat.h: Include "x86-nat.h".
11209         (x86bsd_target): Delete declaration.
11210         (x86bsd_nat_target): New class.
11211
11212         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11213         (the_aarch64_fbsd_nat_target): New.
11214         (aarch64_fbsd_fetch_inferior_registers)
11215         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11216         aarch64_fbsd_nat_target.
11217         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11218         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11219         (the_alpha_bsd_nat_target): New.
11220         (alphabsd_fetch_inferior_registers)
11221         (alphabsd_store_inferior_registers): Refactor as
11222         alpha_bsd_nat_target methods.
11223         (_initialize_alphabsd_nat): Refactor as methods of
11224         alpha_bsd_nat_target.
11225         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11226         (the_amd64_nbsd_nat_target): New.
11227         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11228         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11229         (the_amd64_obsd_nat_target): New.
11230         (_initialize_amd64obsd_nat): Adjust to C++ification.
11231         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11232         (the_arm_fbsd_nat_target): New.
11233         (arm_fbsd_fetch_inferior_registers)
11234         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11235         (_initialize_arm_fbsd_nat): Refactor as methods of
11236         arm_fbsd_nat_target.
11237         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11238         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11239         (the_arm_netbsd_nat_target): New.
11240         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11241         arm_netbsd_nat_target.
11242         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11243         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11244         (the_hppa_nbsd_nat_target): New.
11245         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11246         hppa_nbsd_nat_target methods.
11247         (_initialize_hppanbsd_nat): Adjust to C++ification.
11248         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11249         (the_hppa_obsd_nat_target): New.
11250         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11251         methods of hppa_obsd_nat_target.
11252         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11253         add_target.
11254         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11255         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11256         add_target.
11257         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11258         (_initialize_i386obsd_nat): Use add_target.
11259         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11260         (the_m68k_bsd_nat_target): New.
11261         (m68kbsd_fetch_inferior_registers)
11262         (m68kbsd_store_inferior_registers): Refactor as methods of
11263         m68k_bsd_nat_target.
11264         (_initialize_m68kbsd_nat): Adjust to C++ification.
11265         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11266         (the_mips_fbsd_nat_target): New.
11267         (mips_fbsd_fetch_inferior_registers)
11268         (mips_fbsd_store_inferior_registers): Refactor as methods of
11269         mips_fbsd_nat_target.
11270         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11271         add_target.
11272         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11273         (the_mips_nbsd_nat_target): New.
11274         (mipsnbsd_fetch_inferior_registers)
11275         (mipsnbsd_store_inferior_registers): Refactor as methods of
11276         mips_nbsd_nat_target.
11277         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11278         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11279         (the_mips64_obsd_nat_target): New.
11280         (mips64obsd_fetch_inferior_registers)
11281         (mips64obsd_store_inferior_registers): Refactor as methods of
11282         mips64_obsd_nat_target.
11283         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11284         add_target.
11285         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11286         nbsd_nat_target.
11287         * nbsd-nat.h: Include "inf-ptrace.h".
11288         (nbsd_nat_target): New class.
11289         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11290         (obsd_wait): Refactor as methods of obsd_nat_target.
11291         (obsd_add_target): Delete.
11292         * obsd-nat.h: Include "inf-ptrace.h".
11293         (obsd_nat_target): New class.
11294         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11295         (the_ppc_fbsd_nat_target): New.
11296         (ppcfbsd_fetch_inferior_registers)
11297         (ppcfbsd_store_inferior_registers): Refactor as methods of
11298         ppc_fbsd_nat_target.
11299         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11300         add_target.
11301         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11302         (the_ppc_nbsd_nat_target): New.
11303         (ppcnbsd_fetch_inferior_registers)
11304         (ppcnbsd_store_inferior_registers): Refactor as methods of
11305         ppc_nbsd_nat_target.
11306         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11307         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11308         (the_ppc_obsd_nat_target): New.
11309         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11310         methods of ppc_obsd_nat_target.
11311         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11312         add_target.
11313         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11314         (the_sh_nbsd_nat_target): New.
11315         (shnbsd_fetch_inferior_registers)
11316         (shnbsd_store_inferior_registers): Refactor as methods of
11317         sh_nbsd_nat_target.
11318         (_initialize_shnbsd_nat): Adjust to C++ification.
11319         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11320         (inf_ptrace_xfer_partial): Delete.
11321         (sparc_xfer_partial, sparc_target): Delete.
11322         * sparc-nat.h (sparc_fetch_inferior_registers)
11323         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11324         (sparc_target): Delete function declaration.
11325         (sparc_target): New template class.
11326         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11327         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11328         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11329         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11330         add_target.
11331         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11332         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11333         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11334         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11335         add_target.
11336         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11337         (the_vax_bsd_nat_target): New.
11338         (vaxbsd_fetch_inferior_registers)
11339         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11340         methods.
11341         (_initialize_vaxbsd_nat): Adjust to C++ification.
11342
11343         * bsd-kvm.c (bsd_kvm_target): New class.
11344         (bsd_kvm_ops): Now a bsd_kvm_target.
11345         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11346         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11347         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11348         bsd_kvm_target.
11349         (bsd_kvm_return_one): Delete.
11350         (bsd_kvm_add_target): Adjust to C++ification.
11351
11352         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11353         (nto_procfs_target_procfs): New classes.
11354         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11355         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11356         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11357         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11358         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11359         (procfs_remove_hw_breakpoint, procfs_resume)
11360         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11361         (procfs_kill_inferior, procfs_store_registers)
11362         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11363         as methods of nto_procfs_target.
11364         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11365         (nto_native_ops): Delete.
11366         (procfs_open, procfs_native_open): Delete.
11367         (nto_native_ops): Now an nto_procfs_target_native.
11368         (init_procfs_targets): Adjust to C++ification.
11369         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11370         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11371         Refactor as methods of nto_procfs_target.
11372
11373         * go32-nat.c (go32_nat_target): New class.
11374         (the_go32_nat_target): New.
11375         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11376         (go32_store_registers, go32_xfer_partial, go32_files_info)
11377         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11378         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11379         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11380         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11381         (go32_target): Delete.
11382         (_initialize_go32_nat): Adjust to C++ification.
11383
11384         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11385         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11386         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11387         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11388         gnu_nat_target.
11389         (gnu_target): Delete.
11390         * gnu-nat.h (gnu_target): Delete.
11391         (gnu_nat_target): New class.
11392         * i386-gnu-nat.c (gnu_base_target): New.
11393         (i386_gnu_nat_target): New class.
11394         (the_i386_gnu_nat_target): New.
11395         (_initialize_i386gnu_nat): Adjust to C++ification.
11396
11397 2018-05-02  Pedro Alves  <palves@redhat.com>
11398
11399         * bfd-target.c (target_bfd_xclose): Rename to ...
11400         (target_bfd_close): ... this.
11401         (target_bfd_reopen): Adjust.
11402         * target.c (target_close): Remove references to to_xclose.
11403         * target.h (target_ops::to_xclose): Delete.
11404         (target_ops::to_close): Update comments.
11405
11406 2018-05-02  Pedro Alves  <palves@redhat.com>
11407
11408         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11409         "linux-nat.h".
11410         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11411         * inf-ptrace.c (inf_ptrace_register_u_offset)
11412         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11413         (inf_ptrace_store_register, inf_ptrace_store_registers)
11414         (inf_ptrace_trad_target): Move to ...
11415         * linux-nat-trad.c: ... this new file.
11416         * linux-nat-trad.h: New file.
11417         * linux-nat.c (linux_target_install_ops): Make extern.
11418         (linux_trad_target): Delete.
11419         * linux-nat.h (linux_trad_target): Delete declaration.
11420         (linux_target_install_ops): Declare.
11421         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11422         "linux-nat.h".
11423
11424 2018-05-02  Pedro Alves  <palves@redhat.com>
11425
11426         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11427         procfs_target/add_target here.
11428         * procfs.c (procfs_target): Make static.
11429         (_initialize_procfs): Call add_target here.
11430         * procfs.h (struct target_ops): Remove forward declaration.
11431         (procfs_target): Remove declaration.
11432         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11433
11434 2018-05-02  Pedro Alves  <palves@redhat.com>
11435
11436         * procfs.c (procfs_stopped_by_watchpoint)
11437         (procfs_insert_watchpoint, procfs_remove_watchpoint)
11438         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11439         Forward declare.
11440         (procfs_use_watchpoints): Delete, move contents...
11441         (procfs_target): ... here.
11442         * procfs.h (procfs_use_watchpoints): Delete declaration.
11443         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11444         procfs_use_watchpoints.
11445         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
11446         procfs_use_watchpoints.
11447
11448 2018-05-02  Tom Tromey  <tom@tromey.com>
11449
11450         PR python/20084:
11451         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
11452         and var_zuinteger_unlimited.
11453         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
11454         and PARAM_ZUINTEGER_UNLIMITED.
11455         (set_parameter_value): Handle var_zuinteger and
11456         var_zuinteger_unlimited.
11457         (add_setshow_generic): Likewise.
11458         (parmpy_init): Likewise.
11459
11460 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
11461
11462         PR rust/23124
11463         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
11464         pointer is not null before dereferencing it.
11465
11466 2018-04-30  Tom Tromey  <tom@tromey.com>
11467
11468         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
11469         is_mi_like_p.
11470
11471 2018-04-30  Tom Tromey  <tom@tromey.com>
11472
11473         * breakpoint.c (mention): Remove use of is_mi_like_p.
11474         (print_mention_ranged_breakpoint): Likewise.
11475         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
11476         of is_mi_like_p.
11477
11478 2018-04-30  Tom Tromey  <tom@tromey.com>
11479
11480         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
11481
11482 2018-04-30  Tom Tromey  <tom@tromey.com>
11483
11484         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
11485         (info_spu_event_command): Remove some uses of is_mi_like_p.
11486
11487 2018-04-30  Tom Tromey  <tom@tromey.com>
11488
11489         * python/py-framefilter.c (py_print_single_arg)
11490         (enumerate_locals, py_print_args, py_print_frame): Remove some
11491         uses of is_mi_like_p.
11492
11493 2018-04-30  Tom Tromey  <tom@tromey.com>
11494
11495         * ui-out.c: Update.
11496         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
11497         * ui-out.h (ui_out::is_mi_like_p): Now const.
11498         (ui_out::do_is_mi_like_p): Now const.
11499         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
11500
11501 2018-04-30  Tom Tromey  <tom@tromey.com>
11502
11503         * varobj.c (varobj_set_visualizer): Use new_reference.
11504         * python/python.c (gdbpy_decode_line): Use new_reference.
11505         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
11506         new_reference.
11507
11508 2018-04-30  Tom Tromey  <tom@tromey.com>
11509
11510         * varobj.c (install_new_value): Use new_reference.
11511         * value.h (value_incref): Return void.  Swap intro comment with
11512         value_decref.
11513         * value.c (set_value_parent): Use new_reference.
11514         (value_incref): Return void.  Update intro comment.
11515         (release_value): Use new_reference.
11516         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
11517
11518 2018-04-30  Tom Tromey  <tom@tromey.com>
11519
11520         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
11521         * gdb_bfd.h (new_bfd_ref): Remove.
11522         (gdb_bfd_open): Update comment.
11523         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11524         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
11525         (gdb_bfd_fdopenr): Use new_reference.
11526         * exec.c (exec_file_attach): Use new_reference.
11527
11528 2018-04-30  Tom Tromey  <tom@tromey.com>
11529
11530         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
11531         method.
11532
11533 2018-04-30  Tom Tromey  <tom@tromey.com>
11534
11535         * jit.c (jit_read_code_entry): Use type_align.
11536         * i386-tdep.c (i386_gdbarch_init): Don't call
11537         set_gdbarch_long_long_align_bit.
11538         * gdbarch.sh: Remove long_long_align_bit.
11539         * gdbarch.c, gdbarch.h: Rebuild.
11540         * arc-tdep.c (arc_type_align): New function.
11541         (arc_gdbarch_init): Use arc_type_align.  Don't call
11542         set_gdbarch_long_long_align_bit.
11543
11544 2018-04-30  Tom Tromey  <tom@tromey.com>
11545
11546         * rust-lang.c (rust_type_alignment): Remove.
11547         (rust_composite_type): Use type_align.
11548
11549 2018-04-30  Tom Tromey  <tom@tromey.com>
11550
11551         * NEWS: Mention Type.align.
11552         * python/py-type.c (typy_get_alignof): New function.
11553         (type_object_getset): Add "alignof".
11554
11555 2018-04-30  Tom Tromey  <tom@tromey.com>
11556
11557         PR exp/17095:
11558         * NEWS: Update.
11559         * std-operator.def (UNOP_ALIGNOF): New operator.
11560         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
11561         New.
11562         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
11563         * c-lang.c (c_op_print_tab): Add alignof.
11564         * c-exp.y (ALIGNOF): New token.
11565         (exp): Add "ALIGNOF" production.
11566         (ident_tokens): Add _Alignof and alignof.
11567
11568 2018-04-30  Tom Tromey  <tom@tromey.com>
11569
11570         * i386-tdep.c (i386_type_align): New function.
11571         (i386_gdbarch_init): Update.
11572         * gdbarch.sh (type_align): New method.
11573         * gdbarch.c, gdbarch.h: Rebuild.
11574         * arch-utils.h (default_type_align): Declare.
11575         * arch-utils.c (default_type_align): New function.
11576         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
11577         (struct type) <align_log2>: New field.
11578         <instance_flags>: Now a bitfield.
11579         (TYPE_RAW_ALIGN): New macro.
11580         (type_align, type_raw_align, set_type_align): Declare.
11581         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
11582         functions.
11583         * dwarf2read.c (quirk_rust_enum): Set type alignment.
11584         (get_alignment, maybe_set_alignment): New functions.
11585         (read_structure_type, read_enumeration_type, read_array_type)
11586         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
11587         (read_subrange_type, read_base_type): Set type alignment.
11588
11589 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
11590
11591         * dwarf2read.c (read_index_from_section): Use bool.
11592
11593 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
11594
11595         PR gdb/22950
11596         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
11597         with #ifdef.
11598
11599 2018-04-29  John Reiser  <jreiser@BitWagon.com>
11600
11601         PR build/22873
11602         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
11603         last step, and do it atomically.
11604
11605 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
11606
11607         * compile/compile-c-types.c (convert_int, convert_float):
11608         Update for C FE v1.
11609
11610 2018-04-27  Tom Tromey  <tom@tromey.com>
11611
11612         PR rust/22545:
11613         * rust-lang.c (rust_inclusive_range_type_p): New function.
11614         (rust_range): Handle inclusive ranges.
11615         (rust_compute_range): Likewise.
11616         * rust-exp.y (struct rust_op) <inclusive>: New field.
11617         (DOTDOTEQ): New constant.
11618         (range_expr): Add "..=" productions.
11619         (operator_tokens): Add "..=" token.
11620         (ast_range): Add "inclusive" parameter.
11621         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
11622         ranges.
11623         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
11624         bounds values.
11625         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
11626         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
11627         Update comments.
11628         * expprint.c (print_subexp_standard): Handle new bounds values.
11629         (dump_subexp_body_standard): Likewise.
11630
11631 2018-04-27  Tom Tromey  <tom@tromey.com>
11632
11633         * configure: Rebuild.
11634         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
11635         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
11636         "OVERRIDE".
11637         (class symbol_needs_eval_context): Likewise.
11638         * dwarf2read.c (mock_mapped_index::symbol_name_count)
11639         (mock_mapped_index::symbol_name_at): Use "override".  Remove
11640         "virtual".
11641         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
11642         "override".
11643         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
11644         * aarch64-tdep.c (instruction_reader::read): Use "override".
11645         (instruction_reader_test::read): Likewise.
11646         * arm-tdep.c (instruction_reader::read): Use "override".
11647         (instruction_reader_thumb::read): Likewise.
11648
11649 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
11650
11651         PR remote/9665
11652         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
11653         instead of remote_send.
11654         (remote_send): Remove.
11655
11656 2018-04-26  Pedro Alves  <palves@redhat.com>
11657
11658         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
11659         find_function_start_sal instead of find_pc_line.
11660
11661 2018-04-26  Pedro Alves  <palves@redhat.com>
11662
11663         * breakpoint.c (set_breakpoint_location_function): Handle
11664         mst_data_gnu_ifunc.
11665         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
11666         * elfread.c (elf_symtab_read): Give data symbols with
11667         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
11668         (elf_rel_plt_read): Update comment.
11669         * linespec.c (convert_linespec_to_sals): Handle
11670         mst_data_gnu_ifunc.
11671         (minsym_found): Handle mst_data_gnu_ifunc.
11672         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
11673         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
11674         * parse.c (find_minsym_type_and_address): Handle
11675         mst_data_gnu_ifunc.
11676         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
11677         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
11678         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
11679         comment.
11680         <mst_data_gnu_ifunc>: New enumerator.
11681
11682 2018-04-26  Pedro Alves  <palves@redhat.com>
11683
11684         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
11685         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
11686         'want_trampoline' parameter by a lookup_msym_prefer parameter.
11687         Handle it.
11688         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
11689         (lookup_minimal_symbol_by_pc): Adjust.
11690         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
11691         (lookup_solib_trampoline_symbol_by_pc): Adjust.
11692         * minsyms.h (lookup_msym_prefer): New enum.
11693         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11694         parameter by a lookup_msym_prefer parameter.
11695
11696 2018-04-26  Pedro Alves  <palves@redhat.com>
11697
11698         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
11699         ends in "@plt" instead of looking at the symbol's section.
11700
11701 2018-04-26  Pedro Alves  <palves@redhat.com>
11702
11703         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
11704         all references.
11705         (find_pc_partial_function_gnu_ifunc): Rename to ...
11706         (find_pc_partial_function): ... this, and remove references to
11707         'is_gnu_ifunc_p'.
11708         (find_pc_partial_function): Delete old implementation.
11709         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
11710
11711 2018-04-26  Pedro Alves  <palves@redhat.com>
11712
11713         * linespec.c (struct bound_minimal_symbol_search_key): New.
11714         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
11715         skip first line if we found a GNU ifunc minimal symbol by name.
11716         (compare_msymbols): Change parameters to work with a destructured
11717         lhs minsym.
11718         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11719         functions.
11720
11721 2018-04-26  Pedro Alves  <palves@redhat.com>
11722
11723         * breakpoint.c (set_breakpoint_location_function): Don't resolve
11724         ifunc targets here.  Instead, if we have an ifunc minsym, use its
11725         address/name.
11726         (add_location_to_breakpoint): Store the minsym and the objfile in
11727         the breakpoint location.
11728         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11729         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11730         Record the minsym in the sal.
11731         * symtab.h (symtab_and_line) <msymbol>: New field.
11732
11733 2018-04-26  Pedro Alves  <palves@redhat.com>
11734
11735         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11736         unless we actually resolved the ifunc.
11737
11738 2018-04-26  Pedro Alves  <palves@redhat.com>
11739
11740         * c-exp.y (variable production): Prefer ifunc minsyms over
11741         regular function symbols.
11742         * symtab.c (find_gnu_ifunc): New function.
11743         * minsyms.h (lookup_msym_prefer): New enum.
11744         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11745         parameter by a lookup_msym_prefer parameter.
11746         * symtab.h (find_gnu_ifunc): New declaration.
11747
11748 2018-04-26  Pedro Alves  <palves@redhat.com>
11749
11750         * blockframe.c (find_gnu_ifunc_target_type): New function.
11751         (find_function_type): New.
11752         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11753         return a value with a memory address.
11754         (eval_call): For calls to GNU ifunc functions, try to find the
11755         type of the target function from the type that the resolver
11756         returns.
11757         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11758         symbols.
11759         * infcall.c (find_function_return_type): Delete.
11760         (find_function_addr): Add 'function_type' parameter.  For calls to
11761         GNU ifunc functions, try to find the type of the target function
11762         from the type that the resolver returns, and return it via
11763         FUNCTION_TYPE.
11764         (call_function_by_hand_dummy): Adjust to use the function type
11765         returned by find_function_addr.
11766         (find_function_addr): Add 'function_type' parameter and move
11767         description here.
11768         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11769         declarations.
11770
11771 2018-04-26  Pedro Alves  <palves@redhat.com>
11772
11773         * c-exp.y (variable production): Skip finding an alias for ifunc
11774         symbols.
11775
11776 2018-04-26  Pedro Alves  <palves@redhat.com>
11777
11778         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11779
11780 2018-04-25  Pedro Alves  <palves@redhat.com>
11781
11782         * infcmd.c (kill_command): Print the pid as string, not the whole
11783         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11784         message.
11785         * remote.c (remote_detach_1): Print the pid as string, not the
11786         whole thread's ptid.
11787
11788 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11789             Sergio Durigan Junior  <sergiodj@redhat.com>
11790             Pedro Alves  <palves@redhat.com>
11791
11792         * infcmd.c (kill_command): Print message when inferior has
11793         been killed.
11794         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11795         '1'.
11796         (add_inferior): Improve message printed when
11797         'print_inferior_events' is on.
11798         (exit_inferior): Remove message printed when
11799         'print_inferior_events' is on.
11800         (detach_inferior): Improve message printed when
11801         'print_inferior_events' is on.
11802         (initialize_inferiors): Use 'add_inferior_silent' to set
11803         'current_inferior_'.
11804         * inferior.h (print_inferior_events): Declare here as
11805         'extern'.
11806         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11807         '[Detaching...]' messages when 'print_inferior_events' is on.
11808         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11809         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11810         'Detaching after fork from child...', replace it by '... from
11811         parent...'.
11812         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11813         prefix/suffix when printing 'Detaching...' messages.  Print
11814         them when 'print_inferior_events' is on.
11815         * remote.c (remote_detach_1): Print message when detaching
11816         from inferior and '!is_fork_parent'.
11817
11818 2018-04-24  Tom Tromey  <tom@tromey.com>
11819
11820         * cli-out.h: Reindent.
11821
11822 2018-04-24  Tom Tromey  <tom@tromey.com>
11823
11824         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11825         (cli_ui_out::do_field_string): Use fputs_filtered.
11826         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11827
11828 2018-04-23  Tom Tromey  <tom@tromey.com>
11829
11830         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11831         gdb::unique_xmalloc_ptr.
11832
11833 2018-04-23  Tom Tromey  <tom@tromey.com>
11834
11835         * configure: Rebuild.
11836
11837 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
11838
11839         PR gdb/23095
11840         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11841         prepare_for_testing.  Set normal_bp to r_debug_state if target
11842         is bsd.
11843
11844 2018-04-21  Pedro Alves  <palves@redhat.com>
11845             Rajendra SY  <rajendra.sy@gmail.com>
11846
11847         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11848         * remote.c (extended_remote_attach): In all-stop mode, mark the
11849         thread as executing.
11850
11851 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11852
11853         * thread.c (thread_apply_all_command): Fix comment.
11854         (thread_command): Fix comment.
11855
11856 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11857
11858         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11859         parameter.
11860         * features/aarch64-core.c (create_feature_aarch64_core):
11861         Regenerate.
11862         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11863         Likewise.
11864         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11865         Likewise.
11866         * features/i386/32bit-avx512.c
11867         (create_feature_i386_32bit_avx512): Likewise.
11868         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11869         Likewise.
11870         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11871         Likewise.
11872         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11873         Likewise.
11874         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11875         Likewise.
11876         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11877         Likewise.
11878         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11879         Likewise.
11880         * features/i386/64bit-avx512.c
11881         (create_feature_i386_64bit_avx512): Likewise.
11882         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11883         Likewise.
11884         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11885         Likewise.
11886         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11887         Likewise.
11888         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11889         Likewise.
11890         * features/i386/64bit-segments.c
11891         (create_feature_i386_64bit_segments): Likewise.
11892         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11893         Likewise.
11894         * features/i386/x32-core.c
11895         (create_feature_i386_x32_core): Likewise.
11896         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11897         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11898         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11899         * target-descriptions.c: In generated code, don't pass xml
11900         filename.
11901
11902 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11903
11904         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11905         (print_xml_feature::visit_post): Likewise.
11906         (print_xml_feature::visit): Likewise.
11907         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11908         (print_xml_feature): Add new class.
11909         * regformats/regdat.sh: Null xmltarget on feature targets.
11910         * target-descriptions.c (struct target_desc): Add xmltarget.
11911         (maintenance_check_tdesc_xml_convert): Add unittest function.
11912         (tdesc_get_features_xml): Add function to get xml.
11913         (maintenance_check_xml_descriptions): Test xml generation.
11914         * xml-tdesc.c (string_read_description_xml): Add function.
11915         * xml-tdesc.h (string_read_description_xml): Add declaration.
11916
11917 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11918
11919         * features/Makefile: Add feature marker to targets with new style
11920         target descriptions.
11921         * regformats/aarch64.dat: Regenerate.
11922         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11923         * regformats/i386/amd64-avx-linux.dat: Likewise.
11924         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11925         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11926         * regformats/i386/amd64-linux.dat: Likewise.
11927         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11928         * regformats/i386/amd64.dat: Likewise.
11929         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11930         * regformats/i386/i386-avx-linux.dat: Likewise.
11931         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11932         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11933         * regformats/i386/i386-linux.dat: Likewise.
11934         * regformats/i386/i386-mmx-linux.dat: Likewise.
11935         * regformats/i386/i386-mpx-linux.dat: Likewise.
11936         * regformats/i386/i386.dat: Likewise.
11937         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11938         * regformats/i386/x32-avx-linux.dat: Likewise.
11939         * regformats/i386/x32-linux.dat: Likewise.
11940         * regformats/tic6x-c62x-linux.dat: Likewise.
11941         * regformats/tic6x-c64x-linux.dat: Likewise.
11942         * regformats/tic6x-c64xp-linux.dat: Likewise.
11943         * regformats/regdat.sh: Parse feature marker.
11944
11945 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11946
11947         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11948         (tdesc_osabi_name): Likewise.
11949         * target-descriptions.c (tdesc_architecture_name): Add new
11950         function.
11951         (tdesc_osabi_name): Likewise.
11952
11953 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11954
11955         * common/tdesc.c (tdesc_predefined_type): Move to here.
11956         (tdesc_named_type): Likewise.
11957         (tdesc_create_vector): Likewise.
11958         (tdesc_create_struct): Likewise.
11959         (tdesc_set_struct_size): Likewise.
11960         (tdesc_create_union): Likewise.
11961         (tdesc_create_flags): Likewise.
11962         (tdesc_create_enum): Likewise.
11963         (tdesc_add_field): Likewise.
11964         (tdesc_add_typed_bitfield): Likewise.
11965         (tdesc_add_bitfield): Likewise.
11966         (tdesc_add_flag): Likewise.
11967         (tdesc_add_enum_value): Likewise.
11968         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11969         (struct tdesc_type_vector): Likewise.
11970         (struct tdesc_type_field): Likewise.
11971         (struct tdesc_type_with_fields): Likewise.
11972         (tdesc_create_enum): Add declaration.
11973         (tdesc_add_typed_bitfield): Likewise.
11974         (tdesc_add_enum_value): Likewise.
11975         * target-descriptions.c (tdesc_type_field): Move from here.
11976         (tdesc_type_builtin): Likewise.
11977         (tdesc_type_vector): Likewise.
11978         (tdesc_type_with_fields): Likewise.
11979         (tdesc_predefined_types): Likewise.
11980         (tdesc_named_type): Likewise.
11981         (tdesc_create_vector): Likewise.
11982         (tdesc_create_struct): Likewise.
11983         (tdesc_set_struct_size): Likewise.
11984         (tdesc_create_union): Likewise.
11985         (tdesc_create_flags): Likewise.
11986         (tdesc_create_enum): Likewise.
11987         (tdesc_add_field): Likewise.
11988         (tdesc_add_typed_bitfield): Likewise.
11989         (tdesc_add_bitfield): Likewise.
11990         (tdesc_add_flag): Likewise.
11991         (tdesc_add_enum_value): Likewise.
11992         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11993         (tdesc_add_typed_bitfield): Likewise.
11994         (tdesc_add_enum_value): Likewise.
11995
11996 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11997
11998         * common/tdesc.c (tdesc_feature::accept): Move to here.
11999         (tdesc_feature::operator==): Likewise.
12000         (tdesc_create_reg): Likewise.
12001         * common/tdesc.h (tdesc_type_kind): Likewise.
12002         (struct tdesc_type): Likewise.
12003         (struct tdesc_feature): Likewise.
12004         * regformats/regdat.sh: Create a feature.
12005         * target-descriptions.c (tdesc_type_kind): Move from here.
12006         (tdesc_type): Likewise.
12007         (tdesc_type_up): Likewise.
12008         (tdesc_feature): Likewise.
12009         (tdesc_create_reg): Likewise.
12010
12011 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12012
12013         * Makefile.in: Add arch/tdesc.c
12014         * common/tdesc.c: New file.
12015         * common/tdesc.h (tdesc_element_visitor): Move to here.
12016         (tdesc_element): Likewise.
12017         (tdesc_reg): Likewise.
12018         (tdesc_reg_up): Likewise.
12019         * regformats/regdef.h (reg): Add offset to constructors.
12020         * target-descriptions.c (tdesc_element_visitor): Move from here.
12021         (tdesc_element): Likewise.
12022         (tdesc_reg): Likewise.
12023         (tdesc_reg_up): Likewise.
12024
12025 2018-04-17  Tom Tromey  <tom@tromey.com>
12026
12027         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12028         discriminant field.
12029
12030 2018-04-17  Tom Tromey  <tom@tromey.com>
12031
12032         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12033
12034 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12035
12036         * symtab.c (print_symbol_info): Skip printing filename and line
12037         number when `last' is NULL.
12038         (symtab_symbol_info): Use empty string instead of NULL for first
12039         invocation of print_symbol_info.
12040         (rbreak_command): Pass NULL to `last' parameter of
12041         print_symbol_info.
12042
12043 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12044
12045         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12046         instead of nullptr.
12047
12048 2018-04-16  Pedro Alves  <palves@redhat.com>
12049
12050         * MAINTAINERS (sh): Remove.
12051         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12052         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12053         (ALLDEPFILES): Remove sh64-tdep.c.
12054         * NEWS: Mentions that support for SH-5/SH64 is removed.
12055         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12056         (sh*-*-openbsd*): Ditto.
12057         (sh64-*-elf*): Remove.
12058         (sh*): Remove.
12059         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12060         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12061         * sh-tdep.c: No longer include "sh64-tdep.h".
12062         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12063         * sh64-tdep.c, sh64-tdep.h: Remove files.
12064
12065 2018-04-16  Pedro Alves  <palves@redhat.com>
12066
12067         * MAINTAINERS: Remove m88k.
12068         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12069         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12070         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12071         * NEWS: Mention that support for m88k was removed.
12072         * configure.host (m88*-*-*): Remove support.
12073         * configure.nat (m88k-*-*): Remove support.
12074         * configure.tgt (m88*-*-openbsd*): Remove.
12075         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12076
12077 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12078
12079         * configure.tgt (x86_tobjs): New variable.
12080         (amd64_tobjs, i386_tobjs): Use it.
12081
12082 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12083
12084         * symtab.c (print_symbol_info): Precede the symbol definition by
12085         the line number when available.
12086         * NEWS: Advertise this enhancement.
12087
12088 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12089
12090         * NEWS (New options): announce set/show record btrace cpu.
12091         * btrace.c: Include record-btrace.h.
12092         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12093         the vendor is unknown.
12094         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12095         Maybe overwrite the btrace configuration's cpu.
12096         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12097         (btrace_fetch): Add cpu parameter.  Update callers.
12098         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12099         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12100         errata workarounds if the vendor is unknown.
12101         * python/py-record-btrace.c: Include record-btrace.h.
12102         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12103         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12104         * record-btrace.c (record_btrace_cpu_state_kind): New.
12105         (record_btrace_cpu): New.
12106         (set_record_btrace_cpu_cmdlist): New.
12107         (record_btrace_get_cpu): New.
12108         (require_btrace_thread, record_btrace_info)
12109         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12110         (cmd_set_record_btrace_cpu_none): New.
12111         (cmd_set_record_btrace_cpu_auto): New.
12112         (cmd_set_record_btrace_cpu): New.
12113         (cmd_show_record_btrace_cpu): New.
12114         (_initialize_record_btrace): Initialize set/show record btrace cpu
12115         commands.
12116         * record-btrace.h (record_btrace_get_cpu): New.
12117
12118 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12119
12120         * record.c (set_record_command): Fix typo in message.
12121
12122 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12123
12124         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12125
12126 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12127
12128         * infrun.c (process_event_stop_test): Call
12129         gdbarch_in_indirect_branch_thunk.
12130         * gdbarch.sh (in_indirect_branch_thunk): New.
12131         * gdbarch.c: Regenerated.
12132         * gdbarch.h: Regenerated.
12133         * x86-tdep.h: New.
12134         * x86-tdep.c: New.
12135         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12136         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12137         (ALLDEPFILES): Add x86-tdep.c.
12138         * arch-utils.h (default_in_indirect_branch_thunk): New.
12139         * arch-utils.c (default_in_indirect_branch_thunk): New.
12140         * i386-tdep: Include x86-tdep.h.
12141         (i386_in_indirect_branch_thunk): New.
12142         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12143         function.
12144         * amd64-tdep: Include x86-tdep.h.
12145         (amd64_in_indirect_branch_thunk): New.
12146         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12147
12148 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12149
12150         PR gdb/23053
12151         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12152         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12153         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12154         regression.
12155
12156 2018-04-12  Tom Tromey  <tom@tromey.com>
12157
12158         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12159         (rust_evaluate_subexp): Likewise.
12160
12161 2018-04-12  Pedro Alves  <palves@redhat.com>
12162
12163         * procfs.c (procfs_detach): Make forward declaration's prototype
12164         match definition's protototype.
12165         (proc_get_LDT_entry): Remove stale do_cleanups call.
12166
12167 2018-04-12  Pedro Alves  <palves@redhat.com>
12168
12169         * target.h (target_ops::to_has_exited): Delete.
12170         (target_has_exited): Delete.
12171         * target-delegates.c: Regenerate.
12172
12173 2018-04-11  Pedro Alves  <palves@redhat.com>
12174
12175         * target.c (fileio_fh_t::t): Add comment.
12176         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12177         (target_fileio_close): Handle a NULL target.
12178         (invalidate_fileio_fh): New.
12179         (target_close): Call it.
12180         * remote.c (remote_hostio_send_command): No longer check whether
12181         remote_desc is open.
12182
12183 2018-04-11  Pedro Alves  <palves@redhat.com>
12184
12185         * target.c (fileio_fh_t): Make it a named struct instead of a
12186         typedef.
12187         (fileio_fh_t::is_closed): New method.
12188         (DEF_VEC_O (fileio_fh_t)): Remove.
12189         (fileio_fhandles): Now a std::vector.
12190         (is_closed_fileio_fh): Delete.
12191         (acquire_fileio_fd): Adjust.  Rename parameters.
12192         (release_fileio_fd): Adjust.
12193         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12194         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12195         (target_fileio_close): Adjust.
12196
12197 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12198
12199         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12200         index.
12201
12202 2018-04-10  Pedro Alves  <palves@redhat.com>
12203
12204         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12205         (scoped_finish_thread_state): New class.
12206         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12207         cleanup.
12208         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12209         (fetch_inferior_event, normal_stop): Likewise.
12210         * thread.c (finish_thread_state_cleanup): Delete.
12211
12212 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12213             Pedro Alves  <palves@redhat.com>
12214
12215         * value.c: Include "selftest.h" and "common/array-view.h".
12216         (struct range) <operator ==>: New.
12217         (test_ranges_contain): New.
12218         (check_ranges_vector): New.
12219         (test_insert_into_bit_range_vector): New.
12220         (_initialize_values): Register selftests.
12221         * common/array-view.h (operator==, operator!=): New.
12222
12223 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12224
12225         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12226         an iterator.
12227         * inline-frame.c: Include <algorithm>.
12228         (struct inline_state): Add constructor.
12229         (inline_state_s): Remove.
12230         (DEF_VEC_O(inline_state_s)): Remove.
12231         (inline_states): Change type to std::vector.
12232         (find_inline_frame_state): Adjust to std::vector.
12233         (allocate_inline_frame_state): Remove.
12234         (clear_inline_frame_state): Adjust to std::vector.
12235         (skip_inline_frames): Adjust to std::vector.
12236
12237 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12238
12239         * tracepoint.h (struct trace_state_variable): Add constructor.
12240         <name>: Change type to std::string.
12241         * tracepoint.c (tsv_s): Remove.
12242         (DEF_VEC_O(tsv_s)): Remove.
12243         (tvariables): Change to std::vector.
12244         (create_trace_state_variable): Adjust to std::vector.
12245         (find_trace_state_variable): Likewise.
12246         (find_trace_state_variable_by_number): Likewise.
12247         (delete_trace_state_variable): Likewise.
12248         (trace_variable_command): Adjust to std::string.
12249         (delete_trace_variable_command): Likewise.
12250         (tvariables_info_1): Adjust to std::vector.
12251         (save_trace_state_variables): Likewise.
12252         (start_tracing): Likewise.
12253         (merge_uploaded_trace_state_variables): Adjust to std::vector
12254         and std::string.
12255         * target.h (struct target_ops)
12256         <to_download_trace_state_variable>: Pass reference to
12257         trace_state_variable.
12258         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12259         * target-delegates.c: Re-generate.
12260         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12261         (mi_tsv_deleted): Likewise.
12262         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12263         * remote.c (remote_download_trace_state_variable): Change
12264         pointer to reference and adjust.
12265         * make-target-delegates (parse_argtypes): Handle references.
12266         (write_function_header): Likewise.
12267         (munge_type): Likewise.
12268
12269 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12270
12271         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12272         string_view-selftests.c.
12273         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12274         testsuite.
12275         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12276         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12277         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12278         * unittests/basic_string_view/element_access/char/1.cc:
12279         Likewise.
12280         * unittests/basic_string_view/element_access/char/empty.cc:
12281         Likewise.
12282         * unittests/basic_string_view/element_access/char/front_back.cc:
12283         Likewise.
12284         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12285         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12286         Likewise.
12287         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12288         Likewise.
12289         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12290         Likewise.
12291         * unittests/basic_string_view/operations/compare/char/1.cc:
12292         Likewise.
12293         * unittests/basic_string_view/operations/compare/char/13650.cc:
12294         Likewise.
12295         * unittests/basic_string_view/operations/copy/char/1.cc:
12296         Likewise.
12297         * unittests/basic_string_view/operations/data/char/1.cc:
12298         Likewise.
12299         * unittests/basic_string_view/operations/find/char/1.cc:
12300         Likewise.
12301         * unittests/basic_string_view/operations/find/char/2.cc:
12302         Likewise.
12303         * unittests/basic_string_view/operations/find/char/3.cc:
12304         Likewise.
12305         * unittests/basic_string_view/operations/find/char/4.cc:
12306         Likewise.
12307         * unittests/basic_string_view/operations/rfind/char/1.cc:
12308         Likewise.
12309         * unittests/basic_string_view/operations/rfind/char/2.cc:
12310         Likewise.
12311         * unittests/basic_string_view/operations/rfind/char/3.cc:
12312         Likewise.
12313         * unittests/basic_string_view/operations/substr/char/1.cc:
12314         Likewise.
12315         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12316         * unittests/string_view-selftests.c: New file.
12317
12318 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12319
12320         * unittests/basic_string_view/capacity/1.cc: New file.
12321         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12322         * unittests/basic_string_view/cons/char/1.cc: New file.
12323         * unittests/basic_string_view/cons/char/2.cc: New file.
12324         * unittests/basic_string_view/cons/char/3.cc: New file.
12325         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12326         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12327         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12328         * unittests/basic_string_view/element_access/char/1.cc: New file.
12329         * unittests/basic_string_view/element_access/char/2.cc: New file.
12330         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12331         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12332         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12333         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12334         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12335         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12336         * unittests/basic_string_view/include.cc: New file.
12337         * unittests/basic_string_view/inserters/char/1.cc: New file.
12338         * unittests/basic_string_view/inserters/char/2.cc: New file.
12339         * unittests/basic_string_view/inserters/char/3.cc: New file.
12340         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12341         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12342         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12343         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12344         * unittests/basic_string_view/literals/types.cc: New file.
12345         * unittests/basic_string_view/literals/values.cc: New file.
12346         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12347         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12348         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12349         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12350         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12351         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12352         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12353         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12354         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12355         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12356         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12357         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12358         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12359         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12360         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12361         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12362         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12363         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12364         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12365         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12366         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12367         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12368         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12369         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12370         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12371         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12372         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12373         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12374         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12375         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12376         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12377         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12378         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12379         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12380         * unittests/basic_string_view/operators/char/2.cc: New file.
12381         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12382         * unittests/basic_string_view/range_access/char/1.cc: New file.
12383         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12384         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12385         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12386         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12387         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12388         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12389         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12390         * unittests/basic_string_view/typedefs.cc: New file.
12391         * unittests/basic_string_view/types/1.cc: New file.
12392
12393 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12394
12395         * common/gdb_string_view.h: Remove libstdc++ implementation
12396         details, adjust to gdb reality.
12397         * common/gdb_string_view.tcc: Likewise.
12398         * cli/cli-script.c (struct string_view): Remove.
12399         (user_args) <m_args>: Change element type to gdb::string_view.
12400         (user_args::insert_args): Adjust.
12401
12402 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12403
12404         * common/gdb_string_view.h: New file.
12405         * common/gdb_string_view.tcc: New file.
12406
12407 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12408
12409         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12410         * configure: Re-generate.
12411
12412 2018-04-09  Pedro Alves  <palves@redhat.com>
12413
12414         * gdbarch.sh: Include "observable.h" instead of "observer.h".
12415         (set_target_gdbarch): Call
12416         gdb::observers::architecture_changed.notify instead of
12417         observer_notify_architecture_changed.
12418
12419 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12420
12421         * tracepoint.c (struct current_traceframe_cleanup): Remove.
12422         (do_restore_current_traceframe_cleanup): Remove.
12423         (restore_current_traceframe_cleanup_dtor): Remove.
12424         (make_cleanup_restore_current_traceframe): Remove.
12425         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12426         New.
12427         * tracepoint.h (struct scoped_restore_current_traceframe): New.
12428         * infrun.c (fetch_inferior_event): Use
12429         scoped_restore_current_traceframe.
12430
12431 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12432
12433         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12434         Remove.
12435         <n_allocated_type_units>: Remove.
12436         <all_type_units>: Change to std::vector.
12437         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12438         to std::vector change.
12439         (dwarf2_per_objfile::get_cutu): Likewise.
12440         (dwarf2_per_objfile::get_tu): Likewise.
12441         (create_signatured_type_table_from_index): Likewise.
12442         (create_signatured_type_table_from_debug_names): Likewise.
12443         (dw2_symtab_iter_next): Likewise.
12444         (dw2_print_stats): Likewise.
12445         (dw2_expand_all_symtabs): Likewise.
12446         (dw2_expand_marked_cus): Likewise.
12447         (dw2_debug_names_iterator::next): Likewise.
12448         (dwarf2_initialize_objfile): Likewise.
12449         (add_signatured_type_cu_to_table): Likewise.
12450         (create_all_type_units): Likewise.
12451         (add_type_unit): Likewise.
12452         (struct tu_abbrev_offset): Add constructor.
12453         (build_type_psymtabs_1): Adjust to std::vector change.
12454         (print_tu_stats): Likewise.
12455         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12456         (write_debug_names): Likewise.
12457
12458 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12459
12460         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
12461         Make an std::vector.
12462         <n_comp_units>: Remove.
12463         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12464         to std::vector change.
12465         (dwarf2_per_objfile::get_cutu): Likewise.
12466         (dwarf2_per_objfile::get_cu): Likewise.
12467         (create_cus_from_index): Likewise.
12468         (create_addrmap_from_index): Likewise.
12469         (create_addrmap_from_aranges): Likewise.
12470         (dwarf2_read_index): Likewise.
12471         (dw2_find_last_source_symtab): Likewise.
12472         (dw2_map_symtabs_matching_filename): Likewise.
12473         (dw2_symtab_iter_next): Likewise.
12474         (dw2_print_stats): Likewise.
12475         (dw2_expand_all_symtabs): Likewise.
12476         (dw2_expand_symtabs_with_fullname): Likewise.
12477         (dw2_expand_marked_cus): Likewise.
12478         (dw2_map_symbol_filenames): Likewise.
12479         (create_cus_from_debug_names): Likewise.
12480         (dwarf2_read_debug_names): Likewise.
12481         (dw2_debug_names_iterator::next): Likewise.
12482         (dwarf2_initialize_objfile): Likewise.
12483         (set_partial_user): Likewise.
12484         (dwarf2_build_psymtabs_hard): Likewise.
12485         (read_comp_units_from_section): Remove arguments, adjust to
12486         std::vector change.
12487         (create_all_comp_units): Adjust to std::vector and
12488         read_comp_units_from_section changes.
12489         (dwarf2_find_containing_comp_unit): Adjust to std::vector
12490         change.
12491         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12492         (psyms_seen_size): Likewise.
12493         (write_gdbindex): Likewise.
12494         (write_debug_names): Likewise.
12495
12496 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12497
12498         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
12499         with dwarf2_per_objfile.
12500         (create_cus_from_index): Likewise.
12501         (create_signatured_type_table_from_index): Likewise.
12502         (dwarf2_read_index): Likewise.
12503         (dwarf2_initialize_objfile): Likewise.
12504         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
12505         per_cu rather than get_dwarf2_per_objfile.
12506
12507 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12508
12509         * dwarf2read.h (struct signatured_type): Forward declare.
12510         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
12511         New methods.
12512         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
12513         (dw2_get_cutu): ...this.
12514         (dwarf2_per_objfile::get_cu): Rename from...
12515         (dw2_get_cu): ...this.
12516         (dwarf2_per_objfile::get_tu): New.
12517         (create_addrmap_from_index): Adjust.
12518         (create_addrmap_from_aranges): Adjust.
12519         (dw2_find_last_source_symtab): Adjust.
12520         (dw2_map_symtabs_matching_filename): Adjust.
12521         (dw2_symtab_iter_next): Adjust.
12522         (dw2_print_stats): Adjust.
12523         (dw2_expand_all_symtabs): Adjust.
12524         (dw2_expand_symtabs_with_fullname): Adjust.
12525         (dw2_expand_marked_cus): Adjust.
12526         (dw_expand_symtabs_matching_file_matcher): Adjust.
12527         (dw2_map_symbol_filenames): Adjust.
12528         (dw2_debug_names_iterator::next): Adjust.
12529         (dwarf2_initialize_objfile): Adjust.
12530         (set_partial_user): Adjust.
12531         (dwarf2_build_psymtabs_hard): Adjust.
12532
12533 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12534
12535         * dwarf2read.c (create_signatured_type_table_from_debug_names):
12536         Remove unused variables.
12537         (dw2_map_symtabs_matching_filename): Likewise.
12538         (dwarf2_record_block_ranges): Likewise.
12539         (dwarf2_read_addr_index): Likewise.
12540         (follow_die_offset): Likewise.
12541
12542 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12543
12544         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
12545         to symbol_file_add_main.
12546
12547 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12548
12549         PR mi/22299
12550         * mi/mi-console.c (do_fputc_async_safe): New.
12551         (mi_console_file::write_async_safe): New.
12552         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
12553         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
12554         New.
12555         * ui-file.c (ui_file::putstrn): Adjust call to
12556         fputstrn_unfiltered.
12557         * utils.c (printchar): Replace do_fputs and do_fprintf
12558         parameters by do_fputc.
12559         (fputstr_filtered): Adjust call to printchar.
12560         (fputstr_unfiltered): Likewise.
12561         (fputstrn_filtered): Likewise.
12562         (fputstrn_unfiltered): Add do_fputc parameter, pass to
12563         printchar.
12564         * utils.h (do_fputc_ftype): New typedef.
12565         (fputstrn_unfiltered): Add do_fputc parameter.
12566
12567 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12568
12569         * regformats/i386/i386-avx.dat: Remove.
12570
12571 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12572
12573         PR gdb/22979
12574         * amd64-tdep.c (amd64_none_init_abi): New function.
12575         (amd64_x32_none_init_abi): New function.
12576         (_initialize_amd64_tdep): Register handlers for x86-64 and
12577         x64_32 with GDB_OSABI_NONE.
12578         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
12579         GDB_OSABI_NONE osabi.
12580
12581 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12582
12583         PR gdb/22980
12584         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
12585         GDB_OSABI_NONE.
12586         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
12587         * osabi.c (gdb_osabi_names): Add "unknown" entry.
12588
12589 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12590
12591         * common/byte-vector.h (char_vector): New type.
12592         * target.h (target_read_alloc): Return
12593         gdb::optional<byte_vector>.
12594         (target_read_stralloc): Return gdb::optional<char_vector>.
12595         (target_get_osdata): Return gdb::optional<char_vector>.
12596         * target.c (target_read_alloc_1): Templatize.  Replacement
12597         manual memory management with vector.
12598         (target_read_alloc): Change return type, adjust.
12599         (target_read_stralloc): Change return type, adjust.
12600         (target_get_osdata): Change return type, adjust.
12601         * auxv.c (struct auxv_info) <length>: Remove.
12602         <data>: Change type to gdb::optional<byte_vector>.
12603         (auxv_inferior_data_cleanup): Free auxv_info with delete.
12604         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
12605         (target_auxv_search): Adjust.
12606         (fprint_target_auxv): Adjust.
12607         * avr-tdep.c (avr_io_reg_read_command): Adjust.
12608         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
12609         (linux_make_corefile_notes): Adjust.
12610         * osdata.c (get_osdata): Adjust.
12611         * remote.c (remote_get_threads_with_qxfer): Adjust.
12612         (remote_memory_map): Adjust.
12613         (remote_traceframe_info): Adjust.
12614         (btrace_read_config): Adjust.
12615         (remote_read_btrace): Adjust.
12616         (remote_pid_to_exec_file): Adjust.
12617         * solib-aix.c (solib_aix_get_library_list): Adjust.
12618         * solib-dsbt.c (decode_loadmap): Don't free buf.
12619         (dsbt_get_initial_loadmaps): Adjust.
12620         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
12621         * solib-target.c (solib_target_current_sos): Adjust.
12622         * tracepoint.c (sdata_make_value): Adjust.
12623         * xml-support.c (xinclude_start_include): Adjust.
12624         (xml_fetch_content_from_file): Adjust.
12625         * xml-support.h (xml_fetch_another): Change return type.
12626         (xml_fetch_content_from_file): Change return type.
12627         * xml-syscall.c (xml_init_syscalls_info): Adjust.
12628         * xml-tdesc.c (file_read_description_xml): Adjust.
12629         (fetch_available_features_from_target): Change return type.
12630         (target_fetch_description_xml): Adjust.
12631         (target_read_description_xml): Adjust.
12632
12633 2018-04-06  Tom Tromey  <tom@tromey.com>
12634
12635         * value.c (~value): Update.
12636         (struct value) <contents>: Now unique_xmalloc_ptr.
12637         (value_contents_bits_eq, allocate_value_contents)
12638         (value_contents_raw, value_contents_all_raw)
12639         (value_contents_for_printing, value_contents_for_printing_const)
12640         (set_value_enclosing_type): Update.
12641
12642 2018-04-06  Tom Tromey  <tom@tromey.com>
12643
12644         * value.c (range_s): Remove typedef, VEC.
12645         (struct range): Add operator<.
12646         (range_lessthan): Remove.
12647         (ranges_contain): Change type.
12648         (~value): Update.
12649         (struct value) <unavailable, optimized_out>: Now std::vector.
12650         (value_entirely_available)
12651         (value_entirely_covered_by_range_vector)
12652         (value_entirely_unavailable, value_entirely_optimized_out):
12653         Update.
12654         (insert_into_bit_range_vector): Change argument type.
12655         (find_first_range_overlap): Likewise.
12656         (struct ranges_and_idx, value_contents_bits_eq)
12657         (require_not_optimized_out, require_available): Update.
12658         (ranges_copy_adjusted): Change argument types.
12659         (value_optimized_out, value_copy, value_fetch_lazy): Update.
12660
12661 2018-04-06  Tom Tromey  <tom@tromey.com>
12662
12663         * value.c (~value): Update.
12664         (struct value) <parent>: Now a value_ref_ptr.
12665         (value_parent, set_value_parent, value_address, value_copy):
12666         Update.
12667
12668 2018-04-06  Tom Tromey  <tom@tromey.com>
12669
12670         * value.c (struct value): Add constructor, destructor, and member
12671         initializers.
12672         (allocate_value_lazy, value_decref): Update.
12673
12674 2018-04-06  Tom Tromey  <tom@tromey.com>
12675
12676         * value.c (struct value) <released, next>: Remove.
12677         (all_values): Now a std::vector.
12678         (allocate_value_lazy): Update.
12679         (value_next): Remove.
12680         (value_mark, value_free_to_mark, release_value)
12681         (value_release_to_mark): Update.
12682
12683 2018-04-06  Tom Tromey  <tom@tromey.com>
12684
12685         * value.h (fetch_subexp_value, value_release_to_mark): Update.
12686         (free_value_chain): Remove.
12687         * value.c (free_value_chain): Remove.
12688         (value_release_to_mark): Return a std::vector.
12689         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
12690         std::vector.
12691         (check_condition): Update.
12692         * eval.c (fetch_subexp_value): Change "val_chain" to a
12693         std::vector.
12694         * breakpoint.c (update_watchpoint): Update.
12695         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
12696
12697 2018-04-06  Tom Tromey  <tom@tromey.com>
12698
12699         * value.h (free_all_values): Remove.
12700         * value.c (free_all_values): Remove.
12701
12702 2018-04-06  Tom Tromey  <tom@tromey.com>
12703
12704         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
12705         (value_history_chain, value_history_count): Remove.
12706         (value_history): New global.
12707         (record_latest_value, access_value_history, show_values)
12708         (preserve_values): Update.
12709
12710 2018-04-06  Tom Tromey  <tom@tromey.com>
12711
12712         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
12713         * varobj.c (varobj_set_display_format, varobj_set_value)
12714         (install_default_visualizer, construct_visualizer)
12715         (install_new_value, ~varobj, varobj_get_value_type)
12716         (my_value_of_variable, varobj_editable_p): Update.
12717         * c-varobj.c (c_describe_child, c_value_of_variable)
12718         (cplus_number_of_children, cplus_describe_child): Update.
12719         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12720         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12721         (ada_value_of_variable, ada_value_is_changeable_p): Update.
12722
12723 2018-04-06  Tom Tromey  <tom@tromey.com>
12724
12725         * printcmd.c (last_examine_address): Change type to
12726         value_ref_ptr.
12727         (do_examine, x_command): Update.
12728
12729 2018-04-06  Tom Tromey  <tom@tromey.com>
12730
12731         * value.c (release_value): Update.
12732         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12733         (struct bpstats) <val>: Now a value_ref_ptr.
12734         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12735         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12736         (~watchpoint, print_it_watchpoint, watch_command_1)
12737         (invalidate_bp_value_on_memory_change): Update.
12738
12739 2018-04-06  Tom Tromey  <tom@tromey.com>
12740
12741         * varobj.c (varobj_clear_saved_item)
12742         (update_dynamic_varobj_children, install_new_value, ~varobj):
12743         Update.
12744         * value.h (value_incref): Move declaration earlier.
12745         (value_decref): Rename from value_free.
12746         (struct value_ref_policy): New.
12747         (value_ref_ptr): New typedef.
12748         (struct value_deleter): Remove.
12749         (gdb_value_up): Remove typedef.
12750         (release_value): Change return type.
12751         (release_value_or_incref): Remove.
12752         * value.c (set_value_parent): Update.
12753         (value_incref): Change return type.
12754         (value_decref): Rename from value_free.
12755         (value_free_to_mark, free_all_values, free_value_chain): Update.
12756         (release_value): Return value_ref_ptr.
12757         (release_value_or_incref): Remove.
12758         (record_latest_value, set_internalvar, clear_internalvar):
12759         Update.
12760         * stack.c (info_frame_command): Don't call value_free.
12761         * python/py-value.c (valpy_dealloc, valpy_new)
12762         (value_to_value_object): Update.
12763         * printcmd.c (do_examine): Update.
12764         * opencl-lang.c (lval_func_free_closure): Update.
12765         * mi/mi-main.c (register_changed_p): Don't call value_free.
12766         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12767         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12768         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12769         value_free.
12770         * guile/scm-value.c (vlscm_free_value_smob)
12771         (vlscm_scm_from_value): Update.
12772         * frame.c (frame_register_unwind, frame_unwind_register_signed)
12773         (frame_unwind_register_unsigned, get_frame_register_bytes)
12774         (put_frame_register_bytes): Don't call value_free.
12775         * findvar.c (address_from_register): Don't call value_free.
12776         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12777         * dwarf2loc.c (entry_data_value_free_closure)
12778         (value_of_dwarf_reg_entry, free_pieced_value_closure)
12779         (dwarf2_evaluate_loc_desc_full): Update.
12780         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12781         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12782         (~watchpoint, watch_command_1)
12783         (invalidate_bp_value_on_memory_change): Update.
12784         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12785
12786 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12787
12788         PR gdb/23022
12789         * warning.m4: Add -Wno-error=deprecated-register.
12790         * configure: Re-generate.
12791
12792 2018-04-05  Tom Tromey  <tom@tromey.com>
12793
12794         * linespec.h: Remove include of "vec.h".
12795
12796 2018-04-05  Tom Tromey  <tom@tromey.com>
12797
12798         * linespec.c (typep): Remove typedef.
12799         (find_methods, find_superclass_methods): Take a std::vector.
12800         (find_method): Use std::vector.
12801
12802 2018-04-05  Tom Tromey  <tom@tromey.com>
12803
12804         * utils.c (compare_strings): Remove.
12805         * utils.h (compare_strings): Remove.
12806         * objc-lang.h (find_imps): Update.
12807         * objc-lang.c (find_methods): Take a std::vector.
12808         (uniquify_strings, find_imps): Likewise.
12809         * linespec.c (find_methods): Take a std::vector.
12810         (decode_objc): Use std::vector.
12811         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12812         a std::vector.
12813         (find_method, find_function_symbols): Use std::vector.
12814
12815 2018-04-05  Tom Tromey  <tom@tromey.com>
12816
12817         * completer.c (completion_tracker::completion_tracker): Remove
12818         cast.
12819         (completion_tracker::discard_completions): Likewise.
12820         * breakpoint.c (ambiguous_names_p): Remove cast.
12821         * ada-lang.c (_initialize_ada_language): Remove cast.
12822         * utils.h (streq): Update.
12823         (streq_hash): Add new declaration.
12824         * utils.c (streq): Return bool.
12825         (streq_hash): New function.
12826
12827 2018-04-05  Tom Tromey  <tom@tromey.com>
12828
12829         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12830         Remove a string copy.
12831
12832 2018-04-05  Tom Tromey  <tom@tromey.com>
12833
12834         * linespec.c (filter_results): Use std::vector.
12835         (decode_line_2, decode_line_full): Update.
12836
12837 2018-04-05  Tom Tromey  <tom@tromey.com>
12838
12839         * linespec.c (canonical_to_fullform): Return std::string.
12840         (filter_results): Update.
12841         (struct decode_line_2_item): Add constructor.
12842         <fullform, displayform>: Now std::string.
12843         (decode_line_2_compare_items): Now a std::sort comparator.
12844         (decode_line_2): Update.
12845
12846 2018-04-05  Tom Tromey  <tom@tromey.com>
12847
12848         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12849         (unexpected_linespec_error): Update.
12850         (linespec_parse_basic, parse_linespec): Update.
12851
12852 2018-04-05  Tom Tromey  <tom@tromey.com>
12853
12854         * linespec.c (linespec_parse_basic): Reindent.
12855
12856 2018-04-05  Tom Tromey  <tom@tromey.com>
12857
12858         * minsyms.h (iterate_over_minimal_symbols): Update.
12859         * minsyms.c (iterate_over_minimal_symbols): Take a
12860         gdb::function_view.
12861         * linespec.c (struct collect_minsyms): Remove.
12862         (compare_msyms): Now a std::sort comparator.
12863         (add_minsym): Add parameters.
12864         (search_minsyms_for_name): Update.  Use std::vector.
12865
12866 2018-04-03  Tom Tromey  <tom@tromey.com>
12867
12868         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12869         gdb::byte_vector.
12870
12871 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12872
12873         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12874
12875 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12876
12877         PR gdb/16959
12878         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12879         printing static type.
12880
12881 2018-04-01  Tom Tromey  <tom@tromey.com>
12882
12883         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12884         (rs6000_xfer_shared_libraries): Update.
12885
12886 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12887
12888         * common/gdb_vecs.h (char_ptr): Remove.
12889         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12890
12891 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12892
12893         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12894         with std::vector.
12895         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12896
12897 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12898
12899         * tracepoint.h (struct uploaded_tp): Initialize fields.
12900         <actions, step_actions, cmd_strings>: Change type to
12901         std::vector<char *>.
12902         * tracepoint.c (get_uploaded_tp): Allocate with new.
12903         (free_uploaded_tps): Free with delete.
12904         (parse_tracepoint_definition): Adjust to std::vector change.
12905         * breakpoint.c (read_uploaded_action): Likewise.
12906         (create_tracepoint_from_upload): Likewise.
12907         * ctf.c (ctf_write_uploaded_tp): Likewise.
12908         (SET_ARRAY_FIELD): Likewise.
12909         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12910
12911 2018-03-30  Tom Tromey  <tom@tromey.com>
12912
12913         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12914         std::unique_ptr.
12915         (svr4_keep_data_in_core): Update.
12916         (svr4_read_so_list): Update.
12917
12918 2018-03-30  Tom Tromey  <tom@tromey.com>
12919
12920         * windows-nat.c (handle_output_debug_string, handle_exception):
12921         Update.
12922         * target.h (target_read_string): Update.
12923         * target.c (target_read_string): Change "string" to
12924         unique_xmalloc_ptr.
12925         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12926         Update.
12927         * solib-frv.c (frv_current_sos): Update.
12928         * solib-dsbt.c (dsbt_current_sos): Update.
12929         * solib-darwin.c (darwin_current_sos): Update.
12930         * linux-thread-db.c (inferior_has_bug): Update.
12931         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12932         Update.  Remove alloca.
12933         * ada-lang.c (ada_main_name): Update.
12934
12935 2018-03-30  Tom Tromey  <tom@tromey.com>
12936
12937         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12938         (struct dwo_file_deleter): New.
12939         (dwo_file_up): New typedef.
12940         (open_and_init_dwo_file): Use dwo_file_up.
12941         (free_dwo_file_cleanup): Remove.
12942
12943 2018-03-30  Tom Tromey  <tom@tromey.com>
12944
12945         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12946         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12947
12948 2018-03-30  Tom Tromey  <tom@tromey.com>
12949
12950         * dwarf2read.c (class free_cached_comp_units): New class.
12951         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12952         (free_cached_comp_units): Remove function.
12953
12954 2018-03-30  Tom Tromey  <tom@tromey.com>
12955
12956         * utils.h (make_cleanup_unpush_target): Remove.
12957         * inf-ptrace.c (struct target_unpusher): New.
12958         (target_unpush_up) New typedef.
12959         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12960         target_unpush_up.
12961         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12962
12963 2018-03-27  Tom Tromey  <tom@tromey.com>
12964
12965         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12966
12967 2018-03-27  Pedro Alves  <palves@redhat.com>
12968             Tom Tromey  <tom@tromey.com>
12969
12970         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12971         destructor.  Now a class.
12972         (gdb_readline_wrapper_cleanup): Remove function.
12973         (gdb_readline_wrapper): Remove cleanups.
12974
12975 2018-03-27  Tom Tromey  <tom@tromey.com>
12976
12977         * typeprint.h (struct type_print_options) <local_typedefs,
12978         global_typedefs>: Remove "struct" keyword.
12979         (class typedef_hash_table): New class.
12980         (recursively_update_typedef_hash, add_template_parameters)
12981         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12982         (find_typedef_in_hash): Don't declare.
12983         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12984         (typedef_hash_table::recursively_update): Rename from
12985         recursively_update_typedef_hash.  Now a member.
12986         (typedef_hash_table::add_template_parameters): Rename from
12987         add_template_parameters.  Now a member.
12988         (typedef_hash_table::typedef_hash_table): Now a constructor;
12989         rename from create_typedef_hash.
12990         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12991         rename from free_typedef_hash.
12992         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12993         (do_free_global_table): Remove.
12994         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12995         from copy_type_recursive.
12996         (create_global_typedef_table): Remove.
12997         (typedef_hash_table::find_global_typedef): Now a member of
12998         typedef_hash_table.
12999         (typedef_hash_table::find_typedef): Rename from
13000         find_typedef_in_hash; now a member.
13001         (whatis_exp): Update.
13002         * extension.h (struct ext_lang_type_printers): Add constructor and
13003         destructor.
13004         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13005         declare.
13006         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13007         Now a constructor; rename from start_ext_lang_type_printers.
13008         (ext_lang_type_printers): Now a destructor; rename from
13009         free_ext_lang_type_printers.
13010         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13011         Update.
13012         (c_type_print_base_struct_union): Update.  Remove cleanups.
13013
13014 2018-03-27  Tom Tromey  <tom@tromey.com>
13015
13016         * dwarf-index-write.c: Include <cmath>.
13017
13018 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13019
13020         * NEWS: Add entry describing new "set|show varsize-limit" command.
13021         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13022         command.
13023         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13024         "set variable".
13025
13026 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13027
13028         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13029         dwarf-index-write.c
13030         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13031         * dwarf-index-common.c: New file.
13032         * dwarf-index-common.h: New file.
13033         * dwarf-index-write.c: New file.
13034         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13035         (struct dwarf2_section_info): Move from here.
13036         (dwarf2_section_info_def): Likewise.
13037         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13038         (offset_type): Likewise.
13039         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13040         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13041         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13042         (byte_swap): Likewise.
13043         (MAYBE_SWAP): Likewise.
13044         (dwarf2_per_cu_ptr): Likewise.
13045         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13046         (struct tu_stats): Likewise.
13047         (struct dwarf2_per_objfile): Likewise.
13048         (struct dwarf2_per_cu_data): Likewise.
13049         (struct signatured_type): Likewise.
13050         (sig_type_ptr): Likewise.
13051         (DEF_VEC_P (sig_type_ptr)): Likewise.
13052         (INDEX4_SUFFIX): Likewise.
13053         (INDEX5_SUFFIX): Likewise.
13054         (DEBUG_STR_SUFFIX): Likewise.
13055         (dwarf2_read_section): Make non-static.
13056         (mapped_index_string_hash): Move from here.
13057         (dwarf5_djb_hash): Likewise.
13058         (file_write): Likewise.
13059         (class data_buf): Likewise.
13060         (struct symtab_index_entry): Likewise.
13061         (struct mapped_symtab): Likewise.
13062         (find_slot): Likewise.
13063         (hash_expand): Likewise.
13064         (add_index_entry): Likewise.
13065         (uniquify_cu_indices): Likewise.
13066         (class c_str_view): Likewise.
13067         (class c_str_view_hasher): Likewise.
13068         (class vector_hasher): Likewise.
13069         (write_hash_table): Likewise.
13070         (psym_index_map): Likewise.
13071         (struct addrmap_index_data): Likewise.
13072         (add_address_entry): Likewise.
13073         (add_address_entry_worker): Likewise.
13074         (write_address_map): Likewise.
13075         (symbol_kind): Likewise.
13076         (write_psymbols): Likewise.
13077         (struct signatured_type_index_data): Likewise.
13078         (write_one_signatured_type): Likewise.
13079         (recursively_count_psymbols): Likewise.
13080         (recursively_write_psymbols): Likewise.
13081         (class debug_names): Likewise.
13082         (check_dwarf64_offsets): Likewise.
13083         (psyms_seen_size): Likewise.
13084         (write_gdbindex): Likewise.
13085         (write_debug_names): Likewise.
13086         (assert_file_size): Likewise.
13087         (write_psymtabs_to_index): Likewise.
13088         (save_gdb_index_command): Likewise.
13089         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13090         command.
13091         * dwarf2read.h: New file.
13092
13093 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13094
13095         PR gdb/22670
13096         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13097         symbol name if the CU's language stores symbol names in linkage
13098         format.
13099         * language.h (struct language_defn)
13100         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13101         all instances of this struct.
13102
13103 2018-03-26  Tom Tromey  <tom@tromey.com>
13104
13105         * stack.c (backtrace_command_1): Remove verbose code.
13106
13107 2018-03-26  Tom Tromey  <tom@tromey.com>
13108
13109         * python/py-framefilter.c (py_print_type): Don't catch
13110         exceptions.  Return void.
13111         (py_print_value): Likewise.
13112         (py_print_single_arg): Likewise.
13113         (enumerate_args): Don't catch exceptions.
13114         (py_print_args): Likewise.
13115         (py_print_frame): Likewise.
13116         (gdbpy_apply_frame_filter): Catch exceptions here.
13117
13118 2018-03-26  Tom Tromey  <tom@tromey.com>
13119
13120         * stack.c (_initialize_stack): Remove trailing newlines from help
13121         text.  Add "Usage" line to "backtrace" help.
13122
13123 2018-03-26  Tom Tromey  <tom@tromey.com>
13124
13125         PR python/16486:
13126         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13127
13128 2018-03-26  Tom Tromey  <tom@tromey.com>
13129
13130         * python/py-framefilter.c (py_print_single_arg): Return
13131         EXT_LANG_BT_ERROR from catch.
13132
13133 2018-03-26  Tom Tromey  <tom@tromey.com>
13134
13135         PR backtrace/15584:
13136         * stack.c (backtrace_command_1): Move some code into no-filters
13137         "if".
13138
13139 2018-03-26  Tom Tromey  <tom@tromey.com>
13140
13141         * python/py-framefilter.c (throw_quit_or_print_exception): New
13142         function.
13143         (gdbpy_apply_frame_filter): Use it.
13144
13145 2018-03-26  Tom Tromey  <tom@tromey.com>
13146
13147         PR cli/17716:
13148         * python/py-framefilter.c (py_print_type, py_print_value)
13149         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13150         RETURN_MASK_ERROR.
13151
13152 2018-03-26  Tom Tromey  <tom@tromey.com>
13153
13154         * python/py-framefilter.c (enumerate_args): Use
13155         gdb::unique_xmalloc_ptr.
13156
13157 2018-03-26  Tom Tromey  <tom@tromey.com>
13158
13159         * python/py-framefilter.c (py_print_frame): Return
13160         EXT_LANG_BT_OK.
13161         (gdbpy_apply_frame_filter): Update comment.
13162         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13163         Remove.
13164         <EXT_LANG_BT_NO_FILTERS>: Change value.
13165
13166 2018-03-26  Tom Tromey  <tom@tromey.com>
13167
13168         PR backtrace/15582:
13169         * stack.c (backtrace_command): Parse "hide" argument.
13170         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13171         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13172         constant.
13173
13174 2018-03-26  Tom Tromey  <tom@tromey.com>
13175
13176         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13177         add "flags".
13178         (backtrace_command): Remove "fulltrace", add "flags".
13179
13180 2018-03-26  Tom Tromey  <tom@tromey.com>
13181
13182         * stack.c (backtrace_command): Rewrite command line parsing.
13183
13184 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13185
13186         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13187
13188 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13189
13190         * filename-seen-cache.h: Add include guard.
13191
13192 2018-03-26  Keith Seitz  <keiths@redhat.com>
13193
13194         * symfile.c (place_section): Remove "struct" from section_addr_info
13195         in comment.
13196         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13197         "struct" keyword from section_addr_info.
13198
13199 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13200
13201         * regformats/regdef.h (reg): Add constructors.
13202
13203 2018-03-25  Pedro Alves  <palves@redhat.com>
13204
13205         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13206         if then/else bodies in var_func_name extraction.
13207
13208 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13209
13210         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13211         lookup_minimal_symbol() to find symbol entry.
13212         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13213
13214 2018-03-23  Keith Seitz  <keiths@redhat.com>
13215
13216         PR c++/22968
13217         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13218         nested type definitions for C++, too.
13219
13220 2018-03-23  Tom Tromey  <tom@tromey.com>
13221
13222         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13223         a typedef.
13224         (macho_register_oso): Remove.
13225         (macho_symtab_read): Take a std::vector.
13226         (oso_el_compare_name): Now a std::sort comparator.
13227         (macho_symfile_read_all_oso): Take a std::vector.
13228         (macho_symfile_read): Use std::vector.  Remove cleanups.
13229
13230 2018-03-22  Tom Tromey  <tom@tromey.com>
13231
13232         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13233         (record_full_goto_bookmark): Use std::string.
13234
13235 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13236
13237         PR tdep/18295
13238         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13239         a single mask.
13240
13241 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13242
13243         * rs6000-tdep.c (store_insn_p): New function.
13244         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13245         and cr_reg to their unshifted values. Use store_insn_p to
13246         match LR saves using either R1 or fdata->alloca_reg. Use
13247         store_insn_p to match CR saves. Set alloca_reg_offset
13248         when alloca_reg and framep are set. Remove lr_reg shift
13249         when assigning to fdata->lr_register.
13250
13251 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13252
13253         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13254         command line args instead of emitting a warning.
13255
13256 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13257
13258         * tracepoint.h (struct static_tracepoint_marker): Initialize
13259         fields, define default constructor, move constructor and move
13260         assignment, disable the rest.
13261         <str_id, extra>: Make std::string.
13262         (release_static_tracepoint_marker): Remove.
13263         (free_current_marker): Remove.
13264         * tracepoint.c (free_current_marker): Remove.
13265         (parse_static_tracepoint_marker_definition): Adjust to
13266         std::string, use new hex2str overload.
13267         (release_static_tracepoint_marker): Remove.
13268         (print_one_static_tracepoint_marker): Get marker by reference
13269         and adjust to std::string.
13270         (info_static_tracepoint_markers_command): Adjust to std::vector
13271         changes
13272         * target.h (static_tracepoint_marker_p): Remove typedef.
13273         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13274         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13275         bool.
13276         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13277         * target-debug.h
13278         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13279         (target_debug_print_std_vector_static_tracepoint_marker): New.
13280         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13281         to...
13282         (target_debug_print_static_tracepoint_marker_p): ... this.
13283         * target-delegates.c: Re-generate.
13284         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13285         Make std::string.
13286         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13287         (decode_static_tracepoint_spec): Adjust to std::vector.
13288         (tracepoint_print_one_detail): Adjust to std::string.
13289         (strace_marker_decode_location): Adjust to std::string.
13290         (update_static_tracepoint): Adjust to std::string, remove call
13291         to release_static_tracepoint_marker.
13292         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13293         Adjust to std::vector.
13294         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13295         (remote_static_tracepoint_markers_by_strid): Adjust to
13296         std::vector.
13297         * common/rsp-low.h (hex2str): New overload with explicit count
13298         of bytes.
13299         * common/rsp-low.c (hex2str): New overload with explicit count
13300         of bytes.
13301         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13302         (_initialize_rsp_low_selftests): Add test_hex2str test.
13303         * unittests/tracepoint-selftests.c
13304         (test_parse_static_tracepoint_marker_definition): Adjust to
13305         std::string.
13306
13307 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13308
13309         * tracepoint.c (parse_static_tracepoint_marker_definition):
13310         Consider case where the definition is followed by more
13311         definitions.
13312         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13313         tracepoint-selftests.c.
13314         * unittests/tracepoint-selftests.c: New.
13315
13316 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13317
13318         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13319         Carvalho.
13320
13321 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13322
13323         * symtab.c (find_pc_sect_line): fixed indentation.
13324
13325 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13326
13327         * symtab.c (find_pc_sect_line): now uses binary search.
13328
13329 2018-03-19  Tom Tromey  <tom@tromey.com>
13330
13331         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13332         "IDENT" production.
13333
13334 2018-03-19  Pedro Alves  <palves@redhat.com>
13335             Tom Tromey  <tom@tromey.com>
13336
13337         * unittests/observable-selftests.c: New file.
13338         * common/observable.h: New file.
13339         * observable.h: New file.
13340         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13341         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13342         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13343         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13344         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13345         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13346         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13347         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13348         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13349         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13350         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13351         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13352         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13353         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13354         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13355         tui/tui-interp.c, valops.c: Update all users.
13356         * tui/tui-hooks.c (tui_bp_created_observer)
13357         (tui_bp_deleted_observer, tui_bp_modified_observer)
13358         (tui_inferior_exit_observer, tui_before_prompt_observer)
13359         (tui_normal_stop_observer, tui_register_changed_observer):
13360         Remove.
13361         (tui_observers_token): New global.
13362         (attach_or_detach, tui_attach_detach_observers): New functions.
13363         (tui_install_hooks, tui_remove_hooks): Use
13364         tui_attach_detach_observers.
13365         * record-btrace.c (record_btrace_thread_observer): Remove.
13366         (record_btrace_thread_observer_token): New global.
13367         * observer.sh: Remove.
13368         * observer.c: Rename to observable.c.
13369         * observable.c (namespace gdb_observers): Define new objects.
13370         (observer_debug): Move into gdb_observers namespace.
13371         (struct observer, struct observer_list, xalloc_observer_list_node)
13372         (xfree_observer_list_node, generic_observer_attach)
13373         (generic_observer_detach, generic_observer_notify): Remove.
13374         (_initialize_observer): Update.
13375         Don't include observer.inc.
13376         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13377         (clean mostlyclean): Likewise.
13378         (observer.h, observer.inc): Remove targets.
13379         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13380         (COMMON_SFILES): Use observable.c, not observer.c.
13381         * .gitignore: Remove observer.h.
13382
13383 2018-03-18  Tom Tromey  <tom@tromey.com>
13384
13385         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13386         gdb::def_vector.
13387         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13388
13389 2018-03-17  Tom Tromey  <tom@tromey.com>
13390
13391         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13392
13393 2018-03-17  Tom Tromey  <tom@tromey.com>
13394
13395         * target.c (class scoped_target_fd): New.
13396         (target_fileio_close_cleanup): Remove.
13397         (target_fileio_read_alloc_1): Use scoped_target_fd.
13398
13399 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13400
13401         * silent-rules.mk: New.
13402         * Makefile.in: Include silent-rules.mk
13403         (srcdir, VPATH, top_srcdir): Move up.
13404         (COMPILE): Add ECHO_CXX.
13405         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13406         (init.c): Add ECHO_INIT_C.
13407         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13408         (version.c): Add ECHO_GEN.
13409         (printcmd.o): Add ECHO_CXX.
13410         (target-float.o): Add ECHO_CXX.
13411         (ada-exp.o): Add ECHO_CXX.
13412         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13413         (insight$(EXEEXT)): Add ECHO_CXXLD.
13414         * gnulib/configure.ac: Add AM_SILENT_RULES.
13415         * gnulib/aclocal.m4: Re-generate.
13416         * gnulib/configure: Re-generate.
13417         * gnulib/import/Makefile.in: Re-generate.
13418
13419 2018-03-16  Tom Tromey  <tom@tromey.com>
13420
13421         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13422         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13423         * utils.c (do_free_section_addr_info)
13424         (make_cleanup_free_section_addr_info): Remove.
13425         * symfile.h (struct other_sections): Add constructor.
13426         (struct section_addr_info): Remove.
13427         (section_addr_info): New typedef.
13428         (struct sym_fns) <sym_offsets>: Change type of parameter.
13429         (build_section_addr_info_from_objfile)
13430         (relative_addr_info_to_section_offsets, addr_info_make_relative)
13431         (default_symfile_offsets, symbol_file_add)
13432         (symbol_file_add_from_bfd)
13433         (build_section_addr_info_from_section_table): Update.
13434         (alloc_section_addr_info, free_section_addr_info): Don't declare.
13435         * symfile.c (alloc_section_addr_info): Remove.
13436         (build_section_addr_info_from_section_table): Change return type.
13437         Update.
13438         (build_section_addr_info_from_bfd)
13439         (build_section_addr_info_from_objfile): Likewise.
13440         (free_section_addr_info): Remove.
13441         (relative_addr_info_to_section_offsets): Change type of "addrs".
13442         (addrs_section_compar): Now a std::sort comparator.
13443         (addrs_section_sort): Change return type.
13444         (addr_info_make_relative): Change type of "addrs".  Update.
13445         (default_symfile_offsets, syms_from_objfile_1)
13446         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
13447         (symbol_file_add_separate): Update.
13448         (symbol_file_add): Change type of "addrs".  Update.
13449         (add_symbol_file_command): Update.  Remove cleanups.
13450         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
13451         cleanups.
13452         * symfile-debug.c (debug_sym_offsets): Change type of "info".
13453         * solib.c (solib_read_symbols): Update.
13454         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
13455         * machoread.c (macho_symfile_offsets): Update.
13456         * jit.c (jit_bfd_try_read_symtab): Update.
13457
13458 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
13459
13460         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13461         unittests/utils-selftests.c.
13462         * unittests/utils-selftests.c: New file.
13463
13464 2018-03-14  Tom Tromey  <tom@tromey.com>
13465
13466         PR cli/14977:
13467         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
13468         for NULL.
13469
13470 2018-03-14  Tom Tromey  <tom@tromey.com>
13471
13472         PR cli/19918:
13473         * printcmd.c (printf_pointer): Allow "-" in format.
13474
13475 2018-03-14  Tom Tromey  <tom@tromey.com>
13476
13477         * printcmd.c (_initialize_printcmd): Add usage to printf.
13478
13479 2018-03-14  Yao Qi  <qiyao@sourceware.org>
13480
13481         * MAINTAINERS: Update my email address.
13482
13483 2018-03-13  Tom Tromey  <tom@tromey.com>
13484
13485         * machoread.c (macho_check_dsym): Change filenamep to a
13486         std::string*.
13487         (macho_symfile_read): Update.
13488         * symfile.c (load_command): Use std::string.
13489
13490 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13491
13492         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
13493         to error message string.
13494         (riscv_register_name): Use xsnprintf instead of sprintf.
13495         (riscv_insn::fetch_instruction): Use gdb_assert instead of
13496         internal_error.
13497         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
13498         error.
13499         (riscv_push_dummy_call): Likewise.
13500
13501 2018-03-12  Tom Tromey  <tom@tromey.com>
13502
13503         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
13504         Use gdb::byte_vector.
13505         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
13506
13507 2018-03-12  Yao Qi  <yao.qi@linaro.org>
13508
13509         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
13510         parameter type to readable_regcache.
13511         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
13512         the declaration.
13513
13514 2018-03-11  Tom Tromey  <tom@tromey.com>
13515
13516         * dwarf2read.c (struct nextfield): Add initializers.
13517         (struct nextfnfield): Remove.
13518         (struct fnfieldlist): Add initializers.  Remove "length" and
13519         "head", use std::vector.
13520         (struct decl_field_list): Remove.
13521         (struct field_info): Add initializers.
13522         <fields, baseclasses>: Now std::vector.
13523         <nbaseclasses, nfnfields, typedef_field_list_count,
13524         nested_types_list_count>: Remove.
13525         (dwarf2_add_field, dwarf2_add_type_defn)
13526         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
13527         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
13528         (process_structure_scope): Update.
13529
13530 2018-03-11  Tom Tromey  <tom@tromey.com>
13531
13532         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
13533         for use by std::sort.
13534         (build_type_psymtabs_1): Use std::vector.
13535
13536 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
13537
13538         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
13539         and LIBMPFR in the printed configuration.
13540
13541 2018-03-08  Tom Tromey  <tom@tromey.com>
13542
13543         * source.c (get_filename_and_charpos): Use scoped_fd.
13544         * nto-procfs.c (procfs_open_1): Use scoped_fd.
13545         (procfs_pidlist): Likewise.
13546         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
13547         (iterate_over_mappings): Likewise.
13548
13549 2018-03-08  Tom Tromey  <tom@tromey.com>
13550
13551         * infcall.c (struct call_return_meta_info)
13552         <stack_temporaries_enabled>: Remove.
13553         (get_call_return_value, call_function_by_hand_dummy): Update.
13554         * thread.c (disable_thread_stack_temporaries): Remove.
13555         (enable_thread_stack_temporaries): Remove.
13556         (thread_stack_temporaries_enabled_p): Return bool.
13557         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
13558         (get_last_thread_stack_temporary): Update.
13559         * eval.c (evaluate_subexp): Update.
13560         * gdbthread.h (class enable_thread_stack_temporaries): Now a
13561         class, not a function.
13562         (value_ptr, value_vec): Remove typedefs.
13563         (class thread_info) <stack_temporaries_enabled>: Now bool.
13564         <stack_temporaries>: Now a std::vector.
13565         (thread_stack_temporaries_enabled_p)
13566         (value_in_thread_stack_temporaries): Return bool.
13567
13568 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
13569
13570         * remote.c (putpkt_binary): Fix omitted bytes reporting.
13571         (getpkt_or_notif_sane_1): Likewise.
13572
13573 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13574
13575         * build-id.c (build_id_to_debug_bfd): Use std::string.
13576
13577 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13578
13579         * build-id.c (find_separate_debug_file_by_buildid): Return
13580         std::string.
13581         * build-id.h (find_separate_debug_file_by_buildid): Return
13582         std::string.
13583         * coffread.c (coff_symfile_read): Adjust to std::string.
13584         * elfread.c (elf_symfile_read): Adjust to std::string.
13585         * symfile.c (separate_debug_file_exists): Change parameter to
13586         std::string.
13587         (find_separate_debug_file): Return std::string.
13588         (find_separate_debug_file_by_debuglink): Return std::string.
13589         * symfile.h (find_separate_debug_file_by_debuglink): Return
13590         std::string.
13591
13592 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13593
13594         * common/xml-utils.c (xml_escape_text): Move code to...
13595         (xml_escape_text_append): ... this new function.
13596         * common/xml-utils.h (xml_escape_text_append): New declaration.
13597         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
13598         New function.
13599         (_initialize_xml_utils): register test_xml_escape_text_append as
13600         a selftest.
13601
13602 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
13603
13604         * defs.h: Remove MAX_REGISTER_SIZE.
13605         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
13606         asserts.
13607         * python/py-unwind.c (pyuw_sniffer): Likewise.
13608
13609 2018-03-07  Tom Tromey  <tom@tromey.com>
13610
13611         * linux-tdep.c (linux_info_proc): Update.
13612         * target.h (struct target_ops) <to_fileio_readlink>: Return
13613         optional<string>.
13614         (target_fileio_readlink): Return optional<string>.
13615         * remote.c (remote_hostio_readlink): Return optional<string>.
13616         * inf-child.c (inf_child_fileio_readlink): Return
13617         optional<string>.
13618         * target.c (target_fileio_readlink): Return optional<string>.
13619
13620 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
13621
13622         * regcache.c (cooked_read_test): Add riscv to the list of
13623         architectures that have a save_reggroup.
13624
13625 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13626
13627         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
13628         value is not a dynamic class object.
13629
13630 2018-03-06  Tom Tromey  <tom@tromey.com>
13631
13632         * rust-exp.y: Formatting fixes.
13633
13634 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13635
13636         * riscv-tdep.c (riscv_register_name): Remove target description
13637         support.
13638         (riscv_gdbarch_init): Remove target description check.
13639
13640 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13641
13642         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
13643         comment.
13644         * riscv-tdep.h: Likewise.
13645
13646 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13647
13648         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
13649         (riscv_pseudo_register_write): Delete.
13650         (riscv_gdbarch_init): Remove all use of pseudo registers.
13651
13652 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13653
13654         * record-btrace.c (btrace_print_lines): Replace cleanup
13655         parameter with RAII equivalents.
13656         (btrace_insn_history): Replace cleanup with RAII equivalents.
13657         * ui-out.h (make_cleanup_ui_out_list_begin_end,
13658         make_cleanup_ui_out_tuple_begin_end): Remove.
13659         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
13660         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
13661         make_cleanup_ui_out_list_begin_end): Remove.
13662
13663 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13664
13665         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
13666         parameter types to std::vector.  Use bool.
13667         (record_btrace_wait): Replace VEC(tp_t) with
13668         std::vector<thread_info *>.
13669         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
13670
13671 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13672
13673         * record-btrace.c (record_btrace_disable_callback): Remove.
13674         (struct scoped_btrace_disable): New.
13675         (record_btrace_open): Use scoped_btrace_disable.
13676
13677 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13678
13679         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
13680         reading values from registers.
13681
13682 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13683
13684         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
13685         where appropriate.
13686
13687 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13688
13689         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
13690         change parameter type.  Use GDB's print functions, and use
13691         core_addr_to_string where appropriate.
13692         (riscv_push_dummy_call): Use core_addr_to_string where
13693         appropriate, update call to riscv_print_arg_location, and reindent
13694         a few lines.
13695         (riscv_return_value): Update call to riscv_print_arg_location.
13696
13697 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13698             Tim Newsome <tim@sifive.com>
13699             Albert Ou <a0u@eecs.berkeley.edu>
13700             Darius Rad <darius@bluespec.com>
13701
13702         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
13703         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
13704         (ALLDEPFILES): Add riscv-tdep.c
13705         * configure.tgt: Add riscv support.
13706         * riscv-tdep.c: New file.
13707         * riscv-tdep.h: New file.
13708         * NEWS: Mention new target.
13709         * MAINTAINERS: Add entry for riscv.
13710
13711 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13712
13713         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
13714         fields within aggregates.
13715
13716 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
13717
13718         * record-btrace.c (btrace_print_lines): Change type of flags to
13719         gdb_disassembly_flags.
13720
13721 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13722
13723         * fbsd-nat.c: Include "inf-ptrace.h".
13724         (USE_SIGTRAP_SIGINFO): Conditionally define.
13725         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13726         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13727         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13728         function.
13729         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13730         Likewise.
13731         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13732         Likewise.
13733         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13734         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13735         "supports_stopped_by_hw_breakpoint" target methods.
13736
13737 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13738
13739         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13740         * fbsd-nat.c (debug_fbsd_nat): New variable.
13741         (show_fbsd_nat_debug): New function.
13742         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13743         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13744
13745 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13746
13747         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13748         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13749         prototype.
13750         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13751         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13752         method.
13753
13754 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13755
13756         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13757         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13758
13759 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13760
13761         * charset.c (struct charset_vector): New.
13762         (charsets): Change type to charset_vector.
13763         (find_charset_names): Adjust.
13764         (add_one): Adjust.
13765         (_initialize_charset): Adjust.
13766
13767 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13768
13769         * progspace.h (struct program_space) <deleted_solibs>: Change
13770         type to std::vector<std::string>.
13771         * progspace.c (clear_program_space_solib_cache): Adjust.
13772         * breakpoint.c (print_solib_event): Adjust.
13773         (check_status_catch_solib): Adjust.
13774         * solib.c (update_solib_list): Adjust.
13775         * ui-out.h (class ui_out) <field_string>: New overload.
13776         * ui-out.c (ui_out::field_string): New overload.
13777
13778 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13779
13780         * progspace.h (struct program_space): Add constructor and
13781         destructor, initialize fields.
13782         (add_program_space): Remove.
13783         * progspace.c (add_program_space): Rename to...
13784         (program_space::program_space): ... this.
13785         (release_program_space): Rename to...
13786         (program_space::~program_space): ... this.
13787         (delete_program_space): Use delete to delete program_space.
13788         (initialize_progspace): Use new to allocate program_space.
13789         * inferior.c (add_inferior_with_spaces): Likewise.
13790         (clone_inferior_command): Likewise.
13791         * infrun.c (follow_fork_inferior): Likewise.
13792         (handle_vfork_child_exec_or_exit): Likewise.
13793
13794 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13795
13796         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13797         (delim_string_to_char_ptr_vec): Return std::vector of
13798         gdb::unique_xmalloc_ptr.
13799         (dirnames_to_char_ptr_vec_append): Take std::vector of
13800         gdb::unique_xmalloc_ptr.
13801         (dirnames_to_char_ptr_vec): Return std::vector of
13802         gdb::unique_xmalloc_ptr.
13803         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13804         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13805         (delim_string_to_char_ptr_vec): Return an std::vector of
13806         gdb::unique_xmalloc_ptr, adjust the code.
13807         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13808         gdb::unique_xmalloc_ptr, adjust the code.
13809         (dirnames_to_char_ptr_vec): Return an std::vector of
13810         gdb::unique_xmalloc_ptr, adjust the code.
13811         * auto-load.c (auto_load_safe_path_vec): Change type to
13812         std::vector of gdb::unique_xmalloc_ptr.
13813         (auto_load_expand_dir_vars): Return an std::vector of
13814         gdb::unique_xmalloc_ptr, adjust the code.
13815         (auto_load_safe_path_vec_update): Adjust.
13816         (filename_is_in_auto_load_safe_path_vec): Adjust.
13817         (auto_load_objfile_script_1): Adjust.
13818         * build-id.c (build_id_to_debug_bfd): Adjust.
13819         * linux-thread-db.c (thread_db_load_search): Adjust.
13820         * source.c (add_path): Adjust.
13821         (openp): Adjust.
13822         * symfile.c (find_separate_debug_file): Adjust.
13823         * utils.c (do_free_char_ptr_vec): Remove.
13824         (make_cleanup_free_char_ptr_vec): Remove.
13825
13826 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13827
13828         PR gdb/22907
13829         * common/pathstuff.c: Conditionally include "<windows.h>".
13830
13831 2018-03-01  Georg Sauthoff  <mail@georg.so>
13832
13833         PR gdb/22888
13834         * gcore.in: Quote variables and switch interpreter to bash.
13835
13836 2018-03-01  Tom Tromey  <tom@tromey.com>
13837
13838         * dwarf2read.c (alloc_discriminant_info): Fix default_index
13839         assertion.  Add assertion for discriminant_index.
13840         (quirk_rust_enum): Use correct base type name in univariant case.
13841
13842 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13843
13844         * record.c (get_call_history_modifiers): Return a
13845         record_print_flags.
13846         (cmd_record_call_history): Adjust.
13847         * record-btrace.c (record_btrace_call_history): Adjust.
13848         (record_btrace_call_history_range): Adjust.
13849         (record_btrace_call_history_from): Adjust.
13850         * target-debug.h (target_debug_print_record_print_flags): New.
13851         * target-delegates.c: Re-generate.
13852         * target.c (target_call_history): Change flags type.
13853         (target_call_history_from): Likewise.
13854         (target_call_history_range): Likewise.
13855         * target.h (struct target_ops) <target_call_history>: Likewise.
13856         (target_call_history_from): Likewise.
13857         (target_call_history_range): Likewise.
13858
13859 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13860             Simon Marchi  <simon.marchi@polymtl.ca>
13861
13862         * common/common-utils.c: Include "sys/stat.h".
13863         (is_regular_file): Move here from "source.c"; change return
13864         type to "bool".
13865         * common/common-utils.h (is_regular_file): New prototype.
13866         * common/pathstuff.c (contains_dir_separator): New function.
13867         * common/pathstuff.h (contains_dir_separator): New prototype.
13868         * source.c: Don't include "sys/stat.h".
13869         (is_regular_file): Move to "common/common-utils.c".
13870
13871 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13872
13873         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13874         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13875         * auto-load.c: Include "common/pathstuff.h".
13876         * common/common-def.h (current_directory): Move here.
13877         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13878         function.
13879         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13880         prototype.
13881         * common/pathstuff.c: New file.
13882         * common/pathstuff.h: New file.
13883         * compile/compile.c: Include "common/pathstuff.h".
13884         * defs.h (current_directory): Move to "common/common-defs.h".
13885         * dwarf2read.c: Include "common/pathstuff.h".
13886         * exec.c: Likewise.
13887         * guile/scm-safe-call.c: Likewise.
13888         * linux-thread-db.c: Likewise.
13889         * main.c: Likewise.
13890         * nto-tdep.c: Likewise.
13891         * objfiles.c: Likewise.
13892         * source.c: Likewise.
13893         * symtab.c: Likewise.
13894         * utils.c: Include "common/pathstuff.h".
13895         (gdb_realpath): Move to "common/pathstuff.c".
13896         (gdb_realpath_keepfile): Likewise.
13897         (gdb_abspath): Likewise.
13898         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13899         (gdb_realpath_keepfile): Likewise.
13900         (gdb_abspath): Likewise.
13901
13902 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13903
13904         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13905         wildcard process pid for super_resume for kernels with a
13906         specific bug.
13907
13908 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13909
13910         * compile/compile.c (get_args): Add additional comments
13911         explaining function.
13912
13913 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13914             Tom Tromey  <tom@tromey.com>
13915
13916         * target.h (memory_write_request_s): Remove typedef.  Don't define
13917         VEC.
13918         (target_write_memory_blocks): Change argument to std::vector.
13919         (struct memory_write_request): Add constructor.
13920         * target-memory.c (compare_block_starting_address): Return bool.
13921         Change argument types.
13922         (claim_memory): Change arguments to use std::vector.
13923         (split_regular_and_flash_blocks, blocks_to_erase)
13924         (compute_garbled_blocks): Likewise.
13925         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13926         (target_write_memory_blocks): Change argument to std::vector.
13927         * symfile.c (struct load_section_data): Add constructor and
13928         destructor.  Use std::vector for "requests".
13929         (struct load_progress_data): Add initializers.
13930         (load_section_callback): Update.  Use "new".
13931         (clear_memory_write_data): Remove.
13932         (generic_load): Update.
13933
13934 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13935
13936         * arch/aarch64.h: Use common/tdesc.h.
13937
13938 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13939
13940         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13941         architecture with a 64-bit ABI.
13942
13943 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13944
13945         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13946         ahead of target description loading.
13947
13948 2018-02-26  Tom Tromey  <tom@tromey.com>
13949
13950         * stack.c (backtrace_command_1): Update.
13951         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13952         of "flags".
13953         * python/py-framefilter.c (py_print_frame)
13954         (gdbpy_apply_frame_filter): Change type of "flags".
13955         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13956         of "flags".
13957         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13958         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13959         * extension.h (enum frame_filter_flag): Rename from
13960         frame_filter_flags.
13961         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13962         (apply_ext_lang_frame_filter): Change type of "flags".
13963         * extension.c (apply_ext_lang_frame_filter): Change type of
13964         "flags".
13965         * extension-priv.h (struct extension_language_ops)
13966         <apply_frame_filter>: Change type of "flags".
13967
13968 2018-02-26  Tom Tromey  <tom@tromey.com>
13969
13970         PR python/16497:
13971         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13972         off-by-one in py_end computation.
13973         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13974         PRINT_MORE_FRAMES.
13975         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13976         constant.
13977
13978 2018-02-26  Tom Tromey  <tom@tromey.com>
13979
13980         * dwarf2read.c (struct variant_field): New.
13981         (struct nextfield) <variant>: New field.
13982         (dwarf2_add_field): Handle DW_TAG_variant_part.
13983         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13984         discriminated union.
13985         (read_structure_type): Handle DW_TAG_variant_part.
13986         (handle_struct_member_die): New function, extracted from
13987         process_structure_scope.  Handle DW_TAG_variant.
13988         (process_structure_scope): Handle discriminated unions.  Call
13989         handle_struct_member_die.
13990
13991 2018-02-26  Tom Tromey  <tom@tromey.com>
13992
13993         * rust-lang.h (rust_last_path_segment): Declare.
13994         * rust-lang.c (rust_last_path_segment): Now public.  Change
13995         contract.
13996         (struct disr_info): Remove.
13997         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13998         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13999         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14000         (rust_enum_p, rust_enum_variant): New function.
14001         (rust_underscore_fields): Remove "offset" parameter.
14002         (rust_print_enum): New function.
14003         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14004         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14005         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14006         enums.
14007         (rust_internal_print_type): New function, from rust_print_type.
14008         Remove enum code.
14009         (rust_print_type): Call rust_internal_print_type.
14010         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14011         Update enum handling.
14012         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14013         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14014         (rust_union_quirks): New functions.
14015         (process_full_comp_unit, process_full_type_unit): Call
14016         rust_union_quirks.
14017         (process_structure_scope): Update rust_unions if necessary.
14018
14019 2018-02-26  Tom Tromey  <tom@tromey.com>
14020
14021         * value.h (value_union_variant): Declare.
14022         * valops.c (value_union_variant): New function.
14023         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14024         (struct discriminant_info): New.
14025         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14026         enumerator.
14027         (struct main_type) <flag_discriminated_union>: New field.
14028
14029 2018-02-26  Tom Tromey  <tom@tromey.com>
14030
14031         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14032         unittests/unpack-selftests.c.
14033         * unittests/unpack-selftests.c: New file.
14034         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14035
14036 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14037
14038         * dwarf2read.c (struct partial_die_info) <read>: New method.
14039         (read_partial_die): Remove the declaration.
14040         (load_partial_dies): Update.
14041         (partial_die_info::partial_die_info):
14042         (read_partial_die): Change it to partial_die_info::read.
14043
14044 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14045
14046         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14047         (fixup_partial_die): Remove declaration.
14048         (scan_partial_symbols): Update.
14049         (partial_die_parent_scope): Likewise.
14050         (partial_die_full_name): Likewise.
14051         (fixup_partial_die): Change it to partial_die_info::fixup.
14052
14053 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14054
14055         * dwarf2read.c (read_partial_die): Update the declaration.
14056         (load_partial_dies): Caller update.
14057         (read_partial_die): Remove one argument abbrev_len.
14058
14059 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14060
14061         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14062         assignment operator.
14063         (load_partial_dies): Use ctor and copy ctor.
14064         (read_partial_die): Update.
14065         (dwarf2_cu::find_partial_die): Use ctor.
14066
14067 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14068
14069         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14070         (find_partial_die_in_comp_unit): Change it to
14071         dwarf2_cu::find_partial_die.
14072         (find_partial_die): Update.
14073
14074 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14075
14076         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14077         is NULL.
14078
14079 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14080
14081         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14082
14083 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14084
14085         * arch/amd64.h: Use common/tdesc.h.
14086         * arch/i386.c: Likewise.
14087         * arch/i386.h: Likewise.
14088         * arch/tic6x.c: Likewise.
14089         * arch/tdesc.h: Move file from here...
14090         * common/tdesc.h: ...to here.
14091         * features/aarch64-core.c: Regenerate.
14092         * features/aarch64-fpu.c: Regenerate.
14093         * features/i386/32bit-avx.c: Regenerate.
14094         * features/i386/32bit-avx512.c: Regenerate.
14095         * features/i386/32bit-core.c: Regenerate.
14096         * features/i386/32bit-linux.c: Regenerate.
14097         * features/i386/32bit-mpx.c: Regenerate.
14098         * features/i386/32bit-pkeys.c: Regenerate.
14099         * features/i386/32bit-sse.c: Regenerate.
14100         * features/i386/64bit-avx.c: Regenerate.
14101         * features/i386/64bit-avx512.c: Regenerate.
14102         * features/i386/64bit-core.c: Regenerate.
14103         * features/i386/64bit-linux.c: Regenerate.
14104         * features/i386/64bit-mpx.c: Regenerate.
14105         * features/i386/64bit-pkeys.c: Regenerate.
14106         * features/i386/64bit-segments.c: Regenerate.
14107         * features/i386/64bit-sse.c: Regenerate.
14108         * features/i386/x32-core.c: Regenerate.
14109         * features/tic6x-c6xp.c: Regenerate.
14110         * features/tic6x-core.c: Regenerate.
14111         * features/tic6x-gp.c: Regenerate.
14112         * target-descriptions.c: Use common/tdesc.h.
14113         * target-descriptions.h: Likewise.
14114
14115 2018-02-24  Tom Tromey  <tom@tromey.com>
14116
14117         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14118         (try_thread_db_load_from_dir, thread_db_load_search): Use
14119         std::string.
14120         (info_auto_load_libthread_db_compare): Return bool.  Change
14121         argument types.
14122         (info_auto_load_libthread_db): Use std::vector, std::string.
14123         Remove cleanups.
14124
14125 2018-02-24  Tom Tromey  <tom@tromey.com>
14126
14127         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14128         std::string.
14129         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14130         std::string*.
14131         * gdbarch.c: Rebuild.
14132         * gdbarch.h: Rebuild.
14133         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14134         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14135         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14136         std::string*.
14137
14138 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14139
14140         * gdbtypes.h (sect_offset): Change type to uint64_t.
14141         (sect_offset_str): New function.
14142         * dwarf2read.c (create_addrmap_from_aranges): Use
14143         sect_offset_str.
14144         (error_check_comp_unit_head): Likewise.
14145         (create_debug_type_hash_table): Likewise.
14146         (read_cutu_die_from_dwo): Likewise.
14147         (init_cutu_and_read_dies): Likewise.
14148         (init_cutu_and_read_dies_no_follow): Likewise.
14149         (process_psymtab_comp_unit_reader): Likewise.
14150         (partial_die_parent_scope): Likewise.
14151         (peek_die_abbrev): Likewise.
14152         (process_queue): Likewise.
14153         (dwarf2_physname): Likewise.
14154         (read_namespace_alias): Likewise.
14155         (read_import_statement): Likewise.
14156         (create_dwo_cu_reader): Likewise.
14157         (create_cus_hash_table): Likewise.
14158         (lookup_dwo_cutu): Likewise.
14159         (inherit_abstract_dies): Likewise.
14160         (read_func_scope): Likewise.
14161         (read_call_site_scope): Likewise.
14162         (dwarf2_add_member_fn): Likewise.
14163         (read_common_block): Likewise.
14164         (read_module_type): Likewise.
14165         (read_typedef): Likewise.
14166         (read_subrange_type): Likewise.
14167         (load_partial_dies): Likewise.
14168         (read_partial_die): Likewise.
14169         (find_partial_die): Likewise.
14170         (read_str_index): Likewise.
14171         (dwarf2_string_attr): Likewise.
14172         (build_error_marker_type): Likewise.
14173         (lookup_die_type): Likewise.
14174         (dump_die_shallow): Likewise.
14175         (follow_die_ref): Likewise.
14176         (dwarf2_fetch_die_loc_sect_off): Likewise.
14177         (dwarf2_fetch_constant_bytes): Likewise.
14178         (follow_die_sig): Likewise.
14179         (get_signatured_type): Likewise.
14180         (get_DW_AT_signature_type): Likewise.
14181         (dwarf2_find_containing_comp_unit): Likewise.
14182         (set_die_type): Likewise.
14183
14184 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14185
14186         * arch/aarch64.c: Include "common-defs.h".
14187         * arch/amd64.c: Likewise.
14188         * arch/i386.c: Likewise.
14189
14190 2018-02-21  Tom Tromey  <tom@tromey.com>
14191
14192         * value.h: (extract_field_op): Update.
14193         * eval.c (extract_field_op): Return a const char *.
14194         * expression.h (parse_expression_for_completion): Update.
14195         * completer.c (complete_expression): Update.
14196         (add_struct_fields): Make fieldname const.
14197         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14198         (mark_completion_tag, parse_exp_in_context_1): Update.
14199         (parse_expression_for_completion): Change "name" to
14200         unique_xmalloc_ptr*.
14201
14202 2018-02-21  Tom Tromey  <tom@tromey.com>
14203
14204         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14205
14206 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14207
14208         * avr-tdep.c (avr_read_pc): Change parameter type to
14209         readable_regcache.
14210         * gdbarch.sh (read_pc): Likewise.
14211         * gdbarch.c: Re-generated.
14212         * gdbarch.h: Re-generated.
14213         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14214         readable_regcache.
14215         * ia64-tdep.c (ia64_read_pc): Likewise.
14216         * mips-tdep.c (mips_read_pc): Likewise.
14217         * spu-tdep.c (spu_read_pc): Likewise.
14218
14219 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14220
14221         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14222         * regcache-dump.c: New file.
14223         * regcache.c: Move register_dump to regcache-dump.c.
14224         (maintenance_print_registers): Likewise.
14225         (maintenance_print_raw_registers): Likewise.
14226         (maintenance_print_cooked_registers): Likewise.
14227         (maintenance_print_register_groups): Likewise.
14228         (maintenance_print_remote_registers): Likewise.
14229         (_initialize_regcache): Likewise.
14230         * regcache.h (register_dump): Moved from regcache.c.
14231
14232 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14233
14234         * regcache.c (regcache::regcache): Update.
14235         (regcache::invalidate): Move it to detached_regcache::invalidate.
14236         (get_thread_arch_aspace_regcache): Update.
14237         (regcache::raw_update): Update.
14238         (regcache::cooked_read): Remove some code.
14239         (regcache::cooked_read_value): Likewise.
14240         (regcache::raw_write): Remove assert on m_readonly_p.
14241         (regcache::raw_supply_integer): Move it to
14242         detached_regcache::raw_supply_integer.
14243         (regcache::raw_supply_zeroed): Likewise.
14244         * regcache.h (detached_regcache) <raw_supply_integer>: New
14245         declaration.
14246         <raw_supply_zeroed, invalidate>: Likewise.
14247         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14248         <invalidate>: Likewise.
14249         <m_readonly_p>: Removed.
14250
14251 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14252
14253         * infcmd.c (get_return_value): Let stop_regs point to
14254         get_current_regcache.
14255         * regcache.c (regcache::regcache): Remove.
14256         (register_dump_reg_buffer): New class.
14257         (regcache_print): Adjust.
14258         * regcache.h (regcache): Remove constructors.
14259
14260 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14261
14262         * regcache.c (class register_dump): New class.
14263         (register_dump_regcache, register_dump_none): New class.
14264         (register_dump_remote, register_dump_groups): New class.
14265         (regcache_print): Update.
14266         * regcache.h (regcache_dump_what): Move it to regcache.c.
14267         (regcache) <dump>: Remove.
14268
14269 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14270
14271         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14272          reg_buffer_rw *.
14273         (jit_unwind_reg_set_impl): Call raw_supply.
14274         (jit_frame_sniffer): Use reg_buffer_rw.
14275         * record-full.c (record_full_core_regbuf): Change its type.
14276         (record_full_core_open_1): Use reg_buffer_rw.
14277         (record_full_close): Likewise.
14278         (record_full_core_fetch_registers): Use regcache->raw_supply.
14279         (record_full_core_store_registers): Likewise.
14280         * regcache.c (regcache::get_register_status): Move it to
14281         reg_buffer.
14282         (regcache_raw_set_cached_value): Remove.
14283         (regcache::raw_set_cached_value): Remove.
14284         (regcache::raw_write): Call raw_supply.
14285         (regcache::raw_supply): Move it to reg_buffer_rw.
14286         * regcache.h (regcache_raw_set_cached_value): Remove.
14287         (reg_buffer_rw): New class.
14288
14289 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14290
14291         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14292         readonly_detached_regcache.
14293         (dummy_frame_prev_register): Use regcache->cooked_read.
14294         * frame.c (frame_save_as_regcache): Change return type.
14295         (frame_pop): Update.
14296         * frame.h (frame_save_as_regcache): Update declaration.
14297         * inferior.h (get_infcall_suspend_state_regcache): Update
14298         declaration.
14299         * infrun.c (infcall_suspend_state) <registers>: use
14300         readonly_detached_regcache.
14301         (save_infcall_suspend_state): Don't use regcache_dup.
14302         (get_infcall_suspend_state_regcache): Change return type.
14303         * linux-fork.c (struct fork_info) <savedregs>: Change to
14304         readonly_detached_regcache.
14305         <pc>: New field.
14306         (fork_save_infrun_state): Don't use regcache_dup.
14307         (info_checkpoints_command): Adjust.
14308         * mi/mi-main.c (register_changed_p): Update declaration.
14309         (mi_cmd_data_list_changed_registers): Use
14310         readonly_detached_regcache.
14311         (register_changed_p): Change parameter type to
14312         readonly_detached_regcache.
14313         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14314         readonly_detached_regcache.
14315         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14316         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14317         New.
14318         (regcache::save): Move it to reg_buffer.
14319         (regcache::restore): Change parameter type.
14320         (regcache_dup): Remove.
14321         * regcache.h (reg_buffer) <save>: New method.
14322         (readonly_detached_regcache): New class.
14323         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14324         readonly_detached_regcache.
14325         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14326
14327 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14328
14329         * frame.c (frame_save_as_regcache): Use regcache method save.
14330         (frame_pop): Use regcache method restore.
14331         * infrun.c (restore_infcall_suspend_state): Likewise.
14332         * linux-fork.c (fork_load_infrun_state): Likewise.
14333         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14334         save.
14335         * regcache.c (regcache_save): Remove.
14336         (regcache::restore): More asserts.
14337         (regcache_cpy): Remove.
14338         * regcache.h (regcache_save): Remove the declaration.
14339         (regcache::restore): Move from private to public.
14340         Remove the friend declaration of regcache_cpy.
14341         (regcache_cpy): Remove declaration.
14342
14343 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14344
14345         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14346         parameter type to 'readable_regcache *'.
14347         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14348         * arm-tdep.c (arm_neon_quad_read): Likewise.
14349         (arm_pseudo_read): Likewise.
14350         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14351         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14352         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14353         * gdbarch.c: Re-generated.
14354         * gdbarch.h: Re-generated.
14355         * gdbarch.sh (pseudo_register_read): Change parameter type to
14356         'readable_regcache *'.
14357         (pseudo_register_read_value): Likewise.
14358         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14359         (h8300_pseudo_register_read): Likewise.
14360         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14361         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14362         (i386_pseudo_register_read_into_value): Likewise.
14363         (i386_pseudo_register_read_value): Likewise.
14364         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14365         declaration.
14366         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14367         * m32c-tdep.c (m32c_raw_read): Likewise.
14368         (m32c_read_flg): Likewise.
14369         (m32c_banked_register): Likewise.
14370         (m32c_banked_read): Likewise.
14371         (m32c_sb_read): Likewise.
14372         (m32c_part_read): Likewise.
14373         (m32c_cat_read): Likewise.
14374         (m32c_r3r2r1r0_read): Likewise.
14375         (m32c_pseudo_register_read): Likewise.
14376         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14377         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14378         (mep_pseudo_cr64_read): Likewise.
14379         (mep_pseudo_register_read): Likewise.
14380         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14381         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14382         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14383         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14384         (regcache::cooked_read): Likewise.
14385         (regcache::cooked_read_value): Likewise.
14386         (regcache_cooked_read_signed):
14387         (regcache::cooked_read): Likewise.
14388         * regcache.h (readable_regcache): New class.
14389         (regcache): Inherit readable_regcache.  Move some methods to
14390         readable_regcache.
14391         * rl78-tdep.c (rl78_pseudo_register_read): Change
14392         parameter type to 'readable_regcache *'.
14393         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14394         (e500_pseudo_register_read): Change parameter type to
14395         'readable_regcache *'.
14396         (dfp_pseudo_register_read): Likewise.
14397         (vsx_pseudo_register_read): Likewise.
14398         (efpr_pseudo_register_read): Likewise.
14399         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14400         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14401         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14402         (sh64_pseudo_register_read): Likewise.
14403         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14404         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14405         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14406         (spu_pseudo_register_read): Likewise.
14407         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14408         (xtensa_pseudo_register_read): Likewise.
14409
14410 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14411
14412         * regcache.c (regcache::regcache): Call reg_buffer ctor.
14413         (regcache::arch): Move it to reg_buffer::arch.
14414         (regcache::register_buffer): Likewise.
14415         (regcache::assert_regnum): Likewise.
14416         (regcache::num_raw_registers): Likewise.
14417         * regcache.h (reg_buffer): New class.
14418         (regcache): Inherit reg_buffer.
14419
14420 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
14421
14422         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14423         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14424
14425 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
14426
14427         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14428
14429 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
14430
14431         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14432         (SFILES): Remove common/*.c files.
14433         (COMMON_OBS): Remove some *.o files built from common/*.c files.
14434         * common/common.host: Add common reference.
14435         * configure.ac: Likewise.
14436         * configure: Regenerate.
14437
14438 2018-02-16  Yao Qi  <yao.qi@linaro.org>
14439
14440         * block.c (block_namespace_info): Inherit allocate_on_obstack.
14441         (block_initialize_namespace): Use new.
14442         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
14443         (dwarf2_free_objfile): Use delete.
14444         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
14445         (copy_type_recursive): Use new.
14446         * gdb_obstack.h (allocate_on_obstack): New.
14447
14448 2018-02-15  Yao Qi  <yao.qi@linaro.org>
14449
14450         PR gdb/22849
14451         * inferior.c (exit_inferior_1): Reset inf->control.
14452
14453 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
14454
14455         * ada-lang.c (ada_to_fixed_value_create): Delete advance
14456         declaration.
14457
14458 2018-02-14  Pedro Alves  <palves@redhat.com>
14459
14460         * frame-unwind.c (frame_unwind_try_unwinder): Always call
14461         frame_cleanup_after_sniffer on exception.
14462
14463 2018-02-14  Tom Tromey  <tom@tromey.com>
14464
14465         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
14466         const.
14467         (solib_bfd_open): Make pathname const.
14468         * solib.c (solib_bfd_open): Make pathname const.
14469         * solib-spu.c (spu_bfd_fopen): Make name const.
14470         (spu_bfd_open): Make pathname const.
14471         * solib-darwin.c (darwin_bfd_open): Make pathname const.
14472         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
14473
14474 2018-02-14  Tom Tromey  <tom@tromey.com>
14475
14476         * symfile.c (symfile_bfd_open): Update.
14477         * source.h (openp, source_full_path_of, find_and_open_source):
14478         Change argument type to unique_xmalloc_ptr.
14479         * source.c (openp): Take a unique_xmalloc_ptr.
14480         (source_full_path_of, find_and_open_source): Likewise.
14481         (open_source_file, symtab_to_fullname): Update.
14482         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
14483         unique_xmalloc_ptr.
14484         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
14485         (exec_file_find): Update.
14486         * psymtab.c (psymtab_to_fullname): Update.
14487         * nto-tdep.h (nto_find_and_open_solib): Update.
14488         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
14489         unique_xmalloc_ptr.
14490         * exec.c (exec_file_attach): Update.
14491         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
14492         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
14493
14494 2018-02-14  Tom Tromey  <tom@tromey.com>
14495
14496         * solib.c: Include source.h.
14497         * nto-tdep.c: Include source.h.
14498         * mi/mi-cmd-env.c: Include source.h.
14499         * infcmd.c: Include source.h.
14500         * exec.c: Include source.h.
14501         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
14502         (add_path, directory_switch, source_path, init_source_path): Move
14503         declarations...
14504         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
14505         (add_path, directory_switch, source_path, init_source_path):
14506         ...here.
14507
14508 2018-02-14  Tom Tromey  <tom@tromey.com>
14509
14510         * solist.h (exec_file_find, solib_find): Return
14511         unique_xmalloc_ptr.
14512         (solib_bfd_fopen): Take a const char *.
14513         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
14514         (exec_file_find, solib_find): Likewise.
14515         (solib_bfd_fopen): Do not take ownership of "pathname".
14516         (solib_bfd_open): Use unique_xmalloc_ptr.
14517         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
14518         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
14519         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
14520         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
14521
14522 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
14523
14524         * ada-lang.c (name_match_type_from_name): Remove reference to
14525         ada_name_for_lookup in function's documentation.
14526         * ada-lang.h (ada_name_for_lookup): Delete declaration.
14527
14528 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14529
14530         * defs.h (enum openp_flags): New enum.
14531         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
14532         Move to enum openp_flags.
14533         (openp_flags): New enum flags.
14534         (openp): Change parameter type to openp_flags.
14535         * source.c (openp): Change parameter type to openp_flags.
14536         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
14537         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
14538
14539 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14540
14541         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
14542         per-command.
14543
14544 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14545
14546         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
14547         into...
14548         (class dwarf2_queue_guard): ...the destructor of this new class.
14549         (dw2_do_instantiate_symtab): Create instance of the new class
14550         dwarf2_queue_guard, remove cleanup.
14551
14552 2018-02-09  Tom Tromey  <tom@tromey.com>
14553
14554         * source.c (find_source_lines): Don't reference past the end of
14555         the vector.
14556
14557 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14558
14559         * remote.c (remote_btrace_maybe_reopen): Change error message.
14560         * btrace.c (btrace_enable): Likewise.
14561         (parse_xml_btrace): Likewise.
14562         (parse_xml_btrace_conf): Likewise.
14563
14564 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14565
14566         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
14567         (linux_enable_pt, linux_enable_bts): Call
14568         diagnose_perf_event_open_fail.
14569
14570 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14571
14572         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
14573         Remove parameter and change return type.  Update callers.  Move it.
14574         (linux_enable_bts, linux_enable_pt): Improve error message.
14575         (linux_enable_pt): Remove zero buffer size check.
14576         (linux_enable_btrace): Improve error messages.  Remove NULL return
14577         check.
14578
14579 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14580
14581         * btrace.c (btrace_enable): Remove target_supports_btrace call.
14582         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
14583         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
14584         (linux_supports_pt, linux_supports_btrace): Remove.
14585         (linux_enable_bts): Call cpu_supports_bts.
14586         * nat/linux-btrace.h (linux_supports_btrace): Remove.
14587         * remote.c (remote_supports_btrace): Remove.
14588         (init_remote_ops): Remove remote_supports_btrace.
14589         * target-delegates.c: Regenerated.
14590         * target.c (target_supports_btrace): Remove.
14591         * target.h (target_ops) <to_supports_btrace>: Remove
14592         (target_supports_btrace): Remove.
14593         * x86-linux-nat.c (x86_linux_create_target): Remove
14594         linux_supports_btrace.
14595
14596 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14597
14598         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
14599         btrace failed.
14600         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
14601         exception and use message in own exception.
14602
14603 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14604
14605         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
14606         (perf_event_pt_event_type): Use gdb_file_up.
14607         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
14608         scoped_fd, and scoped_mmap.
14609
14610 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14611
14612         * common/scoped_mmap.h: New.
14613         * unittests/scoped_mmap-selftest.c: New.
14614         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14615         unittests/scoped_mmap-selftest.c.
14616
14617 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14618
14619         * common/scoped_fd.h: New.
14620         * unittests/scoped_fd-selftest.c: New.
14621         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14622         unittests/scoped_fd-selftest.c.
14623
14624 2018-02-09  Tom Tromey  <tom@tromey.com>
14625
14626         * auto-load.c (auto_load_section_scripts): Use
14627         gdb::unique_xmalloc_ptr.
14628
14629 2018-02-09  Tom Tromey  <tom@tromey.com>
14630
14631         * auto-load.c (execute_script_contents): Use std::string.
14632
14633 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
14634
14635         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
14636         Python function, rather than a new command.
14637
14638 2018-02-08  Tom Tromey  <tom@tromey.com>
14639
14640         * solib.c (solib_find_1): Use std::string.
14641         (solib_bfd_fopen): Use unique_xmalloc_ptr.
14642
14643 2018-02-08  Tom Tromey  <tom@tromey.com>
14644
14645         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
14646
14647 2018-02-08  Tom Tromey  <tom@tromey.com>
14648
14649         * source.c (find_source_lines): Use gdb::def_vector.
14650
14651 2018-02-08  Tom Tromey  <tom@tromey.com>
14652
14653         * macrocmd.c (struct temporary_macro_definition): New.
14654         (macro_define_command): Use temporary_macro_definition.  Remove
14655         cleanups.
14656         (free_macro_definition_ptr): Remove.
14657
14658 2018-02-08  Tom Tromey  <tom@tromey.com>
14659
14660         * macroexp.c (maybe_expand): Use std::string.
14661
14662 2018-02-08  Tom Tromey  <tom@tromey.com>
14663
14664         * macroexp.c (struct macro_buffer): Add initializers for some
14665         members.
14666         (init_buffer, init_shared_buffer, free_buffer)
14667         (free_buffer_return_text): Remove.
14668         (macro_buffer): New constructors.
14669         (~macro_buffer): New destructor.
14670         (macro_buffer::set_shared): New method.
14671         (macro_buffer::resize_buffer, macro_buffer::appendc)
14672         (macro_buffer::appendmem): Now methods, not free functions.
14673         (set_token, append_tokens_without_splicing, stringify)
14674         (macro_stringify): Update.
14675         (gather_arguments): Change return type.  Remove argc_p argument,
14676         add args_ptr argument.  Use std::vector.
14677         (substitute_args): Remove argc argument.  Accept std::vector.
14678         (expand): Update.  Use std::vector.
14679         (scan, macro_expand, macro_expand_next): Update.
14680
14681 2018-02-08  Tom Tromey  <tom@tromey.com>
14682
14683         * symtab.c (default_collect_symbol_completion_matches_break_on):
14684         Use unique_xmalloc_ptr.
14685         * macroscope.h: (sal_macro_scope, user_macro_scope)
14686         (default_macro_scope): Return unique_xmalloc_ptr.
14687         * macroscope.c (sal_macro_scope, user_macro_scope)
14688         (default_macro_scope): Return unique_xmalloc_ptr.
14689         * macroexp.h (macro_expand, macro_expand_once): Return
14690         unique_xmalloc_ptr.
14691         * macroexp.c (macro_expand, macro_expand_once): Return
14692         unique_xmalloc_ptr.
14693         * macrocmd.c (macro_expand_command, macro_expand_once_command)
14694         (info_macro_command, info_macros_command): Use
14695         unique_xmalloc_ptr.
14696         * compile/compile-c-support.c (write_macro_definitions): Use
14697         unique_xmalloc_ptr.
14698         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
14699
14700 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
14701
14702         * value.c (value_static_field): Assign field type instead of
14703         containing type when returning an optimized out value.
14704
14705 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14706
14707         * ft32-tdep.c (ft32_read_pc): Remove.
14708         (ft32_write_pc): Remove.
14709         (ft32_gdbarch_init): Update.
14710         * m32r-tdep.c (m32r_read_pc): Remove.
14711         (m32r_gdbarch_init): Update.
14712         * mep-tdep.c (mep_read_pc): Remove.
14713         (mep_gdbarch_init): Update.
14714         * microblaze-tdep.c (microblaze_write_pc): Remove.
14715         (microblaze_gdbarch_init): Update.
14716         * mn10300-tdep.c (mn10300_read_pc): Remove.
14717         (mn10300_write_pc): Remove.
14718         (mn10300_gdbarch_init): Update.
14719         * moxie-tdep.c (moxie_read_pc): Remove.
14720         (moxie_write_pc): Remove.
14721         (moxie_gdbarch_init): Update.
14722
14723 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14724
14725         * expprint.c (print_subexp_standard): Handle
14726         OP_F77_UNDETERMINED_ARGLIST.
14727         (dump_subexp_body_standard): Likewise.
14728
14729 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
14730
14731         * target-descriptions.c (tdesc_element_visitor) Add empty
14732         implementations.
14733         (tdesc_type): Move make_gdb_type from here.
14734         (tdesc_type_builtin): Likewise.
14735         (tdesc_type_vector): Likewise.
14736         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14737         (make_gdb_type_struct): Move from tdesc_type_with_fields.
14738         (make_gdb_type_union): Likewise.
14739         (make_gdb_type_flags): Likewise.
14740         (make_gdb_type_enum): Likewise.
14741         (make_gdb_type): New function.
14742         (tdesc_register_type): Use static make_gdb_type.
14743
14744 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
14745
14746         * infcmd.c (default_print_one_register_info): Align natural-format
14747         column values consistently one under another.
14748         (pad_to_column): New function.
14749
14750 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
14751
14752         * dwarf2read.c (dwarf2_physname): Move commment.
14753
14754 2018-02-01  Leszek Swirski  <leszeks@google.com>
14755
14756         * varobj.c (varobj_formatted_print_options): Allow recursive
14757         pretty printing if pretty printing is enabled.
14758
14759 2018-02-01  Leszek Swirski  <leszeks@google.com>
14760
14761         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14762         names after a structop as a filename.
14763
14764 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14765
14766         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14767         (arm_record_coproc_data_proc): Likewise.
14768
14769 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14770
14771         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14772
14773 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
14774
14775         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14776         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14777
14778 2018-01-31  Pedro Alves  <palves@redhat.com>
14779
14780         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14781         * inflow.c (child_terminal_save_inferior): Wrap reference to
14782         tcgetpgrp in HAVE_TERMIOS_H.
14783         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14784         _WIN32.
14785         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14786         always iterate over all inferiors.
14787         (gdbsim_cntrl_c): Adjust.
14788         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14789
14790 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14791
14792         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14793         index type is objfile-owned if the element type is as well.
14794
14795 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14796
14797         GDB 8.1 released.
14798
14799 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14800
14801         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14802         "features/s390x-linux64.c".
14803         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14804         s390_linux32 and s390x_linux64.
14805         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14806         default tdesc.
14807         * s390-tdep.c: Include "features/s390-linux32.c" and
14808         "features/s390x-linux64.c".
14809         (s390_tdesc_valid): Add check for tdesc_has_registers.
14810         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14811         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14812         tdesc_s390x_linux64.
14813         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14814         tdesc_s390x_linux64 to...
14815         * s390-tdep.h: ...here.
14816
14817 2018-01-30  Pedro Alves  <palves@redhat.com>
14818
14819         PR gdb/13211
14820         * config.in, configure: Regenerate.
14821         * configure.ac: Check for getpgid.
14822         * go32-nat.c (go32_pass_ctrlc): New.
14823         (go32_target): Install it.
14824         * inf-child.c (inf_child_target): Install
14825         child_terminal_save_inferior, child_pass_ctrlc and
14826         child_interrupt.
14827         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14828         (inf_ptrace_target): No longer install it.
14829         * infcmd.c (interrupt_target_1): Adjust.
14830         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14831         (child_interrupt): Declare.
14832         (inferior::terminal_state): New.
14833         * inflow.c (struct terminal_info): Update comments.
14834         (inferior_process_group): Delete.
14835         (terminal_is_ours): Delete.
14836         (gdb_tty_state): New.
14837         (child_terminal_init): Adjust.
14838         (is_gdb_terminal, sharing_input_terminal_1)
14839         (sharing_input_terminal): New functions.
14840         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14841         Set the process's actual process group in the foreground if
14842         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14843         mark terminal as the inferior's if not sharing GDB's terminal.
14844         Don't check attach_flag.
14845         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14846         pass down a target_terminal_state.
14847         (child_terminal_save_inferior): New, factored out from ...
14848         (child_terminal_ours_1): ... this.  Handle
14849         target_terminal_state::is_ours_for_output.
14850         (child_interrupt, child_pass_ctrlc): New.
14851         (inflow_inferior_exit): Clear the inferior's terminal_state.
14852         (copy_terminal_info): Copy the inferior's terminal state.
14853         (_initialize_inflow): Remove reference to terminal_is_ours.
14854         * inflow.h (inferior_process_group): Delete.
14855         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14856         * procfs.c (procfs_target): Don't install procfs_interrupt.
14857         (procfs_interrupt): Delete.
14858         * remote.c (remote_serial_quit_handler): Adjust.
14859         (remote_interrupt): Remove ptid parameter.  Adjust.
14860         * target-delegates.c: Regenerate.
14861         * target.c: Include "terminal.h".
14862         (target_terminal::terminal_state): Rename to ...
14863         (target_terminal::m_terminal_state): ... this.
14864         (target_terminal::init): Adjust.
14865         (target_terminal::inferior): Adjust to per-inferior
14866         terminal_state.
14867         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14868         (target_terminal::ours, target_terminal::ours_for_output): Use
14869         target_terminal_is_ours_kind.
14870         (target_interrupt): Remove ptid parameter.  Adjust.
14871         (default_target_pass_ctrlc): Adjust.
14872         * target.h (target_ops::to_terminal_save_inferior): New field.
14873         (target_ops::to_interrupt): Remove ptid_t parameter.
14874         (target_interrupt): Remove ptid_t parameter.  Update comment.
14875         (target_pass_ctrlc): Update comment.
14876         * target/target.h (target_terminal_state): New scoped enum,
14877         factored out of ...
14878         (target_terminal::terminal_state): ... here.
14879         (target_terminal::inferior): Update comments.
14880         (target_terminal::restore_inferior): New.
14881         (target_terminal::is_inferior, target_terminal::is_ours)
14882         (target_terminal::is_ours_for_output): Adjust.
14883         (target_terminal::scoped_restore_terminal_state): Adjust to
14884         rename, and call restore_inferior() instead of inferior().
14885         (target_terminal::scoped_restore_terminal_state::m_state): Change
14886         type.
14887         (target_terminal::terminal_state): Rename to ...
14888         (target_terminal::m_terminal_state): ... this and change type.
14889
14890 2018-01-30  Pedro Alves  <palves@redhat.com>
14891
14892         * linux-nat.c (wait_for_signal): New function.
14893         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14894         directly.
14895         (async_terminal_is_ours)
14896         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14897         (linux_nat_add_target): Don't override
14898         to_terminal_inferior/to_terminal_ours.
14899
14900 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14901
14902         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14903
14904 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14905
14906         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14907         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14908         dwarf2_per_objfile_free here.
14909         (dwarf2_per_objfile_free): Remove.
14910         (_initialize_dwarf2_read): Don't register
14911         dwarf2_per_objfile_free as a registry cleanup.
14912
14913 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14914
14915         Avoid compilation errors in MinGW native builds
14916
14917         The error is triggered by including python-internal.h, and the
14918         error message is:
14919
14920              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14921                       from build-gnulib/import/math.h:27,
14922                       from d:/usr/Python26/include/pyport.h:235,
14923                       from d:/usr/Python26/include/Python.h:58,
14924                       from python/python-internal.h:94,
14925                       from python/py-arch.c:24:
14926              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14927         using ::hypot;
14928                 ^~~~~
14929
14930         This happens because Python headers define 'hypot' to expand t
14931         '_hypot' in the Windows builds.
14932         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14933         'hypoth'.  This avoids a compilation error.
14934
14935 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14936
14937         * MAINTAINERS (Write After Approval): Fix ordering.
14938
14939 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14940
14941         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14942
14943 2018-01-26  Alan Modra  <amodra@gmail.com>
14944
14945         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14946         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14947         Remove nop.  Make const.  Comment.
14948         (powerpc32_plt_stub_so_2): New.
14949         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14950         Correct count.  Update uses.
14951         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14952         Move common code reading PLT entry word.  Correct
14953         powerpc32_plt_stub PLT address calculation.
14954         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14955         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14956         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14957         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14958         (ppc64_standard_linkage8): Likewise.
14959         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14960         Correct insns description.
14961         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14962
14963 2018-01-24  Pedro Alves  <palves@redhat.com>
14964
14965         GCC PR libstdc++/83906
14966         * gdbtypes.c (operator==(const dynamic_prop &,
14967         const dynamic_prop &)): New.
14968         (operator==(const range_bounds &, const range_bounds &)): New.
14969         (check_types_equal): Use them instead of memcmp.
14970         * gdbtypes.h (operator==(const dynamic_prop &,
14971         const dynamic_prop &)): Declare.
14972         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14973         (operator==(const range_bounds &, const range_bounds &)): Declare.
14974         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14975
14976 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14977
14978         * s390-linux-tdep.c (s390_record_address_mask)
14979         (s390_record_calc_disp_common, s390_record_calc_disp)
14980         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14981         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14982         (s390_process_record): Move to s390-tdep.c.
14983         (s390_linux_init_abi_any): Adjust.
14984         * s390-tdep.c (s390_record_address_mask)
14985         (s390_record_calc_disp_common, s390_record_calc_disp)
14986         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14987         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14988         (s390_process_record): Moved from s390-linux-tdep.c
14989         (s390_gdbarch_init): Adjust.
14990
14991 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14992
14993         * s390-linux-nat.c (s390-tdep.h): New include.
14994         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14995         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14996         (ALLDEPFILES): Add s390-tdep.c.
14997         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14998         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14999         * s390-tdep.h: ...this.  New file.
15000         * s390-linux-tdep.c (s390-tdep.h): New include.
15001         (_initialize_s390_tdep): Rename to...
15002         (_initialize_s390_linux_tdep): ...this and adjust.
15003         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15004         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15005         s390-tdep.h.
15006         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15007         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15008         (s390_is_partial_instruction, s390_software_single_step)
15009         (is_non_branch_ril, s390_displaced_step_copy_insn)
15010         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15011         (s390_prologue_data, s390_addr, s390_store, s390_load)
15012         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15013         (s390_register_call_saved, s390_guess_tracepoint_registers)
15014         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15015         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15016         (s390_pseudo_register_name, s390_pseudo_register_type)
15017         (s390_pseudo_register_read, s390_pseudo_register_write)
15018         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15019         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15020         (s390_addr_bits_remove, s390_address_class_type_flags)
15021         (s390_address_class_type_flags_to_name)
15022         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15023         (s390_function_arg_float, s390_function_arg_vector)
15024         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15025         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15026         (s390_frame_align, s390_register_return_value, s390_return_value)
15027         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15028         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15029         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15030         (s390_trad_frame_prev_register, s390_unwind_cache)
15031         (s390_prologue_frame_unwind_cache)
15032         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15033         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15034         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15035         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15036         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15037         (s390_frame_base_address, s390_local_base_address)
15038         (s390_frame_base, s390_gcc_target_options)
15039         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15040         (s390_validate_reg_range, s390_tdesc_valid)
15041         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15042         * s390-tdep.c: ...this.  New file.
15043
15044 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15045
15046         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15047         (s390_process_record, s390_gdbarch_tdep_alloc)
15048         (s390_linux_init_abi_any): Use/set new hook.
15049
15050 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15051
15052         * s390-linux-tdep.c (osabi.h): New include.
15053         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15054         (s390_linux_init_abi_any): New functions.
15055         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15056
15057 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15058
15059         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15060         tdesc_has_registers check
15061
15062 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15063
15064         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15065         (s390_validate_reg_range): New macro.
15066         (s390_gdbarch_init): Adjust.
15067
15068 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15069
15070         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15071         (s390_gdbarch_tdep_alloc): Adjust.
15072         (s390_gdbarch_init): Adjust.
15073
15074 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15075
15076         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15077         <have_tdb>: Change type to bool.
15078         (s390_gdbarch_tdep_alloc): Adjust.
15079         (s390_gdbarch_init): Adjust.
15080
15081 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15082
15083         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15084         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15085         (s390_gdbarch_tdep_alloc): New function.
15086         (s390_gdbarch_init): Allocate tdep at start and use its fields
15087         instead of separate variables.
15088
15089 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15090
15091         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15092         when looking for cached gdbarch and add comment for remaining.
15093
15094 2018-01-22  Pedro Alves  <palves@redhat.com>
15095             Sergio Durigan Junior  <sergiodj@redhat.com>
15096
15097         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15098         case.
15099
15100 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15101
15102         * MAINTAINERS: Update my company e-mail address.
15103
15104 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15105
15106         * regcache.c (cooked_write_test): New function.
15107         (_initialize_regcache): Register the test.
15108
15109 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15110
15111         * ia64-tdep.c (ia64_pseudo_register_read): Call
15112         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15113         * m32c-tdep.c (m32c_cat_read): Likewise.
15114         (m32c_r3r2r1r0_read): Likewise.
15115         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15116         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15117
15118 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15119
15120         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15121         method raw_read instead of regcache_raw_read.
15122         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15123         * arm-tdep.c (arm_neon_quad_read): Likewise.
15124         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15125         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15126         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15127         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15128         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15129         (i386_pseudo_register_read_into_value): Likewise.
15130         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15131         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15132         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15133         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15134         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15135         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15136         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15137         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15138         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15139
15140 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15141
15142         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15143         * configure.tgt: Remove target mt.
15144         * mt-tdep.c: Remove.
15145         * regcache.c (cooked_read_test): Remove the check for mt.
15146
15147 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15148
15149         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15150         instead of gdbarch_pseudo_register_read_value.
15151
15152 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15153
15154         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15155         language is Ada.
15156
15157 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15158
15159         * linespec.c (create_sals_line_offset): Remove code that preserved
15160         the symtab_and_line's line number.
15161
15162 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15163
15164         * varobj.c (varobj_create): Don't set valid_block when creating a
15165         floating varobj.
15166
15167 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15168
15169         * varobj.c (varobj_create): Remove out of date comment.
15170
15171 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15172
15173         PR mi/20395
15174         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15175         updating innermost block.
15176         * parse.c (innermost_block_tracker::update): Take extra type
15177         parameter, and check types match before updating innermost block.
15178         (write_dollar_variable): Update innermost block for registers.
15179         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15180         (innermost_block_tracker::innermost_block_tracker): Initialise
15181         m_types member.
15182         (innermost_block_tracker::reset): Take type parameter.
15183         (innermost_block_tracker::update): Take type parameter, and pass
15184         type through as needed.
15185         (innermost_block_tracker::m_types): New member.
15186         * varobj.c (varobj_create): Pass type when reseting innermost
15187         block.
15188
15189 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15190
15191         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15192         * ada-lang.c (resolve_subexp): Likewise.
15193         * breakpoint.c (set_breakpoint_condition) Likewise.
15194         (watch_command_1) Likewise.
15195         * c-exp.y (variable): Likewise.
15196         * d-exp.y (PrimaryExpression): Likewise.
15197         * f-exp.y (variable): Likewise.
15198         * go-exp.y (variable): Likewise.
15199         * m2-exp.y (variable): Likewise.
15200         * objfiles.c (objfile::~objfile): Likewise.
15201         * p-exp.y (variable): Likewise.
15202         * parse.c (innermost_block): Change type.
15203         * parser-defs.h (class innermost_block_tracker): New.
15204         (innermost_block): Change to innermost_block_tracker.
15205         * printcmd.c (display_command): Switch to innermost_block API.
15206         (do_one_display): Likewise.
15207         * rust-exp.y (do_one_display): Likewise.
15208         * symfile.c (clear_symtab_users): Likewise.
15209         * varobj.c (varobj_create): Switch to innermost_block API, replace
15210         use of innermost_block with block stored on varobj object.
15211
15212 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15213
15214         * expression.h (innermost_block): Remove declaration.
15215         * varobj.c: Add 'parser-defs.h' include.
15216
15217 2018-01-19  Tom Tromey  <tom@tromey.com>
15218
15219         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15220         symbols in the static and global blocks.
15221
15222 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15223
15224         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15225         gdb_ptrace.h, and move including gdb_wait.h ...
15226         * nat/linux-ptrace.h: ... to here.
15227
15228 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15229
15230         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15231         inf_ptrace_detach_success.
15232         (inf_ptrace_detach_success): Add inferior parameter, use it
15233         instead of inferior_ptid, pass it to detach_inferior.
15234         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15235         parameter.
15236         * inferior.c (detach_inferior): Add overload that takes an
15237         inferior object.
15238         * inferior.h (detach_inferior): Likewise.
15239         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15240         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15241         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15242
15243 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15244
15245         * target.h (struct target_ops) <to_detach>: Add inferior
15246         parameter.
15247         (target_detach): Likewise.
15248         * target.c (dispose_inferior): Pass inferior down.
15249         (target_detach): Pass inferior down.  Assert that it is equal to
15250         the current inferior.
15251         * aix-thread.c (aix_thread_detach): Pass inferior down.
15252         * corefile.c (core_file_command): Pass current_inferior() down.
15253         * corelow.c (core_detach): Add inferior parameter.
15254         * darwin-nat.c (darwin_detach): Likewise.
15255         * gnu-nat.c (gnu_detach): Likewise.
15256         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15257         * infcmd.c (detach_command): Pass current_inferior() down to
15258         target_detach.
15259         * infrun.c (follow_fork_inferior): Pass parent_inf to
15260         target_detach.
15261         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15262         target_detach.
15263         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15264         * linux-thread-db.c (thread_db_detach): Likewise.
15265         * nto-procfs.c (procfs_detach): Likewise.
15266         * procfs.c (procfs_detach): Likewise.
15267         * record.c (record_detach): Likewise.
15268         * record.h (struct inferior): Forward-declare.
15269         (record_detach): Add inferior parameter.
15270         * remote-sim.c (gdbsim_detach): Likewise.
15271         * remote.c (remote_detach_1): Likewise.
15272         (remote_detach): Likewise.
15273         (extended_remote_detach): Likewise.
15274         * sol-thread.c (sol_thread_detach): Likewise.
15275         * target-debug.h (target_debug_print_inferior_p): New macro.
15276         * target-delegates.c: Re-generate.
15277         * top.c (kill_or_detach): Pass inferior down to target_detach.
15278         * windows-nat.c (windows_detach): Add inferior parameter.
15279
15280 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15281
15282         * target.h (struct target_ops) <to_detach>: Remove args
15283         parameter.
15284         (target_detach): Likewise.
15285         * target.c (dispose_inferior): Adjust.
15286         (target_detach): Remove args parameter, adjust.
15287         * aix-thread.c (aix_thread_detach): Adjust.
15288         * corefile.c (core_file_command): Adjust.
15289         * corelow.c (core_detach): Adjust.
15290         * darwin-nat.c (darwin_detach): Adjust.
15291         * gnu-nat.c (gnu_detach): Adjust.
15292         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15293         * infcmd.c (detach_command): Adjust
15294         * infrun.c (follow_fork_inferior): Adjust.
15295         (handle_vfork_child_exec_or_exit): Adjust.
15296         * linux-fork.c (linux_fork_detach): Remove args parameter.
15297         * linux-fork.h (linux_fork_detach): Likewise.
15298         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15299         * linux-thread-db.c (thread_db_detach): Likewise.
15300         * nto-procfs.c (procfs_detach): Likewise.
15301         * procfs.c (procfs_detach): Likewise.
15302         (do_detach): Remove signo parameter.
15303         * record.c (record_detach): Remove args parameter.
15304         * record.h (record_detach): Likewise.
15305         * remote-sim.c (gdbsim_detach): Likewise.
15306         * remote.c (remote_detach_1): Likewise.
15307         (remote_detach): Likewise.
15308         (extended_remote_detach): Likewise.
15309         * sol-thread.c (sol_thread_detach): Likewise.
15310         * target-delegates.c: Re-generate.
15311         * top.c (struct qt_args) <args>: Remove field.
15312         (kill_or_detach): Don't pass args.
15313         (quit_force): Don't set args.
15314         * windows-nat.c (windows_detach): Remove args parameter.
15315
15316 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15317
15318         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15319         (arm_linux_init_abi): Install it.
15320
15321 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15322
15323         * osabi.c (gdb_osabi_names): Extend the regexp for
15324         arm-linux-gnueabihf.
15325
15326 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15327
15328         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15329         m_abbrevs.
15330         (abbrev_table::add_abbrev): Update.
15331         (abbrev_table::lookup_abbrev): Update.
15332
15333 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15334
15335         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15336
15337 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15338
15339         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15340         to "std::string".
15341
15342 2018-01-17  Tom Tromey  <tom@tromey.com>
15343
15344         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15345
15346 2018-01-17  Tom Tromey  <tom@tromey.com>
15347
15348         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15349         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15350         (create_array_type_with_stride): Update.
15351         * dwarf2read.c (set_die_type): Update.
15352
15353 2018-01-17  Tom Tromey  <tom@tromey.com>
15354
15355         * dwarf2read.c (delayed_method_info): Remove typedef.
15356         (dwarf2_cu::method_info): Now a std::vector.
15357         (add_to_method_list): Update.
15358         (free_delayed_list): Remove.
15359         (compute_delayed_physnames): Update.
15360         (process_full_comp_unit, process_full_type_unit): Clear the method
15361         list.  Remove cleanups.
15362         (psymtab_include_file_name): Add name_holder parameter.  Use
15363         unique_xmalloc_ptr.
15364         (dwarf_decode_lines): Update.
15365
15366 2018-01-17  Tom Tromey  <tom@tromey.com>
15367             Simon Marchi  <simon.marchi@ericsson.com>
15368
15369         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15370         (dwarf2_per_objfile::free_cached_comp_units)
15371         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15372         (init_cutu_and_read_dies_no_follow): Update.
15373         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15374         (dwarf2_cu::~dwarf2_cu): New.
15375         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15376         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15377
15378 2018-01-17  Tom Tromey  <tom@tromey.com>
15379             Simon Marchi  <simon.marchi@ericsson.com>
15380
15381         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15382         (struct die_reader_specs) <abbrev_table>: New member.
15383         (struct abbrev_table): Add constructor.
15384         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15385         <abbrev_obstack>: Now an auto_obstack.
15386         (abbrev_table_up): New typedef.
15387         (init_cu_die_reader): Add abbrev_table parameter.
15388         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15389         Add result_dwo_abbrev_table.
15390         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15391         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15392         Update.
15393         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15394         parameter.
15395         (skip_children): Update.
15396         (abbrev_table::alloc_abbrev): Rename from
15397         abbrev_table_alloc_abbrev.
15398         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15399         (abbrev_table::lookup_abbrev): Rename from
15400         abbrev_table_lookup_abbrev.
15401         (abbrev_table_read_table): Return abbrev_table_up.
15402         (abbrev_table_free, abbrev_table_free_cleanup)
15403         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15404         (load_partial_dies): Update.
15405
15406 2018-01-17  Tom Tromey  <tom@tromey.com>
15407
15408         * dwarf2read.c (dwarf2_compute_name): Update comment.
15409         (read_func_scope, read_variable): Update.
15410         (new_symbol): Remove.
15411         (new_symbol_full): Rename to new_symbol.
15412
15413 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
15414
15415         PR gdb/16577
15416         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15417         a warning instead of throwing an error, set section size to 0 and return
15418         NULL.
15419         * gdb_bfd.h (gdb_bfd_map_section): Update description.
15420
15421 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15422
15423         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15424         std::string.
15425         (linux_ptrace_attach_fail_reason_string): Likewise.
15426         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15427         Likewise.
15428         (linux_ptrace_attach_fail_reason_string): Likewise.
15429         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15430
15431 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15432
15433         * linux-nat.c (linux_nat_attach): Remove xstrdup.
15434
15435 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
15436
15437         PR gdb/21559
15438         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15439         checking for fs_base/gs_base fields in struct user_regs_struct.
15440         * configure: Regenerate.
15441
15442 2018-01-17  Yao Qi  <yao.qi@linaro.org>
15443
15444         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
15445         function.
15446         (aarch64_linux_init_abi): Install it to gdbarch hook
15447         gcc_target_options.
15448
15449 2018-01-15  Pedro Alves  <palves@redhat.com>
15450
15451         * common/signals-state-save-restore.c
15452         (save_original_signals_state): Fix typos.
15453
15454 2017-01-12  Tom Tromey  <tom@tromey.com>
15455             Sergio Durigan Junior  <sergiodj@redhat.com>
15456
15457         * Makefile.in (install-only): Install gdb-add-index.
15458
15459 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
15460
15461         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
15462
15463 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15464
15465         * infrun.c (keep_going_pass_signal): Clear step-over info when
15466         insert_breakpoints fails.
15467
15468 2018-01-11  Pedro Alves  <palves@redhat.com>
15469
15470         PR gdb/22583
15471         * infrun.c (resume): Rename to ...
15472         (resume_1): ... this.
15473         (resume): Reimplement as wrapper around resume_1.
15474
15475 2018-01-11  Pedro Alves  <palves@redhat.com>
15476
15477         PR remote/22597
15478         * remote.c (remote_parse_stop_reply): Default to the last-set
15479         general thread instead of to 'magic_null_ptid'.
15480
15481 2018-01-10  Pedro Alves  <palves@redhat.com>
15482
15483         * language.h (language_get_symbol_name_matcher): Rename ...
15484         (get_symbol_name_matcher): ... this.
15485         * language.c (language_get_symbol_name_matcher): Ditto.
15486         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
15487         callers adjusted.
15488
15489 2018-01-10  Pedro Alves  <palves@redhat.com>
15490
15491         PR gdb/22670
15492         * dwarf2read.c
15493         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
15494         Adjust to use language_get_symbol_name_matcher instead of
15495         language_defn::la_get_symbol_name_matcher.
15496         * language.c (language_get_symbol_name_matcher): If in Ada mode
15497         and the lookup name is a verbatim match, return Ada's matcher.
15498         * language.h (language_get_symbol_name_matcher): Adjust comment.
15499         (ada_lookup_name_info::verbatim_p):: New method.
15500
15501 2018-01-10  Pedro Alves  <palves@redhat.com>
15502
15503         PR gdb/22670
15504         * ada-lang.c (ada_collect_symbol_completion_matches): If the
15505         minsym's language is language_auto or language_cplus, pass down
15506         language_ada instead.
15507         * symtab.c (compare_symbol_name): Don't frob symbol language here.
15508
15509 2018-01-10  Pedro Alves  <palves@redhat.com>
15510
15511         PR gdb/22670
15512         * minsyms.c (linkage_name_str): New function.
15513         (iterate_over_minimal_symbols): Use it.
15514
15515 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15516
15517         * NEWS: Document that 'info proc' now works on FreeBSD.
15518
15519 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15520
15521         * configure.ac: Check for kinfo_getfile in libutil.
15522         * configure: Regenerate.
15523         * config.in: Regenerate.
15524         * fbsd-nat.c: Include "fbsd-tdep.h".
15525         (fbsd_fetch_cmdline): New.
15526         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
15527         rather than calling error.
15528         (fbsd_info_proc): New.
15529         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
15530         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
15531         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
15532
15533 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15534
15535         * fbsd-nat.c (struct free_deleter): Remove.
15536         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
15537
15538 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15539
15540         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
15541         NULL for an empty pathname.
15542
15543 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15544
15545         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
15546         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
15547         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
15548         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
15549         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
15550         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
15551         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
15552         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
15553         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
15554         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
15555         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
15556         (fbsd_core_fetch_timeval, fbsd_print_sigset)
15557         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
15558         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
15559         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
15560
15561 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
15562
15563         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
15564         (gnu_xfer_auxv): New function.
15565         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
15566         TARGET_OBJECT_AUXV.
15567
15568 2018-01-08  Yao Qi  <yao.qi@linaro.org>
15569             Simon Marchi  <simon.marchi@ericsson.com>
15570
15571         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
15572         common/selftest.c.
15573         (COMMON_OBS): Remove selftest.o.
15574         * configure.ac: Append selftest-arch.c and common/selftest.c to
15575         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
15576         * configure: Re-generated.
15577         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
15578         GDB_SELF_TEST.
15579         (maintenance_info_selftests): Likewise.
15580
15581 2018-01-08  Xavier Roirand  <roirand@adacore.com>
15582
15583         * ada-valprint.c (val_print_packed_array_elements): Use
15584         proper number of elements when printing an array indexed
15585         by an enumeration type.
15586
15587 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15588
15589         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
15590         (dw2_get_file_names_reader): Adjust.
15591         (lookup_dwo_signatured_type): Adjust.
15592         (lookup_dwp_signatured_type): Adjust.
15593         (lookup_signatured_type): Adjust.
15594         (create_type_unit_group): Adjust.
15595         (get_type_unit_group): Adjust.
15596         (process_psymtab_comp_unit_reader): Adjust.
15597         (build_type_psymtabs_reader): Adjust.
15598         (scan_partial_symbols): Adjust.
15599         (add_partial_symbol): Adjust.
15600         (add_partial_subprogram): Adjust.
15601         (peek_die_abbrev): Adjust.
15602         (fixup_go_packaging): Adjust.
15603         (process_imported_unit_die): Adjust.
15604         (dwarf2_compute_name): Adjust.
15605         (dwarf2_physname): Adjust.
15606         (read_import_statement): Adjust.
15607         (handle_DW_AT_stmt_list): Adjust.
15608         (read_file_scope): Adjust.
15609         (read_func_scope): Adjust.
15610         (read_lexical_block_scope): Adjust.
15611         (read_call_site_scope): Adjust.
15612         (read_variable): Adjust.
15613         (dwarf2_rnglists_process): Adjust.
15614         (dwarf2_ranges_process): Adjust.
15615         (dwarf2_ranges_read): Adjust.
15616         (dwarf2_get_pc_bounds): Adjust.
15617         (dwarf2_record_block_ranges): Adjust.
15618         (dwarf2_add_field): Adjust.
15619         (dwarf2_add_member_fn): Adjust.
15620         (read_structure_type): Adjust.
15621         (process_structure_scope): Adjust.
15622         (read_enumeration_type): Adjust.
15623         (read_array_type): Adjust.
15624         (mark_common_block_symbol_computed): Adjust.
15625         (read_common_block): Adjust.
15626         (read_namespace_type): Adjust.
15627         (read_namespace): Adjust.
15628         (read_module_type): Adjust.
15629         (read_tag_pointer_type): Adjust.
15630         (read_tag_ptr_to_member_type): Adjust.
15631         (read_tag_string_type): Adjust.
15632         (read_subroutine_type): Adjust.
15633         (read_typedef): Adjust.
15634         (read_base_type): Adjust.
15635         (attr_to_dynamic_prop): Adjust.
15636         (read_subrange_type): Adjust.
15637         (read_unspecified_type): Adjust.
15638         (dwarf2_read_abbrevs): Adjust.
15639         (load_partial_dies): Adjust.
15640         (read_partial_die): Adjust.
15641         (find_partial_die): Adjust.
15642         (guess_partial_die_structure_name): Adjust.
15643         (fixup_partial_die): Adjust.
15644         (read_attribute_value): Adjust.
15645         (read_addr_index): Adjust.
15646         (read_addr_index_from_leb128): Adjust.
15647         (read_str_index): Adjust.
15648         (dwarf2_string_attr): Adjust.
15649         (get_debug_line_section): Adjust.
15650         (dwarf_decode_line_header): Adjust.
15651         (lnp_state_machine::check_line_address): Adjust.
15652         (dwarf_decode_lines_1): Adjust.
15653         (dwarf_decode_lines): Adjust.
15654         (dwarf2_start_symtab): Adjust.
15655         (var_decode_location): Adjust.
15656         (new_symbol_full): Adjust.
15657         (dwarf2_const_value_data): Adjust.
15658         (dwarf2_const_value_attr): Adjust.
15659         (dwarf2_const_value): Adjust.
15660         (die_type): Adjust.
15661         (die_containing_type): Adjust.
15662         (build_error_marker_type): Adjust.
15663         (lookup_die_type): Adjust.
15664         (guess_full_die_structure_name): Adjust.
15665         (anonymous_struct_prefix): Adjust.
15666         (determine_prefix): Adjust.
15667         (dwarf2_name): Adjust.
15668         (follow_die_ref_or_sig): Adjust.
15669         (follow_die_offset): Adjust.
15670         (follow_die_ref): Adjust.
15671         (follow_die_sig_1): Adjust.
15672         (follow_die_sig): Adjust.
15673         (get_signatured_type): Adjust.
15674         (get_DW_AT_signature_type): Adjust.
15675         (decode_locdesc): Adjust.
15676         (dwarf_decode_macros): Adjust.
15677         (cu_debug_loc_section): Adjust.
15678         (fill_in_loclist_baton): Adjust.
15679         (dwarf2_symbol_mark_computed): Adjust.
15680         (init_one_comp_unit): Don't assign
15681         dwarf2_cu::dwarf2_per_objfile.
15682         (set_die_type): Adjust.
15683
15684 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15685
15686         * dwarf2read.c (struct mapped_debug_names): Add constructor.
15687         <dwarf2_per_objfile>: New field.
15688         (dwarf2_per_objfile): Remove global.
15689         (get_dwarf2_per_objfile): New function.
15690         (set_dwarf2_per_objfile): New function.
15691         (dwarf2_build_psymtabs_hard): Change objfile parameter to
15692         dwarf2_per_objfile.
15693         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15694         (read_abbrev_offset): Likewise.
15695         (read_indirect_string): Likewise.
15696         (read_indirect_line_string): Likewise.
15697         (read_indirect_string_at_offset): Likewise.
15698         (read_indirect_string_from_dwz): Likewise.
15699         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15700         dwarf2_per_objfile.
15701         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15702         (create_all_comp_units): Change objfile parameter to
15703         dwarf2_per_objfile.
15704         (create_all_type_units): Likewise.
15705         (process_queue): Add dwarf2_per_objfile parameter.
15706         (read_and_check_comp_unit_head): Likewise.
15707         (lookup_dwo_unit_in_dwp): Likewise.
15708         (get_dwp_file): Likewise.
15709         (process_cu_includes): Likewise.
15710         (struct free_dwo_file_cleanup_data): New struct.
15711         (dwarf2_has_info): Use get_dwarf2_per_objfile and
15712         set_dwarf2_per_objfile.
15713         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
15714         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
15715         context, adjust calls.
15716         (dw2_instantiate_symtab): Likewise.
15717         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15718         (dw2_get_cu): Likewise.
15719         (create_cu_from_index_list): Change objfile parameter to
15720         dwarf2_per_objfile.
15721         (create_cus_from_index_list): Get dwarf2_per_objfile from
15722         context, adjust calls.
15723         (create_cus_from_index): Likewise.
15724         (create_signatured_type_table_from_index): Change objfile
15725         parameter to dwarf2_per_objfile.
15726         (create_signatured_type_table_from_debug_names): Change objfile
15727         parameter to dwarf2_per_objfile.
15728         (create_addrmap_from_index): Likewise.
15729         (create_addrmap_from_aranges): Likewise.
15730         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15731         (dw2_setup): Remove.
15732         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15733         context.
15734         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15735         get_dwarf2_per_objfile.
15736         (dw2_forget_cached_source_info): Likewise.
15737         (dw2_map_symtabs_matching_filename): Likewise.
15738         (struct dw2_symtab_iterator) <index>: Remove.
15739         <dwarf2_per_objfile>: New field.
15740         (dw2_symtab_iter_init): Replace index parameter with
15741         dwarf2_per_objfile.
15742         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15743         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15744         (dw2_print_stats): Likewise.
15745         (dw2_dump): Likewise.
15746         (dw2_expand_symtabs_for_function): Likewise.
15747         (dw2_expand_all_symtabs): Likewise.
15748         (dw2_expand_symtabs_with_fullname): Likewise.
15749         (dw2_expand_marked_cus): Replace index and objfile parameters
15750         with dwarf2_per_objfile.
15751         (dw_expand_symtabs_matching_file_matcher): Add
15752         dwarf2_per_objfile parameter and adjust calls.
15753         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15754         adjust calls.
15755         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15756         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15757         adjust calls.
15758         (create_cus_from_debug_names_list): Replace objfile parameter
15759         with dwarf2_per_objfile and adjust calls.
15760         (create_cus_from_debug_names): Likewise.
15761         (dwarf2_read_debug_names): Likewise.
15762         (mapped_debug_names::namei_to_name): Adjust call.
15763         (dw2_debug_names_iterator::next): Likewise.
15764         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15765         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15766         (dw2_debug_names_dump): Likewise.
15767         (dw2_debug_names_expand_symtabs_for_function): Likewise.
15768         (dw2_debug_names_expand_symtabs_matching): Likewise.
15769         (dwarf2_initialize_objfile): Likewise.
15770         (dwarf2_build_psymtabs): Likewise.
15771         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15772         this_cu.
15773         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15774         (read_and_check_comp_unit_head): Likewise.
15775         (read_abbrev_offset): Likewise.
15776         (create_debug_type_hash_table): Likewise.
15777         (create_debug_types_hash_table): Likewise.
15778         (create_all_type_units): Replace objfile parameter with
15779         dwarf2_per_objfile.
15780         (add_type_unit): Add dwarf2_per_objfile parameter.
15781         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15782         with dwarf2_per_objfile.
15783         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15784         (lookup_dwp_signatured_type): Likewise.
15785         (lookup_signatured_type): Likewise.
15786         (read_cutu_die_from_dwo): Likewise.
15787         (init_tu_and_read_dwo_dies): Likewise.
15788         (init_cutu_and_read_dies): Likewise.
15789         (init_cutu_and_read_dies_no_follow): Likewise.
15790         (allocate_type_unit_groups_table): Add objfile parameter.
15791         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15792         (get_type_unit_group): Likewise.
15793         (process_psymtab_comp_unit): Update call.
15794         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15795         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15796         (print_tu_stats): Likewise.
15797         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15798         in void* parameter.
15799         (build_type_psymtabs): Change objfile parameter to
15800         dwarf2_per_objfile.
15801         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15802         passed in void* parameter.
15803         (process_skeletonless_type_units): Change objfile parameter to
15804         dwarf2_per_objfile.
15805         (set_partial_user): Likewise.
15806         (dwarf2_build_psymtabs_hard): Likewise.
15807         (read_comp_units_from_section): Likewise.
15808         (create_all_comp_units): Likewise.
15809         (scan_partial_symbols): Update calls.
15810         (add_partial_symbol): Likewise.
15811         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15812         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15813         (process_queue): Add dwarf2_per_objfile parameter.
15814         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15815         (compute_compunit_symtab_includes): Likewise.
15816         (process_cu_includes): Add dwarf2_per_objfile parameter.
15817         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15818         (process_full_type_unit): Likewise.
15819         (process_imported_unit_die): Update call.
15820         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15821         (read_file_scope): Likewise.
15822         (allocate_dwo_file_hash_table): Add objfile parameter.
15823         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15824         (create_cus_hash_table): Likewise.
15825         (create_dwp_hash_table): Likewise.
15826         (create_dwo_unit_in_dwp_v1): Likewise.
15827         (create_dwp_v2_section): Likewise.
15828         (create_dwo_unit_in_dwp_v2): Likewise.
15829         (lookup_dwo_unit_in_dwp): Likewise.
15830         (try_open_dwop_file): Likewise.
15831         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15832         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15833         cleanup to include a reference to dwarf2_per_objfile.
15834         (open_dwp_file): Add dwarf2_per_objfile parameter.
15835         (open_and_init_dwp_file): Likewise.
15836         (get_dwp_file): Likewise.
15837         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15838         (queue_and_load_all_dwo_tus): Update call.
15839         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15840         data.
15841         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15842         (dwarf2_ranges_process): Likewise.
15843         (dwarf2_get_pc_bounds): Likewise.
15844         (mark_common_block_symbol_computed): Likewise.
15845         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15846         (dwarf2_read_abbrevs): Update call.
15847         (read_partial_die): Use dwarf2_per_objfile from cu.
15848         (find_partial_die): Likewise.
15849         (fixup_partial_die): Likewise.
15850         (read_attribute_value): Likewise.
15851         (read_indirect_string_at_offset_from): Add objfile parameter.
15852         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15853         parameter.
15854         (read_indirect_string_from_dwz): Add objfile parameter.
15855         (read_indirect_string): Add objfile parameter.
15856         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15857         (read_addr_index): Use dwarf2_per_objfile from cu.
15858         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15859         call dw2_setup.
15860         (read_str_index): Use dwarf2_per_objfile from cu.
15861         (get_debug_line_section): Likewise.
15862         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15863         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15864         (new_symbol_full): Use dwarf2_per_objfile from cu.
15865         (build_error_marker_type): Likewise.
15866         (lookup_die_type): Likewise.
15867         (determine_prefix): Likewise.
15868         (follow_die_offset): Likewise.
15869         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15870         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15871         (dwarf2_fetch_die_type_sect_off): Likewise.
15872         (dwarf2_get_die_type): Likewise.
15873         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15874         (get_signatured_type): Likewise.
15875         (get_DW_AT_signature_type): Likewise.
15876         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15877         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15878         (cu_debug_loc_section): Likewise.
15879         (fill_in_loclist_baton): Likewise.
15880         (dwarf2_symbol_mark_computed): Likewise.
15881         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15882         dwarf2_per_objfile.
15883         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15884         parameter.
15885         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15886         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15887         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15888         (set_die_type): Use dwarf2_free_objfile from cu.
15889         (get_die_type_at_offset): Likewise.
15890         (dwarf2_per_objfile_free): Don't assign global variable.
15891         (debug_names) <constructor>: Add dwarf2_per_objfile
15892         parameter, update m_debugstrlookup construction.
15893         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15894         parameter.
15895         <m_dwarf2_per_objfile>: New field.
15896         <lookup>: Use m_dwarf2_per_objfile.
15897         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15898         (psyms_seen_size): Likewise.
15899         (write_gdbindex): Replace objfile parameter with
15900         dwarf2_per_objfile.
15901         (write_debug_names): Likewise.
15902         (write_psymtabs_to_index): Likewise.
15903         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15904         calls.
15905
15906 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15907
15908         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15909         <dwarf2_per_objfile>: New field.
15910         (struct dwarf2_per_cu_data) <objfile>: Remove.
15911         <dwarf2_per_objfile>: New field.
15912         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15913         of objfile.
15914         (create_signatured_type_table_from_index): Likewise.
15915         (create_debug_type_hash_table): Likewise.
15916         (fill_in_sig_entry_from_dwo_entry): Likewise.
15917         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15918         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15919         objfile.
15920         (create_partial_symtab): Access objfile through
15921         dwarf2_per_objfile.
15922         (process_psymtab_comp_unit_reader): Likewise.
15923         (read_comp_units_from_section): Likewise.
15924         (scan_partial_symbols): Likewise.
15925         (add_partial_symbol): Likewise.
15926         (add_partial_subprogram): Likewise.
15927         (peek_die_abbrev): Likewise.
15928         (fixup_go_packaging): Likewise.
15929         (process_full_comp_unit): Likewise.
15930         (process_full_type_unit): Likewise.
15931         (process_imported_unit_die): Likewise.
15932         (dwarf2_compute_name): Likewise.
15933         (dwarf2_physname): Likewise.
15934         (read_import_statement): Likewise.
15935         (create_cus_hash_table): Assign dwarf2_physname instead of
15936         objfile.
15937         (read_func_scope): Access objfile through dwarf2_per_objfile.
15938         (read_lexical_block_scope): Likewise.
15939         (read_call_site_scope): Likewise.
15940         (read_variable): Likewise.
15941         (dwarf2_rnglists_process): Likewise.
15942         (dwarf2_ranges_process): Likewise.
15943         (dwarf2_ranges_read): Likewise.
15944         (dwarf2_record_block_ranges): Likewise.
15945         (dwarf2_add_field): Likewise.
15946         (dwarf2_add_member_fn): Likewise.
15947         (read_structure_type): Likewise.
15948         (process_structure_scope): Likewise.
15949         (read_enumeration_type): Likewise.
15950         (read_array_type): Likewise.
15951         (read_common_block): Likewise.
15952         (read_namespace_type): Likewise.
15953         (read_namespace): Likewise.
15954         (read_module_type): Likewise.
15955         (read_tag_pointer_type): Likewise.
15956         (read_tag_ptr_to_member_type): Likewise.
15957         (read_tag_string_type): Likewise.
15958         (read_subroutine_type): Likewise.
15959         (read_typedef): Likewise.
15960         (read_base_type): Likewise.
15961         (attr_to_dynamic_prop): Likewise.
15962         (read_subrange_type): Likewise.
15963         (read_unspecified_type): Likewise.
15964         (load_partial_dies): Likewise.
15965         (read_partial_die): Likewise.
15966         (find_partial_die): Likewise.
15967         (guess_partial_die_structure_name): Likewise.
15968         (fixup_partial_die): Likewise.
15969         (read_attribute_value): Likewise.
15970         (read_addr_index_from_leb128): Likewise.
15971         (dwarf2_read_addr_index): Likewise.
15972         (dwarf2_string_attr): Likewise.
15973         (lnp_state_machine::check_line_address): Likewise.
15974         (dwarf_decode_lines_1): Likewise.
15975         (dwarf_decode_lines): Likewise.
15976         (dwarf2_start_symtab): Likewise.
15977         (var_decode_location): Likewise.
15978         (new_symbol_full): Likewise.
15979         (dwarf2_const_value_data): Likewise.
15980         (dwarf2_const_value_attr): Likewise.
15981         (dwarf2_const_value): Likewise.
15982         (die_type): Likewise.
15983         (die_containing_type): Likewise.
15984         (lookup_die_type): Likewise.
15985         (guess_full_die_structure_name): Likewise.
15986         (anonymous_struct_prefix): Likewise.
15987         (dwarf2_name): Likewise.
15988         (follow_die_ref_or_sig): Likewise.
15989         (follow_die_offset): Likewise.
15990         (follow_die_ref): Likewise.
15991         (dwarf2_fetch_die_loc_sect_off): Likewise.
15992         (dwarf2_fetch_constant_bytes): Likewise.
15993         (dwarf2_fetch_die_type_sect_off): Likewise.
15994         (dwarf2_get_die_type): Likewise.
15995         (follow_die_sig): Likewise.
15996         (decode_locdesc): Likewise.
15997         (dwarf2_per_cu_objfile): Likewise.
15998         (dwarf2_per_cu_text_offset): Likewise.
15999         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16000         objfile.
16001         (set_die_type): Access objfile through
16002         dwarf2_per_objfile.
16003
16004 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16005
16006         * valprint.c (converted_character_d): Remove typedef.
16007         (DEF_VEC_O (converted_character_d)): Remove.
16008         (count_next_character): Use std::vector.
16009         (print_converted_chars_to_obstack): Likewise.
16010         (generic_printstr): Likewise.
16011
16012 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16013
16014         * xml-support.h (struct gdb_xml_value): Add constructor.
16015         <value>: Change type to unique_xmalloc_ptr.
16016         (gdb_xml_value_s): Remove typedef.
16017         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16018         (gdb_xml_element_start_handler): Change parameter type to
16019         std::vector.
16020         (xml_find_attribute): Likewise.
16021         * xml-support.c (xml_find_attribute): Change parameter type to
16022         std::vector and adjust.
16023         (gdb_xml_values_cleanup): Remove.
16024         (gdb_xml_parser::start_element): Adjust to std::vector.
16025         (xinclude_start_include): Change paraeter type to std::vector
16026         and adjust.
16027         * btrace.c (check_xml_btrace_version): Likewise.
16028         (parse_xml_btrace_block): Likewise.
16029         (parse_xml_btrace_pt_config_cpu): Likewise.
16030         (parse_xml_btrace_pt): Likewise.
16031         (parse_xml_btrace_conf_bts): Likewise.
16032         (parse_xml_btrace_conf_pt): Likewise.
16033         * memory-map.c (memory_map_start_memory): Likewise.
16034         (memory_map_start_property): Likewise.
16035         * osdata.c (osdata_start_osdata): Likewise.
16036         (osdata_start_item): Likewise.
16037         (osdata_start_column): Likewise.
16038         * remote.c (start_thread): Likewise.
16039         * solib-aix.c (library_list_start_library): Likewise.
16040         (library_list_start_list): Likewise.
16041         * solib-svr4.c (library_list_start_library): Likewise.
16042         (svr4_library_list_start_list): Likewise.
16043         * solib-target.c (library_list_start_segment): Likewise.
16044         (library_list_start_section): Likewise.
16045         (library_list_start_library): Likewise.
16046         (library_list_start_list): Likewise.
16047         * tracepoint.c (traceframe_info_start_memory): Likewise.
16048         (traceframe_info_start_tvar): Likewise.
16049         * xml-syscall.c (syscall_start_syscall): Likewise.
16050         * xml-tdesc.c (tdesc_start_target): Likewise.
16051         (tdesc_start_feature): Likewise.
16052         (tdesc_start_reg): Likewise.
16053         (tdesc_start_union): Likewise.
16054         (tdesc_start_struct): Likewise.
16055         (tdesc_start_flags): Likewise.
16056         (tdesc_start_enum): Likewise.
16057         (tdesc_start_field): Likewise.
16058         (tdesc_start_enum_value): Likewise.
16059         (tdesc_start_vector): Likewise.
16060
16061 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16062
16063         * extension.h (struct xmethod_worker) <clone>: Remove.
16064         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16065         Remove.
16066         (python_xmethod_worker::clone): Remove.
16067         * valops.c (find_overload_match): Use std::move instead of
16068         clone.
16069
16070 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16071
16072         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16073         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16074         <free_xmethod_worker_data>: Remove.
16075         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16076         <get_xmethod_arg_types>: Remove.
16077         <get_xmethod_result_type>: Remove.
16078         <invoke_xmethod>: Remove.
16079         * extension.c (new_xmethod_worker): Remove.
16080         (clone_xmethod_worker): Remove.
16081         (get_matching_xmethod_workers): Return void, pass std::vector by
16082         pointer.
16083         (get_xmethod_arg_types): Rename to...
16084         (xmethod_worker::get_arg_types): ... this, and adjust.
16085         (get_xmethod_result_type): Rename to...
16086         (xmethod_worker::get_result_type): ... this, and adjust.
16087         (invoke_xmethod): Remove.
16088         (free_xmethod_worker): Remove.
16089         (free_xmethod_worker_vec): Remove.
16090         * extension.h (enum ext_lang_rc): Move here from
16091         extension-priv.h.
16092         (struct xmethod_worker): Add constructor and destructor.
16093         <data>: Remove.
16094         <value>: Remove.
16095         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16096         virtual pure methods.
16097         <get_arg_types, get_result_type>: New methods.
16098         (xmethod_worker_ptr): Remove typedef.
16099         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16100         (xmethod_worker_vec): Remove typedef.
16101         (xmethod_worker_up): New typedef.
16102         (invoke_xmethod): Remove.
16103         (clone_xmethod_worker): Remove.
16104         (free_xmethod_worker): Remove.
16105         (free_xmethod_worker_vec): Remove.
16106         (get_xmethod_arg_types): Remove.
16107         (get_xmethod_result_type): Remove.
16108         * valops.c (find_method_list): Use std::vector, don't use
16109         intermediate vector.
16110         (value_find_oload_method_list): Use std::vector.
16111         (find_overload_match): Use std::vector.
16112         (find_oload_champ): Use std::vector.
16113         * value.c (value_free): Use operator delete.
16114         (value_of_xmethod): Rename to...
16115         (value_from_xmethod): ... this.  Don't assign
16116         xmethod_worker::value, take rvalue-reference.
16117         (result_type_of_xmethod): Adjust.
16118         (call_xmethod): Adjust.
16119         * value.h: Include extension.h.
16120         (struct xmethod_worker): Don't forward-declare.
16121         (value_of_xmethod): Rename to...
16122         (value_from_xmethod): ... this, take rvalue-reference.
16123         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16124         (struct python_xmethod_worker): ... this, add constructor and
16125         destructor.
16126         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16127         (gdbpy_free_xmethod_worker_data): Rename to...
16128         (python_xmethod_worker::~python_xmethod_worker): ... this and
16129         adjust.
16130         (gdbpy_clone_xmethod_worker_data): Rename to...
16131         (python_xmethod_worker::clone): ... this and adjust.
16132         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16133         temporary vector.
16134         (gdbpy_get_xmethod_arg_types): Rename to...
16135         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16136         (gdbpy_get_xmethod_result_type): Rename to...
16137         (python_xmethod_worker::do_get_result_type): ... this and
16138         adjust.
16139         (gdbpy_invoke_xmethod): Rename to...
16140         (python_xmethod_worker::invoke): ... this and adjust.
16141         (new_python_xmethod_worker): Rename to...
16142         (python_xmethod_worker::python_xmethod_worker): ... this and
16143         adjust.
16144         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16145         Remove.
16146         (gdbpy_free_xmethod_worker_data): Remove.
16147         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16148         (gdbpy_get_xmethod_arg_types): Remove.
16149         (gdbpy_get_xmethod_result_type): Remove.
16150         (gdbpy_invoke_xmethod): Remove.
16151         * python/python.c (python_extension_ops): Remove obsolete
16152         callbacks.
16153
16154 2018-01-05  Pedro Alves  <palves@redhat.com>
16155
16156         PR gdb/18653
16157         * common/signals-state-save-restore.c
16158         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16159         find a custom handler preinstalled, instead of internal erroring.
16160         But only warn if !quiet.
16161         * common/signals-state-save-restore.h
16162         (save_original_signals_state): New parameter 'quiet'.
16163         * main.c (captured_main_1): Move save_original_signals_state call
16164         after option handling, and pass QUIET.
16165
16166 2018-01-05  Pedro Alves  <palves@redhat.com>
16167
16168         * spu-tdep.c (spu_catch_start): Pass
16169         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16170
16171 2018-01-05  Pedro Alves  <palves@redhat.com>
16172
16173         PR gdb/22670
16174         * ada-lang.c (literal_symbol_name_matcher): New function.
16175         (ada_get_symbol_name_matcher): Use it for
16176         symbol_name_match_type::SEARCH_NAME.
16177         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16178         it down instead of assuming symbol_name_match_type::FULL.
16179         * block.h (block_lookup_symbol): New parameter 'match_type'.
16180         * c-valprint.c (print_unpacked_pointer): Use
16181         lookup_symbol_search_name instead of lookup_symbol.
16182         * compile/compile-object-load.c (get_out_value_type): Pass down
16183         symbol_name_match_type::SEARCH_NAME.
16184         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16185         symbol_name_match_type::FULL.
16186         * cp-support.c (cp_get_symbol_name_matcher): Handle
16187         symbol_name_match_type::SEARCH_NAME.
16188         * infrun.c (insert_exception_resume_breakpoint): Use
16189         lookup_symbol_search_name.
16190         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16191         * psymtab.c (maintenance_check_psymtabs): Use
16192         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16193         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16194         SYMBOL_SEARCH_NAME.
16195         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16196         if symbol_name_match_type::SEARCH_NAME.
16197         (lookup_symbol_in_language): Pass down
16198         symbol_name_match_type::FULL.
16199         (lookup_symbol_search_name): New.
16200         (lookup_language_this): Pass down
16201         symbol_name_match_type::SEARCH_NAME.
16202         (lookup_symbol_aux, lookup_local_symbol): New parameter
16203         'match_type'.  Pass it down.
16204         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16205         (lookup_symbol_search_name): New declaration.
16206         (lookup_symbol_in_block): New 'match_type' parameter.
16207
16208 2018-01-05  Pedro Alves  <palves@redhat.com>
16209
16210         PR gdb/22670
16211         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16212         ada_lookup_symbol.
16213         (ada_lookup_symbol): Reimplement in terms of
16214         ada_lookup_symbol_list, bits factored out from
16215         ada_lookup_encoded_symbol.
16216
16217 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16218
16219         * ada-exp.y (write_object_renaming): When subscripting an array
16220         using a symbol as the index, pass the block in call to
16221         ada_lookup_encoded_symbol when looking that symbol up.
16222
16223 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16224
16225         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16226         TYPE_INDEX_TYPE.
16227
16228 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16229
16230         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16231         the case where VALUE_LVAL (val0) is not lval_memory.
16232
16233 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16234
16235         * ada-valprint.c (print_optional_low_bound): Handle
16236         character-indexed array printing like boolean-indexed array
16237         printing.
16238
16239 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16240
16241         * NEWS: Create a new section for the next release branch.
16242         Rename the section of the current branch, now that it has
16243         been cut.
16244
16245 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16246
16247         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16248         * version.in: Bump version to 8.1.50.DATE-git.
16249
16250 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16251
16252         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16253         Add field.
16254         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16255         Add field.
16256         (default_exception_support_info) <catch_handlers_sym>: Add field.
16257         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16258         (ada_exception_name_addr_1): Add "catch handlers" handling.
16259         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16260         Update all callers.
16261         (create_excep_cond_exprs) <ex>: Add parameter.
16262         (re_set_exception): Update create_excep_cond_exprs call.
16263         (print_it_exception, print_one_exception, print_mention_exception)
16264         (print_recreate_exception): Add "catch handler" handling.
16265         (allocate_location_catch_handlers, re_set_catch_handlers)
16266         (check_status_catch_handlers, print_it_catch_handlers)
16267         (print_one_catch_handlers, print_mention_catch_handlers)
16268         (print_recreate_catch_handlers): New function.
16269         (catch_handlers_breakpoint_ops): New variable.
16270         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16271         Add parameter.  Add "catch handler" handling.
16272         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16273         Add "catch handler" handling.
16274         (ada_exception_catchpoint_cond_string): Add "catch handler"
16275         handling.
16276         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16277         call.
16278         (catch_ada_handlers_command): New function.
16279         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16280         operations structure.
16281         (_initialize_ada_language): Add "catch handlers" command entry.
16282         * NEWS: Document "catch handlers" feature.
16283
16284 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16285
16286         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16287         account when creating the array type of the slice.
16288         (ada_value_slice): Likewise.
16289
16290 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16291
16292         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16293         New enum value.
16294         (create_array_type_with_stride): Add byte_stride_prop parameter.
16295         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16296         New parameter.  Update all callers in this file.
16297         (array_type_has_dynamic_stride): New function.
16298         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16299         of arrays with dynamic byte strides.
16300         * dwarf2read.c (read_array_type): Add support for dynamic
16301         DW_AT_byte_stride attributes.
16302
16303 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16304
16305         * dwarf2read.c (read_unspecified_type): Treat
16306         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16307
16308 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16309
16310         Update copyright year range in all GDB files.
16311
16312 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16313
16314         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16315         and gdb/testsuite/gdb.base/step-line.c.
16316
16317 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16318
16319         * copyright.py (main): Dump the contents of
16320         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16321         even if BY_HAND is empty.
16322
16323 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16324
16325         * top.c (print_gdb_version): Update Copyright year in version
16326         message.
16327
16328 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16329
16330         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16331
16332 For older changes see ChangeLog-2017.
16333 \f
16334 Local Variables:
16335 mode: change-log
16336 left-margin: 8
16337 fill-column: 74
16338 version-control: never
16339 coding: utf-8
16340 End: