Implement the "gdb_signal_to/from_target" gdbarch methods for FreeBSD.
[external/binutils.git] / gdb / ChangeLog
1 2018-11-29  Rajendra SY  <rajendra.sy@gmail.com>
2
3         PR gdb/23093
4         * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
5         (fbsd_gdb_signal_to_target): New.
6         (fbsd_init_abi): Install gdbarch "signal_from_target" and
7         "signal_to_target" methods.
8
9 2018-11-29  Tom Tromey  <tom@tromey.com>
10
11         * valarith.c (value_x_unop): Don't set argvec[3].
12
13 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
14
15         PR gdb/23917
16         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
17         semicolon.
18
19 2018-11-26  Pedro Alves  <palves@redhat.com>
20
21         * procfs.c (procfs_notice_thread): Replace uses of
22         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
23         * sol-thread.c (sol_thread_target::wait)
24         (sol_update_thread_list_callback): Likewise.
25
26 2018-11-25  Tom Tromey  <tom@tromey.com>
27
28         * ui-out.c (ui_out::field_fmt): Remove comment.
29         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
30         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
31
32 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
33
34         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
35         leak in open_source_file' has been partially undone by '2179fbc36d23
36         Return scoped_fd from open_source_file'. Re-add the transfer of
37         current s->fullname to the unique_xmalloc_ptr fullname given
38         to find_and_open_source.
39
40 2018-11-23  Pedro Alves  <palves@redhat.com>
41
42         * gdbthread.h (enum thread_state): Move comments here.
43         (is_running, is_stopped, is_exited): Remove declarations.
44
45 2018-11-22  Pedro Alves  <palves@redhat.com>
46
47         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
48         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
49         ALL_NON_EXITED_THREADS with all_non_exited_threads.
50         (print_one_breakpoint_location): Replace ALL_INFERIORS with
51         all_inferiors.
52         * bsd-kvm.c: Include inferior.h.
53         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
54         with all_non_exited_threads.
55         * common/filtered-iterator.h: New.
56         * common/safe-iterator.h: New.
57         * corelow.c (core_target_open): Don't call init_thread_list here.
58         * darwin-nat.c (thread_info_from_private_thread_info): Replace
59         ALL_THREADS with all_threads.
60         * fbsd-nat.c (fbsd_nat_target::resume): Replace
61         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
62         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
63         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
64         * fork-child.c (postfork_hook): Don't call init_thread_list here.
65         * gdbarch-selftests.c (register_to_value_test): Adjust.
66         * gdbthread.h: Don't include "inferior.h" here.
67         (struct inferior): Forward declare.
68         (enum step_over_calls_kind): Moved here from inferior.h.
69         (thread_info::deletable): Definition moved to thread.c.
70         (find_thread_ptid (inferior *, ptid_t)): Declare.
71         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
72         Include "thread-iter.h".
73         (all_threads, all_non_exited_threads, all_threads_safe): New.
74         (any_thread_p): Declare.
75         (thread_list): Delete.
76         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
77         all_non_exited_threads.
78         (proceed_after_attach_callback): Delete.
79         (proceed_after_attach): Take an inferior pointer instead of an
80         integer PID.  Adjust to use range-for.
81         (attach_post_wait): Pass down inferior pointer instead of pid.
82         Use range-for instead of ALL_NON_EXITED_THREADS.
83         (detach_command): Remove init_thread_list call.
84         * inferior-iter.h: New.
85         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
86         (delete_thread_of_inferior): Delete.
87         (delete_inferior, exit_inferior_1): Use range-for with
88         inf->threads_safe() instead of iterate_over_threads.
89         (inferior_appeared): Call init_thread_list here.
90         (discard_all_inferiors): Use all_non_exited_inferiors.
91         (find_inferior_id, find_inferior_pid): Use all_inferiors.
92         (iterate_over_inferiors): Use all_inferiors_safe.
93         (have_inferiors, number_of_live_inferiors): Use
94         all_non_exited_inferiors.
95         (number_of_inferiors): Use all_inferiors and std::distance.
96         (print_inferior): Use all_inferiors.
97         * inferior.h: Include gdbthread.h.
98         (enum step_over_calls_kind): Moved to gdbthread.h.
99         (struct inferior) <thread_list>: New field.
100         <threads, non_exited_threads, threads_safe>: New methods.
101         (ALL_INFERIORS): Delete.
102         Include "inferior-iter.h".
103         (ALL_NON_EXITED_INFERIORS): Delete.
104         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
105         functions.
106         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
107         ALL_NON_EXITED_THREADS with all_non_exited_threads.
108         * infrun.c (follow_exec): Use all_threads_safe.
109         (clear_proceed_status, proceed): Use all_non_exited_threads.
110         (init_wait_for_inferior): Don't clear inline frame state here.
111         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
112         all_threads instead of ALL_NON_EXITED_THREADS.
113         (random_pending_event_thread): Use all_non_exited_threads instead
114         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
115         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
116         instead of ALL_NON_EXITED_THREADS.
117         (handle_no_resumed): Use all_non_exited_threads instead of
118         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
119         ALL_INFERIORS.
120         (restart_threads, switch_back_to_stepped_thread): Use
121         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
122         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
123         all_inferiors.
124         (kill_unfollowed_fork_children): Use inf->non_exited_threads
125         instead of ALL_NON_EXITED_THREADS.
126         * linux-tdep.c (linux_make_corefile_notes): Use
127         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
128         * linux-thread-db.c (thread_db_target::update_thread_list):
129         Replace ALL_INFERIORS with all_inferiors.
130         (thread_db_target::thread_handle_to_thread_info): Use
131         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
132         * mi/mi-interp.c (multiple_inferiors_p): New.
133         (mi_on_resume_1): Simplify using all_non_exited_threads and
134         multiple_inferiors_p.
135         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
136         instead of ALL_NON_EXITED_THREADS.
137         * nto-procfs.c (nto_procfs_target::open): Don't call
138         init_thread_list here.
139         * record-btrace.c (record_btrace_target_open)
140         (record_btrace_target::stop_recording)
141         (record_btrace_target::close)
142         (record_btrace_target::record_is_replaying)
143         (record_btrace_target::resume, record_btrace_target::wait)
144         (record_btrace_target::record_stop_replaying): Use
145         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
146         * record-full.c (record_full_wait_1): Use all_non_exited_threads
147         instead of ALL_NON_EXITED_THREADS.
148         * regcache.c (cooked_read_test): Remove reference to global
149         thread_list.
150         * remote-sim.c (gdbsim_target::create_inferior): Don't call
151         init_thread_list here.
152         * remote.c (remote_target::update_thread_list): Use
153         all_threads_safe instead of ALL_NON_EXITED_THREADS.
154         (remote_target::process_initial_stop_replies): Replace
155         ALL_INFERIORS with all_non_exited_inferiors and use
156         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
157         (remote_target::open_1): Don't call init_thread_list here.
158         (remote_target::append_pending_thread_resumptions)
159         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
160         instead of ALL_NON_EXITED_THREADS.
161         (remote_target::commit_resume)
162         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
163         with all_non_exited_inferiors and use all_non_exited_threads
164         instead of ALL_NON_EXITED_THREADS.
165         (remote_target::kill_new_fork_children): Use
166         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
167         init_thread_list and init_wait_for_inferior calls.
168         (remote_target::remote_btrace_maybe_reopen)
169         (remote_target::thread_handle_to_thread_info): Use
170         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
171         * target.c (target_terminal::restore_inferior)
172         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
173         all_non_exited_inferiors.
174         * thread-iter.c: New file.
175         * thread-iter.h: New file.
176         * thread.c: Include "inline-frame.h".
177         (thread_list): Delete.
178         (clear_thread_inferior_resources): Call clear_inline_frame_state.
179         (init_thread_list): Use all_threads_safe instead of
180         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
181         (new_thread): Adjust to per-inferior thread lists.
182         (add_thread_silent): Pass inferior to find_thread_ptid.
183         (thread_info::deletable): New, moved from the header.
184         (delete_thread_1): Adjust to per-inferior thread lists.
185         (find_thread_global_id): Use inf->threads().
186         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
187         find_thread_ptid.
188         (find_thread_ptid(inferior*, ptid_t)): New overload.
189         (iterate_over_threads): Use all_threads_safe.
190         (any_thread_p): New.
191         (thread_count): Use all_threads and std::distance.
192         (live_threads_count): Use all_non_exited_threads and
193         std::distance.
194         (valid_global_thread_id): Use all_threads.
195         (in_thread_list): Use find_thread_ptid.
196         (first_thread_of_inferior): Adjust to per-inferior thread lists.
197         (any_thread_of_inferior, any_live_thread_of_inferior): Use
198         inf->non_exited_threads().
199         (prune_threads, delete_exited_threads): Use all_threads_safe.
200         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
201         (set_resumed, set_running): Use all_non_exited_threads.
202         (is_thread_state, is_stopped, is_exited, is_running)
203         (is_executing): Delete.
204         (set_executing, set_stop_requested, finish_thread_state): Use
205         all_non_exited_threads.
206         (print_thread_info_1): Use all_inferiors and all_threads.
207         (thread_apply_all_command): Use all_non_exited_threads.
208         (thread_find_command): Use all_threads.
209         (update_threads_executing): Use all_non_exited_threads.
210         * tid-parse.c (parse_thread_id): Use inf->threads.
211         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
212
213 2018-11-22  Pedro Alves  <palves@redhat.com>
214
215         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
216         switch to it before calling into try_open_exec_file.
217
218 2018-11-22  Pedro Alves  <palves@redhat.com>
219
220         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
221         inferior_thread instead of find_thread_ptid, and only when
222         inferior_ptid is not null_ptid.
223         * inferior.c (add_inferior): Don't include target_pid_to_str
224         output when the inferior is not started.
225         * python/py-inferior.c (python_on_normal_stop): Don't use
226         find_thread_ptid.
227         (tui_on_user_selected_context_changed): Use inferior_thread
228         instead of find_thread_ptid, and only when inferior_ptid is not
229         null_ptid.
230
231 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
232
233         PR python/23714
234         * gdb/python/python.c (execute_gdb_command): Call
235         prevent_dont_repeat earlier to avoid affecting dont_repeat.
236
237 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
238
239         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
240         (HFILES_NO_SRCDIR): Add arch/riscv.h.
241         * arch/riscv.c: New file.
242         * arch/riscv.h: New file.
243         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
244         this list, and add arch/riscv.o.
245         * features/Makefile: Add riscv features.
246         * features/riscv/32bit-cpu.c: New file.
247         * features/riscv/32bit-cpu.xml: New file.
248         * features/riscv/32bit-csr.c: New file.
249         * features/riscv/32bit-csr.xml: New file.
250         * features/riscv/32bit-fpu.c: New file.
251         * features/riscv/32bit-fpu.xml: New file.
252         * features/riscv/64bit-cpu.c: New file.
253         * features/riscv/64bit-cpu.xml: New file.
254         * features/riscv/64bit-csr.c: New file.
255         * features/riscv/64bit-csr.xml: New file.
256         * features/riscv/64bit-fpu.c: New file.
257         * features/riscv/64bit-fpu.xml: New file.
258         * features/riscv/rebuild-csr-xml.sh: New file.
259         * riscv-tdep.c: Add 'arch/riscv.h' include.
260         (riscv_gdb_reg_names): Delete.
261         (csr_reggroup): New global.
262         (struct riscv_register_alias): Delete.
263         (struct riscv_register_feature): New structure.
264         (riscv_register_aliases): Delete.
265         (riscv_xreg_feature): New global.
266         (riscv_freg_feature): New global.
267         (riscv_virtual_feature): New global.
268         (riscv_csr_feature): New global.
269         (riscv_create_csr_aliases): New function.
270         (riscv_read_misa_reg): Delete.
271         (riscv_has_feature): Delete.
272         (riscv_isa_xlen): Simplify, just return cached xlen.
273         (riscv_isa_flen): Simplify, just return cached flen.
274         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
275         (riscv_register_name): Update to make use of tdesc_register_name.
276         Look up xreg and freg names in the new globals riscv_xreg_feature
277         and riscv_freg_feature.  Don't supply csr aliases here.
278         (riscv_fpreg_q_type): Delete.
279         (riscv_register_type): Use tdesc_register_type in almost all
280         cases, override the returned type in a few specific cases only.
281         (riscv_print_one_register_info): Handle errors reading registers.
282         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
283         registers that are otherwise unknown to GDB.  Also check the
284         csr_reggroup.
285         (riscv_print_registers_info): Remove assert about upper register
286         number, and use gdbarch_register_reggroup_p instead of
287         short-cutting.
288         (riscv_find_default_target_description): New function.
289         (riscv_check_tdesc_feature): New function.
290         (riscv_add_reggroups): New function.
291         (riscv_setup_register_aliases): New function.
292         (riscv_init_reggroups): New function.
293         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
294         setup register groups.  Register new riscv debug variable.
295         * riscv-tdep.h: Add 'arch/riscv.h' include.
296         (struct gdbarch_tdep): Remove abi union, and add
297         riscv_gdbarch_features field.  Remove cached quad floating point
298         type, and provide initialisation for double type field.
299         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
300         the list of targets using the feature based target descriptions.
301         * NEWS: Mention target description support.
302
303 2018-11-21  Pedro Alves  <palves@redhat.com>
304
305         * valops.c (find_method_list, value_find_oload_method_list)
306         (find_overload_match, find_oload_champ): Rename parameters and
307         locals.
308
309 2018-11-21  Pedro Alves  <palves@redhat.com>
310
311         * valops.c (find_method_list): Replace pointer and length
312         parameters with an gdb::array_view.  Adjust.
313         (value_find_oload_method_list): Likewise.
314         (find_overload_match): Use gdb::array_view for methods list.
315         Adjust to find_oload_champ interface change.
316         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
317         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
318
319 2018-11-21  Pedro Alves  <palves@redhat.com>
320
321         * gdbtypes.c (compare_badness): Change type of parameters to const
322         reference.  Adjust to badness_vector being a std::vector now.
323         (rank_function): Adjust to badness_vector being a std::vector now.
324         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
325         (LENGTH_MATCH): Delete.
326         (compare_badness): Change type of parameters to const reference.
327         (rank_function): Return a badness_vector by value now.
328         (find_overload_match): Adjust to badness_vector being a
329         std::vector now.  Remove cleanups.
330         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
331         badness_vector pointer.
332         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
333         a badness_vector pointer.  Adjust to badness_vector being a
334         std::vector now.  Remove cleanups.
335         (find_oload_champ): 'oload_champ_bv' parameter now
336         a badness_vector pointer.  Adjust to badness_vector being a
337         std::vector now.  Remove cleanups.
338
339 2018-11-21  Pedro Alves  <palves@redhat.com>
340
341         * cp-support.c (sym_return_val_size, sym_return_val_index)
342         (sym_return_val): Delete.
343         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
344         add to the vector.
345         (make_symbol_overload_list): Adjust to return a std::vector
346         instead of maintaining a global open coded vector.
347         (make_symbol_overload_list_block): Add std::vector parameter.
348         (make_symbol_overload_list_block): Rename to ...
349         (add_symbol_overload_list_block): ... this and add std::vector
350         parameter.
351         (make_symbol_overload_list_namespace): Rename to ...
352         (add_symbol_overload_list_namespace): ... this and add std::vector
353         parameter.
354         (make_symbol_overload_list_adl_namespace): Rename to ...
355         (add_symbol_overload_list_adl_namespace): ... this and add
356         std::vector parameter.
357         (make_symbol_overload_list_adl): Delete.
358         (add_symbol_overload_list_adl): New.
359         (make_symbol_overload_list_using): Rename to ...
360         (add_symbol_overload_list_using): ... this and add std::vector
361         parameter.
362         (make_symbol_overload_list_qualified): Rename to ...
363         (add_symbol_overload_list_qualified): ... this and add std::vector
364         parameter.
365         * cp-support.h: Include "common/array-view.h" and <vector>.
366         (make_symbol_overload_list): Change return type to std::vector.
367         (make_symbol_overload_list_adl): Delete declaration.
368         (add_symbol_overload_list_adl): New declaration.
369         * valops.c (find_overload_match): Local 'oload_syms' now a
370         std::vector.
371         (find_oload_champ_namespace): 'oload_syms' parameter now a
372         std::vector pointer.
373         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
374         std::vector pointer.  Adjust to new make_symbol_overload_list
375         interface.
376
377 2018-11-21  Pedro Alves  <palves@redhat.com>
378
379         * common/array-view.h (array_view::splice(size_type, size_t)): New.
380         (array_view::splice(size_type)): New.
381         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
382         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
383         std::vector.
384         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
385         * extension.h: Include "common/array-view.h".
386         (xmethod_worker::invoke): Adjust to use gdb::array_view.
387         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
388         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
389         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
390         (xmethod_worker::do_get_result_type): Adjust to use
391         gdb::array_view.
392         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
393         * gdbtypes.h: Include "common/array-view.h".
394         (rank_function): Adjust to use gdb::array_view.
395         * python/py-xmethods.c (python_xmethod_worker::invoke)
396         (python_xmethod_worker::do_get_arg_types)
397         (python_xmethod_worker::do_get_result_type)
398         (python_xmethod_worker::invoke): Adjust to new interfaces.
399         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
400         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
401         * valops.c (find_overload_match, find_oload_champ_namespace)
402         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
403         gdb:array_view and the new xmethod_worker interfaces.
404         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
405         gdb::array_view.
406         * value.h (find_overload_match, result_type_of_xmethod)
407         (call_xmethod): Adjust to use gdb::array_view.
408         * unittests/array-view-selftests.c: Add slicing tests.
409
410 2018-11-21  Pedro Alves  <palves@redhat.com>
411
412         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
413         * common/array-view.h (make_array_view): New.
414         * compile/compile-object-run.c (compile_object_run): Adjust to
415         pass an array_view.
416         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
417         * eval.c (eval_call): Adjust to pass an array_view.
418         (evaluate_subexp_standard): Adjust to pass an array_view.
419         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
420         * guile/scm-value.c (gdbscm_value_call): Likewise.
421         * infcall.c (push_dummy_code): Replace pointer + size parameters
422         with an array_view parameter.
423         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
424         adjust.
425         * infcall.h: Include "common/array-view.h".
426         (call_function_by_hand, call_function_by_hand_dummy): Replace
427         pointer + size parameters with an array_view parameter.
428         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
429         * linux-tdep.c (linux_infcall_mmap): Likewise.
430         * objc-lang.c (lookup_objc_class, lookup_child_selector)
431         (value_nsstring, print_object_command): Likewise.
432         * python/py-value.c (valpy_call): Likewise.
433         * rust-lang.c (rust_evaluate_funcall): Likewise.
434         * spu-tdep.c (flush_ea_cache): Likewise.
435         * valarith.c (value_x_binop, value_x_unop): Likewise.
436         * valops.c (value_allocate_space_in_inferior): Likewise.
437         * unittests/array-view-selftests.c (run_tests): Add
438         gdb::make_array_view test.
439
440 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
441
442         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
443         than a fixed size buffer.
444
445 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
446
447         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
448         and remove insertion of extra spaces in GDB's output.
449         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
450         Layout field into a temporary buffer, and then output it as a
451         string field.
452
453 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
454
455         * NEWS: Document the language choice done by
456         'info [types|functions|variables]|rbreak'.
457
458 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
459
460         * symtab.c (treg_matches_sym_type_name): Use
461         scoped_switch_to_sym_language_if_auto instead of local logic.
462         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
463         to switch to SYM language when language mode is auto.
464
465 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
466
467         * language.h (scoped_switch_to_sym_language_if_auto): New class.
468
469 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
470
471         * symtab.c (search_symbols): Properly check absence of type regexp
472         before entering the loop scanning the minimal symbols.
473
474 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
475
476         * s12z-tdep.c (s12z_extract_return_value): New function.
477         (inv_reg_perm) New array.
478         (s12z_return_value): Populate readbuf if non-null.
479
480 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
481
482         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
483         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
484         to MinGW fixed by Gnulib.
485         (O_NOINHERIT): Define if not defined.
486
487 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
488
489         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
490
491 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
492
493         * infrun.c (displaced_step_inferior_state) <next>: Remove.
494
495 2018-11-19  Tom Tromey  <tom@tromey.com>
496
497         * source.c (get_filename_and_charpos): Return void.
498
499 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
500
501         * skip.c (_initialize_step_skip): Fix "info skip" help.
502
503 2018-11-16  Tom Tromey  <tom@tromey.com>
504
505         PR rust/23625:
506         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
507
508 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
509
510         * infrun.c (displaced_step_inferior_states): Change type to
511         std::forward_list.
512         (get_displaced_stepping_state): Adjust.
513         (displaced_step_in_progress_any_inferior): Adjust.
514         (add_displaced_stepping_state): Adjust.
515         (remove_displaced_stepping_state): Adjust.
516
517 2018-11-18  Tom Tromey  <tom@tromey.com>
518
519         PR build/23814:
520         * target-delegates.c: Rebuild.
521         * ia64-linux-nat.c (class ia64_linux_nat_target)
522         <have_steppable_watchpoint>: Use override.  Return true, not 1.
523         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
524         "self" argument.
525         (ia64_linux_nat_target::low_new_thread): Rename.
526         (class ia64_linux_nat_target) <read_description>: Don't declare.
527         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
528         bool.
529
530 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
531
532         PR gdb/22736:
533         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
534         lang_struct_return code.
535
536 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
537
538         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
539         return_method.
540         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
541         * amd64-tdep.c (amd64_push_arguments): Likewise.
542         (amd64_push_dummy_call): Likewise.
543         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
544         * arc-tdep.c (arc_push_dummy_call): Likewise.
545         * arm-tdep.c (arm_push_dummy_call): Likewise.
546         * avr-tdep.c (avr_push_dummy_call): Likewise.
547         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
548         * cris-tdep.c (cris_push_dummy_call): Likewise.
549         * csky-tdep.c (csky_push_dummy_call): Likewise.
550         * frv-tdep.c (frv_push_dummy_call): Likewise.
551         * gdbarch.c: Regenerate.
552         * gdbarch.h: Regenerate.
553         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
554         return_method.
555         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
556         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
557         (hppa64_push_dummy_call): Likewise.
558         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
559         * i386-tdep.c (i386_push_dummy_call): Likewise.
560         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
561         * infcall.c (call_function_by_hand_dummy): Likewise.
562         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
563         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
564         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
565         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
566         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
567         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
568         * mep-tdep.c (mep_push_dummy_call): Likewise.
569         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
570         (mips_n32n64_push_dummy_call): Likewise.
571         (mips_o32_push_dummy_call): Likewise.
572         (mips_o64_push_dummy_call): Likewise.
573         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
574         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
575         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
576         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
577         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
578         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
579         (ppc64_sysv_abi_push_dummy_call): Likewise.
580         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
581         (ppc64_sysv_abi_push_dummy_call): Likewise.
582         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
583         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
584         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
585         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
586         * rx-tdep.c (rx_push_dummy_call): Likewise.
587         * s390-tdep.c (s390_push_dummy_call): Likewise.
588         * score-tdep.c (score_push_dummy_call): Likewise.
589         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
590         (sh_push_dummy_call_nofpu): Likewise.
591         * sparc-tdep.c (sparc32_store_arguments): Likewise.
592         (sparc32_push_dummy_call): Likewise.
593         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
594         (sparc64_push_dummy_call): Likewise.
595         * spu-tdep.c (spu_push_dummy_call): Likewise.
596         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
597         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
598         * v850-tdep.c (v850_push_dummy_call): Likewise.
599         * vax-tdep.c (vax_push_dummy_call): Likewise.
600         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
601         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
602
603 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
604
605         * gdbarch.sh (enum function_call_return_method): Add enum.
606         * gdbarch.h: Regenerate.
607         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
608
609 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
610
611         * unittests/copy_bitwise-selftests.c: New file.
612         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
613         (selftests::copy_bitwise_tests): Delete, moving this code to
614         unittests/copy_bitwise-selftests.c instead.
615         (_initialize_utils): Do not register copy_bitwise tests.
616         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
617         unittests/copy_bitwise-selftests.c.
618
619 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
620
621         * ada-lang.c (move_bits): Delete. Update all callers to use
622         copy_bitwise instead.
623         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
624         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
625         Move from here to utils.c.
626         (_initialize_dwarf2loc): Remove call to register copy_bitwise
627         selftests.
628         * utils.h (copy_bitwise): Add declaration.
629         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
630         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
631         Moved here from dwarf2loc.c.
632         (_initialize_utils): Register copy_bitwise selftests.
633
634 2018-11-14  Jim Wilson  <jimw@sifive.com>
635
636         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
637         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
638         then increment next_regnum if odd.
639         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
640         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
641         function type.  Pass new arg to riscv_arg_location based on function
642         type.
643         (riscv_return_value): Pass new arg to riscv_arg_location.
644
645         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
646         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
647         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
648
649         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
650         setting len.  New local align, set to max of arg align and xlen,
651         and pass to first riscv_assign_stack_location call.
652
653 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
654
655         * skip.c (complete_skip_number): New function.
656         (_initialize_step_skip): Add completers to some skip commands.
657
658 2018-11-09  Tom Tromey  <tom@tromey.com>
659
660         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
661         (struct remote_g_packet_data): Derive from allocate_on_obstack.
662         <guesses>: Now a std::vector.
663         (remote_g_packet_data_init, register_remote_g_packet_guess):
664         Update.
665         (remote_read_description_p): Update.  Return bool.
666         (remote_target::read_description): Update.
667         (struct remote_g_packet_guess): Add constructor.
668
669 2018-11-09  Tom Tromey  <tom@tromey.com>
670
671         * common/scoped_fd.h (class scoped_fd): Add move constructor and
672         move assignment operator.
673         * psymtab.c (psymtab_to_fullname): Update.
674         * source.h (open_source_file): Return scoped_fd.
675         (find_and_open_source): Likewise.
676         * source.c (open_source_file): Return scoped_fd.
677         (get_filename_and_charpos): Update.
678         (print_source_lines_base): Update.  Use scoped_fd::to_file.
679         (forward_search_command): Likewise.
680         (reverse_search_command): Likewise.
681         (find_and_open_source): Return scoped_fd.
682         * tui/tui-source.c (tui_set_source_content): Update.  Use
683         gdb_file_up.
684
685 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
686
687         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
688         overflow.
689
690 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
691
692         * configure: Regenerate.
693
694 2018-11-09  Tom de Vries  <tdevries@suse.de>
695
696         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
697         unconditionally, to set the language of the symbol.  Manage freeing
698         returned pointer using gdb::unique_xmalloc_ptr.
699
700 2018-11-08  Tom Tromey  <tom@tromey.com>
701
702         * record.c (require_record_target): Upper-case "<TAB>".
703
704 2018-11-08  Tom Tromey  <tom@tromey.com>
705
706         * python/lib/gdb/command/pretty_printers.py
707         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
708
709 2018-11-08  Tom Tromey  <tom@tromey.com>
710
711         PR gdb/23555:
712         PR gdb/23838:
713         * target.h (target_supports_terminal_ours): Return bool.
714         * target.c (target_supports_terminal_ours): Handle case where
715         current_top_target returns nullptr.  Return bool.
716
717 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
718
719         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
720         return the correct count for potential HFAs.
721
722 2018-11-08  Jan Beulich  <jbeulich@suse.com>
723
724         * i387-tdep.c (i387_supply_xsave): Split handling of
725         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
726         (i387_collect_xsave): Likewise.
727
728 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
729
730         * riscv-tdep.c (riscv_insn::decode): Update header comment.
731         (riscv_frame_this_id): Catch errors thrown while building the
732         frame cache, leave the frame id as the default, which is the outer
733         frame id.
734
735 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
736
737         * ada-lang.c (read_atcb): Only set task_info->called_task if
738         task_info->state == Entry_Caller_Sleep.
739         (print_ada_task_info): Do not check task_info->state before
740         checking task_info->called_task.
741         (info_task): Likewise.
742
743 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
744
745         * ada-tasks.c (read_atcb): Clear task_info before computing
746         the value of each of its fields.
747
748 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
749
750         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
751         NULL before dereferencing it.
752
753 2018-11-06  Tom de Vries  <tdevries@suse.de>
754
755         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
756         program headers.
757
758 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
759
760         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
761         so that it applies to uclinux as well.
762
763 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
764
765         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
766         when on AAPCS.
767
768 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
769
770         * riscv-fbsd-nat.c (getregs_supplies): Return true for
771         RISCV_CSR_SSTATUS_REGNUM.
772
773 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
774
775         * source.c (open_source_file): Fix leak by transferring the
776         current s->fullname to the unique_xmalloc_ptr fullname given
777         to find_and_open_source.
778
779 2018-11-04  Tom Tromey  <tom@tromey.com>
780
781         * varobj.c (install_default_visualizer): Update.
782         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
783         Return gdbpy_ref.
784         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
785         (find_pretty_printer_from_progspace)
786         (find_pretty_printer_from_gdb, find_pretty_printer)
787         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
788         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
789         Update.
790
791 2018-11-04  Tom Tromey  <tom@tromey.com>
792
793         * python/python.c (gdbpy_parameter_value): Update.
794         * python/python-internal.h (python_string_to_unicode)
795         (python_string_to_target_python_string)
796         (host_string_to_python_string): Return gdbpy_ref.
797         * python/py-utils.c (python_string_to_unicode)
798         (unicode_to_encoded_python_string)
799         (unicode_to_target_python_string)
800         (python_string_to_target_string)
801         (python_string_to_target_python_string): Return gdbpy_ref.
802         (python_string_to_host_string): Update.
803         (host_string_to_python_string): Return gdbpy_ref.
804         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
805         (stpy_fullname): Update.
806         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
807         Update.
808         * python/py-prettyprint.c (print_string_repr): Update.
809         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
810         (objfpy_get_build_id): Update.
811         * python/py-breakpoint.c (bppy_get_location)
812         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
813         Update.
814
815 2018-11-04  Tom Tromey  <tom@tromey.com>
816
817         * python/python-internal.h (gdb_py_object_from_longest)
818         (gdb_py_object_from_ulongest): Return gdbpy_ref.
819         * python/py-value.c (valpy_int): Update.
820         * python/py-utils.c (gdb_py_object_from_longest): Return
821         gdbpy_ref.
822         (gdb_py_object_from_ulongest): Likewise.
823         * python/py-type.c (typy_get_alignof): Update.
824         * python/py-linetable.c (ltpy_get_all_source_lines)
825         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
826         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
827
828 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
829
830         * ada-lang.c (_initialize_ada_language): Fix typo.
831
832 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
833
834         * language.c (type): Remove.
835         (_initialize_language): Remove assignment to type.
836
837 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
838
839         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
840         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
841         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
842         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
843         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
844         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
845         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
846         and aarch64-ravenscar-thread.o.
847         * NEWS: Add entry documenting Ravenscar tasking support
848         on AArch64 ELF.
849
850 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
851
852         * symtab.c (info_functions_command): Initialize quiet flag.
853         * stack.c (info_args_command): Likewise.
854
855 2018-11-01  Jim Wilson  <jimw@sifive.com>
856
857         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
858         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
859         debugging messages.
860
861 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
862
863         * ada-lang.c (ada_watch_location_expression): New function.
864         (ada_language_defn): Set la_watch_location_expression to
865         ada_watch_location_expression.
866
867 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
868
869         * print-utils.c (int_string): Remove unnecessary trailing spaces.
870
871 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
872
873         * rs6000-tdep.c (skip_prologue): Fix potential negative left
874         shifting.
875
876 2018-11-01  Jerome Guitton  <guitton@adacore.com>
877             Joel Brobecker  <brobecker@adacore.com>
878
879         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
880         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
881         * arm-pikeos-tdep.c: New file.
882         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
883         embedded system.
884         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
885
886 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
887
888         * common/pathstuff.c (get_standard_temp_dir): New.
889         * common/pathstuff.h (get_standard_temp_dir): New.
890         * config.in: Re-generate.
891         * configure: Re-generate.
892         * configure.ac: Don't check for mkdtemp.
893         * gnulib/aclocal-m4-deps.mk: Re-generate.
894         * gnulib/aclocal.m4: Re-generate.
895         * gnulib/config.in: Re-generate.
896         * gnulib/configure: Re-generate.
897         * gnulib/import/Makefile.am: Re-generate.
898         * gnulib/import/Makefile.in: Re-generate.
899         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
900         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
901         * gnulib/import/m4/mkdtemp.m4: New file.
902         * gnulib/import/mkdtemp.c: New file.
903         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
904         Add mkdtemp module.
905         * unittests/mkdir-recursive-selftests.c (test): Use
906         get_standard_temp_dir.
907         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
908         ifdef.
909         * compile/compile.c (get_compile_file_tempdir): Likewise.
910
911 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
912
913         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
914         (SIG_FRAME_LR_OFFSET64): New define.
915         (SIG_FRAME_FP_OFFSET64): New define.
916         (aix_sighandle_frame_cache): New Function.
917         (aix_sighandle_frame_this_id): New Function.
918         (aix_sighandle_frame_prev_register): New Function.
919         (aix_sighandle_frame_sniffer): New Function.
920         (aix_sighandle_frame_unwind): New global variable.
921         (rs6000_aix_init_osabi): Install new frame unwinder.
922
923 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
924
925         PR gdb/23835
926         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
927         already defined.
928
929 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
930
931         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
932
933 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
934
935         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
936         (producer_is_icc): New function.
937         (check_producer): Set producer_is_icc field on dwarf2_cu.
938         (dwarf2_init_integer_type): New function.
939         (read_base_type): Call dwarf2_init_integer_type instead of
940         init_integer_type in all cases.
941         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
942         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
943         LEN is greater than 0.
944
945 2018-10-30  Tom Tromey  <tom@tromey.com>
946
947         * main.c (captured_main_1): Check return value of bfd_init.
948
949 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
950
951         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
952         Adjust comments.
953
954 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
955
956         * procfs.c: Include common/pathstuff.h.
957
958 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
959
960         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
961         Add missing braces.  No functional change.
962
963 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
964
965         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
966         to report a bad option and fix indentation.
967         * demangle.c (demangle_command): Use report_unrecognized_option_error
968         to report a bad option and correctly report the bad option.
969
970 2018-10-27  Tom Tromey  <tom@tromey.com>
971
972         PR cli/23364:
973         * darwin-nat.c (copied_shell): New global.
974         (may_have_sip): Rename from should_disable_startup_with_shell.
975         (copy_shell_to_cache, maybe_cache_shell): New functions.
976         (darwin_nat_target::create_inferior): Update.  Use
977         copied_shell.
978
979 2018-10-27  Tom Tromey  <tom@tromey.com>
980
981         * unittests/scoped_fd-selftests.c (test_to_file): New function.
982         (run_tests): Call test_to_file.
983         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
984         temporary files.
985         * common/scoped_fd.h (scoped_fd::to_file): New method.
986
987 2018-10-27  Tom Tromey  <tom@tromey.com>
988
989         * unittests/scoped_mmap-selftests.c (test_normal): Use
990         gdb_mkostemp_cloexec.
991         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
992         Use gdb_mkostemp_cloexec.
993         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
994         gnulib/config.in, gnulib/configure,
995         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
996         gnulib/import/m4/gnulib-cache.m4,
997         gnulib/import/m4/gnulib-comp.m4: Update.
998         * gnulib/import/m4/mkostemp.m4: New file.
999         * gnulib/import/m4/mkstemp.m4: Remove.
1000         * gnulib/import/mkostemp.c: New file.
1001         * gnulib/import/mkstemp.m4: Remove.
1002         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1003         mkstemp, add mkostemp.  Apply new patch.
1004         * gnulib/import/stdlib.in.h: Apply patch.
1005         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1006         New file.
1007         * dwarf-index-write.c (write_psymtabs_to_index): Use
1008         gdb_mkostemp_cloexec.
1009         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1010
1011 2018-10-27  Tom Tromey  <tom@tromey.com>
1012
1013         * unittests/mkdir-recursive-selftests.c: New file.
1014         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1015         unittests/mkdir-recursive-selftests.c.
1016         * dwarf-index-cache.c (mkdir_recursive): Move to
1017         common/filestuff.c.
1018         (index_cache::store): Check return value of mkdir_recursive.
1019         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1020         (_initialize_index_cache): Don't register test.
1021         * common/filestuff.h (mkdir_recursive): Declare.
1022         * common/filestuff.c (mkdir_recursive): Move from
1023         dwarf-index-cache.c.  Return bool.
1024
1025 2018-10-27  Tom Tromey  <tom@tromey.com>
1026
1027         * dwarf-index-write.c (write_psymtabs_to_index): Move
1028         make_temp_filename to common/pathstuff.c.
1029         * common/pathstuff.h (make_temp_filename): Declare.
1030         * common/pathstuff.c (make_temp_filename): New function, moved
1031         from dwarf-index-write.c.
1032
1033 2018-10-27  Tom Tromey  <tom@tromey.com>
1034
1035         * procfs.c (procfs_target::create_inferior): Use get_shell.
1036         * cli/cli-cmds.c (shell_escape): Use get_shell.
1037         * windows-nat.c (windows_nat_target::create_inferior): Use
1038         get_shell.
1039         * common/pathstuff.c (get_shell): New function.
1040         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1041         (fork_inferior): Use get_shell.
1042         * common/pathstuff.h (get_shell): Declare.
1043
1044 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1045
1046         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1047
1048 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1049
1050         * stack.c (print_variable_and_value_data): Add preg and treg.
1051         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1052         and update callers.
1053         (print_frame_arg_vars): Likewise.
1054         (prepare_reg): New function.
1055         (info_locals_command): Extract info print args and use them.
1056         (info_args_command): Likewise.
1057         (_initialize_stack): Modify on-line help.
1058         * symtab.c (treg_matches_sym_type_name): New function.
1059         (search_symbols): New arg t_regexp.
1060         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1061         (info_variables_command): Extract info print args and use them.
1062         (info_functions_command): Likewise.
1063         (info_types_command): Update call to symtab_symbol_info.
1064         (_initialize_symtab): Modify on-line help.
1065         * symtab.h (treg_matches_sym_type_name): New function.
1066         (search_symbols): New t_regexp arg.
1067
1068 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1069
1070         * cli-utils.c (extract_arg_maybe_quoted): New function.
1071         (extract_info_print_args): New function.
1072         (info_print_args_help): New function.
1073         (report_unrecognized_option_error): New function.
1074         * cli-utils.h (extract_arg_maybe_quoted): New function.
1075         (extract_info_print_args): New function.
1076         (info_print_args_help): New function.
1077         (report_unrecognized_option_error): New function.
1078
1079 2018-10-26  Tom Tromey  <tom@tromey.com>
1080
1081         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1082         (compute_compunit_symtab_includes): Update.
1083         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1084         (compunit_symtab_ptr): Likewise.
1085
1086 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1087
1088         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1089         default_print_auxv_entry for specific tag values.
1090
1091 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1092
1093         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1094
1095 2018-10-26  Jim Wilson  <jimw@sifive.com>
1096
1097         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1098         (riscv_linux_sigframe_init): Declare.
1099         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1100         (riscv_linux_sigframe): New.
1101         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1102         (riscv_linux_sigframe_init): Define.
1103         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1104
1105         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1106         (riscv_isa_flen): Likewise.  Drop static.
1107         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1108         (riscv_isa_flen): Likewise.  Declare.
1109
1110 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1111             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1112
1113         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1114         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1115         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1116         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1117         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1118         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1119         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1120         Define.
1121         (struct ppc_linux_features) <htm>: New field.
1122         (ppc_linux_no_features): Add initializer for htm field.
1123         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1124         new tdescs.
1125         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1126         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1127         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1128         Define if not already defined.
1129         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1130         and rs6000/powerpc-isa207-htm-vsx64l.
1131         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1132         rs6000/powerpc-isa207-htm-vsx64l.xml.
1133         * features/rs6000/power-htm-spr.xml: New file.
1134         * features/rs6000/power-htm-core.xml: New file.
1135         * features/rs6000/power64-htm-core.xml: New file.
1136         * features/rs6000/power-htm-fpu.xml: New file.
1137         * features/rs6000/power-htm-altivec.xml: New file.
1138         * features/rs6000/power-htm-vsx.xml: New file.
1139         * features/rs6000/power-htm-ppr.xml: New file.
1140         * features/rs6000/power-htm-dscr.xml: New file.
1141         * features/rs6000/power-htm-tar.xml: New file.
1142         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1143         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1144         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1145         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1146         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1147         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1148         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1149         fetch_regset with HTM regsets.
1150         (store_register, store_ppc_registers): Call store_regset with HTM
1151         regsets.
1152         (ppc_linux_nat_target::read_description): Set htm field in the
1153         features struct if needed.
1154         * ppc-linux-tdep.c: Include
1155         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1156         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1157         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1158         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1159         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1160         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1161         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1162         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1163         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1164         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1165         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1166         (ppc32_linux_ctarregset): New globals.
1167         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1168         (ppc_linux_collect_core_cpgrregset): New function.
1169         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1170         regsets.
1171         (ppc_linux_core_read_description): Check if the tm spr section is
1172         present and set htm in the features struct.
1173         (_initialize_ppc_linux_tdep): Call
1174         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1175         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1176         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1177         Declare.
1178         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1179         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1180         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1181         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1182         New fields.
1183         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1184         Likewise.
1185         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1186         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1187         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1188         New enum fields.
1189         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1190         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1191         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1192         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1193         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1194         <PPC_CTAR_REGNUM>: Likewise.
1195         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1196         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1197         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1198         (IS_CEFP_PSEUDOREG): Define.
1199         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1200         registers.  Return names for the checkpointed DFP, VSX, and EFP
1201         pseudo registers.
1202         (rs6000_pseudo_register_type): Remove initial assert and raise an
1203         internal error in the else clause instead.  Return types for the
1204         checkpointed DFP, VSX, and EFP pseudo registers.
1205         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1206         checkpointed DFP pseudo registers.
1207         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1208         checkpointed VSX pseudo registers.
1209         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1210         from efpr_pseudo_register_read and
1211         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1212         registers.
1213         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1214         Handle checkpointed DFP, VSX, and EFP registers.
1215         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1216         (efp_ax_pseudo_register_collect): New functions.
1217         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1218         register logic to new functions.  Handle checkpointed DFP, VSX,
1219         and EFP pseudo registers.
1220         (rs6000_gdbarch_init): Look for and validate the htm features.
1221         Include checkpointed DFP, VSX and EFP pseudo-registers.
1222         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1223         HTM registers.
1224
1225 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1226
1227         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1228         without altivec or fpu.
1229
1230 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1231             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1232
1233         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1234         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1235         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1236         Define if not already defined.
1237         * features/rs6000/power-ebb.xml: New file.
1238         * features/rs6000/power-linux-pmu.xml: New file.
1239         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1240         features.
1241         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1242         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1243         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1244         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1245         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1246         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1247         fetch_regset with ebb and pmu regsets.
1248         (store_register, store_ppc_registers): Call store_regset with ebb
1249         and pmu regsets.
1250         (ppc_linux_nat_target::read_description): Set isa207 field in the
1251         features struct if ebb and pmu are avaiable.
1252         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1253         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1254         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1255         and pmu regsets.
1256         (ppc_linux_core_read_description): Check if the pmu section is
1257         present and set isa207 in the features struct.
1258         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1259         (ppc32_linux_pmuregset): Declare.
1260         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1261         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1262         <ppc_sier_regnum>: New field.
1263         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1264         New enum values.
1265         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1266         values.
1267         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1268         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1269         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1270         ebb and pmu features.
1271
1272 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1273             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1274
1275         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1276         (tdesc_powerpc_isa207_vsx64l): Declare.
1277         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1278         (struct ppc_linux_features) <isa207>: New field.
1279         (ppc_linux_no_features): Add initializer for isa207 field.
1280         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1281         new tdescs.
1282         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1283         (NT_PPC_TAR): Define if not already defined.
1284         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1285         rs6000/powerpc-isa207-vsx64l.
1286         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1287         rs6000/powerpc-isa207-vsx64l.xml.
1288         * features/rs6000/power-tar.xml: New file.
1289         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1290         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1291         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1292         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1293         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1294         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1295         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1296         fetch_regset with the TAR regset.
1297         (store_register, store_ppc_registers): Call store_regset with the
1298         TAR regset.
1299         (ppc_linux_nat_target::read_description): Set isa207 field in the
1300         features struct if needed.
1301         * ppc-linux-tdep.c: Include
1302         features/rs6000/powerpc-isa207-vsx32l.c and
1303         features/rs6000/powerpc-isa207-vsx64l.c.
1304         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1305         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1306         regset.
1307         (ppc_linux_core_read_description): Check if the tar section is
1308         present and set isa207 in the features struct.
1309         (_initialize_ppc_linux_tdep): Call
1310         initialize_tdesc_powerpc_isa207_vsx32l and
1311         initialize_tdesc_powerpc_isa207_vsx64l.
1312         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1313         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1314         (enum) <PPC_TAR_REGNUM>: New enum value.
1315         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1316         feature.
1317         (ppc_process_record_op31): Record changes to TAR.
1318
1319 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1320             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1321
1322         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1323         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1324         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1325         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1326         (struct ppc_linux_features) <ppr_dscr>: New field.
1327         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1328         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1329         new tdescs.
1330         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1331         Define if not already defined.
1332         * features/Makefile (WHICH): Add
1333         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1334         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1335         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1336         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1337         * features/rs6000/power-dscr.xml: New file.
1338         * features/rs6000/power-ppr.xml: New file.
1339         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1340         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1341         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1342         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1343         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1344         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1345         * ppc-linux-nat.c: Include <sys/uio.h>.
1346         (fetch_regset, store_regset, check_regset): New functions.
1347         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1348         DSCR and PPR regsets.
1349         (store_register, store_ppc_registers): Call store_regset with
1350         DSCR and PPR regsets.
1351         (ppc_linux_get_hwcap2): New function.
1352         (ppc_linux_nat_target::read_description): Call
1353         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1354         features struct if needed.
1355         * ppc-linux-tdep.c: Include
1356         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1357         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1358         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1359         (ppc32_linux_dscrregset): New globals.
1360         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1361         and dscr regsets.
1362         (ppc_linux_core_read_description): Check if the ppr and dscr
1363         sections are present and set ppr_dscr in the features struct.
1364         (_initialize_ppc_linux_tdep): Call
1365         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1366         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1367         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1368         (ppc32_linux_dscrregset): Declare.
1369         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1370         <ppc_dscr_regnum>: New field.
1371         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1372         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1373         and dscr features.
1374         (ppc_process_record_op31): Record changes to PPR and DSCR.
1375
1376 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1377
1378         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1379         second initializer line for the have_* variables.  Initialize
1380         have_fpu to 0 instead of 1.
1381
1382 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1383
1384         * arch/ppc-linux-common.c (ppc_linux_match_description):
1385         Parenthesize tdesc assignements and indent them properly.
1386
1387 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1388
1389         * ppc-linux-nat.c (fetch_register): Change if statement to else
1390         if.
1391         (store_register): Likewise.
1392
1393 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1394
1395         * rs6000-tdep.c: Remove reggroups.h include.
1396         (rs6000_pseudo_register_reggroup_p): Remove.
1397         (rs6000_gdbarch_init): Remove call to
1398         set_tdesc_pseudo_register_reggroup_p.
1399
1400 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1401
1402         * reggroups.c (default_register_reggroup_p): Return true for
1403         decfloat registers and float_reggroup.
1404
1405 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1406
1407         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1408         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1409         ppc_linux_collect_vrregset by regcache_collect_regset.
1410
1411 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1412
1413         * linux-tdep.c (linux_collect_regset_section_cb): Use
1414         std::vector<gdb_byte> instead of char * and malloc for buf.
1415         Remove xfree.
1416
1417 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1418
1419         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1420         symtab_start instead of always using language_unknown.
1421
1422 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1423
1424         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1425         READ_P parameter, catch and ignore register access errors from
1426         either the old or new MISA location.
1427         (riscv_has_feature): Update call to riscv_read_misa_reg.
1428
1429 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1430
1431         * python/py-function.c (convert_values_to_python): Return
1432         gdbpy_ref<>.  Add header comment.
1433         (fnpy_call): Adjust.
1434
1435 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1436
1437         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1438         (cmdpy_completer_handle_brkchars): Adjust.
1439         (cmdpy_completer): Adjust.
1440
1441 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1442
1443         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1444         Pass correct regnum to raw_supply_zeroed.
1445
1446 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1447
1448         * regcache.c (cooked_read_test): Add CSKY to the list of
1449         architectures with a save_reggroup
1450
1451 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
1452
1453         PR gdb/23368
1454         * infrun.c (follow_exec): In the follow_exec_mode_new case,
1455         transfer terminal state from old new new inferior.
1456         * terminal.h (swap_terminal_info): New function.
1457         * inflow.c (swap_terminal_info): New function.
1458
1459 2018-10-23  Tom Tromey  <tom@tromey.com>
1460
1461         * record-btrace.c (get_thread_current_frame_id): Rename from
1462         get_thread_current_frame.  Return a frame_id.
1463         (record_btrace_start_replaying): Update.
1464
1465 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1466
1467         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
1468         for CSRs.
1469
1470 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
1471
1472         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
1473         have_nonsteppable_watchpoint attribute to 1.
1474
1475 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1476
1477         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
1478         register names.
1479         (struct register_alias): Rename to...
1480         (struct riscv_register_alias): ...this, and update comment.
1481         (riscv_register_aliases): Update type, and alias names.  Remove
1482         CSR names from this list.
1483         (riscv_register_name): Use riscv_gdb_reg_names for int and float
1484         register names.  Add an extra assertion.
1485         (riscv_is_regnum_a_named_csr): New function.
1486         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
1487
1488 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
1489
1490         * configure.tgt: Add configuration for s12z.
1491         * s12z-tdep.c:  New file.
1492         * NEWS: Mention new target.
1493
1494 2018-10-22  Jim Wilson  <jimw@sifive.com>
1495
1496         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
1497         FP reg smaller than FP reg size, and fill with -1 instead of 0.
1498
1499         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
1500         (riscv_register_type): Use them.
1501         (riscv_print_one_register_info): Handle union of floats same as float.
1502         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
1503         riscv_fpreg_q_type fields.
1504
1505 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1506
1507         * gdbarch.sh (gdbarch_num_cooked_regs): New.
1508         * gdbarch.h: Re-generate.
1509         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
1510         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
1511         * eval.c (evaluate_subexp_standard): Likewise.
1512         * findvar.c (value_of_register): Likewise.
1513         (value_of_register_lazy): Likewise.
1514         (address_from_register): Likewise.
1515         * frame.c (get_frame_register_bytes): Likewise.
1516         * gdbarch-selftests.c (register_to_value_test): Likewise.
1517         * h8300-tdep.c (h8300_register_type): Likewise.
1518         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
1519         (i386_svr4_reg_to_regnum): Likewise.
1520         * infcmd.c (default_print_registers_info): Likewise.
1521         (registers_info): Likewise.
1522         (print_vector_info): Likewise.
1523         (default_print_float_info): Likewise.
1524         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
1525         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
1526         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
1527         (mi_cmd_data_list_changed_registers): Likewise.
1528         (mi_cmd_data_list_register_values): Likewise.
1529         (mi_cmd_data_write_register_values): Likewise.
1530         (mi_cmd_trace_frame_collected): Likewise.
1531         * mips-tdep.c (print_gp_register_row): Likewise.
1532         (mips_print_registers_info): Likewise.
1533         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1534         * regcache.c (init_regcache_descr): Likewise.
1535         (register_size): Likewise.
1536         (register_dump::dump): Likewise.
1537         (cooked_read_test): Likewise.
1538         (cooked_write_test): Likewise.
1539         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
1540         (rs6000_gdbarch_init): Likewise.
1541         * stabsread.c (stab_reg_to_regnum): Likewise.
1542         * stack.c (info_frame_command): Likewise.
1543         * target-descriptions.c (tdesc_register_name): Likewise.
1544         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
1545         * tui/tui-regs.c (tui_show_register_group): Likewise.
1546         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
1547         (user_reg_map_regnum_to_name): Likewise.
1548         (value_of_user_reg): Likewise.
1549         (maintenance_print_user_registers): Likewise.
1550         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
1551         (xtensa_register_name): Likewise.
1552         (xtensa_register_type): Likewise.
1553         (xtensa_reg_to_regnum): Likewise.
1554         (xtensa_pseudo_register_read): Likewise.
1555         (xtensa_pseudo_register_write): Likewise.
1556
1557 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1558
1559         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
1560         correctly-sized buffer with raw_read.
1561         (amd64_pseudo_register_write): Use correctly-sized buffer for
1562         raw_read/raw_write.
1563
1564 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1565
1566         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
1567         in add_prefix_cmd of set print type.
1568
1569 2018-10-19  Tom Tromey  <tom@tromey.com>
1570
1571         PR tui/18388:
1572         * NEWS: Mention tabset deprecation.
1573         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
1574         (update_tab_width): New function.
1575         (tui_set_tab_width, tui_show_tab_width): New functions.
1576         (tui_set_tab_width_command): Use update_tab_width.
1577         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
1578         Add new "set tui tab-width" command.
1579         * tui/tui-source.c (tui_set_source_content): Update.
1580         * tui/tui-disasm.c (tui_set_disassem_content): Update.
1581         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
1582         Don't declare.
1583         (tui_tab_width): Declare.
1584         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
1585         (tui_set_default_tab_len): Remove.
1586
1587 2018-10-19  Tom Tromey  <tom@tromey.com>
1588
1589         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
1590         (key_is_backspace, tui_getc): Don't declare.
1591         * tui/tui-io.c (key_is_start_sequence): Now static.
1592         (key_is_end_sequence, key_is_backspace): Remove.
1593         (tui_getc): Now static.
1594
1595 2018-10-19  Tom Tromey  <tom@tromey.com>
1596
1597         * symfile.c (reread_symbols): Clear "static_links".
1598
1599 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
1600
1601         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
1602         define.
1603         (aarch64_linux_sigframe_init): Extra boundary checks.
1604
1605 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
1606
1607         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
1608         the possibly non-existent tdesc type 'vec128', but the type of raw
1609         register v16 instead.
1610
1611 2018-10-19  Gary Benson <gbenson@redhat.com>
1612
1613         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
1614
1615 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
1616
1617         PR cli/23785
1618         * cli/cli-dump.c (restore_binary_file): Check if "file" is
1619         NULL.
1620
1621 2018-10-17  Paul Koning  <paul_koning@dell.com>
1622
1623         * charset.c (convert_between_encodings): Fix unsigned overflow.
1624
1625 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
1626
1627         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
1628         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
1629         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
1630         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1631         New functions.
1632         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
1633         and fbsd_info_proc_mappings_header.
1634         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
1635         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1636         New.
1637
1638 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
1639
1640         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
1641         Solaris Maintainer.
1642
1643 2018-10-15  Tom Tromey  <tom@tromey.com>
1644
1645         * tui/tui.c (strcat_to_buf): Remove casts.
1646         * tui/tui-winsource.c (tui_show_source_line)
1647         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
1648         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
1649         * tui/tui-windata.c (tui_first_data_item_displayed)
1650         (tui_delete_data_content_windows, tui_erase_data_content)
1651         (tui_display_all_data, tui_display_data_from)
1652         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
1653         * tui/tui-win.c (tui_set_win_height)
1654         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
1655         casts.
1656         * tui/tui-win.c (tui_resize_all): Remove casts.
1657         (tui_scroll_backward_command, tui_set_focus)
1658         (tui_set_tab_width_command): Likewise.
1659         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
1660         * tui/tui-regs.c (tui_show_register_group): Remove cast.
1661         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
1662         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
1663         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
1664         Remove casts.
1665
1666 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1667
1668         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
1669         AArch64/ARM maintainer.
1670
1671 2018-10-11  Gary Benson <gbenson@redhat.com>
1672
1673         * interps.h (interp::m_name): Make private and mutable.
1674         * interps.c (interp::~interp): Free m_name.
1675
1676 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1677             Simon Marchi <simark@simark.ca>
1678
1679         * README (`configure' options): Add documentation for new
1680         "--enable-unit-tests" option.
1681         * acinclude.m4: Include "selftest.m4".
1682         * configure: Regenerate.
1683         * configure.ac: Use "GDB_AC_SELFTEST".
1684         * maint.c (maintenance_selftest): Update message informing
1685         that selftests have been disabled.
1686         (maintenance_info_selftests): Likewise.
1687         * selftest.m4: New file.
1688
1689 2018-10-10  Gary Benson <gbenson@redhat.com>
1690
1691         * remote.c (remote_target::remote_send_printf): Add
1692         missing va_end found by Coverity.
1693
1694 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
1695
1696         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
1697
1698 2018-10-09  Tom Tromey  <tom@tromey.com>
1699
1700         * configure: Rebuild.
1701         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
1702         * NEWS: Update --enable-ubsan documentation.
1703
1704 2018-10-09  Gary Benson <gbenson@redhat.com>
1705
1706         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
1707         found by Coverity.
1708
1709 2018-10-08  Tom Tromey  <tom@tromey.com>
1710
1711         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
1712         variable.
1713         (riscv_fbsd_init_abi): Likewise.
1714
1715 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1716         * valops.c (value_struct_elt_for_reference): Rename local variable
1717         to work around the shadowing a previous local warning.
1718
1719 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1720
1721         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
1722         * NEWS: Mention new FreeBSD/riscv native configuration.
1723         * configure.host: Add riscv*-*-freebsd*.
1724         * configure.nat: Likewise.
1725         * riscv-fbsd-nat.c: New file.
1726
1727 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1728
1729         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
1730         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
1731         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
1732         * NEWS: Mention new FreeBSD/riscv target.
1733         * configure.tgt: Add riscv*-*-freebsd*.
1734         * riscv-fbsd-tdep.c: New file.
1735         * riscv-fbsd-tdep.h: New file.
1736
1737 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1738
1739         * regcache.h (struct regcache_map_entry): Note that this type can
1740         be used with traditional frame caches.
1741         * trad-frame.c (trad_frame_set_reg_regmap): New.
1742         * trad-frame.h (trad_frame_set_reg_regmap): New.
1743
1744 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1745
1746         PR c++/16841
1747         * valops.c (get_virtual_base_offset): New function.
1748         (value_struct_elt_for_reference): Use it to get virtual base offset
1749         and add it in calculating class member address.
1750
1751 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
1752
1753         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1754         (check_producer): Check if the producer is codewarrior.
1755         (producer_is_codewarrior): New function.
1756         (lnp_state_machine::record_line): Ignore is_stmt flag for records
1757         produced by codewarrior.
1758         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1759
1760 2018-10-06  Tom Tromey  <tom@tromey.com>
1761
1762         PR python/19399:
1763         * python/py-inferior.c: Add "architecture" entry.
1764         (infpy_architecture): New function.
1765
1766 2018-10-06  Tom Tromey  <tom@tromey.com>
1767
1768         PR python/21765:
1769         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1770         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1771         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
1772         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1773
1774 2018-10-06  Tom Tromey  <tom@tromey.com>
1775
1776         PR build/17077:
1777         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1778         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1779         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1780         #include.
1781
1782 2018-10-06  Tom Tromey  <tom@tromey.com>
1783
1784         * python/py-breakpoint.c (bppy_get_location): Handle a
1785         bp_breakpoint without a location.
1786
1787 2018-10-06  Tom Tromey  <tom@tromey.com>
1788
1789         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1790         (_RegEx): Reformat help text.
1791         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1792         (AnyCallerIs, AnyCallerMatches): Reformat help text.
1793         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1794         text.
1795         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1796         (EnableXMethod, DisableXMethod): Remove help indentation.
1797         Capitalize meta-syntactic variables.
1798         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1799         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1800         Capitalize meta-syntactic variables.
1801         * python/lib/gdb/command/explore.py (ExploreCommand)
1802         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1803         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1804         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1805         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1806         Remove help indentation.
1807         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1808         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1809         (DisableFrameFilter, SetFrameFilterPriority)
1810         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1811
1812 2018-10-06  Tom Tromey  <tom@tromey.com>
1813
1814         PR tui/28819:
1815         * tui/tui-io.c (gdb_wgetch): New function.
1816         (tui_mld_getc, tui_getc): Use it.
1817
1818 2018-10-05  Tom Tromey  <tom@tromey.com>
1819
1820         * sol-thread.c (sol_thread_target::wait): Rename inner
1821         "save_ptid".
1822
1823 2018-10-04  Tom Tromey  <tom@tromey.com>
1824
1825         * configure: Rebuild.
1826         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1827
1828 2018-10-04  Tom Tromey  <tom@tromey.com>
1829
1830         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1831         declaration of "block".
1832
1833 2018-10-04  Tom Tromey  <tom@tromey.com>
1834
1835         * common/filestuff.c (fdwalk): Remove inner declaration of
1836         "result".
1837
1838 2018-10-04  Tom Tromey  <tom@tromey.com>
1839
1840         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1841         "structs_addr" and hoist declaration.
1842
1843 2018-10-04  Tom Tromey  <tom@tromey.com>
1844
1845         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1846         variable "size".
1847
1848 2018-10-04  Tom Tromey  <tom@tromey.com>
1849
1850         * mdebugread.c (parse_partial_symbols): Use std::string.
1851
1852 2018-10-04  Tom Tromey  <tom@tromey.com>
1853
1854         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1855         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1856         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1857         header.
1858         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1859         more inner scope.
1860         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1861         * varobj.c (varobj_update): Rename inner "newobj",
1862         "type_changed".
1863         * valprint.c (generic_emit_char): Rename inner "buf".
1864         * valops.c (find_overload_match): Rename inner "temp".
1865         (value_struct_elt_for_reference): Declare "v" in more inner
1866         scope.
1867         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1868         * unittests/array-view-selftests.c (run_tests): Rename inner
1869         "vec".
1870         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1871         header.
1872         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1873         "tsv" in more inner scope.
1874         (print_one_static_tracepoint_marker): Rename inner
1875         "tuple_emitter".
1876         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1877         (tic6x_push_dummy_call): Don't redeclare "addr".
1878         * target-float.c: Declare "dto" lower.
1879         * symtab.c (lookup_local_symbol): Rename inner "sym".
1880         (find_pc_sect_line): Rename inner "pc".
1881         * stack.c (print_frame): Don't redeclare "gdbarch".
1882         (return_command): Rename inner "gdbarch".
1883         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1884         "sp".
1885         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1886         header.
1887         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1888         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1889         scope.
1890         * remote.c (remote_target::update_thread_list): Don't redeclare
1891         "tp".
1892         (remote_target::process_initial_stop_replies): Rename inner
1893         "thread".
1894         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1895         (remote_target::wait_as): Don't redeclare "stop_reply".
1896         (remote_target::get_thread_local_address): Rename inner
1897         "result".
1898         (remote_target::get_tib_address): Likewise.
1899
1900         * regcache.c (cooked_read_test): Rename "regnum".
1901         * record-btrace.c (cmd_record_btrace_start): Rename inner
1902         "exception".
1903         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1904         loop header.
1905         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1906         header.
1907         (ppu2spu_sniffer): Rename inner "buf".
1908         * parse.c (operator_check_standard): Rename inner "type",
1909         "objfile".
1910         * p-valprint.c (pascal_val_print): Introduce new scope for
1911         "low_bound", "high_bound".
1912         * p-exp.y (yylex): Declare "i" in loop header.
1913         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1914         Lower declaration of "s".
1915         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1916         header.
1917         (nios2_push_dummy_call): Rename "len".
1918         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1919         "buf".
1920         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1921         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1922         (linux_xfer_osdata_modules): Likewise.
1923         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1924         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1925         (mips_o64_push_dummy_call): Likewise.
1926         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1927         "op".
1928         * mi/mi-main.c (list_available_thread_groups): Rename inner
1929         "tuple_emitter".
1930         (mi_cmd_data_read_memory): Rename inner "opts".
1931         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1932         "tuple_emitter".
1933         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1934         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1935         more inner scope.
1936         (parse_partial_symbols): Rename inner "pst", "p", "name"
1937         * main.c (captured_main_1): Rename inner "i"s.
1938         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1939         "oso2".
1940         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1941         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1942         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1943         (handle_signal_stop): Rename inner "gdbarch".
1944         (handle_command): Declare "signum" in loop header.
1945         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1946         "status".
1947         (examine_prologue): Rename inner "sol" and "sof".
1948         (ia64_extract_return_value): Rename inner "val".  Declare another
1949         "val" in a more inner scope.
1950         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1951         inner scope.
1952         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1953         "except".
1954         * findvar.c (default_read_var_value): Don't redeclare "addr".
1955         * f-exp.y (yylex): Declare "i" in loop header.
1956         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1957         Rename inner "type", "expect_type".
1958         (evaluate_subexp_for_sizeof): Rename inner "pc".
1959         * elfread.c (elf_symfile_read): Rename inner "abfd".
1960         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1961         "bytes_read".
1962         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1963         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1964         (dwarf_decode_line_header): Rename inner "lh".
1965         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1966         "offset".  Declare "i" in loop header.
1967         (disassemble_dwarf_expression): Rename inner "addr_size".
1968         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1969         inner "result".
1970         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1971         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1972         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1973         "inner_list_emitter".
1974         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1975         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1976         declaration in a block.
1977         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1978         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1979         "obstack_final_size".
1980         * cp-support.c (inspect_type): Declare "i" in loop header.
1981         * compile/compile.c (compile_instance::insert_symbol_error):
1982         Rename inner "e".
1983         * common/agent.c (agent_run_command): Remove inner "ret"
1984         declaration.
1985         * coffread.c (coff_symfile_read): Rename inner "name".
1986         (coff_symfile_read): Rename inner "abfd".
1987         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1988         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1989         "high".
1990         * c-exp.y (lex_one_token): Move "len" declaration lower.
1991         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1992         "gdbarch".
1993         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1994         "b".
1995         (watch_command_1): Declare "mark" later.
1996         (clear_command): Don't shadow "a" or "b".
1997         (delete_command): Rename inner "b".
1998         (delete_trace_command): Likewise.
1999         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2000         "op".
2001         (arm_gdbarch_init): Remove inner "e_flags".
2002         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2003         "offset" in inner blocks.
2004
2005 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2006
2007         * dwarf-index-write.c (file_write): Don't write if the vector is
2008         empty.
2009
2010 2018-10-05  Tom de Vries  <tdevries@suse.de>
2011
2012         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2013         PyArg_ParseTuple call.
2014
2015 2018-10-05  Tom de Vries  <tdevries@suse.de>
2016
2017         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2018         PyArg_ParseTuple call.
2019
2020 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2021
2022         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2023         to avoid exceeding 80 characters per line limit.
2024
2025 2018-10-04  Tom Tromey  <tom@tromey.com>
2026
2027         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2028         (reread_symbols): Update.
2029         * complaints.h (clear_complaints): Remove argument.
2030         * complaints.c (enum complaint_series): Remove.
2031         (series): Remove global.
2032         (complaint_internal): Update.
2033         (clear_complaints): Remove argument.
2034
2035 2018-10-04  Tom Tromey  <tom@tromey.com>
2036
2037         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2038         debugging symbols" message if there is a separate debug objfile.
2039
2040 2018-10-04  Tom Tromey  <tom@tromey.com>
2041
2042         PR cli/19551:
2043         * symfile.c (symbol_file_add_with_addrs): Update output.
2044         * psymtab.c (require_partial_symbols): Update output.
2045
2046 2018-10-04  Tom Tromey  <tom@tromey.com>
2047
2048         PR cli/22234:
2049         * complaints.c: Emit \n.
2050
2051 2018-10-04  Tom Tromey  <tom@tromey.com>
2052
2053         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2054         (separate_debug_file_exists, find_separate_debug_file)
2055         (add_symbol_file_command, reread_symbols, allocate_symtab)
2056         (allocate_compunit_symtab): Use filtered printing, not
2057         unfiltered.
2058         * psymtab.c (require_partial_symbols, dump_psymtab)
2059         (allocate_psymtab): Use filtered printing, not unfiltered.
2060
2061 2018-10-04  Tom Tromey  <tom@tromey.com>
2062
2063         * complaints.c (complaint_internal): Correctly check complaint
2064         count.
2065
2066 2018-10-04  Tom Tromey  <tom@tromey.com>
2067
2068         * complaints.h (struct complaints): Remove declaration.
2069         * complaints.c (clear_complaints): Remove an unused variable.
2070
2071 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2072
2073         * MAINTAINERS (Write After Approval): Add self.
2074
2075 2018-10-03  Tom Tromey  <tom@tromey.com>
2076
2077         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2078         "buffer_contents".
2079         * coffread.c (coff_symtab_read): Initialize "newobj".
2080
2081 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2082
2083         * dwarf2read.c (read_func_scope): Remove struct keyword in
2084         range-based for.
2085
2086 2018-10-03  Tom Tromey  <tom@tromey.com>
2087
2088         * README: Mention --enable-ubsan.
2089         * NEWS: Mention --enable-ubsan.
2090         * acinclude.m4: Include sanitize.m4.
2091         * configure: Rebuild.
2092         * configure.ac: Call AM_GDB_UBSAN.
2093         * sanitize.m4: New file.
2094
2095 2018-10-03  Tom Tromey  <tom@tromey.com>
2096
2097         * expression.h (enum exp_opcode): Use uint8_t as base type.
2098         * expprint.c (op_name): Handle invalid opcodes.
2099
2100 2018-10-03  Tom Tromey  <tom@tromey.com>
2101
2102         * parse.c (prefixify_expression): Add assert.
2103         (parse_exp_in_context_1): Throw exception if the expression is
2104         empty.
2105
2106 2018-10-03  Tom Tromey  <tom@tromey.com>
2107
2108         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2109
2110 2018-10-03  Tom Tromey  <tom@tromey.com>
2111
2112         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2113
2114 2018-10-03  Tom Tromey  <tom@tromey.com>
2115
2116         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2117         unsigned.
2118
2119 2018-10-03  Tom Tromey  <tom@tromey.com>
2120
2121         * findvar.c (extract_integer): Do work in an unsigned type.
2122
2123 2018-10-03  Tom Tromey  <tom@tromey.com>
2124
2125         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2126         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2127         base type.
2128         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2129         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2130         type.
2131         * c-lang.h (enum c_string_type_values): Use unsigned as base
2132         type.
2133         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2134
2135 2018-10-03  Tom Tromey  <tom@tromey.com>
2136
2137         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2138         <~dwarf2_frame_state_reg_info>: Update.
2139         <dwarf2_frame_state_reg_info>: Update.
2140         <alloc_regs>: Add assertion.  Update.
2141         <reg>: Now a std::vector.
2142         <num_regs>: Remove.
2143         <swap>: Update.
2144         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2145         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2146
2147 2018-10-03  Tom Tromey  <tom@tromey.com>
2148
2149         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2150
2151 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2152
2153         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2154
2155 2018-10-02  Tom Tromey  <tom@tromey.com>
2156
2157         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2158
2159 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2160
2161         * NEWS: Mention changed commands.
2162         * ser-uds.c: New file.
2163         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2164         * configure: Regenerate.
2165         * Makefile.in: Add new file.
2166         * serial.c (serial_open): Check if filename is a socket
2167         and lookup the appropriate interface accordingly.
2168
2169 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2170
2171         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2172         define.
2173         (AARCH64_EXTRA_MAGIC): Likewise.
2174         (AARCH64_FPSIMD_MAGIC): Likewise.
2175         (AARCH64_SVE_MAGIC): Likewise.
2176         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2177         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2178         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2179         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2180         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2181         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2182         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2183         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2184         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2185         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2186         (read_aarch64_ctx): Add function.
2187         (aarch64_linux_sigframe_init): Detect FP registers.
2188
2189 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2190
2191         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2192         (AARCH64_D0_REGNUM): Likewise.
2193         (AARCH64_S0_REGNUM): Likewise.
2194         (AARCH64_H0_REGNUM): Likewise.
2195         (AARCH64_B0_REGNUM): Likewise.
2196         (AARCH64_SVE_V0_REGNUM): Likewise.
2197         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2198         (AARCH64_D0_REGNUM): Likewise.
2199         (AARCH64_S0_REGNUM): Likewise.
2200         (AARCH64_H0_REGNUM): Likewise.
2201         (AARCH64_B0_REGNUM): Likewise.
2202         (AARCH64_SVE_V0_REGNUM): Likewise.
2203
2204 2018-10-01  Gary Benson <gbenson@redhat.com>
2205
2206         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2207         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2208         prfpregset_t instead of gdb_prfpregset_t.
2209         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2210         * configure, config.in: Rebuild.
2211
2212 2018-10-01  Gary Benson <gbenson@redhat.com>
2213
2214         * common/gdb_proc_service.h: New file, factored out from...
2215         * gdb_proc_service.h: Moved common code to the above file.
2216         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2217
2218 2018-10-01  Gary Benson <gbenson@redhat.com>
2219
2220         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2221         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2222
2223 2018-10-01  Gary Benson <gbenson@redhat.com>
2224
2225         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2226         (AC_CHECK_HEADERS): Check for linux/elf.h.
2227         * configure, config.in: Rebuild.
2228         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2229         doesn't define elf_fpregset_t.
2230
2231 2018-10-01  Gary Benson <gbenson@redhat.com>
2232
2233         * gdb_proc_service.h: Whitespace change.
2234
2235 2018-10-01  Tom Tromey  <tom@tromey.com>
2236
2237         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2238         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2239         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2240
2241 2018-10-01  Tom Tromey  <tom@tromey.com>
2242
2243         * README: Minor change.
2244
2245 2018-09-30  Pedro Alves  <palves@redhat.com>
2246
2247         * darwin-nat-info.c (darwin_debug_regions_recurse)
2248         (info_mach_exceptions_command): Remove unused local variables.
2249         * darwin-nat.c (darwin_decode_notify_message)
2250         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2251         (darwin_stop_inferior, darwin_setup_exceptions)
2252         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2253         (darwin_nat_target::attach, darwin_nat_target::detach)
2254         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2255         local variables.
2256         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2257         variables.
2258
2259 2018-09-29  Tom Tromey  <tom@tromey.com>
2260
2261         * README: Remove some leftover text.
2262
2263 2018-09-29  Tom Tromey  <tom@tromey.com>
2264
2265         * PROBLEMS: Rewrite.
2266         * README: Update.
2267
2268 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2269
2270         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2271         case with explicit breakpoint kind.
2272         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2273         'additional_info' and related logic.
2274         (riscv_debug_breakpoints): New variable.
2275         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2276         instruction to determine the breakpoint kind.
2277         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2278         flag.  Update description of 'set/show riscv
2279         use-compressed-breakpoints' flag.
2280
2281 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2282
2283         (NEWS): Mention changes to frame related commands.
2284         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2285         (add_prefix_cmd_suppress_notification): New function.
2286         (add_com_suppress_notification): Call
2287         add_cmd_suppress_notification.
2288         * command.h (add_cmd_suppress_notification): Declare.
2289         (add_prefix_cmd_suppress_notification): Declare.
2290         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2291         (parse_frame_specification): Moved from stack.c, with
2292         simplification to handle a single argument.
2293         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2294         switch to the selected frame.  Add a header comment.
2295         * stack.c: Remove 'safe-ctype.h' include.
2296         (find_frame_for_function): Add declaration.
2297         (find_frame_for_address): New function.
2298         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2299         (frame_selection_by_function_completer): New function.
2300         (info_frame_command): Rename to...
2301         (info_frame_command_core): ...this, and update parameter types.
2302         (select_frame_command): Rename to...
2303         (select_frame_command_core): ...this, and update parameter types.
2304         (frame_command): Rename to...
2305         (frame_command_core): ...this, and update parameter types.
2306         (class frame_command_helper): New class to wrap implementations of
2307         frame related sub-commands.
2308         (frame_apply_cmd_list): New static global.
2309         (frame_cmd_list): Make static.
2310         (select_frame_cmd_list): New global for sub-commands.
2311         (info_frame_cmd_list): New global for sub-commands.
2312         (_initialize_stack): Register sub-commands for 'frame',
2313         'select-frame', and 'info frame'.  Update 'frame apply' commands
2314         to use frame_apply_cmd_list.  Move function local static
2315         frame_apply_list to file static frame_apply_cmd_list for
2316         consistency.
2317         * stack.h (select_frame_command): Delete declarationn.
2318         (select_frame_for_mi): Declare new function.
2319
2320 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2321
2322         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2323         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2324         and NOP.
2325
2326 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2327
2328         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2329
2330 2018-09-26  Tom Tromey  <tom@tromey.com>
2331
2332         * valops.c (auto_abandon): Remove dead code.
2333
2334 2018-09-26  Tom Tromey  <tom@tromey.com>
2335
2336         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2337
2338 2018-09-24  Tom Tromey  <tom@tromey.com>
2339
2340         * common/pathstuff.c (get_standard_cache_dir): Make
2341         "xdg_cache_home" and "home" const.
2342         * top.c (init_history): Make "tmpenv" const.
2343         * main.c (get_init_files): Make "homedir" const.
2344
2345 2018-09-23  Tom Tromey  <tom@tromey.com>
2346
2347         PR python/18852:
2348         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2349
2350 2018-09-23  Tom Tromey  <tom@tromey.com>
2351
2352         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2353         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2354         * python/python-internal.h (gdbpy_handle_exception): Declare.
2355         * python/py-utils.c (gdbpy_handle_exception): New function.
2356
2357 2018-09-23  Tom Tromey  <tom@tromey.com>
2358
2359         PR python/17284:
2360         * python/py-type.c (typy_template_argument): Check for negative
2361         argument number.
2362
2363 2018-09-23  Tom Tromey  <tom@tromey.com>
2364
2365         PR python/14062:
2366         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2367
2368 2018-09-23  Tom Tromey  <tom@tromey.com>
2369
2370         PR python/18170:
2371         * python/py-value.c (valpy_int): Allow conversion from pointer
2372         type.
2373
2374 2018-09-23  Tom Tromey  <tom@tromey.com>
2375
2376         PR python/20126:
2377         * python/py-value.c (valpy_int): Respect type sign.
2378
2379 2018-09-23  Tom Tromey  <tom@tromey.com>
2380
2381         PR python/18352;
2382         * python/py-value.c (valpy_float): Allow conversions from int or
2383         char.
2384         (valpy_int, valpy_long): Allow conversions from float.
2385
2386 2018-09-23  Tom Tromey  <tom@tromey.com>
2387
2388         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2389         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2390
2391 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2392
2393         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2394         __sighndlr.
2395         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2396
2397 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2398
2399         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2400         target_terminal::ours().
2401
2402 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2403
2404         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2405         of vl to ULONGEST.
2406
2407 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2408
2409         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2410         redundant condition.
2411
2412 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2413
2414         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2415
2416         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2417         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2418         * sol-thread.c (ps_pdmodel): Don't guard definition.
2419
2420         * procfs.c: Fix formatting.
2421
2422         * procfs.c (sysset_t_alloc): Remove.
2423         (create_procinfo): Use XNEW instead of sysset_t_alloc.
2424         (procfs_debug_inferior): Likewise.
2425         (procfs_set_exec_trap): Likewise.
2426         (proc_set_traced_sysentry): Don't allocate argp dynamically.
2427         (proc_set_traced_sysexit): Likewise.
2428
2429         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2430         (dead_procinfo): Likewise.
2431         (proc_warn): Likewise.
2432         (proc_error): Likewise.
2433         (proc_get_LDT_entry): Likewise.
2434         (do_attach): Likewise.
2435         (procfs_target::pid_to_str): Likewise.
2436         (iterate_over_mappings): Likewise.
2437
2438         * procfs.c (create_procinfo): Fix ARI warning.
2439         (proc_get_status): Likewise.
2440         (proc_stop_process): Likewise.
2441         (proc_run_process): Likewise.
2442         (proc_kill): Likewise.
2443         (proc_get_LDT_entry): Likewise.
2444         (procfs_find_LDT_entry): Likewise.
2445         (proc_update_threads): Likewise.
2446         (proc_iterate_over_threads): Likewise.
2447         (do_attach): Likewise.
2448         (procfs_xfer_memory): Likewise.
2449         (invalidate_cache): Likewise.
2450         (procfs_target::resume): Likewise.
2451         (procfs_init_inferior): Likewise.
2452         (procfs_set_exec_trap): Likewise.
2453         (procfs_target::thread_alive): Likewise.
2454         (procfs_target::pid_to_exec_file): Likewise.
2455         (iterate_over_mappings): Likewise.
2456         (procfs_target::make_corefile_notes): Likewise.
2457         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2458
2459         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
2460         (procfs_find_LDT_entry): Likewise.
2461         * sol-thread.c (ps_lgetLDT): Likewise.
2462
2463 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2464
2465         PR tdep/17903
2466         * procfs.c (procfs_target): Declare pid_to_exec_file.
2467         (procfs_target::pid_to_exec_file): New.
2468
2469 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2470
2471         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
2472         renaming.
2473         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
2474         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
2475
2476 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2477
2478         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
2479         (supply_fpregset, fill_fpregset): Move ...
2480         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
2481         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
2482         Remove references to ioctl-based procfs.
2483         Include <sys/reg.h>.
2484         Remove PR_MODEL_NATIVE guards.
2485         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
2486         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
2487
2488 2018-09-19  Xavier Roirand  <roirand@adacore.com>
2489
2490         PR gdb/20981:
2491         * solib-darwin.c (darwin_get_dyld_bfd): New function.
2492         (darwin_solib_get_all_image_info_addr_at_init): Update call.
2493         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
2494
2495 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
2496
2497         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
2498         (fbsd_print_sockaddr_in6): Likewise.
2499
2500 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
2501             Chris January  <chris.january@arm.com>
2502
2503         * eval.c (skip_undetermined_arglist): Skip argument list helper.
2504         (evaluate_subexp_standard): Return a dummy type when
2505         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
2506         OP_F77_UNDETERMINED_ARGLIST case.
2507         * expression.h (enum noside): Update comment.
2508
2509 2018-09-19  George Vasick <george.vasick@oracle.com>
2510
2511         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
2512
2513 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
2514             April Chin <april.chin@oracle.com>
2515             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2516
2517         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
2518         uint_t lwpid_t.
2519         (create_procinfo): Print pids in /proc without leading zeros.
2520
2521 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
2522
2523         * nios2-tdep.c (nios2_gcc_target_options): New.
2524         (nios2_gdb_arch_init): Install new hook.
2525
2526 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2527
2528         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
2529         New file.
2530         * update-gnulib.sh: Apply patch.
2531         * configure: Re-generate.
2532
2533 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2534
2535         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
2536         description.  Make "info proc" command descriptions more
2537         consistent.
2538
2539 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2540
2541         * NEWS: Mention 'info proc files' command.
2542
2543 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2544
2545         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
2546         descriptors for IP_FILES and IP_ALL.
2547
2548 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2549
2550         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
2551         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
2552         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
2553         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
2554         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
2555         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
2556         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
2557         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
2558         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
2559         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
2560         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
2561         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
2562         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
2563         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
2564         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
2565         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
2566         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
2567         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
2568         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
2569         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
2570         (struct fbsd_sockaddr_un): New types.
2571         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
2572         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
2573         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
2574         (fbsd_core_info_proc_files): New functions.
2575         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
2576         IP_ALL.
2577         * fbsd-tdep.h (fbsd_info_proc_files_header)
2578         (fbsd_info_proc_files_entry): New.
2579
2580 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2581
2582         * defs.h (enum info_proc_what) [IP_FILES]: New value.
2583         * infcmd.c (info_proc_cmd_files): New function.
2584         (_initialize_infcmd): Register 'info proc files' command.
2585
2586 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2587
2588         * gnulib/aclocal-m4-deps.mk: Re-generate.
2589         * gnulib/aclocal.m4: Re-generate.
2590         * gnulib/config.in: Re-generate.
2591         * gnulib/configure: Re-generate.
2592         * gnulib/import/Makefile.am: Re-generate.
2593         * gnulib/import/Makefile.in: Re-generate.
2594         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2595         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2596         * gnulib/import/arpa_inet.in.h: New file.
2597         * gnulib/import/inet_ntop.c: New file.
2598         * gnulib/import/m4/arpa_inet_h.m4: New file.
2599         * gnulib/import/m4/inet_ntop.m4: New file.
2600         * gnulib/import/m4/netinet_in_h.m4: New file.
2601         * gnulib/import/m4/socklen.m4: New file.
2602         * gnulib/import/m4/sockpfaf.m4: New file.
2603         * gnulib/import/m4/stdalign.m4: New file.
2604         * gnulib/import/m4/sys_uio_h.m4: New file.
2605         * gnulib/import/netinet_in.in.h: New file.
2606         * gnulib/import/stdalign.in.h: New file.
2607         * gnulib/import/sys_socket.c: New file.
2608         * gnulib/import/sys_socket.in.h: New file.
2609         * gnulib/import/sys_uio.in.h: New file.
2610         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
2611         module.
2612
2613 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2614
2615         * gnulib/aclocal-m4-deps.mk: New file.
2616         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
2617         deterministically.
2618
2619 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2620
2621         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
2622         KVE_PATH.
2623
2624 2018-09-18  Tom Tromey  <tom@tromey.com>
2625
2626         * compile/compile-object-load.c (struct
2627         link_hash_table_cleanup_data): Add constructor and destructor.
2628         Use DISABLE_COPY_AND_ASSIGN.
2629         (~link_hash_table_cleanup_data): Rename from
2630         link_hash_table_free.  Now a destructor.
2631         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
2632
2633 2018-09-18  Tom Tromey  <tom@tromey.com>
2634
2635         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2636         * compile/compile-object-load.c (struct munmap_list): Move to
2637         header file.
2638         (munmap_list::add): Rename from munmap_list_add; rewrite.
2639         (munmap_list::~munmap_list): Rename from munmap_list_free.
2640         (munmap_listp_free_cleanup): Remove.
2641         (compile_object_load): Update.
2642         * compile/compile-object-load.h (struct munmap_list): Move from
2643         compile-object-load.c.  Rewrite.
2644
2645 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
2646
2647         * aarch64-tdep.c (pass_in_v): Use register size.
2648         (aarch64_extract_return_value): Likewise.
2649         (aarch64_store_return_value): Likewise.
2650
2651 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2652
2653         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
2654         rlim_t.
2655
2656 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2657
2658         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
2659         Fix short help line.
2660
2661 2018-09-17  Tom Tromey  <tom@tromey.com>
2662
2663         PR python/20445:
2664         * configure: Rebuild.
2665         * configure.ac: Conditionally use -DNDEBUG for Python.
2666
2667 2018-09-17  Tom Tromey  <tom@tromey.com>
2668
2669         * configure: Rebuild.
2670         * configure.ac: Use gmp as a library dependency when checking for
2671         mpfr.
2672
2673 2018-09-17  Pedro Alves  <palves@redhat.com>
2674
2675         * python/py-inferior.c (find_inferior_object): Delete.
2676
2677 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
2678
2679         * compile/compile-cplus-types.c
2680         (compile_cplus_instance::enter_scope): Don't use new_scope after
2681         std::move.
2682
2683 2018-09-17  Tom Tromey  <tom@tromey.com>
2684
2685         * common/pathstuff.c (get_standard_cache_dir): Use
2686         ~/Library/Caches on macOS.
2687         * common/pathstuff.h (get_standard_cache_dir): Update comment.
2688
2689 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
2690
2691         PR python/23669
2692         * breakpoint.c (commands_cmd_element): New.
2693         (_initialize_breakpoint): Assign commands_cmd_element.
2694         * breakpoint.h (commands_cmd_element): New.
2695         * cli/cli-script.c (while_cmd_element, if_command,
2696         define_cmd_element): New.
2697         (command_name_equals): Remove.
2698         (process_next_line): Compare commands by pointer, not by name.
2699         (_initialize_cli_script): Assign the various cmd_list_element
2700         variables.
2701         * compile/compile.c (compile_cmd_element): New.
2702         (_initialize_compile): Assign compile_cmd_element.
2703         * compile/compile.h (compile_cmd_element): New.
2704         * guile/guile.c (guile_cmd_element): New.
2705         (install_gdb_commands): Assign guile_cmd_element.
2706         * guile/guile.h (guile_cmd_element): New.
2707         * python/python.c (python_cmd_element): New.
2708         (_initialize_python): Assign python_cmd_element.
2709         * python/python.h (python_cmd_element): New.
2710         * tracepoint.c (while_stepping_cmd_element): New.
2711         (_initialize_tracepoint): Assign while_stepping_cmd_element.
2712         * tracepoint.h (while_stepping_cmd_element): New.
2713
2714 2018-09-17  Tom Tromey  <tom@tromey.com>
2715
2716         * infrun.c (save_infcall_suspend_state): Return
2717         infcall_suspend_state_up.
2718         (save_infcall_control_state): Return infcall_control_state_up.
2719         * inferior.h (save_infcall_suspend_state)
2720         (save_infcall_control_state): Declare later.  Return unique
2721         pointers.
2722
2723 2018-09-17  Tom Tromey  <tom@tromey.com>
2724
2725         * infrun.c (struct stop_context): Declare constructor,
2726         destructor, "changed" method.
2727         (stop_context::stop_context): Rename from save_stop_context.
2728         (stop_context::~stop_context): Rename from
2729         release_stop_context_cleanup.
2730         (normal_stop): Update.
2731         (stop_context::changed): Rename from stop_context_changed.  Return
2732         bool.
2733
2734 2018-09-17  Tom Tromey  <tom@tromey.com>
2735
2736         * inferior.h (struct infcall_suspend_state_deleter): New.
2737         (infcall_suspend_state_up): New typedef.
2738         (struct infcall_control_state_deleter): New.
2739         (infcall_control_state_up): New typedef.
2740         (make_cleanup_restore_infcall_suspend_state)
2741         (make_cleanup_restore_infcall_control_state): Don't declare.
2742         * infcall.c (call_function_by_hand_dummy): Update.
2743         * infrun.c (do_restore_infcall_suspend_state_cleanup)
2744         (make_cleanup_restore_infcall_suspend_state): Remove.
2745         (do_restore_infcall_control_state_cleanup)
2746         (make_cleanup_restore_infcall_control_state): Remove.
2747
2748 2018-09-17  Tom Tromey  <tom@tromey.com>
2749
2750         * gdbthread.h (struct thread_control_state): Add initializer.
2751         (class thread_info) <control>: Remove initializer.
2752         * inferior.h (struct inferior_control_state): Add initializer.
2753         (class inferior) <control>: Remove initializer.
2754         (exit_inferior_1): Update.
2755         * infrun.c (struct infcall_control_state): Add constructors.
2756         (save_infcall_control_state): Use new.
2757         (restore_infcall_control_state, discard_infcall_control_state):
2758         Use delete.
2759
2760 2018-09-17  Tom Tromey  <tom@tromey.com>
2761
2762         * infrun.c (struct infcall_suspend_state) <registers>: Now a
2763         unique_ptr.
2764         <siginfo_data>: Now a unique_xmalloc_ptr.
2765         (save_infcall_suspend_state, restore_infcall_suspend_state)
2766         (discard_infcall_suspend_state)
2767         (get_infcall_suspend_state_regcache): Update.
2768
2769 2018-09-17  Tom Tromey  <tom@tromey.com>
2770
2771         * gdbthread.h (struct thread_suspend_state): Add initializers.
2772         (class thread_info) <suspend>: Remove initializer.
2773         * infrun.c (struct infcall_suspend_state): Add initializers.
2774         (save_infcall_suspend_state): Use new.
2775         (discard_infcall_suspend_state): Use delete.
2776
2777 2018-09-16  Tom Tromey  <tom@tromey.com>
2778
2779         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2780         Remove.
2781         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2782         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2783         (py_varobj_iter_new): Likewise.
2784         (py_varobj_get_iterator): Use gdbpy_ref.
2785
2786 2018-09-16  Tom Tromey  <tom@tromey.com>
2787
2788         * python/py-threadevent.c (py_get_event_thread): Simplify.
2789         * python/py-inferior.c (infpy_thread_from_thread_handle):
2790         Return immediately after calling thread_to_thread_object.  Use
2791         Py_RETURN_NONE.
2792         (thread_to_thread_object): Set the exception on a NULL return.
2793
2794 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2795
2796         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2797
2798 2018-09-16  Tom Tromey  <tom@tromey.com>
2799
2800         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2801         Remove.
2802
2803 2018-09-16  Tom Tromey  <tom@tromey.com>
2804
2805         * python/python-internal.h (thread_to_thread_object): Change
2806         return type.
2807         * python/py-inferior.c (thread_to_thread_object): Return a new
2808         reference.
2809         (infpy_thread_from_thread_handle): Update.
2810         * python/py-infthread.c (gdbpy_selected_thread): Update.
2811         * python/py-stopevent.c (create_stop_event_object): Update.
2812         * python/py-threadevent.c (py_get_event_thread): Return a new
2813         reference.
2814         (py_get_event_thread): Update.
2815         * python/py-event.h (py_get_event_thread): Change return type.
2816         * python/py-continueevent.c (create_continue_event_object):
2817         Update.
2818
2819 2018-09-16  Tom Tromey  <tom@tromey.com>
2820
2821         * python/py-progspace.c (pspy_get_objfiles): Update.
2822         * python/python-internal.h (objfile_to_objfile_object): Change
2823         return type.
2824         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2825         Update.
2826         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2827         Update.
2828         * python/python.c (gdbpy_get_current_objfile): Update.
2829         (gdbpy_objfiles): Update.
2830         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2831         Update.
2832         (objfile_to_objfile_object): Return a new reference.
2833         * python/py-symtab.c (stpy_get_objfile): Update.
2834         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2835         Update.
2836
2837 2018-09-16  Tom Tromey  <tom@tromey.com>
2838
2839         * python/py-inferior.c (infpy_get_progspace): Update.
2840         * python/python-internal.h (pspace_to_pspace_object): Change
2841         return type.
2842         * python/py-newobjfileevent.c
2843         (create_clear_objfiles_event_object): Update.
2844         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2845         Update.
2846         * python/python.c (gdbpy_get_current_progspace): Update.
2847         (gdbpy_progspaces): Update.
2848         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2849         reference.
2850         * python/py-objfile.c (objfpy_get_progspace): Update.
2851         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2852         Update.
2853
2854 2018-09-16  Tom Tromey  <tom@tromey.com>
2855
2856         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2857         (solib_name, block_for_pc, find_pc_line): New functions.
2858         (execute_unwinders): Update.
2859         * python/py-block.c (gdbpy_block_for_pc): Remove.
2860         * python/py-inferior.c (infpy_get_progspace): New function.
2861         (inferior_object_getset) <progspace>: Add.
2862         * python/py-progspace.c (pspy_objfiles): Rewrite.
2863         (pspy_solib_name, pspy_block_for_pc)
2864         (pspy_find_pc_line, pspy_is_valid): New functions.
2865         (progspace_object_methods): Add entries for solib_name,
2866         block_for_pc, find_pc_line, is_valid.
2867         * python/python-internal.h (gdbpy_block_for_pc)
2868         (build_objfiles_list): Don't declare.
2869         * python/python.c: Don't include solib.h.
2870         (gdbpy_solib_name, gdbpy_find_pc_line)
2871         (gdbpy_get_current_progspace, build_objfiles_list)
2872         (gdbpy_objfiles): Remove.
2873         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2874         solib_name, find_pc_line>: Remove entries.
2875
2876 2018-09-16  Tom Tromey  <tom@tromey.com>
2877
2878         * top.c (new_ui_command): Use GNU style for metasyntactic
2879         variables.
2880         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2881         variables.
2882         * maint.c (maintenance_translate_address): Remove "<>" around
2883         text.
2884         * interps.c (interpreter_exec_cmd): Use GNU style for
2885         metasyntactic variables.
2886         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2887         metasyntactic variables.
2888         * tracepoint.c (tfind_range_command): Use GNU style for
2889         metasyntactic variables.
2890         (tfind_outside_command): Likewise.
2891         (_initialize_tracepoint): Likewise.
2892         * remote.c (extended_remote_target::create_inferior): Use GNU
2893         style for metasyntactic variables.
2894         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2895         metasyntactic variables.
2896         (adi_assign_command): Likewise.
2897
2898 2018-09-16  Tom Tromey  <tom@tromey.com>
2899
2900         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2901         metasyntactic variables.  Print message if no disassembler options
2902         are available.
2903
2904 2018-09-15  Tom Tromey  <tom@tromey.com>
2905
2906         * infcmd.c (get_inferior_args): Return const char *.
2907         * inferior.h (get_inferior_args): Return type now const.
2908         * linux-tdep.c (linux_fill_prpsinfo): Update.
2909         * procfs.c (procfs_target::make_corefile_notes): Update.
2910
2911 2018-09-07  Tom Tromey  <tom@tromey.com>
2912
2913         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2914         inside the TRY.
2915
2916 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2917
2918         * nios2-tdep.c (nios2_type_align): New.
2919         (nios2_gdb_arch_init): Install type_align hook.
2920
2921 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2922
2923         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2924         type that is neither object file owned, nor gdbarch owned.
2925         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2926         gdbarch is non-NULL.
2927         (alloc_type_instance): Allocate non-objfile owned types on the
2928         gdbarch obstack.
2929         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2930         using TYPE_ALLOC to ensure memory is allocated on the correct
2931         obstack.
2932         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2933         obstack, or the gdbarch obstack.
2934         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2935
2936 2018-09-14  Tom Tromey  <tom@tromey.com>
2937
2938         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2939         block.
2940
2941 2018-09-14  Tom Tromey  <tom@tromey.com>
2942
2943         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2944
2945 2018-09-13  Tom Tromey  <tom@tromey.com>
2946
2947         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2948         static.
2949
2950 2018-09-13  Tom Tromey  <tom@tromey.com>
2951
2952         * exec.c (try_open_exec_file): Use std::string.
2953
2954 2018-09-13  Tom Tromey  <tom@tromey.com>
2955
2956         * utils.h (gdb_bfd_errmsg): Return std::string.
2957         * exec.c (exec_file_attach): Update.
2958         * compile/compile-object-load.c (compile_object_load): Update.
2959         * utils.c (gdb_bfd_errmsg): Return std::string.
2960
2961 2018-09-13  Tom Tromey  <tom@tromey.com>
2962
2963         * procfs.c (struct procinfo_deleter): New.
2964         (procinfo_up): New typedef.
2965         (do_destroy_procinfo_cleanup): Remove.
2966         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2967
2968 2018-09-13  Tom Tromey  <tom@tromey.com>
2969
2970         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2971
2972 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2973 2018-09-13  Tom Tromey  <tom@tromey.com>
2974
2975         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2976         (pspy_get_objfiles): New function.
2977         (progspace_object_methods): New.
2978         (pspace_object_type): Add tp_methods callback.
2979         * python/python-internal.h (build_objfiles_list): New
2980         declaration.
2981         * python/python.c (build_objfiles_list): New function.
2982         (gdbpy_objfiles): Implement using build_objfiles_list.
2983         * NEWS: Mention the Progspace.objfiles method.
2984
2985 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2986
2987         * python/py-inferior.c (infpy_get_progspace): New function.
2988         (inferior_object_getset): Add progspace property.
2989         * NEWS: Mention the new property.
2990
2991 2018-09-13  Tom Tromey  <tom@tromey.com>
2992
2993         PR rust/23650:
2994         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2995
2996 2018-09-13  Tom Tromey  <tom@tromey.com>
2997
2998         PR rust/23626:
2999         * rust-lang.c (rust_enum_variant): Now static.
3000         (rust_empty_enum_p): New function.
3001         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3002         Handle empty enum.
3003
3004 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3005
3006         * python/py-inferior.c (infpy_repr): New.
3007         (inferior_object_type): Register infpy_repr.
3008         * python/py-objfile.c (objfpy_repr): New.
3009         (objfile_object_type): Register objfpy_repr.
3010
3011 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3012
3013         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3014
3015 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3016
3017         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3018         typo.
3019
3020 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3021
3022         * common/common-utils.c: Don't include '<sys/stat.h>'.
3023         (is_regular_file): Move to...
3024         * common/filestuff.c (is_regular_file): ... here.
3025         * common/common-utils.h (is_regular_file): Move to...
3026         * common/filestuff.h (is_regular_file): ... here.
3027
3028 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3029
3030         * skip.c (debug_skip): New variable.
3031         (skiplist_entry::do_skip_file_p): Add debug output.
3032         (skiplist_entry::do_skip_gfile_p): Likewise.
3033         (skiplist_entry::skip_function_p): Likewise.
3034         (_initialize_step_skip): Create debug command.
3035         * NEWS: Mention set/show debug skip.
3036
3037 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3038
3039         * darwin-nat.c (should_disable_startup_with_shell):
3040         New function.
3041         (darwin_nat_target::create_inferior): Add call.
3042
3043 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3044
3045         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3046         inf_port, msg_state>: Initialize.
3047         (struct darwin_thread_info) <signaled, single_step>: Change
3048         type and initialize.
3049         (struct darwin_thread_info) <event>: Initialize.
3050
3051 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3052
3053         PR gdb/23555
3054         PR gdb/23558
3055         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3056         guesses.
3057
3058 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3059
3060         Revert:
3061         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3062
3063         PR gdb/23555
3064         PR gdb/23558
3065         * gnulib/aclocal.m4: Regenerate.
3066         * gnulib/config.in: Regenerate.
3067         * gnulib/configure: Regenerate.
3068         * gnulib/import/Makefile.am: Update.
3069         * gnulib/import/Makefile.in: Update.
3070         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3071         * gnulib/import/_Noreturn.h: ... this.
3072         * gnulib/import/alloca.in.h: Update.
3073         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3074         * gnulib/import/arg-nonnull.h: ... this.
3075         * gnulib/import/assure.h: Update.
3076         * gnulib/import/at-func.c: Update.
3077         * gnulib/import/basename-lgpl.c: Update.
3078         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3079         * gnulib/import/c++defs.h: ... this.
3080         * gnulib/import/canonicalize-lgpl.c: Update.
3081         * gnulib/import/cdefs.h: Update.
3082         * gnulib/import/chdir-long.c: Update.
3083         * gnulib/import/chdir-long.h: Update.
3084         * gnulib/import/cloexec.c: Update.
3085         * gnulib/import/cloexec.h: Update.
3086         * gnulib/import/close.c: Update.
3087         * gnulib/import/closedir.c: Update.
3088         * gnulib/import/config.charset: Update.
3089         * gnulib/import/dirent-private.h: Update.
3090         * gnulib/import/dirent.in.h: Update.
3091         * gnulib/import/dirfd.c: Update.
3092         * gnulib/import/dirname-lgpl.c: Update.
3093         * gnulib/import/dirname.h: Update.
3094         * gnulib/import/dosname.h: Update.
3095         * gnulib/import/dup-safer-flag.c: Update.
3096         * gnulib/import/dup-safer.c: Update.
3097         * gnulib/import/dup.c: Update.
3098         * gnulib/import/dup2.c: Update.
3099         * gnulib/import/errno.in.h: Update.
3100         * gnulib/import/error.c: Update.
3101         * gnulib/import/error.h: Update.
3102         * gnulib/import/exitfail.c: Update.
3103         * gnulib/import/exitfail.h: Update.
3104         * gnulib/import/extra/update-copyright: Update.
3105         * gnulib/import/fchdir.c: Update.
3106         * gnulib/import/fcntl.c: Update.
3107         * gnulib/import/fcntl.in.h: Update.
3108         * gnulib/import/fd-hook.c: Update.
3109         * gnulib/import/fd-hook.h: Update.
3110         * gnulib/import/fd-safer-flag.c: Update.
3111         * gnulib/import/fd-safer.c: Update.
3112         * gnulib/import/fdopendir.c: Update.
3113         * gnulib/import/filename.h: Update.
3114         * gnulib/import/filenamecat-lgpl.c: Update.
3115         * gnulib/import/filenamecat.h: Update.
3116         * gnulib/import/flexmember.h: Update.
3117         * gnulib/import/float+.h: Update.
3118         * gnulib/import/float.c: Update.
3119         * gnulib/import/float.in.h: Update.
3120         * gnulib/import/fnmatch.c: Update.
3121         * gnulib/import/fnmatch.in.h: Update.
3122         * gnulib/import/fnmatch_loop.c: Update.
3123         * gnulib/import/fpucw.h: Update.
3124         * gnulib/import/frexp.c: Update.
3125         * gnulib/import/frexpl.c: Update.
3126         * gnulib/import/fstat.c: Update.
3127         * gnulib/import/fstatat.c: Update.
3128         * gnulib/import/getcwd-lgpl.c: Update.
3129         * gnulib/import/getcwd.c: Update.
3130         * gnulib/import/getdtablesize.c: Update.
3131         * gnulib/import/getlogin_r.c: Update.
3132         * gnulib/import/getprogname.c: Update.
3133         * gnulib/import/getprogname.h: Update.
3134         * gnulib/import/gettext.h: Update.
3135         * gnulib/import/gettimeofday.c: Update.
3136         * gnulib/import/glob-libc.h: Update.
3137         * gnulib/import/glob.c: Update.
3138         * gnulib/import/glob.in.h: Update.
3139         * gnulib/import/glob_internal.h: Update.
3140         * gnulib/import/glob_pattern_p.c: Update.
3141         * gnulib/import/globfree.c: Update.
3142         * gnulib/import/hard-locale.c: Update.
3143         * gnulib/import/hard-locale.h: Update.
3144         * gnulib/import/intprops.h: Update.
3145         * gnulib/import/inttypes.in.h: Update.
3146         * gnulib/import/isnan.c: Update.
3147         * gnulib/import/isnand-nolibm.h: Update.
3148         * gnulib/import/isnand.c: Update.
3149         * gnulib/import/isnanl-nolibm.h: Update.
3150         * gnulib/import/isnanl.c: Update.
3151         * gnulib/import/itold.c: Update.
3152         * gnulib/import/libc-config.h: Update.
3153         * gnulib/import/limits.in.h: Update.
3154         * gnulib/import/localcharset.c: Update.
3155         * gnulib/import/localcharset.h: Update.
3156         * gnulib/import/localtime-buffer.c: Update.
3157         * gnulib/import/localtime-buffer.h: Update.
3158         * gnulib/import/lstat.c: Update.
3159         * gnulib/import/m4/00gnulib.m4: Update.
3160         * gnulib/import/m4/__inline.m4: Update.
3161         * gnulib/import/m4/absolute-header.m4: Update.
3162         * gnulib/import/m4/alloca.m4: Update.
3163         * gnulib/import/m4/builtin-expect.m4: Update.
3164         * gnulib/import/m4/canonicalize.m4: Update.
3165         * gnulib/import/m4/chdir-long.m4: Update.
3166         * gnulib/import/m4/close.m4: Update.
3167         * gnulib/import/m4/closedir.m4: Update.
3168         * gnulib/import/m4/configmake.m4: Update.
3169         * gnulib/import/m4/d-ino.m4: Update.
3170         * gnulib/import/m4/d-type.m4: Update.
3171         * gnulib/import/m4/dirent_h.m4: Update.
3172         * gnulib/import/m4/dirfd.m4: Update.
3173         * gnulib/import/m4/dirname.m4: Update.
3174         * gnulib/import/m4/double-slash-root.m4: Update.
3175         * gnulib/import/m4/dup.m4: Update.
3176         * gnulib/import/m4/dup2.m4: Update.
3177         * gnulib/import/m4/eealloc.m4: Update.
3178         * gnulib/import/m4/environ.m4: Update.
3179         * gnulib/import/m4/errno_h.m4: Update.
3180         * gnulib/import/m4/error.m4: Update.
3181         * gnulib/import/m4/exponentd.m4: Update.
3182         * gnulib/import/m4/exponentl.m4: Update.
3183         * gnulib/import/m4/extensions.m4: Update.
3184         * gnulib/import/m4/extern-inline.m4: Update.
3185         * gnulib/import/m4/fchdir.m4: Update.
3186         * gnulib/import/m4/fcntl-o.m4: Update.
3187         * gnulib/import/m4/fcntl.m4: Update.
3188         * gnulib/import/m4/fcntl_h.m4: Update.
3189         * gnulib/import/m4/fdopendir.m4: Update.
3190         * gnulib/import/m4/filenamecat.m4: Update.
3191         * gnulib/import/m4/flexmember.m4: Update.
3192         * gnulib/import/m4/float_h.m4: Update.
3193         * gnulib/import/m4/fnmatch.m4: Update.
3194         * gnulib/import/m4/fnmatch_h.m4: Update.
3195         * gnulib/import/m4/fpieee.m4: Update.
3196         * gnulib/import/m4/frexp.m4: Update.
3197         * gnulib/import/m4/frexpl.m4: Update.
3198         * gnulib/import/m4/fstat.m4: Update.
3199         * gnulib/import/m4/fstatat.m4: Update.
3200         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3201         * gnulib/import/m4/getcwd-path-max.m4: Update.
3202         * gnulib/import/m4/getcwd.m4: Update.
3203         * gnulib/import/m4/getdtablesize.m4: Update.
3204         * gnulib/import/m4/getlogin.m4: Update.
3205         * gnulib/import/m4/getlogin_r.m4: Update.
3206         * gnulib/import/m4/getpagesize.m4: Update.
3207         * gnulib/import/m4/getprogname.m4: Update.
3208         * gnulib/import/m4/gettimeofday.m4: Update.
3209         * gnulib/import/m4/glibc21.m4: Update.
3210         * gnulib/import/m4/glob.m4: Update.
3211         * gnulib/import/m4/glob_h.m4: Update.
3212         * gnulib/import/m4/gnulib-cache.m4: Update.
3213         * gnulib/import/m4/gnulib-common.m4: Update.
3214         * gnulib/import/m4/gnulib-comp.m4: Update.
3215         * gnulib/import/m4/gnulib-tool.m4: Update.
3216         * gnulib/import/m4/hard-locale.m4: Update.
3217         * gnulib/import/m4/include_next.m4: Update.
3218         * gnulib/import/m4/inttypes-pri.m4: Update.
3219         * gnulib/import/m4/inttypes.m4: Update.
3220         * gnulib/import/m4/isnand.m4: Update.
3221         * gnulib/import/m4/isnanl.m4: Update.
3222         * gnulib/import/m4/largefile.m4: Update.
3223         * gnulib/import/m4/limits-h.m4: Update.
3224         * gnulib/import/m4/localcharset.m4: Update.
3225         * gnulib/import/m4/locale-fr.m4: Update.
3226         * gnulib/import/m4/locale-ja.m4: Update.
3227         * gnulib/import/m4/locale-zh.m4: Update.
3228         * gnulib/import/m4/localtime-buffer.m4: Update.
3229         * gnulib/import/m4/longlong.m4: Update.
3230         * gnulib/import/m4/lstat.m4: Update.
3231         * gnulib/import/m4/malloc.m4: Update.
3232         * gnulib/import/m4/malloca.m4: Update.
3233         * gnulib/import/m4/math_h.m4: Update.
3234         * gnulib/import/m4/mbrtowc.m4: Update.
3235         * gnulib/import/m4/mbsinit.m4: Update.
3236         * gnulib/import/m4/mbsrtowcs.m4: Update.
3237         * gnulib/import/m4/mbstate_t.m4: Update.
3238         * gnulib/import/m4/memchr.m4: Update.
3239         * gnulib/import/m4/memmem.m4: Update.
3240         * gnulib/import/m4/mempcpy.m4: Update.
3241         * gnulib/import/m4/memrchr.m4: Update.
3242         * gnulib/import/m4/mkdir.m4: Update.
3243         * gnulib/import/m4/mkstemp.m4: Update.
3244         * gnulib/import/m4/mmap-anon.m4: Update.
3245         * gnulib/import/m4/mode_t.m4: Update.
3246         * gnulib/import/m4/msvc-inval.m4: Update.
3247         * gnulib/import/m4/msvc-nothrow.m4: Update.
3248         * gnulib/import/m4/multiarch.m4: Update.
3249         * gnulib/import/m4/nocrash.m4: Update.
3250         * gnulib/import/m4/off_t.m4: Update.
3251         * gnulib/import/m4/onceonly.m4: Update.
3252         * gnulib/import/m4/open-cloexec.m4: Update.
3253         * gnulib/import/m4/open.m4: Update.
3254         * gnulib/import/m4/openat.m4: Update.
3255         * gnulib/import/m4/opendir.m4: Update.
3256         * gnulib/import/m4/pathmax.m4: Update.
3257         * gnulib/import/m4/rawmemchr.m4: Update.
3258         * gnulib/import/m4/readdir.m4: Update.
3259         * gnulib/import/m4/readlink.m4: Update.
3260         * gnulib/import/m4/realloc.m4: Update.
3261         * gnulib/import/m4/rename.m4: Update.
3262         * gnulib/import/m4/rewinddir.m4: Update.
3263         * gnulib/import/m4/rmdir.m4: Update.
3264         * gnulib/import/m4/save-cwd.m4: Update.
3265         * gnulib/import/m4/secure_getenv.m4: Update.
3266         * gnulib/import/m4/setenv.m4: Update.
3267         * gnulib/import/m4/signal_h.m4: Update.
3268         * gnulib/import/m4/ssize_t.m4: Update.
3269         * gnulib/import/m4/stat-time.m4: Update.
3270         * gnulib/import/m4/stat.m4: Update.
3271         * gnulib/import/m4/std-gnu11.m4: Update.
3272         * gnulib/import/m4/stdbool.m4: Update.
3273         * gnulib/import/m4/stddef_h.m4: Update.
3274         * gnulib/import/m4/stdint.m4: Update.
3275         * gnulib/import/m4/stdio_h.m4: Update.
3276         * gnulib/import/m4/stdlib_h.m4: Update.
3277         * gnulib/import/m4/strchrnul.m4: Update.
3278         * gnulib/import/m4/strdup.m4: Update.
3279         * gnulib/import/m4/strerror.m4: Update.
3280         * gnulib/import/m4/string_h.m4: Update.
3281         * gnulib/import/m4/strstr.m4: Update.
3282         * gnulib/import/m4/strtok_r.m4: Update.
3283         * gnulib/import/m4/sys_socket_h.m4: Update.
3284         * gnulib/import/m4/sys_stat_h.m4: Update.
3285         * gnulib/import/m4/sys_time_h.m4: Update.
3286         * gnulib/import/m4/sys_types_h.m4: Update.
3287         * gnulib/import/m4/tempname.m4: Update.
3288         * gnulib/import/m4/time_h.m4: Update.
3289         * gnulib/import/m4/unistd-safer.m4: Update.
3290         * gnulib/import/m4/unistd_h.m4: Update.
3291         * gnulib/import/m4/warn-on-use.m4: Update.
3292         * gnulib/import/m4/wchar_h.m4: Update.
3293         * gnulib/import/m4/wchar_t.m4: Update.
3294         * gnulib/import/m4/wctype_h.m4: Update.
3295         * gnulib/import/m4/wint_t.m4: Update.
3296         * gnulib/import/malloc.c: Update.
3297         * gnulib/import/malloc/scratch_buffer.h: Update.
3298         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3299         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3300         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3301         * gnulib/import/malloca.c: Update.
3302         * gnulib/import/malloca.h: Update.
3303         * gnulib/import/malloca.valgrind: Update.
3304         * gnulib/import/math.in.h: Update.
3305         * gnulib/import/mbrtowc.c: Update.
3306         * gnulib/import/mbsinit.c: Update.
3307         * gnulib/import/mbsrtowcs-impl.h: Update.
3308         * gnulib/import/mbsrtowcs-state.c: Update.
3309         * gnulib/import/mbsrtowcs.c: Update.
3310         * gnulib/import/memchr.c: Update.
3311         * gnulib/import/memmem.c: Update.
3312         * gnulib/import/mempcpy.c: Update.
3313         * gnulib/import/memrchr.c: Update.
3314         * gnulib/import/mkdir.c: Update.
3315         * gnulib/import/mkstemp.c: Update.
3316         * gnulib/import/msvc-inval.c: Update.
3317         * gnulib/import/msvc-inval.h: Update.
3318         * gnulib/import/msvc-nothrow.c: Update.
3319         * gnulib/import/msvc-nothrow.h: Update.
3320         * gnulib/import/open.c: Update.
3321         * gnulib/import/openat-die.c: Update.
3322         * gnulib/import/openat-priv.h: Update.
3323         * gnulib/import/openat-proc.c: Update.
3324         * gnulib/import/openat.c: Update.
3325         * gnulib/import/openat.h: Update.
3326         * gnulib/import/opendir.c: Update.
3327         * gnulib/import/pathmax.h: Update.
3328         * gnulib/import/pipe-safer.c: Update.
3329         * gnulib/import/rawmemchr.c: Update.
3330         * gnulib/import/readdir.c: Update.
3331         * gnulib/import/readlink.c: Update.
3332         * gnulib/import/realloc.c: Update.
3333         * gnulib/import/ref-add.sin: Update.
3334         * gnulib/import/ref-del.sin: Update.
3335         * gnulib/import/rename.c: Update.
3336         * gnulib/import/rewinddir.c: Update.
3337         * gnulib/import/rmdir.c: Update.
3338         * gnulib/import/same-inode.h: Update.
3339         * gnulib/import/save-cwd.c: Update.
3340         * gnulib/import/save-cwd.h: Update.
3341         * gnulib/import/scratch_buffer.h: Update.
3342         * gnulib/import/secure_getenv.c: Update.
3343         * gnulib/import/setenv.c: Update.
3344         * gnulib/import/signal.in.h: Update.
3345         * gnulib/import/stat-time.c: Update.
3346         * gnulib/import/stat-time.h: Update.
3347         * gnulib/import/stat-w32.c: Update.
3348         * gnulib/import/stat-w32.h: Update.
3349         * gnulib/import/stat.c: Update.
3350         * gnulib/import/stdbool.in.h: Update.
3351         * gnulib/import/stddef.in.h: Update.
3352         * gnulib/import/stdint.in.h: Update.
3353         * gnulib/import/stdio.in.h: Update.
3354         * gnulib/import/stdlib.in.h: Update.
3355         * gnulib/import/str-two-way.h: Update.
3356         * gnulib/import/strchrnul.c: Update.
3357         * gnulib/import/strdup.c: Update.
3358         * gnulib/import/streq.h: Update.
3359         * gnulib/import/strerror-override.c: Update.
3360         * gnulib/import/strerror-override.h: Update.
3361         * gnulib/import/strerror.c: Update.
3362         * gnulib/import/string.in.h: Update.
3363         * gnulib/import/stripslash.c: Update.
3364         * gnulib/import/strnlen1.c: Update.
3365         * gnulib/import/strnlen1.h: Update.
3366         * gnulib/import/strstr.c: Update.
3367         * gnulib/import/strtok_r.c: Update.
3368         * gnulib/import/sys_stat.in.h: Update.
3369         * gnulib/import/sys_time.in.h: Update.
3370         * gnulib/import/sys_types.in.h: Update.
3371         * gnulib/import/tempname.c: Update.
3372         * gnulib/import/tempname.h: Update.
3373         * gnulib/import/time.in.h: Update.
3374         * gnulib/import/unistd--.h: Update.
3375         * gnulib/import/unistd-safer.h: Update.
3376         * gnulib/import/unistd.in.h: Update.
3377         * gnulib/import/unsetenv.c: Update.
3378         * gnulib/import/verify.h: Update.
3379         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3380         * gnulib/import/wchar.in.h: Update.
3381         * gnulib/import/wctype.in.h: Update.
3382         * gnulib/import/xalloc-oversized.h: Update.
3383         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3384         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3385
3386 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3387
3388         * record-btrace.c (get_thread_current_frame): Remove
3389         old_inferior_ptid.
3390
3391 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3392
3393         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3394         with check_tag to 1 if and only if the type is tagged and the
3395         component being searched cannot been found in the current
3396         view. Otherwise, always call ada_to_fixed_type with
3397         check_tag to 0.
3398
3399 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3400
3401         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3402         declaration.
3403         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3404         * ada-varobj.c (ada_varobj_get_number_of_children,
3405         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3406
3407 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3408
3409         * ada-valprint.c (ada_value_print): Use type instead of
3410         enclosing type.
3411
3412 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3413
3414         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3415         an array of access to unconstrained array.
3416
3417 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3418
3419         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3420         (ada_check_typedef): Use it.
3421
3422 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3423
3424         * ada-varobj.c (ada_varobj_describe_struct_child)
3425         (ada_varobj_describe_child): Handle union case like struct one.
3426
3427 2018-09-10  Tom Tromey  <tom@tromey.com>
3428
3429         PR python/18380:
3430         * python/python.c (_initialize_python): Make example in "python"
3431         help work in Python 3.
3432
3433 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
3434
3435         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3436         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
3437         $(EXEEXT) to the script, as it is not a program.
3438
3439 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3440
3441         * python/py-prettyprint.c (pretty_print_one_value): Return
3442         gdbpy_ref<>.
3443         (print_string_repr): Adjust.
3444         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3445         * python/python-internal.h (apply_varobj_pretty_printer): Return
3446         gdbpy_ref<>.
3447         * varobj.c (varobj_value_get_print_value): Adjust.
3448
3449 2018-09-08  Tom Tromey  <tom@tromey.com>
3450
3451         PR python/16047:
3452         * python/py-prettyprint.c (pretty_print_one_value): Check for
3453         to_string method.
3454
3455 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3456
3457         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3458         replace_operator_with_call.
3459
3460 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3461
3462         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
3463
3464 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3465
3466         * ada-typeprint.c (print_range): Print the bounds using TYPE
3467         rather than its TYPE_TARGET_TYPE.
3468
3469 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3470
3471         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
3472         call to ada_to_fixed_value_create.
3473
3474 2018-09-08  Jerome Guitton  <guitton@adacore.com>
3475
3476         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
3477
3478 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3479
3480         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
3481         by calls to error.
3482
3483 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3484
3485         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
3486         Move update of loop variable "fi".
3487
3488 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3489
3490         * ada-lang.c (value_assign_to_component): In the case of
3491         big-endian targets, extract the bits of the given VAL
3492         using an src_offset of zero if container is not a scalar.
3493
3494 2018-09-06  Simon Ser  <contact@emersion.fr>
3495
3496         PR gdb/23105
3497         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
3498         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3499         * fbsd-tdep.c (fbsd_make_note_desc): New.
3500         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
3501         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
3502         * target.h (enum target_object) Add FreeBSD-specific
3503         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3504
3505 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3506
3507         * compile/compile-c.h (generate_c_for_variable_locations):
3508         Change reference to pointer.
3509         * compile/compile-c-support.c (compile_program) <compute>:
3510         Likewise.
3511         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
3512         (generate_c_for_for_one_variable): Likewise
3513         (generate_c_for_variable_locations): Likewise
3514         * compile/compile-c-types.c (compile_c_instance::convert_type):
3515         Likewise
3516         * compile/compile-cplus-symbols.c (convert_one_symbol):
3517         std::move the scope passed to enter_scope.
3518         * compile/compile-cplus-types.c
3519         (compile_cplus_instance::enter_scope): Make parameter
3520         rvalue-reference.
3521         (compile_cplus_instance::new_scope): Change reference to
3522         pointer.
3523         (compile_cplus_instance::convert_type): Likewise
3524         (compile_cplus_convert_typedef): std::move the scope passed to
3525         enter_scope.
3526         (compile_cplus_convert_struct_or_union): Likewise.
3527         (compile_cplus_convert_enum): Likewise.
3528         (compile_cplus_convert_namespace): Likewise.
3529         * compile/compile-cplus.h (compile_cplus_instance)
3530         <enter_scope>: Make parameter rvalue-reference.
3531         * compile/compile-internal.h (compile_instance)
3532         <get_cached_type>: Likewise
3533         * compile/compile-loc2c.c (push): Likewise
3534         (pushf): Likewise
3535         (unary): Likewise
3536         (binary): Likewise
3537         (print_label): Likewise
3538         (pushf_register_address): Likewise
3539         (pushf_register): Likewise
3540         (do_compile_dwarf_expr_to_c): Likewise
3541         (compile_dwarf_expr_to_c): Likewise
3542         (compile_dwarf_bounds_to_c): Likewise
3543         * compile/compile.c (compile_instance::get_cached_type):
3544         Likewise
3545         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
3546         (compile_dwarf_bounds_to_c): Likewise
3547         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
3548         (dwarf2_compile_property_to_c): Likewise
3549         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
3550         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
3551         Likewise
3552
3553 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3554
3555         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
3556         * tui/tui-data.c (init_content_element): Don't initialize it.
3557
3558 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3559
3560         * tui/tui-data.h (struct tui_win_info)
3561         <detail::opaque>: Remove.
3562         * tui/tui-data.c (init_win_info): Remove assignment.
3563
3564 2018-09-05  Tom Tromey  <tom@tromey.com>
3565
3566         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
3567         -Wformat-nonliteral.
3568         * target-float.c (host_float_ops<T>::to_string)
3569         (host_float_ops<T>::from_string): Use
3570         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3571         * configure: Rebuild.
3572
3573 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3574
3575         * printcmd.c (printf_c_string): Use
3576         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3577         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
3578
3579 2018-09-05  Tom Tromey  <tom@tromey.com>
3580
3581         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
3582
3583 2018-09-05  Tom de Vries  <tdevries@suse.de>
3584
3585         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
3586         with resolve_abstract_p == true.
3587         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
3588         defaulting to false. Propagate resolve_abstract_p to
3589         dwarf2_fetch_die_loc_sect_off.
3590         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
3591         parameter, defaulting to false.
3592         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
3593         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
3594         parameter.
3595         * dwarf2read.h (struct die_info): Forward-declare.
3596         (die_info_ptr): New typedef.
3597         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
3598
3599 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
3600
3601         GDB 8.2 released.
3602
3603 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3604             Pedro Alves  <palves@redhat.com>
3605
3606         * gnulib/Makefile.in (aclocal_m4_deps): Move to
3607         "aclocal-m4-deps.mk".  Include file here.
3608         $(srcdir)/aclocal.m4: Add "configure.ac".
3609         * gnulib/aclocal-m4-deps.mk: New file.
3610         * gnulib/update-gnulib.sh: Automatically update
3611         "aclocal-m4-deps.mk".
3612
3613 2018-09-04  Tom Tromey  <tom@tromey.com>
3614
3615         * configure: Rebuild.
3616         * configure.ac: Remove multi-ice code.
3617
3618 2018-09-04  Tom Tromey  <tom@tromey.com>
3619
3620         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
3621         (ada-exp.o): Update.
3622
3623 2018-09-04  Tom Tromey  <tom@tromey.com>
3624
3625         * Makefile.in (printcmd.o, target-float.o): Remove.
3626         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
3627
3628 2018-09-04  Tom Tromey  <tom@tromey.com>
3629
3630         * gnulib/Makefile.in: Remove obsolete comment.
3631         * Makefile.in: Remove obsolete comment.
3632
3633 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
3634
3635         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
3636         line with '+'.
3637
3638 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3639
3640         * riscv-tdep.c: Add 'prologue-value.h' include.
3641         (struct riscv_unwind_cache): New struct.
3642         (riscv_debug_unwinder): New global.
3643         (riscv_scan_prologue): Update arguments, capture register details
3644         from prologue scan.
3645         (riscv_skip_prologue): Reformat arguments line, move end of
3646         prologue calculation into riscv_scan_prologue.
3647         (riscv_frame_cache): Update return type, create
3648         riscv_unwind_cache, scan the prologue, and fill in remaining cache
3649         details.
3650         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
3651         (riscv_frame_prev_register): Use the trad_frame within the
3652         riscv_unwind_cache.
3653         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
3654         flag.
3655
3656 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3657
3658         * trad-frame.h (trad_frame_set_realreg): Declare.
3659         (trad_frame_set_addr): Declare.
3660         * trad-frame.c (trad_frame_set_realreg): Define new function.
3661         (trad_frame_set_addr): Define new function.
3662         (trad_frame_set_reg_realreg): Use new function.
3663         (trad_frame_set_reg_addr): Use new function.
3664
3665 2018-09-01  Keith Seitz  <keiths@redhat.com>
3666
3667         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
3668         pulongest instead of "%lld".
3669         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
3670         ATTRIBUTE_UNUSED.
3671
3672 2018-08-31  Tom Tromey  <tom@tromey.com>
3673
3674         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
3675         variant part type.
3676
3677 2018-08-31  Pedro Alves  <palves@redhat.com>
3678
3679         * gdbarch.h: Regenerate.
3680
3681 2018-08-31  Pedro Alves  <palves@redhat.com>
3682
3683         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
3684         * target.h (Hardware watchpoint interfaces): Describe
3685         continuable/steppable/non-steppable watchpoints.
3686         * gdbarch.h, gdbarch.c: Regenerate.
3687
3688 2018-08-31  Pedro Alves  <palves@redhat.com>
3689
3690         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
3691         Delete.
3692         * s390-linux-nat.c
3693         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
3694         * target.h (target_ops::have_continuable_watchpoint): Delete.
3695         (target_have_continuable_watchpoint): Delete.
3696         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
3697         * target-delegates.c: Regenerate.
3698
3699 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3700
3701         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
3702         the files present in "gnulib/import/m4/".
3703
3704 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3705
3706         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
3707         c.sw, c.swsp, and c.sdsp.
3708
3709 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3710
3711         * riscv-tdep.c (struct riscv_inferior_data): Delete.
3712         (riscv_read_misa_reg): Don't cache value read into inferior data.
3713         (riscv_new_inferior_data): Delete.
3714         (riscv_inferior_data_cleanup): Delete.
3715         (riscv_inferior_data): Delete.
3716         (riscv_invalidate_inferior_data): Delete.
3717         (_initialize_riscv_tdep): Remove initialisation of inferior data.
3718
3719 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
3720
3721         * compile/compile-cplus-types.c
3722         (compile_cplus_instance::leave_scope): Take the address of scope
3723         object.
3724         (compile_cplus_instance::convert_qualified_base): Compare quals
3725         to 0.
3726
3727 2018-08-30  Keith Seitz  <keiths@redhat.com>
3728
3729         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
3730         Use "%s" and host_address_to_string instead of "%p" in printf.
3731
3732 2018-08-29  Keith Seitz  <keiths@redhat.com>
3733
3734         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3735         and compile-cplus-types.c.
3736         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3737         * c-lang.c (cplus_language_defn): Set C++ compile functions.
3738         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3739         Declare.
3740         * compile/compile-c-support.c: Include compile-cplus.h.
3741         (load_libcompile): Templatize.
3742         (get_compile_context): "New" function.
3743         (c_get_compile_context): Use get_compile_context.
3744         (cplus_get_compile_context): New function.
3745         (cplus_push_user_expression, cplus_pop_user_expression)
3746         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3747         (cplus_compute_program): Define new structs/functions.
3748         * compile/compile-cplus-symmbols.c: New file.
3749         * compile/compile-cplus-types.c: New file.
3750         * compile/compile-cplus.h: New file.
3751         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3752         Declare.
3753         * compile/compile-object-load.c (get_out_value_type): Use
3754         strncmp_iw when comparing symbol names.
3755         (compile_object_load): Add mst_bss and mst_data.
3756         * compile/compile.c (_initialize_compile): Remove
3757         -Wno-implicit-function-declaration from `compile_args'.
3758         * compile/gcc-cp-plugin.h: New file.
3759         * NEWS: Mention C++ compile support and new debug options.
3760
3761 2018-08-29  Keith Seitz  <keiths@redhat.com>
3762
3763         * linespec.c (collect_info::add_symbol): Make virtual.
3764         (struct symbol_searcher_collect_info): New struct.
3765         (symbol_searcher::find_all_symbols): New method.
3766         * symtab.h (class symbol_searcher): New class.
3767
3768 2018-08-29  Keith Seitz  <keiths@redhat.com>
3769
3770         * linespec.c (struct linespec) <function_symbols, label_symbols>:
3771         Change to vector of block_symbol.  Update all users.
3772         (struct collect_info) <symbols>: Likewise.
3773         (collect_info::add_symbol): Take block_symbol as argument.
3774         Update all callers.
3775         (decode_compound_collector) <m_symbols>: Change type to vector
3776         of block_symbol.  Update all users.
3777         (decode_compound_collector::operator ()): Change parameter type
3778         to block_symbol.
3779         (find_method, find_function_symbols, find_linespec_symbols)
3780         (find_label_symbols_in_block, find_label_symbols): Change symbol
3781         vectors to block_symbol vectors.
3782         * symtab.h (symbol_found_callback_ftype): Change parameter type to
3783         block_symbol.
3784
3785 2018-08-29  Keith Seitz  <keiths@redhat.com>
3786
3787         * linespec.c (symbolp): Remove typedef and VEC definitions.
3788         (bound_minimal_symbol_d): Likewise.
3789
3790 2018-08-29  Keith Seitz  <keiths@redhat.com>
3791
3792         * linespec.c (decode_compound_collector::decode_compound_collector):
3793         Remove initialization for `m_symtabs'.
3794         (decode_compound_collector::release_symbols): Change return type
3795         to std::vector.  Update all callers.
3796         (class decode_compound_collector) <m_symbols>: Change type to
3797         std::vector.
3798         (lookup_prefix_sym): Change return type to std::vector.  Update all
3799         callers.
3800         (compare_symbols): Remove.
3801         (std_compare_symbols): Rename to `compare_symbols'.
3802         (find_method): Change `sym_classes' parameter to std::vector.
3803         Update all callers.  Use std::sort to sort sym_classes.
3804         (find_linespec_symbols): Remove cleanup.
3805
3806 2018-08-29  Keith Seitz  <keiths@redhat.com>
3807
3808         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3809         std::vector.  Update all users.
3810         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3811         (struct collect_info) <minimal_symbols>: Likewise.
3812         (compare_msymbols): Return bool.  Change parameters to const
3813         bound_minimal_symbol references.
3814         (find_method, find_function_symbols, find_linespec_symbols): Change
3815         `minsyms' parameter to std::vector.  Update all callers.
3816
3817 2018-08-29  Keith Seitz  <keiths@redhat.com>
3818
3819         * linespec.c (struct linespec) <label_symbols>: Change type to
3820         std::vector.  Update all users.
3821         (find_label_symbols_in_block): Change `result' parameter to
3822         std::vector.  Update all callers.
3823         (find_label_symbols): Return std::vector.  Update all callers.
3824
3825 2018-08-29  Keith Seitz  <keiths@redhat.com>
3826
3827         * linespec.c (struct linespec) <function_symbols>: Change type to
3828         std::vector.  Update all users.
3829         (struct collect_info) <function_symbols>: Likewise.
3830         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3831         (std_compare_symbols): New function.
3832         (find_method, find_function_symbols, find_linespec_symbols)
3833         (find_label_symbols_in_block): Change `symbols' parameter to
3834         std::vector.  Update all callers.
3835         (find_label_symbols): Likewise for `function_symbols' and
3836         `label_funcs_ret'.
3837
3838 2018-08-29  Keith Seitz  <keiths@redhat.com>
3839
3840         * linespec.c (symtab_vector_up): Define.
3841         (struct linespec) <file_symtabs>: Change type to std::vector *.
3842         Update all uses.
3843         (struct collect_info) <file_symtabs>: Likewise.
3844         (collect_symtabs_from_filename): Return symtab_vector_up.
3845         Update all callers.
3846         (decode_objc): Remove cleanup.
3847         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3848         (symtab_collector::release_symtabs): Return symtab_vector_up.
3849         Update all callers.
3850         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3851         Update all users.
3852         (collect_symtabs_from_filename, symtabs_from_filename): Return
3853         symtab_vector_up.  Update all callers.
3854
3855 2018-08-29  Tom Tromey  <tom@tromey.com>
3856
3857         * csky-tdep.c (csky_analyze_prologue): Use
3858         core_addr_to_string_nz.
3859
3860 2018-08-29  Tom Tromey  <tom@tromey.com>
3861
3862         * windows-nat.c (struct xlate_exception) <them>: Change type to
3863         DWORD.
3864         (xlate): Fix formatting.  Remove last entry.
3865         (struct xlate_exception, xlate): Comment out.
3866         (windows_nat_target::resume): Use ranged for.
3867
3868 2018-08-29  Jim Wilson  <jimw@sifive.com>
3869
3870         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3871         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3872         of NT_PRFPREG.
3873         (riscv_linux_nat_target::store_registers): Likewise.
3874
3875 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3876
3877         PR gdb/23555
3878         PR gdb/23558
3879         * gnulib/aclocal.m4: Regenerate.
3880         * gnulib/config.in: Regenerate.
3881         * gnulib/configure: Regenerate.
3882         * gnulib/import/Makefile.am: Update.
3883         * gnulib/import/Makefile.in: Update.
3884         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3885         * gnulib/import/_Noreturn.h: ... this.
3886         * gnulib/import/alloca.in.h: Update.
3887         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3888         * gnulib/import/arg-nonnull.h: ... this.
3889         * gnulib/import/assure.h: Update.
3890         * gnulib/import/at-func.c: Update.
3891         * gnulib/import/basename-lgpl.c: Update.
3892         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3893         * gnulib/import/c++defs.h: ... this.
3894         * gnulib/import/canonicalize-lgpl.c: Update.
3895         * gnulib/import/cdefs.h: Update.
3896         * gnulib/import/chdir-long.c: Update.
3897         * gnulib/import/chdir-long.h: Update.
3898         * gnulib/import/cloexec.c: Update.
3899         * gnulib/import/cloexec.h: Update.
3900         * gnulib/import/close.c: Update.
3901         * gnulib/import/closedir.c: Update.
3902         * gnulib/import/config.charset: Update.
3903         * gnulib/import/dirent-private.h: Update.
3904         * gnulib/import/dirent.in.h: Update.
3905         * gnulib/import/dirfd.c: Update.
3906         * gnulib/import/dirname-lgpl.c: Update.
3907         * gnulib/import/dirname.h: Update.
3908         * gnulib/import/dosname.h: Update.
3909         * gnulib/import/dup-safer-flag.c: Update.
3910         * gnulib/import/dup-safer.c: Update.
3911         * gnulib/import/dup.c: Update.
3912         * gnulib/import/dup2.c: Update.
3913         * gnulib/import/errno.in.h: Update.
3914         * gnulib/import/error.c: Update.
3915         * gnulib/import/error.h: Update.
3916         * gnulib/import/exitfail.c: Update.
3917         * gnulib/import/exitfail.h: Update.
3918         * gnulib/import/extra/update-copyright: Update.
3919         * gnulib/import/fchdir.c: Update.
3920         * gnulib/import/fcntl.c: Update.
3921         * gnulib/import/fcntl.in.h: Update.
3922         * gnulib/import/fd-hook.c: Update.
3923         * gnulib/import/fd-hook.h: Update.
3924         * gnulib/import/fd-safer-flag.c: Update.
3925         * gnulib/import/fd-safer.c: Update.
3926         * gnulib/import/fdopendir.c: Update.
3927         * gnulib/import/filename.h: Update.
3928         * gnulib/import/filenamecat-lgpl.c: Update.
3929         * gnulib/import/filenamecat.h: Update.
3930         * gnulib/import/flexmember.h: Update.
3931         * gnulib/import/float+.h: Update.
3932         * gnulib/import/float.c: Update.
3933         * gnulib/import/float.in.h: Update.
3934         * gnulib/import/fnmatch.c: Update.
3935         * gnulib/import/fnmatch.in.h: Update.
3936         * gnulib/import/fnmatch_loop.c: Update.
3937         * gnulib/import/fpucw.h: Update.
3938         * gnulib/import/frexp.c: Update.
3939         * gnulib/import/frexpl.c: Update.
3940         * gnulib/import/fstat.c: Update.
3941         * gnulib/import/fstatat.c: Update.
3942         * gnulib/import/getcwd-lgpl.c: Update.
3943         * gnulib/import/getcwd.c: Update.
3944         * gnulib/import/getdtablesize.c: Update.
3945         * gnulib/import/getlogin_r.c: Update.
3946         * gnulib/import/getprogname.c: Update.
3947         * gnulib/import/getprogname.h: Update.
3948         * gnulib/import/gettext.h: Update.
3949         * gnulib/import/gettimeofday.c: Update.
3950         * gnulib/import/glob-libc.h: Update.
3951         * gnulib/import/glob.c: Update.
3952         * gnulib/import/glob.in.h: Update.
3953         * gnulib/import/glob_internal.h: Update.
3954         * gnulib/import/glob_pattern_p.c: Update.
3955         * gnulib/import/globfree.c: Update.
3956         * gnulib/import/hard-locale.c: Update.
3957         * gnulib/import/hard-locale.h: Update.
3958         * gnulib/import/intprops.h: Update.
3959         * gnulib/import/inttypes.in.h: Update.
3960         * gnulib/import/isnan.c: Update.
3961         * gnulib/import/isnand-nolibm.h: Update.
3962         * gnulib/import/isnand.c: Update.
3963         * gnulib/import/isnanl-nolibm.h: Update.
3964         * gnulib/import/isnanl.c: Update.
3965         * gnulib/import/itold.c: Update.
3966         * gnulib/import/libc-config.h: Update.
3967         * gnulib/import/limits.in.h: Update.
3968         * gnulib/import/localcharset.c: Update.
3969         * gnulib/import/localcharset.h: Update.
3970         * gnulib/import/localtime-buffer.c: Update.
3971         * gnulib/import/localtime-buffer.h: Update.
3972         * gnulib/import/lstat.c: Update.
3973         * gnulib/import/m4/00gnulib.m4: Update.
3974         * gnulib/import/m4/__inline.m4: Update.
3975         * gnulib/import/m4/absolute-header.m4: Update.
3976         * gnulib/import/m4/alloca.m4: Update.
3977         * gnulib/import/m4/builtin-expect.m4: Update.
3978         * gnulib/import/m4/canonicalize.m4: Update.
3979         * gnulib/import/m4/chdir-long.m4: Update.
3980         * gnulib/import/m4/close.m4: Update.
3981         * gnulib/import/m4/closedir.m4: Update.
3982         * gnulib/import/m4/configmake.m4: Update.
3983         * gnulib/import/m4/d-ino.m4: Update.
3984         * gnulib/import/m4/d-type.m4: Update.
3985         * gnulib/import/m4/dirent_h.m4: Update.
3986         * gnulib/import/m4/dirfd.m4: Update.
3987         * gnulib/import/m4/dirname.m4: Update.
3988         * gnulib/import/m4/double-slash-root.m4: Update.
3989         * gnulib/import/m4/dup.m4: Update.
3990         * gnulib/import/m4/dup2.m4: Update.
3991         * gnulib/import/m4/eealloc.m4: Update.
3992         * gnulib/import/m4/environ.m4: Update.
3993         * gnulib/import/m4/errno_h.m4: Update.
3994         * gnulib/import/m4/error.m4: Update.
3995         * gnulib/import/m4/exponentd.m4: Update.
3996         * gnulib/import/m4/exponentl.m4: Update.
3997         * gnulib/import/m4/extensions.m4: Update.
3998         * gnulib/import/m4/extern-inline.m4: Update.
3999         * gnulib/import/m4/fchdir.m4: Update.
4000         * gnulib/import/m4/fcntl-o.m4: Update.
4001         * gnulib/import/m4/fcntl.m4: Update.
4002         * gnulib/import/m4/fcntl_h.m4: Update.
4003         * gnulib/import/m4/fdopendir.m4: Update.
4004         * gnulib/import/m4/filenamecat.m4: Update.
4005         * gnulib/import/m4/flexmember.m4: Update.
4006         * gnulib/import/m4/float_h.m4: Update.
4007         * gnulib/import/m4/fnmatch.m4: Update.
4008         * gnulib/import/m4/fnmatch_h.m4: Update.
4009         * gnulib/import/m4/fpieee.m4: Update.
4010         * gnulib/import/m4/frexp.m4: Update.
4011         * gnulib/import/m4/frexpl.m4: Update.
4012         * gnulib/import/m4/fstat.m4: Update.
4013         * gnulib/import/m4/fstatat.m4: Update.
4014         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4015         * gnulib/import/m4/getcwd-path-max.m4: Update.
4016         * gnulib/import/m4/getcwd.m4: Update.
4017         * gnulib/import/m4/getdtablesize.m4: Update.
4018         * gnulib/import/m4/getlogin.m4: Update.
4019         * gnulib/import/m4/getlogin_r.m4: Update.
4020         * gnulib/import/m4/getpagesize.m4: Update.
4021         * gnulib/import/m4/getprogname.m4: Update.
4022         * gnulib/import/m4/gettimeofday.m4: Update.
4023         * gnulib/import/m4/glibc21.m4: Update.
4024         * gnulib/import/m4/glob.m4: Update.
4025         * gnulib/import/m4/glob_h.m4: Update.
4026         * gnulib/import/m4/gnulib-cache.m4: Update.
4027         * gnulib/import/m4/gnulib-common.m4: Update.
4028         * gnulib/import/m4/gnulib-comp.m4: Update.
4029         * gnulib/import/m4/gnulib-tool.m4: Update.
4030         * gnulib/import/m4/hard-locale.m4: Update.
4031         * gnulib/import/m4/include_next.m4: Update.
4032         * gnulib/import/m4/inttypes-pri.m4: Update.
4033         * gnulib/import/m4/inttypes.m4: Update.
4034         * gnulib/import/m4/isnand.m4: Update.
4035         * gnulib/import/m4/isnanl.m4: Update.
4036         * gnulib/import/m4/largefile.m4: Update.
4037         * gnulib/import/m4/limits-h.m4: Update.
4038         * gnulib/import/m4/localcharset.m4: Update.
4039         * gnulib/import/m4/locale-fr.m4: Update.
4040         * gnulib/import/m4/locale-ja.m4: Update.
4041         * gnulib/import/m4/locale-zh.m4: Update.
4042         * gnulib/import/m4/localtime-buffer.m4: Update.
4043         * gnulib/import/m4/longlong.m4: Update.
4044         * gnulib/import/m4/lstat.m4: Update.
4045         * gnulib/import/m4/malloc.m4: Update.
4046         * gnulib/import/m4/malloca.m4: Update.
4047         * gnulib/import/m4/math_h.m4: Update.
4048         * gnulib/import/m4/mbrtowc.m4: Update.
4049         * gnulib/import/m4/mbsinit.m4: Update.
4050         * gnulib/import/m4/mbsrtowcs.m4: Update.
4051         * gnulib/import/m4/mbstate_t.m4: Update.
4052         * gnulib/import/m4/memchr.m4: Update.
4053         * gnulib/import/m4/memmem.m4: Update.
4054         * gnulib/import/m4/mempcpy.m4: Update.
4055         * gnulib/import/m4/memrchr.m4: Update.
4056         * gnulib/import/m4/mkdir.m4: Update.
4057         * gnulib/import/m4/mkstemp.m4: Update.
4058         * gnulib/import/m4/mmap-anon.m4: Update.
4059         * gnulib/import/m4/mode_t.m4: Update.
4060         * gnulib/import/m4/msvc-inval.m4: Update.
4061         * gnulib/import/m4/msvc-nothrow.m4: Update.
4062         * gnulib/import/m4/multiarch.m4: Update.
4063         * gnulib/import/m4/nocrash.m4: Update.
4064         * gnulib/import/m4/off_t.m4: Update.
4065         * gnulib/import/m4/onceonly.m4: Update.
4066         * gnulib/import/m4/open-cloexec.m4: Update.
4067         * gnulib/import/m4/open.m4: Update.
4068         * gnulib/import/m4/openat.m4: Update.
4069         * gnulib/import/m4/opendir.m4: Update.
4070         * gnulib/import/m4/pathmax.m4: Update.
4071         * gnulib/import/m4/rawmemchr.m4: Update.
4072         * gnulib/import/m4/readdir.m4: Update.
4073         * gnulib/import/m4/readlink.m4: Update.
4074         * gnulib/import/m4/realloc.m4: Update.
4075         * gnulib/import/m4/rename.m4: Update.
4076         * gnulib/import/m4/rewinddir.m4: Update.
4077         * gnulib/import/m4/rmdir.m4: Update.
4078         * gnulib/import/m4/save-cwd.m4: Update.
4079         * gnulib/import/m4/secure_getenv.m4: Update.
4080         * gnulib/import/m4/setenv.m4: Update.
4081         * gnulib/import/m4/signal_h.m4: Update.
4082         * gnulib/import/m4/ssize_t.m4: Update.
4083         * gnulib/import/m4/stat-time.m4: Update.
4084         * gnulib/import/m4/stat.m4: Update.
4085         * gnulib/import/m4/std-gnu11.m4: Update.
4086         * gnulib/import/m4/stdbool.m4: Update.
4087         * gnulib/import/m4/stddef_h.m4: Update.
4088         * gnulib/import/m4/stdint.m4: Update.
4089         * gnulib/import/m4/stdio_h.m4: Update.
4090         * gnulib/import/m4/stdlib_h.m4: Update.
4091         * gnulib/import/m4/strchrnul.m4: Update.
4092         * gnulib/import/m4/strdup.m4: Update.
4093         * gnulib/import/m4/strerror.m4: Update.
4094         * gnulib/import/m4/string_h.m4: Update.
4095         * gnulib/import/m4/strstr.m4: Update.
4096         * gnulib/import/m4/strtok_r.m4: Update.
4097         * gnulib/import/m4/sys_socket_h.m4: Update.
4098         * gnulib/import/m4/sys_stat_h.m4: Update.
4099         * gnulib/import/m4/sys_time_h.m4: Update.
4100         * gnulib/import/m4/sys_types_h.m4: Update.
4101         * gnulib/import/m4/tempname.m4: Update.
4102         * gnulib/import/m4/time_h.m4: Update.
4103         * gnulib/import/m4/unistd-safer.m4: Update.
4104         * gnulib/import/m4/unistd_h.m4: Update.
4105         * gnulib/import/m4/warn-on-use.m4: Update.
4106         * gnulib/import/m4/wchar_h.m4: Update.
4107         * gnulib/import/m4/wchar_t.m4: Update.
4108         * gnulib/import/m4/wctype_h.m4: Update.
4109         * gnulib/import/m4/wint_t.m4: Update.
4110         * gnulib/import/malloc.c: Update.
4111         * gnulib/import/malloc/scratch_buffer.h: Update.
4112         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4113         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4114         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4115         * gnulib/import/malloca.c: Update.
4116         * gnulib/import/malloca.h: Update.
4117         * gnulib/import/malloca.valgrind: Update.
4118         * gnulib/import/math.in.h: Update.
4119         * gnulib/import/mbrtowc.c: Update.
4120         * gnulib/import/mbsinit.c: Update.
4121         * gnulib/import/mbsrtowcs-impl.h: Update.
4122         * gnulib/import/mbsrtowcs-state.c: Update.
4123         * gnulib/import/mbsrtowcs.c: Update.
4124         * gnulib/import/memchr.c: Update.
4125         * gnulib/import/memmem.c: Update.
4126         * gnulib/import/mempcpy.c: Update.
4127         * gnulib/import/memrchr.c: Update.
4128         * gnulib/import/mkdir.c: Update.
4129         * gnulib/import/mkstemp.c: Update.
4130         * gnulib/import/msvc-inval.c: Update.
4131         * gnulib/import/msvc-inval.h: Update.
4132         * gnulib/import/msvc-nothrow.c: Update.
4133         * gnulib/import/msvc-nothrow.h: Update.
4134         * gnulib/import/open.c: Update.
4135         * gnulib/import/openat-die.c: Update.
4136         * gnulib/import/openat-priv.h: Update.
4137         * gnulib/import/openat-proc.c: Update.
4138         * gnulib/import/openat.c: Update.
4139         * gnulib/import/openat.h: Update.
4140         * gnulib/import/opendir.c: Update.
4141         * gnulib/import/pathmax.h: Update.
4142         * gnulib/import/pipe-safer.c: Update.
4143         * gnulib/import/rawmemchr.c: Update.
4144         * gnulib/import/readdir.c: Update.
4145         * gnulib/import/readlink.c: Update.
4146         * gnulib/import/realloc.c: Update.
4147         * gnulib/import/ref-add.sin: Update.
4148         * gnulib/import/ref-del.sin: Update.
4149         * gnulib/import/rename.c: Update.
4150         * gnulib/import/rewinddir.c: Update.
4151         * gnulib/import/rmdir.c: Update.
4152         * gnulib/import/same-inode.h: Update.
4153         * gnulib/import/save-cwd.c: Update.
4154         * gnulib/import/save-cwd.h: Update.
4155         * gnulib/import/scratch_buffer.h: Update.
4156         * gnulib/import/secure_getenv.c: Update.
4157         * gnulib/import/setenv.c: Update.
4158         * gnulib/import/signal.in.h: Update.
4159         * gnulib/import/stat-time.c: Update.
4160         * gnulib/import/stat-time.h: Update.
4161         * gnulib/import/stat-w32.c: Update.
4162         * gnulib/import/stat-w32.h: Update.
4163         * gnulib/import/stat.c: Update.
4164         * gnulib/import/stdbool.in.h: Update.
4165         * gnulib/import/stddef.in.h: Update.
4166         * gnulib/import/stdint.in.h: Update.
4167         * gnulib/import/stdio.in.h: Update.
4168         * gnulib/import/stdlib.in.h: Update.
4169         * gnulib/import/str-two-way.h: Update.
4170         * gnulib/import/strchrnul.c: Update.
4171         * gnulib/import/strdup.c: Update.
4172         * gnulib/import/streq.h: Update.
4173         * gnulib/import/strerror-override.c: Update.
4174         * gnulib/import/strerror-override.h: Update.
4175         * gnulib/import/strerror.c: Update.
4176         * gnulib/import/string.in.h: Update.
4177         * gnulib/import/stripslash.c: Update.
4178         * gnulib/import/strnlen1.c: Update.
4179         * gnulib/import/strnlen1.h: Update.
4180         * gnulib/import/strstr.c: Update.
4181         * gnulib/import/strtok_r.c: Update.
4182         * gnulib/import/sys_stat.in.h: Update.
4183         * gnulib/import/sys_time.in.h: Update.
4184         * gnulib/import/sys_types.in.h: Update.
4185         * gnulib/import/tempname.c: Update.
4186         * gnulib/import/tempname.h: Update.
4187         * gnulib/import/time.in.h: Update.
4188         * gnulib/import/unistd--.h: Update.
4189         * gnulib/import/unistd-safer.h: Update.
4190         * gnulib/import/unistd.in.h: Update.
4191         * gnulib/import/unsetenv.c: Update.
4192         * gnulib/import/verify.h: Update.
4193         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4194         * gnulib/import/wchar.in.h: Update.
4195         * gnulib/import/wctype.in.h: Update.
4196         * gnulib/import/xalloc-oversized.h: Update.
4197         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4198         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4199
4200 2018-08-16  Gary Benson <gbenson@redhat.com>
4201
4202         PR gdb/13000:
4203         * gdb/main.c (captured_main_1): Exit with nonzero status
4204         in batch mode if the last command to be executed failed.
4205         * NEWS: Mention the above.
4206
4207 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4208
4209         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4210         end of warning message.
4211
4212 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4213
4214         PR gdb/22943:
4215         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4216         (aarch64_extract_return_value): Use
4217         aapcs_is_vfp_call_or_return_candidate.
4218         (aarch64_return_in_memory): Likewise.
4219         (aarch64_store_return_value): Likewise.
4220
4221 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4222
4223         * aarch64-tdep.c
4224         (aapcs_is_vfp_call_or_return_candidate): Make static
4225         (pass_in_v_or_stack): Remove function.
4226         (pass_in_v_vfp_candidate): New function.
4227         (aarch64_push_dummy_call): Check for float register candidates.
4228
4229 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4230
4231         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4232         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4233         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4234
4235 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4236
4237         PR build/23399
4238         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4239         (struct ipa_sym_addresses): Rename to...
4240         (struct ipa_sym_addresses_common): ... this.
4241         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4242
4243 2018-08-28  Tom Tromey  <tom@tromey.com>
4244
4245         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4246         (token_fifo): Now a std::vector.
4247         (yylex, c_parse): Update.
4248         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4249         (token_fifo): Now a std::vector.
4250         (yylex, d_parse): Update.
4251         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4252         (token_fifo): Now a std::vector.
4253         (yylex, go_parse): Update.
4254
4255 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4256
4257         * parser-defs.h (struct type_stack) <elements>: Change type to
4258         std::vector<union type_stack_elt>.
4259         <depth, size>: Remove.
4260         * parse.c (parse_exp_in_context_1): Adjust.
4261         (type_stack_reserve): Remove.
4262         (check_type_stack_depth): Remove.
4263         (insert_into_type_stack): Adjust to std::vector.
4264         (insert_type): Likewise.
4265         (push_type): Likewise.
4266         (push_type_int): Likewise.
4267         (insert_type_address_space): Likewise.
4268         (pop_type): Likewise.
4269         (pop_type_int): Likewise.
4270         (pop_typelist): Likewise.
4271         (pop_type_stack): Likewise.
4272         (append_type_stack): Likewise.
4273         (push_type_stack): Likewise.
4274         (get_type_stack): Likewise.
4275         (type_stack_cleanup): Likewise.
4276         (push_typelist): Likewise.
4277         (follow_types): Likewise.
4278         (_initialize_parse): Likewise.
4279
4280 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4281
4282         * NEWS: Mention csky target.
4283
4284 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4285             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4286             Don Breazeal  <donb@codesourcery.com>
4287
4288         * csky-linux-tdep.c: New file.
4289         * csky-tdep.c: Likewise.
4290         * csky-tdep.h: Likewise.
4291         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4292         csky-tdep.o.
4293         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4294         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4295         * configure.tgt: Add csky support.
4296
4297 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4298
4299         * python/py-framefilter.c (py_print_frame): Print frame architecture
4300         when printing on an MI output.
4301
4302 2018-08-27  Tom Tromey  <tom@tromey.com>
4303
4304         PR build/23087:
4305         * configure: Rebuild.
4306         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4307
4308 2018-08-27  Tom Tromey  <tom@tromey.com>
4309
4310         * aarch64-linux-tdep.c
4311         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4312         casts to int.
4313
4314 2018-08-27  Tom Tromey  <tom@tromey.com>
4315
4316         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4317         unsigned.
4318         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4319         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4320         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4321         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4322         unsigned.
4323
4324 2018-08-27  Tom Tromey  <tom@tromey.com>
4325
4326         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4327         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4328
4329 2018-08-27  Tom Tromey  <tom@tromey.com>
4330
4331         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4332         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4333         ULONGEST_MAX.
4334         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4335         ULONGEST_MAX.
4336         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4337         ULONGEST_MAX.
4338         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4339         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4340         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4341         ULONGEST_MAX.
4342         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4343         (ppc64_linux_sigaction_tramp_frame)
4344         (ppc32_linux_sighandler_tramp_frame)
4345         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4346         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4347         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4348         * mn10300-linux-tdep.c (am33_linux_sigframe)
4349         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4350         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4351         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4352         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4353         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4354         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4355         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4356         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4357         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4358         * microblaze-linux-tdep.c
4359         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4360         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4361         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4362         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4363         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4364         * common/common-types.h (ULONGEST_MAX): New define.
4365         (CORE_ADDR_MAX): Fix formatting.
4366         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4367         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4368         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4369         (arm_linux_rt_sigreturn_tramp_frame)
4370         (arm_eabi_linux_sigreturn_tramp_frame)
4371         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4372         (thumb2_eabi_linux_sigreturn_tramp_frame)
4373         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4374         (arm_linux_restart_syscall_tramp_frame)
4375         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4376         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4377         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4378         ULONGEST_MAX.
4379         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4380
4381 2018-08-27  Tom Tromey  <tom@tromey.com>
4382
4383         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4384         CORE_ADDR_MAX.
4385         * mips-tdep.c (mips_deal_with_atomic_sequence)
4386         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4387         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4388         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4389         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4390         CORE_ADDR_MAX.
4391         * aarch64-tdep.c (aarch64_software_single_step): Use
4392         CORE_ADDR_MAX.
4393
4394 2018-08-27  Tom Tromey  <tom@tromey.com>
4395
4396         * linespec.c (complete_linespec_component): Add cast to "char".
4397         * completer.c (completion_tracker::build_completion_result): Add
4398         cast to "char".
4399
4400 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4401
4402         * solist.h (struct solist, struct target_so_ops): Fix
4403         indentation.
4404
4405 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4406
4407         * ada-tasks.c (ada_task_info_s): Remove typedef.
4408         (DEF_VEC_O(ada_task_info_s)): Remove.
4409         (struct ada_tasks_inferior_data): Initialize fields.
4410         <task_list>: Make an std::vector.
4411         (get_ada_tasks_inferior_data): Allocate with new.
4412         (ada_get_task_number): Adjust.
4413         (get_task_number_from_id): Likewise.
4414         (valid_task_id): Likewise.
4415         (ada_get_task_info_from_ptid): Likewise.
4416         (iterate_over_live_ada_tasks): Likewise.
4417         (add_ada_task): Likewise.
4418         (read_known_tasks): Likewise.
4419         (ada_build_task_list): Likewise.
4420         (print_ada_task_info): Likewise.
4421         (info_task): Likewise.
4422         (task_command_1): Likewise.
4423
4424 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4425
4426         * ada-lang.c (add_angle_brackets): Return std::string.
4427
4428 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
4429
4430         * python/py-threadevent.c (py_get_event_thread): Initialize
4431         pythread.
4432
4433 2018-08-24  Pedro Alves  <palves@redhat.com>
4434
4435         * python/py-bpevent.c (create_breakpoint_event_object): Use
4436         copy-initialization.
4437         * python/py-continueevent.c (emit_continue_event): Use
4438         copy-initialization.
4439         * python/py-exitedevent.c (create_exited_event_object): Return a
4440         gdbpy_ref<>.
4441         (emit_exited_event): Use copy-initialization.
4442         * python/py-inferior.c (python_new_inferior)
4443         (python_inferior_deleted, add_thread_object): Use
4444         copy-initialization.
4445         * python/py-infevents.c (create_inferior_call_event_object)
4446         (create_register_changed_event_object)
4447         (create_memory_changed_event_object): Return a gdbpy_ref<>.
4448         (emit_inferior_call_event, emit_memory_changed_event)
4449         (emit_register_changed_event): Use copy-initialization.
4450         * python/py-newobjfileevent.c (create_new_objfile_event_object):
4451         Return a gdbpy_ref<>.
4452         (emit_new_objfile_event): Use copy-initialization.
4453         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4454         (emit_clear_objfiles_event): Use copy-initialization.
4455         * python/py-signalevent.c (create_signal_event_object): Use
4456         copy-initialization.
4457         * python/py-threadevent.c (create_thread_event_object): Use
4458         copy-initialization.
4459
4460 2018-08-24  Pedro Alves  <palves@redhat.com>
4461             Simon Marchi  <simon.marchi@ericsson.com>
4462
4463         PR gdb/23379
4464         * python/py-continueevent.c: Include "gdbthread.h".
4465         (create_continue_event_object): Add intro comment.  Add 'ptid'
4466         parameter.  Use it to find thread to pass to
4467         create_thread_event_object.
4468         (emit_continue_event): Pass PTID down to
4469         create_continue_event_object.
4470         * python/py-event.h (py_get_event_thread): Declare.
4471         (create_thread_event_object): Remove default from 'thread'
4472         parameter.
4473         * python/py-stopevent.c (create_stop_event_object): Use
4474         py_get_event_thread.
4475         * python/py-threadevent.c (get_event_thread): Rename to ...
4476         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
4477         and use it to find the thread.
4478         (create_thread_event_object): Assert that THREAD isn't null.
4479         Don't find the event thread here.
4480
4481 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
4482
4483         * block.h (blockrange, blockranges): New struct declarations.
4484         (struct block): Add new field named `ranges'.
4485         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
4486         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
4487         macros for accessing ranges in struct block.
4488         (make_blockranges): New declaration.
4489         block.c (make_blockranges): New function.
4490         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
4491         for block.
4492         * symtab.h (find_pc_partial_function): Add new parameter `block'.
4493         * blockframe.c (cache_pc_function_block): New static global.
4494         (clear_pc_function_cache): Clear cache_pc_function_block.
4495         (find_pc_partial_function): Move comment to symtab.h.  Add
4496         support for non-contiguous blocks.
4497         * cli/cli-cmds.c (block.h): Include.
4498         (print_disassembly): Handle printing of non-contiguous blocks.
4499         (disassemble_current_function): Likewise.
4500         (disassemble_command): Likewise.
4501
4502         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
4503         BLOCK_START.
4504         * blockframe.c (get_pc_function_start): Likewise.
4505         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
4506         (gcc_symbol_address): Likewise.
4507         * compile/compile-object-run.c (compile_object_run): Likewise.
4508         * compile/compile.c (get_expr_block_and_pc): Likewise.
4509         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
4510         (func_addr_to_tail_call_list): Likewise.
4511         * findvar.c (default_read_var_value): Likewise.
4512         * inline-frame.c (inline_frame_this_id): Likewise.
4513         (skip-inline_frames): Likewise.
4514         * infcmd.c (until_next_command): Likewise.
4515         * linespec.c (convert_linespec_to_sals): Likewise.
4516         * parse.c (parse_exp_in_context_1): Likewise.
4517         * printcmd.c (build_address_symbolic): likewise.
4518         (info_address_command): Likewise.
4519         symtab.c (find_function_start_sal): Likewise.
4520         (skip_prologue_sal): Likewise.
4521         (find_function_alias_target): Likewise.
4522         (find_gnu_ifunc): Likewise.
4523         * stack.c (find_frame_funname): Likewise.
4524         * symtab.c (fixup_symbol_section): Likewise.
4525         (find_function_start_sal): Likewise.
4526         (skip_prologue_sal): Likewsie.
4527         (find_function_alias_target): Likewise.
4528         (find_gnu_ifunc): Likewise.
4529         * tracepoint.c (info_scope_command): Likewise.
4530         * value.c (value_fn_field): Likewise.
4531
4532         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
4533         in place of find_pc_partial_function.
4534         * blockframe.c (find_function_entry_range_from_pc): New function.
4535         * symtab.h (find_function_entry_range_from_pc): Declare and document.
4536         * objfiles.c (objfile_relocate1): Relocate start and end addresses
4537         for each range in a block.
4538
4539
4540 2018-08-23  Xavier Roirand  <roirand@adacore.com>
4541
4542         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
4543         incrementation.
4544
4545 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4546
4547         * solib-svr4.c (read_program_headers_from_bfd): Return
4548         gdb::optional<gdb::byte_vector>.
4549         (svr4_exec_displacement): Adjust.
4550
4551 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4552
4553         * solib-svr4.c (read_program_header): Return
4554         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
4555         (find_program_interpreter): Return
4556         gdb::optional<gdb::byte_vector>.
4557         (scan_dyntag_auxv): Adjust.
4558         (enable_break): Adjust.
4559         (svr4_exec_displacement): Adjust.
4560
4561 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4562
4563         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
4564         * inf-child.c (inf_child_target::terminal_save_inferior): New.
4565
4566 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4567
4568         * guile/scm-string.c (gdbscm_scm_from_printf): Use
4569         string_vprintf.
4570         * guile/scm-utils.c (gdbscm_printf): Likewise.
4571         * serial.c (serial_printf): Likewise.
4572         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
4573
4574 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
4575
4576         * stack.c (print_frame): Print frame architecture when printing on
4577         an MI output.
4578         * NEWS: Mention new "arch" attribute in frame output.
4579
4580 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4581
4582         * arch/aarch64.h (aarch64_regnum): Update comment.
4583
4584 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4585
4586         * NEWS: Add SVE to 8.2 section.
4587
4588 2018-08-21  Pedro Alves  <palves@redhat.com>
4589
4590         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
4591         out from gdbscm_parse_function_args.
4592         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
4593         gdbscm_parse_function_args_1.
4594
4595 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
4596
4597         PR gdb/17816
4598         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
4599         operator.
4600
4601 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
4602
4603         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
4604
4605 2018-08-19  Michael Spang  <spang@google.com>
4606
4607         PR gdb/11786
4608         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
4609         for PT_TLS segments.
4610
4611 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
4612
4613         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
4614         dwarf_variable_value.
4615         * dwarf2-frame.c (class dwarf_expr_executor):
4616         Add override for dwarf_variable_value.
4617         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
4618         (class symbol_needs_eval_context): Likewise.
4619         (indirect_synthetic_pointer): Add forward declaration.
4620         (sect_variable_value): New function.
4621         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
4622         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
4623         for DW_OP_GNU_variable_value.
4624
4625 2018-08-16  Tom Tromey  <tom@tromey.com>
4626
4627         * top.c (read_command_file): Update.
4628         (command_line_input): Remove "repeat" argument.
4629         * ada-lang.c (get_selections): Update.
4630         * linespec.c (decode_line_2): Update.
4631         * defs.h (command_line_input): Remove argument.
4632         * cli/cli-script.c (read_next_line): Update.
4633         * python/py-gdb-readline.c: Update.
4634
4635 2018-08-17  Tom Tromey  <tom@tromey.com>
4636
4637         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
4638         command_line_input.
4639
4640 2018-08-15  Tom Tromey  <tom@tromey.com>
4641
4642         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
4643
4644 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
4645
4646         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
4647         If used, use find_pc_partial_function to find address range
4648         to disassemble.
4649         * mi/mi-main.c (mi_cmd_list_features): Report
4650         "data-disassemble-a-option" feature.
4651         * NEWS: Mention new -data-disassemble option -a.
4652
4653 2018-08-13  Tom Tromey  <tom@tromey.com>
4654
4655         * common/common-defs.h (_FORTIFY_SOURCE): Define.
4656
4657 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4658
4659         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
4660         (aarch64_linux_collect_sve_regset): Likewise.
4661         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
4662         * regcache.h (regcache_map_entry_size): New function.
4663
4664 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4665
4666         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
4667         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
4668         (SVE_HEADER_VL_LENGTH): Likewise.
4669         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
4670         (SVE_HEADER_FLAGS_LENGTH): Likewise.
4671         (SVE_HEADER_RESERVED_LENGTH): Likewise.
4672         (SVE_HEADER_SIZE_OFFSET): Likewise.
4673         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
4674         (SVE_HEADER_VL_OFFSET): Likewise.
4675         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
4676         (SVE_HEADER_FLAGS_OFFSET): Likewise.
4677         (SVE_HEADER_RESERVED_OFFSET): Likewise.
4678         (SVE_HEADER_SIZE): Likewise.
4679         (aarch64_linux_core_read_vq): Add function.
4680         (aarch64_linux_core_read_description): Check for SVE section.
4681
4682 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4683
4684         * aarch64-fbsd-tdep.c
4685         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
4686         collect_size.
4687         * aarch64-linux-tdep.c
4688         (aarch64_linux_iterate_over_regset_sections): Likewise.
4689         * alpha-linux-tdep.c
4690         (alpha_linux_iterate_over_regset_sections):
4691         * alpha-nbsd-tdep.c
4692         (alphanbsd_iterate_over_regset_sections): Likewise.
4693         * amd64-fbsd-tdep.c
4694         (amd64fbsd_iterate_over_regset_sections): Likewise.
4695         * amd64-linux-tdep.c
4696         (amd64_linux_iterate_over_regset_sections): Likewise.
4697         * arm-bsd-tdep.c
4698         (armbsd_iterate_over_regset_sections): Likewise.
4699         * arm-fbsd-tdep.c
4700         (arm_fbsd_iterate_over_regset_sections): Likewise.
4701         * arm-linux-tdep.c
4702         (arm_linux_iterate_over_regset_sections): Likewise.
4703         * corelow.c (get_core_registers_cb): Likewise.
4704         (core_target::fetch_registers): Likewise.
4705         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
4706         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
4707         * gdbarch.h (void): Regenerate.
4708         * gdbarch.sh: Add supply_size and collect_size.
4709         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
4710         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
4711         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
4712         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
4713         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
4714         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
4715         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
4716         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
4717         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
4718         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
4719         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
4720         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
4721         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
4722         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
4723         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
4724         Likewise.
4725         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
4726         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
4727         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
4728         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
4729         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
4730         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
4731         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
4732         Likewise.
4733         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
4734         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4735         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4736         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4737         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4738         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4739         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4740         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4741
4742 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
4743
4744         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4745         with string_printf.
4746
4747 2018-08-10  Keith Seitz  <keiths@redhat.com>
4748
4749         * compile/compile-c-support.c (add_code_header, add_code_footer):
4750         Move into policy class.
4751         (c_push_user_expression, pop_user_expression_nop)
4752         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4753         (compile_program): New host class.
4754         (c_compile_program): New typedef.
4755         (c_compute_porgram): Use c_compile_program.
4756
4757 2018-08-10  Keith Seitz  <keiths@redhat.com>
4758
4759         * compile/compile-internal.h (compile_instance::~compile_instance):
4760         Remove calls to htab_delete.
4761         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4762         * compile.c (compile_instance::compile_instance): Initialize
4763         htab unique pointers.
4764         (compile_instance::get_cached_type, compile_instance::insert_type)
4765         (compile_instance::error_symbol_once): Update for unique_ptr.
4766
4767 2018-08-10  Keith Seitz  <keiths@redhat.com>
4768
4769         * compile/compile-c-symbols.c (struct symbol_error)
4770         (hash_symbol_error, eq_symbol_error, del_symbol_error)
4771         (compile_instance::insert_symbol_error)
4772         (compile_instance::error_symbol_once): Move to ...
4773         * compile/compile.c: ... here.
4774
4775 2018-08-10  Keith Seitz  <keiths@redhat.com>
4776
4777         * compile/compile-c-support.c (c_get_compile_context): Use `new'
4778         instead of `new_compile_instance'.
4779         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4780         Update description.
4781         If the symbol error map is not initialized, create it.
4782         (generate_c_for_for_one_symbol): Do not check/initialize
4783         the symbol error map.
4784         * compile/compile-c-types.c (compile_c_instance): Make a class.
4785         Update all callers.
4786         (compile_instance::compile_instance): Initialize the type cache.
4787         (get_cached_type): New function.
4788         (insert_type): Update description.
4789         (compile_c_instance::m_default_cflags): Define.
4790         (convert_type): Update description.  Use get_cached_type.
4791         (delete_instance): Moved to destructor.
4792         (new_compile_instance): Moved to constructor.
4793         * compile/compile-c.h (compile_c_instance): Make class inheriting
4794         from compile_instance.
4795         <base>: Remove field.
4796         <type_map, symbol_err_map>: Move to base class.
4797         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4798         * compile/compile-internal.h (compile_instance): Make class.
4799         <type_map_t, symbol_err_map_t>: Define.
4800         <fe>: Rename to `m_gcc_fe'.
4801         <scope, block, gcc_target_options>: Add `m_' prefix.
4802         <m_type_map, m_symbol_err_map>: New fields, moved from
4803         compile_c_instance.
4804         <destroy>: Remove.
4805         (convert_type, new_compile_instance): Remove.
4806         * compile/compile.c (cleanup_compile_instance): Remove.
4807         (compile_to_object): Use unique_ptr to eliminate cleanups.
4808         (compile_instance::set_print_callback, compile_instance::version)
4809         (compile_instance::set_verbose)
4810         (compile_instance::set_driver_filename)
4811         (compile_instance::set_triplet_regexp)
4812         (compile_instance::set_arguments)
4813         (compile_instance::set_source_file)
4814         (compile_instance::compile): Define.
4815
4816 2018-08-10  Keith Seitz  <keiths@redhat.com>
4817
4818         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4819         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4820         gcc-c-fe.def to define C plugin.
4821         (delete_instance): Delete `c_plugin'.
4822         (new_compile_instance): Initialize `c_plugin'.
4823         * compile/compile-c.h: Include gcc_c_plugin.h.
4824         (struct compile_c_instance) <c_plugin>: New member.
4825         * gcc-c-plugin.h: New file.
4826         Update all callers with API change.
4827
4828 2018-08-10  Keith Seitz  <keiths@redhat.com>
4829
4830         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4831         (HFILES_NO_SRCDIR): ... to here.
4832         Add compile-internal.h and compile-c.h.
4833         * compile/compile-c-support.c: Include compile-c.h.
4834         * compile/compile-c-symbols.c: Include compile-c.h.
4835         (generate_c_for_variable_locations): Update comment.
4836         * compile/compile-c-types.c: Include compile-c.h.
4837         * compile/compile-c.h: New file -- moved C language declarations
4838         from other files here.
4839         * compile/compile-internal.h: Do not include hashtab.h or
4840         common/enum-flags.h.
4841         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4842         (gcc_convert_symbol, gcc_symbol_address)
4843         (generate_c_for_variable_locations, c_get_mode_for_size)
4844         (c_get_range_decl_name): Definitions moved to compile-c.h.
4845         * compile/compile-loc2c.c: Include compile-c.h.
4846
4847 2018-08-10  Keith Seitz  <keiths@redhat.com>
4848
4849         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4850         (c_symbol_substitution_name): ... this.
4851         Update all callers.
4852
4853 2018-08-10  Keith Seitz  <keiths@redhat.com>
4854
4855         * compile/compile-c-support.c (c_compute_program): Use
4856         unique_xmalloc_ptr to eliminate cleanup.
4857         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4858         Return a unique_xmalloc_ptr and eliminate cleanup.
4859         * compile/compile-internal.h (generate_c_for_variable_locations):
4860         Return unique_xmalloc_ptr and update description.
4861
4862 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4863
4864         * corelow.c (core_target::get_core_register_section): Rename
4865         min_size to section_min_size.
4866
4867 2018-08-09  Jim Wilson  <jimw@sifive.com>
4868
4869         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4870         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4871         * NEWS: Mention new GNU/Linux RISC-V target.
4872         * configure.host: Add riscv*-*-linux*.
4873         * configure.nat: Add riscv*.
4874         * configure.tgt: Add riscv*-*-linux*.
4875         * riscv-linux-nat.c: New file.
4876         * riscv-linux-tdep.c: New file.
4877
4878 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4879
4880         * infrun.c (resume): Make static, add forward declaration.
4881         (proceed): Update header comment.
4882         * infrun.h (resume): Delete declaration.
4883
4884 2018-08-09  Tom Tromey  <tom@tromey.com>
4885
4886         * riscv-tdep.h: Minor formatting fixes.
4887
4888 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4889
4890         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4891         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4892         (test_mkdir_recursive): Likewise.
4893         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4894
4895 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4896
4897         * valarith.c (value_subscripted_rvalue): If an array is not in
4898         memory, and we don't know the upper bound, then we can't know that
4899         the requested element exists or not.
4900
4901 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4902
4903         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4904         (target_options_to_string): Add comment.
4905
4906 2018-08-08  Tom Tromey  <tom@tromey.com>
4907
4908         * unittests/scoped_mmap-selftests.c: Check result of "write".
4909
4910 2018-08-08  Jim Wilson  <jimw@sifive.com>
4911
4912         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4913         (decode_register_index_short): New.
4914         (decode_j_type_insn, decode_cj_type_insn): New.
4915         (decode_b_type_insn, decode_cb_type_insn): New.
4916         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4917         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4918         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4919         is_c_sw_insn instead of is_sw_insn.
4920         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4921         (riscv_software_single_step): New.
4922         * riscv-tdep.h (riscv_software_single_step): Declare.
4923
4924         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4925         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4926
4927 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4928
4929         PR gdb/18050:
4930         * target.c (dispose_inferior): Don't dispose of inferiors that are
4931         already killed.
4932
4933 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4934
4935         * remote.c (remote_target::download_tracepoint): Change char* to
4936         const char*.
4937
4938 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4939
4940         * target.h (target_options_to_string): Return an std::string.
4941         * target.c (str_comma_list_concat_elem): Return void, use
4942         std::string.
4943         (do_option): Likewise.
4944         (target_options_to_string): Return an std::string.
4945         * linux-nat.c (linux_nat_target::wait): Adjust.
4946         * target-debug.h (target_debug_print_options): Adjust.
4947
4948 2018-08-07  Tom Tromey  <tom@tromey.com>
4949
4950         * Makefile.in (CPPFLAGS): New variable.
4951         (INTERNAL_CPPFLAGS): Use it.
4952
4953 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4954
4955         * NEWS: Mention the index cache.
4956
4957 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4958
4959         * common/pathstuff.h (get_standard_cache_dir): New.
4960         * common/pathstuff.c (get_standard_cache_dir): New.
4961         * build-id.h (build_id_to_string): New.
4962         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4963         DEBUG_STR_SUFFIX): Move to here.
4964         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4965         DEBUG_STR_SUFFIX): Move from there.
4966         (write_psymtabs_to_index): Make non-static, add basename
4967         parameter.  Write to temporary files, rename when done.
4968         (save_gdb_index_command): Adjust call to
4969         write_psymtabs_to_index.
4970         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4971         field.
4972         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4973         (get_gdb_index_contents_from_cache): New.
4974         (get_gdb_index_contents_from_cache_dwz): New.
4975         (dwarf2_initialize_objfile): Read index from cache.
4976         (dwarf2_build_psymtabs): Save to index.
4977         * dwarf-index-cache.h: New file.
4978         * dwarf-index-cache.c: New file.
4979         * dwarf-index-write.h: New file.
4980
4981 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4982
4983         * gnulib/aclocal.m4: Re-generate.
4984         * gnulib/config.in: Re-generate.
4985         * gnulib/configure: Re-generate.
4986         * gnulib/import/Makefile.am: Re-generate.
4987         * gnulib/import/Makefile.in: Re-generate.
4988         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4989         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4990         * gnulib/import/m4/mkdir.m4: New file.
4991         * gnulib/import/mkdir.c: New file.
4992         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4993         module.
4994
4995 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4996
4997         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4998         * common/scoped_mmap.c: New file.
4999         * common/scoped_mmap.h (destroy): New method.
5000         (~scoped_mmap, reset): Use destroy.
5001         (scoped_mmap): New move constructor.
5002         (mmap_file): New declaration.
5003         * unittests/scoped_mmap-selftests.c (test_normal,
5004         test_invalid_filename, run_tests): New functions.
5005         (_initialize_scoped_mmap_selftests): Register selftest.
5006
5007 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5008
5009         * dwarf2read.c (read_gdb_index_from_section): Rename to...
5010         (read_gdb_index_from_buffer): ... this.  Remove section
5011         parameter, add buffer parameter.
5012         (get_gdb_index_contents_ftype,
5013         get_gdb_index_contents_dwz_ftype): New typedefs.
5014         (dwarf2_read_gdb_index): Add callback parameters to get the
5015         index contents.
5016         (get_gdb_index_contents_from_section): New.
5017         (dwarf2_initialize_objfile): Update call to
5018         dwarf2_read_gdb_index.
5019
5020 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5021
5022         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5023         (gdb_open_cloexec): Likewise.
5024         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5025         (commandline_from_pid): Likewise.
5026         (linux_xfer_osdata_threads): Likewise.
5027         (linux_xfer_osdata_fds): Likewise.
5028         * ada-lang.c (is_package_name): Likewise.
5029         * auxv.c (procfs_xfer_auxv): Likewise.
5030         * breakpoint.c (print_one_breakpoint_location): Use
5031         uiout::field_fmt.
5032         (print_one_catch_solib): Use string_printf.
5033         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5034         (add_pe_forwarded_sym): Likewise.
5035         * dwarf2read.c (create_type_unit_group): Likewise.
5036         (build_error_marker_type): Likewise.
5037         * infcall.c (get_function_name): Likewise.
5038         * valprint.c (print_converted_chars_to_obstack): Likewise.
5039         * xtensa-tdep.c (xtensa_register_type): Likewise.
5040
5041 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5042
5043         * remote.c (remote_target::download_tracepoint): Fix format
5044         string errors.
5045
5046 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5047
5048         * tracefile.c: Include common/byte-vector.h.
5049         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5050         with trace_regblock_size if needed.  Update uses of buf.
5051
5052 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5053
5054         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5055         std::vector<unsigned char>.
5056         * tracepoint.c (collection_list::collection_list): Remove
5057         m_regs_mask initializer from initializer list.  Resize
5058         m_regs_mask using the largest remote register number.
5059         (collection_list::add_remote_register): Remove size check on
5060         m_regs_mask.  Use at to access element.
5061         (collection_list::stringify): Change type of temp_buf to
5062         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5063         stringify the register mask.  Use pack_hex_byte for the register
5064         mask.
5065
5066 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5067
5068         * tracepoint.h (class collection_list) <add_register>: Remove.
5069         <add_remote_register, add_ax_registers, add_local_register>:
5070         Declare.
5071         <add_memrange>: Add scope parameter.
5072         * tracepoint.c (encode_actions_1): Likewise.
5073         (collection_list::add_register): Rename to ...
5074         (collection_list::add_remote_register): ... this.  Update
5075         comment.
5076         (collection_list::add_ax_registers, add_local_register): New
5077         methods.
5078         (collection_list::add_memrange): Add scope parameter.  Call
5079         add_local_register instead of add_register.
5080         (finalize_tracepoint_aexpr): New function.
5081         (collection_list::collect_symbol): Update calls to add_memrange.
5082         Call add_local_register instead of add_register.  Call
5083         add_ax_registers.  Call finalize_tracepoint_aexpr.
5084         (encode_actions_1): Get remote regnos for $reg action.  Call
5085         add_remote_register, add_ax_registers, and add_local_register.
5086         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5087         (validate_actionline): Call finalize_tracepoint_aexpr.
5088
5089 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5090
5091         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5092         Replace array buf with gdb::char_vector buf, of size
5093         get_remote_packet_size ().  Replace references to buf and
5094         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5095         and xsnprintf with snprintf.  Raise errors if the buffer is too
5096         small.
5097
5098 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5099
5100         * remote.c (remote_target::download_tracepoint): Fix the has_more
5101         predicate in the QTDP action list iteration.
5102
5103 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5104
5105         * remote.c (remote_target::download_tracepoint): Fix indentation
5106         in for block.
5107
5108 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5109
5110         * proc-api.c (_initialize_proc_api): Remove c, unused.
5111         * procfs.c (procfs_init_inferior): Remove signals, unused.
5112         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5113         unused.
5114
5115 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5116             Andrew Burgess  <andrew.burgess@embecosm.com>
5117
5118         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5119         'W_STOPCODE (0)' as this could be ambiguous.
5120
5121 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5122
5123         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5124         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5125         "ai_socktype").
5126
5127 2018-08-02  Tom Tromey  <tom@tromey.com>
5128
5129         PR symtab/16842.
5130         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5131         symbols.
5132         (process_structure_scope): Likewise.
5133
5134 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5135
5136         PR gdb/22629:
5137         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5138         kill inferior.
5139
5140 2018-08-02  Tom Tromey  <tom@tromey.com>
5141
5142         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5143         (darwin_suspend_inferior, darwin_resume_inferior)
5144         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5145         (darwin_check_new_threads): Check result of get_darwin_inferior.
5146
5147 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5148
5149         GDB 8.1.1 released.
5150
5151 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5152
5153         * varobj.c (varobj_get_path_expr_parent): Report an error if
5154         parent is a dynamic varobj.
5155
5156 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5157
5158         * gnulib/aclocal.m4: Re-generate.
5159         * gnulib/config.in: Re-generate.
5160         * gnulib/configure: Re-generate.
5161         * gnulib/import/Makefile.in: Re-generate.
5162         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5163         * gnulib/import/m4/onceonly.m4: Re-generate.
5164
5165 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5166
5167         * target-descriptions.c (struct xml_test_tdesc): New.
5168         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5169         (record_xml_tdesc): Update.
5170         (maintenance_check_xml_descriptions): Update.
5171         * target-descriptions.h (record_xml_tdesc): Update comment.
5172
5173 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5174
5175         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5176         checking array bounds are defined.
5177
5178 2018-07-30  Tom Tromey  <tom@tromey.com>
5179
5180         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5181         irreflexivity violation.
5182
5183 2018-07-30  Tom Tromey  <tom@tromey.com>
5184
5185         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5186         * value.c (unpack_long): Remove lint code.
5187         * valops.c (value_ind): Remove lint code.
5188         * valarith.c (value_x_binop, value_x_unop, value_equal)
5189         (value_pos): Remove lint code.
5190
5191 2018-07-28  Tom de Vries  <tdevries@suse.de>
5192
5193         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5194         with undefined upper bound as <optimized out>.
5195
5196 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5197
5198         * gcore.in: Rename variable "name" to "prefix".  Expand
5199         "usage" text.
5200
5201 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5202
5203         * windows-nat.c (windows_nat_target::create_inferior): Update to
5204         call close() in global namespace.
5205
5206 2018-07-26  Tom Tromey  <tom@tromey.com>
5207
5208         * dwarf-index-write.c (add_address_entry): Don't add objfile
5209         offsets.
5210         * dbxread.c (find_stab_function): Rename from
5211         find_stab_function_addr.  Return a bound_minimal_symbol.
5212         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5213         Don't add objfile offsets.
5214         (end_psymtab): Use raw_text_low, raw_text_high,
5215         MSYMBOL_VALUE_RAW_ADDRESS.
5216         (read_ofile_symtab): Update.
5217         (process_one_symbol): Update.
5218         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5219         offsets.
5220         (dw2_relocate): Remove.
5221         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5222         searching addrmap.
5223         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5224         Update.
5225         (process_psymtab_comp_unit_reader, add_partial_symbol)
5226         (add_partial_subprogram, dwarf2_ranges_read): Update.
5227         (load_partial_dies): Update.
5228         (add_address_entry): Don't add objfile offsets.
5229         (dwarf2_build_include_psymtabs): Update.
5230         (create_addrmap_from_aranges): Don't add objfile offsets.
5231         (dw2_find_pc_sect_compunit_symtab): Update.
5232         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5233         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5234         Update.
5235         (parse_partial_symbols): Don't add objfile offsets.  Use
5236         raw_text_low, raw_text_high.  Update.
5237         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5238         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5239         or call 'relocate' quick function.  Clear psymbol_map.
5240         * psympriv.h (struct partial_symbol) <address>: Add section
5241         offset.
5242         <set_unrelocated_address>: Rename from set_address.
5243         <raw_text_low, raw_text_high>: New methods.
5244         <text_low, text_high>: Add objfile parameter.
5245         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5246         set_unrelocated_address.
5247         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5248         (find_pc_psymbol): Update.
5249         (fixup_psymbol_section, relocate_psymtabs): Remove.
5250         (dump_psymtab, psym_functions): Update.
5251         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5252         parameter.
5253         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5254         (start_psymtab_common): Update.
5255         * symfile-debug.c (debug_qf_relocate): Remove.
5256         (debug_sym_quick_functions): Update.
5257         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5258         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5259         Update.
5260
5261 2018-07-26  Tom Tromey  <tromey@redhat.com>
5262
5263         * dbxread.c (end_psymtab): Use text_high_valid and
5264         text_low_valid.
5265         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5266         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5267         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5268         Update comment.
5269         <text_low_valid, text_high_valid>: New fields.
5270         <set_text_low, set_text_high>: Update.
5271         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5272
5273 2018-07-26  Tom Tromey  <tom@tromey.com>
5274
5275         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5276         Update.
5277         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5278         textlow and texthigh fields.
5279         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5280         Update.
5281         * mdebugread.c (parse_lines, parse_partial_symbols)
5282         (psymtab_to_symtab_1): Update.
5283         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5284         Rename fields.  Update comment.  Now private.
5285         <text_low, text_high, set_text_low, set_text_high>: New methods.
5286         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5287         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5288         (start_psymtab_common, maintenance_info_psymtabs)
5289         (maintenance_check_psymtabs): Update.
5290         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5291         texthigh fields.
5292         (scan_xcoff_symtab): Update.
5293
5294 2018-07-26  Tom Tromey  <tromey@redhat.com>
5295
5296         * psympriv.h (struct partial_symbol) <unrelocated_address,
5297         address, set_address>: New methods.
5298         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5299         (fixup_psymbol_section, relocate_psymtabs): Update.
5300         (print_partial_symbols): Add 'objfile' parameter.  Update.
5301         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5302         Update.
5303
5304 2018-07-26  Tom Tromey  <tom@tromey.com>
5305
5306         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5307         (debug_names::write_psymbols): Update.
5308         * psympriv.h (struct partial_symbol): Derive from
5309         general_symbol_info.
5310         <obj_section>: New method.
5311         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5312         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5313         (find_pc_sect_psymbol, fixup_psymbol_section)
5314         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5315         (print_partial_symbols, recursively_search_psymtabs)
5316         (compare_psymbols, psymbol_hash, psymbol_compare)
5317         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5318         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5319
5320 2018-07-26  Tom Tromey  <tromey@redhat.com>
5321
5322         * dbxread.c (end_psymtab): Remove dead code.
5323
5324 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5325
5326         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5327         DWARF unwinders are disabled.
5328         * dwarf2-frame.c: Add dwarf2read.h include.
5329         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5330         disabled.
5331         (dwarf2_frame_unwinders_enabled_p): Define.
5332         (show_dwarf_unwinders_enabled_p): New function.
5333         (_initialize_dwarf2_frame): Register switch to control DWARF
5334         unwinder use.
5335         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5336         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5337         (show_dwarf_cmdlist): Remove static keyword.
5338         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5339         (show_dwarf_cmdlist): Declare.
5340         * NEWS: Document new feature.
5341
5342 2018-07-26  Tom de Vries  <tdevries@suse.de>
5343
5344         PR breakpoints/23366
5345         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5346
5347 2018-07-26  Tom de Vries  <tdevries@suse.de>
5348
5349         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5350         DW_AT_count can't be translated to a dynamic prop.
5351
5352 2018-07-25  Tom de Vries  <tdevries@suse.de>
5353
5354         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5355         try/catch.
5356
5357 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5358
5359         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5360
5361 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5362
5363         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5364
5365 2018-07-24  Keith Seitz  <keiths@redhat.comt
5366
5367         PR symtab/23010
5368         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5369         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5370         instead of add_symbol_to_list.
5371         (read_file_scope): Call prepare_one_comp_unit before reading
5372         any other DIEs.
5373
5374 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5375
5376         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5377
5378 2018-07-24  Tom Tromey  <tom@tromey.com>
5379
5380         * utils.c (malloc, realloc, free): Don't declare.
5381         * configure, config.in: Rebuild.
5382         * configure.ac: Don't check for declarations of free, malloc, or
5383         realloc.
5384
5385 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5386
5387         * aarch64-linux-nat.c
5388         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5389         variable.
5390         * arm-linux-nat.c (fetch_regs): Likewise.
5391         (store_regs): Likewise.
5392         (fetch_vfp_regs): Likewise.
5393         (store_vfp_regs): Likewise.
5394         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5395         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5396         (arm_linux_nat_target::insert_watchpoint): Likewise.
5397         (arm_linux_nat_target::remove_watchpoint): Likewise.
5398         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5399         Likewise.
5400         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5401         Likewise.
5402         * ppc-linux-nat.c (fetch_register): Likewise.
5403         (fetch_all_gp_regs): Likewise.
5404         (fetch_ppc_registers): Likewise.
5405         (store_all_gp_regs): Likewise.
5406         (store_ppc_registers): Likewise.
5407         (hwdebug_insert_point): Likewise.
5408         (can_use_watchpoint_cond_accel): Likewise.
5409         * remote-sim.c (gdb_os_write_stdout): Likewise.
5410
5411 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5412             Tom Tromey  <tom@tromey.com>
5413
5414         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5415         test for it.
5416         * configure: Rebuild.
5417
5418 2018-07-22  Tom Tromey  <tom@tromey.com>
5419
5420         * regformats/regdat.sh: Define xmltarget_${name} inside
5421         #ifndef IN_PROCESS_AGENT.
5422
5423 2018-07-22  Tom Tromey  <tom@tromey.com>
5424
5425         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5426
5427 2018-07-22  Tom Tromey  <tom@tromey.com>
5428
5429         * symfile.c (reread_symbols): Notify iter, not objfile.
5430
5431 2018-07-22  Tom Tromey  <tom@tromey.com>
5432
5433         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5434         Use arch_ops.
5435         (ravenscar_thread_target::prepare_to_store): Likewise.
5436
5437 2018-07-22  Tom Tromey  <tom@tromey.com>
5438
5439         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5440         unused variable.  Call value_fetch_lazy when needed.
5441         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5442         Remove unused variable.  Call value_fetch_lazy when needed.
5443
5444 2018-07-22  Tom Tromey  <tom@tromey.com>
5445
5446         * m32c-tdep.c (mark_dma): Return void.
5447         (make_regs): Remove unused declarations.
5448
5449 2018-07-22  Tom Tromey  <tom@tromey.com>
5450
5451         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5452         cmdscm_get_valid_command_smob_arg_unsafe for effect.
5453         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5454         bkscm_get_valid_block_smob_arg_unsafe for effect.
5455
5456 2018-07-22  Tom Tromey  <tom@tromey.com>
5457
5458         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5459         value_type.
5460
5461 2018-07-22  Tom Tromey  <tom@tromey.com>
5462
5463         * windows-nat.c (saved_context): Conditionally define.
5464         * remote.c (remote_target::remote_btrace_maybe_reopen):
5465         Conditionally declare "warned".
5466         * inflow.c (sigquit_ours): Conditionally define.
5467         (new_tty): Move "tty" declaration inside #if.
5468         * guile/guile.c (guile_datadir): Conditionally define.
5469         * charset.c (set_be_le_names): Move some declarations inside #if.
5470         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
5471         #if.
5472         (parse_xml_btrace_conf): Likewise.
5473
5474 2018-07-22  Tom Tromey  <tom@tromey.com>
5475
5476         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
5477
5478 2018-07-22  Tom Tromey  <tom@tromey.com>
5479
5480         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
5481         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
5482         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
5483         * buildsym-legacy.c (get_macro_table): Remove unused variable.
5484         * stack.c (frame_apply_level_command): Remove unused variable.
5485         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
5486         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
5487         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
5488         unused variable.
5489         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
5490         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
5491         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
5492         variable.
5493         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
5494         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
5495         variable.
5496         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
5497         Remove unused variable.
5498         * cli/cli-script.c (recurse_read_control_structure): Remove unused
5499         variable.
5500         * common/tdesc.c (print_xml_feature::visit): Remove unused
5501         variable.
5502         * compile/compile-object-load.c (store_regs): Remove unused
5503         variables.
5504         * complaints.c (clear_complaints): Remove unused variable.
5505         * corelow.c (core_target_open): Remove unused variable.
5506         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
5507         variable.
5508         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
5509         variable.
5510         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
5511         variable.
5512         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
5513         variable.
5514         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
5515         variable.
5516         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
5517         variable.
5518         * ia64-tdep.c (examine_prologue): Remove unused variable.
5519         * infcall.c (run_inferior_call): Remove unused variable.
5520         * inferior.c (exit_inferior): Remove unused variable.
5521         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
5522         * linespec.c (decode_line_2): Remove unused variable.
5523         * linux-nat.c (super_close): Remove.
5524         * linux-tdep.c (linux_info_proc): Remove unused variable.
5525         * mi/mi-main.c (mi_execute_command): Remove unused variable.
5526         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
5527         Remove unused variable.
5528         * parse.c (find_minsym_type_and_address): Remove unused variable.
5529         * printcmd.c (info_symbol_command, printf_floating): Remove unused
5530         variable.
5531         * python/py-breakpoint.c (bppy_set_commands): Remove unused
5532         variable.
5533         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
5534         variables.
5535         * record-btrace.c (record_btrace_target::store_registers): Remove
5536         unused variable.
5537         (cmd_show_record_btrace_cpu): Remove unused variable.
5538         * riscv-tdep.c (riscv_register_reggroup_p)
5539         (riscv_push_dummy_call, riscv_return_value): Remove unused
5540         variable.
5541         * rust-exp.y (literal): Remove unused variable.
5542         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
5543         unused variable.
5544         <STRUCTOP_ANONYMOUS>: Likewise.
5545         * s390-linux-tdep.c (s390_linux_init_abi_31)
5546         (s390_linux_init_abi_64): Remove unused variable.
5547         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
5548         (file_select_thread, net_windows_open, _initialize_ser_windows):
5549         Remove unused variables.
5550         * symtab.c (find_pc_sect_line): Remove unused variable.
5551         * target-memory.c (compute_garbled_blocks): Remove unused
5552         variable.
5553         (target_write_memory_blocks): Remove unused variable.
5554         * target.c (target_stack::unpush): Remove unused variables.
5555         * tracepoint.c (start_tracing, all_tracepoint_actions)
5556         (merge_uploaded_trace_state_variables)
5557         (print_one_static_tracepoint_marker): Remove unused variable.
5558         * unittests/basic_string_view/element_access/char/1.cc (test01):
5559         Remove unused variable.
5560         * windows-nat.c (windows_continue, windows_add_all_dlls)
5561         (do_initial_windows_stuff, windows_nat_target::create_inferior):
5562         Remove unused variables.
5563
5564 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
5565
5566         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
5567         attr_profile in HAVE_ELF.
5568         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
5569         HAVE_ELF.
5570
5571 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
5572
5573         * frame.c (frame_register_unwind): Change parameter name.
5574         (frame_unwind_register): Likewise.
5575         (frame_unwind_register_value): Likewise.
5576         (frame_unwind_register_signed): Likewise.
5577         (frame_unwind_register_unsigned): Likewise.
5578         * frame.h (frame_register_unwind): Likewise.
5579         (frame_unwind_register): Likewise.
5580         (frame_unwind_register_value): Likewise.
5581         (frame_unwind_register_signed): Likewise.
5582         (frame_unwind_register_unsigned): Likewise.
5583         (frame_unwind_arch): Likewise.
5584
5585 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5586
5587         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
5588         ISA maintenance.
5589
5590 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5591
5592         * mips-linux-nat.c (mips_linux_nat_target::read_description):
5593         Call `get_ptrace_pid' rather than extracting the ptrace PID by
5594         hand.
5595
5596 2018-07-20  Keith Seitz  <keiths@redhat.com>
5597
5598         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
5599         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
5600         m_compunit_symtab, m_language>: Add "m_" prefix.
5601         Update all uses.
5602         * buildsym.c: Update all uses.
5603
5604 2018-07-20  Tom Tromey  <tom@tromey.com>
5605
5606         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
5607         * buildsym.h (record_line_ftype): Remove typedef.
5608
5609 2018-07-20  Tom Tromey  <tom@tromey.com>
5610
5611         * buildsym-legacy.h (augment_type_symtab): Don't declare.
5612         (end_expandable_symtab): Likewise.
5613         (end_symtab_get_static_block): Likewise.
5614         (end_symtab_from_static_block): Likewise.
5615         * buildsym-legacy.c (augment_type_symtab): Remove.
5616         (end_expandable_symtab): Remove.
5617         (end_symtab_get_static_block): Remove.
5618         (end_symtab_from_static_block): Remove.
5619
5620 2018-07-20  Tom Tromey  <tom@tromey.com>
5621
5622         * dwarf2read.c: Include buildsym.h.
5623         (struct dwarf2_cu) <builder>: New method.
5624         (fixup_go_packaging): Update.
5625         (process_full_comp_unit, process_full_type_unit): Update.  Don't
5626         use scoped_free_pendings.
5627         (using_directives): Add "cu" parameter, remove "language".
5628         (read_import_statement, setup_type_unit_groups, )
5629         (read_func_scope, read_lexical_block_scope)
5630         (dwarf2_record_block_ranges, read_namespace): Update.
5631         (lnp_state_machine::lnp_state_machine): Add cu parameter.
5632         (lnp_state_machine::handle_end_sequence): Update.
5633         (class lnp_state_machine) <m_cu>: New member.
5634         <m_record_line_callback>: Remove.
5635         <m_currently_recording_lines>: New member.
5636         (lnp_state_machine::handle_set_file): Update.
5637         (noop_record_line): Remove.
5638         (dwarf_record_line_p): Add cu parameter.
5639         (dwarf_record_line_1, dwarf_finish_line): Likewise.
5640         (lnp_state_machine::record_line)
5641         (lnp_state_machine::lnp_state_machine)
5642         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5643         (dwarf_decode_lines): Update.
5644         (dwarf2_start_subfile): Add cu parameter.
5645         (dwarf2_start_symtab, new_symbol): Update.
5646         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
5647         Remove dwarf2_per_objfile parameter.
5648         (dwarf_decode_macros): Update.
5649
5650 2018-07-20  Tom Tromey  <tom@tromey.com>
5651
5652         * stabsread.c (define_symbol): Update.
5653         * buildsym-legacy.h (get_buildsym_compunit): Declare.
5654         * dwarf2read.c (new_symbol): Update.
5655         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
5656         * cp-namespace.c: Include buildsym.h.
5657         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
5658         * buildsym-legacy.c (get_buildsym_compunit): New function.
5659
5660 2018-07-20  Tom Tromey  <tom@tromey.com>
5661
5662         * xcoffread.c: Include buildsym-legacy.h.
5663         * windows-nat.c: Include buildsym-legacy.h.
5664         * stabsread.c: Include buildsym-legacy.h.
5665         * mdebugread.c: Include buildsym-legacy.h.
5666         * buildsym-legacy.h: New file.
5667         * buildsym-legacy.c: New file, from buildsym.c.
5668         * go32-nat.c: Include buildsym-legacy.h.
5669         * dwarf2read.c: Include buildsym-legacy.h.
5670         * dbxread.c: Include buildsym-legacy.h.
5671         * cp-namespace.c: Include buildsym-legacy.h.
5672         * coffread.c: Include buildsym-legacy.h.
5673         * buildsym.h: Move some contents to buildsym-legacy.h.
5674         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
5675         buildsym-legacy.c.
5676         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
5677
5678 2018-07-20  Tom Tromey  <tom@tromey.com>
5679
5680         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
5681         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
5682         (buildsym_compunit::buildsym_compunit)
5683         (buildsym_compunit::~buildsym_compunit)
5684         (buildsym_compunit::get_macro_table): Define.
5685
5686 2018-07-20  Tom Tromey  <tom@tromey.com>
5687
5688         * buildsym.c (reset_symtab_globals): Remove.
5689         (buildsym_compunit::end_symtab_from_static_block): Update.
5690         (buildsym_compunit::augment_type_symtab): Update.
5691         (end_symtab_from_static_block): Call free_buildsym_compunit.
5692         (augment_type_symtab, end_symtab, end_expandable_symtab):
5693         Likewise.
5694
5695 2018-07-20  Tom Tromey  <tom@tromey.com>
5696
5697         * arch-utils.c: Do not include buildsym.h.
5698         * mipsread.c: Do not include buildsym.h.
5699         * machoread.c: Do not include buildsym.h.
5700         * elfread.c: Do not include buildsym.h.
5701
5702 2018-07-20  Tom Tromey  <tom@tromey.com>
5703
5704         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
5705         initialization.
5706         (buildsym_compunit): Add new constructor.
5707         (struct buildsym_compunit) <get_last_source_file, finish_block,
5708         record_block_range, start_subfile, patch_subfile_names,
5709         push_subfile, pop_subfile, record_line, get_compunit_symtab,
5710         set_last_source_start_addr, get_last_source_start_addr,
5711         get_local_using_directives, set_local_using_directives,
5712         get_global_using_directives, outermost_context_p,
5713         get_current_context_stack, get_context_stack_depth,
5714         get_current_subfile, get_local_symbols, get_file_symbols,
5715         get_global_symbols, record_debugformat, record_producer,
5716         push_context, pop_context, end_symtab_get_static_block,
5717         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
5718         New public methods.
5719         <record_pending_block, finish_block_internal, make_blockvector,
5720         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
5721         private methods.
5722         Update all users.
5723
5724 2018-05-22  Tom Tromey  <tom@tromey.com>
5725
5726         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5727         parameter.
5728         (finish_block_internal): Update.
5729
5730 2018-07-20  Tom Tromey  <tom@tromey.com>
5731
5732         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5733         parameter.
5734         (finish_block_internal): Update.
5735
5736 2018-07-20  Tom Tromey  <tom@tromey.com>
5737
5738         * buildsym.h (EXTERN): Don't define or undef.
5739         * buildsym.c (EXTERN): Don't define.
5740
5741 2018-07-20  Tom Tromey  <tom@tromey.com>
5742
5743         * buildsym.c: Remove TODO comment.
5744
5745 2018-07-20  Tom Tromey  <tom@tromey.com>
5746
5747         * coffread.c (coff_symtab_read): Update.
5748         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5749         (xcoff_new_init): Update.
5750         * mipsread.c (mipscoff_new_init): Update.
5751         * mdebugread.c (mdebug_build_psymtabs): Update.
5752         * elfread.c (elf_new_init): Update.
5753         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5754         Update.
5755         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5756         (coffstab_build_psymtabs, elfstab_build_psymtabs)
5757         (stabsect_build_psymtabs): Update.
5758         * buildsym.h (buildsym_init): Don't declare.
5759         * buildsym.c: Update comment.
5760         (prepare_for_building): Remove.
5761         (start_symtab, restart_symtab): Update.
5762         (reset_symtab_globals): Update comment.
5763         (buildsym_init): Remove.
5764
5765 2018-07-20  Tom Tromey  <tom@tromey.com>
5766
5767         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5768         * stabsread.c (patch_block_stabs, define_symbol, read_type)
5769         (read_enum_type, common_block_start, common_block_end)
5770         (cleanup_undefined_types_1, finish_global_stabs): Update.
5771         * mdebugread.c (psymtab_to_symtab_1): Update.
5772         * dwarf2read.c (fixup_go_packaging, read_func_scope)
5773         (read_lexical_block_scope, new_symbol): Update.
5774         * dbxread.c (process_one_symbol): Update.
5775         * coffread.c (coff_symtab_read, process_coff_symbol)
5776         (coff_read_enum_type): Update.
5777         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5778         declare.
5779         (get_local_symbols, get_file_symbols, get_global_symbols): New
5780         functions.
5781         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5782         m_global_symbols.
5783         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5784         (~scoped_free_pendings): Update.
5785         (finish_block, prepare_for_building, reset_symtab_globals)
5786         (end_symtab_get_static_block, end_symtab_with_blockvector)
5787         (augment_type_symtab, push_context): Update.
5788         (get_local_symbols, get_file_symbols, get_global_symbols): New
5789         functions.
5790         (buildsym_init): Update.
5791
5792 2018-07-20  Tom Tromey  <tom@tromey.com>
5793
5794         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5795         (process_full_type_unit): Likewise.
5796         (dwarf2_start_symtab): Set list_in_scope.
5797
5798 2018-07-20  Tom Tromey  <tom@tromey.com>
5799
5800         * dwarf2read.c (process_psymtab_comp_unit_reader)
5801         (build_type_psymtabs_reader): Do not set list_in_scope.
5802
5803 2018-07-20  Tom Tromey  <tom@tromey.com>
5804
5805         * buildsym.c (free_pendings): Remove.
5806         (add_symbol_to_list, scoped_free_pendings)
5807         (finish_block_internal, buildsym_init): Update.
5808
5809 2018-07-20  Tom Tromey  <tom@tromey.com>
5810
5811         * xcoffread.c (read_xcoff_symtab): Update.
5812         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5813         Update.
5814         * dbxread.c (process_one_symbol): Update.
5815         * coffread.c (coff_symtab_read): Update.
5816         * buildsym.h (finish_block): Update.
5817         * buildsym.c (finish_block): Remove "listhead" argument.
5818         (end_symtab_get_static_block): Update.
5819
5820 2018-07-20  Tom Tromey  <tom@tromey.com>
5821
5822         * buildsym.h (class scoped_free_pendings): Remove constructor.
5823         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5824         method.
5825         <m_pending_block_obstack, m_pending_blocks>: New members.
5826         (pending_block_obstack, pending_blocks): Remove.
5827         (scoped_free_pendings::scoped_free_pendings): Default.
5828         (~scoped_free_pendings): Update.
5829         (free_pending_blocks): Remove.
5830         (finish_block_internal, record_pending_block, make_blockvector)
5831         (end_symtab_get_static_block, augment_type_symtab, push_context)
5832         (buildsym_init): Update.
5833
5834 2018-07-20  Tom Tromey  <tom@tromey.com>
5835
5836         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5837         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5838         members.
5839         (pending_addrmap, pending_addrmap_obstack)
5840         (pending_addrmap_interesting): Remove.
5841         (scoped_free_pendings, record_block_range, make_blockvector)
5842         (prepare_for_building, reset_symtab_globals, buildsym_init):
5843         Update.
5844
5845 2018-07-20  Tom Tromey  <tom@tromey.com>
5846
5847         * xcoffread.c (process_linenos): Update.
5848         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5849         * mdebugread.c (psymtab_to_symtab_1): Update.
5850         * dwarf2read.c (setup_type_unit_groups)
5851         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5852         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5853         * dbxread.c (process_one_symbol): Update.
5854         * coffread.c (coff_symtab_read, enter_linenos)
5855         (process_coff_symbol): Update.
5856         * buildsym.h (current_subfile): Don't declare.
5857         (get_current_subfile): Declare.
5858         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5859         member.
5860         (start_subfile, free_buildsym_compunit, push_subfile)
5861         (prepare_for_building, start_symtab): Update.
5862         (get_current_subfile): New function.
5863
5864 2018-07-20  Tom Tromey  <tom@tromey.com>
5865
5866         * coffread.c (coff_symtab_read): Update.
5867         * xcoffread.c (read_xcoff_symtab): Update.
5868         * dwarf2read.c (new_symbol): Update.
5869         (read_func_scope, read_lexical_block_scope): Update.
5870         * dbxread.c (process_one_symbol): Update.
5871         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5872         (outermost_context_p): Remove macro.
5873         (outermost_context_p, get_current_context_stack)
5874         (get_context_stack_depth): Declare.
5875         (pop_context): Return struct context_stack.
5876         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5877         member.
5878         (context_stack_size): Remove.
5879         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5880         (prepare_for_building, end_symtab_get_static_block)
5881         (augment_type_symtab, push_context): Update.
5882         (pop_context): Return struct context_stack.
5883         (outermost_context_p, get_current_context_stack)
5884         (get_context_stack_depth): New functions.
5885         (buildsym_init): Update.
5886
5887 2018-07-20  Tom Tromey  <tom@tromey.com>
5888
5889         * rust-exp.y: Now a pure parser.  Update all rules.
5890         (%union): Move earlier.
5891         (current_parser, work_obstack): Remove globals.
5892         (rust_parser, ~rust_parser): Update.
5893         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5894         lex_character, lex_number, lex_string, lex_identifier,
5895         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5896         convert_name, convert_params_to_expression,
5897         convert_ast_to_expression, ast_basic_type, ast_operation,
5898         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5899         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5900         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5901         ast_array_type, ast_slice_type, ast_reference_type,
5902         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5903         (rust_parse): Update.
5904         (rustyyerror, rustyylex): Add parser parameter.
5905         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5906         (rust_lex_stringish_test, rust_lex_test_sequence)
5907         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5908         (rust_lex_test_push_back, rust_lex_tests): Update.
5909
5910 2018-07-19  Pedro Alves  <palves@redhat.com>
5911
5912         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5913         gdb::unique_xmalloc_ptr.
5914         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5915         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5916         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5917         copy-initialization.
5918         * guile/scm-pretty-print.c (ppscm_print_children): Use
5919         gdb::unique_xmalloc_ptr instead of cleanups.
5920         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5921         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5922         gdb::unique_xmalloc_ptr.
5923         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5924         Adjust to use gdb::unique_xmalloc_ptr.
5925         * guile/scm-utils.c (extract_arg): Adjust.
5926         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5927         gdb::unique_xmalloc_ptr instead of a cleanup.
5928
5929 2018-07-19  Tom Tromey  <tom@tromey.com>
5930
5931         * utils.c (do_value_free_to_mark)
5932         (make_cleanup_value_free_to_mark): Remove.
5933         * utils.h (make_cleanup_value_free_to_mark): Remove.
5934
5935 2018-07-19  Pedro Alves  <palves@redhat.com>
5936
5937         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5938         forwarding reference.
5939
5940 2018-07-18  Pedro Alves  <palves@redhat.com>
5941
5942         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5943         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5944         cleanup.
5945
5946 2018-07-18  Pedro Alves  <palves@redhat.com>
5947
5948         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5949         exceptions.
5950         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5951         (gdbscm_wrap): New.
5952         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5953         directly instead of a cleanup.
5954         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5955         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5956         (vlscm_binop_gdbthrow): New, factored out from ...
5957         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5958         (vlscm_rich_compare): Use gdbscm_wrap.
5959         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5960         instead of a cleanup.
5961         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5962         cleanup.
5963         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5964         Use xfree directly instead of a cleanup.
5965         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5966         Adjust to use gdbscm_wrap and scoped_value_mark.
5967         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5968         (gdbscm_value_address, gdbscm_value_dereference)
5969         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5970         scoped_value_mark.
5971         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5972         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5973         scoped_value_mark.
5974         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5975         gdbscm_wrap and scoped_value_mark.
5976         (gdbscm_value_to_string): Use xfree directly instead of a
5977         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5978         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5979         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5980         scoped_value_mark.
5981         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5982         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5983         scoped_value_mark.
5984         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5985         gdbscm_wrap.
5986
5987 2018-07-18  Tom de Vries  <tdevries@suse.de>
5988
5989         * findvar.c (default_read_var_value): Also resolve dynamic type for
5990         LOC_OPTIMIZED_OUT vars.
5991
5992 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5993
5994         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5995         decoding.
5996
5997 2018-07-17  Tom Tromey  <tom@tromey.com>
5998
5999         * guile/scm-param.c (pascm_set_func, pascm_show_func)
6000         (compute_enum_list, pascm_set_param_value_x)
6001         (gdbscm_parameter_value): Update.
6002         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6003         (gdbscm_scm_to_host_string): Update.
6004         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6005         Update.
6006         * guile/scm-cmd.c (cmdscm_add_completion): Update.
6007         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6008         * guile/scm-string.c (gdbscm_scm_to_string): Return
6009         unique_xmalloc_ptr.
6010         (gdbscm_scm_to_host_string): Likewise.
6011
6012 2018-07-17  Tom Tromey  <tom@tromey.com>
6013
6014         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6015         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6016         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6017         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6018         unique_xmalloc_ptr.
6019
6020 2018-07-17  Tom Tromey  <tom@tromey.com>
6021
6022         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6023         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6024         Update.
6025         * guile/scm-cmd.c (cmdscm_function): Update.
6026         * guile/scm-pretty-print.c
6027         (ppscm_print_exception_unless_memory_error): Update.
6028         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6029         Return unique_xmalloc_ptr.
6030
6031 2018-07-17  Tom Tromey  <tom@tromey.com>
6032
6033         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6034         Use string_printf.
6035
6036 2018-07-17  Jim Wilson  <jimw@sifive.com>
6037
6038         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6039         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6040         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6041         unecessary braces after EF_RISCV_RVC test.  Delete call to
6042         set_gdbarch_decr_pc_after_break.
6043
6044         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6045         RISCV_LAST_FP_REGNUM + 1.
6046         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6047
6048 2018-07-17  Tom Tromey  <tom@tromey.com>
6049
6050         * configure.ac: Remove --disable-gdbcli.
6051         * configure: Rebuild.
6052         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6053         (SUBDIR_CLI_CFLAGS): Remove.
6054         (SFILES): Use SUBDIR_CLI_SRCS.
6055         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6056
6057 2018-07-17  Tom Tromey  <tom@tromey.com>
6058
6059         PR gdb/18624:
6060         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6061
6062 2018-07-16  Jim Wilson  <jimw@sifive.com>
6063
6064         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6065
6066 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6067
6068         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6069         variable.
6070         (libunwind_frame_sniffer): Likewise.
6071         (libunwind_frame_prev_register): Likewise.
6072         (libunwind_sigtramp_frame_sniffer): Likewise.
6073         * ia64-tdep.c (ia64_access_reg): Likewise.
6074         (ia64_access_rse_reg): Likewise.
6075         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6076         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6077
6078 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6079
6080         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6081
6082 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6083
6084         * remote-sim.c (gdbsim_target::close,
6085         gdbsim_target::mourn_inferior): Remove unused variables.
6086
6087 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6088
6089         * ia64-tdep.c (ktab_buf): New global.
6090         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6091         (get_kernel_table): Adjust.
6092
6093 2018-07-16  Tom Tromey  <tom@tromey.com>
6094
6095         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6096         * dwarf2read.c (using_directives, new_symbol): Use
6097         outermost_context_p.
6098         * dbxread.c (process_one_symbol): Use outermost_context_p.
6099         * coffread.c (coff_symtab_read): Use outermost_context_p.
6100
6101 2018-07-16  Tom Tromey  <tom@tromey.com>
6102
6103         * dwarf2read.c (using_directives, read_func_scope)
6104         (read_lexical_block_scope): Update.
6105         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6106         * buildsym.h (local_using_directives, global_using_directives):
6107         Don't declare.
6108         (get_local_using_directives, set_local_using_directives)
6109         (get_global_using_directives): Declare.
6110         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6111         m_global_using_directives>: New members.
6112         (finish_block_internal, prepare_for_building)
6113         (reset_symtab_globals, end_symtab_get_static_block)
6114         (push_context): Update.
6115         (get_local_using_directives, set_local_using_directives)
6116         (get_global_using_directives): New functions.
6117         (buildsym_init): Update.
6118
6119 2018-07-16  Tom Tromey  <tom@tromey.com>
6120
6121         * xcoffread.c (xcoff_initial_scan): Don't call
6122         free_pending_blocks.
6123         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6124         * buildsym.h (class scoped_free_pendings): Add constructor.
6125         (free_pending_blocks): Don't declare.
6126         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6127         (free_pending_blocks): Now static.
6128
6129 2018-07-16  Tom Tromey  <tom@tromey.com>
6130
6131         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6132         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6133         member.
6134         (struct subfile_stack): Remove.
6135         (subfile_stack): Remove.
6136         (push_subfile, pop_subfile, buildsym_init): Update.
6137
6138 2018-07-16  Tom Tromey  <tom@tromey.com>
6139
6140         * buildsym.c (push_subfile): Use gdb_assert.
6141         (pop_subfile): Use gdb_assert.
6142
6143 2018-07-16  Tom Tromey  <tom@tromey.com>
6144
6145         * buildsym.h (merge_symbol_lists): Remove.
6146         * buildsym.c (merge_symbol_lists): Remove.
6147
6148 2018-07-16  Tom Tromey  <tom@tromey.com>
6149
6150         * stabsread.c (scan_file_globals): Update comment.
6151         * stabsread.h (scan_file_globals): Move from buildsym.h.
6152         * buildsym.h (scan_file_globals): Move to stabsread.h.
6153
6154 2018-07-16  Tom Tromey  <tom@tromey.com>
6155
6156         * xcoffread.c (xcoff_new_init): Update.
6157         * mipsread.c (mipscoff_new_init): Update.
6158         * mdebugread.c (mdebug_build_psymtabs): Update.
6159         * elfread.c (elf_new_init): Update.
6160         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6161         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6162         * buildsym.h (buildsym_new_init): Don't declare.
6163         * buildsym.c (buildsym_new_init): Remove.
6164
6165 2018-07-16  Tom Tromey  <tom@tromey.com>
6166
6167         * stabsread.h (within_function): Move from buildsym.h.
6168         * stabsread.c (start_stabs): Clear within_function.
6169         * coffread.c (coff_start_symtab): Clear within_function.
6170         * buildsym.h (within_function): Move to stabsread.h.
6171         * buildsym.c (prepare_for_building): Update.
6172
6173 2018-07-16  Tom Tromey  <tom@tromey.com>
6174
6175         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6176         * dwarf2read.c (dwarf2_start_symtab): Don't set
6177         processing_gcc_compilation.
6178         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6179
6180 2018-07-16  Tom Tromey  <tom@tromey.com>
6181
6182         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6183         (next_symbol_text_func): Move from buildsym.h.
6184         * stabsread.c (hashname): Move from buildsym.c.
6185         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6186         (next_symbol_text_func, hashname): Move to stabsread.h.
6187         * buildsym.c: Don't include bcache.h
6188         (hashname): Move to stasbread.c.
6189
6190 2018-07-16  Tom Tromey  <tom@tromey.com>
6191
6192         * buildsym.h (context_stack_size): Don't declare.
6193         * buildsym.c (context_stack_size): New global.
6194
6195 2018-07-16  Tom Tromey  <tom@tromey.com>
6196
6197         * dbxread.c (processing_acc_compilation): New global.
6198         * buildsym.h (processing_acc_compilation): Don't declare.
6199
6200 2018-07-16  Tom Tromey  <tom@tromey.com>
6201
6202         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6203         * dbxread.c (read_ofile_symtab): Update.
6204         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6205         * buildsym.h (last_source_start_addr): Remove.
6206         (set_last_source_start_addr, get_last_source_start_addr):
6207         Declare.
6208         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6209         parameter.
6210         (struct buildsym_compunit) <m_last_source_start_addr>: New
6211         member.
6212         (prepare_for_building): Remove start_addr parameter.
6213         (start_symtab, restart_symtab, end_symtab_get_static_block)
6214         (end_symtab_with_blockvector): Update.
6215         (set_last_source_start_addr, get_last_source_start_addr): New
6216         functions.
6217
6218 2018-07-16  Tom Tromey  <tom@tromey.com>
6219
6220         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6221         member.
6222         (have_line_numbers): Remove.
6223         (record_line, prepare_for_building, end_symtab_get_static_block)
6224         (augment_type_symtab): Update.
6225
6226 2018-07-16  Tom Tromey  <tom@tromey.com>
6227
6228         * buildsym.c (~buildsym_compunit): Free the macro table.
6229         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6230         methods.
6231         <m_pending_macros>: New member.
6232         (pending_macros): Remove.
6233         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6234         (reset_symtab_globals, end_symtab_get_static_block)
6235         (end_symtab_with_blockvector, augment_type_symtab)
6236         (buildsym_init): Update.
6237
6238 2018-07-16  Tom Tromey  <tom@tromey.com>
6239
6240         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6241         parameter.
6242         (buildsym_compunit::set_last_source_file): New method.
6243         <m_last_source_file>: New member.
6244         (prepare_for_building): Remove "name" parameter.
6245         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6246         (last_source_file): Remove.
6247         (set_last_source_file, get_last_source_file): Update.
6248
6249 2018-07-16  Tom Tromey  <tom@tromey.com>
6250
6251         * buildsym.c (prepare_for_building): Add assert.
6252
6253 2018-07-16  Tom Tromey  <tom@tromey.com>
6254
6255         * buildsym.c (~buildsym_compunit): Update.
6256         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6257         (start_subfile, patch_subfile_names)
6258         (end_symtab_with_blockvector): Update.
6259
6260 2018-07-16  Tom Tromey  <tom@tromey.com>
6261
6262         * buildsym.c (struct buildsym_compunit): Add constructor,
6263         destructor, initializers.
6264         (start_buildsym_compunit): Remove.
6265         (free_buildsym_compunit): Use "delete".
6266         (start_symtab, restart_symtab): Use "new".
6267
6268 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6269
6270         * symfile.c (set_objfile_default_section_offset): Remove struct
6271         keyword.
6272
6273 2018-07-14  Stafford Horne  <shorne@gmail.com>
6274
6275         * (Responsible Maintainers): Add myself as or1k maintainer.
6276
6277 2018-07-13  Tom Tromey  <tom@tromey.com>
6278
6279         * symfile.c (set_objfile_default_section_offset): Use extra braces
6280         around initializer.
6281
6282 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6283
6284         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6285         non-branching basr.
6286
6287 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6288
6289         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6290         unittests/cli-utils-selftests.c
6291         * unittests/cli-utils-selftests.c: New file.
6292
6293 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6294
6295         * NEWS: Mention new commands. Mention change to 'thread apply'.
6296
6297 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6298
6299         * thread.c (thr_try_catch_cmd): New function.
6300         (thread_apply_all_command): Handle qcs flags.
6301         (thread_apply_command): Handle qcs flags.
6302         (taas_command): New function.
6303         (tfaas_command): New function.
6304         (_initialize_thread): Update to setup the new commands 'taas
6305         and 'tfaas'. Change doc string for 'thread apply'.
6306
6307 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6308
6309         * stack.c: (trailing_outermost_frame): New function, mostly
6310         extracted from backtrace_command_1.
6311         (leading_innermost_frame): New function.
6312         (backtrace_command_1): Update to call trailing_outermost_frame.
6313         (frame_apply_command_count): New function.
6314         (frame_apply_level_command): New function.
6315         (frame_apply_all_command): New function.
6316         (frame_apply_command): New function.
6317         (faas_command): New function.
6318         (frame_cmd_list): New variable.
6319         (_initialize_stack): Update to setup the new commands 'frame apply'
6320         and 'faas'.
6321
6322 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6323
6324         * cli-utils.c (number_or_range_parser::get_number): Only handle
6325         numbers or convenience var as numbers.
6326         (parse_flags): New function.
6327         (parse_flags_qcs): New function.
6328         (number_or_range_parser::finished): Ensure parsing end is detected
6329         before end of string.
6330         * cli-utils.h (parse_flags): New function.
6331         (parse_flags_qcs): New function.
6332         (number_or_range_parser): Remove m_finished bool.
6333         (number_or_range_parser::skip_range): Set m_in_range to false.
6334
6335 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6336
6337         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6338         on Windows.
6339
6340 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6341             Jan Kratochvil  <jan.kratochvil@redhat.com>
6342             Paul Fertser  <fercerpav@gmail.com>
6343             Tsutomu Seki  <sekiriki@gmail.com>
6344             Pedro Alves  <palves@redhat.com>
6345
6346         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6347         'unittests/parse-connection-spec-selftests.c'.
6348         (COMMON_SFILES): Add 'common/netstuff.c'.
6349         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6350         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6351         * common/netstuff.c: New file.
6352         * common/netstuff.h: New file.
6353         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6354         (wait_for_connect): Update comment.  New parameter
6355         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6356         Use 'sock' directly instead of 'scb->fd'.
6357         (try_connect): New function, with code from 'net_open'.
6358         (net_open): Rewrite main loop to deal with multiple
6359         sockets/addresses.  Handle IPv6-style hostnames; implement
6360         support for IPv6 connections.
6361         * unittests/parse-connection-spec-selftests.c: New file.
6362
6363 2018-07-11  Pedro Alves  <palves@redhat.com>
6364
6365         PR gdb/23377
6366         * remote.c (remote_target::remote_detach_pid): Call
6367         set_current_process.
6368
6369 2018-07-11  Pedro Alves  <palves@redhat.com>
6370
6371         * h8300-tdep.c (h8300_gdbarch_init): Remove
6372         set_gdbarch_ecoff_reg_to_regnum calls.
6373
6374 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6375
6376         PR c++/23373
6377         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6378         offsets/sizes for static members of a class/struct.
6379
6380 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6381
6382         * target-descriptions.c (tdesc_register_bitsize): Rename.
6383         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6384         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6385         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6386
6387 2018-07-10  Tom Tromey  <tom@tromey.com>
6388
6389         * breakpoint.c (moribund_locations): Now static and a
6390         std::vector.
6391         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6392         (build_bpstat_chain, update_global_location_list)
6393         (breakpoint_retire_moribund): Update.
6394         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6395         VEC.
6396
6397 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6398
6399         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6400         (riscv_register_reggroup_p): Use new function, remove unneeded
6401         parenthesis.
6402         (riscv_push_dummy_call): Extend assert to compare against xlen or
6403         flen based on register type.
6404
6405 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6406
6407         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6408
6409 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6410
6411         * remote.c (show_hardware_watchpoint_limit): New function.
6412         (show_hardware_watchpoint_length_limit): New function.
6413         (show_hardware_breakpoint_limit): New function.
6414         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6415         where appropriate, update help text.
6416
6417 2018-07-09  Tom Tromey  <tom@tromey.com>
6418
6419         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6420         (CLIBS): Don't mention NAT_CLIBS.
6421
6422 2018-07-09  Tom Tromey  <tom@tromey.com>
6423
6424         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6425         (LIBGDB_OBS, clean mostlyclean): Update.
6426         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6427
6428 2018-07-09  Tom Tromey  <tom@tromey.com>
6429
6430         * Makefile.in (%.c: %.y): Use ECHO_YACC.
6431         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
6432         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6433
6434 2018-07-09  Tom Tromey  <tom@tromey.com>
6435
6436         * Makefile.in (ALLDEPFILES): Remove exec.c.
6437         (COMMON_OBS): Remove exec.o.
6438         (COMMON_SFILES): Add exec.c.
6439
6440 2018-07-09  Tom Tromey  <tom@tromey.com>
6441
6442         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6443
6444 2018-07-09  Tom Tromey  <tom@tromey.com>
6445
6446         * Makefile.in (clean mostlyclean): Remove stamp-version.
6447         (version.c): Depend on stamp-version.
6448         (stamp-version): New rule, from version.c rule.
6449
6450 2018-07-09  Tom Tromey  <tom@tromey.com>
6451
6452         * Makefile.in (init.c): Depend on stamp-init.
6453         (stamp-init): New rule, from init.c rule.
6454         (clean mostlyclean): Remove stamp-init.
6455
6456 2018-07-09  Tom Tromey  <tom@tromey.com>
6457
6458         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6459         SUBDIR_GCC_COMPILE_SRCS.
6460
6461 2018-07-09  Tom Tromey  <tom@tromey.com>
6462
6463         * Makefile.in (init.c): Remove some unused sed rules.
6464
6465 2018-07-09  Tom Tromey  <tom@tromey.com>
6466
6467         * Makefile.in (TSOBS): Remove.
6468         (INIT_FILES): Update.
6469         (LIBGDB_OBS): Update.
6470         (COMMON_SFILES): Add inflow.c.
6471         (SFILES): Remove inflow.c.
6472
6473 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6474
6475         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
6476
6477 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
6478
6479         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
6480         get_saveloc_name, is_signal_frame_name, step_name,
6481         init_remote_name, create_addr_space_name,
6482         destroy_addr_space_name, search_unwind_table_name,
6483         find_dyn_list_name): Constify.
6484
6485 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
6486
6487         * darwin-nat.c (darwin_pthread_kill): New function.
6488         (darwin_resume_thread): Use darwin_pthread_kill.
6489
6490 2018-07-05  Tom de Vries  <tdevries@suse.de>
6491
6492         * macroexp.c (macro_buffer) <operator=>: New member function.
6493
6494 2018-07-04  Tom Tromey  <tom@tromey.com>
6495
6496         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
6497
6498 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
6499
6500         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
6501         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
6502         * maint.c: Likewise.
6503         * top.c: Likewise.
6504
6505 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6506
6507         * NEWS: Create a new section for the next release branch.
6508         Rename the section of the current branch, now that it has
6509         been cut.
6510
6511 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6512
6513         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
6514         * version.in: Bump version to 8.2.50.DATE-git.
6515
6516 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
6517             Pedro Alves  <palves@redhat.com>
6518
6519         * linux-nat.c (linux_init_ptrace): Rename to ...
6520         (linux_init_ptrace_procfs): ... this.  Call
6521         linux_proc_init_warnings.
6522         (linux_nat_target::post_attach)
6523         (linux_nat_target::post_startup_inferior): Adjust.
6524         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
6525         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
6526
6527 2018-07-04  Tom de Vries  <tdevries@suse.de>
6528
6529         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
6530         check ...
6531         (read_comp_unit_head): ... here.
6532
6533 2018-07-03  Tom Tromey  <tom@tromey.com>
6534
6535         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
6536         (stop_tracing, tstatus_command)
6537         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
6538         (print_one_static_tracepoint_marker): Update.
6539         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
6540         std::vector.
6541         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
6542         VEC.
6543         (all_tracepoints, static_tracepoints_here): Return std::vector.
6544
6545 2018-07-03  Tom Tromey  <tom@tromey.com>
6546
6547         * common/ptid.c (ptid_equal): Remove.
6548         * common/ptid.h (ptid_equal): Don't declare.
6549         * ada-tasks.c: Update.
6550         * breakpoint.c: Update.
6551         * common/agent.c: Update.
6552         * corelow.c: Update.
6553         * darwin-nat-info.c: Update.
6554         * darwin-nat.c: Update.
6555         * dcache.c: Update.
6556         * dtrace-probe.c: Update.
6557         * dummy-frame.c: Update.
6558         * fbsd-nat.c: Update.
6559         * frame.c: Update.
6560         * gdbthread.h: Update.
6561         * gnu-nat.c: Update.
6562         * go32-nat.c: Update.
6563         * inf-loop.c: Update.
6564         * inf-ptrace.c: Update.
6565         * infcall.c: Update.
6566         * infcmd.c: Update.
6567         * inflow.c: Update.
6568         * infrun.c: Update.
6569         * linux-fork.c: Update.
6570         * linux-nat.c: Update.
6571         * linux-thread-db.c: Update.
6572         * mi/mi-cmd-var.c: Update.
6573         * mi/mi-interp.c: Update.
6574         * mi/mi-main.c: Update.
6575         * nto-procfs.c: Update.
6576         * ppc-linux-tdep.c: Update.
6577         * procfs.c: Update.
6578         * python/py-inferior.c: Update.
6579         * python/py-record-btrace.c: Update.
6580         * python/py-record.c: Update.
6581         * ravenscar-thread.c: Update.
6582         * regcache.c: Update.
6583         * remote-sim.c: Update.
6584         * remote.c: Update.
6585         * sol-thread.c: Update.
6586         * solib.c: Update.
6587         * target.c: Update.
6588         * tui/tui-stack.c: Update.
6589         * varobj.c: Update.
6590         * windows-nat.c: Update.
6591         * windows-tdep.c: Update.
6592
6593 2018-07-03  Tom Tromey  <tom@tromey.com>
6594
6595         * common/ptid.c (ptid_match): Remove.
6596         * common/ptid.h (ptid_match): Don't declare.
6597         * fbsd-nat.c: Update.
6598         * infcmd.c: Update.
6599         * infrun.c: Update.
6600         * linux-nat.c: Update.
6601         * record-btrace.c: Update.
6602         * regcache.c: Update.
6603         * remote.c: Update.
6604
6605 2018-07-03  Tom Tromey  <tom@tromey.com>
6606
6607         * common/ptid.c (ptid_tid_p): Remove.
6608         * common/ptid.h (ptid_tid_p): Don't declare.
6609         * sol-thread.c: Update.
6610
6611 2018-07-03  Tom Tromey  <tom@tromey.com>
6612
6613         * common/ptid.c (ptid_lwp_p): Remove.
6614         * common/ptid.h (ptid_lwp_p): Don't declare.
6615         * fbsd-nat.c: Update.
6616         * linux-nat.c: Update.
6617         * nat/linux-procfs.c: Update.
6618         * nat/x86-linux-dregs.c: Update.
6619         * sol-thread.c: Update.
6620
6621 2018-07-03  Tom Tromey  <tom@tromey.com>
6622
6623         * common/ptid.c (ptid_is_pid): Remove.
6624         * common/ptid.h (ptid_is_pid): Don't declare.
6625         * infrun.c: Update.
6626         * linux-nat.c: Update.
6627         * mi/mi-interp.c: Update.
6628         * remote.c: Update.
6629         * thread.c: Update.
6630
6631 2018-07-03  Tom Tromey  <tom@tromey.com>
6632
6633         * common/ptid.c (ptid_get_tid): Remove.
6634         * common/ptid.h (ptid_get_tid): Don't declare.
6635         * ada-tasks.c: Update.
6636         * aix-thread.c: Update.
6637         * bsd-uthread.c: Update.
6638         * darwin-nat.c: Update.
6639         * fbsd-nat.c: Update.
6640         * i386-darwin-nat.c: Update.
6641         * infrun.c: Update.
6642         * linux-tdep.c: Update.
6643         * nto-procfs.c: Update.
6644         * ppc-ravenscar-thread.c: Update.
6645         * python/py-infthread.c: Update.
6646         * ravenscar-thread.c: Update.
6647         * sol-thread.c: Update.
6648         * sparc-ravenscar-thread.c: Update.
6649         * windows-nat.c: Update.
6650
6651 2018-07-03  Tom Tromey  <tom@tromey.com>
6652
6653         * common/ptid.c (ptid_get_lwp): Remove.
6654         * common/ptid.h (ptid_get_lwp): Don't declare.
6655         * aarch64-linux-nat.c: Update.
6656         * ada-tasks.c: Update.
6657         * aix-thread.c: Update.
6658         * amd64-linux-nat.c: Update.
6659         * arm-linux-nat.c: Update.
6660         * corelow.c: Update.
6661         * fbsd-nat.c: Update.
6662         * fbsd-tdep.c: Update.
6663         * gnu-nat.c: Update.
6664         * i386-cygwin-tdep.c: Update.
6665         * i386-gnu-nat.c: Update.
6666         * i386-linux-nat.c: Update.
6667         * ia64-linux-nat.c: Update.
6668         * inf-ptrace.c: Update.
6669         * infrun.c: Update.
6670         * linux-fork.c: Update.
6671         * linux-nat.c: Update.
6672         * linux-tdep.c: Update.
6673         * linux-thread-db.c: Update.
6674         * mips-linux-nat.c: Update.
6675         * nat/aarch64-linux-hw-point.c: Update.
6676         * nat/aarch64-linux.c: Update.
6677         * nat/linux-btrace.c: Update.
6678         * nat/linux-osdata.c: Update.
6679         * nat/linux-procfs.c: Update.
6680         * nat/x86-linux-dregs.c: Update.
6681         * obsd-nat.c: Update.
6682         * ppc-fbsd-nat.c: Update.
6683         * ppc-linux-nat.c: Update.
6684         * procfs.c: Update.
6685         * python/py-infthread.c: Update.
6686         * ravenscar-thread.c: Update.
6687         * remote.c: Update.
6688         * s390-linux-nat.c: Update.
6689         * sol-thread.c: Update.
6690         * sol2-tdep.c: Update.
6691         * spu-linux-nat.c: Update.
6692         * x86-linux-nat.c: Update.
6693         * xtensa-linux-nat.c: Update.
6694
6695 2018-07-03  Tom Tromey  <tom@tromey.com>
6696
6697         * common/ptid.c (ptid_get_pid): Remove.
6698         * common/ptid.h (ptid_get_pid): Don't declare.
6699         * aarch64-linux-nat.c: Update.
6700         * ada-lang.c: Update.
6701         * aix-thread.c: Update.
6702         * alpha-bsd-nat.c: Update.
6703         * amd64-fbsd-nat.c: Update.
6704         * amd64-linux-nat.c: Update.
6705         * arm-linux-nat.c: Update.
6706         * arm-nbsd-nat.c: Update.
6707         * auxv.c: Update.
6708         * break-catch-syscall.c: Update.
6709         * breakpoint.c: Update.
6710         * bsd-uthread.c: Update.
6711         * corelow.c: Update.
6712         * ctf.c: Update.
6713         * darwin-nat.c: Update.
6714         * fbsd-nat.c: Update.
6715         * fbsd-tdep.c: Update.
6716         * gcore.c: Update.
6717         * gnu-nat.c: Update.
6718         * hppa-nbsd-nat.c: Update.
6719         * hppa-obsd-nat.c: Update.
6720         * i386-fbsd-nat.c: Update.
6721         * ia64-linux-nat.c: Update.
6722         * inf-ptrace.c: Update.
6723         * infcmd.c: Update.
6724         * inferior.c: Update.
6725         * inferior.h: Update.
6726         * inflow.c: Update.
6727         * infrun.c: Update.
6728         * linux-fork.c: Update.
6729         * linux-nat.c: Update.
6730         * linux-tdep.c: Update.
6731         * linux-thread-db.c: Update.
6732         * m68k-bsd-nat.c: Update.
6733         * mi/mi-interp.c: Update.
6734         * mi/mi-main.c: Update.
6735         * mips-linux-nat.c: Update.
6736         * mips-nbsd-nat.c: Update.
6737         * mips64-obsd-nat.c: Update.
6738         * nat/aarch64-linux-hw-point.c: Update.
6739         * nat/aarch64-linux.c: Update.
6740         * nat/linux-btrace.c: Update.
6741         * nat/linux-osdata.c: Update.
6742         * nat/linux-procfs.c: Update.
6743         * nat/x86-linux-dregs.c: Update.
6744         * nto-procfs.c: Update.
6745         * obsd-nat.c: Update.
6746         * ppc-linux-nat.c: Update.
6747         * ppc-nbsd-nat.c: Update.
6748         * ppc-obsd-nat.c: Update.
6749         * proc-service.c: Update.
6750         * procfs.c: Update.
6751         * python/py-inferior.c: Update.
6752         * python/py-infthread.c: Update.
6753         * ravenscar-thread.c: Update.
6754         * record.c: Update.
6755         * remote-sim.c: Update.
6756         * remote.c: Update.
6757         * rs6000-nat.c: Update.
6758         * s390-linux-nat.c: Update.
6759         * sh-nbsd-nat.c: Update.
6760         * sol-thread.c: Update.
6761         * sparc-nat.c: Update.
6762         * sparc64-tdep.c: Update.
6763         * spu-linux-nat.c: Update.
6764         * spu-tdep.c: Update.
6765         * target-debug.h: Update.
6766         * target.c: Update.
6767         * thread.c: Update.
6768         * tid-parse.c: Update.
6769         * tracefile-tfile.c: Update.
6770         * vax-bsd-nat.c: Update.
6771         * windows-nat.c: Update.
6772         * x86-linux-nat.c: Update.
6773         * x86-nat.c: Update.
6774
6775 2018-07-03  Tom Tromey  <tom@tromey.com>
6776
6777         * common/ptid.c (pid_to_ptid): Remove.
6778         * common/ptid.h (pid_to_ptid): Don't declare.
6779         * aix-thread.c: Update.
6780         * arm-linux-nat.c: Update.
6781         * common/ptid.c: Update.
6782         * common/ptid.h: Update.
6783         * corelow.c: Update.
6784         * ctf.c: Update.
6785         * darwin-nat.c: Update.
6786         * fbsd-nat.c: Update.
6787         * fork-child.c: Update.
6788         * gnu-nat.c: Update.
6789         * go32-nat.c: Update.
6790         * inf-ptrace.c: Update.
6791         * infcmd.c: Update.
6792         * inferior.c: Update.
6793         * infrun.c: Update.
6794         * linux-fork.c: Update.
6795         * linux-nat.c: Update.
6796         * nat/aarch64-linux-hw-point.c: Update.
6797         * nat/fork-inferior.c: Update.
6798         * nat/x86-linux-dregs.c: Update.
6799         * nto-procfs.c: Update.
6800         * obsd-nat.c: Update.
6801         * procfs.c: Update.
6802         * progspace.c: Update.
6803         * remote.c: Update.
6804         * rs6000-nat.c: Update.
6805         * s390-linux-nat.c: Update.
6806         * sol-thread.c: Update.
6807         * spu-linux-nat.c: Update.
6808         * target.c: Update.
6809         * top.c: Update.
6810         * tracefile-tfile.c: Update.
6811         * windows-nat.c: Update.
6812
6813 2018-07-03  Tom Tromey  <tom@tromey.com>
6814
6815         * common/ptid.h (ptid_build): Don't declare.
6816         * common/ptid.c (ptid_build): Remove.
6817         * aix-thread.c: Update.
6818         * bsd-kvm.c: Update.
6819         * bsd-uthread.c: Update.
6820         * common/agent.c: Update.
6821         * common/ptid.c: Update.
6822         * common/ptid.h: Update.
6823         * corelow.c: Update.
6824         * darwin-nat.c: Update.
6825         * fbsd-nat.c: Update.
6826         * gnu-nat.c: Update.
6827         * linux-fork.c: Update.
6828         * linux-nat.c: Update.
6829         * linux-thread-db.c: Update.
6830         * nat/linux-osdata.c: Update.
6831         * nat/linux-procfs.c: Update.
6832         * nto-procfs.c: Update.
6833         * obsd-nat.c: Update.
6834         * proc-service.c: Update.
6835         * procfs.c: Update.
6836         * ravenscar-thread.c: Update.
6837         * remote-sim.c: Update.
6838         * remote.c: Update.
6839         * sol-thread.c: Update.
6840         * target.c: Update.
6841         * windows-nat.c: Update.
6842
6843 2018-07-03  Tom Tromey  <tom@tromey.com>
6844
6845         * infrun.c (follow_exec): Use exit_inferior_silent.
6846         * inferior.c (exit_inferior_num_silent): Remove.
6847         * inferior.h (exit_inferior_num_silent): Don't declare.
6848
6849 2018-07-03  Tom Tromey  <tom@tromey.com>
6850
6851         PR cli/23340:
6852         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6853         inferior_ptid on error.
6854
6855 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
6856             Simon Marchi  <simon.marchi@polymtl.ca>
6857
6858         PR tdep/8282
6859         * disasm.h (gdb_disassembler): Add
6860         `m_disassembler_options_holder'. member
6861         * disasm.c (get_all_disassembler_options): New function.
6862         (gdb_disassembler::gdb_disassembler): Use it.
6863         (gdb_buffered_insn_length_init_dis): Likewise.
6864         (gdb_buffered_insn_length): Adjust accordingly.
6865         (set_disassembler_options): Handle options with arguments.
6866         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6867         line if showing options with descriptions.
6868         (disassembler_options_completer): Adapt to using the
6869         `disasm_options_and_args_t' structure.
6870         * mips-tdep.c (mips_disassembler_options): New variable.
6871         (mips_disassembler_options_o32): Likewise.
6872         (mips_disassembler_options_n32): Likewise.
6873         (mips_disassembler_options_n64): Likewise.
6874         (gdb_print_insn_mips): Don't set `disassembler_options'.
6875         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6876         functions.
6877         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6878         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6879         `gdbarch_disassembler_options_implicit' and
6880         `gdbarch_valid_disassembler_options'.
6881         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6882         `disasm_options_and_args_t' structure.
6883         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6884         method.
6885         (valid_disassembler_options): Switch from `disasm_options_t' to
6886         the `disasm_options_and_args_t' structure.
6887         * NEWS: Document `set disassembler-options' support for the MIPS
6888         target.
6889         * gdbarch.h: Regenerate.
6890         * gdbarch.c: Regenerate.
6891
6892 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6893
6894         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6895
6896 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6897
6898         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6899         parameter in call to amd64_target_description.
6900         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6901         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6902         (amd64fbsd_init_abi): Likewise.
6903         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6904         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6905         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6906         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6907
6908 2018-06-29  Pedro Alves  <palves@redhat.com>
6909
6910         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6911         "segments" parameter.
6912         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6913         (_initialize_amd64_tdep): Update call to
6914         amd64_create_target_description.
6915         (amd64_target_description): Add "segments" parameter.  Adjust
6916         the implementation to use it.
6917         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6918         call to amd64_create_target_description.
6919         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6920         * gdb/arch/amd64.h (amd64_create_target_description): Add
6921         "segments" register.
6922         * gdb/arch/amd64.c (amd64_create_target_description): Add
6923         "segments" parameter.  Call create_feature_i386_64bit_segments
6924         only if SEGMENTS is true.
6925         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6926         call to amd64_create_target_description.
6927
6928 2018-06-29  Pedro Alves  <palves@redhat.com>
6929
6930         * thread.c (thread_target_id_str): New, factored out from ...
6931         (print_thread_info_1): ... here.  Use it to compute the max
6932         "Target Id" column width.
6933
6934 2018-06-29  Pedro Alves  <palves@redhat.com>
6935
6936         * remote.c (remote_target::extra_thread_info): Delete
6937         'display_buf' and 'n' locals.  from the cache, regardless of
6938         packet mechanims is in use.  Use cache for qThreadExtra and qP
6939         methods too.
6940
6941 2018-06-29  Pedro Alves  <palves@redhat.com>
6942
6943         * blockframe.c (find_pc_sect_containing_function): New function.
6944         * breakpoint.c (print_breakpoint_location): Don't call
6945         find_pc_sect_function.
6946         * linespec.c (create_sals_line_offset): Record the location's
6947         symbol in the sal.
6948         * linespec.c (convert_address_location_to_sals): Fill in sal's
6949         symbol with find_pc_sect_containing_function.
6950         * symtab.c (find_function_start_sal): Rename to ...
6951         (find_function_start_sal_1): ... this.
6952         (find_function_start_sal): Reimplement as wrapper around
6953         find_function_start_sal_1, and use
6954         find_pc_sect_containing_function to fill in the sal's symbol.
6955         (find_function_start_sal(symbol*, bool)): Adjust.
6956         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6957         comments.
6958         (find_pc_sect_containing_function): Declare.
6959
6960 2018-06-29  Pedro Alves  <palves@redhat.com>
6961
6962         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6963         true if the the location has no symbol.
6964
6965 2018-06-28  Tom Tromey  <tom@tromey.com>
6966
6967         * NEWS: Mention --enable-codesign.
6968         * silent-rules.mk (ECHO_SIGN): New variable.
6969         * configure.ac: Add --enable-codesign.
6970         * configure: Rebuild.
6971         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6972         (gdb$(EXEEXT)): Optionally invoke codesign.
6973
6974 2018-06-28  Pedro Alves  <palves@redhat.com>
6975
6976         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6977         comments.
6978         (switch_to_thread_no_regs): Adjust comment.
6979         * infcmd.c (stop_pc): Delete.
6980         (post_create_inferior, info_program_command): Replace references
6981         to stop_pc with references to thread_info->suspend.stop_pc.
6982         * inferior.h (stop_pc): Delete declaration.
6983         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6984         (handle_inferior_event_1, handle_signal_stop)
6985         (process_event_stop_test, keep_going_stepped_thread)
6986         (handle_step_into_function, handle_step_into_function_backward)
6987         (print_stop_location): Replace references to stop_pc with
6988         references to thread_info->suspend.stop_pc.
6989         (struct infcall_suspend_state) <stop_pc>: Delete field.
6990         (save_infcall_suspend_state, restore_infcall_suspend_state):
6991         Remove references to inf_stat->stop_pc.
6992         * linux-fork.c (fork_load_infrun_state): Likewise.
6993         * record-btrace.c (record_btrace_set_replay): Likewise.
6994         * record-full.c (record_full_goto_entry): Likewise.
6995         * remote.c (print_one_stopped_thread): Likewise.
6996         * target.c (target_resume): Extend comment.
6997         * thread.c (set_executing_thread): New.
6998         (set_executing): Use it.
6999         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7000         Remove references to stop_pc.
7001
7002 2018-06-28  Pedro Alves  <palves@redhat.com>
7003
7004         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7005         Moving fetching stop_pc until after ecs->event_thread is refreshed.
7006
7007 2018-06-28  Tom Tromey  <tom@tromey.com>
7008
7009         * coffread.c (coff_symfile_finish): Update.
7010         * xcoffread.c (xcoff_symfile_finish): Update.
7011         * elfread.c (elf_symfile_finish): Update.
7012         * symfile.h (dwarf2_free_objfile): Don't declare.
7013         * dwarf2read.c (_initialize_dwarf2_read): Use
7014         register_objfile_data_with_cleanup.
7015         (dwarf2_free_objfile): Now static.  Change signature.
7016
7017 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7018
7019         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7020         option "-o" to add-symbol-file-load to add an offset to each
7021         section's load address.
7022         * symfile.c (set_objfile_default_section_offset): New function.
7023
7024 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7025
7026         * symfile.c (add_symbol_file_command): Make sure that sections
7027         with the same name are sorted in the same order.
7028
7029 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7030
7031         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7032         require the second argument.  If omitted, load sections at the
7033         addresses specified in the file.
7034
7035 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7036
7037         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7038         (_initialize_symfile): Add option "-o" to symbol-file to add an
7039         offset to each section of the symbol file.
7040
7041 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7042
7043         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7044
7045 2018-06-27  Tom Tromey  <tom@tromey.com>
7046
7047         * stack.c (_initialize_stack): Update "func" help text.
7048
7049 2018-06-27  Tom Tromey  <tom@tromey.com>
7050
7051         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7052         std::vector.
7053         (unwind_infopy_str, pyuw_create_unwind_info)
7054         (unwind_infopy_add_saved_register, pyuw_sniffer)
7055         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7056         Update.
7057         (struct saved_reg): Add constructor.
7058         <value>: Now a gdbpy_ref<>.
7059
7060 2018-06-27  Tom Tromey  <tom@tromey.com>
7061
7062         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7063
7064 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7065
7066         * gdb-gdb.py.in: Format using autopep8.
7067
7068 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7069
7070         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7071         (type_lookup_function): Recognize CORE_ADDR values.
7072
7073 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7074
7075         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7076         print tag_name.
7077
7078 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7079
7080         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7081         <__lt__>: Add.
7082
7083 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7084
7085         * gdb-gdb.py: Move to...
7086         * gdb-gdb.py.in: ... here.
7087         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7088         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7089         dependencies.
7090         (distclean): Remove gdb-gdb.py when cleaning.
7091         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7092         * configure: Re-generate.
7093
7094 2018-06-27  Pedro Alves  <palves@redhat.com>
7095
7096         * proc-service.c (get_ps_regcache): New.
7097         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7098         (ps_lsetfpregs): Use it.
7099
7100 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7101
7102         PR gdb/21695
7103         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7104         declaration.
7105         (dwarf_decode_lines_1): Adjust.
7106
7107 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7108
7109         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7110         override.
7111         <info_proc>: Likewise.
7112
7113 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7114
7115         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7116         to windows_fetch_one_register, and only handle the case of
7117         fetching one register.  Move the code that reloads the context
7118         and iterates over all registers if R is negative to...
7119         (windows_nat_target::fetch_registers): ... here.
7120         (do_windows_store_inferior_registers): Rename to
7121         windows_store_one_register, and only handle the case of storing
7122         one register.  Move the code that handles the case where r is
7123         negative to...
7124         (windows_nat_target::store_registers) ... here.
7125
7126 2018-06-26  Tom Tromey  <tom@tromey.com>
7127
7128         PR rust/22574:
7129         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7130         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7131         Update.
7132         (rust_internal_print_type): Add podata parameter.
7133         (rust_print_type): Update.
7134
7135 2018-06-26  Tom Tromey  <tom@tromey.com>
7136
7137         * typeprint.h (struct print_offset_data) <update, finish,
7138         maybe_print_hole>: New methods.
7139         <indentation>: New constant.
7140         * typeprint.c (print_offset_data::indentation): Define.
7141         (print_offset_data::maybe_print_hole, print_offset_data::update)
7142         (print_offset_data::finish): Move from c-typeprint.c and rename.
7143         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7144         (print_spaces_filtered_with_print_options): Update.
7145         (c_print_type_union_field_offset, maybe_print_hole)
7146         (c_print_type_struct_field_offset): Move to typeprint.c and
7147         rename.
7148         (c_type_print_base_struct_union): Update.
7149
7150 2018-06-25  Pedro Alves  <palves@redhat.com>
7151
7152         * gdbthread.h (thread_info_ref, delete_thread)
7153         (delete_thread_silent, first_thread_of_inferior)
7154         (any_thread_of_inferior, switch_to_thread)
7155         (enable_thread_stack_temporaries)
7156         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7157         (get_last_thread_stack_temporary)
7158         (value_in_thread_stack_temporaries, can_access_registers_thread):
7159         Spell out "struct thread_info" instead of just "thread_info".
7160         * inferior.h (notice_new_inferior): Likewise.
7161
7162 2018-06-25  Pedro Alves  <palves@redhat.com>
7163
7164         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7165         pass thread_info pointer to delete_thread.
7166         (windows_nat_target::detach): Pass inferior pointer to
7167         detach_inferior.
7168         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7169         delete_thread.
7170         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7171         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7172         and pass a thread_info pointer to delete_thread.
7173         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7174         pass thread_info pointer to delete_thread.
7175         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7176         delete_thread_silent call.
7177         * procfs.c (procfs_target::detach): Pass inferior pointer to
7178         detach_inferior.
7179         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7180         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7181         delete_thread_silent call.
7182         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7183         pass thread_info pointer to delete_thread.
7184         (windows_nat_target::detach): Pass inferior pointer to
7185         delete_inferior.
7186
7187 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7188
7189         * regcache.c (readable_regcache::read_part): Fix asserts.
7190         (reg_buffer::raw_collect_part): New function.
7191         (regcache::write_part): Fix asserts.
7192         (reg_buffer::raw_supply_part): New function.
7193         (regcache::transfer_regset_register): New helper function.
7194         (regcache::transfer_regset): Call new functions.
7195         (regcache_supply_regset): Use gdb_byte*.
7196         (regcache::supply_regset): Likewise.
7197         (regcache_collect_regset): Likewise.
7198         (regcache::collect_regset): Likewise.
7199         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7200         (reg_buffer::raw_supply_part): Likewise.
7201         (regcache::transfer_regset_register): Likewise.
7202         (regcache::transfer_regset): Use gdb_byte*.
7203
7204 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7205
7206         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7207
7208 2018-06-21  Pedro Alves  <palves@redhat.com>
7209
7210         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7211         instead of a ptid_t.  All callers adjusted.
7212         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7213         adjusted.
7214         (print_ada_task_info, display_current_task_id, task_command_1):
7215         Adjust.
7216         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7217         inferior_thread.
7218         (breakpoint_kind): Adjust.
7219         (remove_breakpoints_pid): Rename to ...
7220         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7221         pointer.  All callers adjusted.
7222         (bpstat_clear_actions): Use inferior_thread.
7223         (get_bpstat_thread): New.
7224         (bpstat_do_actions): Use it.
7225         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7226         to take a thread_info pointer.  All callers adjusted.
7227         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7228         (breakpoint_re_set_thread): Use inferior_thread.
7229         * breakpoint.h (struct inferior): Forward declare.
7230         (bpstat_stop_status): Update.
7231         (remove_breakpoints_pid): Delete.
7232         (remove_breakpoints_inf): New.
7233         * bsd-uthread.c (bsd_uthread_target::wait)
7234         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7235         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7236         (maint_btrace_packet_history_cmd)
7237         (maint_btrace_clear_packet_history_cmd): Adjust.
7238         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7239         inferior_thread.
7240         * cli/cli-interp.c: Include "inferior.h".
7241         * common/refcounted-object.h (struct
7242         refcounted_object_ref_policy): New.
7243         * compile/compile-object-load.c: Include gdbthread.h.
7244         (store_regs): Use inferior_thread.
7245         * corelow.c (core_target::close): Use current_inferior.
7246         (core_target_open): Adjust to use first_thread_of_inferior and use
7247         the current inferior.
7248         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7249         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7250         <thread>: ... this new field.  All references adjusted.
7251         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7252         Take a thread_info pointer instead of a ptid_t.
7253         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7254         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7255         thread_info pointer instead of a ptid_t.
7256         * elfread.c: Include "inferior.h".
7257         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7258         Use inferior_thread.
7259         * eval.c (evaluate_subexp): Likewise.
7260         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7261         inferior_thread.
7262         * gdb_proc_service.h (struct thread_info): Forward declare.
7263         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7264         <thread>: ... this new field.  All references adjusted.
7265         * gdbarch.h, gdbarch.c: Regenerate.
7266         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7267         'thread' parameter.  All implementations and callers adjusted.
7268         * gdbthread.h (thread_info) <set_running>: New method.
7269         (delete_thread, delete_thread_silent): Take a thread_info pointer
7270         instead of a ptid.
7271         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7272         (first_thread_of_process): Delete, replaced by ...
7273         (first_thread_of_inferior): ... this new function.  All callers
7274         adjusted.
7275         (any_live_thread_of_process): Delete, replaced by ...
7276         (any_live_thread_of_inferior): ... this new function.  All callers
7277         adjusted.
7278         (switch_to_thread, switch_to_no_thread): Declare.
7279         (is_executing): Delete.
7280         (enable_thread_stack_temporaries): Update comment.
7281         <enable_thread_stack_temporaries>: Take a thread_info pointer
7282         instead of a ptid_t.  Incref the thread.
7283         <~enable_thread_stack_temporaries>: Decref the thread.
7284         <m_ptid>: Delete
7285         <m_thr>: New.
7286         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7287         (get_last_thread_stack_temporary)
7288         (value_in_thread_stack_temporaries, can_access_registers_thread):
7289         Take a thread_info pointer instead of a ptid_t.  All callers
7290         adjusted.
7291         * infcall.c (get_call_return_value): Use inferior_thread.
7292         (run_inferior_call): Work with thread pointers instead of ptid_t.
7293         (call_function_by_hand_dummy): Work with thread pointers instead
7294         of ptid_t.  Use thread_info_ref.
7295         * infcmd.c (proceed_thread_callback): Access thread's state
7296         directly.
7297         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7298         access thread's state directly.
7299         (continue_command): Use inferior_thread.
7300         (info_program_command): Use find_thread_ptid and access thread
7301         state directly.
7302         (proceed_after_attach_callback): Use thread state directly.
7303         (notice_new_inferior): Take a thread_info pointer instead of a
7304         ptid_t.  All callers adjusted.
7305         (exit_inferior): Take an inferior pointer instead of a pid.  All
7306         callers adjusted.
7307         (exit_inferior_silent): New.
7308         (detach_inferior): Delete.
7309         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7310         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7311         (detach_inferior_command, kill_inferior_command): Use
7312         find_inferior_id instead of valid_gdb_inferior_id and
7313         gdb_inferior_id_to_pid.
7314         (inferior_command): Use inferior and thread pointers.
7315         * inferior.h (struct thread_info): Forward declare.
7316         (notice_new_inferior): Take a thread_info pointer instead of a
7317         ptid_t.  All callers adjusted.
7318         (detach_inferior): Delete declaration.
7319         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7320         instead of a pid.  All callers adjusted.
7321         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7322         (valid_gdb_inferior_id): Delete.
7323         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7324         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7325         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7326         ...
7327         <inf>: ... this new field.
7328         <step_ptid>: Delete, replaced by ...
7329         <step_thread>: ... this new field.
7330         (get_displaced_stepping_state): Take an inferior pointer instead
7331         of a pid.  All callers adjusted.
7332         (displaced_step_in_progress_any_inferior): Adjust.
7333         (displaced_step_in_progress_thread): Take a thread pointer instead
7334         of a ptid_t.  All callers adjusted.
7335         (displaced_step_in_progress, add_displaced_stepping_state): Take
7336         an inferior pointer instead of a pid.  All callers adjusted.
7337         (get_displaced_step_closure_by_addr): Adjust.
7338         (remove_displaced_stepping_state): Take an inferior pointer
7339         instead of a pid.  All callers adjusted.
7340         (displaced_step_prepare_throw, displaced_step_prepare)
7341         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7342         All callers adjusted.
7343         (start_step_over): Adjust.
7344         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7345         displaced step queue.
7346         (do_target_resume): Adjust.
7347         (fetch_inferior_event): Use inferior_thread.
7348         (context_switch, get_inferior_stop_soon): Take an
7349         execution_control_state pointer instead of a ptid_t.  All callers
7350         adjusted.
7351         (switch_to_thread_cleanup): Delete.
7352         (stop_all_threads): Use scoped_restore_current_thread.
7353         * inline-frame.c: Include "gdbthread.h".
7354         (inline_state) <inline_state>: Take a thread pointer instead of a
7355         ptid_t.  All callers adjusted.
7356         <ptid>: Delete, replaced by ...
7357         <thread>: ... this new field.
7358         (find_inline_frame_state): Take a thread pointer instead of a
7359         ptid_t.  All callers adjusted.
7360         (skip_inline_frames, step_into_inline_frame)
7361         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7362         pointer instead of a ptid_t.  All callers adjusted.
7363         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7364         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7365         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7366         pointers directly.
7367         * linux-nat.c (get_detach_signal): Likewise.
7368         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7369         (thread_db_notice_clone): Adjust.
7370         (thread_db_find_new_threads_silently)
7371         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7372         a thread pointer instead of a ptid_t.  All callers adjusted.
7373         * mi/mi-cmd-var.c: Include "inferior.h".
7374         (mi_cmd_var_update_iter): Update to use thread pointers.
7375         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7376         inferior directly.
7377         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7378         out to ...
7379         (mi_output_running): ... this new function.
7380         (mi_on_resume_1): Adjust to use it.
7381         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7382         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7383         directly.
7384         (interrupt_thread_callback): : Adjust to use thread and inferior
7385         pointers.
7386         * proc-service.c: Include "gdbthread.h".
7387         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7388         * progspace-and-thread.c: Include "inferior.h".
7389         * progspace.c: Include "inferior.h".
7390         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7391         hold a reference to an inferior_object.
7392         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7393         inferior_thread.
7394         * python/py-inferior.c (struct inferior_object): Give the type a
7395         tag name instead of a typedef.
7396         (python_on_normal_stop): No need to check if the current thread is
7397         listed.
7398         (inferior_to_inferior_object): Change return type to
7399         inferior_object.  All callers adjusted.
7400         (find_thread_object): Delete, bits factored out to ...
7401         (thread_to_thread_object): ... this new function.
7402         * python/py-infthread.c (create_thread_object): Use
7403         inferior_to_inferior_object.
7404         (thpy_is_stopped): Use thread pointer directly.
7405         (gdbpy_selected_thread): Use inferior_thread.
7406         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7407         field, replaced with ...
7408         <thread>: ... this new field.  All users adjusted.
7409         (btpy_insn_or_gap_new): Drop const.
7410         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7411         callers adjusted.
7412         * python/py-record.c: Include "gdbthread.h".
7413         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7414         a ptid_t.  All callers adjusted.
7415         (gdbpy_current_recording): Use inferior_thread.
7416         * python/py-record.h (recpy_record_object) <ptid>: Delete
7417         field, replaced with ...
7418         <thread>: ... this new field.  All users adjusted.
7419         (recpy_element_object) <ptid>: Delete
7420         field, replaced with ...
7421         <thread>: ... this new field.  All users adjusted.
7422         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7423         a ptid_t.  All callers adjusted.
7424         * python/py-threadevent.c: Include "gdbthread.h".
7425         (get_event_thread): Use thread_to_thread_object.
7426         * python/python-internal.h (struct inferior_object): Forward
7427         declare.
7428         (find_thread_object, find_inferior_object): Delete declarations.
7429         (thread_to_thread_object, inferior_to_inferior_object): New
7430         declarations.
7431         * record-btrace.c: Include "inferior.h".
7432         (require_btrace_thread): Use inferior_thread.
7433         (record_btrace_frame_sniffer)
7434         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7435         (get_thread_current_frame): Use scoped_restore_current_thread and
7436         switch_to_thread.
7437         (get_thread_current_frame): Use thread pointer directly.
7438         (record_btrace_replay_at_breakpoint): Use thread's inferior
7439         pointer directly.
7440         * record-full.c: Include "inferior.h".
7441         * regcache.c: Include "gdbthread.h".
7442         (get_thread_arch_regcache): Use the inferior's address space
7443         directly.
7444         (get_thread_regcache, registers_changed_thread): New.
7445         * regcache.h (get_thread_regcache(thread_info *thread)): New
7446         overload.
7447         (registers_changed_thread): New.
7448         (remote_target) <remote_detach_1>: Swap order of parameters.
7449         (remote_add_thread): <remote_add_thread>: Return the new thread.
7450         (get_remote_thread_info(ptid_t)): New overload.
7451         (remote_target::remote_notice_new_inferior): Use thread pointers
7452         directly.
7453         (remote_target::process_initial_stop_replies): Use
7454         thread_info::set_running.
7455         (remote_target::remote_detach_1, remote_target::detach)
7456         (extended_remote_target::detach): Adjust.
7457         * stack.c (frame_show_address): Use inferior_thread.
7458         * target-debug.h (target_debug_print_thread_info_pp): New.
7459         * target-delegates.c: Regenerate.
7460         * target.c (default_thread_address_space): Delete.
7461         (memory_xfer_partial_1): Use current_inferior.
7462         (target_detach): Use current_inferior.
7463         (target_thread_address_space): Delete.
7464         (generic_mourn_inferior): Use current_inferior.
7465         * target.h (struct target_ops) <thread_address_space>: Delete.
7466         (target_thread_address_space): Delete.
7467         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
7468         pointers directly.
7469         (delete_thread_1, delete_thread, delete_thread_silent): Take a
7470         thread pointer instead of a ptid_t.  Adjust all callers.
7471         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
7472         (first_thread_of_process): Delete, replaced by ...
7473         (first_thread_of_inferior): ... this new function.  All callers
7474         adjusted.
7475         (any_thread_of_process): Rename to ...
7476         (any_thread_of_inferior): ... this, and take an inferior pointer.
7477         (any_live_thread_of_process): Rename to ...
7478         (any_live_thread_of_inferior): ... this, and take an inferior
7479         pointer.
7480         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7481         (value_in_thread_stack_temporaries)
7482         (get_last_thread_stack_temporary): Take a thread pointer instead
7483         of a ptid_t.  Adjust all callers.
7484         (thread_info::set_running): New.
7485         (validate_registers_access): Use inferior_thread.
7486         (can_access_registers_ptid): Rename to ...
7487         (can_access_registers_thread): ... this, and take a thread
7488         pointer.
7489         (print_thread_info_1): Adjust to compare thread pointers instead
7490         of ptids.
7491         (switch_to_no_thread, switch_to_thread): Make extern.
7492         (scoped_restore_current_thread::~scoped_restore_current_thread):
7493         Use m_thread pointer directly.
7494         (scoped_restore_current_thread::scoped_restore_current_thread):
7495         Use inferior_thread.
7496         (thread_command): Use thread pointer directly.
7497         (thread_num_make_value_helper): Use inferior_thread.
7498         * top.c (execute_command): Use inferior_thread.
7499         * tui/tui-interp.c: Include "inferior.h".
7500         * varobj.c (varobj_create): Use inferior_thread.
7501         (value_of_root_1): Use find_thread_global_id instead of
7502         global_thread_id_to_ptid.
7503
7504 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
7505
7506         * regcache.c (readable_regcache::read_part): Avoid memcpy when
7507         possible.
7508         (regcache::write_part): Likewise.
7509         (readable_regcache::cooked_read_part): Update comment.
7510         (readable_regcache::cooked_write_part): Likewise.
7511         * regcache.h: (readable_regcache::read_part): Likewise.
7512         (regcache::write_part): Likewise.
7513
7514 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
7515             Dirk Schubert  <dirk.schubert@arm.com>
7516
7517         * aarch64-linux-nat.c (post_attach): New.
7518         (aarch64_linux_nat_target::post_attach): Override post_attach to
7519         record the number of hardware debug registers.
7520
7521 2018-06-20  Tom Tromey  <tom@tromey.com>
7522
7523         * python/py-param.c (add_setshow_generic): Make parameters const.
7524         (parmpy_init): Update.
7525
7526 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7527
7528         * regcache.h (regcache_cooked_read_ftype): Rename to...
7529         (register_read_ftype): ...this, change type to function_view.
7530         (class reg_buffer) <save>: Remove src parameter.
7531         (readonly_detached_regcache) <readonly_detached_regcache>: Make
7532         parameter non-const in first overload.  Remove src parameter in
7533         second overload.
7534         * regcache.c (do_cooked_read): Remove.
7535         (readonly_detached_regcache::readonly_detached_regcache): Make
7536         parameter non-const, adjust call to other constructor.
7537         (reg_buffer::save): Remove src parameter.
7538         * frame.c (do_frame_register_read): Remove.
7539         (frame_save_as_regcache): Use lambda function.
7540         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
7541         parameter to ppu2spu_data *.
7542         (ppu2spu_sniffer): Use lambda function.
7543
7544 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7545
7546         * record-full.c (record_full_target::insert_breakpoint): Remove
7547         "struct" keyword, add const.
7548
7549 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
7550
7551         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
7552         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
7553         * configure.ac: Remove AC_PREREQ, add missing quoting.
7554         * gnulib/configure.ac: Modernize usage of
7555         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
7556         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
7557         (AUTOMAKE_VERSION): Bump to 1.15.1.
7558         * configure: Re-generate.
7559         * config.in: Re-generate.
7560         * aclocal.m4: Re-generate.
7561         * gnulib/aclocal.m4: Re-generate.
7562         * gnulib/config.in: Re-generate.
7563         * gnulib/configure: Re-generate.
7564         * gnulib/import/Makefile.in: Re-generate.
7565
7566 2018-06-19  Pedro Alves  <palves@redhat.com>
7567
7568         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
7569         (lookup_minimal_symbol_by_pc_section): ... here with
7570         gdb_assert_not_reached added.
7571
7572 2018-06-19  Pedro Alves  <palves@redhat.com>
7573
7574         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
7575         parameter with a block parameter.  Compare location's block symbol
7576         with the frame's block instead of addresses.
7577         (skip_inline_frames): Pass the current block instead of the
7578         frame's address.  Break out as soon as we determine the frame
7579         should not be skipped.
7580
7581 2018-06-18  Tom Tromey  <tom@tromey.com>
7582
7583         * solib-aix.c (solib_aix_get_section_offsets): Return
7584         unique_xmalloc_ptr.
7585         (solib_aix_solib_create_inferior_hook): Update.
7586
7587 2018-06-18  Tom Tromey  <tom@tromey.com>
7588
7589         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
7590
7591 2018-06-18  Tom Tromey  <tom@tromey.com>
7592
7593         * solib-frv.c (frv_relocate_main_executable): Use
7594         unique_xmalloc_ptr.
7595         * solib-dsbt.c (dsbt_relocate_main_executable): Use
7596         unique_xmalloc_ptr.
7597
7598 2018-06-18  Tom Tromey  <tom@tromey.com>
7599
7600         * objfiles.h (inhibit_section_map_updates): Update.
7601         (resume_section_map_updates, resume_section_map_updates_cleanup):
7602         Remove.
7603         * solib-svr4.c (svr4_handle_solib_event): Update.
7604         * objfiles.c (inhibit_section_map_updates): Return
7605         scoped_restore_tmpl<int>.
7606         (resume_section_map_updates, resume_section_map_updates_cleanup):
7607         Remove.
7608
7609 2018-06-18  Tom Tromey  <tom@tromey.com>
7610
7611         * valprint.h (read_string): Update.
7612         * valprint.c (read_string): Change type of "buffer".
7613         (val_print_string): Update.
7614         * python/py-value.c (valpy_string): Update.
7615         * language.h (struct language_defn) <la_get_string>: Change
7616         type of "buffer".
7617         (default_get_string, c_get_string): Update.
7618         * language.c (default_get_string): Change type of "buffer".
7619         * guile/scm-value.c (gdbscm_value_to_string): Update.
7620         * c-lang.c (c_get_string): Change type of "buffer".
7621
7622 2018-06-18  Tom Tromey  <tom@tromey.com>
7623
7624         * ser-mingw.c (struct pipe_state_destroyer): New.
7625         (pipe_state_up): New typedef.
7626         (cleanup_pipe_state): Remove.
7627         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
7628
7629 2018-06-18  Tom Tromey  <tom@tromey.com>
7630
7631         * rust-lang.h (rust_yyerror): Don't declare.
7632         * rust-lang.c (rust_language_defn): Update.
7633         * rust-exp.y (yyerror): Now static.
7634         * parse.c (parse_exp_in_context_1): Update.
7635         * p-lang.h (p_yyerror): Don't declare.
7636         * p-lang.c (p_language_defn): Update.
7637         * p-exp.y (yyerror): Now static.
7638         * opencl-lang.c (opencl_language_defn): Update.
7639         * objc-lang.c (objc_language_defn): Update.
7640         * m2-lang.h (m2_yyerror): Don't declare.
7641         * m2-lang.c (m2_language_defn): Update.
7642         * m2-exp.y (yyerror): Now static.
7643         * language.h (struct language_defn) <la_error>: Remove.
7644         * language.c (unk_lang_error): Remove.
7645         (unknown_language_defn, auto_language_defn): Remove.
7646         * go-lang.h (go_yyerror): Don't declare.
7647         * go-lang.c (go_language_defn): Update.
7648         * go-exp.y (yyerror): Now static.
7649         * f-lang.h (f_yyerror): Don't declare.
7650         * f-lang.c (f_language_defn): Update.
7651         * f-exp.y (yyerror): Now static.
7652         * d-lang.h (d_yyerror): Don't declare.
7653         * d-lang.c (d_language_defn): Update.
7654         * d-exp.y (yyerror): Now static.
7655         * c-lang.h (c_yyerror): Don't declare.
7656         * c-lang.c (c_language_defn, cplus_language_defn)
7657         (asm_language_defn, minimal_language_defn): Update.
7658         * c-exp.y (yyerror): Now static.
7659         * ada-lang.h (ada_yyerror): Don't declare.
7660         * ada-lang.c (ada_language_defn): Update.
7661         * ada-exp.y (yyerror): Now static.
7662
7663 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7664
7665         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
7666         (store_sveregs_to_thread): Likewise.
7667         (aarch64_linux_fetch_inferior_registers): Check for SVE.
7668         (aarch64_linux_store_inferior_registers): Likewise.
7669         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
7670         function.
7671         (aarch64_sve_regs_copy_to_regcache): Likewise.
7672         (aarch64_sve_regs_copy_from_regcache): Likewise.
7673         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
7674         declaration.
7675         (aarch64_sve_regs_copy_to_regcache): Likewise.
7676         (aarch64_sve_regs_copy_from_regcache): Likewise.
7677         (sve_context): Structure from Linux headers.
7678         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
7679         (SVE_SIG_ZREG_SIZE): Likewise.
7680         (SVE_SIG_PREG_SIZE): Likewise.
7681         (SVE_SIG_FFR_SIZE): Likewise.
7682         (SVE_SIG_REGS_OFFSET): Likewise.
7683         (SVE_SIG_ZREGS_OFFSET): Likewise.
7684         (SVE_SIG_ZREG_OFFSET): Likewise.
7685         (SVE_SIG_ZREGS_SIZE): Likewise.
7686         (SVE_SIG_PREGS_OFFSET): Likewise.
7687         (SVE_SIG_PREG_OFFSET): Likewise.
7688         (SVE_SIG_PREGS_SIZE): Likewise.
7689         (SVE_SIG_FFR_OFFSET): Likewise.
7690         (SVE_SIG_REGS_SIZE): Likewise.
7691         (SVE_SIG_CONTEXT_SIZE): Likewise.
7692         (SVE_PT_REGS_MASK): Likewise.
7693         (SVE_PT_REGS_FPSIMD): Likewise.
7694         (SVE_PT_REGS_SVE): Likewise.
7695         (SVE_PT_VL_INHERIT): Likewise.
7696         (SVE_PT_VL_ONEXEC): Likewise.
7697         (SVE_PT_REGS_OFFSET): Likewise.
7698         (SVE_PT_FPSIMD_OFFSET): Likewise.
7699         (SVE_PT_FPSIMD_SIZE): Likewise.
7700         (SVE_PT_SVE_ZREG_SIZE): Likewise.
7701         (SVE_PT_SVE_PREG_SIZE): Likewise.
7702         (SVE_PT_SVE_FFR_SIZE): Likewise.
7703         (SVE_PT_SVE_FPSR_SIZE): Likewise.
7704         (SVE_PT_SVE_FPCR_SIZE): Likewise.
7705         (__SVE_SIG_TO_PT): Likewise.
7706         (SVE_PT_SVE_OFFSET): Likewise.
7707         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
7708         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
7709         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
7710         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
7711         (SVE_PT_SVE_PREG_OFFSET): Likewise.
7712         (SVE_PT_SVE_PREGS_SIZE): Likewise.
7713         (SVE_PT_SVE_FFR_OFFSET): Likewise.
7714         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
7715         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
7716         (SVE_PT_SVE_SIZE): Likewise.
7717         (SVE_PT_SIZE): Likewise.
7718         (HAS_SVE_STATE): New define.
7719
7720 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7721
7722         * nat/aarch64-sve-linux-sigcontext.h: New file.
7723         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
7724         new files.
7725         (SVE_VQ_MIN): Likewise.
7726         (SVE_VQ_MAX): Likewise.
7727         (SVE_VL_MIN): Likewise.
7728         (SVE_VL_MAX): Likewise.
7729         (SVE_NUM_ZREGS): Likewise.
7730         (SVE_NUM_PREGS): Likewise.
7731         (sve_vl_valid): Likewise.
7732         (struct user_sve_header): Likewise.
7733
7734 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
7735             Richard Bunt <Richard.Bunt@arm.com>
7736
7737         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7738         was requested by GDB.
7739
7740 2018-06-15  Tom de Vries  <tdevries@suse.de>
7741
7742         * MAINTAINERS (Write After Approval): Add Tom de Vries.
7743
7744 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
7745
7746         * gnulib/update-gnulib.sh: Print expected versions of
7747         autoconf/aclocal.
7748
7749 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
7750
7751         * arch-utils.c (default_type_align): Use type_length_units.
7752         * gdbtypes.c (type_align): Use type_length_units.
7753
7754 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7755
7756         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7757         of 'define' command.
7758
7759 2018-06-14  Tom de Vries  <tdevries@suse.de>
7760
7761         PR cli/22573
7762         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7763         get_no_prettyformat_print_options.
7764
7765 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7766
7767         * sparc-nat.h: Include target.h.
7768         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7769         <fetch_registers>: Remove this argument in function call.
7770         <store_registers>: Remove this argument in function call, remove
7771         extra semicolon.
7772         <low_forget_process>: Call sparc64_forget_process instead of
7773         sparc_forget_process.
7774
7775 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7776
7777         * procfs.c (_initialize_procfs): Use add_inf_child_target.
7778         (procfs_target::make_corefile_notes): Adjust to new
7779         target_read_alloc return type.
7780
7781 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7782             Stephen Roberts  <stephen.roberts@arm.com>
7783
7784         PR gdb/22882
7785         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7786         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7787         Move should_notify_stop local into more inner scope.
7788
7789 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7790             Stephen Roberts  <stephen.roberts@arm.com>
7791
7792         PR gdb/22882
7793         * infrun.c (resume_1): Add call to mark_async_event_handler.
7794
7795 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7796
7797         * infrun.c (do_target_wait): Change old version of $pc printed.
7798
7799 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7800
7801         * dwarf2read.c (read_index_from_section): Rename to...
7802         (read_gdb_index_from_section): ... this, update all callers.
7803         (dwarf2_read_index): Rename to...
7804         (dwarf2_read_gdb_index): ... this, update all callers.
7805
7806 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7807
7808         * hppa-linux-nat.c
7809         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7810         hppa_linux_nat_target::fetch_registers.
7811
7812 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7813
7814         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7815         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7816         (AARCH64_DWARF_SVE_FFR): Likewise.
7817         (AARCH64_DWARF_SVE_P0): Likewise.
7818         (AARCH64_DWARF_SVE_Z0): Likewise.
7819
7820 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7821
7822         * common/common-regcache.h (raw_compare): New function.
7823         * regcache.c (regcache::raw_compare): Likewise.
7824         * regcache.h (regcache::raw_compare): New declaration.
7825
7826 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7827
7828         * common/common-regcache.h (reg_buffer_common): New structure.
7829         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7830         (reg_buffer::raw_supply): Likewise.
7831         (reg_buffer::raw_supply_integer): Likewise.
7832         (reg_buffer::raw_supply_zeroed): Likewise.
7833         (reg_buffer::raw_collect): Likewise.
7834         (reg_buffer::raw_collect_integer): Likewise.
7835         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7836         (reg_buffer::raw_supply): Likewise.
7837         (reg_buffer::raw_supply_integer): Likewise.
7838         (reg_buffer::raw_supply_zeroed): Likewise.
7839         (reg_buffer::raw_collect): Likewise.
7840         (reg_buffer::raw_collect_integer): Likewise.
7841
7842 2018-06-10  Tom Tromey  <tom@tromey.com>
7843
7844         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7845         (class remote_state) <stop_reply_queue>: Now std::vector.
7846         (remote_state::~remote_state)
7847         (remote_target::stop_reply_queue_length): Update.
7848         (struct queue_iter_param, remove_child_of_pending_fork)
7849         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7850         (check_pending_event_prevents_wildcard_vcont_callback)
7851         (remove_stop_reply_for_inferior)
7852         (remove_stop_reply_of_remote_state)
7853         (remote_notif_remove_once_on_match)
7854         (stop_reply_match_ptid_and_ws)
7855         (remote_kill_child_of_pending_fork): Remove.
7856         (remote_target::remove_new_fork_children)
7857         (remote_target::check_pending_events_prevent_wildcard_vcont)
7858         (remote_target::discard_pending_stop_replies)
7859         (remote_target::discard_pending_stop_replies_in_queue)
7860         (remote_target::remote_notif_remove_queued_reply)
7861         (remote_target::queued_stop_reply)
7862         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7863         (remote_target::wait, remote_target::kill_new_fork_children)
7864         (remote_target::async): Update.
7865
7866 2018-06-10  Tom Tromey  <tom@tromey.com>
7867
7868         * record-full.c (record_full_arch_list_cleanups): Remove.
7869         (record_full_message): Use try/catch.
7870         (record_full_wait_cleanups): Remove.
7871         (record_full_wait_1): Use try/catch.
7872         (record_full_restore): Likewise.
7873
7874 2018-06-10  Tom Tromey  <tom@tromey.com>
7875
7876         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7877         declare VEC.  Add constructor.
7878         <in_target_beneath>: Now bool.
7879         (record_full_breakpoints): Now a std::vector, static.
7880         (record_full_sync_record_breakpoints)
7881         (record_full_init_record_breakpoints)
7882         (record_full_target::insert_breakpoint)
7883         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7884
7885 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7886
7887         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7888         * serial.c (serial_interface_lookup): Remove struct keyword.
7889
7890 2018-06-10  Tom Tromey  <tom@tromey.com>
7891
7892         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7893         method.
7894         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7895         a method.
7896         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7897         method.
7898         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7899         "beneath" as a method.
7900         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7901         Use "beneath" as a method.
7902
7903 2018-06-10  Tom Tromey  <tom@tromey.com>
7904
7905         * tracefile.c (struct trace_file_writer_deleter): New.
7906         <operator()>: Rename from trace_file_writer_xfree.
7907         (trace_file_writer_up): New typedef.
7908         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7909
7910 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7911
7912         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7913         <m_registers, m_register_status>: Change type to
7914         std::unique_ptr.
7915         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7916         XCNEWVEC.
7917
7918 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7919
7920         * common/common-regcache.h (enum register_status): Add
7921         underlying type "signed char".
7922         * regcache.h (reg_buffer) <m_register_status>: Change type to
7923         register_status *.
7924         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7925         register_status instead of signed char.
7926         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7927         (reg_buffer::get_register_status): Remove cast.
7928         (readable_regcache::raw_read): Remove cast.
7929         (readable_regcache::cooked_read): Remove cast.
7930
7931 2018-06-09  Tom Tromey  <tom@tromey.com>
7932
7933         * source.c (reverse_search_command, forward_search_command): Use
7934         scoped_fd.
7935
7936 2018-06-09  Tom Tromey  <tom@tromey.com>
7937
7938         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7939         (serial_ops_list): Now static, std::vector.
7940         (serial_interface_lookup, serial_add_interface): Update.
7941
7942 2018-06-09  Tom Tromey  <tom@tromey.com>
7943
7944         * dwarf2read.c (process_cu_includes): Update.
7945         (process_full_comp_unit): Update.
7946         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7947         std::vector.
7948
7949 2018-06-08  Paul Koning  <paul_koning@dell.com>
7950
7951         PR gdb/23252
7952
7953         * python/python.c (do_start_initialization):
7954         Avoid call to internal Python API.
7955         (init__gdb_module): New function.
7956
7957 2018-06-08  Gary Benson <gbenson@redhat.com>
7958
7959         * linux-thread-db.c (valprint.h): New include.
7960         (struct check_thread_db_info): New structure.
7961         (check_thread_db_on_load, tdb_testinfo): New static globals.
7962         (check_thread_db, check_thread_db_callback): New functions.
7963         (try_thread_db_load_1): Run integrity checks if requested.
7964         (maintenance_check_libthread_db): New function.
7965         (_initialize_thread_db): Register "maint check libthread-db"
7966         and "maint set/show check-libthread-db".
7967         * NEWS: Mention the above new commands.
7968
7969 2018-06-08  Tom Tromey  <tom@tromey.com>
7970
7971         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7972         now a method.
7973
7974 2018-06-08  Tom Tromey  <tom@tromey.com>
7975
7976         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7977
7978 2018-06-08  Tom Tromey  <tom@tromey.com>
7979
7980         * common/btrace-common.h (struct btrace_data): Add constructor,
7981         destructor, move assignment operator.
7982         <empty, clear, fini>: New methods.
7983         <format>: Initialize.
7984         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7985         (btrace_data_empty): Don't declare.
7986         * common/btrace-common.c (btrace_data_init): Remove.
7987         (btrace_data::fini): Rename from btrace_data_fini.
7988         (btrace_data::empty): Rename from btrace_data_empty.
7989         (btrace_data::clear): Rename from btrace_data_clear.  Return
7990         bool.
7991         * btrace.h (make_cleanup_btrace_data): Don't declare.
7992         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7993         (parse_xml_btrace): Update.
7994         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7995         (maint_btrace_clear_packet_history_cmd): Update.
7996
7997 2018-06-07  Pedro Alves  <palves@redhat.com>
7998
7999         * target.h (target_ops) <beneath>: Now a method.  All references
8000         updated.
8001         (class target_stack): New.
8002         * target.c (g_target_stack): New.
8003         (g_current_top_target): Delete.
8004         (current_top_target): Get the top target out of g_target_stack.
8005         (target_stack::push, target_stack::unpush): New.
8006         (push_target, unpush_target): Reimplement.
8007         (target_is_pushed): Reimplement in terms of g_target_stack.
8008         (target_ops::beneath, target_stack::find_beneath): New.
8009
8010 2018-06-07  Pedro Alves  <palves@redhat.com>
8011
8012         * target.h (find_target_beneath): Delete declaration.
8013         * target.c (find_target_beneath): Delete definition.
8014         * aix-thread.c: All callers of find_target_beneath adjusted to
8015         call target_ops::beneath instead.
8016         * bsd-uthread.c: Likewise.
8017         * linux-thread-db.c: Likewise.
8018         * ravenscar-thread.c: Likewise.
8019         * sol-thread.c: Likewise.
8020         * spu-multiarch.c: Likewise.
8021
8022 2018-06-07  Pedro Alves  <palves@redhat.com>
8023
8024         * target.h (target_ops) <beneath>: Now a method.  All references
8025         updated.
8026         (target_ops) <m_beneath>: New.
8027         * target.c (target_ops::beneath): New.
8028         * corelow.c: Adjust all references to target_ops::beneath.
8029         * linux-thread-db.c: Likewise.
8030         * make-target-delegates: Likewise.
8031         * record-btrace.c: Likewise.
8032         * record-full.c: Likewise.
8033         * remote.c: Likewise.
8034         * target.c: Likewise.
8035         * target-delegates.c: Regenerate.
8036
8037 2018-06-07  Pedro Alves  <palves@redhat.com>
8038
8039         * target.h (target_stack): Delete.
8040         (current_top_target): Declare function.
8041         * target.c (target_stack): Delete.
8042         (g_current_top_target): New.
8043         (current_top_target): New function.
8044         * auxv.c: Use current_top_target instead of target_stack
8045         throughout.
8046         * avr-tdep.c: Likewise.
8047         * breakpoint.c: Likewise.
8048         * corefile.c: Likewise.
8049         * elfread.c: Likewise.
8050         * eval.c: Likewise.
8051         * exceptions.c: Likewise.
8052         * frame.c: Likewise.
8053         * gdbarch-selftests.c: Likewise.
8054         * gnu-v3-abi.c: Likewise.
8055         * ia64-tdep.c: Likewise.
8056         * ia64-vms-tdep.c: Likewise.
8057         * infcall.c: Likewise.
8058         * infcmd.c: Likewise.
8059         * infrun.c: Likewise.
8060         * linespec.c: Likewise.
8061         * linux-tdep.c: Likewise.
8062         * minsyms.c: Likewise.
8063         * ppc-linux-nat.c: Likewise.
8064         * ppc-linux-tdep.c: Likewise.
8065         * procfs.c: Likewise.
8066         * regcache.c: Likewise.
8067         * remote.c: Likewise.
8068         * rs6000-tdep.c: Likewise.
8069         * s390-linux-nat.c: Likewise.
8070         * s390-tdep.c: Likewise.
8071         * solib-aix.c: Likewise.
8072         * solib-darwin.c: Likewise.
8073         * solib-dsbt.c: Likewise.
8074         * solib-spu.c: Likewise.
8075         * solib-svr4.c: Likewise.
8076         * solib-target.c: Likewise.
8077         * sparc-tdep.c: Likewise.
8078         * sparc64-tdep.c: Likewise.
8079         * spu-tdep.c: Likewise.
8080         * symfile.c: Likewise.
8081         * symtab.c: Likewise.
8082         * target-descriptions.c: Likewise.
8083         * target-memory.c: Likewise.
8084         * target.c: Likewise.
8085         * target.h: Likewise.
8086         * tracefile-tfile.c: Likewise.
8087         * tracepoint.c: Likewise.
8088         * valops.c: Likewise.
8089         * valprint.c: Likewise.
8090         * value.c: Likewise.
8091         * windows-tdep.c: Likewise.
8092         * mi/mi-main.c: Likewise.
8093
8094 2018-06-07  Tom Tromey  <tom@tromey.com>
8095
8096         * valprint.h (build_address_symbolic): Declare.
8097         * printcmd.c (print_address_symbolic): Update.
8098         (build_address_symbolic): Change "name" and "filename" to
8099         std::string.
8100         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8101         Update.
8102         * defs.h (build_address_symbolic): Remove declaration.
8103
8104 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8105
8106         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8107         (aarch64_vnv_type): Add function.
8108         (aarch64_pseudo_register_name): Add V regs for SVE.
8109         (aarch64_pseudo_register_type): Likewise.
8110         (aarch64_pseudo_register_reggroup_p): Likewise.
8111         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8112         (aarch64_pseudo_read_value): Add V regs for SVE.
8113         (aarch64_pseudo_write_2): Use V0 offset for SVE
8114         (aarch64_pseudo_write): Add V regs for SVE.
8115         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8116
8117 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8118
8119         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8120         (sve_vl_from_vq): Likewise.
8121
8122 2018-06-05  Tom Tromey  <tom@tromey.com>
8123
8124         * cli/cli-cmds.c (show_version): Update.
8125         * top.c (print_gdb_version): Add "interactive" parameter.
8126         Update.
8127         * main.c (captured_main_1): Update.
8128         * top.h (print_gdb_version): Add "interactive" parameter and a
8129         comment.
8130
8131 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8132
8133         * common/enum-flags.h: Add trailing semicolon to example in
8134         comment.
8135
8136 2018-06-05  Tom Tromey  <tom@tromey.com>
8137
8138         PR cli/12326:
8139         * NEWS: Add entry about pager.
8140         * utils.c (pagination_disabled_for_command): New global.
8141         (prompt_for_continue): Allow "c" response to prompt.
8142         (reinitialize_more_filter): Clear
8143         pagination_disabled_for_command.
8144         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8145
8146 2018-06-04  Tom Tromey  <tom@tromey.com>
8147
8148         * ada-lang.h (ada_lookup_symbol_list): Update.
8149         * ada-lang.c (resolve_subexp): Update.
8150         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8151         parameter.
8152         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8153         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8154         results parameter to std::vector.
8155         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8156         Update.
8157         * ada-exp.y (block_lookup): Update.
8158         (select_possible_type_sym): Change type of syms.  Remove nsyms
8159         parameter.
8160         (write_var_or_type, write_name_assoc): Update.
8161
8162 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8163
8164         * windows-nat.c (windows_nat_target::xfer_partial): Return
8165         TARGET_XFER_E_IO if we need to delegate to the target beneath
8166         but BENEATH is NULL.
8167
8168 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8169
8170         * Makefile.in (config.status): Add configure.nat as a
8171         dependency.
8172
8173 2018-06-04  Tom Tromey  <tom@tromey.com>
8174
8175         * cp-name-parser.y (cpname_state): Add method declarations.
8176         (HANDLE_QUAL): Update.
8177         (cpname_state::d_grab, cpname_state::fill_comp)
8178         (cpname_state::make_operator, cpname_state::make_dtor)
8179         (cpname_state::make_builtin_type, cpname_state::make_name)
8180         (cpname_state::d_qualify, cpname_state::d_int_type)
8181         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8182         (%union): Move earlier.
8183
8184 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8185
8186         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8187
8188 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8189
8190         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8191         (aarch64_pseudo_write_1): Likewise.
8192         (aarch64_pseudo_read_value): Use helper.
8193         (aarch64_pseudo_write): Likewise.
8194
8195 2018-06-04  Pedro Alves  <palves@redhat.com>
8196
8197         * darwin-nat.c (darwin_ops): Delete.
8198         (darwin_attach_pid): Use get_native_target.
8199
8200 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8201
8202         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8203         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8204
8205 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8206
8207         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8208         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8209         (aarch64_gdbarch_init): Check for SVE.
8210         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8211
8212 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8213
8214         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8215         * aarch64-tdep.h (aarch64_read_description): Likewise.
8216         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8217         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8218         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8219         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8220         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8221
8222 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8223
8224         * value.c (value_fetch_lazy_bitfield): New.
8225         (value_fetch_lazy_memory): New.
8226         (value_fetch_lazy_register): New.
8227         (value_fetch_lazy): Factor out to smaller functions.
8228
8229 2018-06-01  Tom Tromey  <tom@tromey.com>
8230
8231         * cp-name-parser.y (backslashable, represented): Now const.
8232
8233 2018-06-01  Tom Tromey  <tom@tromey.com>
8234
8235         * cp-name-parser.y: Include parser-defs.h.
8236         (parser_fprintf): Remove declaration.
8237
8238 2018-06-01  Tom Tromey  <tom@tromey.com>
8239
8240         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8241         %parse-param.
8242         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8243         (global_result): Remove globals.
8244         (struct cpname_state): New.
8245         (yyparse): Don't declare.
8246         (yylex, yyerror): Move declarations after %union.
8247         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8248         (make_name): Add state parameter.
8249         Update all callers.
8250         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8251         parameter.
8252         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8253         Update.
8254         (yylex): Add lvalp, state parameters.
8255         (yyerror): Add state parameter.
8256         (cp_demangled_name_to_comp): Update.
8257
8258 2018-06-01  Tom Tromey  <tom@tromey.com>
8259
8260         * cp-name-parser.y (parser_fprintf): Declare.
8261         (GDB_YY_REMAP_PREFIX): Define.
8262         Include yy-remap.h.  Don't redefine yy* identifiers.
8263
8264 2018-06-01  Tom Tromey  <tom@tromey.com>
8265
8266         * python/py-type.c (typy_legacy_template_argument): Update.
8267         * cp-support.h (cp_demangled_name_to_comp): Update.
8268         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8269         parameter to be a "std::string *".
8270         (main): Update.
8271
8272 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8273
8274         * ada-lex.l: Include "diagnostics.h" instead of
8275         "common/diagnostics.h".
8276         * unittests/environ-selftests.c: Likewise.
8277         * common/diagnostics.h: Moved to ../include.
8278
8279 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8280
8281         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8282         to language_mode_manual while calling breakpoint_re_set_one.
8283
8284 2018-06-01  Tom Tromey  <tom@tromey.com>
8285
8286         * valops.c (value_cast_structs, destructor_name_p): Update.
8287         * symtab.c (gdb_mangle_name): Update.
8288         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8289         Update.
8290         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8291         (pascal_object_print_value_fields, pascal_object_print_value):
8292         Update.
8293         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8294         * linespec.c (find_methods): Update.
8295         * gdbtypes.h (type_name_no_tag): Remove.
8296         (type_name_or_error): Rename from type_name_no_tag_or_error.
8297         * gdbtypes.c (type_name_no_tag): Remove.
8298         (type_name_or_error): Rename from type_name_no_tag_or_error.
8299         (lookup_struct_elt_type, check_typedef): Update.
8300         * expprint.c (print_subexp_standard): Update.
8301         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8302         * d-namespace.c (d_lookup_nested_symbol): Update.
8303         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8304         (cp_print_class_member): Update.
8305         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8306         * completer.c (add_struct_fields): Update.
8307         * c-typeprint.c (cp_type_print_derivation_info)
8308         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8309         Update.
8310         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8311         (ada_prefer_type, ada_is_exception_sym): Update.
8312
8313 2018-06-01  Tom Tromey  <tom@tromey.com>
8314
8315         * valops.c (enum_constant_from_type, value_namespace_elt)
8316         (value_maybe_namespace_elt): Update.
8317         * valarith.c (find_size_for_pointer_math): Update.
8318         * target-descriptions.c (make_gdb_type): Update.
8319         * symmisc.c (print_symbol): Update.
8320         * stabsread.c (define_symbol, read_type)
8321         (complain_about_struct_wipeout, add_undefined_type)
8322         (cleanup_undefined_types_1): Update.
8323         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8324         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8325         (rust_internal_print_type, rust_composite_type)
8326         (rust_evaluate_funcall, rust_evaluate_subexp)
8327         (rust_inclusive_range_type_p): Update.
8328         * python/py-type.c (typy_get_tag): Update.
8329         * p-typeprint.c (pascal_type_print_base): Update.
8330         * mdebugread.c (parse_symbol, parse_type): Update.
8331         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8332         Update.
8333         * guile/scm-type.c (gdbscm_type_tag): Update.
8334         * go-lang.c (sixg_string_p): Update.
8335         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8336         Update.
8337         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8338         (TYPE_TAG_NAME): Remove.
8339         * gdbtypes.c (type_name_no_tag): Simplify.
8340         (check_typedef, check_types_equal, recursive_dump_type)
8341         (copy_type_recursive, arch_composite_type): Update.
8342         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8343         in summary mode when needed.
8344         * eval.c (evaluate_funcall): Update.
8345         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8346         (process_structure_scope, read_enumeration_type)
8347         (read_namespace_type, read_module_type, determine_prefix): Update.
8348         * cp-support.c (inspect_type): Update.
8349         * coffread.c (process_coff_symbol, decode_base_type): Update.
8350         * c-varobj.c (c_is_path_expr_parent): Update.
8351         * c-typeprint.c (c_type_print_base_struct_union): Update.
8352         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8353         summary when using C language.
8354         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8355         (gen_maybe_namespace_elt): Update.
8356         * ada-lang.c (ada_type_name): Simplify.
8357         (empty_record, ada_template_to_fixed_record_type_1)
8358         (template_to_static_fixed_type)
8359         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8360
8361 2018-06-01  Tom Tromey  <tom@tromey.com>
8362
8363         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8364         c_print_type.
8365         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8366         (c_print_type): Update.
8367         (c_print_type): New overload.
8368         (c_type_print_varspec_prefix, c_type_print_args)
8369         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8370         (c_type_print_base_struct_union, c_type_print_base_1)
8371         (cp_type_print_method_args): Add "language" parameter.
8372         (c_type_print_base): Update.
8373         * c-lang.h (c_print_type): Add new overload.
8374
8375 2018-06-01  Tom Tromey  <tom@tromey.com>
8376
8377         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8378         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8379
8380 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8381
8382         * aarch64-tdep.c (aarch64_sve_register_names): New const
8383         var.
8384         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8385         (AARCH64_SVE_Z_REGS_NUM): New define.
8386         (AARCH64_SVE_P_REGS_NUM): Likewise.
8387         (AARCH64_SVE_NUM_REGS): Likewise.
8388
8389 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8390
8391         * nat/linux-ptrace.h [__alpha__]
8392         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8393         definitions.
8394
8395 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8396
8397         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8398         the endianness selected.
8399         * NEWS: Document `set endian auto' mode operation update.
8400
8401 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8402
8403         * Makefile.in: Add new header.
8404         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8405         (sve_vl_from_vg): Likewise.
8406         (sve_vq_from_vl): Likewise.
8407         (sve_vl_from_vq): Likewise.
8408         (sve_vq_from_vg): Likewise.
8409         (sve_vg_from_vq): Likewise.
8410         * configure.nat: Add new c file.
8411         * nat/aarch64-sve-linux-ptrace.c: New file.
8412         * nat/aarch64-sve-linux-ptrace.h: New file.
8413
8414 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8415
8416         * aarch64-linux-nat.c (aarch64_linux_read_description):
8417         Add parmeter zero.
8418         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8419         Likewise.
8420         * aarch64-tdep.c (tdesc_aarch64_list): Add.
8421         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8422         (aarch64_gdbarch_init): Add parmeter zero.
8423         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8424         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8425         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8426         parmeter.
8427         * doc/gdb.texinfo: Describe SVE feature
8428         * features/aarch64-sve.c: New file.
8429
8430 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
8431
8432         PR gdb/23210
8433         * gdbarch.sh (significant_addr_bit): Default to zero when
8434         not set by target architecture.
8435         * gdbarch.c: Re-generated.
8436         * utils.c (address_significant): Update.
8437
8438 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
8439
8440         * stack.c (func_command): Remove trailing newline in call to error.
8441
8442 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8443
8444         * regcache.h (regcache_raw_collect): Remove, update callers to
8445         use regcache::raw_collect.
8446         * regcache.c (regcache_raw_collect): Remove.
8447
8448 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8449
8450         * regcache.h (regcache_raw_supply): Remove, update callers to
8451         use detached_regcache::raw_supply.
8452         * regcache.c (regcache_raw_supply): Remove.
8453
8454 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8455
8456         * regcache.h (regcache_cooked_write_part): Remove, update
8457         callers to use regcache::cooked_write_part.
8458         * regcache.c (regcache_cooked_write_part): Remove.
8459
8460 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8461
8462         * regcache.h (regcache_cooked_read_part): Remove, update callers
8463         to use readable_regcache::cooked_read_part.
8464         * regcache.c (regcache_cooked_read_part): Remove.
8465
8466 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8467
8468         * regcache.h (regcache_cooked_read_value): Remove, update
8469         callers to use readable_regcache::cooked_read_value.
8470         * regcache.c (regcache_cooked_read_value): Remove.
8471
8472 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8473
8474         * regcache.h (regcache_cooked_write): Remove, update callers to
8475         use regcache::cooked_write.
8476         * regcache.c (regcache_cooked_write): Remove.
8477
8478 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8479
8480         * regcache.h (regcache_invalidate): Remove, update callers to
8481         use detached_regcache::invalidate instead.
8482         * regcache.c (regcache_invalidate): Remove.
8483
8484 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8485
8486         * regcache.h (regcache_raw_write_part): Remove, update callers
8487         to use regcache::raw_write_part instead.
8488         * regcache.c (regcache_raw_write_part): Remove.
8489
8490 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8491
8492         * regcache.h (regcache_raw_read_part): Remove, update callers to
8493         use readable_regcache::raw_read_part instead.
8494         * regcache.c (regcache_raw_read_part): Remove.
8495
8496 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8497
8498         * regcache.h (regcache_cooked_read): Remove, update callers to
8499         use readable_regcache::cooked_read instead.
8500         * regcache.c (regcache_cooked_read): Remove.
8501
8502 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8503
8504         * regcache.h (regcache_raw_write): Remove, update callers to use
8505         regcache::raw_write instead.
8506         * regcache.c (regcache_raw_write): Remove.
8507
8508 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8509
8510         * regcache.h (regcache_raw_read): Remove, update callers to use
8511         readable_regcache::raw_read instead.
8512         * regcache.c (regcache_raw_read): Remove.
8513
8514 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8515
8516         * regcache.h (regcache_raw_update): Remove, update callers to
8517         use readable_regcache::raw_update instead.
8518         * regcache.c (regcache_raw_update): Remove.
8519
8520 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8521
8522         * regcache.h (regcache_register_status): Remove, update callers
8523         to use reg_buffer::get_register_status directly instead.
8524         * regcache.c (regcache_register_status): Remove.
8525
8526 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8527
8528         * regcache.h (regcache_get_ptid): Remove, update all callers to
8529         call regcache::ptid instead.
8530         * regcache.c (regcache_get_ptid): Remove.
8531
8532 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8533
8534         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
8535
8536 2018-05-30  Pedro Alves  <palves@redhat.com>
8537
8538         * common/common-exceptions.h (exception_rethrow): Use
8539         ATTRIBUTE_NORETURN.
8540
8541 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
8542
8543         * breakpoint.c (print_solib_event, check_status_catch_solib):
8544         Remove struct keyword in range-based for loops.
8545         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
8546         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
8547         Likewise.
8548         * linespec.c (find_superclass_methods, search_minsyms_for_name):
8549         Likewise.
8550         * symfile.c (addr_info_make_relative): Likewise.
8551         * thread.c (value_in_thread_stack_temporaries): Likewise.
8552
8553 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
8554
8555         PR gdb/16841
8556         * valops.c (value_struct_elt_for_reference): Call check_typedef on
8557         aggregate type to get its real type before accessing it.
8558
8559 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
8560
8561         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
8562         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
8563         * coff-pe-read.c (add_pe_forwarded_sym): Replace
8564         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
8565         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
8566         * jit.c (jit_breakpoint_re_set_internal): Likewise.
8567         * printcmd.c (info_address_command): Likewise.
8568
8569 2018-05-29  Tom Tromey  <tom@tromey.com>
8570
8571         * windows-nat.c (handle_exception): Update fall-through comment.
8572
8573 2018-05-29  Tom Tromey  <tom@tromey.com>
8574
8575         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
8576         (struct program_space) <added_solibs>: Now a std::vector.
8577         * breakpoint.c (print_solib_event): Update.
8578         (check_status_catch_solib): Update.
8579         * progspace.c (clear_program_space_solib_cache): Update.
8580         * solib.c (update_solib_list): Update.
8581
8582 2018-05-29  Tom Tromey  <tom@tromey.com>
8583
8584         * python/py-type.c (typy_richcompare): Update.
8585         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
8586         * gdbtypes.h (types_deeply_equal): Return bool.
8587         (types_equal): Likewise.
8588         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
8589         declare VEC.
8590         (check_types_equal): Change worklist to std::vector.  Return
8591         bool.
8592         (struct type_equality_entry): Add constructor.
8593         (compare_maybe_null_strings): Return bool.
8594         (check_types_worklist): Return bool.  Change worklist to
8595         std::vector.
8596         (types_deeply_equal): Use std::vector.
8597         (types_equal): Return bool.
8598         (compare_maybe_null_strings): Simplify.
8599
8600 2018-05-29  Tom Tromey  <tom@tromey.com>
8601
8602         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
8603
8604 2018-05-29  Tom Tromey  <tom@tromey.com>
8605
8606         * objc-lang.h: Don't include cp-support.h.
8607         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
8608         declare VEC.
8609
8610 2018-05-27  Tom Tromey  <tom@tromey.com>
8611
8612         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
8613
8614 2018-05-25  Tom Tromey  <tom@tromey.com>
8615
8616         * value.c (value::location): Initialize.
8617
8618 2018-05-25  Tom Tromey  <tom@tromey.com>
8619
8620         * dbxread.c (init_bincl_list): Remove.
8621         (bincl_list): Now a std::vector.
8622         (bincls_allocated, next_bincl): Remove.
8623         (free_bincl_list, do_free_bincl_list_cleanup)
8624         (make_cleanup_free_bincl_list): Remove.
8625         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
8626         unique_xmalloc_ptr.
8627         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
8628         (struct header_file_location): Add constructor.
8629         (add_bincl_to_list): Remove.
8630
8631 2018-05-25  Tom Tromey  <tom@tromey.com>
8632
8633         * tui/tui.c (tui_enable): Update.
8634         * mi/mi-interp.c (mi_interp::init): Update.
8635         * interps.h (class interp) <name>: New method.
8636         <m_name>: Rename from name.
8637         (~scoped_restore_interp): Update.
8638         * interps.c (interp::interp): Update.
8639         (interp_add, interp_set, interp_lookup_existing)
8640         (current_interp_named_p): Update.
8641
8642 2018-05-25  Tom Tromey  <tom@tromey.com>
8643
8644         * interps.c (interp_name): Remove.
8645         * mi/mi-interp.c (mi_interp::init): Update.
8646         * interps.h (interp_name): Remove.
8647         (~scoped_restore_interp): Update.
8648         * tui/tui.c (tui_enable): Update.
8649
8650 2018-05-25  Tom Tromey  <tom@tromey.com>
8651
8652         * utils.c (fputs_maybe_filtered): Update.
8653         * linespec.c (decode_line_full): Update.
8654         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
8655         (mi_print_breakpoint_for_event, mi_solib_loaded)
8656         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
8657         (mi_user_selected_context_changed): Update.
8658         * mi/mi-main.c (mi_execute_command): Update.
8659         * cli/cli-script.c (execute_control_command): Update.
8660         * python/python.c (execute_gdb_command): Update.
8661         * solib.c (info_sharedlibrary_command): Update.
8662         * interps.c (interp_ui_out): Remove.
8663         * interps.h (interp_ui_out): Remove.
8664
8665 2018-05-25  Tom Tromey  <tom@tromey.com>
8666
8667         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
8668         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
8669         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
8670
8671 2018-05-25  Tom Tromey  <tom@tromey.com>
8672
8673         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
8674         * interps.c (interp_exec): Use scoped_restore.
8675
8676 2018-05-25  Tom Tromey  <tom@tromey.com>
8677
8678         * remote.c (remote_target::remote_file_get): Use
8679         gdb::byte_vector.
8680         (remote_target::remote_file_put): Likewise.
8681
8682 2018-05-25  Tom Tromey  <tom@tromey.com>
8683
8684         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
8685         a std::string.
8686         (get_pe_section_index, add_pe_exported_sym): Update.
8687         (read_pe_exported_syms): Use gdb::def_vector.
8688
8689 2018-05-25  Tom Tromey  <tom@tromey.com>
8690
8691         * frame.c (remove_prev_frame): Remove.
8692         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
8693
8694 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
8695
8696         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
8697         Remove prototypes.
8698         * mips-linux-nat.c (supply_fpregset): Always call
8699         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
8700         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
8701         `mips_fill_fpregset'.
8702         * mips-linux-tdep.c (mips_supply_fpregset)
8703         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
8704         (mips_fill_fpregset_wrapper): Remove functions.
8705         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
8706         (mips_linux_fpregset): Remove variable.
8707         (mips_linux_iterate_over_regset_sections): Use
8708         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
8709         (mips_linux_o32_sigframe_init): Remove comment.
8710
8711 2018-05-25  Pedro Alves  <palves@redhat.com>
8712
8713         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
8714         (struct readahead_cache, struct packet_reg, struct
8715         remote_arch_state, class remote_state): Move higher up in the
8716         file.
8717         (remote_target::m_remote_state): Now an object instead of a pointer.
8718         (remote_target::get_remote_state): Adjust.
8719
8720 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8721
8722         * stack.c (select_and_print_frame): Delete.
8723         (struct function_bounds): Move struct within function.
8724         (func_command): Most content moved into new function
8725         find_frame_for_function, use new function, print result, add
8726         function comment.
8727         (find_frame_for_function): New function, now returns a result.
8728
8729 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8730
8731         * stack.c (iterate_over_block_arg_vars): Fix comment.
8732         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
8733
8734 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8735
8736         PR gdb/23203
8737         * frame.c
8738         (scoped_restore_selected_frame::scoped_restore_selected_frame):
8739         Define.
8740         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8741         Define.
8742         * frame.h (class scoped_restore_selected_frame): New class.
8743         * stack.c (print_frame_local_vars): Remove catching and rethrowing
8744         of any exception, use scoped_restore_selected_frame to restore the
8745         frame instead.
8746
8747 2018-05-24  Pedro Alves  <palves@redhat.com>
8748
8749         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8750         override.
8751
8752 2018-05-23  Tom Tromey  <tom@tromey.com>
8753
8754         * complaints.c (struct complaints): Remove.
8755         (symfile_complaint_book): Remove.
8756         (series): New global.
8757         (complaint_internal): Update.
8758         (clear_complaints): Update.
8759
8760 2018-05-23  Tom Tromey  <tom@tromey.com>
8761
8762         * complaints.c (counters): New global.
8763         (struct complain): Remove.
8764         (struct complaints) <root>: Remove.
8765         (complaint_sentinel): Remove.
8766         (symfile_complaint_book): Update.
8767         (find_complaint) Remove.
8768         (complaint_internal, clear_complaints): Update.
8769
8770 2018-05-23  Tom Tromey  <tom@tromey.com>
8771
8772         * complaints.c (struct complain) <file, line>: Remove.
8773         (find_complaint): Remove file, line parameters.
8774         (complaint_internal): Update.
8775
8776 2018-05-23  Tom Tromey  <tom@tromey.com>
8777
8778         * complaints.c (vcomplaint): Remove.
8779         (complaint_internal) Merge in contents of vcomplaint.
8780
8781 2018-05-23  Tom Tromey  <tom@tromey.com>
8782
8783         * complaints.c (struct complaints) <explanation>: Remove.
8784         (symfile_explanations): Remove.
8785         (symfile_complaint_book): Update.
8786         (vcomplaint): Update.
8787         (struct explanation): Remove.
8788
8789 2018-05-23  Tom Tromey  <tom@tromey.com>
8790
8791         * complaints.c (symfile_complaints): Remove.
8792         (complaint_internal): Remove "complaints" parameter.
8793         (clear_complaints, vcomplaint): Remove "c" parameter.
8794         (get_complaints): Remove.
8795         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8796         (dwarf2_debug_line_missing_file_complaint)
8797         (dwarf2_debug_line_missing_end_sequence_complaint)
8798         (dwarf2_complex_location_expr_complaint)
8799         (dwarf2_const_value_length_mismatch_complaint)
8800         (dwarf2_section_buffer_overflow_complaint)
8801         (dwarf2_macro_malformed_definition_complaint)
8802         (dwarf2_invalid_attrib_class_complaint)
8803         (create_addrmap_from_index, dw2_symtab_iter_next)
8804         (dw2_expand_marked_cus)
8805         (dw2_debug_names_iterator::find_vec_in_debug_names)
8806         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8807         (create_debug_type_hash_table, init_cutu_and_read_dies)
8808         (partial_die_parent_scope, add_partial_enumeration)
8809         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8810         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8811         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8812         (create_cus_hash_table, create_dwp_hash_table)
8813         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8814         (dwarf2_rnglists_process, dwarf2_ranges_process)
8815         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8816         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8817         (handle_struct_member_die, process_structure_scope)
8818         (read_array_type, read_common_block, read_module_type)
8819         (read_tag_pointer_type, read_typedef, read_base_type)
8820         (read_subrange_type, load_partial_dies, partial_die_info::read)
8821         (partial_die_info::read, partial_die_info::read)
8822         (partial_die_info::read, read_checked_initial_length_and_offset)
8823         (dwarf2_string_attr, read_formatted_entries)
8824         (dwarf_decode_line_header)
8825         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8826         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8827         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8828         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8829         (get_signatured_type, get_DW_AT_signature_type)
8830         (decode_locdesc, file_file_name, consume_improper_spaces)
8831         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8832         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8833         (dwarf2_symbol_mark_computed, set_die_type)
8834         (read_attribute_value): Update.
8835         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8836         Update.
8837         * dbxread.c (unknown_symtype_complaint)
8838         (lbrac_mismatch_complaint, repeated_header_complaint)
8839         (set_namestring, function_outside_compilation_unit_complaint)
8840         (read_dbx_symtab, process_one_symbol): Update.
8841         * gdbtypes.c (stub_noname_complaint): Update.
8842         * windows-nat.c (handle_unload_dll): Update.
8843         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8844         (decode_base_type): Update.
8845         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8846         (eb_complaint, record_include_begin, record_include_end)
8847         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8848         (process_xcoff_symbol, read_symbol)
8849         (function_outside_compilation_unit_complaint)
8850         (scan_xcoff_symtab): Update.
8851         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8852         * buildsym.c (finish_block_internal, make_blockvector)
8853         (end_symtab_get_static_block, augment_type_symtab): Update.
8854         * dtrace-probe.c (dtrace_process_dof)
8855         (dtrace_static_probe_ops::get_probes): Update.
8856         * complaints.h (struct complaint): Don't declare.
8857         (symfile_complaints): Remove.
8858         (complaint_internal): Remove "complaints" parameter.
8859         (complaint): Likewise.
8860         (clear_complaints): Likewise.
8861         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8862         (reread_symbols): Update.
8863         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8864         (dwarf2_frame_cache, decode_frame_entry): Update.
8865         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8866         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8867         (info_selectors_command): Update.
8868         * macrotab.c (macro_include, check_for_redefinition)
8869         (macro_undef): Update.
8870         * objfiles.c (filter_overlapping_sections): Update.
8871         * stabsread.c (invalid_cpp_abbrev_complaint)
8872         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8873         (define_symbol, error_type, read_type, rs6000_builtin_type)
8874         (stabs_method_name_from_physname, read_member_functions)
8875         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8876         (attach_fields_to_type, complain_about_struct_wipeout)
8877         (read_range_type, read_args, common_block_start)
8878         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8879         Update.
8880         * mdebugread.c (index_complaint, unknown_ext_complaint)
8881         (basic_type_complaint, bad_tag_guess_complaint)
8882         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8883         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8884         (parse_procedure, parse_lines)
8885         (function_outside_compilation_unit_complaint)
8886         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8887         (bad_tag_guess_complaint, reg_value_complaint): Update.
8888         * cp-support.c (demangled_name_complaint): Update.
8889         * macroscope.c (sal_macro_scope): Update.
8890         * dwarf-index-write.c (class debug_names): Update.
8891
8892 2018-05-23  Tom Tromey  <tom@tromey.com>
8893
8894         * complaints.c (clear_complaints): Remove "noisy" parameter.
8895         * complaints.h (clear_complaints): Update.
8896         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8897         (reread_symbols): Update.
8898
8899 2018-05-23  Tom Tromey  <tom@tromey.com>
8900
8901         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8902         SUBSEQUENT_MESSAGE.
8903         (vcomplaint, clear_complaints): Update.
8904         (symfile_explanations): Remove some messages.
8905
8906 2018-05-23  Tom Tromey  <tom@tromey.com>
8907
8908         * complaints.c (internal_complaint): Remove.
8909         * complaints.h (internal_complaint): Remove.
8910
8911 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8912
8913         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8914
8915 2018-05-22  Pedro Alves  <palves@redhat.com>
8916
8917         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8918         (remote_fileio_badfd, remote_fileio_return_errno)
8919         (remote_fileio_return_success, remote_fileio_func_open)
8920         (remote_fileio_func_open, remote_fileio_func_close)
8921         (remote_fileio_func_read, remote_fileio_func_write)
8922         (remote_fileio_func_lseek, remote_fileio_func_rename)
8923         (remote_fileio_func_unlink, remote_fileio_func_stat)
8924         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8925         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8926         remote_target parameter.
8927         (remote_fio_func_map) <func>: Add remote_target parameter.
8928         (do_remote_fileio_request, remote_fileio_request):
8929         * remote-fileio.h (remote_fileio_request):
8930         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8931         remote_target parameter.
8932         (remote_notif_process, handle_notification): Adjust to pass down
8933         the remote.
8934         (remote_notif_state_allocate): Add remote_target parameter.  Save
8935         it.
8936         * remote-notif.h (struct remote_target): Forward declare.
8937         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8938         remote_target parameter.
8939         (struct remote_notif_state) <remote>: New field.
8940         (remote_notif_ack, remote_notif_parse): Add remote_target
8941         parameter.
8942         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8943         remote_target parameter.
8944         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8945         (threads_listing_context, rmt_thread_action, protocol_feature)
8946         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8947         (packet_result, struct threads_listing_context, remote_state):
8948         Move definitions and declarations higher up.
8949         (remote_target) <~remote_target>: Declare.
8950         (remote_download_command_source, remote_file_put, remote_file_get)
8951         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8952         (remote_hostio_pread_vFile, remote_hostio_send_command)
8953         (remote_hostio_set_filesystem, remote_hostio_open)
8954         (remote_hostio_close, remote_hostio_unlink, remote_state)
8955         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8956         (get_memory_write_packet_size, get_memory_read_packet_size)
8957         (append_pending_thread_resumptions, remote_detach_1)
8958         (append_resumption, remote_resume_with_vcont)
8959         (add_current_inferior_and_thread, wait_ns, wait_as)
8960         (process_stop_reply, remote_notice_new_inferior)
8961         (process_initial_stop_replies, remote_add_thread)
8962         (btrace_sync_conf, remote_btrace_maybe_reopen)
8963         (remove_new_fork_children, kill_new_fork_children)
8964         (discard_pending_stop_replies, stop_reply_queue_length)
8965         (check_pending_events_prevent_wildcard_vcont)
8966         (discard_pending_stop_replies_in_queue, stop_reply)
8967         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8968         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8969         (remote_interrupt_as, remote_interrupt_ns)
8970         (remote_get_noisy_reply, remote_query_attached)
8971         (remote_add_inferior, remote_current_thread, get_current_thread)
8972         (set_thread, set_general_thread, set_continue_thread)
8973         (set_general_process, write_ptid)
8974         (remote_unpack_thread_info_response, remote_get_threadinfo)
8975         (parse_threadlist_response, remote_get_threadlist)
8976         (remote_threadlist_iterator, remote_get_threads_with_ql)
8977         (remote_get_threads_with_qxfer)
8978         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8979         (get_offsets, remote_check_symbols, remote_supported_packet)
8980         (remote_query_supported, remote_packet_size)
8981         (remote_serial_quit_handler, remote_detach_pid)
8982         (remote_vcont_probe, remote_resume_with_hc)
8983         (send_interrupt_sequence, interrupt_query)
8984         (remote_notif_get_pending_events, fetch_register_using_p)
8985         (send_g_packet, process_g_packet, fetch_registers_using_g)
8986         (store_register_using_P, store_registers_using_G)
8987         (set_remote_traceframe, check_binary_download)
8988         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8989         (remote_xfer_live_readonly_partial, remote_read_bytes)
8990         (remote_send_printf, remote_flash_write, readchar)
8991         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8992         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8993         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8994         (extended_remote_disable_randomization, extended_remote_run)
8995         (send_environment_packet, extended_remote_environment_support)
8996         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8997         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8998         (packet_command): Now methods of ...
8999         (remote_target): ... this class.
9000         (m_remote_state) <remote_target>: New field.
9001         (struct remote_state) <stop_reply_queue,
9002         remote_async_inferior_event_token, wait_forever_enabled_p>: New
9003         fields.
9004         (remote_state::remote_state): Allocate stop_reply_queue.
9005         (remote_state): Delete global.
9006         (get_remote_state_raw): Delete.
9007         (remote_target::get_remote_state): Allocate m_remote_state on
9008         demand.
9009         (get_current_remote_target): New.
9010         (remote_ops, extended_remote_ops): Delete.
9011         (wait_forever_enabled_p, remote_async_inferior_event_token):
9012         Delete, moved to struct remote_state.
9013         (remote_target::close): Delete self.  Destruction bits split to
9014         ...
9015         (remote_target::~remote_target): ... this.
9016         (show_memory_packet_size): Adjust to use
9017         get_current_remote_target.
9018         (struct protocol_feature) <func>: Add remote_target parameter.
9019         All callers adjusted.
9020         (curr_quit_handler_target): New.
9021         (remote_serial_quit_handler): Reimplement.
9022         (remote_target::open_1): Adjust to use get_current_remote_target.
9023         Heap-allocate remote_target/extended_remote_target instances.
9024         (vcont_builder::vcont_builder): Add remote_target parameter, and
9025         save it in m_remote.  All callers adjusted.
9026         (vcont_builder::m_remote): New field.
9027         (vcont_builder::restart, vcont_builder::flush)
9028         (vcont_builder::push_action): Use it.
9029         (remote_target::commit_resume): Use it.
9030         (struct queue_iter_param) <remote>: New field.
9031         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9032         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9033         (check_pending_event_prevents_wildcard_vcont_callback)
9034         (remote_target::check_pending_events_prevent_wildcard_vcont)
9035         (remote_target::discard_pending_stop_replies)
9036         (remote_target::discard_pending_stop_replies_in_queue)
9037         (remote_target::remote_notif_remove_queued_reply): Fill in
9038         'remote' field.
9039         (remote_notif_get_pending_events): New.
9040         (remote_target::readchar, remote_target::remote_serial_write):
9041         Save/restore curr_quit_handler_target.
9042         (putpkt): New.
9043         (kill_new_fork_children): Fill in 'remote' field.
9044         (packet_command): Use get_current_remote_target, defer to
9045         remote_target method of same name.
9046         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9047         parameter, and save it in m_remote.  All callers adjusted.
9048         (scoped_remote_fd::release): Use m_remote.
9049         (scoped_remote_fd::m_remote): New field.
9050         (remote_file_put, remote_file_get, remote_file_delete): Use
9051         get_current_remote_target, defer to remote_target method of same
9052         name.
9053         (remote_btrace_reset): Add remote_state paremeter.  Update all
9054         callers.
9055         (remote_async_inferior_event_handler). Pass down 'data'.
9056         (remote_new_objfile): Use get_current_remote_target.
9057         (remote_target::vcont_r_supported): New.
9058         (set_range_stepping): Use get_current_remote_target and
9059         remote_target::vcont_r_supported.
9060         (_initialize_remote): Don't allocate 'remote_state' and
9061         'stop_reply_queue' globals.
9062         * remote.h (struct remote_target): Forward declare.
9063         (getpkt, putpkt, remote_notif_get_pending_events): Add
9064         'remote_target' parameter.
9065
9066 2018-05-22  Pedro Alves  <palves@redhat.com>
9067
9068         * remote.c (vcont_builder): Now a class.  Make all data members
9069         private.
9070         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9071         Declare methods.
9072         (vcont_builder_restart): Rename to ...
9073         (vcont_builder::restart): ... this.
9074         (vcont_builder_flush): Rename to ...
9075         (vcont_builder::flush): ... this.
9076         (vcont_builder_push_action): Rename to ...
9077         (vcont_builder::push_action): ... this.
9078         (remote_target::commit_resume): Adjust.
9079
9080 2018-05-22  Pedro Alves  <palves@redhat.com>
9081
9082         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9083         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9084         (get_fixed_memory_packet_size): New.
9085         (get_memory_packet_size): Use it.
9086         (set_memory_packet_size): Don't override the config size with
9087         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9088         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9089         Don't refer to get_memory_packet_size if not connected to a remote
9090         target.  Show "(default)" if configured size is 0.
9091
9092 2018-05-22  Pedro Alves  <palves@redhat.com>
9093
9094         * remote.c (remote_target::mourn_inferior): Move
9095         discard_pending_stop_replies call here from ...
9096         (_initialize_remote): ... here.
9097
9098 2018-05-22  Pedro Alves  <palves@redhat.com>
9099
9100         * remote.c (compare_section_command): Remove set_general_process
9101         call.
9102
9103 2018-05-22  Pedro Alves  <palves@redhat.com>
9104
9105         * remote.c (struct packet_reg, struct remote_arch_state):
9106         Move higher up in the file.
9107         (remote_state) <m_arch_states>: Store remote_arch_state values
9108         instead of remote_arch_state pointers.
9109         (remote_state::get_remote_arch_state): Adjust.
9110
9111 2018-05-22  Pedro Alves  <palves@redhat.com>
9112
9113         * remote.c: Include <unordered_map>.
9114         (remote_state): Now a class.
9115         (remote_state) <get_remote_arch_state>: Declare method.
9116         <get_remote_arch_state>: New field.
9117         (remote_arch_state) <remote_arch_state>: Declare ctor.
9118         <regs>: Now a unique_ptr.
9119         (remote_gdbarch_data_handle): Delete.
9120         (get_remote_arch_state): Delete.
9121         (remote_state::get_remote_arch_state): New.
9122         (get_remote_state): Adjust to call remote_state's
9123         get_remote_arch_state method.
9124         (init_remote_state): Delete, bits factored out to ...
9125         (remote_arch_state::remote_arch_state): ... this new method.
9126         (get_remote_packet_size, get_memory_packet_size)
9127         (process_g_packet, remote_target::fetch_registers)
9128         (remote_target::prepare_to_store, store_registers_using_G)
9129         (remote_target::store_registers, remote_target::get_trace_status):
9130         Adjust to call remote_state's method.
9131         (_initialize_remote): Remove reference to
9132         remote_gdbarch_data_handle.
9133
9134 2018-05-22  Pedro Alves  <palves@redhat.com>
9135
9136         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9137         pread>: New method declarations.
9138         (remote_target::open_1): Adjust.
9139         (readahead_cache_invalidate): Rename to ...
9140         (readahead_cache::invalidate): ... this, and adjust to be a class
9141         method.
9142         (readahead_cache_invalidate_fd): Rename to ...
9143         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9144         class method.
9145         (remote_hostio_pwrite): Adjust.
9146         (remote_hostio_pread_from_cache): Rename to ...
9147         (readahead_cache::pread): ... this, and adjust to be a class
9148         method.
9149         (remote_hostio_close): Adjust.
9150
9151 2018-05-22  Pedro Alves  <palves@redhat.com>
9152
9153         * remote.c (remote_hostio_close_cleanup): Delete.
9154         (class scoped_remote_fd): New.
9155         (remote_file_put, remote_file_get): Use it.
9156
9157 2018-05-22  Pedro Alves  <palves@redhat.com>
9158
9159         (struct vCont_action_support): Use bool and initialize all fields.
9160         (struct readahead_cache): Initialize all fields.
9161         (remote_state): Use bool and initialize all fields.
9162         (remote_state::remote_state, remote_state::~remote_state): New.
9163         (new_remote_state): Delete.
9164         (_initialize_remote): Use new to allocate remote_state.
9165
9166 2018-05-22  Pedro Alves  <palves@redhat.com>
9167             張俊芝  <zjz@zjz.name>
9168
9169         PR gdb/22973
9170         * c-exp.y: Include "c-support.h".
9171         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9172         of tolower.  Use c_ident_is_alpha to scan names.
9173         * c-lang.c: Include "c-support.h".
9174         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9175         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9176         * c-support.h: New file, with bits factored out from ...
9177         * cp-name-parser.y: ... this file.
9178         Include "c-support.h".
9179         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9180         c-support.h and renamed.
9181         (symbol_end, yylex): Adjust.
9182
9183 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9184
9185         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9186         parameter type to CORE_ADDR.
9187         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9188         parameter type in declaration to CORE_ADDR.
9189         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9190         target_auxv_search to get AT_HWCAP and use the result to get the
9191         target description.
9192         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9193         to CORE_ADDR. Remove the cast of the return value to unsigned
9194         long. Fix error predicate of target_auxv_search.
9195         (ppc_linux_nat_target::read_description): Change the type of the
9196         hwcap variable to CORE_ADDR.
9197
9198 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9199
9200         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9201         if the size of fpscr is larger than 32 bits.
9202
9203 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9204
9205         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9206         (ppc32_linux_vsxregmap): New global.
9207         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9208         regcache_supply_regset, and regcache_collect_regset.
9209         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9210         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9211         (fetch_vsx_register, store_vsx_register): Remove.
9212         (fetch_vsx_registers): Add regno parameter. Get regset using
9213         ppc_linux_vsxregset. Use regset to supply registers.
9214         (store_vsx_registers): Add regno parameter. Get regset using
9215         ppc_linux_vsxregset. Use regset to collect registers.
9216         (fetch_register): Call fetch_vsx_registers instead of
9217         fetch_vsx_register.
9218         (store_register): Call store_vsx_registers instead of
9219         store_vsx_register.
9220         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9221         new regno parameter.
9222         (store_ppc_registers): Call store_vsx_registers with -1 for the
9223         new regno parameter.
9224         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9225         (ppc_collect_vsxregset): Remove.
9226
9227 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9228
9229         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9230         offset fields.
9231         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9232         for vector register offset fields.
9233         (ppc64_fbsd_reg_offsets): Likewise.
9234         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9235         to vector register offset fields.
9236         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9237         to vector register offset fields.
9238         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9239         vector register offset fields.
9240         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9241         initializers for vector register offset fields.
9242         (rs6000_aix64_reg_offsets): Likewise.
9243         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9244         (ppc_supply_vrregset): Remove.
9245         (ppc_collect_vrregset): Remove.
9246         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9247         (ppc_linux_vrregset) : New function.
9248         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9249         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9250         (ppc32_linux_vrregset): Remove.
9251         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9252         and use result instead of ppc32_linux_vrregset.
9253         (ppc32_linux_reg_offsets): Remove initializers for vector register
9254         offset fields.
9255         (ppc64_linux_reg_offsets): Likewise.
9256         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9257         * ppc-linux-nat.c: Include regset.h.
9258         (gdb_vrregset_t): Adjust comment to account for little-endian
9259         mode.
9260         (supply_vrregset, fill_vrregset): Remove.
9261         (fetch_altivec_register, store_altivec_register): Remove.
9262         (fetch_altivec_registers): Add regno parameter. Get regset using
9263         ppc_linux_vrregset. Use regset to supply registers.
9264         (store_altivec_registers): Add regno parameter. Get regset using
9265         ppc_linux_vrregset. Use regset to collect registers.
9266         (fetch_register): Call fetch_altivec_registers instead of
9267         fetch_altivec_register.
9268         (store_register): Call store_altivec_registers instead of
9269         store_altivec_register.
9270         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9271         the new regno parameter.
9272         (store_ppc_registers): Call store_altivec_registers with -1 for
9273         the new regno parameter.
9274
9275 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9276
9277         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9278         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9279         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9280         (gdb_vrregset_t): Change array type size to
9281         PPC_LINUX_SIZEOF_VRREGSET.
9282         (gdb_vsxregset_t): Change array type size to
9283         PPC_LINUX_SIZEOF_VSXREGSET.
9284         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9285         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9286         PPC_LINUX_SIZEOF_VSXREGSET.
9287
9288 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9289
9290         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9291         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9292         nat/ppc-linux.c.
9293         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9294         ppc_linux_target_wordsize with tid.
9295         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9296         wordsize with tid.
9297         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9298         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9299         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9300         tid parameter. Remove static specifier.
9301         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9302         (ppc_linux_target_wordsize): New declaration.
9303
9304 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9305
9306         * arch/ppc-linux-common.c: New file.
9307         * arch/ppc-linux-common.h: New file.
9308         * arch/ppc-linux-tdesc.h: New file.
9309         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9310         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9311         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9312         arch/ppc-linux-tdesc.h.
9313         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9314         arch/ppc-linux-tdesc.h.
9315         (ppc_linux_nat_target::read_description): Remove target
9316         description matching code. Fill a ppc_linux_features struct and
9317         call ppc_linux_match_description with it. Move comment about ISA
9318         2.05 to ppc-linux-common.c.
9319         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9320         arch/ppc-linux-tdesc.h.
9321         (ppc_linux_core_read_description): Remove target description
9322         matching code. Fill a ppc_linux_features struct and call
9323         ppc_linux_match_description with it.
9324         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9325         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9326         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9327         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9328         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9329         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9330         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9331         (tdesc_powerpc_e500l): Remove.
9332
9333 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9334
9335         * ada-lang.c (catch_assert_command): Pass empty string instead
9336         of NULL for excep_string argument.
9337
9338 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9339
9340         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9341         the width of the requested register exceeds the width of the
9342         `ptrace' data type.
9343
9344 2018-05-21  Tom Tromey  <tom@tromey.com>
9345
9346         * printcmd.c (output_command): Remove.
9347         (output_command_const): Rename to output_command.
9348         * valprint.h (output_command): Rename from output_command_const.
9349         * tracepoint.c (trace_dump_actions): Call output_command.
9350
9351 2018-05-21  Tom Tromey  <tom@tromey.com>
9352
9353         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9354         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9355         * ada-lang.h (create_ada_exception_catchpoint): Update.
9356         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9357         std::string.
9358         (create_excep_cond_exprs, ~ada_catchpoint)
9359         (should_stop_exception, print_one_exception)
9360         (print_mention_exception, print_recreate_exception): Update.
9361         (ada_get_next_arg): Remove.
9362         (catch_ada_exception_command_split): Use std::string.  Change type
9363         of "excep_string", "cond_string".
9364         (catch_ada_exception_command): Update.
9365         (create_ada_exception_catchpoint): Change type of excep_string.
9366         (ada_exception_sal): Remove excep_string parameter.
9367         (~ada_catchpoint): Remove.
9368
9369 2018-05-21  Tom Tromey  <tom@tromey.com>
9370
9371         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9372         cleanup.
9373
9374 2018-05-21  Tom Tromey  <tom@tromey.com>
9375
9376         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9377         Return unique_xmalloc_ptr.
9378         (print_it_exception): Update.
9379
9380 2018-05-21  Tom Tromey  <tom@tromey.com>
9381
9382         * tracepoint.c (trace_dump_actions): Use std::string.
9383
9384 2018-05-21  Tom Tromey  <tom@tromey.com>
9385
9386         * symfile.c (reread_symbols): Use std::string for original_name.
9387
9388 2018-05-21  Tom Tromey  <tom@tromey.com>
9389
9390         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9391         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9392         constructor.
9393
9394 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9395
9396         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9397         instance to...
9398         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9399         * objfiles.c (get_objfile_bfd_data): Allocate
9400         objfile_per_bfd_storage with obstack_new when allocating on
9401         obstack.
9402
9403 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9404
9405         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9406         OBSTACK_ZALLOC.
9407         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9408         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9409         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9410         (add_pending): Likewise.
9411         (parse_symbol): Likewise.
9412         (parse_partial_symbols): Likewise.
9413         (psymtab_to_symtab_1): Likewise.
9414         (new_psymtab): Likewise.
9415         (elfmdebug_build_psymtabs): Likewise.
9416         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9417         * objfiles.c (get_objfile_bfd_data): Likewise.
9418         (objfile_register_static_link): Likewise.
9419         * psymtab.c (allocate_psymtab): Likewise.
9420         * stabsread.c (read_member_functions): Likewise.
9421         * xcoffread.c (xcoff_end_psymtab): Likewise.
9422
9423 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9424
9425         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9426         compiler supports std::is_trivially_constructible.
9427         * common/poison.h: Include obstack.h.
9428         (IsMallocable): Define to is_trivially_constructible if the
9429         compiler supports it, define to true_type otherwise.
9430         (xobnew): New.
9431         (XOBNEW): Redefine.
9432         (xobnewvec): New.
9433         (XOBNEWVEC): Redefine.
9434         * gdb_obstack.h (obstack_zalloc): New.
9435         (OBSTACK_ZALLOC): Redefine.
9436         (obstack_calloc): New.
9437         (OBSTACK_CALLOC): Redefine.
9438         (obstack_new): New.
9439         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9440         (gdbarch_obstack): New declaration in gdbarch.h, definition in
9441         gdbarch.c.
9442         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9443         obstack_calloc/obstack_zalloc.
9444         (gdbarch_obstack_zalloc): Remove.
9445         * target-descriptions.c (tdesc_data_init): Use obstack_new.
9446
9447 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9448
9449         * stack.c (backtrace_command_1): Remove useless variable int i.
9450
9451 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9452
9453         * stack.c (print_frame_info): Fix comment.
9454
9455 2018-05-18  Tom Tromey  <tom@tromey.com>
9456
9457         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9458         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9459         (~dwarf2_per_objfile): Update
9460         (dwarf2_get_dwz_file): Use new.
9461         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
9462         unique_ptr.
9463
9464 2018-05-18  Tom Tromey  <tom@tromey.com>
9465
9466         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
9467         unique_ptr.
9468         * dwarf2read.c (struct dwp_file): Add constructor and
9469         initializers.
9470         (open_and_init_dwp_file): Return a unique_ptr.
9471         (dwarf2_per_objfile, create_dwp_hash_table)
9472         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
9473         (lookup_dwo_unit_in_dwp): Update.
9474         (open_and_init_dwp_file, get_dwp_file): Update.
9475
9476 2018-05-18  Tom Tromey  <tom@tromey.com>
9477
9478         * dwarf2read.c (dwarf2_per_objfile): Update.
9479         (struct mapped_index): Add initializers.
9480         (dwarf2_read_index): Use new.
9481         (dw2_symtab_iter_init): Update.
9482         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
9483         unique_ptr.
9484
9485 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9486
9487         * dwarf2read.c (mapped_index) <total_size>: Remove.
9488
9489 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9490
9491         * unittests/format_pieces-selftests.c (test_format_specifier):
9492         Add ARI comments.
9493
9494 2018-05-18  Tom Tromey  <tom@tromey.com>
9495
9496         * c-typeprint.c (maybe_print_hole): New function.
9497         (c_print_type_struct_field_offset): Update.
9498         (c_type_print_base_struct_union): Call maybe_print_hole.
9499
9500 2018-05-17  Keith Seitz  <keiths@redhat.com>
9501
9502         * breakpoint.c (build_bpstat_chain): New function, moved from
9503         bpstat_stop_status.
9504         (bpstat_stop_status): Add optional parameter, `stop_chain'.
9505         If no stop chain is passed, call build_bpstat_chain to build it.
9506         * breakpoint.h (build_bpstat_chain): Declare.
9507         (bpstat_stop_status): Move documentation here from breakpoint.c.
9508         * infrun.c (handle_signal_stop): Before eliding inlined frames,
9509         build the stop chain and pass it to skip_inline_frames.
9510         Pass this stop chain to bpstat_stop_status.
9511         * inline-frame.c: Include breakpoint.h.
9512         (stopped_by_user_bp_inline_frame): New function.
9513         (skip_inline_frames): Add parameter `stop_chain'.
9514         Move documention to inline-frame.h.
9515         If non-NULL, use stopped_by_user_bp_inline_frame to determine
9516         whether the frame should be elided.
9517         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
9518         Add moved documentation and update for new parameter.
9519
9520 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9521
9522         PR cli/14975
9523         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9524         unittests/format_pieces-selftests.c.
9525         * common/format.h (format_piece) <operator==>: New.
9526         (format_pieces) <operator[]>: Remove.
9527         * common/format.c (format_pieces::format_pieces): Handle \e.
9528         * unittests/format_pieces-selftests.c: New.
9529
9530 2018-05-17  Tom Tromey  <tom@tromey.com>
9531
9532         PR symtab/23010:
9533         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
9534         (dw2_instantiate_symtab): Add skip_partial parameter.
9535         (dw2_find_last_source_symtab, dw2_map_expand_apply)
9536         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
9537         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
9538         (dw2_expand_symtabs_matching_one)
9539         (dw2_find_pc_sect_compunit_symtab)
9540         (dw2_debug_names_lookup_symbol)
9541         (dw2_debug_names_expand_symtabs_for_function): Update.
9542         (init_cutu_and_read_dies): Add skip_partial parameter.
9543         (process_psymtab_comp_unit, build_type_psymtabs_1)
9544         (process_skeletonless_type_unit, load_partial_comp_unit)
9545         (psymtab_to_symtab_1): Update.
9546         (load_full_comp_unit): Add skip_partial parameter.
9547         (process_imported_unit_die, dwarf2_read_addr_index)
9548         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
9549         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
9550         (read_signatured_type): Update.
9551
9552 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9553
9554         * value.c (release_value): Remove unused variable.
9555         (record_latest_value): Likewise.
9556         (access_value_history): Likewise.
9557         (preserve_values): Likewise.
9558
9559 2018-05-17  Tom Tromey  <tom@tromey.com>
9560
9561         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
9562         Initialize.
9563
9564 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
9565
9566         PR gdb/22286
9567         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
9568         Also handle registers whose width is not a multiple of
9569         PTRACE_TYPE_RET.
9570         (linux_nat_trad_target::store_register): Likewise.
9571
9572 2018-05-16  Tom Tromey  <tom@tromey.com>
9573
9574         * gdbcore.h (core_bfd): Redefine.
9575         * corelow.c (core_target::close): Update.
9576         (core_target_open): Update.
9577         * progspace.h (struct program_space) <cbfd>: Now a
9578         gdb_bfd_ref_ptr.
9579
9580 2018-05-16  Tom Tromey  <tom@tromey.com>
9581
9582         PR cli/19551:
9583         * symfile-add-flags.h (enum symfile_add_flags)
9584         <SYMFILE_NOT_FILENAME>: New constant.
9585         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
9586         objfile name from BFD.
9587         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
9588         * minidebug.c (find_separate_debug_file_in_section): Put
9589         ".gnu_debugdata" into BFD's file name.
9590
9591 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
9592
9593         * regcache.c (regcache_read_ftype, regcache_write_ftype):
9594         Remove.
9595
9596 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
9597
9598         PR binutils/21446
9599         * aarch64-tdep.c (aarch64_analyze_prologue,
9600         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
9601         Indicate not interested in errors.
9602
9603 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9604
9605         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
9606         Supply the MIPS_ZERO_REGNUM register.
9607
9608 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9609
9610         * mips-tdep.c (mask_address_var): Make variable static.
9611
9612 2018-05-14  Tom Tromey  <tom@tromey.com>
9613
9614         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
9615
9616 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
9617
9618         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
9619         FXSAVE_ADDR for the mxcsr register.
9620
9621 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
9622
9623         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
9624
9625 2018-05-11  Pedro Alves  <palves@redhat.com>
9626
9627         * corelow.c (core_target) <core_target>: No longer inline.
9628         Initialize m_core_gdbarch, m_core_vec and build the section table
9629         here.
9630         <~core_target>: New.
9631         <core_gdbarch, get_core_register_section>: New methods.
9632         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
9633         factored out from ...
9634         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
9635         (core_ops): Delete.
9636         (sniff_core_bfd): Add gdbarch parameter.
9637         (core_close): Delete, merged into ...
9638         (core_target::close): ... here.  Delete self.
9639         (core_close_cleanup): Delete.
9640         (core_target_open): Allocate a core_target on the heap.  Use a
9641         unique_ptr instead of a cleanup.  Bits moved into the core_target
9642         ctor.  Adjust to use core_target methods instead of globals.
9643         (get_core_register_section): Rename to ...
9644         (core_target::get_core_register_section): ... this and adjust.
9645         (struct get_core_registers_cb_data): New.
9646         (get_core_registers_cb): Use it.  Use bool.
9647         (core_target::fetch_registers, core_target::files_info)
9648         (core_target::xfer_partial, core_target::read_description)
9649         (core_target::pid_to, core_target::thread_name): Adjust to
9650         reference class fields instead of globals.
9651         * target.h (struct target_ops_deleter, target_ops_up): New.
9652
9653 2018-05-11  Pedro Alves  <palves@redhat.com>
9654
9655         * corefile.c (core_file_command): Move to corelow.c.
9656         * corelow.c (the_core_target): Delete.
9657         (core_file_command): Moved from corefile.c.  Check exec_bfd
9658         instead of the_core_target.  Use target_detach instead of calling
9659         into the_core_target directly.
9660         (maybe_say_no_core_file_now): New.
9661         (core_target::detach): Use it.
9662         (_initialize_corelow): Remove references to the_core_target.
9663         * gdbcore.h (the_core_target): Delete.
9664
9665 2018-05-11  Tom Tromey  <tromey@redhat.com>
9666             Pedro Alves  <palves@redhat.com>
9667
9668         * corefile.c (core_bfd): Remove.
9669         * gdbcore.h (core_bfd): Now a macro.
9670         * progspace.h (struct program_space) <cbfd>: New field.
9671
9672 2018-05-11  Tom Tromey  <tom@tromey.com>
9673
9674         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
9675         gdb::def_vector.
9676
9677 2018-05-10  Tom Tromey  <tom@tromey.com>
9678
9679         * configure: Rebuild.
9680         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
9681
9682 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
9683
9684         PR server/23158:
9685         * regformats/regdat.sh: Adjust script, following the addition
9686         of the new expedite_regs parameter to init_target_desc.
9687
9688 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
9689     
9690         PR gdb/23127
9691         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
9692         set_gdbarch_significant_addr_bit.
9693         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
9694         set_gdbarch_significant_addr_bit.
9695         * utils.c (address_significant): Update to sign extend addr.
9696
9697 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
9698
9699         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
9700         (xtensa_linux_init_abi): Limit tdep->num_regs by
9701         tdep->num_nopriv_regs.
9702         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
9703         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
9704         not initialized.
9705
9706 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
9707
9708         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
9709
9710 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
9711
9712         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
9713         (I387_MXCSR_INIT_VAL): New constant.
9714         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
9715         buffer if it was supplied by the inferior.
9716         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
9717         (i387_xsave_get_clear_bv): New function.
9718         (i387_supply_xsave): Only read x87 control registers from the
9719         xsave buffer if the feature is enabled, and the state will have
9720         been written, otherwise, provide a suitable default.
9721         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
9722         including x87 control registers.  Update control registers if they
9723         have changed from the default value, and mark features as enabled
9724         as required.
9725         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
9726
9727 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
9728
9729         * spu-tdep.c (info_spu_event_command): Fix output formatting.
9730
9731 2018-05-07  Tom Tromey  <tom@tromey.com>
9732
9733         * configure: Rebuild.
9734         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
9735
9736 2018-05-07  Tom Tromey  <tom@tromey.com>
9737
9738         PR tdep/20362:
9739         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9740         bit.  Use correct value for VDIV.
9741
9742 2018-05-04  Tom Tromey  <tom@tromey.com>
9743
9744         * configure: Rebuild.
9745         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9746
9747 2018-05-04  Tom Tromey  <tom@tromey.com>
9748
9749         * linux-record.c (record_linux_system_call) <case
9750         RECORD_SYS_RECVFROM>: Add "break".
9751
9752 2018-05-04  Tom Tromey  <tom@tromey.com>
9753
9754         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9755         Add missing "break".
9756         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9757         Add missing "break".
9758
9759 2018-05-04  Tom Tromey  <tom@tromey.com>
9760
9761         * rs6000-tdep.c (ppc_process_record_op4)
9762         (ppc_process_record_op63): Add fall-through comment.
9763
9764 2018-05-04  Tom Tromey  <tom@tromey.com>
9765
9766         * i386-tdep.c (i386_process_record): Add fall-through comment.
9767
9768 2018-05-04  Tom Tromey  <tom@tromey.com>
9769
9770         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9771         comment.
9772
9773 2018-05-04  Tom Tromey  <tom@tromey.com>
9774
9775         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9776         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9777         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9778         comment.
9779         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9780         comment.
9781         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9782         comment.
9783
9784 2018-05-04  Tom Tromey  <tom@tromey.com>
9785
9786         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9787
9788 2018-05-04  Tom Tromey  <tom@tromey.com>
9789
9790         * s390-tdep.c (s390_process_record): Fix fall-through comments.
9791         * xcoffread.c (scan_xcoff_symtab): Move comment later.
9792         * symfile.c (section_is_mapped): Fix fall-through comment.
9793         * stabsread.c (define_symbol, read_member_functions): Fix
9794         fall-through comment.
9795         * s390-linux-tdep.c (s390_process_record): Fix fall-through
9796         comment.
9797         * remote.c (remote_wait_as): Fix fall-through comment.
9798         * p-exp.y (yylex): Fix fall-through comment.
9799         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9800         comment.
9801         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9802         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9803         * jv-exp.y (yylex): Fix fall-through comment.
9804         * go-exp.y (lex_one_token): Fix fall-through comment.
9805         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9806         fall-through comment.
9807         * f-exp.y (yylex): Fix fall-through comment.
9808         * dwarf2read.c (process_die): Fix fall-through comments.
9809         * dbxread.c (process_one_symbol): Fix fall-through comment.
9810         * d-exp.y (lex_one_token): Fix fall-through comment.
9811         * cp-name-parser.y (yylex): Fix fall-through comment.
9812         * coffread.c (coff_symtab_read): Fix fall-through comment.
9813         * c-exp.y (lex_one_token): Fix fall-through comment.
9814         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9815         comment.
9816         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9817         comment.
9818
9819 2018-05-04  Tom Tromey  <tom@tromey.com>
9820
9821         PR python/22730:
9822         * NEWS: Mention gdb.execute change.
9823         * gdbcmd.h (execute_control_command): Don't declare.
9824         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9825         execute_control_commands, execute_control_commands_to_string.
9826         * cli/cli-script.h (execute_control_commands)
9827         (execute_control_commands_to_string): Declare.
9828         (execute_control_command): Add from_tty parameter.
9829         * cli/cli-script.c (execute_control_commands)
9830         (execute_control_commands_to_string): New functions.
9831         (execute_user_command): Use execute_control_commands.
9832         (execute_control_command_1): Add "from_tty" parameter.  Update.
9833         (execute_control_command): Likewise.
9834
9835 2018-05-04  Tom Tromey  <tom@tromey.com>
9836
9837         PR python/22731:
9838         * NEWS: Mention that breakpoint commands are writable.
9839         * python/py-breakpoint.c (bppy_set_commands): New function.
9840         (breakpoint_object_getset) <"commands">: Use it.
9841
9842 2018-05-04  Tom Tromey  <tom@tromey.com>
9843
9844         * tracepoint.c (actions_command): Update.
9845         * mi/mi-cmd-break.c (mi_command_line_array)
9846         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9847         (mi_read_next_line): Remove.
9848         (mi_cmd_break_commands): Update.
9849         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9850         function_view.
9851         * cli/cli-script.c (get_command_line): Update.
9852         (process_next_line): Use function_view.  Constify.
9853         (recurse_read_control_structure, read_command_lines)
9854         (read_command_lines_1): Change argument types to function_view.
9855         (do_define_command, document_command): Update.
9856         * breakpoint.h (check_tracepoint_command): Don't declare.
9857         * breakpoint.c (check_tracepoint_command): Remove.
9858         (commands_command_1, create_tracepoint_from_upload): Update.
9859
9860 2018-05-04  Tom Tromey  <tom@tromey.com>
9861
9862         PR gdb/11750:
9863         * cli/cli-script.h (enum command_control_type) <define_control>:
9864         New constant.
9865         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9866         (build_command_line, execute_control_command_1)
9867         (process_next_line): Likewise.
9868         (do_define_command): New function, extracted from define_command.
9869         (define_command): Use it.
9870
9871 2018-05-04  Tom Tromey  <tom@tromey.com>
9872
9873         * tracepoint.c (actions_command): Update.
9874         * cli/cli-script.h (read_command_lines): Update.
9875         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9876         (MAX_TMPBUF): Remove define.
9877         (define_command): Use string_printf.
9878         (document_command): Likewise.
9879         * breakpoint.c (commands_command_1): Update.
9880
9881 2018-05-04  Tom Tromey  <tom@tromey.com>
9882
9883         * top.c (execute_command): Update.
9884         * cli/cli-script.h (print_command_lines): Now varargs.
9885         * cli/cli-script.c (print_command_lines): Now varargs.
9886         (execute_control_command_1) <case while_control, case if_control>:
9887         Update.
9888
9889 2018-05-04  Tom Tromey  <tom@tromey.com>
9890
9891         * tracepoint.c (all_tracepoint_actions): Rename from
9892         all_tracepoint_actions_and_cleanup.  Change return type.
9893         (actions_command, encode_actions_1, encode_actions)
9894         (trace_dump_actions, tdump_command): Update.
9895         * remote.c (remote_download_command_source): Update.
9896         * python/python.c (gdbpy_eval_from_control_command)
9897         (python_command, python_interactive_command): Update.
9898         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9899         * guile/guile.c (guile_command)
9900         (gdbscm_eval_from_control_command, guile_command): Update.
9901         * compile/compile.c (compile_code_command)
9902         (compile_print_command, compile_to_object): Update.
9903         * cli/cli-script.h (struct command_lines_deleter): New.
9904         (counted_command_line): New typedef.
9905         (struct command_line): Add constructor, destructor.
9906         <body_list>: Remove.
9907         <body_list_0, body_list_1>: New members.
9908         (command_line_up): Remove typedef.
9909         (read_command_lines, read_command_lines_1, get_command_line):
9910         Update.
9911         (copy_command_lines): Don't declare.
9912         * cli/cli-script.c (build_command_line): Use "new".
9913         (get_command_line): Return counted_command_line.
9914         (print_command_lines, execute_user_command)
9915         (execute_control_command_1, while_command, if_command): Update.
9916         (realloc_body_list): Remove.
9917         (process_next_line, recurse_read_control_structure): Update.
9918         (read_command_lines, read_command_lines_1): Return counted_command_line.
9919         (free_command_lines): Use "delete".
9920         (copy_command_lines): Remove.
9921         (define_command, document_command, show_user_1): Update.
9922         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9923         a counted_command_line.
9924         * breakpoint.h (counted_command_line): Remove typedef.
9925         (breakpoint_set_commands): Update.
9926         * breakpoint.c (check_no_tracepoint_commands)
9927         (validate_commands_for_breakpoint): Update.
9928         (breakpoint_set_commands): Change commands to be a
9929         counted_command_line.
9930         (commands_command_1, update_dprintf_command_list)
9931         (create_tracepoint_from_upload): Update.
9932
9933 2018-05-04  Tom Tromey  <tom@tromey.com>
9934
9935         * cli/cli-decode.h (cmd_list_element): New constructor.
9936         (~cmd_list_element): New destructor.
9937         (struct cmd_list_element): Add initializers.
9938         * cli/cli-decode.c (do_add_cmd): Use "new".
9939         (delete_cmd): Use "delete".
9940
9941 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9942             Pedro Alves <palves@redhat.com>
9943
9944         PR breakpoints/19806 and support for PR external/20207.
9945         * NEWS: Mention Aarch64 watchpoint improvements.
9946         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9947         watchpoints and PR external/20207 watchpoints.
9948         * nat/aarch64-linux-hw-point.c
9949         (kernel_supports_any_contiguous_range): New.
9950         (aarch64_watchpoint_offset): New.
9951         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9952         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9953         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9954         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9955         next_addr_orig_p.  Support PR external/20207 watchpoints.
9956         (aarch64_downgrade_regs): New.
9957         (aarch64_dr_state_insert_one_point): New parameters offset and
9958         addr_orig.
9959         (aarch64_dr_state_remove_one_point): Likewise.
9960         (aarch64_handle_breakpoint): Update caller.
9961         (aarch64_handle_aligned_watchpoint): Likewise.
9962         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9963         aligned_offset.
9964         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9965         aarch64_downgrade_regs.
9966         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9967         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9968         (DR_CONTROL_MASK): ... this.
9969         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9970         (unsigned int aarch64_watchpoint_offset): New prototype.
9971         (aarch64_linux_set_debug_regs): Remove const from state.
9972         * utils.c (align_up, align_down): Move to ...
9973         * common/common-utils.c (align_up, align_down): ... here.
9974         * utils.h (align_up, align_down): Move to ...
9975         * common/common-utils.h (align_up, align_down): ... here.
9976
9977 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9978
9979         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9980         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9981         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9982         Re-implement to match the ABI as summarized in GCC's
9983         gcc/config/sparc/sparc.c.  All callers updated.
9984         (sparc32_store_arguments): Remove assertion.
9985
9986 2018-05-04  Tom Tromey  <tom@tromey.com>
9987
9988         * printcmd.c: Don't include tui.h.
9989         (decode_format): Use skip_spaces.
9990
9991 2018-05-04  Tom Tromey  <tom@tromey.com>
9992
9993         PR gdb/22619:
9994         * printcmd.c (last_count): New global.
9995         (x_command): Use saved count when repeating.
9996
9997 2018-05-04  Tom Tromey  <tom@tromey.com>
9998
9999         * nto-procfs.c (do_closedir_cleanup): Remove.
10000         (procfs_pidlist): Use gdb_dir_up.
10001         * procfs.c (do_closedir_cleanup): Remove.
10002         (proc_update_threads): Use gdb_dir_up.
10003         * common/filestuff.h (struct gdb_dir_deleter): New.
10004         (gdb_dir_up): New typedef.
10005
10006 2018-05-04  Tom Tromey  <tom@tromey.com>
10007
10008         * ada-lang.c (print_mention_exception): Use std::string.
10009
10010 2018-05-04  Tom Tromey  <tom@tromey.com>
10011
10012         * ada-lang.c (create_excep_cond_exprs): Update.
10013         (ada_exception_catchpoint_cond_string): Use std::string.
10014
10015 2018-05-04  Tom Tromey  <tom@tromey.com>
10016
10017         * ada-lang.c (xget_renaming_scope): Return std::string.
10018         (old_renaming_is_invisible): Update.
10019
10020 2018-05-04  Tom Tromey  <tom@tromey.com>
10021
10022         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10023         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10024
10025 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10026
10027         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10028
10029 2018-05-04  Tom Tromey  <tom@tromey.com>
10030
10031         * remote.c (remote_query_supported_append): Change type.
10032         (remote_check_symbols): Update.
10033
10034 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10035
10036         PR gdb/11420
10037         * configure.ac: Prepend libpython.
10038         * python/python-config.py: Likewise.
10039         * configure: Regenerate.
10040
10041 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10042
10043         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10044
10045 2018-05-03  Pedro Alves  <palves@redhat.com>
10046
10047         * s390-linux-nat.c
10048         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10049         override.  Write 'true' instead of '1'.
10050         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10051         declaration.
10052
10053 2018-05-02  Pedro Alves  <palves@redhat.com>
10054
10055         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10056         add_inf_child_target.
10057         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10058         add_inf_child_target.
10059         * aix-thread.c (aix_thread_target_info): New.
10060         (aix_thread_target) <shortname, longname, doc>: Delete.
10061         <info>: New.
10062         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10063         add_inf_child_target.
10064         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10065         add_inf_child_target.
10066         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10067         add_inf_child_target.
10068         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10069         add_inf_child_target.
10070         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10071         add_inf_child_target.
10072         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10073         add_inf_child_target.
10074         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10075         add_inf_child_target.
10076         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10077         add_inf_child_target.
10078         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10079         add_inf_child_target.
10080         * bfd-target.c (target_bfd_target_info): New.
10081         (target_bfd) <shortname, longname, doc>: Delete.
10082         <info>: New.
10083         * bsd-kvm.c (bsd_kvm_target_info): New.
10084         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10085         <info>: New.
10086         (bsd_kvm_target::open): Rename to ...
10087         (bsd_kvm_target_open): ... this.  Adjust.
10088         * bsd-uthread.c (bsd_uthread_target_info): New.
10089         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10090         <info>: New.
10091         * corefile.c (core_file_command): Adjust.
10092         * corelow.c (core_target_info): New.
10093         (core_target) <shortname, longname, doc>: Delete.
10094         <info>: New.
10095         (core_target::open): Rename to ...
10096         (core_target_open): ... this.  Adjust.
10097         * ctf.c (ctf_target_info): New.
10098         (ctf_target) <shortname, longname, doc>: Delete.
10099         <info>: New.
10100         (ctf_target::open): Rename to ...
10101         (ctf_target_open): ... this.
10102         (_initialize_ctf): Adjust.
10103         * exec.c (exec_target_info): New.
10104         (exec_target) <shortname, longname, doc>: Delete.
10105         <info>: New.
10106         (exec_target::open): Rename to ...
10107         (exec_target_open): ... this.
10108         * gdbcore.h (core_target_open): Declare.
10109         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10110         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10111         add_inf_child_target.
10112         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10113         add_inf_child_target.
10114         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10115         add_inf_child_target.
10116         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10117         add_inf_child_target.
10118         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10119         add_inf_child_target.
10120         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10121         add_inf_child_target.
10122         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10123         add_inf_child_target.
10124         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10125         add_inf_child_target.
10126         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10127         add_inf_child_target.
10128         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10129         add_inf_child_target.
10130         * inf-child.c (inf_child_target_info): New.
10131         (inf_child_target::info): New.
10132         (inf_child_open_target): Remove 'target' parameter.  Use
10133         get_native_target instead.
10134         (inf_child_target::open): Delete.
10135         (add_inf_child_target): New.
10136         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10137         Delete.
10138         <info>: New.
10139         (add_inf_child_target): Declare.
10140         (inf_child_open_target): Declare.
10141         * linux-thread-db.c (thread_db_target_info): New.
10142         (thread_db_target) <shortname, longname, doc>: Delete.
10143         <info>: New.
10144         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10145         add_inf_child_target.
10146         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10147         add_inf_child_target.
10148         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10149         add_inf_child_target.
10150         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10151         add_inf_child_target.
10152         * make-target-delegates (print_class): Adjust.
10153         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10154         add_inf_child_target.
10155         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10156         add_inf_child_target.
10157         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10158         add_inf_child_target.
10159         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10160         add_inf_child_target.
10161         * nto-procfs.c (nto_native_target_info): New.
10162         (nto_procfs_target_native) <shortname, longname, doc>:
10163         Delete.
10164         <info>: New.
10165         (nto_procfs_target_info): New.
10166         (nto_procfs_target_procfs) <shortname, longname, doc>:
10167         Delete.
10168         <info>: New.
10169         (init_procfs_targets): Adjust.
10170         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10171         add_inf_child_target.
10172         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10173         add_inf_child_target.
10174         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10175         add_inf_child_target.
10176         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10177         add_inf_child_target.
10178         * ravenscar-thread.c (ravenscar_target_info): New.
10179         (ravenscar_thread_target) <shortname, longname, doc>:
10180         Delete.
10181         <info>: New.
10182         * record-btrace.c (record_btrace_target_info):
10183         (record_btrace_target) <shortname, longname, doc>: Delete.
10184         <info>: New.
10185         (record_btrace_target::open): Rename to ...
10186         (record_btrace_target_open): ... this.  Adjust.
10187         * record-full.c (record_longname, record_doc): New.
10188         (record_full_base_target) <shortname, longname, doc>: Delete.
10189         <info>: New.
10190         (record_full_target_info): New.
10191         (record_full_target): <shortname>: Delete.
10192         <info>: New.
10193         (record_full_core_open_1, record_full_open_1): Update comments.
10194         (record_full_base_target::open): Rename to ...
10195         (record_full_open): ... this.
10196         (cmd_record_full_restore): Update.
10197         (_initialize_record_full): Update.
10198         * remote-sim.c (remote_sim_target_info): New.
10199         (gdbsim_target) <shortname, longname, doc>: Delete.
10200         <info>: New.
10201         (gdbsim_target::open): Rename to ...
10202         (gdbsim_target_open): ... this.
10203         (_initialize_remote_sim): Adjust.
10204         * remote.c (remote_doc): New.
10205         (remote_target_info): New.
10206         (remote_target) <shortname, longname, doc>: Delete.
10207         <info>: New.
10208         (extended_remote_target_info): New.
10209         (extended_remote_target) <shortname, longname, doc>: Delete.
10210         <info>: New.
10211         (remote_target::open_1): Make static.  Adjust.
10212         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10213         * s390-linux-nat.c (_initialize_s390_nat): Use
10214         add_inf_child_target.
10215         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10216         add_inf_child_target.
10217         * sol-thread.c (thread_db_target_info): New.
10218         (sol_thread_target) <shortname, longname, doc>: Delete.
10219         <info>: New.
10220         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10221         add_inf_child_target.
10222         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10223         add_inf_child_target.
10224         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10225         add_inf_child_target.
10226         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10227         add_inf_child_target.
10228         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10229         add_inf_child_target.
10230         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10231         add_inf_child_target.
10232         * spu-linux-nat.c (_initialize_spu_nat): Use
10233         add_inf_child_target.
10234         * spu-multiarch.c (spu_multiarch_target_info): New.
10235         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10236         <info>: New.
10237         * target-delegates.c: Regenerate.
10238         * target.c: Include <unordered_map>.
10239         (target_ops_p): Delete.
10240         (DEF_VEC_P(target_ops_p)): Delete.
10241         (target_factories): New.
10242         (test_target_info): New.
10243         (test_target_ops::info): New.
10244         (open_target): Adjust to use target_factories.
10245         (add_target_with_completer): Rename to ...
10246         (add_target): ... this.  Change prototype.  Register target_info
10247         and open callback in target_factories.  Register target_info in
10248         command context instead of target_ops.
10249         (add_target): Delete old implementation.
10250         (add_deprecated_target_alias): Change prototype.  Adjust.
10251         (the_native_target): New.
10252         (set_native_target, get_native_target): New.
10253         (find_default_run_target): Use the_native_target.
10254         (find_attach_target, find_run_target): Simplify.
10255         (target_ops::open): Delete.
10256         (dummy_target_info): New.
10257         (dummy_target::shortname, dummy_target::longname)
10258         (dummy_target::doc): Delete.
10259         (dummy_target::info): New.
10260         (debug_target::shortname, debug_target::longname)
10261         (debug_target::doc): Delete.
10262         (debug_target::info): New.
10263         * target.h (struct target_info): New.
10264         (target_ops::~target_ops): Add comment.
10265         (target_ops::info): New.
10266         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10267         longer virtual.  Implement in terms of target_info.
10268         (set_native_target, get_native_target): Declare.
10269         (target_open_ftype): New.
10270         (add_target, add_target_with_completer)
10271         (add_deprecated_target_alias): Change prototype.
10272         (test_target) <shortname, longname, doc>: Delete.
10273         <info>: New.
10274         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10275         add_inf_child_target.
10276         * tracefile-tfile.c (tfile_target_info): New.
10277         (tfile_target) <shortname, longname, doc>: Delete.
10278         <info>: New.
10279         (tfile_target::open): Rename to ...
10280         (tfile_target_open): ... this.
10281         (_initialize_tracefile_tfile): Adjust.
10282         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10283         add_inf_child_target.
10284         * windows-nat.c (_initialize_windows_nat): Use
10285         add_inf_child_target.
10286         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10287         add_inf_child_target.
10288
10289 2018-05-02  Pedro Alves  <palves@redhat.com>
10290
10291         * linux-nat.h (linux_nat_target) <low_new_thread,
10292         low_delete_thread, low_new_fork, low_forget_process,
10293         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10294         New virtual methods.
10295         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10296         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10297         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10298         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10299         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10300         Delete.
10301         * linux-fork.c (delete_fork): Adjust to call low method.
10302         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10303         (linux_nat_new_fork, linux_nat_forget_process_hook)
10304         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10305         (linux_nat_status_is_event):
10306         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10307         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10308         to call low method.
10309         (sigtrap_is_event): Rename to ...
10310         (linux_nat_target::low_status_is_event): ... this.
10311         (linux_nat_set_status_is_event): Delete.
10312         (save_stop_reason, linux_nat_wait_1)
10313         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10314         low methods.
10315         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10316         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10317         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10318         (linux_nat_set_prepare_to_resume): Delete.
10319         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10320         low virtual methods.
10321         * amd64-linux-nat.c: Likewise.
10322         * arm-linux-nat.c: Likewise.
10323         * i386-linux-nat.c: Likewise.
10324         * ia64-linux-nat.c: Likewise.
10325         * mips-linux-nat.c: Likewise.
10326         * ppc-linux-nat.c: Likewise.
10327         * s390-linux-nat.c: Likewise.
10328         * sparc64-linux-nat.c: Likewise.
10329         * x86-linux-nat.c: Likewise.
10330         * x86-linux-nat.h: Include "nat/x86-linux.h".
10331         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10332         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10333         Override methods.
10334
10335 2018-05-02  Pedro Alves  <palves@redhat.com>
10336
10337         * target.h (target_ops)
10338         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10339         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10340         stopped_by_watchpoint, have_continuable_watchpoint,
10341         stopped_data_address, watchpoint_addr_within_range,
10342         can_accel_watchpoint_condition, can_run, thread_alive,
10343         has_all_memory, has_memory, has_stack, has_registers,
10344         has_execution, can_async_p, is_async_p, supports_non_stop,
10345         always_non_stop_p, can_execute_reverse, supports_multi_process,
10346         supports_enable_disable_tracepoint,
10347         supports_disable_randomization, supports_string_tracing,
10348         supports_evaluation_of_breakpoint_conditions,
10349         can_run_breakpoint_commands, filesystem_is_local,
10350         can_download_tracepoint, get_trace_state_variable_value,
10351         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10352         record_is_replaying, record_will_replay,
10353         augmented_libraries_svr4_read>: Adjust to return bool.
10354         * aarch64-linux-nat.c: All implementations adjusted.
10355         * aix-thread.c: All implementations adjusted.
10356         * arm-linux-nat.c: All implementations adjusted.
10357         * breakpoint.c: All implementations adjusted.
10358         * bsd-kvm.c: All implementations adjusted.
10359         * bsd-uthread.c: All implementations adjusted.
10360         * corelow.c: All implementations adjusted.
10361         * ctf.c: All implementations adjusted.
10362         * darwin-nat.c: All implementations adjusted.
10363         * darwin-nat.h: All implementations adjusted.
10364         * exec.c: All implementations adjusted.
10365         * fbsd-nat.c: All implementations adjusted.
10366         * fbsd-nat.h: All implementations adjusted.
10367         * gnu-nat.c: All implementations adjusted.
10368         * gnu-nat.h: All implementations adjusted.
10369         * go32-nat.c: All implementations adjusted.
10370         * ia64-linux-nat.c: All implementations adjusted.
10371         * inf-child.c: All implementations adjusted.
10372         * inf-child.h: All implementations adjusted.
10373         * inf-ptrace.c: All implementations adjusted.
10374         * inf-ptrace.h: All implementations adjusted.
10375         * linux-nat.c: All implementations adjusted.
10376         * linux-nat.h: All implementations adjusted.
10377         * mips-linux-nat.c: All implementations adjusted.
10378         * nto-procfs.c: All implementations adjusted.
10379         * ppc-linux-nat.c: All implementations adjusted.
10380         * procfs.c: All implementations adjusted.
10381         * ravenscar-thread.c: All implementations adjusted.
10382         * record-btrace.c: All implementations adjusted.
10383         * record-full.c: All implementations adjusted.
10384         * remote-sim.c: All implementations adjusted.
10385         * remote.c: All implementations adjusted.
10386         * s390-linux-nat.c: All implementations adjusted.
10387         * sol-thread.c: All implementations adjusted.
10388         * spu-multiarch.c: All implementations adjusted.
10389         * target-delegates.c: All implementations adjusted.
10390         * target.c: All implementations adjusted.
10391         * target.h: All implementations adjusted.
10392         * tracefile-tfile.c: All implementations adjusted.
10393         * tracefile.c: All implementations adjusted.
10394         * tracefile.h: All implementations adjusted.
10395         * windows-nat.c: All implementations adjusted.
10396         * x86-linux-nat.h: All implementations adjusted.
10397         * x86-nat.h: All implementations adjusted.
10398
10399 2018-05-02  Pedro Alves  <palves@redhat.com>
10400
10401         * make-target-delegates (scan_target_h): Don't trim lines here.
10402         Replace sequences of tabs and/or whitespace with a single
10403         whitespace.
10404         (top level, parsing methods): Trim each line before processing it
10405         here.
10406
10407 2018-05-02  Pedro Alves  <palves@redhat.com>
10408             John Baldwin  <jhb@freebsd.org>
10409
10410         * target.h (enum strata) <debug_stratum>: New.
10411         (struct target_ops) <all delegation methods>: Replace by C++
10412         virtual methods, and drop "to_" prefix.  All references updated
10413         throughout.
10414         <to_shortname, to_longname, to_doc, to_data,
10415         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10416         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10417         virtual methods.  All references updated throughout.
10418         <can_attach, supports_terminal_ours, can_create_inferior,
10419         get_thread_control_capabilities, attach_no_wait>: New
10420         virtual methods.
10421         <insert_breakpoint, remove_breakpoint>: Now
10422         TARGET_DEFAULT_NORETURN methods.
10423         <info_proc>: Now returns bool.
10424         <to_magic>: Delete.
10425         (OPS_MAGIC): Delete.
10426         (current_target): Delete.  All references replaced by references
10427         to ...
10428         (target_stack): ... this.  New.
10429         (target_shortname, target_longname): Adjust.
10430         (target_can_run): Now a function declaration.
10431         (default_child_has_all_memory, default_child_has_memory)
10432         (default_child_has_stack, default_child_has_registers)
10433         (default_child_has_execution): Remove target_ops parameter.
10434         (complete_target_initialization): Delete.
10435         (memory_breakpoint_target): New template class.
10436         (test_target_ops): Refactor as a C++ class with virtual methods.
10437         * make-target-delegates (NAME_PART): Tighten.
10438         (POINTER_PART, CP_SYMBOL): New.
10439         (SIMPLE_RETURN_PART): Reimplement.
10440         (VEC_RETURN_PART): Expect less.
10441         (RETURN_PART, VIRTUAL_PART): New.
10442         (METHOD): Adjust to C++ virtual methods.
10443         (scan_target_h): Remove reference to C99.
10444         (dname): Output "target_ops::" prefix.
10445         (write_function_header): Adjust to output a C++ class method.
10446         (write_declaration): New.
10447         (write_delegator): Adjust to output a C++ class method.
10448         (tdname): Output "dummy_target::" prefix.
10449         (write_tdefault, write_debugmethod): Adjust to output a C++ class
10450         method.
10451         (tdefault_names, debug_names): Delete.
10452         (return_types, tdefaults, styles, argtypes_array): New.
10453         (top level): All methods are delegators.
10454         (print_class): New.
10455         (top level): Print dummy_target and debug_target classes.
10456         * target-delegates.c: Regenerate.
10457         * target-debug.h (target_debug_print_enum_info_proc_what)
10458         (target_debug_print_thread_control_capabilities)
10459         (target_debug_print_thread_info_p): New.
10460         * target.c (dummy_target): Delete.
10461         (the_dummy_target, the_debug_target): New.
10462         (target_stack): Now extern.
10463         (set_targetdebug): Push/unpush debug target.
10464         (default_child_has_all_memory, default_child_has_memory)
10465         (default_child_has_stack, default_child_has_registers)
10466         (default_child_has_execution): Remove target_ops parameter.
10467         (complete_target_initialization): Delete.
10468         (add_target_with_completer): No longer call
10469         complete_target_initialization.
10470         (target_supports_terminal_ours): Use regular delegation.
10471         (update_current_target): Delete.
10472         (push_target): No longer check magic number.  Don't call
10473         update_current_target.
10474         (unpush_target): Don't call update_current_target.
10475         (target_is_pushed): No longer check magic number.
10476         (target_require_runnable): Skip for all stratums over
10477         process_stratum.
10478         (target_ops::info_proc): New.
10479         (target_info_proc): Use find_target_at and
10480         find_default_run_target.
10481         (target_supports_disable_randomization): Use regular delegation.
10482         (target_get_osdata): Use find_target_at.
10483         (target_ops::open, target_ops::close, target_ops::can_attach)
10484         (target_ops::attach, target_ops::can_create_inferior)
10485         (target_ops::create_inferior, target_ops::can_run)
10486         (target_can_run): New.
10487         (default_fileio_target): Use regular delegation.
10488         (target_ops::fileio_open, target_ops::fileio_pwrite)
10489         (target_ops::fileio_pread, target_ops::fileio_fstat)
10490         (target_ops::fileio_close, target_ops::fileio_unlink)
10491         (target_ops::fileio_readlink): New.
10492         (target_fileio_open_1, target_fileio_unlink)
10493         (target_fileio_readlink): Always call the target method.  Handle
10494         FILEIO_ENOSYS.
10495         (return_zero, return_zero_has_execution): Delete.
10496         (init_dummy_target): Delete.
10497         (dummy_target::dummy_target, dummy_target::shortname)
10498         (dummy_target::longname, dummy_target::doc)
10499         (debug_target::debug_target, debug_target::shortname)
10500         (debug_target::longname, debug_target::doc): New.
10501         (target_supports_delete_record): Use regular delegation.
10502         (setup_target_debug): Delete.
10503         (maintenance_print_target_stack): Skip debug_stratum.
10504         (initialize_targets): Instantiate the_dummy_target and
10505         the_debug_target.
10506         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
10507         use target_stack.
10508         (target_auxv_search, fprint_target_auxv): Adjust.
10509         (info_auxv_command): Adjust to use target_stack.
10510         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
10511         * exceptions.c (print_flush): Handle a NULL target_stack.
10512         * regcache.c (target_ops_no_register): Refactor as class with
10513         virtual methods.
10514
10515         * exec.c (exec_target): New class.
10516         (exec_ops): Now an exec_target.
10517         (exec_open, exec_close_1, exec_get_section_table)
10518         (exec_xfer_partial, exec_files_info, exec_has_memory)
10519         (exec_make_note_section): Refactor as exec_target methods.
10520         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
10521         Delete.
10522         (exec_target::find_memory_regions): New.
10523         (_initialize_exec): Don't call init_exec_ops.
10524         * gdbcore.h (exec_file_clear): Delete.
10525
10526         * corefile.c (core_target): Delete.
10527         (core_file_command): Adjust.
10528         * corelow.c (core_target): New class.
10529         (the_core_target): New.
10530         (core_close): Remove target_ops parameter.
10531         (core_close_cleanup): Adjust.
10532         (core_target::close): New.
10533         (core_open, core_detach, get_core_registers, core_files_info)
10534         (core_xfer_partial, core_thread_alive, core_read_description)
10535         (core_pid_to_str, core_thread_name, core_has_memory)
10536         (core_has_stack, core_has_registers, core_info_proc): Rework as
10537         core_target methods.
10538         (ignore, core_remove_breakpoint, init_core_ops): Delete.
10539         (_initialize_corelow): Initialize the_core_target.
10540         * gdbcore.h (core_target): Delete.
10541         (the_core_target): New.
10542
10543         * ctf.c: (ctf_target): New class.
10544         (ctf_ops): Now a ctf_target.
10545         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
10546         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
10547         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
10548         methods.
10549         (init_ctf_ops): Delete.
10550         (_initialize_ctf): Don't call it.
10551         * tracefile-tfile.c (tfile_target): New class.
10552         (tfile_ops): Now a tfile_target.
10553         (tfile_open, tfile_close, tfile_files_info)
10554         (tfile_get_tracepoint_status, tfile_trace_find)
10555         (tfile_fetch_registers, tfile_xfer_partial)
10556         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
10557         Refactor as tfile_target methods.
10558         (tfile_xfer_partial_features): Remove target_ops parameter.
10559         (init_tfile_ops): Delete.
10560         (_initialize_tracefile_tfile): Don't call it.
10561         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
10562         (tracefile_has_stack, tracefile_has_registers)
10563         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
10564         tracefile_target methods.
10565         (init_tracefile_ops): Delete.
10566         (tracefile_target::tracefile_target): New.
10567         * tracefile.h: Include "target.h".
10568         (tracefile_target): New class.
10569         (init_tracefile_ops): Delete.
10570
10571         * spu-multiarch.c (spu_multiarch_target): New class.
10572         (spu_ops): Now a spu_multiarch_target.
10573         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
10574         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
10575         (spu_search_memory, spu_mourn_inferior): Refactor as
10576         spu_multiarch_target methods.
10577         (init_spu_ops): Delete.
10578         (_initialize_spu_multiarch): Remove references to init_spu_ops,
10579         complete_target_initialization.
10580
10581         * ravenscar-thread.c (ravenscar_thread_target): New class.
10582         (ravenscar_ops): Now a ravenscar_thread_target.
10583         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
10584         (ravenscar_thread_alive, ravenscar_pid_to_str)
10585         (ravenscar_fetch_registers, ravenscar_store_registers)
10586         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
10587         (ravenscar_stopped_by_hw_breakpoint)
10588         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
10589         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
10590         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
10591         methods.
10592         (init_ravenscar_thread_ops): Delete.
10593         (_initialize_ravenscar): Remove references to
10594         init_ravenscar_thread_ops and complete_target_initialization.
10595
10596         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
10597         (bsd_uthread_target): New class.
10598         (bsd_uthread_ops): Now a bsd_uthread_target.
10599         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
10600         (bsd_uthread_close, bsd_uthread_mourn_inferior)
10601         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
10602         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
10603         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
10604         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
10605         (bsd_uthread_target): Delete function.
10606         (_initialize_bsd_uthread): Remove reference to
10607         complete_target_initialization.
10608
10609         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
10610         (target_bfd): ... this new class.
10611         (target_bfd_xfer_partial, target_bfd_get_section_table)
10612         (target_bfd_close): Refactor as target_bfd methods.
10613         (target_bfd::~target_bfd): New.
10614         (target_bfd_reopen): Adjust.
10615         (target_bfd::close): New.
10616
10617         * record-btrace.c (record_btrace_target): New class.
10618         (record_btrace_ops): Now a record_btrace_target.
10619         (record_btrace_open, record_btrace_stop_recording)
10620         (record_btrace_disconnect, record_btrace_close)
10621         (record_btrace_async, record_btrace_info)
10622         (record_btrace_insn_history, record_btrace_insn_history_range)
10623         (record_btrace_insn_history_from, record_btrace_call_history)
10624         (record_btrace_call_history_range)
10625         (record_btrace_call_history_from, record_btrace_record_method)
10626         (record_btrace_is_replaying, record_btrace_will_replay)
10627         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
10628         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
10629         (record_btrace_store_registers, record_btrace_prepare_to_store)
10630         (record_btrace_to_get_unwinder)
10631         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
10632         (record_btrace_commit_resume, record_btrace_wait)
10633         (record_btrace_stop, record_btrace_can_execute_reverse)
10634         (record_btrace_stopped_by_sw_breakpoint)
10635         (record_btrace_supports_stopped_by_sw_breakpoint)
10636         (record_btrace_stopped_by_hw_breakpoint)
10637         (record_btrace_supports_stopped_by_hw_breakpoint)
10638         (record_btrace_update_thread_list, record_btrace_thread_alive)
10639         (record_btrace_goto_begin, record_btrace_goto_end)
10640         (record_btrace_goto, record_btrace_stop_replaying_all)
10641         (record_btrace_execution_direction)
10642         (record_btrace_prepare_to_generate_core)
10643         (record_btrace_done_generating_core): Refactor as
10644         record_btrace_target methods.
10645         (init_record_btrace_ops): Delete.
10646         (_initialize_record_btrace): Remove reference to
10647         init_record_btrace_ops.
10648         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
10649         the execution_direction global.
10650         (record_full_base_target, record_full_target)
10651         (record_full_core_target): New classes.
10652         (record_full_ops): Now a record_full_target.
10653         (record_full_core_ops): Now a record_full_core_target.
10654         (record_full_target::detach, record_full_target::disconnect)
10655         (record_full_core_target::disconnect)
10656         (record_full_target::mourn_inferior, record_full_target::kill):
10657         New.
10658         (record_full_open, record_full_close, record_full_async): Refactor
10659         as methods of the record_full_base_target class.
10660         (record_full_resume, record_full_commit_resume): Refactor
10661         as methods of the record_full_target class.
10662         (record_full_wait, record_full_stopped_by_watchpoint)
10663         (record_full_stopped_data_address)
10664         (record_full_stopped_by_sw_breakpoint)
10665         (record_full_supports_stopped_by_sw_breakpoint)
10666         (record_full_stopped_by_hw_breakpoint)
10667         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
10668         methods of the record_full_base_target class.
10669         (record_full_store_registers, record_full_xfer_partial)
10670         (record_full_insert_breakpoint, record_full_remove_breakpoint):
10671         Refactor as methods of the record_full_target class.
10672         (record_full_can_execute_reverse, record_full_get_bookmark)
10673         (record_full_goto_bookmark, record_full_execution_direction)
10674         (record_full_record_method, record_full_info, record_full_delete)
10675         (record_full_is_replaying, record_full_will_replay)
10676         (record_full_goto_begin, record_full_goto_end, record_full_goto)
10677         (record_full_stop_replaying): Refactor as methods of the
10678         record_full_base_target class.
10679         (record_full_core_resume, record_full_core_kill)
10680         (record_full_core_fetch_registers)
10681         (record_full_core_prepare_to_store)
10682         (record_full_core_store_registers, record_full_core_xfer_partial)
10683         (record_full_core_insert_breakpoint)
10684         (record_full_core_remove_breakpoint)
10685         (record_full_core_has_execution): Refactor
10686         as methods of the record_full_core_target class.
10687         (record_full_base_target::supports_delete_record): New.
10688         (init_record_full_ops): Delete.
10689         (init_record_full_core_ops): Delete.
10690         (record_full_save): Refactor as method of the
10691         record_full_base_target class.
10692         (_initialize_record_full): Remove references to
10693         init_record_full_ops and init_record_full_core_ops.
10694
10695         * remote.c (remote_target, extended_remote_target): New classes.
10696         (remote_ops): Now a remote_target.
10697         (extended_remote_ops): Now an extended_remote_target.
10698         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
10699         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
10700         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
10701         (remote_pass_signals, remote_set_syscall_catchpoint)
10702         (remote_program_signals, )
10703         (remote_thread_always_alive): Remove target_ops parameter.
10704         (remote_thread_alive, remote_thread_name)
10705         (remote_update_thread_list, remote_threads_extra_info)
10706         (remote_static_tracepoint_marker_at)
10707         (remote_static_tracepoint_markers_by_strid)
10708         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
10709         (remote_open): Refactor as methods of remote_target.
10710         (extended_remote_open, extended_remote_detach)
10711         (extended_remote_attach, extended_remote_post_attach):
10712         (extended_remote_supports_disable_randomization)
10713         (extended_remote_create_inferior): : Refactor as method of
10714         extended_remote_target.
10715         (remote_set_permissions, remote_open_1, remote_detach)
10716         (remote_follow_fork, remote_follow_exec, remote_disconnect)
10717         (remote_resume, remote_commit_resume, remote_stop)
10718         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
10719         (remote_terminal_ours, remote_wait, remote_fetch_registers)
10720         (remote_prepare_to_store, remote_store_registers)
10721         (remote_flash_erase, remote_flash_done, remote_files_info)
10722         (remote_kill, remote_mourn, remote_insert_breakpoint)
10723         (remote_remove_breakpoint, remote_insert_watchpoint)
10724         (remote_watchpoint_addr_within_range)
10725         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
10726         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
10727         (remote_supports_stopped_by_sw_breakpoint)
10728         (remote_stopped_by_hw_breakpoint)
10729         (remote_supports_stopped_by_hw_breakpoint)
10730         (remote_stopped_by_watchpoint, remote_stopped_data_address)
10731         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
10732         (remote_verify_memory): Refactor as methods of remote_target.
10733         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
10734         parameter.
10735         (remote_xfer_partial, remote_get_memory_xfer_limit)
10736         (remote_search_memory, remote_rcmd, remote_memory_map)
10737         (remote_pid_to_str, remote_get_thread_local_address)
10738         (remote_get_tib_address, remote_read_description): Refactor as
10739         methods of remote_target.
10740         (remote_target::fileio_open, remote_target::fileio_pwrite)
10741         (remote_target::fileio_pread, remote_target::fileio_close): New.
10742         (remote_hostio_readlink, remote_hostio_fstat)
10743         (remote_filesystem_is_local, remote_can_execute_reverse)
10744         (remote_supports_non_stop, remote_supports_disable_randomization)
10745         (remote_supports_multi_process, remote_supports_cond_breakpoints)
10746         (remote_supports_enable_disable_tracepoint)
10747         (remote_supports_string_tracing)
10748         (remote_can_run_breakpoint_commands, remote_trace_init)
10749         (remote_download_tracepoint, remote_can_download_tracepoint)
10750         (remote_download_trace_state_variable, remote_enable_tracepoint)
10751         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10752         (remote_trace_start, remote_get_trace_status)
10753         (remote_get_tracepoint_status, remote_trace_stop)
10754         (remote_trace_find, remote_get_trace_state_variable_value)
10755         (remote_save_trace_data, remote_get_raw_trace_data)
10756         (remote_set_disconnected_tracing, remote_core_of_thread)
10757         (remote_set_circular_trace_buffer, remote_traceframe_info)
10758         (remote_get_min_fast_tracepoint_insn_len)
10759         (remote_set_trace_buffer_size, remote_set_trace_notes)
10760         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10761         (remote_disable_btrace, remote_teardown_btrace)
10762         (remote_read_btrace, remote_btrace_conf)
10763         (remote_augmented_libraries_svr4_read, remote_load)
10764         (remote_pid_to_exec_file, remote_can_do_single_step)
10765         (remote_execution_direction, remote_thread_handle_to_thread_info):
10766         Refactor as methods of remote_target.
10767         (init_remote_ops, init_extended_remote_ops): Delete.
10768         (remote_can_async_p, remote_is_async_p, remote_async)
10769         (remote_thread_events, remote_upload_tracepoints)
10770         (remote_upload_trace_state_variables): Refactor as methods of
10771         remote_target.
10772         (_initialize_remote): Remove references to init_remote_ops and
10773         init_extended_remote_ops.
10774
10775         * remote-sim.c (gdbsim_target): New class.
10776         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10777         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10778         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10779         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10780         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10781         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10782         Refactor as methods of gdbsim_target.
10783         (gdbsim_ops): Now a gdbsim_target.
10784         (init_gdbsim_ops): Delete.
10785         (gdbsim_cntrl_c): Adjust.
10786         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10787
10788         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10789         (the_amd64_linux_nat_target): New.
10790         (amd64_linux_fetch_inferior_registers)
10791         (amd64_linux_store_inferior_registers): Refactor as methods of
10792         amd64_linux_nat_target.
10793         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
10794         * i386-linux-nat.c: Don't include "linux-nat.h".
10795         (i386_linux_nat_target): New class.
10796         (the_i386_linux_nat_target): New.
10797         (i386_linux_fetch_inferior_registers)
10798         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10799         as methods of i386_linux_nat_target.
10800         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10801         * inf-child.c (inf_child_ops): Delete.
10802         (inf_child_fetch_inferior_registers)
10803         (inf_child_store_inferior_registers): Delete.
10804         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10805         methods of inf_child_target.
10806         (inf_child_target::supports_terminal_ours)
10807         (inf_child_target::terminal_init)
10808         (inf_child_target::terminal_inferior)
10809         (inf_child_target::terminal_ours_for_output)
10810         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10811         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10812         New.
10813         (inf_child_open, inf_child_disconnect, inf_child_close)
10814         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10815         (inf_child_post_startup_inferior, inf_child_can_run)
10816         (inf_child_pid_to_exec_file): Refactor as methods of
10817         inf_child_target.
10818         (inf_child_follow_fork): Delete.
10819         (inf_child_target::can_create_inferior)
10820         (inf_child_target::can_attach): New.
10821         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10822         (inf_child_target::has_stack, inf_child_target::has_registers)
10823         (inf_child_target::has_execution): New.
10824         (inf_child_fileio_open, inf_child_fileio_pwrite)
10825         (inf_child_fileio_pread, inf_child_fileio_fstat)
10826         (inf_child_fileio_close, inf_child_fileio_unlink)
10827         (inf_child_fileio_readlink, inf_child_use_agent)
10828         (inf_child_can_use_agent): Refactor as methods of
10829         inf_child_target.
10830         (return_zero, inf_child_target): Delete.
10831         (inf_child_target::inf_child_target): New.
10832         * inf-child.h: Include "target.h".
10833         (inf_child_target): Delete function prototype.
10834         (inf_child_target): New class.
10835         (inf_child_open_target, inf_child_mourn_inferior)
10836         (inf_child_maybe_unpush_target): Delete.
10837         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10838         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10839         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10840         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10841         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10842         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10843         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10844         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10845         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10846         methods of inf_ptrace_target.
10847         (inf_ptrace_target): Delete function.
10848         * inf-ptrace.h: Include "inf-child.h".
10849         (inf_ptrace_target): Delete function declaration.
10850         (inf_ptrace_target): New class.
10851         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10852         * linux-nat.c (linux_target): New.
10853         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10854         (linux_nat_target::~linux_nat_target): New.
10855         (linux_child_post_attach, linux_child_post_startup_inferior)
10856         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10857         (linux_child_remove_fork_catchpoint)
10858         (linux_child_insert_vfork_catchpoint)
10859         (linux_child_remove_vfork_catchpoint)
10860         (linux_child_insert_exec_catchpoint)
10861         (linux_child_remove_exec_catchpoint)
10862         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10863         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10864         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10865         (linux_nat_stopped_data_address)
10866         (linux_nat_stopped_by_sw_breakpoint)
10867         (linux_nat_supports_stopped_by_sw_breakpoint)
10868         (linux_nat_stopped_by_hw_breakpoint)
10869         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10870         (linux_nat_kill, linux_nat_mourn_inferior)
10871         (linux_nat_xfer_partial, linux_nat_thread_alive)
10872         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10873         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10874         (linux_child_static_tracepoint_markers_by_strid)
10875         (linux_nat_is_async_p, linux_nat_can_async_p)
10876         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10877         (linux_nat_supports_multi_process)
10878         (linux_nat_supports_disable_randomization, linux_nat_async)
10879         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10880         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10881         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10882         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10883         methods of linux_nat_target.
10884         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10885         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10886         parameter.
10887         (check_stopped_by_watchpoint): Adjust.
10888         (linux_xfer_partial): Delete.
10889         (linux_target_install_ops, linux_target, linux_nat_add_target):
10890         Delete.
10891         (linux_nat_target::linux_nat_target): New.
10892         * linux-nat.h: Include "inf-ptrace.h".
10893         (linux_nat_target): New.
10894         (linux_target, linux_target_install_ops, linux_nat_add_target):
10895         Delete function declarations.
10896         (linux_target): Declare global.
10897         * linux-thread-db.c (thread_db_target): New.
10898         (thread_db_target::thread_db_target): New.
10899         (thread_db_ops): Delete.
10900         (the_thread_db_target): New.
10901         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10902         (thread_db_update_thread_list, thread_db_pid_to_str)
10903         (thread_db_extra_thread_info)
10904         (thread_db_thread_handle_to_thread_info)
10905         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10906         (thread_db_resume): Refactor as methods of thread_db_target.
10907         (init_thread_db_ops): Delete.
10908         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10909         * x86-linux-nat.c: Don't include "linux-nat.h".
10910         (super_post_startup_inferior): Delete.
10911         (x86_linux_nat_target::~x86_linux_nat_target): New.
10912         (x86_linux_child_post_startup_inferior)
10913         (x86_linux_read_description, x86_linux_enable_btrace)
10914         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10915         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10916         methods of x86_linux_nat_target.
10917         (x86_linux_create_target): Delete.  Bits folded ...
10918         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10919         pointer.
10920         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10921         (x86_linux_nat_target): New class.
10922         (x86_linux_create_target): Delete.
10923         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10924         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10925         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10926         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10927         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10928         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10929         make extern.
10930         (x86_use_watchpoints): Delete.
10931         * x86-nat.h: Include "breakpoint.h" and "target.h".
10932         (x86_use_watchpoints): Delete.
10933         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10934         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10935         (x86_insert_watchpoint, x86_remove_watchpoint)
10936         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10937         (x86_stopped_by_hw_breakpoint): New declarations.
10938         (x86_nat_target): New template class.
10939
10940         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10941         (the_ppc_linux_nat_target): New.
10942         (ppc_linux_fetch_inferior_registers)
10943         (ppc_linux_can_use_hw_breakpoint)
10944         (ppc_linux_region_ok_for_hw_watchpoint)
10945         (ppc_linux_ranged_break_num_registers)
10946         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10947         (ppc_linux_insert_mask_watchpoint)
10948         (ppc_linux_remove_mask_watchpoint)
10949         (ppc_linux_can_accel_watchpoint_condition)
10950         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10951         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10952         (ppc_linux_watchpoint_addr_within_range)
10953         (ppc_linux_masked_watch_num_registers)
10954         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10955         (ppc_linux_read_description): Refactor as methods of
10956         ppc_linux_nat_target.
10957         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10958
10959         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10960         (procfs_target): New class.
10961         (the_procfs_target): New.
10962         (procfs_target): Delete function.
10963         (procfs_auxv_parse, procfs_attach, procfs_detach)
10964         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10965         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10966         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10967         (procfs_create_inferior, procfs_update_thread_list)
10968         (procfs_thread_alive, procfs_pid_to_str)
10969         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10970         (procfs_stopped_data_address, procfs_insert_watchpoint)
10971         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10972         (proc_find_memory_regions, procfs_info_proc)
10973         (procfs_make_note_section): Refactor as methods of procfs_target.
10974         (_initialize_procfs): Adjust.
10975         * sol-thread.c (sol_thread_target): New class.
10976         (sol_thread_ops): Now a sol_thread_target.
10977         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10978         (sol_thread_fetch_registers, sol_thread_store_registers)
10979         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10980         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10981         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10982         (init_sol_thread_ops): Delete.
10983         (_initialize_sol_thread): Adjust.  Remove references to
10984         init_sol_thread_ops and complete_target_initialization.
10985
10986         * windows-nat.c (windows_nat_target): New class.
10987         (windows_fetch_inferior_registers)
10988         (windows_store_inferior_registers, windows_resume, windows_wait)
10989         (windows_attach, windows_detach, windows_pid_to_exec_file)
10990         (windows_files_info, windows_create_inferior)
10991         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10992         (windows_close, windows_pid_to_str, windows_xfer_partial)
10993         (windows_get_tib_address, windows_get_ada_task_ptid)
10994         (windows_thread_name, windows_thread_alive): Refactor as
10995         windows_nat_target methods.
10996         (do_initial_windows_stuff): Adjust.
10997         (windows_target): Delete function.
10998         (_initialize_windows_nat): Adjust.
10999
11000         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11001         (darwin_mourn_inferior, darwin_kill_inferior)
11002         (darwin_create_inferior, darwin_attach, darwin_detach)
11003         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11004         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11005         (darwin_supports_multi_process): Refactor as darwin_nat_target
11006         methods.
11007         (darwin_resume_to, darwin_files_info): Delete.
11008         (_initialize_darwin_inferior): Rename to ...
11009         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
11010         * darwin-nat.h: Include "inf-child.h".
11011         (darwin_nat_target): New class.
11012         (darwin_complete_target): Delete.
11013         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11014         (darwin_target): New.
11015         (i386_darwin_fetch_inferior_registers)
11016         (i386_darwin_store_inferior_registers): Refactor as methods of
11017         darwin_nat_target.
11018         (darwin_complete_target): Delete, with ...
11019         (_initialize_i386_darwin_nat): ... bits factored out here.
11020
11021         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11022         (the_alpha_linux_nat_target): New.
11023         (alpha_linux_register_u_offset): Refactor as
11024         alpha_linux_nat_target method.
11025         (_initialize_alpha_linux_nat): Adjust.
11026         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11027         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11028         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11029         methods of linux_nat_trad_target.
11030         (linux_trad_target): Delete.
11031         * linux-nat-trad.h (linux_trad_target): Delete function.
11032         (linux_nat_trad_target): New class.
11033         * mips-linux-nat.c (mips_linux_nat_target): New class.
11034         (super_fetch_registers, super_store_registers, super_close):
11035         Delete.
11036         (the_mips_linux_nat_target): New.
11037         (mips64_linux_regsets_fetch_registers)
11038         (mips64_linux_regsets_store_registers)
11039         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11040         (mips_linux_register_u_offset, mips_linux_read_description)
11041         (mips_linux_can_use_hw_breakpoint)
11042         (mips_linux_stopped_by_watchpoint)
11043         (mips_linux_stopped_data_address)
11044         (mips_linux_region_ok_for_hw_watchpoint)
11045         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11046         (mips_linux_close): Refactor as methods of mips_linux_nat.
11047         (_initialize_mips_linux_nat): Adjust to C++ification.
11048
11049         * aix-thread.c (aix_thread_target): New class.
11050         (aix_thread_ops): Now an aix_thread_target.
11051         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11052         (aix_thread_fetch_registers, aix_thread_store_registers)
11053         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11054         (aix_thread_thread_alive, aix_thread_pid_to_str)
11055         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11056         Refactor as methods of aix_thread_target.
11057         (init_aix_thread_ops): Delete.
11058         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11059         and complete_target_initialization.
11060         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11061         (rs6000_nat_target): New class.
11062         (the_rs6000_nat_target): New.
11063         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11064         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11065         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11066         (super_create_inferior): Delete.
11067         (_initialize_rs6000_nat): Adjust to C++ification.
11068
11069         * arm-linux-nat.c (arm_linux_nat_target): New class.
11070         (the_arm_linux_nat_target): New.
11071         (arm_linux_fetch_inferior_registers)
11072         (arm_linux_store_inferior_registers, arm_linux_read_description)
11073         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11074         (arm_linux_remove_hw_breakpoint)
11075         (arm_linux_region_ok_for_hw_watchpoint)
11076         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11077         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11078         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11079         arm_linux_nat_target.
11080         (_initialize_arm_linux_nat): Adjust to C++ification.
11081
11082         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11083         (the_aarch64_linux_nat_target): New.
11084         (aarch64_linux_fetch_inferior_registers)
11085         (aarch64_linux_store_inferior_registers)
11086         (aarch64_linux_child_post_startup_inferior)
11087         (aarch64_linux_read_description)
11088         (aarch64_linux_can_use_hw_breakpoint)
11089         (aarch64_linux_insert_hw_breakpoint)
11090         (aarch64_linux_remove_hw_breakpoint)
11091         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11092         (aarch64_linux_region_ok_for_hw_watchpoint)
11093         (aarch64_linux_stopped_data_address)
11094         (aarch64_linux_stopped_by_watchpoint)
11095         (aarch64_linux_watchpoint_addr_within_range)
11096         (aarch64_linux_can_do_single_step): Refactor as methods of
11097         aarch64_linux_nat_target.
11098         (super_post_startup_inferior): Delete.
11099         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11100
11101         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11102         (the_hppa_linux_nat_target): New.
11103         (hppa_linux_fetch_inferior_registers)
11104         (hppa_linux_store_inferior_registers): Refactor as methods of
11105         hppa_linux_nat_target.
11106         (_initialize_hppa_linux_nat): Adjust to C++ification.
11107
11108         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11109         (the_ia64_linux_nat_target): New.
11110         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11111         (ia64_linux_stopped_data_address)
11112         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11113         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11114         ia64_linux_nat_target methods.
11115         (super_xfer_partial): Delete.
11116         (_initialize_ia64_linux_nat): Adjust to C++ification.
11117
11118         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11119         (the_m32r_linux_nat_target): New.
11120         (m32r_linux_fetch_inferior_registers)
11121         (m32r_linux_store_inferior_registers): Refactor as
11122         m32r_linux_nat_target methods.
11123         (_initialize_m32r_linux_nat): Adjust to C++ification.
11124
11125         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11126         (the_m68k_linux_nat_target): New.
11127         (m68k_linux_fetch_inferior_registers)
11128         (m68k_linux_store_inferior_registers): Refactor as
11129         m68k_linux_nat_target methods.
11130         (_initialize_m68k_linux_nat): Adjust to C++ification.
11131
11132         * s390-linux-nat.c (s390_linux_nat_target): New class.
11133         (the_s390_linux_nat_target): New.
11134         (s390_linux_fetch_inferior_registers)
11135         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11136         (s390_insert_watchpoint, s390_remove_watchpoint)
11137         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11138         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11139         (s390_auxv_parse, s390_read_description): Refactor as methods of
11140         s390_linux_nat_target.
11141         (_initialize_s390_nat): Adjust to C++ification.
11142
11143         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11144         (the_sparc_linux_nat_target): New.
11145         (_initialize_sparc_linux_nat): Adjust to C++ification.
11146         * sparc-nat.c (sparc_fetch_inferior_registers)
11147         (sparc_store_inferior_registers): Remove target_ops parameter.
11148         * sparc-nat.h (sparc_fetch_inferior_registers)
11149         (sparc_store_inferior_registers): Remove target_ops parameter.
11150         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11151         (the_sparc64_linux_nat_target): New.
11152         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11153
11154         * spu-linux-nat.c (spu_linux_nat_target): New class.
11155         (the_spu_linux_nat_target): New.
11156         (spu_child_post_startup_inferior, spu_child_post_attach)
11157         (spu_child_wait, spu_fetch_inferior_registers)
11158         (spu_store_inferior_registers, spu_xfer_partial)
11159         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11160         methods.
11161         (_initialize_spu_nat): Adjust to C++ification.
11162
11163         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11164         (the_tilegx_linux_nat_target): New.
11165         (fetch_inferior_registers, store_inferior_registers):
11166         Refactor as methods.
11167         (_initialize_tile_linux_nat): Adjust to C++ification.
11168
11169         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11170         (the_xtensa_linux_nat_target): New.
11171         (xtensa_linux_fetch_inferior_registers)
11172         (xtensa_linux_store_inferior_registers): Refactor as
11173         xtensa_linux_nat_target methods.
11174         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11175
11176         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11177         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11178         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11179         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11180         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11181         (fbsd_stopped_by_sw_breakpoint)
11182         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11183         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11184         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11185         (fbsd_post_startup_inferior, fbsd_post_attach)
11186         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11187         (fbsd_set_syscall_catchpoint)
11188         (super_xfer_partial, super_resume, super_wait)
11189         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11190         (fbsd_handle_debug_trap): Remove target_ops parameter.
11191         (fbsd_nat_add_target): Delete.
11192         * fbsd-nat.h: Include "inf-ptrace.h".
11193         (fbsd_nat_add_target): Delete.
11194         (USE_SIGTRAP_SIGINFO): Define.
11195         (fbsd_nat_target): New class.
11196
11197         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11198         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11199         (amd64bsd_target): Delete.
11200         * amd64-bsd-nat.h: New file.
11201         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11202         "x86-bsd-nat.h".
11203         (amd64_fbsd_nat_target): New class.
11204         (the_amd64_fbsd_nat_target): New.
11205         (amd64fbsd_read_description): Refactor as method of
11206         amd64_fbsd_nat_target.
11207         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11208         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11209         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11210         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11211         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11212         (i386bsd_target): Delete.
11213         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11214         (i386bsd_fetch_inferior_registers)
11215         (i386bsd_store_inferior_registers): Declare.
11216         (i386_bsd_nat_target): New class.
11217         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11218         (the_i386_fbsd_nat_target): New.
11219         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11220         i386_fbsd_nat_target methods.
11221         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11222         (_initialize_i386fbsd_nat): Adjust to C++ification.
11223         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11224         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11225         (_initialize_x86_bsd_nat): Adjust to C++ification.
11226         * x86-bsd-nat.h: Include "x86-nat.h".
11227         (x86bsd_target): Delete declaration.
11228         (x86bsd_nat_target): New class.
11229
11230         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11231         (the_aarch64_fbsd_nat_target): New.
11232         (aarch64_fbsd_fetch_inferior_registers)
11233         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11234         aarch64_fbsd_nat_target.
11235         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11236         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11237         (the_alpha_bsd_nat_target): New.
11238         (alphabsd_fetch_inferior_registers)
11239         (alphabsd_store_inferior_registers): Refactor as
11240         alpha_bsd_nat_target methods.
11241         (_initialize_alphabsd_nat): Refactor as methods of
11242         alpha_bsd_nat_target.
11243         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11244         (the_amd64_nbsd_nat_target): New.
11245         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11246         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11247         (the_amd64_obsd_nat_target): New.
11248         (_initialize_amd64obsd_nat): Adjust to C++ification.
11249         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11250         (the_arm_fbsd_nat_target): New.
11251         (arm_fbsd_fetch_inferior_registers)
11252         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11253         (_initialize_arm_fbsd_nat): Refactor as methods of
11254         arm_fbsd_nat_target.
11255         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11256         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11257         (the_arm_netbsd_nat_target): New.
11258         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11259         arm_netbsd_nat_target.
11260         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11261         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11262         (the_hppa_nbsd_nat_target): New.
11263         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11264         hppa_nbsd_nat_target methods.
11265         (_initialize_hppanbsd_nat): Adjust to C++ification.
11266         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11267         (the_hppa_obsd_nat_target): New.
11268         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11269         methods of hppa_obsd_nat_target.
11270         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11271         add_target.
11272         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11273         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11274         add_target.
11275         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11276         (_initialize_i386obsd_nat): Use add_target.
11277         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11278         (the_m68k_bsd_nat_target): New.
11279         (m68kbsd_fetch_inferior_registers)
11280         (m68kbsd_store_inferior_registers): Refactor as methods of
11281         m68k_bsd_nat_target.
11282         (_initialize_m68kbsd_nat): Adjust to C++ification.
11283         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11284         (the_mips_fbsd_nat_target): New.
11285         (mips_fbsd_fetch_inferior_registers)
11286         (mips_fbsd_store_inferior_registers): Refactor as methods of
11287         mips_fbsd_nat_target.
11288         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11289         add_target.
11290         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11291         (the_mips_nbsd_nat_target): New.
11292         (mipsnbsd_fetch_inferior_registers)
11293         (mipsnbsd_store_inferior_registers): Refactor as methods of
11294         mips_nbsd_nat_target.
11295         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11296         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11297         (the_mips64_obsd_nat_target): New.
11298         (mips64obsd_fetch_inferior_registers)
11299         (mips64obsd_store_inferior_registers): Refactor as methods of
11300         mips64_obsd_nat_target.
11301         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11302         add_target.
11303         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11304         nbsd_nat_target.
11305         * nbsd-nat.h: Include "inf-ptrace.h".
11306         (nbsd_nat_target): New class.
11307         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11308         (obsd_wait): Refactor as methods of obsd_nat_target.
11309         (obsd_add_target): Delete.
11310         * obsd-nat.h: Include "inf-ptrace.h".
11311         (obsd_nat_target): New class.
11312         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11313         (the_ppc_fbsd_nat_target): New.
11314         (ppcfbsd_fetch_inferior_registers)
11315         (ppcfbsd_store_inferior_registers): Refactor as methods of
11316         ppc_fbsd_nat_target.
11317         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11318         add_target.
11319         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11320         (the_ppc_nbsd_nat_target): New.
11321         (ppcnbsd_fetch_inferior_registers)
11322         (ppcnbsd_store_inferior_registers): Refactor as methods of
11323         ppc_nbsd_nat_target.
11324         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11325         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11326         (the_ppc_obsd_nat_target): New.
11327         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11328         methods of ppc_obsd_nat_target.
11329         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11330         add_target.
11331         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11332         (the_sh_nbsd_nat_target): New.
11333         (shnbsd_fetch_inferior_registers)
11334         (shnbsd_store_inferior_registers): Refactor as methods of
11335         sh_nbsd_nat_target.
11336         (_initialize_shnbsd_nat): Adjust to C++ification.
11337         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11338         (inf_ptrace_xfer_partial): Delete.
11339         (sparc_xfer_partial, sparc_target): Delete.
11340         * sparc-nat.h (sparc_fetch_inferior_registers)
11341         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11342         (sparc_target): Delete function declaration.
11343         (sparc_target): New template class.
11344         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11345         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11346         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11347         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11348         add_target.
11349         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11350         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11351         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11352         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11353         add_target.
11354         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11355         (the_vax_bsd_nat_target): New.
11356         (vaxbsd_fetch_inferior_registers)
11357         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11358         methods.
11359         (_initialize_vaxbsd_nat): Adjust to C++ification.
11360
11361         * bsd-kvm.c (bsd_kvm_target): New class.
11362         (bsd_kvm_ops): Now a bsd_kvm_target.
11363         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11364         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11365         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11366         bsd_kvm_target.
11367         (bsd_kvm_return_one): Delete.
11368         (bsd_kvm_add_target): Adjust to C++ification.
11369
11370         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11371         (nto_procfs_target_procfs): New classes.
11372         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11373         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11374         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11375         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11376         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11377         (procfs_remove_hw_breakpoint, procfs_resume)
11378         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11379         (procfs_kill_inferior, procfs_store_registers)
11380         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11381         as methods of nto_procfs_target.
11382         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11383         (nto_native_ops): Delete.
11384         (procfs_open, procfs_native_open): Delete.
11385         (nto_native_ops): Now an nto_procfs_target_native.
11386         (init_procfs_targets): Adjust to C++ification.
11387         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11388         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11389         Refactor as methods of nto_procfs_target.
11390
11391         * go32-nat.c (go32_nat_target): New class.
11392         (the_go32_nat_target): New.
11393         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11394         (go32_store_registers, go32_xfer_partial, go32_files_info)
11395         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11396         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11397         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11398         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11399         (go32_target): Delete.
11400         (_initialize_go32_nat): Adjust to C++ification.
11401
11402         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11403         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11404         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11405         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11406         gnu_nat_target.
11407         (gnu_target): Delete.
11408         * gnu-nat.h (gnu_target): Delete.
11409         (gnu_nat_target): New class.
11410         * i386-gnu-nat.c (gnu_base_target): New.
11411         (i386_gnu_nat_target): New class.
11412         (the_i386_gnu_nat_target): New.
11413         (_initialize_i386gnu_nat): Adjust to C++ification.
11414
11415 2018-05-02  Pedro Alves  <palves@redhat.com>
11416
11417         * bfd-target.c (target_bfd_xclose): Rename to ...
11418         (target_bfd_close): ... this.
11419         (target_bfd_reopen): Adjust.
11420         * target.c (target_close): Remove references to to_xclose.
11421         * target.h (target_ops::to_xclose): Delete.
11422         (target_ops::to_close): Update comments.
11423
11424 2018-05-02  Pedro Alves  <palves@redhat.com>
11425
11426         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11427         "linux-nat.h".
11428         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11429         * inf-ptrace.c (inf_ptrace_register_u_offset)
11430         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11431         (inf_ptrace_store_register, inf_ptrace_store_registers)
11432         (inf_ptrace_trad_target): Move to ...
11433         * linux-nat-trad.c: ... this new file.
11434         * linux-nat-trad.h: New file.
11435         * linux-nat.c (linux_target_install_ops): Make extern.
11436         (linux_trad_target): Delete.
11437         * linux-nat.h (linux_trad_target): Delete declaration.
11438         (linux_target_install_ops): Declare.
11439         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11440         "linux-nat.h".
11441
11442 2018-05-02  Pedro Alves  <palves@redhat.com>
11443
11444         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11445         procfs_target/add_target here.
11446         * procfs.c (procfs_target): Make static.
11447         (_initialize_procfs): Call add_target here.
11448         * procfs.h (struct target_ops): Remove forward declaration.
11449         (procfs_target): Remove declaration.
11450         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11451
11452 2018-05-02  Pedro Alves  <palves@redhat.com>
11453
11454         * procfs.c (procfs_stopped_by_watchpoint)
11455         (procfs_insert_watchpoint, procfs_remove_watchpoint)
11456         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11457         Forward declare.
11458         (procfs_use_watchpoints): Delete, move contents...
11459         (procfs_target): ... here.
11460         * procfs.h (procfs_use_watchpoints): Delete declaration.
11461         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11462         procfs_use_watchpoints.
11463         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
11464         procfs_use_watchpoints.
11465
11466 2018-05-02  Tom Tromey  <tom@tromey.com>
11467
11468         PR python/20084:
11469         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
11470         and var_zuinteger_unlimited.
11471         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
11472         and PARAM_ZUINTEGER_UNLIMITED.
11473         (set_parameter_value): Handle var_zuinteger and
11474         var_zuinteger_unlimited.
11475         (add_setshow_generic): Likewise.
11476         (parmpy_init): Likewise.
11477
11478 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
11479
11480         PR rust/23124
11481         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
11482         pointer is not null before dereferencing it.
11483
11484 2018-04-30  Tom Tromey  <tom@tromey.com>
11485
11486         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
11487         is_mi_like_p.
11488
11489 2018-04-30  Tom Tromey  <tom@tromey.com>
11490
11491         * breakpoint.c (mention): Remove use of is_mi_like_p.
11492         (print_mention_ranged_breakpoint): Likewise.
11493         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
11494         of is_mi_like_p.
11495
11496 2018-04-30  Tom Tromey  <tom@tromey.com>
11497
11498         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
11499
11500 2018-04-30  Tom Tromey  <tom@tromey.com>
11501
11502         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
11503         (info_spu_event_command): Remove some uses of is_mi_like_p.
11504
11505 2018-04-30  Tom Tromey  <tom@tromey.com>
11506
11507         * python/py-framefilter.c (py_print_single_arg)
11508         (enumerate_locals, py_print_args, py_print_frame): Remove some
11509         uses of is_mi_like_p.
11510
11511 2018-04-30  Tom Tromey  <tom@tromey.com>
11512
11513         * ui-out.c: Update.
11514         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
11515         * ui-out.h (ui_out::is_mi_like_p): Now const.
11516         (ui_out::do_is_mi_like_p): Now const.
11517         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
11518
11519 2018-04-30  Tom Tromey  <tom@tromey.com>
11520
11521         * varobj.c (varobj_set_visualizer): Use new_reference.
11522         * python/python.c (gdbpy_decode_line): Use new_reference.
11523         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
11524         new_reference.
11525
11526 2018-04-30  Tom Tromey  <tom@tromey.com>
11527
11528         * varobj.c (install_new_value): Use new_reference.
11529         * value.h (value_incref): Return void.  Swap intro comment with
11530         value_decref.
11531         * value.c (set_value_parent): Use new_reference.
11532         (value_incref): Return void.  Update intro comment.
11533         (release_value): Use new_reference.
11534         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
11535
11536 2018-04-30  Tom Tromey  <tom@tromey.com>
11537
11538         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
11539         * gdb_bfd.h (new_bfd_ref): Remove.
11540         (gdb_bfd_open): Update comment.
11541         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11542         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
11543         (gdb_bfd_fdopenr): Use new_reference.
11544         * exec.c (exec_file_attach): Use new_reference.
11545
11546 2018-04-30  Tom Tromey  <tom@tromey.com>
11547
11548         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
11549         method.
11550
11551 2018-04-30  Tom Tromey  <tom@tromey.com>
11552
11553         * jit.c (jit_read_code_entry): Use type_align.
11554         * i386-tdep.c (i386_gdbarch_init): Don't call
11555         set_gdbarch_long_long_align_bit.
11556         * gdbarch.sh: Remove long_long_align_bit.
11557         * gdbarch.c, gdbarch.h: Rebuild.
11558         * arc-tdep.c (arc_type_align): New function.
11559         (arc_gdbarch_init): Use arc_type_align.  Don't call
11560         set_gdbarch_long_long_align_bit.
11561
11562 2018-04-30  Tom Tromey  <tom@tromey.com>
11563
11564         * rust-lang.c (rust_type_alignment): Remove.
11565         (rust_composite_type): Use type_align.
11566
11567 2018-04-30  Tom Tromey  <tom@tromey.com>
11568
11569         * NEWS: Mention Type.align.
11570         * python/py-type.c (typy_get_alignof): New function.
11571         (type_object_getset): Add "alignof".
11572
11573 2018-04-30  Tom Tromey  <tom@tromey.com>
11574
11575         PR exp/17095:
11576         * NEWS: Update.
11577         * std-operator.def (UNOP_ALIGNOF): New operator.
11578         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
11579         New.
11580         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
11581         * c-lang.c (c_op_print_tab): Add alignof.
11582         * c-exp.y (ALIGNOF): New token.
11583         (exp): Add "ALIGNOF" production.
11584         (ident_tokens): Add _Alignof and alignof.
11585
11586 2018-04-30  Tom Tromey  <tom@tromey.com>
11587
11588         * i386-tdep.c (i386_type_align): New function.
11589         (i386_gdbarch_init): Update.
11590         * gdbarch.sh (type_align): New method.
11591         * gdbarch.c, gdbarch.h: Rebuild.
11592         * arch-utils.h (default_type_align): Declare.
11593         * arch-utils.c (default_type_align): New function.
11594         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
11595         (struct type) <align_log2>: New field.
11596         <instance_flags>: Now a bitfield.
11597         (TYPE_RAW_ALIGN): New macro.
11598         (type_align, type_raw_align, set_type_align): Declare.
11599         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
11600         functions.
11601         * dwarf2read.c (quirk_rust_enum): Set type alignment.
11602         (get_alignment, maybe_set_alignment): New functions.
11603         (read_structure_type, read_enumeration_type, read_array_type)
11604         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
11605         (read_subrange_type, read_base_type): Set type alignment.
11606
11607 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
11608
11609         * dwarf2read.c (read_index_from_section): Use bool.
11610
11611 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
11612
11613         PR gdb/22950
11614         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
11615         with #ifdef.
11616
11617 2018-04-29  John Reiser  <jreiser@BitWagon.com>
11618
11619         PR build/22873
11620         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
11621         last step, and do it atomically.
11622
11623 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
11624
11625         * compile/compile-c-types.c (convert_int, convert_float):
11626         Update for C FE v1.
11627
11628 2018-04-27  Tom Tromey  <tom@tromey.com>
11629
11630         PR rust/22545:
11631         * rust-lang.c (rust_inclusive_range_type_p): New function.
11632         (rust_range): Handle inclusive ranges.
11633         (rust_compute_range): Likewise.
11634         * rust-exp.y (struct rust_op) <inclusive>: New field.
11635         (DOTDOTEQ): New constant.
11636         (range_expr): Add "..=" productions.
11637         (operator_tokens): Add "..=" token.
11638         (ast_range): Add "inclusive" parameter.
11639         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
11640         ranges.
11641         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
11642         bounds values.
11643         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
11644         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
11645         Update comments.
11646         * expprint.c (print_subexp_standard): Handle new bounds values.
11647         (dump_subexp_body_standard): Likewise.
11648
11649 2018-04-27  Tom Tromey  <tom@tromey.com>
11650
11651         * configure: Rebuild.
11652         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
11653         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
11654         "OVERRIDE".
11655         (class symbol_needs_eval_context): Likewise.
11656         * dwarf2read.c (mock_mapped_index::symbol_name_count)
11657         (mock_mapped_index::symbol_name_at): Use "override".  Remove
11658         "virtual".
11659         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
11660         "override".
11661         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
11662         * aarch64-tdep.c (instruction_reader::read): Use "override".
11663         (instruction_reader_test::read): Likewise.
11664         * arm-tdep.c (instruction_reader::read): Use "override".
11665         (instruction_reader_thumb::read): Likewise.
11666
11667 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
11668
11669         PR remote/9665
11670         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
11671         instead of remote_send.
11672         (remote_send): Remove.
11673
11674 2018-04-26  Pedro Alves  <palves@redhat.com>
11675
11676         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
11677         find_function_start_sal instead of find_pc_line.
11678
11679 2018-04-26  Pedro Alves  <palves@redhat.com>
11680
11681         * breakpoint.c (set_breakpoint_location_function): Handle
11682         mst_data_gnu_ifunc.
11683         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
11684         * elfread.c (elf_symtab_read): Give data symbols with
11685         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
11686         (elf_rel_plt_read): Update comment.
11687         * linespec.c (convert_linespec_to_sals): Handle
11688         mst_data_gnu_ifunc.
11689         (minsym_found): Handle mst_data_gnu_ifunc.
11690         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
11691         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
11692         * parse.c (find_minsym_type_and_address): Handle
11693         mst_data_gnu_ifunc.
11694         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
11695         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
11696         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
11697         comment.
11698         <mst_data_gnu_ifunc>: New enumerator.
11699
11700 2018-04-26  Pedro Alves  <palves@redhat.com>
11701
11702         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
11703         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
11704         'want_trampoline' parameter by a lookup_msym_prefer parameter.
11705         Handle it.
11706         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
11707         (lookup_minimal_symbol_by_pc): Adjust.
11708         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
11709         (lookup_solib_trampoline_symbol_by_pc): Adjust.
11710         * minsyms.h (lookup_msym_prefer): New enum.
11711         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11712         parameter by a lookup_msym_prefer parameter.
11713
11714 2018-04-26  Pedro Alves  <palves@redhat.com>
11715
11716         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
11717         ends in "@plt" instead of looking at the symbol's section.
11718
11719 2018-04-26  Pedro Alves  <palves@redhat.com>
11720
11721         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
11722         all references.
11723         (find_pc_partial_function_gnu_ifunc): Rename to ...
11724         (find_pc_partial_function): ... this, and remove references to
11725         'is_gnu_ifunc_p'.
11726         (find_pc_partial_function): Delete old implementation.
11727         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
11728
11729 2018-04-26  Pedro Alves  <palves@redhat.com>
11730
11731         * linespec.c (struct bound_minimal_symbol_search_key): New.
11732         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
11733         skip first line if we found a GNU ifunc minimal symbol by name.
11734         (compare_msymbols): Change parameters to work with a destructured
11735         lhs minsym.
11736         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11737         functions.
11738
11739 2018-04-26  Pedro Alves  <palves@redhat.com>
11740
11741         * breakpoint.c (set_breakpoint_location_function): Don't resolve
11742         ifunc targets here.  Instead, if we have an ifunc minsym, use its
11743         address/name.
11744         (add_location_to_breakpoint): Store the minsym and the objfile in
11745         the breakpoint location.
11746         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11747         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11748         Record the minsym in the sal.
11749         * symtab.h (symtab_and_line) <msymbol>: New field.
11750
11751 2018-04-26  Pedro Alves  <palves@redhat.com>
11752
11753         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11754         unless we actually resolved the ifunc.
11755
11756 2018-04-26  Pedro Alves  <palves@redhat.com>
11757
11758         * c-exp.y (variable production): Prefer ifunc minsyms over
11759         regular function symbols.
11760         * symtab.c (find_gnu_ifunc): New function.
11761         * minsyms.h (lookup_msym_prefer): New enum.
11762         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11763         parameter by a lookup_msym_prefer parameter.
11764         * symtab.h (find_gnu_ifunc): New declaration.
11765
11766 2018-04-26  Pedro Alves  <palves@redhat.com>
11767
11768         * blockframe.c (find_gnu_ifunc_target_type): New function.
11769         (find_function_type): New.
11770         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11771         return a value with a memory address.
11772         (eval_call): For calls to GNU ifunc functions, try to find the
11773         type of the target function from the type that the resolver
11774         returns.
11775         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11776         symbols.
11777         * infcall.c (find_function_return_type): Delete.
11778         (find_function_addr): Add 'function_type' parameter.  For calls to
11779         GNU ifunc functions, try to find the type of the target function
11780         from the type that the resolver returns, and return it via
11781         FUNCTION_TYPE.
11782         (call_function_by_hand_dummy): Adjust to use the function type
11783         returned by find_function_addr.
11784         (find_function_addr): Add 'function_type' parameter and move
11785         description here.
11786         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11787         declarations.
11788
11789 2018-04-26  Pedro Alves  <palves@redhat.com>
11790
11791         * c-exp.y (variable production): Skip finding an alias for ifunc
11792         symbols.
11793
11794 2018-04-26  Pedro Alves  <palves@redhat.com>
11795
11796         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11797
11798 2018-04-25  Pedro Alves  <palves@redhat.com>
11799
11800         * infcmd.c (kill_command): Print the pid as string, not the whole
11801         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11802         message.
11803         * remote.c (remote_detach_1): Print the pid as string, not the
11804         whole thread's ptid.
11805
11806 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11807             Sergio Durigan Junior  <sergiodj@redhat.com>
11808             Pedro Alves  <palves@redhat.com>
11809
11810         * infcmd.c (kill_command): Print message when inferior has
11811         been killed.
11812         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11813         '1'.
11814         (add_inferior): Improve message printed when
11815         'print_inferior_events' is on.
11816         (exit_inferior): Remove message printed when
11817         'print_inferior_events' is on.
11818         (detach_inferior): Improve message printed when
11819         'print_inferior_events' is on.
11820         (initialize_inferiors): Use 'add_inferior_silent' to set
11821         'current_inferior_'.
11822         * inferior.h (print_inferior_events): Declare here as
11823         'extern'.
11824         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11825         '[Detaching...]' messages when 'print_inferior_events' is on.
11826         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11827         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11828         'Detaching after fork from child...', replace it by '... from
11829         parent...'.
11830         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11831         prefix/suffix when printing 'Detaching...' messages.  Print
11832         them when 'print_inferior_events' is on.
11833         * remote.c (remote_detach_1): Print message when detaching
11834         from inferior and '!is_fork_parent'.
11835
11836 2018-04-24  Tom Tromey  <tom@tromey.com>
11837
11838         * cli-out.h: Reindent.
11839
11840 2018-04-24  Tom Tromey  <tom@tromey.com>
11841
11842         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11843         (cli_ui_out::do_field_string): Use fputs_filtered.
11844         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11845
11846 2018-04-23  Tom Tromey  <tom@tromey.com>
11847
11848         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11849         gdb::unique_xmalloc_ptr.
11850
11851 2018-04-23  Tom Tromey  <tom@tromey.com>
11852
11853         * configure: Rebuild.
11854
11855 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
11856
11857         PR gdb/23095
11858         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11859         prepare_for_testing.  Set normal_bp to r_debug_state if target
11860         is bsd.
11861
11862 2018-04-21  Pedro Alves  <palves@redhat.com>
11863             Rajendra SY  <rajendra.sy@gmail.com>
11864
11865         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11866         * remote.c (extended_remote_attach): In all-stop mode, mark the
11867         thread as executing.
11868
11869 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11870
11871         * thread.c (thread_apply_all_command): Fix comment.
11872         (thread_command): Fix comment.
11873
11874 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11875
11876         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11877         parameter.
11878         * features/aarch64-core.c (create_feature_aarch64_core):
11879         Regenerate.
11880         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11881         Likewise.
11882         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11883         Likewise.
11884         * features/i386/32bit-avx512.c
11885         (create_feature_i386_32bit_avx512): Likewise.
11886         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11887         Likewise.
11888         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11889         Likewise.
11890         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11891         Likewise.
11892         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11893         Likewise.
11894         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11895         Likewise.
11896         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11897         Likewise.
11898         * features/i386/64bit-avx512.c
11899         (create_feature_i386_64bit_avx512): Likewise.
11900         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11901         Likewise.
11902         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11903         Likewise.
11904         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11905         Likewise.
11906         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11907         Likewise.
11908         * features/i386/64bit-segments.c
11909         (create_feature_i386_64bit_segments): Likewise.
11910         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11911         Likewise.
11912         * features/i386/x32-core.c
11913         (create_feature_i386_x32_core): Likewise.
11914         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11915         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11916         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11917         * target-descriptions.c: In generated code, don't pass xml
11918         filename.
11919
11920 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11921
11922         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11923         (print_xml_feature::visit_post): Likewise.
11924         (print_xml_feature::visit): Likewise.
11925         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11926         (print_xml_feature): Add new class.
11927         * regformats/regdat.sh: Null xmltarget on feature targets.
11928         * target-descriptions.c (struct target_desc): Add xmltarget.
11929         (maintenance_check_tdesc_xml_convert): Add unittest function.
11930         (tdesc_get_features_xml): Add function to get xml.
11931         (maintenance_check_xml_descriptions): Test xml generation.
11932         * xml-tdesc.c (string_read_description_xml): Add function.
11933         * xml-tdesc.h (string_read_description_xml): Add declaration.
11934
11935 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11936
11937         * features/Makefile: Add feature marker to targets with new style
11938         target descriptions.
11939         * regformats/aarch64.dat: Regenerate.
11940         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11941         * regformats/i386/amd64-avx-linux.dat: Likewise.
11942         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11943         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11944         * regformats/i386/amd64-linux.dat: Likewise.
11945         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11946         * regformats/i386/amd64.dat: Likewise.
11947         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11948         * regformats/i386/i386-avx-linux.dat: Likewise.
11949         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11950         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11951         * regformats/i386/i386-linux.dat: Likewise.
11952         * regformats/i386/i386-mmx-linux.dat: Likewise.
11953         * regformats/i386/i386-mpx-linux.dat: Likewise.
11954         * regformats/i386/i386.dat: Likewise.
11955         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11956         * regformats/i386/x32-avx-linux.dat: Likewise.
11957         * regformats/i386/x32-linux.dat: Likewise.
11958         * regformats/tic6x-c62x-linux.dat: Likewise.
11959         * regformats/tic6x-c64x-linux.dat: Likewise.
11960         * regformats/tic6x-c64xp-linux.dat: Likewise.
11961         * regformats/regdat.sh: Parse feature marker.
11962
11963 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11964
11965         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11966         (tdesc_osabi_name): Likewise.
11967         * target-descriptions.c (tdesc_architecture_name): Add new
11968         function.
11969         (tdesc_osabi_name): Likewise.
11970
11971 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11972
11973         * common/tdesc.c (tdesc_predefined_type): Move to here.
11974         (tdesc_named_type): Likewise.
11975         (tdesc_create_vector): Likewise.
11976         (tdesc_create_struct): Likewise.
11977         (tdesc_set_struct_size): Likewise.
11978         (tdesc_create_union): Likewise.
11979         (tdesc_create_flags): Likewise.
11980         (tdesc_create_enum): Likewise.
11981         (tdesc_add_field): Likewise.
11982         (tdesc_add_typed_bitfield): Likewise.
11983         (tdesc_add_bitfield): Likewise.
11984         (tdesc_add_flag): Likewise.
11985         (tdesc_add_enum_value): Likewise.
11986         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11987         (struct tdesc_type_vector): Likewise.
11988         (struct tdesc_type_field): Likewise.
11989         (struct tdesc_type_with_fields): Likewise.
11990         (tdesc_create_enum): Add declaration.
11991         (tdesc_add_typed_bitfield): Likewise.
11992         (tdesc_add_enum_value): Likewise.
11993         * target-descriptions.c (tdesc_type_field): Move from here.
11994         (tdesc_type_builtin): Likewise.
11995         (tdesc_type_vector): Likewise.
11996         (tdesc_type_with_fields): Likewise.
11997         (tdesc_predefined_types): Likewise.
11998         (tdesc_named_type): Likewise.
11999         (tdesc_create_vector): Likewise.
12000         (tdesc_create_struct): Likewise.
12001         (tdesc_set_struct_size): Likewise.
12002         (tdesc_create_union): Likewise.
12003         (tdesc_create_flags): Likewise.
12004         (tdesc_create_enum): Likewise.
12005         (tdesc_add_field): Likewise.
12006         (tdesc_add_typed_bitfield): Likewise.
12007         (tdesc_add_bitfield): Likewise.
12008         (tdesc_add_flag): Likewise.
12009         (tdesc_add_enum_value): Likewise.
12010         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12011         (tdesc_add_typed_bitfield): Likewise.
12012         (tdesc_add_enum_value): Likewise.
12013
12014 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12015
12016         * common/tdesc.c (tdesc_feature::accept): Move to here.
12017         (tdesc_feature::operator==): Likewise.
12018         (tdesc_create_reg): Likewise.
12019         * common/tdesc.h (tdesc_type_kind): Likewise.
12020         (struct tdesc_type): Likewise.
12021         (struct tdesc_feature): Likewise.
12022         * regformats/regdat.sh: Create a feature.
12023         * target-descriptions.c (tdesc_type_kind): Move from here.
12024         (tdesc_type): Likewise.
12025         (tdesc_type_up): Likewise.
12026         (tdesc_feature): Likewise.
12027         (tdesc_create_reg): Likewise.
12028
12029 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12030
12031         * Makefile.in: Add arch/tdesc.c
12032         * common/tdesc.c: New file.
12033         * common/tdesc.h (tdesc_element_visitor): Move to here.
12034         (tdesc_element): Likewise.
12035         (tdesc_reg): Likewise.
12036         (tdesc_reg_up): Likewise.
12037         * regformats/regdef.h (reg): Add offset to constructors.
12038         * target-descriptions.c (tdesc_element_visitor): Move from here.
12039         (tdesc_element): Likewise.
12040         (tdesc_reg): Likewise.
12041         (tdesc_reg_up): Likewise.
12042
12043 2018-04-17  Tom Tromey  <tom@tromey.com>
12044
12045         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12046         discriminant field.
12047
12048 2018-04-17  Tom Tromey  <tom@tromey.com>
12049
12050         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12051
12052 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12053
12054         * symtab.c (print_symbol_info): Skip printing filename and line
12055         number when `last' is NULL.
12056         (symtab_symbol_info): Use empty string instead of NULL for first
12057         invocation of print_symbol_info.
12058         (rbreak_command): Pass NULL to `last' parameter of
12059         print_symbol_info.
12060
12061 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12062
12063         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12064         instead of nullptr.
12065
12066 2018-04-16  Pedro Alves  <palves@redhat.com>
12067
12068         * MAINTAINERS (sh): Remove.
12069         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12070         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12071         (ALLDEPFILES): Remove sh64-tdep.c.
12072         * NEWS: Mentions that support for SH-5/SH64 is removed.
12073         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12074         (sh*-*-openbsd*): Ditto.
12075         (sh64-*-elf*): Remove.
12076         (sh*): Remove.
12077         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12078         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12079         * sh-tdep.c: No longer include "sh64-tdep.h".
12080         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12081         * sh64-tdep.c, sh64-tdep.h: Remove files.
12082
12083 2018-04-16  Pedro Alves  <palves@redhat.com>
12084
12085         * MAINTAINERS: Remove m88k.
12086         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12087         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12088         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12089         * NEWS: Mention that support for m88k was removed.
12090         * configure.host (m88*-*-*): Remove support.
12091         * configure.nat (m88k-*-*): Remove support.
12092         * configure.tgt (m88*-*-openbsd*): Remove.
12093         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12094
12095 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12096
12097         * configure.tgt (x86_tobjs): New variable.
12098         (amd64_tobjs, i386_tobjs): Use it.
12099
12100 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12101
12102         * symtab.c (print_symbol_info): Precede the symbol definition by
12103         the line number when available.
12104         * NEWS: Advertise this enhancement.
12105
12106 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12107
12108         * NEWS (New options): announce set/show record btrace cpu.
12109         * btrace.c: Include record-btrace.h.
12110         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12111         the vendor is unknown.
12112         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12113         Maybe overwrite the btrace configuration's cpu.
12114         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12115         (btrace_fetch): Add cpu parameter.  Update callers.
12116         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12117         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12118         errata workarounds if the vendor is unknown.
12119         * python/py-record-btrace.c: Include record-btrace.h.
12120         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12121         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12122         * record-btrace.c (record_btrace_cpu_state_kind): New.
12123         (record_btrace_cpu): New.
12124         (set_record_btrace_cpu_cmdlist): New.
12125         (record_btrace_get_cpu): New.
12126         (require_btrace_thread, record_btrace_info)
12127         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12128         (cmd_set_record_btrace_cpu_none): New.
12129         (cmd_set_record_btrace_cpu_auto): New.
12130         (cmd_set_record_btrace_cpu): New.
12131         (cmd_show_record_btrace_cpu): New.
12132         (_initialize_record_btrace): Initialize set/show record btrace cpu
12133         commands.
12134         * record-btrace.h (record_btrace_get_cpu): New.
12135
12136 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12137
12138         * record.c (set_record_command): Fix typo in message.
12139
12140 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12141
12142         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12143
12144 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12145
12146         * infrun.c (process_event_stop_test): Call
12147         gdbarch_in_indirect_branch_thunk.
12148         * gdbarch.sh (in_indirect_branch_thunk): New.
12149         * gdbarch.c: Regenerated.
12150         * gdbarch.h: Regenerated.
12151         * x86-tdep.h: New.
12152         * x86-tdep.c: New.
12153         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12154         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12155         (ALLDEPFILES): Add x86-tdep.c.
12156         * arch-utils.h (default_in_indirect_branch_thunk): New.
12157         * arch-utils.c (default_in_indirect_branch_thunk): New.
12158         * i386-tdep: Include x86-tdep.h.
12159         (i386_in_indirect_branch_thunk): New.
12160         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12161         function.
12162         * amd64-tdep: Include x86-tdep.h.
12163         (amd64_in_indirect_branch_thunk): New.
12164         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12165
12166 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12167
12168         PR gdb/23053
12169         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12170         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12171         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12172         regression.
12173
12174 2018-04-12  Tom Tromey  <tom@tromey.com>
12175
12176         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12177         (rust_evaluate_subexp): Likewise.
12178
12179 2018-04-12  Pedro Alves  <palves@redhat.com>
12180
12181         * procfs.c (procfs_detach): Make forward declaration's prototype
12182         match definition's protototype.
12183         (proc_get_LDT_entry): Remove stale do_cleanups call.
12184
12185 2018-04-12  Pedro Alves  <palves@redhat.com>
12186
12187         * target.h (target_ops::to_has_exited): Delete.
12188         (target_has_exited): Delete.
12189         * target-delegates.c: Regenerate.
12190
12191 2018-04-11  Pedro Alves  <palves@redhat.com>
12192
12193         * target.c (fileio_fh_t::t): Add comment.
12194         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12195         (target_fileio_close): Handle a NULL target.
12196         (invalidate_fileio_fh): New.
12197         (target_close): Call it.
12198         * remote.c (remote_hostio_send_command): No longer check whether
12199         remote_desc is open.
12200
12201 2018-04-11  Pedro Alves  <palves@redhat.com>
12202
12203         * target.c (fileio_fh_t): Make it a named struct instead of a
12204         typedef.
12205         (fileio_fh_t::is_closed): New method.
12206         (DEF_VEC_O (fileio_fh_t)): Remove.
12207         (fileio_fhandles): Now a std::vector.
12208         (is_closed_fileio_fh): Delete.
12209         (acquire_fileio_fd): Adjust.  Rename parameters.
12210         (release_fileio_fd): Adjust.
12211         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12212         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12213         (target_fileio_close): Adjust.
12214
12215 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12216
12217         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12218         index.
12219
12220 2018-04-10  Pedro Alves  <palves@redhat.com>
12221
12222         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12223         (scoped_finish_thread_state): New class.
12224         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12225         cleanup.
12226         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12227         (fetch_inferior_event, normal_stop): Likewise.
12228         * thread.c (finish_thread_state_cleanup): Delete.
12229
12230 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12231             Pedro Alves  <palves@redhat.com>
12232
12233         * value.c: Include "selftest.h" and "common/array-view.h".
12234         (struct range) <operator ==>: New.
12235         (test_ranges_contain): New.
12236         (check_ranges_vector): New.
12237         (test_insert_into_bit_range_vector): New.
12238         (_initialize_values): Register selftests.
12239         * common/array-view.h (operator==, operator!=): New.
12240
12241 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12242
12243         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12244         an iterator.
12245         * inline-frame.c: Include <algorithm>.
12246         (struct inline_state): Add constructor.
12247         (inline_state_s): Remove.
12248         (DEF_VEC_O(inline_state_s)): Remove.
12249         (inline_states): Change type to std::vector.
12250         (find_inline_frame_state): Adjust to std::vector.
12251         (allocate_inline_frame_state): Remove.
12252         (clear_inline_frame_state): Adjust to std::vector.
12253         (skip_inline_frames): Adjust to std::vector.
12254
12255 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12256
12257         * tracepoint.h (struct trace_state_variable): Add constructor.
12258         <name>: Change type to std::string.
12259         * tracepoint.c (tsv_s): Remove.
12260         (DEF_VEC_O(tsv_s)): Remove.
12261         (tvariables): Change to std::vector.
12262         (create_trace_state_variable): Adjust to std::vector.
12263         (find_trace_state_variable): Likewise.
12264         (find_trace_state_variable_by_number): Likewise.
12265         (delete_trace_state_variable): Likewise.
12266         (trace_variable_command): Adjust to std::string.
12267         (delete_trace_variable_command): Likewise.
12268         (tvariables_info_1): Adjust to std::vector.
12269         (save_trace_state_variables): Likewise.
12270         (start_tracing): Likewise.
12271         (merge_uploaded_trace_state_variables): Adjust to std::vector
12272         and std::string.
12273         * target.h (struct target_ops)
12274         <to_download_trace_state_variable>: Pass reference to
12275         trace_state_variable.
12276         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12277         * target-delegates.c: Re-generate.
12278         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12279         (mi_tsv_deleted): Likewise.
12280         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12281         * remote.c (remote_download_trace_state_variable): Change
12282         pointer to reference and adjust.
12283         * make-target-delegates (parse_argtypes): Handle references.
12284         (write_function_header): Likewise.
12285         (munge_type): Likewise.
12286
12287 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12288
12289         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12290         string_view-selftests.c.
12291         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12292         testsuite.
12293         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12294         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12295         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12296         * unittests/basic_string_view/element_access/char/1.cc:
12297         Likewise.
12298         * unittests/basic_string_view/element_access/char/empty.cc:
12299         Likewise.
12300         * unittests/basic_string_view/element_access/char/front_back.cc:
12301         Likewise.
12302         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12303         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12304         Likewise.
12305         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12306         Likewise.
12307         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12308         Likewise.
12309         * unittests/basic_string_view/operations/compare/char/1.cc:
12310         Likewise.
12311         * unittests/basic_string_view/operations/compare/char/13650.cc:
12312         Likewise.
12313         * unittests/basic_string_view/operations/copy/char/1.cc:
12314         Likewise.
12315         * unittests/basic_string_view/operations/data/char/1.cc:
12316         Likewise.
12317         * unittests/basic_string_view/operations/find/char/1.cc:
12318         Likewise.
12319         * unittests/basic_string_view/operations/find/char/2.cc:
12320         Likewise.
12321         * unittests/basic_string_view/operations/find/char/3.cc:
12322         Likewise.
12323         * unittests/basic_string_view/operations/find/char/4.cc:
12324         Likewise.
12325         * unittests/basic_string_view/operations/rfind/char/1.cc:
12326         Likewise.
12327         * unittests/basic_string_view/operations/rfind/char/2.cc:
12328         Likewise.
12329         * unittests/basic_string_view/operations/rfind/char/3.cc:
12330         Likewise.
12331         * unittests/basic_string_view/operations/substr/char/1.cc:
12332         Likewise.
12333         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12334         * unittests/string_view-selftests.c: New file.
12335
12336 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12337
12338         * unittests/basic_string_view/capacity/1.cc: New file.
12339         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12340         * unittests/basic_string_view/cons/char/1.cc: New file.
12341         * unittests/basic_string_view/cons/char/2.cc: New file.
12342         * unittests/basic_string_view/cons/char/3.cc: New file.
12343         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12344         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12345         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12346         * unittests/basic_string_view/element_access/char/1.cc: New file.
12347         * unittests/basic_string_view/element_access/char/2.cc: New file.
12348         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12349         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12350         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12351         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12352         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12353         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12354         * unittests/basic_string_view/include.cc: New file.
12355         * unittests/basic_string_view/inserters/char/1.cc: New file.
12356         * unittests/basic_string_view/inserters/char/2.cc: New file.
12357         * unittests/basic_string_view/inserters/char/3.cc: New file.
12358         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12359         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12360         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12361         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12362         * unittests/basic_string_view/literals/types.cc: New file.
12363         * unittests/basic_string_view/literals/values.cc: New file.
12364         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12365         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12366         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12367         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12368         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12369         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12370         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12371         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12372         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12373         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12374         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12375         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12376         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12377         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12378         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12379         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12380         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12381         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12382         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12383         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12384         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12385         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12386         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12387         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12388         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12389         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12390         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12391         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12392         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12393         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12394         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12395         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12396         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12397         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12398         * unittests/basic_string_view/operators/char/2.cc: New file.
12399         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12400         * unittests/basic_string_view/range_access/char/1.cc: New file.
12401         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12402         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12403         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12404         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12405         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12406         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12407         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12408         * unittests/basic_string_view/typedefs.cc: New file.
12409         * unittests/basic_string_view/types/1.cc: New file.
12410
12411 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12412
12413         * common/gdb_string_view.h: Remove libstdc++ implementation
12414         details, adjust to gdb reality.
12415         * common/gdb_string_view.tcc: Likewise.
12416         * cli/cli-script.c (struct string_view): Remove.
12417         (user_args) <m_args>: Change element type to gdb::string_view.
12418         (user_args::insert_args): Adjust.
12419
12420 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12421
12422         * common/gdb_string_view.h: New file.
12423         * common/gdb_string_view.tcc: New file.
12424
12425 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12426
12427         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12428         * configure: Re-generate.
12429
12430 2018-04-09  Pedro Alves  <palves@redhat.com>
12431
12432         * gdbarch.sh: Include "observable.h" instead of "observer.h".
12433         (set_target_gdbarch): Call
12434         gdb::observers::architecture_changed.notify instead of
12435         observer_notify_architecture_changed.
12436
12437 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12438
12439         * tracepoint.c (struct current_traceframe_cleanup): Remove.
12440         (do_restore_current_traceframe_cleanup): Remove.
12441         (restore_current_traceframe_cleanup_dtor): Remove.
12442         (make_cleanup_restore_current_traceframe): Remove.
12443         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12444         New.
12445         * tracepoint.h (struct scoped_restore_current_traceframe): New.
12446         * infrun.c (fetch_inferior_event): Use
12447         scoped_restore_current_traceframe.
12448
12449 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12450
12451         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12452         Remove.
12453         <n_allocated_type_units>: Remove.
12454         <all_type_units>: Change to std::vector.
12455         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12456         to std::vector change.
12457         (dwarf2_per_objfile::get_cutu): Likewise.
12458         (dwarf2_per_objfile::get_tu): Likewise.
12459         (create_signatured_type_table_from_index): Likewise.
12460         (create_signatured_type_table_from_debug_names): Likewise.
12461         (dw2_symtab_iter_next): Likewise.
12462         (dw2_print_stats): Likewise.
12463         (dw2_expand_all_symtabs): Likewise.
12464         (dw2_expand_marked_cus): Likewise.
12465         (dw2_debug_names_iterator::next): Likewise.
12466         (dwarf2_initialize_objfile): Likewise.
12467         (add_signatured_type_cu_to_table): Likewise.
12468         (create_all_type_units): Likewise.
12469         (add_type_unit): Likewise.
12470         (struct tu_abbrev_offset): Add constructor.
12471         (build_type_psymtabs_1): Adjust to std::vector change.
12472         (print_tu_stats): Likewise.
12473         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12474         (write_debug_names): Likewise.
12475
12476 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12477
12478         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
12479         Make an std::vector.
12480         <n_comp_units>: Remove.
12481         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12482         to std::vector change.
12483         (dwarf2_per_objfile::get_cutu): Likewise.
12484         (dwarf2_per_objfile::get_cu): Likewise.
12485         (create_cus_from_index): Likewise.
12486         (create_addrmap_from_index): Likewise.
12487         (create_addrmap_from_aranges): Likewise.
12488         (dwarf2_read_index): Likewise.
12489         (dw2_find_last_source_symtab): Likewise.
12490         (dw2_map_symtabs_matching_filename): Likewise.
12491         (dw2_symtab_iter_next): Likewise.
12492         (dw2_print_stats): Likewise.
12493         (dw2_expand_all_symtabs): Likewise.
12494         (dw2_expand_symtabs_with_fullname): Likewise.
12495         (dw2_expand_marked_cus): Likewise.
12496         (dw2_map_symbol_filenames): Likewise.
12497         (create_cus_from_debug_names): Likewise.
12498         (dwarf2_read_debug_names): Likewise.
12499         (dw2_debug_names_iterator::next): Likewise.
12500         (dwarf2_initialize_objfile): Likewise.
12501         (set_partial_user): Likewise.
12502         (dwarf2_build_psymtabs_hard): Likewise.
12503         (read_comp_units_from_section): Remove arguments, adjust to
12504         std::vector change.
12505         (create_all_comp_units): Adjust to std::vector and
12506         read_comp_units_from_section changes.
12507         (dwarf2_find_containing_comp_unit): Adjust to std::vector
12508         change.
12509         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12510         (psyms_seen_size): Likewise.
12511         (write_gdbindex): Likewise.
12512         (write_debug_names): Likewise.
12513
12514 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12515
12516         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
12517         with dwarf2_per_objfile.
12518         (create_cus_from_index): Likewise.
12519         (create_signatured_type_table_from_index): Likewise.
12520         (dwarf2_read_index): Likewise.
12521         (dwarf2_initialize_objfile): Likewise.
12522         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
12523         per_cu rather than get_dwarf2_per_objfile.
12524
12525 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12526
12527         * dwarf2read.h (struct signatured_type): Forward declare.
12528         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
12529         New methods.
12530         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
12531         (dw2_get_cutu): ...this.
12532         (dwarf2_per_objfile::get_cu): Rename from...
12533         (dw2_get_cu): ...this.
12534         (dwarf2_per_objfile::get_tu): New.
12535         (create_addrmap_from_index): Adjust.
12536         (create_addrmap_from_aranges): Adjust.
12537         (dw2_find_last_source_symtab): Adjust.
12538         (dw2_map_symtabs_matching_filename): Adjust.
12539         (dw2_symtab_iter_next): Adjust.
12540         (dw2_print_stats): Adjust.
12541         (dw2_expand_all_symtabs): Adjust.
12542         (dw2_expand_symtabs_with_fullname): Adjust.
12543         (dw2_expand_marked_cus): Adjust.
12544         (dw_expand_symtabs_matching_file_matcher): Adjust.
12545         (dw2_map_symbol_filenames): Adjust.
12546         (dw2_debug_names_iterator::next): Adjust.
12547         (dwarf2_initialize_objfile): Adjust.
12548         (set_partial_user): Adjust.
12549         (dwarf2_build_psymtabs_hard): Adjust.
12550
12551 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12552
12553         * dwarf2read.c (create_signatured_type_table_from_debug_names):
12554         Remove unused variables.
12555         (dw2_map_symtabs_matching_filename): Likewise.
12556         (dwarf2_record_block_ranges): Likewise.
12557         (dwarf2_read_addr_index): Likewise.
12558         (follow_die_offset): Likewise.
12559
12560 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12561
12562         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
12563         to symbol_file_add_main.
12564
12565 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12566
12567         PR mi/22299
12568         * mi/mi-console.c (do_fputc_async_safe): New.
12569         (mi_console_file::write_async_safe): New.
12570         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
12571         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
12572         New.
12573         * ui-file.c (ui_file::putstrn): Adjust call to
12574         fputstrn_unfiltered.
12575         * utils.c (printchar): Replace do_fputs and do_fprintf
12576         parameters by do_fputc.
12577         (fputstr_filtered): Adjust call to printchar.
12578         (fputstr_unfiltered): Likewise.
12579         (fputstrn_filtered): Likewise.
12580         (fputstrn_unfiltered): Add do_fputc parameter, pass to
12581         printchar.
12582         * utils.h (do_fputc_ftype): New typedef.
12583         (fputstrn_unfiltered): Add do_fputc parameter.
12584
12585 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12586
12587         * regformats/i386/i386-avx.dat: Remove.
12588
12589 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12590
12591         PR gdb/22979
12592         * amd64-tdep.c (amd64_none_init_abi): New function.
12593         (amd64_x32_none_init_abi): New function.
12594         (_initialize_amd64_tdep): Register handlers for x86-64 and
12595         x64_32 with GDB_OSABI_NONE.
12596         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
12597         GDB_OSABI_NONE osabi.
12598
12599 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12600
12601         PR gdb/22980
12602         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
12603         GDB_OSABI_NONE.
12604         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
12605         * osabi.c (gdb_osabi_names): Add "unknown" entry.
12606
12607 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12608
12609         * common/byte-vector.h (char_vector): New type.
12610         * target.h (target_read_alloc): Return
12611         gdb::optional<byte_vector>.
12612         (target_read_stralloc): Return gdb::optional<char_vector>.
12613         (target_get_osdata): Return gdb::optional<char_vector>.
12614         * target.c (target_read_alloc_1): Templatize.  Replacement
12615         manual memory management with vector.
12616         (target_read_alloc): Change return type, adjust.
12617         (target_read_stralloc): Change return type, adjust.
12618         (target_get_osdata): Change return type, adjust.
12619         * auxv.c (struct auxv_info) <length>: Remove.
12620         <data>: Change type to gdb::optional<byte_vector>.
12621         (auxv_inferior_data_cleanup): Free auxv_info with delete.
12622         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
12623         (target_auxv_search): Adjust.
12624         (fprint_target_auxv): Adjust.
12625         * avr-tdep.c (avr_io_reg_read_command): Adjust.
12626         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
12627         (linux_make_corefile_notes): Adjust.
12628         * osdata.c (get_osdata): Adjust.
12629         * remote.c (remote_get_threads_with_qxfer): Adjust.
12630         (remote_memory_map): Adjust.
12631         (remote_traceframe_info): Adjust.
12632         (btrace_read_config): Adjust.
12633         (remote_read_btrace): Adjust.
12634         (remote_pid_to_exec_file): Adjust.
12635         * solib-aix.c (solib_aix_get_library_list): Adjust.
12636         * solib-dsbt.c (decode_loadmap): Don't free buf.
12637         (dsbt_get_initial_loadmaps): Adjust.
12638         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
12639         * solib-target.c (solib_target_current_sos): Adjust.
12640         * tracepoint.c (sdata_make_value): Adjust.
12641         * xml-support.c (xinclude_start_include): Adjust.
12642         (xml_fetch_content_from_file): Adjust.
12643         * xml-support.h (xml_fetch_another): Change return type.
12644         (xml_fetch_content_from_file): Change return type.
12645         * xml-syscall.c (xml_init_syscalls_info): Adjust.
12646         * xml-tdesc.c (file_read_description_xml): Adjust.
12647         (fetch_available_features_from_target): Change return type.
12648         (target_fetch_description_xml): Adjust.
12649         (target_read_description_xml): Adjust.
12650
12651 2018-04-06  Tom Tromey  <tom@tromey.com>
12652
12653         * value.c (~value): Update.
12654         (struct value) <contents>: Now unique_xmalloc_ptr.
12655         (value_contents_bits_eq, allocate_value_contents)
12656         (value_contents_raw, value_contents_all_raw)
12657         (value_contents_for_printing, value_contents_for_printing_const)
12658         (set_value_enclosing_type): Update.
12659
12660 2018-04-06  Tom Tromey  <tom@tromey.com>
12661
12662         * value.c (range_s): Remove typedef, VEC.
12663         (struct range): Add operator<.
12664         (range_lessthan): Remove.
12665         (ranges_contain): Change type.
12666         (~value): Update.
12667         (struct value) <unavailable, optimized_out>: Now std::vector.
12668         (value_entirely_available)
12669         (value_entirely_covered_by_range_vector)
12670         (value_entirely_unavailable, value_entirely_optimized_out):
12671         Update.
12672         (insert_into_bit_range_vector): Change argument type.
12673         (find_first_range_overlap): Likewise.
12674         (struct ranges_and_idx, value_contents_bits_eq)
12675         (require_not_optimized_out, require_available): Update.
12676         (ranges_copy_adjusted): Change argument types.
12677         (value_optimized_out, value_copy, value_fetch_lazy): Update.
12678
12679 2018-04-06  Tom Tromey  <tom@tromey.com>
12680
12681         * value.c (~value): Update.
12682         (struct value) <parent>: Now a value_ref_ptr.
12683         (value_parent, set_value_parent, value_address, value_copy):
12684         Update.
12685
12686 2018-04-06  Tom Tromey  <tom@tromey.com>
12687
12688         * value.c (struct value): Add constructor, destructor, and member
12689         initializers.
12690         (allocate_value_lazy, value_decref): Update.
12691
12692 2018-04-06  Tom Tromey  <tom@tromey.com>
12693
12694         * value.c (struct value) <released, next>: Remove.
12695         (all_values): Now a std::vector.
12696         (allocate_value_lazy): Update.
12697         (value_next): Remove.
12698         (value_mark, value_free_to_mark, release_value)
12699         (value_release_to_mark): Update.
12700
12701 2018-04-06  Tom Tromey  <tom@tromey.com>
12702
12703         * value.h (fetch_subexp_value, value_release_to_mark): Update.
12704         (free_value_chain): Remove.
12705         * value.c (free_value_chain): Remove.
12706         (value_release_to_mark): Return a std::vector.
12707         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
12708         std::vector.
12709         (check_condition): Update.
12710         * eval.c (fetch_subexp_value): Change "val_chain" to a
12711         std::vector.
12712         * breakpoint.c (update_watchpoint): Update.
12713         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
12714
12715 2018-04-06  Tom Tromey  <tom@tromey.com>
12716
12717         * value.h (free_all_values): Remove.
12718         * value.c (free_all_values): Remove.
12719
12720 2018-04-06  Tom Tromey  <tom@tromey.com>
12721
12722         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
12723         (value_history_chain, value_history_count): Remove.
12724         (value_history): New global.
12725         (record_latest_value, access_value_history, show_values)
12726         (preserve_values): Update.
12727
12728 2018-04-06  Tom Tromey  <tom@tromey.com>
12729
12730         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
12731         * varobj.c (varobj_set_display_format, varobj_set_value)
12732         (install_default_visualizer, construct_visualizer)
12733         (install_new_value, ~varobj, varobj_get_value_type)
12734         (my_value_of_variable, varobj_editable_p): Update.
12735         * c-varobj.c (c_describe_child, c_value_of_variable)
12736         (cplus_number_of_children, cplus_describe_child): Update.
12737         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12738         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12739         (ada_value_of_variable, ada_value_is_changeable_p): Update.
12740
12741 2018-04-06  Tom Tromey  <tom@tromey.com>
12742
12743         * printcmd.c (last_examine_address): Change type to
12744         value_ref_ptr.
12745         (do_examine, x_command): Update.
12746
12747 2018-04-06  Tom Tromey  <tom@tromey.com>
12748
12749         * value.c (release_value): Update.
12750         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12751         (struct bpstats) <val>: Now a value_ref_ptr.
12752         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12753         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12754         (~watchpoint, print_it_watchpoint, watch_command_1)
12755         (invalidate_bp_value_on_memory_change): Update.
12756
12757 2018-04-06  Tom Tromey  <tom@tromey.com>
12758
12759         * varobj.c (varobj_clear_saved_item)
12760         (update_dynamic_varobj_children, install_new_value, ~varobj):
12761         Update.
12762         * value.h (value_incref): Move declaration earlier.
12763         (value_decref): Rename from value_free.
12764         (struct value_ref_policy): New.
12765         (value_ref_ptr): New typedef.
12766         (struct value_deleter): Remove.
12767         (gdb_value_up): Remove typedef.
12768         (release_value): Change return type.
12769         (release_value_or_incref): Remove.
12770         * value.c (set_value_parent): Update.
12771         (value_incref): Change return type.
12772         (value_decref): Rename from value_free.
12773         (value_free_to_mark, free_all_values, free_value_chain): Update.
12774         (release_value): Return value_ref_ptr.
12775         (release_value_or_incref): Remove.
12776         (record_latest_value, set_internalvar, clear_internalvar):
12777         Update.
12778         * stack.c (info_frame_command): Don't call value_free.
12779         * python/py-value.c (valpy_dealloc, valpy_new)
12780         (value_to_value_object): Update.
12781         * printcmd.c (do_examine): Update.
12782         * opencl-lang.c (lval_func_free_closure): Update.
12783         * mi/mi-main.c (register_changed_p): Don't call value_free.
12784         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12785         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12786         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12787         value_free.
12788         * guile/scm-value.c (vlscm_free_value_smob)
12789         (vlscm_scm_from_value): Update.
12790         * frame.c (frame_register_unwind, frame_unwind_register_signed)
12791         (frame_unwind_register_unsigned, get_frame_register_bytes)
12792         (put_frame_register_bytes): Don't call value_free.
12793         * findvar.c (address_from_register): Don't call value_free.
12794         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12795         * dwarf2loc.c (entry_data_value_free_closure)
12796         (value_of_dwarf_reg_entry, free_pieced_value_closure)
12797         (dwarf2_evaluate_loc_desc_full): Update.
12798         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12799         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12800         (~watchpoint, watch_command_1)
12801         (invalidate_bp_value_on_memory_change): Update.
12802         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12803
12804 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12805
12806         PR gdb/23022
12807         * warning.m4: Add -Wno-error=deprecated-register.
12808         * configure: Re-generate.
12809
12810 2018-04-05  Tom Tromey  <tom@tromey.com>
12811
12812         * linespec.h: Remove include of "vec.h".
12813
12814 2018-04-05  Tom Tromey  <tom@tromey.com>
12815
12816         * linespec.c (typep): Remove typedef.
12817         (find_methods, find_superclass_methods): Take a std::vector.
12818         (find_method): Use std::vector.
12819
12820 2018-04-05  Tom Tromey  <tom@tromey.com>
12821
12822         * utils.c (compare_strings): Remove.
12823         * utils.h (compare_strings): Remove.
12824         * objc-lang.h (find_imps): Update.
12825         * objc-lang.c (find_methods): Take a std::vector.
12826         (uniquify_strings, find_imps): Likewise.
12827         * linespec.c (find_methods): Take a std::vector.
12828         (decode_objc): Use std::vector.
12829         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12830         a std::vector.
12831         (find_method, find_function_symbols): Use std::vector.
12832
12833 2018-04-05  Tom Tromey  <tom@tromey.com>
12834
12835         * completer.c (completion_tracker::completion_tracker): Remove
12836         cast.
12837         (completion_tracker::discard_completions): Likewise.
12838         * breakpoint.c (ambiguous_names_p): Remove cast.
12839         * ada-lang.c (_initialize_ada_language): Remove cast.
12840         * utils.h (streq): Update.
12841         (streq_hash): Add new declaration.
12842         * utils.c (streq): Return bool.
12843         (streq_hash): New function.
12844
12845 2018-04-05  Tom Tromey  <tom@tromey.com>
12846
12847         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12848         Remove a string copy.
12849
12850 2018-04-05  Tom Tromey  <tom@tromey.com>
12851
12852         * linespec.c (filter_results): Use std::vector.
12853         (decode_line_2, decode_line_full): Update.
12854
12855 2018-04-05  Tom Tromey  <tom@tromey.com>
12856
12857         * linespec.c (canonical_to_fullform): Return std::string.
12858         (filter_results): Update.
12859         (struct decode_line_2_item): Add constructor.
12860         <fullform, displayform>: Now std::string.
12861         (decode_line_2_compare_items): Now a std::sort comparator.
12862         (decode_line_2): Update.
12863
12864 2018-04-05  Tom Tromey  <tom@tromey.com>
12865
12866         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12867         (unexpected_linespec_error): Update.
12868         (linespec_parse_basic, parse_linespec): Update.
12869
12870 2018-04-05  Tom Tromey  <tom@tromey.com>
12871
12872         * linespec.c (linespec_parse_basic): Reindent.
12873
12874 2018-04-05  Tom Tromey  <tom@tromey.com>
12875
12876         * minsyms.h (iterate_over_minimal_symbols): Update.
12877         * minsyms.c (iterate_over_minimal_symbols): Take a
12878         gdb::function_view.
12879         * linespec.c (struct collect_minsyms): Remove.
12880         (compare_msyms): Now a std::sort comparator.
12881         (add_minsym): Add parameters.
12882         (search_minsyms_for_name): Update.  Use std::vector.
12883
12884 2018-04-03  Tom Tromey  <tom@tromey.com>
12885
12886         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12887         gdb::byte_vector.
12888
12889 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12890
12891         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12892
12893 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12894
12895         PR gdb/16959
12896         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12897         printing static type.
12898
12899 2018-04-01  Tom Tromey  <tom@tromey.com>
12900
12901         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12902         (rs6000_xfer_shared_libraries): Update.
12903
12904 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12905
12906         * common/gdb_vecs.h (char_ptr): Remove.
12907         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12908
12909 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12910
12911         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12912         with std::vector.
12913         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12914
12915 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12916
12917         * tracepoint.h (struct uploaded_tp): Initialize fields.
12918         <actions, step_actions, cmd_strings>: Change type to
12919         std::vector<char *>.
12920         * tracepoint.c (get_uploaded_tp): Allocate with new.
12921         (free_uploaded_tps): Free with delete.
12922         (parse_tracepoint_definition): Adjust to std::vector change.
12923         * breakpoint.c (read_uploaded_action): Likewise.
12924         (create_tracepoint_from_upload): Likewise.
12925         * ctf.c (ctf_write_uploaded_tp): Likewise.
12926         (SET_ARRAY_FIELD): Likewise.
12927         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12928
12929 2018-03-30  Tom Tromey  <tom@tromey.com>
12930
12931         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12932         std::unique_ptr.
12933         (svr4_keep_data_in_core): Update.
12934         (svr4_read_so_list): Update.
12935
12936 2018-03-30  Tom Tromey  <tom@tromey.com>
12937
12938         * windows-nat.c (handle_output_debug_string, handle_exception):
12939         Update.
12940         * target.h (target_read_string): Update.
12941         * target.c (target_read_string): Change "string" to
12942         unique_xmalloc_ptr.
12943         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12944         Update.
12945         * solib-frv.c (frv_current_sos): Update.
12946         * solib-dsbt.c (dsbt_current_sos): Update.
12947         * solib-darwin.c (darwin_current_sos): Update.
12948         * linux-thread-db.c (inferior_has_bug): Update.
12949         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12950         Update.  Remove alloca.
12951         * ada-lang.c (ada_main_name): Update.
12952
12953 2018-03-30  Tom Tromey  <tom@tromey.com>
12954
12955         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12956         (struct dwo_file_deleter): New.
12957         (dwo_file_up): New typedef.
12958         (open_and_init_dwo_file): Use dwo_file_up.
12959         (free_dwo_file_cleanup): Remove.
12960
12961 2018-03-30  Tom Tromey  <tom@tromey.com>
12962
12963         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12964         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12965
12966 2018-03-30  Tom Tromey  <tom@tromey.com>
12967
12968         * dwarf2read.c (class free_cached_comp_units): New class.
12969         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12970         (free_cached_comp_units): Remove function.
12971
12972 2018-03-30  Tom Tromey  <tom@tromey.com>
12973
12974         * utils.h (make_cleanup_unpush_target): Remove.
12975         * inf-ptrace.c (struct target_unpusher): New.
12976         (target_unpush_up) New typedef.
12977         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12978         target_unpush_up.
12979         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12980
12981 2018-03-27  Tom Tromey  <tom@tromey.com>
12982
12983         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12984
12985 2018-03-27  Pedro Alves  <palves@redhat.com>
12986             Tom Tromey  <tom@tromey.com>
12987
12988         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12989         destructor.  Now a class.
12990         (gdb_readline_wrapper_cleanup): Remove function.
12991         (gdb_readline_wrapper): Remove cleanups.
12992
12993 2018-03-27  Tom Tromey  <tom@tromey.com>
12994
12995         * typeprint.h (struct type_print_options) <local_typedefs,
12996         global_typedefs>: Remove "struct" keyword.
12997         (class typedef_hash_table): New class.
12998         (recursively_update_typedef_hash, add_template_parameters)
12999         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13000         (find_typedef_in_hash): Don't declare.
13001         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13002         (typedef_hash_table::recursively_update): Rename from
13003         recursively_update_typedef_hash.  Now a member.
13004         (typedef_hash_table::add_template_parameters): Rename from
13005         add_template_parameters.  Now a member.
13006         (typedef_hash_table::typedef_hash_table): Now a constructor;
13007         rename from create_typedef_hash.
13008         (typedef_hash_table::~typedef_hash_table): Now a destructor;
13009         rename from free_typedef_hash.
13010         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13011         (do_free_global_table): Remove.
13012         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13013         from copy_type_recursive.
13014         (create_global_typedef_table): Remove.
13015         (typedef_hash_table::find_global_typedef): Now a member of
13016         typedef_hash_table.
13017         (typedef_hash_table::find_typedef): Rename from
13018         find_typedef_in_hash; now a member.
13019         (whatis_exp): Update.
13020         * extension.h (struct ext_lang_type_printers): Add constructor and
13021         destructor.
13022         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13023         declare.
13024         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13025         Now a constructor; rename from start_ext_lang_type_printers.
13026         (ext_lang_type_printers): Now a destructor; rename from
13027         free_ext_lang_type_printers.
13028         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13029         Update.
13030         (c_type_print_base_struct_union): Update.  Remove cleanups.
13031
13032 2018-03-27  Tom Tromey  <tom@tromey.com>
13033
13034         * dwarf-index-write.c: Include <cmath>.
13035
13036 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13037
13038         * NEWS: Add entry describing new "set|show varsize-limit" command.
13039         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13040         command.
13041         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13042         "set variable".
13043
13044 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13045
13046         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13047         dwarf-index-write.c
13048         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13049         * dwarf-index-common.c: New file.
13050         * dwarf-index-common.h: New file.
13051         * dwarf-index-write.c: New file.
13052         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13053         (struct dwarf2_section_info): Move from here.
13054         (dwarf2_section_info_def): Likewise.
13055         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13056         (offset_type): Likewise.
13057         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13058         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13059         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13060         (byte_swap): Likewise.
13061         (MAYBE_SWAP): Likewise.
13062         (dwarf2_per_cu_ptr): Likewise.
13063         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13064         (struct tu_stats): Likewise.
13065         (struct dwarf2_per_objfile): Likewise.
13066         (struct dwarf2_per_cu_data): Likewise.
13067         (struct signatured_type): Likewise.
13068         (sig_type_ptr): Likewise.
13069         (DEF_VEC_P (sig_type_ptr)): Likewise.
13070         (INDEX4_SUFFIX): Likewise.
13071         (INDEX5_SUFFIX): Likewise.
13072         (DEBUG_STR_SUFFIX): Likewise.
13073         (dwarf2_read_section): Make non-static.
13074         (mapped_index_string_hash): Move from here.
13075         (dwarf5_djb_hash): Likewise.
13076         (file_write): Likewise.
13077         (class data_buf): Likewise.
13078         (struct symtab_index_entry): Likewise.
13079         (struct mapped_symtab): Likewise.
13080         (find_slot): Likewise.
13081         (hash_expand): Likewise.
13082         (add_index_entry): Likewise.
13083         (uniquify_cu_indices): Likewise.
13084         (class c_str_view): Likewise.
13085         (class c_str_view_hasher): Likewise.
13086         (class vector_hasher): Likewise.
13087         (write_hash_table): Likewise.
13088         (psym_index_map): Likewise.
13089         (struct addrmap_index_data): Likewise.
13090         (add_address_entry): Likewise.
13091         (add_address_entry_worker): Likewise.
13092         (write_address_map): Likewise.
13093         (symbol_kind): Likewise.
13094         (write_psymbols): Likewise.
13095         (struct signatured_type_index_data): Likewise.
13096         (write_one_signatured_type): Likewise.
13097         (recursively_count_psymbols): Likewise.
13098         (recursively_write_psymbols): Likewise.
13099         (class debug_names): Likewise.
13100         (check_dwarf64_offsets): Likewise.
13101         (psyms_seen_size): Likewise.
13102         (write_gdbindex): Likewise.
13103         (write_debug_names): Likewise.
13104         (assert_file_size): Likewise.
13105         (write_psymtabs_to_index): Likewise.
13106         (save_gdb_index_command): Likewise.
13107         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13108         command.
13109         * dwarf2read.h: New file.
13110
13111 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13112
13113         PR gdb/22670
13114         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13115         symbol name if the CU's language stores symbol names in linkage
13116         format.
13117         * language.h (struct language_defn)
13118         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13119         all instances of this struct.
13120
13121 2018-03-26  Tom Tromey  <tom@tromey.com>
13122
13123         * stack.c (backtrace_command_1): Remove verbose code.
13124
13125 2018-03-26  Tom Tromey  <tom@tromey.com>
13126
13127         * python/py-framefilter.c (py_print_type): Don't catch
13128         exceptions.  Return void.
13129         (py_print_value): Likewise.
13130         (py_print_single_arg): Likewise.
13131         (enumerate_args): Don't catch exceptions.
13132         (py_print_args): Likewise.
13133         (py_print_frame): Likewise.
13134         (gdbpy_apply_frame_filter): Catch exceptions here.
13135
13136 2018-03-26  Tom Tromey  <tom@tromey.com>
13137
13138         * stack.c (_initialize_stack): Remove trailing newlines from help
13139         text.  Add "Usage" line to "backtrace" help.
13140
13141 2018-03-26  Tom Tromey  <tom@tromey.com>
13142
13143         PR python/16486:
13144         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13145
13146 2018-03-26  Tom Tromey  <tom@tromey.com>
13147
13148         * python/py-framefilter.c (py_print_single_arg): Return
13149         EXT_LANG_BT_ERROR from catch.
13150
13151 2018-03-26  Tom Tromey  <tom@tromey.com>
13152
13153         PR backtrace/15584:
13154         * stack.c (backtrace_command_1): Move some code into no-filters
13155         "if".
13156
13157 2018-03-26  Tom Tromey  <tom@tromey.com>
13158
13159         * python/py-framefilter.c (throw_quit_or_print_exception): New
13160         function.
13161         (gdbpy_apply_frame_filter): Use it.
13162
13163 2018-03-26  Tom Tromey  <tom@tromey.com>
13164
13165         PR cli/17716:
13166         * python/py-framefilter.c (py_print_type, py_print_value)
13167         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13168         RETURN_MASK_ERROR.
13169
13170 2018-03-26  Tom Tromey  <tom@tromey.com>
13171
13172         * python/py-framefilter.c (enumerate_args): Use
13173         gdb::unique_xmalloc_ptr.
13174
13175 2018-03-26  Tom Tromey  <tom@tromey.com>
13176
13177         * python/py-framefilter.c (py_print_frame): Return
13178         EXT_LANG_BT_OK.
13179         (gdbpy_apply_frame_filter): Update comment.
13180         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13181         Remove.
13182         <EXT_LANG_BT_NO_FILTERS>: Change value.
13183
13184 2018-03-26  Tom Tromey  <tom@tromey.com>
13185
13186         PR backtrace/15582:
13187         * stack.c (backtrace_command): Parse "hide" argument.
13188         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13189         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13190         constant.
13191
13192 2018-03-26  Tom Tromey  <tom@tromey.com>
13193
13194         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13195         add "flags".
13196         (backtrace_command): Remove "fulltrace", add "flags".
13197
13198 2018-03-26  Tom Tromey  <tom@tromey.com>
13199
13200         * stack.c (backtrace_command): Rewrite command line parsing.
13201
13202 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13203
13204         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13205
13206 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13207
13208         * filename-seen-cache.h: Add include guard.
13209
13210 2018-03-26  Keith Seitz  <keiths@redhat.com>
13211
13212         * symfile.c (place_section): Remove "struct" from section_addr_info
13213         in comment.
13214         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13215         "struct" keyword from section_addr_info.
13216
13217 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13218
13219         * regformats/regdef.h (reg): Add constructors.
13220
13221 2018-03-25  Pedro Alves  <palves@redhat.com>
13222
13223         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13224         if then/else bodies in var_func_name extraction.
13225
13226 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13227
13228         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13229         lookup_minimal_symbol() to find symbol entry.
13230         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13231
13232 2018-03-23  Keith Seitz  <keiths@redhat.com>
13233
13234         PR c++/22968
13235         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13236         nested type definitions for C++, too.
13237
13238 2018-03-23  Tom Tromey  <tom@tromey.com>
13239
13240         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13241         a typedef.
13242         (macho_register_oso): Remove.
13243         (macho_symtab_read): Take a std::vector.
13244         (oso_el_compare_name): Now a std::sort comparator.
13245         (macho_symfile_read_all_oso): Take a std::vector.
13246         (macho_symfile_read): Use std::vector.  Remove cleanups.
13247
13248 2018-03-22  Tom Tromey  <tom@tromey.com>
13249
13250         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13251         (record_full_goto_bookmark): Use std::string.
13252
13253 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13254
13255         PR tdep/18295
13256         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13257         a single mask.
13258
13259 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13260
13261         * rs6000-tdep.c (store_insn_p): New function.
13262         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13263         and cr_reg to their unshifted values. Use store_insn_p to
13264         match LR saves using either R1 or fdata->alloca_reg. Use
13265         store_insn_p to match CR saves. Set alloca_reg_offset
13266         when alloca_reg and framep are set. Remove lr_reg shift
13267         when assigning to fdata->lr_register.
13268
13269 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13270
13271         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13272         command line args instead of emitting a warning.
13273
13274 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13275
13276         * tracepoint.h (struct static_tracepoint_marker): Initialize
13277         fields, define default constructor, move constructor and move
13278         assignment, disable the rest.
13279         <str_id, extra>: Make std::string.
13280         (release_static_tracepoint_marker): Remove.
13281         (free_current_marker): Remove.
13282         * tracepoint.c (free_current_marker): Remove.
13283         (parse_static_tracepoint_marker_definition): Adjust to
13284         std::string, use new hex2str overload.
13285         (release_static_tracepoint_marker): Remove.
13286         (print_one_static_tracepoint_marker): Get marker by reference
13287         and adjust to std::string.
13288         (info_static_tracepoint_markers_command): Adjust to std::vector
13289         changes
13290         * target.h (static_tracepoint_marker_p): Remove typedef.
13291         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13292         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13293         bool.
13294         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13295         * target-debug.h
13296         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13297         (target_debug_print_std_vector_static_tracepoint_marker): New.
13298         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13299         to...
13300         (target_debug_print_static_tracepoint_marker_p): ... this.
13301         * target-delegates.c: Re-generate.
13302         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13303         Make std::string.
13304         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13305         (decode_static_tracepoint_spec): Adjust to std::vector.
13306         (tracepoint_print_one_detail): Adjust to std::string.
13307         (strace_marker_decode_location): Adjust to std::string.
13308         (update_static_tracepoint): Adjust to std::string, remove call
13309         to release_static_tracepoint_marker.
13310         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13311         Adjust to std::vector.
13312         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13313         (remote_static_tracepoint_markers_by_strid): Adjust to
13314         std::vector.
13315         * common/rsp-low.h (hex2str): New overload with explicit count
13316         of bytes.
13317         * common/rsp-low.c (hex2str): New overload with explicit count
13318         of bytes.
13319         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13320         (_initialize_rsp_low_selftests): Add test_hex2str test.
13321         * unittests/tracepoint-selftests.c
13322         (test_parse_static_tracepoint_marker_definition): Adjust to
13323         std::string.
13324
13325 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13326
13327         * tracepoint.c (parse_static_tracepoint_marker_definition):
13328         Consider case where the definition is followed by more
13329         definitions.
13330         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13331         tracepoint-selftests.c.
13332         * unittests/tracepoint-selftests.c: New.
13333
13334 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13335
13336         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13337         Carvalho.
13338
13339 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13340
13341         * symtab.c (find_pc_sect_line): fixed indentation.
13342
13343 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13344
13345         * symtab.c (find_pc_sect_line): now uses binary search.
13346
13347 2018-03-19  Tom Tromey  <tom@tromey.com>
13348
13349         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13350         "IDENT" production.
13351
13352 2018-03-19  Pedro Alves  <palves@redhat.com>
13353             Tom Tromey  <tom@tromey.com>
13354
13355         * unittests/observable-selftests.c: New file.
13356         * common/observable.h: New file.
13357         * observable.h: New file.
13358         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13359         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13360         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13361         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13362         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13363         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13364         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13365         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13366         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13367         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13368         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13369         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13370         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13371         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13372         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13373         tui/tui-interp.c, valops.c: Update all users.
13374         * tui/tui-hooks.c (tui_bp_created_observer)
13375         (tui_bp_deleted_observer, tui_bp_modified_observer)
13376         (tui_inferior_exit_observer, tui_before_prompt_observer)
13377         (tui_normal_stop_observer, tui_register_changed_observer):
13378         Remove.
13379         (tui_observers_token): New global.
13380         (attach_or_detach, tui_attach_detach_observers): New functions.
13381         (tui_install_hooks, tui_remove_hooks): Use
13382         tui_attach_detach_observers.
13383         * record-btrace.c (record_btrace_thread_observer): Remove.
13384         (record_btrace_thread_observer_token): New global.
13385         * observer.sh: Remove.
13386         * observer.c: Rename to observable.c.
13387         * observable.c (namespace gdb_observers): Define new objects.
13388         (observer_debug): Move into gdb_observers namespace.
13389         (struct observer, struct observer_list, xalloc_observer_list_node)
13390         (xfree_observer_list_node, generic_observer_attach)
13391         (generic_observer_detach, generic_observer_notify): Remove.
13392         (_initialize_observer): Update.
13393         Don't include observer.inc.
13394         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13395         (clean mostlyclean): Likewise.
13396         (observer.h, observer.inc): Remove targets.
13397         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13398         (COMMON_SFILES): Use observable.c, not observer.c.
13399         * .gitignore: Remove observer.h.
13400
13401 2018-03-18  Tom Tromey  <tom@tromey.com>
13402
13403         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13404         gdb::def_vector.
13405         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13406
13407 2018-03-17  Tom Tromey  <tom@tromey.com>
13408
13409         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13410
13411 2018-03-17  Tom Tromey  <tom@tromey.com>
13412
13413         * target.c (class scoped_target_fd): New.
13414         (target_fileio_close_cleanup): Remove.
13415         (target_fileio_read_alloc_1): Use scoped_target_fd.
13416
13417 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13418
13419         * silent-rules.mk: New.
13420         * Makefile.in: Include silent-rules.mk
13421         (srcdir, VPATH, top_srcdir): Move up.
13422         (COMPILE): Add ECHO_CXX.
13423         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13424         (init.c): Add ECHO_INIT_C.
13425         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13426         (version.c): Add ECHO_GEN.
13427         (printcmd.o): Add ECHO_CXX.
13428         (target-float.o): Add ECHO_CXX.
13429         (ada-exp.o): Add ECHO_CXX.
13430         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13431         (insight$(EXEEXT)): Add ECHO_CXXLD.
13432         * gnulib/configure.ac: Add AM_SILENT_RULES.
13433         * gnulib/aclocal.m4: Re-generate.
13434         * gnulib/configure: Re-generate.
13435         * gnulib/import/Makefile.in: Re-generate.
13436
13437 2018-03-16  Tom Tromey  <tom@tromey.com>
13438
13439         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13440         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13441         * utils.c (do_free_section_addr_info)
13442         (make_cleanup_free_section_addr_info): Remove.
13443         * symfile.h (struct other_sections): Add constructor.
13444         (struct section_addr_info): Remove.
13445         (section_addr_info): New typedef.
13446         (struct sym_fns) <sym_offsets>: Change type of parameter.
13447         (build_section_addr_info_from_objfile)
13448         (relative_addr_info_to_section_offsets, addr_info_make_relative)
13449         (default_symfile_offsets, symbol_file_add)
13450         (symbol_file_add_from_bfd)
13451         (build_section_addr_info_from_section_table): Update.
13452         (alloc_section_addr_info, free_section_addr_info): Don't declare.
13453         * symfile.c (alloc_section_addr_info): Remove.
13454         (build_section_addr_info_from_section_table): Change return type.
13455         Update.
13456         (build_section_addr_info_from_bfd)
13457         (build_section_addr_info_from_objfile): Likewise.
13458         (free_section_addr_info): Remove.
13459         (relative_addr_info_to_section_offsets): Change type of "addrs".
13460         (addrs_section_compar): Now a std::sort comparator.
13461         (addrs_section_sort): Change return type.
13462         (addr_info_make_relative): Change type of "addrs".  Update.
13463         (default_symfile_offsets, syms_from_objfile_1)
13464         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
13465         (symbol_file_add_separate): Update.
13466         (symbol_file_add): Change type of "addrs".  Update.
13467         (add_symbol_file_command): Update.  Remove cleanups.
13468         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
13469         cleanups.
13470         * symfile-debug.c (debug_sym_offsets): Change type of "info".
13471         * solib.c (solib_read_symbols): Update.
13472         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
13473         * machoread.c (macho_symfile_offsets): Update.
13474         * jit.c (jit_bfd_try_read_symtab): Update.
13475
13476 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
13477
13478         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13479         unittests/utils-selftests.c.
13480         * unittests/utils-selftests.c: New file.
13481
13482 2018-03-14  Tom Tromey  <tom@tromey.com>
13483
13484         PR cli/14977:
13485         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
13486         for NULL.
13487
13488 2018-03-14  Tom Tromey  <tom@tromey.com>
13489
13490         PR cli/19918:
13491         * printcmd.c (printf_pointer): Allow "-" in format.
13492
13493 2018-03-14  Tom Tromey  <tom@tromey.com>
13494
13495         * printcmd.c (_initialize_printcmd): Add usage to printf.
13496
13497 2018-03-14  Yao Qi  <qiyao@sourceware.org>
13498
13499         * MAINTAINERS: Update my email address.
13500
13501 2018-03-13  Tom Tromey  <tom@tromey.com>
13502
13503         * machoread.c (macho_check_dsym): Change filenamep to a
13504         std::string*.
13505         (macho_symfile_read): Update.
13506         * symfile.c (load_command): Use std::string.
13507
13508 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13509
13510         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
13511         to error message string.
13512         (riscv_register_name): Use xsnprintf instead of sprintf.
13513         (riscv_insn::fetch_instruction): Use gdb_assert instead of
13514         internal_error.
13515         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
13516         error.
13517         (riscv_push_dummy_call): Likewise.
13518
13519 2018-03-12  Tom Tromey  <tom@tromey.com>
13520
13521         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
13522         Use gdb::byte_vector.
13523         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
13524
13525 2018-03-12  Yao Qi  <yao.qi@linaro.org>
13526
13527         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
13528         parameter type to readable_regcache.
13529         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
13530         the declaration.
13531
13532 2018-03-11  Tom Tromey  <tom@tromey.com>
13533
13534         * dwarf2read.c (struct nextfield): Add initializers.
13535         (struct nextfnfield): Remove.
13536         (struct fnfieldlist): Add initializers.  Remove "length" and
13537         "head", use std::vector.
13538         (struct decl_field_list): Remove.
13539         (struct field_info): Add initializers.
13540         <fields, baseclasses>: Now std::vector.
13541         <nbaseclasses, nfnfields, typedef_field_list_count,
13542         nested_types_list_count>: Remove.
13543         (dwarf2_add_field, dwarf2_add_type_defn)
13544         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
13545         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
13546         (process_structure_scope): Update.
13547
13548 2018-03-11  Tom Tromey  <tom@tromey.com>
13549
13550         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
13551         for use by std::sort.
13552         (build_type_psymtabs_1): Use std::vector.
13553
13554 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
13555
13556         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
13557         and LIBMPFR in the printed configuration.
13558
13559 2018-03-08  Tom Tromey  <tom@tromey.com>
13560
13561         * source.c (get_filename_and_charpos): Use scoped_fd.
13562         * nto-procfs.c (procfs_open_1): Use scoped_fd.
13563         (procfs_pidlist): Likewise.
13564         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
13565         (iterate_over_mappings): Likewise.
13566
13567 2018-03-08  Tom Tromey  <tom@tromey.com>
13568
13569         * infcall.c (struct call_return_meta_info)
13570         <stack_temporaries_enabled>: Remove.
13571         (get_call_return_value, call_function_by_hand_dummy): Update.
13572         * thread.c (disable_thread_stack_temporaries): Remove.
13573         (enable_thread_stack_temporaries): Remove.
13574         (thread_stack_temporaries_enabled_p): Return bool.
13575         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
13576         (get_last_thread_stack_temporary): Update.
13577         * eval.c (evaluate_subexp): Update.
13578         * gdbthread.h (class enable_thread_stack_temporaries): Now a
13579         class, not a function.
13580         (value_ptr, value_vec): Remove typedefs.
13581         (class thread_info) <stack_temporaries_enabled>: Now bool.
13582         <stack_temporaries>: Now a std::vector.
13583         (thread_stack_temporaries_enabled_p)
13584         (value_in_thread_stack_temporaries): Return bool.
13585
13586 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
13587
13588         * remote.c (putpkt_binary): Fix omitted bytes reporting.
13589         (getpkt_or_notif_sane_1): Likewise.
13590
13591 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13592
13593         * build-id.c (build_id_to_debug_bfd): Use std::string.
13594
13595 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13596
13597         * build-id.c (find_separate_debug_file_by_buildid): Return
13598         std::string.
13599         * build-id.h (find_separate_debug_file_by_buildid): Return
13600         std::string.
13601         * coffread.c (coff_symfile_read): Adjust to std::string.
13602         * elfread.c (elf_symfile_read): Adjust to std::string.
13603         * symfile.c (separate_debug_file_exists): Change parameter to
13604         std::string.
13605         (find_separate_debug_file): Return std::string.
13606         (find_separate_debug_file_by_debuglink): Return std::string.
13607         * symfile.h (find_separate_debug_file_by_debuglink): Return
13608         std::string.
13609
13610 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13611
13612         * common/xml-utils.c (xml_escape_text): Move code to...
13613         (xml_escape_text_append): ... this new function.
13614         * common/xml-utils.h (xml_escape_text_append): New declaration.
13615         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
13616         New function.
13617         (_initialize_xml_utils): register test_xml_escape_text_append as
13618         a selftest.
13619
13620 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
13621
13622         * defs.h: Remove MAX_REGISTER_SIZE.
13623         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
13624         asserts.
13625         * python/py-unwind.c (pyuw_sniffer): Likewise.
13626
13627 2018-03-07  Tom Tromey  <tom@tromey.com>
13628
13629         * linux-tdep.c (linux_info_proc): Update.
13630         * target.h (struct target_ops) <to_fileio_readlink>: Return
13631         optional<string>.
13632         (target_fileio_readlink): Return optional<string>.
13633         * remote.c (remote_hostio_readlink): Return optional<string>.
13634         * inf-child.c (inf_child_fileio_readlink): Return
13635         optional<string>.
13636         * target.c (target_fileio_readlink): Return optional<string>.
13637
13638 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
13639
13640         * regcache.c (cooked_read_test): Add riscv to the list of
13641         architectures that have a save_reggroup.
13642
13643 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13644
13645         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
13646         value is not a dynamic class object.
13647
13648 2018-03-06  Tom Tromey  <tom@tromey.com>
13649
13650         * rust-exp.y: Formatting fixes.
13651
13652 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13653
13654         * riscv-tdep.c (riscv_register_name): Remove target description
13655         support.
13656         (riscv_gdbarch_init): Remove target description check.
13657
13658 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13659
13660         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
13661         comment.
13662         * riscv-tdep.h: Likewise.
13663
13664 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13665
13666         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
13667         (riscv_pseudo_register_write): Delete.
13668         (riscv_gdbarch_init): Remove all use of pseudo registers.
13669
13670 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13671
13672         * record-btrace.c (btrace_print_lines): Replace cleanup
13673         parameter with RAII equivalents.
13674         (btrace_insn_history): Replace cleanup with RAII equivalents.
13675         * ui-out.h (make_cleanup_ui_out_list_begin_end,
13676         make_cleanup_ui_out_tuple_begin_end): Remove.
13677         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
13678         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
13679         make_cleanup_ui_out_list_begin_end): Remove.
13680
13681 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13682
13683         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
13684         parameter types to std::vector.  Use bool.
13685         (record_btrace_wait): Replace VEC(tp_t) with
13686         std::vector<thread_info *>.
13687         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
13688
13689 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13690
13691         * record-btrace.c (record_btrace_disable_callback): Remove.
13692         (struct scoped_btrace_disable): New.
13693         (record_btrace_open): Use scoped_btrace_disable.
13694
13695 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13696
13697         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
13698         reading values from registers.
13699
13700 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13701
13702         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
13703         where appropriate.
13704
13705 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13706
13707         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
13708         change parameter type.  Use GDB's print functions, and use
13709         core_addr_to_string where appropriate.
13710         (riscv_push_dummy_call): Use core_addr_to_string where
13711         appropriate, update call to riscv_print_arg_location, and reindent
13712         a few lines.
13713         (riscv_return_value): Update call to riscv_print_arg_location.
13714
13715 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13716             Tim Newsome <tim@sifive.com>
13717             Albert Ou <a0u@eecs.berkeley.edu>
13718             Darius Rad <darius@bluespec.com>
13719
13720         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
13721         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
13722         (ALLDEPFILES): Add riscv-tdep.c
13723         * configure.tgt: Add riscv support.
13724         * riscv-tdep.c: New file.
13725         * riscv-tdep.h: New file.
13726         * NEWS: Mention new target.
13727         * MAINTAINERS: Add entry for riscv.
13728
13729 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13730
13731         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
13732         fields within aggregates.
13733
13734 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
13735
13736         * record-btrace.c (btrace_print_lines): Change type of flags to
13737         gdb_disassembly_flags.
13738
13739 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13740
13741         * fbsd-nat.c: Include "inf-ptrace.h".
13742         (USE_SIGTRAP_SIGINFO): Conditionally define.
13743         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13744         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13745         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13746         function.
13747         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13748         Likewise.
13749         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13750         Likewise.
13751         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13752         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13753         "supports_stopped_by_hw_breakpoint" target methods.
13754
13755 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13756
13757         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13758         * fbsd-nat.c (debug_fbsd_nat): New variable.
13759         (show_fbsd_nat_debug): New function.
13760         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13761         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13762
13763 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13764
13765         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13766         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13767         prototype.
13768         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13769         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13770         method.
13771
13772 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13773
13774         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13775         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13776
13777 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13778
13779         * charset.c (struct charset_vector): New.
13780         (charsets): Change type to charset_vector.
13781         (find_charset_names): Adjust.
13782         (add_one): Adjust.
13783         (_initialize_charset): Adjust.
13784
13785 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13786
13787         * progspace.h (struct program_space) <deleted_solibs>: Change
13788         type to std::vector<std::string>.
13789         * progspace.c (clear_program_space_solib_cache): Adjust.
13790         * breakpoint.c (print_solib_event): Adjust.
13791         (check_status_catch_solib): Adjust.
13792         * solib.c (update_solib_list): Adjust.
13793         * ui-out.h (class ui_out) <field_string>: New overload.
13794         * ui-out.c (ui_out::field_string): New overload.
13795
13796 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13797
13798         * progspace.h (struct program_space): Add constructor and
13799         destructor, initialize fields.
13800         (add_program_space): Remove.
13801         * progspace.c (add_program_space): Rename to...
13802         (program_space::program_space): ... this.
13803         (release_program_space): Rename to...
13804         (program_space::~program_space): ... this.
13805         (delete_program_space): Use delete to delete program_space.
13806         (initialize_progspace): Use new to allocate program_space.
13807         * inferior.c (add_inferior_with_spaces): Likewise.
13808         (clone_inferior_command): Likewise.
13809         * infrun.c (follow_fork_inferior): Likewise.
13810         (handle_vfork_child_exec_or_exit): Likewise.
13811
13812 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13813
13814         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13815         (delim_string_to_char_ptr_vec): Return std::vector of
13816         gdb::unique_xmalloc_ptr.
13817         (dirnames_to_char_ptr_vec_append): Take std::vector of
13818         gdb::unique_xmalloc_ptr.
13819         (dirnames_to_char_ptr_vec): Return std::vector of
13820         gdb::unique_xmalloc_ptr.
13821         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13822         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13823         (delim_string_to_char_ptr_vec): Return an std::vector of
13824         gdb::unique_xmalloc_ptr, adjust the code.
13825         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13826         gdb::unique_xmalloc_ptr, adjust the code.
13827         (dirnames_to_char_ptr_vec): Return an std::vector of
13828         gdb::unique_xmalloc_ptr, adjust the code.
13829         * auto-load.c (auto_load_safe_path_vec): Change type to
13830         std::vector of gdb::unique_xmalloc_ptr.
13831         (auto_load_expand_dir_vars): Return an std::vector of
13832         gdb::unique_xmalloc_ptr, adjust the code.
13833         (auto_load_safe_path_vec_update): Adjust.
13834         (filename_is_in_auto_load_safe_path_vec): Adjust.
13835         (auto_load_objfile_script_1): Adjust.
13836         * build-id.c (build_id_to_debug_bfd): Adjust.
13837         * linux-thread-db.c (thread_db_load_search): Adjust.
13838         * source.c (add_path): Adjust.
13839         (openp): Adjust.
13840         * symfile.c (find_separate_debug_file): Adjust.
13841         * utils.c (do_free_char_ptr_vec): Remove.
13842         (make_cleanup_free_char_ptr_vec): Remove.
13843
13844 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13845
13846         PR gdb/22907
13847         * common/pathstuff.c: Conditionally include "<windows.h>".
13848
13849 2018-03-01  Georg Sauthoff  <mail@georg.so>
13850
13851         PR gdb/22888
13852         * gcore.in: Quote variables and switch interpreter to bash.
13853
13854 2018-03-01  Tom Tromey  <tom@tromey.com>
13855
13856         * dwarf2read.c (alloc_discriminant_info): Fix default_index
13857         assertion.  Add assertion for discriminant_index.
13858         (quirk_rust_enum): Use correct base type name in univariant case.
13859
13860 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13861
13862         * record.c (get_call_history_modifiers): Return a
13863         record_print_flags.
13864         (cmd_record_call_history): Adjust.
13865         * record-btrace.c (record_btrace_call_history): Adjust.
13866         (record_btrace_call_history_range): Adjust.
13867         (record_btrace_call_history_from): Adjust.
13868         * target-debug.h (target_debug_print_record_print_flags): New.
13869         * target-delegates.c: Re-generate.
13870         * target.c (target_call_history): Change flags type.
13871         (target_call_history_from): Likewise.
13872         (target_call_history_range): Likewise.
13873         * target.h (struct target_ops) <target_call_history>: Likewise.
13874         (target_call_history_from): Likewise.
13875         (target_call_history_range): Likewise.
13876
13877 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13878             Simon Marchi  <simon.marchi@polymtl.ca>
13879
13880         * common/common-utils.c: Include "sys/stat.h".
13881         (is_regular_file): Move here from "source.c"; change return
13882         type to "bool".
13883         * common/common-utils.h (is_regular_file): New prototype.
13884         * common/pathstuff.c (contains_dir_separator): New function.
13885         * common/pathstuff.h (contains_dir_separator): New prototype.
13886         * source.c: Don't include "sys/stat.h".
13887         (is_regular_file): Move to "common/common-utils.c".
13888
13889 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13890
13891         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13892         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13893         * auto-load.c: Include "common/pathstuff.h".
13894         * common/common-def.h (current_directory): Move here.
13895         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13896         function.
13897         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13898         prototype.
13899         * common/pathstuff.c: New file.
13900         * common/pathstuff.h: New file.
13901         * compile/compile.c: Include "common/pathstuff.h".
13902         * defs.h (current_directory): Move to "common/common-defs.h".
13903         * dwarf2read.c: Include "common/pathstuff.h".
13904         * exec.c: Likewise.
13905         * guile/scm-safe-call.c: Likewise.
13906         * linux-thread-db.c: Likewise.
13907         * main.c: Likewise.
13908         * nto-tdep.c: Likewise.
13909         * objfiles.c: Likewise.
13910         * source.c: Likewise.
13911         * symtab.c: Likewise.
13912         * utils.c: Include "common/pathstuff.h".
13913         (gdb_realpath): Move to "common/pathstuff.c".
13914         (gdb_realpath_keepfile): Likewise.
13915         (gdb_abspath): Likewise.
13916         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13917         (gdb_realpath_keepfile): Likewise.
13918         (gdb_abspath): Likewise.
13919
13920 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13921
13922         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13923         wildcard process pid for super_resume for kernels with a
13924         specific bug.
13925
13926 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13927
13928         * compile/compile.c (get_args): Add additional comments
13929         explaining function.
13930
13931 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13932             Tom Tromey  <tom@tromey.com>
13933
13934         * target.h (memory_write_request_s): Remove typedef.  Don't define
13935         VEC.
13936         (target_write_memory_blocks): Change argument to std::vector.
13937         (struct memory_write_request): Add constructor.
13938         * target-memory.c (compare_block_starting_address): Return bool.
13939         Change argument types.
13940         (claim_memory): Change arguments to use std::vector.
13941         (split_regular_and_flash_blocks, blocks_to_erase)
13942         (compute_garbled_blocks): Likewise.
13943         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13944         (target_write_memory_blocks): Change argument to std::vector.
13945         * symfile.c (struct load_section_data): Add constructor and
13946         destructor.  Use std::vector for "requests".
13947         (struct load_progress_data): Add initializers.
13948         (load_section_callback): Update.  Use "new".
13949         (clear_memory_write_data): Remove.
13950         (generic_load): Update.
13951
13952 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13953
13954         * arch/aarch64.h: Use common/tdesc.h.
13955
13956 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13957
13958         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13959         architecture with a 64-bit ABI.
13960
13961 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13962
13963         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13964         ahead of target description loading.
13965
13966 2018-02-26  Tom Tromey  <tom@tromey.com>
13967
13968         * stack.c (backtrace_command_1): Update.
13969         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13970         of "flags".
13971         * python/py-framefilter.c (py_print_frame)
13972         (gdbpy_apply_frame_filter): Change type of "flags".
13973         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13974         of "flags".
13975         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13976         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13977         * extension.h (enum frame_filter_flag): Rename from
13978         frame_filter_flags.
13979         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13980         (apply_ext_lang_frame_filter): Change type of "flags".
13981         * extension.c (apply_ext_lang_frame_filter): Change type of
13982         "flags".
13983         * extension-priv.h (struct extension_language_ops)
13984         <apply_frame_filter>: Change type of "flags".
13985
13986 2018-02-26  Tom Tromey  <tom@tromey.com>
13987
13988         PR python/16497:
13989         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13990         off-by-one in py_end computation.
13991         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13992         PRINT_MORE_FRAMES.
13993         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13994         constant.
13995
13996 2018-02-26  Tom Tromey  <tom@tromey.com>
13997
13998         * dwarf2read.c (struct variant_field): New.
13999         (struct nextfield) <variant>: New field.
14000         (dwarf2_add_field): Handle DW_TAG_variant_part.
14001         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14002         discriminated union.
14003         (read_structure_type): Handle DW_TAG_variant_part.
14004         (handle_struct_member_die): New function, extracted from
14005         process_structure_scope.  Handle DW_TAG_variant.
14006         (process_structure_scope): Handle discriminated unions.  Call
14007         handle_struct_member_die.
14008
14009 2018-02-26  Tom Tromey  <tom@tromey.com>
14010
14011         * rust-lang.h (rust_last_path_segment): Declare.
14012         * rust-lang.c (rust_last_path_segment): Now public.  Change
14013         contract.
14014         (struct disr_info): Remove.
14015         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14016         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14017         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14018         (rust_enum_p, rust_enum_variant): New function.
14019         (rust_underscore_fields): Remove "offset" parameter.
14020         (rust_print_enum): New function.
14021         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14022         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14023         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14024         enums.
14025         (rust_internal_print_type): New function, from rust_print_type.
14026         Remove enum code.
14027         (rust_print_type): Call rust_internal_print_type.
14028         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14029         Update enum handling.
14030         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14031         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14032         (rust_union_quirks): New functions.
14033         (process_full_comp_unit, process_full_type_unit): Call
14034         rust_union_quirks.
14035         (process_structure_scope): Update rust_unions if necessary.
14036
14037 2018-02-26  Tom Tromey  <tom@tromey.com>
14038
14039         * value.h (value_union_variant): Declare.
14040         * valops.c (value_union_variant): New function.
14041         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14042         (struct discriminant_info): New.
14043         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14044         enumerator.
14045         (struct main_type) <flag_discriminated_union>: New field.
14046
14047 2018-02-26  Tom Tromey  <tom@tromey.com>
14048
14049         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14050         unittests/unpack-selftests.c.
14051         * unittests/unpack-selftests.c: New file.
14052         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14053
14054 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14055
14056         * dwarf2read.c (struct partial_die_info) <read>: New method.
14057         (read_partial_die): Remove the declaration.
14058         (load_partial_dies): Update.
14059         (partial_die_info::partial_die_info):
14060         (read_partial_die): Change it to partial_die_info::read.
14061
14062 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14063
14064         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14065         (fixup_partial_die): Remove declaration.
14066         (scan_partial_symbols): Update.
14067         (partial_die_parent_scope): Likewise.
14068         (partial_die_full_name): Likewise.
14069         (fixup_partial_die): Change it to partial_die_info::fixup.
14070
14071 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14072
14073         * dwarf2read.c (read_partial_die): Update the declaration.
14074         (load_partial_dies): Caller update.
14075         (read_partial_die): Remove one argument abbrev_len.
14076
14077 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14078
14079         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14080         assignment operator.
14081         (load_partial_dies): Use ctor and copy ctor.
14082         (read_partial_die): Update.
14083         (dwarf2_cu::find_partial_die): Use ctor.
14084
14085 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14086
14087         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14088         (find_partial_die_in_comp_unit): Change it to
14089         dwarf2_cu::find_partial_die.
14090         (find_partial_die): Update.
14091
14092 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14093
14094         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14095         is NULL.
14096
14097 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14098
14099         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14100
14101 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14102
14103         * arch/amd64.h: Use common/tdesc.h.
14104         * arch/i386.c: Likewise.
14105         * arch/i386.h: Likewise.
14106         * arch/tic6x.c: Likewise.
14107         * arch/tdesc.h: Move file from here...
14108         * common/tdesc.h: ...to here.
14109         * features/aarch64-core.c: Regenerate.
14110         * features/aarch64-fpu.c: Regenerate.
14111         * features/i386/32bit-avx.c: Regenerate.
14112         * features/i386/32bit-avx512.c: Regenerate.
14113         * features/i386/32bit-core.c: Regenerate.
14114         * features/i386/32bit-linux.c: Regenerate.
14115         * features/i386/32bit-mpx.c: Regenerate.
14116         * features/i386/32bit-pkeys.c: Regenerate.
14117         * features/i386/32bit-sse.c: Regenerate.
14118         * features/i386/64bit-avx.c: Regenerate.
14119         * features/i386/64bit-avx512.c: Regenerate.
14120         * features/i386/64bit-core.c: Regenerate.
14121         * features/i386/64bit-linux.c: Regenerate.
14122         * features/i386/64bit-mpx.c: Regenerate.
14123         * features/i386/64bit-pkeys.c: Regenerate.
14124         * features/i386/64bit-segments.c: Regenerate.
14125         * features/i386/64bit-sse.c: Regenerate.
14126         * features/i386/x32-core.c: Regenerate.
14127         * features/tic6x-c6xp.c: Regenerate.
14128         * features/tic6x-core.c: Regenerate.
14129         * features/tic6x-gp.c: Regenerate.
14130         * target-descriptions.c: Use common/tdesc.h.
14131         * target-descriptions.h: Likewise.
14132
14133 2018-02-24  Tom Tromey  <tom@tromey.com>
14134
14135         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14136         (try_thread_db_load_from_dir, thread_db_load_search): Use
14137         std::string.
14138         (info_auto_load_libthread_db_compare): Return bool.  Change
14139         argument types.
14140         (info_auto_load_libthread_db): Use std::vector, std::string.
14141         Remove cleanups.
14142
14143 2018-02-24  Tom Tromey  <tom@tromey.com>
14144
14145         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14146         std::string.
14147         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14148         std::string*.
14149         * gdbarch.c: Rebuild.
14150         * gdbarch.h: Rebuild.
14151         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14152         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14153         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14154         std::string*.
14155
14156 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14157
14158         * gdbtypes.h (sect_offset): Change type to uint64_t.
14159         (sect_offset_str): New function.
14160         * dwarf2read.c (create_addrmap_from_aranges): Use
14161         sect_offset_str.
14162         (error_check_comp_unit_head): Likewise.
14163         (create_debug_type_hash_table): Likewise.
14164         (read_cutu_die_from_dwo): Likewise.
14165         (init_cutu_and_read_dies): Likewise.
14166         (init_cutu_and_read_dies_no_follow): Likewise.
14167         (process_psymtab_comp_unit_reader): Likewise.
14168         (partial_die_parent_scope): Likewise.
14169         (peek_die_abbrev): Likewise.
14170         (process_queue): Likewise.
14171         (dwarf2_physname): Likewise.
14172         (read_namespace_alias): Likewise.
14173         (read_import_statement): Likewise.
14174         (create_dwo_cu_reader): Likewise.
14175         (create_cus_hash_table): Likewise.
14176         (lookup_dwo_cutu): Likewise.
14177         (inherit_abstract_dies): Likewise.
14178         (read_func_scope): Likewise.
14179         (read_call_site_scope): Likewise.
14180         (dwarf2_add_member_fn): Likewise.
14181         (read_common_block): Likewise.
14182         (read_module_type): Likewise.
14183         (read_typedef): Likewise.
14184         (read_subrange_type): Likewise.
14185         (load_partial_dies): Likewise.
14186         (read_partial_die): Likewise.
14187         (find_partial_die): Likewise.
14188         (read_str_index): Likewise.
14189         (dwarf2_string_attr): Likewise.
14190         (build_error_marker_type): Likewise.
14191         (lookup_die_type): Likewise.
14192         (dump_die_shallow): Likewise.
14193         (follow_die_ref): Likewise.
14194         (dwarf2_fetch_die_loc_sect_off): Likewise.
14195         (dwarf2_fetch_constant_bytes): Likewise.
14196         (follow_die_sig): Likewise.
14197         (get_signatured_type): Likewise.
14198         (get_DW_AT_signature_type): Likewise.
14199         (dwarf2_find_containing_comp_unit): Likewise.
14200         (set_die_type): Likewise.
14201
14202 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14203
14204         * arch/aarch64.c: Include "common-defs.h".
14205         * arch/amd64.c: Likewise.
14206         * arch/i386.c: Likewise.
14207
14208 2018-02-21  Tom Tromey  <tom@tromey.com>
14209
14210         * value.h: (extract_field_op): Update.
14211         * eval.c (extract_field_op): Return a const char *.
14212         * expression.h (parse_expression_for_completion): Update.
14213         * completer.c (complete_expression): Update.
14214         (add_struct_fields): Make fieldname const.
14215         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14216         (mark_completion_tag, parse_exp_in_context_1): Update.
14217         (parse_expression_for_completion): Change "name" to
14218         unique_xmalloc_ptr*.
14219
14220 2018-02-21  Tom Tromey  <tom@tromey.com>
14221
14222         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14223
14224 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14225
14226         * avr-tdep.c (avr_read_pc): Change parameter type to
14227         readable_regcache.
14228         * gdbarch.sh (read_pc): Likewise.
14229         * gdbarch.c: Re-generated.
14230         * gdbarch.h: Re-generated.
14231         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14232         readable_regcache.
14233         * ia64-tdep.c (ia64_read_pc): Likewise.
14234         * mips-tdep.c (mips_read_pc): Likewise.
14235         * spu-tdep.c (spu_read_pc): Likewise.
14236
14237 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14238
14239         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14240         * regcache-dump.c: New file.
14241         * regcache.c: Move register_dump to regcache-dump.c.
14242         (maintenance_print_registers): Likewise.
14243         (maintenance_print_raw_registers): Likewise.
14244         (maintenance_print_cooked_registers): Likewise.
14245         (maintenance_print_register_groups): Likewise.
14246         (maintenance_print_remote_registers): Likewise.
14247         (_initialize_regcache): Likewise.
14248         * regcache.h (register_dump): Moved from regcache.c.
14249
14250 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14251
14252         * regcache.c (regcache::regcache): Update.
14253         (regcache::invalidate): Move it to detached_regcache::invalidate.
14254         (get_thread_arch_aspace_regcache): Update.
14255         (regcache::raw_update): Update.
14256         (regcache::cooked_read): Remove some code.
14257         (regcache::cooked_read_value): Likewise.
14258         (regcache::raw_write): Remove assert on m_readonly_p.
14259         (regcache::raw_supply_integer): Move it to
14260         detached_regcache::raw_supply_integer.
14261         (regcache::raw_supply_zeroed): Likewise.
14262         * regcache.h (detached_regcache) <raw_supply_integer>: New
14263         declaration.
14264         <raw_supply_zeroed, invalidate>: Likewise.
14265         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14266         <invalidate>: Likewise.
14267         <m_readonly_p>: Removed.
14268
14269 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14270
14271         * infcmd.c (get_return_value): Let stop_regs point to
14272         get_current_regcache.
14273         * regcache.c (regcache::regcache): Remove.
14274         (register_dump_reg_buffer): New class.
14275         (regcache_print): Adjust.
14276         * regcache.h (regcache): Remove constructors.
14277
14278 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14279
14280         * regcache.c (class register_dump): New class.
14281         (register_dump_regcache, register_dump_none): New class.
14282         (register_dump_remote, register_dump_groups): New class.
14283         (regcache_print): Update.
14284         * regcache.h (regcache_dump_what): Move it to regcache.c.
14285         (regcache) <dump>: Remove.
14286
14287 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14288
14289         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14290          reg_buffer_rw *.
14291         (jit_unwind_reg_set_impl): Call raw_supply.
14292         (jit_frame_sniffer): Use reg_buffer_rw.
14293         * record-full.c (record_full_core_regbuf): Change its type.
14294         (record_full_core_open_1): Use reg_buffer_rw.
14295         (record_full_close): Likewise.
14296         (record_full_core_fetch_registers): Use regcache->raw_supply.
14297         (record_full_core_store_registers): Likewise.
14298         * regcache.c (regcache::get_register_status): Move it to
14299         reg_buffer.
14300         (regcache_raw_set_cached_value): Remove.
14301         (regcache::raw_set_cached_value): Remove.
14302         (regcache::raw_write): Call raw_supply.
14303         (regcache::raw_supply): Move it to reg_buffer_rw.
14304         * regcache.h (regcache_raw_set_cached_value): Remove.
14305         (reg_buffer_rw): New class.
14306
14307 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14308
14309         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14310         readonly_detached_regcache.
14311         (dummy_frame_prev_register): Use regcache->cooked_read.
14312         * frame.c (frame_save_as_regcache): Change return type.
14313         (frame_pop): Update.
14314         * frame.h (frame_save_as_regcache): Update declaration.
14315         * inferior.h (get_infcall_suspend_state_regcache): Update
14316         declaration.
14317         * infrun.c (infcall_suspend_state) <registers>: use
14318         readonly_detached_regcache.
14319         (save_infcall_suspend_state): Don't use regcache_dup.
14320         (get_infcall_suspend_state_regcache): Change return type.
14321         * linux-fork.c (struct fork_info) <savedregs>: Change to
14322         readonly_detached_regcache.
14323         <pc>: New field.
14324         (fork_save_infrun_state): Don't use regcache_dup.
14325         (info_checkpoints_command): Adjust.
14326         * mi/mi-main.c (register_changed_p): Update declaration.
14327         (mi_cmd_data_list_changed_registers): Use
14328         readonly_detached_regcache.
14329         (register_changed_p): Change parameter type to
14330         readonly_detached_regcache.
14331         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14332         readonly_detached_regcache.
14333         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14334         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14335         New.
14336         (regcache::save): Move it to reg_buffer.
14337         (regcache::restore): Change parameter type.
14338         (regcache_dup): Remove.
14339         * regcache.h (reg_buffer) <save>: New method.
14340         (readonly_detached_regcache): New class.
14341         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14342         readonly_detached_regcache.
14343         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14344
14345 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14346
14347         * frame.c (frame_save_as_regcache): Use regcache method save.
14348         (frame_pop): Use regcache method restore.
14349         * infrun.c (restore_infcall_suspend_state): Likewise.
14350         * linux-fork.c (fork_load_infrun_state): Likewise.
14351         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14352         save.
14353         * regcache.c (regcache_save): Remove.
14354         (regcache::restore): More asserts.
14355         (regcache_cpy): Remove.
14356         * regcache.h (regcache_save): Remove the declaration.
14357         (regcache::restore): Move from private to public.
14358         Remove the friend declaration of regcache_cpy.
14359         (regcache_cpy): Remove declaration.
14360
14361 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14362
14363         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14364         parameter type to 'readable_regcache *'.
14365         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14366         * arm-tdep.c (arm_neon_quad_read): Likewise.
14367         (arm_pseudo_read): Likewise.
14368         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14369         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14370         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14371         * gdbarch.c: Re-generated.
14372         * gdbarch.h: Re-generated.
14373         * gdbarch.sh (pseudo_register_read): Change parameter type to
14374         'readable_regcache *'.
14375         (pseudo_register_read_value): Likewise.
14376         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14377         (h8300_pseudo_register_read): Likewise.
14378         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14379         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14380         (i386_pseudo_register_read_into_value): Likewise.
14381         (i386_pseudo_register_read_value): Likewise.
14382         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14383         declaration.
14384         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14385         * m32c-tdep.c (m32c_raw_read): Likewise.
14386         (m32c_read_flg): Likewise.
14387         (m32c_banked_register): Likewise.
14388         (m32c_banked_read): Likewise.
14389         (m32c_sb_read): Likewise.
14390         (m32c_part_read): Likewise.
14391         (m32c_cat_read): Likewise.
14392         (m32c_r3r2r1r0_read): Likewise.
14393         (m32c_pseudo_register_read): Likewise.
14394         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14395         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14396         (mep_pseudo_cr64_read): Likewise.
14397         (mep_pseudo_register_read): Likewise.
14398         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14399         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14400         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14401         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14402         (regcache::cooked_read): Likewise.
14403         (regcache::cooked_read_value): Likewise.
14404         (regcache_cooked_read_signed):
14405         (regcache::cooked_read): Likewise.
14406         * regcache.h (readable_regcache): New class.
14407         (regcache): Inherit readable_regcache.  Move some methods to
14408         readable_regcache.
14409         * rl78-tdep.c (rl78_pseudo_register_read): Change
14410         parameter type to 'readable_regcache *'.
14411         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14412         (e500_pseudo_register_read): Change parameter type to
14413         'readable_regcache *'.
14414         (dfp_pseudo_register_read): Likewise.
14415         (vsx_pseudo_register_read): Likewise.
14416         (efpr_pseudo_register_read): Likewise.
14417         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14418         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14419         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14420         (sh64_pseudo_register_read): Likewise.
14421         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14422         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14423         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14424         (spu_pseudo_register_read): Likewise.
14425         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14426         (xtensa_pseudo_register_read): Likewise.
14427
14428 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14429
14430         * regcache.c (regcache::regcache): Call reg_buffer ctor.
14431         (regcache::arch): Move it to reg_buffer::arch.
14432         (regcache::register_buffer): Likewise.
14433         (regcache::assert_regnum): Likewise.
14434         (regcache::num_raw_registers): Likewise.
14435         * regcache.h (reg_buffer): New class.
14436         (regcache): Inherit reg_buffer.
14437
14438 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
14439
14440         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14441         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14442
14443 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
14444
14445         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14446
14447 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
14448
14449         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14450         (SFILES): Remove common/*.c files.
14451         (COMMON_OBS): Remove some *.o files built from common/*.c files.
14452         * common/common.host: Add common reference.
14453         * configure.ac: Likewise.
14454         * configure: Regenerate.
14455
14456 2018-02-16  Yao Qi  <yao.qi@linaro.org>
14457
14458         * block.c (block_namespace_info): Inherit allocate_on_obstack.
14459         (block_initialize_namespace): Use new.
14460         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
14461         (dwarf2_free_objfile): Use delete.
14462         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
14463         (copy_type_recursive): Use new.
14464         * gdb_obstack.h (allocate_on_obstack): New.
14465
14466 2018-02-15  Yao Qi  <yao.qi@linaro.org>
14467
14468         PR gdb/22849
14469         * inferior.c (exit_inferior_1): Reset inf->control.
14470
14471 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
14472
14473         * ada-lang.c (ada_to_fixed_value_create): Delete advance
14474         declaration.
14475
14476 2018-02-14  Pedro Alves  <palves@redhat.com>
14477
14478         * frame-unwind.c (frame_unwind_try_unwinder): Always call
14479         frame_cleanup_after_sniffer on exception.
14480
14481 2018-02-14  Tom Tromey  <tom@tromey.com>
14482
14483         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
14484         const.
14485         (solib_bfd_open): Make pathname const.
14486         * solib.c (solib_bfd_open): Make pathname const.
14487         * solib-spu.c (spu_bfd_fopen): Make name const.
14488         (spu_bfd_open): Make pathname const.
14489         * solib-darwin.c (darwin_bfd_open): Make pathname const.
14490         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
14491
14492 2018-02-14  Tom Tromey  <tom@tromey.com>
14493
14494         * symfile.c (symfile_bfd_open): Update.
14495         * source.h (openp, source_full_path_of, find_and_open_source):
14496         Change argument type to unique_xmalloc_ptr.
14497         * source.c (openp): Take a unique_xmalloc_ptr.
14498         (source_full_path_of, find_and_open_source): Likewise.
14499         (open_source_file, symtab_to_fullname): Update.
14500         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
14501         unique_xmalloc_ptr.
14502         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
14503         (exec_file_find): Update.
14504         * psymtab.c (psymtab_to_fullname): Update.
14505         * nto-tdep.h (nto_find_and_open_solib): Update.
14506         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
14507         unique_xmalloc_ptr.
14508         * exec.c (exec_file_attach): Update.
14509         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
14510         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
14511
14512 2018-02-14  Tom Tromey  <tom@tromey.com>
14513
14514         * solib.c: Include source.h.
14515         * nto-tdep.c: Include source.h.
14516         * mi/mi-cmd-env.c: Include source.h.
14517         * infcmd.c: Include source.h.
14518         * exec.c: Include source.h.
14519         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
14520         (add_path, directory_switch, source_path, init_source_path): Move
14521         declarations...
14522         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
14523         (add_path, directory_switch, source_path, init_source_path):
14524         ...here.
14525
14526 2018-02-14  Tom Tromey  <tom@tromey.com>
14527
14528         * solist.h (exec_file_find, solib_find): Return
14529         unique_xmalloc_ptr.
14530         (solib_bfd_fopen): Take a const char *.
14531         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
14532         (exec_file_find, solib_find): Likewise.
14533         (solib_bfd_fopen): Do not take ownership of "pathname".
14534         (solib_bfd_open): Use unique_xmalloc_ptr.
14535         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
14536         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
14537         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
14538         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
14539
14540 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
14541
14542         * ada-lang.c (name_match_type_from_name): Remove reference to
14543         ada_name_for_lookup in function's documentation.
14544         * ada-lang.h (ada_name_for_lookup): Delete declaration.
14545
14546 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14547
14548         * defs.h (enum openp_flags): New enum.
14549         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
14550         Move to enum openp_flags.
14551         (openp_flags): New enum flags.
14552         (openp): Change parameter type to openp_flags.
14553         * source.c (openp): Change parameter type to openp_flags.
14554         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
14555         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
14556
14557 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14558
14559         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
14560         per-command.
14561
14562 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14563
14564         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
14565         into...
14566         (class dwarf2_queue_guard): ...the destructor of this new class.
14567         (dw2_do_instantiate_symtab): Create instance of the new class
14568         dwarf2_queue_guard, remove cleanup.
14569
14570 2018-02-09  Tom Tromey  <tom@tromey.com>
14571
14572         * source.c (find_source_lines): Don't reference past the end of
14573         the vector.
14574
14575 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14576
14577         * remote.c (remote_btrace_maybe_reopen): Change error message.
14578         * btrace.c (btrace_enable): Likewise.
14579         (parse_xml_btrace): Likewise.
14580         (parse_xml_btrace_conf): Likewise.
14581
14582 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14583
14584         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
14585         (linux_enable_pt, linux_enable_bts): Call
14586         diagnose_perf_event_open_fail.
14587
14588 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14589
14590         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
14591         Remove parameter and change return type.  Update callers.  Move it.
14592         (linux_enable_bts, linux_enable_pt): Improve error message.
14593         (linux_enable_pt): Remove zero buffer size check.
14594         (linux_enable_btrace): Improve error messages.  Remove NULL return
14595         check.
14596
14597 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14598
14599         * btrace.c (btrace_enable): Remove target_supports_btrace call.
14600         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
14601         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
14602         (linux_supports_pt, linux_supports_btrace): Remove.
14603         (linux_enable_bts): Call cpu_supports_bts.
14604         * nat/linux-btrace.h (linux_supports_btrace): Remove.
14605         * remote.c (remote_supports_btrace): Remove.
14606         (init_remote_ops): Remove remote_supports_btrace.
14607         * target-delegates.c: Regenerated.
14608         * target.c (target_supports_btrace): Remove.
14609         * target.h (target_ops) <to_supports_btrace>: Remove
14610         (target_supports_btrace): Remove.
14611         * x86-linux-nat.c (x86_linux_create_target): Remove
14612         linux_supports_btrace.
14613
14614 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14615
14616         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
14617         btrace failed.
14618         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
14619         exception and use message in own exception.
14620
14621 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14622
14623         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
14624         (perf_event_pt_event_type): Use gdb_file_up.
14625         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
14626         scoped_fd, and scoped_mmap.
14627
14628 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14629
14630         * common/scoped_mmap.h: New.
14631         * unittests/scoped_mmap-selftest.c: New.
14632         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14633         unittests/scoped_mmap-selftest.c.
14634
14635 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14636
14637         * common/scoped_fd.h: New.
14638         * unittests/scoped_fd-selftest.c: New.
14639         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14640         unittests/scoped_fd-selftest.c.
14641
14642 2018-02-09  Tom Tromey  <tom@tromey.com>
14643
14644         * auto-load.c (auto_load_section_scripts): Use
14645         gdb::unique_xmalloc_ptr.
14646
14647 2018-02-09  Tom Tromey  <tom@tromey.com>
14648
14649         * auto-load.c (execute_script_contents): Use std::string.
14650
14651 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
14652
14653         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
14654         Python function, rather than a new command.
14655
14656 2018-02-08  Tom Tromey  <tom@tromey.com>
14657
14658         * solib.c (solib_find_1): Use std::string.
14659         (solib_bfd_fopen): Use unique_xmalloc_ptr.
14660
14661 2018-02-08  Tom Tromey  <tom@tromey.com>
14662
14663         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
14664
14665 2018-02-08  Tom Tromey  <tom@tromey.com>
14666
14667         * source.c (find_source_lines): Use gdb::def_vector.
14668
14669 2018-02-08  Tom Tromey  <tom@tromey.com>
14670
14671         * macrocmd.c (struct temporary_macro_definition): New.
14672         (macro_define_command): Use temporary_macro_definition.  Remove
14673         cleanups.
14674         (free_macro_definition_ptr): Remove.
14675
14676 2018-02-08  Tom Tromey  <tom@tromey.com>
14677
14678         * macroexp.c (maybe_expand): Use std::string.
14679
14680 2018-02-08  Tom Tromey  <tom@tromey.com>
14681
14682         * macroexp.c (struct macro_buffer): Add initializers for some
14683         members.
14684         (init_buffer, init_shared_buffer, free_buffer)
14685         (free_buffer_return_text): Remove.
14686         (macro_buffer): New constructors.
14687         (~macro_buffer): New destructor.
14688         (macro_buffer::set_shared): New method.
14689         (macro_buffer::resize_buffer, macro_buffer::appendc)
14690         (macro_buffer::appendmem): Now methods, not free functions.
14691         (set_token, append_tokens_without_splicing, stringify)
14692         (macro_stringify): Update.
14693         (gather_arguments): Change return type.  Remove argc_p argument,
14694         add args_ptr argument.  Use std::vector.
14695         (substitute_args): Remove argc argument.  Accept std::vector.
14696         (expand): Update.  Use std::vector.
14697         (scan, macro_expand, macro_expand_next): Update.
14698
14699 2018-02-08  Tom Tromey  <tom@tromey.com>
14700
14701         * symtab.c (default_collect_symbol_completion_matches_break_on):
14702         Use unique_xmalloc_ptr.
14703         * macroscope.h: (sal_macro_scope, user_macro_scope)
14704         (default_macro_scope): Return unique_xmalloc_ptr.
14705         * macroscope.c (sal_macro_scope, user_macro_scope)
14706         (default_macro_scope): Return unique_xmalloc_ptr.
14707         * macroexp.h (macro_expand, macro_expand_once): Return
14708         unique_xmalloc_ptr.
14709         * macroexp.c (macro_expand, macro_expand_once): Return
14710         unique_xmalloc_ptr.
14711         * macrocmd.c (macro_expand_command, macro_expand_once_command)
14712         (info_macro_command, info_macros_command): Use
14713         unique_xmalloc_ptr.
14714         * compile/compile-c-support.c (write_macro_definitions): Use
14715         unique_xmalloc_ptr.
14716         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
14717
14718 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
14719
14720         * value.c (value_static_field): Assign field type instead of
14721         containing type when returning an optimized out value.
14722
14723 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14724
14725         * ft32-tdep.c (ft32_read_pc): Remove.
14726         (ft32_write_pc): Remove.
14727         (ft32_gdbarch_init): Update.
14728         * m32r-tdep.c (m32r_read_pc): Remove.
14729         (m32r_gdbarch_init): Update.
14730         * mep-tdep.c (mep_read_pc): Remove.
14731         (mep_gdbarch_init): Update.
14732         * microblaze-tdep.c (microblaze_write_pc): Remove.
14733         (microblaze_gdbarch_init): Update.
14734         * mn10300-tdep.c (mn10300_read_pc): Remove.
14735         (mn10300_write_pc): Remove.
14736         (mn10300_gdbarch_init): Update.
14737         * moxie-tdep.c (moxie_read_pc): Remove.
14738         (moxie_write_pc): Remove.
14739         (moxie_gdbarch_init): Update.
14740
14741 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14742
14743         * expprint.c (print_subexp_standard): Handle
14744         OP_F77_UNDETERMINED_ARGLIST.
14745         (dump_subexp_body_standard): Likewise.
14746
14747 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
14748
14749         * target-descriptions.c (tdesc_element_visitor) Add empty
14750         implementations.
14751         (tdesc_type): Move make_gdb_type from here.
14752         (tdesc_type_builtin): Likewise.
14753         (tdesc_type_vector): Likewise.
14754         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14755         (make_gdb_type_struct): Move from tdesc_type_with_fields.
14756         (make_gdb_type_union): Likewise.
14757         (make_gdb_type_flags): Likewise.
14758         (make_gdb_type_enum): Likewise.
14759         (make_gdb_type): New function.
14760         (tdesc_register_type): Use static make_gdb_type.
14761
14762 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
14763
14764         * infcmd.c (default_print_one_register_info): Align natural-format
14765         column values consistently one under another.
14766         (pad_to_column): New function.
14767
14768 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
14769
14770         * dwarf2read.c (dwarf2_physname): Move commment.
14771
14772 2018-02-01  Leszek Swirski  <leszeks@google.com>
14773
14774         * varobj.c (varobj_formatted_print_options): Allow recursive
14775         pretty printing if pretty printing is enabled.
14776
14777 2018-02-01  Leszek Swirski  <leszeks@google.com>
14778
14779         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14780         names after a structop as a filename.
14781
14782 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14783
14784         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14785         (arm_record_coproc_data_proc): Likewise.
14786
14787 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14788
14789         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14790
14791 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
14792
14793         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14794         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14795
14796 2018-01-31  Pedro Alves  <palves@redhat.com>
14797
14798         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14799         * inflow.c (child_terminal_save_inferior): Wrap reference to
14800         tcgetpgrp in HAVE_TERMIOS_H.
14801         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14802         _WIN32.
14803         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14804         always iterate over all inferiors.
14805         (gdbsim_cntrl_c): Adjust.
14806         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14807
14808 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14809
14810         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14811         index type is objfile-owned if the element type is as well.
14812
14813 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14814
14815         GDB 8.1 released.
14816
14817 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14818
14819         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14820         "features/s390x-linux64.c".
14821         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14822         s390_linux32 and s390x_linux64.
14823         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14824         default tdesc.
14825         * s390-tdep.c: Include "features/s390-linux32.c" and
14826         "features/s390x-linux64.c".
14827         (s390_tdesc_valid): Add check for tdesc_has_registers.
14828         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14829         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14830         tdesc_s390x_linux64.
14831         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14832         tdesc_s390x_linux64 to...
14833         * s390-tdep.h: ...here.
14834
14835 2018-01-30  Pedro Alves  <palves@redhat.com>
14836
14837         PR gdb/13211
14838         * config.in, configure: Regenerate.
14839         * configure.ac: Check for getpgid.
14840         * go32-nat.c (go32_pass_ctrlc): New.
14841         (go32_target): Install it.
14842         * inf-child.c (inf_child_target): Install
14843         child_terminal_save_inferior, child_pass_ctrlc and
14844         child_interrupt.
14845         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14846         (inf_ptrace_target): No longer install it.
14847         * infcmd.c (interrupt_target_1): Adjust.
14848         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14849         (child_interrupt): Declare.
14850         (inferior::terminal_state): New.
14851         * inflow.c (struct terminal_info): Update comments.
14852         (inferior_process_group): Delete.
14853         (terminal_is_ours): Delete.
14854         (gdb_tty_state): New.
14855         (child_terminal_init): Adjust.
14856         (is_gdb_terminal, sharing_input_terminal_1)
14857         (sharing_input_terminal): New functions.
14858         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14859         Set the process's actual process group in the foreground if
14860         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14861         mark terminal as the inferior's if not sharing GDB's terminal.
14862         Don't check attach_flag.
14863         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14864         pass down a target_terminal_state.
14865         (child_terminal_save_inferior): New, factored out from ...
14866         (child_terminal_ours_1): ... this.  Handle
14867         target_terminal_state::is_ours_for_output.
14868         (child_interrupt, child_pass_ctrlc): New.
14869         (inflow_inferior_exit): Clear the inferior's terminal_state.
14870         (copy_terminal_info): Copy the inferior's terminal state.
14871         (_initialize_inflow): Remove reference to terminal_is_ours.
14872         * inflow.h (inferior_process_group): Delete.
14873         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14874         * procfs.c (procfs_target): Don't install procfs_interrupt.
14875         (procfs_interrupt): Delete.
14876         * remote.c (remote_serial_quit_handler): Adjust.
14877         (remote_interrupt): Remove ptid parameter.  Adjust.
14878         * target-delegates.c: Regenerate.
14879         * target.c: Include "terminal.h".
14880         (target_terminal::terminal_state): Rename to ...
14881         (target_terminal::m_terminal_state): ... this.
14882         (target_terminal::init): Adjust.
14883         (target_terminal::inferior): Adjust to per-inferior
14884         terminal_state.
14885         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14886         (target_terminal::ours, target_terminal::ours_for_output): Use
14887         target_terminal_is_ours_kind.
14888         (target_interrupt): Remove ptid parameter.  Adjust.
14889         (default_target_pass_ctrlc): Adjust.
14890         * target.h (target_ops::to_terminal_save_inferior): New field.
14891         (target_ops::to_interrupt): Remove ptid_t parameter.
14892         (target_interrupt): Remove ptid_t parameter.  Update comment.
14893         (target_pass_ctrlc): Update comment.
14894         * target/target.h (target_terminal_state): New scoped enum,
14895         factored out of ...
14896         (target_terminal::terminal_state): ... here.
14897         (target_terminal::inferior): Update comments.
14898         (target_terminal::restore_inferior): New.
14899         (target_terminal::is_inferior, target_terminal::is_ours)
14900         (target_terminal::is_ours_for_output): Adjust.
14901         (target_terminal::scoped_restore_terminal_state): Adjust to
14902         rename, and call restore_inferior() instead of inferior().
14903         (target_terminal::scoped_restore_terminal_state::m_state): Change
14904         type.
14905         (target_terminal::terminal_state): Rename to ...
14906         (target_terminal::m_terminal_state): ... this and change type.
14907
14908 2018-01-30  Pedro Alves  <palves@redhat.com>
14909
14910         * linux-nat.c (wait_for_signal): New function.
14911         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14912         directly.
14913         (async_terminal_is_ours)
14914         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14915         (linux_nat_add_target): Don't override
14916         to_terminal_inferior/to_terminal_ours.
14917
14918 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14919
14920         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14921
14922 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14923
14924         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14925         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14926         dwarf2_per_objfile_free here.
14927         (dwarf2_per_objfile_free): Remove.
14928         (_initialize_dwarf2_read): Don't register
14929         dwarf2_per_objfile_free as a registry cleanup.
14930
14931 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14932
14933         Avoid compilation errors in MinGW native builds
14934
14935         The error is triggered by including python-internal.h, and the
14936         error message is:
14937
14938              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14939                       from build-gnulib/import/math.h:27,
14940                       from d:/usr/Python26/include/pyport.h:235,
14941                       from d:/usr/Python26/include/Python.h:58,
14942                       from python/python-internal.h:94,
14943                       from python/py-arch.c:24:
14944              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14945         using ::hypot;
14946                 ^~~~~
14947
14948         This happens because Python headers define 'hypot' to expand t
14949         '_hypot' in the Windows builds.
14950         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14951         'hypoth'.  This avoids a compilation error.
14952
14953 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14954
14955         * MAINTAINERS (Write After Approval): Fix ordering.
14956
14957 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14958
14959         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14960
14961 2018-01-26  Alan Modra  <amodra@gmail.com>
14962
14963         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14964         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14965         Remove nop.  Make const.  Comment.
14966         (powerpc32_plt_stub_so_2): New.
14967         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14968         Correct count.  Update uses.
14969         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14970         Move common code reading PLT entry word.  Correct
14971         powerpc32_plt_stub PLT address calculation.
14972         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14973         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14974         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14975         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14976         (ppc64_standard_linkage8): Likewise.
14977         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14978         Correct insns description.
14979         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14980
14981 2018-01-24  Pedro Alves  <palves@redhat.com>
14982
14983         GCC PR libstdc++/83906
14984         * gdbtypes.c (operator==(const dynamic_prop &,
14985         const dynamic_prop &)): New.
14986         (operator==(const range_bounds &, const range_bounds &)): New.
14987         (check_types_equal): Use them instead of memcmp.
14988         * gdbtypes.h (operator==(const dynamic_prop &,
14989         const dynamic_prop &)): Declare.
14990         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14991         (operator==(const range_bounds &, const range_bounds &)): Declare.
14992         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14993
14994 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14995
14996         * s390-linux-tdep.c (s390_record_address_mask)
14997         (s390_record_calc_disp_common, s390_record_calc_disp)
14998         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14999         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15000         (s390_process_record): Move to s390-tdep.c.
15001         (s390_linux_init_abi_any): Adjust.
15002         * s390-tdep.c (s390_record_address_mask)
15003         (s390_record_calc_disp_common, s390_record_calc_disp)
15004         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15005         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15006         (s390_process_record): Moved from s390-linux-tdep.c
15007         (s390_gdbarch_init): Adjust.
15008
15009 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15010
15011         * s390-linux-nat.c (s390-tdep.h): New include.
15012         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15013         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15014         (ALLDEPFILES): Add s390-tdep.c.
15015         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15016         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15017         * s390-tdep.h: ...this.  New file.
15018         * s390-linux-tdep.c (s390-tdep.h): New include.
15019         (_initialize_s390_tdep): Rename to...
15020         (_initialize_s390_linux_tdep): ...this and adjust.
15021         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15022         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15023         s390-tdep.h.
15024         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15025         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15026         (s390_is_partial_instruction, s390_software_single_step)
15027         (is_non_branch_ril, s390_displaced_step_copy_insn)
15028         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15029         (s390_prologue_data, s390_addr, s390_store, s390_load)
15030         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15031         (s390_register_call_saved, s390_guess_tracepoint_registers)
15032         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15033         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15034         (s390_pseudo_register_name, s390_pseudo_register_type)
15035         (s390_pseudo_register_read, s390_pseudo_register_write)
15036         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15037         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15038         (s390_addr_bits_remove, s390_address_class_type_flags)
15039         (s390_address_class_type_flags_to_name)
15040         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15041         (s390_function_arg_float, s390_function_arg_vector)
15042         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15043         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15044         (s390_frame_align, s390_register_return_value, s390_return_value)
15045         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15046         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15047         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15048         (s390_trad_frame_prev_register, s390_unwind_cache)
15049         (s390_prologue_frame_unwind_cache)
15050         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15051         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15052         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15053         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15054         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15055         (s390_frame_base_address, s390_local_base_address)
15056         (s390_frame_base, s390_gcc_target_options)
15057         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15058         (s390_validate_reg_range, s390_tdesc_valid)
15059         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15060         * s390-tdep.c: ...this.  New file.
15061
15062 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15063
15064         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15065         (s390_process_record, s390_gdbarch_tdep_alloc)
15066         (s390_linux_init_abi_any): Use/set new hook.
15067
15068 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15069
15070         * s390-linux-tdep.c (osabi.h): New include.
15071         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15072         (s390_linux_init_abi_any): New functions.
15073         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15074
15075 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15076
15077         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15078         tdesc_has_registers check
15079
15080 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15081
15082         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15083         (s390_validate_reg_range): New macro.
15084         (s390_gdbarch_init): Adjust.
15085
15086 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15087
15088         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15089         (s390_gdbarch_tdep_alloc): Adjust.
15090         (s390_gdbarch_init): Adjust.
15091
15092 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15093
15094         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15095         <have_tdb>: Change type to bool.
15096         (s390_gdbarch_tdep_alloc): Adjust.
15097         (s390_gdbarch_init): Adjust.
15098
15099 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15100
15101         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15102         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15103         (s390_gdbarch_tdep_alloc): New function.
15104         (s390_gdbarch_init): Allocate tdep at start and use its fields
15105         instead of separate variables.
15106
15107 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15108
15109         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15110         when looking for cached gdbarch and add comment for remaining.
15111
15112 2018-01-22  Pedro Alves  <palves@redhat.com>
15113             Sergio Durigan Junior  <sergiodj@redhat.com>
15114
15115         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15116         case.
15117
15118 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15119
15120         * MAINTAINERS: Update my company e-mail address.
15121
15122 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15123
15124         * regcache.c (cooked_write_test): New function.
15125         (_initialize_regcache): Register the test.
15126
15127 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15128
15129         * ia64-tdep.c (ia64_pseudo_register_read): Call
15130         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15131         * m32c-tdep.c (m32c_cat_read): Likewise.
15132         (m32c_r3r2r1r0_read): Likewise.
15133         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15134         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15135
15136 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15137
15138         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15139         method raw_read instead of regcache_raw_read.
15140         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15141         * arm-tdep.c (arm_neon_quad_read): Likewise.
15142         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15143         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15144         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15145         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15146         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15147         (i386_pseudo_register_read_into_value): Likewise.
15148         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15149         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15150         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15151         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15152         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15153         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15154         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15155         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15156         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15157
15158 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15159
15160         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15161         * configure.tgt: Remove target mt.
15162         * mt-tdep.c: Remove.
15163         * regcache.c (cooked_read_test): Remove the check for mt.
15164
15165 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15166
15167         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15168         instead of gdbarch_pseudo_register_read_value.
15169
15170 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15171
15172         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15173         language is Ada.
15174
15175 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15176
15177         * linespec.c (create_sals_line_offset): Remove code that preserved
15178         the symtab_and_line's line number.
15179
15180 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15181
15182         * varobj.c (varobj_create): Don't set valid_block when creating a
15183         floating varobj.
15184
15185 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15186
15187         * varobj.c (varobj_create): Remove out of date comment.
15188
15189 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15190
15191         PR mi/20395
15192         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15193         updating innermost block.
15194         * parse.c (innermost_block_tracker::update): Take extra type
15195         parameter, and check types match before updating innermost block.
15196         (write_dollar_variable): Update innermost block for registers.
15197         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15198         (innermost_block_tracker::innermost_block_tracker): Initialise
15199         m_types member.
15200         (innermost_block_tracker::reset): Take type parameter.
15201         (innermost_block_tracker::update): Take type parameter, and pass
15202         type through as needed.
15203         (innermost_block_tracker::m_types): New member.
15204         * varobj.c (varobj_create): Pass type when reseting innermost
15205         block.
15206
15207 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15208
15209         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15210         * ada-lang.c (resolve_subexp): Likewise.
15211         * breakpoint.c (set_breakpoint_condition) Likewise.
15212         (watch_command_1) Likewise.
15213         * c-exp.y (variable): Likewise.
15214         * d-exp.y (PrimaryExpression): Likewise.
15215         * f-exp.y (variable): Likewise.
15216         * go-exp.y (variable): Likewise.
15217         * m2-exp.y (variable): Likewise.
15218         * objfiles.c (objfile::~objfile): Likewise.
15219         * p-exp.y (variable): Likewise.
15220         * parse.c (innermost_block): Change type.
15221         * parser-defs.h (class innermost_block_tracker): New.
15222         (innermost_block): Change to innermost_block_tracker.
15223         * printcmd.c (display_command): Switch to innermost_block API.
15224         (do_one_display): Likewise.
15225         * rust-exp.y (do_one_display): Likewise.
15226         * symfile.c (clear_symtab_users): Likewise.
15227         * varobj.c (varobj_create): Switch to innermost_block API, replace
15228         use of innermost_block with block stored on varobj object.
15229
15230 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15231
15232         * expression.h (innermost_block): Remove declaration.
15233         * varobj.c: Add 'parser-defs.h' include.
15234
15235 2018-01-19  Tom Tromey  <tom@tromey.com>
15236
15237         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15238         symbols in the static and global blocks.
15239
15240 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15241
15242         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15243         gdb_ptrace.h, and move including gdb_wait.h ...
15244         * nat/linux-ptrace.h: ... to here.
15245
15246 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15247
15248         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15249         inf_ptrace_detach_success.
15250         (inf_ptrace_detach_success): Add inferior parameter, use it
15251         instead of inferior_ptid, pass it to detach_inferior.
15252         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15253         parameter.
15254         * inferior.c (detach_inferior): Add overload that takes an
15255         inferior object.
15256         * inferior.h (detach_inferior): Likewise.
15257         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15258         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15259         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15260
15261 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15262
15263         * target.h (struct target_ops) <to_detach>: Add inferior
15264         parameter.
15265         (target_detach): Likewise.
15266         * target.c (dispose_inferior): Pass inferior down.
15267         (target_detach): Pass inferior down.  Assert that it is equal to
15268         the current inferior.
15269         * aix-thread.c (aix_thread_detach): Pass inferior down.
15270         * corefile.c (core_file_command): Pass current_inferior() down.
15271         * corelow.c (core_detach): Add inferior parameter.
15272         * darwin-nat.c (darwin_detach): Likewise.
15273         * gnu-nat.c (gnu_detach): Likewise.
15274         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15275         * infcmd.c (detach_command): Pass current_inferior() down to
15276         target_detach.
15277         * infrun.c (follow_fork_inferior): Pass parent_inf to
15278         target_detach.
15279         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15280         target_detach.
15281         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15282         * linux-thread-db.c (thread_db_detach): Likewise.
15283         * nto-procfs.c (procfs_detach): Likewise.
15284         * procfs.c (procfs_detach): Likewise.
15285         * record.c (record_detach): Likewise.
15286         * record.h (struct inferior): Forward-declare.
15287         (record_detach): Add inferior parameter.
15288         * remote-sim.c (gdbsim_detach): Likewise.
15289         * remote.c (remote_detach_1): Likewise.
15290         (remote_detach): Likewise.
15291         (extended_remote_detach): Likewise.
15292         * sol-thread.c (sol_thread_detach): Likewise.
15293         * target-debug.h (target_debug_print_inferior_p): New macro.
15294         * target-delegates.c: Re-generate.
15295         * top.c (kill_or_detach): Pass inferior down to target_detach.
15296         * windows-nat.c (windows_detach): Add inferior parameter.
15297
15298 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15299
15300         * target.h (struct target_ops) <to_detach>: Remove args
15301         parameter.
15302         (target_detach): Likewise.
15303         * target.c (dispose_inferior): Adjust.
15304         (target_detach): Remove args parameter, adjust.
15305         * aix-thread.c (aix_thread_detach): Adjust.
15306         * corefile.c (core_file_command): Adjust.
15307         * corelow.c (core_detach): Adjust.
15308         * darwin-nat.c (darwin_detach): Adjust.
15309         * gnu-nat.c (gnu_detach): Adjust.
15310         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15311         * infcmd.c (detach_command): Adjust
15312         * infrun.c (follow_fork_inferior): Adjust.
15313         (handle_vfork_child_exec_or_exit): Adjust.
15314         * linux-fork.c (linux_fork_detach): Remove args parameter.
15315         * linux-fork.h (linux_fork_detach): Likewise.
15316         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15317         * linux-thread-db.c (thread_db_detach): Likewise.
15318         * nto-procfs.c (procfs_detach): Likewise.
15319         * procfs.c (procfs_detach): Likewise.
15320         (do_detach): Remove signo parameter.
15321         * record.c (record_detach): Remove args parameter.
15322         * record.h (record_detach): Likewise.
15323         * remote-sim.c (gdbsim_detach): Likewise.
15324         * remote.c (remote_detach_1): Likewise.
15325         (remote_detach): Likewise.
15326         (extended_remote_detach): Likewise.
15327         * sol-thread.c (sol_thread_detach): Likewise.
15328         * target-delegates.c: Re-generate.
15329         * top.c (struct qt_args) <args>: Remove field.
15330         (kill_or_detach): Don't pass args.
15331         (quit_force): Don't set args.
15332         * windows-nat.c (windows_detach): Remove args parameter.
15333
15334 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15335
15336         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15337         (arm_linux_init_abi): Install it.
15338
15339 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15340
15341         * osabi.c (gdb_osabi_names): Extend the regexp for
15342         arm-linux-gnueabihf.
15343
15344 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15345
15346         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15347         m_abbrevs.
15348         (abbrev_table::add_abbrev): Update.
15349         (abbrev_table::lookup_abbrev): Update.
15350
15351 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15352
15353         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15354
15355 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15356
15357         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15358         to "std::string".
15359
15360 2018-01-17  Tom Tromey  <tom@tromey.com>
15361
15362         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15363
15364 2018-01-17  Tom Tromey  <tom@tromey.com>
15365
15366         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15367         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15368         (create_array_type_with_stride): Update.
15369         * dwarf2read.c (set_die_type): Update.
15370
15371 2018-01-17  Tom Tromey  <tom@tromey.com>
15372
15373         * dwarf2read.c (delayed_method_info): Remove typedef.
15374         (dwarf2_cu::method_info): Now a std::vector.
15375         (add_to_method_list): Update.
15376         (free_delayed_list): Remove.
15377         (compute_delayed_physnames): Update.
15378         (process_full_comp_unit, process_full_type_unit): Clear the method
15379         list.  Remove cleanups.
15380         (psymtab_include_file_name): Add name_holder parameter.  Use
15381         unique_xmalloc_ptr.
15382         (dwarf_decode_lines): 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): Add constructor, destructor.
15388         (dwarf2_per_objfile::free_cached_comp_units)
15389         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15390         (init_cutu_and_read_dies_no_follow): Update.
15391         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15392         (dwarf2_cu::~dwarf2_cu): New.
15393         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15394         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15395
15396 2018-01-17  Tom Tromey  <tom@tromey.com>
15397             Simon Marchi  <simon.marchi@ericsson.com>
15398
15399         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15400         (struct die_reader_specs) <abbrev_table>: New member.
15401         (struct abbrev_table): Add constructor.
15402         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15403         <abbrev_obstack>: Now an auto_obstack.
15404         (abbrev_table_up): New typedef.
15405         (init_cu_die_reader): Add abbrev_table parameter.
15406         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15407         Add result_dwo_abbrev_table.
15408         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15409         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15410         Update.
15411         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15412         parameter.
15413         (skip_children): Update.
15414         (abbrev_table::alloc_abbrev): Rename from
15415         abbrev_table_alloc_abbrev.
15416         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15417         (abbrev_table::lookup_abbrev): Rename from
15418         abbrev_table_lookup_abbrev.
15419         (abbrev_table_read_table): Return abbrev_table_up.
15420         (abbrev_table_free, abbrev_table_free_cleanup)
15421         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15422         (load_partial_dies): Update.
15423
15424 2018-01-17  Tom Tromey  <tom@tromey.com>
15425
15426         * dwarf2read.c (dwarf2_compute_name): Update comment.
15427         (read_func_scope, read_variable): Update.
15428         (new_symbol): Remove.
15429         (new_symbol_full): Rename to new_symbol.
15430
15431 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
15432
15433         PR gdb/16577
15434         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15435         a warning instead of throwing an error, set section size to 0 and return
15436         NULL.
15437         * gdb_bfd.h (gdb_bfd_map_section): Update description.
15438
15439 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15440
15441         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15442         std::string.
15443         (linux_ptrace_attach_fail_reason_string): Likewise.
15444         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15445         Likewise.
15446         (linux_ptrace_attach_fail_reason_string): Likewise.
15447         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15448
15449 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15450
15451         * linux-nat.c (linux_nat_attach): Remove xstrdup.
15452
15453 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
15454
15455         PR gdb/21559
15456         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15457         checking for fs_base/gs_base fields in struct user_regs_struct.
15458         * configure: Regenerate.
15459
15460 2018-01-17  Yao Qi  <yao.qi@linaro.org>
15461
15462         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
15463         function.
15464         (aarch64_linux_init_abi): Install it to gdbarch hook
15465         gcc_target_options.
15466
15467 2018-01-15  Pedro Alves  <palves@redhat.com>
15468
15469         * common/signals-state-save-restore.c
15470         (save_original_signals_state): Fix typos.
15471
15472 2017-01-12  Tom Tromey  <tom@tromey.com>
15473             Sergio Durigan Junior  <sergiodj@redhat.com>
15474
15475         * Makefile.in (install-only): Install gdb-add-index.
15476
15477 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
15478
15479         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
15480
15481 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15482
15483         * infrun.c (keep_going_pass_signal): Clear step-over info when
15484         insert_breakpoints fails.
15485
15486 2018-01-11  Pedro Alves  <palves@redhat.com>
15487
15488         PR gdb/22583
15489         * infrun.c (resume): Rename to ...
15490         (resume_1): ... this.
15491         (resume): Reimplement as wrapper around resume_1.
15492
15493 2018-01-11  Pedro Alves  <palves@redhat.com>
15494
15495         PR remote/22597
15496         * remote.c (remote_parse_stop_reply): Default to the last-set
15497         general thread instead of to 'magic_null_ptid'.
15498
15499 2018-01-10  Pedro Alves  <palves@redhat.com>
15500
15501         * language.h (language_get_symbol_name_matcher): Rename ...
15502         (get_symbol_name_matcher): ... this.
15503         * language.c (language_get_symbol_name_matcher): Ditto.
15504         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
15505         callers adjusted.
15506
15507 2018-01-10  Pedro Alves  <palves@redhat.com>
15508
15509         PR gdb/22670
15510         * dwarf2read.c
15511         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
15512         Adjust to use language_get_symbol_name_matcher instead of
15513         language_defn::la_get_symbol_name_matcher.
15514         * language.c (language_get_symbol_name_matcher): If in Ada mode
15515         and the lookup name is a verbatim match, return Ada's matcher.
15516         * language.h (language_get_symbol_name_matcher): Adjust comment.
15517         (ada_lookup_name_info::verbatim_p):: New method.
15518
15519 2018-01-10  Pedro Alves  <palves@redhat.com>
15520
15521         PR gdb/22670
15522         * ada-lang.c (ada_collect_symbol_completion_matches): If the
15523         minsym's language is language_auto or language_cplus, pass down
15524         language_ada instead.
15525         * symtab.c (compare_symbol_name): Don't frob symbol language here.
15526
15527 2018-01-10  Pedro Alves  <palves@redhat.com>
15528
15529         PR gdb/22670
15530         * minsyms.c (linkage_name_str): New function.
15531         (iterate_over_minimal_symbols): Use it.
15532
15533 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15534
15535         * NEWS: Document that 'info proc' now works on FreeBSD.
15536
15537 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15538
15539         * configure.ac: Check for kinfo_getfile in libutil.
15540         * configure: Regenerate.
15541         * config.in: Regenerate.
15542         * fbsd-nat.c: Include "fbsd-tdep.h".
15543         (fbsd_fetch_cmdline): New.
15544         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
15545         rather than calling error.
15546         (fbsd_info_proc): New.
15547         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
15548         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
15549         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
15550
15551 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15552
15553         * fbsd-nat.c (struct free_deleter): Remove.
15554         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
15555
15556 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15557
15558         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
15559         NULL for an empty pathname.
15560
15561 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15562
15563         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
15564         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
15565         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
15566         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
15567         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
15568         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
15569         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
15570         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
15571         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
15572         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
15573         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
15574         (fbsd_core_fetch_timeval, fbsd_print_sigset)
15575         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
15576         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
15577         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
15578
15579 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
15580
15581         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
15582         (gnu_xfer_auxv): New function.
15583         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
15584         TARGET_OBJECT_AUXV.
15585
15586 2018-01-08  Yao Qi  <yao.qi@linaro.org>
15587             Simon Marchi  <simon.marchi@ericsson.com>
15588
15589         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
15590         common/selftest.c.
15591         (COMMON_OBS): Remove selftest.o.
15592         * configure.ac: Append selftest-arch.c and common/selftest.c to
15593         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
15594         * configure: Re-generated.
15595         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
15596         GDB_SELF_TEST.
15597         (maintenance_info_selftests): Likewise.
15598
15599 2018-01-08  Xavier Roirand  <roirand@adacore.com>
15600
15601         * ada-valprint.c (val_print_packed_array_elements): Use
15602         proper number of elements when printing an array indexed
15603         by an enumeration type.
15604
15605 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15606
15607         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
15608         (dw2_get_file_names_reader): Adjust.
15609         (lookup_dwo_signatured_type): Adjust.
15610         (lookup_dwp_signatured_type): Adjust.
15611         (lookup_signatured_type): Adjust.
15612         (create_type_unit_group): Adjust.
15613         (get_type_unit_group): Adjust.
15614         (process_psymtab_comp_unit_reader): Adjust.
15615         (build_type_psymtabs_reader): Adjust.
15616         (scan_partial_symbols): Adjust.
15617         (add_partial_symbol): Adjust.
15618         (add_partial_subprogram): Adjust.
15619         (peek_die_abbrev): Adjust.
15620         (fixup_go_packaging): Adjust.
15621         (process_imported_unit_die): Adjust.
15622         (dwarf2_compute_name): Adjust.
15623         (dwarf2_physname): Adjust.
15624         (read_import_statement): Adjust.
15625         (handle_DW_AT_stmt_list): Adjust.
15626         (read_file_scope): Adjust.
15627         (read_func_scope): Adjust.
15628         (read_lexical_block_scope): Adjust.
15629         (read_call_site_scope): Adjust.
15630         (read_variable): Adjust.
15631         (dwarf2_rnglists_process): Adjust.
15632         (dwarf2_ranges_process): Adjust.
15633         (dwarf2_ranges_read): Adjust.
15634         (dwarf2_get_pc_bounds): Adjust.
15635         (dwarf2_record_block_ranges): Adjust.
15636         (dwarf2_add_field): Adjust.
15637         (dwarf2_add_member_fn): Adjust.
15638         (read_structure_type): Adjust.
15639         (process_structure_scope): Adjust.
15640         (read_enumeration_type): Adjust.
15641         (read_array_type): Adjust.
15642         (mark_common_block_symbol_computed): Adjust.
15643         (read_common_block): Adjust.
15644         (read_namespace_type): Adjust.
15645         (read_namespace): Adjust.
15646         (read_module_type): Adjust.
15647         (read_tag_pointer_type): Adjust.
15648         (read_tag_ptr_to_member_type): Adjust.
15649         (read_tag_string_type): Adjust.
15650         (read_subroutine_type): Adjust.
15651         (read_typedef): Adjust.
15652         (read_base_type): Adjust.
15653         (attr_to_dynamic_prop): Adjust.
15654         (read_subrange_type): Adjust.
15655         (read_unspecified_type): Adjust.
15656         (dwarf2_read_abbrevs): Adjust.
15657         (load_partial_dies): Adjust.
15658         (read_partial_die): Adjust.
15659         (find_partial_die): Adjust.
15660         (guess_partial_die_structure_name): Adjust.
15661         (fixup_partial_die): Adjust.
15662         (read_attribute_value): Adjust.
15663         (read_addr_index): Adjust.
15664         (read_addr_index_from_leb128): Adjust.
15665         (read_str_index): Adjust.
15666         (dwarf2_string_attr): Adjust.
15667         (get_debug_line_section): Adjust.
15668         (dwarf_decode_line_header): Adjust.
15669         (lnp_state_machine::check_line_address): Adjust.
15670         (dwarf_decode_lines_1): Adjust.
15671         (dwarf_decode_lines): Adjust.
15672         (dwarf2_start_symtab): Adjust.
15673         (var_decode_location): Adjust.
15674         (new_symbol_full): Adjust.
15675         (dwarf2_const_value_data): Adjust.
15676         (dwarf2_const_value_attr): Adjust.
15677         (dwarf2_const_value): Adjust.
15678         (die_type): Adjust.
15679         (die_containing_type): Adjust.
15680         (build_error_marker_type): Adjust.
15681         (lookup_die_type): Adjust.
15682         (guess_full_die_structure_name): Adjust.
15683         (anonymous_struct_prefix): Adjust.
15684         (determine_prefix): Adjust.
15685         (dwarf2_name): Adjust.
15686         (follow_die_ref_or_sig): Adjust.
15687         (follow_die_offset): Adjust.
15688         (follow_die_ref): Adjust.
15689         (follow_die_sig_1): Adjust.
15690         (follow_die_sig): Adjust.
15691         (get_signatured_type): Adjust.
15692         (get_DW_AT_signature_type): Adjust.
15693         (decode_locdesc): Adjust.
15694         (dwarf_decode_macros): Adjust.
15695         (cu_debug_loc_section): Adjust.
15696         (fill_in_loclist_baton): Adjust.
15697         (dwarf2_symbol_mark_computed): Adjust.
15698         (init_one_comp_unit): Don't assign
15699         dwarf2_cu::dwarf2_per_objfile.
15700         (set_die_type): Adjust.
15701
15702 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15703
15704         * dwarf2read.c (struct mapped_debug_names): Add constructor.
15705         <dwarf2_per_objfile>: New field.
15706         (dwarf2_per_objfile): Remove global.
15707         (get_dwarf2_per_objfile): New function.
15708         (set_dwarf2_per_objfile): New function.
15709         (dwarf2_build_psymtabs_hard): Change objfile parameter to
15710         dwarf2_per_objfile.
15711         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15712         (read_abbrev_offset): Likewise.
15713         (read_indirect_string): Likewise.
15714         (read_indirect_line_string): Likewise.
15715         (read_indirect_string_at_offset): Likewise.
15716         (read_indirect_string_from_dwz): Likewise.
15717         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15718         dwarf2_per_objfile.
15719         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15720         (create_all_comp_units): Change objfile parameter to
15721         dwarf2_per_objfile.
15722         (create_all_type_units): Likewise.
15723         (process_queue): Add dwarf2_per_objfile parameter.
15724         (read_and_check_comp_unit_head): Likewise.
15725         (lookup_dwo_unit_in_dwp): Likewise.
15726         (get_dwp_file): Likewise.
15727         (process_cu_includes): Likewise.
15728         (struct free_dwo_file_cleanup_data): New struct.
15729         (dwarf2_has_info): Use get_dwarf2_per_objfile and
15730         set_dwarf2_per_objfile.
15731         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
15732         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
15733         context, adjust calls.
15734         (dw2_instantiate_symtab): Likewise.
15735         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15736         (dw2_get_cu): Likewise.
15737         (create_cu_from_index_list): Change objfile parameter to
15738         dwarf2_per_objfile.
15739         (create_cus_from_index_list): Get dwarf2_per_objfile from
15740         context, adjust calls.
15741         (create_cus_from_index): Likewise.
15742         (create_signatured_type_table_from_index): Change objfile
15743         parameter to dwarf2_per_objfile.
15744         (create_signatured_type_table_from_debug_names): Change objfile
15745         parameter to dwarf2_per_objfile.
15746         (create_addrmap_from_index): Likewise.
15747         (create_addrmap_from_aranges): Likewise.
15748         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15749         (dw2_setup): Remove.
15750         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15751         context.
15752         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15753         get_dwarf2_per_objfile.
15754         (dw2_forget_cached_source_info): Likewise.
15755         (dw2_map_symtabs_matching_filename): Likewise.
15756         (struct dw2_symtab_iterator) <index>: Remove.
15757         <dwarf2_per_objfile>: New field.
15758         (dw2_symtab_iter_init): Replace index parameter with
15759         dwarf2_per_objfile.
15760         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15761         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15762         (dw2_print_stats): Likewise.
15763         (dw2_dump): Likewise.
15764         (dw2_expand_symtabs_for_function): Likewise.
15765         (dw2_expand_all_symtabs): Likewise.
15766         (dw2_expand_symtabs_with_fullname): Likewise.
15767         (dw2_expand_marked_cus): Replace index and objfile parameters
15768         with dwarf2_per_objfile.
15769         (dw_expand_symtabs_matching_file_matcher): Add
15770         dwarf2_per_objfile parameter and adjust calls.
15771         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15772         adjust calls.
15773         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15774         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15775         adjust calls.
15776         (create_cus_from_debug_names_list): Replace objfile parameter
15777         with dwarf2_per_objfile and adjust calls.
15778         (create_cus_from_debug_names): Likewise.
15779         (dwarf2_read_debug_names): Likewise.
15780         (mapped_debug_names::namei_to_name): Adjust call.
15781         (dw2_debug_names_iterator::next): Likewise.
15782         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15783         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15784         (dw2_debug_names_dump): Likewise.
15785         (dw2_debug_names_expand_symtabs_for_function): Likewise.
15786         (dw2_debug_names_expand_symtabs_matching): Likewise.
15787         (dwarf2_initialize_objfile): Likewise.
15788         (dwarf2_build_psymtabs): Likewise.
15789         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15790         this_cu.
15791         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15792         (read_and_check_comp_unit_head): Likewise.
15793         (read_abbrev_offset): Likewise.
15794         (create_debug_type_hash_table): Likewise.
15795         (create_debug_types_hash_table): Likewise.
15796         (create_all_type_units): Replace objfile parameter with
15797         dwarf2_per_objfile.
15798         (add_type_unit): Add dwarf2_per_objfile parameter.
15799         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15800         with dwarf2_per_objfile.
15801         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15802         (lookup_dwp_signatured_type): Likewise.
15803         (lookup_signatured_type): Likewise.
15804         (read_cutu_die_from_dwo): Likewise.
15805         (init_tu_and_read_dwo_dies): Likewise.
15806         (init_cutu_and_read_dies): Likewise.
15807         (init_cutu_and_read_dies_no_follow): Likewise.
15808         (allocate_type_unit_groups_table): Add objfile parameter.
15809         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15810         (get_type_unit_group): Likewise.
15811         (process_psymtab_comp_unit): Update call.
15812         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15813         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15814         (print_tu_stats): Likewise.
15815         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15816         in void* parameter.
15817         (build_type_psymtabs): Change objfile parameter to
15818         dwarf2_per_objfile.
15819         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15820         passed in void* parameter.
15821         (process_skeletonless_type_units): Change objfile parameter to
15822         dwarf2_per_objfile.
15823         (set_partial_user): Likewise.
15824         (dwarf2_build_psymtabs_hard): Likewise.
15825         (read_comp_units_from_section): Likewise.
15826         (create_all_comp_units): Likewise.
15827         (scan_partial_symbols): Update calls.
15828         (add_partial_symbol): Likewise.
15829         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15830         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15831         (process_queue): Add dwarf2_per_objfile parameter.
15832         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15833         (compute_compunit_symtab_includes): Likewise.
15834         (process_cu_includes): Add dwarf2_per_objfile parameter.
15835         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15836         (process_full_type_unit): Likewise.
15837         (process_imported_unit_die): Update call.
15838         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15839         (read_file_scope): Likewise.
15840         (allocate_dwo_file_hash_table): Add objfile parameter.
15841         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15842         (create_cus_hash_table): Likewise.
15843         (create_dwp_hash_table): Likewise.
15844         (create_dwo_unit_in_dwp_v1): Likewise.
15845         (create_dwp_v2_section): Likewise.
15846         (create_dwo_unit_in_dwp_v2): Likewise.
15847         (lookup_dwo_unit_in_dwp): Likewise.
15848         (try_open_dwop_file): Likewise.
15849         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15850         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15851         cleanup to include a reference to dwarf2_per_objfile.
15852         (open_dwp_file): Add dwarf2_per_objfile parameter.
15853         (open_and_init_dwp_file): Likewise.
15854         (get_dwp_file): Likewise.
15855         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15856         (queue_and_load_all_dwo_tus): Update call.
15857         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15858         data.
15859         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15860         (dwarf2_ranges_process): Likewise.
15861         (dwarf2_get_pc_bounds): Likewise.
15862         (mark_common_block_symbol_computed): Likewise.
15863         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15864         (dwarf2_read_abbrevs): Update call.
15865         (read_partial_die): Use dwarf2_per_objfile from cu.
15866         (find_partial_die): Likewise.
15867         (fixup_partial_die): Likewise.
15868         (read_attribute_value): Likewise.
15869         (read_indirect_string_at_offset_from): Add objfile parameter.
15870         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15871         parameter.
15872         (read_indirect_string_from_dwz): Add objfile parameter.
15873         (read_indirect_string): Add objfile parameter.
15874         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15875         (read_addr_index): Use dwarf2_per_objfile from cu.
15876         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15877         call dw2_setup.
15878         (read_str_index): Use dwarf2_per_objfile from cu.
15879         (get_debug_line_section): Likewise.
15880         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15881         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15882         (new_symbol_full): Use dwarf2_per_objfile from cu.
15883         (build_error_marker_type): Likewise.
15884         (lookup_die_type): Likewise.
15885         (determine_prefix): Likewise.
15886         (follow_die_offset): Likewise.
15887         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15888         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15889         (dwarf2_fetch_die_type_sect_off): Likewise.
15890         (dwarf2_get_die_type): Likewise.
15891         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15892         (get_signatured_type): Likewise.
15893         (get_DW_AT_signature_type): Likewise.
15894         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15895         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15896         (cu_debug_loc_section): Likewise.
15897         (fill_in_loclist_baton): Likewise.
15898         (dwarf2_symbol_mark_computed): Likewise.
15899         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15900         dwarf2_per_objfile.
15901         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15902         parameter.
15903         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15904         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15905         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15906         (set_die_type): Use dwarf2_free_objfile from cu.
15907         (get_die_type_at_offset): Likewise.
15908         (dwarf2_per_objfile_free): Don't assign global variable.
15909         (debug_names) <constructor>: Add dwarf2_per_objfile
15910         parameter, update m_debugstrlookup construction.
15911         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15912         parameter.
15913         <m_dwarf2_per_objfile>: New field.
15914         <lookup>: Use m_dwarf2_per_objfile.
15915         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15916         (psyms_seen_size): Likewise.
15917         (write_gdbindex): Replace objfile parameter with
15918         dwarf2_per_objfile.
15919         (write_debug_names): Likewise.
15920         (write_psymtabs_to_index): Likewise.
15921         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15922         calls.
15923
15924 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15925
15926         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15927         <dwarf2_per_objfile>: New field.
15928         (struct dwarf2_per_cu_data) <objfile>: Remove.
15929         <dwarf2_per_objfile>: New field.
15930         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15931         of objfile.
15932         (create_signatured_type_table_from_index): Likewise.
15933         (create_debug_type_hash_table): Likewise.
15934         (fill_in_sig_entry_from_dwo_entry): Likewise.
15935         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15936         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15937         objfile.
15938         (create_partial_symtab): Access objfile through
15939         dwarf2_per_objfile.
15940         (process_psymtab_comp_unit_reader): Likewise.
15941         (read_comp_units_from_section): Likewise.
15942         (scan_partial_symbols): Likewise.
15943         (add_partial_symbol): Likewise.
15944         (add_partial_subprogram): Likewise.
15945         (peek_die_abbrev): Likewise.
15946         (fixup_go_packaging): Likewise.
15947         (process_full_comp_unit): Likewise.
15948         (process_full_type_unit): Likewise.
15949         (process_imported_unit_die): Likewise.
15950         (dwarf2_compute_name): Likewise.
15951         (dwarf2_physname): Likewise.
15952         (read_import_statement): Likewise.
15953         (create_cus_hash_table): Assign dwarf2_physname instead of
15954         objfile.
15955         (read_func_scope): Access objfile through dwarf2_per_objfile.
15956         (read_lexical_block_scope): Likewise.
15957         (read_call_site_scope): Likewise.
15958         (read_variable): Likewise.
15959         (dwarf2_rnglists_process): Likewise.
15960         (dwarf2_ranges_process): Likewise.
15961         (dwarf2_ranges_read): Likewise.
15962         (dwarf2_record_block_ranges): Likewise.
15963         (dwarf2_add_field): Likewise.
15964         (dwarf2_add_member_fn): Likewise.
15965         (read_structure_type): Likewise.
15966         (process_structure_scope): Likewise.
15967         (read_enumeration_type): Likewise.
15968         (read_array_type): Likewise.
15969         (read_common_block): Likewise.
15970         (read_namespace_type): Likewise.
15971         (read_namespace): Likewise.
15972         (read_module_type): Likewise.
15973         (read_tag_pointer_type): Likewise.
15974         (read_tag_ptr_to_member_type): Likewise.
15975         (read_tag_string_type): Likewise.
15976         (read_subroutine_type): Likewise.
15977         (read_typedef): Likewise.
15978         (read_base_type): Likewise.
15979         (attr_to_dynamic_prop): Likewise.
15980         (read_subrange_type): Likewise.
15981         (read_unspecified_type): Likewise.
15982         (load_partial_dies): Likewise.
15983         (read_partial_die): Likewise.
15984         (find_partial_die): Likewise.
15985         (guess_partial_die_structure_name): Likewise.
15986         (fixup_partial_die): Likewise.
15987         (read_attribute_value): Likewise.
15988         (read_addr_index_from_leb128): Likewise.
15989         (dwarf2_read_addr_index): Likewise.
15990         (dwarf2_string_attr): Likewise.
15991         (lnp_state_machine::check_line_address): Likewise.
15992         (dwarf_decode_lines_1): Likewise.
15993         (dwarf_decode_lines): Likewise.
15994         (dwarf2_start_symtab): Likewise.
15995         (var_decode_location): Likewise.
15996         (new_symbol_full): Likewise.
15997         (dwarf2_const_value_data): Likewise.
15998         (dwarf2_const_value_attr): Likewise.
15999         (dwarf2_const_value): Likewise.
16000         (die_type): Likewise.
16001         (die_containing_type): Likewise.
16002         (lookup_die_type): Likewise.
16003         (guess_full_die_structure_name): Likewise.
16004         (anonymous_struct_prefix): Likewise.
16005         (dwarf2_name): Likewise.
16006         (follow_die_ref_or_sig): Likewise.
16007         (follow_die_offset): Likewise.
16008         (follow_die_ref): Likewise.
16009         (dwarf2_fetch_die_loc_sect_off): Likewise.
16010         (dwarf2_fetch_constant_bytes): Likewise.
16011         (dwarf2_fetch_die_type_sect_off): Likewise.
16012         (dwarf2_get_die_type): Likewise.
16013         (follow_die_sig): Likewise.
16014         (decode_locdesc): Likewise.
16015         (dwarf2_per_cu_objfile): Likewise.
16016         (dwarf2_per_cu_text_offset): Likewise.
16017         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16018         objfile.
16019         (set_die_type): Access objfile through
16020         dwarf2_per_objfile.
16021
16022 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16023
16024         * valprint.c (converted_character_d): Remove typedef.
16025         (DEF_VEC_O (converted_character_d)): Remove.
16026         (count_next_character): Use std::vector.
16027         (print_converted_chars_to_obstack): Likewise.
16028         (generic_printstr): Likewise.
16029
16030 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16031
16032         * xml-support.h (struct gdb_xml_value): Add constructor.
16033         <value>: Change type to unique_xmalloc_ptr.
16034         (gdb_xml_value_s): Remove typedef.
16035         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16036         (gdb_xml_element_start_handler): Change parameter type to
16037         std::vector.
16038         (xml_find_attribute): Likewise.
16039         * xml-support.c (xml_find_attribute): Change parameter type to
16040         std::vector and adjust.
16041         (gdb_xml_values_cleanup): Remove.
16042         (gdb_xml_parser::start_element): Adjust to std::vector.
16043         (xinclude_start_include): Change paraeter type to std::vector
16044         and adjust.
16045         * btrace.c (check_xml_btrace_version): Likewise.
16046         (parse_xml_btrace_block): Likewise.
16047         (parse_xml_btrace_pt_config_cpu): Likewise.
16048         (parse_xml_btrace_pt): Likewise.
16049         (parse_xml_btrace_conf_bts): Likewise.
16050         (parse_xml_btrace_conf_pt): Likewise.
16051         * memory-map.c (memory_map_start_memory): Likewise.
16052         (memory_map_start_property): Likewise.
16053         * osdata.c (osdata_start_osdata): Likewise.
16054         (osdata_start_item): Likewise.
16055         (osdata_start_column): Likewise.
16056         * remote.c (start_thread): Likewise.
16057         * solib-aix.c (library_list_start_library): Likewise.
16058         (library_list_start_list): Likewise.
16059         * solib-svr4.c (library_list_start_library): Likewise.
16060         (svr4_library_list_start_list): Likewise.
16061         * solib-target.c (library_list_start_segment): Likewise.
16062         (library_list_start_section): Likewise.
16063         (library_list_start_library): Likewise.
16064         (library_list_start_list): Likewise.
16065         * tracepoint.c (traceframe_info_start_memory): Likewise.
16066         (traceframe_info_start_tvar): Likewise.
16067         * xml-syscall.c (syscall_start_syscall): Likewise.
16068         * xml-tdesc.c (tdesc_start_target): Likewise.
16069         (tdesc_start_feature): Likewise.
16070         (tdesc_start_reg): Likewise.
16071         (tdesc_start_union): Likewise.
16072         (tdesc_start_struct): Likewise.
16073         (tdesc_start_flags): Likewise.
16074         (tdesc_start_enum): Likewise.
16075         (tdesc_start_field): Likewise.
16076         (tdesc_start_enum_value): Likewise.
16077         (tdesc_start_vector): Likewise.
16078
16079 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16080
16081         * extension.h (struct xmethod_worker) <clone>: Remove.
16082         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16083         Remove.
16084         (python_xmethod_worker::clone): Remove.
16085         * valops.c (find_overload_match): Use std::move instead of
16086         clone.
16087
16088 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16089
16090         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16091         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16092         <free_xmethod_worker_data>: Remove.
16093         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16094         <get_xmethod_arg_types>: Remove.
16095         <get_xmethod_result_type>: Remove.
16096         <invoke_xmethod>: Remove.
16097         * extension.c (new_xmethod_worker): Remove.
16098         (clone_xmethod_worker): Remove.
16099         (get_matching_xmethod_workers): Return void, pass std::vector by
16100         pointer.
16101         (get_xmethod_arg_types): Rename to...
16102         (xmethod_worker::get_arg_types): ... this, and adjust.
16103         (get_xmethod_result_type): Rename to...
16104         (xmethod_worker::get_result_type): ... this, and adjust.
16105         (invoke_xmethod): Remove.
16106         (free_xmethod_worker): Remove.
16107         (free_xmethod_worker_vec): Remove.
16108         * extension.h (enum ext_lang_rc): Move here from
16109         extension-priv.h.
16110         (struct xmethod_worker): Add constructor and destructor.
16111         <data>: Remove.
16112         <value>: Remove.
16113         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16114         virtual pure methods.
16115         <get_arg_types, get_result_type>: New methods.
16116         (xmethod_worker_ptr): Remove typedef.
16117         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16118         (xmethod_worker_vec): Remove typedef.
16119         (xmethod_worker_up): New typedef.
16120         (invoke_xmethod): Remove.
16121         (clone_xmethod_worker): Remove.
16122         (free_xmethod_worker): Remove.
16123         (free_xmethod_worker_vec): Remove.
16124         (get_xmethod_arg_types): Remove.
16125         (get_xmethod_result_type): Remove.
16126         * valops.c (find_method_list): Use std::vector, don't use
16127         intermediate vector.
16128         (value_find_oload_method_list): Use std::vector.
16129         (find_overload_match): Use std::vector.
16130         (find_oload_champ): Use std::vector.
16131         * value.c (value_free): Use operator delete.
16132         (value_of_xmethod): Rename to...
16133         (value_from_xmethod): ... this.  Don't assign
16134         xmethod_worker::value, take rvalue-reference.
16135         (result_type_of_xmethod): Adjust.
16136         (call_xmethod): Adjust.
16137         * value.h: Include extension.h.
16138         (struct xmethod_worker): Don't forward-declare.
16139         (value_of_xmethod): Rename to...
16140         (value_from_xmethod): ... this, take rvalue-reference.
16141         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16142         (struct python_xmethod_worker): ... this, add constructor and
16143         destructor.
16144         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16145         (gdbpy_free_xmethod_worker_data): Rename to...
16146         (python_xmethod_worker::~python_xmethod_worker): ... this and
16147         adjust.
16148         (gdbpy_clone_xmethod_worker_data): Rename to...
16149         (python_xmethod_worker::clone): ... this and adjust.
16150         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16151         temporary vector.
16152         (gdbpy_get_xmethod_arg_types): Rename to...
16153         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16154         (gdbpy_get_xmethod_result_type): Rename to...
16155         (python_xmethod_worker::do_get_result_type): ... this and
16156         adjust.
16157         (gdbpy_invoke_xmethod): Rename to...
16158         (python_xmethod_worker::invoke): ... this and adjust.
16159         (new_python_xmethod_worker): Rename to...
16160         (python_xmethod_worker::python_xmethod_worker): ... this and
16161         adjust.
16162         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16163         Remove.
16164         (gdbpy_free_xmethod_worker_data): Remove.
16165         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16166         (gdbpy_get_xmethod_arg_types): Remove.
16167         (gdbpy_get_xmethod_result_type): Remove.
16168         (gdbpy_invoke_xmethod): Remove.
16169         * python/python.c (python_extension_ops): Remove obsolete
16170         callbacks.
16171
16172 2018-01-05  Pedro Alves  <palves@redhat.com>
16173
16174         PR gdb/18653
16175         * common/signals-state-save-restore.c
16176         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16177         find a custom handler preinstalled, instead of internal erroring.
16178         But only warn if !quiet.
16179         * common/signals-state-save-restore.h
16180         (save_original_signals_state): New parameter 'quiet'.
16181         * main.c (captured_main_1): Move save_original_signals_state call
16182         after option handling, and pass QUIET.
16183
16184 2018-01-05  Pedro Alves  <palves@redhat.com>
16185
16186         * spu-tdep.c (spu_catch_start): Pass
16187         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16188
16189 2018-01-05  Pedro Alves  <palves@redhat.com>
16190
16191         PR gdb/22670
16192         * ada-lang.c (literal_symbol_name_matcher): New function.
16193         (ada_get_symbol_name_matcher): Use it for
16194         symbol_name_match_type::SEARCH_NAME.
16195         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16196         it down instead of assuming symbol_name_match_type::FULL.
16197         * block.h (block_lookup_symbol): New parameter 'match_type'.
16198         * c-valprint.c (print_unpacked_pointer): Use
16199         lookup_symbol_search_name instead of lookup_symbol.
16200         * compile/compile-object-load.c (get_out_value_type): Pass down
16201         symbol_name_match_type::SEARCH_NAME.
16202         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16203         symbol_name_match_type::FULL.
16204         * cp-support.c (cp_get_symbol_name_matcher): Handle
16205         symbol_name_match_type::SEARCH_NAME.
16206         * infrun.c (insert_exception_resume_breakpoint): Use
16207         lookup_symbol_search_name.
16208         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16209         * psymtab.c (maintenance_check_psymtabs): Use
16210         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16211         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16212         SYMBOL_SEARCH_NAME.
16213         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16214         if symbol_name_match_type::SEARCH_NAME.
16215         (lookup_symbol_in_language): Pass down
16216         symbol_name_match_type::FULL.
16217         (lookup_symbol_search_name): New.
16218         (lookup_language_this): Pass down
16219         symbol_name_match_type::SEARCH_NAME.
16220         (lookup_symbol_aux, lookup_local_symbol): New parameter
16221         'match_type'.  Pass it down.
16222         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16223         (lookup_symbol_search_name): New declaration.
16224         (lookup_symbol_in_block): New 'match_type' parameter.
16225
16226 2018-01-05  Pedro Alves  <palves@redhat.com>
16227
16228         PR gdb/22670
16229         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16230         ada_lookup_symbol.
16231         (ada_lookup_symbol): Reimplement in terms of
16232         ada_lookup_symbol_list, bits factored out from
16233         ada_lookup_encoded_symbol.
16234
16235 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16236
16237         * ada-exp.y (write_object_renaming): When subscripting an array
16238         using a symbol as the index, pass the block in call to
16239         ada_lookup_encoded_symbol when looking that symbol up.
16240
16241 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16242
16243         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16244         TYPE_INDEX_TYPE.
16245
16246 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16247
16248         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16249         the case where VALUE_LVAL (val0) is not lval_memory.
16250
16251 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16252
16253         * ada-valprint.c (print_optional_low_bound): Handle
16254         character-indexed array printing like boolean-indexed array
16255         printing.
16256
16257 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16258
16259         * NEWS: Create a new section for the next release branch.
16260         Rename the section of the current branch, now that it has
16261         been cut.
16262
16263 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16264
16265         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16266         * version.in: Bump version to 8.1.50.DATE-git.
16267
16268 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16269
16270         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16271         Add field.
16272         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16273         Add field.
16274         (default_exception_support_info) <catch_handlers_sym>: Add field.
16275         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16276         (ada_exception_name_addr_1): Add "catch handlers" handling.
16277         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16278         Update all callers.
16279         (create_excep_cond_exprs) <ex>: Add parameter.
16280         (re_set_exception): Update create_excep_cond_exprs call.
16281         (print_it_exception, print_one_exception, print_mention_exception)
16282         (print_recreate_exception): Add "catch handler" handling.
16283         (allocate_location_catch_handlers, re_set_catch_handlers)
16284         (check_status_catch_handlers, print_it_catch_handlers)
16285         (print_one_catch_handlers, print_mention_catch_handlers)
16286         (print_recreate_catch_handlers): New function.
16287         (catch_handlers_breakpoint_ops): New variable.
16288         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16289         Add parameter.  Add "catch handler" handling.
16290         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16291         Add "catch handler" handling.
16292         (ada_exception_catchpoint_cond_string): Add "catch handler"
16293         handling.
16294         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16295         call.
16296         (catch_ada_handlers_command): New function.
16297         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16298         operations structure.
16299         (_initialize_ada_language): Add "catch handlers" command entry.
16300         * NEWS: Document "catch handlers" feature.
16301
16302 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16303
16304         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16305         account when creating the array type of the slice.
16306         (ada_value_slice): Likewise.
16307
16308 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16309
16310         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16311         New enum value.
16312         (create_array_type_with_stride): Add byte_stride_prop parameter.
16313         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16314         New parameter.  Update all callers in this file.
16315         (array_type_has_dynamic_stride): New function.
16316         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16317         of arrays with dynamic byte strides.
16318         * dwarf2read.c (read_array_type): Add support for dynamic
16319         DW_AT_byte_stride attributes.
16320
16321 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16322
16323         * dwarf2read.c (read_unspecified_type): Treat
16324         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16325
16326 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16327
16328         Update copyright year range in all GDB files.
16329
16330 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16331
16332         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16333         and gdb/testsuite/gdb.base/step-line.c.
16334
16335 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16336
16337         * copyright.py (main): Dump the contents of
16338         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16339         even if BY_HAND is empty.
16340
16341 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16342
16343         * top.c (print_gdb_version): Update Copyright year in version
16344         message.
16345
16346 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16347
16348         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16349
16350 For older changes see ChangeLog-2017.
16351 \f
16352 Local Variables:
16353 mode: change-log
16354 left-margin: 8
16355 fill-column: 74
16356 version-control: never
16357 coding: utf-8
16358 End: