Re-fix leak in source.c (open_source_file).
[external/binutils.git] / gdb / ChangeLog
1 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2
3         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
4         leak in open_source_file' has been partially undone by '2179fbc36d23
5         Return scoped_fd from open_source_file'. Re-add the transfer of
6         current s->fullname to the unique_xmalloc_ptr fullname given
7         to find_and_open_source.
8
9 2018-11-23  Pedro Alves  <palves@redhat.com>
10
11         * gdbthread.h (enum thread_state): Move comments here.
12         (is_running, is_stopped, is_exited): Remove declarations.
13
14 2018-11-22  Pedro Alves  <palves@redhat.com>
15
16         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
17         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
18         ALL_NON_EXITED_THREADS with all_non_exited_threads.
19         (print_one_breakpoint_location): Replace ALL_INFERIORS with
20         all_inferiors.
21         * bsd-kvm.c: Include inferior.h.
22         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
23         with all_non_exited_threads.
24         * common/filtered-iterator.h: New.
25         * common/safe-iterator.h: New.
26         * corelow.c (core_target_open): Don't call init_thread_list here.
27         * darwin-nat.c (thread_info_from_private_thread_info): Replace
28         ALL_THREADS with all_threads.
29         * fbsd-nat.c (fbsd_nat_target::resume): Replace
30         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
31         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
32         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
33         * fork-child.c (postfork_hook): Don't call init_thread_list here.
34         * gdbarch-selftests.c (register_to_value_test): Adjust.
35         * gdbthread.h: Don't include "inferior.h" here.
36         (struct inferior): Forward declare.
37         (enum step_over_calls_kind): Moved here from inferior.h.
38         (thread_info::deletable): Definition moved to thread.c.
39         (find_thread_ptid (inferior *, ptid_t)): Declare.
40         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
41         Include "thread-iter.h".
42         (all_threads, all_non_exited_threads, all_threads_safe): New.
43         (any_thread_p): Declare.
44         (thread_list): Delete.
45         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
46         all_non_exited_threads.
47         (proceed_after_attach_callback): Delete.
48         (proceed_after_attach): Take an inferior pointer instead of an
49         integer PID.  Adjust to use range-for.
50         (attach_post_wait): Pass down inferior pointer instead of pid.
51         Use range-for instead of ALL_NON_EXITED_THREADS.
52         (detach_command): Remove init_thread_list call.
53         * inferior-iter.h: New.
54         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
55         (delete_thread_of_inferior): Delete.
56         (delete_inferior, exit_inferior_1): Use range-for with
57         inf->threads_safe() instead of iterate_over_threads.
58         (inferior_appeared): Call init_thread_list here.
59         (discard_all_inferiors): Use all_non_exited_inferiors.
60         (find_inferior_id, find_inferior_pid): Use all_inferiors.
61         (iterate_over_inferiors): Use all_inferiors_safe.
62         (have_inferiors, number_of_live_inferiors): Use
63         all_non_exited_inferiors.
64         (number_of_inferiors): Use all_inferiors and std::distance.
65         (print_inferior): Use all_inferiors.
66         * inferior.h: Include gdbthread.h.
67         (enum step_over_calls_kind): Moved to gdbthread.h.
68         (struct inferior) <thread_list>: New field.
69         <threads, non_exited_threads, threads_safe>: New methods.
70         (ALL_INFERIORS): Delete.
71         Include "inferior-iter.h".
72         (ALL_NON_EXITED_INFERIORS): Delete.
73         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
74         functions.
75         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
76         ALL_NON_EXITED_THREADS with all_non_exited_threads.
77         * infrun.c (follow_exec): Use all_threads_safe.
78         (clear_proceed_status, proceed): Use all_non_exited_threads.
79         (init_wait_for_inferior): Don't clear inline frame state here.
80         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
81         all_threads instead of ALL_NON_EXITED_THREADS.
82         (random_pending_event_thread): Use all_non_exited_threads instead
83         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
84         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
85         instead of ALL_NON_EXITED_THREADS.
86         (handle_no_resumed): Use all_non_exited_threads instead of
87         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
88         ALL_INFERIORS.
89         (restart_threads, switch_back_to_stepped_thread): Use
90         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
91         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
92         all_inferiors.
93         (kill_unfollowed_fork_children): Use inf->non_exited_threads
94         instead of ALL_NON_EXITED_THREADS.
95         * linux-tdep.c (linux_make_corefile_notes): Use
96         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
97         * linux-thread-db.c (thread_db_target::update_thread_list):
98         Replace ALL_INFERIORS with all_inferiors.
99         (thread_db_target::thread_handle_to_thread_info): Use
100         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
101         * mi/mi-interp.c (multiple_inferiors_p): New.
102         (mi_on_resume_1): Simplify using all_non_exited_threads and
103         multiple_inferiors_p.
104         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
105         instead of ALL_NON_EXITED_THREADS.
106         * nto-procfs.c (nto_procfs_target::open): Don't call
107         init_thread_list here.
108         * record-btrace.c (record_btrace_target_open)
109         (record_btrace_target::stop_recording)
110         (record_btrace_target::close)
111         (record_btrace_target::record_is_replaying)
112         (record_btrace_target::resume, record_btrace_target::wait)
113         (record_btrace_target::record_stop_replaying): Use
114         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
115         * record-full.c (record_full_wait_1): Use all_non_exited_threads
116         instead of ALL_NON_EXITED_THREADS.
117         * regcache.c (cooked_read_test): Remove reference to global
118         thread_list.
119         * remote-sim.c (gdbsim_target::create_inferior): Don't call
120         init_thread_list here.
121         * remote.c (remote_target::update_thread_list): Use
122         all_threads_safe instead of ALL_NON_EXITED_THREADS.
123         (remote_target::process_initial_stop_replies): Replace
124         ALL_INFERIORS with all_non_exited_inferiors and use
125         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
126         (remote_target::open_1): Don't call init_thread_list here.
127         (remote_target::append_pending_thread_resumptions)
128         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
129         instead of ALL_NON_EXITED_THREADS.
130         (remote_target::commit_resume)
131         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
132         with all_non_exited_inferiors and use all_non_exited_threads
133         instead of ALL_NON_EXITED_THREADS.
134         (remote_target::kill_new_fork_children): Use
135         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
136         init_thread_list and init_wait_for_inferior calls.
137         (remote_target::remote_btrace_maybe_reopen)
138         (remote_target::thread_handle_to_thread_info): Use
139         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
140         * target.c (target_terminal::restore_inferior)
141         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
142         all_non_exited_inferiors.
143         * thread-iter.c: New file.
144         * thread-iter.h: New file.
145         * thread.c: Include "inline-frame.h".
146         (thread_list): Delete.
147         (clear_thread_inferior_resources): Call clear_inline_frame_state.
148         (init_thread_list): Use all_threads_safe instead of
149         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
150         (new_thread): Adjust to per-inferior thread lists.
151         (add_thread_silent): Pass inferior to find_thread_ptid.
152         (thread_info::deletable): New, moved from the header.
153         (delete_thread_1): Adjust to per-inferior thread lists.
154         (find_thread_global_id): Use inf->threads().
155         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
156         find_thread_ptid.
157         (find_thread_ptid(inferior*, ptid_t)): New overload.
158         (iterate_over_threads): Use all_threads_safe.
159         (any_thread_p): New.
160         (thread_count): Use all_threads and std::distance.
161         (live_threads_count): Use all_non_exited_threads and
162         std::distance.
163         (valid_global_thread_id): Use all_threads.
164         (in_thread_list): Use find_thread_ptid.
165         (first_thread_of_inferior): Adjust to per-inferior thread lists.
166         (any_thread_of_inferior, any_live_thread_of_inferior): Use
167         inf->non_exited_threads().
168         (prune_threads, delete_exited_threads): Use all_threads_safe.
169         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
170         (set_resumed, set_running): Use all_non_exited_threads.
171         (is_thread_state, is_stopped, is_exited, is_running)
172         (is_executing): Delete.
173         (set_executing, set_stop_requested, finish_thread_state): Use
174         all_non_exited_threads.
175         (print_thread_info_1): Use all_inferiors and all_threads.
176         (thread_apply_all_command): Use all_non_exited_threads.
177         (thread_find_command): Use all_threads.
178         (update_threads_executing): Use all_non_exited_threads.
179         * tid-parse.c (parse_thread_id): Use inf->threads.
180         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
181
182 2018-11-22  Pedro Alves  <palves@redhat.com>
183
184         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
185         switch to it before calling into try_open_exec_file.
186
187 2018-11-22  Pedro Alves  <palves@redhat.com>
188
189         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
190         inferior_thread instead of find_thread_ptid, and only when
191         inferior_ptid is not null_ptid.
192         * inferior.c (add_inferior): Don't include target_pid_to_str
193         output when the inferior is not started.
194         * python/py-inferior.c (python_on_normal_stop): Don't use
195         find_thread_ptid.
196         (tui_on_user_selected_context_changed): Use inferior_thread
197         instead of find_thread_ptid, and only when inferior_ptid is not
198         null_ptid.
199
200 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
201
202         PR python/23714
203         * gdb/python/python.c (execute_gdb_command): Call
204         prevent_dont_repeat earlier to avoid affecting dont_repeat.
205
206 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
207
208         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
209         (HFILES_NO_SRCDIR): Add arch/riscv.h.
210         * arch/riscv.c: New file.
211         * arch/riscv.h: New file.
212         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
213         this list, and add arch/riscv.o.
214         * features/Makefile: Add riscv features.
215         * features/riscv/32bit-cpu.c: New file.
216         * features/riscv/32bit-cpu.xml: New file.
217         * features/riscv/32bit-csr.c: New file.
218         * features/riscv/32bit-csr.xml: New file.
219         * features/riscv/32bit-fpu.c: New file.
220         * features/riscv/32bit-fpu.xml: New file.
221         * features/riscv/64bit-cpu.c: New file.
222         * features/riscv/64bit-cpu.xml: New file.
223         * features/riscv/64bit-csr.c: New file.
224         * features/riscv/64bit-csr.xml: New file.
225         * features/riscv/64bit-fpu.c: New file.
226         * features/riscv/64bit-fpu.xml: New file.
227         * features/riscv/rebuild-csr-xml.sh: New file.
228         * riscv-tdep.c: Add 'arch/riscv.h' include.
229         (riscv_gdb_reg_names): Delete.
230         (csr_reggroup): New global.
231         (struct riscv_register_alias): Delete.
232         (struct riscv_register_feature): New structure.
233         (riscv_register_aliases): Delete.
234         (riscv_xreg_feature): New global.
235         (riscv_freg_feature): New global.
236         (riscv_virtual_feature): New global.
237         (riscv_csr_feature): New global.
238         (riscv_create_csr_aliases): New function.
239         (riscv_read_misa_reg): Delete.
240         (riscv_has_feature): Delete.
241         (riscv_isa_xlen): Simplify, just return cached xlen.
242         (riscv_isa_flen): Simplify, just return cached flen.
243         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
244         (riscv_register_name): Update to make use of tdesc_register_name.
245         Look up xreg and freg names in the new globals riscv_xreg_feature
246         and riscv_freg_feature.  Don't supply csr aliases here.
247         (riscv_fpreg_q_type): Delete.
248         (riscv_register_type): Use tdesc_register_type in almost all
249         cases, override the returned type in a few specific cases only.
250         (riscv_print_one_register_info): Handle errors reading registers.
251         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
252         registers that are otherwise unknown to GDB.  Also check the
253         csr_reggroup.
254         (riscv_print_registers_info): Remove assert about upper register
255         number, and use gdbarch_register_reggroup_p instead of
256         short-cutting.
257         (riscv_find_default_target_description): New function.
258         (riscv_check_tdesc_feature): New function.
259         (riscv_add_reggroups): New function.
260         (riscv_setup_register_aliases): New function.
261         (riscv_init_reggroups): New function.
262         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
263         setup register groups.  Register new riscv debug variable.
264         * riscv-tdep.h: Add 'arch/riscv.h' include.
265         (struct gdbarch_tdep): Remove abi union, and add
266         riscv_gdbarch_features field.  Remove cached quad floating point
267         type, and provide initialisation for double type field.
268         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
269         the list of targets using the feature based target descriptions.
270         * NEWS: Mention target description support.
271
272 2018-11-21  Pedro Alves  <palves@redhat.com>
273
274         * valops.c (find_method_list, value_find_oload_method_list)
275         (find_overload_match, find_oload_champ): Rename parameters and
276         locals.
277
278 2018-11-21  Pedro Alves  <palves@redhat.com>
279
280         * valops.c (find_method_list): Replace pointer and length
281         parameters with an gdb::array_view.  Adjust.
282         (value_find_oload_method_list): Likewise.
283         (find_overload_match): Use gdb::array_view for methods list.
284         Adjust to find_oload_champ interface change.
285         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
286         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
287
288 2018-11-21  Pedro Alves  <palves@redhat.com>
289
290         * gdbtypes.c (compare_badness): Change type of parameters to const
291         reference.  Adjust to badness_vector being a std::vector now.
292         (rank_function): Adjust to badness_vector being a std::vector now.
293         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
294         (LENGTH_MATCH): Delete.
295         (compare_badness): Change type of parameters to const reference.
296         (rank_function): Return a badness_vector by value now.
297         (find_overload_match): Adjust to badness_vector being a
298         std::vector now.  Remove cleanups.
299         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
300         badness_vector pointer.
301         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
302         a badness_vector pointer.  Adjust to badness_vector being a
303         std::vector now.  Remove cleanups.
304         (find_oload_champ): 'oload_champ_bv' parameter now
305         a badness_vector pointer.  Adjust to badness_vector being a
306         std::vector now.  Remove cleanups.
307
308 2018-11-21  Pedro Alves  <palves@redhat.com>
309
310         * cp-support.c (sym_return_val_size, sym_return_val_index)
311         (sym_return_val): Delete.
312         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
313         add to the vector.
314         (make_symbol_overload_list): Adjust to return a std::vector
315         instead of maintaining a global open coded vector.
316         (make_symbol_overload_list_block): Add std::vector parameter.
317         (make_symbol_overload_list_block): Rename to ...
318         (add_symbol_overload_list_block): ... this and add std::vector
319         parameter.
320         (make_symbol_overload_list_namespace): Rename to ...
321         (add_symbol_overload_list_namespace): ... this and add std::vector
322         parameter.
323         (make_symbol_overload_list_adl_namespace): Rename to ...
324         (add_symbol_overload_list_adl_namespace): ... this and add
325         std::vector parameter.
326         (make_symbol_overload_list_adl): Delete.
327         (add_symbol_overload_list_adl): New.
328         (make_symbol_overload_list_using): Rename to ...
329         (add_symbol_overload_list_using): ... this and add std::vector
330         parameter.
331         (make_symbol_overload_list_qualified): Rename to ...
332         (add_symbol_overload_list_qualified): ... this and add std::vector
333         parameter.
334         * cp-support.h: Include "common/array-view.h" and <vector>.
335         (make_symbol_overload_list): Change return type to std::vector.
336         (make_symbol_overload_list_adl): Delete declaration.
337         (add_symbol_overload_list_adl): New declaration.
338         * valops.c (find_overload_match): Local 'oload_syms' now a
339         std::vector.
340         (find_oload_champ_namespace): 'oload_syms' parameter now a
341         std::vector pointer.
342         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
343         std::vector pointer.  Adjust to new make_symbol_overload_list
344         interface.
345
346 2018-11-21  Pedro Alves  <palves@redhat.com>
347
348         * common/array-view.h (array_view::splice(size_type, size_t)): New.
349         (array_view::splice(size_type)): New.
350         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
351         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
352         std::vector.
353         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
354         * extension.h: Include "common/array-view.h".
355         (xmethod_worker::invoke): Adjust to use gdb::array_view.
356         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
357         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
358         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
359         (xmethod_worker::do_get_result_type): Adjust to use
360         gdb::array_view.
361         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
362         * gdbtypes.h: Include "common/array-view.h".
363         (rank_function): Adjust to use gdb::array_view.
364         * python/py-xmethods.c (python_xmethod_worker::invoke)
365         (python_xmethod_worker::do_get_arg_types)
366         (python_xmethod_worker::do_get_result_type)
367         (python_xmethod_worker::invoke): Adjust to new interfaces.
368         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
369         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
370         * valops.c (find_overload_match, find_oload_champ_namespace)
371         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
372         gdb:array_view and the new xmethod_worker interfaces.
373         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
374         gdb::array_view.
375         * value.h (find_overload_match, result_type_of_xmethod)
376         (call_xmethod): Adjust to use gdb::array_view.
377         * unittests/array-view-selftests.c: Add slicing tests.
378
379 2018-11-21  Pedro Alves  <palves@redhat.com>
380
381         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
382         * common/array-view.h (make_array_view): New.
383         * compile/compile-object-run.c (compile_object_run): Adjust to
384         pass an array_view.
385         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
386         * eval.c (eval_call): Adjust to pass an array_view.
387         (evaluate_subexp_standard): Adjust to pass an array_view.
388         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
389         * guile/scm-value.c (gdbscm_value_call): Likewise.
390         * infcall.c (push_dummy_code): Replace pointer + size parameters
391         with an array_view parameter.
392         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
393         adjust.
394         * infcall.h: Include "common/array-view.h".
395         (call_function_by_hand, call_function_by_hand_dummy): Replace
396         pointer + size parameters with an array_view parameter.
397         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
398         * linux-tdep.c (linux_infcall_mmap): Likewise.
399         * objc-lang.c (lookup_objc_class, lookup_child_selector)
400         (value_nsstring, print_object_command): Likewise.
401         * python/py-value.c (valpy_call): Likewise.
402         * rust-lang.c (rust_evaluate_funcall): Likewise.
403         * spu-tdep.c (flush_ea_cache): Likewise.
404         * valarith.c (value_x_binop, value_x_unop): Likewise.
405         * valops.c (value_allocate_space_in_inferior): Likewise.
406         * unittests/array-view-selftests.c (run_tests): Add
407         gdb::make_array_view test.
408
409 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
410
411         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
412         than a fixed size buffer.
413
414 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
415
416         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
417         and remove insertion of extra spaces in GDB's output.
418         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
419         Layout field into a temporary buffer, and then output it as a
420         string field.
421
422 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
423
424         * NEWS: Document the language choice done by
425         'info [types|functions|variables]|rbreak'.
426
427 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
428
429         * symtab.c (treg_matches_sym_type_name): Use
430         scoped_switch_to_sym_language_if_auto instead of local logic.
431         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
432         to switch to SYM language when language mode is auto.
433
434 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
435
436         * language.h (scoped_switch_to_sym_language_if_auto): New class.
437
438 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
439
440         * symtab.c (search_symbols): Properly check absence of type regexp
441         before entering the loop scanning the minimal symbols.
442
443 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
444
445         * s12z-tdep.c (s12z_extract_return_value): New function.
446         (inv_reg_perm) New array.
447         (s12z_return_value): Populate readbuf if non-null.
448
449 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
450
451         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
452         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
453         to MinGW fixed by Gnulib.
454         (O_NOINHERIT): Define if not defined.
455
456 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
457
458         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
459
460 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
461
462         * infrun.c (displaced_step_inferior_state) <next>: Remove.
463
464 2018-11-19  Tom Tromey  <tom@tromey.com>
465
466         * source.c (get_filename_and_charpos): Return void.
467
468 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
469
470         * skip.c (_initialize_step_skip): Fix "info skip" help.
471
472 2018-11-16  Tom Tromey  <tom@tromey.com>
473
474         PR rust/23625:
475         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
476
477 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
478
479         * infrun.c (displaced_step_inferior_states): Change type to
480         std::forward_list.
481         (get_displaced_stepping_state): Adjust.
482         (displaced_step_in_progress_any_inferior): Adjust.
483         (add_displaced_stepping_state): Adjust.
484         (remove_displaced_stepping_state): Adjust.
485
486 2018-11-18  Tom Tromey  <tom@tromey.com>
487
488         PR build/23814:
489         * target-delegates.c: Rebuild.
490         * ia64-linux-nat.c (class ia64_linux_nat_target)
491         <have_steppable_watchpoint>: Use override.  Return true, not 1.
492         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
493         "self" argument.
494         (ia64_linux_nat_target::low_new_thread): Rename.
495         (class ia64_linux_nat_target) <read_description>: Don't declare.
496         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
497         bool.
498
499 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
500
501         PR gdb/22736:
502         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
503         lang_struct_return code.
504
505 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
506
507         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
508         return_method.
509         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
510         * amd64-tdep.c (amd64_push_arguments): Likewise.
511         (amd64_push_dummy_call): Likewise.
512         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
513         * arc-tdep.c (arc_push_dummy_call): Likewise.
514         * arm-tdep.c (arm_push_dummy_call): Likewise.
515         * avr-tdep.c (avr_push_dummy_call): Likewise.
516         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
517         * cris-tdep.c (cris_push_dummy_call): Likewise.
518         * csky-tdep.c (csky_push_dummy_call): Likewise.
519         * frv-tdep.c (frv_push_dummy_call): Likewise.
520         * gdbarch.c: Regenerate.
521         * gdbarch.h: Regenerate.
522         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
523         return_method.
524         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
525         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
526         (hppa64_push_dummy_call): Likewise.
527         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
528         * i386-tdep.c (i386_push_dummy_call): Likewise.
529         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
530         * infcall.c (call_function_by_hand_dummy): Likewise.
531         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
532         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
533         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
534         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
535         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
536         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
537         * mep-tdep.c (mep_push_dummy_call): Likewise.
538         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
539         (mips_n32n64_push_dummy_call): Likewise.
540         (mips_o32_push_dummy_call): Likewise.
541         (mips_o64_push_dummy_call): Likewise.
542         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
543         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
544         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
545         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
546         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
547         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
548         (ppc64_sysv_abi_push_dummy_call): Likewise.
549         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
550         (ppc64_sysv_abi_push_dummy_call): Likewise.
551         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
552         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
553         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
554         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
555         * rx-tdep.c (rx_push_dummy_call): Likewise.
556         * s390-tdep.c (s390_push_dummy_call): Likewise.
557         * score-tdep.c (score_push_dummy_call): Likewise.
558         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
559         (sh_push_dummy_call_nofpu): Likewise.
560         * sparc-tdep.c (sparc32_store_arguments): Likewise.
561         (sparc32_push_dummy_call): Likewise.
562         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
563         (sparc64_push_dummy_call): Likewise.
564         * spu-tdep.c (spu_push_dummy_call): Likewise.
565         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
566         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
567         * v850-tdep.c (v850_push_dummy_call): Likewise.
568         * vax-tdep.c (vax_push_dummy_call): Likewise.
569         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
570         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
571
572 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
573
574         * gdbarch.sh (enum function_call_return_method): Add enum.
575         * gdbarch.h: Regenerate.
576         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
577
578 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
579
580         * unittests/copy_bitwise-selftests.c: New file.
581         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
582         (selftests::copy_bitwise_tests): Delete, moving this code to
583         unittests/copy_bitwise-selftests.c instead.
584         (_initialize_utils): Do not register copy_bitwise tests.
585         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
586         unittests/copy_bitwise-selftests.c.
587
588 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
589
590         * ada-lang.c (move_bits): Delete. Update all callers to use
591         copy_bitwise instead.
592         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
593         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
594         Move from here to utils.c.
595         (_initialize_dwarf2loc): Remove call to register copy_bitwise
596         selftests.
597         * utils.h (copy_bitwise): Add declaration.
598         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
599         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
600         Moved here from dwarf2loc.c.
601         (_initialize_utils): Register copy_bitwise selftests.
602
603 2018-11-14  Jim Wilson  <jimw@sifive.com>
604
605         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
606         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
607         then increment next_regnum if odd.
608         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
609         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
610         function type.  Pass new arg to riscv_arg_location based on function
611         type.
612         (riscv_return_value): Pass new arg to riscv_arg_location.
613
614         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
615         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
616         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
617
618         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
619         setting len.  New local align, set to max of arg align and xlen,
620         and pass to first riscv_assign_stack_location call.
621
622 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
623
624         * skip.c (complete_skip_number): New function.
625         (_initialize_step_skip): Add completers to some skip commands.
626
627 2018-11-09  Tom Tromey  <tom@tromey.com>
628
629         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
630         (struct remote_g_packet_data): Derive from allocate_on_obstack.
631         <guesses>: Now a std::vector.
632         (remote_g_packet_data_init, register_remote_g_packet_guess):
633         Update.
634         (remote_read_description_p): Update.  Return bool.
635         (remote_target::read_description): Update.
636         (struct remote_g_packet_guess): Add constructor.
637
638 2018-11-09  Tom Tromey  <tom@tromey.com>
639
640         * common/scoped_fd.h (class scoped_fd): Add move constructor and
641         move assignment operator.
642         * psymtab.c (psymtab_to_fullname): Update.
643         * source.h (open_source_file): Return scoped_fd.
644         (find_and_open_source): Likewise.
645         * source.c (open_source_file): Return scoped_fd.
646         (get_filename_and_charpos): Update.
647         (print_source_lines_base): Update.  Use scoped_fd::to_file.
648         (forward_search_command): Likewise.
649         (reverse_search_command): Likewise.
650         (find_and_open_source): Return scoped_fd.
651         * tui/tui-source.c (tui_set_source_content): Update.  Use
652         gdb_file_up.
653
654 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
655
656         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
657         overflow.
658
659 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
660
661         * configure: Regenerate.
662
663 2018-11-09  Tom de Vries  <tdevries@suse.de>
664
665         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
666         unconditionally, to set the language of the symbol.  Manage freeing
667         returned pointer using gdb::unique_xmalloc_ptr.
668
669 2018-11-08  Tom Tromey  <tom@tromey.com>
670
671         * record.c (require_record_target): Upper-case "<TAB>".
672
673 2018-11-08  Tom Tromey  <tom@tromey.com>
674
675         * python/lib/gdb/command/pretty_printers.py
676         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
677
678 2018-11-08  Tom Tromey  <tom@tromey.com>
679
680         PR gdb/23555:
681         PR gdb/23838:
682         * target.h (target_supports_terminal_ours): Return bool.
683         * target.c (target_supports_terminal_ours): Handle case where
684         current_top_target returns nullptr.  Return bool.
685
686 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
687
688         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
689         return the correct count for potential HFAs.
690
691 2018-11-08  Jan Beulich  <jbeulich@suse.com>
692
693         * i387-tdep.c (i387_supply_xsave): Split handling of
694         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
695         (i387_collect_xsave): Likewise.
696
697 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
698
699         * riscv-tdep.c (riscv_insn::decode): Update header comment.
700         (riscv_frame_this_id): Catch errors thrown while building the
701         frame cache, leave the frame id as the default, which is the outer
702         frame id.
703
704 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
705
706         * ada-lang.c (read_atcb): Only set task_info->called_task if
707         task_info->state == Entry_Caller_Sleep.
708         (print_ada_task_info): Do not check task_info->state before
709         checking task_info->called_task.
710         (info_task): Likewise.
711
712 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
713
714         * ada-tasks.c (read_atcb): Clear task_info before computing
715         the value of each of its fields.
716
717 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
718
719         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
720         NULL before dereferencing it.
721
722 2018-11-06  Tom de Vries  <tdevries@suse.de>
723
724         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
725         program headers.
726
727 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
728
729         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
730         so that it applies to uclinux as well.
731
732 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
733
734         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
735         when on AAPCS.
736
737 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
738
739         * riscv-fbsd-nat.c (getregs_supplies): Return true for
740         RISCV_CSR_SSTATUS_REGNUM.
741
742 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
743
744         * source.c (open_source_file): Fix leak by transferring the
745         current s->fullname to the unique_xmalloc_ptr fullname given
746         to find_and_open_source.
747
748 2018-11-04  Tom Tromey  <tom@tromey.com>
749
750         * varobj.c (install_default_visualizer): Update.
751         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
752         Return gdbpy_ref.
753         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
754         (find_pretty_printer_from_progspace)
755         (find_pretty_printer_from_gdb, find_pretty_printer)
756         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
757         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
758         Update.
759
760 2018-11-04  Tom Tromey  <tom@tromey.com>
761
762         * python/python.c (gdbpy_parameter_value): Update.
763         * python/python-internal.h (python_string_to_unicode)
764         (python_string_to_target_python_string)
765         (host_string_to_python_string): Return gdbpy_ref.
766         * python/py-utils.c (python_string_to_unicode)
767         (unicode_to_encoded_python_string)
768         (unicode_to_target_python_string)
769         (python_string_to_target_string)
770         (python_string_to_target_python_string): Return gdbpy_ref.
771         (python_string_to_host_string): Update.
772         (host_string_to_python_string): Return gdbpy_ref.
773         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
774         (stpy_fullname): Update.
775         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
776         Update.
777         * python/py-prettyprint.c (print_string_repr): Update.
778         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
779         (objfpy_get_build_id): Update.
780         * python/py-breakpoint.c (bppy_get_location)
781         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
782         Update.
783
784 2018-11-04  Tom Tromey  <tom@tromey.com>
785
786         * python/python-internal.h (gdb_py_object_from_longest)
787         (gdb_py_object_from_ulongest): Return gdbpy_ref.
788         * python/py-value.c (valpy_int): Update.
789         * python/py-utils.c (gdb_py_object_from_longest): Return
790         gdbpy_ref.
791         (gdb_py_object_from_ulongest): Likewise.
792         * python/py-type.c (typy_get_alignof): Update.
793         * python/py-linetable.c (ltpy_get_all_source_lines)
794         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
795         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
796
797 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
798
799         * ada-lang.c (_initialize_ada_language): Fix typo.
800
801 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
802
803         * language.c (type): Remove.
804         (_initialize_language): Remove assignment to type.
805
806 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
807
808         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
809         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
810         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
811         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
812         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
813         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
814         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
815         and aarch64-ravenscar-thread.o.
816         * NEWS: Add entry documenting Ravenscar tasking support
817         on AArch64 ELF.
818
819 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
820
821         * symtab.c (info_functions_command): Initialize quiet flag.
822         * stack.c (info_args_command): Likewise.
823
824 2018-11-01  Jim Wilson  <jimw@sifive.com>
825
826         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
827         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
828         debugging messages.
829
830 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
831
832         * ada-lang.c (ada_watch_location_expression): New function.
833         (ada_language_defn): Set la_watch_location_expression to
834         ada_watch_location_expression.
835
836 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
837
838         * print-utils.c (int_string): Remove unnecessary trailing spaces.
839
840 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
841
842         * rs6000-tdep.c (skip_prologue): Fix potential negative left
843         shifting.
844
845 2018-11-01  Jerome Guitton  <guitton@adacore.com>
846             Joel Brobecker  <brobecker@adacore.com>
847
848         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
849         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
850         * arm-pikeos-tdep.c: New file.
851         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
852         embedded system.
853         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
854
855 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
856
857         * common/pathstuff.c (get_standard_temp_dir): New.
858         * common/pathstuff.h (get_standard_temp_dir): New.
859         * config.in: Re-generate.
860         * configure: Re-generate.
861         * configure.ac: Don't check for mkdtemp.
862         * gnulib/aclocal-m4-deps.mk: Re-generate.
863         * gnulib/aclocal.m4: Re-generate.
864         * gnulib/config.in: Re-generate.
865         * gnulib/configure: Re-generate.
866         * gnulib/import/Makefile.am: Re-generate.
867         * gnulib/import/Makefile.in: Re-generate.
868         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
869         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
870         * gnulib/import/m4/mkdtemp.m4: New file.
871         * gnulib/import/mkdtemp.c: New file.
872         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
873         Add mkdtemp module.
874         * unittests/mkdir-recursive-selftests.c (test): Use
875         get_standard_temp_dir.
876         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
877         ifdef.
878         * compile/compile.c (get_compile_file_tempdir): Likewise.
879
880 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
881
882         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
883         (SIG_FRAME_LR_OFFSET64): New define.
884         (SIG_FRAME_FP_OFFSET64): New define.
885         (aix_sighandle_frame_cache): New Function.
886         (aix_sighandle_frame_this_id): New Function.
887         (aix_sighandle_frame_prev_register): New Function.
888         (aix_sighandle_frame_sniffer): New Function.
889         (aix_sighandle_frame_unwind): New global variable.
890         (rs6000_aix_init_osabi): Install new frame unwinder.
891
892 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
893
894         PR gdb/23835
895         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
896         already defined.
897
898 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
899
900         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
901
902 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
903
904         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
905         (producer_is_icc): New function.
906         (check_producer): Set producer_is_icc field on dwarf2_cu.
907         (dwarf2_init_integer_type): New function.
908         (read_base_type): Call dwarf2_init_integer_type instead of
909         init_integer_type in all cases.
910         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
911         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
912         LEN is greater than 0.
913
914 2018-10-30  Tom Tromey  <tom@tromey.com>
915
916         * main.c (captured_main_1): Check return value of bfd_init.
917
918 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
919
920         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
921         Adjust comments.
922
923 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
924
925         * procfs.c: Include common/pathstuff.h.
926
927 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
928
929         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
930         Add missing braces.  No functional change.
931
932 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
933
934         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
935         to report a bad option and fix indentation.
936         * demangle.c (demangle_command): Use report_unrecognized_option_error
937         to report a bad option and correctly report the bad option.
938
939 2018-10-27  Tom Tromey  <tom@tromey.com>
940
941         PR cli/23364:
942         * darwin-nat.c (copied_shell): New global.
943         (may_have_sip): Rename from should_disable_startup_with_shell.
944         (copy_shell_to_cache, maybe_cache_shell): New functions.
945         (darwin_nat_target::create_inferior): Update.  Use
946         copied_shell.
947
948 2018-10-27  Tom Tromey  <tom@tromey.com>
949
950         * unittests/scoped_fd-selftests.c (test_to_file): New function.
951         (run_tests): Call test_to_file.
952         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
953         temporary files.
954         * common/scoped_fd.h (scoped_fd::to_file): New method.
955
956 2018-10-27  Tom Tromey  <tom@tromey.com>
957
958         * unittests/scoped_mmap-selftests.c (test_normal): Use
959         gdb_mkostemp_cloexec.
960         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
961         Use gdb_mkostemp_cloexec.
962         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
963         gnulib/config.in, gnulib/configure,
964         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
965         gnulib/import/m4/gnulib-cache.m4,
966         gnulib/import/m4/gnulib-comp.m4: Update.
967         * gnulib/import/m4/mkostemp.m4: New file.
968         * gnulib/import/m4/mkstemp.m4: Remove.
969         * gnulib/import/mkostemp.c: New file.
970         * gnulib/import/mkstemp.m4: Remove.
971         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
972         mkstemp, add mkostemp.  Apply new patch.
973         * gnulib/import/stdlib.in.h: Apply patch.
974         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
975         New file.
976         * dwarf-index-write.c (write_psymtabs_to_index): Use
977         gdb_mkostemp_cloexec.
978         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
979
980 2018-10-27  Tom Tromey  <tom@tromey.com>
981
982         * unittests/mkdir-recursive-selftests.c: New file.
983         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
984         unittests/mkdir-recursive-selftests.c.
985         * dwarf-index-cache.c (mkdir_recursive): Move to
986         common/filestuff.c.
987         (index_cache::store): Check return value of mkdir_recursive.
988         (create_dir_and_check, test_mkdir_recursive): Move to new file.
989         (_initialize_index_cache): Don't register test.
990         * common/filestuff.h (mkdir_recursive): Declare.
991         * common/filestuff.c (mkdir_recursive): Move from
992         dwarf-index-cache.c.  Return bool.
993
994 2018-10-27  Tom Tromey  <tom@tromey.com>
995
996         * dwarf-index-write.c (write_psymtabs_to_index): Move
997         make_temp_filename to common/pathstuff.c.
998         * common/pathstuff.h (make_temp_filename): Declare.
999         * common/pathstuff.c (make_temp_filename): New function, moved
1000         from dwarf-index-write.c.
1001
1002 2018-10-27  Tom Tromey  <tom@tromey.com>
1003
1004         * procfs.c (procfs_target::create_inferior): Use get_shell.
1005         * cli/cli-cmds.c (shell_escape): Use get_shell.
1006         * windows-nat.c (windows_nat_target::create_inferior): Use
1007         get_shell.
1008         * common/pathstuff.c (get_shell): New function.
1009         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1010         (fork_inferior): Use get_shell.
1011         * common/pathstuff.h (get_shell): Declare.
1012
1013 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1014
1015         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1016
1017 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1018
1019         * stack.c (print_variable_and_value_data): Add preg and treg.
1020         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1021         and update callers.
1022         (print_frame_arg_vars): Likewise.
1023         (prepare_reg): New function.
1024         (info_locals_command): Extract info print args and use them.
1025         (info_args_command): Likewise.
1026         (_initialize_stack): Modify on-line help.
1027         * symtab.c (treg_matches_sym_type_name): New function.
1028         (search_symbols): New arg t_regexp.
1029         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1030         (info_variables_command): Extract info print args and use them.
1031         (info_functions_command): Likewise.
1032         (info_types_command): Update call to symtab_symbol_info.
1033         (_initialize_symtab): Modify on-line help.
1034         * symtab.h (treg_matches_sym_type_name): New function.
1035         (search_symbols): New t_regexp arg.
1036
1037 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1038
1039         * cli-utils.c (extract_arg_maybe_quoted): New function.
1040         (extract_info_print_args): New function.
1041         (info_print_args_help): New function.
1042         (report_unrecognized_option_error): New function.
1043         * cli-utils.h (extract_arg_maybe_quoted): New function.
1044         (extract_info_print_args): New function.
1045         (info_print_args_help): New function.
1046         (report_unrecognized_option_error): New function.
1047
1048 2018-10-26  Tom Tromey  <tom@tromey.com>
1049
1050         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1051         (compute_compunit_symtab_includes): Update.
1052         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1053         (compunit_symtab_ptr): Likewise.
1054
1055 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1056
1057         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1058         default_print_auxv_entry for specific tag values.
1059
1060 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1061
1062         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1063
1064 2018-10-26  Jim Wilson  <jimw@sifive.com>
1065
1066         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1067         (riscv_linux_sigframe_init): Declare.
1068         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1069         (riscv_linux_sigframe): New.
1070         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1071         (riscv_linux_sigframe_init): Define.
1072         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1073
1074         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1075         (riscv_isa_flen): Likewise.  Drop static.
1076         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1077         (riscv_isa_flen): Likewise.  Declare.
1078
1079 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1080             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1081
1082         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1083         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1084         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1085         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1086         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1087         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1088         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1089         Define.
1090         (struct ppc_linux_features) <htm>: New field.
1091         (ppc_linux_no_features): Add initializer for htm field.
1092         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1093         new tdescs.
1094         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1095         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1096         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1097         Define if not already defined.
1098         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1099         and rs6000/powerpc-isa207-htm-vsx64l.
1100         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1101         rs6000/powerpc-isa207-htm-vsx64l.xml.
1102         * features/rs6000/power-htm-spr.xml: New file.
1103         * features/rs6000/power-htm-core.xml: New file.
1104         * features/rs6000/power64-htm-core.xml: New file.
1105         * features/rs6000/power-htm-fpu.xml: New file.
1106         * features/rs6000/power-htm-altivec.xml: New file.
1107         * features/rs6000/power-htm-vsx.xml: New file.
1108         * features/rs6000/power-htm-ppr.xml: New file.
1109         * features/rs6000/power-htm-dscr.xml: New file.
1110         * features/rs6000/power-htm-tar.xml: New file.
1111         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1112         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1113         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1114         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1115         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1116         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1117         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1118         fetch_regset with HTM regsets.
1119         (store_register, store_ppc_registers): Call store_regset with HTM
1120         regsets.
1121         (ppc_linux_nat_target::read_description): Set htm field in the
1122         features struct if needed.
1123         * ppc-linux-tdep.c: Include
1124         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1125         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1126         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1127         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1128         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1129         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1130         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1131         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1132         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1133         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1134         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1135         (ppc32_linux_ctarregset): New globals.
1136         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1137         (ppc_linux_collect_core_cpgrregset): New function.
1138         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1139         regsets.
1140         (ppc_linux_core_read_description): Check if the tm spr section is
1141         present and set htm in the features struct.
1142         (_initialize_ppc_linux_tdep): Call
1143         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1144         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1145         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1146         Declare.
1147         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1148         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1149         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1150         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1151         New fields.
1152         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1153         Likewise.
1154         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1155         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1156         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1157         New enum fields.
1158         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1159         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1160         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1161         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1162         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1163         <PPC_CTAR_REGNUM>: Likewise.
1164         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1165         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1166         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1167         (IS_CEFP_PSEUDOREG): Define.
1168         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1169         registers.  Return names for the checkpointed DFP, VSX, and EFP
1170         pseudo registers.
1171         (rs6000_pseudo_register_type): Remove initial assert and raise an
1172         internal error in the else clause instead.  Return types for the
1173         checkpointed DFP, VSX, and EFP pseudo registers.
1174         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1175         checkpointed DFP pseudo registers.
1176         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1177         checkpointed VSX pseudo registers.
1178         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1179         from efpr_pseudo_register_read and
1180         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1181         registers.
1182         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1183         Handle checkpointed DFP, VSX, and EFP registers.
1184         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1185         (efp_ax_pseudo_register_collect): New functions.
1186         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1187         register logic to new functions.  Handle checkpointed DFP, VSX,
1188         and EFP pseudo registers.
1189         (rs6000_gdbarch_init): Look for and validate the htm features.
1190         Include checkpointed DFP, VSX and EFP pseudo-registers.
1191         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1192         HTM registers.
1193
1194 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1195
1196         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1197         without altivec or fpu.
1198
1199 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1200             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1201
1202         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1203         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1204         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1205         Define if not already defined.
1206         * features/rs6000/power-ebb.xml: New file.
1207         * features/rs6000/power-linux-pmu.xml: New file.
1208         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1209         features.
1210         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1211         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1212         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1213         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1214         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1215         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1216         fetch_regset with ebb and pmu regsets.
1217         (store_register, store_ppc_registers): Call store_regset with ebb
1218         and pmu regsets.
1219         (ppc_linux_nat_target::read_description): Set isa207 field in the
1220         features struct if ebb and pmu are avaiable.
1221         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1222         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1223         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1224         and pmu regsets.
1225         (ppc_linux_core_read_description): Check if the pmu section is
1226         present and set isa207 in the features struct.
1227         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1228         (ppc32_linux_pmuregset): Declare.
1229         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1230         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1231         <ppc_sier_regnum>: New field.
1232         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1233         New enum values.
1234         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1235         values.
1236         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1237         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1238         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1239         ebb and pmu features.
1240
1241 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1242             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1243
1244         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1245         (tdesc_powerpc_isa207_vsx64l): Declare.
1246         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1247         (struct ppc_linux_features) <isa207>: New field.
1248         (ppc_linux_no_features): Add initializer for isa207 field.
1249         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1250         new tdescs.
1251         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1252         (NT_PPC_TAR): Define if not already defined.
1253         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1254         rs6000/powerpc-isa207-vsx64l.
1255         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1256         rs6000/powerpc-isa207-vsx64l.xml.
1257         * features/rs6000/power-tar.xml: New file.
1258         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1259         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1260         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1261         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1262         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1263         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1264         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1265         fetch_regset with the TAR regset.
1266         (store_register, store_ppc_registers): Call store_regset with the
1267         TAR regset.
1268         (ppc_linux_nat_target::read_description): Set isa207 field in the
1269         features struct if needed.
1270         * ppc-linux-tdep.c: Include
1271         features/rs6000/powerpc-isa207-vsx32l.c and
1272         features/rs6000/powerpc-isa207-vsx64l.c.
1273         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1274         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1275         regset.
1276         (ppc_linux_core_read_description): Check if the tar section is
1277         present and set isa207 in the features struct.
1278         (_initialize_ppc_linux_tdep): Call
1279         initialize_tdesc_powerpc_isa207_vsx32l and
1280         initialize_tdesc_powerpc_isa207_vsx64l.
1281         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1282         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1283         (enum) <PPC_TAR_REGNUM>: New enum value.
1284         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1285         feature.
1286         (ppc_process_record_op31): Record changes to TAR.
1287
1288 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1289             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1290
1291         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1292         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1293         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1294         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1295         (struct ppc_linux_features) <ppr_dscr>: New field.
1296         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1297         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1298         new tdescs.
1299         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1300         Define if not already defined.
1301         * features/Makefile (WHICH): Add
1302         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1303         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1304         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1305         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1306         * features/rs6000/power-dscr.xml: New file.
1307         * features/rs6000/power-ppr.xml: New file.
1308         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1309         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1310         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1311         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1312         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1313         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1314         * ppc-linux-nat.c: Include <sys/uio.h>.
1315         (fetch_regset, store_regset, check_regset): New functions.
1316         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1317         DSCR and PPR regsets.
1318         (store_register, store_ppc_registers): Call store_regset with
1319         DSCR and PPR regsets.
1320         (ppc_linux_get_hwcap2): New function.
1321         (ppc_linux_nat_target::read_description): Call
1322         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1323         features struct if needed.
1324         * ppc-linux-tdep.c: Include
1325         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1326         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1327         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1328         (ppc32_linux_dscrregset): New globals.
1329         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1330         and dscr regsets.
1331         (ppc_linux_core_read_description): Check if the ppr and dscr
1332         sections are present and set ppr_dscr in the features struct.
1333         (_initialize_ppc_linux_tdep): Call
1334         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1335         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1336         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1337         (ppc32_linux_dscrregset): Declare.
1338         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1339         <ppc_dscr_regnum>: New field.
1340         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1341         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1342         and dscr features.
1343         (ppc_process_record_op31): Record changes to PPR and DSCR.
1344
1345 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1346
1347         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1348         second initializer line for the have_* variables.  Initialize
1349         have_fpu to 0 instead of 1.
1350
1351 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1352
1353         * arch/ppc-linux-common.c (ppc_linux_match_description):
1354         Parenthesize tdesc assignements and indent them properly.
1355
1356 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1357
1358         * ppc-linux-nat.c (fetch_register): Change if statement to else
1359         if.
1360         (store_register): Likewise.
1361
1362 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1363
1364         * rs6000-tdep.c: Remove reggroups.h include.
1365         (rs6000_pseudo_register_reggroup_p): Remove.
1366         (rs6000_gdbarch_init): Remove call to
1367         set_tdesc_pseudo_register_reggroup_p.
1368
1369 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1370
1371         * reggroups.c (default_register_reggroup_p): Return true for
1372         decfloat registers and float_reggroup.
1373
1374 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1375
1376         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1377         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1378         ppc_linux_collect_vrregset by regcache_collect_regset.
1379
1380 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1381
1382         * linux-tdep.c (linux_collect_regset_section_cb): Use
1383         std::vector<gdb_byte> instead of char * and malloc for buf.
1384         Remove xfree.
1385
1386 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1387
1388         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1389         symtab_start instead of always using language_unknown.
1390
1391 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1392
1393         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1394         READ_P parameter, catch and ignore register access errors from
1395         either the old or new MISA location.
1396         (riscv_has_feature): Update call to riscv_read_misa_reg.
1397
1398 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1399
1400         * python/py-function.c (convert_values_to_python): Return
1401         gdbpy_ref<>.  Add header comment.
1402         (fnpy_call): Adjust.
1403
1404 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1405
1406         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1407         (cmdpy_completer_handle_brkchars): Adjust.
1408         (cmdpy_completer): Adjust.
1409
1410 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1411
1412         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1413         Pass correct regnum to raw_supply_zeroed.
1414
1415 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1416
1417         * regcache.c (cooked_read_test): Add CSKY to the list of
1418         architectures with a save_reggroup
1419
1420 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
1421
1422         PR gdb/23368
1423         * infrun.c (follow_exec): In the follow_exec_mode_new case,
1424         transfer terminal state from old new new inferior.
1425         * terminal.h (swap_terminal_info): New function.
1426         * inflow.c (swap_terminal_info): New function.
1427
1428 2018-10-23  Tom Tromey  <tom@tromey.com>
1429
1430         * record-btrace.c (get_thread_current_frame_id): Rename from
1431         get_thread_current_frame.  Return a frame_id.
1432         (record_btrace_start_replaying): Update.
1433
1434 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1435
1436         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
1437         for CSRs.
1438
1439 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
1440
1441         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
1442         have_nonsteppable_watchpoint attribute to 1.
1443
1444 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1445
1446         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
1447         register names.
1448         (struct register_alias): Rename to...
1449         (struct riscv_register_alias): ...this, and update comment.
1450         (riscv_register_aliases): Update type, and alias names.  Remove
1451         CSR names from this list.
1452         (riscv_register_name): Use riscv_gdb_reg_names for int and float
1453         register names.  Add an extra assertion.
1454         (riscv_is_regnum_a_named_csr): New function.
1455         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
1456
1457 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
1458
1459         * configure.tgt: Add configuration for s12z.
1460         * s12z-tdep.c:  New file.
1461         * NEWS: Mention new target.
1462
1463 2018-10-22  Jim Wilson  <jimw@sifive.com>
1464
1465         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
1466         FP reg smaller than FP reg size, and fill with -1 instead of 0.
1467
1468         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
1469         (riscv_register_type): Use them.
1470         (riscv_print_one_register_info): Handle union of floats same as float.
1471         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
1472         riscv_fpreg_q_type fields.
1473
1474 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1475
1476         * gdbarch.sh (gdbarch_num_cooked_regs): New.
1477         * gdbarch.h: Re-generate.
1478         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
1479         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
1480         * eval.c (evaluate_subexp_standard): Likewise.
1481         * findvar.c (value_of_register): Likewise.
1482         (value_of_register_lazy): Likewise.
1483         (address_from_register): Likewise.
1484         * frame.c (get_frame_register_bytes): Likewise.
1485         * gdbarch-selftests.c (register_to_value_test): Likewise.
1486         * h8300-tdep.c (h8300_register_type): Likewise.
1487         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
1488         (i386_svr4_reg_to_regnum): Likewise.
1489         * infcmd.c (default_print_registers_info): Likewise.
1490         (registers_info): Likewise.
1491         (print_vector_info): Likewise.
1492         (default_print_float_info): Likewise.
1493         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
1494         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
1495         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
1496         (mi_cmd_data_list_changed_registers): Likewise.
1497         (mi_cmd_data_list_register_values): Likewise.
1498         (mi_cmd_data_write_register_values): Likewise.
1499         (mi_cmd_trace_frame_collected): Likewise.
1500         * mips-tdep.c (print_gp_register_row): Likewise.
1501         (mips_print_registers_info): Likewise.
1502         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1503         * regcache.c (init_regcache_descr): Likewise.
1504         (register_size): Likewise.
1505         (register_dump::dump): Likewise.
1506         (cooked_read_test): Likewise.
1507         (cooked_write_test): Likewise.
1508         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
1509         (rs6000_gdbarch_init): Likewise.
1510         * stabsread.c (stab_reg_to_regnum): Likewise.
1511         * stack.c (info_frame_command): Likewise.
1512         * target-descriptions.c (tdesc_register_name): Likewise.
1513         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
1514         * tui/tui-regs.c (tui_show_register_group): Likewise.
1515         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
1516         (user_reg_map_regnum_to_name): Likewise.
1517         (value_of_user_reg): Likewise.
1518         (maintenance_print_user_registers): Likewise.
1519         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
1520         (xtensa_register_name): Likewise.
1521         (xtensa_register_type): Likewise.
1522         (xtensa_reg_to_regnum): Likewise.
1523         (xtensa_pseudo_register_read): Likewise.
1524         (xtensa_pseudo_register_write): Likewise.
1525
1526 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1527
1528         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
1529         correctly-sized buffer with raw_read.
1530         (amd64_pseudo_register_write): Use correctly-sized buffer for
1531         raw_read/raw_write.
1532
1533 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1534
1535         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
1536         in add_prefix_cmd of set print type.
1537
1538 2018-10-19  Tom Tromey  <tom@tromey.com>
1539
1540         PR tui/18388:
1541         * NEWS: Mention tabset deprecation.
1542         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
1543         (update_tab_width): New function.
1544         (tui_set_tab_width, tui_show_tab_width): New functions.
1545         (tui_set_tab_width_command): Use update_tab_width.
1546         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
1547         Add new "set tui tab-width" command.
1548         * tui/tui-source.c (tui_set_source_content): Update.
1549         * tui/tui-disasm.c (tui_set_disassem_content): Update.
1550         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
1551         Don't declare.
1552         (tui_tab_width): Declare.
1553         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
1554         (tui_set_default_tab_len): Remove.
1555
1556 2018-10-19  Tom Tromey  <tom@tromey.com>
1557
1558         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
1559         (key_is_backspace, tui_getc): Don't declare.
1560         * tui/tui-io.c (key_is_start_sequence): Now static.
1561         (key_is_end_sequence, key_is_backspace): Remove.
1562         (tui_getc): Now static.
1563
1564 2018-10-19  Tom Tromey  <tom@tromey.com>
1565
1566         * symfile.c (reread_symbols): Clear "static_links".
1567
1568 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
1569
1570         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
1571         define.
1572         (aarch64_linux_sigframe_init): Extra boundary checks.
1573
1574 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
1575
1576         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
1577         the possibly non-existent tdesc type 'vec128', but the type of raw
1578         register v16 instead.
1579
1580 2018-10-19  Gary Benson <gbenson@redhat.com>
1581
1582         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
1583
1584 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
1585
1586         PR cli/23785
1587         * cli/cli-dump.c (restore_binary_file): Check if "file" is
1588         NULL.
1589
1590 2018-10-17  Paul Koning  <paul_koning@dell.com>
1591
1592         * charset.c (convert_between_encodings): Fix unsigned overflow.
1593
1594 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
1595
1596         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
1597         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
1598         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
1599         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1600         New functions.
1601         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
1602         and fbsd_info_proc_mappings_header.
1603         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
1604         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1605         New.
1606
1607 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
1608
1609         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
1610         Solaris Maintainer.
1611
1612 2018-10-15  Tom Tromey  <tom@tromey.com>
1613
1614         * tui/tui.c (strcat_to_buf): Remove casts.
1615         * tui/tui-winsource.c (tui_show_source_line)
1616         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
1617         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
1618         * tui/tui-windata.c (tui_first_data_item_displayed)
1619         (tui_delete_data_content_windows, tui_erase_data_content)
1620         (tui_display_all_data, tui_display_data_from)
1621         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
1622         * tui/tui-win.c (tui_set_win_height)
1623         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
1624         casts.
1625         * tui/tui-win.c (tui_resize_all): Remove casts.
1626         (tui_scroll_backward_command, tui_set_focus)
1627         (tui_set_tab_width_command): Likewise.
1628         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
1629         * tui/tui-regs.c (tui_show_register_group): Remove cast.
1630         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
1631         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
1632         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
1633         Remove casts.
1634
1635 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1636
1637         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
1638         AArch64/ARM maintainer.
1639
1640 2018-10-11  Gary Benson <gbenson@redhat.com>
1641
1642         * interps.h (interp::m_name): Make private and mutable.
1643         * interps.c (interp::~interp): Free m_name.
1644
1645 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1646             Simon Marchi <simark@simark.ca>
1647
1648         * README (`configure' options): Add documentation for new
1649         "--enable-unit-tests" option.
1650         * acinclude.m4: Include "selftest.m4".
1651         * configure: Regenerate.
1652         * configure.ac: Use "GDB_AC_SELFTEST".
1653         * maint.c (maintenance_selftest): Update message informing
1654         that selftests have been disabled.
1655         (maintenance_info_selftests): Likewise.
1656         * selftest.m4: New file.
1657
1658 2018-10-10  Gary Benson <gbenson@redhat.com>
1659
1660         * remote.c (remote_target::remote_send_printf): Add
1661         missing va_end found by Coverity.
1662
1663 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
1664
1665         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
1666
1667 2018-10-09  Tom Tromey  <tom@tromey.com>
1668
1669         * configure: Rebuild.
1670         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
1671         * NEWS: Update --enable-ubsan documentation.
1672
1673 2018-10-09  Gary Benson <gbenson@redhat.com>
1674
1675         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
1676         found by Coverity.
1677
1678 2018-10-08  Tom Tromey  <tom@tromey.com>
1679
1680         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
1681         variable.
1682         (riscv_fbsd_init_abi): Likewise.
1683
1684 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1685         * valops.c (value_struct_elt_for_reference): Rename local variable
1686         to work around the shadowing a previous local warning.
1687
1688 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1689
1690         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
1691         * NEWS: Mention new FreeBSD/riscv native configuration.
1692         * configure.host: Add riscv*-*-freebsd*.
1693         * configure.nat: Likewise.
1694         * riscv-fbsd-nat.c: New file.
1695
1696 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1697
1698         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
1699         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
1700         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
1701         * NEWS: Mention new FreeBSD/riscv target.
1702         * configure.tgt: Add riscv*-*-freebsd*.
1703         * riscv-fbsd-tdep.c: New file.
1704         * riscv-fbsd-tdep.h: New file.
1705
1706 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1707
1708         * regcache.h (struct regcache_map_entry): Note that this type can
1709         be used with traditional frame caches.
1710         * trad-frame.c (trad_frame_set_reg_regmap): New.
1711         * trad-frame.h (trad_frame_set_reg_regmap): New.
1712
1713 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1714
1715         PR c++/16841
1716         * valops.c (get_virtual_base_offset): New function.
1717         (value_struct_elt_for_reference): Use it to get virtual base offset
1718         and add it in calculating class member address.
1719
1720 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
1721
1722         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1723         (check_producer): Check if the producer is codewarrior.
1724         (producer_is_codewarrior): New function.
1725         (lnp_state_machine::record_line): Ignore is_stmt flag for records
1726         produced by codewarrior.
1727         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1728
1729 2018-10-06  Tom Tromey  <tom@tromey.com>
1730
1731         PR python/19399:
1732         * python/py-inferior.c: Add "architecture" entry.
1733         (infpy_architecture): New function.
1734
1735 2018-10-06  Tom Tromey  <tom@tromey.com>
1736
1737         PR python/21765:
1738         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1739         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1740         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
1741         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1742
1743 2018-10-06  Tom Tromey  <tom@tromey.com>
1744
1745         PR build/17077:
1746         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1747         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1748         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1749         #include.
1750
1751 2018-10-06  Tom Tromey  <tom@tromey.com>
1752
1753         * python/py-breakpoint.c (bppy_get_location): Handle a
1754         bp_breakpoint without a location.
1755
1756 2018-10-06  Tom Tromey  <tom@tromey.com>
1757
1758         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1759         (_RegEx): Reformat help text.
1760         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1761         (AnyCallerIs, AnyCallerMatches): Reformat help text.
1762         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1763         text.
1764         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1765         (EnableXMethod, DisableXMethod): Remove help indentation.
1766         Capitalize meta-syntactic variables.
1767         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1768         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1769         Capitalize meta-syntactic variables.
1770         * python/lib/gdb/command/explore.py (ExploreCommand)
1771         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1772         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1773         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1774         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1775         Remove help indentation.
1776         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1777         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1778         (DisableFrameFilter, SetFrameFilterPriority)
1779         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1780
1781 2018-10-06  Tom Tromey  <tom@tromey.com>
1782
1783         PR tui/28819:
1784         * tui/tui-io.c (gdb_wgetch): New function.
1785         (tui_mld_getc, tui_getc): Use it.
1786
1787 2018-10-05  Tom Tromey  <tom@tromey.com>
1788
1789         * sol-thread.c (sol_thread_target::wait): Rename inner
1790         "save_ptid".
1791
1792 2018-10-04  Tom Tromey  <tom@tromey.com>
1793
1794         * configure: Rebuild.
1795         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1796
1797 2018-10-04  Tom Tromey  <tom@tromey.com>
1798
1799         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1800         declaration of "block".
1801
1802 2018-10-04  Tom Tromey  <tom@tromey.com>
1803
1804         * common/filestuff.c (fdwalk): Remove inner declaration of
1805         "result".
1806
1807 2018-10-04  Tom Tromey  <tom@tromey.com>
1808
1809         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1810         "structs_addr" and hoist declaration.
1811
1812 2018-10-04  Tom Tromey  <tom@tromey.com>
1813
1814         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1815         variable "size".
1816
1817 2018-10-04  Tom Tromey  <tom@tromey.com>
1818
1819         * mdebugread.c (parse_partial_symbols): Use std::string.
1820
1821 2018-10-04  Tom Tromey  <tom@tromey.com>
1822
1823         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1824         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1825         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1826         header.
1827         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1828         more inner scope.
1829         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1830         * varobj.c (varobj_update): Rename inner "newobj",
1831         "type_changed".
1832         * valprint.c (generic_emit_char): Rename inner "buf".
1833         * valops.c (find_overload_match): Rename inner "temp".
1834         (value_struct_elt_for_reference): Declare "v" in more inner
1835         scope.
1836         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1837         * unittests/array-view-selftests.c (run_tests): Rename inner
1838         "vec".
1839         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1840         header.
1841         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1842         "tsv" in more inner scope.
1843         (print_one_static_tracepoint_marker): Rename inner
1844         "tuple_emitter".
1845         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1846         (tic6x_push_dummy_call): Don't redeclare "addr".
1847         * target-float.c: Declare "dto" lower.
1848         * symtab.c (lookup_local_symbol): Rename inner "sym".
1849         (find_pc_sect_line): Rename inner "pc".
1850         * stack.c (print_frame): Don't redeclare "gdbarch".
1851         (return_command): Rename inner "gdbarch".
1852         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1853         "sp".
1854         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1855         header.
1856         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1857         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1858         scope.
1859         * remote.c (remote_target::update_thread_list): Don't redeclare
1860         "tp".
1861         (remote_target::process_initial_stop_replies): Rename inner
1862         "thread".
1863         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1864         (remote_target::wait_as): Don't redeclare "stop_reply".
1865         (remote_target::get_thread_local_address): Rename inner
1866         "result".
1867         (remote_target::get_tib_address): Likewise.
1868
1869         * regcache.c (cooked_read_test): Rename "regnum".
1870         * record-btrace.c (cmd_record_btrace_start): Rename inner
1871         "exception".
1872         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1873         loop header.
1874         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1875         header.
1876         (ppu2spu_sniffer): Rename inner "buf".
1877         * parse.c (operator_check_standard): Rename inner "type",
1878         "objfile".
1879         * p-valprint.c (pascal_val_print): Introduce new scope for
1880         "low_bound", "high_bound".
1881         * p-exp.y (yylex): Declare "i" in loop header.
1882         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1883         Lower declaration of "s".
1884         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1885         header.
1886         (nios2_push_dummy_call): Rename "len".
1887         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1888         "buf".
1889         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1890         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1891         (linux_xfer_osdata_modules): Likewise.
1892         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1893         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1894         (mips_o64_push_dummy_call): Likewise.
1895         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1896         "op".
1897         * mi/mi-main.c (list_available_thread_groups): Rename inner
1898         "tuple_emitter".
1899         (mi_cmd_data_read_memory): Rename inner "opts".
1900         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1901         "tuple_emitter".
1902         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1903         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1904         more inner scope.
1905         (parse_partial_symbols): Rename inner "pst", "p", "name"
1906         * main.c (captured_main_1): Rename inner "i"s.
1907         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1908         "oso2".
1909         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1910         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1911         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1912         (handle_signal_stop): Rename inner "gdbarch".
1913         (handle_command): Declare "signum" in loop header.
1914         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1915         "status".
1916         (examine_prologue): Rename inner "sol" and "sof".
1917         (ia64_extract_return_value): Rename inner "val".  Declare another
1918         "val" in a more inner scope.
1919         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1920         inner scope.
1921         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1922         "except".
1923         * findvar.c (default_read_var_value): Don't redeclare "addr".
1924         * f-exp.y (yylex): Declare "i" in loop header.
1925         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1926         Rename inner "type", "expect_type".
1927         (evaluate_subexp_for_sizeof): Rename inner "pc".
1928         * elfread.c (elf_symfile_read): Rename inner "abfd".
1929         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1930         "bytes_read".
1931         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1932         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1933         (dwarf_decode_line_header): Rename inner "lh".
1934         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1935         "offset".  Declare "i" in loop header.
1936         (disassemble_dwarf_expression): Rename inner "addr_size".
1937         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1938         inner "result".
1939         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1940         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1941         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1942         "inner_list_emitter".
1943         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1944         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1945         declaration in a block.
1946         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1947         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1948         "obstack_final_size".
1949         * cp-support.c (inspect_type): Declare "i" in loop header.
1950         * compile/compile.c (compile_instance::insert_symbol_error):
1951         Rename inner "e".
1952         * common/agent.c (agent_run_command): Remove inner "ret"
1953         declaration.
1954         * coffread.c (coff_symfile_read): Rename inner "name".
1955         (coff_symfile_read): Rename inner "abfd".
1956         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1957         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1958         "high".
1959         * c-exp.y (lex_one_token): Move "len" declaration lower.
1960         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1961         "gdbarch".
1962         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1963         "b".
1964         (watch_command_1): Declare "mark" later.
1965         (clear_command): Don't shadow "a" or "b".
1966         (delete_command): Rename inner "b".
1967         (delete_trace_command): Likewise.
1968         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1969         "op".
1970         (arm_gdbarch_init): Remove inner "e_flags".
1971         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1972         "offset" in inner blocks.
1973
1974 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1975
1976         * dwarf-index-write.c (file_write): Don't write if the vector is
1977         empty.
1978
1979 2018-10-05  Tom de Vries  <tdevries@suse.de>
1980
1981         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1982         PyArg_ParseTuple call.
1983
1984 2018-10-05  Tom de Vries  <tdevries@suse.de>
1985
1986         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1987         PyArg_ParseTuple call.
1988
1989 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1990
1991         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1992         to avoid exceeding 80 characters per line limit.
1993
1994 2018-10-04  Tom Tromey  <tom@tromey.com>
1995
1996         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1997         (reread_symbols): Update.
1998         * complaints.h (clear_complaints): Remove argument.
1999         * complaints.c (enum complaint_series): Remove.
2000         (series): Remove global.
2001         (complaint_internal): Update.
2002         (clear_complaints): Remove argument.
2003
2004 2018-10-04  Tom Tromey  <tom@tromey.com>
2005
2006         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2007         debugging symbols" message if there is a separate debug objfile.
2008
2009 2018-10-04  Tom Tromey  <tom@tromey.com>
2010
2011         PR cli/19551:
2012         * symfile.c (symbol_file_add_with_addrs): Update output.
2013         * psymtab.c (require_partial_symbols): Update output.
2014
2015 2018-10-04  Tom Tromey  <tom@tromey.com>
2016
2017         PR cli/22234:
2018         * complaints.c: Emit \n.
2019
2020 2018-10-04  Tom Tromey  <tom@tromey.com>
2021
2022         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2023         (separate_debug_file_exists, find_separate_debug_file)
2024         (add_symbol_file_command, reread_symbols, allocate_symtab)
2025         (allocate_compunit_symtab): Use filtered printing, not
2026         unfiltered.
2027         * psymtab.c (require_partial_symbols, dump_psymtab)
2028         (allocate_psymtab): Use filtered printing, not unfiltered.
2029
2030 2018-10-04  Tom Tromey  <tom@tromey.com>
2031
2032         * complaints.c (complaint_internal): Correctly check complaint
2033         count.
2034
2035 2018-10-04  Tom Tromey  <tom@tromey.com>
2036
2037         * complaints.h (struct complaints): Remove declaration.
2038         * complaints.c (clear_complaints): Remove an unused variable.
2039
2040 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2041
2042         * MAINTAINERS (Write After Approval): Add self.
2043
2044 2018-10-03  Tom Tromey  <tom@tromey.com>
2045
2046         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2047         "buffer_contents".
2048         * coffread.c (coff_symtab_read): Initialize "newobj".
2049
2050 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2051
2052         * dwarf2read.c (read_func_scope): Remove struct keyword in
2053         range-based for.
2054
2055 2018-10-03  Tom Tromey  <tom@tromey.com>
2056
2057         * README: Mention --enable-ubsan.
2058         * NEWS: Mention --enable-ubsan.
2059         * acinclude.m4: Include sanitize.m4.
2060         * configure: Rebuild.
2061         * configure.ac: Call AM_GDB_UBSAN.
2062         * sanitize.m4: New file.
2063
2064 2018-10-03  Tom Tromey  <tom@tromey.com>
2065
2066         * expression.h (enum exp_opcode): Use uint8_t as base type.
2067         * expprint.c (op_name): Handle invalid opcodes.
2068
2069 2018-10-03  Tom Tromey  <tom@tromey.com>
2070
2071         * parse.c (prefixify_expression): Add assert.
2072         (parse_exp_in_context_1): Throw exception if the expression is
2073         empty.
2074
2075 2018-10-03  Tom Tromey  <tom@tromey.com>
2076
2077         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2078
2079 2018-10-03  Tom Tromey  <tom@tromey.com>
2080
2081         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2082
2083 2018-10-03  Tom Tromey  <tom@tromey.com>
2084
2085         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2086         unsigned.
2087
2088 2018-10-03  Tom Tromey  <tom@tromey.com>
2089
2090         * findvar.c (extract_integer): Do work in an unsigned type.
2091
2092 2018-10-03  Tom Tromey  <tom@tromey.com>
2093
2094         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2095         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2096         base type.
2097         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2098         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2099         type.
2100         * c-lang.h (enum c_string_type_values): Use unsigned as base
2101         type.
2102         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2103
2104 2018-10-03  Tom Tromey  <tom@tromey.com>
2105
2106         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2107         <~dwarf2_frame_state_reg_info>: Update.
2108         <dwarf2_frame_state_reg_info>: Update.
2109         <alloc_regs>: Add assertion.  Update.
2110         <reg>: Now a std::vector.
2111         <num_regs>: Remove.
2112         <swap>: Update.
2113         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2114         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2115
2116 2018-10-03  Tom Tromey  <tom@tromey.com>
2117
2118         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2119
2120 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2121
2122         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2123
2124 2018-10-02  Tom Tromey  <tom@tromey.com>
2125
2126         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2127
2128 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2129
2130         * NEWS: Mention changed commands.
2131         * ser-uds.c: New file.
2132         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2133         * configure: Regenerate.
2134         * Makefile.in: Add new file.
2135         * serial.c (serial_open): Check if filename is a socket
2136         and lookup the appropriate interface accordingly.
2137
2138 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2139
2140         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2141         define.
2142         (AARCH64_EXTRA_MAGIC): Likewise.
2143         (AARCH64_FPSIMD_MAGIC): Likewise.
2144         (AARCH64_SVE_MAGIC): Likewise.
2145         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2146         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2147         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2148         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2149         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2150         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2151         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2152         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2153         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2154         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2155         (read_aarch64_ctx): Add function.
2156         (aarch64_linux_sigframe_init): Detect FP registers.
2157
2158 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2159
2160         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2161         (AARCH64_D0_REGNUM): Likewise.
2162         (AARCH64_S0_REGNUM): Likewise.
2163         (AARCH64_H0_REGNUM): Likewise.
2164         (AARCH64_B0_REGNUM): Likewise.
2165         (AARCH64_SVE_V0_REGNUM): Likewise.
2166         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2167         (AARCH64_D0_REGNUM): Likewise.
2168         (AARCH64_S0_REGNUM): Likewise.
2169         (AARCH64_H0_REGNUM): Likewise.
2170         (AARCH64_B0_REGNUM): Likewise.
2171         (AARCH64_SVE_V0_REGNUM): Likewise.
2172
2173 2018-10-01  Gary Benson <gbenson@redhat.com>
2174
2175         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2176         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2177         prfpregset_t instead of gdb_prfpregset_t.
2178         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2179         * configure, config.in: Rebuild.
2180
2181 2018-10-01  Gary Benson <gbenson@redhat.com>
2182
2183         * common/gdb_proc_service.h: New file, factored out from...
2184         * gdb_proc_service.h: Moved common code to the above file.
2185         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2186
2187 2018-10-01  Gary Benson <gbenson@redhat.com>
2188
2189         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2190         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2191
2192 2018-10-01  Gary Benson <gbenson@redhat.com>
2193
2194         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2195         (AC_CHECK_HEADERS): Check for linux/elf.h.
2196         * configure, config.in: Rebuild.
2197         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2198         doesn't define elf_fpregset_t.
2199
2200 2018-10-01  Gary Benson <gbenson@redhat.com>
2201
2202         * gdb_proc_service.h: Whitespace change.
2203
2204 2018-10-01  Tom Tromey  <tom@tromey.com>
2205
2206         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2207         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2208         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2209
2210 2018-10-01  Tom Tromey  <tom@tromey.com>
2211
2212         * README: Minor change.
2213
2214 2018-09-30  Pedro Alves  <palves@redhat.com>
2215
2216         * darwin-nat-info.c (darwin_debug_regions_recurse)
2217         (info_mach_exceptions_command): Remove unused local variables.
2218         * darwin-nat.c (darwin_decode_notify_message)
2219         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2220         (darwin_stop_inferior, darwin_setup_exceptions)
2221         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2222         (darwin_nat_target::attach, darwin_nat_target::detach)
2223         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2224         local variables.
2225         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2226         variables.
2227
2228 2018-09-29  Tom Tromey  <tom@tromey.com>
2229
2230         * README: Remove some leftover text.
2231
2232 2018-09-29  Tom Tromey  <tom@tromey.com>
2233
2234         * PROBLEMS: Rewrite.
2235         * README: Update.
2236
2237 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2238
2239         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2240         case with explicit breakpoint kind.
2241         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2242         'additional_info' and related logic.
2243         (riscv_debug_breakpoints): New variable.
2244         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2245         instruction to determine the breakpoint kind.
2246         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2247         flag.  Update description of 'set/show riscv
2248         use-compressed-breakpoints' flag.
2249
2250 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2251
2252         (NEWS): Mention changes to frame related commands.
2253         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2254         (add_prefix_cmd_suppress_notification): New function.
2255         (add_com_suppress_notification): Call
2256         add_cmd_suppress_notification.
2257         * command.h (add_cmd_suppress_notification): Declare.
2258         (add_prefix_cmd_suppress_notification): Declare.
2259         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2260         (parse_frame_specification): Moved from stack.c, with
2261         simplification to handle a single argument.
2262         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2263         switch to the selected frame.  Add a header comment.
2264         * stack.c: Remove 'safe-ctype.h' include.
2265         (find_frame_for_function): Add declaration.
2266         (find_frame_for_address): New function.
2267         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2268         (frame_selection_by_function_completer): New function.
2269         (info_frame_command): Rename to...
2270         (info_frame_command_core): ...this, and update parameter types.
2271         (select_frame_command): Rename to...
2272         (select_frame_command_core): ...this, and update parameter types.
2273         (frame_command): Rename to...
2274         (frame_command_core): ...this, and update parameter types.
2275         (class frame_command_helper): New class to wrap implementations of
2276         frame related sub-commands.
2277         (frame_apply_cmd_list): New static global.
2278         (frame_cmd_list): Make static.
2279         (select_frame_cmd_list): New global for sub-commands.
2280         (info_frame_cmd_list): New global for sub-commands.
2281         (_initialize_stack): Register sub-commands for 'frame',
2282         'select-frame', and 'info frame'.  Update 'frame apply' commands
2283         to use frame_apply_cmd_list.  Move function local static
2284         frame_apply_list to file static frame_apply_cmd_list for
2285         consistency.
2286         * stack.h (select_frame_command): Delete declarationn.
2287         (select_frame_for_mi): Declare new function.
2288
2289 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2290
2291         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2292         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2293         and NOP.
2294
2295 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2296
2297         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2298
2299 2018-09-26  Tom Tromey  <tom@tromey.com>
2300
2301         * valops.c (auto_abandon): Remove dead code.
2302
2303 2018-09-26  Tom Tromey  <tom@tromey.com>
2304
2305         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2306
2307 2018-09-24  Tom Tromey  <tom@tromey.com>
2308
2309         * common/pathstuff.c (get_standard_cache_dir): Make
2310         "xdg_cache_home" and "home" const.
2311         * top.c (init_history): Make "tmpenv" const.
2312         * main.c (get_init_files): Make "homedir" const.
2313
2314 2018-09-23  Tom Tromey  <tom@tromey.com>
2315
2316         PR python/18852:
2317         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2318
2319 2018-09-23  Tom Tromey  <tom@tromey.com>
2320
2321         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2322         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2323         * python/python-internal.h (gdbpy_handle_exception): Declare.
2324         * python/py-utils.c (gdbpy_handle_exception): New function.
2325
2326 2018-09-23  Tom Tromey  <tom@tromey.com>
2327
2328         PR python/17284:
2329         * python/py-type.c (typy_template_argument): Check for negative
2330         argument number.
2331
2332 2018-09-23  Tom Tromey  <tom@tromey.com>
2333
2334         PR python/14062:
2335         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2336
2337 2018-09-23  Tom Tromey  <tom@tromey.com>
2338
2339         PR python/18170:
2340         * python/py-value.c (valpy_int): Allow conversion from pointer
2341         type.
2342
2343 2018-09-23  Tom Tromey  <tom@tromey.com>
2344
2345         PR python/20126:
2346         * python/py-value.c (valpy_int): Respect type sign.
2347
2348 2018-09-23  Tom Tromey  <tom@tromey.com>
2349
2350         PR python/18352;
2351         * python/py-value.c (valpy_float): Allow conversions from int or
2352         char.
2353         (valpy_int, valpy_long): Allow conversions from float.
2354
2355 2018-09-23  Tom Tromey  <tom@tromey.com>
2356
2357         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2358         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2359
2360 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2361
2362         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2363         __sighndlr.
2364         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2365
2366 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2367
2368         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2369         target_terminal::ours().
2370
2371 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2372
2373         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2374         of vl to ULONGEST.
2375
2376 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2377
2378         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2379         redundant condition.
2380
2381 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2382
2383         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2384
2385         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2386         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2387         * sol-thread.c (ps_pdmodel): Don't guard definition.
2388
2389         * procfs.c: Fix formatting.
2390
2391         * procfs.c (sysset_t_alloc): Remove.
2392         (create_procinfo): Use XNEW instead of sysset_t_alloc.
2393         (procfs_debug_inferior): Likewise.
2394         (procfs_set_exec_trap): Likewise.
2395         (proc_set_traced_sysentry): Don't allocate argp dynamically.
2396         (proc_set_traced_sysexit): Likewise.
2397
2398         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2399         (dead_procinfo): Likewise.
2400         (proc_warn): Likewise.
2401         (proc_error): Likewise.
2402         (proc_get_LDT_entry): Likewise.
2403         (do_attach): Likewise.
2404         (procfs_target::pid_to_str): Likewise.
2405         (iterate_over_mappings): Likewise.
2406
2407         * procfs.c (create_procinfo): Fix ARI warning.
2408         (proc_get_status): Likewise.
2409         (proc_stop_process): Likewise.
2410         (proc_run_process): Likewise.
2411         (proc_kill): Likewise.
2412         (proc_get_LDT_entry): Likewise.
2413         (procfs_find_LDT_entry): Likewise.
2414         (proc_update_threads): Likewise.
2415         (proc_iterate_over_threads): Likewise.
2416         (do_attach): Likewise.
2417         (procfs_xfer_memory): Likewise.
2418         (invalidate_cache): Likewise.
2419         (procfs_target::resume): Likewise.
2420         (procfs_init_inferior): Likewise.
2421         (procfs_set_exec_trap): Likewise.
2422         (procfs_target::thread_alive): Likewise.
2423         (procfs_target::pid_to_exec_file): Likewise.
2424         (iterate_over_mappings): Likewise.
2425         (procfs_target::make_corefile_notes): Likewise.
2426         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2427
2428         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
2429         (procfs_find_LDT_entry): Likewise.
2430         * sol-thread.c (ps_lgetLDT): Likewise.
2431
2432 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2433
2434         PR tdep/17903
2435         * procfs.c (procfs_target): Declare pid_to_exec_file.
2436         (procfs_target::pid_to_exec_file): New.
2437
2438 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2439
2440         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
2441         renaming.
2442         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
2443         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
2444
2445 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2446
2447         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
2448         (supply_fpregset, fill_fpregset): Move ...
2449         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
2450         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
2451         Remove references to ioctl-based procfs.
2452         Include <sys/reg.h>.
2453         Remove PR_MODEL_NATIVE guards.
2454         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
2455         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
2456
2457 2018-09-19  Xavier Roirand  <roirand@adacore.com>
2458
2459         PR gdb/20981:
2460         * solib-darwin.c (darwin_get_dyld_bfd): New function.
2461         (darwin_solib_get_all_image_info_addr_at_init): Update call.
2462         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
2463
2464 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
2465
2466         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
2467         (fbsd_print_sockaddr_in6): Likewise.
2468
2469 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
2470             Chris January  <chris.january@arm.com>
2471
2472         * eval.c (skip_undetermined_arglist): Skip argument list helper.
2473         (evaluate_subexp_standard): Return a dummy type when
2474         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
2475         OP_F77_UNDETERMINED_ARGLIST case.
2476         * expression.h (enum noside): Update comment.
2477
2478 2018-09-19  George Vasick <george.vasick@oracle.com>
2479
2480         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
2481
2482 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
2483             April Chin <april.chin@oracle.com>
2484             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2485
2486         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
2487         uint_t lwpid_t.
2488         (create_procinfo): Print pids in /proc without leading zeros.
2489
2490 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
2491
2492         * nios2-tdep.c (nios2_gcc_target_options): New.
2493         (nios2_gdb_arch_init): Install new hook.
2494
2495 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2496
2497         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
2498         New file.
2499         * update-gnulib.sh: Apply patch.
2500         * configure: Re-generate.
2501
2502 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2503
2504         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
2505         description.  Make "info proc" command descriptions more
2506         consistent.
2507
2508 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2509
2510         * NEWS: Mention 'info proc files' command.
2511
2512 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2513
2514         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
2515         descriptors for IP_FILES and IP_ALL.
2516
2517 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2518
2519         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
2520         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
2521         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
2522         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
2523         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
2524         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
2525         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
2526         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
2527         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
2528         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
2529         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
2530         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
2531         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
2532         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
2533         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
2534         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
2535         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
2536         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
2537         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
2538         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
2539         (struct fbsd_sockaddr_un): New types.
2540         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
2541         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
2542         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
2543         (fbsd_core_info_proc_files): New functions.
2544         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
2545         IP_ALL.
2546         * fbsd-tdep.h (fbsd_info_proc_files_header)
2547         (fbsd_info_proc_files_entry): New.
2548
2549 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2550
2551         * defs.h (enum info_proc_what) [IP_FILES]: New value.
2552         * infcmd.c (info_proc_cmd_files): New function.
2553         (_initialize_infcmd): Register 'info proc files' command.
2554
2555 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2556
2557         * gnulib/aclocal-m4-deps.mk: Re-generate.
2558         * gnulib/aclocal.m4: Re-generate.
2559         * gnulib/config.in: Re-generate.
2560         * gnulib/configure: Re-generate.
2561         * gnulib/import/Makefile.am: Re-generate.
2562         * gnulib/import/Makefile.in: Re-generate.
2563         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2564         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2565         * gnulib/import/arpa_inet.in.h: New file.
2566         * gnulib/import/inet_ntop.c: New file.
2567         * gnulib/import/m4/arpa_inet_h.m4: New file.
2568         * gnulib/import/m4/inet_ntop.m4: New file.
2569         * gnulib/import/m4/netinet_in_h.m4: New file.
2570         * gnulib/import/m4/socklen.m4: New file.
2571         * gnulib/import/m4/sockpfaf.m4: New file.
2572         * gnulib/import/m4/stdalign.m4: New file.
2573         * gnulib/import/m4/sys_uio_h.m4: New file.
2574         * gnulib/import/netinet_in.in.h: New file.
2575         * gnulib/import/stdalign.in.h: New file.
2576         * gnulib/import/sys_socket.c: New file.
2577         * gnulib/import/sys_socket.in.h: New file.
2578         * gnulib/import/sys_uio.in.h: New file.
2579         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
2580         module.
2581
2582 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2583
2584         * gnulib/aclocal-m4-deps.mk: New file.
2585         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
2586         deterministically.
2587
2588 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2589
2590         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
2591         KVE_PATH.
2592
2593 2018-09-18  Tom Tromey  <tom@tromey.com>
2594
2595         * compile/compile-object-load.c (struct
2596         link_hash_table_cleanup_data): Add constructor and destructor.
2597         Use DISABLE_COPY_AND_ASSIGN.
2598         (~link_hash_table_cleanup_data): Rename from
2599         link_hash_table_free.  Now a destructor.
2600         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
2601
2602 2018-09-18  Tom Tromey  <tom@tromey.com>
2603
2604         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2605         * compile/compile-object-load.c (struct munmap_list): Move to
2606         header file.
2607         (munmap_list::add): Rename from munmap_list_add; rewrite.
2608         (munmap_list::~munmap_list): Rename from munmap_list_free.
2609         (munmap_listp_free_cleanup): Remove.
2610         (compile_object_load): Update.
2611         * compile/compile-object-load.h (struct munmap_list): Move from
2612         compile-object-load.c.  Rewrite.
2613
2614 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
2615
2616         * aarch64-tdep.c (pass_in_v): Use register size.
2617         (aarch64_extract_return_value): Likewise.
2618         (aarch64_store_return_value): Likewise.
2619
2620 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2621
2622         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
2623         rlim_t.
2624
2625 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2626
2627         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
2628         Fix short help line.
2629
2630 2018-09-17  Tom Tromey  <tom@tromey.com>
2631
2632         PR python/20445:
2633         * configure: Rebuild.
2634         * configure.ac: Conditionally use -DNDEBUG for Python.
2635
2636 2018-09-17  Tom Tromey  <tom@tromey.com>
2637
2638         * configure: Rebuild.
2639         * configure.ac: Use gmp as a library dependency when checking for
2640         mpfr.
2641
2642 2018-09-17  Pedro Alves  <palves@redhat.com>
2643
2644         * python/py-inferior.c (find_inferior_object): Delete.
2645
2646 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
2647
2648         * compile/compile-cplus-types.c
2649         (compile_cplus_instance::enter_scope): Don't use new_scope after
2650         std::move.
2651
2652 2018-09-17  Tom Tromey  <tom@tromey.com>
2653
2654         * common/pathstuff.c (get_standard_cache_dir): Use
2655         ~/Library/Caches on macOS.
2656         * common/pathstuff.h (get_standard_cache_dir): Update comment.
2657
2658 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
2659
2660         PR python/23669
2661         * breakpoint.c (commands_cmd_element): New.
2662         (_initialize_breakpoint): Assign commands_cmd_element.
2663         * breakpoint.h (commands_cmd_element): New.
2664         * cli/cli-script.c (while_cmd_element, if_command,
2665         define_cmd_element): New.
2666         (command_name_equals): Remove.
2667         (process_next_line): Compare commands by pointer, not by name.
2668         (_initialize_cli_script): Assign the various cmd_list_element
2669         variables.
2670         * compile/compile.c (compile_cmd_element): New.
2671         (_initialize_compile): Assign compile_cmd_element.
2672         * compile/compile.h (compile_cmd_element): New.
2673         * guile/guile.c (guile_cmd_element): New.
2674         (install_gdb_commands): Assign guile_cmd_element.
2675         * guile/guile.h (guile_cmd_element): New.
2676         * python/python.c (python_cmd_element): New.
2677         (_initialize_python): Assign python_cmd_element.
2678         * python/python.h (python_cmd_element): New.
2679         * tracepoint.c (while_stepping_cmd_element): New.
2680         (_initialize_tracepoint): Assign while_stepping_cmd_element.
2681         * tracepoint.h (while_stepping_cmd_element): New.
2682
2683 2018-09-17  Tom Tromey  <tom@tromey.com>
2684
2685         * infrun.c (save_infcall_suspend_state): Return
2686         infcall_suspend_state_up.
2687         (save_infcall_control_state): Return infcall_control_state_up.
2688         * inferior.h (save_infcall_suspend_state)
2689         (save_infcall_control_state): Declare later.  Return unique
2690         pointers.
2691
2692 2018-09-17  Tom Tromey  <tom@tromey.com>
2693
2694         * infrun.c (struct stop_context): Declare constructor,
2695         destructor, "changed" method.
2696         (stop_context::stop_context): Rename from save_stop_context.
2697         (stop_context::~stop_context): Rename from
2698         release_stop_context_cleanup.
2699         (normal_stop): Update.
2700         (stop_context::changed): Rename from stop_context_changed.  Return
2701         bool.
2702
2703 2018-09-17  Tom Tromey  <tom@tromey.com>
2704
2705         * inferior.h (struct infcall_suspend_state_deleter): New.
2706         (infcall_suspend_state_up): New typedef.
2707         (struct infcall_control_state_deleter): New.
2708         (infcall_control_state_up): New typedef.
2709         (make_cleanup_restore_infcall_suspend_state)
2710         (make_cleanup_restore_infcall_control_state): Don't declare.
2711         * infcall.c (call_function_by_hand_dummy): Update.
2712         * infrun.c (do_restore_infcall_suspend_state_cleanup)
2713         (make_cleanup_restore_infcall_suspend_state): Remove.
2714         (do_restore_infcall_control_state_cleanup)
2715         (make_cleanup_restore_infcall_control_state): Remove.
2716
2717 2018-09-17  Tom Tromey  <tom@tromey.com>
2718
2719         * gdbthread.h (struct thread_control_state): Add initializer.
2720         (class thread_info) <control>: Remove initializer.
2721         * inferior.h (struct inferior_control_state): Add initializer.
2722         (class inferior) <control>: Remove initializer.
2723         (exit_inferior_1): Update.
2724         * infrun.c (struct infcall_control_state): Add constructors.
2725         (save_infcall_control_state): Use new.
2726         (restore_infcall_control_state, discard_infcall_control_state):
2727         Use delete.
2728
2729 2018-09-17  Tom Tromey  <tom@tromey.com>
2730
2731         * infrun.c (struct infcall_suspend_state) <registers>: Now a
2732         unique_ptr.
2733         <siginfo_data>: Now a unique_xmalloc_ptr.
2734         (save_infcall_suspend_state, restore_infcall_suspend_state)
2735         (discard_infcall_suspend_state)
2736         (get_infcall_suspend_state_regcache): Update.
2737
2738 2018-09-17  Tom Tromey  <tom@tromey.com>
2739
2740         * gdbthread.h (struct thread_suspend_state): Add initializers.
2741         (class thread_info) <suspend>: Remove initializer.
2742         * infrun.c (struct infcall_suspend_state): Add initializers.
2743         (save_infcall_suspend_state): Use new.
2744         (discard_infcall_suspend_state): Use delete.
2745
2746 2018-09-16  Tom Tromey  <tom@tromey.com>
2747
2748         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2749         Remove.
2750         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2751         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2752         (py_varobj_iter_new): Likewise.
2753         (py_varobj_get_iterator): Use gdbpy_ref.
2754
2755 2018-09-16  Tom Tromey  <tom@tromey.com>
2756
2757         * python/py-threadevent.c (py_get_event_thread): Simplify.
2758         * python/py-inferior.c (infpy_thread_from_thread_handle):
2759         Return immediately after calling thread_to_thread_object.  Use
2760         Py_RETURN_NONE.
2761         (thread_to_thread_object): Set the exception on a NULL return.
2762
2763 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2764
2765         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2766
2767 2018-09-16  Tom Tromey  <tom@tromey.com>
2768
2769         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2770         Remove.
2771
2772 2018-09-16  Tom Tromey  <tom@tromey.com>
2773
2774         * python/python-internal.h (thread_to_thread_object): Change
2775         return type.
2776         * python/py-inferior.c (thread_to_thread_object): Return a new
2777         reference.
2778         (infpy_thread_from_thread_handle): Update.
2779         * python/py-infthread.c (gdbpy_selected_thread): Update.
2780         * python/py-stopevent.c (create_stop_event_object): Update.
2781         * python/py-threadevent.c (py_get_event_thread): Return a new
2782         reference.
2783         (py_get_event_thread): Update.
2784         * python/py-event.h (py_get_event_thread): Change return type.
2785         * python/py-continueevent.c (create_continue_event_object):
2786         Update.
2787
2788 2018-09-16  Tom Tromey  <tom@tromey.com>
2789
2790         * python/py-progspace.c (pspy_get_objfiles): Update.
2791         * python/python-internal.h (objfile_to_objfile_object): Change
2792         return type.
2793         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2794         Update.
2795         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2796         Update.
2797         * python/python.c (gdbpy_get_current_objfile): Update.
2798         (gdbpy_objfiles): Update.
2799         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2800         Update.
2801         (objfile_to_objfile_object): Return a new reference.
2802         * python/py-symtab.c (stpy_get_objfile): Update.
2803         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2804         Update.
2805
2806 2018-09-16  Tom Tromey  <tom@tromey.com>
2807
2808         * python/py-inferior.c (infpy_get_progspace): Update.
2809         * python/python-internal.h (pspace_to_pspace_object): Change
2810         return type.
2811         * python/py-newobjfileevent.c
2812         (create_clear_objfiles_event_object): Update.
2813         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2814         Update.
2815         * python/python.c (gdbpy_get_current_progspace): Update.
2816         (gdbpy_progspaces): Update.
2817         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2818         reference.
2819         * python/py-objfile.c (objfpy_get_progspace): Update.
2820         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2821         Update.
2822
2823 2018-09-16  Tom Tromey  <tom@tromey.com>
2824
2825         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2826         (solib_name, block_for_pc, find_pc_line): New functions.
2827         (execute_unwinders): Update.
2828         * python/py-block.c (gdbpy_block_for_pc): Remove.
2829         * python/py-inferior.c (infpy_get_progspace): New function.
2830         (inferior_object_getset) <progspace>: Add.
2831         * python/py-progspace.c (pspy_objfiles): Rewrite.
2832         (pspy_solib_name, pspy_block_for_pc)
2833         (pspy_find_pc_line, pspy_is_valid): New functions.
2834         (progspace_object_methods): Add entries for solib_name,
2835         block_for_pc, find_pc_line, is_valid.
2836         * python/python-internal.h (gdbpy_block_for_pc)
2837         (build_objfiles_list): Don't declare.
2838         * python/python.c: Don't include solib.h.
2839         (gdbpy_solib_name, gdbpy_find_pc_line)
2840         (gdbpy_get_current_progspace, build_objfiles_list)
2841         (gdbpy_objfiles): Remove.
2842         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2843         solib_name, find_pc_line>: Remove entries.
2844
2845 2018-09-16  Tom Tromey  <tom@tromey.com>
2846
2847         * top.c (new_ui_command): Use GNU style for metasyntactic
2848         variables.
2849         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2850         variables.
2851         * maint.c (maintenance_translate_address): Remove "<>" around
2852         text.
2853         * interps.c (interpreter_exec_cmd): Use GNU style for
2854         metasyntactic variables.
2855         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2856         metasyntactic variables.
2857         * tracepoint.c (tfind_range_command): Use GNU style for
2858         metasyntactic variables.
2859         (tfind_outside_command): Likewise.
2860         (_initialize_tracepoint): Likewise.
2861         * remote.c (extended_remote_target::create_inferior): Use GNU
2862         style for metasyntactic variables.
2863         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2864         metasyntactic variables.
2865         (adi_assign_command): Likewise.
2866
2867 2018-09-16  Tom Tromey  <tom@tromey.com>
2868
2869         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2870         metasyntactic variables.  Print message if no disassembler options
2871         are available.
2872
2873 2018-09-15  Tom Tromey  <tom@tromey.com>
2874
2875         * infcmd.c (get_inferior_args): Return const char *.
2876         * inferior.h (get_inferior_args): Return type now const.
2877         * linux-tdep.c (linux_fill_prpsinfo): Update.
2878         * procfs.c (procfs_target::make_corefile_notes): Update.
2879
2880 2018-09-07  Tom Tromey  <tom@tromey.com>
2881
2882         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2883         inside the TRY.
2884
2885 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2886
2887         * nios2-tdep.c (nios2_type_align): New.
2888         (nios2_gdb_arch_init): Install type_align hook.
2889
2890 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2891
2892         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2893         type that is neither object file owned, nor gdbarch owned.
2894         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2895         gdbarch is non-NULL.
2896         (alloc_type_instance): Allocate non-objfile owned types on the
2897         gdbarch obstack.
2898         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2899         using TYPE_ALLOC to ensure memory is allocated on the correct
2900         obstack.
2901         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2902         obstack, or the gdbarch obstack.
2903         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2904
2905 2018-09-14  Tom Tromey  <tom@tromey.com>
2906
2907         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2908         block.
2909
2910 2018-09-14  Tom Tromey  <tom@tromey.com>
2911
2912         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2913
2914 2018-09-13  Tom Tromey  <tom@tromey.com>
2915
2916         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2917         static.
2918
2919 2018-09-13  Tom Tromey  <tom@tromey.com>
2920
2921         * exec.c (try_open_exec_file): Use std::string.
2922
2923 2018-09-13  Tom Tromey  <tom@tromey.com>
2924
2925         * utils.h (gdb_bfd_errmsg): Return std::string.
2926         * exec.c (exec_file_attach): Update.
2927         * compile/compile-object-load.c (compile_object_load): Update.
2928         * utils.c (gdb_bfd_errmsg): Return std::string.
2929
2930 2018-09-13  Tom Tromey  <tom@tromey.com>
2931
2932         * procfs.c (struct procinfo_deleter): New.
2933         (procinfo_up): New typedef.
2934         (do_destroy_procinfo_cleanup): Remove.
2935         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2936
2937 2018-09-13  Tom Tromey  <tom@tromey.com>
2938
2939         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2940
2941 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2942 2018-09-13  Tom Tromey  <tom@tromey.com>
2943
2944         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2945         (pspy_get_objfiles): New function.
2946         (progspace_object_methods): New.
2947         (pspace_object_type): Add tp_methods callback.
2948         * python/python-internal.h (build_objfiles_list): New
2949         declaration.
2950         * python/python.c (build_objfiles_list): New function.
2951         (gdbpy_objfiles): Implement using build_objfiles_list.
2952         * NEWS: Mention the Progspace.objfiles method.
2953
2954 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2955
2956         * python/py-inferior.c (infpy_get_progspace): New function.
2957         (inferior_object_getset): Add progspace property.
2958         * NEWS: Mention the new property.
2959
2960 2018-09-13  Tom Tromey  <tom@tromey.com>
2961
2962         PR rust/23650:
2963         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2964
2965 2018-09-13  Tom Tromey  <tom@tromey.com>
2966
2967         PR rust/23626:
2968         * rust-lang.c (rust_enum_variant): Now static.
2969         (rust_empty_enum_p): New function.
2970         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2971         Handle empty enum.
2972
2973 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2974
2975         * python/py-inferior.c (infpy_repr): New.
2976         (inferior_object_type): Register infpy_repr.
2977         * python/py-objfile.c (objfpy_repr): New.
2978         (objfile_object_type): Register objfpy_repr.
2979
2980 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2981
2982         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2983
2984 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2985
2986         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2987         typo.
2988
2989 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2990
2991         * common/common-utils.c: Don't include '<sys/stat.h>'.
2992         (is_regular_file): Move to...
2993         * common/filestuff.c (is_regular_file): ... here.
2994         * common/common-utils.h (is_regular_file): Move to...
2995         * common/filestuff.h (is_regular_file): ... here.
2996
2997 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2998
2999         * skip.c (debug_skip): New variable.
3000         (skiplist_entry::do_skip_file_p): Add debug output.
3001         (skiplist_entry::do_skip_gfile_p): Likewise.
3002         (skiplist_entry::skip_function_p): Likewise.
3003         (_initialize_step_skip): Create debug command.
3004         * NEWS: Mention set/show debug skip.
3005
3006 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3007
3008         * darwin-nat.c (should_disable_startup_with_shell):
3009         New function.
3010         (darwin_nat_target::create_inferior): Add call.
3011
3012 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3013
3014         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3015         inf_port, msg_state>: Initialize.
3016         (struct darwin_thread_info) <signaled, single_step>: Change
3017         type and initialize.
3018         (struct darwin_thread_info) <event>: Initialize.
3019
3020 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3021
3022         PR gdb/23555
3023         PR gdb/23558
3024         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3025         guesses.
3026
3027 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3028
3029         Revert:
3030         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3031
3032         PR gdb/23555
3033         PR gdb/23558
3034         * gnulib/aclocal.m4: Regenerate.
3035         * gnulib/config.in: Regenerate.
3036         * gnulib/configure: Regenerate.
3037         * gnulib/import/Makefile.am: Update.
3038         * gnulib/import/Makefile.in: Update.
3039         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3040         * gnulib/import/_Noreturn.h: ... this.
3041         * gnulib/import/alloca.in.h: Update.
3042         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3043         * gnulib/import/arg-nonnull.h: ... this.
3044         * gnulib/import/assure.h: Update.
3045         * gnulib/import/at-func.c: Update.
3046         * gnulib/import/basename-lgpl.c: Update.
3047         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3048         * gnulib/import/c++defs.h: ... this.
3049         * gnulib/import/canonicalize-lgpl.c: Update.
3050         * gnulib/import/cdefs.h: Update.
3051         * gnulib/import/chdir-long.c: Update.
3052         * gnulib/import/chdir-long.h: Update.
3053         * gnulib/import/cloexec.c: Update.
3054         * gnulib/import/cloexec.h: Update.
3055         * gnulib/import/close.c: Update.
3056         * gnulib/import/closedir.c: Update.
3057         * gnulib/import/config.charset: Update.
3058         * gnulib/import/dirent-private.h: Update.
3059         * gnulib/import/dirent.in.h: Update.
3060         * gnulib/import/dirfd.c: Update.
3061         * gnulib/import/dirname-lgpl.c: Update.
3062         * gnulib/import/dirname.h: Update.
3063         * gnulib/import/dosname.h: Update.
3064         * gnulib/import/dup-safer-flag.c: Update.
3065         * gnulib/import/dup-safer.c: Update.
3066         * gnulib/import/dup.c: Update.
3067         * gnulib/import/dup2.c: Update.
3068         * gnulib/import/errno.in.h: Update.
3069         * gnulib/import/error.c: Update.
3070         * gnulib/import/error.h: Update.
3071         * gnulib/import/exitfail.c: Update.
3072         * gnulib/import/exitfail.h: Update.
3073         * gnulib/import/extra/update-copyright: Update.
3074         * gnulib/import/fchdir.c: Update.
3075         * gnulib/import/fcntl.c: Update.
3076         * gnulib/import/fcntl.in.h: Update.
3077         * gnulib/import/fd-hook.c: Update.
3078         * gnulib/import/fd-hook.h: Update.
3079         * gnulib/import/fd-safer-flag.c: Update.
3080         * gnulib/import/fd-safer.c: Update.
3081         * gnulib/import/fdopendir.c: Update.
3082         * gnulib/import/filename.h: Update.
3083         * gnulib/import/filenamecat-lgpl.c: Update.
3084         * gnulib/import/filenamecat.h: Update.
3085         * gnulib/import/flexmember.h: Update.
3086         * gnulib/import/float+.h: Update.
3087         * gnulib/import/float.c: Update.
3088         * gnulib/import/float.in.h: Update.
3089         * gnulib/import/fnmatch.c: Update.
3090         * gnulib/import/fnmatch.in.h: Update.
3091         * gnulib/import/fnmatch_loop.c: Update.
3092         * gnulib/import/fpucw.h: Update.
3093         * gnulib/import/frexp.c: Update.
3094         * gnulib/import/frexpl.c: Update.
3095         * gnulib/import/fstat.c: Update.
3096         * gnulib/import/fstatat.c: Update.
3097         * gnulib/import/getcwd-lgpl.c: Update.
3098         * gnulib/import/getcwd.c: Update.
3099         * gnulib/import/getdtablesize.c: Update.
3100         * gnulib/import/getlogin_r.c: Update.
3101         * gnulib/import/getprogname.c: Update.
3102         * gnulib/import/getprogname.h: Update.
3103         * gnulib/import/gettext.h: Update.
3104         * gnulib/import/gettimeofday.c: Update.
3105         * gnulib/import/glob-libc.h: Update.
3106         * gnulib/import/glob.c: Update.
3107         * gnulib/import/glob.in.h: Update.
3108         * gnulib/import/glob_internal.h: Update.
3109         * gnulib/import/glob_pattern_p.c: Update.
3110         * gnulib/import/globfree.c: Update.
3111         * gnulib/import/hard-locale.c: Update.
3112         * gnulib/import/hard-locale.h: Update.
3113         * gnulib/import/intprops.h: Update.
3114         * gnulib/import/inttypes.in.h: Update.
3115         * gnulib/import/isnan.c: Update.
3116         * gnulib/import/isnand-nolibm.h: Update.
3117         * gnulib/import/isnand.c: Update.
3118         * gnulib/import/isnanl-nolibm.h: Update.
3119         * gnulib/import/isnanl.c: Update.
3120         * gnulib/import/itold.c: Update.
3121         * gnulib/import/libc-config.h: Update.
3122         * gnulib/import/limits.in.h: Update.
3123         * gnulib/import/localcharset.c: Update.
3124         * gnulib/import/localcharset.h: Update.
3125         * gnulib/import/localtime-buffer.c: Update.
3126         * gnulib/import/localtime-buffer.h: Update.
3127         * gnulib/import/lstat.c: Update.
3128         * gnulib/import/m4/00gnulib.m4: Update.
3129         * gnulib/import/m4/__inline.m4: Update.
3130         * gnulib/import/m4/absolute-header.m4: Update.
3131         * gnulib/import/m4/alloca.m4: Update.
3132         * gnulib/import/m4/builtin-expect.m4: Update.
3133         * gnulib/import/m4/canonicalize.m4: Update.
3134         * gnulib/import/m4/chdir-long.m4: Update.
3135         * gnulib/import/m4/close.m4: Update.
3136         * gnulib/import/m4/closedir.m4: Update.
3137         * gnulib/import/m4/configmake.m4: Update.
3138         * gnulib/import/m4/d-ino.m4: Update.
3139         * gnulib/import/m4/d-type.m4: Update.
3140         * gnulib/import/m4/dirent_h.m4: Update.
3141         * gnulib/import/m4/dirfd.m4: Update.
3142         * gnulib/import/m4/dirname.m4: Update.
3143         * gnulib/import/m4/double-slash-root.m4: Update.
3144         * gnulib/import/m4/dup.m4: Update.
3145         * gnulib/import/m4/dup2.m4: Update.
3146         * gnulib/import/m4/eealloc.m4: Update.
3147         * gnulib/import/m4/environ.m4: Update.
3148         * gnulib/import/m4/errno_h.m4: Update.
3149         * gnulib/import/m4/error.m4: Update.
3150         * gnulib/import/m4/exponentd.m4: Update.
3151         * gnulib/import/m4/exponentl.m4: Update.
3152         * gnulib/import/m4/extensions.m4: Update.
3153         * gnulib/import/m4/extern-inline.m4: Update.
3154         * gnulib/import/m4/fchdir.m4: Update.
3155         * gnulib/import/m4/fcntl-o.m4: Update.
3156         * gnulib/import/m4/fcntl.m4: Update.
3157         * gnulib/import/m4/fcntl_h.m4: Update.
3158         * gnulib/import/m4/fdopendir.m4: Update.
3159         * gnulib/import/m4/filenamecat.m4: Update.
3160         * gnulib/import/m4/flexmember.m4: Update.
3161         * gnulib/import/m4/float_h.m4: Update.
3162         * gnulib/import/m4/fnmatch.m4: Update.
3163         * gnulib/import/m4/fnmatch_h.m4: Update.
3164         * gnulib/import/m4/fpieee.m4: Update.
3165         * gnulib/import/m4/frexp.m4: Update.
3166         * gnulib/import/m4/frexpl.m4: Update.
3167         * gnulib/import/m4/fstat.m4: Update.
3168         * gnulib/import/m4/fstatat.m4: Update.
3169         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3170         * gnulib/import/m4/getcwd-path-max.m4: Update.
3171         * gnulib/import/m4/getcwd.m4: Update.
3172         * gnulib/import/m4/getdtablesize.m4: Update.
3173         * gnulib/import/m4/getlogin.m4: Update.
3174         * gnulib/import/m4/getlogin_r.m4: Update.
3175         * gnulib/import/m4/getpagesize.m4: Update.
3176         * gnulib/import/m4/getprogname.m4: Update.
3177         * gnulib/import/m4/gettimeofday.m4: Update.
3178         * gnulib/import/m4/glibc21.m4: Update.
3179         * gnulib/import/m4/glob.m4: Update.
3180         * gnulib/import/m4/glob_h.m4: Update.
3181         * gnulib/import/m4/gnulib-cache.m4: Update.
3182         * gnulib/import/m4/gnulib-common.m4: Update.
3183         * gnulib/import/m4/gnulib-comp.m4: Update.
3184         * gnulib/import/m4/gnulib-tool.m4: Update.
3185         * gnulib/import/m4/hard-locale.m4: Update.
3186         * gnulib/import/m4/include_next.m4: Update.
3187         * gnulib/import/m4/inttypes-pri.m4: Update.
3188         * gnulib/import/m4/inttypes.m4: Update.
3189         * gnulib/import/m4/isnand.m4: Update.
3190         * gnulib/import/m4/isnanl.m4: Update.
3191         * gnulib/import/m4/largefile.m4: Update.
3192         * gnulib/import/m4/limits-h.m4: Update.
3193         * gnulib/import/m4/localcharset.m4: Update.
3194         * gnulib/import/m4/locale-fr.m4: Update.
3195         * gnulib/import/m4/locale-ja.m4: Update.
3196         * gnulib/import/m4/locale-zh.m4: Update.
3197         * gnulib/import/m4/localtime-buffer.m4: Update.
3198         * gnulib/import/m4/longlong.m4: Update.
3199         * gnulib/import/m4/lstat.m4: Update.
3200         * gnulib/import/m4/malloc.m4: Update.
3201         * gnulib/import/m4/malloca.m4: Update.
3202         * gnulib/import/m4/math_h.m4: Update.
3203         * gnulib/import/m4/mbrtowc.m4: Update.
3204         * gnulib/import/m4/mbsinit.m4: Update.
3205         * gnulib/import/m4/mbsrtowcs.m4: Update.
3206         * gnulib/import/m4/mbstate_t.m4: Update.
3207         * gnulib/import/m4/memchr.m4: Update.
3208         * gnulib/import/m4/memmem.m4: Update.
3209         * gnulib/import/m4/mempcpy.m4: Update.
3210         * gnulib/import/m4/memrchr.m4: Update.
3211         * gnulib/import/m4/mkdir.m4: Update.
3212         * gnulib/import/m4/mkstemp.m4: Update.
3213         * gnulib/import/m4/mmap-anon.m4: Update.
3214         * gnulib/import/m4/mode_t.m4: Update.
3215         * gnulib/import/m4/msvc-inval.m4: Update.
3216         * gnulib/import/m4/msvc-nothrow.m4: Update.
3217         * gnulib/import/m4/multiarch.m4: Update.
3218         * gnulib/import/m4/nocrash.m4: Update.
3219         * gnulib/import/m4/off_t.m4: Update.
3220         * gnulib/import/m4/onceonly.m4: Update.
3221         * gnulib/import/m4/open-cloexec.m4: Update.
3222         * gnulib/import/m4/open.m4: Update.
3223         * gnulib/import/m4/openat.m4: Update.
3224         * gnulib/import/m4/opendir.m4: Update.
3225         * gnulib/import/m4/pathmax.m4: Update.
3226         * gnulib/import/m4/rawmemchr.m4: Update.
3227         * gnulib/import/m4/readdir.m4: Update.
3228         * gnulib/import/m4/readlink.m4: Update.
3229         * gnulib/import/m4/realloc.m4: Update.
3230         * gnulib/import/m4/rename.m4: Update.
3231         * gnulib/import/m4/rewinddir.m4: Update.
3232         * gnulib/import/m4/rmdir.m4: Update.
3233         * gnulib/import/m4/save-cwd.m4: Update.
3234         * gnulib/import/m4/secure_getenv.m4: Update.
3235         * gnulib/import/m4/setenv.m4: Update.
3236         * gnulib/import/m4/signal_h.m4: Update.
3237         * gnulib/import/m4/ssize_t.m4: Update.
3238         * gnulib/import/m4/stat-time.m4: Update.
3239         * gnulib/import/m4/stat.m4: Update.
3240         * gnulib/import/m4/std-gnu11.m4: Update.
3241         * gnulib/import/m4/stdbool.m4: Update.
3242         * gnulib/import/m4/stddef_h.m4: Update.
3243         * gnulib/import/m4/stdint.m4: Update.
3244         * gnulib/import/m4/stdio_h.m4: Update.
3245         * gnulib/import/m4/stdlib_h.m4: Update.
3246         * gnulib/import/m4/strchrnul.m4: Update.
3247         * gnulib/import/m4/strdup.m4: Update.
3248         * gnulib/import/m4/strerror.m4: Update.
3249         * gnulib/import/m4/string_h.m4: Update.
3250         * gnulib/import/m4/strstr.m4: Update.
3251         * gnulib/import/m4/strtok_r.m4: Update.
3252         * gnulib/import/m4/sys_socket_h.m4: Update.
3253         * gnulib/import/m4/sys_stat_h.m4: Update.
3254         * gnulib/import/m4/sys_time_h.m4: Update.
3255         * gnulib/import/m4/sys_types_h.m4: Update.
3256         * gnulib/import/m4/tempname.m4: Update.
3257         * gnulib/import/m4/time_h.m4: Update.
3258         * gnulib/import/m4/unistd-safer.m4: Update.
3259         * gnulib/import/m4/unistd_h.m4: Update.
3260         * gnulib/import/m4/warn-on-use.m4: Update.
3261         * gnulib/import/m4/wchar_h.m4: Update.
3262         * gnulib/import/m4/wchar_t.m4: Update.
3263         * gnulib/import/m4/wctype_h.m4: Update.
3264         * gnulib/import/m4/wint_t.m4: Update.
3265         * gnulib/import/malloc.c: Update.
3266         * gnulib/import/malloc/scratch_buffer.h: Update.
3267         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3268         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3269         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3270         * gnulib/import/malloca.c: Update.
3271         * gnulib/import/malloca.h: Update.
3272         * gnulib/import/malloca.valgrind: Update.
3273         * gnulib/import/math.in.h: Update.
3274         * gnulib/import/mbrtowc.c: Update.
3275         * gnulib/import/mbsinit.c: Update.
3276         * gnulib/import/mbsrtowcs-impl.h: Update.
3277         * gnulib/import/mbsrtowcs-state.c: Update.
3278         * gnulib/import/mbsrtowcs.c: Update.
3279         * gnulib/import/memchr.c: Update.
3280         * gnulib/import/memmem.c: Update.
3281         * gnulib/import/mempcpy.c: Update.
3282         * gnulib/import/memrchr.c: Update.
3283         * gnulib/import/mkdir.c: Update.
3284         * gnulib/import/mkstemp.c: Update.
3285         * gnulib/import/msvc-inval.c: Update.
3286         * gnulib/import/msvc-inval.h: Update.
3287         * gnulib/import/msvc-nothrow.c: Update.
3288         * gnulib/import/msvc-nothrow.h: Update.
3289         * gnulib/import/open.c: Update.
3290         * gnulib/import/openat-die.c: Update.
3291         * gnulib/import/openat-priv.h: Update.
3292         * gnulib/import/openat-proc.c: Update.
3293         * gnulib/import/openat.c: Update.
3294         * gnulib/import/openat.h: Update.
3295         * gnulib/import/opendir.c: Update.
3296         * gnulib/import/pathmax.h: Update.
3297         * gnulib/import/pipe-safer.c: Update.
3298         * gnulib/import/rawmemchr.c: Update.
3299         * gnulib/import/readdir.c: Update.
3300         * gnulib/import/readlink.c: Update.
3301         * gnulib/import/realloc.c: Update.
3302         * gnulib/import/ref-add.sin: Update.
3303         * gnulib/import/ref-del.sin: Update.
3304         * gnulib/import/rename.c: Update.
3305         * gnulib/import/rewinddir.c: Update.
3306         * gnulib/import/rmdir.c: Update.
3307         * gnulib/import/same-inode.h: Update.
3308         * gnulib/import/save-cwd.c: Update.
3309         * gnulib/import/save-cwd.h: Update.
3310         * gnulib/import/scratch_buffer.h: Update.
3311         * gnulib/import/secure_getenv.c: Update.
3312         * gnulib/import/setenv.c: Update.
3313         * gnulib/import/signal.in.h: Update.
3314         * gnulib/import/stat-time.c: Update.
3315         * gnulib/import/stat-time.h: Update.
3316         * gnulib/import/stat-w32.c: Update.
3317         * gnulib/import/stat-w32.h: Update.
3318         * gnulib/import/stat.c: Update.
3319         * gnulib/import/stdbool.in.h: Update.
3320         * gnulib/import/stddef.in.h: Update.
3321         * gnulib/import/stdint.in.h: Update.
3322         * gnulib/import/stdio.in.h: Update.
3323         * gnulib/import/stdlib.in.h: Update.
3324         * gnulib/import/str-two-way.h: Update.
3325         * gnulib/import/strchrnul.c: Update.
3326         * gnulib/import/strdup.c: Update.
3327         * gnulib/import/streq.h: Update.
3328         * gnulib/import/strerror-override.c: Update.
3329         * gnulib/import/strerror-override.h: Update.
3330         * gnulib/import/strerror.c: Update.
3331         * gnulib/import/string.in.h: Update.
3332         * gnulib/import/stripslash.c: Update.
3333         * gnulib/import/strnlen1.c: Update.
3334         * gnulib/import/strnlen1.h: Update.
3335         * gnulib/import/strstr.c: Update.
3336         * gnulib/import/strtok_r.c: Update.
3337         * gnulib/import/sys_stat.in.h: Update.
3338         * gnulib/import/sys_time.in.h: Update.
3339         * gnulib/import/sys_types.in.h: Update.
3340         * gnulib/import/tempname.c: Update.
3341         * gnulib/import/tempname.h: Update.
3342         * gnulib/import/time.in.h: Update.
3343         * gnulib/import/unistd--.h: Update.
3344         * gnulib/import/unistd-safer.h: Update.
3345         * gnulib/import/unistd.in.h: Update.
3346         * gnulib/import/unsetenv.c: Update.
3347         * gnulib/import/verify.h: Update.
3348         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3349         * gnulib/import/wchar.in.h: Update.
3350         * gnulib/import/wctype.in.h: Update.
3351         * gnulib/import/xalloc-oversized.h: Update.
3352         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3353         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3354
3355 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3356
3357         * record-btrace.c (get_thread_current_frame): Remove
3358         old_inferior_ptid.
3359
3360 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3361
3362         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3363         with check_tag to 1 if and only if the type is tagged and the
3364         component being searched cannot been found in the current
3365         view. Otherwise, always call ada_to_fixed_type with
3366         check_tag to 0.
3367
3368 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3369
3370         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3371         declaration.
3372         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3373         * ada-varobj.c (ada_varobj_get_number_of_children,
3374         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3375
3376 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3377
3378         * ada-valprint.c (ada_value_print): Use type instead of
3379         enclosing type.
3380
3381 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3382
3383         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3384         an array of access to unconstrained array.
3385
3386 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3387
3388         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3389         (ada_check_typedef): Use it.
3390
3391 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3392
3393         * ada-varobj.c (ada_varobj_describe_struct_child)
3394         (ada_varobj_describe_child): Handle union case like struct one.
3395
3396 2018-09-10  Tom Tromey  <tom@tromey.com>
3397
3398         PR python/18380:
3399         * python/python.c (_initialize_python): Make example in "python"
3400         help work in Python 3.
3401
3402 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
3403
3404         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3405         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
3406         $(EXEEXT) to the script, as it is not a program.
3407
3408 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3409
3410         * python/py-prettyprint.c (pretty_print_one_value): Return
3411         gdbpy_ref<>.
3412         (print_string_repr): Adjust.
3413         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3414         * python/python-internal.h (apply_varobj_pretty_printer): Return
3415         gdbpy_ref<>.
3416         * varobj.c (varobj_value_get_print_value): Adjust.
3417
3418 2018-09-08  Tom Tromey  <tom@tromey.com>
3419
3420         PR python/16047:
3421         * python/py-prettyprint.c (pretty_print_one_value): Check for
3422         to_string method.
3423
3424 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3425
3426         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3427         replace_operator_with_call.
3428
3429 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3430
3431         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
3432
3433 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3434
3435         * ada-typeprint.c (print_range): Print the bounds using TYPE
3436         rather than its TYPE_TARGET_TYPE.
3437
3438 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3439
3440         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
3441         call to ada_to_fixed_value_create.
3442
3443 2018-09-08  Jerome Guitton  <guitton@adacore.com>
3444
3445         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
3446
3447 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3448
3449         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
3450         by calls to error.
3451
3452 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3453
3454         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
3455         Move update of loop variable "fi".
3456
3457 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3458
3459         * ada-lang.c (value_assign_to_component): In the case of
3460         big-endian targets, extract the bits of the given VAL
3461         using an src_offset of zero if container is not a scalar.
3462
3463 2018-09-06  Simon Ser  <contact@emersion.fr>
3464
3465         PR gdb/23105
3466         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
3467         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3468         * fbsd-tdep.c (fbsd_make_note_desc): New.
3469         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
3470         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
3471         * target.h (enum target_object) Add FreeBSD-specific
3472         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3473
3474 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3475
3476         * compile/compile-c.h (generate_c_for_variable_locations):
3477         Change reference to pointer.
3478         * compile/compile-c-support.c (compile_program) <compute>:
3479         Likewise.
3480         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
3481         (generate_c_for_for_one_variable): Likewise
3482         (generate_c_for_variable_locations): Likewise
3483         * compile/compile-c-types.c (compile_c_instance::convert_type):
3484         Likewise
3485         * compile/compile-cplus-symbols.c (convert_one_symbol):
3486         std::move the scope passed to enter_scope.
3487         * compile/compile-cplus-types.c
3488         (compile_cplus_instance::enter_scope): Make parameter
3489         rvalue-reference.
3490         (compile_cplus_instance::new_scope): Change reference to
3491         pointer.
3492         (compile_cplus_instance::convert_type): Likewise
3493         (compile_cplus_convert_typedef): std::move the scope passed to
3494         enter_scope.
3495         (compile_cplus_convert_struct_or_union): Likewise.
3496         (compile_cplus_convert_enum): Likewise.
3497         (compile_cplus_convert_namespace): Likewise.
3498         * compile/compile-cplus.h (compile_cplus_instance)
3499         <enter_scope>: Make parameter rvalue-reference.
3500         * compile/compile-internal.h (compile_instance)
3501         <get_cached_type>: Likewise
3502         * compile/compile-loc2c.c (push): Likewise
3503         (pushf): Likewise
3504         (unary): Likewise
3505         (binary): Likewise
3506         (print_label): Likewise
3507         (pushf_register_address): Likewise
3508         (pushf_register): Likewise
3509         (do_compile_dwarf_expr_to_c): Likewise
3510         (compile_dwarf_expr_to_c): Likewise
3511         (compile_dwarf_bounds_to_c): Likewise
3512         * compile/compile.c (compile_instance::get_cached_type):
3513         Likewise
3514         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
3515         (compile_dwarf_bounds_to_c): Likewise
3516         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
3517         (dwarf2_compile_property_to_c): Likewise
3518         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
3519         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
3520         Likewise
3521
3522 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3523
3524         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
3525         * tui/tui-data.c (init_content_element): Don't initialize it.
3526
3527 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3528
3529         * tui/tui-data.h (struct tui_win_info)
3530         <detail::opaque>: Remove.
3531         * tui/tui-data.c (init_win_info): Remove assignment.
3532
3533 2018-09-05  Tom Tromey  <tom@tromey.com>
3534
3535         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
3536         -Wformat-nonliteral.
3537         * target-float.c (host_float_ops<T>::to_string)
3538         (host_float_ops<T>::from_string): Use
3539         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3540         * configure: Rebuild.
3541
3542 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3543
3544         * printcmd.c (printf_c_string): Use
3545         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3546         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
3547
3548 2018-09-05  Tom Tromey  <tom@tromey.com>
3549
3550         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
3551
3552 2018-09-05  Tom de Vries  <tdevries@suse.de>
3553
3554         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
3555         with resolve_abstract_p == true.
3556         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
3557         defaulting to false. Propagate resolve_abstract_p to
3558         dwarf2_fetch_die_loc_sect_off.
3559         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
3560         parameter, defaulting to false.
3561         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
3562         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
3563         parameter.
3564         * dwarf2read.h (struct die_info): Forward-declare.
3565         (die_info_ptr): New typedef.
3566         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
3567
3568 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
3569
3570         GDB 8.2 released.
3571
3572 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3573             Pedro Alves  <palves@redhat.com>
3574
3575         * gnulib/Makefile.in (aclocal_m4_deps): Move to
3576         "aclocal-m4-deps.mk".  Include file here.
3577         $(srcdir)/aclocal.m4: Add "configure.ac".
3578         * gnulib/aclocal-m4-deps.mk: New file.
3579         * gnulib/update-gnulib.sh: Automatically update
3580         "aclocal-m4-deps.mk".
3581
3582 2018-09-04  Tom Tromey  <tom@tromey.com>
3583
3584         * configure: Rebuild.
3585         * configure.ac: Remove multi-ice code.
3586
3587 2018-09-04  Tom Tromey  <tom@tromey.com>
3588
3589         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
3590         (ada-exp.o): Update.
3591
3592 2018-09-04  Tom Tromey  <tom@tromey.com>
3593
3594         * Makefile.in (printcmd.o, target-float.o): Remove.
3595         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
3596
3597 2018-09-04  Tom Tromey  <tom@tromey.com>
3598
3599         * gnulib/Makefile.in: Remove obsolete comment.
3600         * Makefile.in: Remove obsolete comment.
3601
3602 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
3603
3604         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
3605         line with '+'.
3606
3607 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3608
3609         * riscv-tdep.c: Add 'prologue-value.h' include.
3610         (struct riscv_unwind_cache): New struct.
3611         (riscv_debug_unwinder): New global.
3612         (riscv_scan_prologue): Update arguments, capture register details
3613         from prologue scan.
3614         (riscv_skip_prologue): Reformat arguments line, move end of
3615         prologue calculation into riscv_scan_prologue.
3616         (riscv_frame_cache): Update return type, create
3617         riscv_unwind_cache, scan the prologue, and fill in remaining cache
3618         details.
3619         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
3620         (riscv_frame_prev_register): Use the trad_frame within the
3621         riscv_unwind_cache.
3622         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
3623         flag.
3624
3625 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3626
3627         * trad-frame.h (trad_frame_set_realreg): Declare.
3628         (trad_frame_set_addr): Declare.
3629         * trad-frame.c (trad_frame_set_realreg): Define new function.
3630         (trad_frame_set_addr): Define new function.
3631         (trad_frame_set_reg_realreg): Use new function.
3632         (trad_frame_set_reg_addr): Use new function.
3633
3634 2018-09-01  Keith Seitz  <keiths@redhat.com>
3635
3636         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
3637         pulongest instead of "%lld".
3638         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
3639         ATTRIBUTE_UNUSED.
3640
3641 2018-08-31  Tom Tromey  <tom@tromey.com>
3642
3643         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
3644         variant part type.
3645
3646 2018-08-31  Pedro Alves  <palves@redhat.com>
3647
3648         * gdbarch.h: Regenerate.
3649
3650 2018-08-31  Pedro Alves  <palves@redhat.com>
3651
3652         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
3653         * target.h (Hardware watchpoint interfaces): Describe
3654         continuable/steppable/non-steppable watchpoints.
3655         * gdbarch.h, gdbarch.c: Regenerate.
3656
3657 2018-08-31  Pedro Alves  <palves@redhat.com>
3658
3659         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
3660         Delete.
3661         * s390-linux-nat.c
3662         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
3663         * target.h (target_ops::have_continuable_watchpoint): Delete.
3664         (target_have_continuable_watchpoint): Delete.
3665         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
3666         * target-delegates.c: Regenerate.
3667
3668 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3669
3670         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
3671         the files present in "gnulib/import/m4/".
3672
3673 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3674
3675         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
3676         c.sw, c.swsp, and c.sdsp.
3677
3678 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3679
3680         * riscv-tdep.c (struct riscv_inferior_data): Delete.
3681         (riscv_read_misa_reg): Don't cache value read into inferior data.
3682         (riscv_new_inferior_data): Delete.
3683         (riscv_inferior_data_cleanup): Delete.
3684         (riscv_inferior_data): Delete.
3685         (riscv_invalidate_inferior_data): Delete.
3686         (_initialize_riscv_tdep): Remove initialisation of inferior data.
3687
3688 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
3689
3690         * compile/compile-cplus-types.c
3691         (compile_cplus_instance::leave_scope): Take the address of scope
3692         object.
3693         (compile_cplus_instance::convert_qualified_base): Compare quals
3694         to 0.
3695
3696 2018-08-30  Keith Seitz  <keiths@redhat.com>
3697
3698         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
3699         Use "%s" and host_address_to_string instead of "%p" in printf.
3700
3701 2018-08-29  Keith Seitz  <keiths@redhat.com>
3702
3703         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3704         and compile-cplus-types.c.
3705         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3706         * c-lang.c (cplus_language_defn): Set C++ compile functions.
3707         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3708         Declare.
3709         * compile/compile-c-support.c: Include compile-cplus.h.
3710         (load_libcompile): Templatize.
3711         (get_compile_context): "New" function.
3712         (c_get_compile_context): Use get_compile_context.
3713         (cplus_get_compile_context): New function.
3714         (cplus_push_user_expression, cplus_pop_user_expression)
3715         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3716         (cplus_compute_program): Define new structs/functions.
3717         * compile/compile-cplus-symmbols.c: New file.
3718         * compile/compile-cplus-types.c: New file.
3719         * compile/compile-cplus.h: New file.
3720         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3721         Declare.
3722         * compile/compile-object-load.c (get_out_value_type): Use
3723         strncmp_iw when comparing symbol names.
3724         (compile_object_load): Add mst_bss and mst_data.
3725         * compile/compile.c (_initialize_compile): Remove
3726         -Wno-implicit-function-declaration from `compile_args'.
3727         * compile/gcc-cp-plugin.h: New file.
3728         * NEWS: Mention C++ compile support and new debug options.
3729
3730 2018-08-29  Keith Seitz  <keiths@redhat.com>
3731
3732         * linespec.c (collect_info::add_symbol): Make virtual.
3733         (struct symbol_searcher_collect_info): New struct.
3734         (symbol_searcher::find_all_symbols): New method.
3735         * symtab.h (class symbol_searcher): New class.
3736
3737 2018-08-29  Keith Seitz  <keiths@redhat.com>
3738
3739         * linespec.c (struct linespec) <function_symbols, label_symbols>:
3740         Change to vector of block_symbol.  Update all users.
3741         (struct collect_info) <symbols>: Likewise.
3742         (collect_info::add_symbol): Take block_symbol as argument.
3743         Update all callers.
3744         (decode_compound_collector) <m_symbols>: Change type to vector
3745         of block_symbol.  Update all users.
3746         (decode_compound_collector::operator ()): Change parameter type
3747         to block_symbol.
3748         (find_method, find_function_symbols, find_linespec_symbols)
3749         (find_label_symbols_in_block, find_label_symbols): Change symbol
3750         vectors to block_symbol vectors.
3751         * symtab.h (symbol_found_callback_ftype): Change parameter type to
3752         block_symbol.
3753
3754 2018-08-29  Keith Seitz  <keiths@redhat.com>
3755
3756         * linespec.c (symbolp): Remove typedef and VEC definitions.
3757         (bound_minimal_symbol_d): Likewise.
3758
3759 2018-08-29  Keith Seitz  <keiths@redhat.com>
3760
3761         * linespec.c (decode_compound_collector::decode_compound_collector):
3762         Remove initialization for `m_symtabs'.
3763         (decode_compound_collector::release_symbols): Change return type
3764         to std::vector.  Update all callers.
3765         (class decode_compound_collector) <m_symbols>: Change type to
3766         std::vector.
3767         (lookup_prefix_sym): Change return type to std::vector.  Update all
3768         callers.
3769         (compare_symbols): Remove.
3770         (std_compare_symbols): Rename to `compare_symbols'.
3771         (find_method): Change `sym_classes' parameter to std::vector.
3772         Update all callers.  Use std::sort to sort sym_classes.
3773         (find_linespec_symbols): Remove cleanup.
3774
3775 2018-08-29  Keith Seitz  <keiths@redhat.com>
3776
3777         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3778         std::vector.  Update all users.
3779         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3780         (struct collect_info) <minimal_symbols>: Likewise.
3781         (compare_msymbols): Return bool.  Change parameters to const
3782         bound_minimal_symbol references.
3783         (find_method, find_function_symbols, find_linespec_symbols): Change
3784         `minsyms' parameter to std::vector.  Update all callers.
3785
3786 2018-08-29  Keith Seitz  <keiths@redhat.com>
3787
3788         * linespec.c (struct linespec) <label_symbols>: Change type to
3789         std::vector.  Update all users.
3790         (find_label_symbols_in_block): Change `result' parameter to
3791         std::vector.  Update all callers.
3792         (find_label_symbols): Return std::vector.  Update all callers.
3793
3794 2018-08-29  Keith Seitz  <keiths@redhat.com>
3795
3796         * linespec.c (struct linespec) <function_symbols>: Change type to
3797         std::vector.  Update all users.
3798         (struct collect_info) <function_symbols>: Likewise.
3799         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3800         (std_compare_symbols): New function.
3801         (find_method, find_function_symbols, find_linespec_symbols)
3802         (find_label_symbols_in_block): Change `symbols' parameter to
3803         std::vector.  Update all callers.
3804         (find_label_symbols): Likewise for `function_symbols' and
3805         `label_funcs_ret'.
3806
3807 2018-08-29  Keith Seitz  <keiths@redhat.com>
3808
3809         * linespec.c (symtab_vector_up): Define.
3810         (struct linespec) <file_symtabs>: Change type to std::vector *.
3811         Update all uses.
3812         (struct collect_info) <file_symtabs>: Likewise.
3813         (collect_symtabs_from_filename): Return symtab_vector_up.
3814         Update all callers.
3815         (decode_objc): Remove cleanup.
3816         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3817         (symtab_collector::release_symtabs): Return symtab_vector_up.
3818         Update all callers.
3819         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3820         Update all users.
3821         (collect_symtabs_from_filename, symtabs_from_filename): Return
3822         symtab_vector_up.  Update all callers.
3823
3824 2018-08-29  Tom Tromey  <tom@tromey.com>
3825
3826         * csky-tdep.c (csky_analyze_prologue): Use
3827         core_addr_to_string_nz.
3828
3829 2018-08-29  Tom Tromey  <tom@tromey.com>
3830
3831         * windows-nat.c (struct xlate_exception) <them>: Change type to
3832         DWORD.
3833         (xlate): Fix formatting.  Remove last entry.
3834         (struct xlate_exception, xlate): Comment out.
3835         (windows_nat_target::resume): Use ranged for.
3836
3837 2018-08-29  Jim Wilson  <jimw@sifive.com>
3838
3839         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3840         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3841         of NT_PRFPREG.
3842         (riscv_linux_nat_target::store_registers): Likewise.
3843
3844 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3845
3846         PR gdb/23555
3847         PR gdb/23558
3848         * gnulib/aclocal.m4: Regenerate.
3849         * gnulib/config.in: Regenerate.
3850         * gnulib/configure: Regenerate.
3851         * gnulib/import/Makefile.am: Update.
3852         * gnulib/import/Makefile.in: Update.
3853         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3854         * gnulib/import/_Noreturn.h: ... this.
3855         * gnulib/import/alloca.in.h: Update.
3856         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3857         * gnulib/import/arg-nonnull.h: ... this.
3858         * gnulib/import/assure.h: Update.
3859         * gnulib/import/at-func.c: Update.
3860         * gnulib/import/basename-lgpl.c: Update.
3861         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3862         * gnulib/import/c++defs.h: ... this.
3863         * gnulib/import/canonicalize-lgpl.c: Update.
3864         * gnulib/import/cdefs.h: Update.
3865         * gnulib/import/chdir-long.c: Update.
3866         * gnulib/import/chdir-long.h: Update.
3867         * gnulib/import/cloexec.c: Update.
3868         * gnulib/import/cloexec.h: Update.
3869         * gnulib/import/close.c: Update.
3870         * gnulib/import/closedir.c: Update.
3871         * gnulib/import/config.charset: Update.
3872         * gnulib/import/dirent-private.h: Update.
3873         * gnulib/import/dirent.in.h: Update.
3874         * gnulib/import/dirfd.c: Update.
3875         * gnulib/import/dirname-lgpl.c: Update.
3876         * gnulib/import/dirname.h: Update.
3877         * gnulib/import/dosname.h: Update.
3878         * gnulib/import/dup-safer-flag.c: Update.
3879         * gnulib/import/dup-safer.c: Update.
3880         * gnulib/import/dup.c: Update.
3881         * gnulib/import/dup2.c: Update.
3882         * gnulib/import/errno.in.h: Update.
3883         * gnulib/import/error.c: Update.
3884         * gnulib/import/error.h: Update.
3885         * gnulib/import/exitfail.c: Update.
3886         * gnulib/import/exitfail.h: Update.
3887         * gnulib/import/extra/update-copyright: Update.
3888         * gnulib/import/fchdir.c: Update.
3889         * gnulib/import/fcntl.c: Update.
3890         * gnulib/import/fcntl.in.h: Update.
3891         * gnulib/import/fd-hook.c: Update.
3892         * gnulib/import/fd-hook.h: Update.
3893         * gnulib/import/fd-safer-flag.c: Update.
3894         * gnulib/import/fd-safer.c: Update.
3895         * gnulib/import/fdopendir.c: Update.
3896         * gnulib/import/filename.h: Update.
3897         * gnulib/import/filenamecat-lgpl.c: Update.
3898         * gnulib/import/filenamecat.h: Update.
3899         * gnulib/import/flexmember.h: Update.
3900         * gnulib/import/float+.h: Update.
3901         * gnulib/import/float.c: Update.
3902         * gnulib/import/float.in.h: Update.
3903         * gnulib/import/fnmatch.c: Update.
3904         * gnulib/import/fnmatch.in.h: Update.
3905         * gnulib/import/fnmatch_loop.c: Update.
3906         * gnulib/import/fpucw.h: Update.
3907         * gnulib/import/frexp.c: Update.
3908         * gnulib/import/frexpl.c: Update.
3909         * gnulib/import/fstat.c: Update.
3910         * gnulib/import/fstatat.c: Update.
3911         * gnulib/import/getcwd-lgpl.c: Update.
3912         * gnulib/import/getcwd.c: Update.
3913         * gnulib/import/getdtablesize.c: Update.
3914         * gnulib/import/getlogin_r.c: Update.
3915         * gnulib/import/getprogname.c: Update.
3916         * gnulib/import/getprogname.h: Update.
3917         * gnulib/import/gettext.h: Update.
3918         * gnulib/import/gettimeofday.c: Update.
3919         * gnulib/import/glob-libc.h: Update.
3920         * gnulib/import/glob.c: Update.
3921         * gnulib/import/glob.in.h: Update.
3922         * gnulib/import/glob_internal.h: Update.
3923         * gnulib/import/glob_pattern_p.c: Update.
3924         * gnulib/import/globfree.c: Update.
3925         * gnulib/import/hard-locale.c: Update.
3926         * gnulib/import/hard-locale.h: Update.
3927         * gnulib/import/intprops.h: Update.
3928         * gnulib/import/inttypes.in.h: Update.
3929         * gnulib/import/isnan.c: Update.
3930         * gnulib/import/isnand-nolibm.h: Update.
3931         * gnulib/import/isnand.c: Update.
3932         * gnulib/import/isnanl-nolibm.h: Update.
3933         * gnulib/import/isnanl.c: Update.
3934         * gnulib/import/itold.c: Update.
3935         * gnulib/import/libc-config.h: Update.
3936         * gnulib/import/limits.in.h: Update.
3937         * gnulib/import/localcharset.c: Update.
3938         * gnulib/import/localcharset.h: Update.
3939         * gnulib/import/localtime-buffer.c: Update.
3940         * gnulib/import/localtime-buffer.h: Update.
3941         * gnulib/import/lstat.c: Update.
3942         * gnulib/import/m4/00gnulib.m4: Update.
3943         * gnulib/import/m4/__inline.m4: Update.
3944         * gnulib/import/m4/absolute-header.m4: Update.
3945         * gnulib/import/m4/alloca.m4: Update.
3946         * gnulib/import/m4/builtin-expect.m4: Update.
3947         * gnulib/import/m4/canonicalize.m4: Update.
3948         * gnulib/import/m4/chdir-long.m4: Update.
3949         * gnulib/import/m4/close.m4: Update.
3950         * gnulib/import/m4/closedir.m4: Update.
3951         * gnulib/import/m4/configmake.m4: Update.
3952         * gnulib/import/m4/d-ino.m4: Update.
3953         * gnulib/import/m4/d-type.m4: Update.
3954         * gnulib/import/m4/dirent_h.m4: Update.
3955         * gnulib/import/m4/dirfd.m4: Update.
3956         * gnulib/import/m4/dirname.m4: Update.
3957         * gnulib/import/m4/double-slash-root.m4: Update.
3958         * gnulib/import/m4/dup.m4: Update.
3959         * gnulib/import/m4/dup2.m4: Update.
3960         * gnulib/import/m4/eealloc.m4: Update.
3961         * gnulib/import/m4/environ.m4: Update.
3962         * gnulib/import/m4/errno_h.m4: Update.
3963         * gnulib/import/m4/error.m4: Update.
3964         * gnulib/import/m4/exponentd.m4: Update.
3965         * gnulib/import/m4/exponentl.m4: Update.
3966         * gnulib/import/m4/extensions.m4: Update.
3967         * gnulib/import/m4/extern-inline.m4: Update.
3968         * gnulib/import/m4/fchdir.m4: Update.
3969         * gnulib/import/m4/fcntl-o.m4: Update.
3970         * gnulib/import/m4/fcntl.m4: Update.
3971         * gnulib/import/m4/fcntl_h.m4: Update.
3972         * gnulib/import/m4/fdopendir.m4: Update.
3973         * gnulib/import/m4/filenamecat.m4: Update.
3974         * gnulib/import/m4/flexmember.m4: Update.
3975         * gnulib/import/m4/float_h.m4: Update.
3976         * gnulib/import/m4/fnmatch.m4: Update.
3977         * gnulib/import/m4/fnmatch_h.m4: Update.
3978         * gnulib/import/m4/fpieee.m4: Update.
3979         * gnulib/import/m4/frexp.m4: Update.
3980         * gnulib/import/m4/frexpl.m4: Update.
3981         * gnulib/import/m4/fstat.m4: Update.
3982         * gnulib/import/m4/fstatat.m4: Update.
3983         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3984         * gnulib/import/m4/getcwd-path-max.m4: Update.
3985         * gnulib/import/m4/getcwd.m4: Update.
3986         * gnulib/import/m4/getdtablesize.m4: Update.
3987         * gnulib/import/m4/getlogin.m4: Update.
3988         * gnulib/import/m4/getlogin_r.m4: Update.
3989         * gnulib/import/m4/getpagesize.m4: Update.
3990         * gnulib/import/m4/getprogname.m4: Update.
3991         * gnulib/import/m4/gettimeofday.m4: Update.
3992         * gnulib/import/m4/glibc21.m4: Update.
3993         * gnulib/import/m4/glob.m4: Update.
3994         * gnulib/import/m4/glob_h.m4: Update.
3995         * gnulib/import/m4/gnulib-cache.m4: Update.
3996         * gnulib/import/m4/gnulib-common.m4: Update.
3997         * gnulib/import/m4/gnulib-comp.m4: Update.
3998         * gnulib/import/m4/gnulib-tool.m4: Update.
3999         * gnulib/import/m4/hard-locale.m4: Update.
4000         * gnulib/import/m4/include_next.m4: Update.
4001         * gnulib/import/m4/inttypes-pri.m4: Update.
4002         * gnulib/import/m4/inttypes.m4: Update.
4003         * gnulib/import/m4/isnand.m4: Update.
4004         * gnulib/import/m4/isnanl.m4: Update.
4005         * gnulib/import/m4/largefile.m4: Update.
4006         * gnulib/import/m4/limits-h.m4: Update.
4007         * gnulib/import/m4/localcharset.m4: Update.
4008         * gnulib/import/m4/locale-fr.m4: Update.
4009         * gnulib/import/m4/locale-ja.m4: Update.
4010         * gnulib/import/m4/locale-zh.m4: Update.
4011         * gnulib/import/m4/localtime-buffer.m4: Update.
4012         * gnulib/import/m4/longlong.m4: Update.
4013         * gnulib/import/m4/lstat.m4: Update.
4014         * gnulib/import/m4/malloc.m4: Update.
4015         * gnulib/import/m4/malloca.m4: Update.
4016         * gnulib/import/m4/math_h.m4: Update.
4017         * gnulib/import/m4/mbrtowc.m4: Update.
4018         * gnulib/import/m4/mbsinit.m4: Update.
4019         * gnulib/import/m4/mbsrtowcs.m4: Update.
4020         * gnulib/import/m4/mbstate_t.m4: Update.
4021         * gnulib/import/m4/memchr.m4: Update.
4022         * gnulib/import/m4/memmem.m4: Update.
4023         * gnulib/import/m4/mempcpy.m4: Update.
4024         * gnulib/import/m4/memrchr.m4: Update.
4025         * gnulib/import/m4/mkdir.m4: Update.
4026         * gnulib/import/m4/mkstemp.m4: Update.
4027         * gnulib/import/m4/mmap-anon.m4: Update.
4028         * gnulib/import/m4/mode_t.m4: Update.
4029         * gnulib/import/m4/msvc-inval.m4: Update.
4030         * gnulib/import/m4/msvc-nothrow.m4: Update.
4031         * gnulib/import/m4/multiarch.m4: Update.
4032         * gnulib/import/m4/nocrash.m4: Update.
4033         * gnulib/import/m4/off_t.m4: Update.
4034         * gnulib/import/m4/onceonly.m4: Update.
4035         * gnulib/import/m4/open-cloexec.m4: Update.
4036         * gnulib/import/m4/open.m4: Update.
4037         * gnulib/import/m4/openat.m4: Update.
4038         * gnulib/import/m4/opendir.m4: Update.
4039         * gnulib/import/m4/pathmax.m4: Update.
4040         * gnulib/import/m4/rawmemchr.m4: Update.
4041         * gnulib/import/m4/readdir.m4: Update.
4042         * gnulib/import/m4/readlink.m4: Update.
4043         * gnulib/import/m4/realloc.m4: Update.
4044         * gnulib/import/m4/rename.m4: Update.
4045         * gnulib/import/m4/rewinddir.m4: Update.
4046         * gnulib/import/m4/rmdir.m4: Update.
4047         * gnulib/import/m4/save-cwd.m4: Update.
4048         * gnulib/import/m4/secure_getenv.m4: Update.
4049         * gnulib/import/m4/setenv.m4: Update.
4050         * gnulib/import/m4/signal_h.m4: Update.
4051         * gnulib/import/m4/ssize_t.m4: Update.
4052         * gnulib/import/m4/stat-time.m4: Update.
4053         * gnulib/import/m4/stat.m4: Update.
4054         * gnulib/import/m4/std-gnu11.m4: Update.
4055         * gnulib/import/m4/stdbool.m4: Update.
4056         * gnulib/import/m4/stddef_h.m4: Update.
4057         * gnulib/import/m4/stdint.m4: Update.
4058         * gnulib/import/m4/stdio_h.m4: Update.
4059         * gnulib/import/m4/stdlib_h.m4: Update.
4060         * gnulib/import/m4/strchrnul.m4: Update.
4061         * gnulib/import/m4/strdup.m4: Update.
4062         * gnulib/import/m4/strerror.m4: Update.
4063         * gnulib/import/m4/string_h.m4: Update.
4064         * gnulib/import/m4/strstr.m4: Update.
4065         * gnulib/import/m4/strtok_r.m4: Update.
4066         * gnulib/import/m4/sys_socket_h.m4: Update.
4067         * gnulib/import/m4/sys_stat_h.m4: Update.
4068         * gnulib/import/m4/sys_time_h.m4: Update.
4069         * gnulib/import/m4/sys_types_h.m4: Update.
4070         * gnulib/import/m4/tempname.m4: Update.
4071         * gnulib/import/m4/time_h.m4: Update.
4072         * gnulib/import/m4/unistd-safer.m4: Update.
4073         * gnulib/import/m4/unistd_h.m4: Update.
4074         * gnulib/import/m4/warn-on-use.m4: Update.
4075         * gnulib/import/m4/wchar_h.m4: Update.
4076         * gnulib/import/m4/wchar_t.m4: Update.
4077         * gnulib/import/m4/wctype_h.m4: Update.
4078         * gnulib/import/m4/wint_t.m4: Update.
4079         * gnulib/import/malloc.c: Update.
4080         * gnulib/import/malloc/scratch_buffer.h: Update.
4081         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4082         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4083         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4084         * gnulib/import/malloca.c: Update.
4085         * gnulib/import/malloca.h: Update.
4086         * gnulib/import/malloca.valgrind: Update.
4087         * gnulib/import/math.in.h: Update.
4088         * gnulib/import/mbrtowc.c: Update.
4089         * gnulib/import/mbsinit.c: Update.
4090         * gnulib/import/mbsrtowcs-impl.h: Update.
4091         * gnulib/import/mbsrtowcs-state.c: Update.
4092         * gnulib/import/mbsrtowcs.c: Update.
4093         * gnulib/import/memchr.c: Update.
4094         * gnulib/import/memmem.c: Update.
4095         * gnulib/import/mempcpy.c: Update.
4096         * gnulib/import/memrchr.c: Update.
4097         * gnulib/import/mkdir.c: Update.
4098         * gnulib/import/mkstemp.c: Update.
4099         * gnulib/import/msvc-inval.c: Update.
4100         * gnulib/import/msvc-inval.h: Update.
4101         * gnulib/import/msvc-nothrow.c: Update.
4102         * gnulib/import/msvc-nothrow.h: Update.
4103         * gnulib/import/open.c: Update.
4104         * gnulib/import/openat-die.c: Update.
4105         * gnulib/import/openat-priv.h: Update.
4106         * gnulib/import/openat-proc.c: Update.
4107         * gnulib/import/openat.c: Update.
4108         * gnulib/import/openat.h: Update.
4109         * gnulib/import/opendir.c: Update.
4110         * gnulib/import/pathmax.h: Update.
4111         * gnulib/import/pipe-safer.c: Update.
4112         * gnulib/import/rawmemchr.c: Update.
4113         * gnulib/import/readdir.c: Update.
4114         * gnulib/import/readlink.c: Update.
4115         * gnulib/import/realloc.c: Update.
4116         * gnulib/import/ref-add.sin: Update.
4117         * gnulib/import/ref-del.sin: Update.
4118         * gnulib/import/rename.c: Update.
4119         * gnulib/import/rewinddir.c: Update.
4120         * gnulib/import/rmdir.c: Update.
4121         * gnulib/import/same-inode.h: Update.
4122         * gnulib/import/save-cwd.c: Update.
4123         * gnulib/import/save-cwd.h: Update.
4124         * gnulib/import/scratch_buffer.h: Update.
4125         * gnulib/import/secure_getenv.c: Update.
4126         * gnulib/import/setenv.c: Update.
4127         * gnulib/import/signal.in.h: Update.
4128         * gnulib/import/stat-time.c: Update.
4129         * gnulib/import/stat-time.h: Update.
4130         * gnulib/import/stat-w32.c: Update.
4131         * gnulib/import/stat-w32.h: Update.
4132         * gnulib/import/stat.c: Update.
4133         * gnulib/import/stdbool.in.h: Update.
4134         * gnulib/import/stddef.in.h: Update.
4135         * gnulib/import/stdint.in.h: Update.
4136         * gnulib/import/stdio.in.h: Update.
4137         * gnulib/import/stdlib.in.h: Update.
4138         * gnulib/import/str-two-way.h: Update.
4139         * gnulib/import/strchrnul.c: Update.
4140         * gnulib/import/strdup.c: Update.
4141         * gnulib/import/streq.h: Update.
4142         * gnulib/import/strerror-override.c: Update.
4143         * gnulib/import/strerror-override.h: Update.
4144         * gnulib/import/strerror.c: Update.
4145         * gnulib/import/string.in.h: Update.
4146         * gnulib/import/stripslash.c: Update.
4147         * gnulib/import/strnlen1.c: Update.
4148         * gnulib/import/strnlen1.h: Update.
4149         * gnulib/import/strstr.c: Update.
4150         * gnulib/import/strtok_r.c: Update.
4151         * gnulib/import/sys_stat.in.h: Update.
4152         * gnulib/import/sys_time.in.h: Update.
4153         * gnulib/import/sys_types.in.h: Update.
4154         * gnulib/import/tempname.c: Update.
4155         * gnulib/import/tempname.h: Update.
4156         * gnulib/import/time.in.h: Update.
4157         * gnulib/import/unistd--.h: Update.
4158         * gnulib/import/unistd-safer.h: Update.
4159         * gnulib/import/unistd.in.h: Update.
4160         * gnulib/import/unsetenv.c: Update.
4161         * gnulib/import/verify.h: Update.
4162         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4163         * gnulib/import/wchar.in.h: Update.
4164         * gnulib/import/wctype.in.h: Update.
4165         * gnulib/import/xalloc-oversized.h: Update.
4166         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4167         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4168
4169 2018-08-16  Gary Benson <gbenson@redhat.com>
4170
4171         PR gdb/13000:
4172         * gdb/main.c (captured_main_1): Exit with nonzero status
4173         in batch mode if the last command to be executed failed.
4174         * NEWS: Mention the above.
4175
4176 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4177
4178         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4179         end of warning message.
4180
4181 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4182
4183         PR gdb/22943:
4184         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4185         (aarch64_extract_return_value): Use
4186         aapcs_is_vfp_call_or_return_candidate.
4187         (aarch64_return_in_memory): Likewise.
4188         (aarch64_store_return_value): Likewise.
4189
4190 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4191
4192         * aarch64-tdep.c
4193         (aapcs_is_vfp_call_or_return_candidate): Make static
4194         (pass_in_v_or_stack): Remove function.
4195         (pass_in_v_vfp_candidate): New function.
4196         (aarch64_push_dummy_call): Check for float register candidates.
4197
4198 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4199
4200         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4201         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4202         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4203
4204 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4205
4206         PR build/23399
4207         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4208         (struct ipa_sym_addresses): Rename to...
4209         (struct ipa_sym_addresses_common): ... this.
4210         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4211
4212 2018-08-28  Tom Tromey  <tom@tromey.com>
4213
4214         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4215         (token_fifo): Now a std::vector.
4216         (yylex, c_parse): Update.
4217         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4218         (token_fifo): Now a std::vector.
4219         (yylex, d_parse): Update.
4220         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4221         (token_fifo): Now a std::vector.
4222         (yylex, go_parse): Update.
4223
4224 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4225
4226         * parser-defs.h (struct type_stack) <elements>: Change type to
4227         std::vector<union type_stack_elt>.
4228         <depth, size>: Remove.
4229         * parse.c (parse_exp_in_context_1): Adjust.
4230         (type_stack_reserve): Remove.
4231         (check_type_stack_depth): Remove.
4232         (insert_into_type_stack): Adjust to std::vector.
4233         (insert_type): Likewise.
4234         (push_type): Likewise.
4235         (push_type_int): Likewise.
4236         (insert_type_address_space): Likewise.
4237         (pop_type): Likewise.
4238         (pop_type_int): Likewise.
4239         (pop_typelist): Likewise.
4240         (pop_type_stack): Likewise.
4241         (append_type_stack): Likewise.
4242         (push_type_stack): Likewise.
4243         (get_type_stack): Likewise.
4244         (type_stack_cleanup): Likewise.
4245         (push_typelist): Likewise.
4246         (follow_types): Likewise.
4247         (_initialize_parse): Likewise.
4248
4249 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4250
4251         * NEWS: Mention csky target.
4252
4253 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4254             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4255             Don Breazeal  <donb@codesourcery.com>
4256
4257         * csky-linux-tdep.c: New file.
4258         * csky-tdep.c: Likewise.
4259         * csky-tdep.h: Likewise.
4260         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4261         csky-tdep.o.
4262         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4263         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4264         * configure.tgt: Add csky support.
4265
4266 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4267
4268         * python/py-framefilter.c (py_print_frame): Print frame architecture
4269         when printing on an MI output.
4270
4271 2018-08-27  Tom Tromey  <tom@tromey.com>
4272
4273         PR build/23087:
4274         * configure: Rebuild.
4275         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4276
4277 2018-08-27  Tom Tromey  <tom@tromey.com>
4278
4279         * aarch64-linux-tdep.c
4280         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4281         casts to int.
4282
4283 2018-08-27  Tom Tromey  <tom@tromey.com>
4284
4285         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4286         unsigned.
4287         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4288         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4289         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4290         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4291         unsigned.
4292
4293 2018-08-27  Tom Tromey  <tom@tromey.com>
4294
4295         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4296         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4297
4298 2018-08-27  Tom Tromey  <tom@tromey.com>
4299
4300         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4301         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4302         ULONGEST_MAX.
4303         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4304         ULONGEST_MAX.
4305         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4306         ULONGEST_MAX.
4307         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4308         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4309         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4310         ULONGEST_MAX.
4311         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4312         (ppc64_linux_sigaction_tramp_frame)
4313         (ppc32_linux_sighandler_tramp_frame)
4314         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4315         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4316         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4317         * mn10300-linux-tdep.c (am33_linux_sigframe)
4318         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4319         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4320         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4321         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4322         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4323         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4324         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4325         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4326         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4327         * microblaze-linux-tdep.c
4328         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4329         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4330         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4331         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4332         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4333         * common/common-types.h (ULONGEST_MAX): New define.
4334         (CORE_ADDR_MAX): Fix formatting.
4335         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4336         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4337         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4338         (arm_linux_rt_sigreturn_tramp_frame)
4339         (arm_eabi_linux_sigreturn_tramp_frame)
4340         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4341         (thumb2_eabi_linux_sigreturn_tramp_frame)
4342         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4343         (arm_linux_restart_syscall_tramp_frame)
4344         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4345         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4346         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4347         ULONGEST_MAX.
4348         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4349
4350 2018-08-27  Tom Tromey  <tom@tromey.com>
4351
4352         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4353         CORE_ADDR_MAX.
4354         * mips-tdep.c (mips_deal_with_atomic_sequence)
4355         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4356         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4357         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4358         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4359         CORE_ADDR_MAX.
4360         * aarch64-tdep.c (aarch64_software_single_step): Use
4361         CORE_ADDR_MAX.
4362
4363 2018-08-27  Tom Tromey  <tom@tromey.com>
4364
4365         * linespec.c (complete_linespec_component): Add cast to "char".
4366         * completer.c (completion_tracker::build_completion_result): Add
4367         cast to "char".
4368
4369 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4370
4371         * solist.h (struct solist, struct target_so_ops): Fix
4372         indentation.
4373
4374 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4375
4376         * ada-tasks.c (ada_task_info_s): Remove typedef.
4377         (DEF_VEC_O(ada_task_info_s)): Remove.
4378         (struct ada_tasks_inferior_data): Initialize fields.
4379         <task_list>: Make an std::vector.
4380         (get_ada_tasks_inferior_data): Allocate with new.
4381         (ada_get_task_number): Adjust.
4382         (get_task_number_from_id): Likewise.
4383         (valid_task_id): Likewise.
4384         (ada_get_task_info_from_ptid): Likewise.
4385         (iterate_over_live_ada_tasks): Likewise.
4386         (add_ada_task): Likewise.
4387         (read_known_tasks): Likewise.
4388         (ada_build_task_list): Likewise.
4389         (print_ada_task_info): Likewise.
4390         (info_task): Likewise.
4391         (task_command_1): Likewise.
4392
4393 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4394
4395         * ada-lang.c (add_angle_brackets): Return std::string.
4396
4397 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
4398
4399         * python/py-threadevent.c (py_get_event_thread): Initialize
4400         pythread.
4401
4402 2018-08-24  Pedro Alves  <palves@redhat.com>
4403
4404         * python/py-bpevent.c (create_breakpoint_event_object): Use
4405         copy-initialization.
4406         * python/py-continueevent.c (emit_continue_event): Use
4407         copy-initialization.
4408         * python/py-exitedevent.c (create_exited_event_object): Return a
4409         gdbpy_ref<>.
4410         (emit_exited_event): Use copy-initialization.
4411         * python/py-inferior.c (python_new_inferior)
4412         (python_inferior_deleted, add_thread_object): Use
4413         copy-initialization.
4414         * python/py-infevents.c (create_inferior_call_event_object)
4415         (create_register_changed_event_object)
4416         (create_memory_changed_event_object): Return a gdbpy_ref<>.
4417         (emit_inferior_call_event, emit_memory_changed_event)
4418         (emit_register_changed_event): Use copy-initialization.
4419         * python/py-newobjfileevent.c (create_new_objfile_event_object):
4420         Return a gdbpy_ref<>.
4421         (emit_new_objfile_event): Use copy-initialization.
4422         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4423         (emit_clear_objfiles_event): Use copy-initialization.
4424         * python/py-signalevent.c (create_signal_event_object): Use
4425         copy-initialization.
4426         * python/py-threadevent.c (create_thread_event_object): Use
4427         copy-initialization.
4428
4429 2018-08-24  Pedro Alves  <palves@redhat.com>
4430             Simon Marchi  <simon.marchi@ericsson.com>
4431
4432         PR gdb/23379
4433         * python/py-continueevent.c: Include "gdbthread.h".
4434         (create_continue_event_object): Add intro comment.  Add 'ptid'
4435         parameter.  Use it to find thread to pass to
4436         create_thread_event_object.
4437         (emit_continue_event): Pass PTID down to
4438         create_continue_event_object.
4439         * python/py-event.h (py_get_event_thread): Declare.
4440         (create_thread_event_object): Remove default from 'thread'
4441         parameter.
4442         * python/py-stopevent.c (create_stop_event_object): Use
4443         py_get_event_thread.
4444         * python/py-threadevent.c (get_event_thread): Rename to ...
4445         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
4446         and use it to find the thread.
4447         (create_thread_event_object): Assert that THREAD isn't null.
4448         Don't find the event thread here.
4449
4450 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
4451
4452         * block.h (blockrange, blockranges): New struct declarations.
4453         (struct block): Add new field named `ranges'.
4454         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
4455         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
4456         macros for accessing ranges in struct block.
4457         (make_blockranges): New declaration.
4458         block.c (make_blockranges): New function.
4459         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
4460         for block.
4461         * symtab.h (find_pc_partial_function): Add new parameter `block'.
4462         * blockframe.c (cache_pc_function_block): New static global.
4463         (clear_pc_function_cache): Clear cache_pc_function_block.
4464         (find_pc_partial_function): Move comment to symtab.h.  Add
4465         support for non-contiguous blocks.
4466         * cli/cli-cmds.c (block.h): Include.
4467         (print_disassembly): Handle printing of non-contiguous blocks.
4468         (disassemble_current_function): Likewise.
4469         (disassemble_command): Likewise.
4470
4471         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
4472         BLOCK_START.
4473         * blockframe.c (get_pc_function_start): Likewise.
4474         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
4475         (gcc_symbol_address): Likewise.
4476         * compile/compile-object-run.c (compile_object_run): Likewise.
4477         * compile/compile.c (get_expr_block_and_pc): Likewise.
4478         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
4479         (func_addr_to_tail_call_list): Likewise.
4480         * findvar.c (default_read_var_value): Likewise.
4481         * inline-frame.c (inline_frame_this_id): Likewise.
4482         (skip-inline_frames): Likewise.
4483         * infcmd.c (until_next_command): Likewise.
4484         * linespec.c (convert_linespec_to_sals): Likewise.
4485         * parse.c (parse_exp_in_context_1): Likewise.
4486         * printcmd.c (build_address_symbolic): likewise.
4487         (info_address_command): Likewise.
4488         symtab.c (find_function_start_sal): Likewise.
4489         (skip_prologue_sal): Likewise.
4490         (find_function_alias_target): Likewise.
4491         (find_gnu_ifunc): Likewise.
4492         * stack.c (find_frame_funname): Likewise.
4493         * symtab.c (fixup_symbol_section): Likewise.
4494         (find_function_start_sal): Likewise.
4495         (skip_prologue_sal): Likewsie.
4496         (find_function_alias_target): Likewise.
4497         (find_gnu_ifunc): Likewise.
4498         * tracepoint.c (info_scope_command): Likewise.
4499         * value.c (value_fn_field): Likewise.
4500
4501         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
4502         in place of find_pc_partial_function.
4503         * blockframe.c (find_function_entry_range_from_pc): New function.
4504         * symtab.h (find_function_entry_range_from_pc): Declare and document.
4505         * objfiles.c (objfile_relocate1): Relocate start and end addresses
4506         for each range in a block.
4507
4508
4509 2018-08-23  Xavier Roirand  <roirand@adacore.com>
4510
4511         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
4512         incrementation.
4513
4514 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4515
4516         * solib-svr4.c (read_program_headers_from_bfd): Return
4517         gdb::optional<gdb::byte_vector>.
4518         (svr4_exec_displacement): Adjust.
4519
4520 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4521
4522         * solib-svr4.c (read_program_header): Return
4523         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
4524         (find_program_interpreter): Return
4525         gdb::optional<gdb::byte_vector>.
4526         (scan_dyntag_auxv): Adjust.
4527         (enable_break): Adjust.
4528         (svr4_exec_displacement): Adjust.
4529
4530 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4531
4532         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
4533         * inf-child.c (inf_child_target::terminal_save_inferior): New.
4534
4535 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4536
4537         * guile/scm-string.c (gdbscm_scm_from_printf): Use
4538         string_vprintf.
4539         * guile/scm-utils.c (gdbscm_printf): Likewise.
4540         * serial.c (serial_printf): Likewise.
4541         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
4542
4543 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
4544
4545         * stack.c (print_frame): Print frame architecture when printing on
4546         an MI output.
4547         * NEWS: Mention new "arch" attribute in frame output.
4548
4549 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4550
4551         * arch/aarch64.h (aarch64_regnum): Update comment.
4552
4553 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4554
4555         * NEWS: Add SVE to 8.2 section.
4556
4557 2018-08-21  Pedro Alves  <palves@redhat.com>
4558
4559         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
4560         out from gdbscm_parse_function_args.
4561         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
4562         gdbscm_parse_function_args_1.
4563
4564 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
4565
4566         PR gdb/17816
4567         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
4568         operator.
4569
4570 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
4571
4572         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
4573
4574 2018-08-19  Michael Spang  <spang@google.com>
4575
4576         PR gdb/11786
4577         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
4578         for PT_TLS segments.
4579
4580 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
4581
4582         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
4583         dwarf_variable_value.
4584         * dwarf2-frame.c (class dwarf_expr_executor):
4585         Add override for dwarf_variable_value.
4586         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
4587         (class symbol_needs_eval_context): Likewise.
4588         (indirect_synthetic_pointer): Add forward declaration.
4589         (sect_variable_value): New function.
4590         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
4591         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
4592         for DW_OP_GNU_variable_value.
4593
4594 2018-08-16  Tom Tromey  <tom@tromey.com>
4595
4596         * top.c (read_command_file): Update.
4597         (command_line_input): Remove "repeat" argument.
4598         * ada-lang.c (get_selections): Update.
4599         * linespec.c (decode_line_2): Update.
4600         * defs.h (command_line_input): Remove argument.
4601         * cli/cli-script.c (read_next_line): Update.
4602         * python/py-gdb-readline.c: Update.
4603
4604 2018-08-17  Tom Tromey  <tom@tromey.com>
4605
4606         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
4607         command_line_input.
4608
4609 2018-08-15  Tom Tromey  <tom@tromey.com>
4610
4611         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
4612
4613 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
4614
4615         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
4616         If used, use find_pc_partial_function to find address range
4617         to disassemble.
4618         * mi/mi-main.c (mi_cmd_list_features): Report
4619         "data-disassemble-a-option" feature.
4620         * NEWS: Mention new -data-disassemble option -a.
4621
4622 2018-08-13  Tom Tromey  <tom@tromey.com>
4623
4624         * common/common-defs.h (_FORTIFY_SOURCE): Define.
4625
4626 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4627
4628         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
4629         (aarch64_linux_collect_sve_regset): Likewise.
4630         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
4631         * regcache.h (regcache_map_entry_size): New function.
4632
4633 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4634
4635         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
4636         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
4637         (SVE_HEADER_VL_LENGTH): Likewise.
4638         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
4639         (SVE_HEADER_FLAGS_LENGTH): Likewise.
4640         (SVE_HEADER_RESERVED_LENGTH): Likewise.
4641         (SVE_HEADER_SIZE_OFFSET): Likewise.
4642         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
4643         (SVE_HEADER_VL_OFFSET): Likewise.
4644         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
4645         (SVE_HEADER_FLAGS_OFFSET): Likewise.
4646         (SVE_HEADER_RESERVED_OFFSET): Likewise.
4647         (SVE_HEADER_SIZE): Likewise.
4648         (aarch64_linux_core_read_vq): Add function.
4649         (aarch64_linux_core_read_description): Check for SVE section.
4650
4651 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4652
4653         * aarch64-fbsd-tdep.c
4654         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
4655         collect_size.
4656         * aarch64-linux-tdep.c
4657         (aarch64_linux_iterate_over_regset_sections): Likewise.
4658         * alpha-linux-tdep.c
4659         (alpha_linux_iterate_over_regset_sections):
4660         * alpha-nbsd-tdep.c
4661         (alphanbsd_iterate_over_regset_sections): Likewise.
4662         * amd64-fbsd-tdep.c
4663         (amd64fbsd_iterate_over_regset_sections): Likewise.
4664         * amd64-linux-tdep.c
4665         (amd64_linux_iterate_over_regset_sections): Likewise.
4666         * arm-bsd-tdep.c
4667         (armbsd_iterate_over_regset_sections): Likewise.
4668         * arm-fbsd-tdep.c
4669         (arm_fbsd_iterate_over_regset_sections): Likewise.
4670         * arm-linux-tdep.c
4671         (arm_linux_iterate_over_regset_sections): Likewise.
4672         * corelow.c (get_core_registers_cb): Likewise.
4673         (core_target::fetch_registers): Likewise.
4674         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
4675         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
4676         * gdbarch.h (void): Regenerate.
4677         * gdbarch.sh: Add supply_size and collect_size.
4678         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
4679         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
4680         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
4681         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
4682         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
4683         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
4684         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
4685         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
4686         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
4687         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
4688         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
4689         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
4690         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
4691         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
4692         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
4693         Likewise.
4694         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
4695         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
4696         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
4697         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
4698         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
4699         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
4700         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
4701         Likewise.
4702         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
4703         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4704         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4705         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4706         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4707         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4708         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4709         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4710
4711 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
4712
4713         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4714         with string_printf.
4715
4716 2018-08-10  Keith Seitz  <keiths@redhat.com>
4717
4718         * compile/compile-c-support.c (add_code_header, add_code_footer):
4719         Move into policy class.
4720         (c_push_user_expression, pop_user_expression_nop)
4721         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4722         (compile_program): New host class.
4723         (c_compile_program): New typedef.
4724         (c_compute_porgram): Use c_compile_program.
4725
4726 2018-08-10  Keith Seitz  <keiths@redhat.com>
4727
4728         * compile/compile-internal.h (compile_instance::~compile_instance):
4729         Remove calls to htab_delete.
4730         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4731         * compile.c (compile_instance::compile_instance): Initialize
4732         htab unique pointers.
4733         (compile_instance::get_cached_type, compile_instance::insert_type)
4734         (compile_instance::error_symbol_once): Update for unique_ptr.
4735
4736 2018-08-10  Keith Seitz  <keiths@redhat.com>
4737
4738         * compile/compile-c-symbols.c (struct symbol_error)
4739         (hash_symbol_error, eq_symbol_error, del_symbol_error)
4740         (compile_instance::insert_symbol_error)
4741         (compile_instance::error_symbol_once): Move to ...
4742         * compile/compile.c: ... here.
4743
4744 2018-08-10  Keith Seitz  <keiths@redhat.com>
4745
4746         * compile/compile-c-support.c (c_get_compile_context): Use `new'
4747         instead of `new_compile_instance'.
4748         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4749         Update description.
4750         If the symbol error map is not initialized, create it.
4751         (generate_c_for_for_one_symbol): Do not check/initialize
4752         the symbol error map.
4753         * compile/compile-c-types.c (compile_c_instance): Make a class.
4754         Update all callers.
4755         (compile_instance::compile_instance): Initialize the type cache.
4756         (get_cached_type): New function.
4757         (insert_type): Update description.
4758         (compile_c_instance::m_default_cflags): Define.
4759         (convert_type): Update description.  Use get_cached_type.
4760         (delete_instance): Moved to destructor.
4761         (new_compile_instance): Moved to constructor.
4762         * compile/compile-c.h (compile_c_instance): Make class inheriting
4763         from compile_instance.
4764         <base>: Remove field.
4765         <type_map, symbol_err_map>: Move to base class.
4766         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4767         * compile/compile-internal.h (compile_instance): Make class.
4768         <type_map_t, symbol_err_map_t>: Define.
4769         <fe>: Rename to `m_gcc_fe'.
4770         <scope, block, gcc_target_options>: Add `m_' prefix.
4771         <m_type_map, m_symbol_err_map>: New fields, moved from
4772         compile_c_instance.
4773         <destroy>: Remove.
4774         (convert_type, new_compile_instance): Remove.
4775         * compile/compile.c (cleanup_compile_instance): Remove.
4776         (compile_to_object): Use unique_ptr to eliminate cleanups.
4777         (compile_instance::set_print_callback, compile_instance::version)
4778         (compile_instance::set_verbose)
4779         (compile_instance::set_driver_filename)
4780         (compile_instance::set_triplet_regexp)
4781         (compile_instance::set_arguments)
4782         (compile_instance::set_source_file)
4783         (compile_instance::compile): Define.
4784
4785 2018-08-10  Keith Seitz  <keiths@redhat.com>
4786
4787         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4788         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4789         gcc-c-fe.def to define C plugin.
4790         (delete_instance): Delete `c_plugin'.
4791         (new_compile_instance): Initialize `c_plugin'.
4792         * compile/compile-c.h: Include gcc_c_plugin.h.
4793         (struct compile_c_instance) <c_plugin>: New member.
4794         * gcc-c-plugin.h: New file.
4795         Update all callers with API change.
4796
4797 2018-08-10  Keith Seitz  <keiths@redhat.com>
4798
4799         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4800         (HFILES_NO_SRCDIR): ... to here.
4801         Add compile-internal.h and compile-c.h.
4802         * compile/compile-c-support.c: Include compile-c.h.
4803         * compile/compile-c-symbols.c: Include compile-c.h.
4804         (generate_c_for_variable_locations): Update comment.
4805         * compile/compile-c-types.c: Include compile-c.h.
4806         * compile/compile-c.h: New file -- moved C language declarations
4807         from other files here.
4808         * compile/compile-internal.h: Do not include hashtab.h or
4809         common/enum-flags.h.
4810         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4811         (gcc_convert_symbol, gcc_symbol_address)
4812         (generate_c_for_variable_locations, c_get_mode_for_size)
4813         (c_get_range_decl_name): Definitions moved to compile-c.h.
4814         * compile/compile-loc2c.c: Include compile-c.h.
4815
4816 2018-08-10  Keith Seitz  <keiths@redhat.com>
4817
4818         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4819         (c_symbol_substitution_name): ... this.
4820         Update all callers.
4821
4822 2018-08-10  Keith Seitz  <keiths@redhat.com>
4823
4824         * compile/compile-c-support.c (c_compute_program): Use
4825         unique_xmalloc_ptr to eliminate cleanup.
4826         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4827         Return a unique_xmalloc_ptr and eliminate cleanup.
4828         * compile/compile-internal.h (generate_c_for_variable_locations):
4829         Return unique_xmalloc_ptr and update description.
4830
4831 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4832
4833         * corelow.c (core_target::get_core_register_section): Rename
4834         min_size to section_min_size.
4835
4836 2018-08-09  Jim Wilson  <jimw@sifive.com>
4837
4838         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4839         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4840         * NEWS: Mention new GNU/Linux RISC-V target.
4841         * configure.host: Add riscv*-*-linux*.
4842         * configure.nat: Add riscv*.
4843         * configure.tgt: Add riscv*-*-linux*.
4844         * riscv-linux-nat.c: New file.
4845         * riscv-linux-tdep.c: New file.
4846
4847 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4848
4849         * infrun.c (resume): Make static, add forward declaration.
4850         (proceed): Update header comment.
4851         * infrun.h (resume): Delete declaration.
4852
4853 2018-08-09  Tom Tromey  <tom@tromey.com>
4854
4855         * riscv-tdep.h: Minor formatting fixes.
4856
4857 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4858
4859         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4860         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4861         (test_mkdir_recursive): Likewise.
4862         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4863
4864 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4865
4866         * valarith.c (value_subscripted_rvalue): If an array is not in
4867         memory, and we don't know the upper bound, then we can't know that
4868         the requested element exists or not.
4869
4870 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4871
4872         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4873         (target_options_to_string): Add comment.
4874
4875 2018-08-08  Tom Tromey  <tom@tromey.com>
4876
4877         * unittests/scoped_mmap-selftests.c: Check result of "write".
4878
4879 2018-08-08  Jim Wilson  <jimw@sifive.com>
4880
4881         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4882         (decode_register_index_short): New.
4883         (decode_j_type_insn, decode_cj_type_insn): New.
4884         (decode_b_type_insn, decode_cb_type_insn): New.
4885         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4886         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4887         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4888         is_c_sw_insn instead of is_sw_insn.
4889         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4890         (riscv_software_single_step): New.
4891         * riscv-tdep.h (riscv_software_single_step): Declare.
4892
4893         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4894         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4895
4896 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4897
4898         PR gdb/18050:
4899         * target.c (dispose_inferior): Don't dispose of inferiors that are
4900         already killed.
4901
4902 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4903
4904         * remote.c (remote_target::download_tracepoint): Change char* to
4905         const char*.
4906
4907 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4908
4909         * target.h (target_options_to_string): Return an std::string.
4910         * target.c (str_comma_list_concat_elem): Return void, use
4911         std::string.
4912         (do_option): Likewise.
4913         (target_options_to_string): Return an std::string.
4914         * linux-nat.c (linux_nat_target::wait): Adjust.
4915         * target-debug.h (target_debug_print_options): Adjust.
4916
4917 2018-08-07  Tom Tromey  <tom@tromey.com>
4918
4919         * Makefile.in (CPPFLAGS): New variable.
4920         (INTERNAL_CPPFLAGS): Use it.
4921
4922 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4923
4924         * NEWS: Mention the index cache.
4925
4926 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4927
4928         * common/pathstuff.h (get_standard_cache_dir): New.
4929         * common/pathstuff.c (get_standard_cache_dir): New.
4930         * build-id.h (build_id_to_string): New.
4931         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4932         DEBUG_STR_SUFFIX): Move to here.
4933         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4934         DEBUG_STR_SUFFIX): Move from there.
4935         (write_psymtabs_to_index): Make non-static, add basename
4936         parameter.  Write to temporary files, rename when done.
4937         (save_gdb_index_command): Adjust call to
4938         write_psymtabs_to_index.
4939         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4940         field.
4941         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4942         (get_gdb_index_contents_from_cache): New.
4943         (get_gdb_index_contents_from_cache_dwz): New.
4944         (dwarf2_initialize_objfile): Read index from cache.
4945         (dwarf2_build_psymtabs): Save to index.
4946         * dwarf-index-cache.h: New file.
4947         * dwarf-index-cache.c: New file.
4948         * dwarf-index-write.h: New file.
4949
4950 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4951
4952         * gnulib/aclocal.m4: Re-generate.
4953         * gnulib/config.in: Re-generate.
4954         * gnulib/configure: Re-generate.
4955         * gnulib/import/Makefile.am: Re-generate.
4956         * gnulib/import/Makefile.in: Re-generate.
4957         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4958         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4959         * gnulib/import/m4/mkdir.m4: New file.
4960         * gnulib/import/mkdir.c: New file.
4961         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4962         module.
4963
4964 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4965
4966         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4967         * common/scoped_mmap.c: New file.
4968         * common/scoped_mmap.h (destroy): New method.
4969         (~scoped_mmap, reset): Use destroy.
4970         (scoped_mmap): New move constructor.
4971         (mmap_file): New declaration.
4972         * unittests/scoped_mmap-selftests.c (test_normal,
4973         test_invalid_filename, run_tests): New functions.
4974         (_initialize_scoped_mmap_selftests): Register selftest.
4975
4976 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4977
4978         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4979         (read_gdb_index_from_buffer): ... this.  Remove section
4980         parameter, add buffer parameter.
4981         (get_gdb_index_contents_ftype,
4982         get_gdb_index_contents_dwz_ftype): New typedefs.
4983         (dwarf2_read_gdb_index): Add callback parameters to get the
4984         index contents.
4985         (get_gdb_index_contents_from_section): New.
4986         (dwarf2_initialize_objfile): Update call to
4987         dwarf2_read_gdb_index.
4988
4989 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4990
4991         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4992         (gdb_open_cloexec): Likewise.
4993         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4994         (commandline_from_pid): Likewise.
4995         (linux_xfer_osdata_threads): Likewise.
4996         (linux_xfer_osdata_fds): Likewise.
4997         * ada-lang.c (is_package_name): Likewise.
4998         * auxv.c (procfs_xfer_auxv): Likewise.
4999         * breakpoint.c (print_one_breakpoint_location): Use
5000         uiout::field_fmt.
5001         (print_one_catch_solib): Use string_printf.
5002         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5003         (add_pe_forwarded_sym): Likewise.
5004         * dwarf2read.c (create_type_unit_group): Likewise.
5005         (build_error_marker_type): Likewise.
5006         * infcall.c (get_function_name): Likewise.
5007         * valprint.c (print_converted_chars_to_obstack): Likewise.
5008         * xtensa-tdep.c (xtensa_register_type): Likewise.
5009
5010 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5011
5012         * remote.c (remote_target::download_tracepoint): Fix format
5013         string errors.
5014
5015 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5016
5017         * tracefile.c: Include common/byte-vector.h.
5018         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5019         with trace_regblock_size if needed.  Update uses of buf.
5020
5021 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5022
5023         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5024         std::vector<unsigned char>.
5025         * tracepoint.c (collection_list::collection_list): Remove
5026         m_regs_mask initializer from initializer list.  Resize
5027         m_regs_mask using the largest remote register number.
5028         (collection_list::add_remote_register): Remove size check on
5029         m_regs_mask.  Use at to access element.
5030         (collection_list::stringify): Change type of temp_buf to
5031         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5032         stringify the register mask.  Use pack_hex_byte for the register
5033         mask.
5034
5035 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5036
5037         * tracepoint.h (class collection_list) <add_register>: Remove.
5038         <add_remote_register, add_ax_registers, add_local_register>:
5039         Declare.
5040         <add_memrange>: Add scope parameter.
5041         * tracepoint.c (encode_actions_1): Likewise.
5042         (collection_list::add_register): Rename to ...
5043         (collection_list::add_remote_register): ... this.  Update
5044         comment.
5045         (collection_list::add_ax_registers, add_local_register): New
5046         methods.
5047         (collection_list::add_memrange): Add scope parameter.  Call
5048         add_local_register instead of add_register.
5049         (finalize_tracepoint_aexpr): New function.
5050         (collection_list::collect_symbol): Update calls to add_memrange.
5051         Call add_local_register instead of add_register.  Call
5052         add_ax_registers.  Call finalize_tracepoint_aexpr.
5053         (encode_actions_1): Get remote regnos for $reg action.  Call
5054         add_remote_register, add_ax_registers, and add_local_register.
5055         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5056         (validate_actionline): Call finalize_tracepoint_aexpr.
5057
5058 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5059
5060         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5061         Replace array buf with gdb::char_vector buf, of size
5062         get_remote_packet_size ().  Replace references to buf and
5063         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5064         and xsnprintf with snprintf.  Raise errors if the buffer is too
5065         small.
5066
5067 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5068
5069         * remote.c (remote_target::download_tracepoint): Fix the has_more
5070         predicate in the QTDP action list iteration.
5071
5072 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5073
5074         * remote.c (remote_target::download_tracepoint): Fix indentation
5075         in for block.
5076
5077 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5078
5079         * proc-api.c (_initialize_proc_api): Remove c, unused.
5080         * procfs.c (procfs_init_inferior): Remove signals, unused.
5081         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5082         unused.
5083
5084 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5085             Andrew Burgess  <andrew.burgess@embecosm.com>
5086
5087         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5088         'W_STOPCODE (0)' as this could be ambiguous.
5089
5090 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5091
5092         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5093         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5094         "ai_socktype").
5095
5096 2018-08-02  Tom Tromey  <tom@tromey.com>
5097
5098         PR symtab/16842.
5099         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5100         symbols.
5101         (process_structure_scope): Likewise.
5102
5103 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5104
5105         PR gdb/22629:
5106         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5107         kill inferior.
5108
5109 2018-08-02  Tom Tromey  <tom@tromey.com>
5110
5111         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5112         (darwin_suspend_inferior, darwin_resume_inferior)
5113         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5114         (darwin_check_new_threads): Check result of get_darwin_inferior.
5115
5116 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5117
5118         GDB 8.1.1 released.
5119
5120 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5121
5122         * varobj.c (varobj_get_path_expr_parent): Report an error if
5123         parent is a dynamic varobj.
5124
5125 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5126
5127         * gnulib/aclocal.m4: Re-generate.
5128         * gnulib/config.in: Re-generate.
5129         * gnulib/configure: Re-generate.
5130         * gnulib/import/Makefile.in: Re-generate.
5131         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5132         * gnulib/import/m4/onceonly.m4: Re-generate.
5133
5134 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5135
5136         * target-descriptions.c (struct xml_test_tdesc): New.
5137         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5138         (record_xml_tdesc): Update.
5139         (maintenance_check_xml_descriptions): Update.
5140         * target-descriptions.h (record_xml_tdesc): Update comment.
5141
5142 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5143
5144         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5145         checking array bounds are defined.
5146
5147 2018-07-30  Tom Tromey  <tom@tromey.com>
5148
5149         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5150         irreflexivity violation.
5151
5152 2018-07-30  Tom Tromey  <tom@tromey.com>
5153
5154         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5155         * value.c (unpack_long): Remove lint code.
5156         * valops.c (value_ind): Remove lint code.
5157         * valarith.c (value_x_binop, value_x_unop, value_equal)
5158         (value_pos): Remove lint code.
5159
5160 2018-07-28  Tom de Vries  <tdevries@suse.de>
5161
5162         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5163         with undefined upper bound as <optimized out>.
5164
5165 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5166
5167         * gcore.in: Rename variable "name" to "prefix".  Expand
5168         "usage" text.
5169
5170 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5171
5172         * windows-nat.c (windows_nat_target::create_inferior): Update to
5173         call close() in global namespace.
5174
5175 2018-07-26  Tom Tromey  <tom@tromey.com>
5176
5177         * dwarf-index-write.c (add_address_entry): Don't add objfile
5178         offsets.
5179         * dbxread.c (find_stab_function): Rename from
5180         find_stab_function_addr.  Return a bound_minimal_symbol.
5181         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5182         Don't add objfile offsets.
5183         (end_psymtab): Use raw_text_low, raw_text_high,
5184         MSYMBOL_VALUE_RAW_ADDRESS.
5185         (read_ofile_symtab): Update.
5186         (process_one_symbol): Update.
5187         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5188         offsets.
5189         (dw2_relocate): Remove.
5190         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5191         searching addrmap.
5192         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5193         Update.
5194         (process_psymtab_comp_unit_reader, add_partial_symbol)
5195         (add_partial_subprogram, dwarf2_ranges_read): Update.
5196         (load_partial_dies): Update.
5197         (add_address_entry): Don't add objfile offsets.
5198         (dwarf2_build_include_psymtabs): Update.
5199         (create_addrmap_from_aranges): Don't add objfile offsets.
5200         (dw2_find_pc_sect_compunit_symtab): Update.
5201         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5202         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5203         Update.
5204         (parse_partial_symbols): Don't add objfile offsets.  Use
5205         raw_text_low, raw_text_high.  Update.
5206         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5207         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5208         or call 'relocate' quick function.  Clear psymbol_map.
5209         * psympriv.h (struct partial_symbol) <address>: Add section
5210         offset.
5211         <set_unrelocated_address>: Rename from set_address.
5212         <raw_text_low, raw_text_high>: New methods.
5213         <text_low, text_high>: Add objfile parameter.
5214         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5215         set_unrelocated_address.
5216         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5217         (find_pc_psymbol): Update.
5218         (fixup_psymbol_section, relocate_psymtabs): Remove.
5219         (dump_psymtab, psym_functions): Update.
5220         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5221         parameter.
5222         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5223         (start_psymtab_common): Update.
5224         * symfile-debug.c (debug_qf_relocate): Remove.
5225         (debug_sym_quick_functions): Update.
5226         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5227         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5228         Update.
5229
5230 2018-07-26  Tom Tromey  <tromey@redhat.com>
5231
5232         * dbxread.c (end_psymtab): Use text_high_valid and
5233         text_low_valid.
5234         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5235         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5236         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5237         Update comment.
5238         <text_low_valid, text_high_valid>: New fields.
5239         <set_text_low, set_text_high>: Update.
5240         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5241
5242 2018-07-26  Tom Tromey  <tom@tromey.com>
5243
5244         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5245         Update.
5246         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5247         textlow and texthigh fields.
5248         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5249         Update.
5250         * mdebugread.c (parse_lines, parse_partial_symbols)
5251         (psymtab_to_symtab_1): Update.
5252         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5253         Rename fields.  Update comment.  Now private.
5254         <text_low, text_high, set_text_low, set_text_high>: New methods.
5255         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5256         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5257         (start_psymtab_common, maintenance_info_psymtabs)
5258         (maintenance_check_psymtabs): Update.
5259         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5260         texthigh fields.
5261         (scan_xcoff_symtab): Update.
5262
5263 2018-07-26  Tom Tromey  <tromey@redhat.com>
5264
5265         * psympriv.h (struct partial_symbol) <unrelocated_address,
5266         address, set_address>: New methods.
5267         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5268         (fixup_psymbol_section, relocate_psymtabs): Update.
5269         (print_partial_symbols): Add 'objfile' parameter.  Update.
5270         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5271         Update.
5272
5273 2018-07-26  Tom Tromey  <tom@tromey.com>
5274
5275         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5276         (debug_names::write_psymbols): Update.
5277         * psympriv.h (struct partial_symbol): Derive from
5278         general_symbol_info.
5279         <obj_section>: New method.
5280         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5281         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5282         (find_pc_sect_psymbol, fixup_psymbol_section)
5283         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5284         (print_partial_symbols, recursively_search_psymtabs)
5285         (compare_psymbols, psymbol_hash, psymbol_compare)
5286         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5287         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5288
5289 2018-07-26  Tom Tromey  <tromey@redhat.com>
5290
5291         * dbxread.c (end_psymtab): Remove dead code.
5292
5293 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5294
5295         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5296         DWARF unwinders are disabled.
5297         * dwarf2-frame.c: Add dwarf2read.h include.
5298         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5299         disabled.
5300         (dwarf2_frame_unwinders_enabled_p): Define.
5301         (show_dwarf_unwinders_enabled_p): New function.
5302         (_initialize_dwarf2_frame): Register switch to control DWARF
5303         unwinder use.
5304         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5305         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5306         (show_dwarf_cmdlist): Remove static keyword.
5307         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5308         (show_dwarf_cmdlist): Declare.
5309         * NEWS: Document new feature.
5310
5311 2018-07-26  Tom de Vries  <tdevries@suse.de>
5312
5313         PR breakpoints/23366
5314         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5315
5316 2018-07-26  Tom de Vries  <tdevries@suse.de>
5317
5318         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5319         DW_AT_count can't be translated to a dynamic prop.
5320
5321 2018-07-25  Tom de Vries  <tdevries@suse.de>
5322
5323         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5324         try/catch.
5325
5326 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5327
5328         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5329
5330 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5331
5332         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5333
5334 2018-07-24  Keith Seitz  <keiths@redhat.comt
5335
5336         PR symtab/23010
5337         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5338         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5339         instead of add_symbol_to_list.
5340         (read_file_scope): Call prepare_one_comp_unit before reading
5341         any other DIEs.
5342
5343 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5344
5345         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5346
5347 2018-07-24  Tom Tromey  <tom@tromey.com>
5348
5349         * utils.c (malloc, realloc, free): Don't declare.
5350         * configure, config.in: Rebuild.
5351         * configure.ac: Don't check for declarations of free, malloc, or
5352         realloc.
5353
5354 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5355
5356         * aarch64-linux-nat.c
5357         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5358         variable.
5359         * arm-linux-nat.c (fetch_regs): Likewise.
5360         (store_regs): Likewise.
5361         (fetch_vfp_regs): Likewise.
5362         (store_vfp_regs): Likewise.
5363         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5364         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5365         (arm_linux_nat_target::insert_watchpoint): Likewise.
5366         (arm_linux_nat_target::remove_watchpoint): Likewise.
5367         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5368         Likewise.
5369         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5370         Likewise.
5371         * ppc-linux-nat.c (fetch_register): Likewise.
5372         (fetch_all_gp_regs): Likewise.
5373         (fetch_ppc_registers): Likewise.
5374         (store_all_gp_regs): Likewise.
5375         (store_ppc_registers): Likewise.
5376         (hwdebug_insert_point): Likewise.
5377         (can_use_watchpoint_cond_accel): Likewise.
5378         * remote-sim.c (gdb_os_write_stdout): Likewise.
5379
5380 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5381             Tom Tromey  <tom@tromey.com>
5382
5383         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5384         test for it.
5385         * configure: Rebuild.
5386
5387 2018-07-22  Tom Tromey  <tom@tromey.com>
5388
5389         * regformats/regdat.sh: Define xmltarget_${name} inside
5390         #ifndef IN_PROCESS_AGENT.
5391
5392 2018-07-22  Tom Tromey  <tom@tromey.com>
5393
5394         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5395
5396 2018-07-22  Tom Tromey  <tom@tromey.com>
5397
5398         * symfile.c (reread_symbols): Notify iter, not objfile.
5399
5400 2018-07-22  Tom Tromey  <tom@tromey.com>
5401
5402         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5403         Use arch_ops.
5404         (ravenscar_thread_target::prepare_to_store): Likewise.
5405
5406 2018-07-22  Tom Tromey  <tom@tromey.com>
5407
5408         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5409         unused variable.  Call value_fetch_lazy when needed.
5410         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5411         Remove unused variable.  Call value_fetch_lazy when needed.
5412
5413 2018-07-22  Tom Tromey  <tom@tromey.com>
5414
5415         * m32c-tdep.c (mark_dma): Return void.
5416         (make_regs): Remove unused declarations.
5417
5418 2018-07-22  Tom Tromey  <tom@tromey.com>
5419
5420         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5421         cmdscm_get_valid_command_smob_arg_unsafe for effect.
5422         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5423         bkscm_get_valid_block_smob_arg_unsafe for effect.
5424
5425 2018-07-22  Tom Tromey  <tom@tromey.com>
5426
5427         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5428         value_type.
5429
5430 2018-07-22  Tom Tromey  <tom@tromey.com>
5431
5432         * windows-nat.c (saved_context): Conditionally define.
5433         * remote.c (remote_target::remote_btrace_maybe_reopen):
5434         Conditionally declare "warned".
5435         * inflow.c (sigquit_ours): Conditionally define.
5436         (new_tty): Move "tty" declaration inside #if.
5437         * guile/guile.c (guile_datadir): Conditionally define.
5438         * charset.c (set_be_le_names): Move some declarations inside #if.
5439         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
5440         #if.
5441         (parse_xml_btrace_conf): Likewise.
5442
5443 2018-07-22  Tom Tromey  <tom@tromey.com>
5444
5445         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
5446
5447 2018-07-22  Tom Tromey  <tom@tromey.com>
5448
5449         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
5450         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
5451         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
5452         * buildsym-legacy.c (get_macro_table): Remove unused variable.
5453         * stack.c (frame_apply_level_command): Remove unused variable.
5454         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
5455         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
5456         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
5457         unused variable.
5458         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
5459         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
5460         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
5461         variable.
5462         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
5463         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
5464         variable.
5465         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
5466         Remove unused variable.
5467         * cli/cli-script.c (recurse_read_control_structure): Remove unused
5468         variable.
5469         * common/tdesc.c (print_xml_feature::visit): Remove unused
5470         variable.
5471         * compile/compile-object-load.c (store_regs): Remove unused
5472         variables.
5473         * complaints.c (clear_complaints): Remove unused variable.
5474         * corelow.c (core_target_open): Remove unused variable.
5475         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
5476         variable.
5477         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
5478         variable.
5479         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
5480         variable.
5481         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
5482         variable.
5483         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
5484         variable.
5485         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
5486         variable.
5487         * ia64-tdep.c (examine_prologue): Remove unused variable.
5488         * infcall.c (run_inferior_call): Remove unused variable.
5489         * inferior.c (exit_inferior): Remove unused variable.
5490         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
5491         * linespec.c (decode_line_2): Remove unused variable.
5492         * linux-nat.c (super_close): Remove.
5493         * linux-tdep.c (linux_info_proc): Remove unused variable.
5494         * mi/mi-main.c (mi_execute_command): Remove unused variable.
5495         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
5496         Remove unused variable.
5497         * parse.c (find_minsym_type_and_address): Remove unused variable.
5498         * printcmd.c (info_symbol_command, printf_floating): Remove unused
5499         variable.
5500         * python/py-breakpoint.c (bppy_set_commands): Remove unused
5501         variable.
5502         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
5503         variables.
5504         * record-btrace.c (record_btrace_target::store_registers): Remove
5505         unused variable.
5506         (cmd_show_record_btrace_cpu): Remove unused variable.
5507         * riscv-tdep.c (riscv_register_reggroup_p)
5508         (riscv_push_dummy_call, riscv_return_value): Remove unused
5509         variable.
5510         * rust-exp.y (literal): Remove unused variable.
5511         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
5512         unused variable.
5513         <STRUCTOP_ANONYMOUS>: Likewise.
5514         * s390-linux-tdep.c (s390_linux_init_abi_31)
5515         (s390_linux_init_abi_64): Remove unused variable.
5516         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
5517         (file_select_thread, net_windows_open, _initialize_ser_windows):
5518         Remove unused variables.
5519         * symtab.c (find_pc_sect_line): Remove unused variable.
5520         * target-memory.c (compute_garbled_blocks): Remove unused
5521         variable.
5522         (target_write_memory_blocks): Remove unused variable.
5523         * target.c (target_stack::unpush): Remove unused variables.
5524         * tracepoint.c (start_tracing, all_tracepoint_actions)
5525         (merge_uploaded_trace_state_variables)
5526         (print_one_static_tracepoint_marker): Remove unused variable.
5527         * unittests/basic_string_view/element_access/char/1.cc (test01):
5528         Remove unused variable.
5529         * windows-nat.c (windows_continue, windows_add_all_dlls)
5530         (do_initial_windows_stuff, windows_nat_target::create_inferior):
5531         Remove unused variables.
5532
5533 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
5534
5535         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
5536         attr_profile in HAVE_ELF.
5537         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
5538         HAVE_ELF.
5539
5540 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
5541
5542         * frame.c (frame_register_unwind): Change parameter name.
5543         (frame_unwind_register): Likewise.
5544         (frame_unwind_register_value): Likewise.
5545         (frame_unwind_register_signed): Likewise.
5546         (frame_unwind_register_unsigned): Likewise.
5547         * frame.h (frame_register_unwind): Likewise.
5548         (frame_unwind_register): Likewise.
5549         (frame_unwind_register_value): Likewise.
5550         (frame_unwind_register_signed): Likewise.
5551         (frame_unwind_register_unsigned): Likewise.
5552         (frame_unwind_arch): Likewise.
5553
5554 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5555
5556         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
5557         ISA maintenance.
5558
5559 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5560
5561         * mips-linux-nat.c (mips_linux_nat_target::read_description):
5562         Call `get_ptrace_pid' rather than extracting the ptrace PID by
5563         hand.
5564
5565 2018-07-20  Keith Seitz  <keiths@redhat.com>
5566
5567         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
5568         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
5569         m_compunit_symtab, m_language>: Add "m_" prefix.
5570         Update all uses.
5571         * buildsym.c: Update all uses.
5572
5573 2018-07-20  Tom Tromey  <tom@tromey.com>
5574
5575         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
5576         * buildsym.h (record_line_ftype): Remove typedef.
5577
5578 2018-07-20  Tom Tromey  <tom@tromey.com>
5579
5580         * buildsym-legacy.h (augment_type_symtab): Don't declare.
5581         (end_expandable_symtab): Likewise.
5582         (end_symtab_get_static_block): Likewise.
5583         (end_symtab_from_static_block): Likewise.
5584         * buildsym-legacy.c (augment_type_symtab): Remove.
5585         (end_expandable_symtab): Remove.
5586         (end_symtab_get_static_block): Remove.
5587         (end_symtab_from_static_block): Remove.
5588
5589 2018-07-20  Tom Tromey  <tom@tromey.com>
5590
5591         * dwarf2read.c: Include buildsym.h.
5592         (struct dwarf2_cu) <builder>: New method.
5593         (fixup_go_packaging): Update.
5594         (process_full_comp_unit, process_full_type_unit): Update.  Don't
5595         use scoped_free_pendings.
5596         (using_directives): Add "cu" parameter, remove "language".
5597         (read_import_statement, setup_type_unit_groups, )
5598         (read_func_scope, read_lexical_block_scope)
5599         (dwarf2_record_block_ranges, read_namespace): Update.
5600         (lnp_state_machine::lnp_state_machine): Add cu parameter.
5601         (lnp_state_machine::handle_end_sequence): Update.
5602         (class lnp_state_machine) <m_cu>: New member.
5603         <m_record_line_callback>: Remove.
5604         <m_currently_recording_lines>: New member.
5605         (lnp_state_machine::handle_set_file): Update.
5606         (noop_record_line): Remove.
5607         (dwarf_record_line_p): Add cu parameter.
5608         (dwarf_record_line_1, dwarf_finish_line): Likewise.
5609         (lnp_state_machine::record_line)
5610         (lnp_state_machine::lnp_state_machine)
5611         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5612         (dwarf_decode_lines): Update.
5613         (dwarf2_start_subfile): Add cu parameter.
5614         (dwarf2_start_symtab, new_symbol): Update.
5615         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
5616         Remove dwarf2_per_objfile parameter.
5617         (dwarf_decode_macros): Update.
5618
5619 2018-07-20  Tom Tromey  <tom@tromey.com>
5620
5621         * stabsread.c (define_symbol): Update.
5622         * buildsym-legacy.h (get_buildsym_compunit): Declare.
5623         * dwarf2read.c (new_symbol): Update.
5624         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
5625         * cp-namespace.c: Include buildsym.h.
5626         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
5627         * buildsym-legacy.c (get_buildsym_compunit): New function.
5628
5629 2018-07-20  Tom Tromey  <tom@tromey.com>
5630
5631         * xcoffread.c: Include buildsym-legacy.h.
5632         * windows-nat.c: Include buildsym-legacy.h.
5633         * stabsread.c: Include buildsym-legacy.h.
5634         * mdebugread.c: Include buildsym-legacy.h.
5635         * buildsym-legacy.h: New file.
5636         * buildsym-legacy.c: New file, from buildsym.c.
5637         * go32-nat.c: Include buildsym-legacy.h.
5638         * dwarf2read.c: Include buildsym-legacy.h.
5639         * dbxread.c: Include buildsym-legacy.h.
5640         * cp-namespace.c: Include buildsym-legacy.h.
5641         * coffread.c: Include buildsym-legacy.h.
5642         * buildsym.h: Move some contents to buildsym-legacy.h.
5643         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
5644         buildsym-legacy.c.
5645         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
5646
5647 2018-07-20  Tom Tromey  <tom@tromey.com>
5648
5649         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
5650         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
5651         (buildsym_compunit::buildsym_compunit)
5652         (buildsym_compunit::~buildsym_compunit)
5653         (buildsym_compunit::get_macro_table): Define.
5654
5655 2018-07-20  Tom Tromey  <tom@tromey.com>
5656
5657         * buildsym.c (reset_symtab_globals): Remove.
5658         (buildsym_compunit::end_symtab_from_static_block): Update.
5659         (buildsym_compunit::augment_type_symtab): Update.
5660         (end_symtab_from_static_block): Call free_buildsym_compunit.
5661         (augment_type_symtab, end_symtab, end_expandable_symtab):
5662         Likewise.
5663
5664 2018-07-20  Tom Tromey  <tom@tromey.com>
5665
5666         * arch-utils.c: Do not include buildsym.h.
5667         * mipsread.c: Do not include buildsym.h.
5668         * machoread.c: Do not include buildsym.h.
5669         * elfread.c: Do not include buildsym.h.
5670
5671 2018-07-20  Tom Tromey  <tom@tromey.com>
5672
5673         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
5674         initialization.
5675         (buildsym_compunit): Add new constructor.
5676         (struct buildsym_compunit) <get_last_source_file, finish_block,
5677         record_block_range, start_subfile, patch_subfile_names,
5678         push_subfile, pop_subfile, record_line, get_compunit_symtab,
5679         set_last_source_start_addr, get_last_source_start_addr,
5680         get_local_using_directives, set_local_using_directives,
5681         get_global_using_directives, outermost_context_p,
5682         get_current_context_stack, get_context_stack_depth,
5683         get_current_subfile, get_local_symbols, get_file_symbols,
5684         get_global_symbols, record_debugformat, record_producer,
5685         push_context, pop_context, end_symtab_get_static_block,
5686         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
5687         New public methods.
5688         <record_pending_block, finish_block_internal, make_blockvector,
5689         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
5690         private methods.
5691         Update all users.
5692
5693 2018-05-22  Tom Tromey  <tom@tromey.com>
5694
5695         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5696         parameter.
5697         (finish_block_internal): Update.
5698
5699 2018-07-20  Tom Tromey  <tom@tromey.com>
5700
5701         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5702         parameter.
5703         (finish_block_internal): Update.
5704
5705 2018-07-20  Tom Tromey  <tom@tromey.com>
5706
5707         * buildsym.h (EXTERN): Don't define or undef.
5708         * buildsym.c (EXTERN): Don't define.
5709
5710 2018-07-20  Tom Tromey  <tom@tromey.com>
5711
5712         * buildsym.c: Remove TODO comment.
5713
5714 2018-07-20  Tom Tromey  <tom@tromey.com>
5715
5716         * coffread.c (coff_symtab_read): Update.
5717         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5718         (xcoff_new_init): Update.
5719         * mipsread.c (mipscoff_new_init): Update.
5720         * mdebugread.c (mdebug_build_psymtabs): Update.
5721         * elfread.c (elf_new_init): Update.
5722         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5723         Update.
5724         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5725         (coffstab_build_psymtabs, elfstab_build_psymtabs)
5726         (stabsect_build_psymtabs): Update.
5727         * buildsym.h (buildsym_init): Don't declare.
5728         * buildsym.c: Update comment.
5729         (prepare_for_building): Remove.
5730         (start_symtab, restart_symtab): Update.
5731         (reset_symtab_globals): Update comment.
5732         (buildsym_init): Remove.
5733
5734 2018-07-20  Tom Tromey  <tom@tromey.com>
5735
5736         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5737         * stabsread.c (patch_block_stabs, define_symbol, read_type)
5738         (read_enum_type, common_block_start, common_block_end)
5739         (cleanup_undefined_types_1, finish_global_stabs): Update.
5740         * mdebugread.c (psymtab_to_symtab_1): Update.
5741         * dwarf2read.c (fixup_go_packaging, read_func_scope)
5742         (read_lexical_block_scope, new_symbol): Update.
5743         * dbxread.c (process_one_symbol): Update.
5744         * coffread.c (coff_symtab_read, process_coff_symbol)
5745         (coff_read_enum_type): Update.
5746         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5747         declare.
5748         (get_local_symbols, get_file_symbols, get_global_symbols): New
5749         functions.
5750         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5751         m_global_symbols.
5752         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5753         (~scoped_free_pendings): Update.
5754         (finish_block, prepare_for_building, reset_symtab_globals)
5755         (end_symtab_get_static_block, end_symtab_with_blockvector)
5756         (augment_type_symtab, push_context): Update.
5757         (get_local_symbols, get_file_symbols, get_global_symbols): New
5758         functions.
5759         (buildsym_init): Update.
5760
5761 2018-07-20  Tom Tromey  <tom@tromey.com>
5762
5763         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5764         (process_full_type_unit): Likewise.
5765         (dwarf2_start_symtab): Set list_in_scope.
5766
5767 2018-07-20  Tom Tromey  <tom@tromey.com>
5768
5769         * dwarf2read.c (process_psymtab_comp_unit_reader)
5770         (build_type_psymtabs_reader): Do not set list_in_scope.
5771
5772 2018-07-20  Tom Tromey  <tom@tromey.com>
5773
5774         * buildsym.c (free_pendings): Remove.
5775         (add_symbol_to_list, scoped_free_pendings)
5776         (finish_block_internal, buildsym_init): Update.
5777
5778 2018-07-20  Tom Tromey  <tom@tromey.com>
5779
5780         * xcoffread.c (read_xcoff_symtab): Update.
5781         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5782         Update.
5783         * dbxread.c (process_one_symbol): Update.
5784         * coffread.c (coff_symtab_read): Update.
5785         * buildsym.h (finish_block): Update.
5786         * buildsym.c (finish_block): Remove "listhead" argument.
5787         (end_symtab_get_static_block): Update.
5788
5789 2018-07-20  Tom Tromey  <tom@tromey.com>
5790
5791         * buildsym.h (class scoped_free_pendings): Remove constructor.
5792         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5793         method.
5794         <m_pending_block_obstack, m_pending_blocks>: New members.
5795         (pending_block_obstack, pending_blocks): Remove.
5796         (scoped_free_pendings::scoped_free_pendings): Default.
5797         (~scoped_free_pendings): Update.
5798         (free_pending_blocks): Remove.
5799         (finish_block_internal, record_pending_block, make_blockvector)
5800         (end_symtab_get_static_block, augment_type_symtab, push_context)
5801         (buildsym_init): Update.
5802
5803 2018-07-20  Tom Tromey  <tom@tromey.com>
5804
5805         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5806         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5807         members.
5808         (pending_addrmap, pending_addrmap_obstack)
5809         (pending_addrmap_interesting): Remove.
5810         (scoped_free_pendings, record_block_range, make_blockvector)
5811         (prepare_for_building, reset_symtab_globals, buildsym_init):
5812         Update.
5813
5814 2018-07-20  Tom Tromey  <tom@tromey.com>
5815
5816         * xcoffread.c (process_linenos): Update.
5817         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5818         * mdebugread.c (psymtab_to_symtab_1): Update.
5819         * dwarf2read.c (setup_type_unit_groups)
5820         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5821         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5822         * dbxread.c (process_one_symbol): Update.
5823         * coffread.c (coff_symtab_read, enter_linenos)
5824         (process_coff_symbol): Update.
5825         * buildsym.h (current_subfile): Don't declare.
5826         (get_current_subfile): Declare.
5827         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5828         member.
5829         (start_subfile, free_buildsym_compunit, push_subfile)
5830         (prepare_for_building, start_symtab): Update.
5831         (get_current_subfile): New function.
5832
5833 2018-07-20  Tom Tromey  <tom@tromey.com>
5834
5835         * coffread.c (coff_symtab_read): Update.
5836         * xcoffread.c (read_xcoff_symtab): Update.
5837         * dwarf2read.c (new_symbol): Update.
5838         (read_func_scope, read_lexical_block_scope): Update.
5839         * dbxread.c (process_one_symbol): Update.
5840         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5841         (outermost_context_p): Remove macro.
5842         (outermost_context_p, get_current_context_stack)
5843         (get_context_stack_depth): Declare.
5844         (pop_context): Return struct context_stack.
5845         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5846         member.
5847         (context_stack_size): Remove.
5848         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5849         (prepare_for_building, end_symtab_get_static_block)
5850         (augment_type_symtab, push_context): Update.
5851         (pop_context): Return struct context_stack.
5852         (outermost_context_p, get_current_context_stack)
5853         (get_context_stack_depth): New functions.
5854         (buildsym_init): Update.
5855
5856 2018-07-20  Tom Tromey  <tom@tromey.com>
5857
5858         * rust-exp.y: Now a pure parser.  Update all rules.
5859         (%union): Move earlier.
5860         (current_parser, work_obstack): Remove globals.
5861         (rust_parser, ~rust_parser): Update.
5862         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5863         lex_character, lex_number, lex_string, lex_identifier,
5864         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5865         convert_name, convert_params_to_expression,
5866         convert_ast_to_expression, ast_basic_type, ast_operation,
5867         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5868         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5869         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5870         ast_array_type, ast_slice_type, ast_reference_type,
5871         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5872         (rust_parse): Update.
5873         (rustyyerror, rustyylex): Add parser parameter.
5874         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5875         (rust_lex_stringish_test, rust_lex_test_sequence)
5876         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5877         (rust_lex_test_push_back, rust_lex_tests): Update.
5878
5879 2018-07-19  Pedro Alves  <palves@redhat.com>
5880
5881         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5882         gdb::unique_xmalloc_ptr.
5883         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5884         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5885         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5886         copy-initialization.
5887         * guile/scm-pretty-print.c (ppscm_print_children): Use
5888         gdb::unique_xmalloc_ptr instead of cleanups.
5889         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5890         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5891         gdb::unique_xmalloc_ptr.
5892         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5893         Adjust to use gdb::unique_xmalloc_ptr.
5894         * guile/scm-utils.c (extract_arg): Adjust.
5895         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5896         gdb::unique_xmalloc_ptr instead of a cleanup.
5897
5898 2018-07-19  Tom Tromey  <tom@tromey.com>
5899
5900         * utils.c (do_value_free_to_mark)
5901         (make_cleanup_value_free_to_mark): Remove.
5902         * utils.h (make_cleanup_value_free_to_mark): Remove.
5903
5904 2018-07-19  Pedro Alves  <palves@redhat.com>
5905
5906         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5907         forwarding reference.
5908
5909 2018-07-18  Pedro Alves  <palves@redhat.com>
5910
5911         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5912         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5913         cleanup.
5914
5915 2018-07-18  Pedro Alves  <palves@redhat.com>
5916
5917         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5918         exceptions.
5919         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5920         (gdbscm_wrap): New.
5921         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5922         directly instead of a cleanup.
5923         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5924         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5925         (vlscm_binop_gdbthrow): New, factored out from ...
5926         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5927         (vlscm_rich_compare): Use gdbscm_wrap.
5928         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5929         instead of a cleanup.
5930         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5931         cleanup.
5932         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5933         Use xfree directly instead of a cleanup.
5934         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5935         Adjust to use gdbscm_wrap and scoped_value_mark.
5936         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5937         (gdbscm_value_address, gdbscm_value_dereference)
5938         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5939         scoped_value_mark.
5940         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5941         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5942         scoped_value_mark.
5943         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5944         gdbscm_wrap and scoped_value_mark.
5945         (gdbscm_value_to_string): Use xfree directly instead of a
5946         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5947         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5948         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5949         scoped_value_mark.
5950         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5951         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5952         scoped_value_mark.
5953         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5954         gdbscm_wrap.
5955
5956 2018-07-18  Tom de Vries  <tdevries@suse.de>
5957
5958         * findvar.c (default_read_var_value): Also resolve dynamic type for
5959         LOC_OPTIMIZED_OUT vars.
5960
5961 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5962
5963         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5964         decoding.
5965
5966 2018-07-17  Tom Tromey  <tom@tromey.com>
5967
5968         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5969         (compute_enum_list, pascm_set_param_value_x)
5970         (gdbscm_parameter_value): Update.
5971         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5972         (gdbscm_scm_to_host_string): Update.
5973         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5974         Update.
5975         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5976         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5977         * guile/scm-string.c (gdbscm_scm_to_string): Return
5978         unique_xmalloc_ptr.
5979         (gdbscm_scm_to_host_string): Likewise.
5980
5981 2018-07-17  Tom Tromey  <tom@tromey.com>
5982
5983         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5984         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5985         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5986         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5987         unique_xmalloc_ptr.
5988
5989 2018-07-17  Tom Tromey  <tom@tromey.com>
5990
5991         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5992         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5993         Update.
5994         * guile/scm-cmd.c (cmdscm_function): Update.
5995         * guile/scm-pretty-print.c
5996         (ppscm_print_exception_unless_memory_error): Update.
5997         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5998         Return unique_xmalloc_ptr.
5999
6000 2018-07-17  Tom Tromey  <tom@tromey.com>
6001
6002         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6003         Use string_printf.
6004
6005 2018-07-17  Jim Wilson  <jimw@sifive.com>
6006
6007         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6008         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6009         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6010         unecessary braces after EF_RISCV_RVC test.  Delete call to
6011         set_gdbarch_decr_pc_after_break.
6012
6013         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6014         RISCV_LAST_FP_REGNUM + 1.
6015         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6016
6017 2018-07-17  Tom Tromey  <tom@tromey.com>
6018
6019         * configure.ac: Remove --disable-gdbcli.
6020         * configure: Rebuild.
6021         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6022         (SUBDIR_CLI_CFLAGS): Remove.
6023         (SFILES): Use SUBDIR_CLI_SRCS.
6024         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6025
6026 2018-07-17  Tom Tromey  <tom@tromey.com>
6027
6028         PR gdb/18624:
6029         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6030
6031 2018-07-16  Jim Wilson  <jimw@sifive.com>
6032
6033         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6034
6035 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6036
6037         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6038         variable.
6039         (libunwind_frame_sniffer): Likewise.
6040         (libunwind_frame_prev_register): Likewise.
6041         (libunwind_sigtramp_frame_sniffer): Likewise.
6042         * ia64-tdep.c (ia64_access_reg): Likewise.
6043         (ia64_access_rse_reg): Likewise.
6044         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6045         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6046
6047 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6048
6049         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6050
6051 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6052
6053         * remote-sim.c (gdbsim_target::close,
6054         gdbsim_target::mourn_inferior): Remove unused variables.
6055
6056 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6057
6058         * ia64-tdep.c (ktab_buf): New global.
6059         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6060         (get_kernel_table): Adjust.
6061
6062 2018-07-16  Tom Tromey  <tom@tromey.com>
6063
6064         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6065         * dwarf2read.c (using_directives, new_symbol): Use
6066         outermost_context_p.
6067         * dbxread.c (process_one_symbol): Use outermost_context_p.
6068         * coffread.c (coff_symtab_read): Use outermost_context_p.
6069
6070 2018-07-16  Tom Tromey  <tom@tromey.com>
6071
6072         * dwarf2read.c (using_directives, read_func_scope)
6073         (read_lexical_block_scope): Update.
6074         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6075         * buildsym.h (local_using_directives, global_using_directives):
6076         Don't declare.
6077         (get_local_using_directives, set_local_using_directives)
6078         (get_global_using_directives): Declare.
6079         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6080         m_global_using_directives>: New members.
6081         (finish_block_internal, prepare_for_building)
6082         (reset_symtab_globals, end_symtab_get_static_block)
6083         (push_context): Update.
6084         (get_local_using_directives, set_local_using_directives)
6085         (get_global_using_directives): New functions.
6086         (buildsym_init): Update.
6087
6088 2018-07-16  Tom Tromey  <tom@tromey.com>
6089
6090         * xcoffread.c (xcoff_initial_scan): Don't call
6091         free_pending_blocks.
6092         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6093         * buildsym.h (class scoped_free_pendings): Add constructor.
6094         (free_pending_blocks): Don't declare.
6095         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6096         (free_pending_blocks): Now static.
6097
6098 2018-07-16  Tom Tromey  <tom@tromey.com>
6099
6100         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6101         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6102         member.
6103         (struct subfile_stack): Remove.
6104         (subfile_stack): Remove.
6105         (push_subfile, pop_subfile, buildsym_init): Update.
6106
6107 2018-07-16  Tom Tromey  <tom@tromey.com>
6108
6109         * buildsym.c (push_subfile): Use gdb_assert.
6110         (pop_subfile): Use gdb_assert.
6111
6112 2018-07-16  Tom Tromey  <tom@tromey.com>
6113
6114         * buildsym.h (merge_symbol_lists): Remove.
6115         * buildsym.c (merge_symbol_lists): Remove.
6116
6117 2018-07-16  Tom Tromey  <tom@tromey.com>
6118
6119         * stabsread.c (scan_file_globals): Update comment.
6120         * stabsread.h (scan_file_globals): Move from buildsym.h.
6121         * buildsym.h (scan_file_globals): Move to stabsread.h.
6122
6123 2018-07-16  Tom Tromey  <tom@tromey.com>
6124
6125         * xcoffread.c (xcoff_new_init): Update.
6126         * mipsread.c (mipscoff_new_init): Update.
6127         * mdebugread.c (mdebug_build_psymtabs): Update.
6128         * elfread.c (elf_new_init): Update.
6129         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6130         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6131         * buildsym.h (buildsym_new_init): Don't declare.
6132         * buildsym.c (buildsym_new_init): Remove.
6133
6134 2018-07-16  Tom Tromey  <tom@tromey.com>
6135
6136         * stabsread.h (within_function): Move from buildsym.h.
6137         * stabsread.c (start_stabs): Clear within_function.
6138         * coffread.c (coff_start_symtab): Clear within_function.
6139         * buildsym.h (within_function): Move to stabsread.h.
6140         * buildsym.c (prepare_for_building): Update.
6141
6142 2018-07-16  Tom Tromey  <tom@tromey.com>
6143
6144         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6145         * dwarf2read.c (dwarf2_start_symtab): Don't set
6146         processing_gcc_compilation.
6147         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6148
6149 2018-07-16  Tom Tromey  <tom@tromey.com>
6150
6151         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6152         (next_symbol_text_func): Move from buildsym.h.
6153         * stabsread.c (hashname): Move from buildsym.c.
6154         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6155         (next_symbol_text_func, hashname): Move to stabsread.h.
6156         * buildsym.c: Don't include bcache.h
6157         (hashname): Move to stasbread.c.
6158
6159 2018-07-16  Tom Tromey  <tom@tromey.com>
6160
6161         * buildsym.h (context_stack_size): Don't declare.
6162         * buildsym.c (context_stack_size): New global.
6163
6164 2018-07-16  Tom Tromey  <tom@tromey.com>
6165
6166         * dbxread.c (processing_acc_compilation): New global.
6167         * buildsym.h (processing_acc_compilation): Don't declare.
6168
6169 2018-07-16  Tom Tromey  <tom@tromey.com>
6170
6171         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6172         * dbxread.c (read_ofile_symtab): Update.
6173         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6174         * buildsym.h (last_source_start_addr): Remove.
6175         (set_last_source_start_addr, get_last_source_start_addr):
6176         Declare.
6177         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6178         parameter.
6179         (struct buildsym_compunit) <m_last_source_start_addr>: New
6180         member.
6181         (prepare_for_building): Remove start_addr parameter.
6182         (start_symtab, restart_symtab, end_symtab_get_static_block)
6183         (end_symtab_with_blockvector): Update.
6184         (set_last_source_start_addr, get_last_source_start_addr): New
6185         functions.
6186
6187 2018-07-16  Tom Tromey  <tom@tromey.com>
6188
6189         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6190         member.
6191         (have_line_numbers): Remove.
6192         (record_line, prepare_for_building, end_symtab_get_static_block)
6193         (augment_type_symtab): Update.
6194
6195 2018-07-16  Tom Tromey  <tom@tromey.com>
6196
6197         * buildsym.c (~buildsym_compunit): Free the macro table.
6198         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6199         methods.
6200         <m_pending_macros>: New member.
6201         (pending_macros): Remove.
6202         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6203         (reset_symtab_globals, end_symtab_get_static_block)
6204         (end_symtab_with_blockvector, augment_type_symtab)
6205         (buildsym_init): Update.
6206
6207 2018-07-16  Tom Tromey  <tom@tromey.com>
6208
6209         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6210         parameter.
6211         (buildsym_compunit::set_last_source_file): New method.
6212         <m_last_source_file>: New member.
6213         (prepare_for_building): Remove "name" parameter.
6214         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6215         (last_source_file): Remove.
6216         (set_last_source_file, get_last_source_file): Update.
6217
6218 2018-07-16  Tom Tromey  <tom@tromey.com>
6219
6220         * buildsym.c (prepare_for_building): Add assert.
6221
6222 2018-07-16  Tom Tromey  <tom@tromey.com>
6223
6224         * buildsym.c (~buildsym_compunit): Update.
6225         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6226         (start_subfile, patch_subfile_names)
6227         (end_symtab_with_blockvector): Update.
6228
6229 2018-07-16  Tom Tromey  <tom@tromey.com>
6230
6231         * buildsym.c (struct buildsym_compunit): Add constructor,
6232         destructor, initializers.
6233         (start_buildsym_compunit): Remove.
6234         (free_buildsym_compunit): Use "delete".
6235         (start_symtab, restart_symtab): Use "new".
6236
6237 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6238
6239         * symfile.c (set_objfile_default_section_offset): Remove struct
6240         keyword.
6241
6242 2018-07-14  Stafford Horne  <shorne@gmail.com>
6243
6244         * (Responsible Maintainers): Add myself as or1k maintainer.
6245
6246 2018-07-13  Tom Tromey  <tom@tromey.com>
6247
6248         * symfile.c (set_objfile_default_section_offset): Use extra braces
6249         around initializer.
6250
6251 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6252
6253         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6254         non-branching basr.
6255
6256 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6257
6258         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6259         unittests/cli-utils-selftests.c
6260         * unittests/cli-utils-selftests.c: New file.
6261
6262 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6263
6264         * NEWS: Mention new commands. Mention change to 'thread apply'.
6265
6266 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6267
6268         * thread.c (thr_try_catch_cmd): New function.
6269         (thread_apply_all_command): Handle qcs flags.
6270         (thread_apply_command): Handle qcs flags.
6271         (taas_command): New function.
6272         (tfaas_command): New function.
6273         (_initialize_thread): Update to setup the new commands 'taas
6274         and 'tfaas'. Change doc string for 'thread apply'.
6275
6276 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6277
6278         * stack.c: (trailing_outermost_frame): New function, mostly
6279         extracted from backtrace_command_1.
6280         (leading_innermost_frame): New function.
6281         (backtrace_command_1): Update to call trailing_outermost_frame.
6282         (frame_apply_command_count): New function.
6283         (frame_apply_level_command): New function.
6284         (frame_apply_all_command): New function.
6285         (frame_apply_command): New function.
6286         (faas_command): New function.
6287         (frame_cmd_list): New variable.
6288         (_initialize_stack): Update to setup the new commands 'frame apply'
6289         and 'faas'.
6290
6291 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6292
6293         * cli-utils.c (number_or_range_parser::get_number): Only handle
6294         numbers or convenience var as numbers.
6295         (parse_flags): New function.
6296         (parse_flags_qcs): New function.
6297         (number_or_range_parser::finished): Ensure parsing end is detected
6298         before end of string.
6299         * cli-utils.h (parse_flags): New function.
6300         (parse_flags_qcs): New function.
6301         (number_or_range_parser): Remove m_finished bool.
6302         (number_or_range_parser::skip_range): Set m_in_range to false.
6303
6304 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6305
6306         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6307         on Windows.
6308
6309 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6310             Jan Kratochvil  <jan.kratochvil@redhat.com>
6311             Paul Fertser  <fercerpav@gmail.com>
6312             Tsutomu Seki  <sekiriki@gmail.com>
6313             Pedro Alves  <palves@redhat.com>
6314
6315         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6316         'unittests/parse-connection-spec-selftests.c'.
6317         (COMMON_SFILES): Add 'common/netstuff.c'.
6318         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6319         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6320         * common/netstuff.c: New file.
6321         * common/netstuff.h: New file.
6322         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6323         (wait_for_connect): Update comment.  New parameter
6324         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6325         Use 'sock' directly instead of 'scb->fd'.
6326         (try_connect): New function, with code from 'net_open'.
6327         (net_open): Rewrite main loop to deal with multiple
6328         sockets/addresses.  Handle IPv6-style hostnames; implement
6329         support for IPv6 connections.
6330         * unittests/parse-connection-spec-selftests.c: New file.
6331
6332 2018-07-11  Pedro Alves  <palves@redhat.com>
6333
6334         PR gdb/23377
6335         * remote.c (remote_target::remote_detach_pid): Call
6336         set_current_process.
6337
6338 2018-07-11  Pedro Alves  <palves@redhat.com>
6339
6340         * h8300-tdep.c (h8300_gdbarch_init): Remove
6341         set_gdbarch_ecoff_reg_to_regnum calls.
6342
6343 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6344
6345         PR c++/23373
6346         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6347         offsets/sizes for static members of a class/struct.
6348
6349 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6350
6351         * target-descriptions.c (tdesc_register_bitsize): Rename.
6352         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6353         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6354         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6355
6356 2018-07-10  Tom Tromey  <tom@tromey.com>
6357
6358         * breakpoint.c (moribund_locations): Now static and a
6359         std::vector.
6360         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6361         (build_bpstat_chain, update_global_location_list)
6362         (breakpoint_retire_moribund): Update.
6363         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6364         VEC.
6365
6366 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6367
6368         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6369         (riscv_register_reggroup_p): Use new function, remove unneeded
6370         parenthesis.
6371         (riscv_push_dummy_call): Extend assert to compare against xlen or
6372         flen based on register type.
6373
6374 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6375
6376         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6377
6378 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6379
6380         * remote.c (show_hardware_watchpoint_limit): New function.
6381         (show_hardware_watchpoint_length_limit): New function.
6382         (show_hardware_breakpoint_limit): New function.
6383         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6384         where appropriate, update help text.
6385
6386 2018-07-09  Tom Tromey  <tom@tromey.com>
6387
6388         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6389         (CLIBS): Don't mention NAT_CLIBS.
6390
6391 2018-07-09  Tom Tromey  <tom@tromey.com>
6392
6393         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6394         (LIBGDB_OBS, clean mostlyclean): Update.
6395         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6396
6397 2018-07-09  Tom Tromey  <tom@tromey.com>
6398
6399         * Makefile.in (%.c: %.y): Use ECHO_YACC.
6400         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
6401         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6402
6403 2018-07-09  Tom Tromey  <tom@tromey.com>
6404
6405         * Makefile.in (ALLDEPFILES): Remove exec.c.
6406         (COMMON_OBS): Remove exec.o.
6407         (COMMON_SFILES): Add exec.c.
6408
6409 2018-07-09  Tom Tromey  <tom@tromey.com>
6410
6411         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6412
6413 2018-07-09  Tom Tromey  <tom@tromey.com>
6414
6415         * Makefile.in (clean mostlyclean): Remove stamp-version.
6416         (version.c): Depend on stamp-version.
6417         (stamp-version): New rule, from version.c rule.
6418
6419 2018-07-09  Tom Tromey  <tom@tromey.com>
6420
6421         * Makefile.in (init.c): Depend on stamp-init.
6422         (stamp-init): New rule, from init.c rule.
6423         (clean mostlyclean): Remove stamp-init.
6424
6425 2018-07-09  Tom Tromey  <tom@tromey.com>
6426
6427         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6428         SUBDIR_GCC_COMPILE_SRCS.
6429
6430 2018-07-09  Tom Tromey  <tom@tromey.com>
6431
6432         * Makefile.in (init.c): Remove some unused sed rules.
6433
6434 2018-07-09  Tom Tromey  <tom@tromey.com>
6435
6436         * Makefile.in (TSOBS): Remove.
6437         (INIT_FILES): Update.
6438         (LIBGDB_OBS): Update.
6439         (COMMON_SFILES): Add inflow.c.
6440         (SFILES): Remove inflow.c.
6441
6442 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6443
6444         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
6445
6446 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
6447
6448         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
6449         get_saveloc_name, is_signal_frame_name, step_name,
6450         init_remote_name, create_addr_space_name,
6451         destroy_addr_space_name, search_unwind_table_name,
6452         find_dyn_list_name): Constify.
6453
6454 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
6455
6456         * darwin-nat.c (darwin_pthread_kill): New function.
6457         (darwin_resume_thread): Use darwin_pthread_kill.
6458
6459 2018-07-05  Tom de Vries  <tdevries@suse.de>
6460
6461         * macroexp.c (macro_buffer) <operator=>: New member function.
6462
6463 2018-07-04  Tom Tromey  <tom@tromey.com>
6464
6465         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
6466
6467 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
6468
6469         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
6470         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
6471         * maint.c: Likewise.
6472         * top.c: Likewise.
6473
6474 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6475
6476         * NEWS: Create a new section for the next release branch.
6477         Rename the section of the current branch, now that it has
6478         been cut.
6479
6480 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6481
6482         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
6483         * version.in: Bump version to 8.2.50.DATE-git.
6484
6485 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
6486             Pedro Alves  <palves@redhat.com>
6487
6488         * linux-nat.c (linux_init_ptrace): Rename to ...
6489         (linux_init_ptrace_procfs): ... this.  Call
6490         linux_proc_init_warnings.
6491         (linux_nat_target::post_attach)
6492         (linux_nat_target::post_startup_inferior): Adjust.
6493         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
6494         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
6495
6496 2018-07-04  Tom de Vries  <tdevries@suse.de>
6497
6498         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
6499         check ...
6500         (read_comp_unit_head): ... here.
6501
6502 2018-07-03  Tom Tromey  <tom@tromey.com>
6503
6504         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
6505         (stop_tracing, tstatus_command)
6506         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
6507         (print_one_static_tracepoint_marker): Update.
6508         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
6509         std::vector.
6510         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
6511         VEC.
6512         (all_tracepoints, static_tracepoints_here): Return std::vector.
6513
6514 2018-07-03  Tom Tromey  <tom@tromey.com>
6515
6516         * common/ptid.c (ptid_equal): Remove.
6517         * common/ptid.h (ptid_equal): Don't declare.
6518         * ada-tasks.c: Update.
6519         * breakpoint.c: Update.
6520         * common/agent.c: Update.
6521         * corelow.c: Update.
6522         * darwin-nat-info.c: Update.
6523         * darwin-nat.c: Update.
6524         * dcache.c: Update.
6525         * dtrace-probe.c: Update.
6526         * dummy-frame.c: Update.
6527         * fbsd-nat.c: Update.
6528         * frame.c: Update.
6529         * gdbthread.h: Update.
6530         * gnu-nat.c: Update.
6531         * go32-nat.c: Update.
6532         * inf-loop.c: Update.
6533         * inf-ptrace.c: Update.
6534         * infcall.c: Update.
6535         * infcmd.c: Update.
6536         * inflow.c: Update.
6537         * infrun.c: Update.
6538         * linux-fork.c: Update.
6539         * linux-nat.c: Update.
6540         * linux-thread-db.c: Update.
6541         * mi/mi-cmd-var.c: Update.
6542         * mi/mi-interp.c: Update.
6543         * mi/mi-main.c: Update.
6544         * nto-procfs.c: Update.
6545         * ppc-linux-tdep.c: Update.
6546         * procfs.c: Update.
6547         * python/py-inferior.c: Update.
6548         * python/py-record-btrace.c: Update.
6549         * python/py-record.c: Update.
6550         * ravenscar-thread.c: Update.
6551         * regcache.c: Update.
6552         * remote-sim.c: Update.
6553         * remote.c: Update.
6554         * sol-thread.c: Update.
6555         * solib.c: Update.
6556         * target.c: Update.
6557         * tui/tui-stack.c: Update.
6558         * varobj.c: Update.
6559         * windows-nat.c: Update.
6560         * windows-tdep.c: Update.
6561
6562 2018-07-03  Tom Tromey  <tom@tromey.com>
6563
6564         * common/ptid.c (ptid_match): Remove.
6565         * common/ptid.h (ptid_match): Don't declare.
6566         * fbsd-nat.c: Update.
6567         * infcmd.c: Update.
6568         * infrun.c: Update.
6569         * linux-nat.c: Update.
6570         * record-btrace.c: Update.
6571         * regcache.c: Update.
6572         * remote.c: Update.
6573
6574 2018-07-03  Tom Tromey  <tom@tromey.com>
6575
6576         * common/ptid.c (ptid_tid_p): Remove.
6577         * common/ptid.h (ptid_tid_p): Don't declare.
6578         * sol-thread.c: Update.
6579
6580 2018-07-03  Tom Tromey  <tom@tromey.com>
6581
6582         * common/ptid.c (ptid_lwp_p): Remove.
6583         * common/ptid.h (ptid_lwp_p): Don't declare.
6584         * fbsd-nat.c: Update.
6585         * linux-nat.c: Update.
6586         * nat/linux-procfs.c: Update.
6587         * nat/x86-linux-dregs.c: Update.
6588         * sol-thread.c: Update.
6589
6590 2018-07-03  Tom Tromey  <tom@tromey.com>
6591
6592         * common/ptid.c (ptid_is_pid): Remove.
6593         * common/ptid.h (ptid_is_pid): Don't declare.
6594         * infrun.c: Update.
6595         * linux-nat.c: Update.
6596         * mi/mi-interp.c: Update.
6597         * remote.c: Update.
6598         * thread.c: Update.
6599
6600 2018-07-03  Tom Tromey  <tom@tromey.com>
6601
6602         * common/ptid.c (ptid_get_tid): Remove.
6603         * common/ptid.h (ptid_get_tid): Don't declare.
6604         * ada-tasks.c: Update.
6605         * aix-thread.c: Update.
6606         * bsd-uthread.c: Update.
6607         * darwin-nat.c: Update.
6608         * fbsd-nat.c: Update.
6609         * i386-darwin-nat.c: Update.
6610         * infrun.c: Update.
6611         * linux-tdep.c: Update.
6612         * nto-procfs.c: Update.
6613         * ppc-ravenscar-thread.c: Update.
6614         * python/py-infthread.c: Update.
6615         * ravenscar-thread.c: Update.
6616         * sol-thread.c: Update.
6617         * sparc-ravenscar-thread.c: Update.
6618         * windows-nat.c: Update.
6619
6620 2018-07-03  Tom Tromey  <tom@tromey.com>
6621
6622         * common/ptid.c (ptid_get_lwp): Remove.
6623         * common/ptid.h (ptid_get_lwp): Don't declare.
6624         * aarch64-linux-nat.c: Update.
6625         * ada-tasks.c: Update.
6626         * aix-thread.c: Update.
6627         * amd64-linux-nat.c: Update.
6628         * arm-linux-nat.c: Update.
6629         * corelow.c: Update.
6630         * fbsd-nat.c: Update.
6631         * fbsd-tdep.c: Update.
6632         * gnu-nat.c: Update.
6633         * i386-cygwin-tdep.c: Update.
6634         * i386-gnu-nat.c: Update.
6635         * i386-linux-nat.c: Update.
6636         * ia64-linux-nat.c: Update.
6637         * inf-ptrace.c: Update.
6638         * infrun.c: Update.
6639         * linux-fork.c: Update.
6640         * linux-nat.c: Update.
6641         * linux-tdep.c: Update.
6642         * linux-thread-db.c: Update.
6643         * mips-linux-nat.c: Update.
6644         * nat/aarch64-linux-hw-point.c: Update.
6645         * nat/aarch64-linux.c: Update.
6646         * nat/linux-btrace.c: Update.
6647         * nat/linux-osdata.c: Update.
6648         * nat/linux-procfs.c: Update.
6649         * nat/x86-linux-dregs.c: Update.
6650         * obsd-nat.c: Update.
6651         * ppc-fbsd-nat.c: Update.
6652         * ppc-linux-nat.c: Update.
6653         * procfs.c: Update.
6654         * python/py-infthread.c: Update.
6655         * ravenscar-thread.c: Update.
6656         * remote.c: Update.
6657         * s390-linux-nat.c: Update.
6658         * sol-thread.c: Update.
6659         * sol2-tdep.c: Update.
6660         * spu-linux-nat.c: Update.
6661         * x86-linux-nat.c: Update.
6662         * xtensa-linux-nat.c: Update.
6663
6664 2018-07-03  Tom Tromey  <tom@tromey.com>
6665
6666         * common/ptid.c (ptid_get_pid): Remove.
6667         * common/ptid.h (ptid_get_pid): Don't declare.
6668         * aarch64-linux-nat.c: Update.
6669         * ada-lang.c: Update.
6670         * aix-thread.c: Update.
6671         * alpha-bsd-nat.c: Update.
6672         * amd64-fbsd-nat.c: Update.
6673         * amd64-linux-nat.c: Update.
6674         * arm-linux-nat.c: Update.
6675         * arm-nbsd-nat.c: Update.
6676         * auxv.c: Update.
6677         * break-catch-syscall.c: Update.
6678         * breakpoint.c: Update.
6679         * bsd-uthread.c: Update.
6680         * corelow.c: Update.
6681         * ctf.c: Update.
6682         * darwin-nat.c: Update.
6683         * fbsd-nat.c: Update.
6684         * fbsd-tdep.c: Update.
6685         * gcore.c: Update.
6686         * gnu-nat.c: Update.
6687         * hppa-nbsd-nat.c: Update.
6688         * hppa-obsd-nat.c: Update.
6689         * i386-fbsd-nat.c: Update.
6690         * ia64-linux-nat.c: Update.
6691         * inf-ptrace.c: Update.
6692         * infcmd.c: Update.
6693         * inferior.c: Update.
6694         * inferior.h: Update.
6695         * inflow.c: Update.
6696         * infrun.c: Update.
6697         * linux-fork.c: Update.
6698         * linux-nat.c: Update.
6699         * linux-tdep.c: Update.
6700         * linux-thread-db.c: Update.
6701         * m68k-bsd-nat.c: Update.
6702         * mi/mi-interp.c: Update.
6703         * mi/mi-main.c: Update.
6704         * mips-linux-nat.c: Update.
6705         * mips-nbsd-nat.c: Update.
6706         * mips64-obsd-nat.c: Update.
6707         * nat/aarch64-linux-hw-point.c: Update.
6708         * nat/aarch64-linux.c: Update.
6709         * nat/linux-btrace.c: Update.
6710         * nat/linux-osdata.c: Update.
6711         * nat/linux-procfs.c: Update.
6712         * nat/x86-linux-dregs.c: Update.
6713         * nto-procfs.c: Update.
6714         * obsd-nat.c: Update.
6715         * ppc-linux-nat.c: Update.
6716         * ppc-nbsd-nat.c: Update.
6717         * ppc-obsd-nat.c: Update.
6718         * proc-service.c: Update.
6719         * procfs.c: Update.
6720         * python/py-inferior.c: Update.
6721         * python/py-infthread.c: Update.
6722         * ravenscar-thread.c: Update.
6723         * record.c: Update.
6724         * remote-sim.c: Update.
6725         * remote.c: Update.
6726         * rs6000-nat.c: Update.
6727         * s390-linux-nat.c: Update.
6728         * sh-nbsd-nat.c: Update.
6729         * sol-thread.c: Update.
6730         * sparc-nat.c: Update.
6731         * sparc64-tdep.c: Update.
6732         * spu-linux-nat.c: Update.
6733         * spu-tdep.c: Update.
6734         * target-debug.h: Update.
6735         * target.c: Update.
6736         * thread.c: Update.
6737         * tid-parse.c: Update.
6738         * tracefile-tfile.c: Update.
6739         * vax-bsd-nat.c: Update.
6740         * windows-nat.c: Update.
6741         * x86-linux-nat.c: Update.
6742         * x86-nat.c: Update.
6743
6744 2018-07-03  Tom Tromey  <tom@tromey.com>
6745
6746         * common/ptid.c (pid_to_ptid): Remove.
6747         * common/ptid.h (pid_to_ptid): Don't declare.
6748         * aix-thread.c: Update.
6749         * arm-linux-nat.c: Update.
6750         * common/ptid.c: Update.
6751         * common/ptid.h: Update.
6752         * corelow.c: Update.
6753         * ctf.c: Update.
6754         * darwin-nat.c: Update.
6755         * fbsd-nat.c: Update.
6756         * fork-child.c: Update.
6757         * gnu-nat.c: Update.
6758         * go32-nat.c: Update.
6759         * inf-ptrace.c: Update.
6760         * infcmd.c: Update.
6761         * inferior.c: Update.
6762         * infrun.c: Update.
6763         * linux-fork.c: Update.
6764         * linux-nat.c: Update.
6765         * nat/aarch64-linux-hw-point.c: Update.
6766         * nat/fork-inferior.c: Update.
6767         * nat/x86-linux-dregs.c: Update.
6768         * nto-procfs.c: Update.
6769         * obsd-nat.c: Update.
6770         * procfs.c: Update.
6771         * progspace.c: Update.
6772         * remote.c: Update.
6773         * rs6000-nat.c: Update.
6774         * s390-linux-nat.c: Update.
6775         * sol-thread.c: Update.
6776         * spu-linux-nat.c: Update.
6777         * target.c: Update.
6778         * top.c: Update.
6779         * tracefile-tfile.c: Update.
6780         * windows-nat.c: Update.
6781
6782 2018-07-03  Tom Tromey  <tom@tromey.com>
6783
6784         * common/ptid.h (ptid_build): Don't declare.
6785         * common/ptid.c (ptid_build): Remove.
6786         * aix-thread.c: Update.
6787         * bsd-kvm.c: Update.
6788         * bsd-uthread.c: Update.
6789         * common/agent.c: Update.
6790         * common/ptid.c: Update.
6791         * common/ptid.h: Update.
6792         * corelow.c: Update.
6793         * darwin-nat.c: Update.
6794         * fbsd-nat.c: Update.
6795         * gnu-nat.c: Update.
6796         * linux-fork.c: Update.
6797         * linux-nat.c: Update.
6798         * linux-thread-db.c: Update.
6799         * nat/linux-osdata.c: Update.
6800         * nat/linux-procfs.c: Update.
6801         * nto-procfs.c: Update.
6802         * obsd-nat.c: Update.
6803         * proc-service.c: Update.
6804         * procfs.c: Update.
6805         * ravenscar-thread.c: Update.
6806         * remote-sim.c: Update.
6807         * remote.c: Update.
6808         * sol-thread.c: Update.
6809         * target.c: Update.
6810         * windows-nat.c: Update.
6811
6812 2018-07-03  Tom Tromey  <tom@tromey.com>
6813
6814         * infrun.c (follow_exec): Use exit_inferior_silent.
6815         * inferior.c (exit_inferior_num_silent): Remove.
6816         * inferior.h (exit_inferior_num_silent): Don't declare.
6817
6818 2018-07-03  Tom Tromey  <tom@tromey.com>
6819
6820         PR cli/23340:
6821         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6822         inferior_ptid on error.
6823
6824 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
6825             Simon Marchi  <simon.marchi@polymtl.ca>
6826
6827         PR tdep/8282
6828         * disasm.h (gdb_disassembler): Add
6829         `m_disassembler_options_holder'. member
6830         * disasm.c (get_all_disassembler_options): New function.
6831         (gdb_disassembler::gdb_disassembler): Use it.
6832         (gdb_buffered_insn_length_init_dis): Likewise.
6833         (gdb_buffered_insn_length): Adjust accordingly.
6834         (set_disassembler_options): Handle options with arguments.
6835         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6836         line if showing options with descriptions.
6837         (disassembler_options_completer): Adapt to using the
6838         `disasm_options_and_args_t' structure.
6839         * mips-tdep.c (mips_disassembler_options): New variable.
6840         (mips_disassembler_options_o32): Likewise.
6841         (mips_disassembler_options_n32): Likewise.
6842         (mips_disassembler_options_n64): Likewise.
6843         (gdb_print_insn_mips): Don't set `disassembler_options'.
6844         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6845         functions.
6846         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6847         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6848         `gdbarch_disassembler_options_implicit' and
6849         `gdbarch_valid_disassembler_options'.
6850         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6851         `disasm_options_and_args_t' structure.
6852         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6853         method.
6854         (valid_disassembler_options): Switch from `disasm_options_t' to
6855         the `disasm_options_and_args_t' structure.
6856         * NEWS: Document `set disassembler-options' support for the MIPS
6857         target.
6858         * gdbarch.h: Regenerate.
6859         * gdbarch.c: Regenerate.
6860
6861 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6862
6863         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6864
6865 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6866
6867         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6868         parameter in call to amd64_target_description.
6869         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6870         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6871         (amd64fbsd_init_abi): Likewise.
6872         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6873         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6874         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6875         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6876
6877 2018-06-29  Pedro Alves  <palves@redhat.com>
6878
6879         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6880         "segments" parameter.
6881         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6882         (_initialize_amd64_tdep): Update call to
6883         amd64_create_target_description.
6884         (amd64_target_description): Add "segments" parameter.  Adjust
6885         the implementation to use it.
6886         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6887         call to amd64_create_target_description.
6888         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6889         * gdb/arch/amd64.h (amd64_create_target_description): Add
6890         "segments" register.
6891         * gdb/arch/amd64.c (amd64_create_target_description): Add
6892         "segments" parameter.  Call create_feature_i386_64bit_segments
6893         only if SEGMENTS is true.
6894         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6895         call to amd64_create_target_description.
6896
6897 2018-06-29  Pedro Alves  <palves@redhat.com>
6898
6899         * thread.c (thread_target_id_str): New, factored out from ...
6900         (print_thread_info_1): ... here.  Use it to compute the max
6901         "Target Id" column width.
6902
6903 2018-06-29  Pedro Alves  <palves@redhat.com>
6904
6905         * remote.c (remote_target::extra_thread_info): Delete
6906         'display_buf' and 'n' locals.  from the cache, regardless of
6907         packet mechanims is in use.  Use cache for qThreadExtra and qP
6908         methods too.
6909
6910 2018-06-29  Pedro Alves  <palves@redhat.com>
6911
6912         * blockframe.c (find_pc_sect_containing_function): New function.
6913         * breakpoint.c (print_breakpoint_location): Don't call
6914         find_pc_sect_function.
6915         * linespec.c (create_sals_line_offset): Record the location's
6916         symbol in the sal.
6917         * linespec.c (convert_address_location_to_sals): Fill in sal's
6918         symbol with find_pc_sect_containing_function.
6919         * symtab.c (find_function_start_sal): Rename to ...
6920         (find_function_start_sal_1): ... this.
6921         (find_function_start_sal): Reimplement as wrapper around
6922         find_function_start_sal_1, and use
6923         find_pc_sect_containing_function to fill in the sal's symbol.
6924         (find_function_start_sal(symbol*, bool)): Adjust.
6925         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6926         comments.
6927         (find_pc_sect_containing_function): Declare.
6928
6929 2018-06-29  Pedro Alves  <palves@redhat.com>
6930
6931         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6932         true if the the location has no symbol.
6933
6934 2018-06-28  Tom Tromey  <tom@tromey.com>
6935
6936         * NEWS: Mention --enable-codesign.
6937         * silent-rules.mk (ECHO_SIGN): New variable.
6938         * configure.ac: Add --enable-codesign.
6939         * configure: Rebuild.
6940         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6941         (gdb$(EXEEXT)): Optionally invoke codesign.
6942
6943 2018-06-28  Pedro Alves  <palves@redhat.com>
6944
6945         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6946         comments.
6947         (switch_to_thread_no_regs): Adjust comment.
6948         * infcmd.c (stop_pc): Delete.
6949         (post_create_inferior, info_program_command): Replace references
6950         to stop_pc with references to thread_info->suspend.stop_pc.
6951         * inferior.h (stop_pc): Delete declaration.
6952         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6953         (handle_inferior_event_1, handle_signal_stop)
6954         (process_event_stop_test, keep_going_stepped_thread)
6955         (handle_step_into_function, handle_step_into_function_backward)
6956         (print_stop_location): Replace references to stop_pc with
6957         references to thread_info->suspend.stop_pc.
6958         (struct infcall_suspend_state) <stop_pc>: Delete field.
6959         (save_infcall_suspend_state, restore_infcall_suspend_state):
6960         Remove references to inf_stat->stop_pc.
6961         * linux-fork.c (fork_load_infrun_state): Likewise.
6962         * record-btrace.c (record_btrace_set_replay): Likewise.
6963         * record-full.c (record_full_goto_entry): Likewise.
6964         * remote.c (print_one_stopped_thread): Likewise.
6965         * target.c (target_resume): Extend comment.
6966         * thread.c (set_executing_thread): New.
6967         (set_executing): Use it.
6968         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6969         Remove references to stop_pc.
6970
6971 2018-06-28  Pedro Alves  <palves@redhat.com>
6972
6973         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6974         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6975
6976 2018-06-28  Tom Tromey  <tom@tromey.com>
6977
6978         * coffread.c (coff_symfile_finish): Update.
6979         * xcoffread.c (xcoff_symfile_finish): Update.
6980         * elfread.c (elf_symfile_finish): Update.
6981         * symfile.h (dwarf2_free_objfile): Don't declare.
6982         * dwarf2read.c (_initialize_dwarf2_read): Use
6983         register_objfile_data_with_cleanup.
6984         (dwarf2_free_objfile): Now static.  Change signature.
6985
6986 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6987
6988         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6989         option "-o" to add-symbol-file-load to add an offset to each
6990         section's load address.
6991         * symfile.c (set_objfile_default_section_offset): New function.
6992
6993 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6994
6995         * symfile.c (add_symbol_file_command): Make sure that sections
6996         with the same name are sorted in the same order.
6997
6998 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6999
7000         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7001         require the second argument.  If omitted, load sections at the
7002         addresses specified in the file.
7003
7004 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7005
7006         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7007         (_initialize_symfile): Add option "-o" to symbol-file to add an
7008         offset to each section of the symbol file.
7009
7010 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7011
7012         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7013
7014 2018-06-27  Tom Tromey  <tom@tromey.com>
7015
7016         * stack.c (_initialize_stack): Update "func" help text.
7017
7018 2018-06-27  Tom Tromey  <tom@tromey.com>
7019
7020         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7021         std::vector.
7022         (unwind_infopy_str, pyuw_create_unwind_info)
7023         (unwind_infopy_add_saved_register, pyuw_sniffer)
7024         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7025         Update.
7026         (struct saved_reg): Add constructor.
7027         <value>: Now a gdbpy_ref<>.
7028
7029 2018-06-27  Tom Tromey  <tom@tromey.com>
7030
7031         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7032
7033 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7034
7035         * gdb-gdb.py.in: Format using autopep8.
7036
7037 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7038
7039         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7040         (type_lookup_function): Recognize CORE_ADDR values.
7041
7042 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7043
7044         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7045         print tag_name.
7046
7047 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7048
7049         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7050         <__lt__>: Add.
7051
7052 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7053
7054         * gdb-gdb.py: Move to...
7055         * gdb-gdb.py.in: ... here.
7056         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7057         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7058         dependencies.
7059         (distclean): Remove gdb-gdb.py when cleaning.
7060         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7061         * configure: Re-generate.
7062
7063 2018-06-27  Pedro Alves  <palves@redhat.com>
7064
7065         * proc-service.c (get_ps_regcache): New.
7066         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7067         (ps_lsetfpregs): Use it.
7068
7069 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7070
7071         PR gdb/21695
7072         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7073         declaration.
7074         (dwarf_decode_lines_1): Adjust.
7075
7076 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7077
7078         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7079         override.
7080         <info_proc>: Likewise.
7081
7082 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7083
7084         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7085         to windows_fetch_one_register, and only handle the case of
7086         fetching one register.  Move the code that reloads the context
7087         and iterates over all registers if R is negative to...
7088         (windows_nat_target::fetch_registers): ... here.
7089         (do_windows_store_inferior_registers): Rename to
7090         windows_store_one_register, and only handle the case of storing
7091         one register.  Move the code that handles the case where r is
7092         negative to...
7093         (windows_nat_target::store_registers) ... here.
7094
7095 2018-06-26  Tom Tromey  <tom@tromey.com>
7096
7097         PR rust/22574:
7098         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7099         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7100         Update.
7101         (rust_internal_print_type): Add podata parameter.
7102         (rust_print_type): Update.
7103
7104 2018-06-26  Tom Tromey  <tom@tromey.com>
7105
7106         * typeprint.h (struct print_offset_data) <update, finish,
7107         maybe_print_hole>: New methods.
7108         <indentation>: New constant.
7109         * typeprint.c (print_offset_data::indentation): Define.
7110         (print_offset_data::maybe_print_hole, print_offset_data::update)
7111         (print_offset_data::finish): Move from c-typeprint.c and rename.
7112         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7113         (print_spaces_filtered_with_print_options): Update.
7114         (c_print_type_union_field_offset, maybe_print_hole)
7115         (c_print_type_struct_field_offset): Move to typeprint.c and
7116         rename.
7117         (c_type_print_base_struct_union): Update.
7118
7119 2018-06-25  Pedro Alves  <palves@redhat.com>
7120
7121         * gdbthread.h (thread_info_ref, delete_thread)
7122         (delete_thread_silent, first_thread_of_inferior)
7123         (any_thread_of_inferior, switch_to_thread)
7124         (enable_thread_stack_temporaries)
7125         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7126         (get_last_thread_stack_temporary)
7127         (value_in_thread_stack_temporaries, can_access_registers_thread):
7128         Spell out "struct thread_info" instead of just "thread_info".
7129         * inferior.h (notice_new_inferior): Likewise.
7130
7131 2018-06-25  Pedro Alves  <palves@redhat.com>
7132
7133         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7134         pass thread_info pointer to delete_thread.
7135         (windows_nat_target::detach): Pass inferior pointer to
7136         detach_inferior.
7137         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7138         delete_thread.
7139         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7140         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7141         and pass a thread_info pointer to delete_thread.
7142         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7143         pass thread_info pointer to delete_thread.
7144         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7145         delete_thread_silent call.
7146         * procfs.c (procfs_target::detach): Pass inferior pointer to
7147         detach_inferior.
7148         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7149         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7150         delete_thread_silent call.
7151         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7152         pass thread_info pointer to delete_thread.
7153         (windows_nat_target::detach): Pass inferior pointer to
7154         delete_inferior.
7155
7156 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7157
7158         * regcache.c (readable_regcache::read_part): Fix asserts.
7159         (reg_buffer::raw_collect_part): New function.
7160         (regcache::write_part): Fix asserts.
7161         (reg_buffer::raw_supply_part): New function.
7162         (regcache::transfer_regset_register): New helper function.
7163         (regcache::transfer_regset): Call new functions.
7164         (regcache_supply_regset): Use gdb_byte*.
7165         (regcache::supply_regset): Likewise.
7166         (regcache_collect_regset): Likewise.
7167         (regcache::collect_regset): Likewise.
7168         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7169         (reg_buffer::raw_supply_part): Likewise.
7170         (regcache::transfer_regset_register): Likewise.
7171         (regcache::transfer_regset): Use gdb_byte*.
7172
7173 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7174
7175         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7176
7177 2018-06-21  Pedro Alves  <palves@redhat.com>
7178
7179         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7180         instead of a ptid_t.  All callers adjusted.
7181         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7182         adjusted.
7183         (print_ada_task_info, display_current_task_id, task_command_1):
7184         Adjust.
7185         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7186         inferior_thread.
7187         (breakpoint_kind): Adjust.
7188         (remove_breakpoints_pid): Rename to ...
7189         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7190         pointer.  All callers adjusted.
7191         (bpstat_clear_actions): Use inferior_thread.
7192         (get_bpstat_thread): New.
7193         (bpstat_do_actions): Use it.
7194         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7195         to take a thread_info pointer.  All callers adjusted.
7196         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7197         (breakpoint_re_set_thread): Use inferior_thread.
7198         * breakpoint.h (struct inferior): Forward declare.
7199         (bpstat_stop_status): Update.
7200         (remove_breakpoints_pid): Delete.
7201         (remove_breakpoints_inf): New.
7202         * bsd-uthread.c (bsd_uthread_target::wait)
7203         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7204         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7205         (maint_btrace_packet_history_cmd)
7206         (maint_btrace_clear_packet_history_cmd): Adjust.
7207         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7208         inferior_thread.
7209         * cli/cli-interp.c: Include "inferior.h".
7210         * common/refcounted-object.h (struct
7211         refcounted_object_ref_policy): New.
7212         * compile/compile-object-load.c: Include gdbthread.h.
7213         (store_regs): Use inferior_thread.
7214         * corelow.c (core_target::close): Use current_inferior.
7215         (core_target_open): Adjust to use first_thread_of_inferior and use
7216         the current inferior.
7217         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7218         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7219         <thread>: ... this new field.  All references adjusted.
7220         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7221         Take a thread_info pointer instead of a ptid_t.
7222         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7223         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7224         thread_info pointer instead of a ptid_t.
7225         * elfread.c: Include "inferior.h".
7226         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7227         Use inferior_thread.
7228         * eval.c (evaluate_subexp): Likewise.
7229         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7230         inferior_thread.
7231         * gdb_proc_service.h (struct thread_info): Forward declare.
7232         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7233         <thread>: ... this new field.  All references adjusted.
7234         * gdbarch.h, gdbarch.c: Regenerate.
7235         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7236         'thread' parameter.  All implementations and callers adjusted.
7237         * gdbthread.h (thread_info) <set_running>: New method.
7238         (delete_thread, delete_thread_silent): Take a thread_info pointer
7239         instead of a ptid.
7240         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7241         (first_thread_of_process): Delete, replaced by ...
7242         (first_thread_of_inferior): ... this new function.  All callers
7243         adjusted.
7244         (any_live_thread_of_process): Delete, replaced by ...
7245         (any_live_thread_of_inferior): ... this new function.  All callers
7246         adjusted.
7247         (switch_to_thread, switch_to_no_thread): Declare.
7248         (is_executing): Delete.
7249         (enable_thread_stack_temporaries): Update comment.
7250         <enable_thread_stack_temporaries>: Take a thread_info pointer
7251         instead of a ptid_t.  Incref the thread.
7252         <~enable_thread_stack_temporaries>: Decref the thread.
7253         <m_ptid>: Delete
7254         <m_thr>: New.
7255         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7256         (get_last_thread_stack_temporary)
7257         (value_in_thread_stack_temporaries, can_access_registers_thread):
7258         Take a thread_info pointer instead of a ptid_t.  All callers
7259         adjusted.
7260         * infcall.c (get_call_return_value): Use inferior_thread.
7261         (run_inferior_call): Work with thread pointers instead of ptid_t.
7262         (call_function_by_hand_dummy): Work with thread pointers instead
7263         of ptid_t.  Use thread_info_ref.
7264         * infcmd.c (proceed_thread_callback): Access thread's state
7265         directly.
7266         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7267         access thread's state directly.
7268         (continue_command): Use inferior_thread.
7269         (info_program_command): Use find_thread_ptid and access thread
7270         state directly.
7271         (proceed_after_attach_callback): Use thread state directly.
7272         (notice_new_inferior): Take a thread_info pointer instead of a
7273         ptid_t.  All callers adjusted.
7274         (exit_inferior): Take an inferior pointer instead of a pid.  All
7275         callers adjusted.
7276         (exit_inferior_silent): New.
7277         (detach_inferior): Delete.
7278         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7279         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7280         (detach_inferior_command, kill_inferior_command): Use
7281         find_inferior_id instead of valid_gdb_inferior_id and
7282         gdb_inferior_id_to_pid.
7283         (inferior_command): Use inferior and thread pointers.
7284         * inferior.h (struct thread_info): Forward declare.
7285         (notice_new_inferior): Take a thread_info pointer instead of a
7286         ptid_t.  All callers adjusted.
7287         (detach_inferior): Delete declaration.
7288         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7289         instead of a pid.  All callers adjusted.
7290         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7291         (valid_gdb_inferior_id): Delete.
7292         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7293         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7294         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7295         ...
7296         <inf>: ... this new field.
7297         <step_ptid>: Delete, replaced by ...
7298         <step_thread>: ... this new field.
7299         (get_displaced_stepping_state): Take an inferior pointer instead
7300         of a pid.  All callers adjusted.
7301         (displaced_step_in_progress_any_inferior): Adjust.
7302         (displaced_step_in_progress_thread): Take a thread pointer instead
7303         of a ptid_t.  All callers adjusted.
7304         (displaced_step_in_progress, add_displaced_stepping_state): Take
7305         an inferior pointer instead of a pid.  All callers adjusted.
7306         (get_displaced_step_closure_by_addr): Adjust.
7307         (remove_displaced_stepping_state): Take an inferior pointer
7308         instead of a pid.  All callers adjusted.
7309         (displaced_step_prepare_throw, displaced_step_prepare)
7310         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7311         All callers adjusted.
7312         (start_step_over): Adjust.
7313         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7314         displaced step queue.
7315         (do_target_resume): Adjust.
7316         (fetch_inferior_event): Use inferior_thread.
7317         (context_switch, get_inferior_stop_soon): Take an
7318         execution_control_state pointer instead of a ptid_t.  All callers
7319         adjusted.
7320         (switch_to_thread_cleanup): Delete.
7321         (stop_all_threads): Use scoped_restore_current_thread.
7322         * inline-frame.c: Include "gdbthread.h".
7323         (inline_state) <inline_state>: Take a thread pointer instead of a
7324         ptid_t.  All callers adjusted.
7325         <ptid>: Delete, replaced by ...
7326         <thread>: ... this new field.
7327         (find_inline_frame_state): Take a thread pointer instead of a
7328         ptid_t.  All callers adjusted.
7329         (skip_inline_frames, step_into_inline_frame)
7330         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7331         pointer instead of a ptid_t.  All callers adjusted.
7332         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7333         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7334         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7335         pointers directly.
7336         * linux-nat.c (get_detach_signal): Likewise.
7337         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7338         (thread_db_notice_clone): Adjust.
7339         (thread_db_find_new_threads_silently)
7340         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7341         a thread pointer instead of a ptid_t.  All callers adjusted.
7342         * mi/mi-cmd-var.c: Include "inferior.h".
7343         (mi_cmd_var_update_iter): Update to use thread pointers.
7344         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7345         inferior directly.
7346         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7347         out to ...
7348         (mi_output_running): ... this new function.
7349         (mi_on_resume_1): Adjust to use it.
7350         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7351         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7352         directly.
7353         (interrupt_thread_callback): : Adjust to use thread and inferior
7354         pointers.
7355         * proc-service.c: Include "gdbthread.h".
7356         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7357         * progspace-and-thread.c: Include "inferior.h".
7358         * progspace.c: Include "inferior.h".
7359         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7360         hold a reference to an inferior_object.
7361         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7362         inferior_thread.
7363         * python/py-inferior.c (struct inferior_object): Give the type a
7364         tag name instead of a typedef.
7365         (python_on_normal_stop): No need to check if the current thread is
7366         listed.
7367         (inferior_to_inferior_object): Change return type to
7368         inferior_object.  All callers adjusted.
7369         (find_thread_object): Delete, bits factored out to ...
7370         (thread_to_thread_object): ... this new function.
7371         * python/py-infthread.c (create_thread_object): Use
7372         inferior_to_inferior_object.
7373         (thpy_is_stopped): Use thread pointer directly.
7374         (gdbpy_selected_thread): Use inferior_thread.
7375         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7376         field, replaced with ...
7377         <thread>: ... this new field.  All users adjusted.
7378         (btpy_insn_or_gap_new): Drop const.
7379         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7380         callers adjusted.
7381         * python/py-record.c: Include "gdbthread.h".
7382         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7383         a ptid_t.  All callers adjusted.
7384         (gdbpy_current_recording): Use inferior_thread.
7385         * python/py-record.h (recpy_record_object) <ptid>: Delete
7386         field, replaced with ...
7387         <thread>: ... this new field.  All users adjusted.
7388         (recpy_element_object) <ptid>: Delete
7389         field, replaced with ...
7390         <thread>: ... this new field.  All users adjusted.
7391         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7392         a ptid_t.  All callers adjusted.
7393         * python/py-threadevent.c: Include "gdbthread.h".
7394         (get_event_thread): Use thread_to_thread_object.
7395         * python/python-internal.h (struct inferior_object): Forward
7396         declare.
7397         (find_thread_object, find_inferior_object): Delete declarations.
7398         (thread_to_thread_object, inferior_to_inferior_object): New
7399         declarations.
7400         * record-btrace.c: Include "inferior.h".
7401         (require_btrace_thread): Use inferior_thread.
7402         (record_btrace_frame_sniffer)
7403         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7404         (get_thread_current_frame): Use scoped_restore_current_thread and
7405         switch_to_thread.
7406         (get_thread_current_frame): Use thread pointer directly.
7407         (record_btrace_replay_at_breakpoint): Use thread's inferior
7408         pointer directly.
7409         * record-full.c: Include "inferior.h".
7410         * regcache.c: Include "gdbthread.h".
7411         (get_thread_arch_regcache): Use the inferior's address space
7412         directly.
7413         (get_thread_regcache, registers_changed_thread): New.
7414         * regcache.h (get_thread_regcache(thread_info *thread)): New
7415         overload.
7416         (registers_changed_thread): New.
7417         (remote_target) <remote_detach_1>: Swap order of parameters.
7418         (remote_add_thread): <remote_add_thread>: Return the new thread.
7419         (get_remote_thread_info(ptid_t)): New overload.
7420         (remote_target::remote_notice_new_inferior): Use thread pointers
7421         directly.
7422         (remote_target::process_initial_stop_replies): Use
7423         thread_info::set_running.
7424         (remote_target::remote_detach_1, remote_target::detach)
7425         (extended_remote_target::detach): Adjust.
7426         * stack.c (frame_show_address): Use inferior_thread.
7427         * target-debug.h (target_debug_print_thread_info_pp): New.
7428         * target-delegates.c: Regenerate.
7429         * target.c (default_thread_address_space): Delete.
7430         (memory_xfer_partial_1): Use current_inferior.
7431         (target_detach): Use current_inferior.
7432         (target_thread_address_space): Delete.
7433         (generic_mourn_inferior): Use current_inferior.
7434         * target.h (struct target_ops) <thread_address_space>: Delete.
7435         (target_thread_address_space): Delete.
7436         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
7437         pointers directly.
7438         (delete_thread_1, delete_thread, delete_thread_silent): Take a
7439         thread pointer instead of a ptid_t.  Adjust all callers.
7440         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
7441         (first_thread_of_process): Delete, replaced by ...
7442         (first_thread_of_inferior): ... this new function.  All callers
7443         adjusted.
7444         (any_thread_of_process): Rename to ...
7445         (any_thread_of_inferior): ... this, and take an inferior pointer.
7446         (any_live_thread_of_process): Rename to ...
7447         (any_live_thread_of_inferior): ... this, and take an inferior
7448         pointer.
7449         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7450         (value_in_thread_stack_temporaries)
7451         (get_last_thread_stack_temporary): Take a thread pointer instead
7452         of a ptid_t.  Adjust all callers.
7453         (thread_info::set_running): New.
7454         (validate_registers_access): Use inferior_thread.
7455         (can_access_registers_ptid): Rename to ...
7456         (can_access_registers_thread): ... this, and take a thread
7457         pointer.
7458         (print_thread_info_1): Adjust to compare thread pointers instead
7459         of ptids.
7460         (switch_to_no_thread, switch_to_thread): Make extern.
7461         (scoped_restore_current_thread::~scoped_restore_current_thread):
7462         Use m_thread pointer directly.
7463         (scoped_restore_current_thread::scoped_restore_current_thread):
7464         Use inferior_thread.
7465         (thread_command): Use thread pointer directly.
7466         (thread_num_make_value_helper): Use inferior_thread.
7467         * top.c (execute_command): Use inferior_thread.
7468         * tui/tui-interp.c: Include "inferior.h".
7469         * varobj.c (varobj_create): Use inferior_thread.
7470         (value_of_root_1): Use find_thread_global_id instead of
7471         global_thread_id_to_ptid.
7472
7473 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
7474
7475         * regcache.c (readable_regcache::read_part): Avoid memcpy when
7476         possible.
7477         (regcache::write_part): Likewise.
7478         (readable_regcache::cooked_read_part): Update comment.
7479         (readable_regcache::cooked_write_part): Likewise.
7480         * regcache.h: (readable_regcache::read_part): Likewise.
7481         (regcache::write_part): Likewise.
7482
7483 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
7484             Dirk Schubert  <dirk.schubert@arm.com>
7485
7486         * aarch64-linux-nat.c (post_attach): New.
7487         (aarch64_linux_nat_target::post_attach): Override post_attach to
7488         record the number of hardware debug registers.
7489
7490 2018-06-20  Tom Tromey  <tom@tromey.com>
7491
7492         * python/py-param.c (add_setshow_generic): Make parameters const.
7493         (parmpy_init): Update.
7494
7495 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7496
7497         * regcache.h (regcache_cooked_read_ftype): Rename to...
7498         (register_read_ftype): ...this, change type to function_view.
7499         (class reg_buffer) <save>: Remove src parameter.
7500         (readonly_detached_regcache) <readonly_detached_regcache>: Make
7501         parameter non-const in first overload.  Remove src parameter in
7502         second overload.
7503         * regcache.c (do_cooked_read): Remove.
7504         (readonly_detached_regcache::readonly_detached_regcache): Make
7505         parameter non-const, adjust call to other constructor.
7506         (reg_buffer::save): Remove src parameter.
7507         * frame.c (do_frame_register_read): Remove.
7508         (frame_save_as_regcache): Use lambda function.
7509         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
7510         parameter to ppu2spu_data *.
7511         (ppu2spu_sniffer): Use lambda function.
7512
7513 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7514
7515         * record-full.c (record_full_target::insert_breakpoint): Remove
7516         "struct" keyword, add const.
7517
7518 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
7519
7520         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
7521         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
7522         * configure.ac: Remove AC_PREREQ, add missing quoting.
7523         * gnulib/configure.ac: Modernize usage of
7524         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
7525         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
7526         (AUTOMAKE_VERSION): Bump to 1.15.1.
7527         * configure: Re-generate.
7528         * config.in: Re-generate.
7529         * aclocal.m4: Re-generate.
7530         * gnulib/aclocal.m4: Re-generate.
7531         * gnulib/config.in: Re-generate.
7532         * gnulib/configure: Re-generate.
7533         * gnulib/import/Makefile.in: Re-generate.
7534
7535 2018-06-19  Pedro Alves  <palves@redhat.com>
7536
7537         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
7538         (lookup_minimal_symbol_by_pc_section): ... here with
7539         gdb_assert_not_reached added.
7540
7541 2018-06-19  Pedro Alves  <palves@redhat.com>
7542
7543         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
7544         parameter with a block parameter.  Compare location's block symbol
7545         with the frame's block instead of addresses.
7546         (skip_inline_frames): Pass the current block instead of the
7547         frame's address.  Break out as soon as we determine the frame
7548         should not be skipped.
7549
7550 2018-06-18  Tom Tromey  <tom@tromey.com>
7551
7552         * solib-aix.c (solib_aix_get_section_offsets): Return
7553         unique_xmalloc_ptr.
7554         (solib_aix_solib_create_inferior_hook): Update.
7555
7556 2018-06-18  Tom Tromey  <tom@tromey.com>
7557
7558         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
7559
7560 2018-06-18  Tom Tromey  <tom@tromey.com>
7561
7562         * solib-frv.c (frv_relocate_main_executable): Use
7563         unique_xmalloc_ptr.
7564         * solib-dsbt.c (dsbt_relocate_main_executable): Use
7565         unique_xmalloc_ptr.
7566
7567 2018-06-18  Tom Tromey  <tom@tromey.com>
7568
7569         * objfiles.h (inhibit_section_map_updates): Update.
7570         (resume_section_map_updates, resume_section_map_updates_cleanup):
7571         Remove.
7572         * solib-svr4.c (svr4_handle_solib_event): Update.
7573         * objfiles.c (inhibit_section_map_updates): Return
7574         scoped_restore_tmpl<int>.
7575         (resume_section_map_updates, resume_section_map_updates_cleanup):
7576         Remove.
7577
7578 2018-06-18  Tom Tromey  <tom@tromey.com>
7579
7580         * valprint.h (read_string): Update.
7581         * valprint.c (read_string): Change type of "buffer".
7582         (val_print_string): Update.
7583         * python/py-value.c (valpy_string): Update.
7584         * language.h (struct language_defn) <la_get_string>: Change
7585         type of "buffer".
7586         (default_get_string, c_get_string): Update.
7587         * language.c (default_get_string): Change type of "buffer".
7588         * guile/scm-value.c (gdbscm_value_to_string): Update.
7589         * c-lang.c (c_get_string): Change type of "buffer".
7590
7591 2018-06-18  Tom Tromey  <tom@tromey.com>
7592
7593         * ser-mingw.c (struct pipe_state_destroyer): New.
7594         (pipe_state_up): New typedef.
7595         (cleanup_pipe_state): Remove.
7596         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
7597
7598 2018-06-18  Tom Tromey  <tom@tromey.com>
7599
7600         * rust-lang.h (rust_yyerror): Don't declare.
7601         * rust-lang.c (rust_language_defn): Update.
7602         * rust-exp.y (yyerror): Now static.
7603         * parse.c (parse_exp_in_context_1): Update.
7604         * p-lang.h (p_yyerror): Don't declare.
7605         * p-lang.c (p_language_defn): Update.
7606         * p-exp.y (yyerror): Now static.
7607         * opencl-lang.c (opencl_language_defn): Update.
7608         * objc-lang.c (objc_language_defn): Update.
7609         * m2-lang.h (m2_yyerror): Don't declare.
7610         * m2-lang.c (m2_language_defn): Update.
7611         * m2-exp.y (yyerror): Now static.
7612         * language.h (struct language_defn) <la_error>: Remove.
7613         * language.c (unk_lang_error): Remove.
7614         (unknown_language_defn, auto_language_defn): Remove.
7615         * go-lang.h (go_yyerror): Don't declare.
7616         * go-lang.c (go_language_defn): Update.
7617         * go-exp.y (yyerror): Now static.
7618         * f-lang.h (f_yyerror): Don't declare.
7619         * f-lang.c (f_language_defn): Update.
7620         * f-exp.y (yyerror): Now static.
7621         * d-lang.h (d_yyerror): Don't declare.
7622         * d-lang.c (d_language_defn): Update.
7623         * d-exp.y (yyerror): Now static.
7624         * c-lang.h (c_yyerror): Don't declare.
7625         * c-lang.c (c_language_defn, cplus_language_defn)
7626         (asm_language_defn, minimal_language_defn): Update.
7627         * c-exp.y (yyerror): Now static.
7628         * ada-lang.h (ada_yyerror): Don't declare.
7629         * ada-lang.c (ada_language_defn): Update.
7630         * ada-exp.y (yyerror): Now static.
7631
7632 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7633
7634         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
7635         (store_sveregs_to_thread): Likewise.
7636         (aarch64_linux_fetch_inferior_registers): Check for SVE.
7637         (aarch64_linux_store_inferior_registers): Likewise.
7638         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
7639         function.
7640         (aarch64_sve_regs_copy_to_regcache): Likewise.
7641         (aarch64_sve_regs_copy_from_regcache): Likewise.
7642         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
7643         declaration.
7644         (aarch64_sve_regs_copy_to_regcache): Likewise.
7645         (aarch64_sve_regs_copy_from_regcache): Likewise.
7646         (sve_context): Structure from Linux headers.
7647         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
7648         (SVE_SIG_ZREG_SIZE): Likewise.
7649         (SVE_SIG_PREG_SIZE): Likewise.
7650         (SVE_SIG_FFR_SIZE): Likewise.
7651         (SVE_SIG_REGS_OFFSET): Likewise.
7652         (SVE_SIG_ZREGS_OFFSET): Likewise.
7653         (SVE_SIG_ZREG_OFFSET): Likewise.
7654         (SVE_SIG_ZREGS_SIZE): Likewise.
7655         (SVE_SIG_PREGS_OFFSET): Likewise.
7656         (SVE_SIG_PREG_OFFSET): Likewise.
7657         (SVE_SIG_PREGS_SIZE): Likewise.
7658         (SVE_SIG_FFR_OFFSET): Likewise.
7659         (SVE_SIG_REGS_SIZE): Likewise.
7660         (SVE_SIG_CONTEXT_SIZE): Likewise.
7661         (SVE_PT_REGS_MASK): Likewise.
7662         (SVE_PT_REGS_FPSIMD): Likewise.
7663         (SVE_PT_REGS_SVE): Likewise.
7664         (SVE_PT_VL_INHERIT): Likewise.
7665         (SVE_PT_VL_ONEXEC): Likewise.
7666         (SVE_PT_REGS_OFFSET): Likewise.
7667         (SVE_PT_FPSIMD_OFFSET): Likewise.
7668         (SVE_PT_FPSIMD_SIZE): Likewise.
7669         (SVE_PT_SVE_ZREG_SIZE): Likewise.
7670         (SVE_PT_SVE_PREG_SIZE): Likewise.
7671         (SVE_PT_SVE_FFR_SIZE): Likewise.
7672         (SVE_PT_SVE_FPSR_SIZE): Likewise.
7673         (SVE_PT_SVE_FPCR_SIZE): Likewise.
7674         (__SVE_SIG_TO_PT): Likewise.
7675         (SVE_PT_SVE_OFFSET): Likewise.
7676         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
7677         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
7678         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
7679         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
7680         (SVE_PT_SVE_PREG_OFFSET): Likewise.
7681         (SVE_PT_SVE_PREGS_SIZE): Likewise.
7682         (SVE_PT_SVE_FFR_OFFSET): Likewise.
7683         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
7684         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
7685         (SVE_PT_SVE_SIZE): Likewise.
7686         (SVE_PT_SIZE): Likewise.
7687         (HAS_SVE_STATE): New define.
7688
7689 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7690
7691         * nat/aarch64-sve-linux-sigcontext.h: New file.
7692         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
7693         new files.
7694         (SVE_VQ_MIN): Likewise.
7695         (SVE_VQ_MAX): Likewise.
7696         (SVE_VL_MIN): Likewise.
7697         (SVE_VL_MAX): Likewise.
7698         (SVE_NUM_ZREGS): Likewise.
7699         (SVE_NUM_PREGS): Likewise.
7700         (sve_vl_valid): Likewise.
7701         (struct user_sve_header): Likewise.
7702
7703 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
7704             Richard Bunt <Richard.Bunt@arm.com>
7705
7706         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7707         was requested by GDB.
7708
7709 2018-06-15  Tom de Vries  <tdevries@suse.de>
7710
7711         * MAINTAINERS (Write After Approval): Add Tom de Vries.
7712
7713 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
7714
7715         * gnulib/update-gnulib.sh: Print expected versions of
7716         autoconf/aclocal.
7717
7718 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
7719
7720         * arch-utils.c (default_type_align): Use type_length_units.
7721         * gdbtypes.c (type_align): Use type_length_units.
7722
7723 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7724
7725         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7726         of 'define' command.
7727
7728 2018-06-14  Tom de Vries  <tdevries@suse.de>
7729
7730         PR cli/22573
7731         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7732         get_no_prettyformat_print_options.
7733
7734 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7735
7736         * sparc-nat.h: Include target.h.
7737         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7738         <fetch_registers>: Remove this argument in function call.
7739         <store_registers>: Remove this argument in function call, remove
7740         extra semicolon.
7741         <low_forget_process>: Call sparc64_forget_process instead of
7742         sparc_forget_process.
7743
7744 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7745
7746         * procfs.c (_initialize_procfs): Use add_inf_child_target.
7747         (procfs_target::make_corefile_notes): Adjust to new
7748         target_read_alloc return type.
7749
7750 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7751             Stephen Roberts  <stephen.roberts@arm.com>
7752
7753         PR gdb/22882
7754         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7755         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7756         Move should_notify_stop local into more inner scope.
7757
7758 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7759             Stephen Roberts  <stephen.roberts@arm.com>
7760
7761         PR gdb/22882
7762         * infrun.c (resume_1): Add call to mark_async_event_handler.
7763
7764 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7765
7766         * infrun.c (do_target_wait): Change old version of $pc printed.
7767
7768 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7769
7770         * dwarf2read.c (read_index_from_section): Rename to...
7771         (read_gdb_index_from_section): ... this, update all callers.
7772         (dwarf2_read_index): Rename to...
7773         (dwarf2_read_gdb_index): ... this, update all callers.
7774
7775 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7776
7777         * hppa-linux-nat.c
7778         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7779         hppa_linux_nat_target::fetch_registers.
7780
7781 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7782
7783         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7784         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7785         (AARCH64_DWARF_SVE_FFR): Likewise.
7786         (AARCH64_DWARF_SVE_P0): Likewise.
7787         (AARCH64_DWARF_SVE_Z0): Likewise.
7788
7789 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7790
7791         * common/common-regcache.h (raw_compare): New function.
7792         * regcache.c (regcache::raw_compare): Likewise.
7793         * regcache.h (regcache::raw_compare): New declaration.
7794
7795 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7796
7797         * common/common-regcache.h (reg_buffer_common): New structure.
7798         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7799         (reg_buffer::raw_supply): Likewise.
7800         (reg_buffer::raw_supply_integer): Likewise.
7801         (reg_buffer::raw_supply_zeroed): Likewise.
7802         (reg_buffer::raw_collect): Likewise.
7803         (reg_buffer::raw_collect_integer): Likewise.
7804         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7805         (reg_buffer::raw_supply): Likewise.
7806         (reg_buffer::raw_supply_integer): Likewise.
7807         (reg_buffer::raw_supply_zeroed): Likewise.
7808         (reg_buffer::raw_collect): Likewise.
7809         (reg_buffer::raw_collect_integer): Likewise.
7810
7811 2018-06-10  Tom Tromey  <tom@tromey.com>
7812
7813         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7814         (class remote_state) <stop_reply_queue>: Now std::vector.
7815         (remote_state::~remote_state)
7816         (remote_target::stop_reply_queue_length): Update.
7817         (struct queue_iter_param, remove_child_of_pending_fork)
7818         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7819         (check_pending_event_prevents_wildcard_vcont_callback)
7820         (remove_stop_reply_for_inferior)
7821         (remove_stop_reply_of_remote_state)
7822         (remote_notif_remove_once_on_match)
7823         (stop_reply_match_ptid_and_ws)
7824         (remote_kill_child_of_pending_fork): Remove.
7825         (remote_target::remove_new_fork_children)
7826         (remote_target::check_pending_events_prevent_wildcard_vcont)
7827         (remote_target::discard_pending_stop_replies)
7828         (remote_target::discard_pending_stop_replies_in_queue)
7829         (remote_target::remote_notif_remove_queued_reply)
7830         (remote_target::queued_stop_reply)
7831         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7832         (remote_target::wait, remote_target::kill_new_fork_children)
7833         (remote_target::async): Update.
7834
7835 2018-06-10  Tom Tromey  <tom@tromey.com>
7836
7837         * record-full.c (record_full_arch_list_cleanups): Remove.
7838         (record_full_message): Use try/catch.
7839         (record_full_wait_cleanups): Remove.
7840         (record_full_wait_1): Use try/catch.
7841         (record_full_restore): Likewise.
7842
7843 2018-06-10  Tom Tromey  <tom@tromey.com>
7844
7845         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7846         declare VEC.  Add constructor.
7847         <in_target_beneath>: Now bool.
7848         (record_full_breakpoints): Now a std::vector, static.
7849         (record_full_sync_record_breakpoints)
7850         (record_full_init_record_breakpoints)
7851         (record_full_target::insert_breakpoint)
7852         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7853
7854 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7855
7856         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7857         * serial.c (serial_interface_lookup): Remove struct keyword.
7858
7859 2018-06-10  Tom Tromey  <tom@tromey.com>
7860
7861         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7862         method.
7863         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7864         a method.
7865         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7866         method.
7867         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7868         "beneath" as a method.
7869         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7870         Use "beneath" as a method.
7871
7872 2018-06-10  Tom Tromey  <tom@tromey.com>
7873
7874         * tracefile.c (struct trace_file_writer_deleter): New.
7875         <operator()>: Rename from trace_file_writer_xfree.
7876         (trace_file_writer_up): New typedef.
7877         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7878
7879 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7880
7881         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7882         <m_registers, m_register_status>: Change type to
7883         std::unique_ptr.
7884         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7885         XCNEWVEC.
7886
7887 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7888
7889         * common/common-regcache.h (enum register_status): Add
7890         underlying type "signed char".
7891         * regcache.h (reg_buffer) <m_register_status>: Change type to
7892         register_status *.
7893         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7894         register_status instead of signed char.
7895         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7896         (reg_buffer::get_register_status): Remove cast.
7897         (readable_regcache::raw_read): Remove cast.
7898         (readable_regcache::cooked_read): Remove cast.
7899
7900 2018-06-09  Tom Tromey  <tom@tromey.com>
7901
7902         * source.c (reverse_search_command, forward_search_command): Use
7903         scoped_fd.
7904
7905 2018-06-09  Tom Tromey  <tom@tromey.com>
7906
7907         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7908         (serial_ops_list): Now static, std::vector.
7909         (serial_interface_lookup, serial_add_interface): Update.
7910
7911 2018-06-09  Tom Tromey  <tom@tromey.com>
7912
7913         * dwarf2read.c (process_cu_includes): Update.
7914         (process_full_comp_unit): Update.
7915         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7916         std::vector.
7917
7918 2018-06-08  Paul Koning  <paul_koning@dell.com>
7919
7920         PR gdb/23252
7921
7922         * python/python.c (do_start_initialization):
7923         Avoid call to internal Python API.
7924         (init__gdb_module): New function.
7925
7926 2018-06-08  Gary Benson <gbenson@redhat.com>
7927
7928         * linux-thread-db.c (valprint.h): New include.
7929         (struct check_thread_db_info): New structure.
7930         (check_thread_db_on_load, tdb_testinfo): New static globals.
7931         (check_thread_db, check_thread_db_callback): New functions.
7932         (try_thread_db_load_1): Run integrity checks if requested.
7933         (maintenance_check_libthread_db): New function.
7934         (_initialize_thread_db): Register "maint check libthread-db"
7935         and "maint set/show check-libthread-db".
7936         * NEWS: Mention the above new commands.
7937
7938 2018-06-08  Tom Tromey  <tom@tromey.com>
7939
7940         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7941         now a method.
7942
7943 2018-06-08  Tom Tromey  <tom@tromey.com>
7944
7945         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7946
7947 2018-06-08  Tom Tromey  <tom@tromey.com>
7948
7949         * common/btrace-common.h (struct btrace_data): Add constructor,
7950         destructor, move assignment operator.
7951         <empty, clear, fini>: New methods.
7952         <format>: Initialize.
7953         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7954         (btrace_data_empty): Don't declare.
7955         * common/btrace-common.c (btrace_data_init): Remove.
7956         (btrace_data::fini): Rename from btrace_data_fini.
7957         (btrace_data::empty): Rename from btrace_data_empty.
7958         (btrace_data::clear): Rename from btrace_data_clear.  Return
7959         bool.
7960         * btrace.h (make_cleanup_btrace_data): Don't declare.
7961         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7962         (parse_xml_btrace): Update.
7963         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7964         (maint_btrace_clear_packet_history_cmd): Update.
7965
7966 2018-06-07  Pedro Alves  <palves@redhat.com>
7967
7968         * target.h (target_ops) <beneath>: Now a method.  All references
7969         updated.
7970         (class target_stack): New.
7971         * target.c (g_target_stack): New.
7972         (g_current_top_target): Delete.
7973         (current_top_target): Get the top target out of g_target_stack.
7974         (target_stack::push, target_stack::unpush): New.
7975         (push_target, unpush_target): Reimplement.
7976         (target_is_pushed): Reimplement in terms of g_target_stack.
7977         (target_ops::beneath, target_stack::find_beneath): New.
7978
7979 2018-06-07  Pedro Alves  <palves@redhat.com>
7980
7981         * target.h (find_target_beneath): Delete declaration.
7982         * target.c (find_target_beneath): Delete definition.
7983         * aix-thread.c: All callers of find_target_beneath adjusted to
7984         call target_ops::beneath instead.
7985         * bsd-uthread.c: Likewise.
7986         * linux-thread-db.c: Likewise.
7987         * ravenscar-thread.c: Likewise.
7988         * sol-thread.c: Likewise.
7989         * spu-multiarch.c: Likewise.
7990
7991 2018-06-07  Pedro Alves  <palves@redhat.com>
7992
7993         * target.h (target_ops) <beneath>: Now a method.  All references
7994         updated.
7995         (target_ops) <m_beneath>: New.
7996         * target.c (target_ops::beneath): New.
7997         * corelow.c: Adjust all references to target_ops::beneath.
7998         * linux-thread-db.c: Likewise.
7999         * make-target-delegates: Likewise.
8000         * record-btrace.c: Likewise.
8001         * record-full.c: Likewise.
8002         * remote.c: Likewise.
8003         * target.c: Likewise.
8004         * target-delegates.c: Regenerate.
8005
8006 2018-06-07  Pedro Alves  <palves@redhat.com>
8007
8008         * target.h (target_stack): Delete.
8009         (current_top_target): Declare function.
8010         * target.c (target_stack): Delete.
8011         (g_current_top_target): New.
8012         (current_top_target): New function.
8013         * auxv.c: Use current_top_target instead of target_stack
8014         throughout.
8015         * avr-tdep.c: Likewise.
8016         * breakpoint.c: Likewise.
8017         * corefile.c: Likewise.
8018         * elfread.c: Likewise.
8019         * eval.c: Likewise.
8020         * exceptions.c: Likewise.
8021         * frame.c: Likewise.
8022         * gdbarch-selftests.c: Likewise.
8023         * gnu-v3-abi.c: Likewise.
8024         * ia64-tdep.c: Likewise.
8025         * ia64-vms-tdep.c: Likewise.
8026         * infcall.c: Likewise.
8027         * infcmd.c: Likewise.
8028         * infrun.c: Likewise.
8029         * linespec.c: Likewise.
8030         * linux-tdep.c: Likewise.
8031         * minsyms.c: Likewise.
8032         * ppc-linux-nat.c: Likewise.
8033         * ppc-linux-tdep.c: Likewise.
8034         * procfs.c: Likewise.
8035         * regcache.c: Likewise.
8036         * remote.c: Likewise.
8037         * rs6000-tdep.c: Likewise.
8038         * s390-linux-nat.c: Likewise.
8039         * s390-tdep.c: Likewise.
8040         * solib-aix.c: Likewise.
8041         * solib-darwin.c: Likewise.
8042         * solib-dsbt.c: Likewise.
8043         * solib-spu.c: Likewise.
8044         * solib-svr4.c: Likewise.
8045         * solib-target.c: Likewise.
8046         * sparc-tdep.c: Likewise.
8047         * sparc64-tdep.c: Likewise.
8048         * spu-tdep.c: Likewise.
8049         * symfile.c: Likewise.
8050         * symtab.c: Likewise.
8051         * target-descriptions.c: Likewise.
8052         * target-memory.c: Likewise.
8053         * target.c: Likewise.
8054         * target.h: Likewise.
8055         * tracefile-tfile.c: Likewise.
8056         * tracepoint.c: Likewise.
8057         * valops.c: Likewise.
8058         * valprint.c: Likewise.
8059         * value.c: Likewise.
8060         * windows-tdep.c: Likewise.
8061         * mi/mi-main.c: Likewise.
8062
8063 2018-06-07  Tom Tromey  <tom@tromey.com>
8064
8065         * valprint.h (build_address_symbolic): Declare.
8066         * printcmd.c (print_address_symbolic): Update.
8067         (build_address_symbolic): Change "name" and "filename" to
8068         std::string.
8069         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8070         Update.
8071         * defs.h (build_address_symbolic): Remove declaration.
8072
8073 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8074
8075         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8076         (aarch64_vnv_type): Add function.
8077         (aarch64_pseudo_register_name): Add V regs for SVE.
8078         (aarch64_pseudo_register_type): Likewise.
8079         (aarch64_pseudo_register_reggroup_p): Likewise.
8080         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8081         (aarch64_pseudo_read_value): Add V regs for SVE.
8082         (aarch64_pseudo_write_2): Use V0 offset for SVE
8083         (aarch64_pseudo_write): Add V regs for SVE.
8084         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8085
8086 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8087
8088         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8089         (sve_vl_from_vq): Likewise.
8090
8091 2018-06-05  Tom Tromey  <tom@tromey.com>
8092
8093         * cli/cli-cmds.c (show_version): Update.
8094         * top.c (print_gdb_version): Add "interactive" parameter.
8095         Update.
8096         * main.c (captured_main_1): Update.
8097         * top.h (print_gdb_version): Add "interactive" parameter and a
8098         comment.
8099
8100 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8101
8102         * common/enum-flags.h: Add trailing semicolon to example in
8103         comment.
8104
8105 2018-06-05  Tom Tromey  <tom@tromey.com>
8106
8107         PR cli/12326:
8108         * NEWS: Add entry about pager.
8109         * utils.c (pagination_disabled_for_command): New global.
8110         (prompt_for_continue): Allow "c" response to prompt.
8111         (reinitialize_more_filter): Clear
8112         pagination_disabled_for_command.
8113         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8114
8115 2018-06-04  Tom Tromey  <tom@tromey.com>
8116
8117         * ada-lang.h (ada_lookup_symbol_list): Update.
8118         * ada-lang.c (resolve_subexp): Update.
8119         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8120         parameter.
8121         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8122         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8123         results parameter to std::vector.
8124         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8125         Update.
8126         * ada-exp.y (block_lookup): Update.
8127         (select_possible_type_sym): Change type of syms.  Remove nsyms
8128         parameter.
8129         (write_var_or_type, write_name_assoc): Update.
8130
8131 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8132
8133         * windows-nat.c (windows_nat_target::xfer_partial): Return
8134         TARGET_XFER_E_IO if we need to delegate to the target beneath
8135         but BENEATH is NULL.
8136
8137 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8138
8139         * Makefile.in (config.status): Add configure.nat as a
8140         dependency.
8141
8142 2018-06-04  Tom Tromey  <tom@tromey.com>
8143
8144         * cp-name-parser.y (cpname_state): Add method declarations.
8145         (HANDLE_QUAL): Update.
8146         (cpname_state::d_grab, cpname_state::fill_comp)
8147         (cpname_state::make_operator, cpname_state::make_dtor)
8148         (cpname_state::make_builtin_type, cpname_state::make_name)
8149         (cpname_state::d_qualify, cpname_state::d_int_type)
8150         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8151         (%union): Move earlier.
8152
8153 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8154
8155         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8156
8157 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8158
8159         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8160         (aarch64_pseudo_write_1): Likewise.
8161         (aarch64_pseudo_read_value): Use helper.
8162         (aarch64_pseudo_write): Likewise.
8163
8164 2018-06-04  Pedro Alves  <palves@redhat.com>
8165
8166         * darwin-nat.c (darwin_ops): Delete.
8167         (darwin_attach_pid): Use get_native_target.
8168
8169 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8170
8171         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8172         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8173
8174 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8175
8176         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8177         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8178         (aarch64_gdbarch_init): Check for SVE.
8179         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8180
8181 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8182
8183         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8184         * aarch64-tdep.h (aarch64_read_description): Likewise.
8185         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8186         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8187         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8188         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8189         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8190
8191 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8192
8193         * value.c (value_fetch_lazy_bitfield): New.
8194         (value_fetch_lazy_memory): New.
8195         (value_fetch_lazy_register): New.
8196         (value_fetch_lazy): Factor out to smaller functions.
8197
8198 2018-06-01  Tom Tromey  <tom@tromey.com>
8199
8200         * cp-name-parser.y (backslashable, represented): Now const.
8201
8202 2018-06-01  Tom Tromey  <tom@tromey.com>
8203
8204         * cp-name-parser.y: Include parser-defs.h.
8205         (parser_fprintf): Remove declaration.
8206
8207 2018-06-01  Tom Tromey  <tom@tromey.com>
8208
8209         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8210         %parse-param.
8211         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8212         (global_result): Remove globals.
8213         (struct cpname_state): New.
8214         (yyparse): Don't declare.
8215         (yylex, yyerror): Move declarations after %union.
8216         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8217         (make_name): Add state parameter.
8218         Update all callers.
8219         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8220         parameter.
8221         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8222         Update.
8223         (yylex): Add lvalp, state parameters.
8224         (yyerror): Add state parameter.
8225         (cp_demangled_name_to_comp): Update.
8226
8227 2018-06-01  Tom Tromey  <tom@tromey.com>
8228
8229         * cp-name-parser.y (parser_fprintf): Declare.
8230         (GDB_YY_REMAP_PREFIX): Define.
8231         Include yy-remap.h.  Don't redefine yy* identifiers.
8232
8233 2018-06-01  Tom Tromey  <tom@tromey.com>
8234
8235         * python/py-type.c (typy_legacy_template_argument): Update.
8236         * cp-support.h (cp_demangled_name_to_comp): Update.
8237         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8238         parameter to be a "std::string *".
8239         (main): Update.
8240
8241 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8242
8243         * ada-lex.l: Include "diagnostics.h" instead of
8244         "common/diagnostics.h".
8245         * unittests/environ-selftests.c: Likewise.
8246         * common/diagnostics.h: Moved to ../include.
8247
8248 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8249
8250         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8251         to language_mode_manual while calling breakpoint_re_set_one.
8252
8253 2018-06-01  Tom Tromey  <tom@tromey.com>
8254
8255         * valops.c (value_cast_structs, destructor_name_p): Update.
8256         * symtab.c (gdb_mangle_name): Update.
8257         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8258         Update.
8259         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8260         (pascal_object_print_value_fields, pascal_object_print_value):
8261         Update.
8262         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8263         * linespec.c (find_methods): Update.
8264         * gdbtypes.h (type_name_no_tag): Remove.
8265         (type_name_or_error): Rename from type_name_no_tag_or_error.
8266         * gdbtypes.c (type_name_no_tag): Remove.
8267         (type_name_or_error): Rename from type_name_no_tag_or_error.
8268         (lookup_struct_elt_type, check_typedef): Update.
8269         * expprint.c (print_subexp_standard): Update.
8270         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8271         * d-namespace.c (d_lookup_nested_symbol): Update.
8272         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8273         (cp_print_class_member): Update.
8274         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8275         * completer.c (add_struct_fields): Update.
8276         * c-typeprint.c (cp_type_print_derivation_info)
8277         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8278         Update.
8279         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8280         (ada_prefer_type, ada_is_exception_sym): Update.
8281
8282 2018-06-01  Tom Tromey  <tom@tromey.com>
8283
8284         * valops.c (enum_constant_from_type, value_namespace_elt)
8285         (value_maybe_namespace_elt): Update.
8286         * valarith.c (find_size_for_pointer_math): Update.
8287         * target-descriptions.c (make_gdb_type): Update.
8288         * symmisc.c (print_symbol): Update.
8289         * stabsread.c (define_symbol, read_type)
8290         (complain_about_struct_wipeout, add_undefined_type)
8291         (cleanup_undefined_types_1): Update.
8292         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8293         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8294         (rust_internal_print_type, rust_composite_type)
8295         (rust_evaluate_funcall, rust_evaluate_subexp)
8296         (rust_inclusive_range_type_p): Update.
8297         * python/py-type.c (typy_get_tag): Update.
8298         * p-typeprint.c (pascal_type_print_base): Update.
8299         * mdebugread.c (parse_symbol, parse_type): Update.
8300         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8301         Update.
8302         * guile/scm-type.c (gdbscm_type_tag): Update.
8303         * go-lang.c (sixg_string_p): Update.
8304         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8305         Update.
8306         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8307         (TYPE_TAG_NAME): Remove.
8308         * gdbtypes.c (type_name_no_tag): Simplify.
8309         (check_typedef, check_types_equal, recursive_dump_type)
8310         (copy_type_recursive, arch_composite_type): Update.
8311         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8312         in summary mode when needed.
8313         * eval.c (evaluate_funcall): Update.
8314         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8315         (process_structure_scope, read_enumeration_type)
8316         (read_namespace_type, read_module_type, determine_prefix): Update.
8317         * cp-support.c (inspect_type): Update.
8318         * coffread.c (process_coff_symbol, decode_base_type): Update.
8319         * c-varobj.c (c_is_path_expr_parent): Update.
8320         * c-typeprint.c (c_type_print_base_struct_union): Update.
8321         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8322         summary when using C language.
8323         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8324         (gen_maybe_namespace_elt): Update.
8325         * ada-lang.c (ada_type_name): Simplify.
8326         (empty_record, ada_template_to_fixed_record_type_1)
8327         (template_to_static_fixed_type)
8328         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8329
8330 2018-06-01  Tom Tromey  <tom@tromey.com>
8331
8332         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8333         c_print_type.
8334         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8335         (c_print_type): Update.
8336         (c_print_type): New overload.
8337         (c_type_print_varspec_prefix, c_type_print_args)
8338         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8339         (c_type_print_base_struct_union, c_type_print_base_1)
8340         (cp_type_print_method_args): Add "language" parameter.
8341         (c_type_print_base): Update.
8342         * c-lang.h (c_print_type): Add new overload.
8343
8344 2018-06-01  Tom Tromey  <tom@tromey.com>
8345
8346         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8347         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8348
8349 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8350
8351         * aarch64-tdep.c (aarch64_sve_register_names): New const
8352         var.
8353         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8354         (AARCH64_SVE_Z_REGS_NUM): New define.
8355         (AARCH64_SVE_P_REGS_NUM): Likewise.
8356         (AARCH64_SVE_NUM_REGS): Likewise.
8357
8358 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8359
8360         * nat/linux-ptrace.h [__alpha__]
8361         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8362         definitions.
8363
8364 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8365
8366         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8367         the endianness selected.
8368         * NEWS: Document `set endian auto' mode operation update.
8369
8370 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8371
8372         * Makefile.in: Add new header.
8373         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8374         (sve_vl_from_vg): Likewise.
8375         (sve_vq_from_vl): Likewise.
8376         (sve_vl_from_vq): Likewise.
8377         (sve_vq_from_vg): Likewise.
8378         (sve_vg_from_vq): Likewise.
8379         * configure.nat: Add new c file.
8380         * nat/aarch64-sve-linux-ptrace.c: New file.
8381         * nat/aarch64-sve-linux-ptrace.h: New file.
8382
8383 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8384
8385         * aarch64-linux-nat.c (aarch64_linux_read_description):
8386         Add parmeter zero.
8387         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8388         Likewise.
8389         * aarch64-tdep.c (tdesc_aarch64_list): Add.
8390         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8391         (aarch64_gdbarch_init): Add parmeter zero.
8392         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8393         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8394         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8395         parmeter.
8396         * doc/gdb.texinfo: Describe SVE feature
8397         * features/aarch64-sve.c: New file.
8398
8399 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
8400
8401         PR gdb/23210
8402         * gdbarch.sh (significant_addr_bit): Default to zero when
8403         not set by target architecture.
8404         * gdbarch.c: Re-generated.
8405         * utils.c (address_significant): Update.
8406
8407 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
8408
8409         * stack.c (func_command): Remove trailing newline in call to error.
8410
8411 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8412
8413         * regcache.h (regcache_raw_collect): Remove, update callers to
8414         use regcache::raw_collect.
8415         * regcache.c (regcache_raw_collect): Remove.
8416
8417 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8418
8419         * regcache.h (regcache_raw_supply): Remove, update callers to
8420         use detached_regcache::raw_supply.
8421         * regcache.c (regcache_raw_supply): Remove.
8422
8423 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8424
8425         * regcache.h (regcache_cooked_write_part): Remove, update
8426         callers to use regcache::cooked_write_part.
8427         * regcache.c (regcache_cooked_write_part): Remove.
8428
8429 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8430
8431         * regcache.h (regcache_cooked_read_part): Remove, update callers
8432         to use readable_regcache::cooked_read_part.
8433         * regcache.c (regcache_cooked_read_part): Remove.
8434
8435 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8436
8437         * regcache.h (regcache_cooked_read_value): Remove, update
8438         callers to use readable_regcache::cooked_read_value.
8439         * regcache.c (regcache_cooked_read_value): Remove.
8440
8441 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8442
8443         * regcache.h (regcache_cooked_write): Remove, update callers to
8444         use regcache::cooked_write.
8445         * regcache.c (regcache_cooked_write): Remove.
8446
8447 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8448
8449         * regcache.h (regcache_invalidate): Remove, update callers to
8450         use detached_regcache::invalidate instead.
8451         * regcache.c (regcache_invalidate): Remove.
8452
8453 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8454
8455         * regcache.h (regcache_raw_write_part): Remove, update callers
8456         to use regcache::raw_write_part instead.
8457         * regcache.c (regcache_raw_write_part): Remove.
8458
8459 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8460
8461         * regcache.h (regcache_raw_read_part): Remove, update callers to
8462         use readable_regcache::raw_read_part instead.
8463         * regcache.c (regcache_raw_read_part): Remove.
8464
8465 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8466
8467         * regcache.h (regcache_cooked_read): Remove, update callers to
8468         use readable_regcache::cooked_read instead.
8469         * regcache.c (regcache_cooked_read): Remove.
8470
8471 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8472
8473         * regcache.h (regcache_raw_write): Remove, update callers to use
8474         regcache::raw_write instead.
8475         * regcache.c (regcache_raw_write): Remove.
8476
8477 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8478
8479         * regcache.h (regcache_raw_read): Remove, update callers to use
8480         readable_regcache::raw_read instead.
8481         * regcache.c (regcache_raw_read): Remove.
8482
8483 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8484
8485         * regcache.h (regcache_raw_update): Remove, update callers to
8486         use readable_regcache::raw_update instead.
8487         * regcache.c (regcache_raw_update): Remove.
8488
8489 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8490
8491         * regcache.h (regcache_register_status): Remove, update callers
8492         to use reg_buffer::get_register_status directly instead.
8493         * regcache.c (regcache_register_status): Remove.
8494
8495 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8496
8497         * regcache.h (regcache_get_ptid): Remove, update all callers to
8498         call regcache::ptid instead.
8499         * regcache.c (regcache_get_ptid): Remove.
8500
8501 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8502
8503         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
8504
8505 2018-05-30  Pedro Alves  <palves@redhat.com>
8506
8507         * common/common-exceptions.h (exception_rethrow): Use
8508         ATTRIBUTE_NORETURN.
8509
8510 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
8511
8512         * breakpoint.c (print_solib_event, check_status_catch_solib):
8513         Remove struct keyword in range-based for loops.
8514         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
8515         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
8516         Likewise.
8517         * linespec.c (find_superclass_methods, search_minsyms_for_name):
8518         Likewise.
8519         * symfile.c (addr_info_make_relative): Likewise.
8520         * thread.c (value_in_thread_stack_temporaries): Likewise.
8521
8522 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
8523
8524         PR gdb/16841
8525         * valops.c (value_struct_elt_for_reference): Call check_typedef on
8526         aggregate type to get its real type before accessing it.
8527
8528 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
8529
8530         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
8531         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
8532         * coff-pe-read.c (add_pe_forwarded_sym): Replace
8533         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
8534         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
8535         * jit.c (jit_breakpoint_re_set_internal): Likewise.
8536         * printcmd.c (info_address_command): Likewise.
8537
8538 2018-05-29  Tom Tromey  <tom@tromey.com>
8539
8540         * windows-nat.c (handle_exception): Update fall-through comment.
8541
8542 2018-05-29  Tom Tromey  <tom@tromey.com>
8543
8544         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
8545         (struct program_space) <added_solibs>: Now a std::vector.
8546         * breakpoint.c (print_solib_event): Update.
8547         (check_status_catch_solib): Update.
8548         * progspace.c (clear_program_space_solib_cache): Update.
8549         * solib.c (update_solib_list): Update.
8550
8551 2018-05-29  Tom Tromey  <tom@tromey.com>
8552
8553         * python/py-type.c (typy_richcompare): Update.
8554         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
8555         * gdbtypes.h (types_deeply_equal): Return bool.
8556         (types_equal): Likewise.
8557         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
8558         declare VEC.
8559         (check_types_equal): Change worklist to std::vector.  Return
8560         bool.
8561         (struct type_equality_entry): Add constructor.
8562         (compare_maybe_null_strings): Return bool.
8563         (check_types_worklist): Return bool.  Change worklist to
8564         std::vector.
8565         (types_deeply_equal): Use std::vector.
8566         (types_equal): Return bool.
8567         (compare_maybe_null_strings): Simplify.
8568
8569 2018-05-29  Tom Tromey  <tom@tromey.com>
8570
8571         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
8572
8573 2018-05-29  Tom Tromey  <tom@tromey.com>
8574
8575         * objc-lang.h: Don't include cp-support.h.
8576         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
8577         declare VEC.
8578
8579 2018-05-27  Tom Tromey  <tom@tromey.com>
8580
8581         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
8582
8583 2018-05-25  Tom Tromey  <tom@tromey.com>
8584
8585         * value.c (value::location): Initialize.
8586
8587 2018-05-25  Tom Tromey  <tom@tromey.com>
8588
8589         * dbxread.c (init_bincl_list): Remove.
8590         (bincl_list): Now a std::vector.
8591         (bincls_allocated, next_bincl): Remove.
8592         (free_bincl_list, do_free_bincl_list_cleanup)
8593         (make_cleanup_free_bincl_list): Remove.
8594         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
8595         unique_xmalloc_ptr.
8596         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
8597         (struct header_file_location): Add constructor.
8598         (add_bincl_to_list): Remove.
8599
8600 2018-05-25  Tom Tromey  <tom@tromey.com>
8601
8602         * tui/tui.c (tui_enable): Update.
8603         * mi/mi-interp.c (mi_interp::init): Update.
8604         * interps.h (class interp) <name>: New method.
8605         <m_name>: Rename from name.
8606         (~scoped_restore_interp): Update.
8607         * interps.c (interp::interp): Update.
8608         (interp_add, interp_set, interp_lookup_existing)
8609         (current_interp_named_p): Update.
8610
8611 2018-05-25  Tom Tromey  <tom@tromey.com>
8612
8613         * interps.c (interp_name): Remove.
8614         * mi/mi-interp.c (mi_interp::init): Update.
8615         * interps.h (interp_name): Remove.
8616         (~scoped_restore_interp): Update.
8617         * tui/tui.c (tui_enable): Update.
8618
8619 2018-05-25  Tom Tromey  <tom@tromey.com>
8620
8621         * utils.c (fputs_maybe_filtered): Update.
8622         * linespec.c (decode_line_full): Update.
8623         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
8624         (mi_print_breakpoint_for_event, mi_solib_loaded)
8625         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
8626         (mi_user_selected_context_changed): Update.
8627         * mi/mi-main.c (mi_execute_command): Update.
8628         * cli/cli-script.c (execute_control_command): Update.
8629         * python/python.c (execute_gdb_command): Update.
8630         * solib.c (info_sharedlibrary_command): Update.
8631         * interps.c (interp_ui_out): Remove.
8632         * interps.h (interp_ui_out): Remove.
8633
8634 2018-05-25  Tom Tromey  <tom@tromey.com>
8635
8636         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
8637         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
8638         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
8639
8640 2018-05-25  Tom Tromey  <tom@tromey.com>
8641
8642         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
8643         * interps.c (interp_exec): Use scoped_restore.
8644
8645 2018-05-25  Tom Tromey  <tom@tromey.com>
8646
8647         * remote.c (remote_target::remote_file_get): Use
8648         gdb::byte_vector.
8649         (remote_target::remote_file_put): Likewise.
8650
8651 2018-05-25  Tom Tromey  <tom@tromey.com>
8652
8653         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
8654         a std::string.
8655         (get_pe_section_index, add_pe_exported_sym): Update.
8656         (read_pe_exported_syms): Use gdb::def_vector.
8657
8658 2018-05-25  Tom Tromey  <tom@tromey.com>
8659
8660         * frame.c (remove_prev_frame): Remove.
8661         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
8662
8663 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
8664
8665         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
8666         Remove prototypes.
8667         * mips-linux-nat.c (supply_fpregset): Always call
8668         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
8669         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
8670         `mips_fill_fpregset'.
8671         * mips-linux-tdep.c (mips_supply_fpregset)
8672         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
8673         (mips_fill_fpregset_wrapper): Remove functions.
8674         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
8675         (mips_linux_fpregset): Remove variable.
8676         (mips_linux_iterate_over_regset_sections): Use
8677         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
8678         (mips_linux_o32_sigframe_init): Remove comment.
8679
8680 2018-05-25  Pedro Alves  <palves@redhat.com>
8681
8682         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
8683         (struct readahead_cache, struct packet_reg, struct
8684         remote_arch_state, class remote_state): Move higher up in the
8685         file.
8686         (remote_target::m_remote_state): Now an object instead of a pointer.
8687         (remote_target::get_remote_state): Adjust.
8688
8689 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8690
8691         * stack.c (select_and_print_frame): Delete.
8692         (struct function_bounds): Move struct within function.
8693         (func_command): Most content moved into new function
8694         find_frame_for_function, use new function, print result, add
8695         function comment.
8696         (find_frame_for_function): New function, now returns a result.
8697
8698 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8699
8700         * stack.c (iterate_over_block_arg_vars): Fix comment.
8701         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
8702
8703 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8704
8705         PR gdb/23203
8706         * frame.c
8707         (scoped_restore_selected_frame::scoped_restore_selected_frame):
8708         Define.
8709         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8710         Define.
8711         * frame.h (class scoped_restore_selected_frame): New class.
8712         * stack.c (print_frame_local_vars): Remove catching and rethrowing
8713         of any exception, use scoped_restore_selected_frame to restore the
8714         frame instead.
8715
8716 2018-05-24  Pedro Alves  <palves@redhat.com>
8717
8718         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8719         override.
8720
8721 2018-05-23  Tom Tromey  <tom@tromey.com>
8722
8723         * complaints.c (struct complaints): Remove.
8724         (symfile_complaint_book): Remove.
8725         (series): New global.
8726         (complaint_internal): Update.
8727         (clear_complaints): Update.
8728
8729 2018-05-23  Tom Tromey  <tom@tromey.com>
8730
8731         * complaints.c (counters): New global.
8732         (struct complain): Remove.
8733         (struct complaints) <root>: Remove.
8734         (complaint_sentinel): Remove.
8735         (symfile_complaint_book): Update.
8736         (find_complaint) Remove.
8737         (complaint_internal, clear_complaints): Update.
8738
8739 2018-05-23  Tom Tromey  <tom@tromey.com>
8740
8741         * complaints.c (struct complain) <file, line>: Remove.
8742         (find_complaint): Remove file, line parameters.
8743         (complaint_internal): Update.
8744
8745 2018-05-23  Tom Tromey  <tom@tromey.com>
8746
8747         * complaints.c (vcomplaint): Remove.
8748         (complaint_internal) Merge in contents of vcomplaint.
8749
8750 2018-05-23  Tom Tromey  <tom@tromey.com>
8751
8752         * complaints.c (struct complaints) <explanation>: Remove.
8753         (symfile_explanations): Remove.
8754         (symfile_complaint_book): Update.
8755         (vcomplaint): Update.
8756         (struct explanation): Remove.
8757
8758 2018-05-23  Tom Tromey  <tom@tromey.com>
8759
8760         * complaints.c (symfile_complaints): Remove.
8761         (complaint_internal): Remove "complaints" parameter.
8762         (clear_complaints, vcomplaint): Remove "c" parameter.
8763         (get_complaints): Remove.
8764         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8765         (dwarf2_debug_line_missing_file_complaint)
8766         (dwarf2_debug_line_missing_end_sequence_complaint)
8767         (dwarf2_complex_location_expr_complaint)
8768         (dwarf2_const_value_length_mismatch_complaint)
8769         (dwarf2_section_buffer_overflow_complaint)
8770         (dwarf2_macro_malformed_definition_complaint)
8771         (dwarf2_invalid_attrib_class_complaint)
8772         (create_addrmap_from_index, dw2_symtab_iter_next)
8773         (dw2_expand_marked_cus)
8774         (dw2_debug_names_iterator::find_vec_in_debug_names)
8775         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8776         (create_debug_type_hash_table, init_cutu_and_read_dies)
8777         (partial_die_parent_scope, add_partial_enumeration)
8778         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8779         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8780         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8781         (create_cus_hash_table, create_dwp_hash_table)
8782         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8783         (dwarf2_rnglists_process, dwarf2_ranges_process)
8784         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8785         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8786         (handle_struct_member_die, process_structure_scope)
8787         (read_array_type, read_common_block, read_module_type)
8788         (read_tag_pointer_type, read_typedef, read_base_type)
8789         (read_subrange_type, load_partial_dies, partial_die_info::read)
8790         (partial_die_info::read, partial_die_info::read)
8791         (partial_die_info::read, read_checked_initial_length_and_offset)
8792         (dwarf2_string_attr, read_formatted_entries)
8793         (dwarf_decode_line_header)
8794         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8795         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8796         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8797         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8798         (get_signatured_type, get_DW_AT_signature_type)
8799         (decode_locdesc, file_file_name, consume_improper_spaces)
8800         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8801         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8802         (dwarf2_symbol_mark_computed, set_die_type)
8803         (read_attribute_value): Update.
8804         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8805         Update.
8806         * dbxread.c (unknown_symtype_complaint)
8807         (lbrac_mismatch_complaint, repeated_header_complaint)
8808         (set_namestring, function_outside_compilation_unit_complaint)
8809         (read_dbx_symtab, process_one_symbol): Update.
8810         * gdbtypes.c (stub_noname_complaint): Update.
8811         * windows-nat.c (handle_unload_dll): Update.
8812         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8813         (decode_base_type): Update.
8814         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8815         (eb_complaint, record_include_begin, record_include_end)
8816         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8817         (process_xcoff_symbol, read_symbol)
8818         (function_outside_compilation_unit_complaint)
8819         (scan_xcoff_symtab): Update.
8820         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8821         * buildsym.c (finish_block_internal, make_blockvector)
8822         (end_symtab_get_static_block, augment_type_symtab): Update.
8823         * dtrace-probe.c (dtrace_process_dof)
8824         (dtrace_static_probe_ops::get_probes): Update.
8825         * complaints.h (struct complaint): Don't declare.
8826         (symfile_complaints): Remove.
8827         (complaint_internal): Remove "complaints" parameter.
8828         (complaint): Likewise.
8829         (clear_complaints): Likewise.
8830         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8831         (reread_symbols): Update.
8832         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8833         (dwarf2_frame_cache, decode_frame_entry): Update.
8834         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8835         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8836         (info_selectors_command): Update.
8837         * macrotab.c (macro_include, check_for_redefinition)
8838         (macro_undef): Update.
8839         * objfiles.c (filter_overlapping_sections): Update.
8840         * stabsread.c (invalid_cpp_abbrev_complaint)
8841         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8842         (define_symbol, error_type, read_type, rs6000_builtin_type)
8843         (stabs_method_name_from_physname, read_member_functions)
8844         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8845         (attach_fields_to_type, complain_about_struct_wipeout)
8846         (read_range_type, read_args, common_block_start)
8847         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8848         Update.
8849         * mdebugread.c (index_complaint, unknown_ext_complaint)
8850         (basic_type_complaint, bad_tag_guess_complaint)
8851         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8852         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8853         (parse_procedure, parse_lines)
8854         (function_outside_compilation_unit_complaint)
8855         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8856         (bad_tag_guess_complaint, reg_value_complaint): Update.
8857         * cp-support.c (demangled_name_complaint): Update.
8858         * macroscope.c (sal_macro_scope): Update.
8859         * dwarf-index-write.c (class debug_names): Update.
8860
8861 2018-05-23  Tom Tromey  <tom@tromey.com>
8862
8863         * complaints.c (clear_complaints): Remove "noisy" parameter.
8864         * complaints.h (clear_complaints): Update.
8865         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8866         (reread_symbols): Update.
8867
8868 2018-05-23  Tom Tromey  <tom@tromey.com>
8869
8870         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8871         SUBSEQUENT_MESSAGE.
8872         (vcomplaint, clear_complaints): Update.
8873         (symfile_explanations): Remove some messages.
8874
8875 2018-05-23  Tom Tromey  <tom@tromey.com>
8876
8877         * complaints.c (internal_complaint): Remove.
8878         * complaints.h (internal_complaint): Remove.
8879
8880 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8881
8882         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8883
8884 2018-05-22  Pedro Alves  <palves@redhat.com>
8885
8886         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8887         (remote_fileio_badfd, remote_fileio_return_errno)
8888         (remote_fileio_return_success, remote_fileio_func_open)
8889         (remote_fileio_func_open, remote_fileio_func_close)
8890         (remote_fileio_func_read, remote_fileio_func_write)
8891         (remote_fileio_func_lseek, remote_fileio_func_rename)
8892         (remote_fileio_func_unlink, remote_fileio_func_stat)
8893         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8894         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8895         remote_target parameter.
8896         (remote_fio_func_map) <func>: Add remote_target parameter.
8897         (do_remote_fileio_request, remote_fileio_request):
8898         * remote-fileio.h (remote_fileio_request):
8899         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8900         remote_target parameter.
8901         (remote_notif_process, handle_notification): Adjust to pass down
8902         the remote.
8903         (remote_notif_state_allocate): Add remote_target parameter.  Save
8904         it.
8905         * remote-notif.h (struct remote_target): Forward declare.
8906         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8907         remote_target parameter.
8908         (struct remote_notif_state) <remote>: New field.
8909         (remote_notif_ack, remote_notif_parse): Add remote_target
8910         parameter.
8911         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8912         remote_target parameter.
8913         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8914         (threads_listing_context, rmt_thread_action, protocol_feature)
8915         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8916         (packet_result, struct threads_listing_context, remote_state):
8917         Move definitions and declarations higher up.
8918         (remote_target) <~remote_target>: Declare.
8919         (remote_download_command_source, remote_file_put, remote_file_get)
8920         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8921         (remote_hostio_pread_vFile, remote_hostio_send_command)
8922         (remote_hostio_set_filesystem, remote_hostio_open)
8923         (remote_hostio_close, remote_hostio_unlink, remote_state)
8924         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8925         (get_memory_write_packet_size, get_memory_read_packet_size)
8926         (append_pending_thread_resumptions, remote_detach_1)
8927         (append_resumption, remote_resume_with_vcont)
8928         (add_current_inferior_and_thread, wait_ns, wait_as)
8929         (process_stop_reply, remote_notice_new_inferior)
8930         (process_initial_stop_replies, remote_add_thread)
8931         (btrace_sync_conf, remote_btrace_maybe_reopen)
8932         (remove_new_fork_children, kill_new_fork_children)
8933         (discard_pending_stop_replies, stop_reply_queue_length)
8934         (check_pending_events_prevent_wildcard_vcont)
8935         (discard_pending_stop_replies_in_queue, stop_reply)
8936         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8937         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8938         (remote_interrupt_as, remote_interrupt_ns)
8939         (remote_get_noisy_reply, remote_query_attached)
8940         (remote_add_inferior, remote_current_thread, get_current_thread)
8941         (set_thread, set_general_thread, set_continue_thread)
8942         (set_general_process, write_ptid)
8943         (remote_unpack_thread_info_response, remote_get_threadinfo)
8944         (parse_threadlist_response, remote_get_threadlist)
8945         (remote_threadlist_iterator, remote_get_threads_with_ql)
8946         (remote_get_threads_with_qxfer)
8947         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8948         (get_offsets, remote_check_symbols, remote_supported_packet)
8949         (remote_query_supported, remote_packet_size)
8950         (remote_serial_quit_handler, remote_detach_pid)
8951         (remote_vcont_probe, remote_resume_with_hc)
8952         (send_interrupt_sequence, interrupt_query)
8953         (remote_notif_get_pending_events, fetch_register_using_p)
8954         (send_g_packet, process_g_packet, fetch_registers_using_g)
8955         (store_register_using_P, store_registers_using_G)
8956         (set_remote_traceframe, check_binary_download)
8957         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8958         (remote_xfer_live_readonly_partial, remote_read_bytes)
8959         (remote_send_printf, remote_flash_write, readchar)
8960         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8961         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8962         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8963         (extended_remote_disable_randomization, extended_remote_run)
8964         (send_environment_packet, extended_remote_environment_support)
8965         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8966         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8967         (packet_command): Now methods of ...
8968         (remote_target): ... this class.
8969         (m_remote_state) <remote_target>: New field.
8970         (struct remote_state) <stop_reply_queue,
8971         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8972         fields.
8973         (remote_state::remote_state): Allocate stop_reply_queue.
8974         (remote_state): Delete global.
8975         (get_remote_state_raw): Delete.
8976         (remote_target::get_remote_state): Allocate m_remote_state on
8977         demand.
8978         (get_current_remote_target): New.
8979         (remote_ops, extended_remote_ops): Delete.
8980         (wait_forever_enabled_p, remote_async_inferior_event_token):
8981         Delete, moved to struct remote_state.
8982         (remote_target::close): Delete self.  Destruction bits split to
8983         ...
8984         (remote_target::~remote_target): ... this.
8985         (show_memory_packet_size): Adjust to use
8986         get_current_remote_target.
8987         (struct protocol_feature) <func>: Add remote_target parameter.
8988         All callers adjusted.
8989         (curr_quit_handler_target): New.
8990         (remote_serial_quit_handler): Reimplement.
8991         (remote_target::open_1): Adjust to use get_current_remote_target.
8992         Heap-allocate remote_target/extended_remote_target instances.
8993         (vcont_builder::vcont_builder): Add remote_target parameter, and
8994         save it in m_remote.  All callers adjusted.
8995         (vcont_builder::m_remote): New field.
8996         (vcont_builder::restart, vcont_builder::flush)
8997         (vcont_builder::push_action): Use it.
8998         (remote_target::commit_resume): Use it.
8999         (struct queue_iter_param) <remote>: New field.
9000         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9001         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9002         (check_pending_event_prevents_wildcard_vcont_callback)
9003         (remote_target::check_pending_events_prevent_wildcard_vcont)
9004         (remote_target::discard_pending_stop_replies)
9005         (remote_target::discard_pending_stop_replies_in_queue)
9006         (remote_target::remote_notif_remove_queued_reply): Fill in
9007         'remote' field.
9008         (remote_notif_get_pending_events): New.
9009         (remote_target::readchar, remote_target::remote_serial_write):
9010         Save/restore curr_quit_handler_target.
9011         (putpkt): New.
9012         (kill_new_fork_children): Fill in 'remote' field.
9013         (packet_command): Use get_current_remote_target, defer to
9014         remote_target method of same name.
9015         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9016         parameter, and save it in m_remote.  All callers adjusted.
9017         (scoped_remote_fd::release): Use m_remote.
9018         (scoped_remote_fd::m_remote): New field.
9019         (remote_file_put, remote_file_get, remote_file_delete): Use
9020         get_current_remote_target, defer to remote_target method of same
9021         name.
9022         (remote_btrace_reset): Add remote_state paremeter.  Update all
9023         callers.
9024         (remote_async_inferior_event_handler). Pass down 'data'.
9025         (remote_new_objfile): Use get_current_remote_target.
9026         (remote_target::vcont_r_supported): New.
9027         (set_range_stepping): Use get_current_remote_target and
9028         remote_target::vcont_r_supported.
9029         (_initialize_remote): Don't allocate 'remote_state' and
9030         'stop_reply_queue' globals.
9031         * remote.h (struct remote_target): Forward declare.
9032         (getpkt, putpkt, remote_notif_get_pending_events): Add
9033         'remote_target' parameter.
9034
9035 2018-05-22  Pedro Alves  <palves@redhat.com>
9036
9037         * remote.c (vcont_builder): Now a class.  Make all data members
9038         private.
9039         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9040         Declare methods.
9041         (vcont_builder_restart): Rename to ...
9042         (vcont_builder::restart): ... this.
9043         (vcont_builder_flush): Rename to ...
9044         (vcont_builder::flush): ... this.
9045         (vcont_builder_push_action): Rename to ...
9046         (vcont_builder::push_action): ... this.
9047         (remote_target::commit_resume): Adjust.
9048
9049 2018-05-22  Pedro Alves  <palves@redhat.com>
9050
9051         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9052         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9053         (get_fixed_memory_packet_size): New.
9054         (get_memory_packet_size): Use it.
9055         (set_memory_packet_size): Don't override the config size with
9056         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9057         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9058         Don't refer to get_memory_packet_size if not connected to a remote
9059         target.  Show "(default)" if configured size is 0.
9060
9061 2018-05-22  Pedro Alves  <palves@redhat.com>
9062
9063         * remote.c (remote_target::mourn_inferior): Move
9064         discard_pending_stop_replies call here from ...
9065         (_initialize_remote): ... here.
9066
9067 2018-05-22  Pedro Alves  <palves@redhat.com>
9068
9069         * remote.c (compare_section_command): Remove set_general_process
9070         call.
9071
9072 2018-05-22  Pedro Alves  <palves@redhat.com>
9073
9074         * remote.c (struct packet_reg, struct remote_arch_state):
9075         Move higher up in the file.
9076         (remote_state) <m_arch_states>: Store remote_arch_state values
9077         instead of remote_arch_state pointers.
9078         (remote_state::get_remote_arch_state): Adjust.
9079
9080 2018-05-22  Pedro Alves  <palves@redhat.com>
9081
9082         * remote.c: Include <unordered_map>.
9083         (remote_state): Now a class.
9084         (remote_state) <get_remote_arch_state>: Declare method.
9085         <get_remote_arch_state>: New field.
9086         (remote_arch_state) <remote_arch_state>: Declare ctor.
9087         <regs>: Now a unique_ptr.
9088         (remote_gdbarch_data_handle): Delete.
9089         (get_remote_arch_state): Delete.
9090         (remote_state::get_remote_arch_state): New.
9091         (get_remote_state): Adjust to call remote_state's
9092         get_remote_arch_state method.
9093         (init_remote_state): Delete, bits factored out to ...
9094         (remote_arch_state::remote_arch_state): ... this new method.
9095         (get_remote_packet_size, get_memory_packet_size)
9096         (process_g_packet, remote_target::fetch_registers)
9097         (remote_target::prepare_to_store, store_registers_using_G)
9098         (remote_target::store_registers, remote_target::get_trace_status):
9099         Adjust to call remote_state's method.
9100         (_initialize_remote): Remove reference to
9101         remote_gdbarch_data_handle.
9102
9103 2018-05-22  Pedro Alves  <palves@redhat.com>
9104
9105         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9106         pread>: New method declarations.
9107         (remote_target::open_1): Adjust.
9108         (readahead_cache_invalidate): Rename to ...
9109         (readahead_cache::invalidate): ... this, and adjust to be a class
9110         method.
9111         (readahead_cache_invalidate_fd): Rename to ...
9112         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9113         class method.
9114         (remote_hostio_pwrite): Adjust.
9115         (remote_hostio_pread_from_cache): Rename to ...
9116         (readahead_cache::pread): ... this, and adjust to be a class
9117         method.
9118         (remote_hostio_close): Adjust.
9119
9120 2018-05-22  Pedro Alves  <palves@redhat.com>
9121
9122         * remote.c (remote_hostio_close_cleanup): Delete.
9123         (class scoped_remote_fd): New.
9124         (remote_file_put, remote_file_get): Use it.
9125
9126 2018-05-22  Pedro Alves  <palves@redhat.com>
9127
9128         (struct vCont_action_support): Use bool and initialize all fields.
9129         (struct readahead_cache): Initialize all fields.
9130         (remote_state): Use bool and initialize all fields.
9131         (remote_state::remote_state, remote_state::~remote_state): New.
9132         (new_remote_state): Delete.
9133         (_initialize_remote): Use new to allocate remote_state.
9134
9135 2018-05-22  Pedro Alves  <palves@redhat.com>
9136             張俊芝  <zjz@zjz.name>
9137
9138         PR gdb/22973
9139         * c-exp.y: Include "c-support.h".
9140         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9141         of tolower.  Use c_ident_is_alpha to scan names.
9142         * c-lang.c: Include "c-support.h".
9143         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9144         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9145         * c-support.h: New file, with bits factored out from ...
9146         * cp-name-parser.y: ... this file.
9147         Include "c-support.h".
9148         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9149         c-support.h and renamed.
9150         (symbol_end, yylex): Adjust.
9151
9152 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9153
9154         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9155         parameter type to CORE_ADDR.
9156         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9157         parameter type in declaration to CORE_ADDR.
9158         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9159         target_auxv_search to get AT_HWCAP and use the result to get the
9160         target description.
9161         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9162         to CORE_ADDR. Remove the cast of the return value to unsigned
9163         long. Fix error predicate of target_auxv_search.
9164         (ppc_linux_nat_target::read_description): Change the type of the
9165         hwcap variable to CORE_ADDR.
9166
9167 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9168
9169         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9170         if the size of fpscr is larger than 32 bits.
9171
9172 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9173
9174         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9175         (ppc32_linux_vsxregmap): New global.
9176         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9177         regcache_supply_regset, and regcache_collect_regset.
9178         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9179         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9180         (fetch_vsx_register, store_vsx_register): Remove.
9181         (fetch_vsx_registers): Add regno parameter. Get regset using
9182         ppc_linux_vsxregset. Use regset to supply registers.
9183         (store_vsx_registers): Add regno parameter. Get regset using
9184         ppc_linux_vsxregset. Use regset to collect registers.
9185         (fetch_register): Call fetch_vsx_registers instead of
9186         fetch_vsx_register.
9187         (store_register): Call store_vsx_registers instead of
9188         store_vsx_register.
9189         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9190         new regno parameter.
9191         (store_ppc_registers): Call store_vsx_registers with -1 for the
9192         new regno parameter.
9193         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9194         (ppc_collect_vsxregset): Remove.
9195
9196 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9197
9198         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9199         offset fields.
9200         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9201         for vector register offset fields.
9202         (ppc64_fbsd_reg_offsets): Likewise.
9203         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9204         to vector register offset fields.
9205         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9206         to vector register offset fields.
9207         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9208         vector register offset fields.
9209         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9210         initializers for vector register offset fields.
9211         (rs6000_aix64_reg_offsets): Likewise.
9212         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9213         (ppc_supply_vrregset): Remove.
9214         (ppc_collect_vrregset): Remove.
9215         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9216         (ppc_linux_vrregset) : New function.
9217         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9218         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9219         (ppc32_linux_vrregset): Remove.
9220         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9221         and use result instead of ppc32_linux_vrregset.
9222         (ppc32_linux_reg_offsets): Remove initializers for vector register
9223         offset fields.
9224         (ppc64_linux_reg_offsets): Likewise.
9225         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9226         * ppc-linux-nat.c: Include regset.h.
9227         (gdb_vrregset_t): Adjust comment to account for little-endian
9228         mode.
9229         (supply_vrregset, fill_vrregset): Remove.
9230         (fetch_altivec_register, store_altivec_register): Remove.
9231         (fetch_altivec_registers): Add regno parameter. Get regset using
9232         ppc_linux_vrregset. Use regset to supply registers.
9233         (store_altivec_registers): Add regno parameter. Get regset using
9234         ppc_linux_vrregset. Use regset to collect registers.
9235         (fetch_register): Call fetch_altivec_registers instead of
9236         fetch_altivec_register.
9237         (store_register): Call store_altivec_registers instead of
9238         store_altivec_register.
9239         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9240         the new regno parameter.
9241         (store_ppc_registers): Call store_altivec_registers with -1 for
9242         the new regno parameter.
9243
9244 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9245
9246         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9247         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9248         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9249         (gdb_vrregset_t): Change array type size to
9250         PPC_LINUX_SIZEOF_VRREGSET.
9251         (gdb_vsxregset_t): Change array type size to
9252         PPC_LINUX_SIZEOF_VSXREGSET.
9253         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9254         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9255         PPC_LINUX_SIZEOF_VSXREGSET.
9256
9257 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9258
9259         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9260         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9261         nat/ppc-linux.c.
9262         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9263         ppc_linux_target_wordsize with tid.
9264         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9265         wordsize with tid.
9266         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9267         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9268         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9269         tid parameter. Remove static specifier.
9270         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9271         (ppc_linux_target_wordsize): New declaration.
9272
9273 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9274
9275         * arch/ppc-linux-common.c: New file.
9276         * arch/ppc-linux-common.h: New file.
9277         * arch/ppc-linux-tdesc.h: New file.
9278         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9279         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9280         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9281         arch/ppc-linux-tdesc.h.
9282         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9283         arch/ppc-linux-tdesc.h.
9284         (ppc_linux_nat_target::read_description): Remove target
9285         description matching code. Fill a ppc_linux_features struct and
9286         call ppc_linux_match_description with it. Move comment about ISA
9287         2.05 to ppc-linux-common.c.
9288         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9289         arch/ppc-linux-tdesc.h.
9290         (ppc_linux_core_read_description): Remove target description
9291         matching code. Fill a ppc_linux_features struct and call
9292         ppc_linux_match_description with it.
9293         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9294         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9295         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9296         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9297         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9298         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9299         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9300         (tdesc_powerpc_e500l): Remove.
9301
9302 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9303
9304         * ada-lang.c (catch_assert_command): Pass empty string instead
9305         of NULL for excep_string argument.
9306
9307 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9308
9309         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9310         the width of the requested register exceeds the width of the
9311         `ptrace' data type.
9312
9313 2018-05-21  Tom Tromey  <tom@tromey.com>
9314
9315         * printcmd.c (output_command): Remove.
9316         (output_command_const): Rename to output_command.
9317         * valprint.h (output_command): Rename from output_command_const.
9318         * tracepoint.c (trace_dump_actions): Call output_command.
9319
9320 2018-05-21  Tom Tromey  <tom@tromey.com>
9321
9322         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9323         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9324         * ada-lang.h (create_ada_exception_catchpoint): Update.
9325         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9326         std::string.
9327         (create_excep_cond_exprs, ~ada_catchpoint)
9328         (should_stop_exception, print_one_exception)
9329         (print_mention_exception, print_recreate_exception): Update.
9330         (ada_get_next_arg): Remove.
9331         (catch_ada_exception_command_split): Use std::string.  Change type
9332         of "excep_string", "cond_string".
9333         (catch_ada_exception_command): Update.
9334         (create_ada_exception_catchpoint): Change type of excep_string.
9335         (ada_exception_sal): Remove excep_string parameter.
9336         (~ada_catchpoint): Remove.
9337
9338 2018-05-21  Tom Tromey  <tom@tromey.com>
9339
9340         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9341         cleanup.
9342
9343 2018-05-21  Tom Tromey  <tom@tromey.com>
9344
9345         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9346         Return unique_xmalloc_ptr.
9347         (print_it_exception): Update.
9348
9349 2018-05-21  Tom Tromey  <tom@tromey.com>
9350
9351         * tracepoint.c (trace_dump_actions): Use std::string.
9352
9353 2018-05-21  Tom Tromey  <tom@tromey.com>
9354
9355         * symfile.c (reread_symbols): Use std::string for original_name.
9356
9357 2018-05-21  Tom Tromey  <tom@tromey.com>
9358
9359         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9360         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9361         constructor.
9362
9363 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9364
9365         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9366         instance to...
9367         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9368         * objfiles.c (get_objfile_bfd_data): Allocate
9369         objfile_per_bfd_storage with obstack_new when allocating on
9370         obstack.
9371
9372 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9373
9374         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9375         OBSTACK_ZALLOC.
9376         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9377         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9378         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9379         (add_pending): Likewise.
9380         (parse_symbol): Likewise.
9381         (parse_partial_symbols): Likewise.
9382         (psymtab_to_symtab_1): Likewise.
9383         (new_psymtab): Likewise.
9384         (elfmdebug_build_psymtabs): Likewise.
9385         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9386         * objfiles.c (get_objfile_bfd_data): Likewise.
9387         (objfile_register_static_link): Likewise.
9388         * psymtab.c (allocate_psymtab): Likewise.
9389         * stabsread.c (read_member_functions): Likewise.
9390         * xcoffread.c (xcoff_end_psymtab): Likewise.
9391
9392 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9393
9394         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9395         compiler supports std::is_trivially_constructible.
9396         * common/poison.h: Include obstack.h.
9397         (IsMallocable): Define to is_trivially_constructible if the
9398         compiler supports it, define to true_type otherwise.
9399         (xobnew): New.
9400         (XOBNEW): Redefine.
9401         (xobnewvec): New.
9402         (XOBNEWVEC): Redefine.
9403         * gdb_obstack.h (obstack_zalloc): New.
9404         (OBSTACK_ZALLOC): Redefine.
9405         (obstack_calloc): New.
9406         (OBSTACK_CALLOC): Redefine.
9407         (obstack_new): New.
9408         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9409         (gdbarch_obstack): New declaration in gdbarch.h, definition in
9410         gdbarch.c.
9411         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9412         obstack_calloc/obstack_zalloc.
9413         (gdbarch_obstack_zalloc): Remove.
9414         * target-descriptions.c (tdesc_data_init): Use obstack_new.
9415
9416 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9417
9418         * stack.c (backtrace_command_1): Remove useless variable int i.
9419
9420 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9421
9422         * stack.c (print_frame_info): Fix comment.
9423
9424 2018-05-18  Tom Tromey  <tom@tromey.com>
9425
9426         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9427         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9428         (~dwarf2_per_objfile): Update
9429         (dwarf2_get_dwz_file): Use new.
9430         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
9431         unique_ptr.
9432
9433 2018-05-18  Tom Tromey  <tom@tromey.com>
9434
9435         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
9436         unique_ptr.
9437         * dwarf2read.c (struct dwp_file): Add constructor and
9438         initializers.
9439         (open_and_init_dwp_file): Return a unique_ptr.
9440         (dwarf2_per_objfile, create_dwp_hash_table)
9441         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
9442         (lookup_dwo_unit_in_dwp): Update.
9443         (open_and_init_dwp_file, get_dwp_file): Update.
9444
9445 2018-05-18  Tom Tromey  <tom@tromey.com>
9446
9447         * dwarf2read.c (dwarf2_per_objfile): Update.
9448         (struct mapped_index): Add initializers.
9449         (dwarf2_read_index): Use new.
9450         (dw2_symtab_iter_init): Update.
9451         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
9452         unique_ptr.
9453
9454 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9455
9456         * dwarf2read.c (mapped_index) <total_size>: Remove.
9457
9458 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9459
9460         * unittests/format_pieces-selftests.c (test_format_specifier):
9461         Add ARI comments.
9462
9463 2018-05-18  Tom Tromey  <tom@tromey.com>
9464
9465         * c-typeprint.c (maybe_print_hole): New function.
9466         (c_print_type_struct_field_offset): Update.
9467         (c_type_print_base_struct_union): Call maybe_print_hole.
9468
9469 2018-05-17  Keith Seitz  <keiths@redhat.com>
9470
9471         * breakpoint.c (build_bpstat_chain): New function, moved from
9472         bpstat_stop_status.
9473         (bpstat_stop_status): Add optional parameter, `stop_chain'.
9474         If no stop chain is passed, call build_bpstat_chain to build it.
9475         * breakpoint.h (build_bpstat_chain): Declare.
9476         (bpstat_stop_status): Move documentation here from breakpoint.c.
9477         * infrun.c (handle_signal_stop): Before eliding inlined frames,
9478         build the stop chain and pass it to skip_inline_frames.
9479         Pass this stop chain to bpstat_stop_status.
9480         * inline-frame.c: Include breakpoint.h.
9481         (stopped_by_user_bp_inline_frame): New function.
9482         (skip_inline_frames): Add parameter `stop_chain'.
9483         Move documention to inline-frame.h.
9484         If non-NULL, use stopped_by_user_bp_inline_frame to determine
9485         whether the frame should be elided.
9486         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
9487         Add moved documentation and update for new parameter.
9488
9489 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9490
9491         PR cli/14975
9492         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9493         unittests/format_pieces-selftests.c.
9494         * common/format.h (format_piece) <operator==>: New.
9495         (format_pieces) <operator[]>: Remove.
9496         * common/format.c (format_pieces::format_pieces): Handle \e.
9497         * unittests/format_pieces-selftests.c: New.
9498
9499 2018-05-17  Tom Tromey  <tom@tromey.com>
9500
9501         PR symtab/23010:
9502         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
9503         (dw2_instantiate_symtab): Add skip_partial parameter.
9504         (dw2_find_last_source_symtab, dw2_map_expand_apply)
9505         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
9506         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
9507         (dw2_expand_symtabs_matching_one)
9508         (dw2_find_pc_sect_compunit_symtab)
9509         (dw2_debug_names_lookup_symbol)
9510         (dw2_debug_names_expand_symtabs_for_function): Update.
9511         (init_cutu_and_read_dies): Add skip_partial parameter.
9512         (process_psymtab_comp_unit, build_type_psymtabs_1)
9513         (process_skeletonless_type_unit, load_partial_comp_unit)
9514         (psymtab_to_symtab_1): Update.
9515         (load_full_comp_unit): Add skip_partial parameter.
9516         (process_imported_unit_die, dwarf2_read_addr_index)
9517         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
9518         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
9519         (read_signatured_type): Update.
9520
9521 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9522
9523         * value.c (release_value): Remove unused variable.
9524         (record_latest_value): Likewise.
9525         (access_value_history): Likewise.
9526         (preserve_values): Likewise.
9527
9528 2018-05-17  Tom Tromey  <tom@tromey.com>
9529
9530         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
9531         Initialize.
9532
9533 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
9534
9535         PR gdb/22286
9536         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
9537         Also handle registers whose width is not a multiple of
9538         PTRACE_TYPE_RET.
9539         (linux_nat_trad_target::store_register): Likewise.
9540
9541 2018-05-16  Tom Tromey  <tom@tromey.com>
9542
9543         * gdbcore.h (core_bfd): Redefine.
9544         * corelow.c (core_target::close): Update.
9545         (core_target_open): Update.
9546         * progspace.h (struct program_space) <cbfd>: Now a
9547         gdb_bfd_ref_ptr.
9548
9549 2018-05-16  Tom Tromey  <tom@tromey.com>
9550
9551         PR cli/19551:
9552         * symfile-add-flags.h (enum symfile_add_flags)
9553         <SYMFILE_NOT_FILENAME>: New constant.
9554         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
9555         objfile name from BFD.
9556         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
9557         * minidebug.c (find_separate_debug_file_in_section): Put
9558         ".gnu_debugdata" into BFD's file name.
9559
9560 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
9561
9562         * regcache.c (regcache_read_ftype, regcache_write_ftype):
9563         Remove.
9564
9565 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
9566
9567         PR binutils/21446
9568         * aarch64-tdep.c (aarch64_analyze_prologue,
9569         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
9570         Indicate not interested in errors.
9571
9572 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9573
9574         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
9575         Supply the MIPS_ZERO_REGNUM register.
9576
9577 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9578
9579         * mips-tdep.c (mask_address_var): Make variable static.
9580
9581 2018-05-14  Tom Tromey  <tom@tromey.com>
9582
9583         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
9584
9585 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
9586
9587         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
9588         FXSAVE_ADDR for the mxcsr register.
9589
9590 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
9591
9592         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
9593
9594 2018-05-11  Pedro Alves  <palves@redhat.com>
9595
9596         * corelow.c (core_target) <core_target>: No longer inline.
9597         Initialize m_core_gdbarch, m_core_vec and build the section table
9598         here.
9599         <~core_target>: New.
9600         <core_gdbarch, get_core_register_section>: New methods.
9601         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
9602         factored out from ...
9603         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
9604         (core_ops): Delete.
9605         (sniff_core_bfd): Add gdbarch parameter.
9606         (core_close): Delete, merged into ...
9607         (core_target::close): ... here.  Delete self.
9608         (core_close_cleanup): Delete.
9609         (core_target_open): Allocate a core_target on the heap.  Use a
9610         unique_ptr instead of a cleanup.  Bits moved into the core_target
9611         ctor.  Adjust to use core_target methods instead of globals.
9612         (get_core_register_section): Rename to ...
9613         (core_target::get_core_register_section): ... this and adjust.
9614         (struct get_core_registers_cb_data): New.
9615         (get_core_registers_cb): Use it.  Use bool.
9616         (core_target::fetch_registers, core_target::files_info)
9617         (core_target::xfer_partial, core_target::read_description)
9618         (core_target::pid_to, core_target::thread_name): Adjust to
9619         reference class fields instead of globals.
9620         * target.h (struct target_ops_deleter, target_ops_up): New.
9621
9622 2018-05-11  Pedro Alves  <palves@redhat.com>
9623
9624         * corefile.c (core_file_command): Move to corelow.c.
9625         * corelow.c (the_core_target): Delete.
9626         (core_file_command): Moved from corefile.c.  Check exec_bfd
9627         instead of the_core_target.  Use target_detach instead of calling
9628         into the_core_target directly.
9629         (maybe_say_no_core_file_now): New.
9630         (core_target::detach): Use it.
9631         (_initialize_corelow): Remove references to the_core_target.
9632         * gdbcore.h (the_core_target): Delete.
9633
9634 2018-05-11  Tom Tromey  <tromey@redhat.com>
9635             Pedro Alves  <palves@redhat.com>
9636
9637         * corefile.c (core_bfd): Remove.
9638         * gdbcore.h (core_bfd): Now a macro.
9639         * progspace.h (struct program_space) <cbfd>: New field.
9640
9641 2018-05-11  Tom Tromey  <tom@tromey.com>
9642
9643         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
9644         gdb::def_vector.
9645
9646 2018-05-10  Tom Tromey  <tom@tromey.com>
9647
9648         * configure: Rebuild.
9649         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
9650
9651 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
9652
9653         PR server/23158:
9654         * regformats/regdat.sh: Adjust script, following the addition
9655         of the new expedite_regs parameter to init_target_desc.
9656
9657 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
9658     
9659         PR gdb/23127
9660         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
9661         set_gdbarch_significant_addr_bit.
9662         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
9663         set_gdbarch_significant_addr_bit.
9664         * utils.c (address_significant): Update to sign extend addr.
9665
9666 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
9667
9668         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
9669         (xtensa_linux_init_abi): Limit tdep->num_regs by
9670         tdep->num_nopriv_regs.
9671         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
9672         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
9673         not initialized.
9674
9675 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
9676
9677         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
9678
9679 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
9680
9681         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
9682         (I387_MXCSR_INIT_VAL): New constant.
9683         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
9684         buffer if it was supplied by the inferior.
9685         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
9686         (i387_xsave_get_clear_bv): New function.
9687         (i387_supply_xsave): Only read x87 control registers from the
9688         xsave buffer if the feature is enabled, and the state will have
9689         been written, otherwise, provide a suitable default.
9690         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
9691         including x87 control registers.  Update control registers if they
9692         have changed from the default value, and mark features as enabled
9693         as required.
9694         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
9695
9696 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
9697
9698         * spu-tdep.c (info_spu_event_command): Fix output formatting.
9699
9700 2018-05-07  Tom Tromey  <tom@tromey.com>
9701
9702         * configure: Rebuild.
9703         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
9704
9705 2018-05-07  Tom Tromey  <tom@tromey.com>
9706
9707         PR tdep/20362:
9708         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9709         bit.  Use correct value for VDIV.
9710
9711 2018-05-04  Tom Tromey  <tom@tromey.com>
9712
9713         * configure: Rebuild.
9714         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9715
9716 2018-05-04  Tom Tromey  <tom@tromey.com>
9717
9718         * linux-record.c (record_linux_system_call) <case
9719         RECORD_SYS_RECVFROM>: Add "break".
9720
9721 2018-05-04  Tom Tromey  <tom@tromey.com>
9722
9723         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9724         Add missing "break".
9725         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9726         Add missing "break".
9727
9728 2018-05-04  Tom Tromey  <tom@tromey.com>
9729
9730         * rs6000-tdep.c (ppc_process_record_op4)
9731         (ppc_process_record_op63): Add fall-through comment.
9732
9733 2018-05-04  Tom Tromey  <tom@tromey.com>
9734
9735         * i386-tdep.c (i386_process_record): Add fall-through comment.
9736
9737 2018-05-04  Tom Tromey  <tom@tromey.com>
9738
9739         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9740         comment.
9741
9742 2018-05-04  Tom Tromey  <tom@tromey.com>
9743
9744         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9745         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9746         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9747         comment.
9748         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9749         comment.
9750         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9751         comment.
9752
9753 2018-05-04  Tom Tromey  <tom@tromey.com>
9754
9755         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9756
9757 2018-05-04  Tom Tromey  <tom@tromey.com>
9758
9759         * s390-tdep.c (s390_process_record): Fix fall-through comments.
9760         * xcoffread.c (scan_xcoff_symtab): Move comment later.
9761         * symfile.c (section_is_mapped): Fix fall-through comment.
9762         * stabsread.c (define_symbol, read_member_functions): Fix
9763         fall-through comment.
9764         * s390-linux-tdep.c (s390_process_record): Fix fall-through
9765         comment.
9766         * remote.c (remote_wait_as): Fix fall-through comment.
9767         * p-exp.y (yylex): Fix fall-through comment.
9768         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9769         comment.
9770         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9771         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9772         * jv-exp.y (yylex): Fix fall-through comment.
9773         * go-exp.y (lex_one_token): Fix fall-through comment.
9774         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9775         fall-through comment.
9776         * f-exp.y (yylex): Fix fall-through comment.
9777         * dwarf2read.c (process_die): Fix fall-through comments.
9778         * dbxread.c (process_one_symbol): Fix fall-through comment.
9779         * d-exp.y (lex_one_token): Fix fall-through comment.
9780         * cp-name-parser.y (yylex): Fix fall-through comment.
9781         * coffread.c (coff_symtab_read): Fix fall-through comment.
9782         * c-exp.y (lex_one_token): Fix fall-through comment.
9783         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9784         comment.
9785         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9786         comment.
9787
9788 2018-05-04  Tom Tromey  <tom@tromey.com>
9789
9790         PR python/22730:
9791         * NEWS: Mention gdb.execute change.
9792         * gdbcmd.h (execute_control_command): Don't declare.
9793         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9794         execute_control_commands, execute_control_commands_to_string.
9795         * cli/cli-script.h (execute_control_commands)
9796         (execute_control_commands_to_string): Declare.
9797         (execute_control_command): Add from_tty parameter.
9798         * cli/cli-script.c (execute_control_commands)
9799         (execute_control_commands_to_string): New functions.
9800         (execute_user_command): Use execute_control_commands.
9801         (execute_control_command_1): Add "from_tty" parameter.  Update.
9802         (execute_control_command): Likewise.
9803
9804 2018-05-04  Tom Tromey  <tom@tromey.com>
9805
9806         PR python/22731:
9807         * NEWS: Mention that breakpoint commands are writable.
9808         * python/py-breakpoint.c (bppy_set_commands): New function.
9809         (breakpoint_object_getset) <"commands">: Use it.
9810
9811 2018-05-04  Tom Tromey  <tom@tromey.com>
9812
9813         * tracepoint.c (actions_command): Update.
9814         * mi/mi-cmd-break.c (mi_command_line_array)
9815         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9816         (mi_read_next_line): Remove.
9817         (mi_cmd_break_commands): Update.
9818         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9819         function_view.
9820         * cli/cli-script.c (get_command_line): Update.
9821         (process_next_line): Use function_view.  Constify.
9822         (recurse_read_control_structure, read_command_lines)
9823         (read_command_lines_1): Change argument types to function_view.
9824         (do_define_command, document_command): Update.
9825         * breakpoint.h (check_tracepoint_command): Don't declare.
9826         * breakpoint.c (check_tracepoint_command): Remove.
9827         (commands_command_1, create_tracepoint_from_upload): Update.
9828
9829 2018-05-04  Tom Tromey  <tom@tromey.com>
9830
9831         PR gdb/11750:
9832         * cli/cli-script.h (enum command_control_type) <define_control>:
9833         New constant.
9834         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9835         (build_command_line, execute_control_command_1)
9836         (process_next_line): Likewise.
9837         (do_define_command): New function, extracted from define_command.
9838         (define_command): Use it.
9839
9840 2018-05-04  Tom Tromey  <tom@tromey.com>
9841
9842         * tracepoint.c (actions_command): Update.
9843         * cli/cli-script.h (read_command_lines): Update.
9844         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9845         (MAX_TMPBUF): Remove define.
9846         (define_command): Use string_printf.
9847         (document_command): Likewise.
9848         * breakpoint.c (commands_command_1): Update.
9849
9850 2018-05-04  Tom Tromey  <tom@tromey.com>
9851
9852         * top.c (execute_command): Update.
9853         * cli/cli-script.h (print_command_lines): Now varargs.
9854         * cli/cli-script.c (print_command_lines): Now varargs.
9855         (execute_control_command_1) <case while_control, case if_control>:
9856         Update.
9857
9858 2018-05-04  Tom Tromey  <tom@tromey.com>
9859
9860         * tracepoint.c (all_tracepoint_actions): Rename from
9861         all_tracepoint_actions_and_cleanup.  Change return type.
9862         (actions_command, encode_actions_1, encode_actions)
9863         (trace_dump_actions, tdump_command): Update.
9864         * remote.c (remote_download_command_source): Update.
9865         * python/python.c (gdbpy_eval_from_control_command)
9866         (python_command, python_interactive_command): Update.
9867         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9868         * guile/guile.c (guile_command)
9869         (gdbscm_eval_from_control_command, guile_command): Update.
9870         * compile/compile.c (compile_code_command)
9871         (compile_print_command, compile_to_object): Update.
9872         * cli/cli-script.h (struct command_lines_deleter): New.
9873         (counted_command_line): New typedef.
9874         (struct command_line): Add constructor, destructor.
9875         <body_list>: Remove.
9876         <body_list_0, body_list_1>: New members.
9877         (command_line_up): Remove typedef.
9878         (read_command_lines, read_command_lines_1, get_command_line):
9879         Update.
9880         (copy_command_lines): Don't declare.
9881         * cli/cli-script.c (build_command_line): Use "new".
9882         (get_command_line): Return counted_command_line.
9883         (print_command_lines, execute_user_command)
9884         (execute_control_command_1, while_command, if_command): Update.
9885         (realloc_body_list): Remove.
9886         (process_next_line, recurse_read_control_structure): Update.
9887         (read_command_lines, read_command_lines_1): Return counted_command_line.
9888         (free_command_lines): Use "delete".
9889         (copy_command_lines): Remove.
9890         (define_command, document_command, show_user_1): Update.
9891         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9892         a counted_command_line.
9893         * breakpoint.h (counted_command_line): Remove typedef.
9894         (breakpoint_set_commands): Update.
9895         * breakpoint.c (check_no_tracepoint_commands)
9896         (validate_commands_for_breakpoint): Update.
9897         (breakpoint_set_commands): Change commands to be a
9898         counted_command_line.
9899         (commands_command_1, update_dprintf_command_list)
9900         (create_tracepoint_from_upload): Update.
9901
9902 2018-05-04  Tom Tromey  <tom@tromey.com>
9903
9904         * cli/cli-decode.h (cmd_list_element): New constructor.
9905         (~cmd_list_element): New destructor.
9906         (struct cmd_list_element): Add initializers.
9907         * cli/cli-decode.c (do_add_cmd): Use "new".
9908         (delete_cmd): Use "delete".
9909
9910 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9911             Pedro Alves <palves@redhat.com>
9912
9913         PR breakpoints/19806 and support for PR external/20207.
9914         * NEWS: Mention Aarch64 watchpoint improvements.
9915         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9916         watchpoints and PR external/20207 watchpoints.
9917         * nat/aarch64-linux-hw-point.c
9918         (kernel_supports_any_contiguous_range): New.
9919         (aarch64_watchpoint_offset): New.
9920         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9921         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9922         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9923         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9924         next_addr_orig_p.  Support PR external/20207 watchpoints.
9925         (aarch64_downgrade_regs): New.
9926         (aarch64_dr_state_insert_one_point): New parameters offset and
9927         addr_orig.
9928         (aarch64_dr_state_remove_one_point): Likewise.
9929         (aarch64_handle_breakpoint): Update caller.
9930         (aarch64_handle_aligned_watchpoint): Likewise.
9931         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9932         aligned_offset.
9933         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9934         aarch64_downgrade_regs.
9935         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9936         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9937         (DR_CONTROL_MASK): ... this.
9938         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9939         (unsigned int aarch64_watchpoint_offset): New prototype.
9940         (aarch64_linux_set_debug_regs): Remove const from state.
9941         * utils.c (align_up, align_down): Move to ...
9942         * common/common-utils.c (align_up, align_down): ... here.
9943         * utils.h (align_up, align_down): Move to ...
9944         * common/common-utils.h (align_up, align_down): ... here.
9945
9946 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9947
9948         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9949         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9950         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9951         Re-implement to match the ABI as summarized in GCC's
9952         gcc/config/sparc/sparc.c.  All callers updated.
9953         (sparc32_store_arguments): Remove assertion.
9954
9955 2018-05-04  Tom Tromey  <tom@tromey.com>
9956
9957         * printcmd.c: Don't include tui.h.
9958         (decode_format): Use skip_spaces.
9959
9960 2018-05-04  Tom Tromey  <tom@tromey.com>
9961
9962         PR gdb/22619:
9963         * printcmd.c (last_count): New global.
9964         (x_command): Use saved count when repeating.
9965
9966 2018-05-04  Tom Tromey  <tom@tromey.com>
9967
9968         * nto-procfs.c (do_closedir_cleanup): Remove.
9969         (procfs_pidlist): Use gdb_dir_up.
9970         * procfs.c (do_closedir_cleanup): Remove.
9971         (proc_update_threads): Use gdb_dir_up.
9972         * common/filestuff.h (struct gdb_dir_deleter): New.
9973         (gdb_dir_up): New typedef.
9974
9975 2018-05-04  Tom Tromey  <tom@tromey.com>
9976
9977         * ada-lang.c (print_mention_exception): Use std::string.
9978
9979 2018-05-04  Tom Tromey  <tom@tromey.com>
9980
9981         * ada-lang.c (create_excep_cond_exprs): Update.
9982         (ada_exception_catchpoint_cond_string): Use std::string.
9983
9984 2018-05-04  Tom Tromey  <tom@tromey.com>
9985
9986         * ada-lang.c (xget_renaming_scope): Return std::string.
9987         (old_renaming_is_invisible): Update.
9988
9989 2018-05-04  Tom Tromey  <tom@tromey.com>
9990
9991         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9992         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9993
9994 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9995
9996         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9997
9998 2018-05-04  Tom Tromey  <tom@tromey.com>
9999
10000         * remote.c (remote_query_supported_append): Change type.
10001         (remote_check_symbols): Update.
10002
10003 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10004
10005         PR gdb/11420
10006         * configure.ac: Prepend libpython.
10007         * python/python-config.py: Likewise.
10008         * configure: Regenerate.
10009
10010 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10011
10012         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10013
10014 2018-05-03  Pedro Alves  <palves@redhat.com>
10015
10016         * s390-linux-nat.c
10017         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10018         override.  Write 'true' instead of '1'.
10019         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10020         declaration.
10021
10022 2018-05-02  Pedro Alves  <palves@redhat.com>
10023
10024         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10025         add_inf_child_target.
10026         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10027         add_inf_child_target.
10028         * aix-thread.c (aix_thread_target_info): New.
10029         (aix_thread_target) <shortname, longname, doc>: Delete.
10030         <info>: New.
10031         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10032         add_inf_child_target.
10033         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10034         add_inf_child_target.
10035         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10036         add_inf_child_target.
10037         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10038         add_inf_child_target.
10039         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10040         add_inf_child_target.
10041         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10042         add_inf_child_target.
10043         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10044         add_inf_child_target.
10045         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10046         add_inf_child_target.
10047         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10048         add_inf_child_target.
10049         * bfd-target.c (target_bfd_target_info): New.
10050         (target_bfd) <shortname, longname, doc>: Delete.
10051         <info>: New.
10052         * bsd-kvm.c (bsd_kvm_target_info): New.
10053         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10054         <info>: New.
10055         (bsd_kvm_target::open): Rename to ...
10056         (bsd_kvm_target_open): ... this.  Adjust.
10057         * bsd-uthread.c (bsd_uthread_target_info): New.
10058         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10059         <info>: New.
10060         * corefile.c (core_file_command): Adjust.
10061         * corelow.c (core_target_info): New.
10062         (core_target) <shortname, longname, doc>: Delete.
10063         <info>: New.
10064         (core_target::open): Rename to ...
10065         (core_target_open): ... this.  Adjust.
10066         * ctf.c (ctf_target_info): New.
10067         (ctf_target) <shortname, longname, doc>: Delete.
10068         <info>: New.
10069         (ctf_target::open): Rename to ...
10070         (ctf_target_open): ... this.
10071         (_initialize_ctf): Adjust.
10072         * exec.c (exec_target_info): New.
10073         (exec_target) <shortname, longname, doc>: Delete.
10074         <info>: New.
10075         (exec_target::open): Rename to ...
10076         (exec_target_open): ... this.
10077         * gdbcore.h (core_target_open): Declare.
10078         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10079         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10080         add_inf_child_target.
10081         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10082         add_inf_child_target.
10083         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10084         add_inf_child_target.
10085         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10086         add_inf_child_target.
10087         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10088         add_inf_child_target.
10089         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10090         add_inf_child_target.
10091         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10092         add_inf_child_target.
10093         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10094         add_inf_child_target.
10095         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10096         add_inf_child_target.
10097         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10098         add_inf_child_target.
10099         * inf-child.c (inf_child_target_info): New.
10100         (inf_child_target::info): New.
10101         (inf_child_open_target): Remove 'target' parameter.  Use
10102         get_native_target instead.
10103         (inf_child_target::open): Delete.
10104         (add_inf_child_target): New.
10105         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10106         Delete.
10107         <info>: New.
10108         (add_inf_child_target): Declare.
10109         (inf_child_open_target): Declare.
10110         * linux-thread-db.c (thread_db_target_info): New.
10111         (thread_db_target) <shortname, longname, doc>: Delete.
10112         <info>: New.
10113         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10114         add_inf_child_target.
10115         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10116         add_inf_child_target.
10117         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10118         add_inf_child_target.
10119         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10120         add_inf_child_target.
10121         * make-target-delegates (print_class): Adjust.
10122         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10123         add_inf_child_target.
10124         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10125         add_inf_child_target.
10126         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10127         add_inf_child_target.
10128         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10129         add_inf_child_target.
10130         * nto-procfs.c (nto_native_target_info): New.
10131         (nto_procfs_target_native) <shortname, longname, doc>:
10132         Delete.
10133         <info>: New.
10134         (nto_procfs_target_info): New.
10135         (nto_procfs_target_procfs) <shortname, longname, doc>:
10136         Delete.
10137         <info>: New.
10138         (init_procfs_targets): Adjust.
10139         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10140         add_inf_child_target.
10141         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10142         add_inf_child_target.
10143         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10144         add_inf_child_target.
10145         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10146         add_inf_child_target.
10147         * ravenscar-thread.c (ravenscar_target_info): New.
10148         (ravenscar_thread_target) <shortname, longname, doc>:
10149         Delete.
10150         <info>: New.
10151         * record-btrace.c (record_btrace_target_info):
10152         (record_btrace_target) <shortname, longname, doc>: Delete.
10153         <info>: New.
10154         (record_btrace_target::open): Rename to ...
10155         (record_btrace_target_open): ... this.  Adjust.
10156         * record-full.c (record_longname, record_doc): New.
10157         (record_full_base_target) <shortname, longname, doc>: Delete.
10158         <info>: New.
10159         (record_full_target_info): New.
10160         (record_full_target): <shortname>: Delete.
10161         <info>: New.
10162         (record_full_core_open_1, record_full_open_1): Update comments.
10163         (record_full_base_target::open): Rename to ...
10164         (record_full_open): ... this.
10165         (cmd_record_full_restore): Update.
10166         (_initialize_record_full): Update.
10167         * remote-sim.c (remote_sim_target_info): New.
10168         (gdbsim_target) <shortname, longname, doc>: Delete.
10169         <info>: New.
10170         (gdbsim_target::open): Rename to ...
10171         (gdbsim_target_open): ... this.
10172         (_initialize_remote_sim): Adjust.
10173         * remote.c (remote_doc): New.
10174         (remote_target_info): New.
10175         (remote_target) <shortname, longname, doc>: Delete.
10176         <info>: New.
10177         (extended_remote_target_info): New.
10178         (extended_remote_target) <shortname, longname, doc>: Delete.
10179         <info>: New.
10180         (remote_target::open_1): Make static.  Adjust.
10181         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10182         * s390-linux-nat.c (_initialize_s390_nat): Use
10183         add_inf_child_target.
10184         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10185         add_inf_child_target.
10186         * sol-thread.c (thread_db_target_info): New.
10187         (sol_thread_target) <shortname, longname, doc>: Delete.
10188         <info>: New.
10189         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10190         add_inf_child_target.
10191         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10192         add_inf_child_target.
10193         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10194         add_inf_child_target.
10195         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10196         add_inf_child_target.
10197         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10198         add_inf_child_target.
10199         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10200         add_inf_child_target.
10201         * spu-linux-nat.c (_initialize_spu_nat): Use
10202         add_inf_child_target.
10203         * spu-multiarch.c (spu_multiarch_target_info): New.
10204         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10205         <info>: New.
10206         * target-delegates.c: Regenerate.
10207         * target.c: Include <unordered_map>.
10208         (target_ops_p): Delete.
10209         (DEF_VEC_P(target_ops_p)): Delete.
10210         (target_factories): New.
10211         (test_target_info): New.
10212         (test_target_ops::info): New.
10213         (open_target): Adjust to use target_factories.
10214         (add_target_with_completer): Rename to ...
10215         (add_target): ... this.  Change prototype.  Register target_info
10216         and open callback in target_factories.  Register target_info in
10217         command context instead of target_ops.
10218         (add_target): Delete old implementation.
10219         (add_deprecated_target_alias): Change prototype.  Adjust.
10220         (the_native_target): New.
10221         (set_native_target, get_native_target): New.
10222         (find_default_run_target): Use the_native_target.
10223         (find_attach_target, find_run_target): Simplify.
10224         (target_ops::open): Delete.
10225         (dummy_target_info): New.
10226         (dummy_target::shortname, dummy_target::longname)
10227         (dummy_target::doc): Delete.
10228         (dummy_target::info): New.
10229         (debug_target::shortname, debug_target::longname)
10230         (debug_target::doc): Delete.
10231         (debug_target::info): New.
10232         * target.h (struct target_info): New.
10233         (target_ops::~target_ops): Add comment.
10234         (target_ops::info): New.
10235         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10236         longer virtual.  Implement in terms of target_info.
10237         (set_native_target, get_native_target): Declare.
10238         (target_open_ftype): New.
10239         (add_target, add_target_with_completer)
10240         (add_deprecated_target_alias): Change prototype.
10241         (test_target) <shortname, longname, doc>: Delete.
10242         <info>: New.
10243         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10244         add_inf_child_target.
10245         * tracefile-tfile.c (tfile_target_info): New.
10246         (tfile_target) <shortname, longname, doc>: Delete.
10247         <info>: New.
10248         (tfile_target::open): Rename to ...
10249         (tfile_target_open): ... this.
10250         (_initialize_tracefile_tfile): Adjust.
10251         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10252         add_inf_child_target.
10253         * windows-nat.c (_initialize_windows_nat): Use
10254         add_inf_child_target.
10255         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10256         add_inf_child_target.
10257
10258 2018-05-02  Pedro Alves  <palves@redhat.com>
10259
10260         * linux-nat.h (linux_nat_target) <low_new_thread,
10261         low_delete_thread, low_new_fork, low_forget_process,
10262         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10263         New virtual methods.
10264         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10265         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10266         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10267         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10268         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10269         Delete.
10270         * linux-fork.c (delete_fork): Adjust to call low method.
10271         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10272         (linux_nat_new_fork, linux_nat_forget_process_hook)
10273         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10274         (linux_nat_status_is_event):
10275         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10276         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10277         to call low method.
10278         (sigtrap_is_event): Rename to ...
10279         (linux_nat_target::low_status_is_event): ... this.
10280         (linux_nat_set_status_is_event): Delete.
10281         (save_stop_reason, linux_nat_wait_1)
10282         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10283         low methods.
10284         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10285         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10286         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10287         (linux_nat_set_prepare_to_resume): Delete.
10288         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10289         low virtual methods.
10290         * amd64-linux-nat.c: Likewise.
10291         * arm-linux-nat.c: Likewise.
10292         * i386-linux-nat.c: Likewise.
10293         * ia64-linux-nat.c: Likewise.
10294         * mips-linux-nat.c: Likewise.
10295         * ppc-linux-nat.c: Likewise.
10296         * s390-linux-nat.c: Likewise.
10297         * sparc64-linux-nat.c: Likewise.
10298         * x86-linux-nat.c: Likewise.
10299         * x86-linux-nat.h: Include "nat/x86-linux.h".
10300         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10301         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10302         Override methods.
10303
10304 2018-05-02  Pedro Alves  <palves@redhat.com>
10305
10306         * target.h (target_ops)
10307         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10308         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10309         stopped_by_watchpoint, have_continuable_watchpoint,
10310         stopped_data_address, watchpoint_addr_within_range,
10311         can_accel_watchpoint_condition, can_run, thread_alive,
10312         has_all_memory, has_memory, has_stack, has_registers,
10313         has_execution, can_async_p, is_async_p, supports_non_stop,
10314         always_non_stop_p, can_execute_reverse, supports_multi_process,
10315         supports_enable_disable_tracepoint,
10316         supports_disable_randomization, supports_string_tracing,
10317         supports_evaluation_of_breakpoint_conditions,
10318         can_run_breakpoint_commands, filesystem_is_local,
10319         can_download_tracepoint, get_trace_state_variable_value,
10320         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10321         record_is_replaying, record_will_replay,
10322         augmented_libraries_svr4_read>: Adjust to return bool.
10323         * aarch64-linux-nat.c: All implementations adjusted.
10324         * aix-thread.c: All implementations adjusted.
10325         * arm-linux-nat.c: All implementations adjusted.
10326         * breakpoint.c: All implementations adjusted.
10327         * bsd-kvm.c: All implementations adjusted.
10328         * bsd-uthread.c: All implementations adjusted.
10329         * corelow.c: All implementations adjusted.
10330         * ctf.c: All implementations adjusted.
10331         * darwin-nat.c: All implementations adjusted.
10332         * darwin-nat.h: All implementations adjusted.
10333         * exec.c: All implementations adjusted.
10334         * fbsd-nat.c: All implementations adjusted.
10335         * fbsd-nat.h: All implementations adjusted.
10336         * gnu-nat.c: All implementations adjusted.
10337         * gnu-nat.h: All implementations adjusted.
10338         * go32-nat.c: All implementations adjusted.
10339         * ia64-linux-nat.c: All implementations adjusted.
10340         * inf-child.c: All implementations adjusted.
10341         * inf-child.h: All implementations adjusted.
10342         * inf-ptrace.c: All implementations adjusted.
10343         * inf-ptrace.h: All implementations adjusted.
10344         * linux-nat.c: All implementations adjusted.
10345         * linux-nat.h: All implementations adjusted.
10346         * mips-linux-nat.c: All implementations adjusted.
10347         * nto-procfs.c: All implementations adjusted.
10348         * ppc-linux-nat.c: All implementations adjusted.
10349         * procfs.c: All implementations adjusted.
10350         * ravenscar-thread.c: All implementations adjusted.
10351         * record-btrace.c: All implementations adjusted.
10352         * record-full.c: All implementations adjusted.
10353         * remote-sim.c: All implementations adjusted.
10354         * remote.c: All implementations adjusted.
10355         * s390-linux-nat.c: All implementations adjusted.
10356         * sol-thread.c: All implementations adjusted.
10357         * spu-multiarch.c: All implementations adjusted.
10358         * target-delegates.c: All implementations adjusted.
10359         * target.c: All implementations adjusted.
10360         * target.h: All implementations adjusted.
10361         * tracefile-tfile.c: All implementations adjusted.
10362         * tracefile.c: All implementations adjusted.
10363         * tracefile.h: All implementations adjusted.
10364         * windows-nat.c: All implementations adjusted.
10365         * x86-linux-nat.h: All implementations adjusted.
10366         * x86-nat.h: All implementations adjusted.
10367
10368 2018-05-02  Pedro Alves  <palves@redhat.com>
10369
10370         * make-target-delegates (scan_target_h): Don't trim lines here.
10371         Replace sequences of tabs and/or whitespace with a single
10372         whitespace.
10373         (top level, parsing methods): Trim each line before processing it
10374         here.
10375
10376 2018-05-02  Pedro Alves  <palves@redhat.com>
10377             John Baldwin  <jhb@freebsd.org>
10378
10379         * target.h (enum strata) <debug_stratum>: New.
10380         (struct target_ops) <all delegation methods>: Replace by C++
10381         virtual methods, and drop "to_" prefix.  All references updated
10382         throughout.
10383         <to_shortname, to_longname, to_doc, to_data,
10384         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10385         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10386         virtual methods.  All references updated throughout.
10387         <can_attach, supports_terminal_ours, can_create_inferior,
10388         get_thread_control_capabilities, attach_no_wait>: New
10389         virtual methods.
10390         <insert_breakpoint, remove_breakpoint>: Now
10391         TARGET_DEFAULT_NORETURN methods.
10392         <info_proc>: Now returns bool.
10393         <to_magic>: Delete.
10394         (OPS_MAGIC): Delete.
10395         (current_target): Delete.  All references replaced by references
10396         to ...
10397         (target_stack): ... this.  New.
10398         (target_shortname, target_longname): Adjust.
10399         (target_can_run): Now a function declaration.
10400         (default_child_has_all_memory, default_child_has_memory)
10401         (default_child_has_stack, default_child_has_registers)
10402         (default_child_has_execution): Remove target_ops parameter.
10403         (complete_target_initialization): Delete.
10404         (memory_breakpoint_target): New template class.
10405         (test_target_ops): Refactor as a C++ class with virtual methods.
10406         * make-target-delegates (NAME_PART): Tighten.
10407         (POINTER_PART, CP_SYMBOL): New.
10408         (SIMPLE_RETURN_PART): Reimplement.
10409         (VEC_RETURN_PART): Expect less.
10410         (RETURN_PART, VIRTUAL_PART): New.
10411         (METHOD): Adjust to C++ virtual methods.
10412         (scan_target_h): Remove reference to C99.
10413         (dname): Output "target_ops::" prefix.
10414         (write_function_header): Adjust to output a C++ class method.
10415         (write_declaration): New.
10416         (write_delegator): Adjust to output a C++ class method.
10417         (tdname): Output "dummy_target::" prefix.
10418         (write_tdefault, write_debugmethod): Adjust to output a C++ class
10419         method.
10420         (tdefault_names, debug_names): Delete.
10421         (return_types, tdefaults, styles, argtypes_array): New.
10422         (top level): All methods are delegators.
10423         (print_class): New.
10424         (top level): Print dummy_target and debug_target classes.
10425         * target-delegates.c: Regenerate.
10426         * target-debug.h (target_debug_print_enum_info_proc_what)
10427         (target_debug_print_thread_control_capabilities)
10428         (target_debug_print_thread_info_p): New.
10429         * target.c (dummy_target): Delete.
10430         (the_dummy_target, the_debug_target): New.
10431         (target_stack): Now extern.
10432         (set_targetdebug): Push/unpush debug target.
10433         (default_child_has_all_memory, default_child_has_memory)
10434         (default_child_has_stack, default_child_has_registers)
10435         (default_child_has_execution): Remove target_ops parameter.
10436         (complete_target_initialization): Delete.
10437         (add_target_with_completer): No longer call
10438         complete_target_initialization.
10439         (target_supports_terminal_ours): Use regular delegation.
10440         (update_current_target): Delete.
10441         (push_target): No longer check magic number.  Don't call
10442         update_current_target.
10443         (unpush_target): Don't call update_current_target.
10444         (target_is_pushed): No longer check magic number.
10445         (target_require_runnable): Skip for all stratums over
10446         process_stratum.
10447         (target_ops::info_proc): New.
10448         (target_info_proc): Use find_target_at and
10449         find_default_run_target.
10450         (target_supports_disable_randomization): Use regular delegation.
10451         (target_get_osdata): Use find_target_at.
10452         (target_ops::open, target_ops::close, target_ops::can_attach)
10453         (target_ops::attach, target_ops::can_create_inferior)
10454         (target_ops::create_inferior, target_ops::can_run)
10455         (target_can_run): New.
10456         (default_fileio_target): Use regular delegation.
10457         (target_ops::fileio_open, target_ops::fileio_pwrite)
10458         (target_ops::fileio_pread, target_ops::fileio_fstat)
10459         (target_ops::fileio_close, target_ops::fileio_unlink)
10460         (target_ops::fileio_readlink): New.
10461         (target_fileio_open_1, target_fileio_unlink)
10462         (target_fileio_readlink): Always call the target method.  Handle
10463         FILEIO_ENOSYS.
10464         (return_zero, return_zero_has_execution): Delete.
10465         (init_dummy_target): Delete.
10466         (dummy_target::dummy_target, dummy_target::shortname)
10467         (dummy_target::longname, dummy_target::doc)
10468         (debug_target::debug_target, debug_target::shortname)
10469         (debug_target::longname, debug_target::doc): New.
10470         (target_supports_delete_record): Use regular delegation.
10471         (setup_target_debug): Delete.
10472         (maintenance_print_target_stack): Skip debug_stratum.
10473         (initialize_targets): Instantiate the_dummy_target and
10474         the_debug_target.
10475         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
10476         use target_stack.
10477         (target_auxv_search, fprint_target_auxv): Adjust.
10478         (info_auxv_command): Adjust to use target_stack.
10479         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
10480         * exceptions.c (print_flush): Handle a NULL target_stack.
10481         * regcache.c (target_ops_no_register): Refactor as class with
10482         virtual methods.
10483
10484         * exec.c (exec_target): New class.
10485         (exec_ops): Now an exec_target.
10486         (exec_open, exec_close_1, exec_get_section_table)
10487         (exec_xfer_partial, exec_files_info, exec_has_memory)
10488         (exec_make_note_section): Refactor as exec_target methods.
10489         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
10490         Delete.
10491         (exec_target::find_memory_regions): New.
10492         (_initialize_exec): Don't call init_exec_ops.
10493         * gdbcore.h (exec_file_clear): Delete.
10494
10495         * corefile.c (core_target): Delete.
10496         (core_file_command): Adjust.
10497         * corelow.c (core_target): New class.
10498         (the_core_target): New.
10499         (core_close): Remove target_ops parameter.
10500         (core_close_cleanup): Adjust.
10501         (core_target::close): New.
10502         (core_open, core_detach, get_core_registers, core_files_info)
10503         (core_xfer_partial, core_thread_alive, core_read_description)
10504         (core_pid_to_str, core_thread_name, core_has_memory)
10505         (core_has_stack, core_has_registers, core_info_proc): Rework as
10506         core_target methods.
10507         (ignore, core_remove_breakpoint, init_core_ops): Delete.
10508         (_initialize_corelow): Initialize the_core_target.
10509         * gdbcore.h (core_target): Delete.
10510         (the_core_target): New.
10511
10512         * ctf.c: (ctf_target): New class.
10513         (ctf_ops): Now a ctf_target.
10514         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
10515         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
10516         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
10517         methods.
10518         (init_ctf_ops): Delete.
10519         (_initialize_ctf): Don't call it.
10520         * tracefile-tfile.c (tfile_target): New class.
10521         (tfile_ops): Now a tfile_target.
10522         (tfile_open, tfile_close, tfile_files_info)
10523         (tfile_get_tracepoint_status, tfile_trace_find)
10524         (tfile_fetch_registers, tfile_xfer_partial)
10525         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
10526         Refactor as tfile_target methods.
10527         (tfile_xfer_partial_features): Remove target_ops parameter.
10528         (init_tfile_ops): Delete.
10529         (_initialize_tracefile_tfile): Don't call it.
10530         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
10531         (tracefile_has_stack, tracefile_has_registers)
10532         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
10533         tracefile_target methods.
10534         (init_tracefile_ops): Delete.
10535         (tracefile_target::tracefile_target): New.
10536         * tracefile.h: Include "target.h".
10537         (tracefile_target): New class.
10538         (init_tracefile_ops): Delete.
10539
10540         * spu-multiarch.c (spu_multiarch_target): New class.
10541         (spu_ops): Now a spu_multiarch_target.
10542         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
10543         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
10544         (spu_search_memory, spu_mourn_inferior): Refactor as
10545         spu_multiarch_target methods.
10546         (init_spu_ops): Delete.
10547         (_initialize_spu_multiarch): Remove references to init_spu_ops,
10548         complete_target_initialization.
10549
10550         * ravenscar-thread.c (ravenscar_thread_target): New class.
10551         (ravenscar_ops): Now a ravenscar_thread_target.
10552         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
10553         (ravenscar_thread_alive, ravenscar_pid_to_str)
10554         (ravenscar_fetch_registers, ravenscar_store_registers)
10555         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
10556         (ravenscar_stopped_by_hw_breakpoint)
10557         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
10558         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
10559         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
10560         methods.
10561         (init_ravenscar_thread_ops): Delete.
10562         (_initialize_ravenscar): Remove references to
10563         init_ravenscar_thread_ops and complete_target_initialization.
10564
10565         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
10566         (bsd_uthread_target): New class.
10567         (bsd_uthread_ops): Now a bsd_uthread_target.
10568         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
10569         (bsd_uthread_close, bsd_uthread_mourn_inferior)
10570         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
10571         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
10572         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
10573         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
10574         (bsd_uthread_target): Delete function.
10575         (_initialize_bsd_uthread): Remove reference to
10576         complete_target_initialization.
10577
10578         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
10579         (target_bfd): ... this new class.
10580         (target_bfd_xfer_partial, target_bfd_get_section_table)
10581         (target_bfd_close): Refactor as target_bfd methods.
10582         (target_bfd::~target_bfd): New.
10583         (target_bfd_reopen): Adjust.
10584         (target_bfd::close): New.
10585
10586         * record-btrace.c (record_btrace_target): New class.
10587         (record_btrace_ops): Now a record_btrace_target.
10588         (record_btrace_open, record_btrace_stop_recording)
10589         (record_btrace_disconnect, record_btrace_close)
10590         (record_btrace_async, record_btrace_info)
10591         (record_btrace_insn_history, record_btrace_insn_history_range)
10592         (record_btrace_insn_history_from, record_btrace_call_history)
10593         (record_btrace_call_history_range)
10594         (record_btrace_call_history_from, record_btrace_record_method)
10595         (record_btrace_is_replaying, record_btrace_will_replay)
10596         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
10597         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
10598         (record_btrace_store_registers, record_btrace_prepare_to_store)
10599         (record_btrace_to_get_unwinder)
10600         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
10601         (record_btrace_commit_resume, record_btrace_wait)
10602         (record_btrace_stop, record_btrace_can_execute_reverse)
10603         (record_btrace_stopped_by_sw_breakpoint)
10604         (record_btrace_supports_stopped_by_sw_breakpoint)
10605         (record_btrace_stopped_by_hw_breakpoint)
10606         (record_btrace_supports_stopped_by_hw_breakpoint)
10607         (record_btrace_update_thread_list, record_btrace_thread_alive)
10608         (record_btrace_goto_begin, record_btrace_goto_end)
10609         (record_btrace_goto, record_btrace_stop_replaying_all)
10610         (record_btrace_execution_direction)
10611         (record_btrace_prepare_to_generate_core)
10612         (record_btrace_done_generating_core): Refactor as
10613         record_btrace_target methods.
10614         (init_record_btrace_ops): Delete.
10615         (_initialize_record_btrace): Remove reference to
10616         init_record_btrace_ops.
10617         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
10618         the execution_direction global.
10619         (record_full_base_target, record_full_target)
10620         (record_full_core_target): New classes.
10621         (record_full_ops): Now a record_full_target.
10622         (record_full_core_ops): Now a record_full_core_target.
10623         (record_full_target::detach, record_full_target::disconnect)
10624         (record_full_core_target::disconnect)
10625         (record_full_target::mourn_inferior, record_full_target::kill):
10626         New.
10627         (record_full_open, record_full_close, record_full_async): Refactor
10628         as methods of the record_full_base_target class.
10629         (record_full_resume, record_full_commit_resume): Refactor
10630         as methods of the record_full_target class.
10631         (record_full_wait, record_full_stopped_by_watchpoint)
10632         (record_full_stopped_data_address)
10633         (record_full_stopped_by_sw_breakpoint)
10634         (record_full_supports_stopped_by_sw_breakpoint)
10635         (record_full_stopped_by_hw_breakpoint)
10636         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
10637         methods of the record_full_base_target class.
10638         (record_full_store_registers, record_full_xfer_partial)
10639         (record_full_insert_breakpoint, record_full_remove_breakpoint):
10640         Refactor as methods of the record_full_target class.
10641         (record_full_can_execute_reverse, record_full_get_bookmark)
10642         (record_full_goto_bookmark, record_full_execution_direction)
10643         (record_full_record_method, record_full_info, record_full_delete)
10644         (record_full_is_replaying, record_full_will_replay)
10645         (record_full_goto_begin, record_full_goto_end, record_full_goto)
10646         (record_full_stop_replaying): Refactor as methods of the
10647         record_full_base_target class.
10648         (record_full_core_resume, record_full_core_kill)
10649         (record_full_core_fetch_registers)
10650         (record_full_core_prepare_to_store)
10651         (record_full_core_store_registers, record_full_core_xfer_partial)
10652         (record_full_core_insert_breakpoint)
10653         (record_full_core_remove_breakpoint)
10654         (record_full_core_has_execution): Refactor
10655         as methods of the record_full_core_target class.
10656         (record_full_base_target::supports_delete_record): New.
10657         (init_record_full_ops): Delete.
10658         (init_record_full_core_ops): Delete.
10659         (record_full_save): Refactor as method of the
10660         record_full_base_target class.
10661         (_initialize_record_full): Remove references to
10662         init_record_full_ops and init_record_full_core_ops.
10663
10664         * remote.c (remote_target, extended_remote_target): New classes.
10665         (remote_ops): Now a remote_target.
10666         (extended_remote_ops): Now an extended_remote_target.
10667         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
10668         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
10669         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
10670         (remote_pass_signals, remote_set_syscall_catchpoint)
10671         (remote_program_signals, )
10672         (remote_thread_always_alive): Remove target_ops parameter.
10673         (remote_thread_alive, remote_thread_name)
10674         (remote_update_thread_list, remote_threads_extra_info)
10675         (remote_static_tracepoint_marker_at)
10676         (remote_static_tracepoint_markers_by_strid)
10677         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
10678         (remote_open): Refactor as methods of remote_target.
10679         (extended_remote_open, extended_remote_detach)
10680         (extended_remote_attach, extended_remote_post_attach):
10681         (extended_remote_supports_disable_randomization)
10682         (extended_remote_create_inferior): : Refactor as method of
10683         extended_remote_target.
10684         (remote_set_permissions, remote_open_1, remote_detach)
10685         (remote_follow_fork, remote_follow_exec, remote_disconnect)
10686         (remote_resume, remote_commit_resume, remote_stop)
10687         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
10688         (remote_terminal_ours, remote_wait, remote_fetch_registers)
10689         (remote_prepare_to_store, remote_store_registers)
10690         (remote_flash_erase, remote_flash_done, remote_files_info)
10691         (remote_kill, remote_mourn, remote_insert_breakpoint)
10692         (remote_remove_breakpoint, remote_insert_watchpoint)
10693         (remote_watchpoint_addr_within_range)
10694         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
10695         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
10696         (remote_supports_stopped_by_sw_breakpoint)
10697         (remote_stopped_by_hw_breakpoint)
10698         (remote_supports_stopped_by_hw_breakpoint)
10699         (remote_stopped_by_watchpoint, remote_stopped_data_address)
10700         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
10701         (remote_verify_memory): Refactor as methods of remote_target.
10702         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
10703         parameter.
10704         (remote_xfer_partial, remote_get_memory_xfer_limit)
10705         (remote_search_memory, remote_rcmd, remote_memory_map)
10706         (remote_pid_to_str, remote_get_thread_local_address)
10707         (remote_get_tib_address, remote_read_description): Refactor as
10708         methods of remote_target.
10709         (remote_target::fileio_open, remote_target::fileio_pwrite)
10710         (remote_target::fileio_pread, remote_target::fileio_close): New.
10711         (remote_hostio_readlink, remote_hostio_fstat)
10712         (remote_filesystem_is_local, remote_can_execute_reverse)
10713         (remote_supports_non_stop, remote_supports_disable_randomization)
10714         (remote_supports_multi_process, remote_supports_cond_breakpoints)
10715         (remote_supports_enable_disable_tracepoint)
10716         (remote_supports_string_tracing)
10717         (remote_can_run_breakpoint_commands, remote_trace_init)
10718         (remote_download_tracepoint, remote_can_download_tracepoint)
10719         (remote_download_trace_state_variable, remote_enable_tracepoint)
10720         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10721         (remote_trace_start, remote_get_trace_status)
10722         (remote_get_tracepoint_status, remote_trace_stop)
10723         (remote_trace_find, remote_get_trace_state_variable_value)
10724         (remote_save_trace_data, remote_get_raw_trace_data)
10725         (remote_set_disconnected_tracing, remote_core_of_thread)
10726         (remote_set_circular_trace_buffer, remote_traceframe_info)
10727         (remote_get_min_fast_tracepoint_insn_len)
10728         (remote_set_trace_buffer_size, remote_set_trace_notes)
10729         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10730         (remote_disable_btrace, remote_teardown_btrace)
10731         (remote_read_btrace, remote_btrace_conf)
10732         (remote_augmented_libraries_svr4_read, remote_load)
10733         (remote_pid_to_exec_file, remote_can_do_single_step)
10734         (remote_execution_direction, remote_thread_handle_to_thread_info):
10735         Refactor as methods of remote_target.
10736         (init_remote_ops, init_extended_remote_ops): Delete.
10737         (remote_can_async_p, remote_is_async_p, remote_async)
10738         (remote_thread_events, remote_upload_tracepoints)
10739         (remote_upload_trace_state_variables): Refactor as methods of
10740         remote_target.
10741         (_initialize_remote): Remove references to init_remote_ops and
10742         init_extended_remote_ops.
10743
10744         * remote-sim.c (gdbsim_target): New class.
10745         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10746         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10747         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10748         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10749         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10750         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10751         Refactor as methods of gdbsim_target.
10752         (gdbsim_ops): Now a gdbsim_target.
10753         (init_gdbsim_ops): Delete.
10754         (gdbsim_cntrl_c): Adjust.
10755         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10756
10757         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10758         (the_amd64_linux_nat_target): New.
10759         (amd64_linux_fetch_inferior_registers)
10760         (amd64_linux_store_inferior_registers): Refactor as methods of
10761         amd64_linux_nat_target.
10762         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
10763         * i386-linux-nat.c: Don't include "linux-nat.h".
10764         (i386_linux_nat_target): New class.
10765         (the_i386_linux_nat_target): New.
10766         (i386_linux_fetch_inferior_registers)
10767         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10768         as methods of i386_linux_nat_target.
10769         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10770         * inf-child.c (inf_child_ops): Delete.
10771         (inf_child_fetch_inferior_registers)
10772         (inf_child_store_inferior_registers): Delete.
10773         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10774         methods of inf_child_target.
10775         (inf_child_target::supports_terminal_ours)
10776         (inf_child_target::terminal_init)
10777         (inf_child_target::terminal_inferior)
10778         (inf_child_target::terminal_ours_for_output)
10779         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10780         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10781         New.
10782         (inf_child_open, inf_child_disconnect, inf_child_close)
10783         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10784         (inf_child_post_startup_inferior, inf_child_can_run)
10785         (inf_child_pid_to_exec_file): Refactor as methods of
10786         inf_child_target.
10787         (inf_child_follow_fork): Delete.
10788         (inf_child_target::can_create_inferior)
10789         (inf_child_target::can_attach): New.
10790         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10791         (inf_child_target::has_stack, inf_child_target::has_registers)
10792         (inf_child_target::has_execution): New.
10793         (inf_child_fileio_open, inf_child_fileio_pwrite)
10794         (inf_child_fileio_pread, inf_child_fileio_fstat)
10795         (inf_child_fileio_close, inf_child_fileio_unlink)
10796         (inf_child_fileio_readlink, inf_child_use_agent)
10797         (inf_child_can_use_agent): Refactor as methods of
10798         inf_child_target.
10799         (return_zero, inf_child_target): Delete.
10800         (inf_child_target::inf_child_target): New.
10801         * inf-child.h: Include "target.h".
10802         (inf_child_target): Delete function prototype.
10803         (inf_child_target): New class.
10804         (inf_child_open_target, inf_child_mourn_inferior)
10805         (inf_child_maybe_unpush_target): Delete.
10806         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10807         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10808         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10809         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10810         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10811         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10812         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10813         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10814         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10815         methods of inf_ptrace_target.
10816         (inf_ptrace_target): Delete function.
10817         * inf-ptrace.h: Include "inf-child.h".
10818         (inf_ptrace_target): Delete function declaration.
10819         (inf_ptrace_target): New class.
10820         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10821         * linux-nat.c (linux_target): New.
10822         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10823         (linux_nat_target::~linux_nat_target): New.
10824         (linux_child_post_attach, linux_child_post_startup_inferior)
10825         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10826         (linux_child_remove_fork_catchpoint)
10827         (linux_child_insert_vfork_catchpoint)
10828         (linux_child_remove_vfork_catchpoint)
10829         (linux_child_insert_exec_catchpoint)
10830         (linux_child_remove_exec_catchpoint)
10831         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10832         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10833         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10834         (linux_nat_stopped_data_address)
10835         (linux_nat_stopped_by_sw_breakpoint)
10836         (linux_nat_supports_stopped_by_sw_breakpoint)
10837         (linux_nat_stopped_by_hw_breakpoint)
10838         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10839         (linux_nat_kill, linux_nat_mourn_inferior)
10840         (linux_nat_xfer_partial, linux_nat_thread_alive)
10841         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10842         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10843         (linux_child_static_tracepoint_markers_by_strid)
10844         (linux_nat_is_async_p, linux_nat_can_async_p)
10845         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10846         (linux_nat_supports_multi_process)
10847         (linux_nat_supports_disable_randomization, linux_nat_async)
10848         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10849         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10850         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10851         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10852         methods of linux_nat_target.
10853         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10854         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10855         parameter.
10856         (check_stopped_by_watchpoint): Adjust.
10857         (linux_xfer_partial): Delete.
10858         (linux_target_install_ops, linux_target, linux_nat_add_target):
10859         Delete.
10860         (linux_nat_target::linux_nat_target): New.
10861         * linux-nat.h: Include "inf-ptrace.h".
10862         (linux_nat_target): New.
10863         (linux_target, linux_target_install_ops, linux_nat_add_target):
10864         Delete function declarations.
10865         (linux_target): Declare global.
10866         * linux-thread-db.c (thread_db_target): New.
10867         (thread_db_target::thread_db_target): New.
10868         (thread_db_ops): Delete.
10869         (the_thread_db_target): New.
10870         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10871         (thread_db_update_thread_list, thread_db_pid_to_str)
10872         (thread_db_extra_thread_info)
10873         (thread_db_thread_handle_to_thread_info)
10874         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10875         (thread_db_resume): Refactor as methods of thread_db_target.
10876         (init_thread_db_ops): Delete.
10877         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10878         * x86-linux-nat.c: Don't include "linux-nat.h".
10879         (super_post_startup_inferior): Delete.
10880         (x86_linux_nat_target::~x86_linux_nat_target): New.
10881         (x86_linux_child_post_startup_inferior)
10882         (x86_linux_read_description, x86_linux_enable_btrace)
10883         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10884         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10885         methods of x86_linux_nat_target.
10886         (x86_linux_create_target): Delete.  Bits folded ...
10887         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10888         pointer.
10889         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10890         (x86_linux_nat_target): New class.
10891         (x86_linux_create_target): Delete.
10892         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10893         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10894         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10895         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10896         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10897         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10898         make extern.
10899         (x86_use_watchpoints): Delete.
10900         * x86-nat.h: Include "breakpoint.h" and "target.h".
10901         (x86_use_watchpoints): Delete.
10902         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10903         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10904         (x86_insert_watchpoint, x86_remove_watchpoint)
10905         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10906         (x86_stopped_by_hw_breakpoint): New declarations.
10907         (x86_nat_target): New template class.
10908
10909         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10910         (the_ppc_linux_nat_target): New.
10911         (ppc_linux_fetch_inferior_registers)
10912         (ppc_linux_can_use_hw_breakpoint)
10913         (ppc_linux_region_ok_for_hw_watchpoint)
10914         (ppc_linux_ranged_break_num_registers)
10915         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10916         (ppc_linux_insert_mask_watchpoint)
10917         (ppc_linux_remove_mask_watchpoint)
10918         (ppc_linux_can_accel_watchpoint_condition)
10919         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10920         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10921         (ppc_linux_watchpoint_addr_within_range)
10922         (ppc_linux_masked_watch_num_registers)
10923         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10924         (ppc_linux_read_description): Refactor as methods of
10925         ppc_linux_nat_target.
10926         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10927
10928         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10929         (procfs_target): New class.
10930         (the_procfs_target): New.
10931         (procfs_target): Delete function.
10932         (procfs_auxv_parse, procfs_attach, procfs_detach)
10933         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10934         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10935         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10936         (procfs_create_inferior, procfs_update_thread_list)
10937         (procfs_thread_alive, procfs_pid_to_str)
10938         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10939         (procfs_stopped_data_address, procfs_insert_watchpoint)
10940         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10941         (proc_find_memory_regions, procfs_info_proc)
10942         (procfs_make_note_section): Refactor as methods of procfs_target.
10943         (_initialize_procfs): Adjust.
10944         * sol-thread.c (sol_thread_target): New class.
10945         (sol_thread_ops): Now a sol_thread_target.
10946         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10947         (sol_thread_fetch_registers, sol_thread_store_registers)
10948         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10949         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10950         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10951         (init_sol_thread_ops): Delete.
10952         (_initialize_sol_thread): Adjust.  Remove references to
10953         init_sol_thread_ops and complete_target_initialization.
10954
10955         * windows-nat.c (windows_nat_target): New class.
10956         (windows_fetch_inferior_registers)
10957         (windows_store_inferior_registers, windows_resume, windows_wait)
10958         (windows_attach, windows_detach, windows_pid_to_exec_file)
10959         (windows_files_info, windows_create_inferior)
10960         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10961         (windows_close, windows_pid_to_str, windows_xfer_partial)
10962         (windows_get_tib_address, windows_get_ada_task_ptid)
10963         (windows_thread_name, windows_thread_alive): Refactor as
10964         windows_nat_target methods.
10965         (do_initial_windows_stuff): Adjust.
10966         (windows_target): Delete function.
10967         (_initialize_windows_nat): Adjust.
10968
10969         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10970         (darwin_mourn_inferior, darwin_kill_inferior)
10971         (darwin_create_inferior, darwin_attach, darwin_detach)
10972         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10973         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10974         (darwin_supports_multi_process): Refactor as darwin_nat_target
10975         methods.
10976         (darwin_resume_to, darwin_files_info): Delete.
10977         (_initialize_darwin_inferior): Rename to ...
10978         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10979         * darwin-nat.h: Include "inf-child.h".
10980         (darwin_nat_target): New class.
10981         (darwin_complete_target): Delete.
10982         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10983         (darwin_target): New.
10984         (i386_darwin_fetch_inferior_registers)
10985         (i386_darwin_store_inferior_registers): Refactor as methods of
10986         darwin_nat_target.
10987         (darwin_complete_target): Delete, with ...
10988         (_initialize_i386_darwin_nat): ... bits factored out here.
10989
10990         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10991         (the_alpha_linux_nat_target): New.
10992         (alpha_linux_register_u_offset): Refactor as
10993         alpha_linux_nat_target method.
10994         (_initialize_alpha_linux_nat): Adjust.
10995         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10996         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10997         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10998         methods of linux_nat_trad_target.
10999         (linux_trad_target): Delete.
11000         * linux-nat-trad.h (linux_trad_target): Delete function.
11001         (linux_nat_trad_target): New class.
11002         * mips-linux-nat.c (mips_linux_nat_target): New class.
11003         (super_fetch_registers, super_store_registers, super_close):
11004         Delete.
11005         (the_mips_linux_nat_target): New.
11006         (mips64_linux_regsets_fetch_registers)
11007         (mips64_linux_regsets_store_registers)
11008         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11009         (mips_linux_register_u_offset, mips_linux_read_description)
11010         (mips_linux_can_use_hw_breakpoint)
11011         (mips_linux_stopped_by_watchpoint)
11012         (mips_linux_stopped_data_address)
11013         (mips_linux_region_ok_for_hw_watchpoint)
11014         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11015         (mips_linux_close): Refactor as methods of mips_linux_nat.
11016         (_initialize_mips_linux_nat): Adjust to C++ification.
11017
11018         * aix-thread.c (aix_thread_target): New class.
11019         (aix_thread_ops): Now an aix_thread_target.
11020         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11021         (aix_thread_fetch_registers, aix_thread_store_registers)
11022         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11023         (aix_thread_thread_alive, aix_thread_pid_to_str)
11024         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11025         Refactor as methods of aix_thread_target.
11026         (init_aix_thread_ops): Delete.
11027         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11028         and complete_target_initialization.
11029         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11030         (rs6000_nat_target): New class.
11031         (the_rs6000_nat_target): New.
11032         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11033         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11034         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11035         (super_create_inferior): Delete.
11036         (_initialize_rs6000_nat): Adjust to C++ification.
11037
11038         * arm-linux-nat.c (arm_linux_nat_target): New class.
11039         (the_arm_linux_nat_target): New.
11040         (arm_linux_fetch_inferior_registers)
11041         (arm_linux_store_inferior_registers, arm_linux_read_description)
11042         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11043         (arm_linux_remove_hw_breakpoint)
11044         (arm_linux_region_ok_for_hw_watchpoint)
11045         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11046         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11047         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11048         arm_linux_nat_target.
11049         (_initialize_arm_linux_nat): Adjust to C++ification.
11050
11051         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11052         (the_aarch64_linux_nat_target): New.
11053         (aarch64_linux_fetch_inferior_registers)
11054         (aarch64_linux_store_inferior_registers)
11055         (aarch64_linux_child_post_startup_inferior)
11056         (aarch64_linux_read_description)
11057         (aarch64_linux_can_use_hw_breakpoint)
11058         (aarch64_linux_insert_hw_breakpoint)
11059         (aarch64_linux_remove_hw_breakpoint)
11060         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11061         (aarch64_linux_region_ok_for_hw_watchpoint)
11062         (aarch64_linux_stopped_data_address)
11063         (aarch64_linux_stopped_by_watchpoint)
11064         (aarch64_linux_watchpoint_addr_within_range)
11065         (aarch64_linux_can_do_single_step): Refactor as methods of
11066         aarch64_linux_nat_target.
11067         (super_post_startup_inferior): Delete.
11068         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11069
11070         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11071         (the_hppa_linux_nat_target): New.
11072         (hppa_linux_fetch_inferior_registers)
11073         (hppa_linux_store_inferior_registers): Refactor as methods of
11074         hppa_linux_nat_target.
11075         (_initialize_hppa_linux_nat): Adjust to C++ification.
11076
11077         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11078         (the_ia64_linux_nat_target): New.
11079         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11080         (ia64_linux_stopped_data_address)
11081         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11082         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11083         ia64_linux_nat_target methods.
11084         (super_xfer_partial): Delete.
11085         (_initialize_ia64_linux_nat): Adjust to C++ification.
11086
11087         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11088         (the_m32r_linux_nat_target): New.
11089         (m32r_linux_fetch_inferior_registers)
11090         (m32r_linux_store_inferior_registers): Refactor as
11091         m32r_linux_nat_target methods.
11092         (_initialize_m32r_linux_nat): Adjust to C++ification.
11093
11094         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11095         (the_m68k_linux_nat_target): New.
11096         (m68k_linux_fetch_inferior_registers)
11097         (m68k_linux_store_inferior_registers): Refactor as
11098         m68k_linux_nat_target methods.
11099         (_initialize_m68k_linux_nat): Adjust to C++ification.
11100
11101         * s390-linux-nat.c (s390_linux_nat_target): New class.
11102         (the_s390_linux_nat_target): New.
11103         (s390_linux_fetch_inferior_registers)
11104         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11105         (s390_insert_watchpoint, s390_remove_watchpoint)
11106         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11107         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11108         (s390_auxv_parse, s390_read_description): Refactor as methods of
11109         s390_linux_nat_target.
11110         (_initialize_s390_nat): Adjust to C++ification.
11111
11112         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11113         (the_sparc_linux_nat_target): New.
11114         (_initialize_sparc_linux_nat): Adjust to C++ification.
11115         * sparc-nat.c (sparc_fetch_inferior_registers)
11116         (sparc_store_inferior_registers): Remove target_ops parameter.
11117         * sparc-nat.h (sparc_fetch_inferior_registers)
11118         (sparc_store_inferior_registers): Remove target_ops parameter.
11119         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11120         (the_sparc64_linux_nat_target): New.
11121         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11122
11123         * spu-linux-nat.c (spu_linux_nat_target): New class.
11124         (the_spu_linux_nat_target): New.
11125         (spu_child_post_startup_inferior, spu_child_post_attach)
11126         (spu_child_wait, spu_fetch_inferior_registers)
11127         (spu_store_inferior_registers, spu_xfer_partial)
11128         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11129         methods.
11130         (_initialize_spu_nat): Adjust to C++ification.
11131
11132         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11133         (the_tilegx_linux_nat_target): New.
11134         (fetch_inferior_registers, store_inferior_registers):
11135         Refactor as methods.
11136         (_initialize_tile_linux_nat): Adjust to C++ification.
11137
11138         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11139         (the_xtensa_linux_nat_target): New.
11140         (xtensa_linux_fetch_inferior_registers)
11141         (xtensa_linux_store_inferior_registers): Refactor as
11142         xtensa_linux_nat_target methods.
11143         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11144
11145         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11146         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11147         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11148         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11149         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11150         (fbsd_stopped_by_sw_breakpoint)
11151         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11152         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11153         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11154         (fbsd_post_startup_inferior, fbsd_post_attach)
11155         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11156         (fbsd_set_syscall_catchpoint)
11157         (super_xfer_partial, super_resume, super_wait)
11158         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11159         (fbsd_handle_debug_trap): Remove target_ops parameter.
11160         (fbsd_nat_add_target): Delete.
11161         * fbsd-nat.h: Include "inf-ptrace.h".
11162         (fbsd_nat_add_target): Delete.
11163         (USE_SIGTRAP_SIGINFO): Define.
11164         (fbsd_nat_target): New class.
11165
11166         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11167         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11168         (amd64bsd_target): Delete.
11169         * amd64-bsd-nat.h: New file.
11170         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11171         "x86-bsd-nat.h".
11172         (amd64_fbsd_nat_target): New class.
11173         (the_amd64_fbsd_nat_target): New.
11174         (amd64fbsd_read_description): Refactor as method of
11175         amd64_fbsd_nat_target.
11176         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11177         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11178         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11179         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11180         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11181         (i386bsd_target): Delete.
11182         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11183         (i386bsd_fetch_inferior_registers)
11184         (i386bsd_store_inferior_registers): Declare.
11185         (i386_bsd_nat_target): New class.
11186         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11187         (the_i386_fbsd_nat_target): New.
11188         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11189         i386_fbsd_nat_target methods.
11190         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11191         (_initialize_i386fbsd_nat): Adjust to C++ification.
11192         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11193         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11194         (_initialize_x86_bsd_nat): Adjust to C++ification.
11195         * x86-bsd-nat.h: Include "x86-nat.h".
11196         (x86bsd_target): Delete declaration.
11197         (x86bsd_nat_target): New class.
11198
11199         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11200         (the_aarch64_fbsd_nat_target): New.
11201         (aarch64_fbsd_fetch_inferior_registers)
11202         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11203         aarch64_fbsd_nat_target.
11204         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11205         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11206         (the_alpha_bsd_nat_target): New.
11207         (alphabsd_fetch_inferior_registers)
11208         (alphabsd_store_inferior_registers): Refactor as
11209         alpha_bsd_nat_target methods.
11210         (_initialize_alphabsd_nat): Refactor as methods of
11211         alpha_bsd_nat_target.
11212         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11213         (the_amd64_nbsd_nat_target): New.
11214         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11215         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11216         (the_amd64_obsd_nat_target): New.
11217         (_initialize_amd64obsd_nat): Adjust to C++ification.
11218         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11219         (the_arm_fbsd_nat_target): New.
11220         (arm_fbsd_fetch_inferior_registers)
11221         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11222         (_initialize_arm_fbsd_nat): Refactor as methods of
11223         arm_fbsd_nat_target.
11224         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11225         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11226         (the_arm_netbsd_nat_target): New.
11227         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11228         arm_netbsd_nat_target.
11229         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11230         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11231         (the_hppa_nbsd_nat_target): New.
11232         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11233         hppa_nbsd_nat_target methods.
11234         (_initialize_hppanbsd_nat): Adjust to C++ification.
11235         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11236         (the_hppa_obsd_nat_target): New.
11237         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11238         methods of hppa_obsd_nat_target.
11239         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11240         add_target.
11241         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11242         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11243         add_target.
11244         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11245         (_initialize_i386obsd_nat): Use add_target.
11246         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11247         (the_m68k_bsd_nat_target): New.
11248         (m68kbsd_fetch_inferior_registers)
11249         (m68kbsd_store_inferior_registers): Refactor as methods of
11250         m68k_bsd_nat_target.
11251         (_initialize_m68kbsd_nat): Adjust to C++ification.
11252         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11253         (the_mips_fbsd_nat_target): New.
11254         (mips_fbsd_fetch_inferior_registers)
11255         (mips_fbsd_store_inferior_registers): Refactor as methods of
11256         mips_fbsd_nat_target.
11257         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11258         add_target.
11259         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11260         (the_mips_nbsd_nat_target): New.
11261         (mipsnbsd_fetch_inferior_registers)
11262         (mipsnbsd_store_inferior_registers): Refactor as methods of
11263         mips_nbsd_nat_target.
11264         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11265         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11266         (the_mips64_obsd_nat_target): New.
11267         (mips64obsd_fetch_inferior_registers)
11268         (mips64obsd_store_inferior_registers): Refactor as methods of
11269         mips64_obsd_nat_target.
11270         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11271         add_target.
11272         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11273         nbsd_nat_target.
11274         * nbsd-nat.h: Include "inf-ptrace.h".
11275         (nbsd_nat_target): New class.
11276         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11277         (obsd_wait): Refactor as methods of obsd_nat_target.
11278         (obsd_add_target): Delete.
11279         * obsd-nat.h: Include "inf-ptrace.h".
11280         (obsd_nat_target): New class.
11281         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11282         (the_ppc_fbsd_nat_target): New.
11283         (ppcfbsd_fetch_inferior_registers)
11284         (ppcfbsd_store_inferior_registers): Refactor as methods of
11285         ppc_fbsd_nat_target.
11286         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11287         add_target.
11288         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11289         (the_ppc_nbsd_nat_target): New.
11290         (ppcnbsd_fetch_inferior_registers)
11291         (ppcnbsd_store_inferior_registers): Refactor as methods of
11292         ppc_nbsd_nat_target.
11293         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11294         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11295         (the_ppc_obsd_nat_target): New.
11296         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11297         methods of ppc_obsd_nat_target.
11298         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11299         add_target.
11300         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11301         (the_sh_nbsd_nat_target): New.
11302         (shnbsd_fetch_inferior_registers)
11303         (shnbsd_store_inferior_registers): Refactor as methods of
11304         sh_nbsd_nat_target.
11305         (_initialize_shnbsd_nat): Adjust to C++ification.
11306         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11307         (inf_ptrace_xfer_partial): Delete.
11308         (sparc_xfer_partial, sparc_target): Delete.
11309         * sparc-nat.h (sparc_fetch_inferior_registers)
11310         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11311         (sparc_target): Delete function declaration.
11312         (sparc_target): New template class.
11313         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11314         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11315         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11316         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11317         add_target.
11318         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11319         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11320         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11321         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11322         add_target.
11323         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11324         (the_vax_bsd_nat_target): New.
11325         (vaxbsd_fetch_inferior_registers)
11326         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11327         methods.
11328         (_initialize_vaxbsd_nat): Adjust to C++ification.
11329
11330         * bsd-kvm.c (bsd_kvm_target): New class.
11331         (bsd_kvm_ops): Now a bsd_kvm_target.
11332         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11333         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11334         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11335         bsd_kvm_target.
11336         (bsd_kvm_return_one): Delete.
11337         (bsd_kvm_add_target): Adjust to C++ification.
11338
11339         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11340         (nto_procfs_target_procfs): New classes.
11341         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11342         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11343         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11344         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11345         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11346         (procfs_remove_hw_breakpoint, procfs_resume)
11347         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11348         (procfs_kill_inferior, procfs_store_registers)
11349         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11350         as methods of nto_procfs_target.
11351         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11352         (nto_native_ops): Delete.
11353         (procfs_open, procfs_native_open): Delete.
11354         (nto_native_ops): Now an nto_procfs_target_native.
11355         (init_procfs_targets): Adjust to C++ification.
11356         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11357         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11358         Refactor as methods of nto_procfs_target.
11359
11360         * go32-nat.c (go32_nat_target): New class.
11361         (the_go32_nat_target): New.
11362         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11363         (go32_store_registers, go32_xfer_partial, go32_files_info)
11364         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11365         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11366         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11367         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11368         (go32_target): Delete.
11369         (_initialize_go32_nat): Adjust to C++ification.
11370
11371         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11372         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11373         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11374         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11375         gnu_nat_target.
11376         (gnu_target): Delete.
11377         * gnu-nat.h (gnu_target): Delete.
11378         (gnu_nat_target): New class.
11379         * i386-gnu-nat.c (gnu_base_target): New.
11380         (i386_gnu_nat_target): New class.
11381         (the_i386_gnu_nat_target): New.
11382         (_initialize_i386gnu_nat): Adjust to C++ification.
11383
11384 2018-05-02  Pedro Alves  <palves@redhat.com>
11385
11386         * bfd-target.c (target_bfd_xclose): Rename to ...
11387         (target_bfd_close): ... this.
11388         (target_bfd_reopen): Adjust.
11389         * target.c (target_close): Remove references to to_xclose.
11390         * target.h (target_ops::to_xclose): Delete.
11391         (target_ops::to_close): Update comments.
11392
11393 2018-05-02  Pedro Alves  <palves@redhat.com>
11394
11395         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11396         "linux-nat.h".
11397         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11398         * inf-ptrace.c (inf_ptrace_register_u_offset)
11399         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11400         (inf_ptrace_store_register, inf_ptrace_store_registers)
11401         (inf_ptrace_trad_target): Move to ...
11402         * linux-nat-trad.c: ... this new file.
11403         * linux-nat-trad.h: New file.
11404         * linux-nat.c (linux_target_install_ops): Make extern.
11405         (linux_trad_target): Delete.
11406         * linux-nat.h (linux_trad_target): Delete declaration.
11407         (linux_target_install_ops): Declare.
11408         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11409         "linux-nat.h".
11410
11411 2018-05-02  Pedro Alves  <palves@redhat.com>
11412
11413         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11414         procfs_target/add_target here.
11415         * procfs.c (procfs_target): Make static.
11416         (_initialize_procfs): Call add_target here.
11417         * procfs.h (struct target_ops): Remove forward declaration.
11418         (procfs_target): Remove declaration.
11419         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11420
11421 2018-05-02  Pedro Alves  <palves@redhat.com>
11422
11423         * procfs.c (procfs_stopped_by_watchpoint)
11424         (procfs_insert_watchpoint, procfs_remove_watchpoint)
11425         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11426         Forward declare.
11427         (procfs_use_watchpoints): Delete, move contents...
11428         (procfs_target): ... here.
11429         * procfs.h (procfs_use_watchpoints): Delete declaration.
11430         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11431         procfs_use_watchpoints.
11432         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
11433         procfs_use_watchpoints.
11434
11435 2018-05-02  Tom Tromey  <tom@tromey.com>
11436
11437         PR python/20084:
11438         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
11439         and var_zuinteger_unlimited.
11440         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
11441         and PARAM_ZUINTEGER_UNLIMITED.
11442         (set_parameter_value): Handle var_zuinteger and
11443         var_zuinteger_unlimited.
11444         (add_setshow_generic): Likewise.
11445         (parmpy_init): Likewise.
11446
11447 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
11448
11449         PR rust/23124
11450         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
11451         pointer is not null before dereferencing it.
11452
11453 2018-04-30  Tom Tromey  <tom@tromey.com>
11454
11455         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
11456         is_mi_like_p.
11457
11458 2018-04-30  Tom Tromey  <tom@tromey.com>
11459
11460         * breakpoint.c (mention): Remove use of is_mi_like_p.
11461         (print_mention_ranged_breakpoint): Likewise.
11462         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
11463         of is_mi_like_p.
11464
11465 2018-04-30  Tom Tromey  <tom@tromey.com>
11466
11467         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
11468
11469 2018-04-30  Tom Tromey  <tom@tromey.com>
11470
11471         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
11472         (info_spu_event_command): Remove some uses of is_mi_like_p.
11473
11474 2018-04-30  Tom Tromey  <tom@tromey.com>
11475
11476         * python/py-framefilter.c (py_print_single_arg)
11477         (enumerate_locals, py_print_args, py_print_frame): Remove some
11478         uses of is_mi_like_p.
11479
11480 2018-04-30  Tom Tromey  <tom@tromey.com>
11481
11482         * ui-out.c: Update.
11483         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
11484         * ui-out.h (ui_out::is_mi_like_p): Now const.
11485         (ui_out::do_is_mi_like_p): Now const.
11486         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
11487
11488 2018-04-30  Tom Tromey  <tom@tromey.com>
11489
11490         * varobj.c (varobj_set_visualizer): Use new_reference.
11491         * python/python.c (gdbpy_decode_line): Use new_reference.
11492         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
11493         new_reference.
11494
11495 2018-04-30  Tom Tromey  <tom@tromey.com>
11496
11497         * varobj.c (install_new_value): Use new_reference.
11498         * value.h (value_incref): Return void.  Swap intro comment with
11499         value_decref.
11500         * value.c (set_value_parent): Use new_reference.
11501         (value_incref): Return void.  Update intro comment.
11502         (release_value): Use new_reference.
11503         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
11504
11505 2018-04-30  Tom Tromey  <tom@tromey.com>
11506
11507         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
11508         * gdb_bfd.h (new_bfd_ref): Remove.
11509         (gdb_bfd_open): Update comment.
11510         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11511         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
11512         (gdb_bfd_fdopenr): Use new_reference.
11513         * exec.c (exec_file_attach): Use new_reference.
11514
11515 2018-04-30  Tom Tromey  <tom@tromey.com>
11516
11517         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
11518         method.
11519
11520 2018-04-30  Tom Tromey  <tom@tromey.com>
11521
11522         * jit.c (jit_read_code_entry): Use type_align.
11523         * i386-tdep.c (i386_gdbarch_init): Don't call
11524         set_gdbarch_long_long_align_bit.
11525         * gdbarch.sh: Remove long_long_align_bit.
11526         * gdbarch.c, gdbarch.h: Rebuild.
11527         * arc-tdep.c (arc_type_align): New function.
11528         (arc_gdbarch_init): Use arc_type_align.  Don't call
11529         set_gdbarch_long_long_align_bit.
11530
11531 2018-04-30  Tom Tromey  <tom@tromey.com>
11532
11533         * rust-lang.c (rust_type_alignment): Remove.
11534         (rust_composite_type): Use type_align.
11535
11536 2018-04-30  Tom Tromey  <tom@tromey.com>
11537
11538         * NEWS: Mention Type.align.
11539         * python/py-type.c (typy_get_alignof): New function.
11540         (type_object_getset): Add "alignof".
11541
11542 2018-04-30  Tom Tromey  <tom@tromey.com>
11543
11544         PR exp/17095:
11545         * NEWS: Update.
11546         * std-operator.def (UNOP_ALIGNOF): New operator.
11547         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
11548         New.
11549         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
11550         * c-lang.c (c_op_print_tab): Add alignof.
11551         * c-exp.y (ALIGNOF): New token.
11552         (exp): Add "ALIGNOF" production.
11553         (ident_tokens): Add _Alignof and alignof.
11554
11555 2018-04-30  Tom Tromey  <tom@tromey.com>
11556
11557         * i386-tdep.c (i386_type_align): New function.
11558         (i386_gdbarch_init): Update.
11559         * gdbarch.sh (type_align): New method.
11560         * gdbarch.c, gdbarch.h: Rebuild.
11561         * arch-utils.h (default_type_align): Declare.
11562         * arch-utils.c (default_type_align): New function.
11563         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
11564         (struct type) <align_log2>: New field.
11565         <instance_flags>: Now a bitfield.
11566         (TYPE_RAW_ALIGN): New macro.
11567         (type_align, type_raw_align, set_type_align): Declare.
11568         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
11569         functions.
11570         * dwarf2read.c (quirk_rust_enum): Set type alignment.
11571         (get_alignment, maybe_set_alignment): New functions.
11572         (read_structure_type, read_enumeration_type, read_array_type)
11573         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
11574         (read_subrange_type, read_base_type): Set type alignment.
11575
11576 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
11577
11578         * dwarf2read.c (read_index_from_section): Use bool.
11579
11580 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
11581
11582         PR gdb/22950
11583         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
11584         with #ifdef.
11585
11586 2018-04-29  John Reiser  <jreiser@BitWagon.com>
11587
11588         PR build/22873
11589         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
11590         last step, and do it atomically.
11591
11592 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
11593
11594         * compile/compile-c-types.c (convert_int, convert_float):
11595         Update for C FE v1.
11596
11597 2018-04-27  Tom Tromey  <tom@tromey.com>
11598
11599         PR rust/22545:
11600         * rust-lang.c (rust_inclusive_range_type_p): New function.
11601         (rust_range): Handle inclusive ranges.
11602         (rust_compute_range): Likewise.
11603         * rust-exp.y (struct rust_op) <inclusive>: New field.
11604         (DOTDOTEQ): New constant.
11605         (range_expr): Add "..=" productions.
11606         (operator_tokens): Add "..=" token.
11607         (ast_range): Add "inclusive" parameter.
11608         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
11609         ranges.
11610         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
11611         bounds values.
11612         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
11613         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
11614         Update comments.
11615         * expprint.c (print_subexp_standard): Handle new bounds values.
11616         (dump_subexp_body_standard): Likewise.
11617
11618 2018-04-27  Tom Tromey  <tom@tromey.com>
11619
11620         * configure: Rebuild.
11621         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
11622         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
11623         "OVERRIDE".
11624         (class symbol_needs_eval_context): Likewise.
11625         * dwarf2read.c (mock_mapped_index::symbol_name_count)
11626         (mock_mapped_index::symbol_name_at): Use "override".  Remove
11627         "virtual".
11628         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
11629         "override".
11630         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
11631         * aarch64-tdep.c (instruction_reader::read): Use "override".
11632         (instruction_reader_test::read): Likewise.
11633         * arm-tdep.c (instruction_reader::read): Use "override".
11634         (instruction_reader_thumb::read): Likewise.
11635
11636 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
11637
11638         PR remote/9665
11639         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
11640         instead of remote_send.
11641         (remote_send): Remove.
11642
11643 2018-04-26  Pedro Alves  <palves@redhat.com>
11644
11645         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
11646         find_function_start_sal instead of find_pc_line.
11647
11648 2018-04-26  Pedro Alves  <palves@redhat.com>
11649
11650         * breakpoint.c (set_breakpoint_location_function): Handle
11651         mst_data_gnu_ifunc.
11652         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
11653         * elfread.c (elf_symtab_read): Give data symbols with
11654         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
11655         (elf_rel_plt_read): Update comment.
11656         * linespec.c (convert_linespec_to_sals): Handle
11657         mst_data_gnu_ifunc.
11658         (minsym_found): Handle mst_data_gnu_ifunc.
11659         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
11660         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
11661         * parse.c (find_minsym_type_and_address): Handle
11662         mst_data_gnu_ifunc.
11663         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
11664         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
11665         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
11666         comment.
11667         <mst_data_gnu_ifunc>: New enumerator.
11668
11669 2018-04-26  Pedro Alves  <palves@redhat.com>
11670
11671         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
11672         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
11673         'want_trampoline' parameter by a lookup_msym_prefer parameter.
11674         Handle it.
11675         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
11676         (lookup_minimal_symbol_by_pc): Adjust.
11677         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
11678         (lookup_solib_trampoline_symbol_by_pc): Adjust.
11679         * minsyms.h (lookup_msym_prefer): New enum.
11680         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11681         parameter by a lookup_msym_prefer parameter.
11682
11683 2018-04-26  Pedro Alves  <palves@redhat.com>
11684
11685         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
11686         ends in "@plt" instead of looking at the symbol's section.
11687
11688 2018-04-26  Pedro Alves  <palves@redhat.com>
11689
11690         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
11691         all references.
11692         (find_pc_partial_function_gnu_ifunc): Rename to ...
11693         (find_pc_partial_function): ... this, and remove references to
11694         'is_gnu_ifunc_p'.
11695         (find_pc_partial_function): Delete old implementation.
11696         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
11697
11698 2018-04-26  Pedro Alves  <palves@redhat.com>
11699
11700         * linespec.c (struct bound_minimal_symbol_search_key): New.
11701         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
11702         skip first line if we found a GNU ifunc minimal symbol by name.
11703         (compare_msymbols): Change parameters to work with a destructured
11704         lhs minsym.
11705         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11706         functions.
11707
11708 2018-04-26  Pedro Alves  <palves@redhat.com>
11709
11710         * breakpoint.c (set_breakpoint_location_function): Don't resolve
11711         ifunc targets here.  Instead, if we have an ifunc minsym, use its
11712         address/name.
11713         (add_location_to_breakpoint): Store the minsym and the objfile in
11714         the breakpoint location.
11715         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11716         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11717         Record the minsym in the sal.
11718         * symtab.h (symtab_and_line) <msymbol>: New field.
11719
11720 2018-04-26  Pedro Alves  <palves@redhat.com>
11721
11722         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11723         unless we actually resolved the ifunc.
11724
11725 2018-04-26  Pedro Alves  <palves@redhat.com>
11726
11727         * c-exp.y (variable production): Prefer ifunc minsyms over
11728         regular function symbols.
11729         * symtab.c (find_gnu_ifunc): New function.
11730         * minsyms.h (lookup_msym_prefer): New enum.
11731         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11732         parameter by a lookup_msym_prefer parameter.
11733         * symtab.h (find_gnu_ifunc): New declaration.
11734
11735 2018-04-26  Pedro Alves  <palves@redhat.com>
11736
11737         * blockframe.c (find_gnu_ifunc_target_type): New function.
11738         (find_function_type): New.
11739         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11740         return a value with a memory address.
11741         (eval_call): For calls to GNU ifunc functions, try to find the
11742         type of the target function from the type that the resolver
11743         returns.
11744         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11745         symbols.
11746         * infcall.c (find_function_return_type): Delete.
11747         (find_function_addr): Add 'function_type' parameter.  For calls to
11748         GNU ifunc functions, try to find the type of the target function
11749         from the type that the resolver returns, and return it via
11750         FUNCTION_TYPE.
11751         (call_function_by_hand_dummy): Adjust to use the function type
11752         returned by find_function_addr.
11753         (find_function_addr): Add 'function_type' parameter and move
11754         description here.
11755         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11756         declarations.
11757
11758 2018-04-26  Pedro Alves  <palves@redhat.com>
11759
11760         * c-exp.y (variable production): Skip finding an alias for ifunc
11761         symbols.
11762
11763 2018-04-26  Pedro Alves  <palves@redhat.com>
11764
11765         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11766
11767 2018-04-25  Pedro Alves  <palves@redhat.com>
11768
11769         * infcmd.c (kill_command): Print the pid as string, not the whole
11770         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11771         message.
11772         * remote.c (remote_detach_1): Print the pid as string, not the
11773         whole thread's ptid.
11774
11775 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11776             Sergio Durigan Junior  <sergiodj@redhat.com>
11777             Pedro Alves  <palves@redhat.com>
11778
11779         * infcmd.c (kill_command): Print message when inferior has
11780         been killed.
11781         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11782         '1'.
11783         (add_inferior): Improve message printed when
11784         'print_inferior_events' is on.
11785         (exit_inferior): Remove message printed when
11786         'print_inferior_events' is on.
11787         (detach_inferior): Improve message printed when
11788         'print_inferior_events' is on.
11789         (initialize_inferiors): Use 'add_inferior_silent' to set
11790         'current_inferior_'.
11791         * inferior.h (print_inferior_events): Declare here as
11792         'extern'.
11793         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11794         '[Detaching...]' messages when 'print_inferior_events' is on.
11795         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11796         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11797         'Detaching after fork from child...', replace it by '... from
11798         parent...'.
11799         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11800         prefix/suffix when printing 'Detaching...' messages.  Print
11801         them when 'print_inferior_events' is on.
11802         * remote.c (remote_detach_1): Print message when detaching
11803         from inferior and '!is_fork_parent'.
11804
11805 2018-04-24  Tom Tromey  <tom@tromey.com>
11806
11807         * cli-out.h: Reindent.
11808
11809 2018-04-24  Tom Tromey  <tom@tromey.com>
11810
11811         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11812         (cli_ui_out::do_field_string): Use fputs_filtered.
11813         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11814
11815 2018-04-23  Tom Tromey  <tom@tromey.com>
11816
11817         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11818         gdb::unique_xmalloc_ptr.
11819
11820 2018-04-23  Tom Tromey  <tom@tromey.com>
11821
11822         * configure: Rebuild.
11823
11824 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
11825
11826         PR gdb/23095
11827         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11828         prepare_for_testing.  Set normal_bp to r_debug_state if target
11829         is bsd.
11830
11831 2018-04-21  Pedro Alves  <palves@redhat.com>
11832             Rajendra SY  <rajendra.sy@gmail.com>
11833
11834         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11835         * remote.c (extended_remote_attach): In all-stop mode, mark the
11836         thread as executing.
11837
11838 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11839
11840         * thread.c (thread_apply_all_command): Fix comment.
11841         (thread_command): Fix comment.
11842
11843 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11844
11845         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11846         parameter.
11847         * features/aarch64-core.c (create_feature_aarch64_core):
11848         Regenerate.
11849         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11850         Likewise.
11851         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11852         Likewise.
11853         * features/i386/32bit-avx512.c
11854         (create_feature_i386_32bit_avx512): Likewise.
11855         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11856         Likewise.
11857         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11858         Likewise.
11859         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11860         Likewise.
11861         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11862         Likewise.
11863         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11864         Likewise.
11865         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11866         Likewise.
11867         * features/i386/64bit-avx512.c
11868         (create_feature_i386_64bit_avx512): Likewise.
11869         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11870         Likewise.
11871         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11872         Likewise.
11873         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11874         Likewise.
11875         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11876         Likewise.
11877         * features/i386/64bit-segments.c
11878         (create_feature_i386_64bit_segments): Likewise.
11879         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11880         Likewise.
11881         * features/i386/x32-core.c
11882         (create_feature_i386_x32_core): Likewise.
11883         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11884         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11885         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11886         * target-descriptions.c: In generated code, don't pass xml
11887         filename.
11888
11889 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11890
11891         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11892         (print_xml_feature::visit_post): Likewise.
11893         (print_xml_feature::visit): Likewise.
11894         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11895         (print_xml_feature): Add new class.
11896         * regformats/regdat.sh: Null xmltarget on feature targets.
11897         * target-descriptions.c (struct target_desc): Add xmltarget.
11898         (maintenance_check_tdesc_xml_convert): Add unittest function.
11899         (tdesc_get_features_xml): Add function to get xml.
11900         (maintenance_check_xml_descriptions): Test xml generation.
11901         * xml-tdesc.c (string_read_description_xml): Add function.
11902         * xml-tdesc.h (string_read_description_xml): Add declaration.
11903
11904 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11905
11906         * features/Makefile: Add feature marker to targets with new style
11907         target descriptions.
11908         * regformats/aarch64.dat: Regenerate.
11909         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11910         * regformats/i386/amd64-avx-linux.dat: Likewise.
11911         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11912         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11913         * regformats/i386/amd64-linux.dat: Likewise.
11914         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11915         * regformats/i386/amd64.dat: Likewise.
11916         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11917         * regformats/i386/i386-avx-linux.dat: Likewise.
11918         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11919         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11920         * regformats/i386/i386-linux.dat: Likewise.
11921         * regformats/i386/i386-mmx-linux.dat: Likewise.
11922         * regformats/i386/i386-mpx-linux.dat: Likewise.
11923         * regformats/i386/i386.dat: Likewise.
11924         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11925         * regformats/i386/x32-avx-linux.dat: Likewise.
11926         * regformats/i386/x32-linux.dat: Likewise.
11927         * regformats/tic6x-c62x-linux.dat: Likewise.
11928         * regformats/tic6x-c64x-linux.dat: Likewise.
11929         * regformats/tic6x-c64xp-linux.dat: Likewise.
11930         * regformats/regdat.sh: Parse feature marker.
11931
11932 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11933
11934         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11935         (tdesc_osabi_name): Likewise.
11936         * target-descriptions.c (tdesc_architecture_name): Add new
11937         function.
11938         (tdesc_osabi_name): Likewise.
11939
11940 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11941
11942         * common/tdesc.c (tdesc_predefined_type): Move to here.
11943         (tdesc_named_type): Likewise.
11944         (tdesc_create_vector): Likewise.
11945         (tdesc_create_struct): Likewise.
11946         (tdesc_set_struct_size): Likewise.
11947         (tdesc_create_union): Likewise.
11948         (tdesc_create_flags): Likewise.
11949         (tdesc_create_enum): Likewise.
11950         (tdesc_add_field): Likewise.
11951         (tdesc_add_typed_bitfield): Likewise.
11952         (tdesc_add_bitfield): Likewise.
11953         (tdesc_add_flag): Likewise.
11954         (tdesc_add_enum_value): Likewise.
11955         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11956         (struct tdesc_type_vector): Likewise.
11957         (struct tdesc_type_field): Likewise.
11958         (struct tdesc_type_with_fields): Likewise.
11959         (tdesc_create_enum): Add declaration.
11960         (tdesc_add_typed_bitfield): Likewise.
11961         (tdesc_add_enum_value): Likewise.
11962         * target-descriptions.c (tdesc_type_field): Move from here.
11963         (tdesc_type_builtin): Likewise.
11964         (tdesc_type_vector): Likewise.
11965         (tdesc_type_with_fields): Likewise.
11966         (tdesc_predefined_types): Likewise.
11967         (tdesc_named_type): Likewise.
11968         (tdesc_create_vector): Likewise.
11969         (tdesc_create_struct): Likewise.
11970         (tdesc_set_struct_size): Likewise.
11971         (tdesc_create_union): Likewise.
11972         (tdesc_create_flags): Likewise.
11973         (tdesc_create_enum): Likewise.
11974         (tdesc_add_field): Likewise.
11975         (tdesc_add_typed_bitfield): Likewise.
11976         (tdesc_add_bitfield): Likewise.
11977         (tdesc_add_flag): Likewise.
11978         (tdesc_add_enum_value): Likewise.
11979         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11980         (tdesc_add_typed_bitfield): Likewise.
11981         (tdesc_add_enum_value): Likewise.
11982
11983 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11984
11985         * common/tdesc.c (tdesc_feature::accept): Move to here.
11986         (tdesc_feature::operator==): Likewise.
11987         (tdesc_create_reg): Likewise.
11988         * common/tdesc.h (tdesc_type_kind): Likewise.
11989         (struct tdesc_type): Likewise.
11990         (struct tdesc_feature): Likewise.
11991         * regformats/regdat.sh: Create a feature.
11992         * target-descriptions.c (tdesc_type_kind): Move from here.
11993         (tdesc_type): Likewise.
11994         (tdesc_type_up): Likewise.
11995         (tdesc_feature): Likewise.
11996         (tdesc_create_reg): Likewise.
11997
11998 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11999
12000         * Makefile.in: Add arch/tdesc.c
12001         * common/tdesc.c: New file.
12002         * common/tdesc.h (tdesc_element_visitor): Move to here.
12003         (tdesc_element): Likewise.
12004         (tdesc_reg): Likewise.
12005         (tdesc_reg_up): Likewise.
12006         * regformats/regdef.h (reg): Add offset to constructors.
12007         * target-descriptions.c (tdesc_element_visitor): Move from here.
12008         (tdesc_element): Likewise.
12009         (tdesc_reg): Likewise.
12010         (tdesc_reg_up): Likewise.
12011
12012 2018-04-17  Tom Tromey  <tom@tromey.com>
12013
12014         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12015         discriminant field.
12016
12017 2018-04-17  Tom Tromey  <tom@tromey.com>
12018
12019         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12020
12021 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12022
12023         * symtab.c (print_symbol_info): Skip printing filename and line
12024         number when `last' is NULL.
12025         (symtab_symbol_info): Use empty string instead of NULL for first
12026         invocation of print_symbol_info.
12027         (rbreak_command): Pass NULL to `last' parameter of
12028         print_symbol_info.
12029
12030 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12031
12032         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12033         instead of nullptr.
12034
12035 2018-04-16  Pedro Alves  <palves@redhat.com>
12036
12037         * MAINTAINERS (sh): Remove.
12038         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12039         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12040         (ALLDEPFILES): Remove sh64-tdep.c.
12041         * NEWS: Mentions that support for SH-5/SH64 is removed.
12042         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12043         (sh*-*-openbsd*): Ditto.
12044         (sh64-*-elf*): Remove.
12045         (sh*): Remove.
12046         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12047         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12048         * sh-tdep.c: No longer include "sh64-tdep.h".
12049         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12050         * sh64-tdep.c, sh64-tdep.h: Remove files.
12051
12052 2018-04-16  Pedro Alves  <palves@redhat.com>
12053
12054         * MAINTAINERS: Remove m88k.
12055         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12056         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12057         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12058         * NEWS: Mention that support for m88k was removed.
12059         * configure.host (m88*-*-*): Remove support.
12060         * configure.nat (m88k-*-*): Remove support.
12061         * configure.tgt (m88*-*-openbsd*): Remove.
12062         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12063
12064 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12065
12066         * configure.tgt (x86_tobjs): New variable.
12067         (amd64_tobjs, i386_tobjs): Use it.
12068
12069 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12070
12071         * symtab.c (print_symbol_info): Precede the symbol definition by
12072         the line number when available.
12073         * NEWS: Advertise this enhancement.
12074
12075 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12076
12077         * NEWS (New options): announce set/show record btrace cpu.
12078         * btrace.c: Include record-btrace.h.
12079         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12080         the vendor is unknown.
12081         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12082         Maybe overwrite the btrace configuration's cpu.
12083         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12084         (btrace_fetch): Add cpu parameter.  Update callers.
12085         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12086         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12087         errata workarounds if the vendor is unknown.
12088         * python/py-record-btrace.c: Include record-btrace.h.
12089         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12090         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12091         * record-btrace.c (record_btrace_cpu_state_kind): New.
12092         (record_btrace_cpu): New.
12093         (set_record_btrace_cpu_cmdlist): New.
12094         (record_btrace_get_cpu): New.
12095         (require_btrace_thread, record_btrace_info)
12096         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12097         (cmd_set_record_btrace_cpu_none): New.
12098         (cmd_set_record_btrace_cpu_auto): New.
12099         (cmd_set_record_btrace_cpu): New.
12100         (cmd_show_record_btrace_cpu): New.
12101         (_initialize_record_btrace): Initialize set/show record btrace cpu
12102         commands.
12103         * record-btrace.h (record_btrace_get_cpu): New.
12104
12105 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12106
12107         * record.c (set_record_command): Fix typo in message.
12108
12109 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12110
12111         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12112
12113 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12114
12115         * infrun.c (process_event_stop_test): Call
12116         gdbarch_in_indirect_branch_thunk.
12117         * gdbarch.sh (in_indirect_branch_thunk): New.
12118         * gdbarch.c: Regenerated.
12119         * gdbarch.h: Regenerated.
12120         * x86-tdep.h: New.
12121         * x86-tdep.c: New.
12122         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12123         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12124         (ALLDEPFILES): Add x86-tdep.c.
12125         * arch-utils.h (default_in_indirect_branch_thunk): New.
12126         * arch-utils.c (default_in_indirect_branch_thunk): New.
12127         * i386-tdep: Include x86-tdep.h.
12128         (i386_in_indirect_branch_thunk): New.
12129         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12130         function.
12131         * amd64-tdep: Include x86-tdep.h.
12132         (amd64_in_indirect_branch_thunk): New.
12133         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12134
12135 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12136
12137         PR gdb/23053
12138         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12139         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12140         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12141         regression.
12142
12143 2018-04-12  Tom Tromey  <tom@tromey.com>
12144
12145         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12146         (rust_evaluate_subexp): Likewise.
12147
12148 2018-04-12  Pedro Alves  <palves@redhat.com>
12149
12150         * procfs.c (procfs_detach): Make forward declaration's prototype
12151         match definition's protototype.
12152         (proc_get_LDT_entry): Remove stale do_cleanups call.
12153
12154 2018-04-12  Pedro Alves  <palves@redhat.com>
12155
12156         * target.h (target_ops::to_has_exited): Delete.
12157         (target_has_exited): Delete.
12158         * target-delegates.c: Regenerate.
12159
12160 2018-04-11  Pedro Alves  <palves@redhat.com>
12161
12162         * target.c (fileio_fh_t::t): Add comment.
12163         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12164         (target_fileio_close): Handle a NULL target.
12165         (invalidate_fileio_fh): New.
12166         (target_close): Call it.
12167         * remote.c (remote_hostio_send_command): No longer check whether
12168         remote_desc is open.
12169
12170 2018-04-11  Pedro Alves  <palves@redhat.com>
12171
12172         * target.c (fileio_fh_t): Make it a named struct instead of a
12173         typedef.
12174         (fileio_fh_t::is_closed): New method.
12175         (DEF_VEC_O (fileio_fh_t)): Remove.
12176         (fileio_fhandles): Now a std::vector.
12177         (is_closed_fileio_fh): Delete.
12178         (acquire_fileio_fd): Adjust.  Rename parameters.
12179         (release_fileio_fd): Adjust.
12180         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12181         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12182         (target_fileio_close): Adjust.
12183
12184 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12185
12186         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12187         index.
12188
12189 2018-04-10  Pedro Alves  <palves@redhat.com>
12190
12191         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12192         (scoped_finish_thread_state): New class.
12193         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12194         cleanup.
12195         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12196         (fetch_inferior_event, normal_stop): Likewise.
12197         * thread.c (finish_thread_state_cleanup): Delete.
12198
12199 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12200             Pedro Alves  <palves@redhat.com>
12201
12202         * value.c: Include "selftest.h" and "common/array-view.h".
12203         (struct range) <operator ==>: New.
12204         (test_ranges_contain): New.
12205         (check_ranges_vector): New.
12206         (test_insert_into_bit_range_vector): New.
12207         (_initialize_values): Register selftests.
12208         * common/array-view.h (operator==, operator!=): New.
12209
12210 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12211
12212         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12213         an iterator.
12214         * inline-frame.c: Include <algorithm>.
12215         (struct inline_state): Add constructor.
12216         (inline_state_s): Remove.
12217         (DEF_VEC_O(inline_state_s)): Remove.
12218         (inline_states): Change type to std::vector.
12219         (find_inline_frame_state): Adjust to std::vector.
12220         (allocate_inline_frame_state): Remove.
12221         (clear_inline_frame_state): Adjust to std::vector.
12222         (skip_inline_frames): Adjust to std::vector.
12223
12224 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12225
12226         * tracepoint.h (struct trace_state_variable): Add constructor.
12227         <name>: Change type to std::string.
12228         * tracepoint.c (tsv_s): Remove.
12229         (DEF_VEC_O(tsv_s)): Remove.
12230         (tvariables): Change to std::vector.
12231         (create_trace_state_variable): Adjust to std::vector.
12232         (find_trace_state_variable): Likewise.
12233         (find_trace_state_variable_by_number): Likewise.
12234         (delete_trace_state_variable): Likewise.
12235         (trace_variable_command): Adjust to std::string.
12236         (delete_trace_variable_command): Likewise.
12237         (tvariables_info_1): Adjust to std::vector.
12238         (save_trace_state_variables): Likewise.
12239         (start_tracing): Likewise.
12240         (merge_uploaded_trace_state_variables): Adjust to std::vector
12241         and std::string.
12242         * target.h (struct target_ops)
12243         <to_download_trace_state_variable>: Pass reference to
12244         trace_state_variable.
12245         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12246         * target-delegates.c: Re-generate.
12247         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12248         (mi_tsv_deleted): Likewise.
12249         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12250         * remote.c (remote_download_trace_state_variable): Change
12251         pointer to reference and adjust.
12252         * make-target-delegates (parse_argtypes): Handle references.
12253         (write_function_header): Likewise.
12254         (munge_type): Likewise.
12255
12256 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12257
12258         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12259         string_view-selftests.c.
12260         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12261         testsuite.
12262         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12263         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12264         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12265         * unittests/basic_string_view/element_access/char/1.cc:
12266         Likewise.
12267         * unittests/basic_string_view/element_access/char/empty.cc:
12268         Likewise.
12269         * unittests/basic_string_view/element_access/char/front_back.cc:
12270         Likewise.
12271         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12272         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12273         Likewise.
12274         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12275         Likewise.
12276         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12277         Likewise.
12278         * unittests/basic_string_view/operations/compare/char/1.cc:
12279         Likewise.
12280         * unittests/basic_string_view/operations/compare/char/13650.cc:
12281         Likewise.
12282         * unittests/basic_string_view/operations/copy/char/1.cc:
12283         Likewise.
12284         * unittests/basic_string_view/operations/data/char/1.cc:
12285         Likewise.
12286         * unittests/basic_string_view/operations/find/char/1.cc:
12287         Likewise.
12288         * unittests/basic_string_view/operations/find/char/2.cc:
12289         Likewise.
12290         * unittests/basic_string_view/operations/find/char/3.cc:
12291         Likewise.
12292         * unittests/basic_string_view/operations/find/char/4.cc:
12293         Likewise.
12294         * unittests/basic_string_view/operations/rfind/char/1.cc:
12295         Likewise.
12296         * unittests/basic_string_view/operations/rfind/char/2.cc:
12297         Likewise.
12298         * unittests/basic_string_view/operations/rfind/char/3.cc:
12299         Likewise.
12300         * unittests/basic_string_view/operations/substr/char/1.cc:
12301         Likewise.
12302         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12303         * unittests/string_view-selftests.c: New file.
12304
12305 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12306
12307         * unittests/basic_string_view/capacity/1.cc: New file.
12308         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12309         * unittests/basic_string_view/cons/char/1.cc: New file.
12310         * unittests/basic_string_view/cons/char/2.cc: New file.
12311         * unittests/basic_string_view/cons/char/3.cc: New file.
12312         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12313         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12314         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12315         * unittests/basic_string_view/element_access/char/1.cc: New file.
12316         * unittests/basic_string_view/element_access/char/2.cc: New file.
12317         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12318         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12319         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12320         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12321         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12322         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12323         * unittests/basic_string_view/include.cc: New file.
12324         * unittests/basic_string_view/inserters/char/1.cc: New file.
12325         * unittests/basic_string_view/inserters/char/2.cc: New file.
12326         * unittests/basic_string_view/inserters/char/3.cc: New file.
12327         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12328         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12329         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12330         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12331         * unittests/basic_string_view/literals/types.cc: New file.
12332         * unittests/basic_string_view/literals/values.cc: New file.
12333         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12334         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12335         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12336         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12337         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12338         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12339         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12340         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12341         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12342         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12343         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12344         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12345         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12346         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12347         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12348         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12349         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12350         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12351         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12352         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12353         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12354         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12355         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12356         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12357         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12358         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12359         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12360         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12361         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12362         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12363         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12364         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12365         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12366         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12367         * unittests/basic_string_view/operators/char/2.cc: New file.
12368         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12369         * unittests/basic_string_view/range_access/char/1.cc: New file.
12370         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12371         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12372         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12373         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12374         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12375         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12376         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12377         * unittests/basic_string_view/typedefs.cc: New file.
12378         * unittests/basic_string_view/types/1.cc: New file.
12379
12380 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12381
12382         * common/gdb_string_view.h: Remove libstdc++ implementation
12383         details, adjust to gdb reality.
12384         * common/gdb_string_view.tcc: Likewise.
12385         * cli/cli-script.c (struct string_view): Remove.
12386         (user_args) <m_args>: Change element type to gdb::string_view.
12387         (user_args::insert_args): Adjust.
12388
12389 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12390
12391         * common/gdb_string_view.h: New file.
12392         * common/gdb_string_view.tcc: New file.
12393
12394 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12395
12396         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12397         * configure: Re-generate.
12398
12399 2018-04-09  Pedro Alves  <palves@redhat.com>
12400
12401         * gdbarch.sh: Include "observable.h" instead of "observer.h".
12402         (set_target_gdbarch): Call
12403         gdb::observers::architecture_changed.notify instead of
12404         observer_notify_architecture_changed.
12405
12406 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12407
12408         * tracepoint.c (struct current_traceframe_cleanup): Remove.
12409         (do_restore_current_traceframe_cleanup): Remove.
12410         (restore_current_traceframe_cleanup_dtor): Remove.
12411         (make_cleanup_restore_current_traceframe): Remove.
12412         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12413         New.
12414         * tracepoint.h (struct scoped_restore_current_traceframe): New.
12415         * infrun.c (fetch_inferior_event): Use
12416         scoped_restore_current_traceframe.
12417
12418 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12419
12420         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12421         Remove.
12422         <n_allocated_type_units>: Remove.
12423         <all_type_units>: Change to std::vector.
12424         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12425         to std::vector change.
12426         (dwarf2_per_objfile::get_cutu): Likewise.
12427         (dwarf2_per_objfile::get_tu): Likewise.
12428         (create_signatured_type_table_from_index): Likewise.
12429         (create_signatured_type_table_from_debug_names): Likewise.
12430         (dw2_symtab_iter_next): Likewise.
12431         (dw2_print_stats): Likewise.
12432         (dw2_expand_all_symtabs): Likewise.
12433         (dw2_expand_marked_cus): Likewise.
12434         (dw2_debug_names_iterator::next): Likewise.
12435         (dwarf2_initialize_objfile): Likewise.
12436         (add_signatured_type_cu_to_table): Likewise.
12437         (create_all_type_units): Likewise.
12438         (add_type_unit): Likewise.
12439         (struct tu_abbrev_offset): Add constructor.
12440         (build_type_psymtabs_1): Adjust to std::vector change.
12441         (print_tu_stats): Likewise.
12442         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12443         (write_debug_names): Likewise.
12444
12445 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12446
12447         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
12448         Make an std::vector.
12449         <n_comp_units>: Remove.
12450         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12451         to std::vector change.
12452         (dwarf2_per_objfile::get_cutu): Likewise.
12453         (dwarf2_per_objfile::get_cu): Likewise.
12454         (create_cus_from_index): Likewise.
12455         (create_addrmap_from_index): Likewise.
12456         (create_addrmap_from_aranges): Likewise.
12457         (dwarf2_read_index): Likewise.
12458         (dw2_find_last_source_symtab): Likewise.
12459         (dw2_map_symtabs_matching_filename): Likewise.
12460         (dw2_symtab_iter_next): Likewise.
12461         (dw2_print_stats): Likewise.
12462         (dw2_expand_all_symtabs): Likewise.
12463         (dw2_expand_symtabs_with_fullname): Likewise.
12464         (dw2_expand_marked_cus): Likewise.
12465         (dw2_map_symbol_filenames): Likewise.
12466         (create_cus_from_debug_names): Likewise.
12467         (dwarf2_read_debug_names): Likewise.
12468         (dw2_debug_names_iterator::next): Likewise.
12469         (dwarf2_initialize_objfile): Likewise.
12470         (set_partial_user): Likewise.
12471         (dwarf2_build_psymtabs_hard): Likewise.
12472         (read_comp_units_from_section): Remove arguments, adjust to
12473         std::vector change.
12474         (create_all_comp_units): Adjust to std::vector and
12475         read_comp_units_from_section changes.
12476         (dwarf2_find_containing_comp_unit): Adjust to std::vector
12477         change.
12478         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12479         (psyms_seen_size): Likewise.
12480         (write_gdbindex): Likewise.
12481         (write_debug_names): Likewise.
12482
12483 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12484
12485         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
12486         with dwarf2_per_objfile.
12487         (create_cus_from_index): Likewise.
12488         (create_signatured_type_table_from_index): Likewise.
12489         (dwarf2_read_index): Likewise.
12490         (dwarf2_initialize_objfile): Likewise.
12491         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
12492         per_cu rather than get_dwarf2_per_objfile.
12493
12494 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12495
12496         * dwarf2read.h (struct signatured_type): Forward declare.
12497         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
12498         New methods.
12499         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
12500         (dw2_get_cutu): ...this.
12501         (dwarf2_per_objfile::get_cu): Rename from...
12502         (dw2_get_cu): ...this.
12503         (dwarf2_per_objfile::get_tu): New.
12504         (create_addrmap_from_index): Adjust.
12505         (create_addrmap_from_aranges): Adjust.
12506         (dw2_find_last_source_symtab): Adjust.
12507         (dw2_map_symtabs_matching_filename): Adjust.
12508         (dw2_symtab_iter_next): Adjust.
12509         (dw2_print_stats): Adjust.
12510         (dw2_expand_all_symtabs): Adjust.
12511         (dw2_expand_symtabs_with_fullname): Adjust.
12512         (dw2_expand_marked_cus): Adjust.
12513         (dw_expand_symtabs_matching_file_matcher): Adjust.
12514         (dw2_map_symbol_filenames): Adjust.
12515         (dw2_debug_names_iterator::next): Adjust.
12516         (dwarf2_initialize_objfile): Adjust.
12517         (set_partial_user): Adjust.
12518         (dwarf2_build_psymtabs_hard): Adjust.
12519
12520 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12521
12522         * dwarf2read.c (create_signatured_type_table_from_debug_names):
12523         Remove unused variables.
12524         (dw2_map_symtabs_matching_filename): Likewise.
12525         (dwarf2_record_block_ranges): Likewise.
12526         (dwarf2_read_addr_index): Likewise.
12527         (follow_die_offset): Likewise.
12528
12529 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12530
12531         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
12532         to symbol_file_add_main.
12533
12534 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12535
12536         PR mi/22299
12537         * mi/mi-console.c (do_fputc_async_safe): New.
12538         (mi_console_file::write_async_safe): New.
12539         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
12540         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
12541         New.
12542         * ui-file.c (ui_file::putstrn): Adjust call to
12543         fputstrn_unfiltered.
12544         * utils.c (printchar): Replace do_fputs and do_fprintf
12545         parameters by do_fputc.
12546         (fputstr_filtered): Adjust call to printchar.
12547         (fputstr_unfiltered): Likewise.
12548         (fputstrn_filtered): Likewise.
12549         (fputstrn_unfiltered): Add do_fputc parameter, pass to
12550         printchar.
12551         * utils.h (do_fputc_ftype): New typedef.
12552         (fputstrn_unfiltered): Add do_fputc parameter.
12553
12554 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12555
12556         * regformats/i386/i386-avx.dat: Remove.
12557
12558 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12559
12560         PR gdb/22979
12561         * amd64-tdep.c (amd64_none_init_abi): New function.
12562         (amd64_x32_none_init_abi): New function.
12563         (_initialize_amd64_tdep): Register handlers for x86-64 and
12564         x64_32 with GDB_OSABI_NONE.
12565         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
12566         GDB_OSABI_NONE osabi.
12567
12568 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12569
12570         PR gdb/22980
12571         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
12572         GDB_OSABI_NONE.
12573         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
12574         * osabi.c (gdb_osabi_names): Add "unknown" entry.
12575
12576 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12577
12578         * common/byte-vector.h (char_vector): New type.
12579         * target.h (target_read_alloc): Return
12580         gdb::optional<byte_vector>.
12581         (target_read_stralloc): Return gdb::optional<char_vector>.
12582         (target_get_osdata): Return gdb::optional<char_vector>.
12583         * target.c (target_read_alloc_1): Templatize.  Replacement
12584         manual memory management with vector.
12585         (target_read_alloc): Change return type, adjust.
12586         (target_read_stralloc): Change return type, adjust.
12587         (target_get_osdata): Change return type, adjust.
12588         * auxv.c (struct auxv_info) <length>: Remove.
12589         <data>: Change type to gdb::optional<byte_vector>.
12590         (auxv_inferior_data_cleanup): Free auxv_info with delete.
12591         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
12592         (target_auxv_search): Adjust.
12593         (fprint_target_auxv): Adjust.
12594         * avr-tdep.c (avr_io_reg_read_command): Adjust.
12595         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
12596         (linux_make_corefile_notes): Adjust.
12597         * osdata.c (get_osdata): Adjust.
12598         * remote.c (remote_get_threads_with_qxfer): Adjust.
12599         (remote_memory_map): Adjust.
12600         (remote_traceframe_info): Adjust.
12601         (btrace_read_config): Adjust.
12602         (remote_read_btrace): Adjust.
12603         (remote_pid_to_exec_file): Adjust.
12604         * solib-aix.c (solib_aix_get_library_list): Adjust.
12605         * solib-dsbt.c (decode_loadmap): Don't free buf.
12606         (dsbt_get_initial_loadmaps): Adjust.
12607         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
12608         * solib-target.c (solib_target_current_sos): Adjust.
12609         * tracepoint.c (sdata_make_value): Adjust.
12610         * xml-support.c (xinclude_start_include): Adjust.
12611         (xml_fetch_content_from_file): Adjust.
12612         * xml-support.h (xml_fetch_another): Change return type.
12613         (xml_fetch_content_from_file): Change return type.
12614         * xml-syscall.c (xml_init_syscalls_info): Adjust.
12615         * xml-tdesc.c (file_read_description_xml): Adjust.
12616         (fetch_available_features_from_target): Change return type.
12617         (target_fetch_description_xml): Adjust.
12618         (target_read_description_xml): Adjust.
12619
12620 2018-04-06  Tom Tromey  <tom@tromey.com>
12621
12622         * value.c (~value): Update.
12623         (struct value) <contents>: Now unique_xmalloc_ptr.
12624         (value_contents_bits_eq, allocate_value_contents)
12625         (value_contents_raw, value_contents_all_raw)
12626         (value_contents_for_printing, value_contents_for_printing_const)
12627         (set_value_enclosing_type): Update.
12628
12629 2018-04-06  Tom Tromey  <tom@tromey.com>
12630
12631         * value.c (range_s): Remove typedef, VEC.
12632         (struct range): Add operator<.
12633         (range_lessthan): Remove.
12634         (ranges_contain): Change type.
12635         (~value): Update.
12636         (struct value) <unavailable, optimized_out>: Now std::vector.
12637         (value_entirely_available)
12638         (value_entirely_covered_by_range_vector)
12639         (value_entirely_unavailable, value_entirely_optimized_out):
12640         Update.
12641         (insert_into_bit_range_vector): Change argument type.
12642         (find_first_range_overlap): Likewise.
12643         (struct ranges_and_idx, value_contents_bits_eq)
12644         (require_not_optimized_out, require_available): Update.
12645         (ranges_copy_adjusted): Change argument types.
12646         (value_optimized_out, value_copy, value_fetch_lazy): Update.
12647
12648 2018-04-06  Tom Tromey  <tom@tromey.com>
12649
12650         * value.c (~value): Update.
12651         (struct value) <parent>: Now a value_ref_ptr.
12652         (value_parent, set_value_parent, value_address, value_copy):
12653         Update.
12654
12655 2018-04-06  Tom Tromey  <tom@tromey.com>
12656
12657         * value.c (struct value): Add constructor, destructor, and member
12658         initializers.
12659         (allocate_value_lazy, value_decref): Update.
12660
12661 2018-04-06  Tom Tromey  <tom@tromey.com>
12662
12663         * value.c (struct value) <released, next>: Remove.
12664         (all_values): Now a std::vector.
12665         (allocate_value_lazy): Update.
12666         (value_next): Remove.
12667         (value_mark, value_free_to_mark, release_value)
12668         (value_release_to_mark): Update.
12669
12670 2018-04-06  Tom Tromey  <tom@tromey.com>
12671
12672         * value.h (fetch_subexp_value, value_release_to_mark): Update.
12673         (free_value_chain): Remove.
12674         * value.c (free_value_chain): Remove.
12675         (value_release_to_mark): Return a std::vector.
12676         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
12677         std::vector.
12678         (check_condition): Update.
12679         * eval.c (fetch_subexp_value): Change "val_chain" to a
12680         std::vector.
12681         * breakpoint.c (update_watchpoint): Update.
12682         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
12683
12684 2018-04-06  Tom Tromey  <tom@tromey.com>
12685
12686         * value.h (free_all_values): Remove.
12687         * value.c (free_all_values): Remove.
12688
12689 2018-04-06  Tom Tromey  <tom@tromey.com>
12690
12691         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
12692         (value_history_chain, value_history_count): Remove.
12693         (value_history): New global.
12694         (record_latest_value, access_value_history, show_values)
12695         (preserve_values): Update.
12696
12697 2018-04-06  Tom Tromey  <tom@tromey.com>
12698
12699         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
12700         * varobj.c (varobj_set_display_format, varobj_set_value)
12701         (install_default_visualizer, construct_visualizer)
12702         (install_new_value, ~varobj, varobj_get_value_type)
12703         (my_value_of_variable, varobj_editable_p): Update.
12704         * c-varobj.c (c_describe_child, c_value_of_variable)
12705         (cplus_number_of_children, cplus_describe_child): Update.
12706         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12707         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12708         (ada_value_of_variable, ada_value_is_changeable_p): Update.
12709
12710 2018-04-06  Tom Tromey  <tom@tromey.com>
12711
12712         * printcmd.c (last_examine_address): Change type to
12713         value_ref_ptr.
12714         (do_examine, x_command): Update.
12715
12716 2018-04-06  Tom Tromey  <tom@tromey.com>
12717
12718         * value.c (release_value): Update.
12719         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12720         (struct bpstats) <val>: Now a value_ref_ptr.
12721         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12722         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12723         (~watchpoint, print_it_watchpoint, watch_command_1)
12724         (invalidate_bp_value_on_memory_change): Update.
12725
12726 2018-04-06  Tom Tromey  <tom@tromey.com>
12727
12728         * varobj.c (varobj_clear_saved_item)
12729         (update_dynamic_varobj_children, install_new_value, ~varobj):
12730         Update.
12731         * value.h (value_incref): Move declaration earlier.
12732         (value_decref): Rename from value_free.
12733         (struct value_ref_policy): New.
12734         (value_ref_ptr): New typedef.
12735         (struct value_deleter): Remove.
12736         (gdb_value_up): Remove typedef.
12737         (release_value): Change return type.
12738         (release_value_or_incref): Remove.
12739         * value.c (set_value_parent): Update.
12740         (value_incref): Change return type.
12741         (value_decref): Rename from value_free.
12742         (value_free_to_mark, free_all_values, free_value_chain): Update.
12743         (release_value): Return value_ref_ptr.
12744         (release_value_or_incref): Remove.
12745         (record_latest_value, set_internalvar, clear_internalvar):
12746         Update.
12747         * stack.c (info_frame_command): Don't call value_free.
12748         * python/py-value.c (valpy_dealloc, valpy_new)
12749         (value_to_value_object): Update.
12750         * printcmd.c (do_examine): Update.
12751         * opencl-lang.c (lval_func_free_closure): Update.
12752         * mi/mi-main.c (register_changed_p): Don't call value_free.
12753         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12754         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12755         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12756         value_free.
12757         * guile/scm-value.c (vlscm_free_value_smob)
12758         (vlscm_scm_from_value): Update.
12759         * frame.c (frame_register_unwind, frame_unwind_register_signed)
12760         (frame_unwind_register_unsigned, get_frame_register_bytes)
12761         (put_frame_register_bytes): Don't call value_free.
12762         * findvar.c (address_from_register): Don't call value_free.
12763         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12764         * dwarf2loc.c (entry_data_value_free_closure)
12765         (value_of_dwarf_reg_entry, free_pieced_value_closure)
12766         (dwarf2_evaluate_loc_desc_full): Update.
12767         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12768         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12769         (~watchpoint, watch_command_1)
12770         (invalidate_bp_value_on_memory_change): Update.
12771         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12772
12773 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12774
12775         PR gdb/23022
12776         * warning.m4: Add -Wno-error=deprecated-register.
12777         * configure: Re-generate.
12778
12779 2018-04-05  Tom Tromey  <tom@tromey.com>
12780
12781         * linespec.h: Remove include of "vec.h".
12782
12783 2018-04-05  Tom Tromey  <tom@tromey.com>
12784
12785         * linespec.c (typep): Remove typedef.
12786         (find_methods, find_superclass_methods): Take a std::vector.
12787         (find_method): Use std::vector.
12788
12789 2018-04-05  Tom Tromey  <tom@tromey.com>
12790
12791         * utils.c (compare_strings): Remove.
12792         * utils.h (compare_strings): Remove.
12793         * objc-lang.h (find_imps): Update.
12794         * objc-lang.c (find_methods): Take a std::vector.
12795         (uniquify_strings, find_imps): Likewise.
12796         * linespec.c (find_methods): Take a std::vector.
12797         (decode_objc): Use std::vector.
12798         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12799         a std::vector.
12800         (find_method, find_function_symbols): Use std::vector.
12801
12802 2018-04-05  Tom Tromey  <tom@tromey.com>
12803
12804         * completer.c (completion_tracker::completion_tracker): Remove
12805         cast.
12806         (completion_tracker::discard_completions): Likewise.
12807         * breakpoint.c (ambiguous_names_p): Remove cast.
12808         * ada-lang.c (_initialize_ada_language): Remove cast.
12809         * utils.h (streq): Update.
12810         (streq_hash): Add new declaration.
12811         * utils.c (streq): Return bool.
12812         (streq_hash): New function.
12813
12814 2018-04-05  Tom Tromey  <tom@tromey.com>
12815
12816         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12817         Remove a string copy.
12818
12819 2018-04-05  Tom Tromey  <tom@tromey.com>
12820
12821         * linespec.c (filter_results): Use std::vector.
12822         (decode_line_2, decode_line_full): Update.
12823
12824 2018-04-05  Tom Tromey  <tom@tromey.com>
12825
12826         * linespec.c (canonical_to_fullform): Return std::string.
12827         (filter_results): Update.
12828         (struct decode_line_2_item): Add constructor.
12829         <fullform, displayform>: Now std::string.
12830         (decode_line_2_compare_items): Now a std::sort comparator.
12831         (decode_line_2): Update.
12832
12833 2018-04-05  Tom Tromey  <tom@tromey.com>
12834
12835         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12836         (unexpected_linespec_error): Update.
12837         (linespec_parse_basic, parse_linespec): Update.
12838
12839 2018-04-05  Tom Tromey  <tom@tromey.com>
12840
12841         * linespec.c (linespec_parse_basic): Reindent.
12842
12843 2018-04-05  Tom Tromey  <tom@tromey.com>
12844
12845         * minsyms.h (iterate_over_minimal_symbols): Update.
12846         * minsyms.c (iterate_over_minimal_symbols): Take a
12847         gdb::function_view.
12848         * linespec.c (struct collect_minsyms): Remove.
12849         (compare_msyms): Now a std::sort comparator.
12850         (add_minsym): Add parameters.
12851         (search_minsyms_for_name): Update.  Use std::vector.
12852
12853 2018-04-03  Tom Tromey  <tom@tromey.com>
12854
12855         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12856         gdb::byte_vector.
12857
12858 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12859
12860         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12861
12862 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12863
12864         PR gdb/16959
12865         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12866         printing static type.
12867
12868 2018-04-01  Tom Tromey  <tom@tromey.com>
12869
12870         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12871         (rs6000_xfer_shared_libraries): Update.
12872
12873 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12874
12875         * common/gdb_vecs.h (char_ptr): Remove.
12876         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12877
12878 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12879
12880         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12881         with std::vector.
12882         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12883
12884 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12885
12886         * tracepoint.h (struct uploaded_tp): Initialize fields.
12887         <actions, step_actions, cmd_strings>: Change type to
12888         std::vector<char *>.
12889         * tracepoint.c (get_uploaded_tp): Allocate with new.
12890         (free_uploaded_tps): Free with delete.
12891         (parse_tracepoint_definition): Adjust to std::vector change.
12892         * breakpoint.c (read_uploaded_action): Likewise.
12893         (create_tracepoint_from_upload): Likewise.
12894         * ctf.c (ctf_write_uploaded_tp): Likewise.
12895         (SET_ARRAY_FIELD): Likewise.
12896         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12897
12898 2018-03-30  Tom Tromey  <tom@tromey.com>
12899
12900         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12901         std::unique_ptr.
12902         (svr4_keep_data_in_core): Update.
12903         (svr4_read_so_list): Update.
12904
12905 2018-03-30  Tom Tromey  <tom@tromey.com>
12906
12907         * windows-nat.c (handle_output_debug_string, handle_exception):
12908         Update.
12909         * target.h (target_read_string): Update.
12910         * target.c (target_read_string): Change "string" to
12911         unique_xmalloc_ptr.
12912         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12913         Update.
12914         * solib-frv.c (frv_current_sos): Update.
12915         * solib-dsbt.c (dsbt_current_sos): Update.
12916         * solib-darwin.c (darwin_current_sos): Update.
12917         * linux-thread-db.c (inferior_has_bug): Update.
12918         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12919         Update.  Remove alloca.
12920         * ada-lang.c (ada_main_name): Update.
12921
12922 2018-03-30  Tom Tromey  <tom@tromey.com>
12923
12924         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12925         (struct dwo_file_deleter): New.
12926         (dwo_file_up): New typedef.
12927         (open_and_init_dwo_file): Use dwo_file_up.
12928         (free_dwo_file_cleanup): Remove.
12929
12930 2018-03-30  Tom Tromey  <tom@tromey.com>
12931
12932         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12933         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12934
12935 2018-03-30  Tom Tromey  <tom@tromey.com>
12936
12937         * dwarf2read.c (class free_cached_comp_units): New class.
12938         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12939         (free_cached_comp_units): Remove function.
12940
12941 2018-03-30  Tom Tromey  <tom@tromey.com>
12942
12943         * utils.h (make_cleanup_unpush_target): Remove.
12944         * inf-ptrace.c (struct target_unpusher): New.
12945         (target_unpush_up) New typedef.
12946         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12947         target_unpush_up.
12948         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12949
12950 2018-03-27  Tom Tromey  <tom@tromey.com>
12951
12952         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12953
12954 2018-03-27  Pedro Alves  <palves@redhat.com>
12955             Tom Tromey  <tom@tromey.com>
12956
12957         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12958         destructor.  Now a class.
12959         (gdb_readline_wrapper_cleanup): Remove function.
12960         (gdb_readline_wrapper): Remove cleanups.
12961
12962 2018-03-27  Tom Tromey  <tom@tromey.com>
12963
12964         * typeprint.h (struct type_print_options) <local_typedefs,
12965         global_typedefs>: Remove "struct" keyword.
12966         (class typedef_hash_table): New class.
12967         (recursively_update_typedef_hash, add_template_parameters)
12968         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12969         (find_typedef_in_hash): Don't declare.
12970         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12971         (typedef_hash_table::recursively_update): Rename from
12972         recursively_update_typedef_hash.  Now a member.
12973         (typedef_hash_table::add_template_parameters): Rename from
12974         add_template_parameters.  Now a member.
12975         (typedef_hash_table::typedef_hash_table): Now a constructor;
12976         rename from create_typedef_hash.
12977         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12978         rename from free_typedef_hash.
12979         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12980         (do_free_global_table): Remove.
12981         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12982         from copy_type_recursive.
12983         (create_global_typedef_table): Remove.
12984         (typedef_hash_table::find_global_typedef): Now a member of
12985         typedef_hash_table.
12986         (typedef_hash_table::find_typedef): Rename from
12987         find_typedef_in_hash; now a member.
12988         (whatis_exp): Update.
12989         * extension.h (struct ext_lang_type_printers): Add constructor and
12990         destructor.
12991         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12992         declare.
12993         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12994         Now a constructor; rename from start_ext_lang_type_printers.
12995         (ext_lang_type_printers): Now a destructor; rename from
12996         free_ext_lang_type_printers.
12997         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12998         Update.
12999         (c_type_print_base_struct_union): Update.  Remove cleanups.
13000
13001 2018-03-27  Tom Tromey  <tom@tromey.com>
13002
13003         * dwarf-index-write.c: Include <cmath>.
13004
13005 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13006
13007         * NEWS: Add entry describing new "set|show varsize-limit" command.
13008         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13009         command.
13010         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13011         "set variable".
13012
13013 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13014
13015         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13016         dwarf-index-write.c
13017         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13018         * dwarf-index-common.c: New file.
13019         * dwarf-index-common.h: New file.
13020         * dwarf-index-write.c: New file.
13021         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13022         (struct dwarf2_section_info): Move from here.
13023         (dwarf2_section_info_def): Likewise.
13024         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13025         (offset_type): Likewise.
13026         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13027         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13028         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13029         (byte_swap): Likewise.
13030         (MAYBE_SWAP): Likewise.
13031         (dwarf2_per_cu_ptr): Likewise.
13032         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13033         (struct tu_stats): Likewise.
13034         (struct dwarf2_per_objfile): Likewise.
13035         (struct dwarf2_per_cu_data): Likewise.
13036         (struct signatured_type): Likewise.
13037         (sig_type_ptr): Likewise.
13038         (DEF_VEC_P (sig_type_ptr)): Likewise.
13039         (INDEX4_SUFFIX): Likewise.
13040         (INDEX5_SUFFIX): Likewise.
13041         (DEBUG_STR_SUFFIX): Likewise.
13042         (dwarf2_read_section): Make non-static.
13043         (mapped_index_string_hash): Move from here.
13044         (dwarf5_djb_hash): Likewise.
13045         (file_write): Likewise.
13046         (class data_buf): Likewise.
13047         (struct symtab_index_entry): Likewise.
13048         (struct mapped_symtab): Likewise.
13049         (find_slot): Likewise.
13050         (hash_expand): Likewise.
13051         (add_index_entry): Likewise.
13052         (uniquify_cu_indices): Likewise.
13053         (class c_str_view): Likewise.
13054         (class c_str_view_hasher): Likewise.
13055         (class vector_hasher): Likewise.
13056         (write_hash_table): Likewise.
13057         (psym_index_map): Likewise.
13058         (struct addrmap_index_data): Likewise.
13059         (add_address_entry): Likewise.
13060         (add_address_entry_worker): Likewise.
13061         (write_address_map): Likewise.
13062         (symbol_kind): Likewise.
13063         (write_psymbols): Likewise.
13064         (struct signatured_type_index_data): Likewise.
13065         (write_one_signatured_type): Likewise.
13066         (recursively_count_psymbols): Likewise.
13067         (recursively_write_psymbols): Likewise.
13068         (class debug_names): Likewise.
13069         (check_dwarf64_offsets): Likewise.
13070         (psyms_seen_size): Likewise.
13071         (write_gdbindex): Likewise.
13072         (write_debug_names): Likewise.
13073         (assert_file_size): Likewise.
13074         (write_psymtabs_to_index): Likewise.
13075         (save_gdb_index_command): Likewise.
13076         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13077         command.
13078         * dwarf2read.h: New file.
13079
13080 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13081
13082         PR gdb/22670
13083         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13084         symbol name if the CU's language stores symbol names in linkage
13085         format.
13086         * language.h (struct language_defn)
13087         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13088         all instances of this struct.
13089
13090 2018-03-26  Tom Tromey  <tom@tromey.com>
13091
13092         * stack.c (backtrace_command_1): Remove verbose code.
13093
13094 2018-03-26  Tom Tromey  <tom@tromey.com>
13095
13096         * python/py-framefilter.c (py_print_type): Don't catch
13097         exceptions.  Return void.
13098         (py_print_value): Likewise.
13099         (py_print_single_arg): Likewise.
13100         (enumerate_args): Don't catch exceptions.
13101         (py_print_args): Likewise.
13102         (py_print_frame): Likewise.
13103         (gdbpy_apply_frame_filter): Catch exceptions here.
13104
13105 2018-03-26  Tom Tromey  <tom@tromey.com>
13106
13107         * stack.c (_initialize_stack): Remove trailing newlines from help
13108         text.  Add "Usage" line to "backtrace" help.
13109
13110 2018-03-26  Tom Tromey  <tom@tromey.com>
13111
13112         PR python/16486:
13113         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13114
13115 2018-03-26  Tom Tromey  <tom@tromey.com>
13116
13117         * python/py-framefilter.c (py_print_single_arg): Return
13118         EXT_LANG_BT_ERROR from catch.
13119
13120 2018-03-26  Tom Tromey  <tom@tromey.com>
13121
13122         PR backtrace/15584:
13123         * stack.c (backtrace_command_1): Move some code into no-filters
13124         "if".
13125
13126 2018-03-26  Tom Tromey  <tom@tromey.com>
13127
13128         * python/py-framefilter.c (throw_quit_or_print_exception): New
13129         function.
13130         (gdbpy_apply_frame_filter): Use it.
13131
13132 2018-03-26  Tom Tromey  <tom@tromey.com>
13133
13134         PR cli/17716:
13135         * python/py-framefilter.c (py_print_type, py_print_value)
13136         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13137         RETURN_MASK_ERROR.
13138
13139 2018-03-26  Tom Tromey  <tom@tromey.com>
13140
13141         * python/py-framefilter.c (enumerate_args): Use
13142         gdb::unique_xmalloc_ptr.
13143
13144 2018-03-26  Tom Tromey  <tom@tromey.com>
13145
13146         * python/py-framefilter.c (py_print_frame): Return
13147         EXT_LANG_BT_OK.
13148         (gdbpy_apply_frame_filter): Update comment.
13149         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13150         Remove.
13151         <EXT_LANG_BT_NO_FILTERS>: Change value.
13152
13153 2018-03-26  Tom Tromey  <tom@tromey.com>
13154
13155         PR backtrace/15582:
13156         * stack.c (backtrace_command): Parse "hide" argument.
13157         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13158         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13159         constant.
13160
13161 2018-03-26  Tom Tromey  <tom@tromey.com>
13162
13163         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13164         add "flags".
13165         (backtrace_command): Remove "fulltrace", add "flags".
13166
13167 2018-03-26  Tom Tromey  <tom@tromey.com>
13168
13169         * stack.c (backtrace_command): Rewrite command line parsing.
13170
13171 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13172
13173         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13174
13175 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13176
13177         * filename-seen-cache.h: Add include guard.
13178
13179 2018-03-26  Keith Seitz  <keiths@redhat.com>
13180
13181         * symfile.c (place_section): Remove "struct" from section_addr_info
13182         in comment.
13183         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13184         "struct" keyword from section_addr_info.
13185
13186 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13187
13188         * regformats/regdef.h (reg): Add constructors.
13189
13190 2018-03-25  Pedro Alves  <palves@redhat.com>
13191
13192         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13193         if then/else bodies in var_func_name extraction.
13194
13195 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13196
13197         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13198         lookup_minimal_symbol() to find symbol entry.
13199         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13200
13201 2018-03-23  Keith Seitz  <keiths@redhat.com>
13202
13203         PR c++/22968
13204         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13205         nested type definitions for C++, too.
13206
13207 2018-03-23  Tom Tromey  <tom@tromey.com>
13208
13209         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13210         a typedef.
13211         (macho_register_oso): Remove.
13212         (macho_symtab_read): Take a std::vector.
13213         (oso_el_compare_name): Now a std::sort comparator.
13214         (macho_symfile_read_all_oso): Take a std::vector.
13215         (macho_symfile_read): Use std::vector.  Remove cleanups.
13216
13217 2018-03-22  Tom Tromey  <tom@tromey.com>
13218
13219         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13220         (record_full_goto_bookmark): Use std::string.
13221
13222 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13223
13224         PR tdep/18295
13225         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13226         a single mask.
13227
13228 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13229
13230         * rs6000-tdep.c (store_insn_p): New function.
13231         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13232         and cr_reg to their unshifted values. Use store_insn_p to
13233         match LR saves using either R1 or fdata->alloca_reg. Use
13234         store_insn_p to match CR saves. Set alloca_reg_offset
13235         when alloca_reg and framep are set. Remove lr_reg shift
13236         when assigning to fdata->lr_register.
13237
13238 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13239
13240         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13241         command line args instead of emitting a warning.
13242
13243 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13244
13245         * tracepoint.h (struct static_tracepoint_marker): Initialize
13246         fields, define default constructor, move constructor and move
13247         assignment, disable the rest.
13248         <str_id, extra>: Make std::string.
13249         (release_static_tracepoint_marker): Remove.
13250         (free_current_marker): Remove.
13251         * tracepoint.c (free_current_marker): Remove.
13252         (parse_static_tracepoint_marker_definition): Adjust to
13253         std::string, use new hex2str overload.
13254         (release_static_tracepoint_marker): Remove.
13255         (print_one_static_tracepoint_marker): Get marker by reference
13256         and adjust to std::string.
13257         (info_static_tracepoint_markers_command): Adjust to std::vector
13258         changes
13259         * target.h (static_tracepoint_marker_p): Remove typedef.
13260         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13261         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13262         bool.
13263         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13264         * target-debug.h
13265         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13266         (target_debug_print_std_vector_static_tracepoint_marker): New.
13267         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13268         to...
13269         (target_debug_print_static_tracepoint_marker_p): ... this.
13270         * target-delegates.c: Re-generate.
13271         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13272         Make std::string.
13273         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13274         (decode_static_tracepoint_spec): Adjust to std::vector.
13275         (tracepoint_print_one_detail): Adjust to std::string.
13276         (strace_marker_decode_location): Adjust to std::string.
13277         (update_static_tracepoint): Adjust to std::string, remove call
13278         to release_static_tracepoint_marker.
13279         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13280         Adjust to std::vector.
13281         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13282         (remote_static_tracepoint_markers_by_strid): Adjust to
13283         std::vector.
13284         * common/rsp-low.h (hex2str): New overload with explicit count
13285         of bytes.
13286         * common/rsp-low.c (hex2str): New overload with explicit count
13287         of bytes.
13288         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13289         (_initialize_rsp_low_selftests): Add test_hex2str test.
13290         * unittests/tracepoint-selftests.c
13291         (test_parse_static_tracepoint_marker_definition): Adjust to
13292         std::string.
13293
13294 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13295
13296         * tracepoint.c (parse_static_tracepoint_marker_definition):
13297         Consider case where the definition is followed by more
13298         definitions.
13299         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13300         tracepoint-selftests.c.
13301         * unittests/tracepoint-selftests.c: New.
13302
13303 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13304
13305         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13306         Carvalho.
13307
13308 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13309
13310         * symtab.c (find_pc_sect_line): fixed indentation.
13311
13312 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13313
13314         * symtab.c (find_pc_sect_line): now uses binary search.
13315
13316 2018-03-19  Tom Tromey  <tom@tromey.com>
13317
13318         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13319         "IDENT" production.
13320
13321 2018-03-19  Pedro Alves  <palves@redhat.com>
13322             Tom Tromey  <tom@tromey.com>
13323
13324         * unittests/observable-selftests.c: New file.
13325         * common/observable.h: New file.
13326         * observable.h: New file.
13327         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13328         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13329         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13330         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13331         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13332         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13333         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13334         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13335         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13336         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13337         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13338         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13339         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13340         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13341         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13342         tui/tui-interp.c, valops.c: Update all users.
13343         * tui/tui-hooks.c (tui_bp_created_observer)
13344         (tui_bp_deleted_observer, tui_bp_modified_observer)
13345         (tui_inferior_exit_observer, tui_before_prompt_observer)
13346         (tui_normal_stop_observer, tui_register_changed_observer):
13347         Remove.
13348         (tui_observers_token): New global.
13349         (attach_or_detach, tui_attach_detach_observers): New functions.
13350         (tui_install_hooks, tui_remove_hooks): Use
13351         tui_attach_detach_observers.
13352         * record-btrace.c (record_btrace_thread_observer): Remove.
13353         (record_btrace_thread_observer_token): New global.
13354         * observer.sh: Remove.
13355         * observer.c: Rename to observable.c.
13356         * observable.c (namespace gdb_observers): Define new objects.
13357         (observer_debug): Move into gdb_observers namespace.
13358         (struct observer, struct observer_list, xalloc_observer_list_node)
13359         (xfree_observer_list_node, generic_observer_attach)
13360         (generic_observer_detach, generic_observer_notify): Remove.
13361         (_initialize_observer): Update.
13362         Don't include observer.inc.
13363         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13364         (clean mostlyclean): Likewise.
13365         (observer.h, observer.inc): Remove targets.
13366         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13367         (COMMON_SFILES): Use observable.c, not observer.c.
13368         * .gitignore: Remove observer.h.
13369
13370 2018-03-18  Tom Tromey  <tom@tromey.com>
13371
13372         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13373         gdb::def_vector.
13374         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13375
13376 2018-03-17  Tom Tromey  <tom@tromey.com>
13377
13378         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13379
13380 2018-03-17  Tom Tromey  <tom@tromey.com>
13381
13382         * target.c (class scoped_target_fd): New.
13383         (target_fileio_close_cleanup): Remove.
13384         (target_fileio_read_alloc_1): Use scoped_target_fd.
13385
13386 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13387
13388         * silent-rules.mk: New.
13389         * Makefile.in: Include silent-rules.mk
13390         (srcdir, VPATH, top_srcdir): Move up.
13391         (COMPILE): Add ECHO_CXX.
13392         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13393         (init.c): Add ECHO_INIT_C.
13394         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13395         (version.c): Add ECHO_GEN.
13396         (printcmd.o): Add ECHO_CXX.
13397         (target-float.o): Add ECHO_CXX.
13398         (ada-exp.o): Add ECHO_CXX.
13399         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13400         (insight$(EXEEXT)): Add ECHO_CXXLD.
13401         * gnulib/configure.ac: Add AM_SILENT_RULES.
13402         * gnulib/aclocal.m4: Re-generate.
13403         * gnulib/configure: Re-generate.
13404         * gnulib/import/Makefile.in: Re-generate.
13405
13406 2018-03-16  Tom Tromey  <tom@tromey.com>
13407
13408         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13409         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13410         * utils.c (do_free_section_addr_info)
13411         (make_cleanup_free_section_addr_info): Remove.
13412         * symfile.h (struct other_sections): Add constructor.
13413         (struct section_addr_info): Remove.
13414         (section_addr_info): New typedef.
13415         (struct sym_fns) <sym_offsets>: Change type of parameter.
13416         (build_section_addr_info_from_objfile)
13417         (relative_addr_info_to_section_offsets, addr_info_make_relative)
13418         (default_symfile_offsets, symbol_file_add)
13419         (symbol_file_add_from_bfd)
13420         (build_section_addr_info_from_section_table): Update.
13421         (alloc_section_addr_info, free_section_addr_info): Don't declare.
13422         * symfile.c (alloc_section_addr_info): Remove.
13423         (build_section_addr_info_from_section_table): Change return type.
13424         Update.
13425         (build_section_addr_info_from_bfd)
13426         (build_section_addr_info_from_objfile): Likewise.
13427         (free_section_addr_info): Remove.
13428         (relative_addr_info_to_section_offsets): Change type of "addrs".
13429         (addrs_section_compar): Now a std::sort comparator.
13430         (addrs_section_sort): Change return type.
13431         (addr_info_make_relative): Change type of "addrs".  Update.
13432         (default_symfile_offsets, syms_from_objfile_1)
13433         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
13434         (symbol_file_add_separate): Update.
13435         (symbol_file_add): Change type of "addrs".  Update.
13436         (add_symbol_file_command): Update.  Remove cleanups.
13437         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
13438         cleanups.
13439         * symfile-debug.c (debug_sym_offsets): Change type of "info".
13440         * solib.c (solib_read_symbols): Update.
13441         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
13442         * machoread.c (macho_symfile_offsets): Update.
13443         * jit.c (jit_bfd_try_read_symtab): Update.
13444
13445 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
13446
13447         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13448         unittests/utils-selftests.c.
13449         * unittests/utils-selftests.c: New file.
13450
13451 2018-03-14  Tom Tromey  <tom@tromey.com>
13452
13453         PR cli/14977:
13454         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
13455         for NULL.
13456
13457 2018-03-14  Tom Tromey  <tom@tromey.com>
13458
13459         PR cli/19918:
13460         * printcmd.c (printf_pointer): Allow "-" in format.
13461
13462 2018-03-14  Tom Tromey  <tom@tromey.com>
13463
13464         * printcmd.c (_initialize_printcmd): Add usage to printf.
13465
13466 2018-03-14  Yao Qi  <qiyao@sourceware.org>
13467
13468         * MAINTAINERS: Update my email address.
13469
13470 2018-03-13  Tom Tromey  <tom@tromey.com>
13471
13472         * machoread.c (macho_check_dsym): Change filenamep to a
13473         std::string*.
13474         (macho_symfile_read): Update.
13475         * symfile.c (load_command): Use std::string.
13476
13477 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13478
13479         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
13480         to error message string.
13481         (riscv_register_name): Use xsnprintf instead of sprintf.
13482         (riscv_insn::fetch_instruction): Use gdb_assert instead of
13483         internal_error.
13484         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
13485         error.
13486         (riscv_push_dummy_call): Likewise.
13487
13488 2018-03-12  Tom Tromey  <tom@tromey.com>
13489
13490         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
13491         Use gdb::byte_vector.
13492         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
13493
13494 2018-03-12  Yao Qi  <yao.qi@linaro.org>
13495
13496         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
13497         parameter type to readable_regcache.
13498         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
13499         the declaration.
13500
13501 2018-03-11  Tom Tromey  <tom@tromey.com>
13502
13503         * dwarf2read.c (struct nextfield): Add initializers.
13504         (struct nextfnfield): Remove.
13505         (struct fnfieldlist): Add initializers.  Remove "length" and
13506         "head", use std::vector.
13507         (struct decl_field_list): Remove.
13508         (struct field_info): Add initializers.
13509         <fields, baseclasses>: Now std::vector.
13510         <nbaseclasses, nfnfields, typedef_field_list_count,
13511         nested_types_list_count>: Remove.
13512         (dwarf2_add_field, dwarf2_add_type_defn)
13513         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
13514         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
13515         (process_structure_scope): Update.
13516
13517 2018-03-11  Tom Tromey  <tom@tromey.com>
13518
13519         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
13520         for use by std::sort.
13521         (build_type_psymtabs_1): Use std::vector.
13522
13523 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
13524
13525         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
13526         and LIBMPFR in the printed configuration.
13527
13528 2018-03-08  Tom Tromey  <tom@tromey.com>
13529
13530         * source.c (get_filename_and_charpos): Use scoped_fd.
13531         * nto-procfs.c (procfs_open_1): Use scoped_fd.
13532         (procfs_pidlist): Likewise.
13533         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
13534         (iterate_over_mappings): Likewise.
13535
13536 2018-03-08  Tom Tromey  <tom@tromey.com>
13537
13538         * infcall.c (struct call_return_meta_info)
13539         <stack_temporaries_enabled>: Remove.
13540         (get_call_return_value, call_function_by_hand_dummy): Update.
13541         * thread.c (disable_thread_stack_temporaries): Remove.
13542         (enable_thread_stack_temporaries): Remove.
13543         (thread_stack_temporaries_enabled_p): Return bool.
13544         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
13545         (get_last_thread_stack_temporary): Update.
13546         * eval.c (evaluate_subexp): Update.
13547         * gdbthread.h (class enable_thread_stack_temporaries): Now a
13548         class, not a function.
13549         (value_ptr, value_vec): Remove typedefs.
13550         (class thread_info) <stack_temporaries_enabled>: Now bool.
13551         <stack_temporaries>: Now a std::vector.
13552         (thread_stack_temporaries_enabled_p)
13553         (value_in_thread_stack_temporaries): Return bool.
13554
13555 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
13556
13557         * remote.c (putpkt_binary): Fix omitted bytes reporting.
13558         (getpkt_or_notif_sane_1): Likewise.
13559
13560 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13561
13562         * build-id.c (build_id_to_debug_bfd): Use std::string.
13563
13564 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13565
13566         * build-id.c (find_separate_debug_file_by_buildid): Return
13567         std::string.
13568         * build-id.h (find_separate_debug_file_by_buildid): Return
13569         std::string.
13570         * coffread.c (coff_symfile_read): Adjust to std::string.
13571         * elfread.c (elf_symfile_read): Adjust to std::string.
13572         * symfile.c (separate_debug_file_exists): Change parameter to
13573         std::string.
13574         (find_separate_debug_file): Return std::string.
13575         (find_separate_debug_file_by_debuglink): Return std::string.
13576         * symfile.h (find_separate_debug_file_by_debuglink): Return
13577         std::string.
13578
13579 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13580
13581         * common/xml-utils.c (xml_escape_text): Move code to...
13582         (xml_escape_text_append): ... this new function.
13583         * common/xml-utils.h (xml_escape_text_append): New declaration.
13584         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
13585         New function.
13586         (_initialize_xml_utils): register test_xml_escape_text_append as
13587         a selftest.
13588
13589 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
13590
13591         * defs.h: Remove MAX_REGISTER_SIZE.
13592         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
13593         asserts.
13594         * python/py-unwind.c (pyuw_sniffer): Likewise.
13595
13596 2018-03-07  Tom Tromey  <tom@tromey.com>
13597
13598         * linux-tdep.c (linux_info_proc): Update.
13599         * target.h (struct target_ops) <to_fileio_readlink>: Return
13600         optional<string>.
13601         (target_fileio_readlink): Return optional<string>.
13602         * remote.c (remote_hostio_readlink): Return optional<string>.
13603         * inf-child.c (inf_child_fileio_readlink): Return
13604         optional<string>.
13605         * target.c (target_fileio_readlink): Return optional<string>.
13606
13607 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
13608
13609         * regcache.c (cooked_read_test): Add riscv to the list of
13610         architectures that have a save_reggroup.
13611
13612 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13613
13614         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
13615         value is not a dynamic class object.
13616
13617 2018-03-06  Tom Tromey  <tom@tromey.com>
13618
13619         * rust-exp.y: Formatting fixes.
13620
13621 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13622
13623         * riscv-tdep.c (riscv_register_name): Remove target description
13624         support.
13625         (riscv_gdbarch_init): Remove target description check.
13626
13627 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13628
13629         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
13630         comment.
13631         * riscv-tdep.h: Likewise.
13632
13633 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13634
13635         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
13636         (riscv_pseudo_register_write): Delete.
13637         (riscv_gdbarch_init): Remove all use of pseudo registers.
13638
13639 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13640
13641         * record-btrace.c (btrace_print_lines): Replace cleanup
13642         parameter with RAII equivalents.
13643         (btrace_insn_history): Replace cleanup with RAII equivalents.
13644         * ui-out.h (make_cleanup_ui_out_list_begin_end,
13645         make_cleanup_ui_out_tuple_begin_end): Remove.
13646         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
13647         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
13648         make_cleanup_ui_out_list_begin_end): Remove.
13649
13650 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13651
13652         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
13653         parameter types to std::vector.  Use bool.
13654         (record_btrace_wait): Replace VEC(tp_t) with
13655         std::vector<thread_info *>.
13656         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
13657
13658 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13659
13660         * record-btrace.c (record_btrace_disable_callback): Remove.
13661         (struct scoped_btrace_disable): New.
13662         (record_btrace_open): Use scoped_btrace_disable.
13663
13664 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13665
13666         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
13667         reading values from registers.
13668
13669 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13670
13671         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
13672         where appropriate.
13673
13674 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13675
13676         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
13677         change parameter type.  Use GDB's print functions, and use
13678         core_addr_to_string where appropriate.
13679         (riscv_push_dummy_call): Use core_addr_to_string where
13680         appropriate, update call to riscv_print_arg_location, and reindent
13681         a few lines.
13682         (riscv_return_value): Update call to riscv_print_arg_location.
13683
13684 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13685             Tim Newsome <tim@sifive.com>
13686             Albert Ou <a0u@eecs.berkeley.edu>
13687             Darius Rad <darius@bluespec.com>
13688
13689         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
13690         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
13691         (ALLDEPFILES): Add riscv-tdep.c
13692         * configure.tgt: Add riscv support.
13693         * riscv-tdep.c: New file.
13694         * riscv-tdep.h: New file.
13695         * NEWS: Mention new target.
13696         * MAINTAINERS: Add entry for riscv.
13697
13698 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13699
13700         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
13701         fields within aggregates.
13702
13703 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
13704
13705         * record-btrace.c (btrace_print_lines): Change type of flags to
13706         gdb_disassembly_flags.
13707
13708 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13709
13710         * fbsd-nat.c: Include "inf-ptrace.h".
13711         (USE_SIGTRAP_SIGINFO): Conditionally define.
13712         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13713         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13714         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13715         function.
13716         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13717         Likewise.
13718         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13719         Likewise.
13720         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13721         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13722         "supports_stopped_by_hw_breakpoint" target methods.
13723
13724 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13725
13726         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13727         * fbsd-nat.c (debug_fbsd_nat): New variable.
13728         (show_fbsd_nat_debug): New function.
13729         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13730         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13731
13732 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13733
13734         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13735         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13736         prototype.
13737         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13738         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13739         method.
13740
13741 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13742
13743         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13744         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13745
13746 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13747
13748         * charset.c (struct charset_vector): New.
13749         (charsets): Change type to charset_vector.
13750         (find_charset_names): Adjust.
13751         (add_one): Adjust.
13752         (_initialize_charset): Adjust.
13753
13754 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13755
13756         * progspace.h (struct program_space) <deleted_solibs>: Change
13757         type to std::vector<std::string>.
13758         * progspace.c (clear_program_space_solib_cache): Adjust.
13759         * breakpoint.c (print_solib_event): Adjust.
13760         (check_status_catch_solib): Adjust.
13761         * solib.c (update_solib_list): Adjust.
13762         * ui-out.h (class ui_out) <field_string>: New overload.
13763         * ui-out.c (ui_out::field_string): New overload.
13764
13765 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13766
13767         * progspace.h (struct program_space): Add constructor and
13768         destructor, initialize fields.
13769         (add_program_space): Remove.
13770         * progspace.c (add_program_space): Rename to...
13771         (program_space::program_space): ... this.
13772         (release_program_space): Rename to...
13773         (program_space::~program_space): ... this.
13774         (delete_program_space): Use delete to delete program_space.
13775         (initialize_progspace): Use new to allocate program_space.
13776         * inferior.c (add_inferior_with_spaces): Likewise.
13777         (clone_inferior_command): Likewise.
13778         * infrun.c (follow_fork_inferior): Likewise.
13779         (handle_vfork_child_exec_or_exit): Likewise.
13780
13781 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13782
13783         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13784         (delim_string_to_char_ptr_vec): Return std::vector of
13785         gdb::unique_xmalloc_ptr.
13786         (dirnames_to_char_ptr_vec_append): Take std::vector of
13787         gdb::unique_xmalloc_ptr.
13788         (dirnames_to_char_ptr_vec): Return std::vector of
13789         gdb::unique_xmalloc_ptr.
13790         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13791         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13792         (delim_string_to_char_ptr_vec): Return an std::vector of
13793         gdb::unique_xmalloc_ptr, adjust the code.
13794         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13795         gdb::unique_xmalloc_ptr, adjust the code.
13796         (dirnames_to_char_ptr_vec): Return an std::vector of
13797         gdb::unique_xmalloc_ptr, adjust the code.
13798         * auto-load.c (auto_load_safe_path_vec): Change type to
13799         std::vector of gdb::unique_xmalloc_ptr.
13800         (auto_load_expand_dir_vars): Return an std::vector of
13801         gdb::unique_xmalloc_ptr, adjust the code.
13802         (auto_load_safe_path_vec_update): Adjust.
13803         (filename_is_in_auto_load_safe_path_vec): Adjust.
13804         (auto_load_objfile_script_1): Adjust.
13805         * build-id.c (build_id_to_debug_bfd): Adjust.
13806         * linux-thread-db.c (thread_db_load_search): Adjust.
13807         * source.c (add_path): Adjust.
13808         (openp): Adjust.
13809         * symfile.c (find_separate_debug_file): Adjust.
13810         * utils.c (do_free_char_ptr_vec): Remove.
13811         (make_cleanup_free_char_ptr_vec): Remove.
13812
13813 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13814
13815         PR gdb/22907
13816         * common/pathstuff.c: Conditionally include "<windows.h>".
13817
13818 2018-03-01  Georg Sauthoff  <mail@georg.so>
13819
13820         PR gdb/22888
13821         * gcore.in: Quote variables and switch interpreter to bash.
13822
13823 2018-03-01  Tom Tromey  <tom@tromey.com>
13824
13825         * dwarf2read.c (alloc_discriminant_info): Fix default_index
13826         assertion.  Add assertion for discriminant_index.
13827         (quirk_rust_enum): Use correct base type name in univariant case.
13828
13829 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13830
13831         * record.c (get_call_history_modifiers): Return a
13832         record_print_flags.
13833         (cmd_record_call_history): Adjust.
13834         * record-btrace.c (record_btrace_call_history): Adjust.
13835         (record_btrace_call_history_range): Adjust.
13836         (record_btrace_call_history_from): Adjust.
13837         * target-debug.h (target_debug_print_record_print_flags): New.
13838         * target-delegates.c: Re-generate.
13839         * target.c (target_call_history): Change flags type.
13840         (target_call_history_from): Likewise.
13841         (target_call_history_range): Likewise.
13842         * target.h (struct target_ops) <target_call_history>: Likewise.
13843         (target_call_history_from): Likewise.
13844         (target_call_history_range): Likewise.
13845
13846 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13847             Simon Marchi  <simon.marchi@polymtl.ca>
13848
13849         * common/common-utils.c: Include "sys/stat.h".
13850         (is_regular_file): Move here from "source.c"; change return
13851         type to "bool".
13852         * common/common-utils.h (is_regular_file): New prototype.
13853         * common/pathstuff.c (contains_dir_separator): New function.
13854         * common/pathstuff.h (contains_dir_separator): New prototype.
13855         * source.c: Don't include "sys/stat.h".
13856         (is_regular_file): Move to "common/common-utils.c".
13857
13858 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13859
13860         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13861         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13862         * auto-load.c: Include "common/pathstuff.h".
13863         * common/common-def.h (current_directory): Move here.
13864         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13865         function.
13866         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13867         prototype.
13868         * common/pathstuff.c: New file.
13869         * common/pathstuff.h: New file.
13870         * compile/compile.c: Include "common/pathstuff.h".
13871         * defs.h (current_directory): Move to "common/common-defs.h".
13872         * dwarf2read.c: Include "common/pathstuff.h".
13873         * exec.c: Likewise.
13874         * guile/scm-safe-call.c: Likewise.
13875         * linux-thread-db.c: Likewise.
13876         * main.c: Likewise.
13877         * nto-tdep.c: Likewise.
13878         * objfiles.c: Likewise.
13879         * source.c: Likewise.
13880         * symtab.c: Likewise.
13881         * utils.c: Include "common/pathstuff.h".
13882         (gdb_realpath): Move to "common/pathstuff.c".
13883         (gdb_realpath_keepfile): Likewise.
13884         (gdb_abspath): Likewise.
13885         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13886         (gdb_realpath_keepfile): Likewise.
13887         (gdb_abspath): Likewise.
13888
13889 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13890
13891         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13892         wildcard process pid for super_resume for kernels with a
13893         specific bug.
13894
13895 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13896
13897         * compile/compile.c (get_args): Add additional comments
13898         explaining function.
13899
13900 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13901             Tom Tromey  <tom@tromey.com>
13902
13903         * target.h (memory_write_request_s): Remove typedef.  Don't define
13904         VEC.
13905         (target_write_memory_blocks): Change argument to std::vector.
13906         (struct memory_write_request): Add constructor.
13907         * target-memory.c (compare_block_starting_address): Return bool.
13908         Change argument types.
13909         (claim_memory): Change arguments to use std::vector.
13910         (split_regular_and_flash_blocks, blocks_to_erase)
13911         (compute_garbled_blocks): Likewise.
13912         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13913         (target_write_memory_blocks): Change argument to std::vector.
13914         * symfile.c (struct load_section_data): Add constructor and
13915         destructor.  Use std::vector for "requests".
13916         (struct load_progress_data): Add initializers.
13917         (load_section_callback): Update.  Use "new".
13918         (clear_memory_write_data): Remove.
13919         (generic_load): Update.
13920
13921 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13922
13923         * arch/aarch64.h: Use common/tdesc.h.
13924
13925 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13926
13927         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13928         architecture with a 64-bit ABI.
13929
13930 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13931
13932         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13933         ahead of target description loading.
13934
13935 2018-02-26  Tom Tromey  <tom@tromey.com>
13936
13937         * stack.c (backtrace_command_1): Update.
13938         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13939         of "flags".
13940         * python/py-framefilter.c (py_print_frame)
13941         (gdbpy_apply_frame_filter): Change type of "flags".
13942         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13943         of "flags".
13944         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13945         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13946         * extension.h (enum frame_filter_flag): Rename from
13947         frame_filter_flags.
13948         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13949         (apply_ext_lang_frame_filter): Change type of "flags".
13950         * extension.c (apply_ext_lang_frame_filter): Change type of
13951         "flags".
13952         * extension-priv.h (struct extension_language_ops)
13953         <apply_frame_filter>: Change type of "flags".
13954
13955 2018-02-26  Tom Tromey  <tom@tromey.com>
13956
13957         PR python/16497:
13958         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13959         off-by-one in py_end computation.
13960         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13961         PRINT_MORE_FRAMES.
13962         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13963         constant.
13964
13965 2018-02-26  Tom Tromey  <tom@tromey.com>
13966
13967         * dwarf2read.c (struct variant_field): New.
13968         (struct nextfield) <variant>: New field.
13969         (dwarf2_add_field): Handle DW_TAG_variant_part.
13970         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13971         discriminated union.
13972         (read_structure_type): Handle DW_TAG_variant_part.
13973         (handle_struct_member_die): New function, extracted from
13974         process_structure_scope.  Handle DW_TAG_variant.
13975         (process_structure_scope): Handle discriminated unions.  Call
13976         handle_struct_member_die.
13977
13978 2018-02-26  Tom Tromey  <tom@tromey.com>
13979
13980         * rust-lang.h (rust_last_path_segment): Declare.
13981         * rust-lang.c (rust_last_path_segment): Now public.  Change
13982         contract.
13983         (struct disr_info): Remove.
13984         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13985         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13986         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13987         (rust_enum_p, rust_enum_variant): New function.
13988         (rust_underscore_fields): Remove "offset" parameter.
13989         (rust_print_enum): New function.
13990         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13991         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13992         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13993         enums.
13994         (rust_internal_print_type): New function, from rust_print_type.
13995         Remove enum code.
13996         (rust_print_type): Call rust_internal_print_type.
13997         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13998         Update enum handling.
13999         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14000         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14001         (rust_union_quirks): New functions.
14002         (process_full_comp_unit, process_full_type_unit): Call
14003         rust_union_quirks.
14004         (process_structure_scope): Update rust_unions if necessary.
14005
14006 2018-02-26  Tom Tromey  <tom@tromey.com>
14007
14008         * value.h (value_union_variant): Declare.
14009         * valops.c (value_union_variant): New function.
14010         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14011         (struct discriminant_info): New.
14012         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14013         enumerator.
14014         (struct main_type) <flag_discriminated_union>: New field.
14015
14016 2018-02-26  Tom Tromey  <tom@tromey.com>
14017
14018         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14019         unittests/unpack-selftests.c.
14020         * unittests/unpack-selftests.c: New file.
14021         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14022
14023 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14024
14025         * dwarf2read.c (struct partial_die_info) <read>: New method.
14026         (read_partial_die): Remove the declaration.
14027         (load_partial_dies): Update.
14028         (partial_die_info::partial_die_info):
14029         (read_partial_die): Change it to partial_die_info::read.
14030
14031 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14032
14033         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14034         (fixup_partial_die): Remove declaration.
14035         (scan_partial_symbols): Update.
14036         (partial_die_parent_scope): Likewise.
14037         (partial_die_full_name): Likewise.
14038         (fixup_partial_die): Change it to partial_die_info::fixup.
14039
14040 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14041
14042         * dwarf2read.c (read_partial_die): Update the declaration.
14043         (load_partial_dies): Caller update.
14044         (read_partial_die): Remove one argument abbrev_len.
14045
14046 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14047
14048         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14049         assignment operator.
14050         (load_partial_dies): Use ctor and copy ctor.
14051         (read_partial_die): Update.
14052         (dwarf2_cu::find_partial_die): Use ctor.
14053
14054 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14055
14056         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14057         (find_partial_die_in_comp_unit): Change it to
14058         dwarf2_cu::find_partial_die.
14059         (find_partial_die): Update.
14060
14061 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14062
14063         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14064         is NULL.
14065
14066 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14067
14068         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14069
14070 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14071
14072         * arch/amd64.h: Use common/tdesc.h.
14073         * arch/i386.c: Likewise.
14074         * arch/i386.h: Likewise.
14075         * arch/tic6x.c: Likewise.
14076         * arch/tdesc.h: Move file from here...
14077         * common/tdesc.h: ...to here.
14078         * features/aarch64-core.c: Regenerate.
14079         * features/aarch64-fpu.c: Regenerate.
14080         * features/i386/32bit-avx.c: Regenerate.
14081         * features/i386/32bit-avx512.c: Regenerate.
14082         * features/i386/32bit-core.c: Regenerate.
14083         * features/i386/32bit-linux.c: Regenerate.
14084         * features/i386/32bit-mpx.c: Regenerate.
14085         * features/i386/32bit-pkeys.c: Regenerate.
14086         * features/i386/32bit-sse.c: Regenerate.
14087         * features/i386/64bit-avx.c: Regenerate.
14088         * features/i386/64bit-avx512.c: Regenerate.
14089         * features/i386/64bit-core.c: Regenerate.
14090         * features/i386/64bit-linux.c: Regenerate.
14091         * features/i386/64bit-mpx.c: Regenerate.
14092         * features/i386/64bit-pkeys.c: Regenerate.
14093         * features/i386/64bit-segments.c: Regenerate.
14094         * features/i386/64bit-sse.c: Regenerate.
14095         * features/i386/x32-core.c: Regenerate.
14096         * features/tic6x-c6xp.c: Regenerate.
14097         * features/tic6x-core.c: Regenerate.
14098         * features/tic6x-gp.c: Regenerate.
14099         * target-descriptions.c: Use common/tdesc.h.
14100         * target-descriptions.h: Likewise.
14101
14102 2018-02-24  Tom Tromey  <tom@tromey.com>
14103
14104         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14105         (try_thread_db_load_from_dir, thread_db_load_search): Use
14106         std::string.
14107         (info_auto_load_libthread_db_compare): Return bool.  Change
14108         argument types.
14109         (info_auto_load_libthread_db): Use std::vector, std::string.
14110         Remove cleanups.
14111
14112 2018-02-24  Tom Tromey  <tom@tromey.com>
14113
14114         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14115         std::string.
14116         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14117         std::string*.
14118         * gdbarch.c: Rebuild.
14119         * gdbarch.h: Rebuild.
14120         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14121         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14122         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14123         std::string*.
14124
14125 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14126
14127         * gdbtypes.h (sect_offset): Change type to uint64_t.
14128         (sect_offset_str): New function.
14129         * dwarf2read.c (create_addrmap_from_aranges): Use
14130         sect_offset_str.
14131         (error_check_comp_unit_head): Likewise.
14132         (create_debug_type_hash_table): Likewise.
14133         (read_cutu_die_from_dwo): Likewise.
14134         (init_cutu_and_read_dies): Likewise.
14135         (init_cutu_and_read_dies_no_follow): Likewise.
14136         (process_psymtab_comp_unit_reader): Likewise.
14137         (partial_die_parent_scope): Likewise.
14138         (peek_die_abbrev): Likewise.
14139         (process_queue): Likewise.
14140         (dwarf2_physname): Likewise.
14141         (read_namespace_alias): Likewise.
14142         (read_import_statement): Likewise.
14143         (create_dwo_cu_reader): Likewise.
14144         (create_cus_hash_table): Likewise.
14145         (lookup_dwo_cutu): Likewise.
14146         (inherit_abstract_dies): Likewise.
14147         (read_func_scope): Likewise.
14148         (read_call_site_scope): Likewise.
14149         (dwarf2_add_member_fn): Likewise.
14150         (read_common_block): Likewise.
14151         (read_module_type): Likewise.
14152         (read_typedef): Likewise.
14153         (read_subrange_type): Likewise.
14154         (load_partial_dies): Likewise.
14155         (read_partial_die): Likewise.
14156         (find_partial_die): Likewise.
14157         (read_str_index): Likewise.
14158         (dwarf2_string_attr): Likewise.
14159         (build_error_marker_type): Likewise.
14160         (lookup_die_type): Likewise.
14161         (dump_die_shallow): Likewise.
14162         (follow_die_ref): Likewise.
14163         (dwarf2_fetch_die_loc_sect_off): Likewise.
14164         (dwarf2_fetch_constant_bytes): Likewise.
14165         (follow_die_sig): Likewise.
14166         (get_signatured_type): Likewise.
14167         (get_DW_AT_signature_type): Likewise.
14168         (dwarf2_find_containing_comp_unit): Likewise.
14169         (set_die_type): Likewise.
14170
14171 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14172
14173         * arch/aarch64.c: Include "common-defs.h".
14174         * arch/amd64.c: Likewise.
14175         * arch/i386.c: Likewise.
14176
14177 2018-02-21  Tom Tromey  <tom@tromey.com>
14178
14179         * value.h: (extract_field_op): Update.
14180         * eval.c (extract_field_op): Return a const char *.
14181         * expression.h (parse_expression_for_completion): Update.
14182         * completer.c (complete_expression): Update.
14183         (add_struct_fields): Make fieldname const.
14184         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14185         (mark_completion_tag, parse_exp_in_context_1): Update.
14186         (parse_expression_for_completion): Change "name" to
14187         unique_xmalloc_ptr*.
14188
14189 2018-02-21  Tom Tromey  <tom@tromey.com>
14190
14191         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14192
14193 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14194
14195         * avr-tdep.c (avr_read_pc): Change parameter type to
14196         readable_regcache.
14197         * gdbarch.sh (read_pc): Likewise.
14198         * gdbarch.c: Re-generated.
14199         * gdbarch.h: Re-generated.
14200         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14201         readable_regcache.
14202         * ia64-tdep.c (ia64_read_pc): Likewise.
14203         * mips-tdep.c (mips_read_pc): Likewise.
14204         * spu-tdep.c (spu_read_pc): Likewise.
14205
14206 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14207
14208         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14209         * regcache-dump.c: New file.
14210         * regcache.c: Move register_dump to regcache-dump.c.
14211         (maintenance_print_registers): Likewise.
14212         (maintenance_print_raw_registers): Likewise.
14213         (maintenance_print_cooked_registers): Likewise.
14214         (maintenance_print_register_groups): Likewise.
14215         (maintenance_print_remote_registers): Likewise.
14216         (_initialize_regcache): Likewise.
14217         * regcache.h (register_dump): Moved from regcache.c.
14218
14219 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14220
14221         * regcache.c (regcache::regcache): Update.
14222         (regcache::invalidate): Move it to detached_regcache::invalidate.
14223         (get_thread_arch_aspace_regcache): Update.
14224         (regcache::raw_update): Update.
14225         (regcache::cooked_read): Remove some code.
14226         (regcache::cooked_read_value): Likewise.
14227         (regcache::raw_write): Remove assert on m_readonly_p.
14228         (regcache::raw_supply_integer): Move it to
14229         detached_regcache::raw_supply_integer.
14230         (regcache::raw_supply_zeroed): Likewise.
14231         * regcache.h (detached_regcache) <raw_supply_integer>: New
14232         declaration.
14233         <raw_supply_zeroed, invalidate>: Likewise.
14234         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14235         <invalidate>: Likewise.
14236         <m_readonly_p>: Removed.
14237
14238 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14239
14240         * infcmd.c (get_return_value): Let stop_regs point to
14241         get_current_regcache.
14242         * regcache.c (regcache::regcache): Remove.
14243         (register_dump_reg_buffer): New class.
14244         (regcache_print): Adjust.
14245         * regcache.h (regcache): Remove constructors.
14246
14247 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14248
14249         * regcache.c (class register_dump): New class.
14250         (register_dump_regcache, register_dump_none): New class.
14251         (register_dump_remote, register_dump_groups): New class.
14252         (regcache_print): Update.
14253         * regcache.h (regcache_dump_what): Move it to regcache.c.
14254         (regcache) <dump>: Remove.
14255
14256 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14257
14258         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14259          reg_buffer_rw *.
14260         (jit_unwind_reg_set_impl): Call raw_supply.
14261         (jit_frame_sniffer): Use reg_buffer_rw.
14262         * record-full.c (record_full_core_regbuf): Change its type.
14263         (record_full_core_open_1): Use reg_buffer_rw.
14264         (record_full_close): Likewise.
14265         (record_full_core_fetch_registers): Use regcache->raw_supply.
14266         (record_full_core_store_registers): Likewise.
14267         * regcache.c (regcache::get_register_status): Move it to
14268         reg_buffer.
14269         (regcache_raw_set_cached_value): Remove.
14270         (regcache::raw_set_cached_value): Remove.
14271         (regcache::raw_write): Call raw_supply.
14272         (regcache::raw_supply): Move it to reg_buffer_rw.
14273         * regcache.h (regcache_raw_set_cached_value): Remove.
14274         (reg_buffer_rw): New class.
14275
14276 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14277
14278         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14279         readonly_detached_regcache.
14280         (dummy_frame_prev_register): Use regcache->cooked_read.
14281         * frame.c (frame_save_as_regcache): Change return type.
14282         (frame_pop): Update.
14283         * frame.h (frame_save_as_regcache): Update declaration.
14284         * inferior.h (get_infcall_suspend_state_regcache): Update
14285         declaration.
14286         * infrun.c (infcall_suspend_state) <registers>: use
14287         readonly_detached_regcache.
14288         (save_infcall_suspend_state): Don't use regcache_dup.
14289         (get_infcall_suspend_state_regcache): Change return type.
14290         * linux-fork.c (struct fork_info) <savedregs>: Change to
14291         readonly_detached_regcache.
14292         <pc>: New field.
14293         (fork_save_infrun_state): Don't use regcache_dup.
14294         (info_checkpoints_command): Adjust.
14295         * mi/mi-main.c (register_changed_p): Update declaration.
14296         (mi_cmd_data_list_changed_registers): Use
14297         readonly_detached_regcache.
14298         (register_changed_p): Change parameter type to
14299         readonly_detached_regcache.
14300         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14301         readonly_detached_regcache.
14302         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14303         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14304         New.
14305         (regcache::save): Move it to reg_buffer.
14306         (regcache::restore): Change parameter type.
14307         (regcache_dup): Remove.
14308         * regcache.h (reg_buffer) <save>: New method.
14309         (readonly_detached_regcache): New class.
14310         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14311         readonly_detached_regcache.
14312         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14313
14314 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14315
14316         * frame.c (frame_save_as_regcache): Use regcache method save.
14317         (frame_pop): Use regcache method restore.
14318         * infrun.c (restore_infcall_suspend_state): Likewise.
14319         * linux-fork.c (fork_load_infrun_state): Likewise.
14320         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14321         save.
14322         * regcache.c (regcache_save): Remove.
14323         (regcache::restore): More asserts.
14324         (regcache_cpy): Remove.
14325         * regcache.h (regcache_save): Remove the declaration.
14326         (regcache::restore): Move from private to public.
14327         Remove the friend declaration of regcache_cpy.
14328         (regcache_cpy): Remove declaration.
14329
14330 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14331
14332         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14333         parameter type to 'readable_regcache *'.
14334         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14335         * arm-tdep.c (arm_neon_quad_read): Likewise.
14336         (arm_pseudo_read): Likewise.
14337         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14338         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14339         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14340         * gdbarch.c: Re-generated.
14341         * gdbarch.h: Re-generated.
14342         * gdbarch.sh (pseudo_register_read): Change parameter type to
14343         'readable_regcache *'.
14344         (pseudo_register_read_value): Likewise.
14345         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14346         (h8300_pseudo_register_read): Likewise.
14347         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14348         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14349         (i386_pseudo_register_read_into_value): Likewise.
14350         (i386_pseudo_register_read_value): Likewise.
14351         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14352         declaration.
14353         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14354         * m32c-tdep.c (m32c_raw_read): Likewise.
14355         (m32c_read_flg): Likewise.
14356         (m32c_banked_register): Likewise.
14357         (m32c_banked_read): Likewise.
14358         (m32c_sb_read): Likewise.
14359         (m32c_part_read): Likewise.
14360         (m32c_cat_read): Likewise.
14361         (m32c_r3r2r1r0_read): Likewise.
14362         (m32c_pseudo_register_read): Likewise.
14363         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14364         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14365         (mep_pseudo_cr64_read): Likewise.
14366         (mep_pseudo_register_read): Likewise.
14367         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14368         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14369         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14370         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14371         (regcache::cooked_read): Likewise.
14372         (regcache::cooked_read_value): Likewise.
14373         (regcache_cooked_read_signed):
14374         (regcache::cooked_read): Likewise.
14375         * regcache.h (readable_regcache): New class.
14376         (regcache): Inherit readable_regcache.  Move some methods to
14377         readable_regcache.
14378         * rl78-tdep.c (rl78_pseudo_register_read): Change
14379         parameter type to 'readable_regcache *'.
14380         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14381         (e500_pseudo_register_read): Change parameter type to
14382         'readable_regcache *'.
14383         (dfp_pseudo_register_read): Likewise.
14384         (vsx_pseudo_register_read): Likewise.
14385         (efpr_pseudo_register_read): Likewise.
14386         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14387         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14388         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14389         (sh64_pseudo_register_read): Likewise.
14390         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14391         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14392         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14393         (spu_pseudo_register_read): Likewise.
14394         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14395         (xtensa_pseudo_register_read): Likewise.
14396
14397 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14398
14399         * regcache.c (regcache::regcache): Call reg_buffer ctor.
14400         (regcache::arch): Move it to reg_buffer::arch.
14401         (regcache::register_buffer): Likewise.
14402         (regcache::assert_regnum): Likewise.
14403         (regcache::num_raw_registers): Likewise.
14404         * regcache.h (reg_buffer): New class.
14405         (regcache): Inherit reg_buffer.
14406
14407 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
14408
14409         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14410         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14411
14412 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
14413
14414         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14415
14416 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
14417
14418         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14419         (SFILES): Remove common/*.c files.
14420         (COMMON_OBS): Remove some *.o files built from common/*.c files.
14421         * common/common.host: Add common reference.
14422         * configure.ac: Likewise.
14423         * configure: Regenerate.
14424
14425 2018-02-16  Yao Qi  <yao.qi@linaro.org>
14426
14427         * block.c (block_namespace_info): Inherit allocate_on_obstack.
14428         (block_initialize_namespace): Use new.
14429         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
14430         (dwarf2_free_objfile): Use delete.
14431         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
14432         (copy_type_recursive): Use new.
14433         * gdb_obstack.h (allocate_on_obstack): New.
14434
14435 2018-02-15  Yao Qi  <yao.qi@linaro.org>
14436
14437         PR gdb/22849
14438         * inferior.c (exit_inferior_1): Reset inf->control.
14439
14440 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
14441
14442         * ada-lang.c (ada_to_fixed_value_create): Delete advance
14443         declaration.
14444
14445 2018-02-14  Pedro Alves  <palves@redhat.com>
14446
14447         * frame-unwind.c (frame_unwind_try_unwinder): Always call
14448         frame_cleanup_after_sniffer on exception.
14449
14450 2018-02-14  Tom Tromey  <tom@tromey.com>
14451
14452         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
14453         const.
14454         (solib_bfd_open): Make pathname const.
14455         * solib.c (solib_bfd_open): Make pathname const.
14456         * solib-spu.c (spu_bfd_fopen): Make name const.
14457         (spu_bfd_open): Make pathname const.
14458         * solib-darwin.c (darwin_bfd_open): Make pathname const.
14459         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
14460
14461 2018-02-14  Tom Tromey  <tom@tromey.com>
14462
14463         * symfile.c (symfile_bfd_open): Update.
14464         * source.h (openp, source_full_path_of, find_and_open_source):
14465         Change argument type to unique_xmalloc_ptr.
14466         * source.c (openp): Take a unique_xmalloc_ptr.
14467         (source_full_path_of, find_and_open_source): Likewise.
14468         (open_source_file, symtab_to_fullname): Update.
14469         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
14470         unique_xmalloc_ptr.
14471         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
14472         (exec_file_find): Update.
14473         * psymtab.c (psymtab_to_fullname): Update.
14474         * nto-tdep.h (nto_find_and_open_solib): Update.
14475         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
14476         unique_xmalloc_ptr.
14477         * exec.c (exec_file_attach): Update.
14478         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
14479         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
14480
14481 2018-02-14  Tom Tromey  <tom@tromey.com>
14482
14483         * solib.c: Include source.h.
14484         * nto-tdep.c: Include source.h.
14485         * mi/mi-cmd-env.c: Include source.h.
14486         * infcmd.c: Include source.h.
14487         * exec.c: Include source.h.
14488         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
14489         (add_path, directory_switch, source_path, init_source_path): Move
14490         declarations...
14491         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
14492         (add_path, directory_switch, source_path, init_source_path):
14493         ...here.
14494
14495 2018-02-14  Tom Tromey  <tom@tromey.com>
14496
14497         * solist.h (exec_file_find, solib_find): Return
14498         unique_xmalloc_ptr.
14499         (solib_bfd_fopen): Take a const char *.
14500         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
14501         (exec_file_find, solib_find): Likewise.
14502         (solib_bfd_fopen): Do not take ownership of "pathname".
14503         (solib_bfd_open): Use unique_xmalloc_ptr.
14504         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
14505         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
14506         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
14507         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
14508
14509 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
14510
14511         * ada-lang.c (name_match_type_from_name): Remove reference to
14512         ada_name_for_lookup in function's documentation.
14513         * ada-lang.h (ada_name_for_lookup): Delete declaration.
14514
14515 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14516
14517         * defs.h (enum openp_flags): New enum.
14518         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
14519         Move to enum openp_flags.
14520         (openp_flags): New enum flags.
14521         (openp): Change parameter type to openp_flags.
14522         * source.c (openp): Change parameter type to openp_flags.
14523         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
14524         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
14525
14526 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14527
14528         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
14529         per-command.
14530
14531 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14532
14533         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
14534         into...
14535         (class dwarf2_queue_guard): ...the destructor of this new class.
14536         (dw2_do_instantiate_symtab): Create instance of the new class
14537         dwarf2_queue_guard, remove cleanup.
14538
14539 2018-02-09  Tom Tromey  <tom@tromey.com>
14540
14541         * source.c (find_source_lines): Don't reference past the end of
14542         the vector.
14543
14544 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14545
14546         * remote.c (remote_btrace_maybe_reopen): Change error message.
14547         * btrace.c (btrace_enable): Likewise.
14548         (parse_xml_btrace): Likewise.
14549         (parse_xml_btrace_conf): Likewise.
14550
14551 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14552
14553         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
14554         (linux_enable_pt, linux_enable_bts): Call
14555         diagnose_perf_event_open_fail.
14556
14557 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14558
14559         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
14560         Remove parameter and change return type.  Update callers.  Move it.
14561         (linux_enable_bts, linux_enable_pt): Improve error message.
14562         (linux_enable_pt): Remove zero buffer size check.
14563         (linux_enable_btrace): Improve error messages.  Remove NULL return
14564         check.
14565
14566 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14567
14568         * btrace.c (btrace_enable): Remove target_supports_btrace call.
14569         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
14570         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
14571         (linux_supports_pt, linux_supports_btrace): Remove.
14572         (linux_enable_bts): Call cpu_supports_bts.
14573         * nat/linux-btrace.h (linux_supports_btrace): Remove.
14574         * remote.c (remote_supports_btrace): Remove.
14575         (init_remote_ops): Remove remote_supports_btrace.
14576         * target-delegates.c: Regenerated.
14577         * target.c (target_supports_btrace): Remove.
14578         * target.h (target_ops) <to_supports_btrace>: Remove
14579         (target_supports_btrace): Remove.
14580         * x86-linux-nat.c (x86_linux_create_target): Remove
14581         linux_supports_btrace.
14582
14583 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14584
14585         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
14586         btrace failed.
14587         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
14588         exception and use message in own exception.
14589
14590 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14591
14592         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
14593         (perf_event_pt_event_type): Use gdb_file_up.
14594         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
14595         scoped_fd, and scoped_mmap.
14596
14597 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14598
14599         * common/scoped_mmap.h: New.
14600         * unittests/scoped_mmap-selftest.c: New.
14601         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14602         unittests/scoped_mmap-selftest.c.
14603
14604 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14605
14606         * common/scoped_fd.h: New.
14607         * unittests/scoped_fd-selftest.c: New.
14608         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14609         unittests/scoped_fd-selftest.c.
14610
14611 2018-02-09  Tom Tromey  <tom@tromey.com>
14612
14613         * auto-load.c (auto_load_section_scripts): Use
14614         gdb::unique_xmalloc_ptr.
14615
14616 2018-02-09  Tom Tromey  <tom@tromey.com>
14617
14618         * auto-load.c (execute_script_contents): Use std::string.
14619
14620 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
14621
14622         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
14623         Python function, rather than a new command.
14624
14625 2018-02-08  Tom Tromey  <tom@tromey.com>
14626
14627         * solib.c (solib_find_1): Use std::string.
14628         (solib_bfd_fopen): Use unique_xmalloc_ptr.
14629
14630 2018-02-08  Tom Tromey  <tom@tromey.com>
14631
14632         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
14633
14634 2018-02-08  Tom Tromey  <tom@tromey.com>
14635
14636         * source.c (find_source_lines): Use gdb::def_vector.
14637
14638 2018-02-08  Tom Tromey  <tom@tromey.com>
14639
14640         * macrocmd.c (struct temporary_macro_definition): New.
14641         (macro_define_command): Use temporary_macro_definition.  Remove
14642         cleanups.
14643         (free_macro_definition_ptr): Remove.
14644
14645 2018-02-08  Tom Tromey  <tom@tromey.com>
14646
14647         * macroexp.c (maybe_expand): Use std::string.
14648
14649 2018-02-08  Tom Tromey  <tom@tromey.com>
14650
14651         * macroexp.c (struct macro_buffer): Add initializers for some
14652         members.
14653         (init_buffer, init_shared_buffer, free_buffer)
14654         (free_buffer_return_text): Remove.
14655         (macro_buffer): New constructors.
14656         (~macro_buffer): New destructor.
14657         (macro_buffer::set_shared): New method.
14658         (macro_buffer::resize_buffer, macro_buffer::appendc)
14659         (macro_buffer::appendmem): Now methods, not free functions.
14660         (set_token, append_tokens_without_splicing, stringify)
14661         (macro_stringify): Update.
14662         (gather_arguments): Change return type.  Remove argc_p argument,
14663         add args_ptr argument.  Use std::vector.
14664         (substitute_args): Remove argc argument.  Accept std::vector.
14665         (expand): Update.  Use std::vector.
14666         (scan, macro_expand, macro_expand_next): Update.
14667
14668 2018-02-08  Tom Tromey  <tom@tromey.com>
14669
14670         * symtab.c (default_collect_symbol_completion_matches_break_on):
14671         Use unique_xmalloc_ptr.
14672         * macroscope.h: (sal_macro_scope, user_macro_scope)
14673         (default_macro_scope): Return unique_xmalloc_ptr.
14674         * macroscope.c (sal_macro_scope, user_macro_scope)
14675         (default_macro_scope): Return unique_xmalloc_ptr.
14676         * macroexp.h (macro_expand, macro_expand_once): Return
14677         unique_xmalloc_ptr.
14678         * macroexp.c (macro_expand, macro_expand_once): Return
14679         unique_xmalloc_ptr.
14680         * macrocmd.c (macro_expand_command, macro_expand_once_command)
14681         (info_macro_command, info_macros_command): Use
14682         unique_xmalloc_ptr.
14683         * compile/compile-c-support.c (write_macro_definitions): Use
14684         unique_xmalloc_ptr.
14685         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
14686
14687 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
14688
14689         * value.c (value_static_field): Assign field type instead of
14690         containing type when returning an optimized out value.
14691
14692 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14693
14694         * ft32-tdep.c (ft32_read_pc): Remove.
14695         (ft32_write_pc): Remove.
14696         (ft32_gdbarch_init): Update.
14697         * m32r-tdep.c (m32r_read_pc): Remove.
14698         (m32r_gdbarch_init): Update.
14699         * mep-tdep.c (mep_read_pc): Remove.
14700         (mep_gdbarch_init): Update.
14701         * microblaze-tdep.c (microblaze_write_pc): Remove.
14702         (microblaze_gdbarch_init): Update.
14703         * mn10300-tdep.c (mn10300_read_pc): Remove.
14704         (mn10300_write_pc): Remove.
14705         (mn10300_gdbarch_init): Update.
14706         * moxie-tdep.c (moxie_read_pc): Remove.
14707         (moxie_write_pc): Remove.
14708         (moxie_gdbarch_init): Update.
14709
14710 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14711
14712         * expprint.c (print_subexp_standard): Handle
14713         OP_F77_UNDETERMINED_ARGLIST.
14714         (dump_subexp_body_standard): Likewise.
14715
14716 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
14717
14718         * target-descriptions.c (tdesc_element_visitor) Add empty
14719         implementations.
14720         (tdesc_type): Move make_gdb_type from here.
14721         (tdesc_type_builtin): Likewise.
14722         (tdesc_type_vector): Likewise.
14723         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14724         (make_gdb_type_struct): Move from tdesc_type_with_fields.
14725         (make_gdb_type_union): Likewise.
14726         (make_gdb_type_flags): Likewise.
14727         (make_gdb_type_enum): Likewise.
14728         (make_gdb_type): New function.
14729         (tdesc_register_type): Use static make_gdb_type.
14730
14731 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
14732
14733         * infcmd.c (default_print_one_register_info): Align natural-format
14734         column values consistently one under another.
14735         (pad_to_column): New function.
14736
14737 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
14738
14739         * dwarf2read.c (dwarf2_physname): Move commment.
14740
14741 2018-02-01  Leszek Swirski  <leszeks@google.com>
14742
14743         * varobj.c (varobj_formatted_print_options): Allow recursive
14744         pretty printing if pretty printing is enabled.
14745
14746 2018-02-01  Leszek Swirski  <leszeks@google.com>
14747
14748         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14749         names after a structop as a filename.
14750
14751 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14752
14753         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14754         (arm_record_coproc_data_proc): Likewise.
14755
14756 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14757
14758         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14759
14760 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
14761
14762         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14763         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14764
14765 2018-01-31  Pedro Alves  <palves@redhat.com>
14766
14767         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14768         * inflow.c (child_terminal_save_inferior): Wrap reference to
14769         tcgetpgrp in HAVE_TERMIOS_H.
14770         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14771         _WIN32.
14772         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14773         always iterate over all inferiors.
14774         (gdbsim_cntrl_c): Adjust.
14775         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14776
14777 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14778
14779         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14780         index type is objfile-owned if the element type is as well.
14781
14782 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14783
14784         GDB 8.1 released.
14785
14786 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14787
14788         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14789         "features/s390x-linux64.c".
14790         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14791         s390_linux32 and s390x_linux64.
14792         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14793         default tdesc.
14794         * s390-tdep.c: Include "features/s390-linux32.c" and
14795         "features/s390x-linux64.c".
14796         (s390_tdesc_valid): Add check for tdesc_has_registers.
14797         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14798         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14799         tdesc_s390x_linux64.
14800         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14801         tdesc_s390x_linux64 to...
14802         * s390-tdep.h: ...here.
14803
14804 2018-01-30  Pedro Alves  <palves@redhat.com>
14805
14806         PR gdb/13211
14807         * config.in, configure: Regenerate.
14808         * configure.ac: Check for getpgid.
14809         * go32-nat.c (go32_pass_ctrlc): New.
14810         (go32_target): Install it.
14811         * inf-child.c (inf_child_target): Install
14812         child_terminal_save_inferior, child_pass_ctrlc and
14813         child_interrupt.
14814         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14815         (inf_ptrace_target): No longer install it.
14816         * infcmd.c (interrupt_target_1): Adjust.
14817         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14818         (child_interrupt): Declare.
14819         (inferior::terminal_state): New.
14820         * inflow.c (struct terminal_info): Update comments.
14821         (inferior_process_group): Delete.
14822         (terminal_is_ours): Delete.
14823         (gdb_tty_state): New.
14824         (child_terminal_init): Adjust.
14825         (is_gdb_terminal, sharing_input_terminal_1)
14826         (sharing_input_terminal): New functions.
14827         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14828         Set the process's actual process group in the foreground if
14829         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14830         mark terminal as the inferior's if not sharing GDB's terminal.
14831         Don't check attach_flag.
14832         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14833         pass down a target_terminal_state.
14834         (child_terminal_save_inferior): New, factored out from ...
14835         (child_terminal_ours_1): ... this.  Handle
14836         target_terminal_state::is_ours_for_output.
14837         (child_interrupt, child_pass_ctrlc): New.
14838         (inflow_inferior_exit): Clear the inferior's terminal_state.
14839         (copy_terminal_info): Copy the inferior's terminal state.
14840         (_initialize_inflow): Remove reference to terminal_is_ours.
14841         * inflow.h (inferior_process_group): Delete.
14842         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14843         * procfs.c (procfs_target): Don't install procfs_interrupt.
14844         (procfs_interrupt): Delete.
14845         * remote.c (remote_serial_quit_handler): Adjust.
14846         (remote_interrupt): Remove ptid parameter.  Adjust.
14847         * target-delegates.c: Regenerate.
14848         * target.c: Include "terminal.h".
14849         (target_terminal::terminal_state): Rename to ...
14850         (target_terminal::m_terminal_state): ... this.
14851         (target_terminal::init): Adjust.
14852         (target_terminal::inferior): Adjust to per-inferior
14853         terminal_state.
14854         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14855         (target_terminal::ours, target_terminal::ours_for_output): Use
14856         target_terminal_is_ours_kind.
14857         (target_interrupt): Remove ptid parameter.  Adjust.
14858         (default_target_pass_ctrlc): Adjust.
14859         * target.h (target_ops::to_terminal_save_inferior): New field.
14860         (target_ops::to_interrupt): Remove ptid_t parameter.
14861         (target_interrupt): Remove ptid_t parameter.  Update comment.
14862         (target_pass_ctrlc): Update comment.
14863         * target/target.h (target_terminal_state): New scoped enum,
14864         factored out of ...
14865         (target_terminal::terminal_state): ... here.
14866         (target_terminal::inferior): Update comments.
14867         (target_terminal::restore_inferior): New.
14868         (target_terminal::is_inferior, target_terminal::is_ours)
14869         (target_terminal::is_ours_for_output): Adjust.
14870         (target_terminal::scoped_restore_terminal_state): Adjust to
14871         rename, and call restore_inferior() instead of inferior().
14872         (target_terminal::scoped_restore_terminal_state::m_state): Change
14873         type.
14874         (target_terminal::terminal_state): Rename to ...
14875         (target_terminal::m_terminal_state): ... this and change type.
14876
14877 2018-01-30  Pedro Alves  <palves@redhat.com>
14878
14879         * linux-nat.c (wait_for_signal): New function.
14880         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14881         directly.
14882         (async_terminal_is_ours)
14883         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14884         (linux_nat_add_target): Don't override
14885         to_terminal_inferior/to_terminal_ours.
14886
14887 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14888
14889         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14890
14891 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14892
14893         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14894         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14895         dwarf2_per_objfile_free here.
14896         (dwarf2_per_objfile_free): Remove.
14897         (_initialize_dwarf2_read): Don't register
14898         dwarf2_per_objfile_free as a registry cleanup.
14899
14900 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14901
14902         Avoid compilation errors in MinGW native builds
14903
14904         The error is triggered by including python-internal.h, and the
14905         error message is:
14906
14907              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14908                       from build-gnulib/import/math.h:27,
14909                       from d:/usr/Python26/include/pyport.h:235,
14910                       from d:/usr/Python26/include/Python.h:58,
14911                       from python/python-internal.h:94,
14912                       from python/py-arch.c:24:
14913              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14914         using ::hypot;
14915                 ^~~~~
14916
14917         This happens because Python headers define 'hypot' to expand t
14918         '_hypot' in the Windows builds.
14919         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14920         'hypoth'.  This avoids a compilation error.
14921
14922 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14923
14924         * MAINTAINERS (Write After Approval): Fix ordering.
14925
14926 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14927
14928         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14929
14930 2018-01-26  Alan Modra  <amodra@gmail.com>
14931
14932         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14933         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14934         Remove nop.  Make const.  Comment.
14935         (powerpc32_plt_stub_so_2): New.
14936         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14937         Correct count.  Update uses.
14938         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14939         Move common code reading PLT entry word.  Correct
14940         powerpc32_plt_stub PLT address calculation.
14941         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14942         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14943         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14944         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14945         (ppc64_standard_linkage8): Likewise.
14946         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14947         Correct insns description.
14948         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14949
14950 2018-01-24  Pedro Alves  <palves@redhat.com>
14951
14952         GCC PR libstdc++/83906
14953         * gdbtypes.c (operator==(const dynamic_prop &,
14954         const dynamic_prop &)): New.
14955         (operator==(const range_bounds &, const range_bounds &)): New.
14956         (check_types_equal): Use them instead of memcmp.
14957         * gdbtypes.h (operator==(const dynamic_prop &,
14958         const dynamic_prop &)): Declare.
14959         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14960         (operator==(const range_bounds &, const range_bounds &)): Declare.
14961         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14962
14963 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14964
14965         * s390-linux-tdep.c (s390_record_address_mask)
14966         (s390_record_calc_disp_common, s390_record_calc_disp)
14967         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14968         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14969         (s390_process_record): Move to s390-tdep.c.
14970         (s390_linux_init_abi_any): Adjust.
14971         * s390-tdep.c (s390_record_address_mask)
14972         (s390_record_calc_disp_common, s390_record_calc_disp)
14973         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14974         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14975         (s390_process_record): Moved from s390-linux-tdep.c
14976         (s390_gdbarch_init): Adjust.
14977
14978 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14979
14980         * s390-linux-nat.c (s390-tdep.h): New include.
14981         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14982         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14983         (ALLDEPFILES): Add s390-tdep.c.
14984         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14985         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14986         * s390-tdep.h: ...this.  New file.
14987         * s390-linux-tdep.c (s390-tdep.h): New include.
14988         (_initialize_s390_tdep): Rename to...
14989         (_initialize_s390_linux_tdep): ...this and adjust.
14990         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14991         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14992         s390-tdep.h.
14993         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14994         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14995         (s390_is_partial_instruction, s390_software_single_step)
14996         (is_non_branch_ril, s390_displaced_step_copy_insn)
14997         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14998         (s390_prologue_data, s390_addr, s390_store, s390_load)
14999         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15000         (s390_register_call_saved, s390_guess_tracepoint_registers)
15001         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15002         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15003         (s390_pseudo_register_name, s390_pseudo_register_type)
15004         (s390_pseudo_register_read, s390_pseudo_register_write)
15005         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15006         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15007         (s390_addr_bits_remove, s390_address_class_type_flags)
15008         (s390_address_class_type_flags_to_name)
15009         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15010         (s390_function_arg_float, s390_function_arg_vector)
15011         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15012         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15013         (s390_frame_align, s390_register_return_value, s390_return_value)
15014         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15015         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15016         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15017         (s390_trad_frame_prev_register, s390_unwind_cache)
15018         (s390_prologue_frame_unwind_cache)
15019         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15020         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15021         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15022         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15023         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15024         (s390_frame_base_address, s390_local_base_address)
15025         (s390_frame_base, s390_gcc_target_options)
15026         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15027         (s390_validate_reg_range, s390_tdesc_valid)
15028         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15029         * s390-tdep.c: ...this.  New file.
15030
15031 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15032
15033         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15034         (s390_process_record, s390_gdbarch_tdep_alloc)
15035         (s390_linux_init_abi_any): Use/set new hook.
15036
15037 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15038
15039         * s390-linux-tdep.c (osabi.h): New include.
15040         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15041         (s390_linux_init_abi_any): New functions.
15042         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15043
15044 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15045
15046         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15047         tdesc_has_registers check
15048
15049 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15050
15051         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15052         (s390_validate_reg_range): New macro.
15053         (s390_gdbarch_init): Adjust.
15054
15055 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15056
15057         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15058         (s390_gdbarch_tdep_alloc): Adjust.
15059         (s390_gdbarch_init): Adjust.
15060
15061 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15062
15063         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15064         <have_tdb>: Change type to bool.
15065         (s390_gdbarch_tdep_alloc): Adjust.
15066         (s390_gdbarch_init): Adjust.
15067
15068 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15069
15070         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15071         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15072         (s390_gdbarch_tdep_alloc): New function.
15073         (s390_gdbarch_init): Allocate tdep at start and use its fields
15074         instead of separate variables.
15075
15076 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15077
15078         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15079         when looking for cached gdbarch and add comment for remaining.
15080
15081 2018-01-22  Pedro Alves  <palves@redhat.com>
15082             Sergio Durigan Junior  <sergiodj@redhat.com>
15083
15084         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15085         case.
15086
15087 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15088
15089         * MAINTAINERS: Update my company e-mail address.
15090
15091 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15092
15093         * regcache.c (cooked_write_test): New function.
15094         (_initialize_regcache): Register the test.
15095
15096 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15097
15098         * ia64-tdep.c (ia64_pseudo_register_read): Call
15099         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15100         * m32c-tdep.c (m32c_cat_read): Likewise.
15101         (m32c_r3r2r1r0_read): Likewise.
15102         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15103         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15104
15105 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15106
15107         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15108         method raw_read instead of regcache_raw_read.
15109         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15110         * arm-tdep.c (arm_neon_quad_read): Likewise.
15111         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15112         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15113         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15114         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15115         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15116         (i386_pseudo_register_read_into_value): Likewise.
15117         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15118         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15119         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15120         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15121         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15122         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15123         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15124         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15125         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15126
15127 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15128
15129         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15130         * configure.tgt: Remove target mt.
15131         * mt-tdep.c: Remove.
15132         * regcache.c (cooked_read_test): Remove the check for mt.
15133
15134 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15135
15136         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15137         instead of gdbarch_pseudo_register_read_value.
15138
15139 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15140
15141         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15142         language is Ada.
15143
15144 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15145
15146         * linespec.c (create_sals_line_offset): Remove code that preserved
15147         the symtab_and_line's line number.
15148
15149 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15150
15151         * varobj.c (varobj_create): Don't set valid_block when creating a
15152         floating varobj.
15153
15154 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15155
15156         * varobj.c (varobj_create): Remove out of date comment.
15157
15158 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15159
15160         PR mi/20395
15161         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15162         updating innermost block.
15163         * parse.c (innermost_block_tracker::update): Take extra type
15164         parameter, and check types match before updating innermost block.
15165         (write_dollar_variable): Update innermost block for registers.
15166         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15167         (innermost_block_tracker::innermost_block_tracker): Initialise
15168         m_types member.
15169         (innermost_block_tracker::reset): Take type parameter.
15170         (innermost_block_tracker::update): Take type parameter, and pass
15171         type through as needed.
15172         (innermost_block_tracker::m_types): New member.
15173         * varobj.c (varobj_create): Pass type when reseting innermost
15174         block.
15175
15176 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15177
15178         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15179         * ada-lang.c (resolve_subexp): Likewise.
15180         * breakpoint.c (set_breakpoint_condition) Likewise.
15181         (watch_command_1) Likewise.
15182         * c-exp.y (variable): Likewise.
15183         * d-exp.y (PrimaryExpression): Likewise.
15184         * f-exp.y (variable): Likewise.
15185         * go-exp.y (variable): Likewise.
15186         * m2-exp.y (variable): Likewise.
15187         * objfiles.c (objfile::~objfile): Likewise.
15188         * p-exp.y (variable): Likewise.
15189         * parse.c (innermost_block): Change type.
15190         * parser-defs.h (class innermost_block_tracker): New.
15191         (innermost_block): Change to innermost_block_tracker.
15192         * printcmd.c (display_command): Switch to innermost_block API.
15193         (do_one_display): Likewise.
15194         * rust-exp.y (do_one_display): Likewise.
15195         * symfile.c (clear_symtab_users): Likewise.
15196         * varobj.c (varobj_create): Switch to innermost_block API, replace
15197         use of innermost_block with block stored on varobj object.
15198
15199 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15200
15201         * expression.h (innermost_block): Remove declaration.
15202         * varobj.c: Add 'parser-defs.h' include.
15203
15204 2018-01-19  Tom Tromey  <tom@tromey.com>
15205
15206         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15207         symbols in the static and global blocks.
15208
15209 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15210
15211         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15212         gdb_ptrace.h, and move including gdb_wait.h ...
15213         * nat/linux-ptrace.h: ... to here.
15214
15215 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15216
15217         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15218         inf_ptrace_detach_success.
15219         (inf_ptrace_detach_success): Add inferior parameter, use it
15220         instead of inferior_ptid, pass it to detach_inferior.
15221         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15222         parameter.
15223         * inferior.c (detach_inferior): Add overload that takes an
15224         inferior object.
15225         * inferior.h (detach_inferior): Likewise.
15226         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15227         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15228         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15229
15230 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15231
15232         * target.h (struct target_ops) <to_detach>: Add inferior
15233         parameter.
15234         (target_detach): Likewise.
15235         * target.c (dispose_inferior): Pass inferior down.
15236         (target_detach): Pass inferior down.  Assert that it is equal to
15237         the current inferior.
15238         * aix-thread.c (aix_thread_detach): Pass inferior down.
15239         * corefile.c (core_file_command): Pass current_inferior() down.
15240         * corelow.c (core_detach): Add inferior parameter.
15241         * darwin-nat.c (darwin_detach): Likewise.
15242         * gnu-nat.c (gnu_detach): Likewise.
15243         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15244         * infcmd.c (detach_command): Pass current_inferior() down to
15245         target_detach.
15246         * infrun.c (follow_fork_inferior): Pass parent_inf to
15247         target_detach.
15248         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15249         target_detach.
15250         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15251         * linux-thread-db.c (thread_db_detach): Likewise.
15252         * nto-procfs.c (procfs_detach): Likewise.
15253         * procfs.c (procfs_detach): Likewise.
15254         * record.c (record_detach): Likewise.
15255         * record.h (struct inferior): Forward-declare.
15256         (record_detach): Add inferior parameter.
15257         * remote-sim.c (gdbsim_detach): Likewise.
15258         * remote.c (remote_detach_1): Likewise.
15259         (remote_detach): Likewise.
15260         (extended_remote_detach): Likewise.
15261         * sol-thread.c (sol_thread_detach): Likewise.
15262         * target-debug.h (target_debug_print_inferior_p): New macro.
15263         * target-delegates.c: Re-generate.
15264         * top.c (kill_or_detach): Pass inferior down to target_detach.
15265         * windows-nat.c (windows_detach): Add inferior parameter.
15266
15267 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15268
15269         * target.h (struct target_ops) <to_detach>: Remove args
15270         parameter.
15271         (target_detach): Likewise.
15272         * target.c (dispose_inferior): Adjust.
15273         (target_detach): Remove args parameter, adjust.
15274         * aix-thread.c (aix_thread_detach): Adjust.
15275         * corefile.c (core_file_command): Adjust.
15276         * corelow.c (core_detach): Adjust.
15277         * darwin-nat.c (darwin_detach): Adjust.
15278         * gnu-nat.c (gnu_detach): Adjust.
15279         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15280         * infcmd.c (detach_command): Adjust
15281         * infrun.c (follow_fork_inferior): Adjust.
15282         (handle_vfork_child_exec_or_exit): Adjust.
15283         * linux-fork.c (linux_fork_detach): Remove args parameter.
15284         * linux-fork.h (linux_fork_detach): Likewise.
15285         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15286         * linux-thread-db.c (thread_db_detach): Likewise.
15287         * nto-procfs.c (procfs_detach): Likewise.
15288         * procfs.c (procfs_detach): Likewise.
15289         (do_detach): Remove signo parameter.
15290         * record.c (record_detach): Remove args parameter.
15291         * record.h (record_detach): Likewise.
15292         * remote-sim.c (gdbsim_detach): Likewise.
15293         * remote.c (remote_detach_1): Likewise.
15294         (remote_detach): Likewise.
15295         (extended_remote_detach): Likewise.
15296         * sol-thread.c (sol_thread_detach): Likewise.
15297         * target-delegates.c: Re-generate.
15298         * top.c (struct qt_args) <args>: Remove field.
15299         (kill_or_detach): Don't pass args.
15300         (quit_force): Don't set args.
15301         * windows-nat.c (windows_detach): Remove args parameter.
15302
15303 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15304
15305         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15306         (arm_linux_init_abi): Install it.
15307
15308 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15309
15310         * osabi.c (gdb_osabi_names): Extend the regexp for
15311         arm-linux-gnueabihf.
15312
15313 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15314
15315         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15316         m_abbrevs.
15317         (abbrev_table::add_abbrev): Update.
15318         (abbrev_table::lookup_abbrev): Update.
15319
15320 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15321
15322         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15323
15324 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15325
15326         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15327         to "std::string".
15328
15329 2018-01-17  Tom Tromey  <tom@tromey.com>
15330
15331         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15332
15333 2018-01-17  Tom Tromey  <tom@tromey.com>
15334
15335         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15336         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15337         (create_array_type_with_stride): Update.
15338         * dwarf2read.c (set_die_type): Update.
15339
15340 2018-01-17  Tom Tromey  <tom@tromey.com>
15341
15342         * dwarf2read.c (delayed_method_info): Remove typedef.
15343         (dwarf2_cu::method_info): Now a std::vector.
15344         (add_to_method_list): Update.
15345         (free_delayed_list): Remove.
15346         (compute_delayed_physnames): Update.
15347         (process_full_comp_unit, process_full_type_unit): Clear the method
15348         list.  Remove cleanups.
15349         (psymtab_include_file_name): Add name_holder parameter.  Use
15350         unique_xmalloc_ptr.
15351         (dwarf_decode_lines): Update.
15352
15353 2018-01-17  Tom Tromey  <tom@tromey.com>
15354             Simon Marchi  <simon.marchi@ericsson.com>
15355
15356         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15357         (dwarf2_per_objfile::free_cached_comp_units)
15358         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15359         (init_cutu_and_read_dies_no_follow): Update.
15360         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15361         (dwarf2_cu::~dwarf2_cu): New.
15362         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15363         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15364
15365 2018-01-17  Tom Tromey  <tom@tromey.com>
15366             Simon Marchi  <simon.marchi@ericsson.com>
15367
15368         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15369         (struct die_reader_specs) <abbrev_table>: New member.
15370         (struct abbrev_table): Add constructor.
15371         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15372         <abbrev_obstack>: Now an auto_obstack.
15373         (abbrev_table_up): New typedef.
15374         (init_cu_die_reader): Add abbrev_table parameter.
15375         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15376         Add result_dwo_abbrev_table.
15377         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15378         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15379         Update.
15380         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15381         parameter.
15382         (skip_children): Update.
15383         (abbrev_table::alloc_abbrev): Rename from
15384         abbrev_table_alloc_abbrev.
15385         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15386         (abbrev_table::lookup_abbrev): Rename from
15387         abbrev_table_lookup_abbrev.
15388         (abbrev_table_read_table): Return abbrev_table_up.
15389         (abbrev_table_free, abbrev_table_free_cleanup)
15390         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15391         (load_partial_dies): Update.
15392
15393 2018-01-17  Tom Tromey  <tom@tromey.com>
15394
15395         * dwarf2read.c (dwarf2_compute_name): Update comment.
15396         (read_func_scope, read_variable): Update.
15397         (new_symbol): Remove.
15398         (new_symbol_full): Rename to new_symbol.
15399
15400 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
15401
15402         PR gdb/16577
15403         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15404         a warning instead of throwing an error, set section size to 0 and return
15405         NULL.
15406         * gdb_bfd.h (gdb_bfd_map_section): Update description.
15407
15408 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15409
15410         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15411         std::string.
15412         (linux_ptrace_attach_fail_reason_string): Likewise.
15413         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15414         Likewise.
15415         (linux_ptrace_attach_fail_reason_string): Likewise.
15416         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15417
15418 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15419
15420         * linux-nat.c (linux_nat_attach): Remove xstrdup.
15421
15422 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
15423
15424         PR gdb/21559
15425         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15426         checking for fs_base/gs_base fields in struct user_regs_struct.
15427         * configure: Regenerate.
15428
15429 2018-01-17  Yao Qi  <yao.qi@linaro.org>
15430
15431         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
15432         function.
15433         (aarch64_linux_init_abi): Install it to gdbarch hook
15434         gcc_target_options.
15435
15436 2018-01-15  Pedro Alves  <palves@redhat.com>
15437
15438         * common/signals-state-save-restore.c
15439         (save_original_signals_state): Fix typos.
15440
15441 2017-01-12  Tom Tromey  <tom@tromey.com>
15442             Sergio Durigan Junior  <sergiodj@redhat.com>
15443
15444         * Makefile.in (install-only): Install gdb-add-index.
15445
15446 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
15447
15448         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
15449
15450 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15451
15452         * infrun.c (keep_going_pass_signal): Clear step-over info when
15453         insert_breakpoints fails.
15454
15455 2018-01-11  Pedro Alves  <palves@redhat.com>
15456
15457         PR gdb/22583
15458         * infrun.c (resume): Rename to ...
15459         (resume_1): ... this.
15460         (resume): Reimplement as wrapper around resume_1.
15461
15462 2018-01-11  Pedro Alves  <palves@redhat.com>
15463
15464         PR remote/22597
15465         * remote.c (remote_parse_stop_reply): Default to the last-set
15466         general thread instead of to 'magic_null_ptid'.
15467
15468 2018-01-10  Pedro Alves  <palves@redhat.com>
15469
15470         * language.h (language_get_symbol_name_matcher): Rename ...
15471         (get_symbol_name_matcher): ... this.
15472         * language.c (language_get_symbol_name_matcher): Ditto.
15473         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
15474         callers adjusted.
15475
15476 2018-01-10  Pedro Alves  <palves@redhat.com>
15477
15478         PR gdb/22670
15479         * dwarf2read.c
15480         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
15481         Adjust to use language_get_symbol_name_matcher instead of
15482         language_defn::la_get_symbol_name_matcher.
15483         * language.c (language_get_symbol_name_matcher): If in Ada mode
15484         and the lookup name is a verbatim match, return Ada's matcher.
15485         * language.h (language_get_symbol_name_matcher): Adjust comment.
15486         (ada_lookup_name_info::verbatim_p):: New method.
15487
15488 2018-01-10  Pedro Alves  <palves@redhat.com>
15489
15490         PR gdb/22670
15491         * ada-lang.c (ada_collect_symbol_completion_matches): If the
15492         minsym's language is language_auto or language_cplus, pass down
15493         language_ada instead.
15494         * symtab.c (compare_symbol_name): Don't frob symbol language here.
15495
15496 2018-01-10  Pedro Alves  <palves@redhat.com>
15497
15498         PR gdb/22670
15499         * minsyms.c (linkage_name_str): New function.
15500         (iterate_over_minimal_symbols): Use it.
15501
15502 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15503
15504         * NEWS: Document that 'info proc' now works on FreeBSD.
15505
15506 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15507
15508         * configure.ac: Check for kinfo_getfile in libutil.
15509         * configure: Regenerate.
15510         * config.in: Regenerate.
15511         * fbsd-nat.c: Include "fbsd-tdep.h".
15512         (fbsd_fetch_cmdline): New.
15513         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
15514         rather than calling error.
15515         (fbsd_info_proc): New.
15516         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
15517         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
15518         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
15519
15520 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15521
15522         * fbsd-nat.c (struct free_deleter): Remove.
15523         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
15524
15525 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15526
15527         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
15528         NULL for an empty pathname.
15529
15530 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15531
15532         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
15533         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
15534         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
15535         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
15536         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
15537         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
15538         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
15539         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
15540         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
15541         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
15542         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
15543         (fbsd_core_fetch_timeval, fbsd_print_sigset)
15544         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
15545         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
15546         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
15547
15548 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
15549
15550         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
15551         (gnu_xfer_auxv): New function.
15552         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
15553         TARGET_OBJECT_AUXV.
15554
15555 2018-01-08  Yao Qi  <yao.qi@linaro.org>
15556             Simon Marchi  <simon.marchi@ericsson.com>
15557
15558         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
15559         common/selftest.c.
15560         (COMMON_OBS): Remove selftest.o.
15561         * configure.ac: Append selftest-arch.c and common/selftest.c to
15562         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
15563         * configure: Re-generated.
15564         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
15565         GDB_SELF_TEST.
15566         (maintenance_info_selftests): Likewise.
15567
15568 2018-01-08  Xavier Roirand  <roirand@adacore.com>
15569
15570         * ada-valprint.c (val_print_packed_array_elements): Use
15571         proper number of elements when printing an array indexed
15572         by an enumeration type.
15573
15574 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15575
15576         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
15577         (dw2_get_file_names_reader): Adjust.
15578         (lookup_dwo_signatured_type): Adjust.
15579         (lookup_dwp_signatured_type): Adjust.
15580         (lookup_signatured_type): Adjust.
15581         (create_type_unit_group): Adjust.
15582         (get_type_unit_group): Adjust.
15583         (process_psymtab_comp_unit_reader): Adjust.
15584         (build_type_psymtabs_reader): Adjust.
15585         (scan_partial_symbols): Adjust.
15586         (add_partial_symbol): Adjust.
15587         (add_partial_subprogram): Adjust.
15588         (peek_die_abbrev): Adjust.
15589         (fixup_go_packaging): Adjust.
15590         (process_imported_unit_die): Adjust.
15591         (dwarf2_compute_name): Adjust.
15592         (dwarf2_physname): Adjust.
15593         (read_import_statement): Adjust.
15594         (handle_DW_AT_stmt_list): Adjust.
15595         (read_file_scope): Adjust.
15596         (read_func_scope): Adjust.
15597         (read_lexical_block_scope): Adjust.
15598         (read_call_site_scope): Adjust.
15599         (read_variable): Adjust.
15600         (dwarf2_rnglists_process): Adjust.
15601         (dwarf2_ranges_process): Adjust.
15602         (dwarf2_ranges_read): Adjust.
15603         (dwarf2_get_pc_bounds): Adjust.
15604         (dwarf2_record_block_ranges): Adjust.
15605         (dwarf2_add_field): Adjust.
15606         (dwarf2_add_member_fn): Adjust.
15607         (read_structure_type): Adjust.
15608         (process_structure_scope): Adjust.
15609         (read_enumeration_type): Adjust.
15610         (read_array_type): Adjust.
15611         (mark_common_block_symbol_computed): Adjust.
15612         (read_common_block): Adjust.
15613         (read_namespace_type): Adjust.
15614         (read_namespace): Adjust.
15615         (read_module_type): Adjust.
15616         (read_tag_pointer_type): Adjust.
15617         (read_tag_ptr_to_member_type): Adjust.
15618         (read_tag_string_type): Adjust.
15619         (read_subroutine_type): Adjust.
15620         (read_typedef): Adjust.
15621         (read_base_type): Adjust.
15622         (attr_to_dynamic_prop): Adjust.
15623         (read_subrange_type): Adjust.
15624         (read_unspecified_type): Adjust.
15625         (dwarf2_read_abbrevs): Adjust.
15626         (load_partial_dies): Adjust.
15627         (read_partial_die): Adjust.
15628         (find_partial_die): Adjust.
15629         (guess_partial_die_structure_name): Adjust.
15630         (fixup_partial_die): Adjust.
15631         (read_attribute_value): Adjust.
15632         (read_addr_index): Adjust.
15633         (read_addr_index_from_leb128): Adjust.
15634         (read_str_index): Adjust.
15635         (dwarf2_string_attr): Adjust.
15636         (get_debug_line_section): Adjust.
15637         (dwarf_decode_line_header): Adjust.
15638         (lnp_state_machine::check_line_address): Adjust.
15639         (dwarf_decode_lines_1): Adjust.
15640         (dwarf_decode_lines): Adjust.
15641         (dwarf2_start_symtab): Adjust.
15642         (var_decode_location): Adjust.
15643         (new_symbol_full): Adjust.
15644         (dwarf2_const_value_data): Adjust.
15645         (dwarf2_const_value_attr): Adjust.
15646         (dwarf2_const_value): Adjust.
15647         (die_type): Adjust.
15648         (die_containing_type): Adjust.
15649         (build_error_marker_type): Adjust.
15650         (lookup_die_type): Adjust.
15651         (guess_full_die_structure_name): Adjust.
15652         (anonymous_struct_prefix): Adjust.
15653         (determine_prefix): Adjust.
15654         (dwarf2_name): Adjust.
15655         (follow_die_ref_or_sig): Adjust.
15656         (follow_die_offset): Adjust.
15657         (follow_die_ref): Adjust.
15658         (follow_die_sig_1): Adjust.
15659         (follow_die_sig): Adjust.
15660         (get_signatured_type): Adjust.
15661         (get_DW_AT_signature_type): Adjust.
15662         (decode_locdesc): Adjust.
15663         (dwarf_decode_macros): Adjust.
15664         (cu_debug_loc_section): Adjust.
15665         (fill_in_loclist_baton): Adjust.
15666         (dwarf2_symbol_mark_computed): Adjust.
15667         (init_one_comp_unit): Don't assign
15668         dwarf2_cu::dwarf2_per_objfile.
15669         (set_die_type): Adjust.
15670
15671 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15672
15673         * dwarf2read.c (struct mapped_debug_names): Add constructor.
15674         <dwarf2_per_objfile>: New field.
15675         (dwarf2_per_objfile): Remove global.
15676         (get_dwarf2_per_objfile): New function.
15677         (set_dwarf2_per_objfile): New function.
15678         (dwarf2_build_psymtabs_hard): Change objfile parameter to
15679         dwarf2_per_objfile.
15680         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15681         (read_abbrev_offset): Likewise.
15682         (read_indirect_string): Likewise.
15683         (read_indirect_line_string): Likewise.
15684         (read_indirect_string_at_offset): Likewise.
15685         (read_indirect_string_from_dwz): Likewise.
15686         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15687         dwarf2_per_objfile.
15688         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15689         (create_all_comp_units): Change objfile parameter to
15690         dwarf2_per_objfile.
15691         (create_all_type_units): Likewise.
15692         (process_queue): Add dwarf2_per_objfile parameter.
15693         (read_and_check_comp_unit_head): Likewise.
15694         (lookup_dwo_unit_in_dwp): Likewise.
15695         (get_dwp_file): Likewise.
15696         (process_cu_includes): Likewise.
15697         (struct free_dwo_file_cleanup_data): New struct.
15698         (dwarf2_has_info): Use get_dwarf2_per_objfile and
15699         set_dwarf2_per_objfile.
15700         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
15701         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
15702         context, adjust calls.
15703         (dw2_instantiate_symtab): Likewise.
15704         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15705         (dw2_get_cu): Likewise.
15706         (create_cu_from_index_list): Change objfile parameter to
15707         dwarf2_per_objfile.
15708         (create_cus_from_index_list): Get dwarf2_per_objfile from
15709         context, adjust calls.
15710         (create_cus_from_index): Likewise.
15711         (create_signatured_type_table_from_index): Change objfile
15712         parameter to dwarf2_per_objfile.
15713         (create_signatured_type_table_from_debug_names): Change objfile
15714         parameter to dwarf2_per_objfile.
15715         (create_addrmap_from_index): Likewise.
15716         (create_addrmap_from_aranges): Likewise.
15717         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15718         (dw2_setup): Remove.
15719         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15720         context.
15721         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15722         get_dwarf2_per_objfile.
15723         (dw2_forget_cached_source_info): Likewise.
15724         (dw2_map_symtabs_matching_filename): Likewise.
15725         (struct dw2_symtab_iterator) <index>: Remove.
15726         <dwarf2_per_objfile>: New field.
15727         (dw2_symtab_iter_init): Replace index parameter with
15728         dwarf2_per_objfile.
15729         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15730         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15731         (dw2_print_stats): Likewise.
15732         (dw2_dump): Likewise.
15733         (dw2_expand_symtabs_for_function): Likewise.
15734         (dw2_expand_all_symtabs): Likewise.
15735         (dw2_expand_symtabs_with_fullname): Likewise.
15736         (dw2_expand_marked_cus): Replace index and objfile parameters
15737         with dwarf2_per_objfile.
15738         (dw_expand_symtabs_matching_file_matcher): Add
15739         dwarf2_per_objfile parameter and adjust calls.
15740         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15741         adjust calls.
15742         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15743         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15744         adjust calls.
15745         (create_cus_from_debug_names_list): Replace objfile parameter
15746         with dwarf2_per_objfile and adjust calls.
15747         (create_cus_from_debug_names): Likewise.
15748         (dwarf2_read_debug_names): Likewise.
15749         (mapped_debug_names::namei_to_name): Adjust call.
15750         (dw2_debug_names_iterator::next): Likewise.
15751         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15752         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15753         (dw2_debug_names_dump): Likewise.
15754         (dw2_debug_names_expand_symtabs_for_function): Likewise.
15755         (dw2_debug_names_expand_symtabs_matching): Likewise.
15756         (dwarf2_initialize_objfile): Likewise.
15757         (dwarf2_build_psymtabs): Likewise.
15758         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15759         this_cu.
15760         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15761         (read_and_check_comp_unit_head): Likewise.
15762         (read_abbrev_offset): Likewise.
15763         (create_debug_type_hash_table): Likewise.
15764         (create_debug_types_hash_table): Likewise.
15765         (create_all_type_units): Replace objfile parameter with
15766         dwarf2_per_objfile.
15767         (add_type_unit): Add dwarf2_per_objfile parameter.
15768         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15769         with dwarf2_per_objfile.
15770         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15771         (lookup_dwp_signatured_type): Likewise.
15772         (lookup_signatured_type): Likewise.
15773         (read_cutu_die_from_dwo): Likewise.
15774         (init_tu_and_read_dwo_dies): Likewise.
15775         (init_cutu_and_read_dies): Likewise.
15776         (init_cutu_and_read_dies_no_follow): Likewise.
15777         (allocate_type_unit_groups_table): Add objfile parameter.
15778         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15779         (get_type_unit_group): Likewise.
15780         (process_psymtab_comp_unit): Update call.
15781         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15782         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15783         (print_tu_stats): Likewise.
15784         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15785         in void* parameter.
15786         (build_type_psymtabs): Change objfile parameter to
15787         dwarf2_per_objfile.
15788         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15789         passed in void* parameter.
15790         (process_skeletonless_type_units): Change objfile parameter to
15791         dwarf2_per_objfile.
15792         (set_partial_user): Likewise.
15793         (dwarf2_build_psymtabs_hard): Likewise.
15794         (read_comp_units_from_section): Likewise.
15795         (create_all_comp_units): Likewise.
15796         (scan_partial_symbols): Update calls.
15797         (add_partial_symbol): Likewise.
15798         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15799         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15800         (process_queue): Add dwarf2_per_objfile parameter.
15801         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15802         (compute_compunit_symtab_includes): Likewise.
15803         (process_cu_includes): Add dwarf2_per_objfile parameter.
15804         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15805         (process_full_type_unit): Likewise.
15806         (process_imported_unit_die): Update call.
15807         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15808         (read_file_scope): Likewise.
15809         (allocate_dwo_file_hash_table): Add objfile parameter.
15810         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15811         (create_cus_hash_table): Likewise.
15812         (create_dwp_hash_table): Likewise.
15813         (create_dwo_unit_in_dwp_v1): Likewise.
15814         (create_dwp_v2_section): Likewise.
15815         (create_dwo_unit_in_dwp_v2): Likewise.
15816         (lookup_dwo_unit_in_dwp): Likewise.
15817         (try_open_dwop_file): Likewise.
15818         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15819         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15820         cleanup to include a reference to dwarf2_per_objfile.
15821         (open_dwp_file): Add dwarf2_per_objfile parameter.
15822         (open_and_init_dwp_file): Likewise.
15823         (get_dwp_file): Likewise.
15824         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15825         (queue_and_load_all_dwo_tus): Update call.
15826         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15827         data.
15828         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15829         (dwarf2_ranges_process): Likewise.
15830         (dwarf2_get_pc_bounds): Likewise.
15831         (mark_common_block_symbol_computed): Likewise.
15832         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15833         (dwarf2_read_abbrevs): Update call.
15834         (read_partial_die): Use dwarf2_per_objfile from cu.
15835         (find_partial_die): Likewise.
15836         (fixup_partial_die): Likewise.
15837         (read_attribute_value): Likewise.
15838         (read_indirect_string_at_offset_from): Add objfile parameter.
15839         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15840         parameter.
15841         (read_indirect_string_from_dwz): Add objfile parameter.
15842         (read_indirect_string): Add objfile parameter.
15843         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15844         (read_addr_index): Use dwarf2_per_objfile from cu.
15845         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15846         call dw2_setup.
15847         (read_str_index): Use dwarf2_per_objfile from cu.
15848         (get_debug_line_section): Likewise.
15849         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15850         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15851         (new_symbol_full): Use dwarf2_per_objfile from cu.
15852         (build_error_marker_type): Likewise.
15853         (lookup_die_type): Likewise.
15854         (determine_prefix): Likewise.
15855         (follow_die_offset): Likewise.
15856         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15857         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15858         (dwarf2_fetch_die_type_sect_off): Likewise.
15859         (dwarf2_get_die_type): Likewise.
15860         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15861         (get_signatured_type): Likewise.
15862         (get_DW_AT_signature_type): Likewise.
15863         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15864         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15865         (cu_debug_loc_section): Likewise.
15866         (fill_in_loclist_baton): Likewise.
15867         (dwarf2_symbol_mark_computed): Likewise.
15868         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15869         dwarf2_per_objfile.
15870         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15871         parameter.
15872         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15873         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15874         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15875         (set_die_type): Use dwarf2_free_objfile from cu.
15876         (get_die_type_at_offset): Likewise.
15877         (dwarf2_per_objfile_free): Don't assign global variable.
15878         (debug_names) <constructor>: Add dwarf2_per_objfile
15879         parameter, update m_debugstrlookup construction.
15880         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15881         parameter.
15882         <m_dwarf2_per_objfile>: New field.
15883         <lookup>: Use m_dwarf2_per_objfile.
15884         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15885         (psyms_seen_size): Likewise.
15886         (write_gdbindex): Replace objfile parameter with
15887         dwarf2_per_objfile.
15888         (write_debug_names): Likewise.
15889         (write_psymtabs_to_index): Likewise.
15890         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15891         calls.
15892
15893 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15894
15895         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15896         <dwarf2_per_objfile>: New field.
15897         (struct dwarf2_per_cu_data) <objfile>: Remove.
15898         <dwarf2_per_objfile>: New field.
15899         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15900         of objfile.
15901         (create_signatured_type_table_from_index): Likewise.
15902         (create_debug_type_hash_table): Likewise.
15903         (fill_in_sig_entry_from_dwo_entry): Likewise.
15904         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15905         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15906         objfile.
15907         (create_partial_symtab): Access objfile through
15908         dwarf2_per_objfile.
15909         (process_psymtab_comp_unit_reader): Likewise.
15910         (read_comp_units_from_section): Likewise.
15911         (scan_partial_symbols): Likewise.
15912         (add_partial_symbol): Likewise.
15913         (add_partial_subprogram): Likewise.
15914         (peek_die_abbrev): Likewise.
15915         (fixup_go_packaging): Likewise.
15916         (process_full_comp_unit): Likewise.
15917         (process_full_type_unit): Likewise.
15918         (process_imported_unit_die): Likewise.
15919         (dwarf2_compute_name): Likewise.
15920         (dwarf2_physname): Likewise.
15921         (read_import_statement): Likewise.
15922         (create_cus_hash_table): Assign dwarf2_physname instead of
15923         objfile.
15924         (read_func_scope): Access objfile through dwarf2_per_objfile.
15925         (read_lexical_block_scope): Likewise.
15926         (read_call_site_scope): Likewise.
15927         (read_variable): Likewise.
15928         (dwarf2_rnglists_process): Likewise.
15929         (dwarf2_ranges_process): Likewise.
15930         (dwarf2_ranges_read): Likewise.
15931         (dwarf2_record_block_ranges): Likewise.
15932         (dwarf2_add_field): Likewise.
15933         (dwarf2_add_member_fn): Likewise.
15934         (read_structure_type): Likewise.
15935         (process_structure_scope): Likewise.
15936         (read_enumeration_type): Likewise.
15937         (read_array_type): Likewise.
15938         (read_common_block): Likewise.
15939         (read_namespace_type): Likewise.
15940         (read_namespace): Likewise.
15941         (read_module_type): Likewise.
15942         (read_tag_pointer_type): Likewise.
15943         (read_tag_ptr_to_member_type): Likewise.
15944         (read_tag_string_type): Likewise.
15945         (read_subroutine_type): Likewise.
15946         (read_typedef): Likewise.
15947         (read_base_type): Likewise.
15948         (attr_to_dynamic_prop): Likewise.
15949         (read_subrange_type): Likewise.
15950         (read_unspecified_type): Likewise.
15951         (load_partial_dies): Likewise.
15952         (read_partial_die): Likewise.
15953         (find_partial_die): Likewise.
15954         (guess_partial_die_structure_name): Likewise.
15955         (fixup_partial_die): Likewise.
15956         (read_attribute_value): Likewise.
15957         (read_addr_index_from_leb128): Likewise.
15958         (dwarf2_read_addr_index): Likewise.
15959         (dwarf2_string_attr): Likewise.
15960         (lnp_state_machine::check_line_address): Likewise.
15961         (dwarf_decode_lines_1): Likewise.
15962         (dwarf_decode_lines): Likewise.
15963         (dwarf2_start_symtab): Likewise.
15964         (var_decode_location): Likewise.
15965         (new_symbol_full): Likewise.
15966         (dwarf2_const_value_data): Likewise.
15967         (dwarf2_const_value_attr): Likewise.
15968         (dwarf2_const_value): Likewise.
15969         (die_type): Likewise.
15970         (die_containing_type): Likewise.
15971         (lookup_die_type): Likewise.
15972         (guess_full_die_structure_name): Likewise.
15973         (anonymous_struct_prefix): Likewise.
15974         (dwarf2_name): Likewise.
15975         (follow_die_ref_or_sig): Likewise.
15976         (follow_die_offset): Likewise.
15977         (follow_die_ref): Likewise.
15978         (dwarf2_fetch_die_loc_sect_off): Likewise.
15979         (dwarf2_fetch_constant_bytes): Likewise.
15980         (dwarf2_fetch_die_type_sect_off): Likewise.
15981         (dwarf2_get_die_type): Likewise.
15982         (follow_die_sig): Likewise.
15983         (decode_locdesc): Likewise.
15984         (dwarf2_per_cu_objfile): Likewise.
15985         (dwarf2_per_cu_text_offset): Likewise.
15986         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15987         objfile.
15988         (set_die_type): Access objfile through
15989         dwarf2_per_objfile.
15990
15991 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15992
15993         * valprint.c (converted_character_d): Remove typedef.
15994         (DEF_VEC_O (converted_character_d)): Remove.
15995         (count_next_character): Use std::vector.
15996         (print_converted_chars_to_obstack): Likewise.
15997         (generic_printstr): Likewise.
15998
15999 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16000
16001         * xml-support.h (struct gdb_xml_value): Add constructor.
16002         <value>: Change type to unique_xmalloc_ptr.
16003         (gdb_xml_value_s): Remove typedef.
16004         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16005         (gdb_xml_element_start_handler): Change parameter type to
16006         std::vector.
16007         (xml_find_attribute): Likewise.
16008         * xml-support.c (xml_find_attribute): Change parameter type to
16009         std::vector and adjust.
16010         (gdb_xml_values_cleanup): Remove.
16011         (gdb_xml_parser::start_element): Adjust to std::vector.
16012         (xinclude_start_include): Change paraeter type to std::vector
16013         and adjust.
16014         * btrace.c (check_xml_btrace_version): Likewise.
16015         (parse_xml_btrace_block): Likewise.
16016         (parse_xml_btrace_pt_config_cpu): Likewise.
16017         (parse_xml_btrace_pt): Likewise.
16018         (parse_xml_btrace_conf_bts): Likewise.
16019         (parse_xml_btrace_conf_pt): Likewise.
16020         * memory-map.c (memory_map_start_memory): Likewise.
16021         (memory_map_start_property): Likewise.
16022         * osdata.c (osdata_start_osdata): Likewise.
16023         (osdata_start_item): Likewise.
16024         (osdata_start_column): Likewise.
16025         * remote.c (start_thread): Likewise.
16026         * solib-aix.c (library_list_start_library): Likewise.
16027         (library_list_start_list): Likewise.
16028         * solib-svr4.c (library_list_start_library): Likewise.
16029         (svr4_library_list_start_list): Likewise.
16030         * solib-target.c (library_list_start_segment): Likewise.
16031         (library_list_start_section): Likewise.
16032         (library_list_start_library): Likewise.
16033         (library_list_start_list): Likewise.
16034         * tracepoint.c (traceframe_info_start_memory): Likewise.
16035         (traceframe_info_start_tvar): Likewise.
16036         * xml-syscall.c (syscall_start_syscall): Likewise.
16037         * xml-tdesc.c (tdesc_start_target): Likewise.
16038         (tdesc_start_feature): Likewise.
16039         (tdesc_start_reg): Likewise.
16040         (tdesc_start_union): Likewise.
16041         (tdesc_start_struct): Likewise.
16042         (tdesc_start_flags): Likewise.
16043         (tdesc_start_enum): Likewise.
16044         (tdesc_start_field): Likewise.
16045         (tdesc_start_enum_value): Likewise.
16046         (tdesc_start_vector): Likewise.
16047
16048 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16049
16050         * extension.h (struct xmethod_worker) <clone>: Remove.
16051         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16052         Remove.
16053         (python_xmethod_worker::clone): Remove.
16054         * valops.c (find_overload_match): Use std::move instead of
16055         clone.
16056
16057 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16058
16059         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16060         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16061         <free_xmethod_worker_data>: Remove.
16062         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16063         <get_xmethod_arg_types>: Remove.
16064         <get_xmethod_result_type>: Remove.
16065         <invoke_xmethod>: Remove.
16066         * extension.c (new_xmethod_worker): Remove.
16067         (clone_xmethod_worker): Remove.
16068         (get_matching_xmethod_workers): Return void, pass std::vector by
16069         pointer.
16070         (get_xmethod_arg_types): Rename to...
16071         (xmethod_worker::get_arg_types): ... this, and adjust.
16072         (get_xmethod_result_type): Rename to...
16073         (xmethod_worker::get_result_type): ... this, and adjust.
16074         (invoke_xmethod): Remove.
16075         (free_xmethod_worker): Remove.
16076         (free_xmethod_worker_vec): Remove.
16077         * extension.h (enum ext_lang_rc): Move here from
16078         extension-priv.h.
16079         (struct xmethod_worker): Add constructor and destructor.
16080         <data>: Remove.
16081         <value>: Remove.
16082         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16083         virtual pure methods.
16084         <get_arg_types, get_result_type>: New methods.
16085         (xmethod_worker_ptr): Remove typedef.
16086         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16087         (xmethod_worker_vec): Remove typedef.
16088         (xmethod_worker_up): New typedef.
16089         (invoke_xmethod): Remove.
16090         (clone_xmethod_worker): Remove.
16091         (free_xmethod_worker): Remove.
16092         (free_xmethod_worker_vec): Remove.
16093         (get_xmethod_arg_types): Remove.
16094         (get_xmethod_result_type): Remove.
16095         * valops.c (find_method_list): Use std::vector, don't use
16096         intermediate vector.
16097         (value_find_oload_method_list): Use std::vector.
16098         (find_overload_match): Use std::vector.
16099         (find_oload_champ): Use std::vector.
16100         * value.c (value_free): Use operator delete.
16101         (value_of_xmethod): Rename to...
16102         (value_from_xmethod): ... this.  Don't assign
16103         xmethod_worker::value, take rvalue-reference.
16104         (result_type_of_xmethod): Adjust.
16105         (call_xmethod): Adjust.
16106         * value.h: Include extension.h.
16107         (struct xmethod_worker): Don't forward-declare.
16108         (value_of_xmethod): Rename to...
16109         (value_from_xmethod): ... this, take rvalue-reference.
16110         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16111         (struct python_xmethod_worker): ... this, add constructor and
16112         destructor.
16113         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16114         (gdbpy_free_xmethod_worker_data): Rename to...
16115         (python_xmethod_worker::~python_xmethod_worker): ... this and
16116         adjust.
16117         (gdbpy_clone_xmethod_worker_data): Rename to...
16118         (python_xmethod_worker::clone): ... this and adjust.
16119         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16120         temporary vector.
16121         (gdbpy_get_xmethod_arg_types): Rename to...
16122         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16123         (gdbpy_get_xmethod_result_type): Rename to...
16124         (python_xmethod_worker::do_get_result_type): ... this and
16125         adjust.
16126         (gdbpy_invoke_xmethod): Rename to...
16127         (python_xmethod_worker::invoke): ... this and adjust.
16128         (new_python_xmethod_worker): Rename to...
16129         (python_xmethod_worker::python_xmethod_worker): ... this and
16130         adjust.
16131         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16132         Remove.
16133         (gdbpy_free_xmethod_worker_data): Remove.
16134         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16135         (gdbpy_get_xmethod_arg_types): Remove.
16136         (gdbpy_get_xmethod_result_type): Remove.
16137         (gdbpy_invoke_xmethod): Remove.
16138         * python/python.c (python_extension_ops): Remove obsolete
16139         callbacks.
16140
16141 2018-01-05  Pedro Alves  <palves@redhat.com>
16142
16143         PR gdb/18653
16144         * common/signals-state-save-restore.c
16145         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16146         find a custom handler preinstalled, instead of internal erroring.
16147         But only warn if !quiet.
16148         * common/signals-state-save-restore.h
16149         (save_original_signals_state): New parameter 'quiet'.
16150         * main.c (captured_main_1): Move save_original_signals_state call
16151         after option handling, and pass QUIET.
16152
16153 2018-01-05  Pedro Alves  <palves@redhat.com>
16154
16155         * spu-tdep.c (spu_catch_start): Pass
16156         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16157
16158 2018-01-05  Pedro Alves  <palves@redhat.com>
16159
16160         PR gdb/22670
16161         * ada-lang.c (literal_symbol_name_matcher): New function.
16162         (ada_get_symbol_name_matcher): Use it for
16163         symbol_name_match_type::SEARCH_NAME.
16164         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16165         it down instead of assuming symbol_name_match_type::FULL.
16166         * block.h (block_lookup_symbol): New parameter 'match_type'.
16167         * c-valprint.c (print_unpacked_pointer): Use
16168         lookup_symbol_search_name instead of lookup_symbol.
16169         * compile/compile-object-load.c (get_out_value_type): Pass down
16170         symbol_name_match_type::SEARCH_NAME.
16171         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16172         symbol_name_match_type::FULL.
16173         * cp-support.c (cp_get_symbol_name_matcher): Handle
16174         symbol_name_match_type::SEARCH_NAME.
16175         * infrun.c (insert_exception_resume_breakpoint): Use
16176         lookup_symbol_search_name.
16177         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16178         * psymtab.c (maintenance_check_psymtabs): Use
16179         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16180         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16181         SYMBOL_SEARCH_NAME.
16182         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16183         if symbol_name_match_type::SEARCH_NAME.
16184         (lookup_symbol_in_language): Pass down
16185         symbol_name_match_type::FULL.
16186         (lookup_symbol_search_name): New.
16187         (lookup_language_this): Pass down
16188         symbol_name_match_type::SEARCH_NAME.
16189         (lookup_symbol_aux, lookup_local_symbol): New parameter
16190         'match_type'.  Pass it down.
16191         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16192         (lookup_symbol_search_name): New declaration.
16193         (lookup_symbol_in_block): New 'match_type' parameter.
16194
16195 2018-01-05  Pedro Alves  <palves@redhat.com>
16196
16197         PR gdb/22670
16198         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16199         ada_lookup_symbol.
16200         (ada_lookup_symbol): Reimplement in terms of
16201         ada_lookup_symbol_list, bits factored out from
16202         ada_lookup_encoded_symbol.
16203
16204 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16205
16206         * ada-exp.y (write_object_renaming): When subscripting an array
16207         using a symbol as the index, pass the block in call to
16208         ada_lookup_encoded_symbol when looking that symbol up.
16209
16210 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16211
16212         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16213         TYPE_INDEX_TYPE.
16214
16215 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16216
16217         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16218         the case where VALUE_LVAL (val0) is not lval_memory.
16219
16220 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16221
16222         * ada-valprint.c (print_optional_low_bound): Handle
16223         character-indexed array printing like boolean-indexed array
16224         printing.
16225
16226 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16227
16228         * NEWS: Create a new section for the next release branch.
16229         Rename the section of the current branch, now that it has
16230         been cut.
16231
16232 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16233
16234         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16235         * version.in: Bump version to 8.1.50.DATE-git.
16236
16237 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16238
16239         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16240         Add field.
16241         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16242         Add field.
16243         (default_exception_support_info) <catch_handlers_sym>: Add field.
16244         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16245         (ada_exception_name_addr_1): Add "catch handlers" handling.
16246         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16247         Update all callers.
16248         (create_excep_cond_exprs) <ex>: Add parameter.
16249         (re_set_exception): Update create_excep_cond_exprs call.
16250         (print_it_exception, print_one_exception, print_mention_exception)
16251         (print_recreate_exception): Add "catch handler" handling.
16252         (allocate_location_catch_handlers, re_set_catch_handlers)
16253         (check_status_catch_handlers, print_it_catch_handlers)
16254         (print_one_catch_handlers, print_mention_catch_handlers)
16255         (print_recreate_catch_handlers): New function.
16256         (catch_handlers_breakpoint_ops): New variable.
16257         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16258         Add parameter.  Add "catch handler" handling.
16259         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16260         Add "catch handler" handling.
16261         (ada_exception_catchpoint_cond_string): Add "catch handler"
16262         handling.
16263         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16264         call.
16265         (catch_ada_handlers_command): New function.
16266         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16267         operations structure.
16268         (_initialize_ada_language): Add "catch handlers" command entry.
16269         * NEWS: Document "catch handlers" feature.
16270
16271 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16272
16273         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16274         account when creating the array type of the slice.
16275         (ada_value_slice): Likewise.
16276
16277 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16278
16279         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16280         New enum value.
16281         (create_array_type_with_stride): Add byte_stride_prop parameter.
16282         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16283         New parameter.  Update all callers in this file.
16284         (array_type_has_dynamic_stride): New function.
16285         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16286         of arrays with dynamic byte strides.
16287         * dwarf2read.c (read_array_type): Add support for dynamic
16288         DW_AT_byte_stride attributes.
16289
16290 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16291
16292         * dwarf2read.c (read_unspecified_type): Treat
16293         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16294
16295 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16296
16297         Update copyright year range in all GDB files.
16298
16299 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16300
16301         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16302         and gdb/testsuite/gdb.base/step-line.c.
16303
16304 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16305
16306         * copyright.py (main): Dump the contents of
16307         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16308         even if BY_HAND is empty.
16309
16310 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16311
16312         * top.c (print_gdb_version): Update Copyright year in version
16313         message.
16314
16315 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16316
16317         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16318
16319 For older changes see ChangeLog-2017.
16320 \f
16321 Local Variables:
16322 mode: change-log
16323 left-margin: 8
16324 fill-column: 74
16325 version-control: never
16326 coding: utf-8
16327 End: