[ARM] Update knowledge of bfd architectures
[external/binutils.git] / gdb / ChangeLog
1 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
2
3         PR gdb/23917
4         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
5         semicolon.
6
7 2018-11-26  Pedro Alves  <palves@redhat.com>
8
9         * procfs.c (procfs_notice_thread): Replace uses of
10         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
11         * sol-thread.c (sol_thread_target::wait)
12         (sol_update_thread_list_callback): Likewise.
13
14 2018-11-25  Tom Tromey  <tom@tromey.com>
15
16         * ui-out.c (ui_out::field_fmt): Remove comment.
17         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
18         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
19
20 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
21
22         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
23         leak in open_source_file' has been partially undone by '2179fbc36d23
24         Return scoped_fd from open_source_file'. Re-add the transfer of
25         current s->fullname to the unique_xmalloc_ptr fullname given
26         to find_and_open_source.
27
28 2018-11-23  Pedro Alves  <palves@redhat.com>
29
30         * gdbthread.h (enum thread_state): Move comments here.
31         (is_running, is_stopped, is_exited): Remove declarations.
32
33 2018-11-22  Pedro Alves  <palves@redhat.com>
34
35         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
36         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
37         ALL_NON_EXITED_THREADS with all_non_exited_threads.
38         (print_one_breakpoint_location): Replace ALL_INFERIORS with
39         all_inferiors.
40         * bsd-kvm.c: Include inferior.h.
41         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
42         with all_non_exited_threads.
43         * common/filtered-iterator.h: New.
44         * common/safe-iterator.h: New.
45         * corelow.c (core_target_open): Don't call init_thread_list here.
46         * darwin-nat.c (thread_info_from_private_thread_info): Replace
47         ALL_THREADS with all_threads.
48         * fbsd-nat.c (fbsd_nat_target::resume): Replace
49         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
50         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
51         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
52         * fork-child.c (postfork_hook): Don't call init_thread_list here.
53         * gdbarch-selftests.c (register_to_value_test): Adjust.
54         * gdbthread.h: Don't include "inferior.h" here.
55         (struct inferior): Forward declare.
56         (enum step_over_calls_kind): Moved here from inferior.h.
57         (thread_info::deletable): Definition moved to thread.c.
58         (find_thread_ptid (inferior *, ptid_t)): Declare.
59         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
60         Include "thread-iter.h".
61         (all_threads, all_non_exited_threads, all_threads_safe): New.
62         (any_thread_p): Declare.
63         (thread_list): Delete.
64         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
65         all_non_exited_threads.
66         (proceed_after_attach_callback): Delete.
67         (proceed_after_attach): Take an inferior pointer instead of an
68         integer PID.  Adjust to use range-for.
69         (attach_post_wait): Pass down inferior pointer instead of pid.
70         Use range-for instead of ALL_NON_EXITED_THREADS.
71         (detach_command): Remove init_thread_list call.
72         * inferior-iter.h: New.
73         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
74         (delete_thread_of_inferior): Delete.
75         (delete_inferior, exit_inferior_1): Use range-for with
76         inf->threads_safe() instead of iterate_over_threads.
77         (inferior_appeared): Call init_thread_list here.
78         (discard_all_inferiors): Use all_non_exited_inferiors.
79         (find_inferior_id, find_inferior_pid): Use all_inferiors.
80         (iterate_over_inferiors): Use all_inferiors_safe.
81         (have_inferiors, number_of_live_inferiors): Use
82         all_non_exited_inferiors.
83         (number_of_inferiors): Use all_inferiors and std::distance.
84         (print_inferior): Use all_inferiors.
85         * inferior.h: Include gdbthread.h.
86         (enum step_over_calls_kind): Moved to gdbthread.h.
87         (struct inferior) <thread_list>: New field.
88         <threads, non_exited_threads, threads_safe>: New methods.
89         (ALL_INFERIORS): Delete.
90         Include "inferior-iter.h".
91         (ALL_NON_EXITED_INFERIORS): Delete.
92         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
93         functions.
94         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
95         ALL_NON_EXITED_THREADS with all_non_exited_threads.
96         * infrun.c (follow_exec): Use all_threads_safe.
97         (clear_proceed_status, proceed): Use all_non_exited_threads.
98         (init_wait_for_inferior): Don't clear inline frame state here.
99         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
100         all_threads instead of ALL_NON_EXITED_THREADS.
101         (random_pending_event_thread): Use all_non_exited_threads instead
102         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
103         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
104         instead of ALL_NON_EXITED_THREADS.
105         (handle_no_resumed): Use all_non_exited_threads instead of
106         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
107         ALL_INFERIORS.
108         (restart_threads, switch_back_to_stepped_thread): Use
109         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
110         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
111         all_inferiors.
112         (kill_unfollowed_fork_children): Use inf->non_exited_threads
113         instead of ALL_NON_EXITED_THREADS.
114         * linux-tdep.c (linux_make_corefile_notes): Use
115         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
116         * linux-thread-db.c (thread_db_target::update_thread_list):
117         Replace ALL_INFERIORS with all_inferiors.
118         (thread_db_target::thread_handle_to_thread_info): Use
119         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
120         * mi/mi-interp.c (multiple_inferiors_p): New.
121         (mi_on_resume_1): Simplify using all_non_exited_threads and
122         multiple_inferiors_p.
123         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
124         instead of ALL_NON_EXITED_THREADS.
125         * nto-procfs.c (nto_procfs_target::open): Don't call
126         init_thread_list here.
127         * record-btrace.c (record_btrace_target_open)
128         (record_btrace_target::stop_recording)
129         (record_btrace_target::close)
130         (record_btrace_target::record_is_replaying)
131         (record_btrace_target::resume, record_btrace_target::wait)
132         (record_btrace_target::record_stop_replaying): Use
133         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
134         * record-full.c (record_full_wait_1): Use all_non_exited_threads
135         instead of ALL_NON_EXITED_THREADS.
136         * regcache.c (cooked_read_test): Remove reference to global
137         thread_list.
138         * remote-sim.c (gdbsim_target::create_inferior): Don't call
139         init_thread_list here.
140         * remote.c (remote_target::update_thread_list): Use
141         all_threads_safe instead of ALL_NON_EXITED_THREADS.
142         (remote_target::process_initial_stop_replies): Replace
143         ALL_INFERIORS with all_non_exited_inferiors and use
144         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
145         (remote_target::open_1): Don't call init_thread_list here.
146         (remote_target::append_pending_thread_resumptions)
147         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
148         instead of ALL_NON_EXITED_THREADS.
149         (remote_target::commit_resume)
150         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
151         with all_non_exited_inferiors and use all_non_exited_threads
152         instead of ALL_NON_EXITED_THREADS.
153         (remote_target::kill_new_fork_children): Use
154         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
155         init_thread_list and init_wait_for_inferior calls.
156         (remote_target::remote_btrace_maybe_reopen)
157         (remote_target::thread_handle_to_thread_info): Use
158         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
159         * target.c (target_terminal::restore_inferior)
160         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
161         all_non_exited_inferiors.
162         * thread-iter.c: New file.
163         * thread-iter.h: New file.
164         * thread.c: Include "inline-frame.h".
165         (thread_list): Delete.
166         (clear_thread_inferior_resources): Call clear_inline_frame_state.
167         (init_thread_list): Use all_threads_safe instead of
168         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
169         (new_thread): Adjust to per-inferior thread lists.
170         (add_thread_silent): Pass inferior to find_thread_ptid.
171         (thread_info::deletable): New, moved from the header.
172         (delete_thread_1): Adjust to per-inferior thread lists.
173         (find_thread_global_id): Use inf->threads().
174         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
175         find_thread_ptid.
176         (find_thread_ptid(inferior*, ptid_t)): New overload.
177         (iterate_over_threads): Use all_threads_safe.
178         (any_thread_p): New.
179         (thread_count): Use all_threads and std::distance.
180         (live_threads_count): Use all_non_exited_threads and
181         std::distance.
182         (valid_global_thread_id): Use all_threads.
183         (in_thread_list): Use find_thread_ptid.
184         (first_thread_of_inferior): Adjust to per-inferior thread lists.
185         (any_thread_of_inferior, any_live_thread_of_inferior): Use
186         inf->non_exited_threads().
187         (prune_threads, delete_exited_threads): Use all_threads_safe.
188         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
189         (set_resumed, set_running): Use all_non_exited_threads.
190         (is_thread_state, is_stopped, is_exited, is_running)
191         (is_executing): Delete.
192         (set_executing, set_stop_requested, finish_thread_state): Use
193         all_non_exited_threads.
194         (print_thread_info_1): Use all_inferiors and all_threads.
195         (thread_apply_all_command): Use all_non_exited_threads.
196         (thread_find_command): Use all_threads.
197         (update_threads_executing): Use all_non_exited_threads.
198         * tid-parse.c (parse_thread_id): Use inf->threads.
199         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
200
201 2018-11-22  Pedro Alves  <palves@redhat.com>
202
203         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
204         switch to it before calling into try_open_exec_file.
205
206 2018-11-22  Pedro Alves  <palves@redhat.com>
207
208         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
209         inferior_thread instead of find_thread_ptid, and only when
210         inferior_ptid is not null_ptid.
211         * inferior.c (add_inferior): Don't include target_pid_to_str
212         output when the inferior is not started.
213         * python/py-inferior.c (python_on_normal_stop): Don't use
214         find_thread_ptid.
215         (tui_on_user_selected_context_changed): Use inferior_thread
216         instead of find_thread_ptid, and only when inferior_ptid is not
217         null_ptid.
218
219 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
220
221         PR python/23714
222         * gdb/python/python.c (execute_gdb_command): Call
223         prevent_dont_repeat earlier to avoid affecting dont_repeat.
224
225 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
226
227         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
228         (HFILES_NO_SRCDIR): Add arch/riscv.h.
229         * arch/riscv.c: New file.
230         * arch/riscv.h: New file.
231         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
232         this list, and add arch/riscv.o.
233         * features/Makefile: Add riscv features.
234         * features/riscv/32bit-cpu.c: New file.
235         * features/riscv/32bit-cpu.xml: New file.
236         * features/riscv/32bit-csr.c: New file.
237         * features/riscv/32bit-csr.xml: New file.
238         * features/riscv/32bit-fpu.c: New file.
239         * features/riscv/32bit-fpu.xml: New file.
240         * features/riscv/64bit-cpu.c: New file.
241         * features/riscv/64bit-cpu.xml: New file.
242         * features/riscv/64bit-csr.c: New file.
243         * features/riscv/64bit-csr.xml: New file.
244         * features/riscv/64bit-fpu.c: New file.
245         * features/riscv/64bit-fpu.xml: New file.
246         * features/riscv/rebuild-csr-xml.sh: New file.
247         * riscv-tdep.c: Add 'arch/riscv.h' include.
248         (riscv_gdb_reg_names): Delete.
249         (csr_reggroup): New global.
250         (struct riscv_register_alias): Delete.
251         (struct riscv_register_feature): New structure.
252         (riscv_register_aliases): Delete.
253         (riscv_xreg_feature): New global.
254         (riscv_freg_feature): New global.
255         (riscv_virtual_feature): New global.
256         (riscv_csr_feature): New global.
257         (riscv_create_csr_aliases): New function.
258         (riscv_read_misa_reg): Delete.
259         (riscv_has_feature): Delete.
260         (riscv_isa_xlen): Simplify, just return cached xlen.
261         (riscv_isa_flen): Simplify, just return cached flen.
262         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
263         (riscv_register_name): Update to make use of tdesc_register_name.
264         Look up xreg and freg names in the new globals riscv_xreg_feature
265         and riscv_freg_feature.  Don't supply csr aliases here.
266         (riscv_fpreg_q_type): Delete.
267         (riscv_register_type): Use tdesc_register_type in almost all
268         cases, override the returned type in a few specific cases only.
269         (riscv_print_one_register_info): Handle errors reading registers.
270         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
271         registers that are otherwise unknown to GDB.  Also check the
272         csr_reggroup.
273         (riscv_print_registers_info): Remove assert about upper register
274         number, and use gdbarch_register_reggroup_p instead of
275         short-cutting.
276         (riscv_find_default_target_description): New function.
277         (riscv_check_tdesc_feature): New function.
278         (riscv_add_reggroups): New function.
279         (riscv_setup_register_aliases): New function.
280         (riscv_init_reggroups): New function.
281         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
282         setup register groups.  Register new riscv debug variable.
283         * riscv-tdep.h: Add 'arch/riscv.h' include.
284         (struct gdbarch_tdep): Remove abi union, and add
285         riscv_gdbarch_features field.  Remove cached quad floating point
286         type, and provide initialisation for double type field.
287         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
288         the list of targets using the feature based target descriptions.
289         * NEWS: Mention target description support.
290
291 2018-11-21  Pedro Alves  <palves@redhat.com>
292
293         * valops.c (find_method_list, value_find_oload_method_list)
294         (find_overload_match, find_oload_champ): Rename parameters and
295         locals.
296
297 2018-11-21  Pedro Alves  <palves@redhat.com>
298
299         * valops.c (find_method_list): Replace pointer and length
300         parameters with an gdb::array_view.  Adjust.
301         (value_find_oload_method_list): Likewise.
302         (find_overload_match): Use gdb::array_view for methods list.
303         Adjust to find_oload_champ interface change.
304         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
305         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
306
307 2018-11-21  Pedro Alves  <palves@redhat.com>
308
309         * gdbtypes.c (compare_badness): Change type of parameters to const
310         reference.  Adjust to badness_vector being a std::vector now.
311         (rank_function): Adjust to badness_vector being a std::vector now.
312         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
313         (LENGTH_MATCH): Delete.
314         (compare_badness): Change type of parameters to const reference.
315         (rank_function): Return a badness_vector by value now.
316         (find_overload_match): Adjust to badness_vector being a
317         std::vector now.  Remove cleanups.
318         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
319         badness_vector pointer.
320         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
321         a badness_vector pointer.  Adjust to badness_vector being a
322         std::vector now.  Remove cleanups.
323         (find_oload_champ): 'oload_champ_bv' parameter now
324         a badness_vector pointer.  Adjust to badness_vector being a
325         std::vector now.  Remove cleanups.
326
327 2018-11-21  Pedro Alves  <palves@redhat.com>
328
329         * cp-support.c (sym_return_val_size, sym_return_val_index)
330         (sym_return_val): Delete.
331         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
332         add to the vector.
333         (make_symbol_overload_list): Adjust to return a std::vector
334         instead of maintaining a global open coded vector.
335         (make_symbol_overload_list_block): Add std::vector parameter.
336         (make_symbol_overload_list_block): Rename to ...
337         (add_symbol_overload_list_block): ... this and add std::vector
338         parameter.
339         (make_symbol_overload_list_namespace): Rename to ...
340         (add_symbol_overload_list_namespace): ... this and add std::vector
341         parameter.
342         (make_symbol_overload_list_adl_namespace): Rename to ...
343         (add_symbol_overload_list_adl_namespace): ... this and add
344         std::vector parameter.
345         (make_symbol_overload_list_adl): Delete.
346         (add_symbol_overload_list_adl): New.
347         (make_symbol_overload_list_using): Rename to ...
348         (add_symbol_overload_list_using): ... this and add std::vector
349         parameter.
350         (make_symbol_overload_list_qualified): Rename to ...
351         (add_symbol_overload_list_qualified): ... this and add std::vector
352         parameter.
353         * cp-support.h: Include "common/array-view.h" and <vector>.
354         (make_symbol_overload_list): Change return type to std::vector.
355         (make_symbol_overload_list_adl): Delete declaration.
356         (add_symbol_overload_list_adl): New declaration.
357         * valops.c (find_overload_match): Local 'oload_syms' now a
358         std::vector.
359         (find_oload_champ_namespace): 'oload_syms' parameter now a
360         std::vector pointer.
361         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
362         std::vector pointer.  Adjust to new make_symbol_overload_list
363         interface.
364
365 2018-11-21  Pedro Alves  <palves@redhat.com>
366
367         * common/array-view.h (array_view::splice(size_type, size_t)): New.
368         (array_view::splice(size_type)): New.
369         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
370         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
371         std::vector.
372         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
373         * extension.h: Include "common/array-view.h".
374         (xmethod_worker::invoke): Adjust to use gdb::array_view.
375         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
376         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
377         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
378         (xmethod_worker::do_get_result_type): Adjust to use
379         gdb::array_view.
380         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
381         * gdbtypes.h: Include "common/array-view.h".
382         (rank_function): Adjust to use gdb::array_view.
383         * python/py-xmethods.c (python_xmethod_worker::invoke)
384         (python_xmethod_worker::do_get_arg_types)
385         (python_xmethod_worker::do_get_result_type)
386         (python_xmethod_worker::invoke): Adjust to new interfaces.
387         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
388         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
389         * valops.c (find_overload_match, find_oload_champ_namespace)
390         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
391         gdb:array_view and the new xmethod_worker interfaces.
392         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
393         gdb::array_view.
394         * value.h (find_overload_match, result_type_of_xmethod)
395         (call_xmethod): Adjust to use gdb::array_view.
396         * unittests/array-view-selftests.c: Add slicing tests.
397
398 2018-11-21  Pedro Alves  <palves@redhat.com>
399
400         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
401         * common/array-view.h (make_array_view): New.
402         * compile/compile-object-run.c (compile_object_run): Adjust to
403         pass an array_view.
404         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
405         * eval.c (eval_call): Adjust to pass an array_view.
406         (evaluate_subexp_standard): Adjust to pass an array_view.
407         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
408         * guile/scm-value.c (gdbscm_value_call): Likewise.
409         * infcall.c (push_dummy_code): Replace pointer + size parameters
410         with an array_view parameter.
411         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
412         adjust.
413         * infcall.h: Include "common/array-view.h".
414         (call_function_by_hand, call_function_by_hand_dummy): Replace
415         pointer + size parameters with an array_view parameter.
416         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
417         * linux-tdep.c (linux_infcall_mmap): Likewise.
418         * objc-lang.c (lookup_objc_class, lookup_child_selector)
419         (value_nsstring, print_object_command): Likewise.
420         * python/py-value.c (valpy_call): Likewise.
421         * rust-lang.c (rust_evaluate_funcall): Likewise.
422         * spu-tdep.c (flush_ea_cache): Likewise.
423         * valarith.c (value_x_binop, value_x_unop): Likewise.
424         * valops.c (value_allocate_space_in_inferior): Likewise.
425         * unittests/array-view-selftests.c (run_tests): Add
426         gdb::make_array_view test.
427
428 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
429
430         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
431         than a fixed size buffer.
432
433 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
434
435         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
436         and remove insertion of extra spaces in GDB's output.
437         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
438         Layout field into a temporary buffer, and then output it as a
439         string field.
440
441 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
442
443         * NEWS: Document the language choice done by
444         'info [types|functions|variables]|rbreak'.
445
446 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
447
448         * symtab.c (treg_matches_sym_type_name): Use
449         scoped_switch_to_sym_language_if_auto instead of local logic.
450         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
451         to switch to SYM language when language mode is auto.
452
453 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
454
455         * language.h (scoped_switch_to_sym_language_if_auto): New class.
456
457 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
458
459         * symtab.c (search_symbols): Properly check absence of type regexp
460         before entering the loop scanning the minimal symbols.
461
462 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
463
464         * s12z-tdep.c (s12z_extract_return_value): New function.
465         (inv_reg_perm) New array.
466         (s12z_return_value): Populate readbuf if non-null.
467
468 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
469
470         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
471         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
472         to MinGW fixed by Gnulib.
473         (O_NOINHERIT): Define if not defined.
474
475 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
476
477         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
478
479 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
480
481         * infrun.c (displaced_step_inferior_state) <next>: Remove.
482
483 2018-11-19  Tom Tromey  <tom@tromey.com>
484
485         * source.c (get_filename_and_charpos): Return void.
486
487 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
488
489         * skip.c (_initialize_step_skip): Fix "info skip" help.
490
491 2018-11-16  Tom Tromey  <tom@tromey.com>
492
493         PR rust/23625:
494         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
495
496 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
497
498         * infrun.c (displaced_step_inferior_states): Change type to
499         std::forward_list.
500         (get_displaced_stepping_state): Adjust.
501         (displaced_step_in_progress_any_inferior): Adjust.
502         (add_displaced_stepping_state): Adjust.
503         (remove_displaced_stepping_state): Adjust.
504
505 2018-11-18  Tom Tromey  <tom@tromey.com>
506
507         PR build/23814:
508         * target-delegates.c: Rebuild.
509         * ia64-linux-nat.c (class ia64_linux_nat_target)
510         <have_steppable_watchpoint>: Use override.  Return true, not 1.
511         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
512         "self" argument.
513         (ia64_linux_nat_target::low_new_thread): Rename.
514         (class ia64_linux_nat_target) <read_description>: Don't declare.
515         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
516         bool.
517
518 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
519
520         PR gdb/22736:
521         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
522         lang_struct_return code.
523
524 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
525
526         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
527         return_method.
528         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
529         * amd64-tdep.c (amd64_push_arguments): Likewise.
530         (amd64_push_dummy_call): Likewise.
531         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
532         * arc-tdep.c (arc_push_dummy_call): Likewise.
533         * arm-tdep.c (arm_push_dummy_call): Likewise.
534         * avr-tdep.c (avr_push_dummy_call): Likewise.
535         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
536         * cris-tdep.c (cris_push_dummy_call): Likewise.
537         * csky-tdep.c (csky_push_dummy_call): Likewise.
538         * frv-tdep.c (frv_push_dummy_call): Likewise.
539         * gdbarch.c: Regenerate.
540         * gdbarch.h: Regenerate.
541         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
542         return_method.
543         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
544         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
545         (hppa64_push_dummy_call): Likewise.
546         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
547         * i386-tdep.c (i386_push_dummy_call): Likewise.
548         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
549         * infcall.c (call_function_by_hand_dummy): Likewise.
550         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
551         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
552         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
553         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
554         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
555         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
556         * mep-tdep.c (mep_push_dummy_call): Likewise.
557         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
558         (mips_n32n64_push_dummy_call): Likewise.
559         (mips_o32_push_dummy_call): Likewise.
560         (mips_o64_push_dummy_call): Likewise.
561         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
562         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
563         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
564         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
565         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
566         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
567         (ppc64_sysv_abi_push_dummy_call): Likewise.
568         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
569         (ppc64_sysv_abi_push_dummy_call): Likewise.
570         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
571         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
572         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
573         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
574         * rx-tdep.c (rx_push_dummy_call): Likewise.
575         * s390-tdep.c (s390_push_dummy_call): Likewise.
576         * score-tdep.c (score_push_dummy_call): Likewise.
577         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
578         (sh_push_dummy_call_nofpu): Likewise.
579         * sparc-tdep.c (sparc32_store_arguments): Likewise.
580         (sparc32_push_dummy_call): Likewise.
581         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
582         (sparc64_push_dummy_call): Likewise.
583         * spu-tdep.c (spu_push_dummy_call): Likewise.
584         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
585         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
586         * v850-tdep.c (v850_push_dummy_call): Likewise.
587         * vax-tdep.c (vax_push_dummy_call): Likewise.
588         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
589         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
590
591 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
592
593         * gdbarch.sh (enum function_call_return_method): Add enum.
594         * gdbarch.h: Regenerate.
595         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
596
597 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
598
599         * unittests/copy_bitwise-selftests.c: New file.
600         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
601         (selftests::copy_bitwise_tests): Delete, moving this code to
602         unittests/copy_bitwise-selftests.c instead.
603         (_initialize_utils): Do not register copy_bitwise tests.
604         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
605         unittests/copy_bitwise-selftests.c.
606
607 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
608
609         * ada-lang.c (move_bits): Delete. Update all callers to use
610         copy_bitwise instead.
611         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
612         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
613         Move from here to utils.c.
614         (_initialize_dwarf2loc): Remove call to register copy_bitwise
615         selftests.
616         * utils.h (copy_bitwise): Add declaration.
617         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
618         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
619         Moved here from dwarf2loc.c.
620         (_initialize_utils): Register copy_bitwise selftests.
621
622 2018-11-14  Jim Wilson  <jimw@sifive.com>
623
624         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
625         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
626         then increment next_regnum if odd.
627         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
628         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
629         function type.  Pass new arg to riscv_arg_location based on function
630         type.
631         (riscv_return_value): Pass new arg to riscv_arg_location.
632
633         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
634         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
635         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
636
637         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
638         setting len.  New local align, set to max of arg align and xlen,
639         and pass to first riscv_assign_stack_location call.
640
641 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
642
643         * skip.c (complete_skip_number): New function.
644         (_initialize_step_skip): Add completers to some skip commands.
645
646 2018-11-09  Tom Tromey  <tom@tromey.com>
647
648         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
649         (struct remote_g_packet_data): Derive from allocate_on_obstack.
650         <guesses>: Now a std::vector.
651         (remote_g_packet_data_init, register_remote_g_packet_guess):
652         Update.
653         (remote_read_description_p): Update.  Return bool.
654         (remote_target::read_description): Update.
655         (struct remote_g_packet_guess): Add constructor.
656
657 2018-11-09  Tom Tromey  <tom@tromey.com>
658
659         * common/scoped_fd.h (class scoped_fd): Add move constructor and
660         move assignment operator.
661         * psymtab.c (psymtab_to_fullname): Update.
662         * source.h (open_source_file): Return scoped_fd.
663         (find_and_open_source): Likewise.
664         * source.c (open_source_file): Return scoped_fd.
665         (get_filename_and_charpos): Update.
666         (print_source_lines_base): Update.  Use scoped_fd::to_file.
667         (forward_search_command): Likewise.
668         (reverse_search_command): Likewise.
669         (find_and_open_source): Return scoped_fd.
670         * tui/tui-source.c (tui_set_source_content): Update.  Use
671         gdb_file_up.
672
673 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
674
675         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
676         overflow.
677
678 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
679
680         * configure: Regenerate.
681
682 2018-11-09  Tom de Vries  <tdevries@suse.de>
683
684         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
685         unconditionally, to set the language of the symbol.  Manage freeing
686         returned pointer using gdb::unique_xmalloc_ptr.
687
688 2018-11-08  Tom Tromey  <tom@tromey.com>
689
690         * record.c (require_record_target): Upper-case "<TAB>".
691
692 2018-11-08  Tom Tromey  <tom@tromey.com>
693
694         * python/lib/gdb/command/pretty_printers.py
695         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
696
697 2018-11-08  Tom Tromey  <tom@tromey.com>
698
699         PR gdb/23555:
700         PR gdb/23838:
701         * target.h (target_supports_terminal_ours): Return bool.
702         * target.c (target_supports_terminal_ours): Handle case where
703         current_top_target returns nullptr.  Return bool.
704
705 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
706
707         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
708         return the correct count for potential HFAs.
709
710 2018-11-08  Jan Beulich  <jbeulich@suse.com>
711
712         * i387-tdep.c (i387_supply_xsave): Split handling of
713         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
714         (i387_collect_xsave): Likewise.
715
716 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
717
718         * riscv-tdep.c (riscv_insn::decode): Update header comment.
719         (riscv_frame_this_id): Catch errors thrown while building the
720         frame cache, leave the frame id as the default, which is the outer
721         frame id.
722
723 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
724
725         * ada-lang.c (read_atcb): Only set task_info->called_task if
726         task_info->state == Entry_Caller_Sleep.
727         (print_ada_task_info): Do not check task_info->state before
728         checking task_info->called_task.
729         (info_task): Likewise.
730
731 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
732
733         * ada-tasks.c (read_atcb): Clear task_info before computing
734         the value of each of its fields.
735
736 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
737
738         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
739         NULL before dereferencing it.
740
741 2018-11-06  Tom de Vries  <tdevries@suse.de>
742
743         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
744         program headers.
745
746 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
747
748         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
749         so that it applies to uclinux as well.
750
751 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
752
753         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
754         when on AAPCS.
755
756 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
757
758         * riscv-fbsd-nat.c (getregs_supplies): Return true for
759         RISCV_CSR_SSTATUS_REGNUM.
760
761 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
762
763         * source.c (open_source_file): Fix leak by transferring the
764         current s->fullname to the unique_xmalloc_ptr fullname given
765         to find_and_open_source.
766
767 2018-11-04  Tom Tromey  <tom@tromey.com>
768
769         * varobj.c (install_default_visualizer): Update.
770         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
771         Return gdbpy_ref.
772         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
773         (find_pretty_printer_from_progspace)
774         (find_pretty_printer_from_gdb, find_pretty_printer)
775         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
776         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
777         Update.
778
779 2018-11-04  Tom Tromey  <tom@tromey.com>
780
781         * python/python.c (gdbpy_parameter_value): Update.
782         * python/python-internal.h (python_string_to_unicode)
783         (python_string_to_target_python_string)
784         (host_string_to_python_string): Return gdbpy_ref.
785         * python/py-utils.c (python_string_to_unicode)
786         (unicode_to_encoded_python_string)
787         (unicode_to_target_python_string)
788         (python_string_to_target_string)
789         (python_string_to_target_python_string): Return gdbpy_ref.
790         (python_string_to_host_string): Update.
791         (host_string_to_python_string): Return gdbpy_ref.
792         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
793         (stpy_fullname): Update.
794         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
795         Update.
796         * python/py-prettyprint.c (print_string_repr): Update.
797         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
798         (objfpy_get_build_id): Update.
799         * python/py-breakpoint.c (bppy_get_location)
800         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
801         Update.
802
803 2018-11-04  Tom Tromey  <tom@tromey.com>
804
805         * python/python-internal.h (gdb_py_object_from_longest)
806         (gdb_py_object_from_ulongest): Return gdbpy_ref.
807         * python/py-value.c (valpy_int): Update.
808         * python/py-utils.c (gdb_py_object_from_longest): Return
809         gdbpy_ref.
810         (gdb_py_object_from_ulongest): Likewise.
811         * python/py-type.c (typy_get_alignof): Update.
812         * python/py-linetable.c (ltpy_get_all_source_lines)
813         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
814         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
815
816 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
817
818         * ada-lang.c (_initialize_ada_language): Fix typo.
819
820 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
821
822         * language.c (type): Remove.
823         (_initialize_language): Remove assignment to type.
824
825 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
826
827         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
828         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
829         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
830         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
831         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
832         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
833         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
834         and aarch64-ravenscar-thread.o.
835         * NEWS: Add entry documenting Ravenscar tasking support
836         on AArch64 ELF.
837
838 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
839
840         * symtab.c (info_functions_command): Initialize quiet flag.
841         * stack.c (info_args_command): Likewise.
842
843 2018-11-01  Jim Wilson  <jimw@sifive.com>
844
845         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
846         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
847         debugging messages.
848
849 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
850
851         * ada-lang.c (ada_watch_location_expression): New function.
852         (ada_language_defn): Set la_watch_location_expression to
853         ada_watch_location_expression.
854
855 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
856
857         * print-utils.c (int_string): Remove unnecessary trailing spaces.
858
859 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
860
861         * rs6000-tdep.c (skip_prologue): Fix potential negative left
862         shifting.
863
864 2018-11-01  Jerome Guitton  <guitton@adacore.com>
865             Joel Brobecker  <brobecker@adacore.com>
866
867         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
868         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
869         * arm-pikeos-tdep.c: New file.
870         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
871         embedded system.
872         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
873
874 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
875
876         * common/pathstuff.c (get_standard_temp_dir): New.
877         * common/pathstuff.h (get_standard_temp_dir): New.
878         * config.in: Re-generate.
879         * configure: Re-generate.
880         * configure.ac: Don't check for mkdtemp.
881         * gnulib/aclocal-m4-deps.mk: Re-generate.
882         * gnulib/aclocal.m4: Re-generate.
883         * gnulib/config.in: Re-generate.
884         * gnulib/configure: Re-generate.
885         * gnulib/import/Makefile.am: Re-generate.
886         * gnulib/import/Makefile.in: Re-generate.
887         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
888         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
889         * gnulib/import/m4/mkdtemp.m4: New file.
890         * gnulib/import/mkdtemp.c: New file.
891         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
892         Add mkdtemp module.
893         * unittests/mkdir-recursive-selftests.c (test): Use
894         get_standard_temp_dir.
895         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
896         ifdef.
897         * compile/compile.c (get_compile_file_tempdir): Likewise.
898
899 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
900
901         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
902         (SIG_FRAME_LR_OFFSET64): New define.
903         (SIG_FRAME_FP_OFFSET64): New define.
904         (aix_sighandle_frame_cache): New Function.
905         (aix_sighandle_frame_this_id): New Function.
906         (aix_sighandle_frame_prev_register): New Function.
907         (aix_sighandle_frame_sniffer): New Function.
908         (aix_sighandle_frame_unwind): New global variable.
909         (rs6000_aix_init_osabi): Install new frame unwinder.
910
911 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
912
913         PR gdb/23835
914         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
915         already defined.
916
917 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
918
919         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
920
921 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
922
923         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
924         (producer_is_icc): New function.
925         (check_producer): Set producer_is_icc field on dwarf2_cu.
926         (dwarf2_init_integer_type): New function.
927         (read_base_type): Call dwarf2_init_integer_type instead of
928         init_integer_type in all cases.
929         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
930         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
931         LEN is greater than 0.
932
933 2018-10-30  Tom Tromey  <tom@tromey.com>
934
935         * main.c (captured_main_1): Check return value of bfd_init.
936
937 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
938
939         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
940         Adjust comments.
941
942 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
943
944         * procfs.c: Include common/pathstuff.h.
945
946 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
947
948         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
949         Add missing braces.  No functional change.
950
951 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
952
953         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
954         to report a bad option and fix indentation.
955         * demangle.c (demangle_command): Use report_unrecognized_option_error
956         to report a bad option and correctly report the bad option.
957
958 2018-10-27  Tom Tromey  <tom@tromey.com>
959
960         PR cli/23364:
961         * darwin-nat.c (copied_shell): New global.
962         (may_have_sip): Rename from should_disable_startup_with_shell.
963         (copy_shell_to_cache, maybe_cache_shell): New functions.
964         (darwin_nat_target::create_inferior): Update.  Use
965         copied_shell.
966
967 2018-10-27  Tom Tromey  <tom@tromey.com>
968
969         * unittests/scoped_fd-selftests.c (test_to_file): New function.
970         (run_tests): Call test_to_file.
971         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
972         temporary files.
973         * common/scoped_fd.h (scoped_fd::to_file): New method.
974
975 2018-10-27  Tom Tromey  <tom@tromey.com>
976
977         * unittests/scoped_mmap-selftests.c (test_normal): Use
978         gdb_mkostemp_cloexec.
979         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
980         Use gdb_mkostemp_cloexec.
981         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
982         gnulib/config.in, gnulib/configure,
983         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
984         gnulib/import/m4/gnulib-cache.m4,
985         gnulib/import/m4/gnulib-comp.m4: Update.
986         * gnulib/import/m4/mkostemp.m4: New file.
987         * gnulib/import/m4/mkstemp.m4: Remove.
988         * gnulib/import/mkostemp.c: New file.
989         * gnulib/import/mkstemp.m4: Remove.
990         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
991         mkstemp, add mkostemp.  Apply new patch.
992         * gnulib/import/stdlib.in.h: Apply patch.
993         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
994         New file.
995         * dwarf-index-write.c (write_psymtabs_to_index): Use
996         gdb_mkostemp_cloexec.
997         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
998
999 2018-10-27  Tom Tromey  <tom@tromey.com>
1000
1001         * unittests/mkdir-recursive-selftests.c: New file.
1002         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1003         unittests/mkdir-recursive-selftests.c.
1004         * dwarf-index-cache.c (mkdir_recursive): Move to
1005         common/filestuff.c.
1006         (index_cache::store): Check return value of mkdir_recursive.
1007         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1008         (_initialize_index_cache): Don't register test.
1009         * common/filestuff.h (mkdir_recursive): Declare.
1010         * common/filestuff.c (mkdir_recursive): Move from
1011         dwarf-index-cache.c.  Return bool.
1012
1013 2018-10-27  Tom Tromey  <tom@tromey.com>
1014
1015         * dwarf-index-write.c (write_psymtabs_to_index): Move
1016         make_temp_filename to common/pathstuff.c.
1017         * common/pathstuff.h (make_temp_filename): Declare.
1018         * common/pathstuff.c (make_temp_filename): New function, moved
1019         from dwarf-index-write.c.
1020
1021 2018-10-27  Tom Tromey  <tom@tromey.com>
1022
1023         * procfs.c (procfs_target::create_inferior): Use get_shell.
1024         * cli/cli-cmds.c (shell_escape): Use get_shell.
1025         * windows-nat.c (windows_nat_target::create_inferior): Use
1026         get_shell.
1027         * common/pathstuff.c (get_shell): New function.
1028         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1029         (fork_inferior): Use get_shell.
1030         * common/pathstuff.h (get_shell): Declare.
1031
1032 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1033
1034         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1035
1036 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1037
1038         * stack.c (print_variable_and_value_data): Add preg and treg.
1039         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1040         and update callers.
1041         (print_frame_arg_vars): Likewise.
1042         (prepare_reg): New function.
1043         (info_locals_command): Extract info print args and use them.
1044         (info_args_command): Likewise.
1045         (_initialize_stack): Modify on-line help.
1046         * symtab.c (treg_matches_sym_type_name): New function.
1047         (search_symbols): New arg t_regexp.
1048         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1049         (info_variables_command): Extract info print args and use them.
1050         (info_functions_command): Likewise.
1051         (info_types_command): Update call to symtab_symbol_info.
1052         (_initialize_symtab): Modify on-line help.
1053         * symtab.h (treg_matches_sym_type_name): New function.
1054         (search_symbols): New t_regexp arg.
1055
1056 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1057
1058         * cli-utils.c (extract_arg_maybe_quoted): New function.
1059         (extract_info_print_args): New function.
1060         (info_print_args_help): New function.
1061         (report_unrecognized_option_error): New function.
1062         * cli-utils.h (extract_arg_maybe_quoted): New function.
1063         (extract_info_print_args): New function.
1064         (info_print_args_help): New function.
1065         (report_unrecognized_option_error): New function.
1066
1067 2018-10-26  Tom Tromey  <tom@tromey.com>
1068
1069         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1070         (compute_compunit_symtab_includes): Update.
1071         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1072         (compunit_symtab_ptr): Likewise.
1073
1074 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1075
1076         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1077         default_print_auxv_entry for specific tag values.
1078
1079 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1080
1081         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1082
1083 2018-10-26  Jim Wilson  <jimw@sifive.com>
1084
1085         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1086         (riscv_linux_sigframe_init): Declare.
1087         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1088         (riscv_linux_sigframe): New.
1089         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1090         (riscv_linux_sigframe_init): Define.
1091         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1092
1093         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1094         (riscv_isa_flen): Likewise.  Drop static.
1095         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1096         (riscv_isa_flen): Likewise.  Declare.
1097
1098 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1099             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1100
1101         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1102         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1103         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1104         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1105         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1106         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1107         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1108         Define.
1109         (struct ppc_linux_features) <htm>: New field.
1110         (ppc_linux_no_features): Add initializer for htm field.
1111         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1112         new tdescs.
1113         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1114         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1115         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1116         Define if not already defined.
1117         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1118         and rs6000/powerpc-isa207-htm-vsx64l.
1119         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1120         rs6000/powerpc-isa207-htm-vsx64l.xml.
1121         * features/rs6000/power-htm-spr.xml: New file.
1122         * features/rs6000/power-htm-core.xml: New file.
1123         * features/rs6000/power64-htm-core.xml: New file.
1124         * features/rs6000/power-htm-fpu.xml: New file.
1125         * features/rs6000/power-htm-altivec.xml: New file.
1126         * features/rs6000/power-htm-vsx.xml: New file.
1127         * features/rs6000/power-htm-ppr.xml: New file.
1128         * features/rs6000/power-htm-dscr.xml: New file.
1129         * features/rs6000/power-htm-tar.xml: New file.
1130         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1131         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1132         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1133         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1134         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1135         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1136         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1137         fetch_regset with HTM regsets.
1138         (store_register, store_ppc_registers): Call store_regset with HTM
1139         regsets.
1140         (ppc_linux_nat_target::read_description): Set htm field in the
1141         features struct if needed.
1142         * ppc-linux-tdep.c: Include
1143         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1144         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1145         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1146         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1147         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1148         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1149         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1150         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1151         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1152         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1153         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1154         (ppc32_linux_ctarregset): New globals.
1155         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1156         (ppc_linux_collect_core_cpgrregset): New function.
1157         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1158         regsets.
1159         (ppc_linux_core_read_description): Check if the tm spr section is
1160         present and set htm in the features struct.
1161         (_initialize_ppc_linux_tdep): Call
1162         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1163         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1164         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1165         Declare.
1166         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1167         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1168         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1169         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1170         New fields.
1171         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1172         Likewise.
1173         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1174         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1175         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1176         New enum fields.
1177         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1178         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1179         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1180         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1181         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1182         <PPC_CTAR_REGNUM>: Likewise.
1183         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1184         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1185         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1186         (IS_CEFP_PSEUDOREG): Define.
1187         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1188         registers.  Return names for the checkpointed DFP, VSX, and EFP
1189         pseudo registers.
1190         (rs6000_pseudo_register_type): Remove initial assert and raise an
1191         internal error in the else clause instead.  Return types for the
1192         checkpointed DFP, VSX, and EFP pseudo registers.
1193         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1194         checkpointed DFP pseudo registers.
1195         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1196         checkpointed VSX pseudo registers.
1197         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1198         from efpr_pseudo_register_read and
1199         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1200         registers.
1201         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1202         Handle checkpointed DFP, VSX, and EFP registers.
1203         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1204         (efp_ax_pseudo_register_collect): New functions.
1205         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1206         register logic to new functions.  Handle checkpointed DFP, VSX,
1207         and EFP pseudo registers.
1208         (rs6000_gdbarch_init): Look for and validate the htm features.
1209         Include checkpointed DFP, VSX and EFP pseudo-registers.
1210         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1211         HTM registers.
1212
1213 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1214
1215         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1216         without altivec or fpu.
1217
1218 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1219             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1220
1221         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1222         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1223         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1224         Define if not already defined.
1225         * features/rs6000/power-ebb.xml: New file.
1226         * features/rs6000/power-linux-pmu.xml: New file.
1227         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1228         features.
1229         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1230         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1231         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1232         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1233         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1234         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1235         fetch_regset with ebb and pmu regsets.
1236         (store_register, store_ppc_registers): Call store_regset with ebb
1237         and pmu regsets.
1238         (ppc_linux_nat_target::read_description): Set isa207 field in the
1239         features struct if ebb and pmu are avaiable.
1240         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1241         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1242         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1243         and pmu regsets.
1244         (ppc_linux_core_read_description): Check if the pmu section is
1245         present and set isa207 in the features struct.
1246         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1247         (ppc32_linux_pmuregset): Declare.
1248         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1249         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1250         <ppc_sier_regnum>: New field.
1251         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1252         New enum values.
1253         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1254         values.
1255         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1256         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1257         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1258         ebb and pmu features.
1259
1260 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1261             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1262
1263         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1264         (tdesc_powerpc_isa207_vsx64l): Declare.
1265         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1266         (struct ppc_linux_features) <isa207>: New field.
1267         (ppc_linux_no_features): Add initializer for isa207 field.
1268         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1269         new tdescs.
1270         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1271         (NT_PPC_TAR): Define if not already defined.
1272         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1273         rs6000/powerpc-isa207-vsx64l.
1274         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1275         rs6000/powerpc-isa207-vsx64l.xml.
1276         * features/rs6000/power-tar.xml: New file.
1277         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1278         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1279         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1280         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1281         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1282         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1283         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1284         fetch_regset with the TAR regset.
1285         (store_register, store_ppc_registers): Call store_regset with the
1286         TAR regset.
1287         (ppc_linux_nat_target::read_description): Set isa207 field in the
1288         features struct if needed.
1289         * ppc-linux-tdep.c: Include
1290         features/rs6000/powerpc-isa207-vsx32l.c and
1291         features/rs6000/powerpc-isa207-vsx64l.c.
1292         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1293         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1294         regset.
1295         (ppc_linux_core_read_description): Check if the tar section is
1296         present and set isa207 in the features struct.
1297         (_initialize_ppc_linux_tdep): Call
1298         initialize_tdesc_powerpc_isa207_vsx32l and
1299         initialize_tdesc_powerpc_isa207_vsx64l.
1300         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1301         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1302         (enum) <PPC_TAR_REGNUM>: New enum value.
1303         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1304         feature.
1305         (ppc_process_record_op31): Record changes to TAR.
1306
1307 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1308             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1309
1310         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1311         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1312         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1313         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1314         (struct ppc_linux_features) <ppr_dscr>: New field.
1315         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1316         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1317         new tdescs.
1318         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1319         Define if not already defined.
1320         * features/Makefile (WHICH): Add
1321         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1322         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1323         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1324         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1325         * features/rs6000/power-dscr.xml: New file.
1326         * features/rs6000/power-ppr.xml: New file.
1327         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1328         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1329         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1330         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1331         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1332         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1333         * ppc-linux-nat.c: Include <sys/uio.h>.
1334         (fetch_regset, store_regset, check_regset): New functions.
1335         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1336         DSCR and PPR regsets.
1337         (store_register, store_ppc_registers): Call store_regset with
1338         DSCR and PPR regsets.
1339         (ppc_linux_get_hwcap2): New function.
1340         (ppc_linux_nat_target::read_description): Call
1341         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1342         features struct if needed.
1343         * ppc-linux-tdep.c: Include
1344         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1345         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1346         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1347         (ppc32_linux_dscrregset): New globals.
1348         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1349         and dscr regsets.
1350         (ppc_linux_core_read_description): Check if the ppr and dscr
1351         sections are present and set ppr_dscr in the features struct.
1352         (_initialize_ppc_linux_tdep): Call
1353         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1354         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1355         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1356         (ppc32_linux_dscrregset): Declare.
1357         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1358         <ppc_dscr_regnum>: New field.
1359         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1360         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1361         and dscr features.
1362         (ppc_process_record_op31): Record changes to PPR and DSCR.
1363
1364 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1365
1366         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1367         second initializer line for the have_* variables.  Initialize
1368         have_fpu to 0 instead of 1.
1369
1370 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1371
1372         * arch/ppc-linux-common.c (ppc_linux_match_description):
1373         Parenthesize tdesc assignements and indent them properly.
1374
1375 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1376
1377         * ppc-linux-nat.c (fetch_register): Change if statement to else
1378         if.
1379         (store_register): Likewise.
1380
1381 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1382
1383         * rs6000-tdep.c: Remove reggroups.h include.
1384         (rs6000_pseudo_register_reggroup_p): Remove.
1385         (rs6000_gdbarch_init): Remove call to
1386         set_tdesc_pseudo_register_reggroup_p.
1387
1388 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1389
1390         * reggroups.c (default_register_reggroup_p): Return true for
1391         decfloat registers and float_reggroup.
1392
1393 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1394
1395         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1396         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1397         ppc_linux_collect_vrregset by regcache_collect_regset.
1398
1399 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1400
1401         * linux-tdep.c (linux_collect_regset_section_cb): Use
1402         std::vector<gdb_byte> instead of char * and malloc for buf.
1403         Remove xfree.
1404
1405 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1406
1407         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1408         symtab_start instead of always using language_unknown.
1409
1410 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1411
1412         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1413         READ_P parameter, catch and ignore register access errors from
1414         either the old or new MISA location.
1415         (riscv_has_feature): Update call to riscv_read_misa_reg.
1416
1417 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1418
1419         * python/py-function.c (convert_values_to_python): Return
1420         gdbpy_ref<>.  Add header comment.
1421         (fnpy_call): Adjust.
1422
1423 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1424
1425         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1426         (cmdpy_completer_handle_brkchars): Adjust.
1427         (cmdpy_completer): Adjust.
1428
1429 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1430
1431         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1432         Pass correct regnum to raw_supply_zeroed.
1433
1434 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1435
1436         * regcache.c (cooked_read_test): Add CSKY to the list of
1437         architectures with a save_reggroup
1438
1439 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
1440
1441         PR gdb/23368
1442         * infrun.c (follow_exec): In the follow_exec_mode_new case,
1443         transfer terminal state from old new new inferior.
1444         * terminal.h (swap_terminal_info): New function.
1445         * inflow.c (swap_terminal_info): New function.
1446
1447 2018-10-23  Tom Tromey  <tom@tromey.com>
1448
1449         * record-btrace.c (get_thread_current_frame_id): Rename from
1450         get_thread_current_frame.  Return a frame_id.
1451         (record_btrace_start_replaying): Update.
1452
1453 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1454
1455         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
1456         for CSRs.
1457
1458 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
1459
1460         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
1461         have_nonsteppable_watchpoint attribute to 1.
1462
1463 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1464
1465         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
1466         register names.
1467         (struct register_alias): Rename to...
1468         (struct riscv_register_alias): ...this, and update comment.
1469         (riscv_register_aliases): Update type, and alias names.  Remove
1470         CSR names from this list.
1471         (riscv_register_name): Use riscv_gdb_reg_names for int and float
1472         register names.  Add an extra assertion.
1473         (riscv_is_regnum_a_named_csr): New function.
1474         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
1475
1476 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
1477
1478         * configure.tgt: Add configuration for s12z.
1479         * s12z-tdep.c:  New file.
1480         * NEWS: Mention new target.
1481
1482 2018-10-22  Jim Wilson  <jimw@sifive.com>
1483
1484         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
1485         FP reg smaller than FP reg size, and fill with -1 instead of 0.
1486
1487         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
1488         (riscv_register_type): Use them.
1489         (riscv_print_one_register_info): Handle union of floats same as float.
1490         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
1491         riscv_fpreg_q_type fields.
1492
1493 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1494
1495         * gdbarch.sh (gdbarch_num_cooked_regs): New.
1496         * gdbarch.h: Re-generate.
1497         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
1498         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
1499         * eval.c (evaluate_subexp_standard): Likewise.
1500         * findvar.c (value_of_register): Likewise.
1501         (value_of_register_lazy): Likewise.
1502         (address_from_register): Likewise.
1503         * frame.c (get_frame_register_bytes): Likewise.
1504         * gdbarch-selftests.c (register_to_value_test): Likewise.
1505         * h8300-tdep.c (h8300_register_type): Likewise.
1506         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
1507         (i386_svr4_reg_to_regnum): Likewise.
1508         * infcmd.c (default_print_registers_info): Likewise.
1509         (registers_info): Likewise.
1510         (print_vector_info): Likewise.
1511         (default_print_float_info): Likewise.
1512         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
1513         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
1514         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
1515         (mi_cmd_data_list_changed_registers): Likewise.
1516         (mi_cmd_data_list_register_values): Likewise.
1517         (mi_cmd_data_write_register_values): Likewise.
1518         (mi_cmd_trace_frame_collected): Likewise.
1519         * mips-tdep.c (print_gp_register_row): Likewise.
1520         (mips_print_registers_info): Likewise.
1521         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1522         * regcache.c (init_regcache_descr): Likewise.
1523         (register_size): Likewise.
1524         (register_dump::dump): Likewise.
1525         (cooked_read_test): Likewise.
1526         (cooked_write_test): Likewise.
1527         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
1528         (rs6000_gdbarch_init): Likewise.
1529         * stabsread.c (stab_reg_to_regnum): Likewise.
1530         * stack.c (info_frame_command): Likewise.
1531         * target-descriptions.c (tdesc_register_name): Likewise.
1532         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
1533         * tui/tui-regs.c (tui_show_register_group): Likewise.
1534         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
1535         (user_reg_map_regnum_to_name): Likewise.
1536         (value_of_user_reg): Likewise.
1537         (maintenance_print_user_registers): Likewise.
1538         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
1539         (xtensa_register_name): Likewise.
1540         (xtensa_register_type): Likewise.
1541         (xtensa_reg_to_regnum): Likewise.
1542         (xtensa_pseudo_register_read): Likewise.
1543         (xtensa_pseudo_register_write): Likewise.
1544
1545 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1546
1547         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
1548         correctly-sized buffer with raw_read.
1549         (amd64_pseudo_register_write): Use correctly-sized buffer for
1550         raw_read/raw_write.
1551
1552 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1553
1554         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
1555         in add_prefix_cmd of set print type.
1556
1557 2018-10-19  Tom Tromey  <tom@tromey.com>
1558
1559         PR tui/18388:
1560         * NEWS: Mention tabset deprecation.
1561         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
1562         (update_tab_width): New function.
1563         (tui_set_tab_width, tui_show_tab_width): New functions.
1564         (tui_set_tab_width_command): Use update_tab_width.
1565         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
1566         Add new "set tui tab-width" command.
1567         * tui/tui-source.c (tui_set_source_content): Update.
1568         * tui/tui-disasm.c (tui_set_disassem_content): Update.
1569         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
1570         Don't declare.
1571         (tui_tab_width): Declare.
1572         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
1573         (tui_set_default_tab_len): Remove.
1574
1575 2018-10-19  Tom Tromey  <tom@tromey.com>
1576
1577         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
1578         (key_is_backspace, tui_getc): Don't declare.
1579         * tui/tui-io.c (key_is_start_sequence): Now static.
1580         (key_is_end_sequence, key_is_backspace): Remove.
1581         (tui_getc): Now static.
1582
1583 2018-10-19  Tom Tromey  <tom@tromey.com>
1584
1585         * symfile.c (reread_symbols): Clear "static_links".
1586
1587 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
1588
1589         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
1590         define.
1591         (aarch64_linux_sigframe_init): Extra boundary checks.
1592
1593 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
1594
1595         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
1596         the possibly non-existent tdesc type 'vec128', but the type of raw
1597         register v16 instead.
1598
1599 2018-10-19  Gary Benson <gbenson@redhat.com>
1600
1601         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
1602
1603 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
1604
1605         PR cli/23785
1606         * cli/cli-dump.c (restore_binary_file): Check if "file" is
1607         NULL.
1608
1609 2018-10-17  Paul Koning  <paul_koning@dell.com>
1610
1611         * charset.c (convert_between_encodings): Fix unsigned overflow.
1612
1613 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
1614
1615         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
1616         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
1617         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
1618         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1619         New functions.
1620         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
1621         and fbsd_info_proc_mappings_header.
1622         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
1623         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1624         New.
1625
1626 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
1627
1628         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
1629         Solaris Maintainer.
1630
1631 2018-10-15  Tom Tromey  <tom@tromey.com>
1632
1633         * tui/tui.c (strcat_to_buf): Remove casts.
1634         * tui/tui-winsource.c (tui_show_source_line)
1635         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
1636         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
1637         * tui/tui-windata.c (tui_first_data_item_displayed)
1638         (tui_delete_data_content_windows, tui_erase_data_content)
1639         (tui_display_all_data, tui_display_data_from)
1640         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
1641         * tui/tui-win.c (tui_set_win_height)
1642         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
1643         casts.
1644         * tui/tui-win.c (tui_resize_all): Remove casts.
1645         (tui_scroll_backward_command, tui_set_focus)
1646         (tui_set_tab_width_command): Likewise.
1647         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
1648         * tui/tui-regs.c (tui_show_register_group): Remove cast.
1649         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
1650         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
1651         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
1652         Remove casts.
1653
1654 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1655
1656         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
1657         AArch64/ARM maintainer.
1658
1659 2018-10-11  Gary Benson <gbenson@redhat.com>
1660
1661         * interps.h (interp::m_name): Make private and mutable.
1662         * interps.c (interp::~interp): Free m_name.
1663
1664 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1665             Simon Marchi <simark@simark.ca>
1666
1667         * README (`configure' options): Add documentation for new
1668         "--enable-unit-tests" option.
1669         * acinclude.m4: Include "selftest.m4".
1670         * configure: Regenerate.
1671         * configure.ac: Use "GDB_AC_SELFTEST".
1672         * maint.c (maintenance_selftest): Update message informing
1673         that selftests have been disabled.
1674         (maintenance_info_selftests): Likewise.
1675         * selftest.m4: New file.
1676
1677 2018-10-10  Gary Benson <gbenson@redhat.com>
1678
1679         * remote.c (remote_target::remote_send_printf): Add
1680         missing va_end found by Coverity.
1681
1682 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
1683
1684         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
1685
1686 2018-10-09  Tom Tromey  <tom@tromey.com>
1687
1688         * configure: Rebuild.
1689         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
1690         * NEWS: Update --enable-ubsan documentation.
1691
1692 2018-10-09  Gary Benson <gbenson@redhat.com>
1693
1694         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
1695         found by Coverity.
1696
1697 2018-10-08  Tom Tromey  <tom@tromey.com>
1698
1699         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
1700         variable.
1701         (riscv_fbsd_init_abi): Likewise.
1702
1703 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1704         * valops.c (value_struct_elt_for_reference): Rename local variable
1705         to work around the shadowing a previous local warning.
1706
1707 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1708
1709         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
1710         * NEWS: Mention new FreeBSD/riscv native configuration.
1711         * configure.host: Add riscv*-*-freebsd*.
1712         * configure.nat: Likewise.
1713         * riscv-fbsd-nat.c: New file.
1714
1715 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1716
1717         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
1718         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
1719         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
1720         * NEWS: Mention new FreeBSD/riscv target.
1721         * configure.tgt: Add riscv*-*-freebsd*.
1722         * riscv-fbsd-tdep.c: New file.
1723         * riscv-fbsd-tdep.h: New file.
1724
1725 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1726
1727         * regcache.h (struct regcache_map_entry): Note that this type can
1728         be used with traditional frame caches.
1729         * trad-frame.c (trad_frame_set_reg_regmap): New.
1730         * trad-frame.h (trad_frame_set_reg_regmap): New.
1731
1732 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1733
1734         PR c++/16841
1735         * valops.c (get_virtual_base_offset): New function.
1736         (value_struct_elt_for_reference): Use it to get virtual base offset
1737         and add it in calculating class member address.
1738
1739 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
1740
1741         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1742         (check_producer): Check if the producer is codewarrior.
1743         (producer_is_codewarrior): New function.
1744         (lnp_state_machine::record_line): Ignore is_stmt flag for records
1745         produced by codewarrior.
1746         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1747
1748 2018-10-06  Tom Tromey  <tom@tromey.com>
1749
1750         PR python/19399:
1751         * python/py-inferior.c: Add "architecture" entry.
1752         (infpy_architecture): New function.
1753
1754 2018-10-06  Tom Tromey  <tom@tromey.com>
1755
1756         PR python/21765:
1757         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1758         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1759         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
1760         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1761
1762 2018-10-06  Tom Tromey  <tom@tromey.com>
1763
1764         PR build/17077:
1765         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1766         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1767         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1768         #include.
1769
1770 2018-10-06  Tom Tromey  <tom@tromey.com>
1771
1772         * python/py-breakpoint.c (bppy_get_location): Handle a
1773         bp_breakpoint without a location.
1774
1775 2018-10-06  Tom Tromey  <tom@tromey.com>
1776
1777         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1778         (_RegEx): Reformat help text.
1779         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1780         (AnyCallerIs, AnyCallerMatches): Reformat help text.
1781         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1782         text.
1783         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1784         (EnableXMethod, DisableXMethod): Remove help indentation.
1785         Capitalize meta-syntactic variables.
1786         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1787         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1788         Capitalize meta-syntactic variables.
1789         * python/lib/gdb/command/explore.py (ExploreCommand)
1790         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1791         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1792         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1793         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1794         Remove help indentation.
1795         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1796         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1797         (DisableFrameFilter, SetFrameFilterPriority)
1798         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1799
1800 2018-10-06  Tom Tromey  <tom@tromey.com>
1801
1802         PR tui/28819:
1803         * tui/tui-io.c (gdb_wgetch): New function.
1804         (tui_mld_getc, tui_getc): Use it.
1805
1806 2018-10-05  Tom Tromey  <tom@tromey.com>
1807
1808         * sol-thread.c (sol_thread_target::wait): Rename inner
1809         "save_ptid".
1810
1811 2018-10-04  Tom Tromey  <tom@tromey.com>
1812
1813         * configure: Rebuild.
1814         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1815
1816 2018-10-04  Tom Tromey  <tom@tromey.com>
1817
1818         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1819         declaration of "block".
1820
1821 2018-10-04  Tom Tromey  <tom@tromey.com>
1822
1823         * common/filestuff.c (fdwalk): Remove inner declaration of
1824         "result".
1825
1826 2018-10-04  Tom Tromey  <tom@tromey.com>
1827
1828         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1829         "structs_addr" and hoist declaration.
1830
1831 2018-10-04  Tom Tromey  <tom@tromey.com>
1832
1833         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1834         variable "size".
1835
1836 2018-10-04  Tom Tromey  <tom@tromey.com>
1837
1838         * mdebugread.c (parse_partial_symbols): Use std::string.
1839
1840 2018-10-04  Tom Tromey  <tom@tromey.com>
1841
1842         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1843         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1844         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1845         header.
1846         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1847         more inner scope.
1848         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1849         * varobj.c (varobj_update): Rename inner "newobj",
1850         "type_changed".
1851         * valprint.c (generic_emit_char): Rename inner "buf".
1852         * valops.c (find_overload_match): Rename inner "temp".
1853         (value_struct_elt_for_reference): Declare "v" in more inner
1854         scope.
1855         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1856         * unittests/array-view-selftests.c (run_tests): Rename inner
1857         "vec".
1858         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1859         header.
1860         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1861         "tsv" in more inner scope.
1862         (print_one_static_tracepoint_marker): Rename inner
1863         "tuple_emitter".
1864         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1865         (tic6x_push_dummy_call): Don't redeclare "addr".
1866         * target-float.c: Declare "dto" lower.
1867         * symtab.c (lookup_local_symbol): Rename inner "sym".
1868         (find_pc_sect_line): Rename inner "pc".
1869         * stack.c (print_frame): Don't redeclare "gdbarch".
1870         (return_command): Rename inner "gdbarch".
1871         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1872         "sp".
1873         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1874         header.
1875         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1876         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1877         scope.
1878         * remote.c (remote_target::update_thread_list): Don't redeclare
1879         "tp".
1880         (remote_target::process_initial_stop_replies): Rename inner
1881         "thread".
1882         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1883         (remote_target::wait_as): Don't redeclare "stop_reply".
1884         (remote_target::get_thread_local_address): Rename inner
1885         "result".
1886         (remote_target::get_tib_address): Likewise.
1887
1888         * regcache.c (cooked_read_test): Rename "regnum".
1889         * record-btrace.c (cmd_record_btrace_start): Rename inner
1890         "exception".
1891         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1892         loop header.
1893         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1894         header.
1895         (ppu2spu_sniffer): Rename inner "buf".
1896         * parse.c (operator_check_standard): Rename inner "type",
1897         "objfile".
1898         * p-valprint.c (pascal_val_print): Introduce new scope for
1899         "low_bound", "high_bound".
1900         * p-exp.y (yylex): Declare "i" in loop header.
1901         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1902         Lower declaration of "s".
1903         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1904         header.
1905         (nios2_push_dummy_call): Rename "len".
1906         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1907         "buf".
1908         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1909         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1910         (linux_xfer_osdata_modules): Likewise.
1911         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1912         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1913         (mips_o64_push_dummy_call): Likewise.
1914         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1915         "op".
1916         * mi/mi-main.c (list_available_thread_groups): Rename inner
1917         "tuple_emitter".
1918         (mi_cmd_data_read_memory): Rename inner "opts".
1919         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1920         "tuple_emitter".
1921         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1922         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1923         more inner scope.
1924         (parse_partial_symbols): Rename inner "pst", "p", "name"
1925         * main.c (captured_main_1): Rename inner "i"s.
1926         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1927         "oso2".
1928         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1929         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1930         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1931         (handle_signal_stop): Rename inner "gdbarch".
1932         (handle_command): Declare "signum" in loop header.
1933         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1934         "status".
1935         (examine_prologue): Rename inner "sol" and "sof".
1936         (ia64_extract_return_value): Rename inner "val".  Declare another
1937         "val" in a more inner scope.
1938         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1939         inner scope.
1940         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1941         "except".
1942         * findvar.c (default_read_var_value): Don't redeclare "addr".
1943         * f-exp.y (yylex): Declare "i" in loop header.
1944         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1945         Rename inner "type", "expect_type".
1946         (evaluate_subexp_for_sizeof): Rename inner "pc".
1947         * elfread.c (elf_symfile_read): Rename inner "abfd".
1948         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1949         "bytes_read".
1950         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1951         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1952         (dwarf_decode_line_header): Rename inner "lh".
1953         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1954         "offset".  Declare "i" in loop header.
1955         (disassemble_dwarf_expression): Rename inner "addr_size".
1956         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1957         inner "result".
1958         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1959         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1960         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1961         "inner_list_emitter".
1962         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1963         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1964         declaration in a block.
1965         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1966         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1967         "obstack_final_size".
1968         * cp-support.c (inspect_type): Declare "i" in loop header.
1969         * compile/compile.c (compile_instance::insert_symbol_error):
1970         Rename inner "e".
1971         * common/agent.c (agent_run_command): Remove inner "ret"
1972         declaration.
1973         * coffread.c (coff_symfile_read): Rename inner "name".
1974         (coff_symfile_read): Rename inner "abfd".
1975         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1976         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1977         "high".
1978         * c-exp.y (lex_one_token): Move "len" declaration lower.
1979         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1980         "gdbarch".
1981         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1982         "b".
1983         (watch_command_1): Declare "mark" later.
1984         (clear_command): Don't shadow "a" or "b".
1985         (delete_command): Rename inner "b".
1986         (delete_trace_command): Likewise.
1987         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1988         "op".
1989         (arm_gdbarch_init): Remove inner "e_flags".
1990         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1991         "offset" in inner blocks.
1992
1993 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1994
1995         * dwarf-index-write.c (file_write): Don't write if the vector is
1996         empty.
1997
1998 2018-10-05  Tom de Vries  <tdevries@suse.de>
1999
2000         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2001         PyArg_ParseTuple call.
2002
2003 2018-10-05  Tom de Vries  <tdevries@suse.de>
2004
2005         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2006         PyArg_ParseTuple call.
2007
2008 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2009
2010         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2011         to avoid exceeding 80 characters per line limit.
2012
2013 2018-10-04  Tom Tromey  <tom@tromey.com>
2014
2015         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2016         (reread_symbols): Update.
2017         * complaints.h (clear_complaints): Remove argument.
2018         * complaints.c (enum complaint_series): Remove.
2019         (series): Remove global.
2020         (complaint_internal): Update.
2021         (clear_complaints): Remove argument.
2022
2023 2018-10-04  Tom Tromey  <tom@tromey.com>
2024
2025         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2026         debugging symbols" message if there is a separate debug objfile.
2027
2028 2018-10-04  Tom Tromey  <tom@tromey.com>
2029
2030         PR cli/19551:
2031         * symfile.c (symbol_file_add_with_addrs): Update output.
2032         * psymtab.c (require_partial_symbols): Update output.
2033
2034 2018-10-04  Tom Tromey  <tom@tromey.com>
2035
2036         PR cli/22234:
2037         * complaints.c: Emit \n.
2038
2039 2018-10-04  Tom Tromey  <tom@tromey.com>
2040
2041         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2042         (separate_debug_file_exists, find_separate_debug_file)
2043         (add_symbol_file_command, reread_symbols, allocate_symtab)
2044         (allocate_compunit_symtab): Use filtered printing, not
2045         unfiltered.
2046         * psymtab.c (require_partial_symbols, dump_psymtab)
2047         (allocate_psymtab): Use filtered printing, not unfiltered.
2048
2049 2018-10-04  Tom Tromey  <tom@tromey.com>
2050
2051         * complaints.c (complaint_internal): Correctly check complaint
2052         count.
2053
2054 2018-10-04  Tom Tromey  <tom@tromey.com>
2055
2056         * complaints.h (struct complaints): Remove declaration.
2057         * complaints.c (clear_complaints): Remove an unused variable.
2058
2059 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2060
2061         * MAINTAINERS (Write After Approval): Add self.
2062
2063 2018-10-03  Tom Tromey  <tom@tromey.com>
2064
2065         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2066         "buffer_contents".
2067         * coffread.c (coff_symtab_read): Initialize "newobj".
2068
2069 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2070
2071         * dwarf2read.c (read_func_scope): Remove struct keyword in
2072         range-based for.
2073
2074 2018-10-03  Tom Tromey  <tom@tromey.com>
2075
2076         * README: Mention --enable-ubsan.
2077         * NEWS: Mention --enable-ubsan.
2078         * acinclude.m4: Include sanitize.m4.
2079         * configure: Rebuild.
2080         * configure.ac: Call AM_GDB_UBSAN.
2081         * sanitize.m4: New file.
2082
2083 2018-10-03  Tom Tromey  <tom@tromey.com>
2084
2085         * expression.h (enum exp_opcode): Use uint8_t as base type.
2086         * expprint.c (op_name): Handle invalid opcodes.
2087
2088 2018-10-03  Tom Tromey  <tom@tromey.com>
2089
2090         * parse.c (prefixify_expression): Add assert.
2091         (parse_exp_in_context_1): Throw exception if the expression is
2092         empty.
2093
2094 2018-10-03  Tom Tromey  <tom@tromey.com>
2095
2096         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2097
2098 2018-10-03  Tom Tromey  <tom@tromey.com>
2099
2100         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2101
2102 2018-10-03  Tom Tromey  <tom@tromey.com>
2103
2104         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2105         unsigned.
2106
2107 2018-10-03  Tom Tromey  <tom@tromey.com>
2108
2109         * findvar.c (extract_integer): Do work in an unsigned type.
2110
2111 2018-10-03  Tom Tromey  <tom@tromey.com>
2112
2113         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2114         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2115         base type.
2116         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2117         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2118         type.
2119         * c-lang.h (enum c_string_type_values): Use unsigned as base
2120         type.
2121         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2122
2123 2018-10-03  Tom Tromey  <tom@tromey.com>
2124
2125         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2126         <~dwarf2_frame_state_reg_info>: Update.
2127         <dwarf2_frame_state_reg_info>: Update.
2128         <alloc_regs>: Add assertion.  Update.
2129         <reg>: Now a std::vector.
2130         <num_regs>: Remove.
2131         <swap>: Update.
2132         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2133         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2134
2135 2018-10-03  Tom Tromey  <tom@tromey.com>
2136
2137         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2138
2139 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2140
2141         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2142
2143 2018-10-02  Tom Tromey  <tom@tromey.com>
2144
2145         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2146
2147 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2148
2149         * NEWS: Mention changed commands.
2150         * ser-uds.c: New file.
2151         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2152         * configure: Regenerate.
2153         * Makefile.in: Add new file.
2154         * serial.c (serial_open): Check if filename is a socket
2155         and lookup the appropriate interface accordingly.
2156
2157 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2158
2159         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2160         define.
2161         (AARCH64_EXTRA_MAGIC): Likewise.
2162         (AARCH64_FPSIMD_MAGIC): Likewise.
2163         (AARCH64_SVE_MAGIC): Likewise.
2164         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2165         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2166         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2167         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2168         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2169         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2170         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2171         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2172         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2173         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2174         (read_aarch64_ctx): Add function.
2175         (aarch64_linux_sigframe_init): Detect FP registers.
2176
2177 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2178
2179         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2180         (AARCH64_D0_REGNUM): Likewise.
2181         (AARCH64_S0_REGNUM): Likewise.
2182         (AARCH64_H0_REGNUM): Likewise.
2183         (AARCH64_B0_REGNUM): Likewise.
2184         (AARCH64_SVE_V0_REGNUM): Likewise.
2185         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2186         (AARCH64_D0_REGNUM): Likewise.
2187         (AARCH64_S0_REGNUM): Likewise.
2188         (AARCH64_H0_REGNUM): Likewise.
2189         (AARCH64_B0_REGNUM): Likewise.
2190         (AARCH64_SVE_V0_REGNUM): Likewise.
2191
2192 2018-10-01  Gary Benson <gbenson@redhat.com>
2193
2194         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2195         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2196         prfpregset_t instead of gdb_prfpregset_t.
2197         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2198         * configure, config.in: Rebuild.
2199
2200 2018-10-01  Gary Benson <gbenson@redhat.com>
2201
2202         * common/gdb_proc_service.h: New file, factored out from...
2203         * gdb_proc_service.h: Moved common code to the above file.
2204         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2205
2206 2018-10-01  Gary Benson <gbenson@redhat.com>
2207
2208         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2209         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2210
2211 2018-10-01  Gary Benson <gbenson@redhat.com>
2212
2213         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2214         (AC_CHECK_HEADERS): Check for linux/elf.h.
2215         * configure, config.in: Rebuild.
2216         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2217         doesn't define elf_fpregset_t.
2218
2219 2018-10-01  Gary Benson <gbenson@redhat.com>
2220
2221         * gdb_proc_service.h: Whitespace change.
2222
2223 2018-10-01  Tom Tromey  <tom@tromey.com>
2224
2225         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2226         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2227         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2228
2229 2018-10-01  Tom Tromey  <tom@tromey.com>
2230
2231         * README: Minor change.
2232
2233 2018-09-30  Pedro Alves  <palves@redhat.com>
2234
2235         * darwin-nat-info.c (darwin_debug_regions_recurse)
2236         (info_mach_exceptions_command): Remove unused local variables.
2237         * darwin-nat.c (darwin_decode_notify_message)
2238         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2239         (darwin_stop_inferior, darwin_setup_exceptions)
2240         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2241         (darwin_nat_target::attach, darwin_nat_target::detach)
2242         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2243         local variables.
2244         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2245         variables.
2246
2247 2018-09-29  Tom Tromey  <tom@tromey.com>
2248
2249         * README: Remove some leftover text.
2250
2251 2018-09-29  Tom Tromey  <tom@tromey.com>
2252
2253         * PROBLEMS: Rewrite.
2254         * README: Update.
2255
2256 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2257
2258         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2259         case with explicit breakpoint kind.
2260         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2261         'additional_info' and related logic.
2262         (riscv_debug_breakpoints): New variable.
2263         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2264         instruction to determine the breakpoint kind.
2265         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2266         flag.  Update description of 'set/show riscv
2267         use-compressed-breakpoints' flag.
2268
2269 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2270
2271         (NEWS): Mention changes to frame related commands.
2272         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2273         (add_prefix_cmd_suppress_notification): New function.
2274         (add_com_suppress_notification): Call
2275         add_cmd_suppress_notification.
2276         * command.h (add_cmd_suppress_notification): Declare.
2277         (add_prefix_cmd_suppress_notification): Declare.
2278         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2279         (parse_frame_specification): Moved from stack.c, with
2280         simplification to handle a single argument.
2281         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2282         switch to the selected frame.  Add a header comment.
2283         * stack.c: Remove 'safe-ctype.h' include.
2284         (find_frame_for_function): Add declaration.
2285         (find_frame_for_address): New function.
2286         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2287         (frame_selection_by_function_completer): New function.
2288         (info_frame_command): Rename to...
2289         (info_frame_command_core): ...this, and update parameter types.
2290         (select_frame_command): Rename to...
2291         (select_frame_command_core): ...this, and update parameter types.
2292         (frame_command): Rename to...
2293         (frame_command_core): ...this, and update parameter types.
2294         (class frame_command_helper): New class to wrap implementations of
2295         frame related sub-commands.
2296         (frame_apply_cmd_list): New static global.
2297         (frame_cmd_list): Make static.
2298         (select_frame_cmd_list): New global for sub-commands.
2299         (info_frame_cmd_list): New global for sub-commands.
2300         (_initialize_stack): Register sub-commands for 'frame',
2301         'select-frame', and 'info frame'.  Update 'frame apply' commands
2302         to use frame_apply_cmd_list.  Move function local static
2303         frame_apply_list to file static frame_apply_cmd_list for
2304         consistency.
2305         * stack.h (select_frame_command): Delete declarationn.
2306         (select_frame_for_mi): Declare new function.
2307
2308 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2309
2310         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2311         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2312         and NOP.
2313
2314 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2315
2316         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2317
2318 2018-09-26  Tom Tromey  <tom@tromey.com>
2319
2320         * valops.c (auto_abandon): Remove dead code.
2321
2322 2018-09-26  Tom Tromey  <tom@tromey.com>
2323
2324         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2325
2326 2018-09-24  Tom Tromey  <tom@tromey.com>
2327
2328         * common/pathstuff.c (get_standard_cache_dir): Make
2329         "xdg_cache_home" and "home" const.
2330         * top.c (init_history): Make "tmpenv" const.
2331         * main.c (get_init_files): Make "homedir" const.
2332
2333 2018-09-23  Tom Tromey  <tom@tromey.com>
2334
2335         PR python/18852:
2336         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2337
2338 2018-09-23  Tom Tromey  <tom@tromey.com>
2339
2340         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2341         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2342         * python/python-internal.h (gdbpy_handle_exception): Declare.
2343         * python/py-utils.c (gdbpy_handle_exception): New function.
2344
2345 2018-09-23  Tom Tromey  <tom@tromey.com>
2346
2347         PR python/17284:
2348         * python/py-type.c (typy_template_argument): Check for negative
2349         argument number.
2350
2351 2018-09-23  Tom Tromey  <tom@tromey.com>
2352
2353         PR python/14062:
2354         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2355
2356 2018-09-23  Tom Tromey  <tom@tromey.com>
2357
2358         PR python/18170:
2359         * python/py-value.c (valpy_int): Allow conversion from pointer
2360         type.
2361
2362 2018-09-23  Tom Tromey  <tom@tromey.com>
2363
2364         PR python/20126:
2365         * python/py-value.c (valpy_int): Respect type sign.
2366
2367 2018-09-23  Tom Tromey  <tom@tromey.com>
2368
2369         PR python/18352;
2370         * python/py-value.c (valpy_float): Allow conversions from int or
2371         char.
2372         (valpy_int, valpy_long): Allow conversions from float.
2373
2374 2018-09-23  Tom Tromey  <tom@tromey.com>
2375
2376         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2377         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2378
2379 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2380
2381         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2382         __sighndlr.
2383         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2384
2385 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2386
2387         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2388         target_terminal::ours().
2389
2390 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2391
2392         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2393         of vl to ULONGEST.
2394
2395 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2396
2397         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2398         redundant condition.
2399
2400 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2401
2402         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2403
2404         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2405         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2406         * sol-thread.c (ps_pdmodel): Don't guard definition.
2407
2408         * procfs.c: Fix formatting.
2409
2410         * procfs.c (sysset_t_alloc): Remove.
2411         (create_procinfo): Use XNEW instead of sysset_t_alloc.
2412         (procfs_debug_inferior): Likewise.
2413         (procfs_set_exec_trap): Likewise.
2414         (proc_set_traced_sysentry): Don't allocate argp dynamically.
2415         (proc_set_traced_sysexit): Likewise.
2416
2417         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2418         (dead_procinfo): Likewise.
2419         (proc_warn): Likewise.
2420         (proc_error): Likewise.
2421         (proc_get_LDT_entry): Likewise.
2422         (do_attach): Likewise.
2423         (procfs_target::pid_to_str): Likewise.
2424         (iterate_over_mappings): Likewise.
2425
2426         * procfs.c (create_procinfo): Fix ARI warning.
2427         (proc_get_status): Likewise.
2428         (proc_stop_process): Likewise.
2429         (proc_run_process): Likewise.
2430         (proc_kill): Likewise.
2431         (proc_get_LDT_entry): Likewise.
2432         (procfs_find_LDT_entry): Likewise.
2433         (proc_update_threads): Likewise.
2434         (proc_iterate_over_threads): Likewise.
2435         (do_attach): Likewise.
2436         (procfs_xfer_memory): Likewise.
2437         (invalidate_cache): Likewise.
2438         (procfs_target::resume): Likewise.
2439         (procfs_init_inferior): Likewise.
2440         (procfs_set_exec_trap): Likewise.
2441         (procfs_target::thread_alive): Likewise.
2442         (procfs_target::pid_to_exec_file): Likewise.
2443         (iterate_over_mappings): Likewise.
2444         (procfs_target::make_corefile_notes): Likewise.
2445         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2446
2447         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
2448         (procfs_find_LDT_entry): Likewise.
2449         * sol-thread.c (ps_lgetLDT): Likewise.
2450
2451 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2452
2453         PR tdep/17903
2454         * procfs.c (procfs_target): Declare pid_to_exec_file.
2455         (procfs_target::pid_to_exec_file): New.
2456
2457 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2458
2459         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
2460         renaming.
2461         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
2462         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
2463
2464 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2465
2466         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
2467         (supply_fpregset, fill_fpregset): Move ...
2468         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
2469         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
2470         Remove references to ioctl-based procfs.
2471         Include <sys/reg.h>.
2472         Remove PR_MODEL_NATIVE guards.
2473         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
2474         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
2475
2476 2018-09-19  Xavier Roirand  <roirand@adacore.com>
2477
2478         PR gdb/20981:
2479         * solib-darwin.c (darwin_get_dyld_bfd): New function.
2480         (darwin_solib_get_all_image_info_addr_at_init): Update call.
2481         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
2482
2483 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
2484
2485         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
2486         (fbsd_print_sockaddr_in6): Likewise.
2487
2488 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
2489             Chris January  <chris.january@arm.com>
2490
2491         * eval.c (skip_undetermined_arglist): Skip argument list helper.
2492         (evaluate_subexp_standard): Return a dummy type when
2493         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
2494         OP_F77_UNDETERMINED_ARGLIST case.
2495         * expression.h (enum noside): Update comment.
2496
2497 2018-09-19  George Vasick <george.vasick@oracle.com>
2498
2499         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
2500
2501 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
2502             April Chin <april.chin@oracle.com>
2503             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2504
2505         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
2506         uint_t lwpid_t.
2507         (create_procinfo): Print pids in /proc without leading zeros.
2508
2509 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
2510
2511         * nios2-tdep.c (nios2_gcc_target_options): New.
2512         (nios2_gdb_arch_init): Install new hook.
2513
2514 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2515
2516         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
2517         New file.
2518         * update-gnulib.sh: Apply patch.
2519         * configure: Re-generate.
2520
2521 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2522
2523         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
2524         description.  Make "info proc" command descriptions more
2525         consistent.
2526
2527 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2528
2529         * NEWS: Mention 'info proc files' command.
2530
2531 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2532
2533         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
2534         descriptors for IP_FILES and IP_ALL.
2535
2536 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2537
2538         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
2539         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
2540         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
2541         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
2542         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
2543         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
2544         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
2545         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
2546         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
2547         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
2548         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
2549         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
2550         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
2551         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
2552         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
2553         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
2554         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
2555         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
2556         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
2557         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
2558         (struct fbsd_sockaddr_un): New types.
2559         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
2560         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
2561         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
2562         (fbsd_core_info_proc_files): New functions.
2563         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
2564         IP_ALL.
2565         * fbsd-tdep.h (fbsd_info_proc_files_header)
2566         (fbsd_info_proc_files_entry): New.
2567
2568 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2569
2570         * defs.h (enum info_proc_what) [IP_FILES]: New value.
2571         * infcmd.c (info_proc_cmd_files): New function.
2572         (_initialize_infcmd): Register 'info proc files' command.
2573
2574 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2575
2576         * gnulib/aclocal-m4-deps.mk: Re-generate.
2577         * gnulib/aclocal.m4: Re-generate.
2578         * gnulib/config.in: Re-generate.
2579         * gnulib/configure: Re-generate.
2580         * gnulib/import/Makefile.am: Re-generate.
2581         * gnulib/import/Makefile.in: Re-generate.
2582         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2583         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2584         * gnulib/import/arpa_inet.in.h: New file.
2585         * gnulib/import/inet_ntop.c: New file.
2586         * gnulib/import/m4/arpa_inet_h.m4: New file.
2587         * gnulib/import/m4/inet_ntop.m4: New file.
2588         * gnulib/import/m4/netinet_in_h.m4: New file.
2589         * gnulib/import/m4/socklen.m4: New file.
2590         * gnulib/import/m4/sockpfaf.m4: New file.
2591         * gnulib/import/m4/stdalign.m4: New file.
2592         * gnulib/import/m4/sys_uio_h.m4: New file.
2593         * gnulib/import/netinet_in.in.h: New file.
2594         * gnulib/import/stdalign.in.h: New file.
2595         * gnulib/import/sys_socket.c: New file.
2596         * gnulib/import/sys_socket.in.h: New file.
2597         * gnulib/import/sys_uio.in.h: New file.
2598         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
2599         module.
2600
2601 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2602
2603         * gnulib/aclocal-m4-deps.mk: New file.
2604         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
2605         deterministically.
2606
2607 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2608
2609         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
2610         KVE_PATH.
2611
2612 2018-09-18  Tom Tromey  <tom@tromey.com>
2613
2614         * compile/compile-object-load.c (struct
2615         link_hash_table_cleanup_data): Add constructor and destructor.
2616         Use DISABLE_COPY_AND_ASSIGN.
2617         (~link_hash_table_cleanup_data): Rename from
2618         link_hash_table_free.  Now a destructor.
2619         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
2620
2621 2018-09-18  Tom Tromey  <tom@tromey.com>
2622
2623         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2624         * compile/compile-object-load.c (struct munmap_list): Move to
2625         header file.
2626         (munmap_list::add): Rename from munmap_list_add; rewrite.
2627         (munmap_list::~munmap_list): Rename from munmap_list_free.
2628         (munmap_listp_free_cleanup): Remove.
2629         (compile_object_load): Update.
2630         * compile/compile-object-load.h (struct munmap_list): Move from
2631         compile-object-load.c.  Rewrite.
2632
2633 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
2634
2635         * aarch64-tdep.c (pass_in_v): Use register size.
2636         (aarch64_extract_return_value): Likewise.
2637         (aarch64_store_return_value): Likewise.
2638
2639 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2640
2641         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
2642         rlim_t.
2643
2644 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2645
2646         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
2647         Fix short help line.
2648
2649 2018-09-17  Tom Tromey  <tom@tromey.com>
2650
2651         PR python/20445:
2652         * configure: Rebuild.
2653         * configure.ac: Conditionally use -DNDEBUG for Python.
2654
2655 2018-09-17  Tom Tromey  <tom@tromey.com>
2656
2657         * configure: Rebuild.
2658         * configure.ac: Use gmp as a library dependency when checking for
2659         mpfr.
2660
2661 2018-09-17  Pedro Alves  <palves@redhat.com>
2662
2663         * python/py-inferior.c (find_inferior_object): Delete.
2664
2665 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
2666
2667         * compile/compile-cplus-types.c
2668         (compile_cplus_instance::enter_scope): Don't use new_scope after
2669         std::move.
2670
2671 2018-09-17  Tom Tromey  <tom@tromey.com>
2672
2673         * common/pathstuff.c (get_standard_cache_dir): Use
2674         ~/Library/Caches on macOS.
2675         * common/pathstuff.h (get_standard_cache_dir): Update comment.
2676
2677 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
2678
2679         PR python/23669
2680         * breakpoint.c (commands_cmd_element): New.
2681         (_initialize_breakpoint): Assign commands_cmd_element.
2682         * breakpoint.h (commands_cmd_element): New.
2683         * cli/cli-script.c (while_cmd_element, if_command,
2684         define_cmd_element): New.
2685         (command_name_equals): Remove.
2686         (process_next_line): Compare commands by pointer, not by name.
2687         (_initialize_cli_script): Assign the various cmd_list_element
2688         variables.
2689         * compile/compile.c (compile_cmd_element): New.
2690         (_initialize_compile): Assign compile_cmd_element.
2691         * compile/compile.h (compile_cmd_element): New.
2692         * guile/guile.c (guile_cmd_element): New.
2693         (install_gdb_commands): Assign guile_cmd_element.
2694         * guile/guile.h (guile_cmd_element): New.
2695         * python/python.c (python_cmd_element): New.
2696         (_initialize_python): Assign python_cmd_element.
2697         * python/python.h (python_cmd_element): New.
2698         * tracepoint.c (while_stepping_cmd_element): New.
2699         (_initialize_tracepoint): Assign while_stepping_cmd_element.
2700         * tracepoint.h (while_stepping_cmd_element): New.
2701
2702 2018-09-17  Tom Tromey  <tom@tromey.com>
2703
2704         * infrun.c (save_infcall_suspend_state): Return
2705         infcall_suspend_state_up.
2706         (save_infcall_control_state): Return infcall_control_state_up.
2707         * inferior.h (save_infcall_suspend_state)
2708         (save_infcall_control_state): Declare later.  Return unique
2709         pointers.
2710
2711 2018-09-17  Tom Tromey  <tom@tromey.com>
2712
2713         * infrun.c (struct stop_context): Declare constructor,
2714         destructor, "changed" method.
2715         (stop_context::stop_context): Rename from save_stop_context.
2716         (stop_context::~stop_context): Rename from
2717         release_stop_context_cleanup.
2718         (normal_stop): Update.
2719         (stop_context::changed): Rename from stop_context_changed.  Return
2720         bool.
2721
2722 2018-09-17  Tom Tromey  <tom@tromey.com>
2723
2724         * inferior.h (struct infcall_suspend_state_deleter): New.
2725         (infcall_suspend_state_up): New typedef.
2726         (struct infcall_control_state_deleter): New.
2727         (infcall_control_state_up): New typedef.
2728         (make_cleanup_restore_infcall_suspend_state)
2729         (make_cleanup_restore_infcall_control_state): Don't declare.
2730         * infcall.c (call_function_by_hand_dummy): Update.
2731         * infrun.c (do_restore_infcall_suspend_state_cleanup)
2732         (make_cleanup_restore_infcall_suspend_state): Remove.
2733         (do_restore_infcall_control_state_cleanup)
2734         (make_cleanup_restore_infcall_control_state): Remove.
2735
2736 2018-09-17  Tom Tromey  <tom@tromey.com>
2737
2738         * gdbthread.h (struct thread_control_state): Add initializer.
2739         (class thread_info) <control>: Remove initializer.
2740         * inferior.h (struct inferior_control_state): Add initializer.
2741         (class inferior) <control>: Remove initializer.
2742         (exit_inferior_1): Update.
2743         * infrun.c (struct infcall_control_state): Add constructors.
2744         (save_infcall_control_state): Use new.
2745         (restore_infcall_control_state, discard_infcall_control_state):
2746         Use delete.
2747
2748 2018-09-17  Tom Tromey  <tom@tromey.com>
2749
2750         * infrun.c (struct infcall_suspend_state) <registers>: Now a
2751         unique_ptr.
2752         <siginfo_data>: Now a unique_xmalloc_ptr.
2753         (save_infcall_suspend_state, restore_infcall_suspend_state)
2754         (discard_infcall_suspend_state)
2755         (get_infcall_suspend_state_regcache): Update.
2756
2757 2018-09-17  Tom Tromey  <tom@tromey.com>
2758
2759         * gdbthread.h (struct thread_suspend_state): Add initializers.
2760         (class thread_info) <suspend>: Remove initializer.
2761         * infrun.c (struct infcall_suspend_state): Add initializers.
2762         (save_infcall_suspend_state): Use new.
2763         (discard_infcall_suspend_state): Use delete.
2764
2765 2018-09-16  Tom Tromey  <tom@tromey.com>
2766
2767         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2768         Remove.
2769         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2770         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2771         (py_varobj_iter_new): Likewise.
2772         (py_varobj_get_iterator): Use gdbpy_ref.
2773
2774 2018-09-16  Tom Tromey  <tom@tromey.com>
2775
2776         * python/py-threadevent.c (py_get_event_thread): Simplify.
2777         * python/py-inferior.c (infpy_thread_from_thread_handle):
2778         Return immediately after calling thread_to_thread_object.  Use
2779         Py_RETURN_NONE.
2780         (thread_to_thread_object): Set the exception on a NULL return.
2781
2782 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2783
2784         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2785
2786 2018-09-16  Tom Tromey  <tom@tromey.com>
2787
2788         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2789         Remove.
2790
2791 2018-09-16  Tom Tromey  <tom@tromey.com>
2792
2793         * python/python-internal.h (thread_to_thread_object): Change
2794         return type.
2795         * python/py-inferior.c (thread_to_thread_object): Return a new
2796         reference.
2797         (infpy_thread_from_thread_handle): Update.
2798         * python/py-infthread.c (gdbpy_selected_thread): Update.
2799         * python/py-stopevent.c (create_stop_event_object): Update.
2800         * python/py-threadevent.c (py_get_event_thread): Return a new
2801         reference.
2802         (py_get_event_thread): Update.
2803         * python/py-event.h (py_get_event_thread): Change return type.
2804         * python/py-continueevent.c (create_continue_event_object):
2805         Update.
2806
2807 2018-09-16  Tom Tromey  <tom@tromey.com>
2808
2809         * python/py-progspace.c (pspy_get_objfiles): Update.
2810         * python/python-internal.h (objfile_to_objfile_object): Change
2811         return type.
2812         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2813         Update.
2814         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2815         Update.
2816         * python/python.c (gdbpy_get_current_objfile): Update.
2817         (gdbpy_objfiles): Update.
2818         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2819         Update.
2820         (objfile_to_objfile_object): Return a new reference.
2821         * python/py-symtab.c (stpy_get_objfile): Update.
2822         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2823         Update.
2824
2825 2018-09-16  Tom Tromey  <tom@tromey.com>
2826
2827         * python/py-inferior.c (infpy_get_progspace): Update.
2828         * python/python-internal.h (pspace_to_pspace_object): Change
2829         return type.
2830         * python/py-newobjfileevent.c
2831         (create_clear_objfiles_event_object): Update.
2832         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2833         Update.
2834         * python/python.c (gdbpy_get_current_progspace): Update.
2835         (gdbpy_progspaces): Update.
2836         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2837         reference.
2838         * python/py-objfile.c (objfpy_get_progspace): Update.
2839         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2840         Update.
2841
2842 2018-09-16  Tom Tromey  <tom@tromey.com>
2843
2844         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2845         (solib_name, block_for_pc, find_pc_line): New functions.
2846         (execute_unwinders): Update.
2847         * python/py-block.c (gdbpy_block_for_pc): Remove.
2848         * python/py-inferior.c (infpy_get_progspace): New function.
2849         (inferior_object_getset) <progspace>: Add.
2850         * python/py-progspace.c (pspy_objfiles): Rewrite.
2851         (pspy_solib_name, pspy_block_for_pc)
2852         (pspy_find_pc_line, pspy_is_valid): New functions.
2853         (progspace_object_methods): Add entries for solib_name,
2854         block_for_pc, find_pc_line, is_valid.
2855         * python/python-internal.h (gdbpy_block_for_pc)
2856         (build_objfiles_list): Don't declare.
2857         * python/python.c: Don't include solib.h.
2858         (gdbpy_solib_name, gdbpy_find_pc_line)
2859         (gdbpy_get_current_progspace, build_objfiles_list)
2860         (gdbpy_objfiles): Remove.
2861         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2862         solib_name, find_pc_line>: Remove entries.
2863
2864 2018-09-16  Tom Tromey  <tom@tromey.com>
2865
2866         * top.c (new_ui_command): Use GNU style for metasyntactic
2867         variables.
2868         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2869         variables.
2870         * maint.c (maintenance_translate_address): Remove "<>" around
2871         text.
2872         * interps.c (interpreter_exec_cmd): Use GNU style for
2873         metasyntactic variables.
2874         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2875         metasyntactic variables.
2876         * tracepoint.c (tfind_range_command): Use GNU style for
2877         metasyntactic variables.
2878         (tfind_outside_command): Likewise.
2879         (_initialize_tracepoint): Likewise.
2880         * remote.c (extended_remote_target::create_inferior): Use GNU
2881         style for metasyntactic variables.
2882         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2883         metasyntactic variables.
2884         (adi_assign_command): Likewise.
2885
2886 2018-09-16  Tom Tromey  <tom@tromey.com>
2887
2888         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2889         metasyntactic variables.  Print message if no disassembler options
2890         are available.
2891
2892 2018-09-15  Tom Tromey  <tom@tromey.com>
2893
2894         * infcmd.c (get_inferior_args): Return const char *.
2895         * inferior.h (get_inferior_args): Return type now const.
2896         * linux-tdep.c (linux_fill_prpsinfo): Update.
2897         * procfs.c (procfs_target::make_corefile_notes): Update.
2898
2899 2018-09-07  Tom Tromey  <tom@tromey.com>
2900
2901         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2902         inside the TRY.
2903
2904 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2905
2906         * nios2-tdep.c (nios2_type_align): New.
2907         (nios2_gdb_arch_init): Install type_align hook.
2908
2909 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2910
2911         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2912         type that is neither object file owned, nor gdbarch owned.
2913         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2914         gdbarch is non-NULL.
2915         (alloc_type_instance): Allocate non-objfile owned types on the
2916         gdbarch obstack.
2917         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2918         using TYPE_ALLOC to ensure memory is allocated on the correct
2919         obstack.
2920         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2921         obstack, or the gdbarch obstack.
2922         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2923
2924 2018-09-14  Tom Tromey  <tom@tromey.com>
2925
2926         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2927         block.
2928
2929 2018-09-14  Tom Tromey  <tom@tromey.com>
2930
2931         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2932
2933 2018-09-13  Tom Tromey  <tom@tromey.com>
2934
2935         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2936         static.
2937
2938 2018-09-13  Tom Tromey  <tom@tromey.com>
2939
2940         * exec.c (try_open_exec_file): Use std::string.
2941
2942 2018-09-13  Tom Tromey  <tom@tromey.com>
2943
2944         * utils.h (gdb_bfd_errmsg): Return std::string.
2945         * exec.c (exec_file_attach): Update.
2946         * compile/compile-object-load.c (compile_object_load): Update.
2947         * utils.c (gdb_bfd_errmsg): Return std::string.
2948
2949 2018-09-13  Tom Tromey  <tom@tromey.com>
2950
2951         * procfs.c (struct procinfo_deleter): New.
2952         (procinfo_up): New typedef.
2953         (do_destroy_procinfo_cleanup): Remove.
2954         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2955
2956 2018-09-13  Tom Tromey  <tom@tromey.com>
2957
2958         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2959
2960 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2961 2018-09-13  Tom Tromey  <tom@tromey.com>
2962
2963         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2964         (pspy_get_objfiles): New function.
2965         (progspace_object_methods): New.
2966         (pspace_object_type): Add tp_methods callback.
2967         * python/python-internal.h (build_objfiles_list): New
2968         declaration.
2969         * python/python.c (build_objfiles_list): New function.
2970         (gdbpy_objfiles): Implement using build_objfiles_list.
2971         * NEWS: Mention the Progspace.objfiles method.
2972
2973 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2974
2975         * python/py-inferior.c (infpy_get_progspace): New function.
2976         (inferior_object_getset): Add progspace property.
2977         * NEWS: Mention the new property.
2978
2979 2018-09-13  Tom Tromey  <tom@tromey.com>
2980
2981         PR rust/23650:
2982         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2983
2984 2018-09-13  Tom Tromey  <tom@tromey.com>
2985
2986         PR rust/23626:
2987         * rust-lang.c (rust_enum_variant): Now static.
2988         (rust_empty_enum_p): New function.
2989         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2990         Handle empty enum.
2991
2992 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2993
2994         * python/py-inferior.c (infpy_repr): New.
2995         (inferior_object_type): Register infpy_repr.
2996         * python/py-objfile.c (objfpy_repr): New.
2997         (objfile_object_type): Register objfpy_repr.
2998
2999 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3000
3001         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3002
3003 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3004
3005         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3006         typo.
3007
3008 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3009
3010         * common/common-utils.c: Don't include '<sys/stat.h>'.
3011         (is_regular_file): Move to...
3012         * common/filestuff.c (is_regular_file): ... here.
3013         * common/common-utils.h (is_regular_file): Move to...
3014         * common/filestuff.h (is_regular_file): ... here.
3015
3016 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3017
3018         * skip.c (debug_skip): New variable.
3019         (skiplist_entry::do_skip_file_p): Add debug output.
3020         (skiplist_entry::do_skip_gfile_p): Likewise.
3021         (skiplist_entry::skip_function_p): Likewise.
3022         (_initialize_step_skip): Create debug command.
3023         * NEWS: Mention set/show debug skip.
3024
3025 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3026
3027         * darwin-nat.c (should_disable_startup_with_shell):
3028         New function.
3029         (darwin_nat_target::create_inferior): Add call.
3030
3031 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3032
3033         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3034         inf_port, msg_state>: Initialize.
3035         (struct darwin_thread_info) <signaled, single_step>: Change
3036         type and initialize.
3037         (struct darwin_thread_info) <event>: Initialize.
3038
3039 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3040
3041         PR gdb/23555
3042         PR gdb/23558
3043         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3044         guesses.
3045
3046 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3047
3048         Revert:
3049         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3050
3051         PR gdb/23555
3052         PR gdb/23558
3053         * gnulib/aclocal.m4: Regenerate.
3054         * gnulib/config.in: Regenerate.
3055         * gnulib/configure: Regenerate.
3056         * gnulib/import/Makefile.am: Update.
3057         * gnulib/import/Makefile.in: Update.
3058         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3059         * gnulib/import/_Noreturn.h: ... this.
3060         * gnulib/import/alloca.in.h: Update.
3061         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3062         * gnulib/import/arg-nonnull.h: ... this.
3063         * gnulib/import/assure.h: Update.
3064         * gnulib/import/at-func.c: Update.
3065         * gnulib/import/basename-lgpl.c: Update.
3066         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3067         * gnulib/import/c++defs.h: ... this.
3068         * gnulib/import/canonicalize-lgpl.c: Update.
3069         * gnulib/import/cdefs.h: Update.
3070         * gnulib/import/chdir-long.c: Update.
3071         * gnulib/import/chdir-long.h: Update.
3072         * gnulib/import/cloexec.c: Update.
3073         * gnulib/import/cloexec.h: Update.
3074         * gnulib/import/close.c: Update.
3075         * gnulib/import/closedir.c: Update.
3076         * gnulib/import/config.charset: Update.
3077         * gnulib/import/dirent-private.h: Update.
3078         * gnulib/import/dirent.in.h: Update.
3079         * gnulib/import/dirfd.c: Update.
3080         * gnulib/import/dirname-lgpl.c: Update.
3081         * gnulib/import/dirname.h: Update.
3082         * gnulib/import/dosname.h: Update.
3083         * gnulib/import/dup-safer-flag.c: Update.
3084         * gnulib/import/dup-safer.c: Update.
3085         * gnulib/import/dup.c: Update.
3086         * gnulib/import/dup2.c: Update.
3087         * gnulib/import/errno.in.h: Update.
3088         * gnulib/import/error.c: Update.
3089         * gnulib/import/error.h: Update.
3090         * gnulib/import/exitfail.c: Update.
3091         * gnulib/import/exitfail.h: Update.
3092         * gnulib/import/extra/update-copyright: Update.
3093         * gnulib/import/fchdir.c: Update.
3094         * gnulib/import/fcntl.c: Update.
3095         * gnulib/import/fcntl.in.h: Update.
3096         * gnulib/import/fd-hook.c: Update.
3097         * gnulib/import/fd-hook.h: Update.
3098         * gnulib/import/fd-safer-flag.c: Update.
3099         * gnulib/import/fd-safer.c: Update.
3100         * gnulib/import/fdopendir.c: Update.
3101         * gnulib/import/filename.h: Update.
3102         * gnulib/import/filenamecat-lgpl.c: Update.
3103         * gnulib/import/filenamecat.h: Update.
3104         * gnulib/import/flexmember.h: Update.
3105         * gnulib/import/float+.h: Update.
3106         * gnulib/import/float.c: Update.
3107         * gnulib/import/float.in.h: Update.
3108         * gnulib/import/fnmatch.c: Update.
3109         * gnulib/import/fnmatch.in.h: Update.
3110         * gnulib/import/fnmatch_loop.c: Update.
3111         * gnulib/import/fpucw.h: Update.
3112         * gnulib/import/frexp.c: Update.
3113         * gnulib/import/frexpl.c: Update.
3114         * gnulib/import/fstat.c: Update.
3115         * gnulib/import/fstatat.c: Update.
3116         * gnulib/import/getcwd-lgpl.c: Update.
3117         * gnulib/import/getcwd.c: Update.
3118         * gnulib/import/getdtablesize.c: Update.
3119         * gnulib/import/getlogin_r.c: Update.
3120         * gnulib/import/getprogname.c: Update.
3121         * gnulib/import/getprogname.h: Update.
3122         * gnulib/import/gettext.h: Update.
3123         * gnulib/import/gettimeofday.c: Update.
3124         * gnulib/import/glob-libc.h: Update.
3125         * gnulib/import/glob.c: Update.
3126         * gnulib/import/glob.in.h: Update.
3127         * gnulib/import/glob_internal.h: Update.
3128         * gnulib/import/glob_pattern_p.c: Update.
3129         * gnulib/import/globfree.c: Update.
3130         * gnulib/import/hard-locale.c: Update.
3131         * gnulib/import/hard-locale.h: Update.
3132         * gnulib/import/intprops.h: Update.
3133         * gnulib/import/inttypes.in.h: Update.
3134         * gnulib/import/isnan.c: Update.
3135         * gnulib/import/isnand-nolibm.h: Update.
3136         * gnulib/import/isnand.c: Update.
3137         * gnulib/import/isnanl-nolibm.h: Update.
3138         * gnulib/import/isnanl.c: Update.
3139         * gnulib/import/itold.c: Update.
3140         * gnulib/import/libc-config.h: Update.
3141         * gnulib/import/limits.in.h: Update.
3142         * gnulib/import/localcharset.c: Update.
3143         * gnulib/import/localcharset.h: Update.
3144         * gnulib/import/localtime-buffer.c: Update.
3145         * gnulib/import/localtime-buffer.h: Update.
3146         * gnulib/import/lstat.c: Update.
3147         * gnulib/import/m4/00gnulib.m4: Update.
3148         * gnulib/import/m4/__inline.m4: Update.
3149         * gnulib/import/m4/absolute-header.m4: Update.
3150         * gnulib/import/m4/alloca.m4: Update.
3151         * gnulib/import/m4/builtin-expect.m4: Update.
3152         * gnulib/import/m4/canonicalize.m4: Update.
3153         * gnulib/import/m4/chdir-long.m4: Update.
3154         * gnulib/import/m4/close.m4: Update.
3155         * gnulib/import/m4/closedir.m4: Update.
3156         * gnulib/import/m4/configmake.m4: Update.
3157         * gnulib/import/m4/d-ino.m4: Update.
3158         * gnulib/import/m4/d-type.m4: Update.
3159         * gnulib/import/m4/dirent_h.m4: Update.
3160         * gnulib/import/m4/dirfd.m4: Update.
3161         * gnulib/import/m4/dirname.m4: Update.
3162         * gnulib/import/m4/double-slash-root.m4: Update.
3163         * gnulib/import/m4/dup.m4: Update.
3164         * gnulib/import/m4/dup2.m4: Update.
3165         * gnulib/import/m4/eealloc.m4: Update.
3166         * gnulib/import/m4/environ.m4: Update.
3167         * gnulib/import/m4/errno_h.m4: Update.
3168         * gnulib/import/m4/error.m4: Update.
3169         * gnulib/import/m4/exponentd.m4: Update.
3170         * gnulib/import/m4/exponentl.m4: Update.
3171         * gnulib/import/m4/extensions.m4: Update.
3172         * gnulib/import/m4/extern-inline.m4: Update.
3173         * gnulib/import/m4/fchdir.m4: Update.
3174         * gnulib/import/m4/fcntl-o.m4: Update.
3175         * gnulib/import/m4/fcntl.m4: Update.
3176         * gnulib/import/m4/fcntl_h.m4: Update.
3177         * gnulib/import/m4/fdopendir.m4: Update.
3178         * gnulib/import/m4/filenamecat.m4: Update.
3179         * gnulib/import/m4/flexmember.m4: Update.
3180         * gnulib/import/m4/float_h.m4: Update.
3181         * gnulib/import/m4/fnmatch.m4: Update.
3182         * gnulib/import/m4/fnmatch_h.m4: Update.
3183         * gnulib/import/m4/fpieee.m4: Update.
3184         * gnulib/import/m4/frexp.m4: Update.
3185         * gnulib/import/m4/frexpl.m4: Update.
3186         * gnulib/import/m4/fstat.m4: Update.
3187         * gnulib/import/m4/fstatat.m4: Update.
3188         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3189         * gnulib/import/m4/getcwd-path-max.m4: Update.
3190         * gnulib/import/m4/getcwd.m4: Update.
3191         * gnulib/import/m4/getdtablesize.m4: Update.
3192         * gnulib/import/m4/getlogin.m4: Update.
3193         * gnulib/import/m4/getlogin_r.m4: Update.
3194         * gnulib/import/m4/getpagesize.m4: Update.
3195         * gnulib/import/m4/getprogname.m4: Update.
3196         * gnulib/import/m4/gettimeofday.m4: Update.
3197         * gnulib/import/m4/glibc21.m4: Update.
3198         * gnulib/import/m4/glob.m4: Update.
3199         * gnulib/import/m4/glob_h.m4: Update.
3200         * gnulib/import/m4/gnulib-cache.m4: Update.
3201         * gnulib/import/m4/gnulib-common.m4: Update.
3202         * gnulib/import/m4/gnulib-comp.m4: Update.
3203         * gnulib/import/m4/gnulib-tool.m4: Update.
3204         * gnulib/import/m4/hard-locale.m4: Update.
3205         * gnulib/import/m4/include_next.m4: Update.
3206         * gnulib/import/m4/inttypes-pri.m4: Update.
3207         * gnulib/import/m4/inttypes.m4: Update.
3208         * gnulib/import/m4/isnand.m4: Update.
3209         * gnulib/import/m4/isnanl.m4: Update.
3210         * gnulib/import/m4/largefile.m4: Update.
3211         * gnulib/import/m4/limits-h.m4: Update.
3212         * gnulib/import/m4/localcharset.m4: Update.
3213         * gnulib/import/m4/locale-fr.m4: Update.
3214         * gnulib/import/m4/locale-ja.m4: Update.
3215         * gnulib/import/m4/locale-zh.m4: Update.
3216         * gnulib/import/m4/localtime-buffer.m4: Update.
3217         * gnulib/import/m4/longlong.m4: Update.
3218         * gnulib/import/m4/lstat.m4: Update.
3219         * gnulib/import/m4/malloc.m4: Update.
3220         * gnulib/import/m4/malloca.m4: Update.
3221         * gnulib/import/m4/math_h.m4: Update.
3222         * gnulib/import/m4/mbrtowc.m4: Update.
3223         * gnulib/import/m4/mbsinit.m4: Update.
3224         * gnulib/import/m4/mbsrtowcs.m4: Update.
3225         * gnulib/import/m4/mbstate_t.m4: Update.
3226         * gnulib/import/m4/memchr.m4: Update.
3227         * gnulib/import/m4/memmem.m4: Update.
3228         * gnulib/import/m4/mempcpy.m4: Update.
3229         * gnulib/import/m4/memrchr.m4: Update.
3230         * gnulib/import/m4/mkdir.m4: Update.
3231         * gnulib/import/m4/mkstemp.m4: Update.
3232         * gnulib/import/m4/mmap-anon.m4: Update.
3233         * gnulib/import/m4/mode_t.m4: Update.
3234         * gnulib/import/m4/msvc-inval.m4: Update.
3235         * gnulib/import/m4/msvc-nothrow.m4: Update.
3236         * gnulib/import/m4/multiarch.m4: Update.
3237         * gnulib/import/m4/nocrash.m4: Update.
3238         * gnulib/import/m4/off_t.m4: Update.
3239         * gnulib/import/m4/onceonly.m4: Update.
3240         * gnulib/import/m4/open-cloexec.m4: Update.
3241         * gnulib/import/m4/open.m4: Update.
3242         * gnulib/import/m4/openat.m4: Update.
3243         * gnulib/import/m4/opendir.m4: Update.
3244         * gnulib/import/m4/pathmax.m4: Update.
3245         * gnulib/import/m4/rawmemchr.m4: Update.
3246         * gnulib/import/m4/readdir.m4: Update.
3247         * gnulib/import/m4/readlink.m4: Update.
3248         * gnulib/import/m4/realloc.m4: Update.
3249         * gnulib/import/m4/rename.m4: Update.
3250         * gnulib/import/m4/rewinddir.m4: Update.
3251         * gnulib/import/m4/rmdir.m4: Update.
3252         * gnulib/import/m4/save-cwd.m4: Update.
3253         * gnulib/import/m4/secure_getenv.m4: Update.
3254         * gnulib/import/m4/setenv.m4: Update.
3255         * gnulib/import/m4/signal_h.m4: Update.
3256         * gnulib/import/m4/ssize_t.m4: Update.
3257         * gnulib/import/m4/stat-time.m4: Update.
3258         * gnulib/import/m4/stat.m4: Update.
3259         * gnulib/import/m4/std-gnu11.m4: Update.
3260         * gnulib/import/m4/stdbool.m4: Update.
3261         * gnulib/import/m4/stddef_h.m4: Update.
3262         * gnulib/import/m4/stdint.m4: Update.
3263         * gnulib/import/m4/stdio_h.m4: Update.
3264         * gnulib/import/m4/stdlib_h.m4: Update.
3265         * gnulib/import/m4/strchrnul.m4: Update.
3266         * gnulib/import/m4/strdup.m4: Update.
3267         * gnulib/import/m4/strerror.m4: Update.
3268         * gnulib/import/m4/string_h.m4: Update.
3269         * gnulib/import/m4/strstr.m4: Update.
3270         * gnulib/import/m4/strtok_r.m4: Update.
3271         * gnulib/import/m4/sys_socket_h.m4: Update.
3272         * gnulib/import/m4/sys_stat_h.m4: Update.
3273         * gnulib/import/m4/sys_time_h.m4: Update.
3274         * gnulib/import/m4/sys_types_h.m4: Update.
3275         * gnulib/import/m4/tempname.m4: Update.
3276         * gnulib/import/m4/time_h.m4: Update.
3277         * gnulib/import/m4/unistd-safer.m4: Update.
3278         * gnulib/import/m4/unistd_h.m4: Update.
3279         * gnulib/import/m4/warn-on-use.m4: Update.
3280         * gnulib/import/m4/wchar_h.m4: Update.
3281         * gnulib/import/m4/wchar_t.m4: Update.
3282         * gnulib/import/m4/wctype_h.m4: Update.
3283         * gnulib/import/m4/wint_t.m4: Update.
3284         * gnulib/import/malloc.c: Update.
3285         * gnulib/import/malloc/scratch_buffer.h: Update.
3286         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3287         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3288         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3289         * gnulib/import/malloca.c: Update.
3290         * gnulib/import/malloca.h: Update.
3291         * gnulib/import/malloca.valgrind: Update.
3292         * gnulib/import/math.in.h: Update.
3293         * gnulib/import/mbrtowc.c: Update.
3294         * gnulib/import/mbsinit.c: Update.
3295         * gnulib/import/mbsrtowcs-impl.h: Update.
3296         * gnulib/import/mbsrtowcs-state.c: Update.
3297         * gnulib/import/mbsrtowcs.c: Update.
3298         * gnulib/import/memchr.c: Update.
3299         * gnulib/import/memmem.c: Update.
3300         * gnulib/import/mempcpy.c: Update.
3301         * gnulib/import/memrchr.c: Update.
3302         * gnulib/import/mkdir.c: Update.
3303         * gnulib/import/mkstemp.c: Update.
3304         * gnulib/import/msvc-inval.c: Update.
3305         * gnulib/import/msvc-inval.h: Update.
3306         * gnulib/import/msvc-nothrow.c: Update.
3307         * gnulib/import/msvc-nothrow.h: Update.
3308         * gnulib/import/open.c: Update.
3309         * gnulib/import/openat-die.c: Update.
3310         * gnulib/import/openat-priv.h: Update.
3311         * gnulib/import/openat-proc.c: Update.
3312         * gnulib/import/openat.c: Update.
3313         * gnulib/import/openat.h: Update.
3314         * gnulib/import/opendir.c: Update.
3315         * gnulib/import/pathmax.h: Update.
3316         * gnulib/import/pipe-safer.c: Update.
3317         * gnulib/import/rawmemchr.c: Update.
3318         * gnulib/import/readdir.c: Update.
3319         * gnulib/import/readlink.c: Update.
3320         * gnulib/import/realloc.c: Update.
3321         * gnulib/import/ref-add.sin: Update.
3322         * gnulib/import/ref-del.sin: Update.
3323         * gnulib/import/rename.c: Update.
3324         * gnulib/import/rewinddir.c: Update.
3325         * gnulib/import/rmdir.c: Update.
3326         * gnulib/import/same-inode.h: Update.
3327         * gnulib/import/save-cwd.c: Update.
3328         * gnulib/import/save-cwd.h: Update.
3329         * gnulib/import/scratch_buffer.h: Update.
3330         * gnulib/import/secure_getenv.c: Update.
3331         * gnulib/import/setenv.c: Update.
3332         * gnulib/import/signal.in.h: Update.
3333         * gnulib/import/stat-time.c: Update.
3334         * gnulib/import/stat-time.h: Update.
3335         * gnulib/import/stat-w32.c: Update.
3336         * gnulib/import/stat-w32.h: Update.
3337         * gnulib/import/stat.c: Update.
3338         * gnulib/import/stdbool.in.h: Update.
3339         * gnulib/import/stddef.in.h: Update.
3340         * gnulib/import/stdint.in.h: Update.
3341         * gnulib/import/stdio.in.h: Update.
3342         * gnulib/import/stdlib.in.h: Update.
3343         * gnulib/import/str-two-way.h: Update.
3344         * gnulib/import/strchrnul.c: Update.
3345         * gnulib/import/strdup.c: Update.
3346         * gnulib/import/streq.h: Update.
3347         * gnulib/import/strerror-override.c: Update.
3348         * gnulib/import/strerror-override.h: Update.
3349         * gnulib/import/strerror.c: Update.
3350         * gnulib/import/string.in.h: Update.
3351         * gnulib/import/stripslash.c: Update.
3352         * gnulib/import/strnlen1.c: Update.
3353         * gnulib/import/strnlen1.h: Update.
3354         * gnulib/import/strstr.c: Update.
3355         * gnulib/import/strtok_r.c: Update.
3356         * gnulib/import/sys_stat.in.h: Update.
3357         * gnulib/import/sys_time.in.h: Update.
3358         * gnulib/import/sys_types.in.h: Update.
3359         * gnulib/import/tempname.c: Update.
3360         * gnulib/import/tempname.h: Update.
3361         * gnulib/import/time.in.h: Update.
3362         * gnulib/import/unistd--.h: Update.
3363         * gnulib/import/unistd-safer.h: Update.
3364         * gnulib/import/unistd.in.h: Update.
3365         * gnulib/import/unsetenv.c: Update.
3366         * gnulib/import/verify.h: Update.
3367         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3368         * gnulib/import/wchar.in.h: Update.
3369         * gnulib/import/wctype.in.h: Update.
3370         * gnulib/import/xalloc-oversized.h: Update.
3371         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3372         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3373
3374 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3375
3376         * record-btrace.c (get_thread_current_frame): Remove
3377         old_inferior_ptid.
3378
3379 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3380
3381         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3382         with check_tag to 1 if and only if the type is tagged and the
3383         component being searched cannot been found in the current
3384         view. Otherwise, always call ada_to_fixed_type with
3385         check_tag to 0.
3386
3387 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3388
3389         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3390         declaration.
3391         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3392         * ada-varobj.c (ada_varobj_get_number_of_children,
3393         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3394
3395 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3396
3397         * ada-valprint.c (ada_value_print): Use type instead of
3398         enclosing type.
3399
3400 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3401
3402         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3403         an array of access to unconstrained array.
3404
3405 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3406
3407         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3408         (ada_check_typedef): Use it.
3409
3410 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3411
3412         * ada-varobj.c (ada_varobj_describe_struct_child)
3413         (ada_varobj_describe_child): Handle union case like struct one.
3414
3415 2018-09-10  Tom Tromey  <tom@tromey.com>
3416
3417         PR python/18380:
3418         * python/python.c (_initialize_python): Make example in "python"
3419         help work in Python 3.
3420
3421 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
3422
3423         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3424         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
3425         $(EXEEXT) to the script, as it is not a program.
3426
3427 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3428
3429         * python/py-prettyprint.c (pretty_print_one_value): Return
3430         gdbpy_ref<>.
3431         (print_string_repr): Adjust.
3432         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3433         * python/python-internal.h (apply_varobj_pretty_printer): Return
3434         gdbpy_ref<>.
3435         * varobj.c (varobj_value_get_print_value): Adjust.
3436
3437 2018-09-08  Tom Tromey  <tom@tromey.com>
3438
3439         PR python/16047:
3440         * python/py-prettyprint.c (pretty_print_one_value): Check for
3441         to_string method.
3442
3443 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3444
3445         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3446         replace_operator_with_call.
3447
3448 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3449
3450         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
3451
3452 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3453
3454         * ada-typeprint.c (print_range): Print the bounds using TYPE
3455         rather than its TYPE_TARGET_TYPE.
3456
3457 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3458
3459         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
3460         call to ada_to_fixed_value_create.
3461
3462 2018-09-08  Jerome Guitton  <guitton@adacore.com>
3463
3464         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
3465
3466 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3467
3468         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
3469         by calls to error.
3470
3471 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3472
3473         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
3474         Move update of loop variable "fi".
3475
3476 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3477
3478         * ada-lang.c (value_assign_to_component): In the case of
3479         big-endian targets, extract the bits of the given VAL
3480         using an src_offset of zero if container is not a scalar.
3481
3482 2018-09-06  Simon Ser  <contact@emersion.fr>
3483
3484         PR gdb/23105
3485         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
3486         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3487         * fbsd-tdep.c (fbsd_make_note_desc): New.
3488         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
3489         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
3490         * target.h (enum target_object) Add FreeBSD-specific
3491         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3492
3493 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3494
3495         * compile/compile-c.h (generate_c_for_variable_locations):
3496         Change reference to pointer.
3497         * compile/compile-c-support.c (compile_program) <compute>:
3498         Likewise.
3499         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
3500         (generate_c_for_for_one_variable): Likewise
3501         (generate_c_for_variable_locations): Likewise
3502         * compile/compile-c-types.c (compile_c_instance::convert_type):
3503         Likewise
3504         * compile/compile-cplus-symbols.c (convert_one_symbol):
3505         std::move the scope passed to enter_scope.
3506         * compile/compile-cplus-types.c
3507         (compile_cplus_instance::enter_scope): Make parameter
3508         rvalue-reference.
3509         (compile_cplus_instance::new_scope): Change reference to
3510         pointer.
3511         (compile_cplus_instance::convert_type): Likewise
3512         (compile_cplus_convert_typedef): std::move the scope passed to
3513         enter_scope.
3514         (compile_cplus_convert_struct_or_union): Likewise.
3515         (compile_cplus_convert_enum): Likewise.
3516         (compile_cplus_convert_namespace): Likewise.
3517         * compile/compile-cplus.h (compile_cplus_instance)
3518         <enter_scope>: Make parameter rvalue-reference.
3519         * compile/compile-internal.h (compile_instance)
3520         <get_cached_type>: Likewise
3521         * compile/compile-loc2c.c (push): Likewise
3522         (pushf): Likewise
3523         (unary): Likewise
3524         (binary): Likewise
3525         (print_label): Likewise
3526         (pushf_register_address): Likewise
3527         (pushf_register): Likewise
3528         (do_compile_dwarf_expr_to_c): Likewise
3529         (compile_dwarf_expr_to_c): Likewise
3530         (compile_dwarf_bounds_to_c): Likewise
3531         * compile/compile.c (compile_instance::get_cached_type):
3532         Likewise
3533         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
3534         (compile_dwarf_bounds_to_c): Likewise
3535         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
3536         (dwarf2_compile_property_to_c): Likewise
3537         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
3538         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
3539         Likewise
3540
3541 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3542
3543         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
3544         * tui/tui-data.c (init_content_element): Don't initialize it.
3545
3546 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3547
3548         * tui/tui-data.h (struct tui_win_info)
3549         <detail::opaque>: Remove.
3550         * tui/tui-data.c (init_win_info): Remove assignment.
3551
3552 2018-09-05  Tom Tromey  <tom@tromey.com>
3553
3554         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
3555         -Wformat-nonliteral.
3556         * target-float.c (host_float_ops<T>::to_string)
3557         (host_float_ops<T>::from_string): Use
3558         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3559         * configure: Rebuild.
3560
3561 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3562
3563         * printcmd.c (printf_c_string): Use
3564         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3565         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
3566
3567 2018-09-05  Tom Tromey  <tom@tromey.com>
3568
3569         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
3570
3571 2018-09-05  Tom de Vries  <tdevries@suse.de>
3572
3573         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
3574         with resolve_abstract_p == true.
3575         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
3576         defaulting to false. Propagate resolve_abstract_p to
3577         dwarf2_fetch_die_loc_sect_off.
3578         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
3579         parameter, defaulting to false.
3580         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
3581         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
3582         parameter.
3583         * dwarf2read.h (struct die_info): Forward-declare.
3584         (die_info_ptr): New typedef.
3585         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
3586
3587 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
3588
3589         GDB 8.2 released.
3590
3591 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3592             Pedro Alves  <palves@redhat.com>
3593
3594         * gnulib/Makefile.in (aclocal_m4_deps): Move to
3595         "aclocal-m4-deps.mk".  Include file here.
3596         $(srcdir)/aclocal.m4: Add "configure.ac".
3597         * gnulib/aclocal-m4-deps.mk: New file.
3598         * gnulib/update-gnulib.sh: Automatically update
3599         "aclocal-m4-deps.mk".
3600
3601 2018-09-04  Tom Tromey  <tom@tromey.com>
3602
3603         * configure: Rebuild.
3604         * configure.ac: Remove multi-ice code.
3605
3606 2018-09-04  Tom Tromey  <tom@tromey.com>
3607
3608         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
3609         (ada-exp.o): Update.
3610
3611 2018-09-04  Tom Tromey  <tom@tromey.com>
3612
3613         * Makefile.in (printcmd.o, target-float.o): Remove.
3614         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
3615
3616 2018-09-04  Tom Tromey  <tom@tromey.com>
3617
3618         * gnulib/Makefile.in: Remove obsolete comment.
3619         * Makefile.in: Remove obsolete comment.
3620
3621 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
3622
3623         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
3624         line with '+'.
3625
3626 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3627
3628         * riscv-tdep.c: Add 'prologue-value.h' include.
3629         (struct riscv_unwind_cache): New struct.
3630         (riscv_debug_unwinder): New global.
3631         (riscv_scan_prologue): Update arguments, capture register details
3632         from prologue scan.
3633         (riscv_skip_prologue): Reformat arguments line, move end of
3634         prologue calculation into riscv_scan_prologue.
3635         (riscv_frame_cache): Update return type, create
3636         riscv_unwind_cache, scan the prologue, and fill in remaining cache
3637         details.
3638         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
3639         (riscv_frame_prev_register): Use the trad_frame within the
3640         riscv_unwind_cache.
3641         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
3642         flag.
3643
3644 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3645
3646         * trad-frame.h (trad_frame_set_realreg): Declare.
3647         (trad_frame_set_addr): Declare.
3648         * trad-frame.c (trad_frame_set_realreg): Define new function.
3649         (trad_frame_set_addr): Define new function.
3650         (trad_frame_set_reg_realreg): Use new function.
3651         (trad_frame_set_reg_addr): Use new function.
3652
3653 2018-09-01  Keith Seitz  <keiths@redhat.com>
3654
3655         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
3656         pulongest instead of "%lld".
3657         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
3658         ATTRIBUTE_UNUSED.
3659
3660 2018-08-31  Tom Tromey  <tom@tromey.com>
3661
3662         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
3663         variant part type.
3664
3665 2018-08-31  Pedro Alves  <palves@redhat.com>
3666
3667         * gdbarch.h: Regenerate.
3668
3669 2018-08-31  Pedro Alves  <palves@redhat.com>
3670
3671         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
3672         * target.h (Hardware watchpoint interfaces): Describe
3673         continuable/steppable/non-steppable watchpoints.
3674         * gdbarch.h, gdbarch.c: Regenerate.
3675
3676 2018-08-31  Pedro Alves  <palves@redhat.com>
3677
3678         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
3679         Delete.
3680         * s390-linux-nat.c
3681         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
3682         * target.h (target_ops::have_continuable_watchpoint): Delete.
3683         (target_have_continuable_watchpoint): Delete.
3684         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
3685         * target-delegates.c: Regenerate.
3686
3687 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3688
3689         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
3690         the files present in "gnulib/import/m4/".
3691
3692 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3693
3694         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
3695         c.sw, c.swsp, and c.sdsp.
3696
3697 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3698
3699         * riscv-tdep.c (struct riscv_inferior_data): Delete.
3700         (riscv_read_misa_reg): Don't cache value read into inferior data.
3701         (riscv_new_inferior_data): Delete.
3702         (riscv_inferior_data_cleanup): Delete.
3703         (riscv_inferior_data): Delete.
3704         (riscv_invalidate_inferior_data): Delete.
3705         (_initialize_riscv_tdep): Remove initialisation of inferior data.
3706
3707 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
3708
3709         * compile/compile-cplus-types.c
3710         (compile_cplus_instance::leave_scope): Take the address of scope
3711         object.
3712         (compile_cplus_instance::convert_qualified_base): Compare quals
3713         to 0.
3714
3715 2018-08-30  Keith Seitz  <keiths@redhat.com>
3716
3717         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
3718         Use "%s" and host_address_to_string instead of "%p" in printf.
3719
3720 2018-08-29  Keith Seitz  <keiths@redhat.com>
3721
3722         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3723         and compile-cplus-types.c.
3724         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3725         * c-lang.c (cplus_language_defn): Set C++ compile functions.
3726         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3727         Declare.
3728         * compile/compile-c-support.c: Include compile-cplus.h.
3729         (load_libcompile): Templatize.
3730         (get_compile_context): "New" function.
3731         (c_get_compile_context): Use get_compile_context.
3732         (cplus_get_compile_context): New function.
3733         (cplus_push_user_expression, cplus_pop_user_expression)
3734         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3735         (cplus_compute_program): Define new structs/functions.
3736         * compile/compile-cplus-symmbols.c: New file.
3737         * compile/compile-cplus-types.c: New file.
3738         * compile/compile-cplus.h: New file.
3739         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3740         Declare.
3741         * compile/compile-object-load.c (get_out_value_type): Use
3742         strncmp_iw when comparing symbol names.
3743         (compile_object_load): Add mst_bss and mst_data.
3744         * compile/compile.c (_initialize_compile): Remove
3745         -Wno-implicit-function-declaration from `compile_args'.
3746         * compile/gcc-cp-plugin.h: New file.
3747         * NEWS: Mention C++ compile support and new debug options.
3748
3749 2018-08-29  Keith Seitz  <keiths@redhat.com>
3750
3751         * linespec.c (collect_info::add_symbol): Make virtual.
3752         (struct symbol_searcher_collect_info): New struct.
3753         (symbol_searcher::find_all_symbols): New method.
3754         * symtab.h (class symbol_searcher): New class.
3755
3756 2018-08-29  Keith Seitz  <keiths@redhat.com>
3757
3758         * linespec.c (struct linespec) <function_symbols, label_symbols>:
3759         Change to vector of block_symbol.  Update all users.
3760         (struct collect_info) <symbols>: Likewise.
3761         (collect_info::add_symbol): Take block_symbol as argument.
3762         Update all callers.
3763         (decode_compound_collector) <m_symbols>: Change type to vector
3764         of block_symbol.  Update all users.
3765         (decode_compound_collector::operator ()): Change parameter type
3766         to block_symbol.
3767         (find_method, find_function_symbols, find_linespec_symbols)
3768         (find_label_symbols_in_block, find_label_symbols): Change symbol
3769         vectors to block_symbol vectors.
3770         * symtab.h (symbol_found_callback_ftype): Change parameter type to
3771         block_symbol.
3772
3773 2018-08-29  Keith Seitz  <keiths@redhat.com>
3774
3775         * linespec.c (symbolp): Remove typedef and VEC definitions.
3776         (bound_minimal_symbol_d): Likewise.
3777
3778 2018-08-29  Keith Seitz  <keiths@redhat.com>
3779
3780         * linespec.c (decode_compound_collector::decode_compound_collector):
3781         Remove initialization for `m_symtabs'.
3782         (decode_compound_collector::release_symbols): Change return type
3783         to std::vector.  Update all callers.
3784         (class decode_compound_collector) <m_symbols>: Change type to
3785         std::vector.
3786         (lookup_prefix_sym): Change return type to std::vector.  Update all
3787         callers.
3788         (compare_symbols): Remove.
3789         (std_compare_symbols): Rename to `compare_symbols'.
3790         (find_method): Change `sym_classes' parameter to std::vector.
3791         Update all callers.  Use std::sort to sort sym_classes.
3792         (find_linespec_symbols): Remove cleanup.
3793
3794 2018-08-29  Keith Seitz  <keiths@redhat.com>
3795
3796         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3797         std::vector.  Update all users.
3798         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3799         (struct collect_info) <minimal_symbols>: Likewise.
3800         (compare_msymbols): Return bool.  Change parameters to const
3801         bound_minimal_symbol references.
3802         (find_method, find_function_symbols, find_linespec_symbols): Change
3803         `minsyms' parameter to std::vector.  Update all callers.
3804
3805 2018-08-29  Keith Seitz  <keiths@redhat.com>
3806
3807         * linespec.c (struct linespec) <label_symbols>: Change type to
3808         std::vector.  Update all users.
3809         (find_label_symbols_in_block): Change `result' parameter to
3810         std::vector.  Update all callers.
3811         (find_label_symbols): Return std::vector.  Update all callers.
3812
3813 2018-08-29  Keith Seitz  <keiths@redhat.com>
3814
3815         * linespec.c (struct linespec) <function_symbols>: Change type to
3816         std::vector.  Update all users.
3817         (struct collect_info) <function_symbols>: Likewise.
3818         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3819         (std_compare_symbols): New function.
3820         (find_method, find_function_symbols, find_linespec_symbols)
3821         (find_label_symbols_in_block): Change `symbols' parameter to
3822         std::vector.  Update all callers.
3823         (find_label_symbols): Likewise for `function_symbols' and
3824         `label_funcs_ret'.
3825
3826 2018-08-29  Keith Seitz  <keiths@redhat.com>
3827
3828         * linespec.c (symtab_vector_up): Define.
3829         (struct linespec) <file_symtabs>: Change type to std::vector *.
3830         Update all uses.
3831         (struct collect_info) <file_symtabs>: Likewise.
3832         (collect_symtabs_from_filename): Return symtab_vector_up.
3833         Update all callers.
3834         (decode_objc): Remove cleanup.
3835         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3836         (symtab_collector::release_symtabs): Return symtab_vector_up.
3837         Update all callers.
3838         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3839         Update all users.
3840         (collect_symtabs_from_filename, symtabs_from_filename): Return
3841         symtab_vector_up.  Update all callers.
3842
3843 2018-08-29  Tom Tromey  <tom@tromey.com>
3844
3845         * csky-tdep.c (csky_analyze_prologue): Use
3846         core_addr_to_string_nz.
3847
3848 2018-08-29  Tom Tromey  <tom@tromey.com>
3849
3850         * windows-nat.c (struct xlate_exception) <them>: Change type to
3851         DWORD.
3852         (xlate): Fix formatting.  Remove last entry.
3853         (struct xlate_exception, xlate): Comment out.
3854         (windows_nat_target::resume): Use ranged for.
3855
3856 2018-08-29  Jim Wilson  <jimw@sifive.com>
3857
3858         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3859         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3860         of NT_PRFPREG.
3861         (riscv_linux_nat_target::store_registers): Likewise.
3862
3863 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3864
3865         PR gdb/23555
3866         PR gdb/23558
3867         * gnulib/aclocal.m4: Regenerate.
3868         * gnulib/config.in: Regenerate.
3869         * gnulib/configure: Regenerate.
3870         * gnulib/import/Makefile.am: Update.
3871         * gnulib/import/Makefile.in: Update.
3872         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3873         * gnulib/import/_Noreturn.h: ... this.
3874         * gnulib/import/alloca.in.h: Update.
3875         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3876         * gnulib/import/arg-nonnull.h: ... this.
3877         * gnulib/import/assure.h: Update.
3878         * gnulib/import/at-func.c: Update.
3879         * gnulib/import/basename-lgpl.c: Update.
3880         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3881         * gnulib/import/c++defs.h: ... this.
3882         * gnulib/import/canonicalize-lgpl.c: Update.
3883         * gnulib/import/cdefs.h: Update.
3884         * gnulib/import/chdir-long.c: Update.
3885         * gnulib/import/chdir-long.h: Update.
3886         * gnulib/import/cloexec.c: Update.
3887         * gnulib/import/cloexec.h: Update.
3888         * gnulib/import/close.c: Update.
3889         * gnulib/import/closedir.c: Update.
3890         * gnulib/import/config.charset: Update.
3891         * gnulib/import/dirent-private.h: Update.
3892         * gnulib/import/dirent.in.h: Update.
3893         * gnulib/import/dirfd.c: Update.
3894         * gnulib/import/dirname-lgpl.c: Update.
3895         * gnulib/import/dirname.h: Update.
3896         * gnulib/import/dosname.h: Update.
3897         * gnulib/import/dup-safer-flag.c: Update.
3898         * gnulib/import/dup-safer.c: Update.
3899         * gnulib/import/dup.c: Update.
3900         * gnulib/import/dup2.c: Update.
3901         * gnulib/import/errno.in.h: Update.
3902         * gnulib/import/error.c: Update.
3903         * gnulib/import/error.h: Update.
3904         * gnulib/import/exitfail.c: Update.
3905         * gnulib/import/exitfail.h: Update.
3906         * gnulib/import/extra/update-copyright: Update.
3907         * gnulib/import/fchdir.c: Update.
3908         * gnulib/import/fcntl.c: Update.
3909         * gnulib/import/fcntl.in.h: Update.
3910         * gnulib/import/fd-hook.c: Update.
3911         * gnulib/import/fd-hook.h: Update.
3912         * gnulib/import/fd-safer-flag.c: Update.
3913         * gnulib/import/fd-safer.c: Update.
3914         * gnulib/import/fdopendir.c: Update.
3915         * gnulib/import/filename.h: Update.
3916         * gnulib/import/filenamecat-lgpl.c: Update.
3917         * gnulib/import/filenamecat.h: Update.
3918         * gnulib/import/flexmember.h: Update.
3919         * gnulib/import/float+.h: Update.
3920         * gnulib/import/float.c: Update.
3921         * gnulib/import/float.in.h: Update.
3922         * gnulib/import/fnmatch.c: Update.
3923         * gnulib/import/fnmatch.in.h: Update.
3924         * gnulib/import/fnmatch_loop.c: Update.
3925         * gnulib/import/fpucw.h: Update.
3926         * gnulib/import/frexp.c: Update.
3927         * gnulib/import/frexpl.c: Update.
3928         * gnulib/import/fstat.c: Update.
3929         * gnulib/import/fstatat.c: Update.
3930         * gnulib/import/getcwd-lgpl.c: Update.
3931         * gnulib/import/getcwd.c: Update.
3932         * gnulib/import/getdtablesize.c: Update.
3933         * gnulib/import/getlogin_r.c: Update.
3934         * gnulib/import/getprogname.c: Update.
3935         * gnulib/import/getprogname.h: Update.
3936         * gnulib/import/gettext.h: Update.
3937         * gnulib/import/gettimeofday.c: Update.
3938         * gnulib/import/glob-libc.h: Update.
3939         * gnulib/import/glob.c: Update.
3940         * gnulib/import/glob.in.h: Update.
3941         * gnulib/import/glob_internal.h: Update.
3942         * gnulib/import/glob_pattern_p.c: Update.
3943         * gnulib/import/globfree.c: Update.
3944         * gnulib/import/hard-locale.c: Update.
3945         * gnulib/import/hard-locale.h: Update.
3946         * gnulib/import/intprops.h: Update.
3947         * gnulib/import/inttypes.in.h: Update.
3948         * gnulib/import/isnan.c: Update.
3949         * gnulib/import/isnand-nolibm.h: Update.
3950         * gnulib/import/isnand.c: Update.
3951         * gnulib/import/isnanl-nolibm.h: Update.
3952         * gnulib/import/isnanl.c: Update.
3953         * gnulib/import/itold.c: Update.
3954         * gnulib/import/libc-config.h: Update.
3955         * gnulib/import/limits.in.h: Update.
3956         * gnulib/import/localcharset.c: Update.
3957         * gnulib/import/localcharset.h: Update.
3958         * gnulib/import/localtime-buffer.c: Update.
3959         * gnulib/import/localtime-buffer.h: Update.
3960         * gnulib/import/lstat.c: Update.
3961         * gnulib/import/m4/00gnulib.m4: Update.
3962         * gnulib/import/m4/__inline.m4: Update.
3963         * gnulib/import/m4/absolute-header.m4: Update.
3964         * gnulib/import/m4/alloca.m4: Update.
3965         * gnulib/import/m4/builtin-expect.m4: Update.
3966         * gnulib/import/m4/canonicalize.m4: Update.
3967         * gnulib/import/m4/chdir-long.m4: Update.
3968         * gnulib/import/m4/close.m4: Update.
3969         * gnulib/import/m4/closedir.m4: Update.
3970         * gnulib/import/m4/configmake.m4: Update.
3971         * gnulib/import/m4/d-ino.m4: Update.
3972         * gnulib/import/m4/d-type.m4: Update.
3973         * gnulib/import/m4/dirent_h.m4: Update.
3974         * gnulib/import/m4/dirfd.m4: Update.
3975         * gnulib/import/m4/dirname.m4: Update.
3976         * gnulib/import/m4/double-slash-root.m4: Update.
3977         * gnulib/import/m4/dup.m4: Update.
3978         * gnulib/import/m4/dup2.m4: Update.
3979         * gnulib/import/m4/eealloc.m4: Update.
3980         * gnulib/import/m4/environ.m4: Update.
3981         * gnulib/import/m4/errno_h.m4: Update.
3982         * gnulib/import/m4/error.m4: Update.
3983         * gnulib/import/m4/exponentd.m4: Update.
3984         * gnulib/import/m4/exponentl.m4: Update.
3985         * gnulib/import/m4/extensions.m4: Update.
3986         * gnulib/import/m4/extern-inline.m4: Update.
3987         * gnulib/import/m4/fchdir.m4: Update.
3988         * gnulib/import/m4/fcntl-o.m4: Update.
3989         * gnulib/import/m4/fcntl.m4: Update.
3990         * gnulib/import/m4/fcntl_h.m4: Update.
3991         * gnulib/import/m4/fdopendir.m4: Update.
3992         * gnulib/import/m4/filenamecat.m4: Update.
3993         * gnulib/import/m4/flexmember.m4: Update.
3994         * gnulib/import/m4/float_h.m4: Update.
3995         * gnulib/import/m4/fnmatch.m4: Update.
3996         * gnulib/import/m4/fnmatch_h.m4: Update.
3997         * gnulib/import/m4/fpieee.m4: Update.
3998         * gnulib/import/m4/frexp.m4: Update.
3999         * gnulib/import/m4/frexpl.m4: Update.
4000         * gnulib/import/m4/fstat.m4: Update.
4001         * gnulib/import/m4/fstatat.m4: Update.
4002         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4003         * gnulib/import/m4/getcwd-path-max.m4: Update.
4004         * gnulib/import/m4/getcwd.m4: Update.
4005         * gnulib/import/m4/getdtablesize.m4: Update.
4006         * gnulib/import/m4/getlogin.m4: Update.
4007         * gnulib/import/m4/getlogin_r.m4: Update.
4008         * gnulib/import/m4/getpagesize.m4: Update.
4009         * gnulib/import/m4/getprogname.m4: Update.
4010         * gnulib/import/m4/gettimeofday.m4: Update.
4011         * gnulib/import/m4/glibc21.m4: Update.
4012         * gnulib/import/m4/glob.m4: Update.
4013         * gnulib/import/m4/glob_h.m4: Update.
4014         * gnulib/import/m4/gnulib-cache.m4: Update.
4015         * gnulib/import/m4/gnulib-common.m4: Update.
4016         * gnulib/import/m4/gnulib-comp.m4: Update.
4017         * gnulib/import/m4/gnulib-tool.m4: Update.
4018         * gnulib/import/m4/hard-locale.m4: Update.
4019         * gnulib/import/m4/include_next.m4: Update.
4020         * gnulib/import/m4/inttypes-pri.m4: Update.
4021         * gnulib/import/m4/inttypes.m4: Update.
4022         * gnulib/import/m4/isnand.m4: Update.
4023         * gnulib/import/m4/isnanl.m4: Update.
4024         * gnulib/import/m4/largefile.m4: Update.
4025         * gnulib/import/m4/limits-h.m4: Update.
4026         * gnulib/import/m4/localcharset.m4: Update.
4027         * gnulib/import/m4/locale-fr.m4: Update.
4028         * gnulib/import/m4/locale-ja.m4: Update.
4029         * gnulib/import/m4/locale-zh.m4: Update.
4030         * gnulib/import/m4/localtime-buffer.m4: Update.
4031         * gnulib/import/m4/longlong.m4: Update.
4032         * gnulib/import/m4/lstat.m4: Update.
4033         * gnulib/import/m4/malloc.m4: Update.
4034         * gnulib/import/m4/malloca.m4: Update.
4035         * gnulib/import/m4/math_h.m4: Update.
4036         * gnulib/import/m4/mbrtowc.m4: Update.
4037         * gnulib/import/m4/mbsinit.m4: Update.
4038         * gnulib/import/m4/mbsrtowcs.m4: Update.
4039         * gnulib/import/m4/mbstate_t.m4: Update.
4040         * gnulib/import/m4/memchr.m4: Update.
4041         * gnulib/import/m4/memmem.m4: Update.
4042         * gnulib/import/m4/mempcpy.m4: Update.
4043         * gnulib/import/m4/memrchr.m4: Update.
4044         * gnulib/import/m4/mkdir.m4: Update.
4045         * gnulib/import/m4/mkstemp.m4: Update.
4046         * gnulib/import/m4/mmap-anon.m4: Update.
4047         * gnulib/import/m4/mode_t.m4: Update.
4048         * gnulib/import/m4/msvc-inval.m4: Update.
4049         * gnulib/import/m4/msvc-nothrow.m4: Update.
4050         * gnulib/import/m4/multiarch.m4: Update.
4051         * gnulib/import/m4/nocrash.m4: Update.
4052         * gnulib/import/m4/off_t.m4: Update.
4053         * gnulib/import/m4/onceonly.m4: Update.
4054         * gnulib/import/m4/open-cloexec.m4: Update.
4055         * gnulib/import/m4/open.m4: Update.
4056         * gnulib/import/m4/openat.m4: Update.
4057         * gnulib/import/m4/opendir.m4: Update.
4058         * gnulib/import/m4/pathmax.m4: Update.
4059         * gnulib/import/m4/rawmemchr.m4: Update.
4060         * gnulib/import/m4/readdir.m4: Update.
4061         * gnulib/import/m4/readlink.m4: Update.
4062         * gnulib/import/m4/realloc.m4: Update.
4063         * gnulib/import/m4/rename.m4: Update.
4064         * gnulib/import/m4/rewinddir.m4: Update.
4065         * gnulib/import/m4/rmdir.m4: Update.
4066         * gnulib/import/m4/save-cwd.m4: Update.
4067         * gnulib/import/m4/secure_getenv.m4: Update.
4068         * gnulib/import/m4/setenv.m4: Update.
4069         * gnulib/import/m4/signal_h.m4: Update.
4070         * gnulib/import/m4/ssize_t.m4: Update.
4071         * gnulib/import/m4/stat-time.m4: Update.
4072         * gnulib/import/m4/stat.m4: Update.
4073         * gnulib/import/m4/std-gnu11.m4: Update.
4074         * gnulib/import/m4/stdbool.m4: Update.
4075         * gnulib/import/m4/stddef_h.m4: Update.
4076         * gnulib/import/m4/stdint.m4: Update.
4077         * gnulib/import/m4/stdio_h.m4: Update.
4078         * gnulib/import/m4/stdlib_h.m4: Update.
4079         * gnulib/import/m4/strchrnul.m4: Update.
4080         * gnulib/import/m4/strdup.m4: Update.
4081         * gnulib/import/m4/strerror.m4: Update.
4082         * gnulib/import/m4/string_h.m4: Update.
4083         * gnulib/import/m4/strstr.m4: Update.
4084         * gnulib/import/m4/strtok_r.m4: Update.
4085         * gnulib/import/m4/sys_socket_h.m4: Update.
4086         * gnulib/import/m4/sys_stat_h.m4: Update.
4087         * gnulib/import/m4/sys_time_h.m4: Update.
4088         * gnulib/import/m4/sys_types_h.m4: Update.
4089         * gnulib/import/m4/tempname.m4: Update.
4090         * gnulib/import/m4/time_h.m4: Update.
4091         * gnulib/import/m4/unistd-safer.m4: Update.
4092         * gnulib/import/m4/unistd_h.m4: Update.
4093         * gnulib/import/m4/warn-on-use.m4: Update.
4094         * gnulib/import/m4/wchar_h.m4: Update.
4095         * gnulib/import/m4/wchar_t.m4: Update.
4096         * gnulib/import/m4/wctype_h.m4: Update.
4097         * gnulib/import/m4/wint_t.m4: Update.
4098         * gnulib/import/malloc.c: Update.
4099         * gnulib/import/malloc/scratch_buffer.h: Update.
4100         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4101         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4102         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4103         * gnulib/import/malloca.c: Update.
4104         * gnulib/import/malloca.h: Update.
4105         * gnulib/import/malloca.valgrind: Update.
4106         * gnulib/import/math.in.h: Update.
4107         * gnulib/import/mbrtowc.c: Update.
4108         * gnulib/import/mbsinit.c: Update.
4109         * gnulib/import/mbsrtowcs-impl.h: Update.
4110         * gnulib/import/mbsrtowcs-state.c: Update.
4111         * gnulib/import/mbsrtowcs.c: Update.
4112         * gnulib/import/memchr.c: Update.
4113         * gnulib/import/memmem.c: Update.
4114         * gnulib/import/mempcpy.c: Update.
4115         * gnulib/import/memrchr.c: Update.
4116         * gnulib/import/mkdir.c: Update.
4117         * gnulib/import/mkstemp.c: Update.
4118         * gnulib/import/msvc-inval.c: Update.
4119         * gnulib/import/msvc-inval.h: Update.
4120         * gnulib/import/msvc-nothrow.c: Update.
4121         * gnulib/import/msvc-nothrow.h: Update.
4122         * gnulib/import/open.c: Update.
4123         * gnulib/import/openat-die.c: Update.
4124         * gnulib/import/openat-priv.h: Update.
4125         * gnulib/import/openat-proc.c: Update.
4126         * gnulib/import/openat.c: Update.
4127         * gnulib/import/openat.h: Update.
4128         * gnulib/import/opendir.c: Update.
4129         * gnulib/import/pathmax.h: Update.
4130         * gnulib/import/pipe-safer.c: Update.
4131         * gnulib/import/rawmemchr.c: Update.
4132         * gnulib/import/readdir.c: Update.
4133         * gnulib/import/readlink.c: Update.
4134         * gnulib/import/realloc.c: Update.
4135         * gnulib/import/ref-add.sin: Update.
4136         * gnulib/import/ref-del.sin: Update.
4137         * gnulib/import/rename.c: Update.
4138         * gnulib/import/rewinddir.c: Update.
4139         * gnulib/import/rmdir.c: Update.
4140         * gnulib/import/same-inode.h: Update.
4141         * gnulib/import/save-cwd.c: Update.
4142         * gnulib/import/save-cwd.h: Update.
4143         * gnulib/import/scratch_buffer.h: Update.
4144         * gnulib/import/secure_getenv.c: Update.
4145         * gnulib/import/setenv.c: Update.
4146         * gnulib/import/signal.in.h: Update.
4147         * gnulib/import/stat-time.c: Update.
4148         * gnulib/import/stat-time.h: Update.
4149         * gnulib/import/stat-w32.c: Update.
4150         * gnulib/import/stat-w32.h: Update.
4151         * gnulib/import/stat.c: Update.
4152         * gnulib/import/stdbool.in.h: Update.
4153         * gnulib/import/stddef.in.h: Update.
4154         * gnulib/import/stdint.in.h: Update.
4155         * gnulib/import/stdio.in.h: Update.
4156         * gnulib/import/stdlib.in.h: Update.
4157         * gnulib/import/str-two-way.h: Update.
4158         * gnulib/import/strchrnul.c: Update.
4159         * gnulib/import/strdup.c: Update.
4160         * gnulib/import/streq.h: Update.
4161         * gnulib/import/strerror-override.c: Update.
4162         * gnulib/import/strerror-override.h: Update.
4163         * gnulib/import/strerror.c: Update.
4164         * gnulib/import/string.in.h: Update.
4165         * gnulib/import/stripslash.c: Update.
4166         * gnulib/import/strnlen1.c: Update.
4167         * gnulib/import/strnlen1.h: Update.
4168         * gnulib/import/strstr.c: Update.
4169         * gnulib/import/strtok_r.c: Update.
4170         * gnulib/import/sys_stat.in.h: Update.
4171         * gnulib/import/sys_time.in.h: Update.
4172         * gnulib/import/sys_types.in.h: Update.
4173         * gnulib/import/tempname.c: Update.
4174         * gnulib/import/tempname.h: Update.
4175         * gnulib/import/time.in.h: Update.
4176         * gnulib/import/unistd--.h: Update.
4177         * gnulib/import/unistd-safer.h: Update.
4178         * gnulib/import/unistd.in.h: Update.
4179         * gnulib/import/unsetenv.c: Update.
4180         * gnulib/import/verify.h: Update.
4181         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4182         * gnulib/import/wchar.in.h: Update.
4183         * gnulib/import/wctype.in.h: Update.
4184         * gnulib/import/xalloc-oversized.h: Update.
4185         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4186         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4187
4188 2018-08-16  Gary Benson <gbenson@redhat.com>
4189
4190         PR gdb/13000:
4191         * gdb/main.c (captured_main_1): Exit with nonzero status
4192         in batch mode if the last command to be executed failed.
4193         * NEWS: Mention the above.
4194
4195 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4196
4197         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4198         end of warning message.
4199
4200 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4201
4202         PR gdb/22943:
4203         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4204         (aarch64_extract_return_value): Use
4205         aapcs_is_vfp_call_or_return_candidate.
4206         (aarch64_return_in_memory): Likewise.
4207         (aarch64_store_return_value): Likewise.
4208
4209 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4210
4211         * aarch64-tdep.c
4212         (aapcs_is_vfp_call_or_return_candidate): Make static
4213         (pass_in_v_or_stack): Remove function.
4214         (pass_in_v_vfp_candidate): New function.
4215         (aarch64_push_dummy_call): Check for float register candidates.
4216
4217 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4218
4219         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4220         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4221         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4222
4223 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4224
4225         PR build/23399
4226         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4227         (struct ipa_sym_addresses): Rename to...
4228         (struct ipa_sym_addresses_common): ... this.
4229         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4230
4231 2018-08-28  Tom Tromey  <tom@tromey.com>
4232
4233         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4234         (token_fifo): Now a std::vector.
4235         (yylex, c_parse): Update.
4236         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4237         (token_fifo): Now a std::vector.
4238         (yylex, d_parse): Update.
4239         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4240         (token_fifo): Now a std::vector.
4241         (yylex, go_parse): Update.
4242
4243 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4244
4245         * parser-defs.h (struct type_stack) <elements>: Change type to
4246         std::vector<union type_stack_elt>.
4247         <depth, size>: Remove.
4248         * parse.c (parse_exp_in_context_1): Adjust.
4249         (type_stack_reserve): Remove.
4250         (check_type_stack_depth): Remove.
4251         (insert_into_type_stack): Adjust to std::vector.
4252         (insert_type): Likewise.
4253         (push_type): Likewise.
4254         (push_type_int): Likewise.
4255         (insert_type_address_space): Likewise.
4256         (pop_type): Likewise.
4257         (pop_type_int): Likewise.
4258         (pop_typelist): Likewise.
4259         (pop_type_stack): Likewise.
4260         (append_type_stack): Likewise.
4261         (push_type_stack): Likewise.
4262         (get_type_stack): Likewise.
4263         (type_stack_cleanup): Likewise.
4264         (push_typelist): Likewise.
4265         (follow_types): Likewise.
4266         (_initialize_parse): Likewise.
4267
4268 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4269
4270         * NEWS: Mention csky target.
4271
4272 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4273             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4274             Don Breazeal  <donb@codesourcery.com>
4275
4276         * csky-linux-tdep.c: New file.
4277         * csky-tdep.c: Likewise.
4278         * csky-tdep.h: Likewise.
4279         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4280         csky-tdep.o.
4281         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4282         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4283         * configure.tgt: Add csky support.
4284
4285 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4286
4287         * python/py-framefilter.c (py_print_frame): Print frame architecture
4288         when printing on an MI output.
4289
4290 2018-08-27  Tom Tromey  <tom@tromey.com>
4291
4292         PR build/23087:
4293         * configure: Rebuild.
4294         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4295
4296 2018-08-27  Tom Tromey  <tom@tromey.com>
4297
4298         * aarch64-linux-tdep.c
4299         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4300         casts to int.
4301
4302 2018-08-27  Tom Tromey  <tom@tromey.com>
4303
4304         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4305         unsigned.
4306         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4307         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4308         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4309         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4310         unsigned.
4311
4312 2018-08-27  Tom Tromey  <tom@tromey.com>
4313
4314         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4315         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4316
4317 2018-08-27  Tom Tromey  <tom@tromey.com>
4318
4319         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4320         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4321         ULONGEST_MAX.
4322         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4323         ULONGEST_MAX.
4324         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4325         ULONGEST_MAX.
4326         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4327         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4328         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4329         ULONGEST_MAX.
4330         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4331         (ppc64_linux_sigaction_tramp_frame)
4332         (ppc32_linux_sighandler_tramp_frame)
4333         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4334         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4335         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4336         * mn10300-linux-tdep.c (am33_linux_sigframe)
4337         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4338         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4339         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4340         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4341         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4342         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4343         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4344         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4345         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4346         * microblaze-linux-tdep.c
4347         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4348         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4349         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4350         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4351         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4352         * common/common-types.h (ULONGEST_MAX): New define.
4353         (CORE_ADDR_MAX): Fix formatting.
4354         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4355         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4356         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4357         (arm_linux_rt_sigreturn_tramp_frame)
4358         (arm_eabi_linux_sigreturn_tramp_frame)
4359         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4360         (thumb2_eabi_linux_sigreturn_tramp_frame)
4361         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4362         (arm_linux_restart_syscall_tramp_frame)
4363         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4364         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4365         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4366         ULONGEST_MAX.
4367         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4368
4369 2018-08-27  Tom Tromey  <tom@tromey.com>
4370
4371         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4372         CORE_ADDR_MAX.
4373         * mips-tdep.c (mips_deal_with_atomic_sequence)
4374         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4375         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4376         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4377         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4378         CORE_ADDR_MAX.
4379         * aarch64-tdep.c (aarch64_software_single_step): Use
4380         CORE_ADDR_MAX.
4381
4382 2018-08-27  Tom Tromey  <tom@tromey.com>
4383
4384         * linespec.c (complete_linespec_component): Add cast to "char".
4385         * completer.c (completion_tracker::build_completion_result): Add
4386         cast to "char".
4387
4388 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4389
4390         * solist.h (struct solist, struct target_so_ops): Fix
4391         indentation.
4392
4393 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4394
4395         * ada-tasks.c (ada_task_info_s): Remove typedef.
4396         (DEF_VEC_O(ada_task_info_s)): Remove.
4397         (struct ada_tasks_inferior_data): Initialize fields.
4398         <task_list>: Make an std::vector.
4399         (get_ada_tasks_inferior_data): Allocate with new.
4400         (ada_get_task_number): Adjust.
4401         (get_task_number_from_id): Likewise.
4402         (valid_task_id): Likewise.
4403         (ada_get_task_info_from_ptid): Likewise.
4404         (iterate_over_live_ada_tasks): Likewise.
4405         (add_ada_task): Likewise.
4406         (read_known_tasks): Likewise.
4407         (ada_build_task_list): Likewise.
4408         (print_ada_task_info): Likewise.
4409         (info_task): Likewise.
4410         (task_command_1): Likewise.
4411
4412 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4413
4414         * ada-lang.c (add_angle_brackets): Return std::string.
4415
4416 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
4417
4418         * python/py-threadevent.c (py_get_event_thread): Initialize
4419         pythread.
4420
4421 2018-08-24  Pedro Alves  <palves@redhat.com>
4422
4423         * python/py-bpevent.c (create_breakpoint_event_object): Use
4424         copy-initialization.
4425         * python/py-continueevent.c (emit_continue_event): Use
4426         copy-initialization.
4427         * python/py-exitedevent.c (create_exited_event_object): Return a
4428         gdbpy_ref<>.
4429         (emit_exited_event): Use copy-initialization.
4430         * python/py-inferior.c (python_new_inferior)
4431         (python_inferior_deleted, add_thread_object): Use
4432         copy-initialization.
4433         * python/py-infevents.c (create_inferior_call_event_object)
4434         (create_register_changed_event_object)
4435         (create_memory_changed_event_object): Return a gdbpy_ref<>.
4436         (emit_inferior_call_event, emit_memory_changed_event)
4437         (emit_register_changed_event): Use copy-initialization.
4438         * python/py-newobjfileevent.c (create_new_objfile_event_object):
4439         Return a gdbpy_ref<>.
4440         (emit_new_objfile_event): Use copy-initialization.
4441         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4442         (emit_clear_objfiles_event): Use copy-initialization.
4443         * python/py-signalevent.c (create_signal_event_object): Use
4444         copy-initialization.
4445         * python/py-threadevent.c (create_thread_event_object): Use
4446         copy-initialization.
4447
4448 2018-08-24  Pedro Alves  <palves@redhat.com>
4449             Simon Marchi  <simon.marchi@ericsson.com>
4450
4451         PR gdb/23379
4452         * python/py-continueevent.c: Include "gdbthread.h".
4453         (create_continue_event_object): Add intro comment.  Add 'ptid'
4454         parameter.  Use it to find thread to pass to
4455         create_thread_event_object.
4456         (emit_continue_event): Pass PTID down to
4457         create_continue_event_object.
4458         * python/py-event.h (py_get_event_thread): Declare.
4459         (create_thread_event_object): Remove default from 'thread'
4460         parameter.
4461         * python/py-stopevent.c (create_stop_event_object): Use
4462         py_get_event_thread.
4463         * python/py-threadevent.c (get_event_thread): Rename to ...
4464         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
4465         and use it to find the thread.
4466         (create_thread_event_object): Assert that THREAD isn't null.
4467         Don't find the event thread here.
4468
4469 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
4470
4471         * block.h (blockrange, blockranges): New struct declarations.
4472         (struct block): Add new field named `ranges'.
4473         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
4474         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
4475         macros for accessing ranges in struct block.
4476         (make_blockranges): New declaration.
4477         block.c (make_blockranges): New function.
4478         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
4479         for block.
4480         * symtab.h (find_pc_partial_function): Add new parameter `block'.
4481         * blockframe.c (cache_pc_function_block): New static global.
4482         (clear_pc_function_cache): Clear cache_pc_function_block.
4483         (find_pc_partial_function): Move comment to symtab.h.  Add
4484         support for non-contiguous blocks.
4485         * cli/cli-cmds.c (block.h): Include.
4486         (print_disassembly): Handle printing of non-contiguous blocks.
4487         (disassemble_current_function): Likewise.
4488         (disassemble_command): Likewise.
4489
4490         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
4491         BLOCK_START.
4492         * blockframe.c (get_pc_function_start): Likewise.
4493         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
4494         (gcc_symbol_address): Likewise.
4495         * compile/compile-object-run.c (compile_object_run): Likewise.
4496         * compile/compile.c (get_expr_block_and_pc): Likewise.
4497         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
4498         (func_addr_to_tail_call_list): Likewise.
4499         * findvar.c (default_read_var_value): Likewise.
4500         * inline-frame.c (inline_frame_this_id): Likewise.
4501         (skip-inline_frames): Likewise.
4502         * infcmd.c (until_next_command): Likewise.
4503         * linespec.c (convert_linespec_to_sals): Likewise.
4504         * parse.c (parse_exp_in_context_1): Likewise.
4505         * printcmd.c (build_address_symbolic): likewise.
4506         (info_address_command): Likewise.
4507         symtab.c (find_function_start_sal): Likewise.
4508         (skip_prologue_sal): Likewise.
4509         (find_function_alias_target): Likewise.
4510         (find_gnu_ifunc): Likewise.
4511         * stack.c (find_frame_funname): Likewise.
4512         * symtab.c (fixup_symbol_section): Likewise.
4513         (find_function_start_sal): Likewise.
4514         (skip_prologue_sal): Likewsie.
4515         (find_function_alias_target): Likewise.
4516         (find_gnu_ifunc): Likewise.
4517         * tracepoint.c (info_scope_command): Likewise.
4518         * value.c (value_fn_field): Likewise.
4519
4520         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
4521         in place of find_pc_partial_function.
4522         * blockframe.c (find_function_entry_range_from_pc): New function.
4523         * symtab.h (find_function_entry_range_from_pc): Declare and document.
4524         * objfiles.c (objfile_relocate1): Relocate start and end addresses
4525         for each range in a block.
4526
4527
4528 2018-08-23  Xavier Roirand  <roirand@adacore.com>
4529
4530         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
4531         incrementation.
4532
4533 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4534
4535         * solib-svr4.c (read_program_headers_from_bfd): Return
4536         gdb::optional<gdb::byte_vector>.
4537         (svr4_exec_displacement): Adjust.
4538
4539 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4540
4541         * solib-svr4.c (read_program_header): Return
4542         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
4543         (find_program_interpreter): Return
4544         gdb::optional<gdb::byte_vector>.
4545         (scan_dyntag_auxv): Adjust.
4546         (enable_break): Adjust.
4547         (svr4_exec_displacement): Adjust.
4548
4549 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4550
4551         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
4552         * inf-child.c (inf_child_target::terminal_save_inferior): New.
4553
4554 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4555
4556         * guile/scm-string.c (gdbscm_scm_from_printf): Use
4557         string_vprintf.
4558         * guile/scm-utils.c (gdbscm_printf): Likewise.
4559         * serial.c (serial_printf): Likewise.
4560         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
4561
4562 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
4563
4564         * stack.c (print_frame): Print frame architecture when printing on
4565         an MI output.
4566         * NEWS: Mention new "arch" attribute in frame output.
4567
4568 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4569
4570         * arch/aarch64.h (aarch64_regnum): Update comment.
4571
4572 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4573
4574         * NEWS: Add SVE to 8.2 section.
4575
4576 2018-08-21  Pedro Alves  <palves@redhat.com>
4577
4578         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
4579         out from gdbscm_parse_function_args.
4580         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
4581         gdbscm_parse_function_args_1.
4582
4583 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
4584
4585         PR gdb/17816
4586         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
4587         operator.
4588
4589 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
4590
4591         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
4592
4593 2018-08-19  Michael Spang  <spang@google.com>
4594
4595         PR gdb/11786
4596         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
4597         for PT_TLS segments.
4598
4599 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
4600
4601         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
4602         dwarf_variable_value.
4603         * dwarf2-frame.c (class dwarf_expr_executor):
4604         Add override for dwarf_variable_value.
4605         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
4606         (class symbol_needs_eval_context): Likewise.
4607         (indirect_synthetic_pointer): Add forward declaration.
4608         (sect_variable_value): New function.
4609         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
4610         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
4611         for DW_OP_GNU_variable_value.
4612
4613 2018-08-16  Tom Tromey  <tom@tromey.com>
4614
4615         * top.c (read_command_file): Update.
4616         (command_line_input): Remove "repeat" argument.
4617         * ada-lang.c (get_selections): Update.
4618         * linespec.c (decode_line_2): Update.
4619         * defs.h (command_line_input): Remove argument.
4620         * cli/cli-script.c (read_next_line): Update.
4621         * python/py-gdb-readline.c: Update.
4622
4623 2018-08-17  Tom Tromey  <tom@tromey.com>
4624
4625         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
4626         command_line_input.
4627
4628 2018-08-15  Tom Tromey  <tom@tromey.com>
4629
4630         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
4631
4632 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
4633
4634         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
4635         If used, use find_pc_partial_function to find address range
4636         to disassemble.
4637         * mi/mi-main.c (mi_cmd_list_features): Report
4638         "data-disassemble-a-option" feature.
4639         * NEWS: Mention new -data-disassemble option -a.
4640
4641 2018-08-13  Tom Tromey  <tom@tromey.com>
4642
4643         * common/common-defs.h (_FORTIFY_SOURCE): Define.
4644
4645 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4646
4647         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
4648         (aarch64_linux_collect_sve_regset): Likewise.
4649         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
4650         * regcache.h (regcache_map_entry_size): New function.
4651
4652 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4653
4654         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
4655         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
4656         (SVE_HEADER_VL_LENGTH): Likewise.
4657         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
4658         (SVE_HEADER_FLAGS_LENGTH): Likewise.
4659         (SVE_HEADER_RESERVED_LENGTH): Likewise.
4660         (SVE_HEADER_SIZE_OFFSET): Likewise.
4661         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
4662         (SVE_HEADER_VL_OFFSET): Likewise.
4663         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
4664         (SVE_HEADER_FLAGS_OFFSET): Likewise.
4665         (SVE_HEADER_RESERVED_OFFSET): Likewise.
4666         (SVE_HEADER_SIZE): Likewise.
4667         (aarch64_linux_core_read_vq): Add function.
4668         (aarch64_linux_core_read_description): Check for SVE section.
4669
4670 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4671
4672         * aarch64-fbsd-tdep.c
4673         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
4674         collect_size.
4675         * aarch64-linux-tdep.c
4676         (aarch64_linux_iterate_over_regset_sections): Likewise.
4677         * alpha-linux-tdep.c
4678         (alpha_linux_iterate_over_regset_sections):
4679         * alpha-nbsd-tdep.c
4680         (alphanbsd_iterate_over_regset_sections): Likewise.
4681         * amd64-fbsd-tdep.c
4682         (amd64fbsd_iterate_over_regset_sections): Likewise.
4683         * amd64-linux-tdep.c
4684         (amd64_linux_iterate_over_regset_sections): Likewise.
4685         * arm-bsd-tdep.c
4686         (armbsd_iterate_over_regset_sections): Likewise.
4687         * arm-fbsd-tdep.c
4688         (arm_fbsd_iterate_over_regset_sections): Likewise.
4689         * arm-linux-tdep.c
4690         (arm_linux_iterate_over_regset_sections): Likewise.
4691         * corelow.c (get_core_registers_cb): Likewise.
4692         (core_target::fetch_registers): Likewise.
4693         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
4694         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
4695         * gdbarch.h (void): Regenerate.
4696         * gdbarch.sh: Add supply_size and collect_size.
4697         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
4698         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
4699         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
4700         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
4701         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
4702         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
4703         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
4704         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
4705         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
4706         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
4707         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
4708         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
4709         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
4710         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
4711         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
4712         Likewise.
4713         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
4714         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
4715         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
4716         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
4717         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
4718         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
4719         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
4720         Likewise.
4721         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
4722         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4723         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4724         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4725         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4726         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4727         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4728         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4729
4730 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
4731
4732         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4733         with string_printf.
4734
4735 2018-08-10  Keith Seitz  <keiths@redhat.com>
4736
4737         * compile/compile-c-support.c (add_code_header, add_code_footer):
4738         Move into policy class.
4739         (c_push_user_expression, pop_user_expression_nop)
4740         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4741         (compile_program): New host class.
4742         (c_compile_program): New typedef.
4743         (c_compute_porgram): Use c_compile_program.
4744
4745 2018-08-10  Keith Seitz  <keiths@redhat.com>
4746
4747         * compile/compile-internal.h (compile_instance::~compile_instance):
4748         Remove calls to htab_delete.
4749         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4750         * compile.c (compile_instance::compile_instance): Initialize
4751         htab unique pointers.
4752         (compile_instance::get_cached_type, compile_instance::insert_type)
4753         (compile_instance::error_symbol_once): Update for unique_ptr.
4754
4755 2018-08-10  Keith Seitz  <keiths@redhat.com>
4756
4757         * compile/compile-c-symbols.c (struct symbol_error)
4758         (hash_symbol_error, eq_symbol_error, del_symbol_error)
4759         (compile_instance::insert_symbol_error)
4760         (compile_instance::error_symbol_once): Move to ...
4761         * compile/compile.c: ... here.
4762
4763 2018-08-10  Keith Seitz  <keiths@redhat.com>
4764
4765         * compile/compile-c-support.c (c_get_compile_context): Use `new'
4766         instead of `new_compile_instance'.
4767         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4768         Update description.
4769         If the symbol error map is not initialized, create it.
4770         (generate_c_for_for_one_symbol): Do not check/initialize
4771         the symbol error map.
4772         * compile/compile-c-types.c (compile_c_instance): Make a class.
4773         Update all callers.
4774         (compile_instance::compile_instance): Initialize the type cache.
4775         (get_cached_type): New function.
4776         (insert_type): Update description.
4777         (compile_c_instance::m_default_cflags): Define.
4778         (convert_type): Update description.  Use get_cached_type.
4779         (delete_instance): Moved to destructor.
4780         (new_compile_instance): Moved to constructor.
4781         * compile/compile-c.h (compile_c_instance): Make class inheriting
4782         from compile_instance.
4783         <base>: Remove field.
4784         <type_map, symbol_err_map>: Move to base class.
4785         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4786         * compile/compile-internal.h (compile_instance): Make class.
4787         <type_map_t, symbol_err_map_t>: Define.
4788         <fe>: Rename to `m_gcc_fe'.
4789         <scope, block, gcc_target_options>: Add `m_' prefix.
4790         <m_type_map, m_symbol_err_map>: New fields, moved from
4791         compile_c_instance.
4792         <destroy>: Remove.
4793         (convert_type, new_compile_instance): Remove.
4794         * compile/compile.c (cleanup_compile_instance): Remove.
4795         (compile_to_object): Use unique_ptr to eliminate cleanups.
4796         (compile_instance::set_print_callback, compile_instance::version)
4797         (compile_instance::set_verbose)
4798         (compile_instance::set_driver_filename)
4799         (compile_instance::set_triplet_regexp)
4800         (compile_instance::set_arguments)
4801         (compile_instance::set_source_file)
4802         (compile_instance::compile): Define.
4803
4804 2018-08-10  Keith Seitz  <keiths@redhat.com>
4805
4806         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4807         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4808         gcc-c-fe.def to define C plugin.
4809         (delete_instance): Delete `c_plugin'.
4810         (new_compile_instance): Initialize `c_plugin'.
4811         * compile/compile-c.h: Include gcc_c_plugin.h.
4812         (struct compile_c_instance) <c_plugin>: New member.
4813         * gcc-c-plugin.h: New file.
4814         Update all callers with API change.
4815
4816 2018-08-10  Keith Seitz  <keiths@redhat.com>
4817
4818         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4819         (HFILES_NO_SRCDIR): ... to here.
4820         Add compile-internal.h and compile-c.h.
4821         * compile/compile-c-support.c: Include compile-c.h.
4822         * compile/compile-c-symbols.c: Include compile-c.h.
4823         (generate_c_for_variable_locations): Update comment.
4824         * compile/compile-c-types.c: Include compile-c.h.
4825         * compile/compile-c.h: New file -- moved C language declarations
4826         from other files here.
4827         * compile/compile-internal.h: Do not include hashtab.h or
4828         common/enum-flags.h.
4829         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4830         (gcc_convert_symbol, gcc_symbol_address)
4831         (generate_c_for_variable_locations, c_get_mode_for_size)
4832         (c_get_range_decl_name): Definitions moved to compile-c.h.
4833         * compile/compile-loc2c.c: Include compile-c.h.
4834
4835 2018-08-10  Keith Seitz  <keiths@redhat.com>
4836
4837         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4838         (c_symbol_substitution_name): ... this.
4839         Update all callers.
4840
4841 2018-08-10  Keith Seitz  <keiths@redhat.com>
4842
4843         * compile/compile-c-support.c (c_compute_program): Use
4844         unique_xmalloc_ptr to eliminate cleanup.
4845         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4846         Return a unique_xmalloc_ptr and eliminate cleanup.
4847         * compile/compile-internal.h (generate_c_for_variable_locations):
4848         Return unique_xmalloc_ptr and update description.
4849
4850 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4851
4852         * corelow.c (core_target::get_core_register_section): Rename
4853         min_size to section_min_size.
4854
4855 2018-08-09  Jim Wilson  <jimw@sifive.com>
4856
4857         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4858         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4859         * NEWS: Mention new GNU/Linux RISC-V target.
4860         * configure.host: Add riscv*-*-linux*.
4861         * configure.nat: Add riscv*.
4862         * configure.tgt: Add riscv*-*-linux*.
4863         * riscv-linux-nat.c: New file.
4864         * riscv-linux-tdep.c: New file.
4865
4866 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4867
4868         * infrun.c (resume): Make static, add forward declaration.
4869         (proceed): Update header comment.
4870         * infrun.h (resume): Delete declaration.
4871
4872 2018-08-09  Tom Tromey  <tom@tromey.com>
4873
4874         * riscv-tdep.h: Minor formatting fixes.
4875
4876 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4877
4878         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4879         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4880         (test_mkdir_recursive): Likewise.
4881         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4882
4883 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4884
4885         * valarith.c (value_subscripted_rvalue): If an array is not in
4886         memory, and we don't know the upper bound, then we can't know that
4887         the requested element exists or not.
4888
4889 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4890
4891         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4892         (target_options_to_string): Add comment.
4893
4894 2018-08-08  Tom Tromey  <tom@tromey.com>
4895
4896         * unittests/scoped_mmap-selftests.c: Check result of "write".
4897
4898 2018-08-08  Jim Wilson  <jimw@sifive.com>
4899
4900         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4901         (decode_register_index_short): New.
4902         (decode_j_type_insn, decode_cj_type_insn): New.
4903         (decode_b_type_insn, decode_cb_type_insn): New.
4904         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4905         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4906         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4907         is_c_sw_insn instead of is_sw_insn.
4908         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4909         (riscv_software_single_step): New.
4910         * riscv-tdep.h (riscv_software_single_step): Declare.
4911
4912         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4913         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4914
4915 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4916
4917         PR gdb/18050:
4918         * target.c (dispose_inferior): Don't dispose of inferiors that are
4919         already killed.
4920
4921 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4922
4923         * remote.c (remote_target::download_tracepoint): Change char* to
4924         const char*.
4925
4926 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4927
4928         * target.h (target_options_to_string): Return an std::string.
4929         * target.c (str_comma_list_concat_elem): Return void, use
4930         std::string.
4931         (do_option): Likewise.
4932         (target_options_to_string): Return an std::string.
4933         * linux-nat.c (linux_nat_target::wait): Adjust.
4934         * target-debug.h (target_debug_print_options): Adjust.
4935
4936 2018-08-07  Tom Tromey  <tom@tromey.com>
4937
4938         * Makefile.in (CPPFLAGS): New variable.
4939         (INTERNAL_CPPFLAGS): Use it.
4940
4941 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4942
4943         * NEWS: Mention the index cache.
4944
4945 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4946
4947         * common/pathstuff.h (get_standard_cache_dir): New.
4948         * common/pathstuff.c (get_standard_cache_dir): New.
4949         * build-id.h (build_id_to_string): New.
4950         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4951         DEBUG_STR_SUFFIX): Move to here.
4952         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4953         DEBUG_STR_SUFFIX): Move from there.
4954         (write_psymtabs_to_index): Make non-static, add basename
4955         parameter.  Write to temporary files, rename when done.
4956         (save_gdb_index_command): Adjust call to
4957         write_psymtabs_to_index.
4958         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4959         field.
4960         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4961         (get_gdb_index_contents_from_cache): New.
4962         (get_gdb_index_contents_from_cache_dwz): New.
4963         (dwarf2_initialize_objfile): Read index from cache.
4964         (dwarf2_build_psymtabs): Save to index.
4965         * dwarf-index-cache.h: New file.
4966         * dwarf-index-cache.c: New file.
4967         * dwarf-index-write.h: New file.
4968
4969 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4970
4971         * gnulib/aclocal.m4: Re-generate.
4972         * gnulib/config.in: Re-generate.
4973         * gnulib/configure: Re-generate.
4974         * gnulib/import/Makefile.am: Re-generate.
4975         * gnulib/import/Makefile.in: Re-generate.
4976         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4977         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4978         * gnulib/import/m4/mkdir.m4: New file.
4979         * gnulib/import/mkdir.c: New file.
4980         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4981         module.
4982
4983 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4984
4985         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4986         * common/scoped_mmap.c: New file.
4987         * common/scoped_mmap.h (destroy): New method.
4988         (~scoped_mmap, reset): Use destroy.
4989         (scoped_mmap): New move constructor.
4990         (mmap_file): New declaration.
4991         * unittests/scoped_mmap-selftests.c (test_normal,
4992         test_invalid_filename, run_tests): New functions.
4993         (_initialize_scoped_mmap_selftests): Register selftest.
4994
4995 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4996
4997         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4998         (read_gdb_index_from_buffer): ... this.  Remove section
4999         parameter, add buffer parameter.
5000         (get_gdb_index_contents_ftype,
5001         get_gdb_index_contents_dwz_ftype): New typedefs.
5002         (dwarf2_read_gdb_index): Add callback parameters to get the
5003         index contents.
5004         (get_gdb_index_contents_from_section): New.
5005         (dwarf2_initialize_objfile): Update call to
5006         dwarf2_read_gdb_index.
5007
5008 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5009
5010         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5011         (gdb_open_cloexec): Likewise.
5012         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5013         (commandline_from_pid): Likewise.
5014         (linux_xfer_osdata_threads): Likewise.
5015         (linux_xfer_osdata_fds): Likewise.
5016         * ada-lang.c (is_package_name): Likewise.
5017         * auxv.c (procfs_xfer_auxv): Likewise.
5018         * breakpoint.c (print_one_breakpoint_location): Use
5019         uiout::field_fmt.
5020         (print_one_catch_solib): Use string_printf.
5021         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5022         (add_pe_forwarded_sym): Likewise.
5023         * dwarf2read.c (create_type_unit_group): Likewise.
5024         (build_error_marker_type): Likewise.
5025         * infcall.c (get_function_name): Likewise.
5026         * valprint.c (print_converted_chars_to_obstack): Likewise.
5027         * xtensa-tdep.c (xtensa_register_type): Likewise.
5028
5029 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5030
5031         * remote.c (remote_target::download_tracepoint): Fix format
5032         string errors.
5033
5034 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5035
5036         * tracefile.c: Include common/byte-vector.h.
5037         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5038         with trace_regblock_size if needed.  Update uses of buf.
5039
5040 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5041
5042         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5043         std::vector<unsigned char>.
5044         * tracepoint.c (collection_list::collection_list): Remove
5045         m_regs_mask initializer from initializer list.  Resize
5046         m_regs_mask using the largest remote register number.
5047         (collection_list::add_remote_register): Remove size check on
5048         m_regs_mask.  Use at to access element.
5049         (collection_list::stringify): Change type of temp_buf to
5050         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5051         stringify the register mask.  Use pack_hex_byte for the register
5052         mask.
5053
5054 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5055
5056         * tracepoint.h (class collection_list) <add_register>: Remove.
5057         <add_remote_register, add_ax_registers, add_local_register>:
5058         Declare.
5059         <add_memrange>: Add scope parameter.
5060         * tracepoint.c (encode_actions_1): Likewise.
5061         (collection_list::add_register): Rename to ...
5062         (collection_list::add_remote_register): ... this.  Update
5063         comment.
5064         (collection_list::add_ax_registers, add_local_register): New
5065         methods.
5066         (collection_list::add_memrange): Add scope parameter.  Call
5067         add_local_register instead of add_register.
5068         (finalize_tracepoint_aexpr): New function.
5069         (collection_list::collect_symbol): Update calls to add_memrange.
5070         Call add_local_register instead of add_register.  Call
5071         add_ax_registers.  Call finalize_tracepoint_aexpr.
5072         (encode_actions_1): Get remote regnos for $reg action.  Call
5073         add_remote_register, add_ax_registers, and add_local_register.
5074         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5075         (validate_actionline): Call finalize_tracepoint_aexpr.
5076
5077 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5078
5079         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5080         Replace array buf with gdb::char_vector buf, of size
5081         get_remote_packet_size ().  Replace references to buf and
5082         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5083         and xsnprintf with snprintf.  Raise errors if the buffer is too
5084         small.
5085
5086 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5087
5088         * remote.c (remote_target::download_tracepoint): Fix the has_more
5089         predicate in the QTDP action list iteration.
5090
5091 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5092
5093         * remote.c (remote_target::download_tracepoint): Fix indentation
5094         in for block.
5095
5096 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5097
5098         * proc-api.c (_initialize_proc_api): Remove c, unused.
5099         * procfs.c (procfs_init_inferior): Remove signals, unused.
5100         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5101         unused.
5102
5103 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5104             Andrew Burgess  <andrew.burgess@embecosm.com>
5105
5106         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5107         'W_STOPCODE (0)' as this could be ambiguous.
5108
5109 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5110
5111         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5112         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5113         "ai_socktype").
5114
5115 2018-08-02  Tom Tromey  <tom@tromey.com>
5116
5117         PR symtab/16842.
5118         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5119         symbols.
5120         (process_structure_scope): Likewise.
5121
5122 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5123
5124         PR gdb/22629:
5125         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5126         kill inferior.
5127
5128 2018-08-02  Tom Tromey  <tom@tromey.com>
5129
5130         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5131         (darwin_suspend_inferior, darwin_resume_inferior)
5132         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5133         (darwin_check_new_threads): Check result of get_darwin_inferior.
5134
5135 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5136
5137         GDB 8.1.1 released.
5138
5139 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5140
5141         * varobj.c (varobj_get_path_expr_parent): Report an error if
5142         parent is a dynamic varobj.
5143
5144 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5145
5146         * gnulib/aclocal.m4: Re-generate.
5147         * gnulib/config.in: Re-generate.
5148         * gnulib/configure: Re-generate.
5149         * gnulib/import/Makefile.in: Re-generate.
5150         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5151         * gnulib/import/m4/onceonly.m4: Re-generate.
5152
5153 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5154
5155         * target-descriptions.c (struct xml_test_tdesc): New.
5156         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5157         (record_xml_tdesc): Update.
5158         (maintenance_check_xml_descriptions): Update.
5159         * target-descriptions.h (record_xml_tdesc): Update comment.
5160
5161 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5162
5163         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5164         checking array bounds are defined.
5165
5166 2018-07-30  Tom Tromey  <tom@tromey.com>
5167
5168         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5169         irreflexivity violation.
5170
5171 2018-07-30  Tom Tromey  <tom@tromey.com>
5172
5173         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5174         * value.c (unpack_long): Remove lint code.
5175         * valops.c (value_ind): Remove lint code.
5176         * valarith.c (value_x_binop, value_x_unop, value_equal)
5177         (value_pos): Remove lint code.
5178
5179 2018-07-28  Tom de Vries  <tdevries@suse.de>
5180
5181         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5182         with undefined upper bound as <optimized out>.
5183
5184 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5185
5186         * gcore.in: Rename variable "name" to "prefix".  Expand
5187         "usage" text.
5188
5189 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5190
5191         * windows-nat.c (windows_nat_target::create_inferior): Update to
5192         call close() in global namespace.
5193
5194 2018-07-26  Tom Tromey  <tom@tromey.com>
5195
5196         * dwarf-index-write.c (add_address_entry): Don't add objfile
5197         offsets.
5198         * dbxread.c (find_stab_function): Rename from
5199         find_stab_function_addr.  Return a bound_minimal_symbol.
5200         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5201         Don't add objfile offsets.
5202         (end_psymtab): Use raw_text_low, raw_text_high,
5203         MSYMBOL_VALUE_RAW_ADDRESS.
5204         (read_ofile_symtab): Update.
5205         (process_one_symbol): Update.
5206         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5207         offsets.
5208         (dw2_relocate): Remove.
5209         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5210         searching addrmap.
5211         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5212         Update.
5213         (process_psymtab_comp_unit_reader, add_partial_symbol)
5214         (add_partial_subprogram, dwarf2_ranges_read): Update.
5215         (load_partial_dies): Update.
5216         (add_address_entry): Don't add objfile offsets.
5217         (dwarf2_build_include_psymtabs): Update.
5218         (create_addrmap_from_aranges): Don't add objfile offsets.
5219         (dw2_find_pc_sect_compunit_symtab): Update.
5220         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5221         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5222         Update.
5223         (parse_partial_symbols): Don't add objfile offsets.  Use
5224         raw_text_low, raw_text_high.  Update.
5225         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5226         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5227         or call 'relocate' quick function.  Clear psymbol_map.
5228         * psympriv.h (struct partial_symbol) <address>: Add section
5229         offset.
5230         <set_unrelocated_address>: Rename from set_address.
5231         <raw_text_low, raw_text_high>: New methods.
5232         <text_low, text_high>: Add objfile parameter.
5233         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5234         set_unrelocated_address.
5235         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5236         (find_pc_psymbol): Update.
5237         (fixup_psymbol_section, relocate_psymtabs): Remove.
5238         (dump_psymtab, psym_functions): Update.
5239         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5240         parameter.
5241         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5242         (start_psymtab_common): Update.
5243         * symfile-debug.c (debug_qf_relocate): Remove.
5244         (debug_sym_quick_functions): Update.
5245         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5246         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5247         Update.
5248
5249 2018-07-26  Tom Tromey  <tromey@redhat.com>
5250
5251         * dbxread.c (end_psymtab): Use text_high_valid and
5252         text_low_valid.
5253         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5254         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5255         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5256         Update comment.
5257         <text_low_valid, text_high_valid>: New fields.
5258         <set_text_low, set_text_high>: Update.
5259         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5260
5261 2018-07-26  Tom Tromey  <tom@tromey.com>
5262
5263         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5264         Update.
5265         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5266         textlow and texthigh fields.
5267         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5268         Update.
5269         * mdebugread.c (parse_lines, parse_partial_symbols)
5270         (psymtab_to_symtab_1): Update.
5271         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5272         Rename fields.  Update comment.  Now private.
5273         <text_low, text_high, set_text_low, set_text_high>: New methods.
5274         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5275         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5276         (start_psymtab_common, maintenance_info_psymtabs)
5277         (maintenance_check_psymtabs): Update.
5278         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5279         texthigh fields.
5280         (scan_xcoff_symtab): Update.
5281
5282 2018-07-26  Tom Tromey  <tromey@redhat.com>
5283
5284         * psympriv.h (struct partial_symbol) <unrelocated_address,
5285         address, set_address>: New methods.
5286         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5287         (fixup_psymbol_section, relocate_psymtabs): Update.
5288         (print_partial_symbols): Add 'objfile' parameter.  Update.
5289         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5290         Update.
5291
5292 2018-07-26  Tom Tromey  <tom@tromey.com>
5293
5294         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5295         (debug_names::write_psymbols): Update.
5296         * psympriv.h (struct partial_symbol): Derive from
5297         general_symbol_info.
5298         <obj_section>: New method.
5299         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5300         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5301         (find_pc_sect_psymbol, fixup_psymbol_section)
5302         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5303         (print_partial_symbols, recursively_search_psymtabs)
5304         (compare_psymbols, psymbol_hash, psymbol_compare)
5305         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5306         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5307
5308 2018-07-26  Tom Tromey  <tromey@redhat.com>
5309
5310         * dbxread.c (end_psymtab): Remove dead code.
5311
5312 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5313
5314         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5315         DWARF unwinders are disabled.
5316         * dwarf2-frame.c: Add dwarf2read.h include.
5317         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5318         disabled.
5319         (dwarf2_frame_unwinders_enabled_p): Define.
5320         (show_dwarf_unwinders_enabled_p): New function.
5321         (_initialize_dwarf2_frame): Register switch to control DWARF
5322         unwinder use.
5323         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5324         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5325         (show_dwarf_cmdlist): Remove static keyword.
5326         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5327         (show_dwarf_cmdlist): Declare.
5328         * NEWS: Document new feature.
5329
5330 2018-07-26  Tom de Vries  <tdevries@suse.de>
5331
5332         PR breakpoints/23366
5333         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5334
5335 2018-07-26  Tom de Vries  <tdevries@suse.de>
5336
5337         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5338         DW_AT_count can't be translated to a dynamic prop.
5339
5340 2018-07-25  Tom de Vries  <tdevries@suse.de>
5341
5342         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5343         try/catch.
5344
5345 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5346
5347         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5348
5349 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5350
5351         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5352
5353 2018-07-24  Keith Seitz  <keiths@redhat.comt
5354
5355         PR symtab/23010
5356         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5357         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5358         instead of add_symbol_to_list.
5359         (read_file_scope): Call prepare_one_comp_unit before reading
5360         any other DIEs.
5361
5362 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5363
5364         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5365
5366 2018-07-24  Tom Tromey  <tom@tromey.com>
5367
5368         * utils.c (malloc, realloc, free): Don't declare.
5369         * configure, config.in: Rebuild.
5370         * configure.ac: Don't check for declarations of free, malloc, or
5371         realloc.
5372
5373 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5374
5375         * aarch64-linux-nat.c
5376         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5377         variable.
5378         * arm-linux-nat.c (fetch_regs): Likewise.
5379         (store_regs): Likewise.
5380         (fetch_vfp_regs): Likewise.
5381         (store_vfp_regs): Likewise.
5382         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5383         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5384         (arm_linux_nat_target::insert_watchpoint): Likewise.
5385         (arm_linux_nat_target::remove_watchpoint): Likewise.
5386         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5387         Likewise.
5388         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5389         Likewise.
5390         * ppc-linux-nat.c (fetch_register): Likewise.
5391         (fetch_all_gp_regs): Likewise.
5392         (fetch_ppc_registers): Likewise.
5393         (store_all_gp_regs): Likewise.
5394         (store_ppc_registers): Likewise.
5395         (hwdebug_insert_point): Likewise.
5396         (can_use_watchpoint_cond_accel): Likewise.
5397         * remote-sim.c (gdb_os_write_stdout): Likewise.
5398
5399 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5400             Tom Tromey  <tom@tromey.com>
5401
5402         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5403         test for it.
5404         * configure: Rebuild.
5405
5406 2018-07-22  Tom Tromey  <tom@tromey.com>
5407
5408         * regformats/regdat.sh: Define xmltarget_${name} inside
5409         #ifndef IN_PROCESS_AGENT.
5410
5411 2018-07-22  Tom Tromey  <tom@tromey.com>
5412
5413         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5414
5415 2018-07-22  Tom Tromey  <tom@tromey.com>
5416
5417         * symfile.c (reread_symbols): Notify iter, not objfile.
5418
5419 2018-07-22  Tom Tromey  <tom@tromey.com>
5420
5421         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5422         Use arch_ops.
5423         (ravenscar_thread_target::prepare_to_store): Likewise.
5424
5425 2018-07-22  Tom Tromey  <tom@tromey.com>
5426
5427         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5428         unused variable.  Call value_fetch_lazy when needed.
5429         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5430         Remove unused variable.  Call value_fetch_lazy when needed.
5431
5432 2018-07-22  Tom Tromey  <tom@tromey.com>
5433
5434         * m32c-tdep.c (mark_dma): Return void.
5435         (make_regs): Remove unused declarations.
5436
5437 2018-07-22  Tom Tromey  <tom@tromey.com>
5438
5439         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5440         cmdscm_get_valid_command_smob_arg_unsafe for effect.
5441         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5442         bkscm_get_valid_block_smob_arg_unsafe for effect.
5443
5444 2018-07-22  Tom Tromey  <tom@tromey.com>
5445
5446         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5447         value_type.
5448
5449 2018-07-22  Tom Tromey  <tom@tromey.com>
5450
5451         * windows-nat.c (saved_context): Conditionally define.
5452         * remote.c (remote_target::remote_btrace_maybe_reopen):
5453         Conditionally declare "warned".
5454         * inflow.c (sigquit_ours): Conditionally define.
5455         (new_tty): Move "tty" declaration inside #if.
5456         * guile/guile.c (guile_datadir): Conditionally define.
5457         * charset.c (set_be_le_names): Move some declarations inside #if.
5458         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
5459         #if.
5460         (parse_xml_btrace_conf): Likewise.
5461
5462 2018-07-22  Tom Tromey  <tom@tromey.com>
5463
5464         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
5465
5466 2018-07-22  Tom Tromey  <tom@tromey.com>
5467
5468         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
5469         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
5470         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
5471         * buildsym-legacy.c (get_macro_table): Remove unused variable.
5472         * stack.c (frame_apply_level_command): Remove unused variable.
5473         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
5474         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
5475         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
5476         unused variable.
5477         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
5478         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
5479         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
5480         variable.
5481         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
5482         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
5483         variable.
5484         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
5485         Remove unused variable.
5486         * cli/cli-script.c (recurse_read_control_structure): Remove unused
5487         variable.
5488         * common/tdesc.c (print_xml_feature::visit): Remove unused
5489         variable.
5490         * compile/compile-object-load.c (store_regs): Remove unused
5491         variables.
5492         * complaints.c (clear_complaints): Remove unused variable.
5493         * corelow.c (core_target_open): Remove unused variable.
5494         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
5495         variable.
5496         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
5497         variable.
5498         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
5499         variable.
5500         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
5501         variable.
5502         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
5503         variable.
5504         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
5505         variable.
5506         * ia64-tdep.c (examine_prologue): Remove unused variable.
5507         * infcall.c (run_inferior_call): Remove unused variable.
5508         * inferior.c (exit_inferior): Remove unused variable.
5509         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
5510         * linespec.c (decode_line_2): Remove unused variable.
5511         * linux-nat.c (super_close): Remove.
5512         * linux-tdep.c (linux_info_proc): Remove unused variable.
5513         * mi/mi-main.c (mi_execute_command): Remove unused variable.
5514         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
5515         Remove unused variable.
5516         * parse.c (find_minsym_type_and_address): Remove unused variable.
5517         * printcmd.c (info_symbol_command, printf_floating): Remove unused
5518         variable.
5519         * python/py-breakpoint.c (bppy_set_commands): Remove unused
5520         variable.
5521         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
5522         variables.
5523         * record-btrace.c (record_btrace_target::store_registers): Remove
5524         unused variable.
5525         (cmd_show_record_btrace_cpu): Remove unused variable.
5526         * riscv-tdep.c (riscv_register_reggroup_p)
5527         (riscv_push_dummy_call, riscv_return_value): Remove unused
5528         variable.
5529         * rust-exp.y (literal): Remove unused variable.
5530         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
5531         unused variable.
5532         <STRUCTOP_ANONYMOUS>: Likewise.
5533         * s390-linux-tdep.c (s390_linux_init_abi_31)
5534         (s390_linux_init_abi_64): Remove unused variable.
5535         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
5536         (file_select_thread, net_windows_open, _initialize_ser_windows):
5537         Remove unused variables.
5538         * symtab.c (find_pc_sect_line): Remove unused variable.
5539         * target-memory.c (compute_garbled_blocks): Remove unused
5540         variable.
5541         (target_write_memory_blocks): Remove unused variable.
5542         * target.c (target_stack::unpush): Remove unused variables.
5543         * tracepoint.c (start_tracing, all_tracepoint_actions)
5544         (merge_uploaded_trace_state_variables)
5545         (print_one_static_tracepoint_marker): Remove unused variable.
5546         * unittests/basic_string_view/element_access/char/1.cc (test01):
5547         Remove unused variable.
5548         * windows-nat.c (windows_continue, windows_add_all_dlls)
5549         (do_initial_windows_stuff, windows_nat_target::create_inferior):
5550         Remove unused variables.
5551
5552 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
5553
5554         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
5555         attr_profile in HAVE_ELF.
5556         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
5557         HAVE_ELF.
5558
5559 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
5560
5561         * frame.c (frame_register_unwind): Change parameter name.
5562         (frame_unwind_register): Likewise.
5563         (frame_unwind_register_value): Likewise.
5564         (frame_unwind_register_signed): Likewise.
5565         (frame_unwind_register_unsigned): Likewise.
5566         * frame.h (frame_register_unwind): Likewise.
5567         (frame_unwind_register): Likewise.
5568         (frame_unwind_register_value): Likewise.
5569         (frame_unwind_register_signed): Likewise.
5570         (frame_unwind_register_unsigned): Likewise.
5571         (frame_unwind_arch): Likewise.
5572
5573 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5574
5575         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
5576         ISA maintenance.
5577
5578 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5579
5580         * mips-linux-nat.c (mips_linux_nat_target::read_description):
5581         Call `get_ptrace_pid' rather than extracting the ptrace PID by
5582         hand.
5583
5584 2018-07-20  Keith Seitz  <keiths@redhat.com>
5585
5586         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
5587         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
5588         m_compunit_symtab, m_language>: Add "m_" prefix.
5589         Update all uses.
5590         * buildsym.c: Update all uses.
5591
5592 2018-07-20  Tom Tromey  <tom@tromey.com>
5593
5594         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
5595         * buildsym.h (record_line_ftype): Remove typedef.
5596
5597 2018-07-20  Tom Tromey  <tom@tromey.com>
5598
5599         * buildsym-legacy.h (augment_type_symtab): Don't declare.
5600         (end_expandable_symtab): Likewise.
5601         (end_symtab_get_static_block): Likewise.
5602         (end_symtab_from_static_block): Likewise.
5603         * buildsym-legacy.c (augment_type_symtab): Remove.
5604         (end_expandable_symtab): Remove.
5605         (end_symtab_get_static_block): Remove.
5606         (end_symtab_from_static_block): Remove.
5607
5608 2018-07-20  Tom Tromey  <tom@tromey.com>
5609
5610         * dwarf2read.c: Include buildsym.h.
5611         (struct dwarf2_cu) <builder>: New method.
5612         (fixup_go_packaging): Update.
5613         (process_full_comp_unit, process_full_type_unit): Update.  Don't
5614         use scoped_free_pendings.
5615         (using_directives): Add "cu" parameter, remove "language".
5616         (read_import_statement, setup_type_unit_groups, )
5617         (read_func_scope, read_lexical_block_scope)
5618         (dwarf2_record_block_ranges, read_namespace): Update.
5619         (lnp_state_machine::lnp_state_machine): Add cu parameter.
5620         (lnp_state_machine::handle_end_sequence): Update.
5621         (class lnp_state_machine) <m_cu>: New member.
5622         <m_record_line_callback>: Remove.
5623         <m_currently_recording_lines>: New member.
5624         (lnp_state_machine::handle_set_file): Update.
5625         (noop_record_line): Remove.
5626         (dwarf_record_line_p): Add cu parameter.
5627         (dwarf_record_line_1, dwarf_finish_line): Likewise.
5628         (lnp_state_machine::record_line)
5629         (lnp_state_machine::lnp_state_machine)
5630         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5631         (dwarf_decode_lines): Update.
5632         (dwarf2_start_subfile): Add cu parameter.
5633         (dwarf2_start_symtab, new_symbol): Update.
5634         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
5635         Remove dwarf2_per_objfile parameter.
5636         (dwarf_decode_macros): Update.
5637
5638 2018-07-20  Tom Tromey  <tom@tromey.com>
5639
5640         * stabsread.c (define_symbol): Update.
5641         * buildsym-legacy.h (get_buildsym_compunit): Declare.
5642         * dwarf2read.c (new_symbol): Update.
5643         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
5644         * cp-namespace.c: Include buildsym.h.
5645         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
5646         * buildsym-legacy.c (get_buildsym_compunit): New function.
5647
5648 2018-07-20  Tom Tromey  <tom@tromey.com>
5649
5650         * xcoffread.c: Include buildsym-legacy.h.
5651         * windows-nat.c: Include buildsym-legacy.h.
5652         * stabsread.c: Include buildsym-legacy.h.
5653         * mdebugread.c: Include buildsym-legacy.h.
5654         * buildsym-legacy.h: New file.
5655         * buildsym-legacy.c: New file, from buildsym.c.
5656         * go32-nat.c: Include buildsym-legacy.h.
5657         * dwarf2read.c: Include buildsym-legacy.h.
5658         * dbxread.c: Include buildsym-legacy.h.
5659         * cp-namespace.c: Include buildsym-legacy.h.
5660         * coffread.c: Include buildsym-legacy.h.
5661         * buildsym.h: Move some contents to buildsym-legacy.h.
5662         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
5663         buildsym-legacy.c.
5664         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
5665
5666 2018-07-20  Tom Tromey  <tom@tromey.com>
5667
5668         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
5669         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
5670         (buildsym_compunit::buildsym_compunit)
5671         (buildsym_compunit::~buildsym_compunit)
5672         (buildsym_compunit::get_macro_table): Define.
5673
5674 2018-07-20  Tom Tromey  <tom@tromey.com>
5675
5676         * buildsym.c (reset_symtab_globals): Remove.
5677         (buildsym_compunit::end_symtab_from_static_block): Update.
5678         (buildsym_compunit::augment_type_symtab): Update.
5679         (end_symtab_from_static_block): Call free_buildsym_compunit.
5680         (augment_type_symtab, end_symtab, end_expandable_symtab):
5681         Likewise.
5682
5683 2018-07-20  Tom Tromey  <tom@tromey.com>
5684
5685         * arch-utils.c: Do not include buildsym.h.
5686         * mipsread.c: Do not include buildsym.h.
5687         * machoread.c: Do not include buildsym.h.
5688         * elfread.c: Do not include buildsym.h.
5689
5690 2018-07-20  Tom Tromey  <tom@tromey.com>
5691
5692         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
5693         initialization.
5694         (buildsym_compunit): Add new constructor.
5695         (struct buildsym_compunit) <get_last_source_file, finish_block,
5696         record_block_range, start_subfile, patch_subfile_names,
5697         push_subfile, pop_subfile, record_line, get_compunit_symtab,
5698         set_last_source_start_addr, get_last_source_start_addr,
5699         get_local_using_directives, set_local_using_directives,
5700         get_global_using_directives, outermost_context_p,
5701         get_current_context_stack, get_context_stack_depth,
5702         get_current_subfile, get_local_symbols, get_file_symbols,
5703         get_global_symbols, record_debugformat, record_producer,
5704         push_context, pop_context, end_symtab_get_static_block,
5705         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
5706         New public methods.
5707         <record_pending_block, finish_block_internal, make_blockvector,
5708         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
5709         private methods.
5710         Update all users.
5711
5712 2018-05-22  Tom Tromey  <tom@tromey.com>
5713
5714         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5715         parameter.
5716         (finish_block_internal): Update.
5717
5718 2018-07-20  Tom Tromey  <tom@tromey.com>
5719
5720         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5721         parameter.
5722         (finish_block_internal): Update.
5723
5724 2018-07-20  Tom Tromey  <tom@tromey.com>
5725
5726         * buildsym.h (EXTERN): Don't define or undef.
5727         * buildsym.c (EXTERN): Don't define.
5728
5729 2018-07-20  Tom Tromey  <tom@tromey.com>
5730
5731         * buildsym.c: Remove TODO comment.
5732
5733 2018-07-20  Tom Tromey  <tom@tromey.com>
5734
5735         * coffread.c (coff_symtab_read): Update.
5736         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5737         (xcoff_new_init): Update.
5738         * mipsread.c (mipscoff_new_init): Update.
5739         * mdebugread.c (mdebug_build_psymtabs): Update.
5740         * elfread.c (elf_new_init): Update.
5741         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5742         Update.
5743         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5744         (coffstab_build_psymtabs, elfstab_build_psymtabs)
5745         (stabsect_build_psymtabs): Update.
5746         * buildsym.h (buildsym_init): Don't declare.
5747         * buildsym.c: Update comment.
5748         (prepare_for_building): Remove.
5749         (start_symtab, restart_symtab): Update.
5750         (reset_symtab_globals): Update comment.
5751         (buildsym_init): Remove.
5752
5753 2018-07-20  Tom Tromey  <tom@tromey.com>
5754
5755         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5756         * stabsread.c (patch_block_stabs, define_symbol, read_type)
5757         (read_enum_type, common_block_start, common_block_end)
5758         (cleanup_undefined_types_1, finish_global_stabs): Update.
5759         * mdebugread.c (psymtab_to_symtab_1): Update.
5760         * dwarf2read.c (fixup_go_packaging, read_func_scope)
5761         (read_lexical_block_scope, new_symbol): Update.
5762         * dbxread.c (process_one_symbol): Update.
5763         * coffread.c (coff_symtab_read, process_coff_symbol)
5764         (coff_read_enum_type): Update.
5765         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5766         declare.
5767         (get_local_symbols, get_file_symbols, get_global_symbols): New
5768         functions.
5769         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5770         m_global_symbols.
5771         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5772         (~scoped_free_pendings): Update.
5773         (finish_block, prepare_for_building, reset_symtab_globals)
5774         (end_symtab_get_static_block, end_symtab_with_blockvector)
5775         (augment_type_symtab, push_context): Update.
5776         (get_local_symbols, get_file_symbols, get_global_symbols): New
5777         functions.
5778         (buildsym_init): Update.
5779
5780 2018-07-20  Tom Tromey  <tom@tromey.com>
5781
5782         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5783         (process_full_type_unit): Likewise.
5784         (dwarf2_start_symtab): Set list_in_scope.
5785
5786 2018-07-20  Tom Tromey  <tom@tromey.com>
5787
5788         * dwarf2read.c (process_psymtab_comp_unit_reader)
5789         (build_type_psymtabs_reader): Do not set list_in_scope.
5790
5791 2018-07-20  Tom Tromey  <tom@tromey.com>
5792
5793         * buildsym.c (free_pendings): Remove.
5794         (add_symbol_to_list, scoped_free_pendings)
5795         (finish_block_internal, buildsym_init): Update.
5796
5797 2018-07-20  Tom Tromey  <tom@tromey.com>
5798
5799         * xcoffread.c (read_xcoff_symtab): Update.
5800         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5801         Update.
5802         * dbxread.c (process_one_symbol): Update.
5803         * coffread.c (coff_symtab_read): Update.
5804         * buildsym.h (finish_block): Update.
5805         * buildsym.c (finish_block): Remove "listhead" argument.
5806         (end_symtab_get_static_block): Update.
5807
5808 2018-07-20  Tom Tromey  <tom@tromey.com>
5809
5810         * buildsym.h (class scoped_free_pendings): Remove constructor.
5811         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5812         method.
5813         <m_pending_block_obstack, m_pending_blocks>: New members.
5814         (pending_block_obstack, pending_blocks): Remove.
5815         (scoped_free_pendings::scoped_free_pendings): Default.
5816         (~scoped_free_pendings): Update.
5817         (free_pending_blocks): Remove.
5818         (finish_block_internal, record_pending_block, make_blockvector)
5819         (end_symtab_get_static_block, augment_type_symtab, push_context)
5820         (buildsym_init): Update.
5821
5822 2018-07-20  Tom Tromey  <tom@tromey.com>
5823
5824         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5825         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5826         members.
5827         (pending_addrmap, pending_addrmap_obstack)
5828         (pending_addrmap_interesting): Remove.
5829         (scoped_free_pendings, record_block_range, make_blockvector)
5830         (prepare_for_building, reset_symtab_globals, buildsym_init):
5831         Update.
5832
5833 2018-07-20  Tom Tromey  <tom@tromey.com>
5834
5835         * xcoffread.c (process_linenos): Update.
5836         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5837         * mdebugread.c (psymtab_to_symtab_1): Update.
5838         * dwarf2read.c (setup_type_unit_groups)
5839         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5840         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5841         * dbxread.c (process_one_symbol): Update.
5842         * coffread.c (coff_symtab_read, enter_linenos)
5843         (process_coff_symbol): Update.
5844         * buildsym.h (current_subfile): Don't declare.
5845         (get_current_subfile): Declare.
5846         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5847         member.
5848         (start_subfile, free_buildsym_compunit, push_subfile)
5849         (prepare_for_building, start_symtab): Update.
5850         (get_current_subfile): New function.
5851
5852 2018-07-20  Tom Tromey  <tom@tromey.com>
5853
5854         * coffread.c (coff_symtab_read): Update.
5855         * xcoffread.c (read_xcoff_symtab): Update.
5856         * dwarf2read.c (new_symbol): Update.
5857         (read_func_scope, read_lexical_block_scope): Update.
5858         * dbxread.c (process_one_symbol): Update.
5859         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5860         (outermost_context_p): Remove macro.
5861         (outermost_context_p, get_current_context_stack)
5862         (get_context_stack_depth): Declare.
5863         (pop_context): Return struct context_stack.
5864         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5865         member.
5866         (context_stack_size): Remove.
5867         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5868         (prepare_for_building, end_symtab_get_static_block)
5869         (augment_type_symtab, push_context): Update.
5870         (pop_context): Return struct context_stack.
5871         (outermost_context_p, get_current_context_stack)
5872         (get_context_stack_depth): New functions.
5873         (buildsym_init): Update.
5874
5875 2018-07-20  Tom Tromey  <tom@tromey.com>
5876
5877         * rust-exp.y: Now a pure parser.  Update all rules.
5878         (%union): Move earlier.
5879         (current_parser, work_obstack): Remove globals.
5880         (rust_parser, ~rust_parser): Update.
5881         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5882         lex_character, lex_number, lex_string, lex_identifier,
5883         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5884         convert_name, convert_params_to_expression,
5885         convert_ast_to_expression, ast_basic_type, ast_operation,
5886         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5887         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5888         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5889         ast_array_type, ast_slice_type, ast_reference_type,
5890         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5891         (rust_parse): Update.
5892         (rustyyerror, rustyylex): Add parser parameter.
5893         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5894         (rust_lex_stringish_test, rust_lex_test_sequence)
5895         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5896         (rust_lex_test_push_back, rust_lex_tests): Update.
5897
5898 2018-07-19  Pedro Alves  <palves@redhat.com>
5899
5900         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5901         gdb::unique_xmalloc_ptr.
5902         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5903         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5904         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5905         copy-initialization.
5906         * guile/scm-pretty-print.c (ppscm_print_children): Use
5907         gdb::unique_xmalloc_ptr instead of cleanups.
5908         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5909         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5910         gdb::unique_xmalloc_ptr.
5911         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5912         Adjust to use gdb::unique_xmalloc_ptr.
5913         * guile/scm-utils.c (extract_arg): Adjust.
5914         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5915         gdb::unique_xmalloc_ptr instead of a cleanup.
5916
5917 2018-07-19  Tom Tromey  <tom@tromey.com>
5918
5919         * utils.c (do_value_free_to_mark)
5920         (make_cleanup_value_free_to_mark): Remove.
5921         * utils.h (make_cleanup_value_free_to_mark): Remove.
5922
5923 2018-07-19  Pedro Alves  <palves@redhat.com>
5924
5925         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5926         forwarding reference.
5927
5928 2018-07-18  Pedro Alves  <palves@redhat.com>
5929
5930         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5931         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5932         cleanup.
5933
5934 2018-07-18  Pedro Alves  <palves@redhat.com>
5935
5936         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5937         exceptions.
5938         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5939         (gdbscm_wrap): New.
5940         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5941         directly instead of a cleanup.
5942         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5943         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5944         (vlscm_binop_gdbthrow): New, factored out from ...
5945         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5946         (vlscm_rich_compare): Use gdbscm_wrap.
5947         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5948         instead of a cleanup.
5949         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5950         cleanup.
5951         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5952         Use xfree directly instead of a cleanup.
5953         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5954         Adjust to use gdbscm_wrap and scoped_value_mark.
5955         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5956         (gdbscm_value_address, gdbscm_value_dereference)
5957         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5958         scoped_value_mark.
5959         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5960         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5961         scoped_value_mark.
5962         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5963         gdbscm_wrap and scoped_value_mark.
5964         (gdbscm_value_to_string): Use xfree directly instead of a
5965         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5966         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5967         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5968         scoped_value_mark.
5969         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5970         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5971         scoped_value_mark.
5972         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5973         gdbscm_wrap.
5974
5975 2018-07-18  Tom de Vries  <tdevries@suse.de>
5976
5977         * findvar.c (default_read_var_value): Also resolve dynamic type for
5978         LOC_OPTIMIZED_OUT vars.
5979
5980 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5981
5982         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5983         decoding.
5984
5985 2018-07-17  Tom Tromey  <tom@tromey.com>
5986
5987         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5988         (compute_enum_list, pascm_set_param_value_x)
5989         (gdbscm_parameter_value): Update.
5990         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5991         (gdbscm_scm_to_host_string): Update.
5992         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5993         Update.
5994         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5995         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5996         * guile/scm-string.c (gdbscm_scm_to_string): Return
5997         unique_xmalloc_ptr.
5998         (gdbscm_scm_to_host_string): Likewise.
5999
6000 2018-07-17  Tom Tromey  <tom@tromey.com>
6001
6002         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6003         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6004         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6005         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6006         unique_xmalloc_ptr.
6007
6008 2018-07-17  Tom Tromey  <tom@tromey.com>
6009
6010         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6011         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6012         Update.
6013         * guile/scm-cmd.c (cmdscm_function): Update.
6014         * guile/scm-pretty-print.c
6015         (ppscm_print_exception_unless_memory_error): Update.
6016         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6017         Return unique_xmalloc_ptr.
6018
6019 2018-07-17  Tom Tromey  <tom@tromey.com>
6020
6021         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6022         Use string_printf.
6023
6024 2018-07-17  Jim Wilson  <jimw@sifive.com>
6025
6026         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6027         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6028         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6029         unecessary braces after EF_RISCV_RVC test.  Delete call to
6030         set_gdbarch_decr_pc_after_break.
6031
6032         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6033         RISCV_LAST_FP_REGNUM + 1.
6034         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6035
6036 2018-07-17  Tom Tromey  <tom@tromey.com>
6037
6038         * configure.ac: Remove --disable-gdbcli.
6039         * configure: Rebuild.
6040         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6041         (SUBDIR_CLI_CFLAGS): Remove.
6042         (SFILES): Use SUBDIR_CLI_SRCS.
6043         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6044
6045 2018-07-17  Tom Tromey  <tom@tromey.com>
6046
6047         PR gdb/18624:
6048         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6049
6050 2018-07-16  Jim Wilson  <jimw@sifive.com>
6051
6052         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6053
6054 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6055
6056         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6057         variable.
6058         (libunwind_frame_sniffer): Likewise.
6059         (libunwind_frame_prev_register): Likewise.
6060         (libunwind_sigtramp_frame_sniffer): Likewise.
6061         * ia64-tdep.c (ia64_access_reg): Likewise.
6062         (ia64_access_rse_reg): Likewise.
6063         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6064         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6065
6066 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6067
6068         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6069
6070 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6071
6072         * remote-sim.c (gdbsim_target::close,
6073         gdbsim_target::mourn_inferior): Remove unused variables.
6074
6075 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6076
6077         * ia64-tdep.c (ktab_buf): New global.
6078         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6079         (get_kernel_table): Adjust.
6080
6081 2018-07-16  Tom Tromey  <tom@tromey.com>
6082
6083         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6084         * dwarf2read.c (using_directives, new_symbol): Use
6085         outermost_context_p.
6086         * dbxread.c (process_one_symbol): Use outermost_context_p.
6087         * coffread.c (coff_symtab_read): Use outermost_context_p.
6088
6089 2018-07-16  Tom Tromey  <tom@tromey.com>
6090
6091         * dwarf2read.c (using_directives, read_func_scope)
6092         (read_lexical_block_scope): Update.
6093         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6094         * buildsym.h (local_using_directives, global_using_directives):
6095         Don't declare.
6096         (get_local_using_directives, set_local_using_directives)
6097         (get_global_using_directives): Declare.
6098         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6099         m_global_using_directives>: New members.
6100         (finish_block_internal, prepare_for_building)
6101         (reset_symtab_globals, end_symtab_get_static_block)
6102         (push_context): Update.
6103         (get_local_using_directives, set_local_using_directives)
6104         (get_global_using_directives): New functions.
6105         (buildsym_init): Update.
6106
6107 2018-07-16  Tom Tromey  <tom@tromey.com>
6108
6109         * xcoffread.c (xcoff_initial_scan): Don't call
6110         free_pending_blocks.
6111         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6112         * buildsym.h (class scoped_free_pendings): Add constructor.
6113         (free_pending_blocks): Don't declare.
6114         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6115         (free_pending_blocks): Now static.
6116
6117 2018-07-16  Tom Tromey  <tom@tromey.com>
6118
6119         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6120         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6121         member.
6122         (struct subfile_stack): Remove.
6123         (subfile_stack): Remove.
6124         (push_subfile, pop_subfile, buildsym_init): Update.
6125
6126 2018-07-16  Tom Tromey  <tom@tromey.com>
6127
6128         * buildsym.c (push_subfile): Use gdb_assert.
6129         (pop_subfile): Use gdb_assert.
6130
6131 2018-07-16  Tom Tromey  <tom@tromey.com>
6132
6133         * buildsym.h (merge_symbol_lists): Remove.
6134         * buildsym.c (merge_symbol_lists): Remove.
6135
6136 2018-07-16  Tom Tromey  <tom@tromey.com>
6137
6138         * stabsread.c (scan_file_globals): Update comment.
6139         * stabsread.h (scan_file_globals): Move from buildsym.h.
6140         * buildsym.h (scan_file_globals): Move to stabsread.h.
6141
6142 2018-07-16  Tom Tromey  <tom@tromey.com>
6143
6144         * xcoffread.c (xcoff_new_init): Update.
6145         * mipsread.c (mipscoff_new_init): Update.
6146         * mdebugread.c (mdebug_build_psymtabs): Update.
6147         * elfread.c (elf_new_init): Update.
6148         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6149         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6150         * buildsym.h (buildsym_new_init): Don't declare.
6151         * buildsym.c (buildsym_new_init): Remove.
6152
6153 2018-07-16  Tom Tromey  <tom@tromey.com>
6154
6155         * stabsread.h (within_function): Move from buildsym.h.
6156         * stabsread.c (start_stabs): Clear within_function.
6157         * coffread.c (coff_start_symtab): Clear within_function.
6158         * buildsym.h (within_function): Move to stabsread.h.
6159         * buildsym.c (prepare_for_building): Update.
6160
6161 2018-07-16  Tom Tromey  <tom@tromey.com>
6162
6163         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6164         * dwarf2read.c (dwarf2_start_symtab): Don't set
6165         processing_gcc_compilation.
6166         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6167
6168 2018-07-16  Tom Tromey  <tom@tromey.com>
6169
6170         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6171         (next_symbol_text_func): Move from buildsym.h.
6172         * stabsread.c (hashname): Move from buildsym.c.
6173         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6174         (next_symbol_text_func, hashname): Move to stabsread.h.
6175         * buildsym.c: Don't include bcache.h
6176         (hashname): Move to stasbread.c.
6177
6178 2018-07-16  Tom Tromey  <tom@tromey.com>
6179
6180         * buildsym.h (context_stack_size): Don't declare.
6181         * buildsym.c (context_stack_size): New global.
6182
6183 2018-07-16  Tom Tromey  <tom@tromey.com>
6184
6185         * dbxread.c (processing_acc_compilation): New global.
6186         * buildsym.h (processing_acc_compilation): Don't declare.
6187
6188 2018-07-16  Tom Tromey  <tom@tromey.com>
6189
6190         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6191         * dbxread.c (read_ofile_symtab): Update.
6192         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6193         * buildsym.h (last_source_start_addr): Remove.
6194         (set_last_source_start_addr, get_last_source_start_addr):
6195         Declare.
6196         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6197         parameter.
6198         (struct buildsym_compunit) <m_last_source_start_addr>: New
6199         member.
6200         (prepare_for_building): Remove start_addr parameter.
6201         (start_symtab, restart_symtab, end_symtab_get_static_block)
6202         (end_symtab_with_blockvector): Update.
6203         (set_last_source_start_addr, get_last_source_start_addr): New
6204         functions.
6205
6206 2018-07-16  Tom Tromey  <tom@tromey.com>
6207
6208         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6209         member.
6210         (have_line_numbers): Remove.
6211         (record_line, prepare_for_building, end_symtab_get_static_block)
6212         (augment_type_symtab): Update.
6213
6214 2018-07-16  Tom Tromey  <tom@tromey.com>
6215
6216         * buildsym.c (~buildsym_compunit): Free the macro table.
6217         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6218         methods.
6219         <m_pending_macros>: New member.
6220         (pending_macros): Remove.
6221         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6222         (reset_symtab_globals, end_symtab_get_static_block)
6223         (end_symtab_with_blockvector, augment_type_symtab)
6224         (buildsym_init): Update.
6225
6226 2018-07-16  Tom Tromey  <tom@tromey.com>
6227
6228         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6229         parameter.
6230         (buildsym_compunit::set_last_source_file): New method.
6231         <m_last_source_file>: New member.
6232         (prepare_for_building): Remove "name" parameter.
6233         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6234         (last_source_file): Remove.
6235         (set_last_source_file, get_last_source_file): Update.
6236
6237 2018-07-16  Tom Tromey  <tom@tromey.com>
6238
6239         * buildsym.c (prepare_for_building): Add assert.
6240
6241 2018-07-16  Tom Tromey  <tom@tromey.com>
6242
6243         * buildsym.c (~buildsym_compunit): Update.
6244         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6245         (start_subfile, patch_subfile_names)
6246         (end_symtab_with_blockvector): Update.
6247
6248 2018-07-16  Tom Tromey  <tom@tromey.com>
6249
6250         * buildsym.c (struct buildsym_compunit): Add constructor,
6251         destructor, initializers.
6252         (start_buildsym_compunit): Remove.
6253         (free_buildsym_compunit): Use "delete".
6254         (start_symtab, restart_symtab): Use "new".
6255
6256 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6257
6258         * symfile.c (set_objfile_default_section_offset): Remove struct
6259         keyword.
6260
6261 2018-07-14  Stafford Horne  <shorne@gmail.com>
6262
6263         * (Responsible Maintainers): Add myself as or1k maintainer.
6264
6265 2018-07-13  Tom Tromey  <tom@tromey.com>
6266
6267         * symfile.c (set_objfile_default_section_offset): Use extra braces
6268         around initializer.
6269
6270 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6271
6272         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6273         non-branching basr.
6274
6275 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6276
6277         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6278         unittests/cli-utils-selftests.c
6279         * unittests/cli-utils-selftests.c: New file.
6280
6281 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6282
6283         * NEWS: Mention new commands. Mention change to 'thread apply'.
6284
6285 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6286
6287         * thread.c (thr_try_catch_cmd): New function.
6288         (thread_apply_all_command): Handle qcs flags.
6289         (thread_apply_command): Handle qcs flags.
6290         (taas_command): New function.
6291         (tfaas_command): New function.
6292         (_initialize_thread): Update to setup the new commands 'taas
6293         and 'tfaas'. Change doc string for 'thread apply'.
6294
6295 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6296
6297         * stack.c: (trailing_outermost_frame): New function, mostly
6298         extracted from backtrace_command_1.
6299         (leading_innermost_frame): New function.
6300         (backtrace_command_1): Update to call trailing_outermost_frame.
6301         (frame_apply_command_count): New function.
6302         (frame_apply_level_command): New function.
6303         (frame_apply_all_command): New function.
6304         (frame_apply_command): New function.
6305         (faas_command): New function.
6306         (frame_cmd_list): New variable.
6307         (_initialize_stack): Update to setup the new commands 'frame apply'
6308         and 'faas'.
6309
6310 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6311
6312         * cli-utils.c (number_or_range_parser::get_number): Only handle
6313         numbers or convenience var as numbers.
6314         (parse_flags): New function.
6315         (parse_flags_qcs): New function.
6316         (number_or_range_parser::finished): Ensure parsing end is detected
6317         before end of string.
6318         * cli-utils.h (parse_flags): New function.
6319         (parse_flags_qcs): New function.
6320         (number_or_range_parser): Remove m_finished bool.
6321         (number_or_range_parser::skip_range): Set m_in_range to false.
6322
6323 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6324
6325         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6326         on Windows.
6327
6328 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6329             Jan Kratochvil  <jan.kratochvil@redhat.com>
6330             Paul Fertser  <fercerpav@gmail.com>
6331             Tsutomu Seki  <sekiriki@gmail.com>
6332             Pedro Alves  <palves@redhat.com>
6333
6334         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6335         'unittests/parse-connection-spec-selftests.c'.
6336         (COMMON_SFILES): Add 'common/netstuff.c'.
6337         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6338         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6339         * common/netstuff.c: New file.
6340         * common/netstuff.h: New file.
6341         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6342         (wait_for_connect): Update comment.  New parameter
6343         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6344         Use 'sock' directly instead of 'scb->fd'.
6345         (try_connect): New function, with code from 'net_open'.
6346         (net_open): Rewrite main loop to deal with multiple
6347         sockets/addresses.  Handle IPv6-style hostnames; implement
6348         support for IPv6 connections.
6349         * unittests/parse-connection-spec-selftests.c: New file.
6350
6351 2018-07-11  Pedro Alves  <palves@redhat.com>
6352
6353         PR gdb/23377
6354         * remote.c (remote_target::remote_detach_pid): Call
6355         set_current_process.
6356
6357 2018-07-11  Pedro Alves  <palves@redhat.com>
6358
6359         * h8300-tdep.c (h8300_gdbarch_init): Remove
6360         set_gdbarch_ecoff_reg_to_regnum calls.
6361
6362 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6363
6364         PR c++/23373
6365         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6366         offsets/sizes for static members of a class/struct.
6367
6368 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6369
6370         * target-descriptions.c (tdesc_register_bitsize): Rename.
6371         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6372         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6373         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6374
6375 2018-07-10  Tom Tromey  <tom@tromey.com>
6376
6377         * breakpoint.c (moribund_locations): Now static and a
6378         std::vector.
6379         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6380         (build_bpstat_chain, update_global_location_list)
6381         (breakpoint_retire_moribund): Update.
6382         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6383         VEC.
6384
6385 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6386
6387         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6388         (riscv_register_reggroup_p): Use new function, remove unneeded
6389         parenthesis.
6390         (riscv_push_dummy_call): Extend assert to compare against xlen or
6391         flen based on register type.
6392
6393 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6394
6395         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6396
6397 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6398
6399         * remote.c (show_hardware_watchpoint_limit): New function.
6400         (show_hardware_watchpoint_length_limit): New function.
6401         (show_hardware_breakpoint_limit): New function.
6402         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6403         where appropriate, update help text.
6404
6405 2018-07-09  Tom Tromey  <tom@tromey.com>
6406
6407         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6408         (CLIBS): Don't mention NAT_CLIBS.
6409
6410 2018-07-09  Tom Tromey  <tom@tromey.com>
6411
6412         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6413         (LIBGDB_OBS, clean mostlyclean): Update.
6414         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6415
6416 2018-07-09  Tom Tromey  <tom@tromey.com>
6417
6418         * Makefile.in (%.c: %.y): Use ECHO_YACC.
6419         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
6420         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6421
6422 2018-07-09  Tom Tromey  <tom@tromey.com>
6423
6424         * Makefile.in (ALLDEPFILES): Remove exec.c.
6425         (COMMON_OBS): Remove exec.o.
6426         (COMMON_SFILES): Add exec.c.
6427
6428 2018-07-09  Tom Tromey  <tom@tromey.com>
6429
6430         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6431
6432 2018-07-09  Tom Tromey  <tom@tromey.com>
6433
6434         * Makefile.in (clean mostlyclean): Remove stamp-version.
6435         (version.c): Depend on stamp-version.
6436         (stamp-version): New rule, from version.c rule.
6437
6438 2018-07-09  Tom Tromey  <tom@tromey.com>
6439
6440         * Makefile.in (init.c): Depend on stamp-init.
6441         (stamp-init): New rule, from init.c rule.
6442         (clean mostlyclean): Remove stamp-init.
6443
6444 2018-07-09  Tom Tromey  <tom@tromey.com>
6445
6446         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6447         SUBDIR_GCC_COMPILE_SRCS.
6448
6449 2018-07-09  Tom Tromey  <tom@tromey.com>
6450
6451         * Makefile.in (init.c): Remove some unused sed rules.
6452
6453 2018-07-09  Tom Tromey  <tom@tromey.com>
6454
6455         * Makefile.in (TSOBS): Remove.
6456         (INIT_FILES): Update.
6457         (LIBGDB_OBS): Update.
6458         (COMMON_SFILES): Add inflow.c.
6459         (SFILES): Remove inflow.c.
6460
6461 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6462
6463         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
6464
6465 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
6466
6467         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
6468         get_saveloc_name, is_signal_frame_name, step_name,
6469         init_remote_name, create_addr_space_name,
6470         destroy_addr_space_name, search_unwind_table_name,
6471         find_dyn_list_name): Constify.
6472
6473 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
6474
6475         * darwin-nat.c (darwin_pthread_kill): New function.
6476         (darwin_resume_thread): Use darwin_pthread_kill.
6477
6478 2018-07-05  Tom de Vries  <tdevries@suse.de>
6479
6480         * macroexp.c (macro_buffer) <operator=>: New member function.
6481
6482 2018-07-04  Tom Tromey  <tom@tromey.com>
6483
6484         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
6485
6486 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
6487
6488         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
6489         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
6490         * maint.c: Likewise.
6491         * top.c: Likewise.
6492
6493 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6494
6495         * NEWS: Create a new section for the next release branch.
6496         Rename the section of the current branch, now that it has
6497         been cut.
6498
6499 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6500
6501         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
6502         * version.in: Bump version to 8.2.50.DATE-git.
6503
6504 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
6505             Pedro Alves  <palves@redhat.com>
6506
6507         * linux-nat.c (linux_init_ptrace): Rename to ...
6508         (linux_init_ptrace_procfs): ... this.  Call
6509         linux_proc_init_warnings.
6510         (linux_nat_target::post_attach)
6511         (linux_nat_target::post_startup_inferior): Adjust.
6512         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
6513         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
6514
6515 2018-07-04  Tom de Vries  <tdevries@suse.de>
6516
6517         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
6518         check ...
6519         (read_comp_unit_head): ... here.
6520
6521 2018-07-03  Tom Tromey  <tom@tromey.com>
6522
6523         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
6524         (stop_tracing, tstatus_command)
6525         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
6526         (print_one_static_tracepoint_marker): Update.
6527         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
6528         std::vector.
6529         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
6530         VEC.
6531         (all_tracepoints, static_tracepoints_here): Return std::vector.
6532
6533 2018-07-03  Tom Tromey  <tom@tromey.com>
6534
6535         * common/ptid.c (ptid_equal): Remove.
6536         * common/ptid.h (ptid_equal): Don't declare.
6537         * ada-tasks.c: Update.
6538         * breakpoint.c: Update.
6539         * common/agent.c: Update.
6540         * corelow.c: Update.
6541         * darwin-nat-info.c: Update.
6542         * darwin-nat.c: Update.
6543         * dcache.c: Update.
6544         * dtrace-probe.c: Update.
6545         * dummy-frame.c: Update.
6546         * fbsd-nat.c: Update.
6547         * frame.c: Update.
6548         * gdbthread.h: Update.
6549         * gnu-nat.c: Update.
6550         * go32-nat.c: Update.
6551         * inf-loop.c: Update.
6552         * inf-ptrace.c: Update.
6553         * infcall.c: Update.
6554         * infcmd.c: Update.
6555         * inflow.c: Update.
6556         * infrun.c: Update.
6557         * linux-fork.c: Update.
6558         * linux-nat.c: Update.
6559         * linux-thread-db.c: Update.
6560         * mi/mi-cmd-var.c: Update.
6561         * mi/mi-interp.c: Update.
6562         * mi/mi-main.c: Update.
6563         * nto-procfs.c: Update.
6564         * ppc-linux-tdep.c: Update.
6565         * procfs.c: Update.
6566         * python/py-inferior.c: Update.
6567         * python/py-record-btrace.c: Update.
6568         * python/py-record.c: Update.
6569         * ravenscar-thread.c: Update.
6570         * regcache.c: Update.
6571         * remote-sim.c: Update.
6572         * remote.c: Update.
6573         * sol-thread.c: Update.
6574         * solib.c: Update.
6575         * target.c: Update.
6576         * tui/tui-stack.c: Update.
6577         * varobj.c: Update.
6578         * windows-nat.c: Update.
6579         * windows-tdep.c: Update.
6580
6581 2018-07-03  Tom Tromey  <tom@tromey.com>
6582
6583         * common/ptid.c (ptid_match): Remove.
6584         * common/ptid.h (ptid_match): Don't declare.
6585         * fbsd-nat.c: Update.
6586         * infcmd.c: Update.
6587         * infrun.c: Update.
6588         * linux-nat.c: Update.
6589         * record-btrace.c: Update.
6590         * regcache.c: Update.
6591         * remote.c: Update.
6592
6593 2018-07-03  Tom Tromey  <tom@tromey.com>
6594
6595         * common/ptid.c (ptid_tid_p): Remove.
6596         * common/ptid.h (ptid_tid_p): Don't declare.
6597         * sol-thread.c: Update.
6598
6599 2018-07-03  Tom Tromey  <tom@tromey.com>
6600
6601         * common/ptid.c (ptid_lwp_p): Remove.
6602         * common/ptid.h (ptid_lwp_p): Don't declare.
6603         * fbsd-nat.c: Update.
6604         * linux-nat.c: Update.
6605         * nat/linux-procfs.c: Update.
6606         * nat/x86-linux-dregs.c: Update.
6607         * sol-thread.c: Update.
6608
6609 2018-07-03  Tom Tromey  <tom@tromey.com>
6610
6611         * common/ptid.c (ptid_is_pid): Remove.
6612         * common/ptid.h (ptid_is_pid): Don't declare.
6613         * infrun.c: Update.
6614         * linux-nat.c: Update.
6615         * mi/mi-interp.c: Update.
6616         * remote.c: Update.
6617         * thread.c: Update.
6618
6619 2018-07-03  Tom Tromey  <tom@tromey.com>
6620
6621         * common/ptid.c (ptid_get_tid): Remove.
6622         * common/ptid.h (ptid_get_tid): Don't declare.
6623         * ada-tasks.c: Update.
6624         * aix-thread.c: Update.
6625         * bsd-uthread.c: Update.
6626         * darwin-nat.c: Update.
6627         * fbsd-nat.c: Update.
6628         * i386-darwin-nat.c: Update.
6629         * infrun.c: Update.
6630         * linux-tdep.c: Update.
6631         * nto-procfs.c: Update.
6632         * ppc-ravenscar-thread.c: Update.
6633         * python/py-infthread.c: Update.
6634         * ravenscar-thread.c: Update.
6635         * sol-thread.c: Update.
6636         * sparc-ravenscar-thread.c: Update.
6637         * windows-nat.c: Update.
6638
6639 2018-07-03  Tom Tromey  <tom@tromey.com>
6640
6641         * common/ptid.c (ptid_get_lwp): Remove.
6642         * common/ptid.h (ptid_get_lwp): Don't declare.
6643         * aarch64-linux-nat.c: Update.
6644         * ada-tasks.c: Update.
6645         * aix-thread.c: Update.
6646         * amd64-linux-nat.c: Update.
6647         * arm-linux-nat.c: Update.
6648         * corelow.c: Update.
6649         * fbsd-nat.c: Update.
6650         * fbsd-tdep.c: Update.
6651         * gnu-nat.c: Update.
6652         * i386-cygwin-tdep.c: Update.
6653         * i386-gnu-nat.c: Update.
6654         * i386-linux-nat.c: Update.
6655         * ia64-linux-nat.c: Update.
6656         * inf-ptrace.c: Update.
6657         * infrun.c: Update.
6658         * linux-fork.c: Update.
6659         * linux-nat.c: Update.
6660         * linux-tdep.c: Update.
6661         * linux-thread-db.c: Update.
6662         * mips-linux-nat.c: Update.
6663         * nat/aarch64-linux-hw-point.c: Update.
6664         * nat/aarch64-linux.c: Update.
6665         * nat/linux-btrace.c: Update.
6666         * nat/linux-osdata.c: Update.
6667         * nat/linux-procfs.c: Update.
6668         * nat/x86-linux-dregs.c: Update.
6669         * obsd-nat.c: Update.
6670         * ppc-fbsd-nat.c: Update.
6671         * ppc-linux-nat.c: Update.
6672         * procfs.c: Update.
6673         * python/py-infthread.c: Update.
6674         * ravenscar-thread.c: Update.
6675         * remote.c: Update.
6676         * s390-linux-nat.c: Update.
6677         * sol-thread.c: Update.
6678         * sol2-tdep.c: Update.
6679         * spu-linux-nat.c: Update.
6680         * x86-linux-nat.c: Update.
6681         * xtensa-linux-nat.c: Update.
6682
6683 2018-07-03  Tom Tromey  <tom@tromey.com>
6684
6685         * common/ptid.c (ptid_get_pid): Remove.
6686         * common/ptid.h (ptid_get_pid): Don't declare.
6687         * aarch64-linux-nat.c: Update.
6688         * ada-lang.c: Update.
6689         * aix-thread.c: Update.
6690         * alpha-bsd-nat.c: Update.
6691         * amd64-fbsd-nat.c: Update.
6692         * amd64-linux-nat.c: Update.
6693         * arm-linux-nat.c: Update.
6694         * arm-nbsd-nat.c: Update.
6695         * auxv.c: Update.
6696         * break-catch-syscall.c: Update.
6697         * breakpoint.c: Update.
6698         * bsd-uthread.c: Update.
6699         * corelow.c: Update.
6700         * ctf.c: Update.
6701         * darwin-nat.c: Update.
6702         * fbsd-nat.c: Update.
6703         * fbsd-tdep.c: Update.
6704         * gcore.c: Update.
6705         * gnu-nat.c: Update.
6706         * hppa-nbsd-nat.c: Update.
6707         * hppa-obsd-nat.c: Update.
6708         * i386-fbsd-nat.c: Update.
6709         * ia64-linux-nat.c: Update.
6710         * inf-ptrace.c: Update.
6711         * infcmd.c: Update.
6712         * inferior.c: Update.
6713         * inferior.h: Update.
6714         * inflow.c: Update.
6715         * infrun.c: Update.
6716         * linux-fork.c: Update.
6717         * linux-nat.c: Update.
6718         * linux-tdep.c: Update.
6719         * linux-thread-db.c: Update.
6720         * m68k-bsd-nat.c: Update.
6721         * mi/mi-interp.c: Update.
6722         * mi/mi-main.c: Update.
6723         * mips-linux-nat.c: Update.
6724         * mips-nbsd-nat.c: Update.
6725         * mips64-obsd-nat.c: Update.
6726         * nat/aarch64-linux-hw-point.c: Update.
6727         * nat/aarch64-linux.c: Update.
6728         * nat/linux-btrace.c: Update.
6729         * nat/linux-osdata.c: Update.
6730         * nat/linux-procfs.c: Update.
6731         * nat/x86-linux-dregs.c: Update.
6732         * nto-procfs.c: Update.
6733         * obsd-nat.c: Update.
6734         * ppc-linux-nat.c: Update.
6735         * ppc-nbsd-nat.c: Update.
6736         * ppc-obsd-nat.c: Update.
6737         * proc-service.c: Update.
6738         * procfs.c: Update.
6739         * python/py-inferior.c: Update.
6740         * python/py-infthread.c: Update.
6741         * ravenscar-thread.c: Update.
6742         * record.c: Update.
6743         * remote-sim.c: Update.
6744         * remote.c: Update.
6745         * rs6000-nat.c: Update.
6746         * s390-linux-nat.c: Update.
6747         * sh-nbsd-nat.c: Update.
6748         * sol-thread.c: Update.
6749         * sparc-nat.c: Update.
6750         * sparc64-tdep.c: Update.
6751         * spu-linux-nat.c: Update.
6752         * spu-tdep.c: Update.
6753         * target-debug.h: Update.
6754         * target.c: Update.
6755         * thread.c: Update.
6756         * tid-parse.c: Update.
6757         * tracefile-tfile.c: Update.
6758         * vax-bsd-nat.c: Update.
6759         * windows-nat.c: Update.
6760         * x86-linux-nat.c: Update.
6761         * x86-nat.c: Update.
6762
6763 2018-07-03  Tom Tromey  <tom@tromey.com>
6764
6765         * common/ptid.c (pid_to_ptid): Remove.
6766         * common/ptid.h (pid_to_ptid): Don't declare.
6767         * aix-thread.c: Update.
6768         * arm-linux-nat.c: Update.
6769         * common/ptid.c: Update.
6770         * common/ptid.h: Update.
6771         * corelow.c: Update.
6772         * ctf.c: Update.
6773         * darwin-nat.c: Update.
6774         * fbsd-nat.c: Update.
6775         * fork-child.c: Update.
6776         * gnu-nat.c: Update.
6777         * go32-nat.c: Update.
6778         * inf-ptrace.c: Update.
6779         * infcmd.c: Update.
6780         * inferior.c: Update.
6781         * infrun.c: Update.
6782         * linux-fork.c: Update.
6783         * linux-nat.c: Update.
6784         * nat/aarch64-linux-hw-point.c: Update.
6785         * nat/fork-inferior.c: Update.
6786         * nat/x86-linux-dregs.c: Update.
6787         * nto-procfs.c: Update.
6788         * obsd-nat.c: Update.
6789         * procfs.c: Update.
6790         * progspace.c: Update.
6791         * remote.c: Update.
6792         * rs6000-nat.c: Update.
6793         * s390-linux-nat.c: Update.
6794         * sol-thread.c: Update.
6795         * spu-linux-nat.c: Update.
6796         * target.c: Update.
6797         * top.c: Update.
6798         * tracefile-tfile.c: Update.
6799         * windows-nat.c: Update.
6800
6801 2018-07-03  Tom Tromey  <tom@tromey.com>
6802
6803         * common/ptid.h (ptid_build): Don't declare.
6804         * common/ptid.c (ptid_build): Remove.
6805         * aix-thread.c: Update.
6806         * bsd-kvm.c: Update.
6807         * bsd-uthread.c: Update.
6808         * common/agent.c: Update.
6809         * common/ptid.c: Update.
6810         * common/ptid.h: Update.
6811         * corelow.c: Update.
6812         * darwin-nat.c: Update.
6813         * fbsd-nat.c: Update.
6814         * gnu-nat.c: Update.
6815         * linux-fork.c: Update.
6816         * linux-nat.c: Update.
6817         * linux-thread-db.c: Update.
6818         * nat/linux-osdata.c: Update.
6819         * nat/linux-procfs.c: Update.
6820         * nto-procfs.c: Update.
6821         * obsd-nat.c: Update.
6822         * proc-service.c: Update.
6823         * procfs.c: Update.
6824         * ravenscar-thread.c: Update.
6825         * remote-sim.c: Update.
6826         * remote.c: Update.
6827         * sol-thread.c: Update.
6828         * target.c: Update.
6829         * windows-nat.c: Update.
6830
6831 2018-07-03  Tom Tromey  <tom@tromey.com>
6832
6833         * infrun.c (follow_exec): Use exit_inferior_silent.
6834         * inferior.c (exit_inferior_num_silent): Remove.
6835         * inferior.h (exit_inferior_num_silent): Don't declare.
6836
6837 2018-07-03  Tom Tromey  <tom@tromey.com>
6838
6839         PR cli/23340:
6840         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6841         inferior_ptid on error.
6842
6843 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
6844             Simon Marchi  <simon.marchi@polymtl.ca>
6845
6846         PR tdep/8282
6847         * disasm.h (gdb_disassembler): Add
6848         `m_disassembler_options_holder'. member
6849         * disasm.c (get_all_disassembler_options): New function.
6850         (gdb_disassembler::gdb_disassembler): Use it.
6851         (gdb_buffered_insn_length_init_dis): Likewise.
6852         (gdb_buffered_insn_length): Adjust accordingly.
6853         (set_disassembler_options): Handle options with arguments.
6854         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6855         line if showing options with descriptions.
6856         (disassembler_options_completer): Adapt to using the
6857         `disasm_options_and_args_t' structure.
6858         * mips-tdep.c (mips_disassembler_options): New variable.
6859         (mips_disassembler_options_o32): Likewise.
6860         (mips_disassembler_options_n32): Likewise.
6861         (mips_disassembler_options_n64): Likewise.
6862         (gdb_print_insn_mips): Don't set `disassembler_options'.
6863         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6864         functions.
6865         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6866         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6867         `gdbarch_disassembler_options_implicit' and
6868         `gdbarch_valid_disassembler_options'.
6869         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6870         `disasm_options_and_args_t' structure.
6871         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6872         method.
6873         (valid_disassembler_options): Switch from `disasm_options_t' to
6874         the `disasm_options_and_args_t' structure.
6875         * NEWS: Document `set disassembler-options' support for the MIPS
6876         target.
6877         * gdbarch.h: Regenerate.
6878         * gdbarch.c: Regenerate.
6879
6880 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6881
6882         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6883
6884 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6885
6886         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6887         parameter in call to amd64_target_description.
6888         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6889         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6890         (amd64fbsd_init_abi): Likewise.
6891         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6892         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6893         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6894         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6895
6896 2018-06-29  Pedro Alves  <palves@redhat.com>
6897
6898         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6899         "segments" parameter.
6900         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6901         (_initialize_amd64_tdep): Update call to
6902         amd64_create_target_description.
6903         (amd64_target_description): Add "segments" parameter.  Adjust
6904         the implementation to use it.
6905         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6906         call to amd64_create_target_description.
6907         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6908         * gdb/arch/amd64.h (amd64_create_target_description): Add
6909         "segments" register.
6910         * gdb/arch/amd64.c (amd64_create_target_description): Add
6911         "segments" parameter.  Call create_feature_i386_64bit_segments
6912         only if SEGMENTS is true.
6913         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6914         call to amd64_create_target_description.
6915
6916 2018-06-29  Pedro Alves  <palves@redhat.com>
6917
6918         * thread.c (thread_target_id_str): New, factored out from ...
6919         (print_thread_info_1): ... here.  Use it to compute the max
6920         "Target Id" column width.
6921
6922 2018-06-29  Pedro Alves  <palves@redhat.com>
6923
6924         * remote.c (remote_target::extra_thread_info): Delete
6925         'display_buf' and 'n' locals.  from the cache, regardless of
6926         packet mechanims is in use.  Use cache for qThreadExtra and qP
6927         methods too.
6928
6929 2018-06-29  Pedro Alves  <palves@redhat.com>
6930
6931         * blockframe.c (find_pc_sect_containing_function): New function.
6932         * breakpoint.c (print_breakpoint_location): Don't call
6933         find_pc_sect_function.
6934         * linespec.c (create_sals_line_offset): Record the location's
6935         symbol in the sal.
6936         * linespec.c (convert_address_location_to_sals): Fill in sal's
6937         symbol with find_pc_sect_containing_function.
6938         * symtab.c (find_function_start_sal): Rename to ...
6939         (find_function_start_sal_1): ... this.
6940         (find_function_start_sal): Reimplement as wrapper around
6941         find_function_start_sal_1, and use
6942         find_pc_sect_containing_function to fill in the sal's symbol.
6943         (find_function_start_sal(symbol*, bool)): Adjust.
6944         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6945         comments.
6946         (find_pc_sect_containing_function): Declare.
6947
6948 2018-06-29  Pedro Alves  <palves@redhat.com>
6949
6950         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6951         true if the the location has no symbol.
6952
6953 2018-06-28  Tom Tromey  <tom@tromey.com>
6954
6955         * NEWS: Mention --enable-codesign.
6956         * silent-rules.mk (ECHO_SIGN): New variable.
6957         * configure.ac: Add --enable-codesign.
6958         * configure: Rebuild.
6959         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6960         (gdb$(EXEEXT)): Optionally invoke codesign.
6961
6962 2018-06-28  Pedro Alves  <palves@redhat.com>
6963
6964         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6965         comments.
6966         (switch_to_thread_no_regs): Adjust comment.
6967         * infcmd.c (stop_pc): Delete.
6968         (post_create_inferior, info_program_command): Replace references
6969         to stop_pc with references to thread_info->suspend.stop_pc.
6970         * inferior.h (stop_pc): Delete declaration.
6971         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6972         (handle_inferior_event_1, handle_signal_stop)
6973         (process_event_stop_test, keep_going_stepped_thread)
6974         (handle_step_into_function, handle_step_into_function_backward)
6975         (print_stop_location): Replace references to stop_pc with
6976         references to thread_info->suspend.stop_pc.
6977         (struct infcall_suspend_state) <stop_pc>: Delete field.
6978         (save_infcall_suspend_state, restore_infcall_suspend_state):
6979         Remove references to inf_stat->stop_pc.
6980         * linux-fork.c (fork_load_infrun_state): Likewise.
6981         * record-btrace.c (record_btrace_set_replay): Likewise.
6982         * record-full.c (record_full_goto_entry): Likewise.
6983         * remote.c (print_one_stopped_thread): Likewise.
6984         * target.c (target_resume): Extend comment.
6985         * thread.c (set_executing_thread): New.
6986         (set_executing): Use it.
6987         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6988         Remove references to stop_pc.
6989
6990 2018-06-28  Pedro Alves  <palves@redhat.com>
6991
6992         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6993         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6994
6995 2018-06-28  Tom Tromey  <tom@tromey.com>
6996
6997         * coffread.c (coff_symfile_finish): Update.
6998         * xcoffread.c (xcoff_symfile_finish): Update.
6999         * elfread.c (elf_symfile_finish): Update.
7000         * symfile.h (dwarf2_free_objfile): Don't declare.
7001         * dwarf2read.c (_initialize_dwarf2_read): Use
7002         register_objfile_data_with_cleanup.
7003         (dwarf2_free_objfile): Now static.  Change signature.
7004
7005 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7006
7007         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7008         option "-o" to add-symbol-file-load to add an offset to each
7009         section's load address.
7010         * symfile.c (set_objfile_default_section_offset): New function.
7011
7012 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7013
7014         * symfile.c (add_symbol_file_command): Make sure that sections
7015         with the same name are sorted in the same order.
7016
7017 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7018
7019         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7020         require the second argument.  If omitted, load sections at the
7021         addresses specified in the file.
7022
7023 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7024
7025         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7026         (_initialize_symfile): Add option "-o" to symbol-file to add an
7027         offset to each section of the symbol file.
7028
7029 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7030
7031         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7032
7033 2018-06-27  Tom Tromey  <tom@tromey.com>
7034
7035         * stack.c (_initialize_stack): Update "func" help text.
7036
7037 2018-06-27  Tom Tromey  <tom@tromey.com>
7038
7039         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7040         std::vector.
7041         (unwind_infopy_str, pyuw_create_unwind_info)
7042         (unwind_infopy_add_saved_register, pyuw_sniffer)
7043         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7044         Update.
7045         (struct saved_reg): Add constructor.
7046         <value>: Now a gdbpy_ref<>.
7047
7048 2018-06-27  Tom Tromey  <tom@tromey.com>
7049
7050         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7051
7052 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7053
7054         * gdb-gdb.py.in: Format using autopep8.
7055
7056 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7057
7058         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7059         (type_lookup_function): Recognize CORE_ADDR values.
7060
7061 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7062
7063         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7064         print tag_name.
7065
7066 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7067
7068         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7069         <__lt__>: Add.
7070
7071 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7072
7073         * gdb-gdb.py: Move to...
7074         * gdb-gdb.py.in: ... here.
7075         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7076         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7077         dependencies.
7078         (distclean): Remove gdb-gdb.py when cleaning.
7079         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7080         * configure: Re-generate.
7081
7082 2018-06-27  Pedro Alves  <palves@redhat.com>
7083
7084         * proc-service.c (get_ps_regcache): New.
7085         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7086         (ps_lsetfpregs): Use it.
7087
7088 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7089
7090         PR gdb/21695
7091         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7092         declaration.
7093         (dwarf_decode_lines_1): Adjust.
7094
7095 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7096
7097         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7098         override.
7099         <info_proc>: Likewise.
7100
7101 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7102
7103         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7104         to windows_fetch_one_register, and only handle the case of
7105         fetching one register.  Move the code that reloads the context
7106         and iterates over all registers if R is negative to...
7107         (windows_nat_target::fetch_registers): ... here.
7108         (do_windows_store_inferior_registers): Rename to
7109         windows_store_one_register, and only handle the case of storing
7110         one register.  Move the code that handles the case where r is
7111         negative to...
7112         (windows_nat_target::store_registers) ... here.
7113
7114 2018-06-26  Tom Tromey  <tom@tromey.com>
7115
7116         PR rust/22574:
7117         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7118         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7119         Update.
7120         (rust_internal_print_type): Add podata parameter.
7121         (rust_print_type): Update.
7122
7123 2018-06-26  Tom Tromey  <tom@tromey.com>
7124
7125         * typeprint.h (struct print_offset_data) <update, finish,
7126         maybe_print_hole>: New methods.
7127         <indentation>: New constant.
7128         * typeprint.c (print_offset_data::indentation): Define.
7129         (print_offset_data::maybe_print_hole, print_offset_data::update)
7130         (print_offset_data::finish): Move from c-typeprint.c and rename.
7131         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7132         (print_spaces_filtered_with_print_options): Update.
7133         (c_print_type_union_field_offset, maybe_print_hole)
7134         (c_print_type_struct_field_offset): Move to typeprint.c and
7135         rename.
7136         (c_type_print_base_struct_union): Update.
7137
7138 2018-06-25  Pedro Alves  <palves@redhat.com>
7139
7140         * gdbthread.h (thread_info_ref, delete_thread)
7141         (delete_thread_silent, first_thread_of_inferior)
7142         (any_thread_of_inferior, switch_to_thread)
7143         (enable_thread_stack_temporaries)
7144         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7145         (get_last_thread_stack_temporary)
7146         (value_in_thread_stack_temporaries, can_access_registers_thread):
7147         Spell out "struct thread_info" instead of just "thread_info".
7148         * inferior.h (notice_new_inferior): Likewise.
7149
7150 2018-06-25  Pedro Alves  <palves@redhat.com>
7151
7152         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7153         pass thread_info pointer to delete_thread.
7154         (windows_nat_target::detach): Pass inferior pointer to
7155         detach_inferior.
7156         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7157         delete_thread.
7158         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7159         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7160         and pass a thread_info pointer to delete_thread.
7161         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7162         pass thread_info pointer to delete_thread.
7163         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7164         delete_thread_silent call.
7165         * procfs.c (procfs_target::detach): Pass inferior pointer to
7166         detach_inferior.
7167         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7168         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7169         delete_thread_silent call.
7170         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7171         pass thread_info pointer to delete_thread.
7172         (windows_nat_target::detach): Pass inferior pointer to
7173         delete_inferior.
7174
7175 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7176
7177         * regcache.c (readable_regcache::read_part): Fix asserts.
7178         (reg_buffer::raw_collect_part): New function.
7179         (regcache::write_part): Fix asserts.
7180         (reg_buffer::raw_supply_part): New function.
7181         (regcache::transfer_regset_register): New helper function.
7182         (regcache::transfer_regset): Call new functions.
7183         (regcache_supply_regset): Use gdb_byte*.
7184         (regcache::supply_regset): Likewise.
7185         (regcache_collect_regset): Likewise.
7186         (regcache::collect_regset): Likewise.
7187         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7188         (reg_buffer::raw_supply_part): Likewise.
7189         (regcache::transfer_regset_register): Likewise.
7190         (regcache::transfer_regset): Use gdb_byte*.
7191
7192 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7193
7194         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7195
7196 2018-06-21  Pedro Alves  <palves@redhat.com>
7197
7198         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7199         instead of a ptid_t.  All callers adjusted.
7200         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7201         adjusted.
7202         (print_ada_task_info, display_current_task_id, task_command_1):
7203         Adjust.
7204         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7205         inferior_thread.
7206         (breakpoint_kind): Adjust.
7207         (remove_breakpoints_pid): Rename to ...
7208         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7209         pointer.  All callers adjusted.
7210         (bpstat_clear_actions): Use inferior_thread.
7211         (get_bpstat_thread): New.
7212         (bpstat_do_actions): Use it.
7213         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7214         to take a thread_info pointer.  All callers adjusted.
7215         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7216         (breakpoint_re_set_thread): Use inferior_thread.
7217         * breakpoint.h (struct inferior): Forward declare.
7218         (bpstat_stop_status): Update.
7219         (remove_breakpoints_pid): Delete.
7220         (remove_breakpoints_inf): New.
7221         * bsd-uthread.c (bsd_uthread_target::wait)
7222         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7223         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7224         (maint_btrace_packet_history_cmd)
7225         (maint_btrace_clear_packet_history_cmd): Adjust.
7226         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7227         inferior_thread.
7228         * cli/cli-interp.c: Include "inferior.h".
7229         * common/refcounted-object.h (struct
7230         refcounted_object_ref_policy): New.
7231         * compile/compile-object-load.c: Include gdbthread.h.
7232         (store_regs): Use inferior_thread.
7233         * corelow.c (core_target::close): Use current_inferior.
7234         (core_target_open): Adjust to use first_thread_of_inferior and use
7235         the current inferior.
7236         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7237         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7238         <thread>: ... this new field.  All references adjusted.
7239         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7240         Take a thread_info pointer instead of a ptid_t.
7241         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7242         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7243         thread_info pointer instead of a ptid_t.
7244         * elfread.c: Include "inferior.h".
7245         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7246         Use inferior_thread.
7247         * eval.c (evaluate_subexp): Likewise.
7248         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7249         inferior_thread.
7250         * gdb_proc_service.h (struct thread_info): Forward declare.
7251         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7252         <thread>: ... this new field.  All references adjusted.
7253         * gdbarch.h, gdbarch.c: Regenerate.
7254         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7255         'thread' parameter.  All implementations and callers adjusted.
7256         * gdbthread.h (thread_info) <set_running>: New method.
7257         (delete_thread, delete_thread_silent): Take a thread_info pointer
7258         instead of a ptid.
7259         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7260         (first_thread_of_process): Delete, replaced by ...
7261         (first_thread_of_inferior): ... this new function.  All callers
7262         adjusted.
7263         (any_live_thread_of_process): Delete, replaced by ...
7264         (any_live_thread_of_inferior): ... this new function.  All callers
7265         adjusted.
7266         (switch_to_thread, switch_to_no_thread): Declare.
7267         (is_executing): Delete.
7268         (enable_thread_stack_temporaries): Update comment.
7269         <enable_thread_stack_temporaries>: Take a thread_info pointer
7270         instead of a ptid_t.  Incref the thread.
7271         <~enable_thread_stack_temporaries>: Decref the thread.
7272         <m_ptid>: Delete
7273         <m_thr>: New.
7274         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7275         (get_last_thread_stack_temporary)
7276         (value_in_thread_stack_temporaries, can_access_registers_thread):
7277         Take a thread_info pointer instead of a ptid_t.  All callers
7278         adjusted.
7279         * infcall.c (get_call_return_value): Use inferior_thread.
7280         (run_inferior_call): Work with thread pointers instead of ptid_t.
7281         (call_function_by_hand_dummy): Work with thread pointers instead
7282         of ptid_t.  Use thread_info_ref.
7283         * infcmd.c (proceed_thread_callback): Access thread's state
7284         directly.
7285         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7286         access thread's state directly.
7287         (continue_command): Use inferior_thread.
7288         (info_program_command): Use find_thread_ptid and access thread
7289         state directly.
7290         (proceed_after_attach_callback): Use thread state directly.
7291         (notice_new_inferior): Take a thread_info pointer instead of a
7292         ptid_t.  All callers adjusted.
7293         (exit_inferior): Take an inferior pointer instead of a pid.  All
7294         callers adjusted.
7295         (exit_inferior_silent): New.
7296         (detach_inferior): Delete.
7297         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7298         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7299         (detach_inferior_command, kill_inferior_command): Use
7300         find_inferior_id instead of valid_gdb_inferior_id and
7301         gdb_inferior_id_to_pid.
7302         (inferior_command): Use inferior and thread pointers.
7303         * inferior.h (struct thread_info): Forward declare.
7304         (notice_new_inferior): Take a thread_info pointer instead of a
7305         ptid_t.  All callers adjusted.
7306         (detach_inferior): Delete declaration.
7307         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7308         instead of a pid.  All callers adjusted.
7309         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7310         (valid_gdb_inferior_id): Delete.
7311         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7312         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7313         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7314         ...
7315         <inf>: ... this new field.
7316         <step_ptid>: Delete, replaced by ...
7317         <step_thread>: ... this new field.
7318         (get_displaced_stepping_state): Take an inferior pointer instead
7319         of a pid.  All callers adjusted.
7320         (displaced_step_in_progress_any_inferior): Adjust.
7321         (displaced_step_in_progress_thread): Take a thread pointer instead
7322         of a ptid_t.  All callers adjusted.
7323         (displaced_step_in_progress, add_displaced_stepping_state): Take
7324         an inferior pointer instead of a pid.  All callers adjusted.
7325         (get_displaced_step_closure_by_addr): Adjust.
7326         (remove_displaced_stepping_state): Take an inferior pointer
7327         instead of a pid.  All callers adjusted.
7328         (displaced_step_prepare_throw, displaced_step_prepare)
7329         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7330         All callers adjusted.
7331         (start_step_over): Adjust.
7332         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7333         displaced step queue.
7334         (do_target_resume): Adjust.
7335         (fetch_inferior_event): Use inferior_thread.
7336         (context_switch, get_inferior_stop_soon): Take an
7337         execution_control_state pointer instead of a ptid_t.  All callers
7338         adjusted.
7339         (switch_to_thread_cleanup): Delete.
7340         (stop_all_threads): Use scoped_restore_current_thread.
7341         * inline-frame.c: Include "gdbthread.h".
7342         (inline_state) <inline_state>: Take a thread pointer instead of a
7343         ptid_t.  All callers adjusted.
7344         <ptid>: Delete, replaced by ...
7345         <thread>: ... this new field.
7346         (find_inline_frame_state): Take a thread pointer instead of a
7347         ptid_t.  All callers adjusted.
7348         (skip_inline_frames, step_into_inline_frame)
7349         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7350         pointer instead of a ptid_t.  All callers adjusted.
7351         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7352         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7353         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7354         pointers directly.
7355         * linux-nat.c (get_detach_signal): Likewise.
7356         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7357         (thread_db_notice_clone): Adjust.
7358         (thread_db_find_new_threads_silently)
7359         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7360         a thread pointer instead of a ptid_t.  All callers adjusted.
7361         * mi/mi-cmd-var.c: Include "inferior.h".
7362         (mi_cmd_var_update_iter): Update to use thread pointers.
7363         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7364         inferior directly.
7365         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7366         out to ...
7367         (mi_output_running): ... this new function.
7368         (mi_on_resume_1): Adjust to use it.
7369         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7370         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7371         directly.
7372         (interrupt_thread_callback): : Adjust to use thread and inferior
7373         pointers.
7374         * proc-service.c: Include "gdbthread.h".
7375         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7376         * progspace-and-thread.c: Include "inferior.h".
7377         * progspace.c: Include "inferior.h".
7378         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7379         hold a reference to an inferior_object.
7380         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7381         inferior_thread.
7382         * python/py-inferior.c (struct inferior_object): Give the type a
7383         tag name instead of a typedef.
7384         (python_on_normal_stop): No need to check if the current thread is
7385         listed.
7386         (inferior_to_inferior_object): Change return type to
7387         inferior_object.  All callers adjusted.
7388         (find_thread_object): Delete, bits factored out to ...
7389         (thread_to_thread_object): ... this new function.
7390         * python/py-infthread.c (create_thread_object): Use
7391         inferior_to_inferior_object.
7392         (thpy_is_stopped): Use thread pointer directly.
7393         (gdbpy_selected_thread): Use inferior_thread.
7394         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7395         field, replaced with ...
7396         <thread>: ... this new field.  All users adjusted.
7397         (btpy_insn_or_gap_new): Drop const.
7398         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7399         callers adjusted.
7400         * python/py-record.c: Include "gdbthread.h".
7401         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7402         a ptid_t.  All callers adjusted.
7403         (gdbpy_current_recording): Use inferior_thread.
7404         * python/py-record.h (recpy_record_object) <ptid>: Delete
7405         field, replaced with ...
7406         <thread>: ... this new field.  All users adjusted.
7407         (recpy_element_object) <ptid>: Delete
7408         field, replaced with ...
7409         <thread>: ... this new field.  All users adjusted.
7410         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7411         a ptid_t.  All callers adjusted.
7412         * python/py-threadevent.c: Include "gdbthread.h".
7413         (get_event_thread): Use thread_to_thread_object.
7414         * python/python-internal.h (struct inferior_object): Forward
7415         declare.
7416         (find_thread_object, find_inferior_object): Delete declarations.
7417         (thread_to_thread_object, inferior_to_inferior_object): New
7418         declarations.
7419         * record-btrace.c: Include "inferior.h".
7420         (require_btrace_thread): Use inferior_thread.
7421         (record_btrace_frame_sniffer)
7422         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7423         (get_thread_current_frame): Use scoped_restore_current_thread and
7424         switch_to_thread.
7425         (get_thread_current_frame): Use thread pointer directly.
7426         (record_btrace_replay_at_breakpoint): Use thread's inferior
7427         pointer directly.
7428         * record-full.c: Include "inferior.h".
7429         * regcache.c: Include "gdbthread.h".
7430         (get_thread_arch_regcache): Use the inferior's address space
7431         directly.
7432         (get_thread_regcache, registers_changed_thread): New.
7433         * regcache.h (get_thread_regcache(thread_info *thread)): New
7434         overload.
7435         (registers_changed_thread): New.
7436         (remote_target) <remote_detach_1>: Swap order of parameters.
7437         (remote_add_thread): <remote_add_thread>: Return the new thread.
7438         (get_remote_thread_info(ptid_t)): New overload.
7439         (remote_target::remote_notice_new_inferior): Use thread pointers
7440         directly.
7441         (remote_target::process_initial_stop_replies): Use
7442         thread_info::set_running.
7443         (remote_target::remote_detach_1, remote_target::detach)
7444         (extended_remote_target::detach): Adjust.
7445         * stack.c (frame_show_address): Use inferior_thread.
7446         * target-debug.h (target_debug_print_thread_info_pp): New.
7447         * target-delegates.c: Regenerate.
7448         * target.c (default_thread_address_space): Delete.
7449         (memory_xfer_partial_1): Use current_inferior.
7450         (target_detach): Use current_inferior.
7451         (target_thread_address_space): Delete.
7452         (generic_mourn_inferior): Use current_inferior.
7453         * target.h (struct target_ops) <thread_address_space>: Delete.
7454         (target_thread_address_space): Delete.
7455         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
7456         pointers directly.
7457         (delete_thread_1, delete_thread, delete_thread_silent): Take a
7458         thread pointer instead of a ptid_t.  Adjust all callers.
7459         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
7460         (first_thread_of_process): Delete, replaced by ...
7461         (first_thread_of_inferior): ... this new function.  All callers
7462         adjusted.
7463         (any_thread_of_process): Rename to ...
7464         (any_thread_of_inferior): ... this, and take an inferior pointer.
7465         (any_live_thread_of_process): Rename to ...
7466         (any_live_thread_of_inferior): ... this, and take an inferior
7467         pointer.
7468         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7469         (value_in_thread_stack_temporaries)
7470         (get_last_thread_stack_temporary): Take a thread pointer instead
7471         of a ptid_t.  Adjust all callers.
7472         (thread_info::set_running): New.
7473         (validate_registers_access): Use inferior_thread.
7474         (can_access_registers_ptid): Rename to ...
7475         (can_access_registers_thread): ... this, and take a thread
7476         pointer.
7477         (print_thread_info_1): Adjust to compare thread pointers instead
7478         of ptids.
7479         (switch_to_no_thread, switch_to_thread): Make extern.
7480         (scoped_restore_current_thread::~scoped_restore_current_thread):
7481         Use m_thread pointer directly.
7482         (scoped_restore_current_thread::scoped_restore_current_thread):
7483         Use inferior_thread.
7484         (thread_command): Use thread pointer directly.
7485         (thread_num_make_value_helper): Use inferior_thread.
7486         * top.c (execute_command): Use inferior_thread.
7487         * tui/tui-interp.c: Include "inferior.h".
7488         * varobj.c (varobj_create): Use inferior_thread.
7489         (value_of_root_1): Use find_thread_global_id instead of
7490         global_thread_id_to_ptid.
7491
7492 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
7493
7494         * regcache.c (readable_regcache::read_part): Avoid memcpy when
7495         possible.
7496         (regcache::write_part): Likewise.
7497         (readable_regcache::cooked_read_part): Update comment.
7498         (readable_regcache::cooked_write_part): Likewise.
7499         * regcache.h: (readable_regcache::read_part): Likewise.
7500         (regcache::write_part): Likewise.
7501
7502 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
7503             Dirk Schubert  <dirk.schubert@arm.com>
7504
7505         * aarch64-linux-nat.c (post_attach): New.
7506         (aarch64_linux_nat_target::post_attach): Override post_attach to
7507         record the number of hardware debug registers.
7508
7509 2018-06-20  Tom Tromey  <tom@tromey.com>
7510
7511         * python/py-param.c (add_setshow_generic): Make parameters const.
7512         (parmpy_init): Update.
7513
7514 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7515
7516         * regcache.h (regcache_cooked_read_ftype): Rename to...
7517         (register_read_ftype): ...this, change type to function_view.
7518         (class reg_buffer) <save>: Remove src parameter.
7519         (readonly_detached_regcache) <readonly_detached_regcache>: Make
7520         parameter non-const in first overload.  Remove src parameter in
7521         second overload.
7522         * regcache.c (do_cooked_read): Remove.
7523         (readonly_detached_regcache::readonly_detached_regcache): Make
7524         parameter non-const, adjust call to other constructor.
7525         (reg_buffer::save): Remove src parameter.
7526         * frame.c (do_frame_register_read): Remove.
7527         (frame_save_as_regcache): Use lambda function.
7528         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
7529         parameter to ppu2spu_data *.
7530         (ppu2spu_sniffer): Use lambda function.
7531
7532 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7533
7534         * record-full.c (record_full_target::insert_breakpoint): Remove
7535         "struct" keyword, add const.
7536
7537 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
7538
7539         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
7540         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
7541         * configure.ac: Remove AC_PREREQ, add missing quoting.
7542         * gnulib/configure.ac: Modernize usage of
7543         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
7544         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
7545         (AUTOMAKE_VERSION): Bump to 1.15.1.
7546         * configure: Re-generate.
7547         * config.in: Re-generate.
7548         * aclocal.m4: Re-generate.
7549         * gnulib/aclocal.m4: Re-generate.
7550         * gnulib/config.in: Re-generate.
7551         * gnulib/configure: Re-generate.
7552         * gnulib/import/Makefile.in: Re-generate.
7553
7554 2018-06-19  Pedro Alves  <palves@redhat.com>
7555
7556         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
7557         (lookup_minimal_symbol_by_pc_section): ... here with
7558         gdb_assert_not_reached added.
7559
7560 2018-06-19  Pedro Alves  <palves@redhat.com>
7561
7562         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
7563         parameter with a block parameter.  Compare location's block symbol
7564         with the frame's block instead of addresses.
7565         (skip_inline_frames): Pass the current block instead of the
7566         frame's address.  Break out as soon as we determine the frame
7567         should not be skipped.
7568
7569 2018-06-18  Tom Tromey  <tom@tromey.com>
7570
7571         * solib-aix.c (solib_aix_get_section_offsets): Return
7572         unique_xmalloc_ptr.
7573         (solib_aix_solib_create_inferior_hook): Update.
7574
7575 2018-06-18  Tom Tromey  <tom@tromey.com>
7576
7577         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
7578
7579 2018-06-18  Tom Tromey  <tom@tromey.com>
7580
7581         * solib-frv.c (frv_relocate_main_executable): Use
7582         unique_xmalloc_ptr.
7583         * solib-dsbt.c (dsbt_relocate_main_executable): Use
7584         unique_xmalloc_ptr.
7585
7586 2018-06-18  Tom Tromey  <tom@tromey.com>
7587
7588         * objfiles.h (inhibit_section_map_updates): Update.
7589         (resume_section_map_updates, resume_section_map_updates_cleanup):
7590         Remove.
7591         * solib-svr4.c (svr4_handle_solib_event): Update.
7592         * objfiles.c (inhibit_section_map_updates): Return
7593         scoped_restore_tmpl<int>.
7594         (resume_section_map_updates, resume_section_map_updates_cleanup):
7595         Remove.
7596
7597 2018-06-18  Tom Tromey  <tom@tromey.com>
7598
7599         * valprint.h (read_string): Update.
7600         * valprint.c (read_string): Change type of "buffer".
7601         (val_print_string): Update.
7602         * python/py-value.c (valpy_string): Update.
7603         * language.h (struct language_defn) <la_get_string>: Change
7604         type of "buffer".
7605         (default_get_string, c_get_string): Update.
7606         * language.c (default_get_string): Change type of "buffer".
7607         * guile/scm-value.c (gdbscm_value_to_string): Update.
7608         * c-lang.c (c_get_string): Change type of "buffer".
7609
7610 2018-06-18  Tom Tromey  <tom@tromey.com>
7611
7612         * ser-mingw.c (struct pipe_state_destroyer): New.
7613         (pipe_state_up): New typedef.
7614         (cleanup_pipe_state): Remove.
7615         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
7616
7617 2018-06-18  Tom Tromey  <tom@tromey.com>
7618
7619         * rust-lang.h (rust_yyerror): Don't declare.
7620         * rust-lang.c (rust_language_defn): Update.
7621         * rust-exp.y (yyerror): Now static.
7622         * parse.c (parse_exp_in_context_1): Update.
7623         * p-lang.h (p_yyerror): Don't declare.
7624         * p-lang.c (p_language_defn): Update.
7625         * p-exp.y (yyerror): Now static.
7626         * opencl-lang.c (opencl_language_defn): Update.
7627         * objc-lang.c (objc_language_defn): Update.
7628         * m2-lang.h (m2_yyerror): Don't declare.
7629         * m2-lang.c (m2_language_defn): Update.
7630         * m2-exp.y (yyerror): Now static.
7631         * language.h (struct language_defn) <la_error>: Remove.
7632         * language.c (unk_lang_error): Remove.
7633         (unknown_language_defn, auto_language_defn): Remove.
7634         * go-lang.h (go_yyerror): Don't declare.
7635         * go-lang.c (go_language_defn): Update.
7636         * go-exp.y (yyerror): Now static.
7637         * f-lang.h (f_yyerror): Don't declare.
7638         * f-lang.c (f_language_defn): Update.
7639         * f-exp.y (yyerror): Now static.
7640         * d-lang.h (d_yyerror): Don't declare.
7641         * d-lang.c (d_language_defn): Update.
7642         * d-exp.y (yyerror): Now static.
7643         * c-lang.h (c_yyerror): Don't declare.
7644         * c-lang.c (c_language_defn, cplus_language_defn)
7645         (asm_language_defn, minimal_language_defn): Update.
7646         * c-exp.y (yyerror): Now static.
7647         * ada-lang.h (ada_yyerror): Don't declare.
7648         * ada-lang.c (ada_language_defn): Update.
7649         * ada-exp.y (yyerror): Now static.
7650
7651 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7652
7653         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
7654         (store_sveregs_to_thread): Likewise.
7655         (aarch64_linux_fetch_inferior_registers): Check for SVE.
7656         (aarch64_linux_store_inferior_registers): Likewise.
7657         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
7658         function.
7659         (aarch64_sve_regs_copy_to_regcache): Likewise.
7660         (aarch64_sve_regs_copy_from_regcache): Likewise.
7661         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
7662         declaration.
7663         (aarch64_sve_regs_copy_to_regcache): Likewise.
7664         (aarch64_sve_regs_copy_from_regcache): Likewise.
7665         (sve_context): Structure from Linux headers.
7666         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
7667         (SVE_SIG_ZREG_SIZE): Likewise.
7668         (SVE_SIG_PREG_SIZE): Likewise.
7669         (SVE_SIG_FFR_SIZE): Likewise.
7670         (SVE_SIG_REGS_OFFSET): Likewise.
7671         (SVE_SIG_ZREGS_OFFSET): Likewise.
7672         (SVE_SIG_ZREG_OFFSET): Likewise.
7673         (SVE_SIG_ZREGS_SIZE): Likewise.
7674         (SVE_SIG_PREGS_OFFSET): Likewise.
7675         (SVE_SIG_PREG_OFFSET): Likewise.
7676         (SVE_SIG_PREGS_SIZE): Likewise.
7677         (SVE_SIG_FFR_OFFSET): Likewise.
7678         (SVE_SIG_REGS_SIZE): Likewise.
7679         (SVE_SIG_CONTEXT_SIZE): Likewise.
7680         (SVE_PT_REGS_MASK): Likewise.
7681         (SVE_PT_REGS_FPSIMD): Likewise.
7682         (SVE_PT_REGS_SVE): Likewise.
7683         (SVE_PT_VL_INHERIT): Likewise.
7684         (SVE_PT_VL_ONEXEC): Likewise.
7685         (SVE_PT_REGS_OFFSET): Likewise.
7686         (SVE_PT_FPSIMD_OFFSET): Likewise.
7687         (SVE_PT_FPSIMD_SIZE): Likewise.
7688         (SVE_PT_SVE_ZREG_SIZE): Likewise.
7689         (SVE_PT_SVE_PREG_SIZE): Likewise.
7690         (SVE_PT_SVE_FFR_SIZE): Likewise.
7691         (SVE_PT_SVE_FPSR_SIZE): Likewise.
7692         (SVE_PT_SVE_FPCR_SIZE): Likewise.
7693         (__SVE_SIG_TO_PT): Likewise.
7694         (SVE_PT_SVE_OFFSET): Likewise.
7695         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
7696         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
7697         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
7698         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
7699         (SVE_PT_SVE_PREG_OFFSET): Likewise.
7700         (SVE_PT_SVE_PREGS_SIZE): Likewise.
7701         (SVE_PT_SVE_FFR_OFFSET): Likewise.
7702         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
7703         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
7704         (SVE_PT_SVE_SIZE): Likewise.
7705         (SVE_PT_SIZE): Likewise.
7706         (HAS_SVE_STATE): New define.
7707
7708 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7709
7710         * nat/aarch64-sve-linux-sigcontext.h: New file.
7711         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
7712         new files.
7713         (SVE_VQ_MIN): Likewise.
7714         (SVE_VQ_MAX): Likewise.
7715         (SVE_VL_MIN): Likewise.
7716         (SVE_VL_MAX): Likewise.
7717         (SVE_NUM_ZREGS): Likewise.
7718         (SVE_NUM_PREGS): Likewise.
7719         (sve_vl_valid): Likewise.
7720         (struct user_sve_header): Likewise.
7721
7722 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
7723             Richard Bunt <Richard.Bunt@arm.com>
7724
7725         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7726         was requested by GDB.
7727
7728 2018-06-15  Tom de Vries  <tdevries@suse.de>
7729
7730         * MAINTAINERS (Write After Approval): Add Tom de Vries.
7731
7732 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
7733
7734         * gnulib/update-gnulib.sh: Print expected versions of
7735         autoconf/aclocal.
7736
7737 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
7738
7739         * arch-utils.c (default_type_align): Use type_length_units.
7740         * gdbtypes.c (type_align): Use type_length_units.
7741
7742 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7743
7744         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7745         of 'define' command.
7746
7747 2018-06-14  Tom de Vries  <tdevries@suse.de>
7748
7749         PR cli/22573
7750         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7751         get_no_prettyformat_print_options.
7752
7753 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7754
7755         * sparc-nat.h: Include target.h.
7756         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7757         <fetch_registers>: Remove this argument in function call.
7758         <store_registers>: Remove this argument in function call, remove
7759         extra semicolon.
7760         <low_forget_process>: Call sparc64_forget_process instead of
7761         sparc_forget_process.
7762
7763 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7764
7765         * procfs.c (_initialize_procfs): Use add_inf_child_target.
7766         (procfs_target::make_corefile_notes): Adjust to new
7767         target_read_alloc return type.
7768
7769 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7770             Stephen Roberts  <stephen.roberts@arm.com>
7771
7772         PR gdb/22882
7773         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7774         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7775         Move should_notify_stop local into more inner scope.
7776
7777 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7778             Stephen Roberts  <stephen.roberts@arm.com>
7779
7780         PR gdb/22882
7781         * infrun.c (resume_1): Add call to mark_async_event_handler.
7782
7783 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7784
7785         * infrun.c (do_target_wait): Change old version of $pc printed.
7786
7787 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7788
7789         * dwarf2read.c (read_index_from_section): Rename to...
7790         (read_gdb_index_from_section): ... this, update all callers.
7791         (dwarf2_read_index): Rename to...
7792         (dwarf2_read_gdb_index): ... this, update all callers.
7793
7794 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7795
7796         * hppa-linux-nat.c
7797         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7798         hppa_linux_nat_target::fetch_registers.
7799
7800 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7801
7802         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7803         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7804         (AARCH64_DWARF_SVE_FFR): Likewise.
7805         (AARCH64_DWARF_SVE_P0): Likewise.
7806         (AARCH64_DWARF_SVE_Z0): Likewise.
7807
7808 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7809
7810         * common/common-regcache.h (raw_compare): New function.
7811         * regcache.c (regcache::raw_compare): Likewise.
7812         * regcache.h (regcache::raw_compare): New declaration.
7813
7814 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7815
7816         * common/common-regcache.h (reg_buffer_common): New structure.
7817         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7818         (reg_buffer::raw_supply): Likewise.
7819         (reg_buffer::raw_supply_integer): Likewise.
7820         (reg_buffer::raw_supply_zeroed): Likewise.
7821         (reg_buffer::raw_collect): Likewise.
7822         (reg_buffer::raw_collect_integer): Likewise.
7823         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7824         (reg_buffer::raw_supply): Likewise.
7825         (reg_buffer::raw_supply_integer): Likewise.
7826         (reg_buffer::raw_supply_zeroed): Likewise.
7827         (reg_buffer::raw_collect): Likewise.
7828         (reg_buffer::raw_collect_integer): Likewise.
7829
7830 2018-06-10  Tom Tromey  <tom@tromey.com>
7831
7832         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7833         (class remote_state) <stop_reply_queue>: Now std::vector.
7834         (remote_state::~remote_state)
7835         (remote_target::stop_reply_queue_length): Update.
7836         (struct queue_iter_param, remove_child_of_pending_fork)
7837         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7838         (check_pending_event_prevents_wildcard_vcont_callback)
7839         (remove_stop_reply_for_inferior)
7840         (remove_stop_reply_of_remote_state)
7841         (remote_notif_remove_once_on_match)
7842         (stop_reply_match_ptid_and_ws)
7843         (remote_kill_child_of_pending_fork): Remove.
7844         (remote_target::remove_new_fork_children)
7845         (remote_target::check_pending_events_prevent_wildcard_vcont)
7846         (remote_target::discard_pending_stop_replies)
7847         (remote_target::discard_pending_stop_replies_in_queue)
7848         (remote_target::remote_notif_remove_queued_reply)
7849         (remote_target::queued_stop_reply)
7850         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7851         (remote_target::wait, remote_target::kill_new_fork_children)
7852         (remote_target::async): Update.
7853
7854 2018-06-10  Tom Tromey  <tom@tromey.com>
7855
7856         * record-full.c (record_full_arch_list_cleanups): Remove.
7857         (record_full_message): Use try/catch.
7858         (record_full_wait_cleanups): Remove.
7859         (record_full_wait_1): Use try/catch.
7860         (record_full_restore): Likewise.
7861
7862 2018-06-10  Tom Tromey  <tom@tromey.com>
7863
7864         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7865         declare VEC.  Add constructor.
7866         <in_target_beneath>: Now bool.
7867         (record_full_breakpoints): Now a std::vector, static.
7868         (record_full_sync_record_breakpoints)
7869         (record_full_init_record_breakpoints)
7870         (record_full_target::insert_breakpoint)
7871         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7872
7873 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7874
7875         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7876         * serial.c (serial_interface_lookup): Remove struct keyword.
7877
7878 2018-06-10  Tom Tromey  <tom@tromey.com>
7879
7880         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7881         method.
7882         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7883         a method.
7884         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7885         method.
7886         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7887         "beneath" as a method.
7888         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7889         Use "beneath" as a method.
7890
7891 2018-06-10  Tom Tromey  <tom@tromey.com>
7892
7893         * tracefile.c (struct trace_file_writer_deleter): New.
7894         <operator()>: Rename from trace_file_writer_xfree.
7895         (trace_file_writer_up): New typedef.
7896         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7897
7898 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7899
7900         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7901         <m_registers, m_register_status>: Change type to
7902         std::unique_ptr.
7903         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7904         XCNEWVEC.
7905
7906 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7907
7908         * common/common-regcache.h (enum register_status): Add
7909         underlying type "signed char".
7910         * regcache.h (reg_buffer) <m_register_status>: Change type to
7911         register_status *.
7912         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7913         register_status instead of signed char.
7914         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7915         (reg_buffer::get_register_status): Remove cast.
7916         (readable_regcache::raw_read): Remove cast.
7917         (readable_regcache::cooked_read): Remove cast.
7918
7919 2018-06-09  Tom Tromey  <tom@tromey.com>
7920
7921         * source.c (reverse_search_command, forward_search_command): Use
7922         scoped_fd.
7923
7924 2018-06-09  Tom Tromey  <tom@tromey.com>
7925
7926         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7927         (serial_ops_list): Now static, std::vector.
7928         (serial_interface_lookup, serial_add_interface): Update.
7929
7930 2018-06-09  Tom Tromey  <tom@tromey.com>
7931
7932         * dwarf2read.c (process_cu_includes): Update.
7933         (process_full_comp_unit): Update.
7934         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7935         std::vector.
7936
7937 2018-06-08  Paul Koning  <paul_koning@dell.com>
7938
7939         PR gdb/23252
7940
7941         * python/python.c (do_start_initialization):
7942         Avoid call to internal Python API.
7943         (init__gdb_module): New function.
7944
7945 2018-06-08  Gary Benson <gbenson@redhat.com>
7946
7947         * linux-thread-db.c (valprint.h): New include.
7948         (struct check_thread_db_info): New structure.
7949         (check_thread_db_on_load, tdb_testinfo): New static globals.
7950         (check_thread_db, check_thread_db_callback): New functions.
7951         (try_thread_db_load_1): Run integrity checks if requested.
7952         (maintenance_check_libthread_db): New function.
7953         (_initialize_thread_db): Register "maint check libthread-db"
7954         and "maint set/show check-libthread-db".
7955         * NEWS: Mention the above new commands.
7956
7957 2018-06-08  Tom Tromey  <tom@tromey.com>
7958
7959         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7960         now a method.
7961
7962 2018-06-08  Tom Tromey  <tom@tromey.com>
7963
7964         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7965
7966 2018-06-08  Tom Tromey  <tom@tromey.com>
7967
7968         * common/btrace-common.h (struct btrace_data): Add constructor,
7969         destructor, move assignment operator.
7970         <empty, clear, fini>: New methods.
7971         <format>: Initialize.
7972         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7973         (btrace_data_empty): Don't declare.
7974         * common/btrace-common.c (btrace_data_init): Remove.
7975         (btrace_data::fini): Rename from btrace_data_fini.
7976         (btrace_data::empty): Rename from btrace_data_empty.
7977         (btrace_data::clear): Rename from btrace_data_clear.  Return
7978         bool.
7979         * btrace.h (make_cleanup_btrace_data): Don't declare.
7980         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7981         (parse_xml_btrace): Update.
7982         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7983         (maint_btrace_clear_packet_history_cmd): Update.
7984
7985 2018-06-07  Pedro Alves  <palves@redhat.com>
7986
7987         * target.h (target_ops) <beneath>: Now a method.  All references
7988         updated.
7989         (class target_stack): New.
7990         * target.c (g_target_stack): New.
7991         (g_current_top_target): Delete.
7992         (current_top_target): Get the top target out of g_target_stack.
7993         (target_stack::push, target_stack::unpush): New.
7994         (push_target, unpush_target): Reimplement.
7995         (target_is_pushed): Reimplement in terms of g_target_stack.
7996         (target_ops::beneath, target_stack::find_beneath): New.
7997
7998 2018-06-07  Pedro Alves  <palves@redhat.com>
7999
8000         * target.h (find_target_beneath): Delete declaration.
8001         * target.c (find_target_beneath): Delete definition.
8002         * aix-thread.c: All callers of find_target_beneath adjusted to
8003         call target_ops::beneath instead.
8004         * bsd-uthread.c: Likewise.
8005         * linux-thread-db.c: Likewise.
8006         * ravenscar-thread.c: Likewise.
8007         * sol-thread.c: Likewise.
8008         * spu-multiarch.c: Likewise.
8009
8010 2018-06-07  Pedro Alves  <palves@redhat.com>
8011
8012         * target.h (target_ops) <beneath>: Now a method.  All references
8013         updated.
8014         (target_ops) <m_beneath>: New.
8015         * target.c (target_ops::beneath): New.
8016         * corelow.c: Adjust all references to target_ops::beneath.
8017         * linux-thread-db.c: Likewise.
8018         * make-target-delegates: Likewise.
8019         * record-btrace.c: Likewise.
8020         * record-full.c: Likewise.
8021         * remote.c: Likewise.
8022         * target.c: Likewise.
8023         * target-delegates.c: Regenerate.
8024
8025 2018-06-07  Pedro Alves  <palves@redhat.com>
8026
8027         * target.h (target_stack): Delete.
8028         (current_top_target): Declare function.
8029         * target.c (target_stack): Delete.
8030         (g_current_top_target): New.
8031         (current_top_target): New function.
8032         * auxv.c: Use current_top_target instead of target_stack
8033         throughout.
8034         * avr-tdep.c: Likewise.
8035         * breakpoint.c: Likewise.
8036         * corefile.c: Likewise.
8037         * elfread.c: Likewise.
8038         * eval.c: Likewise.
8039         * exceptions.c: Likewise.
8040         * frame.c: Likewise.
8041         * gdbarch-selftests.c: Likewise.
8042         * gnu-v3-abi.c: Likewise.
8043         * ia64-tdep.c: Likewise.
8044         * ia64-vms-tdep.c: Likewise.
8045         * infcall.c: Likewise.
8046         * infcmd.c: Likewise.
8047         * infrun.c: Likewise.
8048         * linespec.c: Likewise.
8049         * linux-tdep.c: Likewise.
8050         * minsyms.c: Likewise.
8051         * ppc-linux-nat.c: Likewise.
8052         * ppc-linux-tdep.c: Likewise.
8053         * procfs.c: Likewise.
8054         * regcache.c: Likewise.
8055         * remote.c: Likewise.
8056         * rs6000-tdep.c: Likewise.
8057         * s390-linux-nat.c: Likewise.
8058         * s390-tdep.c: Likewise.
8059         * solib-aix.c: Likewise.
8060         * solib-darwin.c: Likewise.
8061         * solib-dsbt.c: Likewise.
8062         * solib-spu.c: Likewise.
8063         * solib-svr4.c: Likewise.
8064         * solib-target.c: Likewise.
8065         * sparc-tdep.c: Likewise.
8066         * sparc64-tdep.c: Likewise.
8067         * spu-tdep.c: Likewise.
8068         * symfile.c: Likewise.
8069         * symtab.c: Likewise.
8070         * target-descriptions.c: Likewise.
8071         * target-memory.c: Likewise.
8072         * target.c: Likewise.
8073         * target.h: Likewise.
8074         * tracefile-tfile.c: Likewise.
8075         * tracepoint.c: Likewise.
8076         * valops.c: Likewise.
8077         * valprint.c: Likewise.
8078         * value.c: Likewise.
8079         * windows-tdep.c: Likewise.
8080         * mi/mi-main.c: Likewise.
8081
8082 2018-06-07  Tom Tromey  <tom@tromey.com>
8083
8084         * valprint.h (build_address_symbolic): Declare.
8085         * printcmd.c (print_address_symbolic): Update.
8086         (build_address_symbolic): Change "name" and "filename" to
8087         std::string.
8088         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8089         Update.
8090         * defs.h (build_address_symbolic): Remove declaration.
8091
8092 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8093
8094         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8095         (aarch64_vnv_type): Add function.
8096         (aarch64_pseudo_register_name): Add V regs for SVE.
8097         (aarch64_pseudo_register_type): Likewise.
8098         (aarch64_pseudo_register_reggroup_p): Likewise.
8099         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8100         (aarch64_pseudo_read_value): Add V regs for SVE.
8101         (aarch64_pseudo_write_2): Use V0 offset for SVE
8102         (aarch64_pseudo_write): Add V regs for SVE.
8103         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8104
8105 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8106
8107         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8108         (sve_vl_from_vq): Likewise.
8109
8110 2018-06-05  Tom Tromey  <tom@tromey.com>
8111
8112         * cli/cli-cmds.c (show_version): Update.
8113         * top.c (print_gdb_version): Add "interactive" parameter.
8114         Update.
8115         * main.c (captured_main_1): Update.
8116         * top.h (print_gdb_version): Add "interactive" parameter and a
8117         comment.
8118
8119 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8120
8121         * common/enum-flags.h: Add trailing semicolon to example in
8122         comment.
8123
8124 2018-06-05  Tom Tromey  <tom@tromey.com>
8125
8126         PR cli/12326:
8127         * NEWS: Add entry about pager.
8128         * utils.c (pagination_disabled_for_command): New global.
8129         (prompt_for_continue): Allow "c" response to prompt.
8130         (reinitialize_more_filter): Clear
8131         pagination_disabled_for_command.
8132         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8133
8134 2018-06-04  Tom Tromey  <tom@tromey.com>
8135
8136         * ada-lang.h (ada_lookup_symbol_list): Update.
8137         * ada-lang.c (resolve_subexp): Update.
8138         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8139         parameter.
8140         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8141         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8142         results parameter to std::vector.
8143         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8144         Update.
8145         * ada-exp.y (block_lookup): Update.
8146         (select_possible_type_sym): Change type of syms.  Remove nsyms
8147         parameter.
8148         (write_var_or_type, write_name_assoc): Update.
8149
8150 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8151
8152         * windows-nat.c (windows_nat_target::xfer_partial): Return
8153         TARGET_XFER_E_IO if we need to delegate to the target beneath
8154         but BENEATH is NULL.
8155
8156 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8157
8158         * Makefile.in (config.status): Add configure.nat as a
8159         dependency.
8160
8161 2018-06-04  Tom Tromey  <tom@tromey.com>
8162
8163         * cp-name-parser.y (cpname_state): Add method declarations.
8164         (HANDLE_QUAL): Update.
8165         (cpname_state::d_grab, cpname_state::fill_comp)
8166         (cpname_state::make_operator, cpname_state::make_dtor)
8167         (cpname_state::make_builtin_type, cpname_state::make_name)
8168         (cpname_state::d_qualify, cpname_state::d_int_type)
8169         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8170         (%union): Move earlier.
8171
8172 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8173
8174         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8175
8176 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8177
8178         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8179         (aarch64_pseudo_write_1): Likewise.
8180         (aarch64_pseudo_read_value): Use helper.
8181         (aarch64_pseudo_write): Likewise.
8182
8183 2018-06-04  Pedro Alves  <palves@redhat.com>
8184
8185         * darwin-nat.c (darwin_ops): Delete.
8186         (darwin_attach_pid): Use get_native_target.
8187
8188 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8189
8190         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8191         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8192
8193 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8194
8195         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8196         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8197         (aarch64_gdbarch_init): Check for SVE.
8198         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8199
8200 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8201
8202         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8203         * aarch64-tdep.h (aarch64_read_description): Likewise.
8204         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8205         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8206         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8207         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8208         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8209
8210 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8211
8212         * value.c (value_fetch_lazy_bitfield): New.
8213         (value_fetch_lazy_memory): New.
8214         (value_fetch_lazy_register): New.
8215         (value_fetch_lazy): Factor out to smaller functions.
8216
8217 2018-06-01  Tom Tromey  <tom@tromey.com>
8218
8219         * cp-name-parser.y (backslashable, represented): Now const.
8220
8221 2018-06-01  Tom Tromey  <tom@tromey.com>
8222
8223         * cp-name-parser.y: Include parser-defs.h.
8224         (parser_fprintf): Remove declaration.
8225
8226 2018-06-01  Tom Tromey  <tom@tromey.com>
8227
8228         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8229         %parse-param.
8230         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8231         (global_result): Remove globals.
8232         (struct cpname_state): New.
8233         (yyparse): Don't declare.
8234         (yylex, yyerror): Move declarations after %union.
8235         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8236         (make_name): Add state parameter.
8237         Update all callers.
8238         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8239         parameter.
8240         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8241         Update.
8242         (yylex): Add lvalp, state parameters.
8243         (yyerror): Add state parameter.
8244         (cp_demangled_name_to_comp): Update.
8245
8246 2018-06-01  Tom Tromey  <tom@tromey.com>
8247
8248         * cp-name-parser.y (parser_fprintf): Declare.
8249         (GDB_YY_REMAP_PREFIX): Define.
8250         Include yy-remap.h.  Don't redefine yy* identifiers.
8251
8252 2018-06-01  Tom Tromey  <tom@tromey.com>
8253
8254         * python/py-type.c (typy_legacy_template_argument): Update.
8255         * cp-support.h (cp_demangled_name_to_comp): Update.
8256         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8257         parameter to be a "std::string *".
8258         (main): Update.
8259
8260 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8261
8262         * ada-lex.l: Include "diagnostics.h" instead of
8263         "common/diagnostics.h".
8264         * unittests/environ-selftests.c: Likewise.
8265         * common/diagnostics.h: Moved to ../include.
8266
8267 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8268
8269         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8270         to language_mode_manual while calling breakpoint_re_set_one.
8271
8272 2018-06-01  Tom Tromey  <tom@tromey.com>
8273
8274         * valops.c (value_cast_structs, destructor_name_p): Update.
8275         * symtab.c (gdb_mangle_name): Update.
8276         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8277         Update.
8278         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8279         (pascal_object_print_value_fields, pascal_object_print_value):
8280         Update.
8281         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8282         * linespec.c (find_methods): Update.
8283         * gdbtypes.h (type_name_no_tag): Remove.
8284         (type_name_or_error): Rename from type_name_no_tag_or_error.
8285         * gdbtypes.c (type_name_no_tag): Remove.
8286         (type_name_or_error): Rename from type_name_no_tag_or_error.
8287         (lookup_struct_elt_type, check_typedef): Update.
8288         * expprint.c (print_subexp_standard): Update.
8289         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8290         * d-namespace.c (d_lookup_nested_symbol): Update.
8291         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8292         (cp_print_class_member): Update.
8293         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8294         * completer.c (add_struct_fields): Update.
8295         * c-typeprint.c (cp_type_print_derivation_info)
8296         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8297         Update.
8298         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8299         (ada_prefer_type, ada_is_exception_sym): Update.
8300
8301 2018-06-01  Tom Tromey  <tom@tromey.com>
8302
8303         * valops.c (enum_constant_from_type, value_namespace_elt)
8304         (value_maybe_namespace_elt): Update.
8305         * valarith.c (find_size_for_pointer_math): Update.
8306         * target-descriptions.c (make_gdb_type): Update.
8307         * symmisc.c (print_symbol): Update.
8308         * stabsread.c (define_symbol, read_type)
8309         (complain_about_struct_wipeout, add_undefined_type)
8310         (cleanup_undefined_types_1): Update.
8311         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8312         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8313         (rust_internal_print_type, rust_composite_type)
8314         (rust_evaluate_funcall, rust_evaluate_subexp)
8315         (rust_inclusive_range_type_p): Update.
8316         * python/py-type.c (typy_get_tag): Update.
8317         * p-typeprint.c (pascal_type_print_base): Update.
8318         * mdebugread.c (parse_symbol, parse_type): Update.
8319         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8320         Update.
8321         * guile/scm-type.c (gdbscm_type_tag): Update.
8322         * go-lang.c (sixg_string_p): Update.
8323         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8324         Update.
8325         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8326         (TYPE_TAG_NAME): Remove.
8327         * gdbtypes.c (type_name_no_tag): Simplify.
8328         (check_typedef, check_types_equal, recursive_dump_type)
8329         (copy_type_recursive, arch_composite_type): Update.
8330         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8331         in summary mode when needed.
8332         * eval.c (evaluate_funcall): Update.
8333         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8334         (process_structure_scope, read_enumeration_type)
8335         (read_namespace_type, read_module_type, determine_prefix): Update.
8336         * cp-support.c (inspect_type): Update.
8337         * coffread.c (process_coff_symbol, decode_base_type): Update.
8338         * c-varobj.c (c_is_path_expr_parent): Update.
8339         * c-typeprint.c (c_type_print_base_struct_union): Update.
8340         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8341         summary when using C language.
8342         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8343         (gen_maybe_namespace_elt): Update.
8344         * ada-lang.c (ada_type_name): Simplify.
8345         (empty_record, ada_template_to_fixed_record_type_1)
8346         (template_to_static_fixed_type)
8347         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8348
8349 2018-06-01  Tom Tromey  <tom@tromey.com>
8350
8351         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8352         c_print_type.
8353         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8354         (c_print_type): Update.
8355         (c_print_type): New overload.
8356         (c_type_print_varspec_prefix, c_type_print_args)
8357         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8358         (c_type_print_base_struct_union, c_type_print_base_1)
8359         (cp_type_print_method_args): Add "language" parameter.
8360         (c_type_print_base): Update.
8361         * c-lang.h (c_print_type): Add new overload.
8362
8363 2018-06-01  Tom Tromey  <tom@tromey.com>
8364
8365         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8366         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8367
8368 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8369
8370         * aarch64-tdep.c (aarch64_sve_register_names): New const
8371         var.
8372         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8373         (AARCH64_SVE_Z_REGS_NUM): New define.
8374         (AARCH64_SVE_P_REGS_NUM): Likewise.
8375         (AARCH64_SVE_NUM_REGS): Likewise.
8376
8377 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8378
8379         * nat/linux-ptrace.h [__alpha__]
8380         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8381         definitions.
8382
8383 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8384
8385         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8386         the endianness selected.
8387         * NEWS: Document `set endian auto' mode operation update.
8388
8389 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8390
8391         * Makefile.in: Add new header.
8392         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8393         (sve_vl_from_vg): Likewise.
8394         (sve_vq_from_vl): Likewise.
8395         (sve_vl_from_vq): Likewise.
8396         (sve_vq_from_vg): Likewise.
8397         (sve_vg_from_vq): Likewise.
8398         * configure.nat: Add new c file.
8399         * nat/aarch64-sve-linux-ptrace.c: New file.
8400         * nat/aarch64-sve-linux-ptrace.h: New file.
8401
8402 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8403
8404         * aarch64-linux-nat.c (aarch64_linux_read_description):
8405         Add parmeter zero.
8406         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8407         Likewise.
8408         * aarch64-tdep.c (tdesc_aarch64_list): Add.
8409         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8410         (aarch64_gdbarch_init): Add parmeter zero.
8411         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8412         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8413         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8414         parmeter.
8415         * doc/gdb.texinfo: Describe SVE feature
8416         * features/aarch64-sve.c: New file.
8417
8418 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
8419
8420         PR gdb/23210
8421         * gdbarch.sh (significant_addr_bit): Default to zero when
8422         not set by target architecture.
8423         * gdbarch.c: Re-generated.
8424         * utils.c (address_significant): Update.
8425
8426 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
8427
8428         * stack.c (func_command): Remove trailing newline in call to error.
8429
8430 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8431
8432         * regcache.h (regcache_raw_collect): Remove, update callers to
8433         use regcache::raw_collect.
8434         * regcache.c (regcache_raw_collect): Remove.
8435
8436 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8437
8438         * regcache.h (regcache_raw_supply): Remove, update callers to
8439         use detached_regcache::raw_supply.
8440         * regcache.c (regcache_raw_supply): Remove.
8441
8442 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8443
8444         * regcache.h (regcache_cooked_write_part): Remove, update
8445         callers to use regcache::cooked_write_part.
8446         * regcache.c (regcache_cooked_write_part): Remove.
8447
8448 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8449
8450         * regcache.h (regcache_cooked_read_part): Remove, update callers
8451         to use readable_regcache::cooked_read_part.
8452         * regcache.c (regcache_cooked_read_part): Remove.
8453
8454 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8455
8456         * regcache.h (regcache_cooked_read_value): Remove, update
8457         callers to use readable_regcache::cooked_read_value.
8458         * regcache.c (regcache_cooked_read_value): Remove.
8459
8460 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8461
8462         * regcache.h (regcache_cooked_write): Remove, update callers to
8463         use regcache::cooked_write.
8464         * regcache.c (regcache_cooked_write): Remove.
8465
8466 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8467
8468         * regcache.h (regcache_invalidate): Remove, update callers to
8469         use detached_regcache::invalidate instead.
8470         * regcache.c (regcache_invalidate): Remove.
8471
8472 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8473
8474         * regcache.h (regcache_raw_write_part): Remove, update callers
8475         to use regcache::raw_write_part instead.
8476         * regcache.c (regcache_raw_write_part): Remove.
8477
8478 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8479
8480         * regcache.h (regcache_raw_read_part): Remove, update callers to
8481         use readable_regcache::raw_read_part instead.
8482         * regcache.c (regcache_raw_read_part): Remove.
8483
8484 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8485
8486         * regcache.h (regcache_cooked_read): Remove, update callers to
8487         use readable_regcache::cooked_read instead.
8488         * regcache.c (regcache_cooked_read): Remove.
8489
8490 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8491
8492         * regcache.h (regcache_raw_write): Remove, update callers to use
8493         regcache::raw_write instead.
8494         * regcache.c (regcache_raw_write): Remove.
8495
8496 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8497
8498         * regcache.h (regcache_raw_read): Remove, update callers to use
8499         readable_regcache::raw_read instead.
8500         * regcache.c (regcache_raw_read): Remove.
8501
8502 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8503
8504         * regcache.h (regcache_raw_update): Remove, update callers to
8505         use readable_regcache::raw_update instead.
8506         * regcache.c (regcache_raw_update): Remove.
8507
8508 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8509
8510         * regcache.h (regcache_register_status): Remove, update callers
8511         to use reg_buffer::get_register_status directly instead.
8512         * regcache.c (regcache_register_status): Remove.
8513
8514 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8515
8516         * regcache.h (regcache_get_ptid): Remove, update all callers to
8517         call regcache::ptid instead.
8518         * regcache.c (regcache_get_ptid): Remove.
8519
8520 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8521
8522         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
8523
8524 2018-05-30  Pedro Alves  <palves@redhat.com>
8525
8526         * common/common-exceptions.h (exception_rethrow): Use
8527         ATTRIBUTE_NORETURN.
8528
8529 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
8530
8531         * breakpoint.c (print_solib_event, check_status_catch_solib):
8532         Remove struct keyword in range-based for loops.
8533         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
8534         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
8535         Likewise.
8536         * linespec.c (find_superclass_methods, search_minsyms_for_name):
8537         Likewise.
8538         * symfile.c (addr_info_make_relative): Likewise.
8539         * thread.c (value_in_thread_stack_temporaries): Likewise.
8540
8541 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
8542
8543         PR gdb/16841
8544         * valops.c (value_struct_elt_for_reference): Call check_typedef on
8545         aggregate type to get its real type before accessing it.
8546
8547 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
8548
8549         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
8550         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
8551         * coff-pe-read.c (add_pe_forwarded_sym): Replace
8552         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
8553         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
8554         * jit.c (jit_breakpoint_re_set_internal): Likewise.
8555         * printcmd.c (info_address_command): Likewise.
8556
8557 2018-05-29  Tom Tromey  <tom@tromey.com>
8558
8559         * windows-nat.c (handle_exception): Update fall-through comment.
8560
8561 2018-05-29  Tom Tromey  <tom@tromey.com>
8562
8563         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
8564         (struct program_space) <added_solibs>: Now a std::vector.
8565         * breakpoint.c (print_solib_event): Update.
8566         (check_status_catch_solib): Update.
8567         * progspace.c (clear_program_space_solib_cache): Update.
8568         * solib.c (update_solib_list): Update.
8569
8570 2018-05-29  Tom Tromey  <tom@tromey.com>
8571
8572         * python/py-type.c (typy_richcompare): Update.
8573         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
8574         * gdbtypes.h (types_deeply_equal): Return bool.
8575         (types_equal): Likewise.
8576         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
8577         declare VEC.
8578         (check_types_equal): Change worklist to std::vector.  Return
8579         bool.
8580         (struct type_equality_entry): Add constructor.
8581         (compare_maybe_null_strings): Return bool.
8582         (check_types_worklist): Return bool.  Change worklist to
8583         std::vector.
8584         (types_deeply_equal): Use std::vector.
8585         (types_equal): Return bool.
8586         (compare_maybe_null_strings): Simplify.
8587
8588 2018-05-29  Tom Tromey  <tom@tromey.com>
8589
8590         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
8591
8592 2018-05-29  Tom Tromey  <tom@tromey.com>
8593
8594         * objc-lang.h: Don't include cp-support.h.
8595         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
8596         declare VEC.
8597
8598 2018-05-27  Tom Tromey  <tom@tromey.com>
8599
8600         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
8601
8602 2018-05-25  Tom Tromey  <tom@tromey.com>
8603
8604         * value.c (value::location): Initialize.
8605
8606 2018-05-25  Tom Tromey  <tom@tromey.com>
8607
8608         * dbxread.c (init_bincl_list): Remove.
8609         (bincl_list): Now a std::vector.
8610         (bincls_allocated, next_bincl): Remove.
8611         (free_bincl_list, do_free_bincl_list_cleanup)
8612         (make_cleanup_free_bincl_list): Remove.
8613         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
8614         unique_xmalloc_ptr.
8615         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
8616         (struct header_file_location): Add constructor.
8617         (add_bincl_to_list): Remove.
8618
8619 2018-05-25  Tom Tromey  <tom@tromey.com>
8620
8621         * tui/tui.c (tui_enable): Update.
8622         * mi/mi-interp.c (mi_interp::init): Update.
8623         * interps.h (class interp) <name>: New method.
8624         <m_name>: Rename from name.
8625         (~scoped_restore_interp): Update.
8626         * interps.c (interp::interp): Update.
8627         (interp_add, interp_set, interp_lookup_existing)
8628         (current_interp_named_p): Update.
8629
8630 2018-05-25  Tom Tromey  <tom@tromey.com>
8631
8632         * interps.c (interp_name): Remove.
8633         * mi/mi-interp.c (mi_interp::init): Update.
8634         * interps.h (interp_name): Remove.
8635         (~scoped_restore_interp): Update.
8636         * tui/tui.c (tui_enable): Update.
8637
8638 2018-05-25  Tom Tromey  <tom@tromey.com>
8639
8640         * utils.c (fputs_maybe_filtered): Update.
8641         * linespec.c (decode_line_full): Update.
8642         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
8643         (mi_print_breakpoint_for_event, mi_solib_loaded)
8644         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
8645         (mi_user_selected_context_changed): Update.
8646         * mi/mi-main.c (mi_execute_command): Update.
8647         * cli/cli-script.c (execute_control_command): Update.
8648         * python/python.c (execute_gdb_command): Update.
8649         * solib.c (info_sharedlibrary_command): Update.
8650         * interps.c (interp_ui_out): Remove.
8651         * interps.h (interp_ui_out): Remove.
8652
8653 2018-05-25  Tom Tromey  <tom@tromey.com>
8654
8655         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
8656         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
8657         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
8658
8659 2018-05-25  Tom Tromey  <tom@tromey.com>
8660
8661         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
8662         * interps.c (interp_exec): Use scoped_restore.
8663
8664 2018-05-25  Tom Tromey  <tom@tromey.com>
8665
8666         * remote.c (remote_target::remote_file_get): Use
8667         gdb::byte_vector.
8668         (remote_target::remote_file_put): Likewise.
8669
8670 2018-05-25  Tom Tromey  <tom@tromey.com>
8671
8672         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
8673         a std::string.
8674         (get_pe_section_index, add_pe_exported_sym): Update.
8675         (read_pe_exported_syms): Use gdb::def_vector.
8676
8677 2018-05-25  Tom Tromey  <tom@tromey.com>
8678
8679         * frame.c (remove_prev_frame): Remove.
8680         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
8681
8682 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
8683
8684         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
8685         Remove prototypes.
8686         * mips-linux-nat.c (supply_fpregset): Always call
8687         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
8688         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
8689         `mips_fill_fpregset'.
8690         * mips-linux-tdep.c (mips_supply_fpregset)
8691         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
8692         (mips_fill_fpregset_wrapper): Remove functions.
8693         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
8694         (mips_linux_fpregset): Remove variable.
8695         (mips_linux_iterate_over_regset_sections): Use
8696         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
8697         (mips_linux_o32_sigframe_init): Remove comment.
8698
8699 2018-05-25  Pedro Alves  <palves@redhat.com>
8700
8701         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
8702         (struct readahead_cache, struct packet_reg, struct
8703         remote_arch_state, class remote_state): Move higher up in the
8704         file.
8705         (remote_target::m_remote_state): Now an object instead of a pointer.
8706         (remote_target::get_remote_state): Adjust.
8707
8708 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8709
8710         * stack.c (select_and_print_frame): Delete.
8711         (struct function_bounds): Move struct within function.
8712         (func_command): Most content moved into new function
8713         find_frame_for_function, use new function, print result, add
8714         function comment.
8715         (find_frame_for_function): New function, now returns a result.
8716
8717 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8718
8719         * stack.c (iterate_over_block_arg_vars): Fix comment.
8720         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
8721
8722 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8723
8724         PR gdb/23203
8725         * frame.c
8726         (scoped_restore_selected_frame::scoped_restore_selected_frame):
8727         Define.
8728         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8729         Define.
8730         * frame.h (class scoped_restore_selected_frame): New class.
8731         * stack.c (print_frame_local_vars): Remove catching and rethrowing
8732         of any exception, use scoped_restore_selected_frame to restore the
8733         frame instead.
8734
8735 2018-05-24  Pedro Alves  <palves@redhat.com>
8736
8737         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8738         override.
8739
8740 2018-05-23  Tom Tromey  <tom@tromey.com>
8741
8742         * complaints.c (struct complaints): Remove.
8743         (symfile_complaint_book): Remove.
8744         (series): New global.
8745         (complaint_internal): Update.
8746         (clear_complaints): Update.
8747
8748 2018-05-23  Tom Tromey  <tom@tromey.com>
8749
8750         * complaints.c (counters): New global.
8751         (struct complain): Remove.
8752         (struct complaints) <root>: Remove.
8753         (complaint_sentinel): Remove.
8754         (symfile_complaint_book): Update.
8755         (find_complaint) Remove.
8756         (complaint_internal, clear_complaints): Update.
8757
8758 2018-05-23  Tom Tromey  <tom@tromey.com>
8759
8760         * complaints.c (struct complain) <file, line>: Remove.
8761         (find_complaint): Remove file, line parameters.
8762         (complaint_internal): Update.
8763
8764 2018-05-23  Tom Tromey  <tom@tromey.com>
8765
8766         * complaints.c (vcomplaint): Remove.
8767         (complaint_internal) Merge in contents of vcomplaint.
8768
8769 2018-05-23  Tom Tromey  <tom@tromey.com>
8770
8771         * complaints.c (struct complaints) <explanation>: Remove.
8772         (symfile_explanations): Remove.
8773         (symfile_complaint_book): Update.
8774         (vcomplaint): Update.
8775         (struct explanation): Remove.
8776
8777 2018-05-23  Tom Tromey  <tom@tromey.com>
8778
8779         * complaints.c (symfile_complaints): Remove.
8780         (complaint_internal): Remove "complaints" parameter.
8781         (clear_complaints, vcomplaint): Remove "c" parameter.
8782         (get_complaints): Remove.
8783         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8784         (dwarf2_debug_line_missing_file_complaint)
8785         (dwarf2_debug_line_missing_end_sequence_complaint)
8786         (dwarf2_complex_location_expr_complaint)
8787         (dwarf2_const_value_length_mismatch_complaint)
8788         (dwarf2_section_buffer_overflow_complaint)
8789         (dwarf2_macro_malformed_definition_complaint)
8790         (dwarf2_invalid_attrib_class_complaint)
8791         (create_addrmap_from_index, dw2_symtab_iter_next)
8792         (dw2_expand_marked_cus)
8793         (dw2_debug_names_iterator::find_vec_in_debug_names)
8794         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8795         (create_debug_type_hash_table, init_cutu_and_read_dies)
8796         (partial_die_parent_scope, add_partial_enumeration)
8797         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8798         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8799         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8800         (create_cus_hash_table, create_dwp_hash_table)
8801         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8802         (dwarf2_rnglists_process, dwarf2_ranges_process)
8803         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8804         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8805         (handle_struct_member_die, process_structure_scope)
8806         (read_array_type, read_common_block, read_module_type)
8807         (read_tag_pointer_type, read_typedef, read_base_type)
8808         (read_subrange_type, load_partial_dies, partial_die_info::read)
8809         (partial_die_info::read, partial_die_info::read)
8810         (partial_die_info::read, read_checked_initial_length_and_offset)
8811         (dwarf2_string_attr, read_formatted_entries)
8812         (dwarf_decode_line_header)
8813         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8814         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8815         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8816         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8817         (get_signatured_type, get_DW_AT_signature_type)
8818         (decode_locdesc, file_file_name, consume_improper_spaces)
8819         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8820         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8821         (dwarf2_symbol_mark_computed, set_die_type)
8822         (read_attribute_value): Update.
8823         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8824         Update.
8825         * dbxread.c (unknown_symtype_complaint)
8826         (lbrac_mismatch_complaint, repeated_header_complaint)
8827         (set_namestring, function_outside_compilation_unit_complaint)
8828         (read_dbx_symtab, process_one_symbol): Update.
8829         * gdbtypes.c (stub_noname_complaint): Update.
8830         * windows-nat.c (handle_unload_dll): Update.
8831         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8832         (decode_base_type): Update.
8833         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8834         (eb_complaint, record_include_begin, record_include_end)
8835         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8836         (process_xcoff_symbol, read_symbol)
8837         (function_outside_compilation_unit_complaint)
8838         (scan_xcoff_symtab): Update.
8839         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8840         * buildsym.c (finish_block_internal, make_blockvector)
8841         (end_symtab_get_static_block, augment_type_symtab): Update.
8842         * dtrace-probe.c (dtrace_process_dof)
8843         (dtrace_static_probe_ops::get_probes): Update.
8844         * complaints.h (struct complaint): Don't declare.
8845         (symfile_complaints): Remove.
8846         (complaint_internal): Remove "complaints" parameter.
8847         (complaint): Likewise.
8848         (clear_complaints): Likewise.
8849         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8850         (reread_symbols): Update.
8851         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8852         (dwarf2_frame_cache, decode_frame_entry): Update.
8853         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8854         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8855         (info_selectors_command): Update.
8856         * macrotab.c (macro_include, check_for_redefinition)
8857         (macro_undef): Update.
8858         * objfiles.c (filter_overlapping_sections): Update.
8859         * stabsread.c (invalid_cpp_abbrev_complaint)
8860         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8861         (define_symbol, error_type, read_type, rs6000_builtin_type)
8862         (stabs_method_name_from_physname, read_member_functions)
8863         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8864         (attach_fields_to_type, complain_about_struct_wipeout)
8865         (read_range_type, read_args, common_block_start)
8866         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8867         Update.
8868         * mdebugread.c (index_complaint, unknown_ext_complaint)
8869         (basic_type_complaint, bad_tag_guess_complaint)
8870         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8871         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8872         (parse_procedure, parse_lines)
8873         (function_outside_compilation_unit_complaint)
8874         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8875         (bad_tag_guess_complaint, reg_value_complaint): Update.
8876         * cp-support.c (demangled_name_complaint): Update.
8877         * macroscope.c (sal_macro_scope): Update.
8878         * dwarf-index-write.c (class debug_names): Update.
8879
8880 2018-05-23  Tom Tromey  <tom@tromey.com>
8881
8882         * complaints.c (clear_complaints): Remove "noisy" parameter.
8883         * complaints.h (clear_complaints): Update.
8884         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8885         (reread_symbols): Update.
8886
8887 2018-05-23  Tom Tromey  <tom@tromey.com>
8888
8889         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8890         SUBSEQUENT_MESSAGE.
8891         (vcomplaint, clear_complaints): Update.
8892         (symfile_explanations): Remove some messages.
8893
8894 2018-05-23  Tom Tromey  <tom@tromey.com>
8895
8896         * complaints.c (internal_complaint): Remove.
8897         * complaints.h (internal_complaint): Remove.
8898
8899 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8900
8901         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8902
8903 2018-05-22  Pedro Alves  <palves@redhat.com>
8904
8905         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8906         (remote_fileio_badfd, remote_fileio_return_errno)
8907         (remote_fileio_return_success, remote_fileio_func_open)
8908         (remote_fileio_func_open, remote_fileio_func_close)
8909         (remote_fileio_func_read, remote_fileio_func_write)
8910         (remote_fileio_func_lseek, remote_fileio_func_rename)
8911         (remote_fileio_func_unlink, remote_fileio_func_stat)
8912         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8913         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8914         remote_target parameter.
8915         (remote_fio_func_map) <func>: Add remote_target parameter.
8916         (do_remote_fileio_request, remote_fileio_request):
8917         * remote-fileio.h (remote_fileio_request):
8918         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8919         remote_target parameter.
8920         (remote_notif_process, handle_notification): Adjust to pass down
8921         the remote.
8922         (remote_notif_state_allocate): Add remote_target parameter.  Save
8923         it.
8924         * remote-notif.h (struct remote_target): Forward declare.
8925         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8926         remote_target parameter.
8927         (struct remote_notif_state) <remote>: New field.
8928         (remote_notif_ack, remote_notif_parse): Add remote_target
8929         parameter.
8930         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8931         remote_target parameter.
8932         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8933         (threads_listing_context, rmt_thread_action, protocol_feature)
8934         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8935         (packet_result, struct threads_listing_context, remote_state):
8936         Move definitions and declarations higher up.
8937         (remote_target) <~remote_target>: Declare.
8938         (remote_download_command_source, remote_file_put, remote_file_get)
8939         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8940         (remote_hostio_pread_vFile, remote_hostio_send_command)
8941         (remote_hostio_set_filesystem, remote_hostio_open)
8942         (remote_hostio_close, remote_hostio_unlink, remote_state)
8943         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8944         (get_memory_write_packet_size, get_memory_read_packet_size)
8945         (append_pending_thread_resumptions, remote_detach_1)
8946         (append_resumption, remote_resume_with_vcont)
8947         (add_current_inferior_and_thread, wait_ns, wait_as)
8948         (process_stop_reply, remote_notice_new_inferior)
8949         (process_initial_stop_replies, remote_add_thread)
8950         (btrace_sync_conf, remote_btrace_maybe_reopen)
8951         (remove_new_fork_children, kill_new_fork_children)
8952         (discard_pending_stop_replies, stop_reply_queue_length)
8953         (check_pending_events_prevent_wildcard_vcont)
8954         (discard_pending_stop_replies_in_queue, stop_reply)
8955         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8956         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8957         (remote_interrupt_as, remote_interrupt_ns)
8958         (remote_get_noisy_reply, remote_query_attached)
8959         (remote_add_inferior, remote_current_thread, get_current_thread)
8960         (set_thread, set_general_thread, set_continue_thread)
8961         (set_general_process, write_ptid)
8962         (remote_unpack_thread_info_response, remote_get_threadinfo)
8963         (parse_threadlist_response, remote_get_threadlist)
8964         (remote_threadlist_iterator, remote_get_threads_with_ql)
8965         (remote_get_threads_with_qxfer)
8966         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8967         (get_offsets, remote_check_symbols, remote_supported_packet)
8968         (remote_query_supported, remote_packet_size)
8969         (remote_serial_quit_handler, remote_detach_pid)
8970         (remote_vcont_probe, remote_resume_with_hc)
8971         (send_interrupt_sequence, interrupt_query)
8972         (remote_notif_get_pending_events, fetch_register_using_p)
8973         (send_g_packet, process_g_packet, fetch_registers_using_g)
8974         (store_register_using_P, store_registers_using_G)
8975         (set_remote_traceframe, check_binary_download)
8976         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8977         (remote_xfer_live_readonly_partial, remote_read_bytes)
8978         (remote_send_printf, remote_flash_write, readchar)
8979         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8980         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8981         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8982         (extended_remote_disable_randomization, extended_remote_run)
8983         (send_environment_packet, extended_remote_environment_support)
8984         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8985         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8986         (packet_command): Now methods of ...
8987         (remote_target): ... this class.
8988         (m_remote_state) <remote_target>: New field.
8989         (struct remote_state) <stop_reply_queue,
8990         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8991         fields.
8992         (remote_state::remote_state): Allocate stop_reply_queue.
8993         (remote_state): Delete global.
8994         (get_remote_state_raw): Delete.
8995         (remote_target::get_remote_state): Allocate m_remote_state on
8996         demand.
8997         (get_current_remote_target): New.
8998         (remote_ops, extended_remote_ops): Delete.
8999         (wait_forever_enabled_p, remote_async_inferior_event_token):
9000         Delete, moved to struct remote_state.
9001         (remote_target::close): Delete self.  Destruction bits split to
9002         ...
9003         (remote_target::~remote_target): ... this.
9004         (show_memory_packet_size): Adjust to use
9005         get_current_remote_target.
9006         (struct protocol_feature) <func>: Add remote_target parameter.
9007         All callers adjusted.
9008         (curr_quit_handler_target): New.
9009         (remote_serial_quit_handler): Reimplement.
9010         (remote_target::open_1): Adjust to use get_current_remote_target.
9011         Heap-allocate remote_target/extended_remote_target instances.
9012         (vcont_builder::vcont_builder): Add remote_target parameter, and
9013         save it in m_remote.  All callers adjusted.
9014         (vcont_builder::m_remote): New field.
9015         (vcont_builder::restart, vcont_builder::flush)
9016         (vcont_builder::push_action): Use it.
9017         (remote_target::commit_resume): Use it.
9018         (struct queue_iter_param) <remote>: New field.
9019         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9020         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9021         (check_pending_event_prevents_wildcard_vcont_callback)
9022         (remote_target::check_pending_events_prevent_wildcard_vcont)
9023         (remote_target::discard_pending_stop_replies)
9024         (remote_target::discard_pending_stop_replies_in_queue)
9025         (remote_target::remote_notif_remove_queued_reply): Fill in
9026         'remote' field.
9027         (remote_notif_get_pending_events): New.
9028         (remote_target::readchar, remote_target::remote_serial_write):
9029         Save/restore curr_quit_handler_target.
9030         (putpkt): New.
9031         (kill_new_fork_children): Fill in 'remote' field.
9032         (packet_command): Use get_current_remote_target, defer to
9033         remote_target method of same name.
9034         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9035         parameter, and save it in m_remote.  All callers adjusted.
9036         (scoped_remote_fd::release): Use m_remote.
9037         (scoped_remote_fd::m_remote): New field.
9038         (remote_file_put, remote_file_get, remote_file_delete): Use
9039         get_current_remote_target, defer to remote_target method of same
9040         name.
9041         (remote_btrace_reset): Add remote_state paremeter.  Update all
9042         callers.
9043         (remote_async_inferior_event_handler). Pass down 'data'.
9044         (remote_new_objfile): Use get_current_remote_target.
9045         (remote_target::vcont_r_supported): New.
9046         (set_range_stepping): Use get_current_remote_target and
9047         remote_target::vcont_r_supported.
9048         (_initialize_remote): Don't allocate 'remote_state' and
9049         'stop_reply_queue' globals.
9050         * remote.h (struct remote_target): Forward declare.
9051         (getpkt, putpkt, remote_notif_get_pending_events): Add
9052         'remote_target' parameter.
9053
9054 2018-05-22  Pedro Alves  <palves@redhat.com>
9055
9056         * remote.c (vcont_builder): Now a class.  Make all data members
9057         private.
9058         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9059         Declare methods.
9060         (vcont_builder_restart): Rename to ...
9061         (vcont_builder::restart): ... this.
9062         (vcont_builder_flush): Rename to ...
9063         (vcont_builder::flush): ... this.
9064         (vcont_builder_push_action): Rename to ...
9065         (vcont_builder::push_action): ... this.
9066         (remote_target::commit_resume): Adjust.
9067
9068 2018-05-22  Pedro Alves  <palves@redhat.com>
9069
9070         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9071         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9072         (get_fixed_memory_packet_size): New.
9073         (get_memory_packet_size): Use it.
9074         (set_memory_packet_size): Don't override the config size with
9075         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9076         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9077         Don't refer to get_memory_packet_size if not connected to a remote
9078         target.  Show "(default)" if configured size is 0.
9079
9080 2018-05-22  Pedro Alves  <palves@redhat.com>
9081
9082         * remote.c (remote_target::mourn_inferior): Move
9083         discard_pending_stop_replies call here from ...
9084         (_initialize_remote): ... here.
9085
9086 2018-05-22  Pedro Alves  <palves@redhat.com>
9087
9088         * remote.c (compare_section_command): Remove set_general_process
9089         call.
9090
9091 2018-05-22  Pedro Alves  <palves@redhat.com>
9092
9093         * remote.c (struct packet_reg, struct remote_arch_state):
9094         Move higher up in the file.
9095         (remote_state) <m_arch_states>: Store remote_arch_state values
9096         instead of remote_arch_state pointers.
9097         (remote_state::get_remote_arch_state): Adjust.
9098
9099 2018-05-22  Pedro Alves  <palves@redhat.com>
9100
9101         * remote.c: Include <unordered_map>.
9102         (remote_state): Now a class.
9103         (remote_state) <get_remote_arch_state>: Declare method.
9104         <get_remote_arch_state>: New field.
9105         (remote_arch_state) <remote_arch_state>: Declare ctor.
9106         <regs>: Now a unique_ptr.
9107         (remote_gdbarch_data_handle): Delete.
9108         (get_remote_arch_state): Delete.
9109         (remote_state::get_remote_arch_state): New.
9110         (get_remote_state): Adjust to call remote_state's
9111         get_remote_arch_state method.
9112         (init_remote_state): Delete, bits factored out to ...
9113         (remote_arch_state::remote_arch_state): ... this new method.
9114         (get_remote_packet_size, get_memory_packet_size)
9115         (process_g_packet, remote_target::fetch_registers)
9116         (remote_target::prepare_to_store, store_registers_using_G)
9117         (remote_target::store_registers, remote_target::get_trace_status):
9118         Adjust to call remote_state's method.
9119         (_initialize_remote): Remove reference to
9120         remote_gdbarch_data_handle.
9121
9122 2018-05-22  Pedro Alves  <palves@redhat.com>
9123
9124         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9125         pread>: New method declarations.
9126         (remote_target::open_1): Adjust.
9127         (readahead_cache_invalidate): Rename to ...
9128         (readahead_cache::invalidate): ... this, and adjust to be a class
9129         method.
9130         (readahead_cache_invalidate_fd): Rename to ...
9131         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9132         class method.
9133         (remote_hostio_pwrite): Adjust.
9134         (remote_hostio_pread_from_cache): Rename to ...
9135         (readahead_cache::pread): ... this, and adjust to be a class
9136         method.
9137         (remote_hostio_close): Adjust.
9138
9139 2018-05-22  Pedro Alves  <palves@redhat.com>
9140
9141         * remote.c (remote_hostio_close_cleanup): Delete.
9142         (class scoped_remote_fd): New.
9143         (remote_file_put, remote_file_get): Use it.
9144
9145 2018-05-22  Pedro Alves  <palves@redhat.com>
9146
9147         (struct vCont_action_support): Use bool and initialize all fields.
9148         (struct readahead_cache): Initialize all fields.
9149         (remote_state): Use bool and initialize all fields.
9150         (remote_state::remote_state, remote_state::~remote_state): New.
9151         (new_remote_state): Delete.
9152         (_initialize_remote): Use new to allocate remote_state.
9153
9154 2018-05-22  Pedro Alves  <palves@redhat.com>
9155             張俊芝  <zjz@zjz.name>
9156
9157         PR gdb/22973
9158         * c-exp.y: Include "c-support.h".
9159         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9160         of tolower.  Use c_ident_is_alpha to scan names.
9161         * c-lang.c: Include "c-support.h".
9162         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9163         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9164         * c-support.h: New file, with bits factored out from ...
9165         * cp-name-parser.y: ... this file.
9166         Include "c-support.h".
9167         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9168         c-support.h and renamed.
9169         (symbol_end, yylex): Adjust.
9170
9171 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9172
9173         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9174         parameter type to CORE_ADDR.
9175         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9176         parameter type in declaration to CORE_ADDR.
9177         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9178         target_auxv_search to get AT_HWCAP and use the result to get the
9179         target description.
9180         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9181         to CORE_ADDR. Remove the cast of the return value to unsigned
9182         long. Fix error predicate of target_auxv_search.
9183         (ppc_linux_nat_target::read_description): Change the type of the
9184         hwcap variable to CORE_ADDR.
9185
9186 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9187
9188         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9189         if the size of fpscr is larger than 32 bits.
9190
9191 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9192
9193         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9194         (ppc32_linux_vsxregmap): New global.
9195         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9196         regcache_supply_regset, and regcache_collect_regset.
9197         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9198         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9199         (fetch_vsx_register, store_vsx_register): Remove.
9200         (fetch_vsx_registers): Add regno parameter. Get regset using
9201         ppc_linux_vsxregset. Use regset to supply registers.
9202         (store_vsx_registers): Add regno parameter. Get regset using
9203         ppc_linux_vsxregset. Use regset to collect registers.
9204         (fetch_register): Call fetch_vsx_registers instead of
9205         fetch_vsx_register.
9206         (store_register): Call store_vsx_registers instead of
9207         store_vsx_register.
9208         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9209         new regno parameter.
9210         (store_ppc_registers): Call store_vsx_registers with -1 for the
9211         new regno parameter.
9212         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9213         (ppc_collect_vsxregset): Remove.
9214
9215 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9216
9217         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9218         offset fields.
9219         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9220         for vector register offset fields.
9221         (ppc64_fbsd_reg_offsets): Likewise.
9222         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9223         to vector register offset fields.
9224         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9225         to vector register offset fields.
9226         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9227         vector register offset fields.
9228         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9229         initializers for vector register offset fields.
9230         (rs6000_aix64_reg_offsets): Likewise.
9231         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9232         (ppc_supply_vrregset): Remove.
9233         (ppc_collect_vrregset): Remove.
9234         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9235         (ppc_linux_vrregset) : New function.
9236         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9237         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9238         (ppc32_linux_vrregset): Remove.
9239         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9240         and use result instead of ppc32_linux_vrregset.
9241         (ppc32_linux_reg_offsets): Remove initializers for vector register
9242         offset fields.
9243         (ppc64_linux_reg_offsets): Likewise.
9244         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9245         * ppc-linux-nat.c: Include regset.h.
9246         (gdb_vrregset_t): Adjust comment to account for little-endian
9247         mode.
9248         (supply_vrregset, fill_vrregset): Remove.
9249         (fetch_altivec_register, store_altivec_register): Remove.
9250         (fetch_altivec_registers): Add regno parameter. Get regset using
9251         ppc_linux_vrregset. Use regset to supply registers.
9252         (store_altivec_registers): Add regno parameter. Get regset using
9253         ppc_linux_vrregset. Use regset to collect registers.
9254         (fetch_register): Call fetch_altivec_registers instead of
9255         fetch_altivec_register.
9256         (store_register): Call store_altivec_registers instead of
9257         store_altivec_register.
9258         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9259         the new regno parameter.
9260         (store_ppc_registers): Call store_altivec_registers with -1 for
9261         the new regno parameter.
9262
9263 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9264
9265         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9266         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9267         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9268         (gdb_vrregset_t): Change array type size to
9269         PPC_LINUX_SIZEOF_VRREGSET.
9270         (gdb_vsxregset_t): Change array type size to
9271         PPC_LINUX_SIZEOF_VSXREGSET.
9272         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9273         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9274         PPC_LINUX_SIZEOF_VSXREGSET.
9275
9276 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9277
9278         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9279         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9280         nat/ppc-linux.c.
9281         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9282         ppc_linux_target_wordsize with tid.
9283         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9284         wordsize with tid.
9285         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9286         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9287         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9288         tid parameter. Remove static specifier.
9289         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9290         (ppc_linux_target_wordsize): New declaration.
9291
9292 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9293
9294         * arch/ppc-linux-common.c: New file.
9295         * arch/ppc-linux-common.h: New file.
9296         * arch/ppc-linux-tdesc.h: New file.
9297         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9298         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9299         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9300         arch/ppc-linux-tdesc.h.
9301         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9302         arch/ppc-linux-tdesc.h.
9303         (ppc_linux_nat_target::read_description): Remove target
9304         description matching code. Fill a ppc_linux_features struct and
9305         call ppc_linux_match_description with it. Move comment about ISA
9306         2.05 to ppc-linux-common.c.
9307         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9308         arch/ppc-linux-tdesc.h.
9309         (ppc_linux_core_read_description): Remove target description
9310         matching code. Fill a ppc_linux_features struct and call
9311         ppc_linux_match_description with it.
9312         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9313         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9314         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9315         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9316         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9317         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9318         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9319         (tdesc_powerpc_e500l): Remove.
9320
9321 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9322
9323         * ada-lang.c (catch_assert_command): Pass empty string instead
9324         of NULL for excep_string argument.
9325
9326 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9327
9328         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9329         the width of the requested register exceeds the width of the
9330         `ptrace' data type.
9331
9332 2018-05-21  Tom Tromey  <tom@tromey.com>
9333
9334         * printcmd.c (output_command): Remove.
9335         (output_command_const): Rename to output_command.
9336         * valprint.h (output_command): Rename from output_command_const.
9337         * tracepoint.c (trace_dump_actions): Call output_command.
9338
9339 2018-05-21  Tom Tromey  <tom@tromey.com>
9340
9341         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9342         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9343         * ada-lang.h (create_ada_exception_catchpoint): Update.
9344         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9345         std::string.
9346         (create_excep_cond_exprs, ~ada_catchpoint)
9347         (should_stop_exception, print_one_exception)
9348         (print_mention_exception, print_recreate_exception): Update.
9349         (ada_get_next_arg): Remove.
9350         (catch_ada_exception_command_split): Use std::string.  Change type
9351         of "excep_string", "cond_string".
9352         (catch_ada_exception_command): Update.
9353         (create_ada_exception_catchpoint): Change type of excep_string.
9354         (ada_exception_sal): Remove excep_string parameter.
9355         (~ada_catchpoint): Remove.
9356
9357 2018-05-21  Tom Tromey  <tom@tromey.com>
9358
9359         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9360         cleanup.
9361
9362 2018-05-21  Tom Tromey  <tom@tromey.com>
9363
9364         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9365         Return unique_xmalloc_ptr.
9366         (print_it_exception): Update.
9367
9368 2018-05-21  Tom Tromey  <tom@tromey.com>
9369
9370         * tracepoint.c (trace_dump_actions): Use std::string.
9371
9372 2018-05-21  Tom Tromey  <tom@tromey.com>
9373
9374         * symfile.c (reread_symbols): Use std::string for original_name.
9375
9376 2018-05-21  Tom Tromey  <tom@tromey.com>
9377
9378         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9379         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9380         constructor.
9381
9382 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9383
9384         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9385         instance to...
9386         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9387         * objfiles.c (get_objfile_bfd_data): Allocate
9388         objfile_per_bfd_storage with obstack_new when allocating on
9389         obstack.
9390
9391 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9392
9393         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9394         OBSTACK_ZALLOC.
9395         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9396         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9397         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9398         (add_pending): Likewise.
9399         (parse_symbol): Likewise.
9400         (parse_partial_symbols): Likewise.
9401         (psymtab_to_symtab_1): Likewise.
9402         (new_psymtab): Likewise.
9403         (elfmdebug_build_psymtabs): Likewise.
9404         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9405         * objfiles.c (get_objfile_bfd_data): Likewise.
9406         (objfile_register_static_link): Likewise.
9407         * psymtab.c (allocate_psymtab): Likewise.
9408         * stabsread.c (read_member_functions): Likewise.
9409         * xcoffread.c (xcoff_end_psymtab): Likewise.
9410
9411 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9412
9413         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9414         compiler supports std::is_trivially_constructible.
9415         * common/poison.h: Include obstack.h.
9416         (IsMallocable): Define to is_trivially_constructible if the
9417         compiler supports it, define to true_type otherwise.
9418         (xobnew): New.
9419         (XOBNEW): Redefine.
9420         (xobnewvec): New.
9421         (XOBNEWVEC): Redefine.
9422         * gdb_obstack.h (obstack_zalloc): New.
9423         (OBSTACK_ZALLOC): Redefine.
9424         (obstack_calloc): New.
9425         (OBSTACK_CALLOC): Redefine.
9426         (obstack_new): New.
9427         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9428         (gdbarch_obstack): New declaration in gdbarch.h, definition in
9429         gdbarch.c.
9430         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9431         obstack_calloc/obstack_zalloc.
9432         (gdbarch_obstack_zalloc): Remove.
9433         * target-descriptions.c (tdesc_data_init): Use obstack_new.
9434
9435 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9436
9437         * stack.c (backtrace_command_1): Remove useless variable int i.
9438
9439 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9440
9441         * stack.c (print_frame_info): Fix comment.
9442
9443 2018-05-18  Tom Tromey  <tom@tromey.com>
9444
9445         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9446         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9447         (~dwarf2_per_objfile): Update
9448         (dwarf2_get_dwz_file): Use new.
9449         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
9450         unique_ptr.
9451
9452 2018-05-18  Tom Tromey  <tom@tromey.com>
9453
9454         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
9455         unique_ptr.
9456         * dwarf2read.c (struct dwp_file): Add constructor and
9457         initializers.
9458         (open_and_init_dwp_file): Return a unique_ptr.
9459         (dwarf2_per_objfile, create_dwp_hash_table)
9460         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
9461         (lookup_dwo_unit_in_dwp): Update.
9462         (open_and_init_dwp_file, get_dwp_file): Update.
9463
9464 2018-05-18  Tom Tromey  <tom@tromey.com>
9465
9466         * dwarf2read.c (dwarf2_per_objfile): Update.
9467         (struct mapped_index): Add initializers.
9468         (dwarf2_read_index): Use new.
9469         (dw2_symtab_iter_init): Update.
9470         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
9471         unique_ptr.
9472
9473 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9474
9475         * dwarf2read.c (mapped_index) <total_size>: Remove.
9476
9477 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9478
9479         * unittests/format_pieces-selftests.c (test_format_specifier):
9480         Add ARI comments.
9481
9482 2018-05-18  Tom Tromey  <tom@tromey.com>
9483
9484         * c-typeprint.c (maybe_print_hole): New function.
9485         (c_print_type_struct_field_offset): Update.
9486         (c_type_print_base_struct_union): Call maybe_print_hole.
9487
9488 2018-05-17  Keith Seitz  <keiths@redhat.com>
9489
9490         * breakpoint.c (build_bpstat_chain): New function, moved from
9491         bpstat_stop_status.
9492         (bpstat_stop_status): Add optional parameter, `stop_chain'.
9493         If no stop chain is passed, call build_bpstat_chain to build it.
9494         * breakpoint.h (build_bpstat_chain): Declare.
9495         (bpstat_stop_status): Move documentation here from breakpoint.c.
9496         * infrun.c (handle_signal_stop): Before eliding inlined frames,
9497         build the stop chain and pass it to skip_inline_frames.
9498         Pass this stop chain to bpstat_stop_status.
9499         * inline-frame.c: Include breakpoint.h.
9500         (stopped_by_user_bp_inline_frame): New function.
9501         (skip_inline_frames): Add parameter `stop_chain'.
9502         Move documention to inline-frame.h.
9503         If non-NULL, use stopped_by_user_bp_inline_frame to determine
9504         whether the frame should be elided.
9505         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
9506         Add moved documentation and update for new parameter.
9507
9508 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9509
9510         PR cli/14975
9511         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9512         unittests/format_pieces-selftests.c.
9513         * common/format.h (format_piece) <operator==>: New.
9514         (format_pieces) <operator[]>: Remove.
9515         * common/format.c (format_pieces::format_pieces): Handle \e.
9516         * unittests/format_pieces-selftests.c: New.
9517
9518 2018-05-17  Tom Tromey  <tom@tromey.com>
9519
9520         PR symtab/23010:
9521         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
9522         (dw2_instantiate_symtab): Add skip_partial parameter.
9523         (dw2_find_last_source_symtab, dw2_map_expand_apply)
9524         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
9525         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
9526         (dw2_expand_symtabs_matching_one)
9527         (dw2_find_pc_sect_compunit_symtab)
9528         (dw2_debug_names_lookup_symbol)
9529         (dw2_debug_names_expand_symtabs_for_function): Update.
9530         (init_cutu_and_read_dies): Add skip_partial parameter.
9531         (process_psymtab_comp_unit, build_type_psymtabs_1)
9532         (process_skeletonless_type_unit, load_partial_comp_unit)
9533         (psymtab_to_symtab_1): Update.
9534         (load_full_comp_unit): Add skip_partial parameter.
9535         (process_imported_unit_die, dwarf2_read_addr_index)
9536         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
9537         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
9538         (read_signatured_type): Update.
9539
9540 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9541
9542         * value.c (release_value): Remove unused variable.
9543         (record_latest_value): Likewise.
9544         (access_value_history): Likewise.
9545         (preserve_values): Likewise.
9546
9547 2018-05-17  Tom Tromey  <tom@tromey.com>
9548
9549         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
9550         Initialize.
9551
9552 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
9553
9554         PR gdb/22286
9555         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
9556         Also handle registers whose width is not a multiple of
9557         PTRACE_TYPE_RET.
9558         (linux_nat_trad_target::store_register): Likewise.
9559
9560 2018-05-16  Tom Tromey  <tom@tromey.com>
9561
9562         * gdbcore.h (core_bfd): Redefine.
9563         * corelow.c (core_target::close): Update.
9564         (core_target_open): Update.
9565         * progspace.h (struct program_space) <cbfd>: Now a
9566         gdb_bfd_ref_ptr.
9567
9568 2018-05-16  Tom Tromey  <tom@tromey.com>
9569
9570         PR cli/19551:
9571         * symfile-add-flags.h (enum symfile_add_flags)
9572         <SYMFILE_NOT_FILENAME>: New constant.
9573         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
9574         objfile name from BFD.
9575         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
9576         * minidebug.c (find_separate_debug_file_in_section): Put
9577         ".gnu_debugdata" into BFD's file name.
9578
9579 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
9580
9581         * regcache.c (regcache_read_ftype, regcache_write_ftype):
9582         Remove.
9583
9584 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
9585
9586         PR binutils/21446
9587         * aarch64-tdep.c (aarch64_analyze_prologue,
9588         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
9589         Indicate not interested in errors.
9590
9591 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9592
9593         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
9594         Supply the MIPS_ZERO_REGNUM register.
9595
9596 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9597
9598         * mips-tdep.c (mask_address_var): Make variable static.
9599
9600 2018-05-14  Tom Tromey  <tom@tromey.com>
9601
9602         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
9603
9604 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
9605
9606         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
9607         FXSAVE_ADDR for the mxcsr register.
9608
9609 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
9610
9611         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
9612
9613 2018-05-11  Pedro Alves  <palves@redhat.com>
9614
9615         * corelow.c (core_target) <core_target>: No longer inline.
9616         Initialize m_core_gdbarch, m_core_vec and build the section table
9617         here.
9618         <~core_target>: New.
9619         <core_gdbarch, get_core_register_section>: New methods.
9620         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
9621         factored out from ...
9622         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
9623         (core_ops): Delete.
9624         (sniff_core_bfd): Add gdbarch parameter.
9625         (core_close): Delete, merged into ...
9626         (core_target::close): ... here.  Delete self.
9627         (core_close_cleanup): Delete.
9628         (core_target_open): Allocate a core_target on the heap.  Use a
9629         unique_ptr instead of a cleanup.  Bits moved into the core_target
9630         ctor.  Adjust to use core_target methods instead of globals.
9631         (get_core_register_section): Rename to ...
9632         (core_target::get_core_register_section): ... this and adjust.
9633         (struct get_core_registers_cb_data): New.
9634         (get_core_registers_cb): Use it.  Use bool.
9635         (core_target::fetch_registers, core_target::files_info)
9636         (core_target::xfer_partial, core_target::read_description)
9637         (core_target::pid_to, core_target::thread_name): Adjust to
9638         reference class fields instead of globals.
9639         * target.h (struct target_ops_deleter, target_ops_up): New.
9640
9641 2018-05-11  Pedro Alves  <palves@redhat.com>
9642
9643         * corefile.c (core_file_command): Move to corelow.c.
9644         * corelow.c (the_core_target): Delete.
9645         (core_file_command): Moved from corefile.c.  Check exec_bfd
9646         instead of the_core_target.  Use target_detach instead of calling
9647         into the_core_target directly.
9648         (maybe_say_no_core_file_now): New.
9649         (core_target::detach): Use it.
9650         (_initialize_corelow): Remove references to the_core_target.
9651         * gdbcore.h (the_core_target): Delete.
9652
9653 2018-05-11  Tom Tromey  <tromey@redhat.com>
9654             Pedro Alves  <palves@redhat.com>
9655
9656         * corefile.c (core_bfd): Remove.
9657         * gdbcore.h (core_bfd): Now a macro.
9658         * progspace.h (struct program_space) <cbfd>: New field.
9659
9660 2018-05-11  Tom Tromey  <tom@tromey.com>
9661
9662         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
9663         gdb::def_vector.
9664
9665 2018-05-10  Tom Tromey  <tom@tromey.com>
9666
9667         * configure: Rebuild.
9668         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
9669
9670 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
9671
9672         PR server/23158:
9673         * regformats/regdat.sh: Adjust script, following the addition
9674         of the new expedite_regs parameter to init_target_desc.
9675
9676 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
9677     
9678         PR gdb/23127
9679         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
9680         set_gdbarch_significant_addr_bit.
9681         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
9682         set_gdbarch_significant_addr_bit.
9683         * utils.c (address_significant): Update to sign extend addr.
9684
9685 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
9686
9687         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
9688         (xtensa_linux_init_abi): Limit tdep->num_regs by
9689         tdep->num_nopriv_regs.
9690         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
9691         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
9692         not initialized.
9693
9694 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
9695
9696         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
9697
9698 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
9699
9700         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
9701         (I387_MXCSR_INIT_VAL): New constant.
9702         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
9703         buffer if it was supplied by the inferior.
9704         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
9705         (i387_xsave_get_clear_bv): New function.
9706         (i387_supply_xsave): Only read x87 control registers from the
9707         xsave buffer if the feature is enabled, and the state will have
9708         been written, otherwise, provide a suitable default.
9709         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
9710         including x87 control registers.  Update control registers if they
9711         have changed from the default value, and mark features as enabled
9712         as required.
9713         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
9714
9715 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
9716
9717         * spu-tdep.c (info_spu_event_command): Fix output formatting.
9718
9719 2018-05-07  Tom Tromey  <tom@tromey.com>
9720
9721         * configure: Rebuild.
9722         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
9723
9724 2018-05-07  Tom Tromey  <tom@tromey.com>
9725
9726         PR tdep/20362:
9727         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9728         bit.  Use correct value for VDIV.
9729
9730 2018-05-04  Tom Tromey  <tom@tromey.com>
9731
9732         * configure: Rebuild.
9733         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9734
9735 2018-05-04  Tom Tromey  <tom@tromey.com>
9736
9737         * linux-record.c (record_linux_system_call) <case
9738         RECORD_SYS_RECVFROM>: Add "break".
9739
9740 2018-05-04  Tom Tromey  <tom@tromey.com>
9741
9742         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9743         Add missing "break".
9744         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9745         Add missing "break".
9746
9747 2018-05-04  Tom Tromey  <tom@tromey.com>
9748
9749         * rs6000-tdep.c (ppc_process_record_op4)
9750         (ppc_process_record_op63): Add fall-through comment.
9751
9752 2018-05-04  Tom Tromey  <tom@tromey.com>
9753
9754         * i386-tdep.c (i386_process_record): Add fall-through comment.
9755
9756 2018-05-04  Tom Tromey  <tom@tromey.com>
9757
9758         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9759         comment.
9760
9761 2018-05-04  Tom Tromey  <tom@tromey.com>
9762
9763         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9764         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9765         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9766         comment.
9767         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9768         comment.
9769         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9770         comment.
9771
9772 2018-05-04  Tom Tromey  <tom@tromey.com>
9773
9774         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9775
9776 2018-05-04  Tom Tromey  <tom@tromey.com>
9777
9778         * s390-tdep.c (s390_process_record): Fix fall-through comments.
9779         * xcoffread.c (scan_xcoff_symtab): Move comment later.
9780         * symfile.c (section_is_mapped): Fix fall-through comment.
9781         * stabsread.c (define_symbol, read_member_functions): Fix
9782         fall-through comment.
9783         * s390-linux-tdep.c (s390_process_record): Fix fall-through
9784         comment.
9785         * remote.c (remote_wait_as): Fix fall-through comment.
9786         * p-exp.y (yylex): Fix fall-through comment.
9787         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9788         comment.
9789         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9790         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9791         * jv-exp.y (yylex): Fix fall-through comment.
9792         * go-exp.y (lex_one_token): Fix fall-through comment.
9793         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9794         fall-through comment.
9795         * f-exp.y (yylex): Fix fall-through comment.
9796         * dwarf2read.c (process_die): Fix fall-through comments.
9797         * dbxread.c (process_one_symbol): Fix fall-through comment.
9798         * d-exp.y (lex_one_token): Fix fall-through comment.
9799         * cp-name-parser.y (yylex): Fix fall-through comment.
9800         * coffread.c (coff_symtab_read): Fix fall-through comment.
9801         * c-exp.y (lex_one_token): Fix fall-through comment.
9802         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9803         comment.
9804         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9805         comment.
9806
9807 2018-05-04  Tom Tromey  <tom@tromey.com>
9808
9809         PR python/22730:
9810         * NEWS: Mention gdb.execute change.
9811         * gdbcmd.h (execute_control_command): Don't declare.
9812         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9813         execute_control_commands, execute_control_commands_to_string.
9814         * cli/cli-script.h (execute_control_commands)
9815         (execute_control_commands_to_string): Declare.
9816         (execute_control_command): Add from_tty parameter.
9817         * cli/cli-script.c (execute_control_commands)
9818         (execute_control_commands_to_string): New functions.
9819         (execute_user_command): Use execute_control_commands.
9820         (execute_control_command_1): Add "from_tty" parameter.  Update.
9821         (execute_control_command): Likewise.
9822
9823 2018-05-04  Tom Tromey  <tom@tromey.com>
9824
9825         PR python/22731:
9826         * NEWS: Mention that breakpoint commands are writable.
9827         * python/py-breakpoint.c (bppy_set_commands): New function.
9828         (breakpoint_object_getset) <"commands">: Use it.
9829
9830 2018-05-04  Tom Tromey  <tom@tromey.com>
9831
9832         * tracepoint.c (actions_command): Update.
9833         * mi/mi-cmd-break.c (mi_command_line_array)
9834         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9835         (mi_read_next_line): Remove.
9836         (mi_cmd_break_commands): Update.
9837         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9838         function_view.
9839         * cli/cli-script.c (get_command_line): Update.
9840         (process_next_line): Use function_view.  Constify.
9841         (recurse_read_control_structure, read_command_lines)
9842         (read_command_lines_1): Change argument types to function_view.
9843         (do_define_command, document_command): Update.
9844         * breakpoint.h (check_tracepoint_command): Don't declare.
9845         * breakpoint.c (check_tracepoint_command): Remove.
9846         (commands_command_1, create_tracepoint_from_upload): Update.
9847
9848 2018-05-04  Tom Tromey  <tom@tromey.com>
9849
9850         PR gdb/11750:
9851         * cli/cli-script.h (enum command_control_type) <define_control>:
9852         New constant.
9853         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9854         (build_command_line, execute_control_command_1)
9855         (process_next_line): Likewise.
9856         (do_define_command): New function, extracted from define_command.
9857         (define_command): Use it.
9858
9859 2018-05-04  Tom Tromey  <tom@tromey.com>
9860
9861         * tracepoint.c (actions_command): Update.
9862         * cli/cli-script.h (read_command_lines): Update.
9863         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9864         (MAX_TMPBUF): Remove define.
9865         (define_command): Use string_printf.
9866         (document_command): Likewise.
9867         * breakpoint.c (commands_command_1): Update.
9868
9869 2018-05-04  Tom Tromey  <tom@tromey.com>
9870
9871         * top.c (execute_command): Update.
9872         * cli/cli-script.h (print_command_lines): Now varargs.
9873         * cli/cli-script.c (print_command_lines): Now varargs.
9874         (execute_control_command_1) <case while_control, case if_control>:
9875         Update.
9876
9877 2018-05-04  Tom Tromey  <tom@tromey.com>
9878
9879         * tracepoint.c (all_tracepoint_actions): Rename from
9880         all_tracepoint_actions_and_cleanup.  Change return type.
9881         (actions_command, encode_actions_1, encode_actions)
9882         (trace_dump_actions, tdump_command): Update.
9883         * remote.c (remote_download_command_source): Update.
9884         * python/python.c (gdbpy_eval_from_control_command)
9885         (python_command, python_interactive_command): Update.
9886         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9887         * guile/guile.c (guile_command)
9888         (gdbscm_eval_from_control_command, guile_command): Update.
9889         * compile/compile.c (compile_code_command)
9890         (compile_print_command, compile_to_object): Update.
9891         * cli/cli-script.h (struct command_lines_deleter): New.
9892         (counted_command_line): New typedef.
9893         (struct command_line): Add constructor, destructor.
9894         <body_list>: Remove.
9895         <body_list_0, body_list_1>: New members.
9896         (command_line_up): Remove typedef.
9897         (read_command_lines, read_command_lines_1, get_command_line):
9898         Update.
9899         (copy_command_lines): Don't declare.
9900         * cli/cli-script.c (build_command_line): Use "new".
9901         (get_command_line): Return counted_command_line.
9902         (print_command_lines, execute_user_command)
9903         (execute_control_command_1, while_command, if_command): Update.
9904         (realloc_body_list): Remove.
9905         (process_next_line, recurse_read_control_structure): Update.
9906         (read_command_lines, read_command_lines_1): Return counted_command_line.
9907         (free_command_lines): Use "delete".
9908         (copy_command_lines): Remove.
9909         (define_command, document_command, show_user_1): Update.
9910         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9911         a counted_command_line.
9912         * breakpoint.h (counted_command_line): Remove typedef.
9913         (breakpoint_set_commands): Update.
9914         * breakpoint.c (check_no_tracepoint_commands)
9915         (validate_commands_for_breakpoint): Update.
9916         (breakpoint_set_commands): Change commands to be a
9917         counted_command_line.
9918         (commands_command_1, update_dprintf_command_list)
9919         (create_tracepoint_from_upload): Update.
9920
9921 2018-05-04  Tom Tromey  <tom@tromey.com>
9922
9923         * cli/cli-decode.h (cmd_list_element): New constructor.
9924         (~cmd_list_element): New destructor.
9925         (struct cmd_list_element): Add initializers.
9926         * cli/cli-decode.c (do_add_cmd): Use "new".
9927         (delete_cmd): Use "delete".
9928
9929 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9930             Pedro Alves <palves@redhat.com>
9931
9932         PR breakpoints/19806 and support for PR external/20207.
9933         * NEWS: Mention Aarch64 watchpoint improvements.
9934         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9935         watchpoints and PR external/20207 watchpoints.
9936         * nat/aarch64-linux-hw-point.c
9937         (kernel_supports_any_contiguous_range): New.
9938         (aarch64_watchpoint_offset): New.
9939         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9940         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9941         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9942         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9943         next_addr_orig_p.  Support PR external/20207 watchpoints.
9944         (aarch64_downgrade_regs): New.
9945         (aarch64_dr_state_insert_one_point): New parameters offset and
9946         addr_orig.
9947         (aarch64_dr_state_remove_one_point): Likewise.
9948         (aarch64_handle_breakpoint): Update caller.
9949         (aarch64_handle_aligned_watchpoint): Likewise.
9950         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9951         aligned_offset.
9952         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9953         aarch64_downgrade_regs.
9954         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9955         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9956         (DR_CONTROL_MASK): ... this.
9957         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9958         (unsigned int aarch64_watchpoint_offset): New prototype.
9959         (aarch64_linux_set_debug_regs): Remove const from state.
9960         * utils.c (align_up, align_down): Move to ...
9961         * common/common-utils.c (align_up, align_down): ... here.
9962         * utils.h (align_up, align_down): Move to ...
9963         * common/common-utils.h (align_up, align_down): ... here.
9964
9965 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9966
9967         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9968         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9969         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9970         Re-implement to match the ABI as summarized in GCC's
9971         gcc/config/sparc/sparc.c.  All callers updated.
9972         (sparc32_store_arguments): Remove assertion.
9973
9974 2018-05-04  Tom Tromey  <tom@tromey.com>
9975
9976         * printcmd.c: Don't include tui.h.
9977         (decode_format): Use skip_spaces.
9978
9979 2018-05-04  Tom Tromey  <tom@tromey.com>
9980
9981         PR gdb/22619:
9982         * printcmd.c (last_count): New global.
9983         (x_command): Use saved count when repeating.
9984
9985 2018-05-04  Tom Tromey  <tom@tromey.com>
9986
9987         * nto-procfs.c (do_closedir_cleanup): Remove.
9988         (procfs_pidlist): Use gdb_dir_up.
9989         * procfs.c (do_closedir_cleanup): Remove.
9990         (proc_update_threads): Use gdb_dir_up.
9991         * common/filestuff.h (struct gdb_dir_deleter): New.
9992         (gdb_dir_up): New typedef.
9993
9994 2018-05-04  Tom Tromey  <tom@tromey.com>
9995
9996         * ada-lang.c (print_mention_exception): Use std::string.
9997
9998 2018-05-04  Tom Tromey  <tom@tromey.com>
9999
10000         * ada-lang.c (create_excep_cond_exprs): Update.
10001         (ada_exception_catchpoint_cond_string): Use std::string.
10002
10003 2018-05-04  Tom Tromey  <tom@tromey.com>
10004
10005         * ada-lang.c (xget_renaming_scope): Return std::string.
10006         (old_renaming_is_invisible): Update.
10007
10008 2018-05-04  Tom Tromey  <tom@tromey.com>
10009
10010         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10011         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10012
10013 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10014
10015         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10016
10017 2018-05-04  Tom Tromey  <tom@tromey.com>
10018
10019         * remote.c (remote_query_supported_append): Change type.
10020         (remote_check_symbols): Update.
10021
10022 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10023
10024         PR gdb/11420
10025         * configure.ac: Prepend libpython.
10026         * python/python-config.py: Likewise.
10027         * configure: Regenerate.
10028
10029 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10030
10031         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10032
10033 2018-05-03  Pedro Alves  <palves@redhat.com>
10034
10035         * s390-linux-nat.c
10036         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10037         override.  Write 'true' instead of '1'.
10038         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10039         declaration.
10040
10041 2018-05-02  Pedro Alves  <palves@redhat.com>
10042
10043         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10044         add_inf_child_target.
10045         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10046         add_inf_child_target.
10047         * aix-thread.c (aix_thread_target_info): New.
10048         (aix_thread_target) <shortname, longname, doc>: Delete.
10049         <info>: New.
10050         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10051         add_inf_child_target.
10052         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10053         add_inf_child_target.
10054         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10055         add_inf_child_target.
10056         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10057         add_inf_child_target.
10058         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10059         add_inf_child_target.
10060         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10061         add_inf_child_target.
10062         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10063         add_inf_child_target.
10064         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10065         add_inf_child_target.
10066         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10067         add_inf_child_target.
10068         * bfd-target.c (target_bfd_target_info): New.
10069         (target_bfd) <shortname, longname, doc>: Delete.
10070         <info>: New.
10071         * bsd-kvm.c (bsd_kvm_target_info): New.
10072         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10073         <info>: New.
10074         (bsd_kvm_target::open): Rename to ...
10075         (bsd_kvm_target_open): ... this.  Adjust.
10076         * bsd-uthread.c (bsd_uthread_target_info): New.
10077         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10078         <info>: New.
10079         * corefile.c (core_file_command): Adjust.
10080         * corelow.c (core_target_info): New.
10081         (core_target) <shortname, longname, doc>: Delete.
10082         <info>: New.
10083         (core_target::open): Rename to ...
10084         (core_target_open): ... this.  Adjust.
10085         * ctf.c (ctf_target_info): New.
10086         (ctf_target) <shortname, longname, doc>: Delete.
10087         <info>: New.
10088         (ctf_target::open): Rename to ...
10089         (ctf_target_open): ... this.
10090         (_initialize_ctf): Adjust.
10091         * exec.c (exec_target_info): New.
10092         (exec_target) <shortname, longname, doc>: Delete.
10093         <info>: New.
10094         (exec_target::open): Rename to ...
10095         (exec_target_open): ... this.
10096         * gdbcore.h (core_target_open): Declare.
10097         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10098         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10099         add_inf_child_target.
10100         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10101         add_inf_child_target.
10102         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10103         add_inf_child_target.
10104         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10105         add_inf_child_target.
10106         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10107         add_inf_child_target.
10108         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10109         add_inf_child_target.
10110         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10111         add_inf_child_target.
10112         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10113         add_inf_child_target.
10114         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10115         add_inf_child_target.
10116         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10117         add_inf_child_target.
10118         * inf-child.c (inf_child_target_info): New.
10119         (inf_child_target::info): New.
10120         (inf_child_open_target): Remove 'target' parameter.  Use
10121         get_native_target instead.
10122         (inf_child_target::open): Delete.
10123         (add_inf_child_target): New.
10124         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10125         Delete.
10126         <info>: New.
10127         (add_inf_child_target): Declare.
10128         (inf_child_open_target): Declare.
10129         * linux-thread-db.c (thread_db_target_info): New.
10130         (thread_db_target) <shortname, longname, doc>: Delete.
10131         <info>: New.
10132         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10133         add_inf_child_target.
10134         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10135         add_inf_child_target.
10136         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10137         add_inf_child_target.
10138         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10139         add_inf_child_target.
10140         * make-target-delegates (print_class): Adjust.
10141         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10142         add_inf_child_target.
10143         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10144         add_inf_child_target.
10145         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10146         add_inf_child_target.
10147         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10148         add_inf_child_target.
10149         * nto-procfs.c (nto_native_target_info): New.
10150         (nto_procfs_target_native) <shortname, longname, doc>:
10151         Delete.
10152         <info>: New.
10153         (nto_procfs_target_info): New.
10154         (nto_procfs_target_procfs) <shortname, longname, doc>:
10155         Delete.
10156         <info>: New.
10157         (init_procfs_targets): Adjust.
10158         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10159         add_inf_child_target.
10160         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10161         add_inf_child_target.
10162         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10163         add_inf_child_target.
10164         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10165         add_inf_child_target.
10166         * ravenscar-thread.c (ravenscar_target_info): New.
10167         (ravenscar_thread_target) <shortname, longname, doc>:
10168         Delete.
10169         <info>: New.
10170         * record-btrace.c (record_btrace_target_info):
10171         (record_btrace_target) <shortname, longname, doc>: Delete.
10172         <info>: New.
10173         (record_btrace_target::open): Rename to ...
10174         (record_btrace_target_open): ... this.  Adjust.
10175         * record-full.c (record_longname, record_doc): New.
10176         (record_full_base_target) <shortname, longname, doc>: Delete.
10177         <info>: New.
10178         (record_full_target_info): New.
10179         (record_full_target): <shortname>: Delete.
10180         <info>: New.
10181         (record_full_core_open_1, record_full_open_1): Update comments.
10182         (record_full_base_target::open): Rename to ...
10183         (record_full_open): ... this.
10184         (cmd_record_full_restore): Update.
10185         (_initialize_record_full): Update.
10186         * remote-sim.c (remote_sim_target_info): New.
10187         (gdbsim_target) <shortname, longname, doc>: Delete.
10188         <info>: New.
10189         (gdbsim_target::open): Rename to ...
10190         (gdbsim_target_open): ... this.
10191         (_initialize_remote_sim): Adjust.
10192         * remote.c (remote_doc): New.
10193         (remote_target_info): New.
10194         (remote_target) <shortname, longname, doc>: Delete.
10195         <info>: New.
10196         (extended_remote_target_info): New.
10197         (extended_remote_target) <shortname, longname, doc>: Delete.
10198         <info>: New.
10199         (remote_target::open_1): Make static.  Adjust.
10200         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10201         * s390-linux-nat.c (_initialize_s390_nat): Use
10202         add_inf_child_target.
10203         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10204         add_inf_child_target.
10205         * sol-thread.c (thread_db_target_info): New.
10206         (sol_thread_target) <shortname, longname, doc>: Delete.
10207         <info>: New.
10208         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10209         add_inf_child_target.
10210         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10211         add_inf_child_target.
10212         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10213         add_inf_child_target.
10214         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10215         add_inf_child_target.
10216         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10217         add_inf_child_target.
10218         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10219         add_inf_child_target.
10220         * spu-linux-nat.c (_initialize_spu_nat): Use
10221         add_inf_child_target.
10222         * spu-multiarch.c (spu_multiarch_target_info): New.
10223         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10224         <info>: New.
10225         * target-delegates.c: Regenerate.
10226         * target.c: Include <unordered_map>.
10227         (target_ops_p): Delete.
10228         (DEF_VEC_P(target_ops_p)): Delete.
10229         (target_factories): New.
10230         (test_target_info): New.
10231         (test_target_ops::info): New.
10232         (open_target): Adjust to use target_factories.
10233         (add_target_with_completer): Rename to ...
10234         (add_target): ... this.  Change prototype.  Register target_info
10235         and open callback in target_factories.  Register target_info in
10236         command context instead of target_ops.
10237         (add_target): Delete old implementation.
10238         (add_deprecated_target_alias): Change prototype.  Adjust.
10239         (the_native_target): New.
10240         (set_native_target, get_native_target): New.
10241         (find_default_run_target): Use the_native_target.
10242         (find_attach_target, find_run_target): Simplify.
10243         (target_ops::open): Delete.
10244         (dummy_target_info): New.
10245         (dummy_target::shortname, dummy_target::longname)
10246         (dummy_target::doc): Delete.
10247         (dummy_target::info): New.
10248         (debug_target::shortname, debug_target::longname)
10249         (debug_target::doc): Delete.
10250         (debug_target::info): New.
10251         * target.h (struct target_info): New.
10252         (target_ops::~target_ops): Add comment.
10253         (target_ops::info): New.
10254         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10255         longer virtual.  Implement in terms of target_info.
10256         (set_native_target, get_native_target): Declare.
10257         (target_open_ftype): New.
10258         (add_target, add_target_with_completer)
10259         (add_deprecated_target_alias): Change prototype.
10260         (test_target) <shortname, longname, doc>: Delete.
10261         <info>: New.
10262         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10263         add_inf_child_target.
10264         * tracefile-tfile.c (tfile_target_info): New.
10265         (tfile_target) <shortname, longname, doc>: Delete.
10266         <info>: New.
10267         (tfile_target::open): Rename to ...
10268         (tfile_target_open): ... this.
10269         (_initialize_tracefile_tfile): Adjust.
10270         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10271         add_inf_child_target.
10272         * windows-nat.c (_initialize_windows_nat): Use
10273         add_inf_child_target.
10274         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10275         add_inf_child_target.
10276
10277 2018-05-02  Pedro Alves  <palves@redhat.com>
10278
10279         * linux-nat.h (linux_nat_target) <low_new_thread,
10280         low_delete_thread, low_new_fork, low_forget_process,
10281         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10282         New virtual methods.
10283         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10284         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10285         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10286         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10287         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10288         Delete.
10289         * linux-fork.c (delete_fork): Adjust to call low method.
10290         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10291         (linux_nat_new_fork, linux_nat_forget_process_hook)
10292         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10293         (linux_nat_status_is_event):
10294         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10295         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10296         to call low method.
10297         (sigtrap_is_event): Rename to ...
10298         (linux_nat_target::low_status_is_event): ... this.
10299         (linux_nat_set_status_is_event): Delete.
10300         (save_stop_reason, linux_nat_wait_1)
10301         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10302         low methods.
10303         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10304         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10305         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10306         (linux_nat_set_prepare_to_resume): Delete.
10307         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10308         low virtual methods.
10309         * amd64-linux-nat.c: Likewise.
10310         * arm-linux-nat.c: Likewise.
10311         * i386-linux-nat.c: Likewise.
10312         * ia64-linux-nat.c: Likewise.
10313         * mips-linux-nat.c: Likewise.
10314         * ppc-linux-nat.c: Likewise.
10315         * s390-linux-nat.c: Likewise.
10316         * sparc64-linux-nat.c: Likewise.
10317         * x86-linux-nat.c: Likewise.
10318         * x86-linux-nat.h: Include "nat/x86-linux.h".
10319         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10320         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10321         Override methods.
10322
10323 2018-05-02  Pedro Alves  <palves@redhat.com>
10324
10325         * target.h (target_ops)
10326         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10327         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10328         stopped_by_watchpoint, have_continuable_watchpoint,
10329         stopped_data_address, watchpoint_addr_within_range,
10330         can_accel_watchpoint_condition, can_run, thread_alive,
10331         has_all_memory, has_memory, has_stack, has_registers,
10332         has_execution, can_async_p, is_async_p, supports_non_stop,
10333         always_non_stop_p, can_execute_reverse, supports_multi_process,
10334         supports_enable_disable_tracepoint,
10335         supports_disable_randomization, supports_string_tracing,
10336         supports_evaluation_of_breakpoint_conditions,
10337         can_run_breakpoint_commands, filesystem_is_local,
10338         can_download_tracepoint, get_trace_state_variable_value,
10339         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10340         record_is_replaying, record_will_replay,
10341         augmented_libraries_svr4_read>: Adjust to return bool.
10342         * aarch64-linux-nat.c: All implementations adjusted.
10343         * aix-thread.c: All implementations adjusted.
10344         * arm-linux-nat.c: All implementations adjusted.
10345         * breakpoint.c: All implementations adjusted.
10346         * bsd-kvm.c: All implementations adjusted.
10347         * bsd-uthread.c: All implementations adjusted.
10348         * corelow.c: All implementations adjusted.
10349         * ctf.c: All implementations adjusted.
10350         * darwin-nat.c: All implementations adjusted.
10351         * darwin-nat.h: All implementations adjusted.
10352         * exec.c: All implementations adjusted.
10353         * fbsd-nat.c: All implementations adjusted.
10354         * fbsd-nat.h: All implementations adjusted.
10355         * gnu-nat.c: All implementations adjusted.
10356         * gnu-nat.h: All implementations adjusted.
10357         * go32-nat.c: All implementations adjusted.
10358         * ia64-linux-nat.c: All implementations adjusted.
10359         * inf-child.c: All implementations adjusted.
10360         * inf-child.h: All implementations adjusted.
10361         * inf-ptrace.c: All implementations adjusted.
10362         * inf-ptrace.h: All implementations adjusted.
10363         * linux-nat.c: All implementations adjusted.
10364         * linux-nat.h: All implementations adjusted.
10365         * mips-linux-nat.c: All implementations adjusted.
10366         * nto-procfs.c: All implementations adjusted.
10367         * ppc-linux-nat.c: All implementations adjusted.
10368         * procfs.c: All implementations adjusted.
10369         * ravenscar-thread.c: All implementations adjusted.
10370         * record-btrace.c: All implementations adjusted.
10371         * record-full.c: All implementations adjusted.
10372         * remote-sim.c: All implementations adjusted.
10373         * remote.c: All implementations adjusted.
10374         * s390-linux-nat.c: All implementations adjusted.
10375         * sol-thread.c: All implementations adjusted.
10376         * spu-multiarch.c: All implementations adjusted.
10377         * target-delegates.c: All implementations adjusted.
10378         * target.c: All implementations adjusted.
10379         * target.h: All implementations adjusted.
10380         * tracefile-tfile.c: All implementations adjusted.
10381         * tracefile.c: All implementations adjusted.
10382         * tracefile.h: All implementations adjusted.
10383         * windows-nat.c: All implementations adjusted.
10384         * x86-linux-nat.h: All implementations adjusted.
10385         * x86-nat.h: All implementations adjusted.
10386
10387 2018-05-02  Pedro Alves  <palves@redhat.com>
10388
10389         * make-target-delegates (scan_target_h): Don't trim lines here.
10390         Replace sequences of tabs and/or whitespace with a single
10391         whitespace.
10392         (top level, parsing methods): Trim each line before processing it
10393         here.
10394
10395 2018-05-02  Pedro Alves  <palves@redhat.com>
10396             John Baldwin  <jhb@freebsd.org>
10397
10398         * target.h (enum strata) <debug_stratum>: New.
10399         (struct target_ops) <all delegation methods>: Replace by C++
10400         virtual methods, and drop "to_" prefix.  All references updated
10401         throughout.
10402         <to_shortname, to_longname, to_doc, to_data,
10403         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10404         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10405         virtual methods.  All references updated throughout.
10406         <can_attach, supports_terminal_ours, can_create_inferior,
10407         get_thread_control_capabilities, attach_no_wait>: New
10408         virtual methods.
10409         <insert_breakpoint, remove_breakpoint>: Now
10410         TARGET_DEFAULT_NORETURN methods.
10411         <info_proc>: Now returns bool.
10412         <to_magic>: Delete.
10413         (OPS_MAGIC): Delete.
10414         (current_target): Delete.  All references replaced by references
10415         to ...
10416         (target_stack): ... this.  New.
10417         (target_shortname, target_longname): Adjust.
10418         (target_can_run): Now a function declaration.
10419         (default_child_has_all_memory, default_child_has_memory)
10420         (default_child_has_stack, default_child_has_registers)
10421         (default_child_has_execution): Remove target_ops parameter.
10422         (complete_target_initialization): Delete.
10423         (memory_breakpoint_target): New template class.
10424         (test_target_ops): Refactor as a C++ class with virtual methods.
10425         * make-target-delegates (NAME_PART): Tighten.
10426         (POINTER_PART, CP_SYMBOL): New.
10427         (SIMPLE_RETURN_PART): Reimplement.
10428         (VEC_RETURN_PART): Expect less.
10429         (RETURN_PART, VIRTUAL_PART): New.
10430         (METHOD): Adjust to C++ virtual methods.
10431         (scan_target_h): Remove reference to C99.
10432         (dname): Output "target_ops::" prefix.
10433         (write_function_header): Adjust to output a C++ class method.
10434         (write_declaration): New.
10435         (write_delegator): Adjust to output a C++ class method.
10436         (tdname): Output "dummy_target::" prefix.
10437         (write_tdefault, write_debugmethod): Adjust to output a C++ class
10438         method.
10439         (tdefault_names, debug_names): Delete.
10440         (return_types, tdefaults, styles, argtypes_array): New.
10441         (top level): All methods are delegators.
10442         (print_class): New.
10443         (top level): Print dummy_target and debug_target classes.
10444         * target-delegates.c: Regenerate.
10445         * target-debug.h (target_debug_print_enum_info_proc_what)
10446         (target_debug_print_thread_control_capabilities)
10447         (target_debug_print_thread_info_p): New.
10448         * target.c (dummy_target): Delete.
10449         (the_dummy_target, the_debug_target): New.
10450         (target_stack): Now extern.
10451         (set_targetdebug): Push/unpush debug target.
10452         (default_child_has_all_memory, default_child_has_memory)
10453         (default_child_has_stack, default_child_has_registers)
10454         (default_child_has_execution): Remove target_ops parameter.
10455         (complete_target_initialization): Delete.
10456         (add_target_with_completer): No longer call
10457         complete_target_initialization.
10458         (target_supports_terminal_ours): Use regular delegation.
10459         (update_current_target): Delete.
10460         (push_target): No longer check magic number.  Don't call
10461         update_current_target.
10462         (unpush_target): Don't call update_current_target.
10463         (target_is_pushed): No longer check magic number.
10464         (target_require_runnable): Skip for all stratums over
10465         process_stratum.
10466         (target_ops::info_proc): New.
10467         (target_info_proc): Use find_target_at and
10468         find_default_run_target.
10469         (target_supports_disable_randomization): Use regular delegation.
10470         (target_get_osdata): Use find_target_at.
10471         (target_ops::open, target_ops::close, target_ops::can_attach)
10472         (target_ops::attach, target_ops::can_create_inferior)
10473         (target_ops::create_inferior, target_ops::can_run)
10474         (target_can_run): New.
10475         (default_fileio_target): Use regular delegation.
10476         (target_ops::fileio_open, target_ops::fileio_pwrite)
10477         (target_ops::fileio_pread, target_ops::fileio_fstat)
10478         (target_ops::fileio_close, target_ops::fileio_unlink)
10479         (target_ops::fileio_readlink): New.
10480         (target_fileio_open_1, target_fileio_unlink)
10481         (target_fileio_readlink): Always call the target method.  Handle
10482         FILEIO_ENOSYS.
10483         (return_zero, return_zero_has_execution): Delete.
10484         (init_dummy_target): Delete.
10485         (dummy_target::dummy_target, dummy_target::shortname)
10486         (dummy_target::longname, dummy_target::doc)
10487         (debug_target::debug_target, debug_target::shortname)
10488         (debug_target::longname, debug_target::doc): New.
10489         (target_supports_delete_record): Use regular delegation.
10490         (setup_target_debug): Delete.
10491         (maintenance_print_target_stack): Skip debug_stratum.
10492         (initialize_targets): Instantiate the_dummy_target and
10493         the_debug_target.
10494         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
10495         use target_stack.
10496         (target_auxv_search, fprint_target_auxv): Adjust.
10497         (info_auxv_command): Adjust to use target_stack.
10498         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
10499         * exceptions.c (print_flush): Handle a NULL target_stack.
10500         * regcache.c (target_ops_no_register): Refactor as class with
10501         virtual methods.
10502
10503         * exec.c (exec_target): New class.
10504         (exec_ops): Now an exec_target.
10505         (exec_open, exec_close_1, exec_get_section_table)
10506         (exec_xfer_partial, exec_files_info, exec_has_memory)
10507         (exec_make_note_section): Refactor as exec_target methods.
10508         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
10509         Delete.
10510         (exec_target::find_memory_regions): New.
10511         (_initialize_exec): Don't call init_exec_ops.
10512         * gdbcore.h (exec_file_clear): Delete.
10513
10514         * corefile.c (core_target): Delete.
10515         (core_file_command): Adjust.
10516         * corelow.c (core_target): New class.
10517         (the_core_target): New.
10518         (core_close): Remove target_ops parameter.
10519         (core_close_cleanup): Adjust.
10520         (core_target::close): New.
10521         (core_open, core_detach, get_core_registers, core_files_info)
10522         (core_xfer_partial, core_thread_alive, core_read_description)
10523         (core_pid_to_str, core_thread_name, core_has_memory)
10524         (core_has_stack, core_has_registers, core_info_proc): Rework as
10525         core_target methods.
10526         (ignore, core_remove_breakpoint, init_core_ops): Delete.
10527         (_initialize_corelow): Initialize the_core_target.
10528         * gdbcore.h (core_target): Delete.
10529         (the_core_target): New.
10530
10531         * ctf.c: (ctf_target): New class.
10532         (ctf_ops): Now a ctf_target.
10533         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
10534         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
10535         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
10536         methods.
10537         (init_ctf_ops): Delete.
10538         (_initialize_ctf): Don't call it.
10539         * tracefile-tfile.c (tfile_target): New class.
10540         (tfile_ops): Now a tfile_target.
10541         (tfile_open, tfile_close, tfile_files_info)
10542         (tfile_get_tracepoint_status, tfile_trace_find)
10543         (tfile_fetch_registers, tfile_xfer_partial)
10544         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
10545         Refactor as tfile_target methods.
10546         (tfile_xfer_partial_features): Remove target_ops parameter.
10547         (init_tfile_ops): Delete.
10548         (_initialize_tracefile_tfile): Don't call it.
10549         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
10550         (tracefile_has_stack, tracefile_has_registers)
10551         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
10552         tracefile_target methods.
10553         (init_tracefile_ops): Delete.
10554         (tracefile_target::tracefile_target): New.
10555         * tracefile.h: Include "target.h".
10556         (tracefile_target): New class.
10557         (init_tracefile_ops): Delete.
10558
10559         * spu-multiarch.c (spu_multiarch_target): New class.
10560         (spu_ops): Now a spu_multiarch_target.
10561         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
10562         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
10563         (spu_search_memory, spu_mourn_inferior): Refactor as
10564         spu_multiarch_target methods.
10565         (init_spu_ops): Delete.
10566         (_initialize_spu_multiarch): Remove references to init_spu_ops,
10567         complete_target_initialization.
10568
10569         * ravenscar-thread.c (ravenscar_thread_target): New class.
10570         (ravenscar_ops): Now a ravenscar_thread_target.
10571         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
10572         (ravenscar_thread_alive, ravenscar_pid_to_str)
10573         (ravenscar_fetch_registers, ravenscar_store_registers)
10574         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
10575         (ravenscar_stopped_by_hw_breakpoint)
10576         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
10577         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
10578         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
10579         methods.
10580         (init_ravenscar_thread_ops): Delete.
10581         (_initialize_ravenscar): Remove references to
10582         init_ravenscar_thread_ops and complete_target_initialization.
10583
10584         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
10585         (bsd_uthread_target): New class.
10586         (bsd_uthread_ops): Now a bsd_uthread_target.
10587         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
10588         (bsd_uthread_close, bsd_uthread_mourn_inferior)
10589         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
10590         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
10591         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
10592         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
10593         (bsd_uthread_target): Delete function.
10594         (_initialize_bsd_uthread): Remove reference to
10595         complete_target_initialization.
10596
10597         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
10598         (target_bfd): ... this new class.
10599         (target_bfd_xfer_partial, target_bfd_get_section_table)
10600         (target_bfd_close): Refactor as target_bfd methods.
10601         (target_bfd::~target_bfd): New.
10602         (target_bfd_reopen): Adjust.
10603         (target_bfd::close): New.
10604
10605         * record-btrace.c (record_btrace_target): New class.
10606         (record_btrace_ops): Now a record_btrace_target.
10607         (record_btrace_open, record_btrace_stop_recording)
10608         (record_btrace_disconnect, record_btrace_close)
10609         (record_btrace_async, record_btrace_info)
10610         (record_btrace_insn_history, record_btrace_insn_history_range)
10611         (record_btrace_insn_history_from, record_btrace_call_history)
10612         (record_btrace_call_history_range)
10613         (record_btrace_call_history_from, record_btrace_record_method)
10614         (record_btrace_is_replaying, record_btrace_will_replay)
10615         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
10616         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
10617         (record_btrace_store_registers, record_btrace_prepare_to_store)
10618         (record_btrace_to_get_unwinder)
10619         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
10620         (record_btrace_commit_resume, record_btrace_wait)
10621         (record_btrace_stop, record_btrace_can_execute_reverse)
10622         (record_btrace_stopped_by_sw_breakpoint)
10623         (record_btrace_supports_stopped_by_sw_breakpoint)
10624         (record_btrace_stopped_by_hw_breakpoint)
10625         (record_btrace_supports_stopped_by_hw_breakpoint)
10626         (record_btrace_update_thread_list, record_btrace_thread_alive)
10627         (record_btrace_goto_begin, record_btrace_goto_end)
10628         (record_btrace_goto, record_btrace_stop_replaying_all)
10629         (record_btrace_execution_direction)
10630         (record_btrace_prepare_to_generate_core)
10631         (record_btrace_done_generating_core): Refactor as
10632         record_btrace_target methods.
10633         (init_record_btrace_ops): Delete.
10634         (_initialize_record_btrace): Remove reference to
10635         init_record_btrace_ops.
10636         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
10637         the execution_direction global.
10638         (record_full_base_target, record_full_target)
10639         (record_full_core_target): New classes.
10640         (record_full_ops): Now a record_full_target.
10641         (record_full_core_ops): Now a record_full_core_target.
10642         (record_full_target::detach, record_full_target::disconnect)
10643         (record_full_core_target::disconnect)
10644         (record_full_target::mourn_inferior, record_full_target::kill):
10645         New.
10646         (record_full_open, record_full_close, record_full_async): Refactor
10647         as methods of the record_full_base_target class.
10648         (record_full_resume, record_full_commit_resume): Refactor
10649         as methods of the record_full_target class.
10650         (record_full_wait, record_full_stopped_by_watchpoint)
10651         (record_full_stopped_data_address)
10652         (record_full_stopped_by_sw_breakpoint)
10653         (record_full_supports_stopped_by_sw_breakpoint)
10654         (record_full_stopped_by_hw_breakpoint)
10655         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
10656         methods of the record_full_base_target class.
10657         (record_full_store_registers, record_full_xfer_partial)
10658         (record_full_insert_breakpoint, record_full_remove_breakpoint):
10659         Refactor as methods of the record_full_target class.
10660         (record_full_can_execute_reverse, record_full_get_bookmark)
10661         (record_full_goto_bookmark, record_full_execution_direction)
10662         (record_full_record_method, record_full_info, record_full_delete)
10663         (record_full_is_replaying, record_full_will_replay)
10664         (record_full_goto_begin, record_full_goto_end, record_full_goto)
10665         (record_full_stop_replaying): Refactor as methods of the
10666         record_full_base_target class.
10667         (record_full_core_resume, record_full_core_kill)
10668         (record_full_core_fetch_registers)
10669         (record_full_core_prepare_to_store)
10670         (record_full_core_store_registers, record_full_core_xfer_partial)
10671         (record_full_core_insert_breakpoint)
10672         (record_full_core_remove_breakpoint)
10673         (record_full_core_has_execution): Refactor
10674         as methods of the record_full_core_target class.
10675         (record_full_base_target::supports_delete_record): New.
10676         (init_record_full_ops): Delete.
10677         (init_record_full_core_ops): Delete.
10678         (record_full_save): Refactor as method of the
10679         record_full_base_target class.
10680         (_initialize_record_full): Remove references to
10681         init_record_full_ops and init_record_full_core_ops.
10682
10683         * remote.c (remote_target, extended_remote_target): New classes.
10684         (remote_ops): Now a remote_target.
10685         (extended_remote_ops): Now an extended_remote_target.
10686         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
10687         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
10688         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
10689         (remote_pass_signals, remote_set_syscall_catchpoint)
10690         (remote_program_signals, )
10691         (remote_thread_always_alive): Remove target_ops parameter.
10692         (remote_thread_alive, remote_thread_name)
10693         (remote_update_thread_list, remote_threads_extra_info)
10694         (remote_static_tracepoint_marker_at)
10695         (remote_static_tracepoint_markers_by_strid)
10696         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
10697         (remote_open): Refactor as methods of remote_target.
10698         (extended_remote_open, extended_remote_detach)
10699         (extended_remote_attach, extended_remote_post_attach):
10700         (extended_remote_supports_disable_randomization)
10701         (extended_remote_create_inferior): : Refactor as method of
10702         extended_remote_target.
10703         (remote_set_permissions, remote_open_1, remote_detach)
10704         (remote_follow_fork, remote_follow_exec, remote_disconnect)
10705         (remote_resume, remote_commit_resume, remote_stop)
10706         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
10707         (remote_terminal_ours, remote_wait, remote_fetch_registers)
10708         (remote_prepare_to_store, remote_store_registers)
10709         (remote_flash_erase, remote_flash_done, remote_files_info)
10710         (remote_kill, remote_mourn, remote_insert_breakpoint)
10711         (remote_remove_breakpoint, remote_insert_watchpoint)
10712         (remote_watchpoint_addr_within_range)
10713         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
10714         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
10715         (remote_supports_stopped_by_sw_breakpoint)
10716         (remote_stopped_by_hw_breakpoint)
10717         (remote_supports_stopped_by_hw_breakpoint)
10718         (remote_stopped_by_watchpoint, remote_stopped_data_address)
10719         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
10720         (remote_verify_memory): Refactor as methods of remote_target.
10721         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
10722         parameter.
10723         (remote_xfer_partial, remote_get_memory_xfer_limit)
10724         (remote_search_memory, remote_rcmd, remote_memory_map)
10725         (remote_pid_to_str, remote_get_thread_local_address)
10726         (remote_get_tib_address, remote_read_description): Refactor as
10727         methods of remote_target.
10728         (remote_target::fileio_open, remote_target::fileio_pwrite)
10729         (remote_target::fileio_pread, remote_target::fileio_close): New.
10730         (remote_hostio_readlink, remote_hostio_fstat)
10731         (remote_filesystem_is_local, remote_can_execute_reverse)
10732         (remote_supports_non_stop, remote_supports_disable_randomization)
10733         (remote_supports_multi_process, remote_supports_cond_breakpoints)
10734         (remote_supports_enable_disable_tracepoint)
10735         (remote_supports_string_tracing)
10736         (remote_can_run_breakpoint_commands, remote_trace_init)
10737         (remote_download_tracepoint, remote_can_download_tracepoint)
10738         (remote_download_trace_state_variable, remote_enable_tracepoint)
10739         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10740         (remote_trace_start, remote_get_trace_status)
10741         (remote_get_tracepoint_status, remote_trace_stop)
10742         (remote_trace_find, remote_get_trace_state_variable_value)
10743         (remote_save_trace_data, remote_get_raw_trace_data)
10744         (remote_set_disconnected_tracing, remote_core_of_thread)
10745         (remote_set_circular_trace_buffer, remote_traceframe_info)
10746         (remote_get_min_fast_tracepoint_insn_len)
10747         (remote_set_trace_buffer_size, remote_set_trace_notes)
10748         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10749         (remote_disable_btrace, remote_teardown_btrace)
10750         (remote_read_btrace, remote_btrace_conf)
10751         (remote_augmented_libraries_svr4_read, remote_load)
10752         (remote_pid_to_exec_file, remote_can_do_single_step)
10753         (remote_execution_direction, remote_thread_handle_to_thread_info):
10754         Refactor as methods of remote_target.
10755         (init_remote_ops, init_extended_remote_ops): Delete.
10756         (remote_can_async_p, remote_is_async_p, remote_async)
10757         (remote_thread_events, remote_upload_tracepoints)
10758         (remote_upload_trace_state_variables): Refactor as methods of
10759         remote_target.
10760         (_initialize_remote): Remove references to init_remote_ops and
10761         init_extended_remote_ops.
10762
10763         * remote-sim.c (gdbsim_target): New class.
10764         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10765         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10766         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10767         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10768         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10769         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10770         Refactor as methods of gdbsim_target.
10771         (gdbsim_ops): Now a gdbsim_target.
10772         (init_gdbsim_ops): Delete.
10773         (gdbsim_cntrl_c): Adjust.
10774         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10775
10776         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10777         (the_amd64_linux_nat_target): New.
10778         (amd64_linux_fetch_inferior_registers)
10779         (amd64_linux_store_inferior_registers): Refactor as methods of
10780         amd64_linux_nat_target.
10781         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
10782         * i386-linux-nat.c: Don't include "linux-nat.h".
10783         (i386_linux_nat_target): New class.
10784         (the_i386_linux_nat_target): New.
10785         (i386_linux_fetch_inferior_registers)
10786         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10787         as methods of i386_linux_nat_target.
10788         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10789         * inf-child.c (inf_child_ops): Delete.
10790         (inf_child_fetch_inferior_registers)
10791         (inf_child_store_inferior_registers): Delete.
10792         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10793         methods of inf_child_target.
10794         (inf_child_target::supports_terminal_ours)
10795         (inf_child_target::terminal_init)
10796         (inf_child_target::terminal_inferior)
10797         (inf_child_target::terminal_ours_for_output)
10798         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10799         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10800         New.
10801         (inf_child_open, inf_child_disconnect, inf_child_close)
10802         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10803         (inf_child_post_startup_inferior, inf_child_can_run)
10804         (inf_child_pid_to_exec_file): Refactor as methods of
10805         inf_child_target.
10806         (inf_child_follow_fork): Delete.
10807         (inf_child_target::can_create_inferior)
10808         (inf_child_target::can_attach): New.
10809         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10810         (inf_child_target::has_stack, inf_child_target::has_registers)
10811         (inf_child_target::has_execution): New.
10812         (inf_child_fileio_open, inf_child_fileio_pwrite)
10813         (inf_child_fileio_pread, inf_child_fileio_fstat)
10814         (inf_child_fileio_close, inf_child_fileio_unlink)
10815         (inf_child_fileio_readlink, inf_child_use_agent)
10816         (inf_child_can_use_agent): Refactor as methods of
10817         inf_child_target.
10818         (return_zero, inf_child_target): Delete.
10819         (inf_child_target::inf_child_target): New.
10820         * inf-child.h: Include "target.h".
10821         (inf_child_target): Delete function prototype.
10822         (inf_child_target): New class.
10823         (inf_child_open_target, inf_child_mourn_inferior)
10824         (inf_child_maybe_unpush_target): Delete.
10825         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10826         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10827         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10828         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10829         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10830         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10831         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10832         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10833         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10834         methods of inf_ptrace_target.
10835         (inf_ptrace_target): Delete function.
10836         * inf-ptrace.h: Include "inf-child.h".
10837         (inf_ptrace_target): Delete function declaration.
10838         (inf_ptrace_target): New class.
10839         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10840         * linux-nat.c (linux_target): New.
10841         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10842         (linux_nat_target::~linux_nat_target): New.
10843         (linux_child_post_attach, linux_child_post_startup_inferior)
10844         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10845         (linux_child_remove_fork_catchpoint)
10846         (linux_child_insert_vfork_catchpoint)
10847         (linux_child_remove_vfork_catchpoint)
10848         (linux_child_insert_exec_catchpoint)
10849         (linux_child_remove_exec_catchpoint)
10850         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10851         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10852         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10853         (linux_nat_stopped_data_address)
10854         (linux_nat_stopped_by_sw_breakpoint)
10855         (linux_nat_supports_stopped_by_sw_breakpoint)
10856         (linux_nat_stopped_by_hw_breakpoint)
10857         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10858         (linux_nat_kill, linux_nat_mourn_inferior)
10859         (linux_nat_xfer_partial, linux_nat_thread_alive)
10860         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10861         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10862         (linux_child_static_tracepoint_markers_by_strid)
10863         (linux_nat_is_async_p, linux_nat_can_async_p)
10864         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10865         (linux_nat_supports_multi_process)
10866         (linux_nat_supports_disable_randomization, linux_nat_async)
10867         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10868         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10869         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10870         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10871         methods of linux_nat_target.
10872         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10873         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10874         parameter.
10875         (check_stopped_by_watchpoint): Adjust.
10876         (linux_xfer_partial): Delete.
10877         (linux_target_install_ops, linux_target, linux_nat_add_target):
10878         Delete.
10879         (linux_nat_target::linux_nat_target): New.
10880         * linux-nat.h: Include "inf-ptrace.h".
10881         (linux_nat_target): New.
10882         (linux_target, linux_target_install_ops, linux_nat_add_target):
10883         Delete function declarations.
10884         (linux_target): Declare global.
10885         * linux-thread-db.c (thread_db_target): New.
10886         (thread_db_target::thread_db_target): New.
10887         (thread_db_ops): Delete.
10888         (the_thread_db_target): New.
10889         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10890         (thread_db_update_thread_list, thread_db_pid_to_str)
10891         (thread_db_extra_thread_info)
10892         (thread_db_thread_handle_to_thread_info)
10893         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10894         (thread_db_resume): Refactor as methods of thread_db_target.
10895         (init_thread_db_ops): Delete.
10896         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10897         * x86-linux-nat.c: Don't include "linux-nat.h".
10898         (super_post_startup_inferior): Delete.
10899         (x86_linux_nat_target::~x86_linux_nat_target): New.
10900         (x86_linux_child_post_startup_inferior)
10901         (x86_linux_read_description, x86_linux_enable_btrace)
10902         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10903         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10904         methods of x86_linux_nat_target.
10905         (x86_linux_create_target): Delete.  Bits folded ...
10906         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10907         pointer.
10908         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10909         (x86_linux_nat_target): New class.
10910         (x86_linux_create_target): Delete.
10911         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10912         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10913         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10914         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10915         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10916         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10917         make extern.
10918         (x86_use_watchpoints): Delete.
10919         * x86-nat.h: Include "breakpoint.h" and "target.h".
10920         (x86_use_watchpoints): Delete.
10921         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10922         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10923         (x86_insert_watchpoint, x86_remove_watchpoint)
10924         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10925         (x86_stopped_by_hw_breakpoint): New declarations.
10926         (x86_nat_target): New template class.
10927
10928         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10929         (the_ppc_linux_nat_target): New.
10930         (ppc_linux_fetch_inferior_registers)
10931         (ppc_linux_can_use_hw_breakpoint)
10932         (ppc_linux_region_ok_for_hw_watchpoint)
10933         (ppc_linux_ranged_break_num_registers)
10934         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10935         (ppc_linux_insert_mask_watchpoint)
10936         (ppc_linux_remove_mask_watchpoint)
10937         (ppc_linux_can_accel_watchpoint_condition)
10938         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10939         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10940         (ppc_linux_watchpoint_addr_within_range)
10941         (ppc_linux_masked_watch_num_registers)
10942         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10943         (ppc_linux_read_description): Refactor as methods of
10944         ppc_linux_nat_target.
10945         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10946
10947         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10948         (procfs_target): New class.
10949         (the_procfs_target): New.
10950         (procfs_target): Delete function.
10951         (procfs_auxv_parse, procfs_attach, procfs_detach)
10952         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10953         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10954         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10955         (procfs_create_inferior, procfs_update_thread_list)
10956         (procfs_thread_alive, procfs_pid_to_str)
10957         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10958         (procfs_stopped_data_address, procfs_insert_watchpoint)
10959         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10960         (proc_find_memory_regions, procfs_info_proc)
10961         (procfs_make_note_section): Refactor as methods of procfs_target.
10962         (_initialize_procfs): Adjust.
10963         * sol-thread.c (sol_thread_target): New class.
10964         (sol_thread_ops): Now a sol_thread_target.
10965         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10966         (sol_thread_fetch_registers, sol_thread_store_registers)
10967         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10968         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10969         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10970         (init_sol_thread_ops): Delete.
10971         (_initialize_sol_thread): Adjust.  Remove references to
10972         init_sol_thread_ops and complete_target_initialization.
10973
10974         * windows-nat.c (windows_nat_target): New class.
10975         (windows_fetch_inferior_registers)
10976         (windows_store_inferior_registers, windows_resume, windows_wait)
10977         (windows_attach, windows_detach, windows_pid_to_exec_file)
10978         (windows_files_info, windows_create_inferior)
10979         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10980         (windows_close, windows_pid_to_str, windows_xfer_partial)
10981         (windows_get_tib_address, windows_get_ada_task_ptid)
10982         (windows_thread_name, windows_thread_alive): Refactor as
10983         windows_nat_target methods.
10984         (do_initial_windows_stuff): Adjust.
10985         (windows_target): Delete function.
10986         (_initialize_windows_nat): Adjust.
10987
10988         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10989         (darwin_mourn_inferior, darwin_kill_inferior)
10990         (darwin_create_inferior, darwin_attach, darwin_detach)
10991         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10992         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10993         (darwin_supports_multi_process): Refactor as darwin_nat_target
10994         methods.
10995         (darwin_resume_to, darwin_files_info): Delete.
10996         (_initialize_darwin_inferior): Rename to ...
10997         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10998         * darwin-nat.h: Include "inf-child.h".
10999         (darwin_nat_target): New class.
11000         (darwin_complete_target): Delete.
11001         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11002         (darwin_target): New.
11003         (i386_darwin_fetch_inferior_registers)
11004         (i386_darwin_store_inferior_registers): Refactor as methods of
11005         darwin_nat_target.
11006         (darwin_complete_target): Delete, with ...
11007         (_initialize_i386_darwin_nat): ... bits factored out here.
11008
11009         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11010         (the_alpha_linux_nat_target): New.
11011         (alpha_linux_register_u_offset): Refactor as
11012         alpha_linux_nat_target method.
11013         (_initialize_alpha_linux_nat): Adjust.
11014         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11015         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11016         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11017         methods of linux_nat_trad_target.
11018         (linux_trad_target): Delete.
11019         * linux-nat-trad.h (linux_trad_target): Delete function.
11020         (linux_nat_trad_target): New class.
11021         * mips-linux-nat.c (mips_linux_nat_target): New class.
11022         (super_fetch_registers, super_store_registers, super_close):
11023         Delete.
11024         (the_mips_linux_nat_target): New.
11025         (mips64_linux_regsets_fetch_registers)
11026         (mips64_linux_regsets_store_registers)
11027         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11028         (mips_linux_register_u_offset, mips_linux_read_description)
11029         (mips_linux_can_use_hw_breakpoint)
11030         (mips_linux_stopped_by_watchpoint)
11031         (mips_linux_stopped_data_address)
11032         (mips_linux_region_ok_for_hw_watchpoint)
11033         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11034         (mips_linux_close): Refactor as methods of mips_linux_nat.
11035         (_initialize_mips_linux_nat): Adjust to C++ification.
11036
11037         * aix-thread.c (aix_thread_target): New class.
11038         (aix_thread_ops): Now an aix_thread_target.
11039         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11040         (aix_thread_fetch_registers, aix_thread_store_registers)
11041         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11042         (aix_thread_thread_alive, aix_thread_pid_to_str)
11043         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11044         Refactor as methods of aix_thread_target.
11045         (init_aix_thread_ops): Delete.
11046         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11047         and complete_target_initialization.
11048         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11049         (rs6000_nat_target): New class.
11050         (the_rs6000_nat_target): New.
11051         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11052         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11053         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11054         (super_create_inferior): Delete.
11055         (_initialize_rs6000_nat): Adjust to C++ification.
11056
11057         * arm-linux-nat.c (arm_linux_nat_target): New class.
11058         (the_arm_linux_nat_target): New.
11059         (arm_linux_fetch_inferior_registers)
11060         (arm_linux_store_inferior_registers, arm_linux_read_description)
11061         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11062         (arm_linux_remove_hw_breakpoint)
11063         (arm_linux_region_ok_for_hw_watchpoint)
11064         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11065         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11066         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11067         arm_linux_nat_target.
11068         (_initialize_arm_linux_nat): Adjust to C++ification.
11069
11070         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11071         (the_aarch64_linux_nat_target): New.
11072         (aarch64_linux_fetch_inferior_registers)
11073         (aarch64_linux_store_inferior_registers)
11074         (aarch64_linux_child_post_startup_inferior)
11075         (aarch64_linux_read_description)
11076         (aarch64_linux_can_use_hw_breakpoint)
11077         (aarch64_linux_insert_hw_breakpoint)
11078         (aarch64_linux_remove_hw_breakpoint)
11079         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11080         (aarch64_linux_region_ok_for_hw_watchpoint)
11081         (aarch64_linux_stopped_data_address)
11082         (aarch64_linux_stopped_by_watchpoint)
11083         (aarch64_linux_watchpoint_addr_within_range)
11084         (aarch64_linux_can_do_single_step): Refactor as methods of
11085         aarch64_linux_nat_target.
11086         (super_post_startup_inferior): Delete.
11087         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11088
11089         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11090         (the_hppa_linux_nat_target): New.
11091         (hppa_linux_fetch_inferior_registers)
11092         (hppa_linux_store_inferior_registers): Refactor as methods of
11093         hppa_linux_nat_target.
11094         (_initialize_hppa_linux_nat): Adjust to C++ification.
11095
11096         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11097         (the_ia64_linux_nat_target): New.
11098         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11099         (ia64_linux_stopped_data_address)
11100         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11101         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11102         ia64_linux_nat_target methods.
11103         (super_xfer_partial): Delete.
11104         (_initialize_ia64_linux_nat): Adjust to C++ification.
11105
11106         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11107         (the_m32r_linux_nat_target): New.
11108         (m32r_linux_fetch_inferior_registers)
11109         (m32r_linux_store_inferior_registers): Refactor as
11110         m32r_linux_nat_target methods.
11111         (_initialize_m32r_linux_nat): Adjust to C++ification.
11112
11113         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11114         (the_m68k_linux_nat_target): New.
11115         (m68k_linux_fetch_inferior_registers)
11116         (m68k_linux_store_inferior_registers): Refactor as
11117         m68k_linux_nat_target methods.
11118         (_initialize_m68k_linux_nat): Adjust to C++ification.
11119
11120         * s390-linux-nat.c (s390_linux_nat_target): New class.
11121         (the_s390_linux_nat_target): New.
11122         (s390_linux_fetch_inferior_registers)
11123         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11124         (s390_insert_watchpoint, s390_remove_watchpoint)
11125         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11126         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11127         (s390_auxv_parse, s390_read_description): Refactor as methods of
11128         s390_linux_nat_target.
11129         (_initialize_s390_nat): Adjust to C++ification.
11130
11131         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11132         (the_sparc_linux_nat_target): New.
11133         (_initialize_sparc_linux_nat): Adjust to C++ification.
11134         * sparc-nat.c (sparc_fetch_inferior_registers)
11135         (sparc_store_inferior_registers): Remove target_ops parameter.
11136         * sparc-nat.h (sparc_fetch_inferior_registers)
11137         (sparc_store_inferior_registers): Remove target_ops parameter.
11138         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11139         (the_sparc64_linux_nat_target): New.
11140         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11141
11142         * spu-linux-nat.c (spu_linux_nat_target): New class.
11143         (the_spu_linux_nat_target): New.
11144         (spu_child_post_startup_inferior, spu_child_post_attach)
11145         (spu_child_wait, spu_fetch_inferior_registers)
11146         (spu_store_inferior_registers, spu_xfer_partial)
11147         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11148         methods.
11149         (_initialize_spu_nat): Adjust to C++ification.
11150
11151         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11152         (the_tilegx_linux_nat_target): New.
11153         (fetch_inferior_registers, store_inferior_registers):
11154         Refactor as methods.
11155         (_initialize_tile_linux_nat): Adjust to C++ification.
11156
11157         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11158         (the_xtensa_linux_nat_target): New.
11159         (xtensa_linux_fetch_inferior_registers)
11160         (xtensa_linux_store_inferior_registers): Refactor as
11161         xtensa_linux_nat_target methods.
11162         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11163
11164         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11165         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11166         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11167         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11168         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11169         (fbsd_stopped_by_sw_breakpoint)
11170         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11171         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11172         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11173         (fbsd_post_startup_inferior, fbsd_post_attach)
11174         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11175         (fbsd_set_syscall_catchpoint)
11176         (super_xfer_partial, super_resume, super_wait)
11177         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11178         (fbsd_handle_debug_trap): Remove target_ops parameter.
11179         (fbsd_nat_add_target): Delete.
11180         * fbsd-nat.h: Include "inf-ptrace.h".
11181         (fbsd_nat_add_target): Delete.
11182         (USE_SIGTRAP_SIGINFO): Define.
11183         (fbsd_nat_target): New class.
11184
11185         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11186         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11187         (amd64bsd_target): Delete.
11188         * amd64-bsd-nat.h: New file.
11189         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11190         "x86-bsd-nat.h".
11191         (amd64_fbsd_nat_target): New class.
11192         (the_amd64_fbsd_nat_target): New.
11193         (amd64fbsd_read_description): Refactor as method of
11194         amd64_fbsd_nat_target.
11195         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11196         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11197         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11198         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11199         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11200         (i386bsd_target): Delete.
11201         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11202         (i386bsd_fetch_inferior_registers)
11203         (i386bsd_store_inferior_registers): Declare.
11204         (i386_bsd_nat_target): New class.
11205         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11206         (the_i386_fbsd_nat_target): New.
11207         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11208         i386_fbsd_nat_target methods.
11209         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11210         (_initialize_i386fbsd_nat): Adjust to C++ification.
11211         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11212         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11213         (_initialize_x86_bsd_nat): Adjust to C++ification.
11214         * x86-bsd-nat.h: Include "x86-nat.h".
11215         (x86bsd_target): Delete declaration.
11216         (x86bsd_nat_target): New class.
11217
11218         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11219         (the_aarch64_fbsd_nat_target): New.
11220         (aarch64_fbsd_fetch_inferior_registers)
11221         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11222         aarch64_fbsd_nat_target.
11223         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11224         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11225         (the_alpha_bsd_nat_target): New.
11226         (alphabsd_fetch_inferior_registers)
11227         (alphabsd_store_inferior_registers): Refactor as
11228         alpha_bsd_nat_target methods.
11229         (_initialize_alphabsd_nat): Refactor as methods of
11230         alpha_bsd_nat_target.
11231         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11232         (the_amd64_nbsd_nat_target): New.
11233         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11234         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11235         (the_amd64_obsd_nat_target): New.
11236         (_initialize_amd64obsd_nat): Adjust to C++ification.
11237         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11238         (the_arm_fbsd_nat_target): New.
11239         (arm_fbsd_fetch_inferior_registers)
11240         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11241         (_initialize_arm_fbsd_nat): Refactor as methods of
11242         arm_fbsd_nat_target.
11243         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11244         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11245         (the_arm_netbsd_nat_target): New.
11246         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11247         arm_netbsd_nat_target.
11248         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11249         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11250         (the_hppa_nbsd_nat_target): New.
11251         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11252         hppa_nbsd_nat_target methods.
11253         (_initialize_hppanbsd_nat): Adjust to C++ification.
11254         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11255         (the_hppa_obsd_nat_target): New.
11256         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11257         methods of hppa_obsd_nat_target.
11258         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11259         add_target.
11260         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11261         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11262         add_target.
11263         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11264         (_initialize_i386obsd_nat): Use add_target.
11265         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11266         (the_m68k_bsd_nat_target): New.
11267         (m68kbsd_fetch_inferior_registers)
11268         (m68kbsd_store_inferior_registers): Refactor as methods of
11269         m68k_bsd_nat_target.
11270         (_initialize_m68kbsd_nat): Adjust to C++ification.
11271         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11272         (the_mips_fbsd_nat_target): New.
11273         (mips_fbsd_fetch_inferior_registers)
11274         (mips_fbsd_store_inferior_registers): Refactor as methods of
11275         mips_fbsd_nat_target.
11276         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11277         add_target.
11278         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11279         (the_mips_nbsd_nat_target): New.
11280         (mipsnbsd_fetch_inferior_registers)
11281         (mipsnbsd_store_inferior_registers): Refactor as methods of
11282         mips_nbsd_nat_target.
11283         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11284         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11285         (the_mips64_obsd_nat_target): New.
11286         (mips64obsd_fetch_inferior_registers)
11287         (mips64obsd_store_inferior_registers): Refactor as methods of
11288         mips64_obsd_nat_target.
11289         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11290         add_target.
11291         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11292         nbsd_nat_target.
11293         * nbsd-nat.h: Include "inf-ptrace.h".
11294         (nbsd_nat_target): New class.
11295         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11296         (obsd_wait): Refactor as methods of obsd_nat_target.
11297         (obsd_add_target): Delete.
11298         * obsd-nat.h: Include "inf-ptrace.h".
11299         (obsd_nat_target): New class.
11300         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11301         (the_ppc_fbsd_nat_target): New.
11302         (ppcfbsd_fetch_inferior_registers)
11303         (ppcfbsd_store_inferior_registers): Refactor as methods of
11304         ppc_fbsd_nat_target.
11305         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11306         add_target.
11307         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11308         (the_ppc_nbsd_nat_target): New.
11309         (ppcnbsd_fetch_inferior_registers)
11310         (ppcnbsd_store_inferior_registers): Refactor as methods of
11311         ppc_nbsd_nat_target.
11312         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11313         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11314         (the_ppc_obsd_nat_target): New.
11315         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11316         methods of ppc_obsd_nat_target.
11317         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11318         add_target.
11319         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11320         (the_sh_nbsd_nat_target): New.
11321         (shnbsd_fetch_inferior_registers)
11322         (shnbsd_store_inferior_registers): Refactor as methods of
11323         sh_nbsd_nat_target.
11324         (_initialize_shnbsd_nat): Adjust to C++ification.
11325         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11326         (inf_ptrace_xfer_partial): Delete.
11327         (sparc_xfer_partial, sparc_target): Delete.
11328         * sparc-nat.h (sparc_fetch_inferior_registers)
11329         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11330         (sparc_target): Delete function declaration.
11331         (sparc_target): New template class.
11332         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11333         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11334         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11335         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11336         add_target.
11337         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11338         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11339         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11340         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11341         add_target.
11342         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11343         (the_vax_bsd_nat_target): New.
11344         (vaxbsd_fetch_inferior_registers)
11345         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11346         methods.
11347         (_initialize_vaxbsd_nat): Adjust to C++ification.
11348
11349         * bsd-kvm.c (bsd_kvm_target): New class.
11350         (bsd_kvm_ops): Now a bsd_kvm_target.
11351         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11352         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11353         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11354         bsd_kvm_target.
11355         (bsd_kvm_return_one): Delete.
11356         (bsd_kvm_add_target): Adjust to C++ification.
11357
11358         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11359         (nto_procfs_target_procfs): New classes.
11360         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11361         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11362         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11363         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11364         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11365         (procfs_remove_hw_breakpoint, procfs_resume)
11366         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11367         (procfs_kill_inferior, procfs_store_registers)
11368         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11369         as methods of nto_procfs_target.
11370         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11371         (nto_native_ops): Delete.
11372         (procfs_open, procfs_native_open): Delete.
11373         (nto_native_ops): Now an nto_procfs_target_native.
11374         (init_procfs_targets): Adjust to C++ification.
11375         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11376         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11377         Refactor as methods of nto_procfs_target.
11378
11379         * go32-nat.c (go32_nat_target): New class.
11380         (the_go32_nat_target): New.
11381         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11382         (go32_store_registers, go32_xfer_partial, go32_files_info)
11383         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11384         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11385         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11386         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11387         (go32_target): Delete.
11388         (_initialize_go32_nat): Adjust to C++ification.
11389
11390         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11391         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11392         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11393         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11394         gnu_nat_target.
11395         (gnu_target): Delete.
11396         * gnu-nat.h (gnu_target): Delete.
11397         (gnu_nat_target): New class.
11398         * i386-gnu-nat.c (gnu_base_target): New.
11399         (i386_gnu_nat_target): New class.
11400         (the_i386_gnu_nat_target): New.
11401         (_initialize_i386gnu_nat): Adjust to C++ification.
11402
11403 2018-05-02  Pedro Alves  <palves@redhat.com>
11404
11405         * bfd-target.c (target_bfd_xclose): Rename to ...
11406         (target_bfd_close): ... this.
11407         (target_bfd_reopen): Adjust.
11408         * target.c (target_close): Remove references to to_xclose.
11409         * target.h (target_ops::to_xclose): Delete.
11410         (target_ops::to_close): Update comments.
11411
11412 2018-05-02  Pedro Alves  <palves@redhat.com>
11413
11414         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11415         "linux-nat.h".
11416         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11417         * inf-ptrace.c (inf_ptrace_register_u_offset)
11418         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11419         (inf_ptrace_store_register, inf_ptrace_store_registers)
11420         (inf_ptrace_trad_target): Move to ...
11421         * linux-nat-trad.c: ... this new file.
11422         * linux-nat-trad.h: New file.
11423         * linux-nat.c (linux_target_install_ops): Make extern.
11424         (linux_trad_target): Delete.
11425         * linux-nat.h (linux_trad_target): Delete declaration.
11426         (linux_target_install_ops): Declare.
11427         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11428         "linux-nat.h".
11429
11430 2018-05-02  Pedro Alves  <palves@redhat.com>
11431
11432         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11433         procfs_target/add_target here.
11434         * procfs.c (procfs_target): Make static.
11435         (_initialize_procfs): Call add_target here.
11436         * procfs.h (struct target_ops): Remove forward declaration.
11437         (procfs_target): Remove declaration.
11438         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11439
11440 2018-05-02  Pedro Alves  <palves@redhat.com>
11441
11442         * procfs.c (procfs_stopped_by_watchpoint)
11443         (procfs_insert_watchpoint, procfs_remove_watchpoint)
11444         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11445         Forward declare.
11446         (procfs_use_watchpoints): Delete, move contents...
11447         (procfs_target): ... here.
11448         * procfs.h (procfs_use_watchpoints): Delete declaration.
11449         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11450         procfs_use_watchpoints.
11451         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
11452         procfs_use_watchpoints.
11453
11454 2018-05-02  Tom Tromey  <tom@tromey.com>
11455
11456         PR python/20084:
11457         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
11458         and var_zuinteger_unlimited.
11459         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
11460         and PARAM_ZUINTEGER_UNLIMITED.
11461         (set_parameter_value): Handle var_zuinteger and
11462         var_zuinteger_unlimited.
11463         (add_setshow_generic): Likewise.
11464         (parmpy_init): Likewise.
11465
11466 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
11467
11468         PR rust/23124
11469         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
11470         pointer is not null before dereferencing it.
11471
11472 2018-04-30  Tom Tromey  <tom@tromey.com>
11473
11474         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
11475         is_mi_like_p.
11476
11477 2018-04-30  Tom Tromey  <tom@tromey.com>
11478
11479         * breakpoint.c (mention): Remove use of is_mi_like_p.
11480         (print_mention_ranged_breakpoint): Likewise.
11481         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
11482         of is_mi_like_p.
11483
11484 2018-04-30  Tom Tromey  <tom@tromey.com>
11485
11486         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
11487
11488 2018-04-30  Tom Tromey  <tom@tromey.com>
11489
11490         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
11491         (info_spu_event_command): Remove some uses of is_mi_like_p.
11492
11493 2018-04-30  Tom Tromey  <tom@tromey.com>
11494
11495         * python/py-framefilter.c (py_print_single_arg)
11496         (enumerate_locals, py_print_args, py_print_frame): Remove some
11497         uses of is_mi_like_p.
11498
11499 2018-04-30  Tom Tromey  <tom@tromey.com>
11500
11501         * ui-out.c: Update.
11502         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
11503         * ui-out.h (ui_out::is_mi_like_p): Now const.
11504         (ui_out::do_is_mi_like_p): Now const.
11505         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
11506
11507 2018-04-30  Tom Tromey  <tom@tromey.com>
11508
11509         * varobj.c (varobj_set_visualizer): Use new_reference.
11510         * python/python.c (gdbpy_decode_line): Use new_reference.
11511         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
11512         new_reference.
11513
11514 2018-04-30  Tom Tromey  <tom@tromey.com>
11515
11516         * varobj.c (install_new_value): Use new_reference.
11517         * value.h (value_incref): Return void.  Swap intro comment with
11518         value_decref.
11519         * value.c (set_value_parent): Use new_reference.
11520         (value_incref): Return void.  Update intro comment.
11521         (release_value): Use new_reference.
11522         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
11523
11524 2018-04-30  Tom Tromey  <tom@tromey.com>
11525
11526         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
11527         * gdb_bfd.h (new_bfd_ref): Remove.
11528         (gdb_bfd_open): Update comment.
11529         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11530         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
11531         (gdb_bfd_fdopenr): Use new_reference.
11532         * exec.c (exec_file_attach): Use new_reference.
11533
11534 2018-04-30  Tom Tromey  <tom@tromey.com>
11535
11536         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
11537         method.
11538
11539 2018-04-30  Tom Tromey  <tom@tromey.com>
11540
11541         * jit.c (jit_read_code_entry): Use type_align.
11542         * i386-tdep.c (i386_gdbarch_init): Don't call
11543         set_gdbarch_long_long_align_bit.
11544         * gdbarch.sh: Remove long_long_align_bit.
11545         * gdbarch.c, gdbarch.h: Rebuild.
11546         * arc-tdep.c (arc_type_align): New function.
11547         (arc_gdbarch_init): Use arc_type_align.  Don't call
11548         set_gdbarch_long_long_align_bit.
11549
11550 2018-04-30  Tom Tromey  <tom@tromey.com>
11551
11552         * rust-lang.c (rust_type_alignment): Remove.
11553         (rust_composite_type): Use type_align.
11554
11555 2018-04-30  Tom Tromey  <tom@tromey.com>
11556
11557         * NEWS: Mention Type.align.
11558         * python/py-type.c (typy_get_alignof): New function.
11559         (type_object_getset): Add "alignof".
11560
11561 2018-04-30  Tom Tromey  <tom@tromey.com>
11562
11563         PR exp/17095:
11564         * NEWS: Update.
11565         * std-operator.def (UNOP_ALIGNOF): New operator.
11566         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
11567         New.
11568         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
11569         * c-lang.c (c_op_print_tab): Add alignof.
11570         * c-exp.y (ALIGNOF): New token.
11571         (exp): Add "ALIGNOF" production.
11572         (ident_tokens): Add _Alignof and alignof.
11573
11574 2018-04-30  Tom Tromey  <tom@tromey.com>
11575
11576         * i386-tdep.c (i386_type_align): New function.
11577         (i386_gdbarch_init): Update.
11578         * gdbarch.sh (type_align): New method.
11579         * gdbarch.c, gdbarch.h: Rebuild.
11580         * arch-utils.h (default_type_align): Declare.
11581         * arch-utils.c (default_type_align): New function.
11582         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
11583         (struct type) <align_log2>: New field.
11584         <instance_flags>: Now a bitfield.
11585         (TYPE_RAW_ALIGN): New macro.
11586         (type_align, type_raw_align, set_type_align): Declare.
11587         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
11588         functions.
11589         * dwarf2read.c (quirk_rust_enum): Set type alignment.
11590         (get_alignment, maybe_set_alignment): New functions.
11591         (read_structure_type, read_enumeration_type, read_array_type)
11592         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
11593         (read_subrange_type, read_base_type): Set type alignment.
11594
11595 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
11596
11597         * dwarf2read.c (read_index_from_section): Use bool.
11598
11599 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
11600
11601         PR gdb/22950
11602         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
11603         with #ifdef.
11604
11605 2018-04-29  John Reiser  <jreiser@BitWagon.com>
11606
11607         PR build/22873
11608         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
11609         last step, and do it atomically.
11610
11611 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
11612
11613         * compile/compile-c-types.c (convert_int, convert_float):
11614         Update for C FE v1.
11615
11616 2018-04-27  Tom Tromey  <tom@tromey.com>
11617
11618         PR rust/22545:
11619         * rust-lang.c (rust_inclusive_range_type_p): New function.
11620         (rust_range): Handle inclusive ranges.
11621         (rust_compute_range): Likewise.
11622         * rust-exp.y (struct rust_op) <inclusive>: New field.
11623         (DOTDOTEQ): New constant.
11624         (range_expr): Add "..=" productions.
11625         (operator_tokens): Add "..=" token.
11626         (ast_range): Add "inclusive" parameter.
11627         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
11628         ranges.
11629         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
11630         bounds values.
11631         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
11632         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
11633         Update comments.
11634         * expprint.c (print_subexp_standard): Handle new bounds values.
11635         (dump_subexp_body_standard): Likewise.
11636
11637 2018-04-27  Tom Tromey  <tom@tromey.com>
11638
11639         * configure: Rebuild.
11640         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
11641         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
11642         "OVERRIDE".
11643         (class symbol_needs_eval_context): Likewise.
11644         * dwarf2read.c (mock_mapped_index::symbol_name_count)
11645         (mock_mapped_index::symbol_name_at): Use "override".  Remove
11646         "virtual".
11647         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
11648         "override".
11649         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
11650         * aarch64-tdep.c (instruction_reader::read): Use "override".
11651         (instruction_reader_test::read): Likewise.
11652         * arm-tdep.c (instruction_reader::read): Use "override".
11653         (instruction_reader_thumb::read): Likewise.
11654
11655 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
11656
11657         PR remote/9665
11658         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
11659         instead of remote_send.
11660         (remote_send): Remove.
11661
11662 2018-04-26  Pedro Alves  <palves@redhat.com>
11663
11664         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
11665         find_function_start_sal instead of find_pc_line.
11666
11667 2018-04-26  Pedro Alves  <palves@redhat.com>
11668
11669         * breakpoint.c (set_breakpoint_location_function): Handle
11670         mst_data_gnu_ifunc.
11671         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
11672         * elfread.c (elf_symtab_read): Give data symbols with
11673         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
11674         (elf_rel_plt_read): Update comment.
11675         * linespec.c (convert_linespec_to_sals): Handle
11676         mst_data_gnu_ifunc.
11677         (minsym_found): Handle mst_data_gnu_ifunc.
11678         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
11679         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
11680         * parse.c (find_minsym_type_and_address): Handle
11681         mst_data_gnu_ifunc.
11682         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
11683         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
11684         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
11685         comment.
11686         <mst_data_gnu_ifunc>: New enumerator.
11687
11688 2018-04-26  Pedro Alves  <palves@redhat.com>
11689
11690         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
11691         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
11692         'want_trampoline' parameter by a lookup_msym_prefer parameter.
11693         Handle it.
11694         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
11695         (lookup_minimal_symbol_by_pc): Adjust.
11696         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
11697         (lookup_solib_trampoline_symbol_by_pc): Adjust.
11698         * minsyms.h (lookup_msym_prefer): New enum.
11699         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11700         parameter by a lookup_msym_prefer parameter.
11701
11702 2018-04-26  Pedro Alves  <palves@redhat.com>
11703
11704         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
11705         ends in "@plt" instead of looking at the symbol's section.
11706
11707 2018-04-26  Pedro Alves  <palves@redhat.com>
11708
11709         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
11710         all references.
11711         (find_pc_partial_function_gnu_ifunc): Rename to ...
11712         (find_pc_partial_function): ... this, and remove references to
11713         'is_gnu_ifunc_p'.
11714         (find_pc_partial_function): Delete old implementation.
11715         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
11716
11717 2018-04-26  Pedro Alves  <palves@redhat.com>
11718
11719         * linespec.c (struct bound_minimal_symbol_search_key): New.
11720         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
11721         skip first line if we found a GNU ifunc minimal symbol by name.
11722         (compare_msymbols): Change parameters to work with a destructured
11723         lhs minsym.
11724         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11725         functions.
11726
11727 2018-04-26  Pedro Alves  <palves@redhat.com>
11728
11729         * breakpoint.c (set_breakpoint_location_function): Don't resolve
11730         ifunc targets here.  Instead, if we have an ifunc minsym, use its
11731         address/name.
11732         (add_location_to_breakpoint): Store the minsym and the objfile in
11733         the breakpoint location.
11734         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11735         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11736         Record the minsym in the sal.
11737         * symtab.h (symtab_and_line) <msymbol>: New field.
11738
11739 2018-04-26  Pedro Alves  <palves@redhat.com>
11740
11741         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11742         unless we actually resolved the ifunc.
11743
11744 2018-04-26  Pedro Alves  <palves@redhat.com>
11745
11746         * c-exp.y (variable production): Prefer ifunc minsyms over
11747         regular function symbols.
11748         * symtab.c (find_gnu_ifunc): New function.
11749         * minsyms.h (lookup_msym_prefer): New enum.
11750         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11751         parameter by a lookup_msym_prefer parameter.
11752         * symtab.h (find_gnu_ifunc): New declaration.
11753
11754 2018-04-26  Pedro Alves  <palves@redhat.com>
11755
11756         * blockframe.c (find_gnu_ifunc_target_type): New function.
11757         (find_function_type): New.
11758         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11759         return a value with a memory address.
11760         (eval_call): For calls to GNU ifunc functions, try to find the
11761         type of the target function from the type that the resolver
11762         returns.
11763         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11764         symbols.
11765         * infcall.c (find_function_return_type): Delete.
11766         (find_function_addr): Add 'function_type' parameter.  For calls to
11767         GNU ifunc functions, try to find the type of the target function
11768         from the type that the resolver returns, and return it via
11769         FUNCTION_TYPE.
11770         (call_function_by_hand_dummy): Adjust to use the function type
11771         returned by find_function_addr.
11772         (find_function_addr): Add 'function_type' parameter and move
11773         description here.
11774         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11775         declarations.
11776
11777 2018-04-26  Pedro Alves  <palves@redhat.com>
11778
11779         * c-exp.y (variable production): Skip finding an alias for ifunc
11780         symbols.
11781
11782 2018-04-26  Pedro Alves  <palves@redhat.com>
11783
11784         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11785
11786 2018-04-25  Pedro Alves  <palves@redhat.com>
11787
11788         * infcmd.c (kill_command): Print the pid as string, not the whole
11789         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11790         message.
11791         * remote.c (remote_detach_1): Print the pid as string, not the
11792         whole thread's ptid.
11793
11794 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11795             Sergio Durigan Junior  <sergiodj@redhat.com>
11796             Pedro Alves  <palves@redhat.com>
11797
11798         * infcmd.c (kill_command): Print message when inferior has
11799         been killed.
11800         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11801         '1'.
11802         (add_inferior): Improve message printed when
11803         'print_inferior_events' is on.
11804         (exit_inferior): Remove message printed when
11805         'print_inferior_events' is on.
11806         (detach_inferior): Improve message printed when
11807         'print_inferior_events' is on.
11808         (initialize_inferiors): Use 'add_inferior_silent' to set
11809         'current_inferior_'.
11810         * inferior.h (print_inferior_events): Declare here as
11811         'extern'.
11812         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11813         '[Detaching...]' messages when 'print_inferior_events' is on.
11814         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11815         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11816         'Detaching after fork from child...', replace it by '... from
11817         parent...'.
11818         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11819         prefix/suffix when printing 'Detaching...' messages.  Print
11820         them when 'print_inferior_events' is on.
11821         * remote.c (remote_detach_1): Print message when detaching
11822         from inferior and '!is_fork_parent'.
11823
11824 2018-04-24  Tom Tromey  <tom@tromey.com>
11825
11826         * cli-out.h: Reindent.
11827
11828 2018-04-24  Tom Tromey  <tom@tromey.com>
11829
11830         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11831         (cli_ui_out::do_field_string): Use fputs_filtered.
11832         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11833
11834 2018-04-23  Tom Tromey  <tom@tromey.com>
11835
11836         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11837         gdb::unique_xmalloc_ptr.
11838
11839 2018-04-23  Tom Tromey  <tom@tromey.com>
11840
11841         * configure: Rebuild.
11842
11843 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
11844
11845         PR gdb/23095
11846         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11847         prepare_for_testing.  Set normal_bp to r_debug_state if target
11848         is bsd.
11849
11850 2018-04-21  Pedro Alves  <palves@redhat.com>
11851             Rajendra SY  <rajendra.sy@gmail.com>
11852
11853         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11854         * remote.c (extended_remote_attach): In all-stop mode, mark the
11855         thread as executing.
11856
11857 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11858
11859         * thread.c (thread_apply_all_command): Fix comment.
11860         (thread_command): Fix comment.
11861
11862 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11863
11864         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11865         parameter.
11866         * features/aarch64-core.c (create_feature_aarch64_core):
11867         Regenerate.
11868         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11869         Likewise.
11870         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11871         Likewise.
11872         * features/i386/32bit-avx512.c
11873         (create_feature_i386_32bit_avx512): Likewise.
11874         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11875         Likewise.
11876         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11877         Likewise.
11878         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11879         Likewise.
11880         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11881         Likewise.
11882         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11883         Likewise.
11884         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11885         Likewise.
11886         * features/i386/64bit-avx512.c
11887         (create_feature_i386_64bit_avx512): Likewise.
11888         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11889         Likewise.
11890         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11891         Likewise.
11892         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11893         Likewise.
11894         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11895         Likewise.
11896         * features/i386/64bit-segments.c
11897         (create_feature_i386_64bit_segments): Likewise.
11898         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11899         Likewise.
11900         * features/i386/x32-core.c
11901         (create_feature_i386_x32_core): Likewise.
11902         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11903         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11904         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11905         * target-descriptions.c: In generated code, don't pass xml
11906         filename.
11907
11908 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11909
11910         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11911         (print_xml_feature::visit_post): Likewise.
11912         (print_xml_feature::visit): Likewise.
11913         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11914         (print_xml_feature): Add new class.
11915         * regformats/regdat.sh: Null xmltarget on feature targets.
11916         * target-descriptions.c (struct target_desc): Add xmltarget.
11917         (maintenance_check_tdesc_xml_convert): Add unittest function.
11918         (tdesc_get_features_xml): Add function to get xml.
11919         (maintenance_check_xml_descriptions): Test xml generation.
11920         * xml-tdesc.c (string_read_description_xml): Add function.
11921         * xml-tdesc.h (string_read_description_xml): Add declaration.
11922
11923 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11924
11925         * features/Makefile: Add feature marker to targets with new style
11926         target descriptions.
11927         * regformats/aarch64.dat: Regenerate.
11928         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11929         * regformats/i386/amd64-avx-linux.dat: Likewise.
11930         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11931         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11932         * regformats/i386/amd64-linux.dat: Likewise.
11933         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11934         * regformats/i386/amd64.dat: Likewise.
11935         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11936         * regformats/i386/i386-avx-linux.dat: Likewise.
11937         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11938         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11939         * regformats/i386/i386-linux.dat: Likewise.
11940         * regformats/i386/i386-mmx-linux.dat: Likewise.
11941         * regformats/i386/i386-mpx-linux.dat: Likewise.
11942         * regformats/i386/i386.dat: Likewise.
11943         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11944         * regformats/i386/x32-avx-linux.dat: Likewise.
11945         * regformats/i386/x32-linux.dat: Likewise.
11946         * regformats/tic6x-c62x-linux.dat: Likewise.
11947         * regformats/tic6x-c64x-linux.dat: Likewise.
11948         * regformats/tic6x-c64xp-linux.dat: Likewise.
11949         * regformats/regdat.sh: Parse feature marker.
11950
11951 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11952
11953         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11954         (tdesc_osabi_name): Likewise.
11955         * target-descriptions.c (tdesc_architecture_name): Add new
11956         function.
11957         (tdesc_osabi_name): Likewise.
11958
11959 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11960
11961         * common/tdesc.c (tdesc_predefined_type): Move to here.
11962         (tdesc_named_type): Likewise.
11963         (tdesc_create_vector): Likewise.
11964         (tdesc_create_struct): Likewise.
11965         (tdesc_set_struct_size): Likewise.
11966         (tdesc_create_union): Likewise.
11967         (tdesc_create_flags): Likewise.
11968         (tdesc_create_enum): Likewise.
11969         (tdesc_add_field): Likewise.
11970         (tdesc_add_typed_bitfield): Likewise.
11971         (tdesc_add_bitfield): Likewise.
11972         (tdesc_add_flag): Likewise.
11973         (tdesc_add_enum_value): Likewise.
11974         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11975         (struct tdesc_type_vector): Likewise.
11976         (struct tdesc_type_field): Likewise.
11977         (struct tdesc_type_with_fields): Likewise.
11978         (tdesc_create_enum): Add declaration.
11979         (tdesc_add_typed_bitfield): Likewise.
11980         (tdesc_add_enum_value): Likewise.
11981         * target-descriptions.c (tdesc_type_field): Move from here.
11982         (tdesc_type_builtin): Likewise.
11983         (tdesc_type_vector): Likewise.
11984         (tdesc_type_with_fields): Likewise.
11985         (tdesc_predefined_types): Likewise.
11986         (tdesc_named_type): Likewise.
11987         (tdesc_create_vector): Likewise.
11988         (tdesc_create_struct): Likewise.
11989         (tdesc_set_struct_size): Likewise.
11990         (tdesc_create_union): Likewise.
11991         (tdesc_create_flags): Likewise.
11992         (tdesc_create_enum): Likewise.
11993         (tdesc_add_field): Likewise.
11994         (tdesc_add_typed_bitfield): Likewise.
11995         (tdesc_add_bitfield): Likewise.
11996         (tdesc_add_flag): Likewise.
11997         (tdesc_add_enum_value): Likewise.
11998         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11999         (tdesc_add_typed_bitfield): Likewise.
12000         (tdesc_add_enum_value): Likewise.
12001
12002 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12003
12004         * common/tdesc.c (tdesc_feature::accept): Move to here.
12005         (tdesc_feature::operator==): Likewise.
12006         (tdesc_create_reg): Likewise.
12007         * common/tdesc.h (tdesc_type_kind): Likewise.
12008         (struct tdesc_type): Likewise.
12009         (struct tdesc_feature): Likewise.
12010         * regformats/regdat.sh: Create a feature.
12011         * target-descriptions.c (tdesc_type_kind): Move from here.
12012         (tdesc_type): Likewise.
12013         (tdesc_type_up): Likewise.
12014         (tdesc_feature): Likewise.
12015         (tdesc_create_reg): Likewise.
12016
12017 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12018
12019         * Makefile.in: Add arch/tdesc.c
12020         * common/tdesc.c: New file.
12021         * common/tdesc.h (tdesc_element_visitor): Move to here.
12022         (tdesc_element): Likewise.
12023         (tdesc_reg): Likewise.
12024         (tdesc_reg_up): Likewise.
12025         * regformats/regdef.h (reg): Add offset to constructors.
12026         * target-descriptions.c (tdesc_element_visitor): Move from here.
12027         (tdesc_element): Likewise.
12028         (tdesc_reg): Likewise.
12029         (tdesc_reg_up): Likewise.
12030
12031 2018-04-17  Tom Tromey  <tom@tromey.com>
12032
12033         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12034         discriminant field.
12035
12036 2018-04-17  Tom Tromey  <tom@tromey.com>
12037
12038         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12039
12040 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12041
12042         * symtab.c (print_symbol_info): Skip printing filename and line
12043         number when `last' is NULL.
12044         (symtab_symbol_info): Use empty string instead of NULL for first
12045         invocation of print_symbol_info.
12046         (rbreak_command): Pass NULL to `last' parameter of
12047         print_symbol_info.
12048
12049 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12050
12051         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12052         instead of nullptr.
12053
12054 2018-04-16  Pedro Alves  <palves@redhat.com>
12055
12056         * MAINTAINERS (sh): Remove.
12057         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12058         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12059         (ALLDEPFILES): Remove sh64-tdep.c.
12060         * NEWS: Mentions that support for SH-5/SH64 is removed.
12061         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12062         (sh*-*-openbsd*): Ditto.
12063         (sh64-*-elf*): Remove.
12064         (sh*): Remove.
12065         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12066         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12067         * sh-tdep.c: No longer include "sh64-tdep.h".
12068         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12069         * sh64-tdep.c, sh64-tdep.h: Remove files.
12070
12071 2018-04-16  Pedro Alves  <palves@redhat.com>
12072
12073         * MAINTAINERS: Remove m88k.
12074         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12075         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12076         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12077         * NEWS: Mention that support for m88k was removed.
12078         * configure.host (m88*-*-*): Remove support.
12079         * configure.nat (m88k-*-*): Remove support.
12080         * configure.tgt (m88*-*-openbsd*): Remove.
12081         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12082
12083 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12084
12085         * configure.tgt (x86_tobjs): New variable.
12086         (amd64_tobjs, i386_tobjs): Use it.
12087
12088 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12089
12090         * symtab.c (print_symbol_info): Precede the symbol definition by
12091         the line number when available.
12092         * NEWS: Advertise this enhancement.
12093
12094 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12095
12096         * NEWS (New options): announce set/show record btrace cpu.
12097         * btrace.c: Include record-btrace.h.
12098         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12099         the vendor is unknown.
12100         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12101         Maybe overwrite the btrace configuration's cpu.
12102         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12103         (btrace_fetch): Add cpu parameter.  Update callers.
12104         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12105         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12106         errata workarounds if the vendor is unknown.
12107         * python/py-record-btrace.c: Include record-btrace.h.
12108         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12109         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12110         * record-btrace.c (record_btrace_cpu_state_kind): New.
12111         (record_btrace_cpu): New.
12112         (set_record_btrace_cpu_cmdlist): New.
12113         (record_btrace_get_cpu): New.
12114         (require_btrace_thread, record_btrace_info)
12115         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12116         (cmd_set_record_btrace_cpu_none): New.
12117         (cmd_set_record_btrace_cpu_auto): New.
12118         (cmd_set_record_btrace_cpu): New.
12119         (cmd_show_record_btrace_cpu): New.
12120         (_initialize_record_btrace): Initialize set/show record btrace cpu
12121         commands.
12122         * record-btrace.h (record_btrace_get_cpu): New.
12123
12124 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12125
12126         * record.c (set_record_command): Fix typo in message.
12127
12128 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12129
12130         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12131
12132 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12133
12134         * infrun.c (process_event_stop_test): Call
12135         gdbarch_in_indirect_branch_thunk.
12136         * gdbarch.sh (in_indirect_branch_thunk): New.
12137         * gdbarch.c: Regenerated.
12138         * gdbarch.h: Regenerated.
12139         * x86-tdep.h: New.
12140         * x86-tdep.c: New.
12141         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12142         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12143         (ALLDEPFILES): Add x86-tdep.c.
12144         * arch-utils.h (default_in_indirect_branch_thunk): New.
12145         * arch-utils.c (default_in_indirect_branch_thunk): New.
12146         * i386-tdep: Include x86-tdep.h.
12147         (i386_in_indirect_branch_thunk): New.
12148         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12149         function.
12150         * amd64-tdep: Include x86-tdep.h.
12151         (amd64_in_indirect_branch_thunk): New.
12152         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12153
12154 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12155
12156         PR gdb/23053
12157         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12158         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12159         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12160         regression.
12161
12162 2018-04-12  Tom Tromey  <tom@tromey.com>
12163
12164         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12165         (rust_evaluate_subexp): Likewise.
12166
12167 2018-04-12  Pedro Alves  <palves@redhat.com>
12168
12169         * procfs.c (procfs_detach): Make forward declaration's prototype
12170         match definition's protototype.
12171         (proc_get_LDT_entry): Remove stale do_cleanups call.
12172
12173 2018-04-12  Pedro Alves  <palves@redhat.com>
12174
12175         * target.h (target_ops::to_has_exited): Delete.
12176         (target_has_exited): Delete.
12177         * target-delegates.c: Regenerate.
12178
12179 2018-04-11  Pedro Alves  <palves@redhat.com>
12180
12181         * target.c (fileio_fh_t::t): Add comment.
12182         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12183         (target_fileio_close): Handle a NULL target.
12184         (invalidate_fileio_fh): New.
12185         (target_close): Call it.
12186         * remote.c (remote_hostio_send_command): No longer check whether
12187         remote_desc is open.
12188
12189 2018-04-11  Pedro Alves  <palves@redhat.com>
12190
12191         * target.c (fileio_fh_t): Make it a named struct instead of a
12192         typedef.
12193         (fileio_fh_t::is_closed): New method.
12194         (DEF_VEC_O (fileio_fh_t)): Remove.
12195         (fileio_fhandles): Now a std::vector.
12196         (is_closed_fileio_fh): Delete.
12197         (acquire_fileio_fd): Adjust.  Rename parameters.
12198         (release_fileio_fd): Adjust.
12199         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12200         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12201         (target_fileio_close): Adjust.
12202
12203 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12204
12205         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12206         index.
12207
12208 2018-04-10  Pedro Alves  <palves@redhat.com>
12209
12210         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12211         (scoped_finish_thread_state): New class.
12212         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12213         cleanup.
12214         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12215         (fetch_inferior_event, normal_stop): Likewise.
12216         * thread.c (finish_thread_state_cleanup): Delete.
12217
12218 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12219             Pedro Alves  <palves@redhat.com>
12220
12221         * value.c: Include "selftest.h" and "common/array-view.h".
12222         (struct range) <operator ==>: New.
12223         (test_ranges_contain): New.
12224         (check_ranges_vector): New.
12225         (test_insert_into_bit_range_vector): New.
12226         (_initialize_values): Register selftests.
12227         * common/array-view.h (operator==, operator!=): New.
12228
12229 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12230
12231         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12232         an iterator.
12233         * inline-frame.c: Include <algorithm>.
12234         (struct inline_state): Add constructor.
12235         (inline_state_s): Remove.
12236         (DEF_VEC_O(inline_state_s)): Remove.
12237         (inline_states): Change type to std::vector.
12238         (find_inline_frame_state): Adjust to std::vector.
12239         (allocate_inline_frame_state): Remove.
12240         (clear_inline_frame_state): Adjust to std::vector.
12241         (skip_inline_frames): Adjust to std::vector.
12242
12243 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12244
12245         * tracepoint.h (struct trace_state_variable): Add constructor.
12246         <name>: Change type to std::string.
12247         * tracepoint.c (tsv_s): Remove.
12248         (DEF_VEC_O(tsv_s)): Remove.
12249         (tvariables): Change to std::vector.
12250         (create_trace_state_variable): Adjust to std::vector.
12251         (find_trace_state_variable): Likewise.
12252         (find_trace_state_variable_by_number): Likewise.
12253         (delete_trace_state_variable): Likewise.
12254         (trace_variable_command): Adjust to std::string.
12255         (delete_trace_variable_command): Likewise.
12256         (tvariables_info_1): Adjust to std::vector.
12257         (save_trace_state_variables): Likewise.
12258         (start_tracing): Likewise.
12259         (merge_uploaded_trace_state_variables): Adjust to std::vector
12260         and std::string.
12261         * target.h (struct target_ops)
12262         <to_download_trace_state_variable>: Pass reference to
12263         trace_state_variable.
12264         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12265         * target-delegates.c: Re-generate.
12266         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12267         (mi_tsv_deleted): Likewise.
12268         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12269         * remote.c (remote_download_trace_state_variable): Change
12270         pointer to reference and adjust.
12271         * make-target-delegates (parse_argtypes): Handle references.
12272         (write_function_header): Likewise.
12273         (munge_type): Likewise.
12274
12275 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12276
12277         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12278         string_view-selftests.c.
12279         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12280         testsuite.
12281         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12282         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12283         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12284         * unittests/basic_string_view/element_access/char/1.cc:
12285         Likewise.
12286         * unittests/basic_string_view/element_access/char/empty.cc:
12287         Likewise.
12288         * unittests/basic_string_view/element_access/char/front_back.cc:
12289         Likewise.
12290         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12291         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12292         Likewise.
12293         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12294         Likewise.
12295         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12296         Likewise.
12297         * unittests/basic_string_view/operations/compare/char/1.cc:
12298         Likewise.
12299         * unittests/basic_string_view/operations/compare/char/13650.cc:
12300         Likewise.
12301         * unittests/basic_string_view/operations/copy/char/1.cc:
12302         Likewise.
12303         * unittests/basic_string_view/operations/data/char/1.cc:
12304         Likewise.
12305         * unittests/basic_string_view/operations/find/char/1.cc:
12306         Likewise.
12307         * unittests/basic_string_view/operations/find/char/2.cc:
12308         Likewise.
12309         * unittests/basic_string_view/operations/find/char/3.cc:
12310         Likewise.
12311         * unittests/basic_string_view/operations/find/char/4.cc:
12312         Likewise.
12313         * unittests/basic_string_view/operations/rfind/char/1.cc:
12314         Likewise.
12315         * unittests/basic_string_view/operations/rfind/char/2.cc:
12316         Likewise.
12317         * unittests/basic_string_view/operations/rfind/char/3.cc:
12318         Likewise.
12319         * unittests/basic_string_view/operations/substr/char/1.cc:
12320         Likewise.
12321         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12322         * unittests/string_view-selftests.c: New file.
12323
12324 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12325
12326         * unittests/basic_string_view/capacity/1.cc: New file.
12327         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12328         * unittests/basic_string_view/cons/char/1.cc: New file.
12329         * unittests/basic_string_view/cons/char/2.cc: New file.
12330         * unittests/basic_string_view/cons/char/3.cc: New file.
12331         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12332         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12333         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12334         * unittests/basic_string_view/element_access/char/1.cc: New file.
12335         * unittests/basic_string_view/element_access/char/2.cc: New file.
12336         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12337         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12338         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12339         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12340         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12341         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12342         * unittests/basic_string_view/include.cc: New file.
12343         * unittests/basic_string_view/inserters/char/1.cc: New file.
12344         * unittests/basic_string_view/inserters/char/2.cc: New file.
12345         * unittests/basic_string_view/inserters/char/3.cc: New file.
12346         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12347         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12348         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12349         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12350         * unittests/basic_string_view/literals/types.cc: New file.
12351         * unittests/basic_string_view/literals/values.cc: New file.
12352         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12353         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12354         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12355         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12356         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12357         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12358         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12359         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12360         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12361         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12362         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12363         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12364         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12365         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12366         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12367         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12368         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12369         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12370         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12371         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12372         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12373         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12374         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12375         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12376         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12377         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12378         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12379         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12380         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12381         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12382         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12383         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12384         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12385         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12386         * unittests/basic_string_view/operators/char/2.cc: New file.
12387         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12388         * unittests/basic_string_view/range_access/char/1.cc: New file.
12389         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12390         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12391         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12392         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12393         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12394         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12395         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12396         * unittests/basic_string_view/typedefs.cc: New file.
12397         * unittests/basic_string_view/types/1.cc: New file.
12398
12399 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12400
12401         * common/gdb_string_view.h: Remove libstdc++ implementation
12402         details, adjust to gdb reality.
12403         * common/gdb_string_view.tcc: Likewise.
12404         * cli/cli-script.c (struct string_view): Remove.
12405         (user_args) <m_args>: Change element type to gdb::string_view.
12406         (user_args::insert_args): Adjust.
12407
12408 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12409
12410         * common/gdb_string_view.h: New file.
12411         * common/gdb_string_view.tcc: New file.
12412
12413 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12414
12415         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12416         * configure: Re-generate.
12417
12418 2018-04-09  Pedro Alves  <palves@redhat.com>
12419
12420         * gdbarch.sh: Include "observable.h" instead of "observer.h".
12421         (set_target_gdbarch): Call
12422         gdb::observers::architecture_changed.notify instead of
12423         observer_notify_architecture_changed.
12424
12425 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12426
12427         * tracepoint.c (struct current_traceframe_cleanup): Remove.
12428         (do_restore_current_traceframe_cleanup): Remove.
12429         (restore_current_traceframe_cleanup_dtor): Remove.
12430         (make_cleanup_restore_current_traceframe): Remove.
12431         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12432         New.
12433         * tracepoint.h (struct scoped_restore_current_traceframe): New.
12434         * infrun.c (fetch_inferior_event): Use
12435         scoped_restore_current_traceframe.
12436
12437 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12438
12439         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12440         Remove.
12441         <n_allocated_type_units>: Remove.
12442         <all_type_units>: Change to std::vector.
12443         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12444         to std::vector change.
12445         (dwarf2_per_objfile::get_cutu): Likewise.
12446         (dwarf2_per_objfile::get_tu): Likewise.
12447         (create_signatured_type_table_from_index): Likewise.
12448         (create_signatured_type_table_from_debug_names): Likewise.
12449         (dw2_symtab_iter_next): Likewise.
12450         (dw2_print_stats): Likewise.
12451         (dw2_expand_all_symtabs): Likewise.
12452         (dw2_expand_marked_cus): Likewise.
12453         (dw2_debug_names_iterator::next): Likewise.
12454         (dwarf2_initialize_objfile): Likewise.
12455         (add_signatured_type_cu_to_table): Likewise.
12456         (create_all_type_units): Likewise.
12457         (add_type_unit): Likewise.
12458         (struct tu_abbrev_offset): Add constructor.
12459         (build_type_psymtabs_1): Adjust to std::vector change.
12460         (print_tu_stats): Likewise.
12461         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12462         (write_debug_names): Likewise.
12463
12464 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12465
12466         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
12467         Make an std::vector.
12468         <n_comp_units>: Remove.
12469         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12470         to std::vector change.
12471         (dwarf2_per_objfile::get_cutu): Likewise.
12472         (dwarf2_per_objfile::get_cu): Likewise.
12473         (create_cus_from_index): Likewise.
12474         (create_addrmap_from_index): Likewise.
12475         (create_addrmap_from_aranges): Likewise.
12476         (dwarf2_read_index): Likewise.
12477         (dw2_find_last_source_symtab): Likewise.
12478         (dw2_map_symtabs_matching_filename): Likewise.
12479         (dw2_symtab_iter_next): Likewise.
12480         (dw2_print_stats): Likewise.
12481         (dw2_expand_all_symtabs): Likewise.
12482         (dw2_expand_symtabs_with_fullname): Likewise.
12483         (dw2_expand_marked_cus): Likewise.
12484         (dw2_map_symbol_filenames): Likewise.
12485         (create_cus_from_debug_names): Likewise.
12486         (dwarf2_read_debug_names): Likewise.
12487         (dw2_debug_names_iterator::next): Likewise.
12488         (dwarf2_initialize_objfile): Likewise.
12489         (set_partial_user): Likewise.
12490         (dwarf2_build_psymtabs_hard): Likewise.
12491         (read_comp_units_from_section): Remove arguments, adjust to
12492         std::vector change.
12493         (create_all_comp_units): Adjust to std::vector and
12494         read_comp_units_from_section changes.
12495         (dwarf2_find_containing_comp_unit): Adjust to std::vector
12496         change.
12497         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12498         (psyms_seen_size): Likewise.
12499         (write_gdbindex): Likewise.
12500         (write_debug_names): Likewise.
12501
12502 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12503
12504         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
12505         with dwarf2_per_objfile.
12506         (create_cus_from_index): Likewise.
12507         (create_signatured_type_table_from_index): Likewise.
12508         (dwarf2_read_index): Likewise.
12509         (dwarf2_initialize_objfile): Likewise.
12510         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
12511         per_cu rather than get_dwarf2_per_objfile.
12512
12513 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12514
12515         * dwarf2read.h (struct signatured_type): Forward declare.
12516         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
12517         New methods.
12518         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
12519         (dw2_get_cutu): ...this.
12520         (dwarf2_per_objfile::get_cu): Rename from...
12521         (dw2_get_cu): ...this.
12522         (dwarf2_per_objfile::get_tu): New.
12523         (create_addrmap_from_index): Adjust.
12524         (create_addrmap_from_aranges): Adjust.
12525         (dw2_find_last_source_symtab): Adjust.
12526         (dw2_map_symtabs_matching_filename): Adjust.
12527         (dw2_symtab_iter_next): Adjust.
12528         (dw2_print_stats): Adjust.
12529         (dw2_expand_all_symtabs): Adjust.
12530         (dw2_expand_symtabs_with_fullname): Adjust.
12531         (dw2_expand_marked_cus): Adjust.
12532         (dw_expand_symtabs_matching_file_matcher): Adjust.
12533         (dw2_map_symbol_filenames): Adjust.
12534         (dw2_debug_names_iterator::next): Adjust.
12535         (dwarf2_initialize_objfile): Adjust.
12536         (set_partial_user): Adjust.
12537         (dwarf2_build_psymtabs_hard): Adjust.
12538
12539 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12540
12541         * dwarf2read.c (create_signatured_type_table_from_debug_names):
12542         Remove unused variables.
12543         (dw2_map_symtabs_matching_filename): Likewise.
12544         (dwarf2_record_block_ranges): Likewise.
12545         (dwarf2_read_addr_index): Likewise.
12546         (follow_die_offset): Likewise.
12547
12548 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12549
12550         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
12551         to symbol_file_add_main.
12552
12553 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12554
12555         PR mi/22299
12556         * mi/mi-console.c (do_fputc_async_safe): New.
12557         (mi_console_file::write_async_safe): New.
12558         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
12559         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
12560         New.
12561         * ui-file.c (ui_file::putstrn): Adjust call to
12562         fputstrn_unfiltered.
12563         * utils.c (printchar): Replace do_fputs and do_fprintf
12564         parameters by do_fputc.
12565         (fputstr_filtered): Adjust call to printchar.
12566         (fputstr_unfiltered): Likewise.
12567         (fputstrn_filtered): Likewise.
12568         (fputstrn_unfiltered): Add do_fputc parameter, pass to
12569         printchar.
12570         * utils.h (do_fputc_ftype): New typedef.
12571         (fputstrn_unfiltered): Add do_fputc parameter.
12572
12573 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12574
12575         * regformats/i386/i386-avx.dat: Remove.
12576
12577 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12578
12579         PR gdb/22979
12580         * amd64-tdep.c (amd64_none_init_abi): New function.
12581         (amd64_x32_none_init_abi): New function.
12582         (_initialize_amd64_tdep): Register handlers for x86-64 and
12583         x64_32 with GDB_OSABI_NONE.
12584         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
12585         GDB_OSABI_NONE osabi.
12586
12587 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12588
12589         PR gdb/22980
12590         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
12591         GDB_OSABI_NONE.
12592         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
12593         * osabi.c (gdb_osabi_names): Add "unknown" entry.
12594
12595 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12596
12597         * common/byte-vector.h (char_vector): New type.
12598         * target.h (target_read_alloc): Return
12599         gdb::optional<byte_vector>.
12600         (target_read_stralloc): Return gdb::optional<char_vector>.
12601         (target_get_osdata): Return gdb::optional<char_vector>.
12602         * target.c (target_read_alloc_1): Templatize.  Replacement
12603         manual memory management with vector.
12604         (target_read_alloc): Change return type, adjust.
12605         (target_read_stralloc): Change return type, adjust.
12606         (target_get_osdata): Change return type, adjust.
12607         * auxv.c (struct auxv_info) <length>: Remove.
12608         <data>: Change type to gdb::optional<byte_vector>.
12609         (auxv_inferior_data_cleanup): Free auxv_info with delete.
12610         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
12611         (target_auxv_search): Adjust.
12612         (fprint_target_auxv): Adjust.
12613         * avr-tdep.c (avr_io_reg_read_command): Adjust.
12614         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
12615         (linux_make_corefile_notes): Adjust.
12616         * osdata.c (get_osdata): Adjust.
12617         * remote.c (remote_get_threads_with_qxfer): Adjust.
12618         (remote_memory_map): Adjust.
12619         (remote_traceframe_info): Adjust.
12620         (btrace_read_config): Adjust.
12621         (remote_read_btrace): Adjust.
12622         (remote_pid_to_exec_file): Adjust.
12623         * solib-aix.c (solib_aix_get_library_list): Adjust.
12624         * solib-dsbt.c (decode_loadmap): Don't free buf.
12625         (dsbt_get_initial_loadmaps): Adjust.
12626         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
12627         * solib-target.c (solib_target_current_sos): Adjust.
12628         * tracepoint.c (sdata_make_value): Adjust.
12629         * xml-support.c (xinclude_start_include): Adjust.
12630         (xml_fetch_content_from_file): Adjust.
12631         * xml-support.h (xml_fetch_another): Change return type.
12632         (xml_fetch_content_from_file): Change return type.
12633         * xml-syscall.c (xml_init_syscalls_info): Adjust.
12634         * xml-tdesc.c (file_read_description_xml): Adjust.
12635         (fetch_available_features_from_target): Change return type.
12636         (target_fetch_description_xml): Adjust.
12637         (target_read_description_xml): Adjust.
12638
12639 2018-04-06  Tom Tromey  <tom@tromey.com>
12640
12641         * value.c (~value): Update.
12642         (struct value) <contents>: Now unique_xmalloc_ptr.
12643         (value_contents_bits_eq, allocate_value_contents)
12644         (value_contents_raw, value_contents_all_raw)
12645         (value_contents_for_printing, value_contents_for_printing_const)
12646         (set_value_enclosing_type): Update.
12647
12648 2018-04-06  Tom Tromey  <tom@tromey.com>
12649
12650         * value.c (range_s): Remove typedef, VEC.
12651         (struct range): Add operator<.
12652         (range_lessthan): Remove.
12653         (ranges_contain): Change type.
12654         (~value): Update.
12655         (struct value) <unavailable, optimized_out>: Now std::vector.
12656         (value_entirely_available)
12657         (value_entirely_covered_by_range_vector)
12658         (value_entirely_unavailable, value_entirely_optimized_out):
12659         Update.
12660         (insert_into_bit_range_vector): Change argument type.
12661         (find_first_range_overlap): Likewise.
12662         (struct ranges_and_idx, value_contents_bits_eq)
12663         (require_not_optimized_out, require_available): Update.
12664         (ranges_copy_adjusted): Change argument types.
12665         (value_optimized_out, value_copy, value_fetch_lazy): Update.
12666
12667 2018-04-06  Tom Tromey  <tom@tromey.com>
12668
12669         * value.c (~value): Update.
12670         (struct value) <parent>: Now a value_ref_ptr.
12671         (value_parent, set_value_parent, value_address, value_copy):
12672         Update.
12673
12674 2018-04-06  Tom Tromey  <tom@tromey.com>
12675
12676         * value.c (struct value): Add constructor, destructor, and member
12677         initializers.
12678         (allocate_value_lazy, value_decref): Update.
12679
12680 2018-04-06  Tom Tromey  <tom@tromey.com>
12681
12682         * value.c (struct value) <released, next>: Remove.
12683         (all_values): Now a std::vector.
12684         (allocate_value_lazy): Update.
12685         (value_next): Remove.
12686         (value_mark, value_free_to_mark, release_value)
12687         (value_release_to_mark): Update.
12688
12689 2018-04-06  Tom Tromey  <tom@tromey.com>
12690
12691         * value.h (fetch_subexp_value, value_release_to_mark): Update.
12692         (free_value_chain): Remove.
12693         * value.c (free_value_chain): Remove.
12694         (value_release_to_mark): Return a std::vector.
12695         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
12696         std::vector.
12697         (check_condition): Update.
12698         * eval.c (fetch_subexp_value): Change "val_chain" to a
12699         std::vector.
12700         * breakpoint.c (update_watchpoint): Update.
12701         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
12702
12703 2018-04-06  Tom Tromey  <tom@tromey.com>
12704
12705         * value.h (free_all_values): Remove.
12706         * value.c (free_all_values): Remove.
12707
12708 2018-04-06  Tom Tromey  <tom@tromey.com>
12709
12710         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
12711         (value_history_chain, value_history_count): Remove.
12712         (value_history): New global.
12713         (record_latest_value, access_value_history, show_values)
12714         (preserve_values): Update.
12715
12716 2018-04-06  Tom Tromey  <tom@tromey.com>
12717
12718         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
12719         * varobj.c (varobj_set_display_format, varobj_set_value)
12720         (install_default_visualizer, construct_visualizer)
12721         (install_new_value, ~varobj, varobj_get_value_type)
12722         (my_value_of_variable, varobj_editable_p): Update.
12723         * c-varobj.c (c_describe_child, c_value_of_variable)
12724         (cplus_number_of_children, cplus_describe_child): Update.
12725         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12726         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12727         (ada_value_of_variable, ada_value_is_changeable_p): Update.
12728
12729 2018-04-06  Tom Tromey  <tom@tromey.com>
12730
12731         * printcmd.c (last_examine_address): Change type to
12732         value_ref_ptr.
12733         (do_examine, x_command): Update.
12734
12735 2018-04-06  Tom Tromey  <tom@tromey.com>
12736
12737         * value.c (release_value): Update.
12738         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12739         (struct bpstats) <val>: Now a value_ref_ptr.
12740         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12741         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12742         (~watchpoint, print_it_watchpoint, watch_command_1)
12743         (invalidate_bp_value_on_memory_change): Update.
12744
12745 2018-04-06  Tom Tromey  <tom@tromey.com>
12746
12747         * varobj.c (varobj_clear_saved_item)
12748         (update_dynamic_varobj_children, install_new_value, ~varobj):
12749         Update.
12750         * value.h (value_incref): Move declaration earlier.
12751         (value_decref): Rename from value_free.
12752         (struct value_ref_policy): New.
12753         (value_ref_ptr): New typedef.
12754         (struct value_deleter): Remove.
12755         (gdb_value_up): Remove typedef.
12756         (release_value): Change return type.
12757         (release_value_or_incref): Remove.
12758         * value.c (set_value_parent): Update.
12759         (value_incref): Change return type.
12760         (value_decref): Rename from value_free.
12761         (value_free_to_mark, free_all_values, free_value_chain): Update.
12762         (release_value): Return value_ref_ptr.
12763         (release_value_or_incref): Remove.
12764         (record_latest_value, set_internalvar, clear_internalvar):
12765         Update.
12766         * stack.c (info_frame_command): Don't call value_free.
12767         * python/py-value.c (valpy_dealloc, valpy_new)
12768         (value_to_value_object): Update.
12769         * printcmd.c (do_examine): Update.
12770         * opencl-lang.c (lval_func_free_closure): Update.
12771         * mi/mi-main.c (register_changed_p): Don't call value_free.
12772         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12773         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12774         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12775         value_free.
12776         * guile/scm-value.c (vlscm_free_value_smob)
12777         (vlscm_scm_from_value): Update.
12778         * frame.c (frame_register_unwind, frame_unwind_register_signed)
12779         (frame_unwind_register_unsigned, get_frame_register_bytes)
12780         (put_frame_register_bytes): Don't call value_free.
12781         * findvar.c (address_from_register): Don't call value_free.
12782         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12783         * dwarf2loc.c (entry_data_value_free_closure)
12784         (value_of_dwarf_reg_entry, free_pieced_value_closure)
12785         (dwarf2_evaluate_loc_desc_full): Update.
12786         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12787         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12788         (~watchpoint, watch_command_1)
12789         (invalidate_bp_value_on_memory_change): Update.
12790         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12791
12792 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12793
12794         PR gdb/23022
12795         * warning.m4: Add -Wno-error=deprecated-register.
12796         * configure: Re-generate.
12797
12798 2018-04-05  Tom Tromey  <tom@tromey.com>
12799
12800         * linespec.h: Remove include of "vec.h".
12801
12802 2018-04-05  Tom Tromey  <tom@tromey.com>
12803
12804         * linespec.c (typep): Remove typedef.
12805         (find_methods, find_superclass_methods): Take a std::vector.
12806         (find_method): Use std::vector.
12807
12808 2018-04-05  Tom Tromey  <tom@tromey.com>
12809
12810         * utils.c (compare_strings): Remove.
12811         * utils.h (compare_strings): Remove.
12812         * objc-lang.h (find_imps): Update.
12813         * objc-lang.c (find_methods): Take a std::vector.
12814         (uniquify_strings, find_imps): Likewise.
12815         * linespec.c (find_methods): Take a std::vector.
12816         (decode_objc): Use std::vector.
12817         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12818         a std::vector.
12819         (find_method, find_function_symbols): Use std::vector.
12820
12821 2018-04-05  Tom Tromey  <tom@tromey.com>
12822
12823         * completer.c (completion_tracker::completion_tracker): Remove
12824         cast.
12825         (completion_tracker::discard_completions): Likewise.
12826         * breakpoint.c (ambiguous_names_p): Remove cast.
12827         * ada-lang.c (_initialize_ada_language): Remove cast.
12828         * utils.h (streq): Update.
12829         (streq_hash): Add new declaration.
12830         * utils.c (streq): Return bool.
12831         (streq_hash): New function.
12832
12833 2018-04-05  Tom Tromey  <tom@tromey.com>
12834
12835         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12836         Remove a string copy.
12837
12838 2018-04-05  Tom Tromey  <tom@tromey.com>
12839
12840         * linespec.c (filter_results): Use std::vector.
12841         (decode_line_2, decode_line_full): Update.
12842
12843 2018-04-05  Tom Tromey  <tom@tromey.com>
12844
12845         * linespec.c (canonical_to_fullform): Return std::string.
12846         (filter_results): Update.
12847         (struct decode_line_2_item): Add constructor.
12848         <fullform, displayform>: Now std::string.
12849         (decode_line_2_compare_items): Now a std::sort comparator.
12850         (decode_line_2): Update.
12851
12852 2018-04-05  Tom Tromey  <tom@tromey.com>
12853
12854         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12855         (unexpected_linespec_error): Update.
12856         (linespec_parse_basic, parse_linespec): Update.
12857
12858 2018-04-05  Tom Tromey  <tom@tromey.com>
12859
12860         * linespec.c (linespec_parse_basic): Reindent.
12861
12862 2018-04-05  Tom Tromey  <tom@tromey.com>
12863
12864         * minsyms.h (iterate_over_minimal_symbols): Update.
12865         * minsyms.c (iterate_over_minimal_symbols): Take a
12866         gdb::function_view.
12867         * linespec.c (struct collect_minsyms): Remove.
12868         (compare_msyms): Now a std::sort comparator.
12869         (add_minsym): Add parameters.
12870         (search_minsyms_for_name): Update.  Use std::vector.
12871
12872 2018-04-03  Tom Tromey  <tom@tromey.com>
12873
12874         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12875         gdb::byte_vector.
12876
12877 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12878
12879         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12880
12881 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12882
12883         PR gdb/16959
12884         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12885         printing static type.
12886
12887 2018-04-01  Tom Tromey  <tom@tromey.com>
12888
12889         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12890         (rs6000_xfer_shared_libraries): Update.
12891
12892 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12893
12894         * common/gdb_vecs.h (char_ptr): Remove.
12895         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12896
12897 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12898
12899         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12900         with std::vector.
12901         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12902
12903 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12904
12905         * tracepoint.h (struct uploaded_tp): Initialize fields.
12906         <actions, step_actions, cmd_strings>: Change type to
12907         std::vector<char *>.
12908         * tracepoint.c (get_uploaded_tp): Allocate with new.
12909         (free_uploaded_tps): Free with delete.
12910         (parse_tracepoint_definition): Adjust to std::vector change.
12911         * breakpoint.c (read_uploaded_action): Likewise.
12912         (create_tracepoint_from_upload): Likewise.
12913         * ctf.c (ctf_write_uploaded_tp): Likewise.
12914         (SET_ARRAY_FIELD): Likewise.
12915         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12916
12917 2018-03-30  Tom Tromey  <tom@tromey.com>
12918
12919         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12920         std::unique_ptr.
12921         (svr4_keep_data_in_core): Update.
12922         (svr4_read_so_list): Update.
12923
12924 2018-03-30  Tom Tromey  <tom@tromey.com>
12925
12926         * windows-nat.c (handle_output_debug_string, handle_exception):
12927         Update.
12928         * target.h (target_read_string): Update.
12929         * target.c (target_read_string): Change "string" to
12930         unique_xmalloc_ptr.
12931         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12932         Update.
12933         * solib-frv.c (frv_current_sos): Update.
12934         * solib-dsbt.c (dsbt_current_sos): Update.
12935         * solib-darwin.c (darwin_current_sos): Update.
12936         * linux-thread-db.c (inferior_has_bug): Update.
12937         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12938         Update.  Remove alloca.
12939         * ada-lang.c (ada_main_name): Update.
12940
12941 2018-03-30  Tom Tromey  <tom@tromey.com>
12942
12943         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12944         (struct dwo_file_deleter): New.
12945         (dwo_file_up): New typedef.
12946         (open_and_init_dwo_file): Use dwo_file_up.
12947         (free_dwo_file_cleanup): Remove.
12948
12949 2018-03-30  Tom Tromey  <tom@tromey.com>
12950
12951         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12952         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12953
12954 2018-03-30  Tom Tromey  <tom@tromey.com>
12955
12956         * dwarf2read.c (class free_cached_comp_units): New class.
12957         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12958         (free_cached_comp_units): Remove function.
12959
12960 2018-03-30  Tom Tromey  <tom@tromey.com>
12961
12962         * utils.h (make_cleanup_unpush_target): Remove.
12963         * inf-ptrace.c (struct target_unpusher): New.
12964         (target_unpush_up) New typedef.
12965         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12966         target_unpush_up.
12967         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12968
12969 2018-03-27  Tom Tromey  <tom@tromey.com>
12970
12971         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12972
12973 2018-03-27  Pedro Alves  <palves@redhat.com>
12974             Tom Tromey  <tom@tromey.com>
12975
12976         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12977         destructor.  Now a class.
12978         (gdb_readline_wrapper_cleanup): Remove function.
12979         (gdb_readline_wrapper): Remove cleanups.
12980
12981 2018-03-27  Tom Tromey  <tom@tromey.com>
12982
12983         * typeprint.h (struct type_print_options) <local_typedefs,
12984         global_typedefs>: Remove "struct" keyword.
12985         (class typedef_hash_table): New class.
12986         (recursively_update_typedef_hash, add_template_parameters)
12987         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12988         (find_typedef_in_hash): Don't declare.
12989         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12990         (typedef_hash_table::recursively_update): Rename from
12991         recursively_update_typedef_hash.  Now a member.
12992         (typedef_hash_table::add_template_parameters): Rename from
12993         add_template_parameters.  Now a member.
12994         (typedef_hash_table::typedef_hash_table): Now a constructor;
12995         rename from create_typedef_hash.
12996         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12997         rename from free_typedef_hash.
12998         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12999         (do_free_global_table): Remove.
13000         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13001         from copy_type_recursive.
13002         (create_global_typedef_table): Remove.
13003         (typedef_hash_table::find_global_typedef): Now a member of
13004         typedef_hash_table.
13005         (typedef_hash_table::find_typedef): Rename from
13006         find_typedef_in_hash; now a member.
13007         (whatis_exp): Update.
13008         * extension.h (struct ext_lang_type_printers): Add constructor and
13009         destructor.
13010         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13011         declare.
13012         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13013         Now a constructor; rename from start_ext_lang_type_printers.
13014         (ext_lang_type_printers): Now a destructor; rename from
13015         free_ext_lang_type_printers.
13016         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13017         Update.
13018         (c_type_print_base_struct_union): Update.  Remove cleanups.
13019
13020 2018-03-27  Tom Tromey  <tom@tromey.com>
13021
13022         * dwarf-index-write.c: Include <cmath>.
13023
13024 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13025
13026         * NEWS: Add entry describing new "set|show varsize-limit" command.
13027         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13028         command.
13029         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13030         "set variable".
13031
13032 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13033
13034         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13035         dwarf-index-write.c
13036         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13037         * dwarf-index-common.c: New file.
13038         * dwarf-index-common.h: New file.
13039         * dwarf-index-write.c: New file.
13040         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13041         (struct dwarf2_section_info): Move from here.
13042         (dwarf2_section_info_def): Likewise.
13043         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13044         (offset_type): Likewise.
13045         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13046         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13047         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13048         (byte_swap): Likewise.
13049         (MAYBE_SWAP): Likewise.
13050         (dwarf2_per_cu_ptr): Likewise.
13051         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13052         (struct tu_stats): Likewise.
13053         (struct dwarf2_per_objfile): Likewise.
13054         (struct dwarf2_per_cu_data): Likewise.
13055         (struct signatured_type): Likewise.
13056         (sig_type_ptr): Likewise.
13057         (DEF_VEC_P (sig_type_ptr)): Likewise.
13058         (INDEX4_SUFFIX): Likewise.
13059         (INDEX5_SUFFIX): Likewise.
13060         (DEBUG_STR_SUFFIX): Likewise.
13061         (dwarf2_read_section): Make non-static.
13062         (mapped_index_string_hash): Move from here.
13063         (dwarf5_djb_hash): Likewise.
13064         (file_write): Likewise.
13065         (class data_buf): Likewise.
13066         (struct symtab_index_entry): Likewise.
13067         (struct mapped_symtab): Likewise.
13068         (find_slot): Likewise.
13069         (hash_expand): Likewise.
13070         (add_index_entry): Likewise.
13071         (uniquify_cu_indices): Likewise.
13072         (class c_str_view): Likewise.
13073         (class c_str_view_hasher): Likewise.
13074         (class vector_hasher): Likewise.
13075         (write_hash_table): Likewise.
13076         (psym_index_map): Likewise.
13077         (struct addrmap_index_data): Likewise.
13078         (add_address_entry): Likewise.
13079         (add_address_entry_worker): Likewise.
13080         (write_address_map): Likewise.
13081         (symbol_kind): Likewise.
13082         (write_psymbols): Likewise.
13083         (struct signatured_type_index_data): Likewise.
13084         (write_one_signatured_type): Likewise.
13085         (recursively_count_psymbols): Likewise.
13086         (recursively_write_psymbols): Likewise.
13087         (class debug_names): Likewise.
13088         (check_dwarf64_offsets): Likewise.
13089         (psyms_seen_size): Likewise.
13090         (write_gdbindex): Likewise.
13091         (write_debug_names): Likewise.
13092         (assert_file_size): Likewise.
13093         (write_psymtabs_to_index): Likewise.
13094         (save_gdb_index_command): Likewise.
13095         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13096         command.
13097         * dwarf2read.h: New file.
13098
13099 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13100
13101         PR gdb/22670
13102         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13103         symbol name if the CU's language stores symbol names in linkage
13104         format.
13105         * language.h (struct language_defn)
13106         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13107         all instances of this struct.
13108
13109 2018-03-26  Tom Tromey  <tom@tromey.com>
13110
13111         * stack.c (backtrace_command_1): Remove verbose code.
13112
13113 2018-03-26  Tom Tromey  <tom@tromey.com>
13114
13115         * python/py-framefilter.c (py_print_type): Don't catch
13116         exceptions.  Return void.
13117         (py_print_value): Likewise.
13118         (py_print_single_arg): Likewise.
13119         (enumerate_args): Don't catch exceptions.
13120         (py_print_args): Likewise.
13121         (py_print_frame): Likewise.
13122         (gdbpy_apply_frame_filter): Catch exceptions here.
13123
13124 2018-03-26  Tom Tromey  <tom@tromey.com>
13125
13126         * stack.c (_initialize_stack): Remove trailing newlines from help
13127         text.  Add "Usage" line to "backtrace" help.
13128
13129 2018-03-26  Tom Tromey  <tom@tromey.com>
13130
13131         PR python/16486:
13132         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13133
13134 2018-03-26  Tom Tromey  <tom@tromey.com>
13135
13136         * python/py-framefilter.c (py_print_single_arg): Return
13137         EXT_LANG_BT_ERROR from catch.
13138
13139 2018-03-26  Tom Tromey  <tom@tromey.com>
13140
13141         PR backtrace/15584:
13142         * stack.c (backtrace_command_1): Move some code into no-filters
13143         "if".
13144
13145 2018-03-26  Tom Tromey  <tom@tromey.com>
13146
13147         * python/py-framefilter.c (throw_quit_or_print_exception): New
13148         function.
13149         (gdbpy_apply_frame_filter): Use it.
13150
13151 2018-03-26  Tom Tromey  <tom@tromey.com>
13152
13153         PR cli/17716:
13154         * python/py-framefilter.c (py_print_type, py_print_value)
13155         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13156         RETURN_MASK_ERROR.
13157
13158 2018-03-26  Tom Tromey  <tom@tromey.com>
13159
13160         * python/py-framefilter.c (enumerate_args): Use
13161         gdb::unique_xmalloc_ptr.
13162
13163 2018-03-26  Tom Tromey  <tom@tromey.com>
13164
13165         * python/py-framefilter.c (py_print_frame): Return
13166         EXT_LANG_BT_OK.
13167         (gdbpy_apply_frame_filter): Update comment.
13168         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13169         Remove.
13170         <EXT_LANG_BT_NO_FILTERS>: Change value.
13171
13172 2018-03-26  Tom Tromey  <tom@tromey.com>
13173
13174         PR backtrace/15582:
13175         * stack.c (backtrace_command): Parse "hide" argument.
13176         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13177         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13178         constant.
13179
13180 2018-03-26  Tom Tromey  <tom@tromey.com>
13181
13182         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13183         add "flags".
13184         (backtrace_command): Remove "fulltrace", add "flags".
13185
13186 2018-03-26  Tom Tromey  <tom@tromey.com>
13187
13188         * stack.c (backtrace_command): Rewrite command line parsing.
13189
13190 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13191
13192         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13193
13194 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13195
13196         * filename-seen-cache.h: Add include guard.
13197
13198 2018-03-26  Keith Seitz  <keiths@redhat.com>
13199
13200         * symfile.c (place_section): Remove "struct" from section_addr_info
13201         in comment.
13202         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13203         "struct" keyword from section_addr_info.
13204
13205 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13206
13207         * regformats/regdef.h (reg): Add constructors.
13208
13209 2018-03-25  Pedro Alves  <palves@redhat.com>
13210
13211         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13212         if then/else bodies in var_func_name extraction.
13213
13214 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13215
13216         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13217         lookup_minimal_symbol() to find symbol entry.
13218         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13219
13220 2018-03-23  Keith Seitz  <keiths@redhat.com>
13221
13222         PR c++/22968
13223         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13224         nested type definitions for C++, too.
13225
13226 2018-03-23  Tom Tromey  <tom@tromey.com>
13227
13228         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13229         a typedef.
13230         (macho_register_oso): Remove.
13231         (macho_symtab_read): Take a std::vector.
13232         (oso_el_compare_name): Now a std::sort comparator.
13233         (macho_symfile_read_all_oso): Take a std::vector.
13234         (macho_symfile_read): Use std::vector.  Remove cleanups.
13235
13236 2018-03-22  Tom Tromey  <tom@tromey.com>
13237
13238         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13239         (record_full_goto_bookmark): Use std::string.
13240
13241 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13242
13243         PR tdep/18295
13244         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13245         a single mask.
13246
13247 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13248
13249         * rs6000-tdep.c (store_insn_p): New function.
13250         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13251         and cr_reg to their unshifted values. Use store_insn_p to
13252         match LR saves using either R1 or fdata->alloca_reg. Use
13253         store_insn_p to match CR saves. Set alloca_reg_offset
13254         when alloca_reg and framep are set. Remove lr_reg shift
13255         when assigning to fdata->lr_register.
13256
13257 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13258
13259         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13260         command line args instead of emitting a warning.
13261
13262 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13263
13264         * tracepoint.h (struct static_tracepoint_marker): Initialize
13265         fields, define default constructor, move constructor and move
13266         assignment, disable the rest.
13267         <str_id, extra>: Make std::string.
13268         (release_static_tracepoint_marker): Remove.
13269         (free_current_marker): Remove.
13270         * tracepoint.c (free_current_marker): Remove.
13271         (parse_static_tracepoint_marker_definition): Adjust to
13272         std::string, use new hex2str overload.
13273         (release_static_tracepoint_marker): Remove.
13274         (print_one_static_tracepoint_marker): Get marker by reference
13275         and adjust to std::string.
13276         (info_static_tracepoint_markers_command): Adjust to std::vector
13277         changes
13278         * target.h (static_tracepoint_marker_p): Remove typedef.
13279         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13280         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13281         bool.
13282         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13283         * target-debug.h
13284         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13285         (target_debug_print_std_vector_static_tracepoint_marker): New.
13286         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13287         to...
13288         (target_debug_print_static_tracepoint_marker_p): ... this.
13289         * target-delegates.c: Re-generate.
13290         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13291         Make std::string.
13292         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13293         (decode_static_tracepoint_spec): Adjust to std::vector.
13294         (tracepoint_print_one_detail): Adjust to std::string.
13295         (strace_marker_decode_location): Adjust to std::string.
13296         (update_static_tracepoint): Adjust to std::string, remove call
13297         to release_static_tracepoint_marker.
13298         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13299         Adjust to std::vector.
13300         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13301         (remote_static_tracepoint_markers_by_strid): Adjust to
13302         std::vector.
13303         * common/rsp-low.h (hex2str): New overload with explicit count
13304         of bytes.
13305         * common/rsp-low.c (hex2str): New overload with explicit count
13306         of bytes.
13307         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13308         (_initialize_rsp_low_selftests): Add test_hex2str test.
13309         * unittests/tracepoint-selftests.c
13310         (test_parse_static_tracepoint_marker_definition): Adjust to
13311         std::string.
13312
13313 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13314
13315         * tracepoint.c (parse_static_tracepoint_marker_definition):
13316         Consider case where the definition is followed by more
13317         definitions.
13318         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13319         tracepoint-selftests.c.
13320         * unittests/tracepoint-selftests.c: New.
13321
13322 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13323
13324         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13325         Carvalho.
13326
13327 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13328
13329         * symtab.c (find_pc_sect_line): fixed indentation.
13330
13331 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13332
13333         * symtab.c (find_pc_sect_line): now uses binary search.
13334
13335 2018-03-19  Tom Tromey  <tom@tromey.com>
13336
13337         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13338         "IDENT" production.
13339
13340 2018-03-19  Pedro Alves  <palves@redhat.com>
13341             Tom Tromey  <tom@tromey.com>
13342
13343         * unittests/observable-selftests.c: New file.
13344         * common/observable.h: New file.
13345         * observable.h: New file.
13346         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13347         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13348         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13349         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13350         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13351         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13352         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13353         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13354         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13355         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13356         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13357         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13358         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13359         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13360         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13361         tui/tui-interp.c, valops.c: Update all users.
13362         * tui/tui-hooks.c (tui_bp_created_observer)
13363         (tui_bp_deleted_observer, tui_bp_modified_observer)
13364         (tui_inferior_exit_observer, tui_before_prompt_observer)
13365         (tui_normal_stop_observer, tui_register_changed_observer):
13366         Remove.
13367         (tui_observers_token): New global.
13368         (attach_or_detach, tui_attach_detach_observers): New functions.
13369         (tui_install_hooks, tui_remove_hooks): Use
13370         tui_attach_detach_observers.
13371         * record-btrace.c (record_btrace_thread_observer): Remove.
13372         (record_btrace_thread_observer_token): New global.
13373         * observer.sh: Remove.
13374         * observer.c: Rename to observable.c.
13375         * observable.c (namespace gdb_observers): Define new objects.
13376         (observer_debug): Move into gdb_observers namespace.
13377         (struct observer, struct observer_list, xalloc_observer_list_node)
13378         (xfree_observer_list_node, generic_observer_attach)
13379         (generic_observer_detach, generic_observer_notify): Remove.
13380         (_initialize_observer): Update.
13381         Don't include observer.inc.
13382         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13383         (clean mostlyclean): Likewise.
13384         (observer.h, observer.inc): Remove targets.
13385         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13386         (COMMON_SFILES): Use observable.c, not observer.c.
13387         * .gitignore: Remove observer.h.
13388
13389 2018-03-18  Tom Tromey  <tom@tromey.com>
13390
13391         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13392         gdb::def_vector.
13393         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13394
13395 2018-03-17  Tom Tromey  <tom@tromey.com>
13396
13397         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13398
13399 2018-03-17  Tom Tromey  <tom@tromey.com>
13400
13401         * target.c (class scoped_target_fd): New.
13402         (target_fileio_close_cleanup): Remove.
13403         (target_fileio_read_alloc_1): Use scoped_target_fd.
13404
13405 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13406
13407         * silent-rules.mk: New.
13408         * Makefile.in: Include silent-rules.mk
13409         (srcdir, VPATH, top_srcdir): Move up.
13410         (COMPILE): Add ECHO_CXX.
13411         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13412         (init.c): Add ECHO_INIT_C.
13413         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13414         (version.c): Add ECHO_GEN.
13415         (printcmd.o): Add ECHO_CXX.
13416         (target-float.o): Add ECHO_CXX.
13417         (ada-exp.o): Add ECHO_CXX.
13418         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13419         (insight$(EXEEXT)): Add ECHO_CXXLD.
13420         * gnulib/configure.ac: Add AM_SILENT_RULES.
13421         * gnulib/aclocal.m4: Re-generate.
13422         * gnulib/configure: Re-generate.
13423         * gnulib/import/Makefile.in: Re-generate.
13424
13425 2018-03-16  Tom Tromey  <tom@tromey.com>
13426
13427         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13428         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13429         * utils.c (do_free_section_addr_info)
13430         (make_cleanup_free_section_addr_info): Remove.
13431         * symfile.h (struct other_sections): Add constructor.
13432         (struct section_addr_info): Remove.
13433         (section_addr_info): New typedef.
13434         (struct sym_fns) <sym_offsets>: Change type of parameter.
13435         (build_section_addr_info_from_objfile)
13436         (relative_addr_info_to_section_offsets, addr_info_make_relative)
13437         (default_symfile_offsets, symbol_file_add)
13438         (symbol_file_add_from_bfd)
13439         (build_section_addr_info_from_section_table): Update.
13440         (alloc_section_addr_info, free_section_addr_info): Don't declare.
13441         * symfile.c (alloc_section_addr_info): Remove.
13442         (build_section_addr_info_from_section_table): Change return type.
13443         Update.
13444         (build_section_addr_info_from_bfd)
13445         (build_section_addr_info_from_objfile): Likewise.
13446         (free_section_addr_info): Remove.
13447         (relative_addr_info_to_section_offsets): Change type of "addrs".
13448         (addrs_section_compar): Now a std::sort comparator.
13449         (addrs_section_sort): Change return type.
13450         (addr_info_make_relative): Change type of "addrs".  Update.
13451         (default_symfile_offsets, syms_from_objfile_1)
13452         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
13453         (symbol_file_add_separate): Update.
13454         (symbol_file_add): Change type of "addrs".  Update.
13455         (add_symbol_file_command): Update.  Remove cleanups.
13456         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
13457         cleanups.
13458         * symfile-debug.c (debug_sym_offsets): Change type of "info".
13459         * solib.c (solib_read_symbols): Update.
13460         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
13461         * machoread.c (macho_symfile_offsets): Update.
13462         * jit.c (jit_bfd_try_read_symtab): Update.
13463
13464 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
13465
13466         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13467         unittests/utils-selftests.c.
13468         * unittests/utils-selftests.c: New file.
13469
13470 2018-03-14  Tom Tromey  <tom@tromey.com>
13471
13472         PR cli/14977:
13473         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
13474         for NULL.
13475
13476 2018-03-14  Tom Tromey  <tom@tromey.com>
13477
13478         PR cli/19918:
13479         * printcmd.c (printf_pointer): Allow "-" in format.
13480
13481 2018-03-14  Tom Tromey  <tom@tromey.com>
13482
13483         * printcmd.c (_initialize_printcmd): Add usage to printf.
13484
13485 2018-03-14  Yao Qi  <qiyao@sourceware.org>
13486
13487         * MAINTAINERS: Update my email address.
13488
13489 2018-03-13  Tom Tromey  <tom@tromey.com>
13490
13491         * machoread.c (macho_check_dsym): Change filenamep to a
13492         std::string*.
13493         (macho_symfile_read): Update.
13494         * symfile.c (load_command): Use std::string.
13495
13496 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13497
13498         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
13499         to error message string.
13500         (riscv_register_name): Use xsnprintf instead of sprintf.
13501         (riscv_insn::fetch_instruction): Use gdb_assert instead of
13502         internal_error.
13503         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
13504         error.
13505         (riscv_push_dummy_call): Likewise.
13506
13507 2018-03-12  Tom Tromey  <tom@tromey.com>
13508
13509         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
13510         Use gdb::byte_vector.
13511         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
13512
13513 2018-03-12  Yao Qi  <yao.qi@linaro.org>
13514
13515         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
13516         parameter type to readable_regcache.
13517         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
13518         the declaration.
13519
13520 2018-03-11  Tom Tromey  <tom@tromey.com>
13521
13522         * dwarf2read.c (struct nextfield): Add initializers.
13523         (struct nextfnfield): Remove.
13524         (struct fnfieldlist): Add initializers.  Remove "length" and
13525         "head", use std::vector.
13526         (struct decl_field_list): Remove.
13527         (struct field_info): Add initializers.
13528         <fields, baseclasses>: Now std::vector.
13529         <nbaseclasses, nfnfields, typedef_field_list_count,
13530         nested_types_list_count>: Remove.
13531         (dwarf2_add_field, dwarf2_add_type_defn)
13532         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
13533         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
13534         (process_structure_scope): Update.
13535
13536 2018-03-11  Tom Tromey  <tom@tromey.com>
13537
13538         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
13539         for use by std::sort.
13540         (build_type_psymtabs_1): Use std::vector.
13541
13542 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
13543
13544         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
13545         and LIBMPFR in the printed configuration.
13546
13547 2018-03-08  Tom Tromey  <tom@tromey.com>
13548
13549         * source.c (get_filename_and_charpos): Use scoped_fd.
13550         * nto-procfs.c (procfs_open_1): Use scoped_fd.
13551         (procfs_pidlist): Likewise.
13552         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
13553         (iterate_over_mappings): Likewise.
13554
13555 2018-03-08  Tom Tromey  <tom@tromey.com>
13556
13557         * infcall.c (struct call_return_meta_info)
13558         <stack_temporaries_enabled>: Remove.
13559         (get_call_return_value, call_function_by_hand_dummy): Update.
13560         * thread.c (disable_thread_stack_temporaries): Remove.
13561         (enable_thread_stack_temporaries): Remove.
13562         (thread_stack_temporaries_enabled_p): Return bool.
13563         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
13564         (get_last_thread_stack_temporary): Update.
13565         * eval.c (evaluate_subexp): Update.
13566         * gdbthread.h (class enable_thread_stack_temporaries): Now a
13567         class, not a function.
13568         (value_ptr, value_vec): Remove typedefs.
13569         (class thread_info) <stack_temporaries_enabled>: Now bool.
13570         <stack_temporaries>: Now a std::vector.
13571         (thread_stack_temporaries_enabled_p)
13572         (value_in_thread_stack_temporaries): Return bool.
13573
13574 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
13575
13576         * remote.c (putpkt_binary): Fix omitted bytes reporting.
13577         (getpkt_or_notif_sane_1): Likewise.
13578
13579 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13580
13581         * build-id.c (build_id_to_debug_bfd): Use std::string.
13582
13583 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13584
13585         * build-id.c (find_separate_debug_file_by_buildid): Return
13586         std::string.
13587         * build-id.h (find_separate_debug_file_by_buildid): Return
13588         std::string.
13589         * coffread.c (coff_symfile_read): Adjust to std::string.
13590         * elfread.c (elf_symfile_read): Adjust to std::string.
13591         * symfile.c (separate_debug_file_exists): Change parameter to
13592         std::string.
13593         (find_separate_debug_file): Return std::string.
13594         (find_separate_debug_file_by_debuglink): Return std::string.
13595         * symfile.h (find_separate_debug_file_by_debuglink): Return
13596         std::string.
13597
13598 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13599
13600         * common/xml-utils.c (xml_escape_text): Move code to...
13601         (xml_escape_text_append): ... this new function.
13602         * common/xml-utils.h (xml_escape_text_append): New declaration.
13603         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
13604         New function.
13605         (_initialize_xml_utils): register test_xml_escape_text_append as
13606         a selftest.
13607
13608 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
13609
13610         * defs.h: Remove MAX_REGISTER_SIZE.
13611         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
13612         asserts.
13613         * python/py-unwind.c (pyuw_sniffer): Likewise.
13614
13615 2018-03-07  Tom Tromey  <tom@tromey.com>
13616
13617         * linux-tdep.c (linux_info_proc): Update.
13618         * target.h (struct target_ops) <to_fileio_readlink>: Return
13619         optional<string>.
13620         (target_fileio_readlink): Return optional<string>.
13621         * remote.c (remote_hostio_readlink): Return optional<string>.
13622         * inf-child.c (inf_child_fileio_readlink): Return
13623         optional<string>.
13624         * target.c (target_fileio_readlink): Return optional<string>.
13625
13626 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
13627
13628         * regcache.c (cooked_read_test): Add riscv to the list of
13629         architectures that have a save_reggroup.
13630
13631 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13632
13633         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
13634         value is not a dynamic class object.
13635
13636 2018-03-06  Tom Tromey  <tom@tromey.com>
13637
13638         * rust-exp.y: Formatting fixes.
13639
13640 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13641
13642         * riscv-tdep.c (riscv_register_name): Remove target description
13643         support.
13644         (riscv_gdbarch_init): Remove target description check.
13645
13646 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13647
13648         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
13649         comment.
13650         * riscv-tdep.h: Likewise.
13651
13652 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13653
13654         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
13655         (riscv_pseudo_register_write): Delete.
13656         (riscv_gdbarch_init): Remove all use of pseudo registers.
13657
13658 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13659
13660         * record-btrace.c (btrace_print_lines): Replace cleanup
13661         parameter with RAII equivalents.
13662         (btrace_insn_history): Replace cleanup with RAII equivalents.
13663         * ui-out.h (make_cleanup_ui_out_list_begin_end,
13664         make_cleanup_ui_out_tuple_begin_end): Remove.
13665         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
13666         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
13667         make_cleanup_ui_out_list_begin_end): Remove.
13668
13669 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13670
13671         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
13672         parameter types to std::vector.  Use bool.
13673         (record_btrace_wait): Replace VEC(tp_t) with
13674         std::vector<thread_info *>.
13675         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
13676
13677 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13678
13679         * record-btrace.c (record_btrace_disable_callback): Remove.
13680         (struct scoped_btrace_disable): New.
13681         (record_btrace_open): Use scoped_btrace_disable.
13682
13683 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13684
13685         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
13686         reading values from registers.
13687
13688 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13689
13690         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
13691         where appropriate.
13692
13693 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13694
13695         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
13696         change parameter type.  Use GDB's print functions, and use
13697         core_addr_to_string where appropriate.
13698         (riscv_push_dummy_call): Use core_addr_to_string where
13699         appropriate, update call to riscv_print_arg_location, and reindent
13700         a few lines.
13701         (riscv_return_value): Update call to riscv_print_arg_location.
13702
13703 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13704             Tim Newsome <tim@sifive.com>
13705             Albert Ou <a0u@eecs.berkeley.edu>
13706             Darius Rad <darius@bluespec.com>
13707
13708         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
13709         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
13710         (ALLDEPFILES): Add riscv-tdep.c
13711         * configure.tgt: Add riscv support.
13712         * riscv-tdep.c: New file.
13713         * riscv-tdep.h: New file.
13714         * NEWS: Mention new target.
13715         * MAINTAINERS: Add entry for riscv.
13716
13717 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13718
13719         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
13720         fields within aggregates.
13721
13722 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
13723
13724         * record-btrace.c (btrace_print_lines): Change type of flags to
13725         gdb_disassembly_flags.
13726
13727 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13728
13729         * fbsd-nat.c: Include "inf-ptrace.h".
13730         (USE_SIGTRAP_SIGINFO): Conditionally define.
13731         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13732         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13733         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13734         function.
13735         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13736         Likewise.
13737         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13738         Likewise.
13739         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13740         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13741         "supports_stopped_by_hw_breakpoint" target methods.
13742
13743 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13744
13745         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13746         * fbsd-nat.c (debug_fbsd_nat): New variable.
13747         (show_fbsd_nat_debug): New function.
13748         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13749         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13750
13751 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13752
13753         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13754         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13755         prototype.
13756         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13757         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13758         method.
13759
13760 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13761
13762         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13763         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13764
13765 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13766
13767         * charset.c (struct charset_vector): New.
13768         (charsets): Change type to charset_vector.
13769         (find_charset_names): Adjust.
13770         (add_one): Adjust.
13771         (_initialize_charset): Adjust.
13772
13773 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13774
13775         * progspace.h (struct program_space) <deleted_solibs>: Change
13776         type to std::vector<std::string>.
13777         * progspace.c (clear_program_space_solib_cache): Adjust.
13778         * breakpoint.c (print_solib_event): Adjust.
13779         (check_status_catch_solib): Adjust.
13780         * solib.c (update_solib_list): Adjust.
13781         * ui-out.h (class ui_out) <field_string>: New overload.
13782         * ui-out.c (ui_out::field_string): New overload.
13783
13784 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13785
13786         * progspace.h (struct program_space): Add constructor and
13787         destructor, initialize fields.
13788         (add_program_space): Remove.
13789         * progspace.c (add_program_space): Rename to...
13790         (program_space::program_space): ... this.
13791         (release_program_space): Rename to...
13792         (program_space::~program_space): ... this.
13793         (delete_program_space): Use delete to delete program_space.
13794         (initialize_progspace): Use new to allocate program_space.
13795         * inferior.c (add_inferior_with_spaces): Likewise.
13796         (clone_inferior_command): Likewise.
13797         * infrun.c (follow_fork_inferior): Likewise.
13798         (handle_vfork_child_exec_or_exit): Likewise.
13799
13800 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13801
13802         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13803         (delim_string_to_char_ptr_vec): Return std::vector of
13804         gdb::unique_xmalloc_ptr.
13805         (dirnames_to_char_ptr_vec_append): Take std::vector of
13806         gdb::unique_xmalloc_ptr.
13807         (dirnames_to_char_ptr_vec): Return std::vector of
13808         gdb::unique_xmalloc_ptr.
13809         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13810         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13811         (delim_string_to_char_ptr_vec): Return an std::vector of
13812         gdb::unique_xmalloc_ptr, adjust the code.
13813         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13814         gdb::unique_xmalloc_ptr, adjust the code.
13815         (dirnames_to_char_ptr_vec): Return an std::vector of
13816         gdb::unique_xmalloc_ptr, adjust the code.
13817         * auto-load.c (auto_load_safe_path_vec): Change type to
13818         std::vector of gdb::unique_xmalloc_ptr.
13819         (auto_load_expand_dir_vars): Return an std::vector of
13820         gdb::unique_xmalloc_ptr, adjust the code.
13821         (auto_load_safe_path_vec_update): Adjust.
13822         (filename_is_in_auto_load_safe_path_vec): Adjust.
13823         (auto_load_objfile_script_1): Adjust.
13824         * build-id.c (build_id_to_debug_bfd): Adjust.
13825         * linux-thread-db.c (thread_db_load_search): Adjust.
13826         * source.c (add_path): Adjust.
13827         (openp): Adjust.
13828         * symfile.c (find_separate_debug_file): Adjust.
13829         * utils.c (do_free_char_ptr_vec): Remove.
13830         (make_cleanup_free_char_ptr_vec): Remove.
13831
13832 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13833
13834         PR gdb/22907
13835         * common/pathstuff.c: Conditionally include "<windows.h>".
13836
13837 2018-03-01  Georg Sauthoff  <mail@georg.so>
13838
13839         PR gdb/22888
13840         * gcore.in: Quote variables and switch interpreter to bash.
13841
13842 2018-03-01  Tom Tromey  <tom@tromey.com>
13843
13844         * dwarf2read.c (alloc_discriminant_info): Fix default_index
13845         assertion.  Add assertion for discriminant_index.
13846         (quirk_rust_enum): Use correct base type name in univariant case.
13847
13848 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13849
13850         * record.c (get_call_history_modifiers): Return a
13851         record_print_flags.
13852         (cmd_record_call_history): Adjust.
13853         * record-btrace.c (record_btrace_call_history): Adjust.
13854         (record_btrace_call_history_range): Adjust.
13855         (record_btrace_call_history_from): Adjust.
13856         * target-debug.h (target_debug_print_record_print_flags): New.
13857         * target-delegates.c: Re-generate.
13858         * target.c (target_call_history): Change flags type.
13859         (target_call_history_from): Likewise.
13860         (target_call_history_range): Likewise.
13861         * target.h (struct target_ops) <target_call_history>: Likewise.
13862         (target_call_history_from): Likewise.
13863         (target_call_history_range): Likewise.
13864
13865 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13866             Simon Marchi  <simon.marchi@polymtl.ca>
13867
13868         * common/common-utils.c: Include "sys/stat.h".
13869         (is_regular_file): Move here from "source.c"; change return
13870         type to "bool".
13871         * common/common-utils.h (is_regular_file): New prototype.
13872         * common/pathstuff.c (contains_dir_separator): New function.
13873         * common/pathstuff.h (contains_dir_separator): New prototype.
13874         * source.c: Don't include "sys/stat.h".
13875         (is_regular_file): Move to "common/common-utils.c".
13876
13877 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13878
13879         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13880         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13881         * auto-load.c: Include "common/pathstuff.h".
13882         * common/common-def.h (current_directory): Move here.
13883         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13884         function.
13885         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13886         prototype.
13887         * common/pathstuff.c: New file.
13888         * common/pathstuff.h: New file.
13889         * compile/compile.c: Include "common/pathstuff.h".
13890         * defs.h (current_directory): Move to "common/common-defs.h".
13891         * dwarf2read.c: Include "common/pathstuff.h".
13892         * exec.c: Likewise.
13893         * guile/scm-safe-call.c: Likewise.
13894         * linux-thread-db.c: Likewise.
13895         * main.c: Likewise.
13896         * nto-tdep.c: Likewise.
13897         * objfiles.c: Likewise.
13898         * source.c: Likewise.
13899         * symtab.c: Likewise.
13900         * utils.c: Include "common/pathstuff.h".
13901         (gdb_realpath): Move to "common/pathstuff.c".
13902         (gdb_realpath_keepfile): Likewise.
13903         (gdb_abspath): Likewise.
13904         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13905         (gdb_realpath_keepfile): Likewise.
13906         (gdb_abspath): Likewise.
13907
13908 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13909
13910         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13911         wildcard process pid for super_resume for kernels with a
13912         specific bug.
13913
13914 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13915
13916         * compile/compile.c (get_args): Add additional comments
13917         explaining function.
13918
13919 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13920             Tom Tromey  <tom@tromey.com>
13921
13922         * target.h (memory_write_request_s): Remove typedef.  Don't define
13923         VEC.
13924         (target_write_memory_blocks): Change argument to std::vector.
13925         (struct memory_write_request): Add constructor.
13926         * target-memory.c (compare_block_starting_address): Return bool.
13927         Change argument types.
13928         (claim_memory): Change arguments to use std::vector.
13929         (split_regular_and_flash_blocks, blocks_to_erase)
13930         (compute_garbled_blocks): Likewise.
13931         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13932         (target_write_memory_blocks): Change argument to std::vector.
13933         * symfile.c (struct load_section_data): Add constructor and
13934         destructor.  Use std::vector for "requests".
13935         (struct load_progress_data): Add initializers.
13936         (load_section_callback): Update.  Use "new".
13937         (clear_memory_write_data): Remove.
13938         (generic_load): Update.
13939
13940 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13941
13942         * arch/aarch64.h: Use common/tdesc.h.
13943
13944 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13945
13946         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13947         architecture with a 64-bit ABI.
13948
13949 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13950
13951         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13952         ahead of target description loading.
13953
13954 2018-02-26  Tom Tromey  <tom@tromey.com>
13955
13956         * stack.c (backtrace_command_1): Update.
13957         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13958         of "flags".
13959         * python/py-framefilter.c (py_print_frame)
13960         (gdbpy_apply_frame_filter): Change type of "flags".
13961         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13962         of "flags".
13963         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13964         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13965         * extension.h (enum frame_filter_flag): Rename from
13966         frame_filter_flags.
13967         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13968         (apply_ext_lang_frame_filter): Change type of "flags".
13969         * extension.c (apply_ext_lang_frame_filter): Change type of
13970         "flags".
13971         * extension-priv.h (struct extension_language_ops)
13972         <apply_frame_filter>: Change type of "flags".
13973
13974 2018-02-26  Tom Tromey  <tom@tromey.com>
13975
13976         PR python/16497:
13977         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13978         off-by-one in py_end computation.
13979         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13980         PRINT_MORE_FRAMES.
13981         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13982         constant.
13983
13984 2018-02-26  Tom Tromey  <tom@tromey.com>
13985
13986         * dwarf2read.c (struct variant_field): New.
13987         (struct nextfield) <variant>: New field.
13988         (dwarf2_add_field): Handle DW_TAG_variant_part.
13989         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13990         discriminated union.
13991         (read_structure_type): Handle DW_TAG_variant_part.
13992         (handle_struct_member_die): New function, extracted from
13993         process_structure_scope.  Handle DW_TAG_variant.
13994         (process_structure_scope): Handle discriminated unions.  Call
13995         handle_struct_member_die.
13996
13997 2018-02-26  Tom Tromey  <tom@tromey.com>
13998
13999         * rust-lang.h (rust_last_path_segment): Declare.
14000         * rust-lang.c (rust_last_path_segment): Now public.  Change
14001         contract.
14002         (struct disr_info): Remove.
14003         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14004         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14005         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14006         (rust_enum_p, rust_enum_variant): New function.
14007         (rust_underscore_fields): Remove "offset" parameter.
14008         (rust_print_enum): New function.
14009         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14010         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14011         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14012         enums.
14013         (rust_internal_print_type): New function, from rust_print_type.
14014         Remove enum code.
14015         (rust_print_type): Call rust_internal_print_type.
14016         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14017         Update enum handling.
14018         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14019         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14020         (rust_union_quirks): New functions.
14021         (process_full_comp_unit, process_full_type_unit): Call
14022         rust_union_quirks.
14023         (process_structure_scope): Update rust_unions if necessary.
14024
14025 2018-02-26  Tom Tromey  <tom@tromey.com>
14026
14027         * value.h (value_union_variant): Declare.
14028         * valops.c (value_union_variant): New function.
14029         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14030         (struct discriminant_info): New.
14031         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14032         enumerator.
14033         (struct main_type) <flag_discriminated_union>: New field.
14034
14035 2018-02-26  Tom Tromey  <tom@tromey.com>
14036
14037         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14038         unittests/unpack-selftests.c.
14039         * unittests/unpack-selftests.c: New file.
14040         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14041
14042 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14043
14044         * dwarf2read.c (struct partial_die_info) <read>: New method.
14045         (read_partial_die): Remove the declaration.
14046         (load_partial_dies): Update.
14047         (partial_die_info::partial_die_info):
14048         (read_partial_die): Change it to partial_die_info::read.
14049
14050 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14051
14052         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14053         (fixup_partial_die): Remove declaration.
14054         (scan_partial_symbols): Update.
14055         (partial_die_parent_scope): Likewise.
14056         (partial_die_full_name): Likewise.
14057         (fixup_partial_die): Change it to partial_die_info::fixup.
14058
14059 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14060
14061         * dwarf2read.c (read_partial_die): Update the declaration.
14062         (load_partial_dies): Caller update.
14063         (read_partial_die): Remove one argument abbrev_len.
14064
14065 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14066
14067         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14068         assignment operator.
14069         (load_partial_dies): Use ctor and copy ctor.
14070         (read_partial_die): Update.
14071         (dwarf2_cu::find_partial_die): Use ctor.
14072
14073 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14074
14075         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14076         (find_partial_die_in_comp_unit): Change it to
14077         dwarf2_cu::find_partial_die.
14078         (find_partial_die): Update.
14079
14080 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14081
14082         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14083         is NULL.
14084
14085 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14086
14087         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14088
14089 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14090
14091         * arch/amd64.h: Use common/tdesc.h.
14092         * arch/i386.c: Likewise.
14093         * arch/i386.h: Likewise.
14094         * arch/tic6x.c: Likewise.
14095         * arch/tdesc.h: Move file from here...
14096         * common/tdesc.h: ...to here.
14097         * features/aarch64-core.c: Regenerate.
14098         * features/aarch64-fpu.c: Regenerate.
14099         * features/i386/32bit-avx.c: Regenerate.
14100         * features/i386/32bit-avx512.c: Regenerate.
14101         * features/i386/32bit-core.c: Regenerate.
14102         * features/i386/32bit-linux.c: Regenerate.
14103         * features/i386/32bit-mpx.c: Regenerate.
14104         * features/i386/32bit-pkeys.c: Regenerate.
14105         * features/i386/32bit-sse.c: Regenerate.
14106         * features/i386/64bit-avx.c: Regenerate.
14107         * features/i386/64bit-avx512.c: Regenerate.
14108         * features/i386/64bit-core.c: Regenerate.
14109         * features/i386/64bit-linux.c: Regenerate.
14110         * features/i386/64bit-mpx.c: Regenerate.
14111         * features/i386/64bit-pkeys.c: Regenerate.
14112         * features/i386/64bit-segments.c: Regenerate.
14113         * features/i386/64bit-sse.c: Regenerate.
14114         * features/i386/x32-core.c: Regenerate.
14115         * features/tic6x-c6xp.c: Regenerate.
14116         * features/tic6x-core.c: Regenerate.
14117         * features/tic6x-gp.c: Regenerate.
14118         * target-descriptions.c: Use common/tdesc.h.
14119         * target-descriptions.h: Likewise.
14120
14121 2018-02-24  Tom Tromey  <tom@tromey.com>
14122
14123         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14124         (try_thread_db_load_from_dir, thread_db_load_search): Use
14125         std::string.
14126         (info_auto_load_libthread_db_compare): Return bool.  Change
14127         argument types.
14128         (info_auto_load_libthread_db): Use std::vector, std::string.
14129         Remove cleanups.
14130
14131 2018-02-24  Tom Tromey  <tom@tromey.com>
14132
14133         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14134         std::string.
14135         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14136         std::string*.
14137         * gdbarch.c: Rebuild.
14138         * gdbarch.h: Rebuild.
14139         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14140         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14141         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14142         std::string*.
14143
14144 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14145
14146         * gdbtypes.h (sect_offset): Change type to uint64_t.
14147         (sect_offset_str): New function.
14148         * dwarf2read.c (create_addrmap_from_aranges): Use
14149         sect_offset_str.
14150         (error_check_comp_unit_head): Likewise.
14151         (create_debug_type_hash_table): Likewise.
14152         (read_cutu_die_from_dwo): Likewise.
14153         (init_cutu_and_read_dies): Likewise.
14154         (init_cutu_and_read_dies_no_follow): Likewise.
14155         (process_psymtab_comp_unit_reader): Likewise.
14156         (partial_die_parent_scope): Likewise.
14157         (peek_die_abbrev): Likewise.
14158         (process_queue): Likewise.
14159         (dwarf2_physname): Likewise.
14160         (read_namespace_alias): Likewise.
14161         (read_import_statement): Likewise.
14162         (create_dwo_cu_reader): Likewise.
14163         (create_cus_hash_table): Likewise.
14164         (lookup_dwo_cutu): Likewise.
14165         (inherit_abstract_dies): Likewise.
14166         (read_func_scope): Likewise.
14167         (read_call_site_scope): Likewise.
14168         (dwarf2_add_member_fn): Likewise.
14169         (read_common_block): Likewise.
14170         (read_module_type): Likewise.
14171         (read_typedef): Likewise.
14172         (read_subrange_type): Likewise.
14173         (load_partial_dies): Likewise.
14174         (read_partial_die): Likewise.
14175         (find_partial_die): Likewise.
14176         (read_str_index): Likewise.
14177         (dwarf2_string_attr): Likewise.
14178         (build_error_marker_type): Likewise.
14179         (lookup_die_type): Likewise.
14180         (dump_die_shallow): Likewise.
14181         (follow_die_ref): Likewise.
14182         (dwarf2_fetch_die_loc_sect_off): Likewise.
14183         (dwarf2_fetch_constant_bytes): Likewise.
14184         (follow_die_sig): Likewise.
14185         (get_signatured_type): Likewise.
14186         (get_DW_AT_signature_type): Likewise.
14187         (dwarf2_find_containing_comp_unit): Likewise.
14188         (set_die_type): Likewise.
14189
14190 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14191
14192         * arch/aarch64.c: Include "common-defs.h".
14193         * arch/amd64.c: Likewise.
14194         * arch/i386.c: Likewise.
14195
14196 2018-02-21  Tom Tromey  <tom@tromey.com>
14197
14198         * value.h: (extract_field_op): Update.
14199         * eval.c (extract_field_op): Return a const char *.
14200         * expression.h (parse_expression_for_completion): Update.
14201         * completer.c (complete_expression): Update.
14202         (add_struct_fields): Make fieldname const.
14203         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14204         (mark_completion_tag, parse_exp_in_context_1): Update.
14205         (parse_expression_for_completion): Change "name" to
14206         unique_xmalloc_ptr*.
14207
14208 2018-02-21  Tom Tromey  <tom@tromey.com>
14209
14210         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14211
14212 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14213
14214         * avr-tdep.c (avr_read_pc): Change parameter type to
14215         readable_regcache.
14216         * gdbarch.sh (read_pc): Likewise.
14217         * gdbarch.c: Re-generated.
14218         * gdbarch.h: Re-generated.
14219         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14220         readable_regcache.
14221         * ia64-tdep.c (ia64_read_pc): Likewise.
14222         * mips-tdep.c (mips_read_pc): Likewise.
14223         * spu-tdep.c (spu_read_pc): Likewise.
14224
14225 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14226
14227         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14228         * regcache-dump.c: New file.
14229         * regcache.c: Move register_dump to regcache-dump.c.
14230         (maintenance_print_registers): Likewise.
14231         (maintenance_print_raw_registers): Likewise.
14232         (maintenance_print_cooked_registers): Likewise.
14233         (maintenance_print_register_groups): Likewise.
14234         (maintenance_print_remote_registers): Likewise.
14235         (_initialize_regcache): Likewise.
14236         * regcache.h (register_dump): Moved from regcache.c.
14237
14238 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14239
14240         * regcache.c (regcache::regcache): Update.
14241         (regcache::invalidate): Move it to detached_regcache::invalidate.
14242         (get_thread_arch_aspace_regcache): Update.
14243         (regcache::raw_update): Update.
14244         (regcache::cooked_read): Remove some code.
14245         (regcache::cooked_read_value): Likewise.
14246         (regcache::raw_write): Remove assert on m_readonly_p.
14247         (regcache::raw_supply_integer): Move it to
14248         detached_regcache::raw_supply_integer.
14249         (regcache::raw_supply_zeroed): Likewise.
14250         * regcache.h (detached_regcache) <raw_supply_integer>: New
14251         declaration.
14252         <raw_supply_zeroed, invalidate>: Likewise.
14253         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14254         <invalidate>: Likewise.
14255         <m_readonly_p>: Removed.
14256
14257 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14258
14259         * infcmd.c (get_return_value): Let stop_regs point to
14260         get_current_regcache.
14261         * regcache.c (regcache::regcache): Remove.
14262         (register_dump_reg_buffer): New class.
14263         (regcache_print): Adjust.
14264         * regcache.h (regcache): Remove constructors.
14265
14266 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14267
14268         * regcache.c (class register_dump): New class.
14269         (register_dump_regcache, register_dump_none): New class.
14270         (register_dump_remote, register_dump_groups): New class.
14271         (regcache_print): Update.
14272         * regcache.h (regcache_dump_what): Move it to regcache.c.
14273         (regcache) <dump>: Remove.
14274
14275 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14276
14277         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14278          reg_buffer_rw *.
14279         (jit_unwind_reg_set_impl): Call raw_supply.
14280         (jit_frame_sniffer): Use reg_buffer_rw.
14281         * record-full.c (record_full_core_regbuf): Change its type.
14282         (record_full_core_open_1): Use reg_buffer_rw.
14283         (record_full_close): Likewise.
14284         (record_full_core_fetch_registers): Use regcache->raw_supply.
14285         (record_full_core_store_registers): Likewise.
14286         * regcache.c (regcache::get_register_status): Move it to
14287         reg_buffer.
14288         (regcache_raw_set_cached_value): Remove.
14289         (regcache::raw_set_cached_value): Remove.
14290         (regcache::raw_write): Call raw_supply.
14291         (regcache::raw_supply): Move it to reg_buffer_rw.
14292         * regcache.h (regcache_raw_set_cached_value): Remove.
14293         (reg_buffer_rw): New class.
14294
14295 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14296
14297         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14298         readonly_detached_regcache.
14299         (dummy_frame_prev_register): Use regcache->cooked_read.
14300         * frame.c (frame_save_as_regcache): Change return type.
14301         (frame_pop): Update.
14302         * frame.h (frame_save_as_regcache): Update declaration.
14303         * inferior.h (get_infcall_suspend_state_regcache): Update
14304         declaration.
14305         * infrun.c (infcall_suspend_state) <registers>: use
14306         readonly_detached_regcache.
14307         (save_infcall_suspend_state): Don't use regcache_dup.
14308         (get_infcall_suspend_state_regcache): Change return type.
14309         * linux-fork.c (struct fork_info) <savedregs>: Change to
14310         readonly_detached_regcache.
14311         <pc>: New field.
14312         (fork_save_infrun_state): Don't use regcache_dup.
14313         (info_checkpoints_command): Adjust.
14314         * mi/mi-main.c (register_changed_p): Update declaration.
14315         (mi_cmd_data_list_changed_registers): Use
14316         readonly_detached_regcache.
14317         (register_changed_p): Change parameter type to
14318         readonly_detached_regcache.
14319         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14320         readonly_detached_regcache.
14321         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14322         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14323         New.
14324         (regcache::save): Move it to reg_buffer.
14325         (regcache::restore): Change parameter type.
14326         (regcache_dup): Remove.
14327         * regcache.h (reg_buffer) <save>: New method.
14328         (readonly_detached_regcache): New class.
14329         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14330         readonly_detached_regcache.
14331         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14332
14333 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14334
14335         * frame.c (frame_save_as_regcache): Use regcache method save.
14336         (frame_pop): Use regcache method restore.
14337         * infrun.c (restore_infcall_suspend_state): Likewise.
14338         * linux-fork.c (fork_load_infrun_state): Likewise.
14339         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14340         save.
14341         * regcache.c (regcache_save): Remove.
14342         (regcache::restore): More asserts.
14343         (regcache_cpy): Remove.
14344         * regcache.h (regcache_save): Remove the declaration.
14345         (regcache::restore): Move from private to public.
14346         Remove the friend declaration of regcache_cpy.
14347         (regcache_cpy): Remove declaration.
14348
14349 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14350
14351         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14352         parameter type to 'readable_regcache *'.
14353         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14354         * arm-tdep.c (arm_neon_quad_read): Likewise.
14355         (arm_pseudo_read): Likewise.
14356         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14357         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14358         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14359         * gdbarch.c: Re-generated.
14360         * gdbarch.h: Re-generated.
14361         * gdbarch.sh (pseudo_register_read): Change parameter type to
14362         'readable_regcache *'.
14363         (pseudo_register_read_value): Likewise.
14364         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14365         (h8300_pseudo_register_read): Likewise.
14366         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14367         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14368         (i386_pseudo_register_read_into_value): Likewise.
14369         (i386_pseudo_register_read_value): Likewise.
14370         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14371         declaration.
14372         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14373         * m32c-tdep.c (m32c_raw_read): Likewise.
14374         (m32c_read_flg): Likewise.
14375         (m32c_banked_register): Likewise.
14376         (m32c_banked_read): Likewise.
14377         (m32c_sb_read): Likewise.
14378         (m32c_part_read): Likewise.
14379         (m32c_cat_read): Likewise.
14380         (m32c_r3r2r1r0_read): Likewise.
14381         (m32c_pseudo_register_read): Likewise.
14382         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14383         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14384         (mep_pseudo_cr64_read): Likewise.
14385         (mep_pseudo_register_read): Likewise.
14386         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14387         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14388         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14389         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14390         (regcache::cooked_read): Likewise.
14391         (regcache::cooked_read_value): Likewise.
14392         (regcache_cooked_read_signed):
14393         (regcache::cooked_read): Likewise.
14394         * regcache.h (readable_regcache): New class.
14395         (regcache): Inherit readable_regcache.  Move some methods to
14396         readable_regcache.
14397         * rl78-tdep.c (rl78_pseudo_register_read): Change
14398         parameter type to 'readable_regcache *'.
14399         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14400         (e500_pseudo_register_read): Change parameter type to
14401         'readable_regcache *'.
14402         (dfp_pseudo_register_read): Likewise.
14403         (vsx_pseudo_register_read): Likewise.
14404         (efpr_pseudo_register_read): Likewise.
14405         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14406         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14407         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14408         (sh64_pseudo_register_read): Likewise.
14409         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14410         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14411         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14412         (spu_pseudo_register_read): Likewise.
14413         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14414         (xtensa_pseudo_register_read): Likewise.
14415
14416 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14417
14418         * regcache.c (regcache::regcache): Call reg_buffer ctor.
14419         (regcache::arch): Move it to reg_buffer::arch.
14420         (regcache::register_buffer): Likewise.
14421         (regcache::assert_regnum): Likewise.
14422         (regcache::num_raw_registers): Likewise.
14423         * regcache.h (reg_buffer): New class.
14424         (regcache): Inherit reg_buffer.
14425
14426 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
14427
14428         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14429         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14430
14431 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
14432
14433         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14434
14435 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
14436
14437         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14438         (SFILES): Remove common/*.c files.
14439         (COMMON_OBS): Remove some *.o files built from common/*.c files.
14440         * common/common.host: Add common reference.
14441         * configure.ac: Likewise.
14442         * configure: Regenerate.
14443
14444 2018-02-16  Yao Qi  <yao.qi@linaro.org>
14445
14446         * block.c (block_namespace_info): Inherit allocate_on_obstack.
14447         (block_initialize_namespace): Use new.
14448         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
14449         (dwarf2_free_objfile): Use delete.
14450         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
14451         (copy_type_recursive): Use new.
14452         * gdb_obstack.h (allocate_on_obstack): New.
14453
14454 2018-02-15  Yao Qi  <yao.qi@linaro.org>
14455
14456         PR gdb/22849
14457         * inferior.c (exit_inferior_1): Reset inf->control.
14458
14459 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
14460
14461         * ada-lang.c (ada_to_fixed_value_create): Delete advance
14462         declaration.
14463
14464 2018-02-14  Pedro Alves  <palves@redhat.com>
14465
14466         * frame-unwind.c (frame_unwind_try_unwinder): Always call
14467         frame_cleanup_after_sniffer on exception.
14468
14469 2018-02-14  Tom Tromey  <tom@tromey.com>
14470
14471         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
14472         const.
14473         (solib_bfd_open): Make pathname const.
14474         * solib.c (solib_bfd_open): Make pathname const.
14475         * solib-spu.c (spu_bfd_fopen): Make name const.
14476         (spu_bfd_open): Make pathname const.
14477         * solib-darwin.c (darwin_bfd_open): Make pathname const.
14478         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
14479
14480 2018-02-14  Tom Tromey  <tom@tromey.com>
14481
14482         * symfile.c (symfile_bfd_open): Update.
14483         * source.h (openp, source_full_path_of, find_and_open_source):
14484         Change argument type to unique_xmalloc_ptr.
14485         * source.c (openp): Take a unique_xmalloc_ptr.
14486         (source_full_path_of, find_and_open_source): Likewise.
14487         (open_source_file, symtab_to_fullname): Update.
14488         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
14489         unique_xmalloc_ptr.
14490         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
14491         (exec_file_find): Update.
14492         * psymtab.c (psymtab_to_fullname): Update.
14493         * nto-tdep.h (nto_find_and_open_solib): Update.
14494         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
14495         unique_xmalloc_ptr.
14496         * exec.c (exec_file_attach): Update.
14497         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
14498         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
14499
14500 2018-02-14  Tom Tromey  <tom@tromey.com>
14501
14502         * solib.c: Include source.h.
14503         * nto-tdep.c: Include source.h.
14504         * mi/mi-cmd-env.c: Include source.h.
14505         * infcmd.c: Include source.h.
14506         * exec.c: Include source.h.
14507         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
14508         (add_path, directory_switch, source_path, init_source_path): Move
14509         declarations...
14510         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
14511         (add_path, directory_switch, source_path, init_source_path):
14512         ...here.
14513
14514 2018-02-14  Tom Tromey  <tom@tromey.com>
14515
14516         * solist.h (exec_file_find, solib_find): Return
14517         unique_xmalloc_ptr.
14518         (solib_bfd_fopen): Take a const char *.
14519         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
14520         (exec_file_find, solib_find): Likewise.
14521         (solib_bfd_fopen): Do not take ownership of "pathname".
14522         (solib_bfd_open): Use unique_xmalloc_ptr.
14523         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
14524         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
14525         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
14526         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
14527
14528 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
14529
14530         * ada-lang.c (name_match_type_from_name): Remove reference to
14531         ada_name_for_lookup in function's documentation.
14532         * ada-lang.h (ada_name_for_lookup): Delete declaration.
14533
14534 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14535
14536         * defs.h (enum openp_flags): New enum.
14537         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
14538         Move to enum openp_flags.
14539         (openp_flags): New enum flags.
14540         (openp): Change parameter type to openp_flags.
14541         * source.c (openp): Change parameter type to openp_flags.
14542         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
14543         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
14544
14545 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14546
14547         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
14548         per-command.
14549
14550 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14551
14552         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
14553         into...
14554         (class dwarf2_queue_guard): ...the destructor of this new class.
14555         (dw2_do_instantiate_symtab): Create instance of the new class
14556         dwarf2_queue_guard, remove cleanup.
14557
14558 2018-02-09  Tom Tromey  <tom@tromey.com>
14559
14560         * source.c (find_source_lines): Don't reference past the end of
14561         the vector.
14562
14563 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14564
14565         * remote.c (remote_btrace_maybe_reopen): Change error message.
14566         * btrace.c (btrace_enable): Likewise.
14567         (parse_xml_btrace): Likewise.
14568         (parse_xml_btrace_conf): Likewise.
14569
14570 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14571
14572         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
14573         (linux_enable_pt, linux_enable_bts): Call
14574         diagnose_perf_event_open_fail.
14575
14576 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14577
14578         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
14579         Remove parameter and change return type.  Update callers.  Move it.
14580         (linux_enable_bts, linux_enable_pt): Improve error message.
14581         (linux_enable_pt): Remove zero buffer size check.
14582         (linux_enable_btrace): Improve error messages.  Remove NULL return
14583         check.
14584
14585 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14586
14587         * btrace.c (btrace_enable): Remove target_supports_btrace call.
14588         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
14589         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
14590         (linux_supports_pt, linux_supports_btrace): Remove.
14591         (linux_enable_bts): Call cpu_supports_bts.
14592         * nat/linux-btrace.h (linux_supports_btrace): Remove.
14593         * remote.c (remote_supports_btrace): Remove.
14594         (init_remote_ops): Remove remote_supports_btrace.
14595         * target-delegates.c: Regenerated.
14596         * target.c (target_supports_btrace): Remove.
14597         * target.h (target_ops) <to_supports_btrace>: Remove
14598         (target_supports_btrace): Remove.
14599         * x86-linux-nat.c (x86_linux_create_target): Remove
14600         linux_supports_btrace.
14601
14602 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14603
14604         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
14605         btrace failed.
14606         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
14607         exception and use message in own exception.
14608
14609 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14610
14611         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
14612         (perf_event_pt_event_type): Use gdb_file_up.
14613         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
14614         scoped_fd, and scoped_mmap.
14615
14616 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14617
14618         * common/scoped_mmap.h: New.
14619         * unittests/scoped_mmap-selftest.c: New.
14620         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14621         unittests/scoped_mmap-selftest.c.
14622
14623 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14624
14625         * common/scoped_fd.h: New.
14626         * unittests/scoped_fd-selftest.c: New.
14627         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14628         unittests/scoped_fd-selftest.c.
14629
14630 2018-02-09  Tom Tromey  <tom@tromey.com>
14631
14632         * auto-load.c (auto_load_section_scripts): Use
14633         gdb::unique_xmalloc_ptr.
14634
14635 2018-02-09  Tom Tromey  <tom@tromey.com>
14636
14637         * auto-load.c (execute_script_contents): Use std::string.
14638
14639 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
14640
14641         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
14642         Python function, rather than a new command.
14643
14644 2018-02-08  Tom Tromey  <tom@tromey.com>
14645
14646         * solib.c (solib_find_1): Use std::string.
14647         (solib_bfd_fopen): Use unique_xmalloc_ptr.
14648
14649 2018-02-08  Tom Tromey  <tom@tromey.com>
14650
14651         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
14652
14653 2018-02-08  Tom Tromey  <tom@tromey.com>
14654
14655         * source.c (find_source_lines): Use gdb::def_vector.
14656
14657 2018-02-08  Tom Tromey  <tom@tromey.com>
14658
14659         * macrocmd.c (struct temporary_macro_definition): New.
14660         (macro_define_command): Use temporary_macro_definition.  Remove
14661         cleanups.
14662         (free_macro_definition_ptr): Remove.
14663
14664 2018-02-08  Tom Tromey  <tom@tromey.com>
14665
14666         * macroexp.c (maybe_expand): Use std::string.
14667
14668 2018-02-08  Tom Tromey  <tom@tromey.com>
14669
14670         * macroexp.c (struct macro_buffer): Add initializers for some
14671         members.
14672         (init_buffer, init_shared_buffer, free_buffer)
14673         (free_buffer_return_text): Remove.
14674         (macro_buffer): New constructors.
14675         (~macro_buffer): New destructor.
14676         (macro_buffer::set_shared): New method.
14677         (macro_buffer::resize_buffer, macro_buffer::appendc)
14678         (macro_buffer::appendmem): Now methods, not free functions.
14679         (set_token, append_tokens_without_splicing, stringify)
14680         (macro_stringify): Update.
14681         (gather_arguments): Change return type.  Remove argc_p argument,
14682         add args_ptr argument.  Use std::vector.
14683         (substitute_args): Remove argc argument.  Accept std::vector.
14684         (expand): Update.  Use std::vector.
14685         (scan, macro_expand, macro_expand_next): Update.
14686
14687 2018-02-08  Tom Tromey  <tom@tromey.com>
14688
14689         * symtab.c (default_collect_symbol_completion_matches_break_on):
14690         Use unique_xmalloc_ptr.
14691         * macroscope.h: (sal_macro_scope, user_macro_scope)
14692         (default_macro_scope): Return unique_xmalloc_ptr.
14693         * macroscope.c (sal_macro_scope, user_macro_scope)
14694         (default_macro_scope): Return unique_xmalloc_ptr.
14695         * macroexp.h (macro_expand, macro_expand_once): Return
14696         unique_xmalloc_ptr.
14697         * macroexp.c (macro_expand, macro_expand_once): Return
14698         unique_xmalloc_ptr.
14699         * macrocmd.c (macro_expand_command, macro_expand_once_command)
14700         (info_macro_command, info_macros_command): Use
14701         unique_xmalloc_ptr.
14702         * compile/compile-c-support.c (write_macro_definitions): Use
14703         unique_xmalloc_ptr.
14704         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
14705
14706 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
14707
14708         * value.c (value_static_field): Assign field type instead of
14709         containing type when returning an optimized out value.
14710
14711 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14712
14713         * ft32-tdep.c (ft32_read_pc): Remove.
14714         (ft32_write_pc): Remove.
14715         (ft32_gdbarch_init): Update.
14716         * m32r-tdep.c (m32r_read_pc): Remove.
14717         (m32r_gdbarch_init): Update.
14718         * mep-tdep.c (mep_read_pc): Remove.
14719         (mep_gdbarch_init): Update.
14720         * microblaze-tdep.c (microblaze_write_pc): Remove.
14721         (microblaze_gdbarch_init): Update.
14722         * mn10300-tdep.c (mn10300_read_pc): Remove.
14723         (mn10300_write_pc): Remove.
14724         (mn10300_gdbarch_init): Update.
14725         * moxie-tdep.c (moxie_read_pc): Remove.
14726         (moxie_write_pc): Remove.
14727         (moxie_gdbarch_init): Update.
14728
14729 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14730
14731         * expprint.c (print_subexp_standard): Handle
14732         OP_F77_UNDETERMINED_ARGLIST.
14733         (dump_subexp_body_standard): Likewise.
14734
14735 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
14736
14737         * target-descriptions.c (tdesc_element_visitor) Add empty
14738         implementations.
14739         (tdesc_type): Move make_gdb_type from here.
14740         (tdesc_type_builtin): Likewise.
14741         (tdesc_type_vector): Likewise.
14742         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14743         (make_gdb_type_struct): Move from tdesc_type_with_fields.
14744         (make_gdb_type_union): Likewise.
14745         (make_gdb_type_flags): Likewise.
14746         (make_gdb_type_enum): Likewise.
14747         (make_gdb_type): New function.
14748         (tdesc_register_type): Use static make_gdb_type.
14749
14750 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
14751
14752         * infcmd.c (default_print_one_register_info): Align natural-format
14753         column values consistently one under another.
14754         (pad_to_column): New function.
14755
14756 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
14757
14758         * dwarf2read.c (dwarf2_physname): Move commment.
14759
14760 2018-02-01  Leszek Swirski  <leszeks@google.com>
14761
14762         * varobj.c (varobj_formatted_print_options): Allow recursive
14763         pretty printing if pretty printing is enabled.
14764
14765 2018-02-01  Leszek Swirski  <leszeks@google.com>
14766
14767         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14768         names after a structop as a filename.
14769
14770 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14771
14772         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14773         (arm_record_coproc_data_proc): Likewise.
14774
14775 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14776
14777         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14778
14779 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
14780
14781         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14782         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14783
14784 2018-01-31  Pedro Alves  <palves@redhat.com>
14785
14786         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14787         * inflow.c (child_terminal_save_inferior): Wrap reference to
14788         tcgetpgrp in HAVE_TERMIOS_H.
14789         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14790         _WIN32.
14791         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14792         always iterate over all inferiors.
14793         (gdbsim_cntrl_c): Adjust.
14794         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14795
14796 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14797
14798         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14799         index type is objfile-owned if the element type is as well.
14800
14801 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14802
14803         GDB 8.1 released.
14804
14805 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14806
14807         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14808         "features/s390x-linux64.c".
14809         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14810         s390_linux32 and s390x_linux64.
14811         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14812         default tdesc.
14813         * s390-tdep.c: Include "features/s390-linux32.c" and
14814         "features/s390x-linux64.c".
14815         (s390_tdesc_valid): Add check for tdesc_has_registers.
14816         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14817         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14818         tdesc_s390x_linux64.
14819         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14820         tdesc_s390x_linux64 to...
14821         * s390-tdep.h: ...here.
14822
14823 2018-01-30  Pedro Alves  <palves@redhat.com>
14824
14825         PR gdb/13211
14826         * config.in, configure: Regenerate.
14827         * configure.ac: Check for getpgid.
14828         * go32-nat.c (go32_pass_ctrlc): New.
14829         (go32_target): Install it.
14830         * inf-child.c (inf_child_target): Install
14831         child_terminal_save_inferior, child_pass_ctrlc and
14832         child_interrupt.
14833         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14834         (inf_ptrace_target): No longer install it.
14835         * infcmd.c (interrupt_target_1): Adjust.
14836         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14837         (child_interrupt): Declare.
14838         (inferior::terminal_state): New.
14839         * inflow.c (struct terminal_info): Update comments.
14840         (inferior_process_group): Delete.
14841         (terminal_is_ours): Delete.
14842         (gdb_tty_state): New.
14843         (child_terminal_init): Adjust.
14844         (is_gdb_terminal, sharing_input_terminal_1)
14845         (sharing_input_terminal): New functions.
14846         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14847         Set the process's actual process group in the foreground if
14848         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14849         mark terminal as the inferior's if not sharing GDB's terminal.
14850         Don't check attach_flag.
14851         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14852         pass down a target_terminal_state.
14853         (child_terminal_save_inferior): New, factored out from ...
14854         (child_terminal_ours_1): ... this.  Handle
14855         target_terminal_state::is_ours_for_output.
14856         (child_interrupt, child_pass_ctrlc): New.
14857         (inflow_inferior_exit): Clear the inferior's terminal_state.
14858         (copy_terminal_info): Copy the inferior's terminal state.
14859         (_initialize_inflow): Remove reference to terminal_is_ours.
14860         * inflow.h (inferior_process_group): Delete.
14861         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14862         * procfs.c (procfs_target): Don't install procfs_interrupt.
14863         (procfs_interrupt): Delete.
14864         * remote.c (remote_serial_quit_handler): Adjust.
14865         (remote_interrupt): Remove ptid parameter.  Adjust.
14866         * target-delegates.c: Regenerate.
14867         * target.c: Include "terminal.h".
14868         (target_terminal::terminal_state): Rename to ...
14869         (target_terminal::m_terminal_state): ... this.
14870         (target_terminal::init): Adjust.
14871         (target_terminal::inferior): Adjust to per-inferior
14872         terminal_state.
14873         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14874         (target_terminal::ours, target_terminal::ours_for_output): Use
14875         target_terminal_is_ours_kind.
14876         (target_interrupt): Remove ptid parameter.  Adjust.
14877         (default_target_pass_ctrlc): Adjust.
14878         * target.h (target_ops::to_terminal_save_inferior): New field.
14879         (target_ops::to_interrupt): Remove ptid_t parameter.
14880         (target_interrupt): Remove ptid_t parameter.  Update comment.
14881         (target_pass_ctrlc): Update comment.
14882         * target/target.h (target_terminal_state): New scoped enum,
14883         factored out of ...
14884         (target_terminal::terminal_state): ... here.
14885         (target_terminal::inferior): Update comments.
14886         (target_terminal::restore_inferior): New.
14887         (target_terminal::is_inferior, target_terminal::is_ours)
14888         (target_terminal::is_ours_for_output): Adjust.
14889         (target_terminal::scoped_restore_terminal_state): Adjust to
14890         rename, and call restore_inferior() instead of inferior().
14891         (target_terminal::scoped_restore_terminal_state::m_state): Change
14892         type.
14893         (target_terminal::terminal_state): Rename to ...
14894         (target_terminal::m_terminal_state): ... this and change type.
14895
14896 2018-01-30  Pedro Alves  <palves@redhat.com>
14897
14898         * linux-nat.c (wait_for_signal): New function.
14899         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14900         directly.
14901         (async_terminal_is_ours)
14902         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14903         (linux_nat_add_target): Don't override
14904         to_terminal_inferior/to_terminal_ours.
14905
14906 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14907
14908         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14909
14910 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14911
14912         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14913         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14914         dwarf2_per_objfile_free here.
14915         (dwarf2_per_objfile_free): Remove.
14916         (_initialize_dwarf2_read): Don't register
14917         dwarf2_per_objfile_free as a registry cleanup.
14918
14919 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14920
14921         Avoid compilation errors in MinGW native builds
14922
14923         The error is triggered by including python-internal.h, and the
14924         error message is:
14925
14926              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14927                       from build-gnulib/import/math.h:27,
14928                       from d:/usr/Python26/include/pyport.h:235,
14929                       from d:/usr/Python26/include/Python.h:58,
14930                       from python/python-internal.h:94,
14931                       from python/py-arch.c:24:
14932              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14933         using ::hypot;
14934                 ^~~~~
14935
14936         This happens because Python headers define 'hypot' to expand t
14937         '_hypot' in the Windows builds.
14938         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14939         'hypoth'.  This avoids a compilation error.
14940
14941 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14942
14943         * MAINTAINERS (Write After Approval): Fix ordering.
14944
14945 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14946
14947         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14948
14949 2018-01-26  Alan Modra  <amodra@gmail.com>
14950
14951         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14952         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14953         Remove nop.  Make const.  Comment.
14954         (powerpc32_plt_stub_so_2): New.
14955         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14956         Correct count.  Update uses.
14957         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14958         Move common code reading PLT entry word.  Correct
14959         powerpc32_plt_stub PLT address calculation.
14960         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14961         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14962         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14963         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14964         (ppc64_standard_linkage8): Likewise.
14965         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14966         Correct insns description.
14967         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14968
14969 2018-01-24  Pedro Alves  <palves@redhat.com>
14970
14971         GCC PR libstdc++/83906
14972         * gdbtypes.c (operator==(const dynamic_prop &,
14973         const dynamic_prop &)): New.
14974         (operator==(const range_bounds &, const range_bounds &)): New.
14975         (check_types_equal): Use them instead of memcmp.
14976         * gdbtypes.h (operator==(const dynamic_prop &,
14977         const dynamic_prop &)): Declare.
14978         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14979         (operator==(const range_bounds &, const range_bounds &)): Declare.
14980         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14981
14982 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14983
14984         * s390-linux-tdep.c (s390_record_address_mask)
14985         (s390_record_calc_disp_common, s390_record_calc_disp)
14986         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14987         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14988         (s390_process_record): Move to s390-tdep.c.
14989         (s390_linux_init_abi_any): Adjust.
14990         * s390-tdep.c (s390_record_address_mask)
14991         (s390_record_calc_disp_common, s390_record_calc_disp)
14992         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14993         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14994         (s390_process_record): Moved from s390-linux-tdep.c
14995         (s390_gdbarch_init): Adjust.
14996
14997 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14998
14999         * s390-linux-nat.c (s390-tdep.h): New include.
15000         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15001         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15002         (ALLDEPFILES): Add s390-tdep.c.
15003         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15004         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15005         * s390-tdep.h: ...this.  New file.
15006         * s390-linux-tdep.c (s390-tdep.h): New include.
15007         (_initialize_s390_tdep): Rename to...
15008         (_initialize_s390_linux_tdep): ...this and adjust.
15009         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15010         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15011         s390-tdep.h.
15012         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15013         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15014         (s390_is_partial_instruction, s390_software_single_step)
15015         (is_non_branch_ril, s390_displaced_step_copy_insn)
15016         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15017         (s390_prologue_data, s390_addr, s390_store, s390_load)
15018         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15019         (s390_register_call_saved, s390_guess_tracepoint_registers)
15020         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15021         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15022         (s390_pseudo_register_name, s390_pseudo_register_type)
15023         (s390_pseudo_register_read, s390_pseudo_register_write)
15024         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15025         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15026         (s390_addr_bits_remove, s390_address_class_type_flags)
15027         (s390_address_class_type_flags_to_name)
15028         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15029         (s390_function_arg_float, s390_function_arg_vector)
15030         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15031         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15032         (s390_frame_align, s390_register_return_value, s390_return_value)
15033         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15034         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15035         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15036         (s390_trad_frame_prev_register, s390_unwind_cache)
15037         (s390_prologue_frame_unwind_cache)
15038         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15039         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15040         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15041         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15042         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15043         (s390_frame_base_address, s390_local_base_address)
15044         (s390_frame_base, s390_gcc_target_options)
15045         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15046         (s390_validate_reg_range, s390_tdesc_valid)
15047         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15048         * s390-tdep.c: ...this.  New file.
15049
15050 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15051
15052         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15053         (s390_process_record, s390_gdbarch_tdep_alloc)
15054         (s390_linux_init_abi_any): Use/set new hook.
15055
15056 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15057
15058         * s390-linux-tdep.c (osabi.h): New include.
15059         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15060         (s390_linux_init_abi_any): New functions.
15061         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15062
15063 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15064
15065         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15066         tdesc_has_registers check
15067
15068 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15069
15070         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15071         (s390_validate_reg_range): New macro.
15072         (s390_gdbarch_init): Adjust.
15073
15074 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15075
15076         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15077         (s390_gdbarch_tdep_alloc): Adjust.
15078         (s390_gdbarch_init): Adjust.
15079
15080 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15081
15082         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15083         <have_tdb>: Change type to bool.
15084         (s390_gdbarch_tdep_alloc): Adjust.
15085         (s390_gdbarch_init): Adjust.
15086
15087 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15088
15089         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15090         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15091         (s390_gdbarch_tdep_alloc): New function.
15092         (s390_gdbarch_init): Allocate tdep at start and use its fields
15093         instead of separate variables.
15094
15095 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15096
15097         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15098         when looking for cached gdbarch and add comment for remaining.
15099
15100 2018-01-22  Pedro Alves  <palves@redhat.com>
15101             Sergio Durigan Junior  <sergiodj@redhat.com>
15102
15103         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15104         case.
15105
15106 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15107
15108         * MAINTAINERS: Update my company e-mail address.
15109
15110 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15111
15112         * regcache.c (cooked_write_test): New function.
15113         (_initialize_regcache): Register the test.
15114
15115 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15116
15117         * ia64-tdep.c (ia64_pseudo_register_read): Call
15118         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15119         * m32c-tdep.c (m32c_cat_read): Likewise.
15120         (m32c_r3r2r1r0_read): Likewise.
15121         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15122         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15123
15124 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15125
15126         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15127         method raw_read instead of regcache_raw_read.
15128         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15129         * arm-tdep.c (arm_neon_quad_read): Likewise.
15130         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15131         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15132         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15133         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15134         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15135         (i386_pseudo_register_read_into_value): Likewise.
15136         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15137         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15138         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15139         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15140         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15141         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15142         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15143         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15144         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15145
15146 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15147
15148         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15149         * configure.tgt: Remove target mt.
15150         * mt-tdep.c: Remove.
15151         * regcache.c (cooked_read_test): Remove the check for mt.
15152
15153 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15154
15155         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15156         instead of gdbarch_pseudo_register_read_value.
15157
15158 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15159
15160         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15161         language is Ada.
15162
15163 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15164
15165         * linespec.c (create_sals_line_offset): Remove code that preserved
15166         the symtab_and_line's line number.
15167
15168 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15169
15170         * varobj.c (varobj_create): Don't set valid_block when creating a
15171         floating varobj.
15172
15173 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15174
15175         * varobj.c (varobj_create): Remove out of date comment.
15176
15177 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15178
15179         PR mi/20395
15180         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15181         updating innermost block.
15182         * parse.c (innermost_block_tracker::update): Take extra type
15183         parameter, and check types match before updating innermost block.
15184         (write_dollar_variable): Update innermost block for registers.
15185         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15186         (innermost_block_tracker::innermost_block_tracker): Initialise
15187         m_types member.
15188         (innermost_block_tracker::reset): Take type parameter.
15189         (innermost_block_tracker::update): Take type parameter, and pass
15190         type through as needed.
15191         (innermost_block_tracker::m_types): New member.
15192         * varobj.c (varobj_create): Pass type when reseting innermost
15193         block.
15194
15195 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15196
15197         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15198         * ada-lang.c (resolve_subexp): Likewise.
15199         * breakpoint.c (set_breakpoint_condition) Likewise.
15200         (watch_command_1) Likewise.
15201         * c-exp.y (variable): Likewise.
15202         * d-exp.y (PrimaryExpression): Likewise.
15203         * f-exp.y (variable): Likewise.
15204         * go-exp.y (variable): Likewise.
15205         * m2-exp.y (variable): Likewise.
15206         * objfiles.c (objfile::~objfile): Likewise.
15207         * p-exp.y (variable): Likewise.
15208         * parse.c (innermost_block): Change type.
15209         * parser-defs.h (class innermost_block_tracker): New.
15210         (innermost_block): Change to innermost_block_tracker.
15211         * printcmd.c (display_command): Switch to innermost_block API.
15212         (do_one_display): Likewise.
15213         * rust-exp.y (do_one_display): Likewise.
15214         * symfile.c (clear_symtab_users): Likewise.
15215         * varobj.c (varobj_create): Switch to innermost_block API, replace
15216         use of innermost_block with block stored on varobj object.
15217
15218 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15219
15220         * expression.h (innermost_block): Remove declaration.
15221         * varobj.c: Add 'parser-defs.h' include.
15222
15223 2018-01-19  Tom Tromey  <tom@tromey.com>
15224
15225         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15226         symbols in the static and global blocks.
15227
15228 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15229
15230         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15231         gdb_ptrace.h, and move including gdb_wait.h ...
15232         * nat/linux-ptrace.h: ... to here.
15233
15234 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15235
15236         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15237         inf_ptrace_detach_success.
15238         (inf_ptrace_detach_success): Add inferior parameter, use it
15239         instead of inferior_ptid, pass it to detach_inferior.
15240         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15241         parameter.
15242         * inferior.c (detach_inferior): Add overload that takes an
15243         inferior object.
15244         * inferior.h (detach_inferior): Likewise.
15245         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15246         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15247         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15248
15249 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15250
15251         * target.h (struct target_ops) <to_detach>: Add inferior
15252         parameter.
15253         (target_detach): Likewise.
15254         * target.c (dispose_inferior): Pass inferior down.
15255         (target_detach): Pass inferior down.  Assert that it is equal to
15256         the current inferior.
15257         * aix-thread.c (aix_thread_detach): Pass inferior down.
15258         * corefile.c (core_file_command): Pass current_inferior() down.
15259         * corelow.c (core_detach): Add inferior parameter.
15260         * darwin-nat.c (darwin_detach): Likewise.
15261         * gnu-nat.c (gnu_detach): Likewise.
15262         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15263         * infcmd.c (detach_command): Pass current_inferior() down to
15264         target_detach.
15265         * infrun.c (follow_fork_inferior): Pass parent_inf to
15266         target_detach.
15267         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15268         target_detach.
15269         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15270         * linux-thread-db.c (thread_db_detach): Likewise.
15271         * nto-procfs.c (procfs_detach): Likewise.
15272         * procfs.c (procfs_detach): Likewise.
15273         * record.c (record_detach): Likewise.
15274         * record.h (struct inferior): Forward-declare.
15275         (record_detach): Add inferior parameter.
15276         * remote-sim.c (gdbsim_detach): Likewise.
15277         * remote.c (remote_detach_1): Likewise.
15278         (remote_detach): Likewise.
15279         (extended_remote_detach): Likewise.
15280         * sol-thread.c (sol_thread_detach): Likewise.
15281         * target-debug.h (target_debug_print_inferior_p): New macro.
15282         * target-delegates.c: Re-generate.
15283         * top.c (kill_or_detach): Pass inferior down to target_detach.
15284         * windows-nat.c (windows_detach): Add inferior parameter.
15285
15286 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15287
15288         * target.h (struct target_ops) <to_detach>: Remove args
15289         parameter.
15290         (target_detach): Likewise.
15291         * target.c (dispose_inferior): Adjust.
15292         (target_detach): Remove args parameter, adjust.
15293         * aix-thread.c (aix_thread_detach): Adjust.
15294         * corefile.c (core_file_command): Adjust.
15295         * corelow.c (core_detach): Adjust.
15296         * darwin-nat.c (darwin_detach): Adjust.
15297         * gnu-nat.c (gnu_detach): Adjust.
15298         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15299         * infcmd.c (detach_command): Adjust
15300         * infrun.c (follow_fork_inferior): Adjust.
15301         (handle_vfork_child_exec_or_exit): Adjust.
15302         * linux-fork.c (linux_fork_detach): Remove args parameter.
15303         * linux-fork.h (linux_fork_detach): Likewise.
15304         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15305         * linux-thread-db.c (thread_db_detach): Likewise.
15306         * nto-procfs.c (procfs_detach): Likewise.
15307         * procfs.c (procfs_detach): Likewise.
15308         (do_detach): Remove signo parameter.
15309         * record.c (record_detach): Remove args parameter.
15310         * record.h (record_detach): Likewise.
15311         * remote-sim.c (gdbsim_detach): Likewise.
15312         * remote.c (remote_detach_1): Likewise.
15313         (remote_detach): Likewise.
15314         (extended_remote_detach): Likewise.
15315         * sol-thread.c (sol_thread_detach): Likewise.
15316         * target-delegates.c: Re-generate.
15317         * top.c (struct qt_args) <args>: Remove field.
15318         (kill_or_detach): Don't pass args.
15319         (quit_force): Don't set args.
15320         * windows-nat.c (windows_detach): Remove args parameter.
15321
15322 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15323
15324         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15325         (arm_linux_init_abi): Install it.
15326
15327 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15328
15329         * osabi.c (gdb_osabi_names): Extend the regexp for
15330         arm-linux-gnueabihf.
15331
15332 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15333
15334         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15335         m_abbrevs.
15336         (abbrev_table::add_abbrev): Update.
15337         (abbrev_table::lookup_abbrev): Update.
15338
15339 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15340
15341         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15342
15343 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15344
15345         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15346         to "std::string".
15347
15348 2018-01-17  Tom Tromey  <tom@tromey.com>
15349
15350         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15351
15352 2018-01-17  Tom Tromey  <tom@tromey.com>
15353
15354         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15355         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15356         (create_array_type_with_stride): Update.
15357         * dwarf2read.c (set_die_type): Update.
15358
15359 2018-01-17  Tom Tromey  <tom@tromey.com>
15360
15361         * dwarf2read.c (delayed_method_info): Remove typedef.
15362         (dwarf2_cu::method_info): Now a std::vector.
15363         (add_to_method_list): Update.
15364         (free_delayed_list): Remove.
15365         (compute_delayed_physnames): Update.
15366         (process_full_comp_unit, process_full_type_unit): Clear the method
15367         list.  Remove cleanups.
15368         (psymtab_include_file_name): Add name_holder parameter.  Use
15369         unique_xmalloc_ptr.
15370         (dwarf_decode_lines): Update.
15371
15372 2018-01-17  Tom Tromey  <tom@tromey.com>
15373             Simon Marchi  <simon.marchi@ericsson.com>
15374
15375         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15376         (dwarf2_per_objfile::free_cached_comp_units)
15377         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15378         (init_cutu_and_read_dies_no_follow): Update.
15379         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15380         (dwarf2_cu::~dwarf2_cu): New.
15381         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15382         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15383
15384 2018-01-17  Tom Tromey  <tom@tromey.com>
15385             Simon Marchi  <simon.marchi@ericsson.com>
15386
15387         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15388         (struct die_reader_specs) <abbrev_table>: New member.
15389         (struct abbrev_table): Add constructor.
15390         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15391         <abbrev_obstack>: Now an auto_obstack.
15392         (abbrev_table_up): New typedef.
15393         (init_cu_die_reader): Add abbrev_table parameter.
15394         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15395         Add result_dwo_abbrev_table.
15396         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15397         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15398         Update.
15399         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15400         parameter.
15401         (skip_children): Update.
15402         (abbrev_table::alloc_abbrev): Rename from
15403         abbrev_table_alloc_abbrev.
15404         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15405         (abbrev_table::lookup_abbrev): Rename from
15406         abbrev_table_lookup_abbrev.
15407         (abbrev_table_read_table): Return abbrev_table_up.
15408         (abbrev_table_free, abbrev_table_free_cleanup)
15409         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15410         (load_partial_dies): Update.
15411
15412 2018-01-17  Tom Tromey  <tom@tromey.com>
15413
15414         * dwarf2read.c (dwarf2_compute_name): Update comment.
15415         (read_func_scope, read_variable): Update.
15416         (new_symbol): Remove.
15417         (new_symbol_full): Rename to new_symbol.
15418
15419 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
15420
15421         PR gdb/16577
15422         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15423         a warning instead of throwing an error, set section size to 0 and return
15424         NULL.
15425         * gdb_bfd.h (gdb_bfd_map_section): Update description.
15426
15427 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15428
15429         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15430         std::string.
15431         (linux_ptrace_attach_fail_reason_string): Likewise.
15432         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15433         Likewise.
15434         (linux_ptrace_attach_fail_reason_string): Likewise.
15435         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15436
15437 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15438
15439         * linux-nat.c (linux_nat_attach): Remove xstrdup.
15440
15441 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
15442
15443         PR gdb/21559
15444         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15445         checking for fs_base/gs_base fields in struct user_regs_struct.
15446         * configure: Regenerate.
15447
15448 2018-01-17  Yao Qi  <yao.qi@linaro.org>
15449
15450         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
15451         function.
15452         (aarch64_linux_init_abi): Install it to gdbarch hook
15453         gcc_target_options.
15454
15455 2018-01-15  Pedro Alves  <palves@redhat.com>
15456
15457         * common/signals-state-save-restore.c
15458         (save_original_signals_state): Fix typos.
15459
15460 2017-01-12  Tom Tromey  <tom@tromey.com>
15461             Sergio Durigan Junior  <sergiodj@redhat.com>
15462
15463         * Makefile.in (install-only): Install gdb-add-index.
15464
15465 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
15466
15467         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
15468
15469 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15470
15471         * infrun.c (keep_going_pass_signal): Clear step-over info when
15472         insert_breakpoints fails.
15473
15474 2018-01-11  Pedro Alves  <palves@redhat.com>
15475
15476         PR gdb/22583
15477         * infrun.c (resume): Rename to ...
15478         (resume_1): ... this.
15479         (resume): Reimplement as wrapper around resume_1.
15480
15481 2018-01-11  Pedro Alves  <palves@redhat.com>
15482
15483         PR remote/22597
15484         * remote.c (remote_parse_stop_reply): Default to the last-set
15485         general thread instead of to 'magic_null_ptid'.
15486
15487 2018-01-10  Pedro Alves  <palves@redhat.com>
15488
15489         * language.h (language_get_symbol_name_matcher): Rename ...
15490         (get_symbol_name_matcher): ... this.
15491         * language.c (language_get_symbol_name_matcher): Ditto.
15492         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
15493         callers adjusted.
15494
15495 2018-01-10  Pedro Alves  <palves@redhat.com>
15496
15497         PR gdb/22670
15498         * dwarf2read.c
15499         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
15500         Adjust to use language_get_symbol_name_matcher instead of
15501         language_defn::la_get_symbol_name_matcher.
15502         * language.c (language_get_symbol_name_matcher): If in Ada mode
15503         and the lookup name is a verbatim match, return Ada's matcher.
15504         * language.h (language_get_symbol_name_matcher): Adjust comment.
15505         (ada_lookup_name_info::verbatim_p):: New method.
15506
15507 2018-01-10  Pedro Alves  <palves@redhat.com>
15508
15509         PR gdb/22670
15510         * ada-lang.c (ada_collect_symbol_completion_matches): If the
15511         minsym's language is language_auto or language_cplus, pass down
15512         language_ada instead.
15513         * symtab.c (compare_symbol_name): Don't frob symbol language here.
15514
15515 2018-01-10  Pedro Alves  <palves@redhat.com>
15516
15517         PR gdb/22670
15518         * minsyms.c (linkage_name_str): New function.
15519         (iterate_over_minimal_symbols): Use it.
15520
15521 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15522
15523         * NEWS: Document that 'info proc' now works on FreeBSD.
15524
15525 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15526
15527         * configure.ac: Check for kinfo_getfile in libutil.
15528         * configure: Regenerate.
15529         * config.in: Regenerate.
15530         * fbsd-nat.c: Include "fbsd-tdep.h".
15531         (fbsd_fetch_cmdline): New.
15532         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
15533         rather than calling error.
15534         (fbsd_info_proc): New.
15535         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
15536         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
15537         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
15538
15539 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15540
15541         * fbsd-nat.c (struct free_deleter): Remove.
15542         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
15543
15544 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15545
15546         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
15547         NULL for an empty pathname.
15548
15549 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15550
15551         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
15552         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
15553         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
15554         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
15555         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
15556         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
15557         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
15558         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
15559         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
15560         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
15561         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
15562         (fbsd_core_fetch_timeval, fbsd_print_sigset)
15563         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
15564         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
15565         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
15566
15567 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
15568
15569         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
15570         (gnu_xfer_auxv): New function.
15571         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
15572         TARGET_OBJECT_AUXV.
15573
15574 2018-01-08  Yao Qi  <yao.qi@linaro.org>
15575             Simon Marchi  <simon.marchi@ericsson.com>
15576
15577         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
15578         common/selftest.c.
15579         (COMMON_OBS): Remove selftest.o.
15580         * configure.ac: Append selftest-arch.c and common/selftest.c to
15581         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
15582         * configure: Re-generated.
15583         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
15584         GDB_SELF_TEST.
15585         (maintenance_info_selftests): Likewise.
15586
15587 2018-01-08  Xavier Roirand  <roirand@adacore.com>
15588
15589         * ada-valprint.c (val_print_packed_array_elements): Use
15590         proper number of elements when printing an array indexed
15591         by an enumeration type.
15592
15593 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15594
15595         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
15596         (dw2_get_file_names_reader): Adjust.
15597         (lookup_dwo_signatured_type): Adjust.
15598         (lookup_dwp_signatured_type): Adjust.
15599         (lookup_signatured_type): Adjust.
15600         (create_type_unit_group): Adjust.
15601         (get_type_unit_group): Adjust.
15602         (process_psymtab_comp_unit_reader): Adjust.
15603         (build_type_psymtabs_reader): Adjust.
15604         (scan_partial_symbols): Adjust.
15605         (add_partial_symbol): Adjust.
15606         (add_partial_subprogram): Adjust.
15607         (peek_die_abbrev): Adjust.
15608         (fixup_go_packaging): Adjust.
15609         (process_imported_unit_die): Adjust.
15610         (dwarf2_compute_name): Adjust.
15611         (dwarf2_physname): Adjust.
15612         (read_import_statement): Adjust.
15613         (handle_DW_AT_stmt_list): Adjust.
15614         (read_file_scope): Adjust.
15615         (read_func_scope): Adjust.
15616         (read_lexical_block_scope): Adjust.
15617         (read_call_site_scope): Adjust.
15618         (read_variable): Adjust.
15619         (dwarf2_rnglists_process): Adjust.
15620         (dwarf2_ranges_process): Adjust.
15621         (dwarf2_ranges_read): Adjust.
15622         (dwarf2_get_pc_bounds): Adjust.
15623         (dwarf2_record_block_ranges): Adjust.
15624         (dwarf2_add_field): Adjust.
15625         (dwarf2_add_member_fn): Adjust.
15626         (read_structure_type): Adjust.
15627         (process_structure_scope): Adjust.
15628         (read_enumeration_type): Adjust.
15629         (read_array_type): Adjust.
15630         (mark_common_block_symbol_computed): Adjust.
15631         (read_common_block): Adjust.
15632         (read_namespace_type): Adjust.
15633         (read_namespace): Adjust.
15634         (read_module_type): Adjust.
15635         (read_tag_pointer_type): Adjust.
15636         (read_tag_ptr_to_member_type): Adjust.
15637         (read_tag_string_type): Adjust.
15638         (read_subroutine_type): Adjust.
15639         (read_typedef): Adjust.
15640         (read_base_type): Adjust.
15641         (attr_to_dynamic_prop): Adjust.
15642         (read_subrange_type): Adjust.
15643         (read_unspecified_type): Adjust.
15644         (dwarf2_read_abbrevs): Adjust.
15645         (load_partial_dies): Adjust.
15646         (read_partial_die): Adjust.
15647         (find_partial_die): Adjust.
15648         (guess_partial_die_structure_name): Adjust.
15649         (fixup_partial_die): Adjust.
15650         (read_attribute_value): Adjust.
15651         (read_addr_index): Adjust.
15652         (read_addr_index_from_leb128): Adjust.
15653         (read_str_index): Adjust.
15654         (dwarf2_string_attr): Adjust.
15655         (get_debug_line_section): Adjust.
15656         (dwarf_decode_line_header): Adjust.
15657         (lnp_state_machine::check_line_address): Adjust.
15658         (dwarf_decode_lines_1): Adjust.
15659         (dwarf_decode_lines): Adjust.
15660         (dwarf2_start_symtab): Adjust.
15661         (var_decode_location): Adjust.
15662         (new_symbol_full): Adjust.
15663         (dwarf2_const_value_data): Adjust.
15664         (dwarf2_const_value_attr): Adjust.
15665         (dwarf2_const_value): Adjust.
15666         (die_type): Adjust.
15667         (die_containing_type): Adjust.
15668         (build_error_marker_type): Adjust.
15669         (lookup_die_type): Adjust.
15670         (guess_full_die_structure_name): Adjust.
15671         (anonymous_struct_prefix): Adjust.
15672         (determine_prefix): Adjust.
15673         (dwarf2_name): Adjust.
15674         (follow_die_ref_or_sig): Adjust.
15675         (follow_die_offset): Adjust.
15676         (follow_die_ref): Adjust.
15677         (follow_die_sig_1): Adjust.
15678         (follow_die_sig): Adjust.
15679         (get_signatured_type): Adjust.
15680         (get_DW_AT_signature_type): Adjust.
15681         (decode_locdesc): Adjust.
15682         (dwarf_decode_macros): Adjust.
15683         (cu_debug_loc_section): Adjust.
15684         (fill_in_loclist_baton): Adjust.
15685         (dwarf2_symbol_mark_computed): Adjust.
15686         (init_one_comp_unit): Don't assign
15687         dwarf2_cu::dwarf2_per_objfile.
15688         (set_die_type): Adjust.
15689
15690 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15691
15692         * dwarf2read.c (struct mapped_debug_names): Add constructor.
15693         <dwarf2_per_objfile>: New field.
15694         (dwarf2_per_objfile): Remove global.
15695         (get_dwarf2_per_objfile): New function.
15696         (set_dwarf2_per_objfile): New function.
15697         (dwarf2_build_psymtabs_hard): Change objfile parameter to
15698         dwarf2_per_objfile.
15699         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15700         (read_abbrev_offset): Likewise.
15701         (read_indirect_string): Likewise.
15702         (read_indirect_line_string): Likewise.
15703         (read_indirect_string_at_offset): Likewise.
15704         (read_indirect_string_from_dwz): Likewise.
15705         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15706         dwarf2_per_objfile.
15707         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15708         (create_all_comp_units): Change objfile parameter to
15709         dwarf2_per_objfile.
15710         (create_all_type_units): Likewise.
15711         (process_queue): Add dwarf2_per_objfile parameter.
15712         (read_and_check_comp_unit_head): Likewise.
15713         (lookup_dwo_unit_in_dwp): Likewise.
15714         (get_dwp_file): Likewise.
15715         (process_cu_includes): Likewise.
15716         (struct free_dwo_file_cleanup_data): New struct.
15717         (dwarf2_has_info): Use get_dwarf2_per_objfile and
15718         set_dwarf2_per_objfile.
15719         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
15720         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
15721         context, adjust calls.
15722         (dw2_instantiate_symtab): Likewise.
15723         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15724         (dw2_get_cu): Likewise.
15725         (create_cu_from_index_list): Change objfile parameter to
15726         dwarf2_per_objfile.
15727         (create_cus_from_index_list): Get dwarf2_per_objfile from
15728         context, adjust calls.
15729         (create_cus_from_index): Likewise.
15730         (create_signatured_type_table_from_index): Change objfile
15731         parameter to dwarf2_per_objfile.
15732         (create_signatured_type_table_from_debug_names): Change objfile
15733         parameter to dwarf2_per_objfile.
15734         (create_addrmap_from_index): Likewise.
15735         (create_addrmap_from_aranges): Likewise.
15736         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15737         (dw2_setup): Remove.
15738         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15739         context.
15740         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15741         get_dwarf2_per_objfile.
15742         (dw2_forget_cached_source_info): Likewise.
15743         (dw2_map_symtabs_matching_filename): Likewise.
15744         (struct dw2_symtab_iterator) <index>: Remove.
15745         <dwarf2_per_objfile>: New field.
15746         (dw2_symtab_iter_init): Replace index parameter with
15747         dwarf2_per_objfile.
15748         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15749         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15750         (dw2_print_stats): Likewise.
15751         (dw2_dump): Likewise.
15752         (dw2_expand_symtabs_for_function): Likewise.
15753         (dw2_expand_all_symtabs): Likewise.
15754         (dw2_expand_symtabs_with_fullname): Likewise.
15755         (dw2_expand_marked_cus): Replace index and objfile parameters
15756         with dwarf2_per_objfile.
15757         (dw_expand_symtabs_matching_file_matcher): Add
15758         dwarf2_per_objfile parameter and adjust calls.
15759         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15760         adjust calls.
15761         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15762         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15763         adjust calls.
15764         (create_cus_from_debug_names_list): Replace objfile parameter
15765         with dwarf2_per_objfile and adjust calls.
15766         (create_cus_from_debug_names): Likewise.
15767         (dwarf2_read_debug_names): Likewise.
15768         (mapped_debug_names::namei_to_name): Adjust call.
15769         (dw2_debug_names_iterator::next): Likewise.
15770         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15771         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15772         (dw2_debug_names_dump): Likewise.
15773         (dw2_debug_names_expand_symtabs_for_function): Likewise.
15774         (dw2_debug_names_expand_symtabs_matching): Likewise.
15775         (dwarf2_initialize_objfile): Likewise.
15776         (dwarf2_build_psymtabs): Likewise.
15777         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15778         this_cu.
15779         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15780         (read_and_check_comp_unit_head): Likewise.
15781         (read_abbrev_offset): Likewise.
15782         (create_debug_type_hash_table): Likewise.
15783         (create_debug_types_hash_table): Likewise.
15784         (create_all_type_units): Replace objfile parameter with
15785         dwarf2_per_objfile.
15786         (add_type_unit): Add dwarf2_per_objfile parameter.
15787         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15788         with dwarf2_per_objfile.
15789         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15790         (lookup_dwp_signatured_type): Likewise.
15791         (lookup_signatured_type): Likewise.
15792         (read_cutu_die_from_dwo): Likewise.
15793         (init_tu_and_read_dwo_dies): Likewise.
15794         (init_cutu_and_read_dies): Likewise.
15795         (init_cutu_and_read_dies_no_follow): Likewise.
15796         (allocate_type_unit_groups_table): Add objfile parameter.
15797         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15798         (get_type_unit_group): Likewise.
15799         (process_psymtab_comp_unit): Update call.
15800         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15801         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15802         (print_tu_stats): Likewise.
15803         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15804         in void* parameter.
15805         (build_type_psymtabs): Change objfile parameter to
15806         dwarf2_per_objfile.
15807         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15808         passed in void* parameter.
15809         (process_skeletonless_type_units): Change objfile parameter to
15810         dwarf2_per_objfile.
15811         (set_partial_user): Likewise.
15812         (dwarf2_build_psymtabs_hard): Likewise.
15813         (read_comp_units_from_section): Likewise.
15814         (create_all_comp_units): Likewise.
15815         (scan_partial_symbols): Update calls.
15816         (add_partial_symbol): Likewise.
15817         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15818         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15819         (process_queue): Add dwarf2_per_objfile parameter.
15820         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15821         (compute_compunit_symtab_includes): Likewise.
15822         (process_cu_includes): Add dwarf2_per_objfile parameter.
15823         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15824         (process_full_type_unit): Likewise.
15825         (process_imported_unit_die): Update call.
15826         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15827         (read_file_scope): Likewise.
15828         (allocate_dwo_file_hash_table): Add objfile parameter.
15829         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15830         (create_cus_hash_table): Likewise.
15831         (create_dwp_hash_table): Likewise.
15832         (create_dwo_unit_in_dwp_v1): Likewise.
15833         (create_dwp_v2_section): Likewise.
15834         (create_dwo_unit_in_dwp_v2): Likewise.
15835         (lookup_dwo_unit_in_dwp): Likewise.
15836         (try_open_dwop_file): Likewise.
15837         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15838         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15839         cleanup to include a reference to dwarf2_per_objfile.
15840         (open_dwp_file): Add dwarf2_per_objfile parameter.
15841         (open_and_init_dwp_file): Likewise.
15842         (get_dwp_file): Likewise.
15843         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15844         (queue_and_load_all_dwo_tus): Update call.
15845         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15846         data.
15847         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15848         (dwarf2_ranges_process): Likewise.
15849         (dwarf2_get_pc_bounds): Likewise.
15850         (mark_common_block_symbol_computed): Likewise.
15851         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15852         (dwarf2_read_abbrevs): Update call.
15853         (read_partial_die): Use dwarf2_per_objfile from cu.
15854         (find_partial_die): Likewise.
15855         (fixup_partial_die): Likewise.
15856         (read_attribute_value): Likewise.
15857         (read_indirect_string_at_offset_from): Add objfile parameter.
15858         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15859         parameter.
15860         (read_indirect_string_from_dwz): Add objfile parameter.
15861         (read_indirect_string): Add objfile parameter.
15862         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15863         (read_addr_index): Use dwarf2_per_objfile from cu.
15864         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15865         call dw2_setup.
15866         (read_str_index): Use dwarf2_per_objfile from cu.
15867         (get_debug_line_section): Likewise.
15868         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15869         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15870         (new_symbol_full): Use dwarf2_per_objfile from cu.
15871         (build_error_marker_type): Likewise.
15872         (lookup_die_type): Likewise.
15873         (determine_prefix): Likewise.
15874         (follow_die_offset): Likewise.
15875         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15876         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15877         (dwarf2_fetch_die_type_sect_off): Likewise.
15878         (dwarf2_get_die_type): Likewise.
15879         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15880         (get_signatured_type): Likewise.
15881         (get_DW_AT_signature_type): Likewise.
15882         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15883         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15884         (cu_debug_loc_section): Likewise.
15885         (fill_in_loclist_baton): Likewise.
15886         (dwarf2_symbol_mark_computed): Likewise.
15887         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15888         dwarf2_per_objfile.
15889         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15890         parameter.
15891         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15892         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15893         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15894         (set_die_type): Use dwarf2_free_objfile from cu.
15895         (get_die_type_at_offset): Likewise.
15896         (dwarf2_per_objfile_free): Don't assign global variable.
15897         (debug_names) <constructor>: Add dwarf2_per_objfile
15898         parameter, update m_debugstrlookup construction.
15899         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15900         parameter.
15901         <m_dwarf2_per_objfile>: New field.
15902         <lookup>: Use m_dwarf2_per_objfile.
15903         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15904         (psyms_seen_size): Likewise.
15905         (write_gdbindex): Replace objfile parameter with
15906         dwarf2_per_objfile.
15907         (write_debug_names): Likewise.
15908         (write_psymtabs_to_index): Likewise.
15909         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15910         calls.
15911
15912 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15913
15914         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15915         <dwarf2_per_objfile>: New field.
15916         (struct dwarf2_per_cu_data) <objfile>: Remove.
15917         <dwarf2_per_objfile>: New field.
15918         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15919         of objfile.
15920         (create_signatured_type_table_from_index): Likewise.
15921         (create_debug_type_hash_table): Likewise.
15922         (fill_in_sig_entry_from_dwo_entry): Likewise.
15923         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15924         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15925         objfile.
15926         (create_partial_symtab): Access objfile through
15927         dwarf2_per_objfile.
15928         (process_psymtab_comp_unit_reader): Likewise.
15929         (read_comp_units_from_section): Likewise.
15930         (scan_partial_symbols): Likewise.
15931         (add_partial_symbol): Likewise.
15932         (add_partial_subprogram): Likewise.
15933         (peek_die_abbrev): Likewise.
15934         (fixup_go_packaging): Likewise.
15935         (process_full_comp_unit): Likewise.
15936         (process_full_type_unit): Likewise.
15937         (process_imported_unit_die): Likewise.
15938         (dwarf2_compute_name): Likewise.
15939         (dwarf2_physname): Likewise.
15940         (read_import_statement): Likewise.
15941         (create_cus_hash_table): Assign dwarf2_physname instead of
15942         objfile.
15943         (read_func_scope): Access objfile through dwarf2_per_objfile.
15944         (read_lexical_block_scope): Likewise.
15945         (read_call_site_scope): Likewise.
15946         (read_variable): Likewise.
15947         (dwarf2_rnglists_process): Likewise.
15948         (dwarf2_ranges_process): Likewise.
15949         (dwarf2_ranges_read): Likewise.
15950         (dwarf2_record_block_ranges): Likewise.
15951         (dwarf2_add_field): Likewise.
15952         (dwarf2_add_member_fn): Likewise.
15953         (read_structure_type): Likewise.
15954         (process_structure_scope): Likewise.
15955         (read_enumeration_type): Likewise.
15956         (read_array_type): Likewise.
15957         (read_common_block): Likewise.
15958         (read_namespace_type): Likewise.
15959         (read_namespace): Likewise.
15960         (read_module_type): Likewise.
15961         (read_tag_pointer_type): Likewise.
15962         (read_tag_ptr_to_member_type): Likewise.
15963         (read_tag_string_type): Likewise.
15964         (read_subroutine_type): Likewise.
15965         (read_typedef): Likewise.
15966         (read_base_type): Likewise.
15967         (attr_to_dynamic_prop): Likewise.
15968         (read_subrange_type): Likewise.
15969         (read_unspecified_type): Likewise.
15970         (load_partial_dies): Likewise.
15971         (read_partial_die): Likewise.
15972         (find_partial_die): Likewise.
15973         (guess_partial_die_structure_name): Likewise.
15974         (fixup_partial_die): Likewise.
15975         (read_attribute_value): Likewise.
15976         (read_addr_index_from_leb128): Likewise.
15977         (dwarf2_read_addr_index): Likewise.
15978         (dwarf2_string_attr): Likewise.
15979         (lnp_state_machine::check_line_address): Likewise.
15980         (dwarf_decode_lines_1): Likewise.
15981         (dwarf_decode_lines): Likewise.
15982         (dwarf2_start_symtab): Likewise.
15983         (var_decode_location): Likewise.
15984         (new_symbol_full): Likewise.
15985         (dwarf2_const_value_data): Likewise.
15986         (dwarf2_const_value_attr): Likewise.
15987         (dwarf2_const_value): Likewise.
15988         (die_type): Likewise.
15989         (die_containing_type): Likewise.
15990         (lookup_die_type): Likewise.
15991         (guess_full_die_structure_name): Likewise.
15992         (anonymous_struct_prefix): Likewise.
15993         (dwarf2_name): Likewise.
15994         (follow_die_ref_or_sig): Likewise.
15995         (follow_die_offset): Likewise.
15996         (follow_die_ref): Likewise.
15997         (dwarf2_fetch_die_loc_sect_off): Likewise.
15998         (dwarf2_fetch_constant_bytes): Likewise.
15999         (dwarf2_fetch_die_type_sect_off): Likewise.
16000         (dwarf2_get_die_type): Likewise.
16001         (follow_die_sig): Likewise.
16002         (decode_locdesc): Likewise.
16003         (dwarf2_per_cu_objfile): Likewise.
16004         (dwarf2_per_cu_text_offset): Likewise.
16005         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16006         objfile.
16007         (set_die_type): Access objfile through
16008         dwarf2_per_objfile.
16009
16010 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16011
16012         * valprint.c (converted_character_d): Remove typedef.
16013         (DEF_VEC_O (converted_character_d)): Remove.
16014         (count_next_character): Use std::vector.
16015         (print_converted_chars_to_obstack): Likewise.
16016         (generic_printstr): Likewise.
16017
16018 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16019
16020         * xml-support.h (struct gdb_xml_value): Add constructor.
16021         <value>: Change type to unique_xmalloc_ptr.
16022         (gdb_xml_value_s): Remove typedef.
16023         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16024         (gdb_xml_element_start_handler): Change parameter type to
16025         std::vector.
16026         (xml_find_attribute): Likewise.
16027         * xml-support.c (xml_find_attribute): Change parameter type to
16028         std::vector and adjust.
16029         (gdb_xml_values_cleanup): Remove.
16030         (gdb_xml_parser::start_element): Adjust to std::vector.
16031         (xinclude_start_include): Change paraeter type to std::vector
16032         and adjust.
16033         * btrace.c (check_xml_btrace_version): Likewise.
16034         (parse_xml_btrace_block): Likewise.
16035         (parse_xml_btrace_pt_config_cpu): Likewise.
16036         (parse_xml_btrace_pt): Likewise.
16037         (parse_xml_btrace_conf_bts): Likewise.
16038         (parse_xml_btrace_conf_pt): Likewise.
16039         * memory-map.c (memory_map_start_memory): Likewise.
16040         (memory_map_start_property): Likewise.
16041         * osdata.c (osdata_start_osdata): Likewise.
16042         (osdata_start_item): Likewise.
16043         (osdata_start_column): Likewise.
16044         * remote.c (start_thread): Likewise.
16045         * solib-aix.c (library_list_start_library): Likewise.
16046         (library_list_start_list): Likewise.
16047         * solib-svr4.c (library_list_start_library): Likewise.
16048         (svr4_library_list_start_list): Likewise.
16049         * solib-target.c (library_list_start_segment): Likewise.
16050         (library_list_start_section): Likewise.
16051         (library_list_start_library): Likewise.
16052         (library_list_start_list): Likewise.
16053         * tracepoint.c (traceframe_info_start_memory): Likewise.
16054         (traceframe_info_start_tvar): Likewise.
16055         * xml-syscall.c (syscall_start_syscall): Likewise.
16056         * xml-tdesc.c (tdesc_start_target): Likewise.
16057         (tdesc_start_feature): Likewise.
16058         (tdesc_start_reg): Likewise.
16059         (tdesc_start_union): Likewise.
16060         (tdesc_start_struct): Likewise.
16061         (tdesc_start_flags): Likewise.
16062         (tdesc_start_enum): Likewise.
16063         (tdesc_start_field): Likewise.
16064         (tdesc_start_enum_value): Likewise.
16065         (tdesc_start_vector): Likewise.
16066
16067 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16068
16069         * extension.h (struct xmethod_worker) <clone>: Remove.
16070         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16071         Remove.
16072         (python_xmethod_worker::clone): Remove.
16073         * valops.c (find_overload_match): Use std::move instead of
16074         clone.
16075
16076 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16077
16078         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16079         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16080         <free_xmethod_worker_data>: Remove.
16081         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16082         <get_xmethod_arg_types>: Remove.
16083         <get_xmethod_result_type>: Remove.
16084         <invoke_xmethod>: Remove.
16085         * extension.c (new_xmethod_worker): Remove.
16086         (clone_xmethod_worker): Remove.
16087         (get_matching_xmethod_workers): Return void, pass std::vector by
16088         pointer.
16089         (get_xmethod_arg_types): Rename to...
16090         (xmethod_worker::get_arg_types): ... this, and adjust.
16091         (get_xmethod_result_type): Rename to...
16092         (xmethod_worker::get_result_type): ... this, and adjust.
16093         (invoke_xmethod): Remove.
16094         (free_xmethod_worker): Remove.
16095         (free_xmethod_worker_vec): Remove.
16096         * extension.h (enum ext_lang_rc): Move here from
16097         extension-priv.h.
16098         (struct xmethod_worker): Add constructor and destructor.
16099         <data>: Remove.
16100         <value>: Remove.
16101         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16102         virtual pure methods.
16103         <get_arg_types, get_result_type>: New methods.
16104         (xmethod_worker_ptr): Remove typedef.
16105         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16106         (xmethod_worker_vec): Remove typedef.
16107         (xmethod_worker_up): New typedef.
16108         (invoke_xmethod): Remove.
16109         (clone_xmethod_worker): Remove.
16110         (free_xmethod_worker): Remove.
16111         (free_xmethod_worker_vec): Remove.
16112         (get_xmethod_arg_types): Remove.
16113         (get_xmethod_result_type): Remove.
16114         * valops.c (find_method_list): Use std::vector, don't use
16115         intermediate vector.
16116         (value_find_oload_method_list): Use std::vector.
16117         (find_overload_match): Use std::vector.
16118         (find_oload_champ): Use std::vector.
16119         * value.c (value_free): Use operator delete.
16120         (value_of_xmethod): Rename to...
16121         (value_from_xmethod): ... this.  Don't assign
16122         xmethod_worker::value, take rvalue-reference.
16123         (result_type_of_xmethod): Adjust.
16124         (call_xmethod): Adjust.
16125         * value.h: Include extension.h.
16126         (struct xmethod_worker): Don't forward-declare.
16127         (value_of_xmethod): Rename to...
16128         (value_from_xmethod): ... this, take rvalue-reference.
16129         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16130         (struct python_xmethod_worker): ... this, add constructor and
16131         destructor.
16132         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16133         (gdbpy_free_xmethod_worker_data): Rename to...
16134         (python_xmethod_worker::~python_xmethod_worker): ... this and
16135         adjust.
16136         (gdbpy_clone_xmethod_worker_data): Rename to...
16137         (python_xmethod_worker::clone): ... this and adjust.
16138         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16139         temporary vector.
16140         (gdbpy_get_xmethod_arg_types): Rename to...
16141         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16142         (gdbpy_get_xmethod_result_type): Rename to...
16143         (python_xmethod_worker::do_get_result_type): ... this and
16144         adjust.
16145         (gdbpy_invoke_xmethod): Rename to...
16146         (python_xmethod_worker::invoke): ... this and adjust.
16147         (new_python_xmethod_worker): Rename to...
16148         (python_xmethod_worker::python_xmethod_worker): ... this and
16149         adjust.
16150         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16151         Remove.
16152         (gdbpy_free_xmethod_worker_data): Remove.
16153         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16154         (gdbpy_get_xmethod_arg_types): Remove.
16155         (gdbpy_get_xmethod_result_type): Remove.
16156         (gdbpy_invoke_xmethod): Remove.
16157         * python/python.c (python_extension_ops): Remove obsolete
16158         callbacks.
16159
16160 2018-01-05  Pedro Alves  <palves@redhat.com>
16161
16162         PR gdb/18653
16163         * common/signals-state-save-restore.c
16164         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16165         find a custom handler preinstalled, instead of internal erroring.
16166         But only warn if !quiet.
16167         * common/signals-state-save-restore.h
16168         (save_original_signals_state): New parameter 'quiet'.
16169         * main.c (captured_main_1): Move save_original_signals_state call
16170         after option handling, and pass QUIET.
16171
16172 2018-01-05  Pedro Alves  <palves@redhat.com>
16173
16174         * spu-tdep.c (spu_catch_start): Pass
16175         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16176
16177 2018-01-05  Pedro Alves  <palves@redhat.com>
16178
16179         PR gdb/22670
16180         * ada-lang.c (literal_symbol_name_matcher): New function.
16181         (ada_get_symbol_name_matcher): Use it for
16182         symbol_name_match_type::SEARCH_NAME.
16183         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16184         it down instead of assuming symbol_name_match_type::FULL.
16185         * block.h (block_lookup_symbol): New parameter 'match_type'.
16186         * c-valprint.c (print_unpacked_pointer): Use
16187         lookup_symbol_search_name instead of lookup_symbol.
16188         * compile/compile-object-load.c (get_out_value_type): Pass down
16189         symbol_name_match_type::SEARCH_NAME.
16190         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16191         symbol_name_match_type::FULL.
16192         * cp-support.c (cp_get_symbol_name_matcher): Handle
16193         symbol_name_match_type::SEARCH_NAME.
16194         * infrun.c (insert_exception_resume_breakpoint): Use
16195         lookup_symbol_search_name.
16196         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16197         * psymtab.c (maintenance_check_psymtabs): Use
16198         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16199         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16200         SYMBOL_SEARCH_NAME.
16201         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16202         if symbol_name_match_type::SEARCH_NAME.
16203         (lookup_symbol_in_language): Pass down
16204         symbol_name_match_type::FULL.
16205         (lookup_symbol_search_name): New.
16206         (lookup_language_this): Pass down
16207         symbol_name_match_type::SEARCH_NAME.
16208         (lookup_symbol_aux, lookup_local_symbol): New parameter
16209         'match_type'.  Pass it down.
16210         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16211         (lookup_symbol_search_name): New declaration.
16212         (lookup_symbol_in_block): New 'match_type' parameter.
16213
16214 2018-01-05  Pedro Alves  <palves@redhat.com>
16215
16216         PR gdb/22670
16217         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16218         ada_lookup_symbol.
16219         (ada_lookup_symbol): Reimplement in terms of
16220         ada_lookup_symbol_list, bits factored out from
16221         ada_lookup_encoded_symbol.
16222
16223 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16224
16225         * ada-exp.y (write_object_renaming): When subscripting an array
16226         using a symbol as the index, pass the block in call to
16227         ada_lookup_encoded_symbol when looking that symbol up.
16228
16229 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16230
16231         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16232         TYPE_INDEX_TYPE.
16233
16234 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16235
16236         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16237         the case where VALUE_LVAL (val0) is not lval_memory.
16238
16239 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16240
16241         * ada-valprint.c (print_optional_low_bound): Handle
16242         character-indexed array printing like boolean-indexed array
16243         printing.
16244
16245 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16246
16247         * NEWS: Create a new section for the next release branch.
16248         Rename the section of the current branch, now that it has
16249         been cut.
16250
16251 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16252
16253         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16254         * version.in: Bump version to 8.1.50.DATE-git.
16255
16256 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16257
16258         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16259         Add field.
16260         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16261         Add field.
16262         (default_exception_support_info) <catch_handlers_sym>: Add field.
16263         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16264         (ada_exception_name_addr_1): Add "catch handlers" handling.
16265         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16266         Update all callers.
16267         (create_excep_cond_exprs) <ex>: Add parameter.
16268         (re_set_exception): Update create_excep_cond_exprs call.
16269         (print_it_exception, print_one_exception, print_mention_exception)
16270         (print_recreate_exception): Add "catch handler" handling.
16271         (allocate_location_catch_handlers, re_set_catch_handlers)
16272         (check_status_catch_handlers, print_it_catch_handlers)
16273         (print_one_catch_handlers, print_mention_catch_handlers)
16274         (print_recreate_catch_handlers): New function.
16275         (catch_handlers_breakpoint_ops): New variable.
16276         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16277         Add parameter.  Add "catch handler" handling.
16278         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16279         Add "catch handler" handling.
16280         (ada_exception_catchpoint_cond_string): Add "catch handler"
16281         handling.
16282         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16283         call.
16284         (catch_ada_handlers_command): New function.
16285         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16286         operations structure.
16287         (_initialize_ada_language): Add "catch handlers" command entry.
16288         * NEWS: Document "catch handlers" feature.
16289
16290 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16291
16292         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16293         account when creating the array type of the slice.
16294         (ada_value_slice): Likewise.
16295
16296 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16297
16298         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16299         New enum value.
16300         (create_array_type_with_stride): Add byte_stride_prop parameter.
16301         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16302         New parameter.  Update all callers in this file.
16303         (array_type_has_dynamic_stride): New function.
16304         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16305         of arrays with dynamic byte strides.
16306         * dwarf2read.c (read_array_type): Add support for dynamic
16307         DW_AT_byte_stride attributes.
16308
16309 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16310
16311         * dwarf2read.c (read_unspecified_type): Treat
16312         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16313
16314 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16315
16316         Update copyright year range in all GDB files.
16317
16318 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16319
16320         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16321         and gdb/testsuite/gdb.base/step-line.c.
16322
16323 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16324
16325         * copyright.py (main): Dump the contents of
16326         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16327         even if BY_HAND is empty.
16328
16329 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16330
16331         * top.c (print_gdb_version): Update Copyright year in version
16332         message.
16333
16334 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16335
16336         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16337
16338 For older changes see ChangeLog-2017.
16339 \f
16340 Local Variables:
16341 mode: change-log
16342 left-margin: 8
16343 fill-column: 74
16344 version-control: never
16345 coding: utf-8
16346 End: