Avoid memcpys in regcache read_part/write_part for full registers.
[external/binutils.git] / gdb / ChangeLog
1 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
2
3         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4         possible.
5         (regcache::write_part): Likewise.
6         (readable_regcache::cooked_read_part): Update comment.
7         (readable_regcache::cooked_write_part): Likewise.
8         * regcache.h: (readable_regcache::read_part): Likewise.
9         (regcache::write_part): Likewise.
10
11 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
12             Dirk Schubert  <dirk.schubert@arm.com>
13
14         * aarch64-linux-nat.c (post_attach): New.
15         (aarch64_linux_nat_target::post_attach): Override post_attach to
16         record the number of hardware debug registers.
17
18 2018-06-20  Tom Tromey  <tom@tromey.com>
19
20         * python/py-param.c (add_setshow_generic): Make parameters const.
21         (parmpy_init): Update.
22
23 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
24
25         * regcache.h (regcache_cooked_read_ftype): Rename to...
26         (register_read_ftype): ...this, change type to function_view.
27         (class reg_buffer) <save>: Remove src parameter.
28         (readonly_detached_regcache) <readonly_detached_regcache>: Make
29         parameter non-const in first overload.  Remove src parameter in
30         second overload.
31         * regcache.c (do_cooked_read): Remove.
32         (readonly_detached_regcache::readonly_detached_regcache): Make
33         parameter non-const, adjust call to other constructor.
34         (reg_buffer::save): Remove src parameter.
35         * frame.c (do_frame_register_read): Remove.
36         (frame_save_as_regcache): Use lambda function.
37         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
38         parameter to ppu2spu_data *.
39         (ppu2spu_sniffer): Use lambda function.
40
41 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
42
43         * record-full.c (record_full_target::insert_breakpoint): Remove
44         "struct" keyword, add const.
45
46 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
47
48         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
49         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
50         * configure.ac: Remove AC_PREREQ, add missing quoting.
51         * gnulib/configure.ac: Modernize usage of
52         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
53         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
54         (AUTOMAKE_VERSION): Bump to 1.15.1.
55         * configure: Re-generate.
56         * config.in: Re-generate.
57         * aclocal.m4: Re-generate.
58         * gnulib/aclocal.m4: Re-generate.
59         * gnulib/config.in: Re-generate.
60         * gnulib/configure: Re-generate.
61         * gnulib/import/Makefile.in: Re-generate.
62
63 2018-06-19  Pedro Alves  <palves@redhat.com>
64
65         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
66         (lookup_minimal_symbol_by_pc_section): ... here with
67         gdb_assert_not_reached added.
68
69 2018-06-19  Pedro Alves  <palves@redhat.com>
70
71         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
72         parameter with a block parameter.  Compare location's block symbol
73         with the frame's block instead of addresses.
74         (skip_inline_frames): Pass the current block instead of the
75         frame's address.  Break out as soon as we determine the frame
76         should not be skipped.
77
78 2018-06-18  Tom Tromey  <tom@tromey.com>
79
80         * solib-aix.c (solib_aix_get_section_offsets): Return
81         unique_xmalloc_ptr.
82         (solib_aix_solib_create_inferior_hook): Update.
83
84 2018-06-18  Tom Tromey  <tom@tromey.com>
85
86         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
87
88 2018-06-18  Tom Tromey  <tom@tromey.com>
89
90         * solib-frv.c (frv_relocate_main_executable): Use
91         unique_xmalloc_ptr.
92         * solib-dsbt.c (dsbt_relocate_main_executable): Use
93         unique_xmalloc_ptr.
94
95 2018-06-18  Tom Tromey  <tom@tromey.com>
96
97         * objfiles.h (inhibit_section_map_updates): Update.
98         (resume_section_map_updates, resume_section_map_updates_cleanup):
99         Remove.
100         * solib-svr4.c (svr4_handle_solib_event): Update.
101         * objfiles.c (inhibit_section_map_updates): Return
102         scoped_restore_tmpl<int>.
103         (resume_section_map_updates, resume_section_map_updates_cleanup):
104         Remove.
105
106 2018-06-18  Tom Tromey  <tom@tromey.com>
107
108         * valprint.h (read_string): Update.
109         * valprint.c (read_string): Change type of "buffer".
110         (val_print_string): Update.
111         * python/py-value.c (valpy_string): Update.
112         * language.h (struct language_defn) <la_get_string>: Change
113         type of "buffer".
114         (default_get_string, c_get_string): Update.
115         * language.c (default_get_string): Change type of "buffer".
116         * guile/scm-value.c (gdbscm_value_to_string): Update.
117         * c-lang.c (c_get_string): Change type of "buffer".
118
119 2018-06-18  Tom Tromey  <tom@tromey.com>
120
121         * ser-mingw.c (struct pipe_state_destroyer): New.
122         (pipe_state_up): New typedef.
123         (cleanup_pipe_state): Remove.
124         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
125
126 2018-06-18  Tom Tromey  <tom@tromey.com>
127
128         * rust-lang.h (rust_yyerror): Don't declare.
129         * rust-lang.c (rust_language_defn): Update.
130         * rust-exp.y (yyerror): Now static.
131         * parse.c (parse_exp_in_context_1): Update.
132         * p-lang.h (p_yyerror): Don't declare.
133         * p-lang.c (p_language_defn): Update.
134         * p-exp.y (yyerror): Now static.
135         * opencl-lang.c (opencl_language_defn): Update.
136         * objc-lang.c (objc_language_defn): Update.
137         * m2-lang.h (m2_yyerror): Don't declare.
138         * m2-lang.c (m2_language_defn): Update.
139         * m2-exp.y (yyerror): Now static.
140         * language.h (struct language_defn) <la_error>: Remove.
141         * language.c (unk_lang_error): Remove.
142         (unknown_language_defn, auto_language_defn): Remove.
143         * go-lang.h (go_yyerror): Don't declare.
144         * go-lang.c (go_language_defn): Update.
145         * go-exp.y (yyerror): Now static.
146         * f-lang.h (f_yyerror): Don't declare.
147         * f-lang.c (f_language_defn): Update.
148         * f-exp.y (yyerror): Now static.
149         * d-lang.h (d_yyerror): Don't declare.
150         * d-lang.c (d_language_defn): Update.
151         * d-exp.y (yyerror): Now static.
152         * c-lang.h (c_yyerror): Don't declare.
153         * c-lang.c (c_language_defn, cplus_language_defn)
154         (asm_language_defn, minimal_language_defn): Update.
155         * c-exp.y (yyerror): Now static.
156         * ada-lang.h (ada_yyerror): Don't declare.
157         * ada-lang.c (ada_language_defn): Update.
158         * ada-exp.y (yyerror): Now static.
159
160 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
161
162         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
163         (store_sveregs_to_thread): Likewise.
164         (aarch64_linux_fetch_inferior_registers): Check for SVE.
165         (aarch64_linux_store_inferior_registers): Likewise.
166         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
167         function.
168         (aarch64_sve_regs_copy_to_regcache): Likewise.
169         (aarch64_sve_regs_copy_from_regcache): Likewise.
170         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
171         declaration.
172         (aarch64_sve_regs_copy_to_regcache): Likewise.
173         (aarch64_sve_regs_copy_from_regcache): Likewise.
174         (sve_context): Structure from Linux headers.
175         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
176         (SVE_SIG_ZREG_SIZE): Likewise.
177         (SVE_SIG_PREG_SIZE): Likewise.
178         (SVE_SIG_FFR_SIZE): Likewise.
179         (SVE_SIG_REGS_OFFSET): Likewise.
180         (SVE_SIG_ZREGS_OFFSET): Likewise.
181         (SVE_SIG_ZREG_OFFSET): Likewise.
182         (SVE_SIG_ZREGS_SIZE): Likewise.
183         (SVE_SIG_PREGS_OFFSET): Likewise.
184         (SVE_SIG_PREG_OFFSET): Likewise.
185         (SVE_SIG_PREGS_SIZE): Likewise.
186         (SVE_SIG_FFR_OFFSET): Likewise.
187         (SVE_SIG_REGS_SIZE): Likewise.
188         (SVE_SIG_CONTEXT_SIZE): Likewise.
189         (SVE_PT_REGS_MASK): Likewise.
190         (SVE_PT_REGS_FPSIMD): Likewise.
191         (SVE_PT_REGS_SVE): Likewise.
192         (SVE_PT_VL_INHERIT): Likewise.
193         (SVE_PT_VL_ONEXEC): Likewise.
194         (SVE_PT_REGS_OFFSET): Likewise.
195         (SVE_PT_FPSIMD_OFFSET): Likewise.
196         (SVE_PT_FPSIMD_SIZE): Likewise.
197         (SVE_PT_SVE_ZREG_SIZE): Likewise.
198         (SVE_PT_SVE_PREG_SIZE): Likewise.
199         (SVE_PT_SVE_FFR_SIZE): Likewise.
200         (SVE_PT_SVE_FPSR_SIZE): Likewise.
201         (SVE_PT_SVE_FPCR_SIZE): Likewise.
202         (__SVE_SIG_TO_PT): Likewise.
203         (SVE_PT_SVE_OFFSET): Likewise.
204         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
205         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
206         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
207         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
208         (SVE_PT_SVE_PREG_OFFSET): Likewise.
209         (SVE_PT_SVE_PREGS_SIZE): Likewise.
210         (SVE_PT_SVE_FFR_OFFSET): Likewise.
211         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
212         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
213         (SVE_PT_SVE_SIZE): Likewise.
214         (SVE_PT_SIZE): Likewise.
215         (HAS_SVE_STATE): New define.
216
217 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
218
219         * nat/aarch64-sve-linux-sigcontext.h: New file.
220         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
221         new files.
222         (SVE_VQ_MIN): Likewise.
223         (SVE_VQ_MAX): Likewise.
224         (SVE_VL_MIN): Likewise.
225         (SVE_VL_MAX): Likewise.
226         (SVE_NUM_ZREGS): Likewise.
227         (SVE_NUM_PREGS): Likewise.
228         (sve_vl_valid): Likewise.
229         (struct user_sve_header): Likewise.
230
231 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
232             Richard Bunt <Richard.Bunt@arm.com>
233
234         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
235         was requested by GDB.
236
237 2018-06-15  Tom de Vries  <tdevries@suse.de>
238
239         * MAINTAINERS (Write After Approval): Add Tom de Vries.
240
241 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
242
243         * gnulib/update-gnulib.sh: Print expected versions of
244         autoconf/aclocal.
245
246 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
247
248         * arch-utils.c (default_type_align): Use type_length_units.
249         * gdbtypes.c (type_align): Use type_length_units.
250
251 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
252
253         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
254         of 'define' command.
255
256 2018-06-14  Tom de Vries  <tdevries@suse.de>
257
258         PR cli/22573
259         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
260         get_no_prettyformat_print_options.
261
262 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
263
264         * sparc-nat.h: Include target.h.
265         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
266         <fetch_registers>: Remove this argument in function call.
267         <store_registers>: Remove this argument in function call, remove
268         extra semicolon.
269         <low_forget_process>: Call sparc64_forget_process instead of
270         sparc_forget_process.
271
272 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
273
274         * procfs.c (_initialize_procfs): Use add_inf_child_target.
275         (procfs_target::make_corefile_notes): Adjust to new
276         target_read_alloc return type.
277
278 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
279             Stephen Roberts  <stephen.roberts@arm.com>
280
281         PR gdb/22882
282         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
283         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
284         Move should_notify_stop local into more inner scope.
285
286 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
287             Stephen Roberts  <stephen.roberts@arm.com>
288
289         PR gdb/22882
290         * infrun.c (resume_1): Add call to mark_async_event_handler.
291
292 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
293
294         * infrun.c (do_target_wait): Change old version of $pc printed.
295
296 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
297
298         * dwarf2read.c (read_index_from_section): Rename to...
299         (read_gdb_index_from_section): ... this, update all callers.
300         (dwarf2_read_index): Rename to...
301         (dwarf2_read_gdb_index): ... this, update all callers.
302
303 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
304
305         * gdb/hppa-linux-nat.c
306         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
307         hppa_linux_nat_target::fetch_registers.
308
309 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
310
311         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
312         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
313         (AARCH64_DWARF_SVE_FFR): Likewise.
314         (AARCH64_DWARF_SVE_P0): Likewise.
315         (AARCH64_DWARF_SVE_Z0): Likewise.
316
317 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
318
319         * common/common-regcache.h (raw_compare): New function.
320         * regcache.c (regcache::raw_compare): Likewise.
321         * regcache.h (regcache::raw_compare): New declaration.
322
323 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
324
325         * common/common-regcache.h (reg_buffer_common): New structure.
326         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
327         (reg_buffer::raw_supply): Likewise.
328         (reg_buffer::raw_supply_integer): Likewise.
329         (reg_buffer::raw_supply_zeroed): Likewise.
330         (reg_buffer::raw_collect): Likewise.
331         (reg_buffer::raw_collect_integer): Likewise.
332         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
333         (reg_buffer::raw_supply): Likewise.
334         (reg_buffer::raw_supply_integer): Likewise.
335         (reg_buffer::raw_supply_zeroed): Likewise.
336         (reg_buffer::raw_collect): Likewise.
337         (reg_buffer::raw_collect_integer): Likewise.
338
339 2018-06-10  Tom Tromey  <tom@tromey.com>
340
341         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
342         (class remote_state) <stop_reply_queue>: Now std::vector.
343         (remote_state::~remote_state)
344         (remote_target::stop_reply_queue_length): Update.
345         (struct queue_iter_param, remove_child_of_pending_fork)
346         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
347         (check_pending_event_prevents_wildcard_vcont_callback)
348         (remove_stop_reply_for_inferior)
349         (remove_stop_reply_of_remote_state)
350         (remote_notif_remove_once_on_match)
351         (stop_reply_match_ptid_and_ws)
352         (remote_kill_child_of_pending_fork): Remove.
353         (remote_target::remove_new_fork_children)
354         (remote_target::check_pending_events_prevent_wildcard_vcont)
355         (remote_target::discard_pending_stop_replies)
356         (remote_target::discard_pending_stop_replies_in_queue)
357         (remote_target::remote_notif_remove_queued_reply)
358         (remote_target::queued_stop_reply)
359         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
360         (remote_target::wait, remote_target::kill_new_fork_children)
361         (remote_target::async): Update.
362
363 2018-06-10  Tom Tromey  <tom@tromey.com>
364
365         * record-full.c (record_full_arch_list_cleanups): Remove.
366         (record_full_message): Use try/catch.
367         (record_full_wait_cleanups): Remove.
368         (record_full_wait_1): Use try/catch.
369         (record_full_restore): Likewise.
370
371 2018-06-10  Tom Tromey  <tom@tromey.com>
372
373         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
374         declare VEC.  Add constructor.
375         <in_target_beneath>: Now bool.
376         (record_full_breakpoints): Now a std::vector, static.
377         (record_full_sync_record_breakpoints)
378         (record_full_init_record_breakpoints)
379         (record_full_target::insert_breakpoint)
380         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
381
382 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
383
384         * dwarf2read.c (process_cu_includes): Remove struct keyword.
385         * serial.c (serial_interface_lookup): Remove struct keyword.
386
387 2018-06-10  Tom Tromey  <tom@tromey.com>
388
389         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
390         method.
391         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
392         a method.
393         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
394         method.
395         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
396         "beneath" as a method.
397         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
398         Use "beneath" as a method.
399
400 2018-06-10  Tom Tromey  <tom@tromey.com>
401
402         * tracefile.c (struct trace_file_writer_deleter): New.
403         <operator()>: Rename from trace_file_writer_xfree.
404         (trace_file_writer_up): New typedef.
405         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
406
407 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
408
409         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
410         <m_registers, m_register_status>: Change type to
411         std::unique_ptr.
412         * regcache.c (reg_buffer::reg_buffer): Use new instead of
413         XCNEWVEC.
414
415 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
416
417         * common/common-regcache.h (enum register_status): Add
418         underlying type "signed char".
419         * regcache.h (reg_buffer) <m_register_status>: Change type to
420         register_status *.
421         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
422         register_status instead of signed char.
423         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
424         (reg_buffer::get_register_status): Remove cast.
425         (readable_regcache::raw_read): Remove cast.
426         (readable_regcache::cooked_read): Remove cast.
427
428 2018-06-09  Tom Tromey  <tom@tromey.com>
429
430         * source.c (reverse_search_command, forward_search_command): Use
431         scoped_fd.
432
433 2018-06-09  Tom Tromey  <tom@tromey.com>
434
435         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
436         (serial_ops_list): Now static, std::vector.
437         (serial_interface_lookup, serial_add_interface): Update.
438
439 2018-06-09  Tom Tromey  <tom@tromey.com>
440
441         * dwarf2read.c (process_cu_includes): Update.
442         (process_full_comp_unit): Update.
443         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
444         std::vector.
445
446 2018-06-08  Paul Koning  <paul_koning@dell.com>
447
448         PR gdb/23252
449
450         * python/python.c (do_start_initialization):
451         Avoid call to internal Python API.
452         (init__gdb_module): New function.
453
454 2018-06-08  Gary Benson <gbenson@redhat.com>
455
456         * linux-thread-db.c (valprint.h): New include.
457         (struct check_thread_db_info): New structure.
458         (check_thread_db_on_load, tdb_testinfo): New static globals.
459         (check_thread_db, check_thread_db_callback): New functions.
460         (try_thread_db_load_1): Run integrity checks if requested.
461         (maintenance_check_libthread_db): New function.
462         (_initialize_thread_db): Register "maint check libthread-db"
463         and "maint set/show check-libthread-db".
464         * NEWS: Mention the above new commands.
465
466 2018-06-08  Tom Tromey  <tom@tromey.com>
467
468         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
469         now a method.
470
471 2018-06-08  Tom Tromey  <tom@tromey.com>
472
473         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
474
475 2018-06-08  Tom Tromey  <tom@tromey.com>
476
477         * common/btrace-common.h (struct btrace_data): Add constructor,
478         destructor, move assignment operator.
479         <empty, clear, fini>: New methods.
480         <format>: Initialize.
481         (btrace_data_init, btrace_data_fini, btrace_data_clear)
482         (btrace_data_empty): Don't declare.
483         * common/btrace-common.c (btrace_data_init): Remove.
484         (btrace_data::fini): Rename from btrace_data_fini.
485         (btrace_data::empty): Rename from btrace_data_empty.
486         (btrace_data::clear): Rename from btrace_data_clear.  Return
487         bool.
488         * btrace.h (make_cleanup_btrace_data): Don't declare.
489         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
490         (parse_xml_btrace): Update.
491         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
492         (maint_btrace_clear_packet_history_cmd): Update.
493
494 2018-06-07  Pedro Alves  <palves@redhat.com>
495
496         * target.h (target_ops) <beneath>: Now a method.  All references
497         updated.
498         (class target_stack): New.
499         * target.c (g_target_stack): New.
500         (g_current_top_target): Delete.
501         (current_top_target): Get the top target out of g_target_stack.
502         (target_stack::push, target_stack::unpush): New.
503         (push_target, unpush_target): Reimplement.
504         (target_is_pushed): Reimplement in terms of g_target_stack.
505         (target_ops::beneath, target_stack::find_beneath): New.
506
507 2018-06-07  Pedro Alves  <palves@redhat.com>
508
509         * target.h (find_target_beneath): Delete declaration.
510         * target.c (find_target_beneath): Delete definition.
511         * aix-thread.c: All callers of find_target_beneath adjusted to
512         call target_ops::beneath instead.
513         * bsd-uthread.c: Likewise.
514         * linux-thread-db.c: Likewise.
515         * ravenscar-thread.c: Likewise.
516         * sol-thread.c: Likewise.
517         * spu-multiarch.c: Likewise.
518
519 2018-06-07  Pedro Alves  <palves@redhat.com>
520
521         * target.h (target_ops) <beneath>: Now a method.  All references
522         updated.
523         (target_ops) <m_beneath>: New.
524         * target.c (target_ops::beneath): New.
525         * corelow.c: Adjust all references to target_ops::beneath.
526         * linux-thread-db.c: Likewise.
527         * make-target-delegates: Likewise.
528         * record-btrace.c: Likewise.
529         * record-full.c: Likewise.
530         * remote.c: Likewise.
531         * target.c: Likewise.
532         * target-delegates.c: Regenerate.
533
534 2018-06-07  Pedro Alves  <palves@redhat.com>
535
536         * target.h (target_stack): Delete.
537         (current_top_target): Declare function.
538         * target.c (target_stack): Delete.
539         (g_current_top_target): New.
540         (current_top_target): New function.
541         * auxv.c: Use current_top_target instead of target_stack
542         throughout.
543         * avr-tdep.c: Likewise.
544         * breakpoint.c: Likewise.
545         * corefile.c: Likewise.
546         * elfread.c: Likewise.
547         * eval.c: Likewise.
548         * exceptions.c: Likewise.
549         * frame.c: Likewise.
550         * gdbarch-selftests.c: Likewise.
551         * gnu-v3-abi.c: Likewise.
552         * ia64-tdep.c: Likewise.
553         * ia64-vms-tdep.c: Likewise.
554         * infcall.c: Likewise.
555         * infcmd.c: Likewise.
556         * infrun.c: Likewise.
557         * linespec.c: Likewise.
558         * linux-tdep.c: Likewise.
559         * minsyms.c: Likewise.
560         * ppc-linux-nat.c: Likewise.
561         * ppc-linux-tdep.c: Likewise.
562         * procfs.c: Likewise.
563         * regcache.c: Likewise.
564         * remote.c: Likewise.
565         * rs6000-tdep.c: Likewise.
566         * s390-linux-nat.c: Likewise.
567         * s390-tdep.c: Likewise.
568         * solib-aix.c: Likewise.
569         * solib-darwin.c: Likewise.
570         * solib-dsbt.c: Likewise.
571         * solib-spu.c: Likewise.
572         * solib-svr4.c: Likewise.
573         * solib-target.c: Likewise.
574         * sparc-tdep.c: Likewise.
575         * sparc64-tdep.c: Likewise.
576         * spu-tdep.c: Likewise.
577         * symfile.c: Likewise.
578         * symtab.c: Likewise.
579         * target-descriptions.c: Likewise.
580         * target-memory.c: Likewise.
581         * target.c: Likewise.
582         * target.h: Likewise.
583         * tracefile-tfile.c: Likewise.
584         * tracepoint.c: Likewise.
585         * valops.c: Likewise.
586         * valprint.c: Likewise.
587         * value.c: Likewise.
588         * windows-tdep.c: Likewise.
589         * mi/mi-main.c: Likewise.
590
591 2018-06-07  Tom Tromey  <tom@tromey.com>
592
593         * valprint.h (build_address_symbolic): Declare.
594         * printcmd.c (print_address_symbolic): Update.
595         (build_address_symbolic): Change "name" and "filename" to
596         std::string.
597         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
598         Update.
599         * defs.h (build_address_symbolic): Remove declaration.
600
601 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
602
603         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
604         (aarch64_vnv_type): Add function.
605         (aarch64_pseudo_register_name): Add V regs for SVE.
606         (aarch64_pseudo_register_type): Likewise.
607         (aarch64_pseudo_register_reggroup_p): Likewise.
608         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
609         (aarch64_pseudo_read_value): Add V regs for SVE.
610         (aarch64_pseudo_write_2): Use V0 offset for SVE
611         (aarch64_pseudo_write): Add V regs for SVE.
612         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
613
614 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
615
616         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
617         (sve_vl_from_vq): Likewise.
618
619 2018-06-05  Tom Tromey  <tom@tromey.com>
620
621         * cli/cli-cmds.c (show_version): Update.
622         * top.c (print_gdb_version): Add "interactive" parameter.
623         Update.
624         * main.c (captured_main_1): Update.
625         * top.h (print_gdb_version): Add "interactive" parameter and a
626         comment.
627
628 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
629
630         * common/enum-flags.h: Add trailing semicolon to example in
631         comment.
632
633 2018-06-05  Tom Tromey  <tom@tromey.com>
634
635         PR cli/12326:
636         * NEWS: Add entry about pager.
637         * utils.c (pagination_disabled_for_command): New global.
638         (prompt_for_continue): Allow "c" response to prompt.
639         (reinitialize_more_filter): Clear
640         pagination_disabled_for_command.
641         (fputs_maybe_filtered): Check pagination_disabled_for_command.
642
643 2018-06-04  Tom Tromey  <tom@tromey.com>
644
645         * ada-lang.h (ada_lookup_symbol_list): Update.
646         * ada-lang.c (resolve_subexp): Update.
647         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
648         parameter.
649         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
650         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
651         results parameter to std::vector.
652         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
653         Update.
654         * ada-exp.y (block_lookup): Update.
655         (select_possible_type_sym): Change type of syms.  Remove nsyms
656         parameter.
657         (write_var_or_type, write_name_assoc): Update.
658
659 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
660
661         * windows-nat.c (windows_nat_target::xfer_partial): Return
662         TARGET_XFER_E_IO if we need to delegate to the target beneath
663         but BENEATH is NULL.
664
665 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
666
667         * Makefile.in (config.status): Add configure.nat as a
668         dependency.
669
670 2018-06-04  Tom Tromey  <tom@tromey.com>
671
672         * cp-name-parser.y (cpname_state): Add method declarations.
673         (HANDLE_QUAL): Update.
674         (cpname_state::d_grab, cpname_state::fill_comp)
675         (cpname_state::make_operator, cpname_state::make_dtor)
676         (cpname_state::make_builtin_type, cpname_state::make_name)
677         (cpname_state::d_qualify, cpname_state::d_int_type)
678         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
679         (%union): Move earlier.
680
681 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
682
683         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
684
685 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
686
687         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
688         (aarch64_pseudo_write_1): Likewise.
689         (aarch64_pseudo_read_value): Use helper.
690         (aarch64_pseudo_write): Likewise.
691
692 2018-06-04  Pedro Alves  <palves@redhat.com>
693
694         * darwin-nat.c (darwin_ops): Delete.
695         (darwin_attach_pid): Use get_native_target.
696
697 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
698
699         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
700         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
701
702 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
703
704         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
705         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
706         (aarch64_gdbarch_init): Check for SVE.
707         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
708
709 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
710
711         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
712         * aarch64-tdep.h (aarch64_read_description): Likewise.
713         * arch/aarch64.c (aarch64_create_target_description): Likewise.
714         * arch/aarch64.h (aarch64_create_target_description): Likewise.
715         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
716         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
717         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
718
719 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
720
721         * value.c (value_fetch_lazy_bitfield): New.
722         (value_fetch_lazy_memory): New.
723         (value_fetch_lazy_register): New.
724         (value_fetch_lazy): Factor out to smaller functions.
725
726 2018-06-01  Tom Tromey  <tom@tromey.com>
727
728         * cp-name-parser.y (backslashable, represented): Now const.
729
730 2018-06-01  Tom Tromey  <tom@tromey.com>
731
732         * cp-name-parser.y: Include parser-defs.h.
733         (parser_fprintf): Remove declaration.
734
735 2018-06-01  Tom Tromey  <tom@tromey.com>
736
737         * cp-name-parser.y: Use %pure-parser, %lex-param, and
738         %parse-param.
739         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
740         (global_result): Remove globals.
741         (struct cpname_state): New.
742         (yyparse): Don't declare.
743         (yylex, yyerror): Move declarations after %union.
744         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
745         (make_name): Add state parameter.
746         Update all callers.
747         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
748         parameter.
749         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
750         Update.
751         (yylex): Add lvalp, state parameters.
752         (yyerror): Add state parameter.
753         (cp_demangled_name_to_comp): Update.
754
755 2018-06-01  Tom Tromey  <tom@tromey.com>
756
757         * cp-name-parser.y (parser_fprintf): Declare.
758         (GDB_YY_REMAP_PREFIX): Define.
759         Include yy-remap.h.  Don't redefine yy* identifiers.
760
761 2018-06-01  Tom Tromey  <tom@tromey.com>
762
763         * python/py-type.c (typy_legacy_template_argument): Update.
764         * cp-support.h (cp_demangled_name_to_comp): Update.
765         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
766         parameter to be a "std::string *".
767         (main): Update.
768
769 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
770
771         * ada-lex.l: Include "diagnostics.h" instead of
772         "common/diagnostics.h".
773         * unittests/environ-selftests.c: Likewise.
774         * common/diagnostics.h: Moved to ../include.
775
776 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
777
778         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
779         to language_mode_manual while calling breakpoint_re_set_one.
780
781 2018-06-01  Tom Tromey  <tom@tromey.com>
782
783         * valops.c (value_cast_structs, destructor_name_p): Update.
784         * symtab.c (gdb_mangle_name): Update.
785         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
786         Update.
787         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
788         (pascal_object_print_value_fields, pascal_object_print_value):
789         Update.
790         * p-typeprint.c (pascal_type_print_derivation_info): Update.
791         * linespec.c (find_methods): Update.
792         * gdbtypes.h (type_name_no_tag): Remove.
793         (type_name_or_error): Rename from type_name_no_tag_or_error.
794         * gdbtypes.c (type_name_no_tag): Remove.
795         (type_name_or_error): Rename from type_name_no_tag_or_error.
796         (lookup_struct_elt_type, check_typedef): Update.
797         * expprint.c (print_subexp_standard): Update.
798         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
799         * d-namespace.c (d_lookup_nested_symbol): Update.
800         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
801         (cp_print_class_member): Update.
802         * cp-namespace.c (cp_lookup_nested_symbol): Update.
803         * completer.c (add_struct_fields): Update.
804         * c-typeprint.c (cp_type_print_derivation_info)
805         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
806         Update.
807         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
808         (ada_prefer_type, ada_is_exception_sym): Update.
809
810 2018-06-01  Tom Tromey  <tom@tromey.com>
811
812         * valops.c (enum_constant_from_type, value_namespace_elt)
813         (value_maybe_namespace_elt): Update.
814         * valarith.c (find_size_for_pointer_math): Update.
815         * target-descriptions.c (make_gdb_type): Update.
816         * symmisc.c (print_symbol): Update.
817         * stabsread.c (define_symbol, read_type)
818         (complain_about_struct_wipeout, add_undefined_type)
819         (cleanup_undefined_types_1): Update.
820         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
821         (rust_range_type_p, val_print_struct, rust_print_struct_def)
822         (rust_internal_print_type, rust_composite_type)
823         (rust_evaluate_funcall, rust_evaluate_subexp)
824         (rust_inclusive_range_type_p): Update.
825         * python/py-type.c (typy_get_tag): Update.
826         * p-typeprint.c (pascal_type_print_base): Update.
827         * mdebugread.c (parse_symbol, parse_type): Update.
828         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
829         Update.
830         * guile/scm-type.c (gdbscm_type_tag): Update.
831         * go-lang.c (sixg_string_p): Update.
832         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
833         Update.
834         * gdbtypes.h (struct main_type) <tag_name>: Remove.
835         (TYPE_TAG_NAME): Remove.
836         * gdbtypes.c (type_name_no_tag): Simplify.
837         (check_typedef, check_types_equal, recursive_dump_type)
838         (copy_type_recursive, arch_composite_type): Update.
839         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
840         in summary mode when needed.
841         * eval.c (evaluate_funcall): Update.
842         * dwarf2read.c (fixup_go_packaging, read_structure_type)
843         (process_structure_scope, read_enumeration_type)
844         (read_namespace_type, read_module_type, determine_prefix): Update.
845         * cp-support.c (inspect_type): Update.
846         * coffread.c (process_coff_symbol, decode_base_type): Update.
847         * c-varobj.c (c_is_path_expr_parent): Update.
848         * c-typeprint.c (c_type_print_base_struct_union): Update.
849         (c_type_print_base_1): Update.  Print struct/class/union/enum in
850         summary when using C language.
851         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
852         (gen_maybe_namespace_elt): Update.
853         * ada-lang.c (ada_type_name): Simplify.
854         (empty_record, ada_template_to_fixed_record_type_1)
855         (template_to_static_fixed_type)
856         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
857
858 2018-06-01  Tom Tromey  <tom@tromey.com>
859
860         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
861         c_print_type.
862         * c-typeprint.c (c_print_type_1): Add "language" parameter.
863         (c_print_type): Update.
864         (c_print_type): New overload.
865         (c_type_print_varspec_prefix, c_type_print_args)
866         (c_type_print_varspec_suffix, c_print_type_no_offsets)
867         (c_type_print_base_struct_union, c_type_print_base_1)
868         (cp_type_print_method_args): Add "language" parameter.
869         (c_type_print_base): Update.
870         * c-lang.h (c_print_type): Add new overload.
871
872 2018-06-01  Tom Tromey  <tom@tromey.com>
873
874         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
875         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
876
877 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
878
879         * aarch64-tdep.c (aarch64_sve_register_names): New const
880         var.
881         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
882         (AARCH64_SVE_Z_REGS_NUM): New define.
883         (AARCH64_SVE_P_REGS_NUM): Likewise.
884         (AARCH64_SVE_NUM_REGS): Likewise.
885
886 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
887
888         * nat/linux-ptrace.h [__alpha__]
889         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
890         definitions.
891
892 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
893
894         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
895         the endianness selected.
896         * NEWS: Document `set endian auto' mode operation update.
897
898 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
899
900         * Makefile.in: Add new header.
901         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
902         (sve_vl_from_vg): Likewise.
903         (sve_vq_from_vl): Likewise.
904         (sve_vl_from_vq): Likewise.
905         (sve_vq_from_vg): Likewise.
906         (sve_vg_from_vq): Likewise.
907         * configure.nat: Add new c file.
908         * nat/aarch64-sve-linux-ptrace.c: New file.
909         * nat/aarch64-sve-linux-ptrace.h: New file.
910
911 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
912
913         * aarch64-linux-nat.c (aarch64_linux_read_description):
914         Add parmeter zero.
915         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
916         Likewise.
917         * aarch64-tdep.c (tdesc_aarch64_list): Add.
918         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
919         (aarch64_gdbarch_init): Add parmeter zero.
920         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
921         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
922         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
923         parmeter.
924         * doc/gdb.texinfo: Describe SVE feature
925         * features/aarch64-sve.c: New file.
926
927 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
928
929         PR gdb/23210
930         * gdbarch.sh (significant_addr_bit): Default to zero when
931         not set by target architecture.
932         * gdbarch.c: Re-generated.
933         * utils.c (address_significant): Update.
934
935 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
936
937         * stack.c (func_command): Remove trailing newline in call to error.
938
939 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
940
941         * regcache.h (regcache_raw_collect): Remove, update callers to
942         use regcache::raw_collect.
943         * regcache.c (regcache_raw_collect): Remove.
944
945 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
946
947         * regcache.h (regcache_raw_supply): Remove, update callers to
948         use detached_regcache::raw_supply.
949         * regcache.c (regcache_raw_supply): Remove.
950
951 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
952
953         * regcache.h (regcache_cooked_write_part): Remove, update
954         callers to use regcache::cooked_write_part.
955         * regcache.c (regcache_cooked_write_part): Remove.
956
957 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
958
959         * regcache.h (regcache_cooked_read_part): Remove, update callers
960         to use readable_regcache::cooked_read_part.
961         * regcache.c (regcache_cooked_read_part): Remove.
962
963 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
964
965         * regcache.h (regcache_cooked_read_value): Remove, update
966         callers to use readable_regcache::cooked_read_value.
967         * regcache.c (regcache_cooked_read_value): Remove.
968
969 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
970
971         * regcache.h (regcache_cooked_write): Remove, update callers to
972         use regcache::cooked_write.
973         * regcache.c (regcache_cooked_write): Remove.
974
975 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
976
977         * regcache.h (regcache_invalidate): Remove, update callers to
978         use detached_regcache::invalidate instead.
979         * regcache.c (regcache_invalidate): Remove.
980
981 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
982
983         * regcache.h (regcache_raw_write_part): Remove, update callers
984         to use regcache::raw_write_part instead.
985         * regcache.c (regcache_raw_write_part): Remove.
986
987 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
988
989         * regcache.h (regcache_raw_read_part): Remove, update callers to
990         use readable_regcache::raw_read_part instead.
991         * regcache.c (regcache_raw_read_part): Remove.
992
993 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
994
995         * regcache.h (regcache_cooked_read): Remove, update callers to
996         use readable_regcache::cooked_read instead.
997         * regcache.c (regcache_cooked_read): Remove.
998
999 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1000
1001         * regcache.h (regcache_raw_write): Remove, update callers to use
1002         regcache::raw_write instead.
1003         * regcache.c (regcache_raw_write): Remove.
1004
1005 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1006
1007         * regcache.h (regcache_raw_read): Remove, update callers to use
1008         readable_regcache::raw_read instead.
1009         * regcache.c (regcache_raw_read): Remove.
1010
1011 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1012
1013         * regcache.h (regcache_raw_update): Remove, update callers to
1014         use readable_regcache::raw_update instead.
1015         * regcache.c (regcache_raw_update): Remove.
1016
1017 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1018
1019         * regcache.h (regcache_register_status): Remove, update callers
1020         to use reg_buffer::get_register_status directly instead.
1021         * regcache.c (regcache_register_status): Remove.
1022
1023 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1024
1025         * regcache.h (regcache_get_ptid): Remove, update all callers to
1026         call regcache::ptid instead.
1027         * regcache.c (regcache_get_ptid): Remove.
1028
1029 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
1030
1031         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
1032
1033 2018-05-30  Pedro Alves  <palves@redhat.com>
1034
1035         * common/common-exceptions.h (exception_rethrow): Use
1036         ATTRIBUTE_NORETURN.
1037
1038 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
1039
1040         * breakpoint.c (print_solib_event, check_status_catch_solib):
1041         Remove struct keyword in range-based for loops.
1042         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
1043         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
1044         Likewise.
1045         * linespec.c (find_superclass_methods, search_minsyms_for_name):
1046         Likewise.
1047         * symfile.c (addr_info_make_relative): Likewise.
1048         * thread.c (value_in_thread_stack_temporaries): Likewise.
1049
1050 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
1051
1052         PR gdb/16841
1053         * valops.c (value_struct_elt_for_reference): Call check_typedef on
1054         aggregate type to get its real type before accessing it.
1055
1056 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
1057
1058         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
1059         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
1060         * coff-pe-read.c (add_pe_forwarded_sym): Replace
1061         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
1062         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
1063         * jit.c (jit_breakpoint_re_set_internal): Likewise.
1064         * printcmd.c (info_address_command): Likewise.
1065
1066 2018-05-29  Tom Tromey  <tom@tromey.com>
1067
1068         * windows-nat.c (handle_exception): Update fall-through comment.
1069
1070 2018-05-29  Tom Tromey  <tom@tromey.com>
1071
1072         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
1073         (struct program_space) <added_solibs>: Now a std::vector.
1074         * breakpoint.c (print_solib_event): Update.
1075         (check_status_catch_solib): Update.
1076         * progspace.c (clear_program_space_solib_cache): Update.
1077         * solib.c (update_solib_list): Update.
1078
1079 2018-05-29  Tom Tromey  <tom@tromey.com>
1080
1081         * python/py-type.c (typy_richcompare): Update.
1082         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
1083         * gdbtypes.h (types_deeply_equal): Return bool.
1084         (types_equal): Likewise.
1085         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
1086         declare VEC.
1087         (check_types_equal): Change worklist to std::vector.  Return
1088         bool.
1089         (struct type_equality_entry): Add constructor.
1090         (compare_maybe_null_strings): Return bool.
1091         (check_types_worklist): Return bool.  Change worklist to
1092         std::vector.
1093         (types_deeply_equal): Use std::vector.
1094         (types_equal): Return bool.
1095         (compare_maybe_null_strings): Simplify.
1096
1097 2018-05-29  Tom Tromey  <tom@tromey.com>
1098
1099         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
1100
1101 2018-05-29  Tom Tromey  <tom@tromey.com>
1102
1103         * objc-lang.h: Don't include cp-support.h.
1104         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
1105         declare VEC.
1106
1107 2018-05-27  Tom Tromey  <tom@tromey.com>
1108
1109         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
1110
1111 2018-05-25  Tom Tromey  <tom@tromey.com>
1112
1113         * value.c (value::location): Initialize.
1114
1115 2018-05-25  Tom Tromey  <tom@tromey.com>
1116
1117         * dbxread.c (init_bincl_list): Remove.
1118         (bincl_list): Now a std::vector.
1119         (bincls_allocated, next_bincl): Remove.
1120         (free_bincl_list, do_free_bincl_list_cleanup)
1121         (make_cleanup_free_bincl_list): Remove.
1122         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
1123         unique_xmalloc_ptr.
1124         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
1125         (struct header_file_location): Add constructor.
1126         (add_bincl_to_list): Remove.
1127
1128 2018-05-25  Tom Tromey  <tom@tromey.com>
1129
1130         * tui/tui.c (tui_enable): Update.
1131         * mi/mi-interp.c (mi_interp::init): Update.
1132         * interps.h (class interp) <name>: New method.
1133         <m_name>: Rename from name.
1134         (~scoped_restore_interp): Update.
1135         * interps.c (interp::interp): Update.
1136         (interp_add, interp_set, interp_lookup_existing)
1137         (current_interp_named_p): Update.
1138
1139 2018-05-25  Tom Tromey  <tom@tromey.com>
1140
1141         * interps.c (interp_name): Remove.
1142         * mi/mi-interp.c (mi_interp::init): Update.
1143         * interps.h (interp_name): Remove.
1144         (~scoped_restore_interp): Update.
1145         * tui/tui.c (tui_enable): Update.
1146
1147 2018-05-25  Tom Tromey  <tom@tromey.com>
1148
1149         * utils.c (fputs_maybe_filtered): Update.
1150         * linespec.c (decode_line_full): Update.
1151         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
1152         (mi_print_breakpoint_for_event, mi_solib_loaded)
1153         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1154         (mi_user_selected_context_changed): Update.
1155         * mi/mi-main.c (mi_execute_command): Update.
1156         * cli/cli-script.c (execute_control_command): Update.
1157         * python/python.c (execute_gdb_command): Update.
1158         * solib.c (info_sharedlibrary_command): Update.
1159         * interps.c (interp_ui_out): Remove.
1160         * interps.h (interp_ui_out): Remove.
1161
1162 2018-05-25  Tom Tromey  <tom@tromey.com>
1163
1164         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
1165         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
1166         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
1167
1168 2018-05-25  Tom Tromey  <tom@tromey.com>
1169
1170         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
1171         * interps.c (interp_exec): Use scoped_restore.
1172
1173 2018-05-25  Tom Tromey  <tom@tromey.com>
1174
1175         * remote.c (remote_target::remote_file_get): Use
1176         gdb::byte_vector.
1177         (remote_target::remote_file_put): Likewise.
1178
1179 2018-05-25  Tom Tromey  <tom@tromey.com>
1180
1181         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
1182         a std::string.
1183         (get_pe_section_index, add_pe_exported_sym): Update.
1184         (read_pe_exported_syms): Use gdb::def_vector.
1185
1186 2018-05-25  Tom Tromey  <tom@tromey.com>
1187
1188         * frame.c (remove_prev_frame): Remove.
1189         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
1190
1191 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
1192
1193         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
1194         Remove prototypes.
1195         * mips-linux-nat.c (supply_fpregset): Always call
1196         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
1197         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
1198         `mips_fill_fpregset'.
1199         * mips-linux-tdep.c (mips_supply_fpregset)
1200         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
1201         (mips_fill_fpregset_wrapper): Remove functions.
1202         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
1203         (mips_linux_fpregset): Remove variable.
1204         (mips_linux_iterate_over_regset_sections): Use
1205         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
1206         (mips_linux_o32_sigframe_init): Remove comment.
1207
1208 2018-05-25  Pedro Alves  <palves@redhat.com>
1209
1210         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
1211         (struct readahead_cache, struct packet_reg, struct
1212         remote_arch_state, class remote_state): Move higher up in the
1213         file.
1214         (remote_target::m_remote_state): Now an object instead of a pointer.
1215         (remote_target::get_remote_state): Adjust.
1216
1217 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
1218
1219         * stack.c (select_and_print_frame): Delete.
1220         (struct function_bounds): Move struct within function.
1221         (func_command): Most content moved into new function
1222         find_frame_for_function, use new function, print result, add
1223         function comment.
1224         (find_frame_for_function): New function, now returns a result.
1225
1226 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1227
1228         * stack.c (iterate_over_block_arg_vars): Fix comment.
1229         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
1230
1231 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
1232
1233         PR gdb/23203
1234         * frame.c
1235         (scoped_restore_selected_frame::scoped_restore_selected_frame):
1236         Define.
1237         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
1238         Define.
1239         * frame.h (class scoped_restore_selected_frame): New class.
1240         * stack.c (print_frame_local_vars): Remove catching and rethrowing
1241         of any exception, use scoped_restore_selected_frame to restore the
1242         frame instead.
1243
1244 2018-05-24  Pedro Alves  <palves@redhat.com>
1245
1246         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
1247         override.
1248
1249 2018-05-23  Tom Tromey  <tom@tromey.com>
1250
1251         * complaints.c (struct complaints): Remove.
1252         (symfile_complaint_book): Remove.
1253         (series): New global.
1254         (complaint_internal): Update.
1255         (clear_complaints): Update.
1256
1257 2018-05-23  Tom Tromey  <tom@tromey.com>
1258
1259         * complaints.c (counters): New global.
1260         (struct complain): Remove.
1261         (struct complaints) <root>: Remove.
1262         (complaint_sentinel): Remove.
1263         (symfile_complaint_book): Update.
1264         (find_complaint) Remove.
1265         (complaint_internal, clear_complaints): Update.
1266
1267 2018-05-23  Tom Tromey  <tom@tromey.com>
1268
1269         * complaints.c (struct complain) <file, line>: Remove.
1270         (find_complaint): Remove file, line parameters.
1271         (complaint_internal): Update.
1272
1273 2018-05-23  Tom Tromey  <tom@tromey.com>
1274
1275         * complaints.c (vcomplaint): Remove.
1276         (complaint_internal) Merge in contents of vcomplaint.
1277
1278 2018-05-23  Tom Tromey  <tom@tromey.com>
1279
1280         * complaints.c (struct complaints) <explanation>: Remove.
1281         (symfile_explanations): Remove.
1282         (symfile_complaint_book): Update.
1283         (vcomplaint): Update.
1284         (struct explanation): Remove.
1285
1286 2018-05-23  Tom Tromey  <tom@tromey.com>
1287
1288         * complaints.c (symfile_complaints): Remove.
1289         (complaint_internal): Remove "complaints" parameter.
1290         (clear_complaints, vcomplaint): Remove "c" parameter.
1291         (get_complaints): Remove.
1292         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
1293         (dwarf2_debug_line_missing_file_complaint)
1294         (dwarf2_debug_line_missing_end_sequence_complaint)
1295         (dwarf2_complex_location_expr_complaint)
1296         (dwarf2_const_value_length_mismatch_complaint)
1297         (dwarf2_section_buffer_overflow_complaint)
1298         (dwarf2_macro_malformed_definition_complaint)
1299         (dwarf2_invalid_attrib_class_complaint)
1300         (create_addrmap_from_index, dw2_symtab_iter_next)
1301         (dw2_expand_marked_cus)
1302         (dw2_debug_names_iterator::find_vec_in_debug_names)
1303         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
1304         (create_debug_type_hash_table, init_cutu_and_read_dies)
1305         (partial_die_parent_scope, add_partial_enumeration)
1306         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
1307         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
1308         (read_import_statement, read_file_scope, create_dwo_cu_reader)
1309         (create_cus_hash_table, create_dwp_hash_table)
1310         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
1311         (dwarf2_rnglists_process, dwarf2_ranges_process)
1312         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
1313         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
1314         (handle_struct_member_die, process_structure_scope)
1315         (read_array_type, read_common_block, read_module_type)
1316         (read_tag_pointer_type, read_typedef, read_base_type)
1317         (read_subrange_type, load_partial_dies, partial_die_info::read)
1318         (partial_die_info::read, partial_die_info::read)
1319         (partial_die_info::read, read_checked_initial_length_and_offset)
1320         (dwarf2_string_attr, read_formatted_entries)
1321         (dwarf_decode_line_header)
1322         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1323         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
1324         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
1325         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1326         (get_signatured_type, get_DW_AT_signature_type)
1327         (decode_locdesc, file_file_name, consume_improper_spaces)
1328         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
1329         (dwarf_decode_macro_bytes, dwarf_decode_macros)
1330         (dwarf2_symbol_mark_computed, set_die_type)
1331         (read_attribute_value): Update.
1332         * stap-probe.c (handle_stap_probe, get_stap_base_address):
1333         Update.
1334         * dbxread.c (unknown_symtype_complaint)
1335         (lbrac_mismatch_complaint, repeated_header_complaint)
1336         (set_namestring, function_outside_compilation_unit_complaint)
1337         (read_dbx_symtab, process_one_symbol): Update.
1338         * gdbtypes.c (stub_noname_complaint): Update.
1339         * windows-nat.c (handle_unload_dll): Update.
1340         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
1341         (decode_base_type): Update.
1342         * xcoffread.c (bf_notfound_complaint, ef_complaint)
1343         (eb_complaint, record_include_begin, record_include_end)
1344         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
1345         (process_xcoff_symbol, read_symbol)
1346         (function_outside_compilation_unit_complaint)
1347         (scan_xcoff_symtab): Update.
1348         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
1349         * buildsym.c (finish_block_internal, make_blockvector)
1350         (end_symtab_get_static_block, augment_type_symtab): Update.
1351         * dtrace-probe.c (dtrace_process_dof)
1352         (dtrace_static_probe_ops::get_probes): Update.
1353         * complaints.h (struct complaint): Don't declare.
1354         (symfile_complaints): Remove.
1355         (complaint_internal): Remove "complaints" parameter.
1356         (complaint): Likewise.
1357         (clear_complaints): Likewise.
1358         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1359         (reread_symbols): Update.
1360         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1361         (dwarf2_frame_cache, decode_frame_entry): Update.
1362         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
1363         * objc-lang.c (lookup_objc_class, lookup_child_selector)
1364         (info_selectors_command): Update.
1365         * macrotab.c (macro_include, check_for_redefinition)
1366         (macro_undef): Update.
1367         * objfiles.c (filter_overlapping_sections): Update.
1368         * stabsread.c (invalid_cpp_abbrev_complaint)
1369         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
1370         (define_symbol, error_type, read_type, rs6000_builtin_type)
1371         (stabs_method_name_from_physname, read_member_functions)
1372         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
1373         (attach_fields_to_type, complain_about_struct_wipeout)
1374         (read_range_type, read_args, common_block_start)
1375         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
1376         Update.
1377         * mdebugread.c (index_complaint, unknown_ext_complaint)
1378         (basic_type_complaint, bad_tag_guess_complaint)
1379         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
1380         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
1381         (parse_procedure, parse_lines)
1382         (function_outside_compilation_unit_complaint)
1383         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
1384         (bad_tag_guess_complaint, reg_value_complaint): Update.
1385         * cp-support.c (demangled_name_complaint): Update.
1386         * macroscope.c (sal_macro_scope): Update.
1387         * dwarf-index-write.c (class debug_names): Update.
1388
1389 2018-05-23  Tom Tromey  <tom@tromey.com>
1390
1391         * complaints.c (clear_complaints): Remove "noisy" parameter.
1392         * complaints.h (clear_complaints): Update.
1393         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1394         (reread_symbols): Update.
1395
1396 2018-05-23  Tom Tromey  <tom@tromey.com>
1397
1398         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
1399         SUBSEQUENT_MESSAGE.
1400         (vcomplaint, clear_complaints): Update.
1401         (symfile_explanations): Remove some messages.
1402
1403 2018-05-23  Tom Tromey  <tom@tromey.com>
1404
1405         * complaints.c (internal_complaint): Remove.
1406         * complaints.h (internal_complaint): Remove.
1407
1408 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
1409
1410         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
1411
1412 2018-05-22  Pedro Alves  <palves@redhat.com>
1413
1414         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
1415         (remote_fileio_badfd, remote_fileio_return_errno)
1416         (remote_fileio_return_success, remote_fileio_func_open)
1417         (remote_fileio_func_open, remote_fileio_func_close)
1418         (remote_fileio_func_read, remote_fileio_func_write)
1419         (remote_fileio_func_lseek, remote_fileio_func_rename)
1420         (remote_fileio_func_unlink, remote_fileio_func_stat)
1421         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
1422         (remote_fileio_func_isatty, remote_fileio_func_system): Add
1423         remote_target parameter.
1424         (remote_fio_func_map) <func>: Add remote_target parameter.
1425         (do_remote_fileio_request, remote_fileio_request):
1426         * remote-fileio.h (remote_fileio_request):
1427         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
1428         remote_target parameter.
1429         (remote_notif_process, handle_notification): Adjust to pass down
1430         the remote.
1431         (remote_notif_state_allocate): Add remote_target parameter.  Save
1432         it.
1433         * remote-notif.h (struct remote_target): Forward declare.
1434         (struct notif_client) <parse, ack, can_get_pending_events>: Add
1435         remote_target parameter.
1436         (struct remote_notif_state) <remote>: New field.
1437         (remote_notif_ack, remote_notif_parse): Add remote_target
1438         parameter.
1439         (remote_notif_state_allocate, remote_notif_state_allocate): Add
1440         remote_target parameter.
1441         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
1442         (threads_listing_context, rmt_thread_action, protocol_feature)
1443         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
1444         (packet_result, struct threads_listing_context, remote_state):
1445         Move definitions and declarations higher up.
1446         (remote_target) <~remote_target>: Declare.
1447         (remote_download_command_source, remote_file_put, remote_file_get)
1448         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
1449         (remote_hostio_pread_vFile, remote_hostio_send_command)
1450         (remote_hostio_set_filesystem, remote_hostio_open)
1451         (remote_hostio_close, remote_hostio_unlink, remote_state)
1452         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
1453         (get_memory_write_packet_size, get_memory_read_packet_size)
1454         (append_pending_thread_resumptions, remote_detach_1)
1455         (append_resumption, remote_resume_with_vcont)
1456         (add_current_inferior_and_thread, wait_ns, wait_as)
1457         (process_stop_reply, remote_notice_new_inferior)
1458         (process_initial_stop_replies, remote_add_thread)
1459         (btrace_sync_conf, remote_btrace_maybe_reopen)
1460         (remove_new_fork_children, kill_new_fork_children)
1461         (discard_pending_stop_replies, stop_reply_queue_length)
1462         (check_pending_events_prevent_wildcard_vcont)
1463         (discard_pending_stop_replies_in_queue, stop_reply)
1464         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
1465         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
1466         (remote_interrupt_as, remote_interrupt_ns)
1467         (remote_get_noisy_reply, remote_query_attached)
1468         (remote_add_inferior, remote_current_thread, get_current_thread)
1469         (set_thread, set_general_thread, set_continue_thread)
1470         (set_general_process, write_ptid)
1471         (remote_unpack_thread_info_response, remote_get_threadinfo)
1472         (parse_threadlist_response, remote_get_threadlist)
1473         (remote_threadlist_iterator, remote_get_threads_with_ql)
1474         (remote_get_threads_with_qxfer)
1475         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
1476         (get_offsets, remote_check_symbols, remote_supported_packet)
1477         (remote_query_supported, remote_packet_size)
1478         (remote_serial_quit_handler, remote_detach_pid)
1479         (remote_vcont_probe, remote_resume_with_hc)
1480         (send_interrupt_sequence, interrupt_query)
1481         (remote_notif_get_pending_events, fetch_register_using_p)
1482         (send_g_packet, process_g_packet, fetch_registers_using_g)
1483         (store_register_using_P, store_registers_using_G)
1484         (set_remote_traceframe, check_binary_download)
1485         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
1486         (remote_xfer_live_readonly_partial, remote_read_bytes)
1487         (remote_send_printf, remote_flash_write, readchar)
1488         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
1489         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
1490         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
1491         (extended_remote_disable_randomization, extended_remote_run)
1492         (send_environment_packet, extended_remote_environment_support)
1493         (extended_remote_set_inferior_cwd, remote_write_qxfer)
1494         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
1495         (packet_command): Now methods of ...
1496         (remote_target): ... this class.
1497         (m_remote_state) <remote_target>: New field.
1498         (struct remote_state) <stop_reply_queue,
1499         remote_async_inferior_event_token, wait_forever_enabled_p>: New
1500         fields.
1501         (remote_state::remote_state): Allocate stop_reply_queue.
1502         (remote_state): Delete global.
1503         (get_remote_state_raw): Delete.
1504         (remote_target::get_remote_state): Allocate m_remote_state on
1505         demand.
1506         (get_current_remote_target): New.
1507         (remote_ops, extended_remote_ops): Delete.
1508         (wait_forever_enabled_p, remote_async_inferior_event_token):
1509         Delete, moved to struct remote_state.
1510         (remote_target::close): Delete self.  Destruction bits split to
1511         ...
1512         (remote_target::~remote_target): ... this.
1513         (show_memory_packet_size): Adjust to use
1514         get_current_remote_target.
1515         (struct protocol_feature) <func>: Add remote_target parameter.
1516         All callers adjusted.
1517         (curr_quit_handler_target): New.
1518         (remote_serial_quit_handler): Reimplement.
1519         (remote_target::open_1): Adjust to use get_current_remote_target.
1520         Heap-allocate remote_target/extended_remote_target instances.
1521         (vcont_builder::vcont_builder): Add remote_target parameter, and
1522         save it in m_remote.  All callers adjusted.
1523         (vcont_builder::m_remote): New field.
1524         (vcont_builder::restart, vcont_builder::flush)
1525         (vcont_builder::push_action): Use it.
1526         (remote_target::commit_resume): Use it.
1527         (struct queue_iter_param) <remote>: New field.
1528         (remote_target::remove_new_fork_children): Fill in 'remote' field.
1529         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
1530         (check_pending_event_prevents_wildcard_vcont_callback)
1531         (remote_target::check_pending_events_prevent_wildcard_vcont)
1532         (remote_target::discard_pending_stop_replies)
1533         (remote_target::discard_pending_stop_replies_in_queue)
1534         (remote_target::remote_notif_remove_queued_reply): Fill in
1535         'remote' field.
1536         (remote_notif_get_pending_events): New.
1537         (remote_target::readchar, remote_target::remote_serial_write):
1538         Save/restore curr_quit_handler_target.
1539         (putpkt): New.
1540         (kill_new_fork_children): Fill in 'remote' field.
1541         (packet_command): Use get_current_remote_target, defer to
1542         remote_target method of same name.
1543         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
1544         parameter, and save it in m_remote.  All callers adjusted.
1545         (scoped_remote_fd::release): Use m_remote.
1546         (scoped_remote_fd::m_remote): New field.
1547         (remote_file_put, remote_file_get, remote_file_delete): Use
1548         get_current_remote_target, defer to remote_target method of same
1549         name.
1550         (remote_btrace_reset): Add remote_state paremeter.  Update all
1551         callers.
1552         (remote_async_inferior_event_handler). Pass down 'data'.
1553         (remote_new_objfile): Use get_current_remote_target.
1554         (remote_target::vcont_r_supported): New.
1555         (set_range_stepping): Use get_current_remote_target and
1556         remote_target::vcont_r_supported.
1557         (_initialize_remote): Don't allocate 'remote_state' and
1558         'stop_reply_queue' globals.
1559         * remote.h (struct remote_target): Forward declare.
1560         (getpkt, putpkt, remote_notif_get_pending_events): Add
1561         'remote_target' parameter.
1562
1563 2018-05-22  Pedro Alves  <palves@redhat.com>
1564
1565         * remote.c (vcont_builder): Now a class.  Make all data members
1566         private.
1567         (vcont_builder) <vcont_builder, restart, flush, push_action>:
1568         Declare methods.
1569         (vcont_builder_restart): Rename to ...
1570         (vcont_builder::restart): ... this.
1571         (vcont_builder_flush): Rename to ...
1572         (vcont_builder::flush): ... this.
1573         (vcont_builder_push_action): Rename to ...
1574         (vcont_builder::push_action): ... this.
1575         (remote_target::commit_resume): Adjust.
1576
1577 2018-05-22  Pedro Alves  <palves@redhat.com>
1578
1579         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
1580         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
1581         (get_fixed_memory_packet_size): New.
1582         (get_memory_packet_size): Use it.
1583         (set_memory_packet_size): Don't override the config size with
1584         DEFAULT_MAX_MEMORY_PACKET_SIZE.
1585         (show_memory_packet_size): Use get_fixed_memory_packet_size.
1586         Don't refer to get_memory_packet_size if not connected to a remote
1587         target.  Show "(default)" if configured size is 0.
1588
1589 2018-05-22  Pedro Alves  <palves@redhat.com>
1590
1591         * remote.c (remote_target::mourn_inferior): Move
1592         discard_pending_stop_replies call here from ...
1593         (_initialize_remote): ... here.
1594
1595 2018-05-22  Pedro Alves  <palves@redhat.com>
1596
1597         * remote.c (compare_section_command): Remove set_general_process
1598         call.
1599
1600 2018-05-22  Pedro Alves  <palves@redhat.com>
1601
1602         * remote.c (struct packet_reg, struct remote_arch_state):
1603         Move higher up in the file.
1604         (remote_state) <m_arch_states>: Store remote_arch_state values
1605         instead of remote_arch_state pointers.
1606         (remote_state::get_remote_arch_state): Adjust.
1607
1608 2018-05-22  Pedro Alves  <palves@redhat.com>
1609
1610         * remote.c: Include <unordered_map>.
1611         (remote_state): Now a class.
1612         (remote_state) <get_remote_arch_state>: Declare method.
1613         <get_remote_arch_state>: New field.
1614         (remote_arch_state) <remote_arch_state>: Declare ctor.
1615         <regs>: Now a unique_ptr.
1616         (remote_gdbarch_data_handle): Delete.
1617         (get_remote_arch_state): Delete.
1618         (remote_state::get_remote_arch_state): New.
1619         (get_remote_state): Adjust to call remote_state's
1620         get_remote_arch_state method.
1621         (init_remote_state): Delete, bits factored out to ...
1622         (remote_arch_state::remote_arch_state): ... this new method.
1623         (get_remote_packet_size, get_memory_packet_size)
1624         (process_g_packet, remote_target::fetch_registers)
1625         (remote_target::prepare_to_store, store_registers_using_G)
1626         (remote_target::store_registers, remote_target::get_trace_status):
1627         Adjust to call remote_state's method.
1628         (_initialize_remote): Remove reference to
1629         remote_gdbarch_data_handle.
1630
1631 2018-05-22  Pedro Alves  <palves@redhat.com>
1632
1633         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
1634         pread>: New method declarations.
1635         (remote_target::open_1): Adjust.
1636         (readahead_cache_invalidate): Rename to ...
1637         (readahead_cache::invalidate): ... this, and adjust to be a class
1638         method.
1639         (readahead_cache_invalidate_fd): Rename to ...
1640         (readahead_cache::invalidate_fd): ... this, and adjust to be a
1641         class method.
1642         (remote_hostio_pwrite): Adjust.
1643         (remote_hostio_pread_from_cache): Rename to ...
1644         (readahead_cache::pread): ... this, and adjust to be a class
1645         method.
1646         (remote_hostio_close): Adjust.
1647
1648 2018-05-22  Pedro Alves  <palves@redhat.com>
1649
1650         * remote.c (remote_hostio_close_cleanup): Delete.
1651         (class scoped_remote_fd): New.
1652         (remote_file_put, remote_file_get): Use it.
1653
1654 2018-05-22  Pedro Alves  <palves@redhat.com>
1655
1656         (struct vCont_action_support): Use bool and initialize all fields.
1657         (struct readahead_cache): Initialize all fields.
1658         (remote_state): Use bool and initialize all fields.
1659         (remote_state::remote_state, remote_state::~remote_state): New.
1660         (new_remote_state): Delete.
1661         (_initialize_remote): Use new to allocate remote_state.
1662
1663 2018-05-22  Pedro Alves  <palves@redhat.com>
1664             張俊芝  <zjz@zjz.name>
1665
1666         PR gdb/22973
1667         * c-exp.y: Include "c-support.h".
1668         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
1669         of tolower.  Use c_ident_is_alpha to scan names.
1670         * c-lang.c: Include "c-support.h".
1671         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
1672         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
1673         * c-support.h: New file, with bits factored out from ...
1674         * cp-name-parser.y: ... this file.
1675         Include "c-support.h".
1676         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
1677         c-support.h and renamed.
1678         (symbol_end, yylex): Adjust.
1679
1680 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
1681
1682         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
1683         parameter type to CORE_ADDR.
1684         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
1685         parameter type in declaration to CORE_ADDR.
1686         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
1687         target_auxv_search to get AT_HWCAP and use the result to get the
1688         target description.
1689         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
1690         to CORE_ADDR. Remove the cast of the return value to unsigned
1691         long. Fix error predicate of target_auxv_search.
1692         (ppc_linux_nat_target::read_description): Change the type of the
1693         hwcap variable to CORE_ADDR.
1694
1695 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
1696
1697         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
1698         if the size of fpscr is larger than 32 bits.
1699
1700 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
1701
1702         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
1703         (ppc32_linux_vsxregmap): New global.
1704         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
1705         regcache_supply_regset, and regcache_collect_regset.
1706         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
1707         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
1708         (fetch_vsx_register, store_vsx_register): Remove.
1709         (fetch_vsx_registers): Add regno parameter. Get regset using
1710         ppc_linux_vsxregset. Use regset to supply registers.
1711         (store_vsx_registers): Add regno parameter. Get regset using
1712         ppc_linux_vsxregset. Use regset to collect registers.
1713         (fetch_register): Call fetch_vsx_registers instead of
1714         fetch_vsx_register.
1715         (store_register): Call store_vsx_registers instead of
1716         store_vsx_register.
1717         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
1718         new regno parameter.
1719         (store_ppc_registers): Call store_vsx_registers with -1 for the
1720         new regno parameter.
1721         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
1722         (ppc_collect_vsxregset): Remove.
1723
1724 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
1725
1726         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
1727         offset fields.
1728         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
1729         for vector register offset fields.
1730         (ppc64_fbsd_reg_offsets): Likewise.
1731         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
1732         to vector register offset fields.
1733         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
1734         to vector register offset fields.
1735         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
1736         vector register offset fields.
1737         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
1738         initializers for vector register offset fields.
1739         (rs6000_aix64_reg_offsets): Likewise.
1740         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
1741         (ppc_supply_vrregset): Remove.
1742         (ppc_collect_vrregset): Remove.
1743         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
1744         (ppc_linux_vrregset) : New function.
1745         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
1746         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
1747         (ppc32_linux_vrregset): Remove.
1748         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
1749         and use result instead of ppc32_linux_vrregset.
1750         (ppc32_linux_reg_offsets): Remove initializers for vector register
1751         offset fields.
1752         (ppc64_linux_reg_offsets): Likewise.
1753         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
1754         * ppc-linux-nat.c: Include regset.h.
1755         (gdb_vrregset_t): Adjust comment to account for little-endian
1756         mode.
1757         (supply_vrregset, fill_vrregset): Remove.
1758         (fetch_altivec_register, store_altivec_register): Remove.
1759         (fetch_altivec_registers): Add regno parameter. Get regset using
1760         ppc_linux_vrregset. Use regset to supply registers.
1761         (store_altivec_registers): Add regno parameter. Get regset using
1762         ppc_linux_vrregset. Use regset to collect registers.
1763         (fetch_register): Call fetch_altivec_registers instead of
1764         fetch_altivec_register.
1765         (store_register): Call store_altivec_registers instead of
1766         store_altivec_register.
1767         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
1768         the new regno parameter.
1769         (store_ppc_registers): Call store_altivec_registers with -1 for
1770         the new regno parameter.
1771
1772 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
1773
1774         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
1775         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
1776         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1777         (gdb_vrregset_t): Change array type size to
1778         PPC_LINUX_SIZEOF_VRREGSET.
1779         (gdb_vsxregset_t): Change array type size to
1780         PPC_LINUX_SIZEOF_VSXREGSET.
1781         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
1782         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
1783         PPC_LINUX_SIZEOF_VSXREGSET.
1784
1785 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
1786
1787         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
1788         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
1789         nat/ppc-linux.c.
1790         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
1791         ppc_linux_target_wordsize with tid.
1792         (ppc_linux_nat_target::read_description): Call ppc_linux_target
1793         wordsize with tid.
1794         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
1795         (ppc64_64bit_inferior_p): Add static and inline specifiers.
1796         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
1797         tid parameter. Remove static specifier.
1798         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
1799         (ppc_linux_target_wordsize): New declaration.
1800
1801 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
1802
1803         * arch/ppc-linux-common.c: New file.
1804         * arch/ppc-linux-common.h: New file.
1805         * arch/ppc-linux-tdesc.h: New file.
1806         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
1807         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
1808         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
1809         arch/ppc-linux-tdesc.h.
1810         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
1811         arch/ppc-linux-tdesc.h.
1812         (ppc_linux_nat_target::read_description): Remove target
1813         description matching code. Fill a ppc_linux_features struct and
1814         call ppc_linux_match_description with it. Move comment about ISA
1815         2.05 to ppc-linux-common.c.
1816         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
1817         arch/ppc-linux-tdesc.h.
1818         (ppc_linux_core_read_description): Remove target description
1819         matching code. Fill a ppc_linux_features struct and call
1820         ppc_linux_match_description with it.
1821         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1822         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1823         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1824         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1825         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1826         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1827         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1828         (tdesc_powerpc_e500l): Remove.
1829
1830 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
1831
1832         * ada-lang.c (catch_assert_command): Pass empty string instead
1833         of NULL for excep_string argument.
1834
1835 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
1836
1837         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
1838         the width of the requested register exceeds the width of the
1839         `ptrace' data type.
1840
1841 2018-05-21  Tom Tromey  <tom@tromey.com>
1842
1843         * printcmd.c (output_command): Remove.
1844         (output_command_const): Rename to output_command.
1845         * valprint.h (output_command): Rename from output_command_const.
1846         * tracepoint.c (trace_dump_actions): Call output_command.
1847
1848 2018-05-21  Tom Tromey  <tom@tromey.com>
1849
1850         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1851         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
1852         * ada-lang.h (create_ada_exception_catchpoint): Update.
1853         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
1854         std::string.
1855         (create_excep_cond_exprs, ~ada_catchpoint)
1856         (should_stop_exception, print_one_exception)
1857         (print_mention_exception, print_recreate_exception): Update.
1858         (ada_get_next_arg): Remove.
1859         (catch_ada_exception_command_split): Use std::string.  Change type
1860         of "excep_string", "cond_string".
1861         (catch_ada_exception_command): Update.
1862         (create_ada_exception_catchpoint): Change type of excep_string.
1863         (ada_exception_sal): Remove excep_string parameter.
1864         (~ada_catchpoint): Remove.
1865
1866 2018-05-21  Tom Tromey  <tom@tromey.com>
1867
1868         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
1869         cleanup.
1870
1871 2018-05-21  Tom Tromey  <tom@tromey.com>
1872
1873         * ada-lang.c (ada_exception_message_1, ada_exception_message):
1874         Return unique_xmalloc_ptr.
1875         (print_it_exception): Update.
1876
1877 2018-05-21  Tom Tromey  <tom@tromey.com>
1878
1879         * tracepoint.c (trace_dump_actions): Use std::string.
1880
1881 2018-05-21  Tom Tromey  <tom@tromey.com>
1882
1883         * symfile.c (reread_symbols): Use std::string for original_name.
1884
1885 2018-05-21  Tom Tromey  <tom@tromey.com>
1886
1887         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
1888         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
1889         constructor.
1890
1891 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
1892
1893         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
1894         instance to...
1895         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
1896         * objfiles.c (get_objfile_bfd_data): Allocate
1897         objfile_per_bfd_storage with obstack_new when allocating on
1898         obstack.
1899
1900 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
1901
1902         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
1903         OBSTACK_ZALLOC.
1904         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
1905         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
1906         * mdebugread.c (mdebug_build_psymtabs): Likewise.
1907         (add_pending): Likewise.
1908         (parse_symbol): Likewise.
1909         (parse_partial_symbols): Likewise.
1910         (psymtab_to_symtab_1): Likewise.
1911         (new_psymtab): Likewise.
1912         (elfmdebug_build_psymtabs): Likewise.
1913         * minsyms.c (terminate_minimal_symbol_table): Likewise.
1914         * objfiles.c (get_objfile_bfd_data): Likewise.
1915         (objfile_register_static_link): Likewise.
1916         * psymtab.c (allocate_psymtab): Likewise.
1917         * stabsread.c (read_member_functions): Likewise.
1918         * xcoffread.c (xcoff_end_psymtab): Likewise.
1919
1920 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
1921
1922         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
1923         compiler supports std::is_trivially_constructible.
1924         * common/poison.h: Include obstack.h.
1925         (IsMallocable): Define to is_trivially_constructible if the
1926         compiler supports it, define to true_type otherwise.
1927         (xobnew): New.
1928         (XOBNEW): Redefine.
1929         (xobnewvec): New.
1930         (XOBNEWVEC): Redefine.
1931         * gdb_obstack.h (obstack_zalloc): New.
1932         (OBSTACK_ZALLOC): Redefine.
1933         (obstack_calloc): New.
1934         (OBSTACK_CALLOC): Redefine.
1935         (obstack_new): New.
1936         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
1937         (gdbarch_obstack): New declaration in gdbarch.h, definition in
1938         gdbarch.c.
1939         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
1940         obstack_calloc/obstack_zalloc.
1941         (gdbarch_obstack_zalloc): Remove.
1942         * target-descriptions.c (tdesc_data_init): Use obstack_new.
1943
1944 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1945
1946         * stack.c (backtrace_command_1): Remove useless variable int i.
1947
1948 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1949
1950         * stack.c (print_frame_info): Fix comment.
1951
1952 2018-05-18  Tom Tromey  <tom@tromey.com>
1953
1954         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
1955         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
1956         (~dwarf2_per_objfile): Update
1957         (dwarf2_get_dwz_file): Use new.
1958         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
1959         unique_ptr.
1960
1961 2018-05-18  Tom Tromey  <tom@tromey.com>
1962
1963         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
1964         unique_ptr.
1965         * dwarf2read.c (struct dwp_file): Add constructor and
1966         initializers.
1967         (open_and_init_dwp_file): Return a unique_ptr.
1968         (dwarf2_per_objfile, create_dwp_hash_table)
1969         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
1970         (lookup_dwo_unit_in_dwp): Update.
1971         (open_and_init_dwp_file, get_dwp_file): Update.
1972
1973 2018-05-18  Tom Tromey  <tom@tromey.com>
1974
1975         * dwarf2read.c (dwarf2_per_objfile): Update.
1976         (struct mapped_index): Add initializers.
1977         (dwarf2_read_index): Use new.
1978         (dw2_symtab_iter_init): Update.
1979         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
1980         unique_ptr.
1981
1982 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
1983
1984         * dwarf2read.c (mapped_index) <total_size>: Remove.
1985
1986 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
1987
1988         * unittests/format_pieces-selftests.c (test_format_specifier):
1989         Add ARI comments.
1990
1991 2018-05-18  Tom Tromey  <tom@tromey.com>
1992
1993         * c-typeprint.c (maybe_print_hole): New function.
1994         (c_print_type_struct_field_offset): Update.
1995         (c_type_print_base_struct_union): Call maybe_print_hole.
1996
1997 2018-05-17  Keith Seitz  <keiths@redhat.com>
1998
1999         * breakpoint.c (build_bpstat_chain): New function, moved from
2000         bpstat_stop_status.
2001         (bpstat_stop_status): Add optional parameter, `stop_chain'.
2002         If no stop chain is passed, call build_bpstat_chain to build it.
2003         * breakpoint.h (build_bpstat_chain): Declare.
2004         (bpstat_stop_status): Move documentation here from breakpoint.c.
2005         * infrun.c (handle_signal_stop): Before eliding inlined frames,
2006         build the stop chain and pass it to skip_inline_frames.
2007         Pass this stop chain to bpstat_stop_status.
2008         * inline-frame.c: Include breakpoint.h.
2009         (stopped_by_user_bp_inline_frame): New function.
2010         (skip_inline_frames): Add parameter `stop_chain'.
2011         Move documention to inline-frame.h.
2012         If non-NULL, use stopped_by_user_bp_inline_frame to determine
2013         whether the frame should be elided.
2014         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
2015         Add moved documentation and update for new parameter.
2016
2017 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
2018
2019         PR cli/14975
2020         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2021         unittests/format_pieces-selftests.c.
2022         * common/format.h (format_piece) <operator==>: New.
2023         (format_pieces) <operator[]>: Remove.
2024         * common/format.c (format_pieces::format_pieces): Handle \e.
2025         * unittests/format_pieces-selftests.c: New.
2026
2027 2018-05-17  Tom Tromey  <tom@tromey.com>
2028
2029         PR symtab/23010:
2030         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
2031         (dw2_instantiate_symtab): Add skip_partial parameter.
2032         (dw2_find_last_source_symtab, dw2_map_expand_apply)
2033         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
2034         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
2035         (dw2_expand_symtabs_matching_one)
2036         (dw2_find_pc_sect_compunit_symtab)
2037         (dw2_debug_names_lookup_symbol)
2038         (dw2_debug_names_expand_symtabs_for_function): Update.
2039         (init_cutu_and_read_dies): Add skip_partial parameter.
2040         (process_psymtab_comp_unit, build_type_psymtabs_1)
2041         (process_skeletonless_type_unit, load_partial_comp_unit)
2042         (psymtab_to_symtab_1): Update.
2043         (load_full_comp_unit): Add skip_partial parameter.
2044         (process_imported_unit_die, dwarf2_read_addr_index)
2045         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
2046         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
2047         (read_signatured_type): Update.
2048
2049 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
2050
2051         * value.c (release_value): Remove unused variable.
2052         (record_latest_value): Likewise.
2053         (access_value_history): Likewise.
2054         (preserve_values): Likewise.
2055
2056 2018-05-17  Tom Tromey  <tom@tromey.com>
2057
2058         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
2059         Initialize.
2060
2061 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
2062
2063         PR gdb/22286
2064         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
2065         Also handle registers whose width is not a multiple of
2066         PTRACE_TYPE_RET.
2067         (linux_nat_trad_target::store_register): Likewise.
2068
2069 2018-05-16  Tom Tromey  <tom@tromey.com>
2070
2071         * gdbcore.h (core_bfd): Redefine.
2072         * corelow.c (core_target::close): Update.
2073         (core_target_open): Update.
2074         * progspace.h (struct program_space) <cbfd>: Now a
2075         gdb_bfd_ref_ptr.
2076
2077 2018-05-16  Tom Tromey  <tom@tromey.com>
2078
2079         PR cli/19551:
2080         * symfile-add-flags.h (enum symfile_add_flags)
2081         <SYMFILE_NOT_FILENAME>: New constant.
2082         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
2083         objfile name from BFD.
2084         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
2085         * minidebug.c (find_separate_debug_file_in_section): Put
2086         ".gnu_debugdata" into BFD's file name.
2087
2088 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
2089
2090         * regcache.c (regcache_read_ftype, regcache_write_ftype):
2091         Remove.
2092
2093 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
2094
2095         PR binutils/21446
2096         * aarch64-tdep.c (aarch64_analyze_prologue,
2097         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
2098         Indicate not interested in errors.
2099
2100 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
2101
2102         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
2103         Supply the MIPS_ZERO_REGNUM register.
2104
2105 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
2106
2107         * mips-tdep.c (mask_address_var): Make variable static.
2108
2109 2018-05-14  Tom Tromey  <tom@tromey.com>
2110
2111         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
2112
2113 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
2114
2115         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
2116         FXSAVE_ADDR for the mxcsr register.
2117
2118 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
2119
2120         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
2121
2122 2018-05-11  Pedro Alves  <palves@redhat.com>
2123
2124         * corelow.c (core_target) <core_target>: No longer inline.
2125         Initialize m_core_gdbarch, m_core_vec and build the section table
2126         here.
2127         <~core_target>: New.
2128         <core_gdbarch, get_core_register_section>: New methods.
2129         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
2130         factored out from ...
2131         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
2132         (core_ops): Delete.
2133         (sniff_core_bfd): Add gdbarch parameter.
2134         (core_close): Delete, merged into ...
2135         (core_target::close): ... here.  Delete self.
2136         (core_close_cleanup): Delete.
2137         (core_target_open): Allocate a core_target on the heap.  Use a
2138         unique_ptr instead of a cleanup.  Bits moved into the core_target
2139         ctor.  Adjust to use core_target methods instead of globals.
2140         (get_core_register_section): Rename to ...
2141         (core_target::get_core_register_section): ... this and adjust.
2142         (struct get_core_registers_cb_data): New.
2143         (get_core_registers_cb): Use it.  Use bool.
2144         (core_target::fetch_registers, core_target::files_info)
2145         (core_target::xfer_partial, core_target::read_description)
2146         (core_target::pid_to, core_target::thread_name): Adjust to
2147         reference class fields instead of globals.
2148         * target.h (struct target_ops_deleter, target_ops_up): New.
2149
2150 2018-05-11  Pedro Alves  <palves@redhat.com>
2151
2152         * corefile.c (core_file_command): Move to corelow.c.
2153         * corelow.c (the_core_target): Delete.
2154         (core_file_command): Moved from corefile.c.  Check exec_bfd
2155         instead of the_core_target.  Use target_detach instead of calling
2156         into the_core_target directly.
2157         (maybe_say_no_core_file_now): New.
2158         (core_target::detach): Use it.
2159         (_initialize_corelow): Remove references to the_core_target.
2160         * gdbcore.h (the_core_target): Delete.
2161
2162 2018-05-11  Tom Tromey  <tromey@redhat.com>
2163             Pedro Alves  <palves@redhat.com>
2164
2165         * corefile.c (core_bfd): Remove.
2166         * gdbcore.h (core_bfd): Now a macro.
2167         * progspace.h (struct program_space) <cbfd>: New field.
2168
2169 2018-05-11  Tom Tromey  <tom@tromey.com>
2170
2171         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
2172         gdb::def_vector.
2173
2174 2018-05-10  Tom Tromey  <tom@tromey.com>
2175
2176         * configure: Rebuild.
2177         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
2178
2179 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
2180
2181         PR server/23158:
2182         * regformats/regdat.sh: Adjust script, following the addition
2183         of the new expedite_regs parameter to init_target_desc.
2184
2185 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
2186     
2187         PR gdb/23127
2188         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
2189         set_gdbarch_significant_addr_bit.
2190         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
2191         set_gdbarch_significant_addr_bit.
2192         * utils.c (address_significant): Update to sign extend addr.
2193
2194 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
2195
2196         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
2197         (xtensa_linux_init_abi): Limit tdep->num_regs by
2198         tdep->num_nopriv_regs.
2199         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
2200         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
2201         not initialized.
2202
2203 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
2204
2205         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
2206
2207 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2208
2209         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
2210         (I387_MXCSR_INIT_VAL): New constant.
2211         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
2212         buffer if it was supplied by the inferior.
2213         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
2214         (i387_xsave_get_clear_bv): New function.
2215         (i387_supply_xsave): Only read x87 control registers from the
2216         xsave buffer if the feature is enabled, and the state will have
2217         been written, otherwise, provide a suitable default.
2218         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
2219         including x87 control registers.  Update control registers if they
2220         have changed from the default value, and mark features as enabled
2221         as required.
2222         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
2223
2224 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
2225
2226         * spu-tdep.c (info_spu_event_command): Fix output formatting.
2227
2228 2018-05-07  Tom Tromey  <tom@tromey.com>
2229
2230         * configure: Rebuild.
2231         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
2232
2233 2018-05-07  Tom Tromey  <tom@tromey.com>
2234
2235         PR tdep/20362:
2236         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
2237         bit.  Use correct value for VDIV.
2238
2239 2018-05-04  Tom Tromey  <tom@tromey.com>
2240
2241         * configure: Rebuild.
2242         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
2243
2244 2018-05-04  Tom Tromey  <tom@tromey.com>
2245
2246         * linux-record.c (record_linux_system_call) <case
2247         RECORD_SYS_RECVFROM>: Add "break".
2248
2249 2018-05-04  Tom Tromey  <tom@tromey.com>
2250
2251         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
2252         Add missing "break".
2253         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
2254         Add missing "break".
2255
2256 2018-05-04  Tom Tromey  <tom@tromey.com>
2257
2258         * rs6000-tdep.c (ppc_process_record_op4)
2259         (ppc_process_record_op63): Add fall-through comment.
2260
2261 2018-05-04  Tom Tromey  <tom@tromey.com>
2262
2263         * i386-tdep.c (i386_process_record): Add fall-through comment.
2264
2265 2018-05-04  Tom Tromey  <tom@tromey.com>
2266
2267         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
2268         comment.
2269
2270 2018-05-04  Tom Tromey  <tom@tromey.com>
2271
2272         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
2273         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
2274         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
2275         comment.
2276         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
2277         comment.
2278         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
2279         comment.
2280
2281 2018-05-04  Tom Tromey  <tom@tromey.com>
2282
2283         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
2284
2285 2018-05-04  Tom Tromey  <tom@tromey.com>
2286
2287         * s390-tdep.c (s390_process_record): Fix fall-through comments.
2288         * xcoffread.c (scan_xcoff_symtab): Move comment later.
2289         * symfile.c (section_is_mapped): Fix fall-through comment.
2290         * stabsread.c (define_symbol, read_member_functions): Fix
2291         fall-through comment.
2292         * s390-linux-tdep.c (s390_process_record): Fix fall-through
2293         comment.
2294         * remote.c (remote_wait_as): Fix fall-through comment.
2295         * p-exp.y (yylex): Fix fall-through comment.
2296         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
2297         comment.
2298         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
2299         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
2300         * jv-exp.y (yylex): Fix fall-through comment.
2301         * go-exp.y (lex_one_token): Fix fall-through comment.
2302         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
2303         fall-through comment.
2304         * f-exp.y (yylex): Fix fall-through comment.
2305         * dwarf2read.c (process_die): Fix fall-through comments.
2306         * dbxread.c (process_one_symbol): Fix fall-through comment.
2307         * d-exp.y (lex_one_token): Fix fall-through comment.
2308         * cp-name-parser.y (yylex): Fix fall-through comment.
2309         * coffread.c (coff_symtab_read): Fix fall-through comment.
2310         * c-exp.y (lex_one_token): Fix fall-through comment.
2311         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
2312         comment.
2313         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
2314         comment.
2315
2316 2018-05-04  Tom Tromey  <tom@tromey.com>
2317
2318         PR python/22730:
2319         * NEWS: Mention gdb.execute change.
2320         * gdbcmd.h (execute_control_command): Don't declare.
2321         * python/python.c (execute_gdb_command): Use read_command_lines_1,
2322         execute_control_commands, execute_control_commands_to_string.
2323         * cli/cli-script.h (execute_control_commands)
2324         (execute_control_commands_to_string): Declare.
2325         (execute_control_command): Add from_tty parameter.
2326         * cli/cli-script.c (execute_control_commands)
2327         (execute_control_commands_to_string): New functions.
2328         (execute_user_command): Use execute_control_commands.
2329         (execute_control_command_1): Add "from_tty" parameter.  Update.
2330         (execute_control_command): Likewise.
2331
2332 2018-05-04  Tom Tromey  <tom@tromey.com>
2333
2334         PR python/22731:
2335         * NEWS: Mention that breakpoint commands are writable.
2336         * python/py-breakpoint.c (bppy_set_commands): New function.
2337         (breakpoint_object_getset) <"commands">: Use it.
2338
2339 2018-05-04  Tom Tromey  <tom@tromey.com>
2340
2341         * tracepoint.c (actions_command): Update.
2342         * mi/mi-cmd-break.c (mi_command_line_array)
2343         (mi_command_line_array_cnt, mi_command_line_array_ptr)
2344         (mi_read_next_line): Remove.
2345         (mi_cmd_break_commands): Update.
2346         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
2347         function_view.
2348         * cli/cli-script.c (get_command_line): Update.
2349         (process_next_line): Use function_view.  Constify.
2350         (recurse_read_control_structure, read_command_lines)
2351         (read_command_lines_1): Change argument types to function_view.
2352         (do_define_command, document_command): Update.
2353         * breakpoint.h (check_tracepoint_command): Don't declare.
2354         * breakpoint.c (check_tracepoint_command): Remove.
2355         (commands_command_1, create_tracepoint_from_upload): Update.
2356
2357 2018-05-04  Tom Tromey  <tom@tromey.com>
2358
2359         PR gdb/11750:
2360         * cli/cli-script.h (enum command_control_type) <define_control>:
2361         New constant.
2362         * cli/cli-script.c (multi_line_command_p): Handle define_control.
2363         (build_command_line, execute_control_command_1)
2364         (process_next_line): Likewise.
2365         (do_define_command): New function, extracted from define_command.
2366         (define_command): Use it.
2367
2368 2018-05-04  Tom Tromey  <tom@tromey.com>
2369
2370         * tracepoint.c (actions_command): Update.
2371         * cli/cli-script.h (read_command_lines): Update.
2372         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
2373         (MAX_TMPBUF): Remove define.
2374         (define_command): Use string_printf.
2375         (document_command): Likewise.
2376         * breakpoint.c (commands_command_1): Update.
2377
2378 2018-05-04  Tom Tromey  <tom@tromey.com>
2379
2380         * top.c (execute_command): Update.
2381         * cli/cli-script.h (print_command_lines): Now varargs.
2382         * cli/cli-script.c (print_command_lines): Now varargs.
2383         (execute_control_command_1) <case while_control, case if_control>:
2384         Update.
2385
2386 2018-05-04  Tom Tromey  <tom@tromey.com>
2387
2388         * tracepoint.c (all_tracepoint_actions): Rename from
2389         all_tracepoint_actions_and_cleanup.  Change return type.
2390         (actions_command, encode_actions_1, encode_actions)
2391         (trace_dump_actions, tdump_command): Update.
2392         * remote.c (remote_download_command_source): Update.
2393         * python/python.c (gdbpy_eval_from_control_command)
2394         (python_command, python_interactive_command): Update.
2395         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
2396         * guile/guile.c (guile_command)
2397         (gdbscm_eval_from_control_command, guile_command): Update.
2398         * compile/compile.c (compile_code_command)
2399         (compile_print_command, compile_to_object): Update.
2400         * cli/cli-script.h (struct command_lines_deleter): New.
2401         (counted_command_line): New typedef.
2402         (struct command_line): Add constructor, destructor.
2403         <body_list>: Remove.
2404         <body_list_0, body_list_1>: New members.
2405         (command_line_up): Remove typedef.
2406         (read_command_lines, read_command_lines_1, get_command_line):
2407         Update.
2408         (copy_command_lines): Don't declare.
2409         * cli/cli-script.c (build_command_line): Use "new".
2410         (get_command_line): Return counted_command_line.
2411         (print_command_lines, execute_user_command)
2412         (execute_control_command_1, while_command, if_command): Update.
2413         (realloc_body_list): Remove.
2414         (process_next_line, recurse_read_control_structure): Update.
2415         (read_command_lines, read_command_lines_1): Return counted_command_line.
2416         (free_command_lines): Use "delete".
2417         (copy_command_lines): Remove.
2418         (define_command, document_command, show_user_1): Update.
2419         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
2420         a counted_command_line.
2421         * breakpoint.h (counted_command_line): Remove typedef.
2422         (breakpoint_set_commands): Update.
2423         * breakpoint.c (check_no_tracepoint_commands)
2424         (validate_commands_for_breakpoint): Update.
2425         (breakpoint_set_commands): Change commands to be a
2426         counted_command_line.
2427         (commands_command_1, update_dprintf_command_list)
2428         (create_tracepoint_from_upload): Update.
2429
2430 2018-05-04  Tom Tromey  <tom@tromey.com>
2431
2432         * cli/cli-decode.h (cmd_list_element): New constructor.
2433         (~cmd_list_element): New destructor.
2434         (struct cmd_list_element): Add initializers.
2435         * cli/cli-decode.c (do_add_cmd): Use "new".
2436         (delete_cmd): Use "delete".
2437
2438 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
2439             Pedro Alves <palves@redhat.com>
2440
2441         PR breakpoints/19806 and support for PR external/20207.
2442         * NEWS: Mention Aarch64 watchpoint improvements.
2443         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
2444         watchpoints and PR external/20207 watchpoints.
2445         * nat/aarch64-linux-hw-point.c
2446         (kernel_supports_any_contiguous_range): New.
2447         (aarch64_watchpoint_offset): New.
2448         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
2449         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
2450         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
2451         (aarch64_align_watchpoint): New parameters aligned_offset_p and
2452         next_addr_orig_p.  Support PR external/20207 watchpoints.
2453         (aarch64_downgrade_regs): New.
2454         (aarch64_dr_state_insert_one_point): New parameters offset and
2455         addr_orig.
2456         (aarch64_dr_state_remove_one_point): Likewise.
2457         (aarch64_handle_breakpoint): Update caller.
2458         (aarch64_handle_aligned_watchpoint): Likewise.
2459         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
2460         aligned_offset.
2461         (aarch64_linux_set_debug_regs): Remove const from state.  Call
2462         aarch64_downgrade_regs.
2463         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
2464         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
2465         (DR_CONTROL_MASK): ... this.
2466         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
2467         (unsigned int aarch64_watchpoint_offset): New prototype.
2468         (aarch64_linux_set_debug_regs): Remove const from state.
2469         * utils.c (align_up, align_down): Move to ...
2470         * common/common-utils.c (align_up, align_down): ... here.
2471         * utils.h (align_up, align_down): Move to ...
2472         * common/common-utils.h (align_up, align_down): ... here.
2473
2474 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
2475
2476         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
2477         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
2478         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
2479         Re-implement to match the ABI as summarized in GCC's
2480         gcc/config/sparc/sparc.c.  All callers updated.
2481         (sparc32_store_arguments): Remove assertion.
2482
2483 2018-05-04  Tom Tromey  <tom@tromey.com>
2484
2485         * printcmd.c: Don't include tui.h.
2486         (decode_format): Use skip_spaces.
2487
2488 2018-05-04  Tom Tromey  <tom@tromey.com>
2489
2490         PR gdb/22619:
2491         * printcmd.c (last_count): New global.
2492         (x_command): Use saved count when repeating.
2493
2494 2018-05-04  Tom Tromey  <tom@tromey.com>
2495
2496         * nto-procfs.c (do_closedir_cleanup): Remove.
2497         (procfs_pidlist): Use gdb_dir_up.
2498         * procfs.c (do_closedir_cleanup): Remove.
2499         (proc_update_threads): Use gdb_dir_up.
2500         * common/filestuff.h (struct gdb_dir_deleter): New.
2501         (gdb_dir_up): New typedef.
2502
2503 2018-05-04  Tom Tromey  <tom@tromey.com>
2504
2505         * ada-lang.c (print_mention_exception): Use std::string.
2506
2507 2018-05-04  Tom Tromey  <tom@tromey.com>
2508
2509         * ada-lang.c (create_excep_cond_exprs): Update.
2510         (ada_exception_catchpoint_cond_string): Use std::string.
2511
2512 2018-05-04  Tom Tromey  <tom@tromey.com>
2513
2514         * ada-lang.c (xget_renaming_scope): Return std::string.
2515         (old_renaming_is_invisible): Update.
2516
2517 2018-05-04  Tom Tromey  <tom@tromey.com>
2518
2519         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
2520         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
2521
2522 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
2523
2524         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
2525
2526 2018-05-04  Tom Tromey  <tom@tromey.com>
2527
2528         * remote.c (remote_query_supported_append): Change type.
2529         (remote_check_symbols): Update.
2530
2531 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
2532
2533         PR gdb/11420
2534         * configure.ac: Prepend libpython.
2535         * python/python-config.py: Likewise.
2536         * configure: Regenerate.
2537
2538 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
2539
2540         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
2541
2542 2018-05-03  Pedro Alves  <palves@redhat.com>
2543
2544         * s390-linux-nat.c
2545         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
2546         override.  Write 'true' instead of '1'.
2547         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
2548         declaration.
2549
2550 2018-05-02  Pedro Alves  <palves@redhat.com>
2551
2552         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
2553         add_inf_child_target.
2554         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
2555         add_inf_child_target.
2556         * aix-thread.c (aix_thread_target_info): New.
2557         (aix_thread_target) <shortname, longname, doc>: Delete.
2558         <info>: New.
2559         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
2560         add_inf_child_target.
2561         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
2562         add_inf_child_target.
2563         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
2564         add_inf_child_target.
2565         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
2566         add_inf_child_target.
2567         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
2568         add_inf_child_target.
2569         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
2570         add_inf_child_target.
2571         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
2572         add_inf_child_target.
2573         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
2574         add_inf_child_target.
2575         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
2576         add_inf_child_target.
2577         * bfd-target.c (target_bfd_target_info): New.
2578         (target_bfd) <shortname, longname, doc>: Delete.
2579         <info>: New.
2580         * bsd-kvm.c (bsd_kvm_target_info): New.
2581         (bsd_kvm_target) <shortname, longname, doc>: Delete.
2582         <info>: New.
2583         (bsd_kvm_target::open): Rename to ...
2584         (bsd_kvm_target_open): ... this.  Adjust.
2585         * bsd-uthread.c (bsd_uthread_target_info): New.
2586         (bsd_uthread_target) <shortname, longname, doc>: Delete.
2587         <info>: New.
2588         * corefile.c (core_file_command): Adjust.
2589         * corelow.c (core_target_info): New.
2590         (core_target) <shortname, longname, doc>: Delete.
2591         <info>: New.
2592         (core_target::open): Rename to ...
2593         (core_target_open): ... this.  Adjust.
2594         * ctf.c (ctf_target_info): New.
2595         (ctf_target) <shortname, longname, doc>: Delete.
2596         <info>: New.
2597         (ctf_target::open): Rename to ...
2598         (ctf_target_open): ... this.
2599         (_initialize_ctf): Adjust.
2600         * exec.c (exec_target_info): New.
2601         (exec_target) <shortname, longname, doc>: Delete.
2602         <info>: New.
2603         (exec_target::open): Rename to ...
2604         (exec_target_open): ... this.
2605         * gdbcore.h (core_target_open): Declare.
2606         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
2607         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
2608         add_inf_child_target.
2609         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
2610         add_inf_child_target.
2611         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
2612         add_inf_child_target.
2613         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
2614         add_inf_child_target.
2615         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
2616         add_inf_child_target.
2617         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
2618         add_inf_child_target.
2619         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
2620         add_inf_child_target.
2621         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
2622         add_inf_child_target.
2623         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
2624         add_inf_child_target.
2625         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
2626         add_inf_child_target.
2627         * inf-child.c (inf_child_target_info): New.
2628         (inf_child_target::info): New.
2629         (inf_child_open_target): Remove 'target' parameter.  Use
2630         get_native_target instead.
2631         (inf_child_target::open): Delete.
2632         (add_inf_child_target): New.
2633         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
2634         Delete.
2635         <info>: New.
2636         (add_inf_child_target): Declare.
2637         (inf_child_open_target): Declare.
2638         * linux-thread-db.c (thread_db_target_info): New.
2639         (thread_db_target) <shortname, longname, doc>: Delete.
2640         <info>: New.
2641         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
2642         add_inf_child_target.
2643         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
2644         add_inf_child_target.
2645         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
2646         add_inf_child_target.
2647         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
2648         add_inf_child_target.
2649         * make-target-delegates (print_class): Adjust.
2650         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
2651         add_inf_child_target.
2652         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
2653         add_inf_child_target.
2654         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
2655         add_inf_child_target.
2656         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
2657         add_inf_child_target.
2658         * nto-procfs.c (nto_native_target_info): New.
2659         (nto_procfs_target_native) <shortname, longname, doc>:
2660         Delete.
2661         <info>: New.
2662         (nto_procfs_target_info): New.
2663         (nto_procfs_target_procfs) <shortname, longname, doc>:
2664         Delete.
2665         <info>: New.
2666         (init_procfs_targets): Adjust.
2667         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
2668         add_inf_child_target.
2669         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
2670         add_inf_child_target.
2671         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
2672         add_inf_child_target.
2673         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
2674         add_inf_child_target.
2675         * ravenscar-thread.c (ravenscar_target_info): New.
2676         (ravenscar_thread_target) <shortname, longname, doc>:
2677         Delete.
2678         <info>: New.
2679         * record-btrace.c (record_btrace_target_info):
2680         (record_btrace_target) <shortname, longname, doc>: Delete.
2681         <info>: New.
2682         (record_btrace_target::open): Rename to ...
2683         (record_btrace_target_open): ... this.  Adjust.
2684         * record-full.c (record_longname, record_doc): New.
2685         (record_full_base_target) <shortname, longname, doc>: Delete.
2686         <info>: New.
2687         (record_full_target_info): New.
2688         (record_full_target): <shortname>: Delete.
2689         <info>: New.
2690         (record_full_core_open_1, record_full_open_1): Update comments.
2691         (record_full_base_target::open): Rename to ...
2692         (record_full_open): ... this.
2693         (cmd_record_full_restore): Update.
2694         (_initialize_record_full): Update.
2695         * remote-sim.c (remote_sim_target_info): New.
2696         (gdbsim_target) <shortname, longname, doc>: Delete.
2697         <info>: New.
2698         (gdbsim_target::open): Rename to ...
2699         (gdbsim_target_open): ... this.
2700         (_initialize_remote_sim): Adjust.
2701         * remote.c (remote_doc): New.
2702         (remote_target_info): New.
2703         (remote_target) <shortname, longname, doc>: Delete.
2704         <info>: New.
2705         (extended_remote_target_info): New.
2706         (extended_remote_target) <shortname, longname, doc>: Delete.
2707         <info>: New.
2708         (remote_target::open_1): Make static.  Adjust.
2709         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
2710         * s390-linux-nat.c (_initialize_s390_nat): Use
2711         add_inf_child_target.
2712         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
2713         add_inf_child_target.
2714         * sol-thread.c (thread_db_target_info): New.
2715         (sol_thread_target) <shortname, longname, doc>: Delete.
2716         <info>: New.
2717         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
2718         add_inf_child_target.
2719         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
2720         add_inf_child_target.
2721         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
2722         add_inf_child_target.
2723         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
2724         add_inf_child_target.
2725         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
2726         add_inf_child_target.
2727         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
2728         add_inf_child_target.
2729         * spu-linux-nat.c (_initialize_spu_nat): Use
2730         add_inf_child_target.
2731         * spu-multiarch.c (spu_multiarch_target_info): New.
2732         (spu_multiarch_target) <shortname, longname, doc>: Delete.
2733         <info>: New.
2734         * target-delegates.c: Regenerate.
2735         * target.c: Include <unordered_map>.
2736         (target_ops_p): Delete.
2737         (DEF_VEC_P(target_ops_p)): Delete.
2738         (target_factories): New.
2739         (test_target_info): New.
2740         (test_target_ops::info): New.
2741         (open_target): Adjust to use target_factories.
2742         (add_target_with_completer): Rename to ...
2743         (add_target): ... this.  Change prototype.  Register target_info
2744         and open callback in target_factories.  Register target_info in
2745         command context instead of target_ops.
2746         (add_target): Delete old implementation.
2747         (add_deprecated_target_alias): Change prototype.  Adjust.
2748         (the_native_target): New.
2749         (set_native_target, get_native_target): New.
2750         (find_default_run_target): Use the_native_target.
2751         (find_attach_target, find_run_target): Simplify.
2752         (target_ops::open): Delete.
2753         (dummy_target_info): New.
2754         (dummy_target::shortname, dummy_target::longname)
2755         (dummy_target::doc): Delete.
2756         (dummy_target::info): New.
2757         (debug_target::shortname, debug_target::longname)
2758         (debug_target::doc): Delete.
2759         (debug_target::info): New.
2760         * target.h (struct target_info): New.
2761         (target_ops::~target_ops): Add comment.
2762         (target_ops::info): New.
2763         (target_ops::shortname, target_ops::longname, target_ops::doc): No
2764         longer virtual.  Implement in terms of target_info.
2765         (set_native_target, get_native_target): Declare.
2766         (target_open_ftype): New.
2767         (add_target, add_target_with_completer)
2768         (add_deprecated_target_alias): Change prototype.
2769         (test_target) <shortname, longname, doc>: Delete.
2770         <info>: New.
2771         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
2772         add_inf_child_target.
2773         * tracefile-tfile.c (tfile_target_info): New.
2774         (tfile_target) <shortname, longname, doc>: Delete.
2775         <info>: New.
2776         (tfile_target::open): Rename to ...
2777         (tfile_target_open): ... this.
2778         (_initialize_tracefile_tfile): Adjust.
2779         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
2780         add_inf_child_target.
2781         * windows-nat.c (_initialize_windows_nat): Use
2782         add_inf_child_target.
2783         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
2784         add_inf_child_target.
2785
2786 2018-05-02  Pedro Alves  <palves@redhat.com>
2787
2788         * linux-nat.h (linux_nat_target) <low_new_thread,
2789         low_delete_thread, low_new_fork, low_forget_process,
2790         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
2791         New virtual methods.
2792         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
2793         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
2794         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
2795         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2796         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
2797         Delete.
2798         * linux-fork.c (delete_fork): Adjust to call low method.
2799         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
2800         (linux_nat_new_fork, linux_nat_forget_process_hook)
2801         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
2802         (linux_nat_status_is_event):
2803         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
2804         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
2805         to call low method.
2806         (sigtrap_is_event): Rename to ...
2807         (linux_nat_target::low_status_is_event): ... this.
2808         (linux_nat_set_status_is_event): Delete.
2809         (save_stop_reason, linux_nat_wait_1)
2810         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
2811         low methods.
2812         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
2813         (linux_nat_set_new_fork, linux_nat_set_forget_process)
2814         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2815         (linux_nat_set_prepare_to_resume): Delete.
2816         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
2817         low virtual methods.
2818         * amd64-linux-nat.c: Likewise.
2819         * arm-linux-nat.c: Likewise.
2820         * i386-linux-nat.c: Likewise.
2821         * ia64-linux-nat.c: Likewise.
2822         * mips-linux-nat.c: Likewise.
2823         * ppc-linux-nat.c: Likewise.
2824         * s390-linux-nat.c: Likewise.
2825         * sparc64-linux-nat.c: Likewise.
2826         * x86-linux-nat.c: Likewise.
2827         * x86-linux-nat.h: Include "nat/x86-linux.h".
2828         (x86_linux_nat_target) <low_new_fork, low_forget_process,
2829         low_prepare_to_resume, low_new_thread, low_delete_thread>:
2830         Override methods.
2831
2832 2018-05-02  Pedro Alves  <palves@redhat.com>
2833
2834         * target.h (target_ops)
2835         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2836         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
2837         stopped_by_watchpoint, have_continuable_watchpoint,
2838         stopped_data_address, watchpoint_addr_within_range,
2839         can_accel_watchpoint_condition, can_run, thread_alive,
2840         has_all_memory, has_memory, has_stack, has_registers,
2841         has_execution, can_async_p, is_async_p, supports_non_stop,
2842         always_non_stop_p, can_execute_reverse, supports_multi_process,
2843         supports_enable_disable_tracepoint,
2844         supports_disable_randomization, supports_string_tracing,
2845         supports_evaluation_of_breakpoint_conditions,
2846         can_run_breakpoint_commands, filesystem_is_local,
2847         can_download_tracepoint, get_trace_state_variable_value,
2848         set_trace_notes, get_tib_address, use_agent, can_use_agent,
2849         record_is_replaying, record_will_replay,
2850         augmented_libraries_svr4_read>: Adjust to return bool.
2851         * aarch64-linux-nat.c: All implementations adjusted.
2852         * aix-thread.c: All implementations adjusted.
2853         * arm-linux-nat.c: All implementations adjusted.
2854         * breakpoint.c: All implementations adjusted.
2855         * bsd-kvm.c: All implementations adjusted.
2856         * bsd-uthread.c: All implementations adjusted.
2857         * corelow.c: All implementations adjusted.
2858         * ctf.c: All implementations adjusted.
2859         * darwin-nat.c: All implementations adjusted.
2860         * darwin-nat.h: All implementations adjusted.
2861         * exec.c: All implementations adjusted.
2862         * fbsd-nat.c: All implementations adjusted.
2863         * fbsd-nat.h: All implementations adjusted.
2864         * gnu-nat.c: All implementations adjusted.
2865         * gnu-nat.h: All implementations adjusted.
2866         * go32-nat.c: All implementations adjusted.
2867         * ia64-linux-nat.c: All implementations adjusted.
2868         * inf-child.c: All implementations adjusted.
2869         * inf-child.h: All implementations adjusted.
2870         * inf-ptrace.c: All implementations adjusted.
2871         * inf-ptrace.h: All implementations adjusted.
2872         * linux-nat.c: All implementations adjusted.
2873         * linux-nat.h: All implementations adjusted.
2874         * mips-linux-nat.c: All implementations adjusted.
2875         * nto-procfs.c: All implementations adjusted.
2876         * ppc-linux-nat.c: All implementations adjusted.
2877         * procfs.c: All implementations adjusted.
2878         * ravenscar-thread.c: All implementations adjusted.
2879         * record-btrace.c: All implementations adjusted.
2880         * record-full.c: All implementations adjusted.
2881         * remote-sim.c: All implementations adjusted.
2882         * remote.c: All implementations adjusted.
2883         * s390-linux-nat.c: All implementations adjusted.
2884         * sol-thread.c: All implementations adjusted.
2885         * spu-multiarch.c: All implementations adjusted.
2886         * target-delegates.c: All implementations adjusted.
2887         * target.c: All implementations adjusted.
2888         * target.h: All implementations adjusted.
2889         * tracefile-tfile.c: All implementations adjusted.
2890         * tracefile.c: All implementations adjusted.
2891         * tracefile.h: All implementations adjusted.
2892         * windows-nat.c: All implementations adjusted.
2893         * x86-linux-nat.h: All implementations adjusted.
2894         * x86-nat.h: All implementations adjusted.
2895
2896 2018-05-02  Pedro Alves  <palves@redhat.com>
2897
2898         * make-target-delegates (scan_target_h): Don't trim lines here.
2899         Replace sequences of tabs and/or whitespace with a single
2900         whitespace.
2901         (top level, parsing methods): Trim each line before processing it
2902         here.
2903
2904 2018-05-02  Pedro Alves  <palves@redhat.com>
2905             John Baldwin  <jhb@freebsd.org>
2906
2907         * target.h (enum strata) <debug_stratum>: New.
2908         (struct target_ops) <all delegation methods>: Replace by C++
2909         virtual methods, and drop "to_" prefix.  All references updated
2910         throughout.
2911         <to_shortname, to_longname, to_doc, to_data,
2912         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
2913         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
2914         virtual methods.  All references updated throughout.
2915         <can_attach, supports_terminal_ours, can_create_inferior,
2916         get_thread_control_capabilities, attach_no_wait>: New
2917         virtual methods.
2918         <insert_breakpoint, remove_breakpoint>: Now
2919         TARGET_DEFAULT_NORETURN methods.
2920         <info_proc>: Now returns bool.
2921         <to_magic>: Delete.
2922         (OPS_MAGIC): Delete.
2923         (current_target): Delete.  All references replaced by references
2924         to ...
2925         (target_stack): ... this.  New.
2926         (target_shortname, target_longname): Adjust.
2927         (target_can_run): Now a function declaration.
2928         (default_child_has_all_memory, default_child_has_memory)
2929         (default_child_has_stack, default_child_has_registers)
2930         (default_child_has_execution): Remove target_ops parameter.
2931         (complete_target_initialization): Delete.
2932         (memory_breakpoint_target): New template class.
2933         (test_target_ops): Refactor as a C++ class with virtual methods.
2934         * make-target-delegates (NAME_PART): Tighten.
2935         (POINTER_PART, CP_SYMBOL): New.
2936         (SIMPLE_RETURN_PART): Reimplement.
2937         (VEC_RETURN_PART): Expect less.
2938         (RETURN_PART, VIRTUAL_PART): New.
2939         (METHOD): Adjust to C++ virtual methods.
2940         (scan_target_h): Remove reference to C99.
2941         (dname): Output "target_ops::" prefix.
2942         (write_function_header): Adjust to output a C++ class method.
2943         (write_declaration): New.
2944         (write_delegator): Adjust to output a C++ class method.
2945         (tdname): Output "dummy_target::" prefix.
2946         (write_tdefault, write_debugmethod): Adjust to output a C++ class
2947         method.
2948         (tdefault_names, debug_names): Delete.
2949         (return_types, tdefaults, styles, argtypes_array): New.
2950         (top level): All methods are delegators.
2951         (print_class): New.
2952         (top level): Print dummy_target and debug_target classes.
2953         * target-delegates.c: Regenerate.
2954         * target-debug.h (target_debug_print_enum_info_proc_what)
2955         (target_debug_print_thread_control_capabilities)
2956         (target_debug_print_thread_info_p): New.
2957         * target.c (dummy_target): Delete.
2958         (the_dummy_target, the_debug_target): New.
2959         (target_stack): Now extern.
2960         (set_targetdebug): Push/unpush debug target.
2961         (default_child_has_all_memory, default_child_has_memory)
2962         (default_child_has_stack, default_child_has_registers)
2963         (default_child_has_execution): Remove target_ops parameter.
2964         (complete_target_initialization): Delete.
2965         (add_target_with_completer): No longer call
2966         complete_target_initialization.
2967         (target_supports_terminal_ours): Use regular delegation.
2968         (update_current_target): Delete.
2969         (push_target): No longer check magic number.  Don't call
2970         update_current_target.
2971         (unpush_target): Don't call update_current_target.
2972         (target_is_pushed): No longer check magic number.
2973         (target_require_runnable): Skip for all stratums over
2974         process_stratum.
2975         (target_ops::info_proc): New.
2976         (target_info_proc): Use find_target_at and
2977         find_default_run_target.
2978         (target_supports_disable_randomization): Use regular delegation.
2979         (target_get_osdata): Use find_target_at.
2980         (target_ops::open, target_ops::close, target_ops::can_attach)
2981         (target_ops::attach, target_ops::can_create_inferior)
2982         (target_ops::create_inferior, target_ops::can_run)
2983         (target_can_run): New.
2984         (default_fileio_target): Use regular delegation.
2985         (target_ops::fileio_open, target_ops::fileio_pwrite)
2986         (target_ops::fileio_pread, target_ops::fileio_fstat)
2987         (target_ops::fileio_close, target_ops::fileio_unlink)
2988         (target_ops::fileio_readlink): New.
2989         (target_fileio_open_1, target_fileio_unlink)
2990         (target_fileio_readlink): Always call the target method.  Handle
2991         FILEIO_ENOSYS.
2992         (return_zero, return_zero_has_execution): Delete.
2993         (init_dummy_target): Delete.
2994         (dummy_target::dummy_target, dummy_target::shortname)
2995         (dummy_target::longname, dummy_target::doc)
2996         (debug_target::debug_target, debug_target::shortname)
2997         (debug_target::longname, debug_target::doc): New.
2998         (target_supports_delete_record): Use regular delegation.
2999         (setup_target_debug): Delete.
3000         (maintenance_print_target_stack): Skip debug_stratum.
3001         (initialize_targets): Instantiate the_dummy_target and
3002         the_debug_target.
3003         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
3004         use target_stack.
3005         (target_auxv_search, fprint_target_auxv): Adjust.
3006         (info_auxv_command): Adjust to use target_stack.
3007         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
3008         * exceptions.c (print_flush): Handle a NULL target_stack.
3009         * regcache.c (target_ops_no_register): Refactor as class with
3010         virtual methods.
3011
3012         * exec.c (exec_target): New class.
3013         (exec_ops): Now an exec_target.
3014         (exec_open, exec_close_1, exec_get_section_table)
3015         (exec_xfer_partial, exec_files_info, exec_has_memory)
3016         (exec_make_note_section): Refactor as exec_target methods.
3017         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
3018         Delete.
3019         (exec_target::find_memory_regions): New.
3020         (_initialize_exec): Don't call init_exec_ops.
3021         * gdbcore.h (exec_file_clear): Delete.
3022
3023         * corefile.c (core_target): Delete.
3024         (core_file_command): Adjust.
3025         * corelow.c (core_target): New class.
3026         (the_core_target): New.
3027         (core_close): Remove target_ops parameter.
3028         (core_close_cleanup): Adjust.
3029         (core_target::close): New.
3030         (core_open, core_detach, get_core_registers, core_files_info)
3031         (core_xfer_partial, core_thread_alive, core_read_description)
3032         (core_pid_to_str, core_thread_name, core_has_memory)
3033         (core_has_stack, core_has_registers, core_info_proc): Rework as
3034         core_target methods.
3035         (ignore, core_remove_breakpoint, init_core_ops): Delete.
3036         (_initialize_corelow): Initialize the_core_target.
3037         * gdbcore.h (core_target): Delete.
3038         (the_core_target): New.
3039
3040         * ctf.c: (ctf_target): New class.
3041         (ctf_ops): Now a ctf_target.
3042         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
3043         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
3044         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
3045         methods.
3046         (init_ctf_ops): Delete.
3047         (_initialize_ctf): Don't call it.
3048         * tracefile-tfile.c (tfile_target): New class.
3049         (tfile_ops): Now a tfile_target.
3050         (tfile_open, tfile_close, tfile_files_info)
3051         (tfile_get_tracepoint_status, tfile_trace_find)
3052         (tfile_fetch_registers, tfile_xfer_partial)
3053         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
3054         Refactor as tfile_target methods.
3055         (tfile_xfer_partial_features): Remove target_ops parameter.
3056         (init_tfile_ops): Delete.
3057         (_initialize_tracefile_tfile): Don't call it.
3058         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
3059         (tracefile_has_stack, tracefile_has_registers)
3060         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
3061         tracefile_target methods.
3062         (init_tracefile_ops): Delete.
3063         (tracefile_target::tracefile_target): New.
3064         * tracefile.h: Include "target.h".
3065         (tracefile_target): New class.
3066         (init_tracefile_ops): Delete.
3067
3068         * spu-multiarch.c (spu_multiarch_target): New class.
3069         (spu_ops): Now a spu_multiarch_target.
3070         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
3071         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
3072         (spu_search_memory, spu_mourn_inferior): Refactor as
3073         spu_multiarch_target methods.
3074         (init_spu_ops): Delete.
3075         (_initialize_spu_multiarch): Remove references to init_spu_ops,
3076         complete_target_initialization.
3077
3078         * ravenscar-thread.c (ravenscar_thread_target): New class.
3079         (ravenscar_ops): Now a ravenscar_thread_target.
3080         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
3081         (ravenscar_thread_alive, ravenscar_pid_to_str)
3082         (ravenscar_fetch_registers, ravenscar_store_registers)
3083         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
3084         (ravenscar_stopped_by_hw_breakpoint)
3085         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
3086         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
3087         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
3088         methods.
3089         (init_ravenscar_thread_ops): Delete.
3090         (_initialize_ravenscar): Remove references to
3091         init_ravenscar_thread_ops and complete_target_initialization.
3092
3093         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
3094         (bsd_uthread_target): New class.
3095         (bsd_uthread_ops): Now a bsd_uthread_target.
3096         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
3097         (bsd_uthread_close, bsd_uthread_mourn_inferior)
3098         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
3099         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
3100         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
3101         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
3102         (bsd_uthread_target): Delete function.
3103         (_initialize_bsd_uthread): Remove reference to
3104         complete_target_initialization.
3105
3106         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
3107         (target_bfd): ... this new class.
3108         (target_bfd_xfer_partial, target_bfd_get_section_table)
3109         (target_bfd_close): Refactor as target_bfd methods.
3110         (target_bfd::~target_bfd): New.
3111         (target_bfd_reopen): Adjust.
3112         (target_bfd::close): New.
3113
3114         * record-btrace.c (record_btrace_target): New class.
3115         (record_btrace_ops): Now a record_btrace_target.
3116         (record_btrace_open, record_btrace_stop_recording)
3117         (record_btrace_disconnect, record_btrace_close)
3118         (record_btrace_async, record_btrace_info)
3119         (record_btrace_insn_history, record_btrace_insn_history_range)
3120         (record_btrace_insn_history_from, record_btrace_call_history)
3121         (record_btrace_call_history_range)
3122         (record_btrace_call_history_from, record_btrace_record_method)
3123         (record_btrace_is_replaying, record_btrace_will_replay)
3124         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
3125         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
3126         (record_btrace_store_registers, record_btrace_prepare_to_store)
3127         (record_btrace_to_get_unwinder)
3128         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
3129         (record_btrace_commit_resume, record_btrace_wait)
3130         (record_btrace_stop, record_btrace_can_execute_reverse)
3131         (record_btrace_stopped_by_sw_breakpoint)
3132         (record_btrace_supports_stopped_by_sw_breakpoint)
3133         (record_btrace_stopped_by_hw_breakpoint)
3134         (record_btrace_supports_stopped_by_hw_breakpoint)
3135         (record_btrace_update_thread_list, record_btrace_thread_alive)
3136         (record_btrace_goto_begin, record_btrace_goto_end)
3137         (record_btrace_goto, record_btrace_stop_replaying_all)
3138         (record_btrace_execution_direction)
3139         (record_btrace_prepare_to_generate_core)
3140         (record_btrace_done_generating_core): Refactor as
3141         record_btrace_target methods.
3142         (init_record_btrace_ops): Delete.
3143         (_initialize_record_btrace): Remove reference to
3144         init_record_btrace_ops.
3145         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
3146         the execution_direction global.
3147         (record_full_base_target, record_full_target)
3148         (record_full_core_target): New classes.
3149         (record_full_ops): Now a record_full_target.
3150         (record_full_core_ops): Now a record_full_core_target.
3151         (record_full_target::detach, record_full_target::disconnect)
3152         (record_full_core_target::disconnect)
3153         (record_full_target::mourn_inferior, record_full_target::kill):
3154         New.
3155         (record_full_open, record_full_close, record_full_async): Refactor
3156         as methods of the record_full_base_target class.
3157         (record_full_resume, record_full_commit_resume): Refactor
3158         as methods of the record_full_target class.
3159         (record_full_wait, record_full_stopped_by_watchpoint)
3160         (record_full_stopped_data_address)
3161         (record_full_stopped_by_sw_breakpoint)
3162         (record_full_supports_stopped_by_sw_breakpoint)
3163         (record_full_stopped_by_hw_breakpoint)
3164         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
3165         methods of the record_full_base_target class.
3166         (record_full_store_registers, record_full_xfer_partial)
3167         (record_full_insert_breakpoint, record_full_remove_breakpoint):
3168         Refactor as methods of the record_full_target class.
3169         (record_full_can_execute_reverse, record_full_get_bookmark)
3170         (record_full_goto_bookmark, record_full_execution_direction)
3171         (record_full_record_method, record_full_info, record_full_delete)
3172         (record_full_is_replaying, record_full_will_replay)
3173         (record_full_goto_begin, record_full_goto_end, record_full_goto)
3174         (record_full_stop_replaying): Refactor as methods of the
3175         record_full_base_target class.
3176         (record_full_core_resume, record_full_core_kill)
3177         (record_full_core_fetch_registers)
3178         (record_full_core_prepare_to_store)
3179         (record_full_core_store_registers, record_full_core_xfer_partial)
3180         (record_full_core_insert_breakpoint)
3181         (record_full_core_remove_breakpoint)
3182         (record_full_core_has_execution): Refactor
3183         as methods of the record_full_core_target class.
3184         (record_full_base_target::supports_delete_record): New.
3185         (init_record_full_ops): Delete.
3186         (init_record_full_core_ops): Delete.
3187         (record_full_save): Refactor as method of the
3188         record_full_base_target class.
3189         (_initialize_record_full): Remove references to
3190         init_record_full_ops and init_record_full_core_ops.
3191
3192         * remote.c (remote_target, extended_remote_target): New classes.
3193         (remote_ops): Now a remote_target.
3194         (extended_remote_ops): Now an extended_remote_target.
3195         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
3196         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
3197         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
3198         (remote_pass_signals, remote_set_syscall_catchpoint)
3199         (remote_program_signals, )
3200         (remote_thread_always_alive): Remove target_ops parameter.
3201         (remote_thread_alive, remote_thread_name)
3202         (remote_update_thread_list, remote_threads_extra_info)
3203         (remote_static_tracepoint_marker_at)
3204         (remote_static_tracepoint_markers_by_strid)
3205         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
3206         (remote_open): Refactor as methods of remote_target.
3207         (extended_remote_open, extended_remote_detach)
3208         (extended_remote_attach, extended_remote_post_attach):
3209         (extended_remote_supports_disable_randomization)
3210         (extended_remote_create_inferior): : Refactor as method of
3211         extended_remote_target.
3212         (remote_set_permissions, remote_open_1, remote_detach)
3213         (remote_follow_fork, remote_follow_exec, remote_disconnect)
3214         (remote_resume, remote_commit_resume, remote_stop)
3215         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
3216         (remote_terminal_ours, remote_wait, remote_fetch_registers)
3217         (remote_prepare_to_store, remote_store_registers)
3218         (remote_flash_erase, remote_flash_done, remote_files_info)
3219         (remote_kill, remote_mourn, remote_insert_breakpoint)
3220         (remote_remove_breakpoint, remote_insert_watchpoint)
3221         (remote_watchpoint_addr_within_range)
3222         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
3223         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
3224         (remote_supports_stopped_by_sw_breakpoint)
3225         (remote_stopped_by_hw_breakpoint)
3226         (remote_supports_stopped_by_hw_breakpoint)
3227         (remote_stopped_by_watchpoint, remote_stopped_data_address)
3228         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
3229         (remote_verify_memory): Refactor as methods of remote_target.
3230         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
3231         parameter.
3232         (remote_xfer_partial, remote_get_memory_xfer_limit)
3233         (remote_search_memory, remote_rcmd, remote_memory_map)
3234         (remote_pid_to_str, remote_get_thread_local_address)
3235         (remote_get_tib_address, remote_read_description): Refactor as
3236         methods of remote_target.
3237         (remote_target::fileio_open, remote_target::fileio_pwrite)
3238         (remote_target::fileio_pread, remote_target::fileio_close): New.
3239         (remote_hostio_readlink, remote_hostio_fstat)
3240         (remote_filesystem_is_local, remote_can_execute_reverse)
3241         (remote_supports_non_stop, remote_supports_disable_randomization)
3242         (remote_supports_multi_process, remote_supports_cond_breakpoints)
3243         (remote_supports_enable_disable_tracepoint)
3244         (remote_supports_string_tracing)
3245         (remote_can_run_breakpoint_commands, remote_trace_init)
3246         (remote_download_tracepoint, remote_can_download_tracepoint)
3247         (remote_download_trace_state_variable, remote_enable_tracepoint)
3248         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
3249         (remote_trace_start, remote_get_trace_status)
3250         (remote_get_tracepoint_status, remote_trace_stop)
3251         (remote_trace_find, remote_get_trace_state_variable_value)
3252         (remote_save_trace_data, remote_get_raw_trace_data)
3253         (remote_set_disconnected_tracing, remote_core_of_thread)
3254         (remote_set_circular_trace_buffer, remote_traceframe_info)
3255         (remote_get_min_fast_tracepoint_insn_len)
3256         (remote_set_trace_buffer_size, remote_set_trace_notes)
3257         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
3258         (remote_disable_btrace, remote_teardown_btrace)
3259         (remote_read_btrace, remote_btrace_conf)
3260         (remote_augmented_libraries_svr4_read, remote_load)
3261         (remote_pid_to_exec_file, remote_can_do_single_step)
3262         (remote_execution_direction, remote_thread_handle_to_thread_info):
3263         Refactor as methods of remote_target.
3264         (init_remote_ops, init_extended_remote_ops): Delete.
3265         (remote_can_async_p, remote_is_async_p, remote_async)
3266         (remote_thread_events, remote_upload_tracepoints)
3267         (remote_upload_trace_state_variables): Refactor as methods of
3268         remote_target.
3269         (_initialize_remote): Remove references to init_remote_ops and
3270         init_extended_remote_ops.
3271
3272         * remote-sim.c (gdbsim_target): New class.
3273         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
3274         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
3275         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
3276         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
3277         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
3278         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
3279         Refactor as methods of gdbsim_target.
3280         (gdbsim_ops): Now a gdbsim_target.
3281         (init_gdbsim_ops): Delete.
3282         (gdbsim_cntrl_c): Adjust.
3283         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
3284
3285         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
3286         (the_amd64_linux_nat_target): New.
3287         (amd64_linux_fetch_inferior_registers)
3288         (amd64_linux_store_inferior_registers): Refactor as methods of
3289         amd64_linux_nat_target.
3290         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
3291         * i386-linux-nat.c: Don't include "linux-nat.h".
3292         (i386_linux_nat_target): New class.
3293         (the_i386_linux_nat_target): New.
3294         (i386_linux_fetch_inferior_registers)
3295         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
3296         as methods of i386_linux_nat_target.
3297         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
3298         * inf-child.c (inf_child_ops): Delete.
3299         (inf_child_fetch_inferior_registers)
3300         (inf_child_store_inferior_registers): Delete.
3301         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
3302         methods of inf_child_target.
3303         (inf_child_target::supports_terminal_ours)
3304         (inf_child_target::terminal_init)
3305         (inf_child_target::terminal_inferior)
3306         (inf_child_target::terminal_ours_for_output)
3307         (inf_child_target::terminal_ours, inf_child_target::interrupt)
3308         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
3309         New.
3310         (inf_child_open, inf_child_disconnect, inf_child_close)
3311         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
3312         (inf_child_post_startup_inferior, inf_child_can_run)
3313         (inf_child_pid_to_exec_file): Refactor as methods of
3314         inf_child_target.
3315         (inf_child_follow_fork): Delete.
3316         (inf_child_target::can_create_inferior)
3317         (inf_child_target::can_attach): New.
3318         (inf_child_target::has_all_memory, inf_child_target::has_memory)
3319         (inf_child_target::has_stack, inf_child_target::has_registers)
3320         (inf_child_target::has_execution): New.
3321         (inf_child_fileio_open, inf_child_fileio_pwrite)
3322         (inf_child_fileio_pread, inf_child_fileio_fstat)
3323         (inf_child_fileio_close, inf_child_fileio_unlink)
3324         (inf_child_fileio_readlink, inf_child_use_agent)
3325         (inf_child_can_use_agent): Refactor as methods of
3326         inf_child_target.
3327         (return_zero, inf_child_target): Delete.
3328         (inf_child_target::inf_child_target): New.
3329         * inf-child.h: Include "target.h".
3330         (inf_child_target): Delete function prototype.
3331         (inf_child_target): New class.
3332         (inf_child_open_target, inf_child_mourn_inferior)
3333         (inf_child_maybe_unpush_target): Delete.
3334         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
3335         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
3336         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
3337         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
3338         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
3339         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
3340         (inf_ptrace_wait, inf_ptrace_xfer_partial)
3341         (inf_ptrace_thread_alive, inf_ptrace_files_info)
3342         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
3343         methods of inf_ptrace_target.
3344         (inf_ptrace_target): Delete function.
3345         * inf-ptrace.h: Include "inf-child.h".
3346         (inf_ptrace_target): Delete function declaration.
3347         (inf_ptrace_target): New class.
3348         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
3349         * linux-nat.c (linux_target): New.
3350         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
3351         (linux_nat_target::~linux_nat_target): New.
3352         (linux_child_post_attach, linux_child_post_startup_inferior)
3353         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
3354         (linux_child_remove_fork_catchpoint)
3355         (linux_child_insert_vfork_catchpoint)
3356         (linux_child_remove_vfork_catchpoint)
3357         (linux_child_insert_exec_catchpoint)
3358         (linux_child_remove_exec_catchpoint)
3359         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
3360         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
3361         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
3362         (linux_nat_stopped_data_address)
3363         (linux_nat_stopped_by_sw_breakpoint)
3364         (linux_nat_supports_stopped_by_sw_breakpoint)
3365         (linux_nat_stopped_by_hw_breakpoint)
3366         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
3367         (linux_nat_kill, linux_nat_mourn_inferior)
3368         (linux_nat_xfer_partial, linux_nat_thread_alive)
3369         (linux_nat_update_thread_list, linux_nat_pid_to_str)
3370         (linux_nat_thread_name, linux_child_pid_to_exec_file)
3371         (linux_child_static_tracepoint_markers_by_strid)
3372         (linux_nat_is_async_p, linux_nat_can_async_p)
3373         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
3374         (linux_nat_supports_multi_process)
3375         (linux_nat_supports_disable_randomization, linux_nat_async)
3376         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
3377         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
3378         (linux_nat_fileio_open, linux_nat_fileio_readlink)
3379         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
3380         methods of linux_nat_target.
3381         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
3382         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
3383         parameter.
3384         (check_stopped_by_watchpoint): Adjust.
3385         (linux_xfer_partial): Delete.
3386         (linux_target_install_ops, linux_target, linux_nat_add_target):
3387         Delete.
3388         (linux_nat_target::linux_nat_target): New.
3389         * linux-nat.h: Include "inf-ptrace.h".
3390         (linux_nat_target): New.
3391         (linux_target, linux_target_install_ops, linux_nat_add_target):
3392         Delete function declarations.
3393         (linux_target): Declare global.
3394         * linux-thread-db.c (thread_db_target): New.
3395         (thread_db_target::thread_db_target): New.
3396         (thread_db_ops): Delete.
3397         (the_thread_db_target): New.
3398         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
3399         (thread_db_update_thread_list, thread_db_pid_to_str)
3400         (thread_db_extra_thread_info)
3401         (thread_db_thread_handle_to_thread_info)
3402         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
3403         (thread_db_resume): Refactor as methods of thread_db_target.
3404         (init_thread_db_ops): Delete.
3405         (_initialize_thread_db): Remove reference to init_thread_db_ops.
3406         * x86-linux-nat.c: Don't include "linux-nat.h".
3407         (super_post_startup_inferior): Delete.
3408         (x86_linux_nat_target::~x86_linux_nat_target): New.
3409         (x86_linux_child_post_startup_inferior)
3410         (x86_linux_read_description, x86_linux_enable_btrace)
3411         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
3412         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
3413         methods of x86_linux_nat_target.
3414         (x86_linux_create_target): Delete.  Bits folded ...
3415         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
3416         pointer.
3417         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
3418         (x86_linux_nat_target): New class.
3419         (x86_linux_create_target): Delete.
3420         (x86_linux_add_target): Now takes a linux_nat_target pointer.
3421         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
3422         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
3423         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
3424         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
3425         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
3426         make extern.
3427         (x86_use_watchpoints): Delete.
3428         * x86-nat.h: Include "breakpoint.h" and "target.h".
3429         (x86_use_watchpoints): Delete.
3430         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
3431         (x86_stopped_by_watchpoint, x86_stopped_data_address)
3432         (x86_insert_watchpoint, x86_remove_watchpoint)
3433         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
3434         (x86_stopped_by_hw_breakpoint): New declarations.
3435         (x86_nat_target): New template class.
3436
3437         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
3438         (the_ppc_linux_nat_target): New.
3439         (ppc_linux_fetch_inferior_registers)
3440         (ppc_linux_can_use_hw_breakpoint)
3441         (ppc_linux_region_ok_for_hw_watchpoint)
3442         (ppc_linux_ranged_break_num_registers)
3443         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
3444         (ppc_linux_insert_mask_watchpoint)
3445         (ppc_linux_remove_mask_watchpoint)
3446         (ppc_linux_can_accel_watchpoint_condition)
3447         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
3448         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
3449         (ppc_linux_watchpoint_addr_within_range)
3450         (ppc_linux_masked_watch_num_registers)
3451         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
3452         (ppc_linux_read_description): Refactor as methods of
3453         ppc_linux_nat_target.
3454         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
3455
3456         * procfs.c (procfs_xfer_partial): Delete forward declaration.
3457         (procfs_target): New class.
3458         (the_procfs_target): New.
3459         (procfs_target): Delete function.
3460         (procfs_auxv_parse, procfs_attach, procfs_detach)
3461         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
3462         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
3463         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
3464         (procfs_create_inferior, procfs_update_thread_list)
3465         (procfs_thread_alive, procfs_pid_to_str)
3466         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
3467         (procfs_stopped_data_address, procfs_insert_watchpoint)
3468         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
3469         (proc_find_memory_regions, procfs_info_proc)
3470         (procfs_make_note_section): Refactor as methods of procfs_target.
3471         (_initialize_procfs): Adjust.
3472         * sol-thread.c (sol_thread_target): New class.
3473         (sol_thread_ops): Now a sol_thread_target.
3474         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
3475         (sol_thread_fetch_registers, sol_thread_store_registers)
3476         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
3477         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
3478         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
3479         (init_sol_thread_ops): Delete.
3480         (_initialize_sol_thread): Adjust.  Remove references to
3481         init_sol_thread_ops and complete_target_initialization.
3482
3483         * windows-nat.c (windows_nat_target): New class.
3484         (windows_fetch_inferior_registers)
3485         (windows_store_inferior_registers, windows_resume, windows_wait)
3486         (windows_attach, windows_detach, windows_pid_to_exec_file)
3487         (windows_files_info, windows_create_inferior)
3488         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
3489         (windows_close, windows_pid_to_str, windows_xfer_partial)
3490         (windows_get_tib_address, windows_get_ada_task_ptid)
3491         (windows_thread_name, windows_thread_alive): Refactor as
3492         windows_nat_target methods.
3493         (do_initial_windows_stuff): Adjust.
3494         (windows_target): Delete function.
3495         (_initialize_windows_nat): Adjust.
3496
3497         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
3498         (darwin_mourn_inferior, darwin_kill_inferior)
3499         (darwin_create_inferior, darwin_attach, darwin_detach)
3500         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
3501         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
3502         (darwin_supports_multi_process): Refactor as darwin_nat_target
3503         methods.
3504         (darwin_resume_to, darwin_files_info): Delete.
3505         (_initialize_darwin_inferior): Rename to ...
3506         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
3507         * darwin-nat.h: Include "inf-child.h".
3508         (darwin_nat_target): New class.
3509         (darwin_complete_target): Delete.
3510         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
3511         (darwin_target): New.
3512         (i386_darwin_fetch_inferior_registers)
3513         (i386_darwin_store_inferior_registers): Refactor as methods of
3514         darwin_nat_target.
3515         (darwin_complete_target): Delete, with ...
3516         (_initialize_i386_darwin_nat): ... bits factored out here.
3517
3518         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
3519         (the_alpha_linux_nat_target): New.
3520         (alpha_linux_register_u_offset): Refactor as
3521         alpha_linux_nat_target method.
3522         (_initialize_alpha_linux_nat): Adjust.
3523         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
3524         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3525         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
3526         methods of linux_nat_trad_target.
3527         (linux_trad_target): Delete.
3528         * linux-nat-trad.h (linux_trad_target): Delete function.
3529         (linux_nat_trad_target): New class.
3530         * mips-linux-nat.c (mips_linux_nat_target): New class.
3531         (super_fetch_registers, super_store_registers, super_close):
3532         Delete.
3533         (the_mips_linux_nat_target): New.
3534         (mips64_linux_regsets_fetch_registers)
3535         (mips64_linux_regsets_store_registers)
3536         (mips64_linux_fetch_registers, mips64_linux_store_registers)
3537         (mips_linux_register_u_offset, mips_linux_read_description)
3538         (mips_linux_can_use_hw_breakpoint)
3539         (mips_linux_stopped_by_watchpoint)
3540         (mips_linux_stopped_data_address)
3541         (mips_linux_region_ok_for_hw_watchpoint)
3542         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
3543         (mips_linux_close): Refactor as methods of mips_linux_nat.
3544         (_initialize_mips_linux_nat): Adjust to C++ification.
3545
3546         * aix-thread.c (aix_thread_target): New class.
3547         (aix_thread_ops): Now an aix_thread_target.
3548         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
3549         (aix_thread_fetch_registers, aix_thread_store_registers)
3550         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
3551         (aix_thread_thread_alive, aix_thread_pid_to_str)
3552         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
3553         Refactor as methods of aix_thread_target.
3554         (init_aix_thread_ops): Delete.
3555         (_initialize_aix_thread): Remove references to init_aix_thread_ops
3556         and complete_target_initialization.
3557         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
3558         (rs6000_nat_target): New class.
3559         (the_rs6000_nat_target): New.
3560         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
3561         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
3562         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
3563         (super_create_inferior): Delete.
3564         (_initialize_rs6000_nat): Adjust to C++ification.
3565
3566         * arm-linux-nat.c (arm_linux_nat_target): New class.
3567         (the_arm_linux_nat_target): New.
3568         (arm_linux_fetch_inferior_registers)
3569         (arm_linux_store_inferior_registers, arm_linux_read_description)
3570         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
3571         (arm_linux_remove_hw_breakpoint)
3572         (arm_linux_region_ok_for_hw_watchpoint)
3573         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
3574         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
3575         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
3576         arm_linux_nat_target.
3577         (_initialize_arm_linux_nat): Adjust to C++ification.
3578
3579         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
3580         (the_aarch64_linux_nat_target): New.
3581         (aarch64_linux_fetch_inferior_registers)
3582         (aarch64_linux_store_inferior_registers)
3583         (aarch64_linux_child_post_startup_inferior)
3584         (aarch64_linux_read_description)
3585         (aarch64_linux_can_use_hw_breakpoint)
3586         (aarch64_linux_insert_hw_breakpoint)
3587         (aarch64_linux_remove_hw_breakpoint)
3588         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
3589         (aarch64_linux_region_ok_for_hw_watchpoint)
3590         (aarch64_linux_stopped_data_address)
3591         (aarch64_linux_stopped_by_watchpoint)
3592         (aarch64_linux_watchpoint_addr_within_range)
3593         (aarch64_linux_can_do_single_step): Refactor as methods of
3594         aarch64_linux_nat_target.
3595         (super_post_startup_inferior): Delete.
3596         (_initialize_aarch64_linux_nat): Adjust to C++ification.
3597
3598         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
3599         (the_hppa_linux_nat_target): New.
3600         (hppa_linux_fetch_inferior_registers)
3601         (hppa_linux_store_inferior_registers): Refactor as methods of
3602         hppa_linux_nat_target.
3603         (_initialize_hppa_linux_nat): Adjust to C++ification.
3604
3605         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
3606         (the_ia64_linux_nat_target): New.
3607         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
3608         (ia64_linux_stopped_data_address)
3609         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
3610         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
3611         ia64_linux_nat_target methods.
3612         (super_xfer_partial): Delete.
3613         (_initialize_ia64_linux_nat): Adjust to C++ification.
3614
3615         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
3616         (the_m32r_linux_nat_target): New.
3617         (m32r_linux_fetch_inferior_registers)
3618         (m32r_linux_store_inferior_registers): Refactor as
3619         m32r_linux_nat_target methods.
3620         (_initialize_m32r_linux_nat): Adjust to C++ification.
3621
3622         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
3623         (the_m68k_linux_nat_target): New.
3624         (m68k_linux_fetch_inferior_registers)
3625         (m68k_linux_store_inferior_registers): Refactor as
3626         m68k_linux_nat_target methods.
3627         (_initialize_m68k_linux_nat): Adjust to C++ification.
3628
3629         * s390-linux-nat.c (s390_linux_nat_target): New class.
3630         (the_s390_linux_nat_target): New.
3631         (s390_linux_fetch_inferior_registers)
3632         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
3633         (s390_insert_watchpoint, s390_remove_watchpoint)
3634         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
3635         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
3636         (s390_auxv_parse, s390_read_description): Refactor as methods of
3637         s390_linux_nat_target.
3638         (_initialize_s390_nat): Adjust to C++ification.
3639
3640         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
3641         (the_sparc_linux_nat_target): New.
3642         (_initialize_sparc_linux_nat): Adjust to C++ification.
3643         * sparc-nat.c (sparc_fetch_inferior_registers)
3644         (sparc_store_inferior_registers): Remove target_ops parameter.
3645         * sparc-nat.h (sparc_fetch_inferior_registers)
3646         (sparc_store_inferior_registers): Remove target_ops parameter.
3647         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
3648         (the_sparc64_linux_nat_target): New.
3649         (_initialize_sparc64_linux_nat): Adjust to C++ification.
3650
3651         * spu-linux-nat.c (spu_linux_nat_target): New class.
3652         (the_spu_linux_nat_target): New.
3653         (spu_child_post_startup_inferior, spu_child_post_attach)
3654         (spu_child_wait, spu_fetch_inferior_registers)
3655         (spu_store_inferior_registers, spu_xfer_partial)
3656         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
3657         methods.
3658         (_initialize_spu_nat): Adjust to C++ification.
3659
3660         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
3661         (the_tilegx_linux_nat_target): New.
3662         (fetch_inferior_registers, store_inferior_registers):
3663         Refactor as methods.
3664         (_initialize_tile_linux_nat): Adjust to C++ification.
3665
3666         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
3667         (the_xtensa_linux_nat_target): New.
3668         (xtensa_linux_fetch_inferior_registers)
3669         (xtensa_linux_store_inferior_registers): Refactor as
3670         xtensa_linux_nat_target methods.
3671         (_initialize_xtensa_linux_nat): Adjust to C++ification.
3672
3673         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
3674         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
3675         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
3676         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
3677         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
3678         (fbsd_stopped_by_sw_breakpoint)
3679         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
3680         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
3681         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
3682         (fbsd_post_startup_inferior, fbsd_post_attach)
3683         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
3684         (fbsd_set_syscall_catchpoint)
3685         (super_xfer_partial, super_resume, super_wait)
3686         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
3687         (fbsd_handle_debug_trap): Remove target_ops parameter.
3688         (fbsd_nat_add_target): Delete.
3689         * fbsd-nat.h: Include "inf-ptrace.h".
3690         (fbsd_nat_add_target): Delete.
3691         (USE_SIGTRAP_SIGINFO): Define.
3692         (fbsd_nat_target): New class.
3693
3694         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
3695         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
3696         (amd64bsd_target): Delete.
3697         * amd64-bsd-nat.h: New file.
3698         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
3699         "x86-bsd-nat.h".
3700         (amd64_fbsd_nat_target): New class.
3701         (the_amd64_fbsd_nat_target): New.
3702         (amd64fbsd_read_description): Refactor as method of
3703         amd64_fbsd_nat_target.
3704         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
3705         (_initialize_amd64fbsd_nat): Adjust to C++ification.
3706         * amd64-nat.h (amd64bsd_target): Delete function declaration.
3707         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
3708         (i386bsd_store_inferior_registers): Remove target_ops parameter.
3709         (i386bsd_target): Delete.
3710         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
3711         (i386bsd_fetch_inferior_registers)
3712         (i386bsd_store_inferior_registers): Declare.
3713         (i386_bsd_nat_target): New class.
3714         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
3715         (the_i386_fbsd_nat_target): New.
3716         (i386fbsd_resume, i386fbsd_read_description): Refactor as
3717         i386_fbsd_nat_target methods.
3718         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
3719         (_initialize_i386fbsd_nat): Adjust to C++ification.
3720         * x86-bsd-nat.c (super_mourn_inferior): Delete.
3721         (x86bsd_mourn_inferior, x86bsd_target): Delete.
3722         (_initialize_x86_bsd_nat): Adjust to C++ification.
3723         * x86-bsd-nat.h: Include "x86-nat.h".
3724         (x86bsd_target): Delete declaration.
3725         (x86bsd_nat_target): New class.
3726
3727         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
3728         (the_aarch64_fbsd_nat_target): New.
3729         (aarch64_fbsd_fetch_inferior_registers)
3730         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
3731         aarch64_fbsd_nat_target.
3732         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
3733         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
3734         (the_alpha_bsd_nat_target): New.
3735         (alphabsd_fetch_inferior_registers)
3736         (alphabsd_store_inferior_registers): Refactor as
3737         alpha_bsd_nat_target methods.
3738         (_initialize_alphabsd_nat): Refactor as methods of
3739         alpha_bsd_nat_target.
3740         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
3741         (the_amd64_nbsd_nat_target): New.
3742         (_initialize_amd64nbsd_nat): Adjust to C++ification.
3743         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
3744         (the_amd64_obsd_nat_target): New.
3745         (_initialize_amd64obsd_nat): Adjust to C++ification.
3746         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
3747         (the_arm_fbsd_nat_target): New.
3748         (arm_fbsd_fetch_inferior_registers)
3749         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
3750         (_initialize_arm_fbsd_nat): Refactor as methods of
3751         arm_fbsd_nat_target.
3752         (_initialize_arm_fbsd_nat): Adjust to C++ification.
3753         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
3754         (the_arm_netbsd_nat_target): New.
3755         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
3756         arm_netbsd_nat_target.
3757         (_initialize_arm_netbsd_nat): Adjust to C++ification.
3758         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
3759         (the_hppa_nbsd_nat_target): New.
3760         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
3761         hppa_nbsd_nat_target methods.
3762         (_initialize_hppanbsd_nat): Adjust to C++ification.
3763         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
3764         (the_hppa_obsd_nat_target): New.
3765         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
3766         methods of hppa_obsd_nat_target.
3767         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
3768         add_target.
3769         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
3770         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
3771         add_target.
3772         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
3773         (_initialize_i386obsd_nat): Use add_target.
3774         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
3775         (the_m68k_bsd_nat_target): New.
3776         (m68kbsd_fetch_inferior_registers)
3777         (m68kbsd_store_inferior_registers): Refactor as methods of
3778         m68k_bsd_nat_target.
3779         (_initialize_m68kbsd_nat): Adjust to C++ification.
3780         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
3781         (the_mips_fbsd_nat_target): New.
3782         (mips_fbsd_fetch_inferior_registers)
3783         (mips_fbsd_store_inferior_registers): Refactor as methods of
3784         mips_fbsd_nat_target.
3785         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
3786         add_target.
3787         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
3788         (the_mips_nbsd_nat_target): New.
3789         (mipsnbsd_fetch_inferior_registers)
3790         (mipsnbsd_store_inferior_registers): Refactor as methods of
3791         mips_nbsd_nat_target.
3792         (_initialize_mipsnbsd_nat): Adjust to C++ification.
3793         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
3794         (the_mips64_obsd_nat_target): New.
3795         (mips64obsd_fetch_inferior_registers)
3796         (mips64obsd_store_inferior_registers): Refactor as methods of
3797         mips64_obsd_nat_target.
3798         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
3799         add_target.
3800         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
3801         nbsd_nat_target.
3802         * nbsd-nat.h: Include "inf-ptrace.h".
3803         (nbsd_nat_target): New class.
3804         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
3805         (obsd_wait): Refactor as methods of obsd_nat_target.
3806         (obsd_add_target): Delete.
3807         * obsd-nat.h: Include "inf-ptrace.h".
3808         (obsd_nat_target): New class.
3809         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
3810         (the_ppc_fbsd_nat_target): New.
3811         (ppcfbsd_fetch_inferior_registers)
3812         (ppcfbsd_store_inferior_registers): Refactor as methods of
3813         ppc_fbsd_nat_target.
3814         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
3815         add_target.
3816         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
3817         (the_ppc_nbsd_nat_target): New.
3818         (ppcnbsd_fetch_inferior_registers)
3819         (ppcnbsd_store_inferior_registers): Refactor as methods of
3820         ppc_nbsd_nat_target.
3821         (_initialize_ppcnbsd_nat): Adjust to C++ification.
3822         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
3823         (the_ppc_obsd_nat_target): New.
3824         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
3825         methods of ppc_obsd_nat_target.
3826         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
3827         add_target.
3828         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
3829         (the_sh_nbsd_nat_target): New.
3830         (shnbsd_fetch_inferior_registers)
3831         (shnbsd_store_inferior_registers): Refactor as methods of
3832         sh_nbsd_nat_target.
3833         (_initialize_shnbsd_nat): Adjust to C++ification.
3834         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
3835         (inf_ptrace_xfer_partial): Delete.
3836         (sparc_xfer_partial, sparc_target): Delete.
3837         * sparc-nat.h (sparc_fetch_inferior_registers)
3838         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
3839         (sparc_target): Delete function declaration.
3840         (sparc_target): New template class.
3841         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
3842         (_initialize_sparcnbsd_nat): Adjust to C++ification.
3843         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
3844         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
3845         add_target.
3846         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
3847         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
3848         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
3849         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
3850         add_target.
3851         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
3852         (the_vax_bsd_nat_target): New.
3853         (vaxbsd_fetch_inferior_registers)
3854         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
3855         methods.
3856         (_initialize_vaxbsd_nat): Adjust to C++ification.
3857
3858         * bsd-kvm.c (bsd_kvm_target): New class.
3859         (bsd_kvm_ops): Now a bsd_kvm_target.
3860         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
3861         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
3862         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
3863         bsd_kvm_target.
3864         (bsd_kvm_return_one): Delete.
3865         (bsd_kvm_add_target): Adjust to C++ification.
3866
3867         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
3868         (nto_procfs_target_procfs): New classes.
3869         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
3870         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
3871         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
3872         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
3873         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
3874         (procfs_remove_hw_breakpoint, procfs_resume)
3875         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
3876         (procfs_kill_inferior, procfs_store_registers)
3877         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
3878         as methods of nto_procfs_target.
3879         (nto_procfs_ops): Now an nto_procfs_target_procfs.
3880         (nto_native_ops): Delete.
3881         (procfs_open, procfs_native_open): Delete.
3882         (nto_native_ops): Now an nto_procfs_target_native.
3883         (init_procfs_targets): Adjust to C++ification.
3884         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
3885         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
3886         Refactor as methods of nto_procfs_target.
3887
3888         * go32-nat.c (go32_nat_target): New class.
3889         (the_go32_nat_target): New.
3890         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
3891         (go32_store_registers, go32_xfer_partial, go32_files_info)
3892         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
3893         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
3894         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
3895         (go32_pid_to_str): Refactor as methods of go32_nat_target.
3896         (go32_target): Delete.
3897         (_initialize_go32_nat): Adjust to C++ification.
3898
3899         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
3900         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
3901         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
3902         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
3903         gnu_nat_target.
3904         (gnu_target): Delete.
3905         * gnu-nat.h (gnu_target): Delete.
3906         (gnu_nat_target): New class.
3907         * i386-gnu-nat.c (gnu_base_target): New.
3908         (i386_gnu_nat_target): New class.
3909         (the_i386_gnu_nat_target): New.
3910         (_initialize_i386gnu_nat): Adjust to C++ification.
3911
3912 2018-05-02  Pedro Alves  <palves@redhat.com>
3913
3914         * bfd-target.c (target_bfd_xclose): Rename to ...
3915         (target_bfd_close): ... this.
3916         (target_bfd_reopen): Adjust.
3917         * target.c (target_close): Remove references to to_xclose.
3918         * target.h (target_ops::to_xclose): Delete.
3919         (target_ops::to_close): Update comments.
3920
3921 2018-05-02  Pedro Alves  <palves@redhat.com>
3922
3923         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
3924         "linux-nat.h".
3925         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
3926         * inf-ptrace.c (inf_ptrace_register_u_offset)
3927         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3928         (inf_ptrace_store_register, inf_ptrace_store_registers)
3929         (inf_ptrace_trad_target): Move to ...
3930         * linux-nat-trad.c: ... this new file.
3931         * linux-nat-trad.h: New file.
3932         * linux-nat.c (linux_target_install_ops): Make extern.
3933         (linux_trad_target): Delete.
3934         * linux-nat.h (linux_trad_target): Delete declaration.
3935         (linux_target_install_ops): Declare.
3936         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
3937         "linux-nat.h".
3938
3939 2018-05-02  Pedro Alves  <palves@redhat.com>
3940
3941         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3942         procfs_target/add_target here.
3943         * procfs.c (procfs_target): Make static.
3944         (_initialize_procfs): Call add_target here.
3945         * procfs.h (struct target_ops): Remove forward declaration.
3946         (procfs_target): Remove declaration.
3947         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
3948
3949 2018-05-02  Pedro Alves  <palves@redhat.com>
3950
3951         * procfs.c (procfs_stopped_by_watchpoint)
3952         (procfs_insert_watchpoint, procfs_remove_watchpoint)
3953         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
3954         Forward declare.
3955         (procfs_use_watchpoints): Delete, move contents...
3956         (procfs_target): ... here.
3957         * procfs.h (procfs_use_watchpoints): Delete declaration.
3958         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3959         procfs_use_watchpoints.
3960         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
3961         procfs_use_watchpoints.
3962
3963 2018-05-02  Tom Tromey  <tom@tromey.com>
3964
3965         PR python/20084:
3966         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
3967         and var_zuinteger_unlimited.
3968         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
3969         and PARAM_ZUINTEGER_UNLIMITED.
3970         (set_parameter_value): Handle var_zuinteger and
3971         var_zuinteger_unlimited.
3972         (add_setshow_generic): Likewise.
3973         (parmpy_init): Likewise.
3974
3975 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
3976
3977         PR rust/23124
3978         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
3979         pointer is not null before dereferencing it.
3980
3981 2018-04-30  Tom Tromey  <tom@tromey.com>
3982
3983         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
3984         is_mi_like_p.
3985
3986 2018-04-30  Tom Tromey  <tom@tromey.com>
3987
3988         * breakpoint.c (mention): Remove use of is_mi_like_p.
3989         (print_mention_ranged_breakpoint): Likewise.
3990         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
3991         of is_mi_like_p.
3992
3993 2018-04-30  Tom Tromey  <tom@tromey.com>
3994
3995         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
3996
3997 2018-04-30  Tom Tromey  <tom@tromey.com>
3998
3999         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
4000         (info_spu_event_command): Remove some uses of is_mi_like_p.
4001
4002 2018-04-30  Tom Tromey  <tom@tromey.com>
4003
4004         * python/py-framefilter.c (py_print_single_arg)
4005         (enumerate_locals, py_print_args, py_print_frame): Remove some
4006         uses of is_mi_like_p.
4007
4008 2018-04-30  Tom Tromey  <tom@tromey.com>
4009
4010         * ui-out.c: Update.
4011         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
4012         * ui-out.h (ui_out::is_mi_like_p): Now const.
4013         (ui_out::do_is_mi_like_p): Now const.
4014         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
4015
4016 2018-04-30  Tom Tromey  <tom@tromey.com>
4017
4018         * varobj.c (varobj_set_visualizer): Use new_reference.
4019         * python/python.c (gdbpy_decode_line): Use new_reference.
4020         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
4021         new_reference.
4022
4023 2018-04-30  Tom Tromey  <tom@tromey.com>
4024
4025         * varobj.c (install_new_value): Use new_reference.
4026         * value.h (value_incref): Return void.  Swap intro comment with
4027         value_decref.
4028         * value.c (set_value_parent): Use new_reference.
4029         (value_incref): Return void.  Update intro comment.
4030         (release_value): Use new_reference.
4031         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
4032
4033 2018-04-30  Tom Tromey  <tom@tromey.com>
4034
4035         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
4036         * gdb_bfd.h (new_bfd_ref): Remove.
4037         (gdb_bfd_open): Update comment.
4038         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4039         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
4040         (gdb_bfd_fdopenr): Use new_reference.
4041         * exec.c (exec_file_attach): Use new_reference.
4042
4043 2018-04-30  Tom Tromey  <tom@tromey.com>
4044
4045         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
4046         method.
4047
4048 2018-04-30  Tom Tromey  <tom@tromey.com>
4049
4050         * jit.c (jit_read_code_entry): Use type_align.
4051         * i386-tdep.c (i386_gdbarch_init): Don't call
4052         set_gdbarch_long_long_align_bit.
4053         * gdbarch.sh: Remove long_long_align_bit.
4054         * gdbarch.c, gdbarch.h: Rebuild.
4055         * arc-tdep.c (arc_type_align): New function.
4056         (arc_gdbarch_init): Use arc_type_align.  Don't call
4057         set_gdbarch_long_long_align_bit.
4058
4059 2018-04-30  Tom Tromey  <tom@tromey.com>
4060
4061         * rust-lang.c (rust_type_alignment): Remove.
4062         (rust_composite_type): Use type_align.
4063
4064 2018-04-30  Tom Tromey  <tom@tromey.com>
4065
4066         * NEWS: Mention Type.align.
4067         * python/py-type.c (typy_get_alignof): New function.
4068         (type_object_getset): Add "alignof".
4069
4070 2018-04-30  Tom Tromey  <tom@tromey.com>
4071
4072         PR exp/17095:
4073         * NEWS: Update.
4074         * std-operator.def (UNOP_ALIGNOF): New operator.
4075         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
4076         New.
4077         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
4078         * c-lang.c (c_op_print_tab): Add alignof.
4079         * c-exp.y (ALIGNOF): New token.
4080         (exp): Add "ALIGNOF" production.
4081         (ident_tokens): Add _Alignof and alignof.
4082
4083 2018-04-30  Tom Tromey  <tom@tromey.com>
4084
4085         * i386-tdep.c (i386_type_align): New function.
4086         (i386_gdbarch_init): Update.
4087         * gdbarch.sh (type_align): New method.
4088         * gdbarch.c, gdbarch.h: Rebuild.
4089         * arch-utils.h (default_type_align): Declare.
4090         * arch-utils.c (default_type_align): New function.
4091         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
4092         (struct type) <align_log2>: New field.
4093         <instance_flags>: Now a bitfield.
4094         (TYPE_RAW_ALIGN): New macro.
4095         (type_align, type_raw_align, set_type_align): Declare.
4096         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
4097         functions.
4098         * dwarf2read.c (quirk_rust_enum): Set type alignment.
4099         (get_alignment, maybe_set_alignment): New functions.
4100         (read_structure_type, read_enumeration_type, read_array_type)
4101         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
4102         (read_subrange_type, read_base_type): Set type alignment.
4103
4104 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
4105
4106         * dwarf2read.c (read_index_from_section): Use bool.
4107
4108 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
4109
4110         PR gdb/22950
4111         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
4112         with #ifdef.
4113
4114 2018-04-29  John Reiser  <jreiser@BitWagon.com>
4115
4116         PR build/22873
4117         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
4118         last step, and do it atomically.
4119
4120 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
4121
4122         * compile/compile-c-types.c (convert_int, convert_float):
4123         Update for C FE v1.
4124
4125 2018-04-27  Tom Tromey  <tom@tromey.com>
4126
4127         PR rust/22545:
4128         * rust-lang.c (rust_inclusive_range_type_p): New function.
4129         (rust_range): Handle inclusive ranges.
4130         (rust_compute_range): Likewise.
4131         * rust-exp.y (struct rust_op) <inclusive>: New field.
4132         (DOTDOTEQ): New constant.
4133         (range_expr): Add "..=" productions.
4134         (operator_tokens): Add "..=" token.
4135         (ast_range): Add "inclusive" parameter.
4136         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
4137         ranges.
4138         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
4139         bounds values.
4140         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
4141         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
4142         Update comments.
4143         * expprint.c (print_subexp_standard): Handle new bounds values.
4144         (dump_subexp_body_standard): Likewise.
4145
4146 2018-04-27  Tom Tromey  <tom@tromey.com>
4147
4148         * configure: Rebuild.
4149         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
4150         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
4151         "OVERRIDE".
4152         (class symbol_needs_eval_context): Likewise.
4153         * dwarf2read.c (mock_mapped_index::symbol_name_count)
4154         (mock_mapped_index::symbol_name_at): Use "override".  Remove
4155         "virtual".
4156         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
4157         "override".
4158         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
4159         * aarch64-tdep.c (instruction_reader::read): Use "override".
4160         (instruction_reader_test::read): Likewise.
4161         * arm-tdep.c (instruction_reader::read): Use "override".
4162         (instruction_reader_thumb::read): Likewise.
4163
4164 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
4165
4166         PR remote/9665
4167         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
4168         instead of remote_send.
4169         (remote_send): Remove.
4170
4171 2018-04-26  Pedro Alves  <palves@redhat.com>
4172
4173         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
4174         find_function_start_sal instead of find_pc_line.
4175
4176 2018-04-26  Pedro Alves  <palves@redhat.com>
4177
4178         * breakpoint.c (set_breakpoint_location_function): Handle
4179         mst_data_gnu_ifunc.
4180         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
4181         * elfread.c (elf_symtab_read): Give data symbols with
4182         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
4183         (elf_rel_plt_read): Update comment.
4184         * linespec.c (convert_linespec_to_sals): Handle
4185         mst_data_gnu_ifunc.
4186         (minsym_found): Handle mst_data_gnu_ifunc.
4187         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
4188         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
4189         * parse.c (find_minsym_type_and_address): Handle
4190         mst_data_gnu_ifunc.
4191         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
4192         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
4193         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
4194         comment.
4195         <mst_data_gnu_ifunc>: New enumerator.
4196
4197 2018-04-26  Pedro Alves  <palves@redhat.com>
4198
4199         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
4200         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
4201         'want_trampoline' parameter by a lookup_msym_prefer parameter.
4202         Handle it.
4203         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
4204         (lookup_minimal_symbol_by_pc): Adjust.
4205         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
4206         (lookup_solib_trampoline_symbol_by_pc): Adjust.
4207         * minsyms.h (lookup_msym_prefer): New enum.
4208         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4209         parameter by a lookup_msym_prefer parameter.
4210
4211 2018-04-26  Pedro Alves  <palves@redhat.com>
4212
4213         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
4214         ends in "@plt" instead of looking at the symbol's section.
4215
4216 2018-04-26  Pedro Alves  <palves@redhat.com>
4217
4218         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
4219         all references.
4220         (find_pc_partial_function_gnu_ifunc): Rename to ...
4221         (find_pc_partial_function): ... this, and remove references to
4222         'is_gnu_ifunc_p'.
4223         (find_pc_partial_function): Delete old implementation.
4224         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
4225
4226 2018-04-26  Pedro Alves  <palves@redhat.com>
4227
4228         * linespec.c (struct bound_minimal_symbol_search_key): New.
4229         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
4230         skip first line if we found a GNU ifunc minimal symbol by name.
4231         (compare_msymbols): Change parameters to work with a destructured
4232         lhs minsym.
4233         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
4234         functions.
4235
4236 2018-04-26  Pedro Alves  <palves@redhat.com>
4237
4238         * breakpoint.c (set_breakpoint_location_function): Don't resolve
4239         ifunc targets here.  Instead, if we have an ifunc minsym, use its
4240         address/name.
4241         (add_location_to_breakpoint): Store the minsym and the objfile in
4242         the breakpoint location.
4243         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
4244         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
4245         Record the minsym in the sal.
4246         * symtab.h (symtab_and_line) <msymbol>: New field.
4247
4248 2018-04-26  Pedro Alves  <palves@redhat.com>
4249
4250         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
4251         unless we actually resolved the ifunc.
4252
4253 2018-04-26  Pedro Alves  <palves@redhat.com>
4254
4255         * c-exp.y (variable production): Prefer ifunc minsyms over
4256         regular function symbols.
4257         * symtab.c (find_gnu_ifunc): New function.
4258         * minsyms.h (lookup_msym_prefer): New enum.
4259         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4260         parameter by a lookup_msym_prefer parameter.
4261         * symtab.h (find_gnu_ifunc): New declaration.
4262
4263 2018-04-26  Pedro Alves  <palves@redhat.com>
4264
4265         * blockframe.c (find_gnu_ifunc_target_type): New function.
4266         (find_function_type): New.
4267         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
4268         return a value with a memory address.
4269         (eval_call): For calls to GNU ifunc functions, try to find the
4270         type of the target function from the type that the resolver
4271         returns.
4272         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
4273         symbols.
4274         * infcall.c (find_function_return_type): Delete.
4275         (find_function_addr): Add 'function_type' parameter.  For calls to
4276         GNU ifunc functions, try to find the type of the target function
4277         from the type that the resolver returns, and return it via
4278         FUNCTION_TYPE.
4279         (call_function_by_hand_dummy): Adjust to use the function type
4280         returned by find_function_addr.
4281         (find_function_addr): Add 'function_type' parameter and move
4282         description here.
4283         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
4284         declarations.
4285
4286 2018-04-26  Pedro Alves  <palves@redhat.com>
4287
4288         * c-exp.y (variable production): Skip finding an alias for ifunc
4289         symbols.
4290
4291 2018-04-26  Pedro Alves  <palves@redhat.com>
4292
4293         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
4294
4295 2018-04-25  Pedro Alves  <palves@redhat.com>
4296
4297         * infcmd.c (kill_command): Print the pid as string, not the whole
4298         thread's ptid.  Add comment.  s/has been killed/killed/ in output
4299         message.
4300         * remote.c (remote_detach_1): Print the pid as string, not the
4301         whole thread's ptid.
4302
4303 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4304             Sergio Durigan Junior  <sergiodj@redhat.com>
4305             Pedro Alves  <palves@redhat.com>
4306
4307         * infcmd.c (kill_command): Print message when inferior has
4308         been killed.
4309         * inferior.c (print_inferior_events): Remove 'static'.  Set as
4310         '1'.
4311         (add_inferior): Improve message printed when
4312         'print_inferior_events' is on.
4313         (exit_inferior): Remove message printed when
4314         'print_inferior_events' is on.
4315         (detach_inferior): Improve message printed when
4316         'print_inferior_events' is on.
4317         (initialize_inferiors): Use 'add_inferior_silent' to set
4318         'current_inferior_'.
4319         * inferior.h (print_inferior_events): Declare here as
4320         'extern'.
4321         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
4322         '[Detaching...]' messages when 'print_inferior_events' is on.
4323         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
4324         as prefix/suffix for messages.  Remove periods.  Fix erroneous
4325         'Detaching after fork from child...', replace it by '... from
4326         parent...'.
4327         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
4328         prefix/suffix when printing 'Detaching...' messages.  Print
4329         them when 'print_inferior_events' is on.
4330         * remote.c (remote_detach_1): Print message when detaching
4331         from inferior and '!is_fork_parent'.
4332
4333 2018-04-24  Tom Tromey  <tom@tromey.com>
4334
4335         * cli-out.h: Reindent.
4336
4337 2018-04-24  Tom Tromey  <tom@tromey.com>
4338
4339         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
4340         (cli_ui_out::do_field_string): Use fputs_filtered.
4341         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
4342
4343 2018-04-23  Tom Tromey  <tom@tromey.com>
4344
4345         * guile/scm-frame.c (gdbscm_frame_read_var): Use
4346         gdb::unique_xmalloc_ptr.
4347
4348 2018-04-23  Tom Tromey  <tom@tromey.com>
4349
4350         * configure: Rebuild.
4351
4352 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
4353
4354         PR gdb/23095
4355         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
4356         prepare_for_testing.  Set normal_bp to r_debug_state if target
4357         is bsd.
4358
4359 2018-04-21  Pedro Alves  <palves@redhat.com>
4360             Rajendra SY  <rajendra.sy@gmail.com>
4361
4362         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
4363         * remote.c (extended_remote_attach): In all-stop mode, mark the
4364         thread as executing.
4365
4366 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4367
4368         * thread.c (thread_apply_all_command): Fix comment.
4369         (thread_command): Fix comment.
4370
4371 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
4372
4373         * common/tdesc.h (tdesc_create_feature): Remove xml filename
4374         parameter.
4375         * features/aarch64-core.c (create_feature_aarch64_core):
4376         Regenerate.
4377         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
4378         Likewise.
4379         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
4380         Likewise.
4381         * features/i386/32bit-avx512.c
4382         (create_feature_i386_32bit_avx512): Likewise.
4383         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
4384         Likewise.
4385         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
4386         Likewise.
4387         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
4388         Likewise.
4389         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
4390         Likewise.
4391         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
4392         Likewise.
4393         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
4394         Likewise.
4395         * features/i386/64bit-avx512.c
4396         (create_feature_i386_64bit_avx512): Likewise.
4397         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
4398         Likewise.
4399         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
4400         Likewise.
4401         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
4402         Likewise.
4403         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
4404         Likewise.
4405         * features/i386/64bit-segments.c
4406         (create_feature_i386_64bit_segments): Likewise.
4407         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
4408         Likewise.
4409         * features/i386/x32-core.c
4410         (create_feature_i386_x32_core): Likewise.
4411         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
4412         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
4413         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
4414         * target-descriptions.c: In generated code, don't pass xml
4415         filename.
4416
4417 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
4418
4419         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
4420         (print_xml_feature::visit_post): Likewise.
4421         (print_xml_feature::visit): Likewise.
4422         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
4423         (print_xml_feature): Add new class.
4424         * regformats/regdat.sh: Null xmltarget on feature targets.
4425         * target-descriptions.c (struct target_desc): Add xmltarget.
4426         (maintenance_check_tdesc_xml_convert): Add unittest function.
4427         (tdesc_get_features_xml): Add function to get xml.
4428         (maintenance_check_xml_descriptions): Test xml generation.
4429         * xml-tdesc.c (string_read_description_xml): Add function.
4430         * xml-tdesc.h (string_read_description_xml): Add declaration.
4431
4432 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
4433
4434         * features/Makefile: Add feature marker to targets with new style
4435         target descriptions.
4436         * regformats/aarch64.dat: Regenerate.
4437         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
4438         * regformats/i386/amd64-avx-linux.dat: Likewise.
4439         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
4440         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
4441         * regformats/i386/amd64-linux.dat: Likewise.
4442         * regformats/i386/amd64-mpx-linux.dat: Likewise.
4443         * regformats/i386/amd64.dat: Likewise.
4444         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
4445         * regformats/i386/i386-avx-linux.dat: Likewise.
4446         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
4447         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
4448         * regformats/i386/i386-linux.dat: Likewise.
4449         * regformats/i386/i386-mmx-linux.dat: Likewise.
4450         * regformats/i386/i386-mpx-linux.dat: Likewise.
4451         * regformats/i386/i386.dat: Likewise.
4452         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
4453         * regformats/i386/x32-avx-linux.dat: Likewise.
4454         * regformats/i386/x32-linux.dat: Likewise.
4455         * regformats/tic6x-c62x-linux.dat: Likewise.
4456         * regformats/tic6x-c64x-linux.dat: Likewise.
4457         * regformats/tic6x-c64xp-linux.dat: Likewise.
4458         * regformats/regdat.sh: Parse feature marker.
4459
4460 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
4461
4462         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
4463         (tdesc_osabi_name): Likewise.
4464         * target-descriptions.c (tdesc_architecture_name): Add new
4465         function.
4466         (tdesc_osabi_name): Likewise.
4467
4468 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
4469
4470         * common/tdesc.c (tdesc_predefined_type): Move to here.
4471         (tdesc_named_type): Likewise.
4472         (tdesc_create_vector): Likewise.
4473         (tdesc_create_struct): Likewise.
4474         (tdesc_set_struct_size): Likewise.
4475         (tdesc_create_union): Likewise.
4476         (tdesc_create_flags): Likewise.
4477         (tdesc_create_enum): Likewise.
4478         (tdesc_add_field): Likewise.
4479         (tdesc_add_typed_bitfield): Likewise.
4480         (tdesc_add_bitfield): Likewise.
4481         (tdesc_add_flag): Likewise.
4482         (tdesc_add_enum_value): Likewise.
4483         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
4484         (struct tdesc_type_vector): Likewise.
4485         (struct tdesc_type_field): Likewise.
4486         (struct tdesc_type_with_fields): Likewise.
4487         (tdesc_create_enum): Add declaration.
4488         (tdesc_add_typed_bitfield): Likewise.
4489         (tdesc_add_enum_value): Likewise.
4490         * target-descriptions.c (tdesc_type_field): Move from here.
4491         (tdesc_type_builtin): Likewise.
4492         (tdesc_type_vector): Likewise.
4493         (tdesc_type_with_fields): Likewise.
4494         (tdesc_predefined_types): Likewise.
4495         (tdesc_named_type): Likewise.
4496         (tdesc_create_vector): Likewise.
4497         (tdesc_create_struct): Likewise.
4498         (tdesc_set_struct_size): Likewise.
4499         (tdesc_create_union): Likewise.
4500         (tdesc_create_flags): Likewise.
4501         (tdesc_create_enum): Likewise.
4502         (tdesc_add_field): Likewise.
4503         (tdesc_add_typed_bitfield): Likewise.
4504         (tdesc_add_bitfield): Likewise.
4505         (tdesc_add_flag): Likewise.
4506         (tdesc_add_enum_value): Likewise.
4507         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
4508         (tdesc_add_typed_bitfield): Likewise.
4509         (tdesc_add_enum_value): Likewise.
4510
4511 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
4512
4513         * common/tdesc.c (tdesc_feature::accept): Move to here.
4514         (tdesc_feature::operator==): Likewise.
4515         (tdesc_create_reg): Likewise.
4516         * common/tdesc.h (tdesc_type_kind): Likewise.
4517         (struct tdesc_type): Likewise.
4518         (struct tdesc_feature): Likewise.
4519         * regformats/regdat.sh: Create a feature.
4520         * target-descriptions.c (tdesc_type_kind): Move from here.
4521         (tdesc_type): Likewise.
4522         (tdesc_type_up): Likewise.
4523         (tdesc_feature): Likewise.
4524         (tdesc_create_reg): Likewise.
4525
4526 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
4527
4528         * Makefile.in: Add arch/tdesc.c
4529         * common/tdesc.c: New file.
4530         * common/tdesc.h (tdesc_element_visitor): Move to here.
4531         (tdesc_element): Likewise.
4532         (tdesc_reg): Likewise.
4533         (tdesc_reg_up): Likewise.
4534         * regformats/regdef.h (reg): Add offset to constructors.
4535         * target-descriptions.c (tdesc_element_visitor): Move from here.
4536         (tdesc_element): Likewise.
4537         (tdesc_reg): Likewise.
4538         (tdesc_reg_up): Likewise.
4539
4540 2018-04-17  Tom Tromey  <tom@tromey.com>
4541
4542         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
4543         discriminant field.
4544
4545 2018-04-17  Tom Tromey  <tom@tromey.com>
4546
4547         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
4548
4549 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4550
4551         * symtab.c (print_symbol_info): Skip printing filename and line
4552         number when `last' is NULL.
4553         (symtab_symbol_info): Use empty string instead of NULL for first
4554         invocation of print_symbol_info.
4555         (rbreak_command): Pass NULL to `last' parameter of
4556         print_symbol_info.
4557
4558 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
4559
4560         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
4561         instead of nullptr.
4562
4563 2018-04-16  Pedro Alves  <palves@redhat.com>
4564
4565         * MAINTAINERS (sh): Remove.
4566         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
4567         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
4568         (ALLDEPFILES): Remove sh64-tdep.c.
4569         * NEWS: Mentions that support for SH-5/SH64 is removed.
4570         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
4571         (sh*-*-openbsd*): Ditto.
4572         (sh64-*-elf*): Remove.
4573         (sh*): Remove.
4574         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
4575         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
4576         * sh-tdep.c: No longer include "sh64-tdep.h".
4577         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
4578         * sh64-tdep.c, sh64-tdep.h: Remove files.
4579
4580 2018-04-16  Pedro Alves  <palves@redhat.com>
4581
4582         * MAINTAINERS: Remove m88k.
4583         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
4584         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
4585         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
4586         * NEWS: Mention that support for m88k was removed.
4587         * configure.host (m88*-*-*): Remove support.
4588         * configure.nat (m88k-*-*): Remove support.
4589         * configure.tgt (m88*-*-openbsd*): Remove.
4590         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
4591
4592 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
4593
4594         * configure.tgt (x86_tobjs): New variable.
4595         (amd64_tobjs, i386_tobjs): Use it.
4596
4597 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4598
4599         * symtab.c (print_symbol_info): Precede the symbol definition by
4600         the line number when available.
4601         * NEWS: Advertise this enhancement.
4602
4603 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
4604
4605         * NEWS (New options): announce set/show record btrace cpu.
4606         * btrace.c: Include record-btrace.h.
4607         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
4608         the vendor is unknown.
4609         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
4610         Maybe overwrite the btrace configuration's cpu.
4611         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
4612         (btrace_fetch): Add cpu parameter.  Update callers.
4613         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
4614         Maybe overwrite the btrace configuration's cpu.  Skip enabling
4615         errata workarounds if the vendor is unknown.
4616         * python/py-record-btrace.c: Include record-btrace.h.
4617         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
4618         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
4619         * record-btrace.c (record_btrace_cpu_state_kind): New.
4620         (record_btrace_cpu): New.
4621         (set_record_btrace_cpu_cmdlist): New.
4622         (record_btrace_get_cpu): New.
4623         (require_btrace_thread, record_btrace_info)
4624         (record_btrace_resume_thread): Call record_btrace_get_cpu.
4625         (cmd_set_record_btrace_cpu_none): New.
4626         (cmd_set_record_btrace_cpu_auto): New.
4627         (cmd_set_record_btrace_cpu): New.
4628         (cmd_show_record_btrace_cpu): New.
4629         (_initialize_record_btrace): Initialize set/show record btrace cpu
4630         commands.
4631         * record-btrace.h (record_btrace_get_cpu): New.
4632
4633 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
4634
4635         * record.c (set_record_command): Fix typo in message.
4636
4637 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
4638
4639         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
4640
4641 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
4642
4643         * infrun.c (process_event_stop_test): Call
4644         gdbarch_in_indirect_branch_thunk.
4645         * gdbarch.sh (in_indirect_branch_thunk): New.
4646         * gdbarch.c: Regenerated.
4647         * gdbarch.h: Regenerated.
4648         * x86-tdep.h: New.
4649         * x86-tdep.c: New.
4650         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
4651         (HFILES_NO_SRCDIR): Add x86-tdep.h.
4652         (ALLDEPFILES): Add x86-tdep.c.
4653         * arch-utils.h (default_in_indirect_branch_thunk): New.
4654         * arch-utils.c (default_in_indirect_branch_thunk): New.
4655         * i386-tdep: Include x86-tdep.h.
4656         (i386_in_indirect_branch_thunk): New.
4657         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
4658         function.
4659         * amd64-tdep: Include x86-tdep.h.
4660         (amd64_in_indirect_branch_thunk): New.
4661         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
4662
4663 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
4664
4665         PR gdb/23053
4666         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
4667         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
4668         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
4669         regression.
4670
4671 2018-04-12  Tom Tromey  <tom@tromey.com>
4672
4673         * rust-lang.c (rust_print_struct_def): Remove univariant code.
4674         (rust_evaluate_subexp): Likewise.
4675
4676 2018-04-12  Pedro Alves  <palves@redhat.com>
4677
4678         * procfs.c (procfs_detach): Make forward declaration's prototype
4679         match definition's protototype.
4680         (proc_get_LDT_entry): Remove stale do_cleanups call.
4681
4682 2018-04-12  Pedro Alves  <palves@redhat.com>
4683
4684         * target.h (target_ops::to_has_exited): Delete.
4685         (target_has_exited): Delete.
4686         * target-delegates.c: Regenerate.
4687
4688 2018-04-11  Pedro Alves  <palves@redhat.com>
4689
4690         * target.c (fileio_fh_t::t): Add comment.
4691         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
4692         (target_fileio_close): Handle a NULL target.
4693         (invalidate_fileio_fh): New.
4694         (target_close): Call it.
4695         * remote.c (remote_hostio_send_command): No longer check whether
4696         remote_desc is open.
4697
4698 2018-04-11  Pedro Alves  <palves@redhat.com>
4699
4700         * target.c (fileio_fh_t): Make it a named struct instead of a
4701         typedef.
4702         (fileio_fh_t::is_closed): New method.
4703         (DEF_VEC_O (fileio_fh_t)): Remove.
4704         (fileio_fhandles): Now a std::vector.
4705         (is_closed_fileio_fh): Delete.
4706         (acquire_fileio_fd): Adjust.  Rename parameters.
4707         (release_fileio_fd): Adjust.
4708         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
4709         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
4710         (target_fileio_close): Adjust.
4711
4712 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
4713
4714         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
4715         index.
4716
4717 2018-04-10  Pedro Alves  <palves@redhat.com>
4718
4719         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
4720         (scoped_finish_thread_state): New class.
4721         * infcmd.c (run_command_1): Use it instead of finish_thread_state
4722         cleanup.
4723         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
4724         (fetch_inferior_event, normal_stop): Likewise.
4725         * thread.c (finish_thread_state_cleanup): Delete.
4726
4727 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
4728             Pedro Alves  <palves@redhat.com>
4729
4730         * value.c: Include "selftest.h" and "common/array-view.h".
4731         (struct range) <operator ==>: New.
4732         (test_ranges_contain): New.
4733         (check_ranges_vector): New.
4734         (test_insert_into_bit_range_vector): New.
4735         (_initialize_values): Register selftests.
4736         * common/array-view.h (operator==, operator!=): New.
4737
4738 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
4739
4740         * common/gdb_vecs.h (unordered_remove): Add overload that takes
4741         an iterator.
4742         * inline-frame.c: Include <algorithm>.
4743         (struct inline_state): Add constructor.
4744         (inline_state_s): Remove.
4745         (DEF_VEC_O(inline_state_s)): Remove.
4746         (inline_states): Change type to std::vector.
4747         (find_inline_frame_state): Adjust to std::vector.
4748         (allocate_inline_frame_state): Remove.
4749         (clear_inline_frame_state): Adjust to std::vector.
4750         (skip_inline_frames): Adjust to std::vector.
4751
4752 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
4753
4754         * tracepoint.h (struct trace_state_variable): Add constructor.
4755         <name>: Change type to std::string.
4756         * tracepoint.c (tsv_s): Remove.
4757         (DEF_VEC_O(tsv_s)): Remove.
4758         (tvariables): Change to std::vector.
4759         (create_trace_state_variable): Adjust to std::vector.
4760         (find_trace_state_variable): Likewise.
4761         (find_trace_state_variable_by_number): Likewise.
4762         (delete_trace_state_variable): Likewise.
4763         (trace_variable_command): Adjust to std::string.
4764         (delete_trace_variable_command): Likewise.
4765         (tvariables_info_1): Adjust to std::vector.
4766         (save_trace_state_variables): Likewise.
4767         (start_tracing): Likewise.
4768         (merge_uploaded_trace_state_variables): Adjust to std::vector
4769         and std::string.
4770         * target.h (struct target_ops)
4771         <to_download_trace_state_variable>: Pass reference to
4772         trace_state_variable.
4773         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
4774         * target-delegates.c: Re-generate.
4775         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
4776         (mi_tsv_deleted): Likewise.
4777         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
4778         * remote.c (remote_download_trace_state_variable): Change
4779         pointer to reference and adjust.
4780         * make-target-delegates (parse_argtypes): Handle references.
4781         (write_function_header): Likewise.
4782         (munge_type): Likewise.
4783
4784 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
4785
4786         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4787         string_view-selftests.c.
4788         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
4789         testsuite.
4790         * unittests/basic_string_view/cons/char/1.cc: Likewise.
4791         * unittests/basic_string_view/cons/char/2.cc: Likewise.
4792         * unittests/basic_string_view/cons/char/3.cc: Likewise.
4793         * unittests/basic_string_view/element_access/char/1.cc:
4794         Likewise.
4795         * unittests/basic_string_view/element_access/char/empty.cc:
4796         Likewise.
4797         * unittests/basic_string_view/element_access/char/front_back.cc:
4798         Likewise.
4799         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
4800         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
4801         Likewise.
4802         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
4803         Likewise.
4804         * unittests/basic_string_view/modifiers/swap/char/1.cc:
4805         Likewise.
4806         * unittests/basic_string_view/operations/compare/char/1.cc:
4807         Likewise.
4808         * unittests/basic_string_view/operations/compare/char/13650.cc:
4809         Likewise.
4810         * unittests/basic_string_view/operations/copy/char/1.cc:
4811         Likewise.
4812         * unittests/basic_string_view/operations/data/char/1.cc:
4813         Likewise.
4814         * unittests/basic_string_view/operations/find/char/1.cc:
4815         Likewise.
4816         * unittests/basic_string_view/operations/find/char/2.cc:
4817         Likewise.
4818         * unittests/basic_string_view/operations/find/char/3.cc:
4819         Likewise.
4820         * unittests/basic_string_view/operations/find/char/4.cc:
4821         Likewise.
4822         * unittests/basic_string_view/operations/rfind/char/1.cc:
4823         Likewise.
4824         * unittests/basic_string_view/operations/rfind/char/2.cc:
4825         Likewise.
4826         * unittests/basic_string_view/operations/rfind/char/3.cc:
4827         Likewise.
4828         * unittests/basic_string_view/operations/substr/char/1.cc:
4829         Likewise.
4830         * unittests/basic_string_view/operators/char/2.cc: Likewise.
4831         * unittests/string_view-selftests.c: New file.
4832
4833 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
4834
4835         * unittests/basic_string_view/capacity/1.cc: New file.
4836         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
4837         * unittests/basic_string_view/cons/char/1.cc: New file.
4838         * unittests/basic_string_view/cons/char/2.cc: New file.
4839         * unittests/basic_string_view/cons/char/3.cc: New file.
4840         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
4841         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
4842         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
4843         * unittests/basic_string_view/element_access/char/1.cc: New file.
4844         * unittests/basic_string_view/element_access/char/2.cc: New file.
4845         * unittests/basic_string_view/element_access/char/empty.cc: New file.
4846         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
4847         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
4848         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
4849         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
4850         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
4851         * unittests/basic_string_view/include.cc: New file.
4852         * unittests/basic_string_view/inserters/char/1.cc: New file.
4853         * unittests/basic_string_view/inserters/char/2.cc: New file.
4854         * unittests/basic_string_view/inserters/char/3.cc: New file.
4855         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
4856         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
4857         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
4858         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
4859         * unittests/basic_string_view/literals/types.cc: New file.
4860         * unittests/basic_string_view/literals/values.cc: New file.
4861         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
4862         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
4863         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
4864         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
4865         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
4866         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
4867         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
4868         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
4869         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
4870         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
4871         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
4872         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
4873         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
4874         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
4875         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
4876         * unittests/basic_string_view/operations/data/char/1.cc: New file.
4877         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
4878         * unittests/basic_string_view/operations/find/char/1.cc: New file.
4879         * unittests/basic_string_view/operations/find/char/2.cc: New file.
4880         * unittests/basic_string_view/operations/find/char/3.cc: New file.
4881         * unittests/basic_string_view/operations/find/char/4.cc: New file.
4882         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
4883         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
4884         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
4885         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
4886         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
4887         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
4888         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
4889         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
4890         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
4891         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
4892         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
4893         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
4894         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
4895         * unittests/basic_string_view/operators/char/2.cc: New file.
4896         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
4897         * unittests/basic_string_view/range_access/char/1.cc: New file.
4898         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
4899         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
4900         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
4901         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
4902         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
4903         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
4904         * unittests/basic_string_view/requirements/typedefs.cc: New file.
4905         * unittests/basic_string_view/typedefs.cc: New file.
4906         * unittests/basic_string_view/types/1.cc: New file.
4907
4908 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
4909
4910         * common/gdb_string_view.h: Remove libstdc++ implementation
4911         details, adjust to gdb reality.
4912         * common/gdb_string_view.tcc: Likewise.
4913         * cli/cli-script.c (struct string_view): Remove.
4914         (user_args) <m_args>: Change element type to gdb::string_view.
4915         (user_args::insert_args): Adjust.
4916
4917 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
4918
4919         * common/gdb_string_view.h: New file.
4920         * common/gdb_string_view.tcc: New file.
4921
4922 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
4923
4924         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
4925         * configure: Re-generate.
4926
4927 2018-04-09  Pedro Alves  <palves@redhat.com>
4928
4929         * gdbarch.sh: Include "observable.h" instead of "observer.h".
4930         (set_target_gdbarch): Call
4931         gdb::observers::architecture_changed.notify instead of
4932         observer_notify_architecture_changed.
4933
4934 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
4935
4936         * tracepoint.c (struct current_traceframe_cleanup): Remove.
4937         (do_restore_current_traceframe_cleanup): Remove.
4938         (restore_current_traceframe_cleanup_dtor): Remove.
4939         (make_cleanup_restore_current_traceframe): Remove.
4940         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
4941         New.
4942         * tracepoint.h (struct scoped_restore_current_traceframe): New.
4943         * infrun.c (fetch_inferior_event): Use
4944         scoped_restore_current_traceframe.
4945
4946 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
4947
4948         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
4949         Remove.
4950         <n_allocated_type_units>: Remove.
4951         <all_type_units>: Change to std::vector.
4952         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4953         to std::vector change.
4954         (dwarf2_per_objfile::get_cutu): Likewise.
4955         (dwarf2_per_objfile::get_tu): Likewise.
4956         (create_signatured_type_table_from_index): Likewise.
4957         (create_signatured_type_table_from_debug_names): Likewise.
4958         (dw2_symtab_iter_next): Likewise.
4959         (dw2_print_stats): Likewise.
4960         (dw2_expand_all_symtabs): Likewise.
4961         (dw2_expand_marked_cus): Likewise.
4962         (dw2_debug_names_iterator::next): Likewise.
4963         (dwarf2_initialize_objfile): Likewise.
4964         (add_signatured_type_cu_to_table): Likewise.
4965         (create_all_type_units): Likewise.
4966         (add_type_unit): Likewise.
4967         (struct tu_abbrev_offset): Add constructor.
4968         (build_type_psymtabs_1): Adjust to std::vector change.
4969         (print_tu_stats): Likewise.
4970         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4971         (write_debug_names): Likewise.
4972
4973 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
4974
4975         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
4976         Make an std::vector.
4977         <n_comp_units>: Remove.
4978         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4979         to std::vector change.
4980         (dwarf2_per_objfile::get_cutu): Likewise.
4981         (dwarf2_per_objfile::get_cu): Likewise.
4982         (create_cus_from_index): Likewise.
4983         (create_addrmap_from_index): Likewise.
4984         (create_addrmap_from_aranges): Likewise.
4985         (dwarf2_read_index): Likewise.
4986         (dw2_find_last_source_symtab): Likewise.
4987         (dw2_map_symtabs_matching_filename): Likewise.
4988         (dw2_symtab_iter_next): Likewise.
4989         (dw2_print_stats): Likewise.
4990         (dw2_expand_all_symtabs): Likewise.
4991         (dw2_expand_symtabs_with_fullname): Likewise.
4992         (dw2_expand_marked_cus): Likewise.
4993         (dw2_map_symbol_filenames): Likewise.
4994         (create_cus_from_debug_names): Likewise.
4995         (dwarf2_read_debug_names): Likewise.
4996         (dw2_debug_names_iterator::next): Likewise.
4997         (dwarf2_initialize_objfile): Likewise.
4998         (set_partial_user): Likewise.
4999         (dwarf2_build_psymtabs_hard): Likewise.
5000         (read_comp_units_from_section): Remove arguments, adjust to
5001         std::vector change.
5002         (create_all_comp_units): Adjust to std::vector and
5003         read_comp_units_from_section changes.
5004         (dwarf2_find_containing_comp_unit): Adjust to std::vector
5005         change.
5006         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5007         (psyms_seen_size): Likewise.
5008         (write_gdbindex): Likewise.
5009         (write_debug_names): Likewise.
5010
5011 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
5012
5013         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
5014         with dwarf2_per_objfile.
5015         (create_cus_from_index): Likewise.
5016         (create_signatured_type_table_from_index): Likewise.
5017         (dwarf2_read_index): Likewise.
5018         (dwarf2_initialize_objfile): Likewise.
5019         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
5020         per_cu rather than get_dwarf2_per_objfile.
5021
5022 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
5023
5024         * dwarf2read.h (struct signatured_type): Forward declare.
5025         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
5026         New methods.
5027         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
5028         (dw2_get_cutu): ...this.
5029         (dwarf2_per_objfile::get_cu): Rename from...
5030         (dw2_get_cu): ...this.
5031         (dwarf2_per_objfile::get_tu): New.
5032         (create_addrmap_from_index): Adjust.
5033         (create_addrmap_from_aranges): Adjust.
5034         (dw2_find_last_source_symtab): Adjust.
5035         (dw2_map_symtabs_matching_filename): Adjust.
5036         (dw2_symtab_iter_next): Adjust.
5037         (dw2_print_stats): Adjust.
5038         (dw2_expand_all_symtabs): Adjust.
5039         (dw2_expand_symtabs_with_fullname): Adjust.
5040         (dw2_expand_marked_cus): Adjust.
5041         (dw_expand_symtabs_matching_file_matcher): Adjust.
5042         (dw2_map_symbol_filenames): Adjust.
5043         (dw2_debug_names_iterator::next): Adjust.
5044         (dwarf2_initialize_objfile): Adjust.
5045         (set_partial_user): Adjust.
5046         (dwarf2_build_psymtabs_hard): Adjust.
5047
5048 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
5049
5050         * dwarf2read.c (create_signatured_type_table_from_debug_names):
5051         Remove unused variables.
5052         (dw2_map_symtabs_matching_filename): Likewise.
5053         (dwarf2_record_block_ranges): Likewise.
5054         (dwarf2_read_addr_index): Likewise.
5055         (follow_die_offset): Likewise.
5056
5057 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
5058
5059         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
5060         to symbol_file_add_main.
5061
5062 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
5063
5064         PR mi/22299
5065         * mi/mi-console.c (do_fputc_async_safe): New.
5066         (mi_console_file::write_async_safe): New.
5067         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
5068         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
5069         New.
5070         * ui-file.c (ui_file::putstrn): Adjust call to
5071         fputstrn_unfiltered.
5072         * utils.c (printchar): Replace do_fputs and do_fprintf
5073         parameters by do_fputc.
5074         (fputstr_filtered): Adjust call to printchar.
5075         (fputstr_unfiltered): Likewise.
5076         (fputstrn_filtered): Likewise.
5077         (fputstrn_unfiltered): Add do_fputc parameter, pass to
5078         printchar.
5079         * utils.h (do_fputc_ftype): New typedef.
5080         (fputstrn_unfiltered): Add do_fputc parameter.
5081
5082 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
5083
5084         * regformats/i386/i386-avx.dat: Remove.
5085
5086 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
5087
5088         PR gdb/22979
5089         * amd64-tdep.c (amd64_none_init_abi): New function.
5090         (amd64_x32_none_init_abi): New function.
5091         (_initialize_amd64_tdep): Register handlers for x86-64 and
5092         x64_32 with GDB_OSABI_NONE.
5093         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
5094         GDB_OSABI_NONE osabi.
5095
5096 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
5097
5098         PR gdb/22980
5099         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
5100         GDB_OSABI_NONE.
5101         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
5102         * osabi.c (gdb_osabi_names): Add "unknown" entry.
5103
5104 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
5105
5106         * common/byte-vector.h (char_vector): New type.
5107         * target.h (target_read_alloc): Return
5108         gdb::optional<byte_vector>.
5109         (target_read_stralloc): Return gdb::optional<char_vector>.
5110         (target_get_osdata): Return gdb::optional<char_vector>.
5111         * target.c (target_read_alloc_1): Templatize.  Replacement
5112         manual memory management with vector.
5113         (target_read_alloc): Change return type, adjust.
5114         (target_read_stralloc): Change return type, adjust.
5115         (target_get_osdata): Change return type, adjust.
5116         * auxv.c (struct auxv_info) <length>: Remove.
5117         <data>: Change type to gdb::optional<byte_vector>.
5118         (auxv_inferior_data_cleanup): Free auxv_info with delete.
5119         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
5120         (target_auxv_search): Adjust.
5121         (fprint_target_auxv): Adjust.
5122         * avr-tdep.c (avr_io_reg_read_command): Adjust.
5123         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
5124         (linux_make_corefile_notes): Adjust.
5125         * osdata.c (get_osdata): Adjust.
5126         * remote.c (remote_get_threads_with_qxfer): Adjust.
5127         (remote_memory_map): Adjust.
5128         (remote_traceframe_info): Adjust.
5129         (btrace_read_config): Adjust.
5130         (remote_read_btrace): Adjust.
5131         (remote_pid_to_exec_file): Adjust.
5132         * solib-aix.c (solib_aix_get_library_list): Adjust.
5133         * solib-dsbt.c (decode_loadmap): Don't free buf.
5134         (dsbt_get_initial_loadmaps): Adjust.
5135         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
5136         * solib-target.c (solib_target_current_sos): Adjust.
5137         * tracepoint.c (sdata_make_value): Adjust.
5138         * xml-support.c (xinclude_start_include): Adjust.
5139         (xml_fetch_content_from_file): Adjust.
5140         * xml-support.h (xml_fetch_another): Change return type.
5141         (xml_fetch_content_from_file): Change return type.
5142         * xml-syscall.c (xml_init_syscalls_info): Adjust.
5143         * xml-tdesc.c (file_read_description_xml): Adjust.
5144         (fetch_available_features_from_target): Change return type.
5145         (target_fetch_description_xml): Adjust.
5146         (target_read_description_xml): Adjust.
5147
5148 2018-04-06  Tom Tromey  <tom@tromey.com>
5149
5150         * value.c (~value): Update.
5151         (struct value) <contents>: Now unique_xmalloc_ptr.
5152         (value_contents_bits_eq, allocate_value_contents)
5153         (value_contents_raw, value_contents_all_raw)
5154         (value_contents_for_printing, value_contents_for_printing_const)
5155         (set_value_enclosing_type): Update.
5156
5157 2018-04-06  Tom Tromey  <tom@tromey.com>
5158
5159         * value.c (range_s): Remove typedef, VEC.
5160         (struct range): Add operator<.
5161         (range_lessthan): Remove.
5162         (ranges_contain): Change type.
5163         (~value): Update.
5164         (struct value) <unavailable, optimized_out>: Now std::vector.
5165         (value_entirely_available)
5166         (value_entirely_covered_by_range_vector)
5167         (value_entirely_unavailable, value_entirely_optimized_out):
5168         Update.
5169         (insert_into_bit_range_vector): Change argument type.
5170         (find_first_range_overlap): Likewise.
5171         (struct ranges_and_idx, value_contents_bits_eq)
5172         (require_not_optimized_out, require_available): Update.
5173         (ranges_copy_adjusted): Change argument types.
5174         (value_optimized_out, value_copy, value_fetch_lazy): Update.
5175
5176 2018-04-06  Tom Tromey  <tom@tromey.com>
5177
5178         * value.c (~value): Update.
5179         (struct value) <parent>: Now a value_ref_ptr.
5180         (value_parent, set_value_parent, value_address, value_copy):
5181         Update.
5182
5183 2018-04-06  Tom Tromey  <tom@tromey.com>
5184
5185         * value.c (struct value): Add constructor, destructor, and member
5186         initializers.
5187         (allocate_value_lazy, value_decref): Update.
5188
5189 2018-04-06  Tom Tromey  <tom@tromey.com>
5190
5191         * value.c (struct value) <released, next>: Remove.
5192         (all_values): Now a std::vector.
5193         (allocate_value_lazy): Update.
5194         (value_next): Remove.
5195         (value_mark, value_free_to_mark, release_value)
5196         (value_release_to_mark): Update.
5197
5198 2018-04-06  Tom Tromey  <tom@tromey.com>
5199
5200         * value.h (fetch_subexp_value, value_release_to_mark): Update.
5201         (free_value_chain): Remove.
5202         * value.c (free_value_chain): Remove.
5203         (value_release_to_mark): Return a std::vector.
5204         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
5205         std::vector.
5206         (check_condition): Update.
5207         * eval.c (fetch_subexp_value): Change "val_chain" to a
5208         std::vector.
5209         * breakpoint.c (update_watchpoint): Update.
5210         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
5211
5212 2018-04-06  Tom Tromey  <tom@tromey.com>
5213
5214         * value.h (free_all_values): Remove.
5215         * value.c (free_all_values): Remove.
5216
5217 2018-04-06  Tom Tromey  <tom@tromey.com>
5218
5219         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
5220         (value_history_chain, value_history_count): Remove.
5221         (value_history): New global.
5222         (record_latest_value, access_value_history, show_values)
5223         (preserve_values): Update.
5224
5225 2018-04-06  Tom Tromey  <tom@tromey.com>
5226
5227         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
5228         * varobj.c (varobj_set_display_format, varobj_set_value)
5229         (install_default_visualizer, construct_visualizer)
5230         (install_new_value, ~varobj, varobj_get_value_type)
5231         (my_value_of_variable, varobj_editable_p): Update.
5232         * c-varobj.c (c_describe_child, c_value_of_variable)
5233         (cplus_number_of_children, cplus_describe_child): Update.
5234         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
5235         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
5236         (ada_value_of_variable, ada_value_is_changeable_p): Update.
5237
5238 2018-04-06  Tom Tromey  <tom@tromey.com>
5239
5240         * printcmd.c (last_examine_address): Change type to
5241         value_ref_ptr.
5242         (do_examine, x_command): Update.
5243
5244 2018-04-06  Tom Tromey  <tom@tromey.com>
5245
5246         * value.c (release_value): Update.
5247         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
5248         (struct bpstats) <val>: Now a value_ref_ptr.
5249         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5250         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5251         (~watchpoint, print_it_watchpoint, watch_command_1)
5252         (invalidate_bp_value_on_memory_change): Update.
5253
5254 2018-04-06  Tom Tromey  <tom@tromey.com>
5255
5256         * varobj.c (varobj_clear_saved_item)
5257         (update_dynamic_varobj_children, install_new_value, ~varobj):
5258         Update.
5259         * value.h (value_incref): Move declaration earlier.
5260         (value_decref): Rename from value_free.
5261         (struct value_ref_policy): New.
5262         (value_ref_ptr): New typedef.
5263         (struct value_deleter): Remove.
5264         (gdb_value_up): Remove typedef.
5265         (release_value): Change return type.
5266         (release_value_or_incref): Remove.
5267         * value.c (set_value_parent): Update.
5268         (value_incref): Change return type.
5269         (value_decref): Rename from value_free.
5270         (value_free_to_mark, free_all_values, free_value_chain): Update.
5271         (release_value): Return value_ref_ptr.
5272         (release_value_or_incref): Remove.
5273         (record_latest_value, set_internalvar, clear_internalvar):
5274         Update.
5275         * stack.c (info_frame_command): Don't call value_free.
5276         * python/py-value.c (valpy_dealloc, valpy_new)
5277         (value_to_value_object): Update.
5278         * printcmd.c (do_examine): Update.
5279         * opencl-lang.c (lval_func_free_closure): Update.
5280         * mi/mi-main.c (register_changed_p): Don't call value_free.
5281         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
5282         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
5283         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
5284         value_free.
5285         * guile/scm-value.c (vlscm_free_value_smob)
5286         (vlscm_scm_from_value): Update.
5287         * frame.c (frame_register_unwind, frame_unwind_register_signed)
5288         (frame_unwind_register_unsigned, get_frame_register_bytes)
5289         (put_frame_register_bytes): Don't call value_free.
5290         * findvar.c (address_from_register): Don't call value_free.
5291         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
5292         * dwarf2loc.c (entry_data_value_free_closure)
5293         (value_of_dwarf_reg_entry, free_pieced_value_closure)
5294         (dwarf2_evaluate_loc_desc_full): Update.
5295         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5296         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5297         (~watchpoint, watch_command_1)
5298         (invalidate_bp_value_on_memory_change): Update.
5299         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
5300
5301 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
5302
5303         PR gdb/23022
5304         * warning.m4: Add -Wno-error=deprecated-register.
5305         * configure: Re-generate.
5306
5307 2018-04-05  Tom Tromey  <tom@tromey.com>
5308
5309         * linespec.h: Remove include of "vec.h".
5310
5311 2018-04-05  Tom Tromey  <tom@tromey.com>
5312
5313         * linespec.c (typep): Remove typedef.
5314         (find_methods, find_superclass_methods): Take a std::vector.
5315         (find_method): Use std::vector.
5316
5317 2018-04-05  Tom Tromey  <tom@tromey.com>
5318
5319         * utils.c (compare_strings): Remove.
5320         * utils.h (compare_strings): Remove.
5321         * objc-lang.h (find_imps): Update.
5322         * objc-lang.c (find_methods): Take a std::vector.
5323         (uniquify_strings, find_imps): Likewise.
5324         * linespec.c (find_methods): Take a std::vector.
5325         (decode_objc): Use std::vector.
5326         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
5327         a std::vector.
5328         (find_method, find_function_symbols): Use std::vector.
5329
5330 2018-04-05  Tom Tromey  <tom@tromey.com>
5331
5332         * completer.c (completion_tracker::completion_tracker): Remove
5333         cast.
5334         (completion_tracker::discard_completions): Likewise.
5335         * breakpoint.c (ambiguous_names_p): Remove cast.
5336         * ada-lang.c (_initialize_ada_language): Remove cast.
5337         * utils.h (streq): Update.
5338         (streq_hash): Add new declaration.
5339         * utils.c (streq): Return bool.
5340         (streq_hash): New function.
5341
5342 2018-04-05  Tom Tromey  <tom@tromey.com>
5343
5344         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
5345         Remove a string copy.
5346
5347 2018-04-05  Tom Tromey  <tom@tromey.com>
5348
5349         * linespec.c (filter_results): Use std::vector.
5350         (decode_line_2, decode_line_full): Update.
5351
5352 2018-04-05  Tom Tromey  <tom@tromey.com>
5353
5354         * linespec.c (canonical_to_fullform): Return std::string.
5355         (filter_results): Update.
5356         (struct decode_line_2_item): Add constructor.
5357         <fullform, displayform>: Now std::string.
5358         (decode_line_2_compare_items): Now a std::sort comparator.
5359         (decode_line_2): Update.
5360
5361 2018-04-05  Tom Tromey  <tom@tromey.com>
5362
5363         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
5364         (unexpected_linespec_error): Update.
5365         (linespec_parse_basic, parse_linespec): Update.
5366
5367 2018-04-05  Tom Tromey  <tom@tromey.com>
5368
5369         * linespec.c (linespec_parse_basic): Reindent.
5370
5371 2018-04-05  Tom Tromey  <tom@tromey.com>
5372
5373         * minsyms.h (iterate_over_minimal_symbols): Update.
5374         * minsyms.c (iterate_over_minimal_symbols): Take a
5375         gdb::function_view.
5376         * linespec.c (struct collect_minsyms): Remove.
5377         (compare_msyms): Now a std::sort comparator.
5378         (add_minsym): Add parameters.
5379         (search_minsyms_for_name): Update.  Use std::vector.
5380
5381 2018-04-03  Tom Tromey  <tom@tromey.com>
5382
5383         * mipsread.c (read_alphacoff_dynamic_symtab): Use
5384         gdb::byte_vector.
5385
5386 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
5387
5388         * MAINTAINERS (Write After Approval): Add Weimin Pan.
5389
5390 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
5391
5392         PR gdb/16959
5393         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
5394         printing static type.
5395
5396 2018-04-01  Tom Tromey  <tom@tromey.com>
5397
5398         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
5399         (rs6000_xfer_shared_libraries): Update.
5400
5401 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
5402
5403         * common/gdb_vecs.h (char_ptr): Remove.
5404         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
5405
5406 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
5407
5408         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
5409         with std::vector.
5410         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
5411
5412 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
5413
5414         * tracepoint.h (struct uploaded_tp): Initialize fields.
5415         <actions, step_actions, cmd_strings>: Change type to
5416         std::vector<char *>.
5417         * tracepoint.c (get_uploaded_tp): Allocate with new.
5418         (free_uploaded_tps): Free with delete.
5419         (parse_tracepoint_definition): Adjust to std::vector change.
5420         * breakpoint.c (read_uploaded_action): Likewise.
5421         (create_tracepoint_from_upload): Likewise.
5422         * ctf.c (ctf_write_uploaded_tp): Likewise.
5423         (SET_ARRAY_FIELD): Likewise.
5424         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
5425
5426 2018-03-30  Tom Tromey  <tom@tromey.com>
5427
5428         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
5429         std::unique_ptr.
5430         (svr4_keep_data_in_core): Update.
5431         (svr4_read_so_list): Update.
5432
5433 2018-03-30  Tom Tromey  <tom@tromey.com>
5434
5435         * windows-nat.c (handle_output_debug_string, handle_exception):
5436         Update.
5437         * target.h (target_read_string): Update.
5438         * target.c (target_read_string): Change "string" to
5439         unique_xmalloc_ptr.
5440         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
5441         Update.
5442         * solib-frv.c (frv_current_sos): Update.
5443         * solib-dsbt.c (dsbt_current_sos): Update.
5444         * solib-darwin.c (darwin_current_sos): Update.
5445         * linux-thread-db.c (inferior_has_bug): Update.
5446         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
5447         Update.  Remove alloca.
5448         * ada-lang.c (ada_main_name): Update.
5449
5450 2018-03-30  Tom Tromey  <tom@tromey.com>
5451
5452         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
5453         (struct dwo_file_deleter): New.
5454         (dwo_file_up): New typedef.
5455         (open_and_init_dwo_file): Use dwo_file_up.
5456         (free_dwo_file_cleanup): Remove.
5457
5458 2018-03-30  Tom Tromey  <tom@tromey.com>
5459
5460         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
5461         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
5462
5463 2018-03-30  Tom Tromey  <tom@tromey.com>
5464
5465         * dwarf2read.c (class free_cached_comp_units): New class.
5466         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
5467         (free_cached_comp_units): Remove function.
5468
5469 2018-03-30  Tom Tromey  <tom@tromey.com>
5470
5471         * utils.h (make_cleanup_unpush_target): Remove.
5472         * inf-ptrace.c (struct target_unpusher): New.
5473         (target_unpush_up) New typedef.
5474         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
5475         target_unpush_up.
5476         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
5477
5478 2018-03-27  Tom Tromey  <tom@tromey.com>
5479
5480         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
5481
5482 2018-03-27  Pedro Alves  <palves@redhat.com>
5483             Tom Tromey  <tom@tromey.com>
5484
5485         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
5486         destructor.  Now a class.
5487         (gdb_readline_wrapper_cleanup): Remove function.
5488         (gdb_readline_wrapper): Remove cleanups.
5489
5490 2018-03-27  Tom Tromey  <tom@tromey.com>
5491
5492         * typeprint.h (struct type_print_options) <local_typedefs,
5493         global_typedefs>: Remove "struct" keyword.
5494         (class typedef_hash_table): New class.
5495         (recursively_update_typedef_hash, add_template_parameters)
5496         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
5497         (find_typedef_in_hash): Don't declare.
5498         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
5499         (typedef_hash_table::recursively_update): Rename from
5500         recursively_update_typedef_hash.  Now a member.
5501         (typedef_hash_table::add_template_parameters): Rename from
5502         add_template_parameters.  Now a member.
5503         (typedef_hash_table::typedef_hash_table): Now a constructor;
5504         rename from create_typedef_hash.
5505         (typedef_hash_table::~typedef_hash_table): Now a destructor;
5506         rename from free_typedef_hash.
5507         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
5508         (do_free_global_table): Remove.
5509         (typedef_hash_table::typedef_hash_table): New constructor; renamed
5510         from copy_type_recursive.
5511         (create_global_typedef_table): Remove.
5512         (typedef_hash_table::find_global_typedef): Now a member of
5513         typedef_hash_table.
5514         (typedef_hash_table::find_typedef): Rename from
5515         find_typedef_in_hash; now a member.
5516         (whatis_exp): Update.
5517         * extension.h (struct ext_lang_type_printers): Add constructor and
5518         destructor.
5519         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
5520         declare.
5521         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
5522         Now a constructor; rename from start_ext_lang_type_printers.
5523         (ext_lang_type_printers): Now a destructor; rename from
5524         free_ext_lang_type_printers.
5525         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
5526         Update.
5527         (c_type_print_base_struct_union): Update.  Remove cleanups.
5528
5529 2018-03-27  Tom Tromey  <tom@tromey.com>
5530
5531         * dwarf-index-write.c: Include <cmath>.
5532
5533 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
5534
5535         * NEWS: Add entry describing new "set|show varsize-limit" command.
5536         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
5537         command.
5538         * printcmd.c (_initialize_printcmd): Add "set var" alias of
5539         "set variable".
5540
5541 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
5542
5543         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
5544         dwarf-index-write.c
5545         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
5546         * dwarf-index-common.c: New file.
5547         * dwarf-index-common.h: New file.
5548         * dwarf-index-write.c: New file.
5549         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
5550         (struct dwarf2_section_info): Move from here.
5551         (dwarf2_section_info_def): Likewise.
5552         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
5553         (offset_type): Likewise.
5554         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
5555         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
5556         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
5557         (byte_swap): Likewise.
5558         (MAYBE_SWAP): Likewise.
5559         (dwarf2_per_cu_ptr): Likewise.
5560         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
5561         (struct tu_stats): Likewise.
5562         (struct dwarf2_per_objfile): Likewise.
5563         (struct dwarf2_per_cu_data): Likewise.
5564         (struct signatured_type): Likewise.
5565         (sig_type_ptr): Likewise.
5566         (DEF_VEC_P (sig_type_ptr)): Likewise.
5567         (INDEX4_SUFFIX): Likewise.
5568         (INDEX5_SUFFIX): Likewise.
5569         (DEBUG_STR_SUFFIX): Likewise.
5570         (dwarf2_read_section): Make non-static.
5571         (mapped_index_string_hash): Move from here.
5572         (dwarf5_djb_hash): Likewise.
5573         (file_write): Likewise.
5574         (class data_buf): Likewise.
5575         (struct symtab_index_entry): Likewise.
5576         (struct mapped_symtab): Likewise.
5577         (find_slot): Likewise.
5578         (hash_expand): Likewise.
5579         (add_index_entry): Likewise.
5580         (uniquify_cu_indices): Likewise.
5581         (class c_str_view): Likewise.
5582         (class c_str_view_hasher): Likewise.
5583         (class vector_hasher): Likewise.
5584         (write_hash_table): Likewise.
5585         (psym_index_map): Likewise.
5586         (struct addrmap_index_data): Likewise.
5587         (add_address_entry): Likewise.
5588         (add_address_entry_worker): Likewise.
5589         (write_address_map): Likewise.
5590         (symbol_kind): Likewise.
5591         (write_psymbols): Likewise.
5592         (struct signatured_type_index_data): Likewise.
5593         (write_one_signatured_type): Likewise.
5594         (recursively_count_psymbols): Likewise.
5595         (recursively_write_psymbols): Likewise.
5596         (class debug_names): Likewise.
5597         (check_dwarf64_offsets): Likewise.
5598         (psyms_seen_size): Likewise.
5599         (write_gdbindex): Likewise.
5600         (write_debug_names): Likewise.
5601         (assert_file_size): Likewise.
5602         (write_psymtabs_to_index): Likewise.
5603         (save_gdb_index_command): Likewise.
5604         (_initialize_dwarf2_read): Don't register the "save gdb-index"
5605         command.
5606         * dwarf2read.h: New file.
5607
5608 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
5609
5610         PR gdb/22670
5611         * dwarf2read.c (dwarf2_physname): Do not return the demangled
5612         symbol name if the CU's language stores symbol names in linkage
5613         format.
5614         * language.h (struct language_defn)
5615         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
5616         all instances of this struct.
5617
5618 2018-03-26  Tom Tromey  <tom@tromey.com>
5619
5620         * stack.c (backtrace_command_1): Remove verbose code.
5621
5622 2018-03-26  Tom Tromey  <tom@tromey.com>
5623
5624         * python/py-framefilter.c (py_print_type): Don't catch
5625         exceptions.  Return void.
5626         (py_print_value): Likewise.
5627         (py_print_single_arg): Likewise.
5628         (enumerate_args): Don't catch exceptions.
5629         (py_print_args): Likewise.
5630         (py_print_frame): Likewise.
5631         (gdbpy_apply_frame_filter): Catch exceptions here.
5632
5633 2018-03-26  Tom Tromey  <tom@tromey.com>
5634
5635         * stack.c (_initialize_stack): Remove trailing newlines from help
5636         text.  Add "Usage" line to "backtrace" help.
5637
5638 2018-03-26  Tom Tromey  <tom@tromey.com>
5639
5640         PR python/16486:
5641         * python/py-framefilter.c (py_print_args): Call wrap_hint.
5642
5643 2018-03-26  Tom Tromey  <tom@tromey.com>
5644
5645         * python/py-framefilter.c (py_print_single_arg): Return
5646         EXT_LANG_BT_ERROR from catch.
5647
5648 2018-03-26  Tom Tromey  <tom@tromey.com>
5649
5650         PR backtrace/15584:
5651         * stack.c (backtrace_command_1): Move some code into no-filters
5652         "if".
5653
5654 2018-03-26  Tom Tromey  <tom@tromey.com>
5655
5656         * python/py-framefilter.c (throw_quit_or_print_exception): New
5657         function.
5658         (gdbpy_apply_frame_filter): Use it.
5659
5660 2018-03-26  Tom Tromey  <tom@tromey.com>
5661
5662         PR cli/17716:
5663         * python/py-framefilter.c (py_print_type, py_print_value)
5664         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
5665         RETURN_MASK_ERROR.
5666
5667 2018-03-26  Tom Tromey  <tom@tromey.com>
5668
5669         * python/py-framefilter.c (enumerate_args): Use
5670         gdb::unique_xmalloc_ptr.
5671
5672 2018-03-26  Tom Tromey  <tom@tromey.com>
5673
5674         * python/py-framefilter.c (py_print_frame): Return
5675         EXT_LANG_BT_OK.
5676         (gdbpy_apply_frame_filter): Update comment.
5677         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
5678         Remove.
5679         <EXT_LANG_BT_NO_FILTERS>: Change value.
5680
5681 2018-03-26  Tom Tromey  <tom@tromey.com>
5682
5683         PR backtrace/15582:
5684         * stack.c (backtrace_command): Parse "hide" argument.
5685         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
5686         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
5687         constant.
5688
5689 2018-03-26  Tom Tromey  <tom@tromey.com>
5690
5691         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
5692         add "flags".
5693         (backtrace_command): Remove "fulltrace", add "flags".
5694
5695 2018-03-26  Tom Tromey  <tom@tromey.com>
5696
5697         * stack.c (backtrace_command): Rewrite command line parsing.
5698
5699 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
5700
5701         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
5702
5703 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
5704
5705         * filename-seen-cache.h: Add include guard.
5706
5707 2018-03-26  Keith Seitz  <keiths@redhat.com>
5708
5709         * symfile.c (place_section): Remove "struct" from section_addr_info
5710         in comment.
5711         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
5712         "struct" keyword from section_addr_info.
5713
5714 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
5715
5716         * regformats/regdef.h (reg): Add constructors.
5717
5718 2018-03-25  Pedro Alves  <palves@redhat.com>
5719
5720         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
5721         if then/else bodies in var_func_name extraction.
5722
5723 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
5724
5725         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
5726         lookup_minimal_symbol() to find symbol entry.
5727         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
5728
5729 2018-03-23  Keith Seitz  <keiths@redhat.com>
5730
5731         PR c++/22968
5732         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
5733         nested type definitions for C++, too.
5734
5735 2018-03-23  Tom Tromey  <tom@tromey.com>
5736
5737         * machoread.c (struct oso_el): Add a constructor.  Don't define as
5738         a typedef.
5739         (macho_register_oso): Remove.
5740         (macho_symtab_read): Take a std::vector.
5741         (oso_el_compare_name): Now a std::sort comparator.
5742         (macho_symfile_read_all_oso): Take a std::vector.
5743         (macho_symfile_read): Use std::vector.  Remove cleanups.
5744
5745 2018-03-22  Tom Tromey  <tom@tromey.com>
5746
5747         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
5748         (record_full_goto_bookmark): Use std::string.
5749
5750 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5751
5752         PR tdep/18295
5753         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
5754         a single mask.
5755
5756 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5757
5758         * rs6000-tdep.c (store_insn_p): New function.
5759         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
5760         and cr_reg to their unshifted values. Use store_insn_p to
5761         match LR saves using either R1 or fdata->alloca_reg. Use
5762         store_insn_p to match CR saves. Set alloca_reg_offset
5763         when alloca_reg and framep are set. Remove lr_reg shift
5764         when assigning to fdata->lr_register.
5765
5766 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5767
5768         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
5769         command line args instead of emitting a warning.
5770
5771 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
5772
5773         * tracepoint.h (struct static_tracepoint_marker): Initialize
5774         fields, define default constructor, move constructor and move
5775         assignment, disable the rest.
5776         <str_id, extra>: Make std::string.
5777         (release_static_tracepoint_marker): Remove.
5778         (free_current_marker): Remove.
5779         * tracepoint.c (free_current_marker): Remove.
5780         (parse_static_tracepoint_marker_definition): Adjust to
5781         std::string, use new hex2str overload.
5782         (release_static_tracepoint_marker): Remove.
5783         (print_one_static_tracepoint_marker): Get marker by reference
5784         and adjust to std::string.
5785         (info_static_tracepoint_markers_command): Adjust to std::vector
5786         changes
5787         * target.h (static_tracepoint_marker_p): Remove typedef.
5788         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
5789         (struct target_ops) <to_static_tracepoint_marker_at>: Return
5790         bool.
5791         <to_static_tracepoint_markers_by_strid>: Return std::vector.
5792         * target-debug.h
5793         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
5794         (target_debug_print_std_vector_static_tracepoint_marker): New.
5795         (target_debug_print_struct_static_tracepoint_marker_p): Rename
5796         to...
5797         (target_debug_print_static_tracepoint_marker_p): ... this.
5798         * target-delegates.c: Re-generate.
5799         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
5800         Make std::string.
5801         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
5802         (decode_static_tracepoint_spec): Adjust to std::vector.
5803         (tracepoint_print_one_detail): Adjust to std::string.
5804         (strace_marker_decode_location): Adjust to std::string.
5805         (update_static_tracepoint): Adjust to std::string, remove call
5806         to release_static_tracepoint_marker.
5807         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5808         Adjust to std::vector.
5809         * remote.c (remote_static_tracepoint_marker_at): Return bool.
5810         (remote_static_tracepoint_markers_by_strid): Adjust to
5811         std::vector.
5812         * common/rsp-low.h (hex2str): New overload with explicit count
5813         of bytes.
5814         * common/rsp-low.c (hex2str): New overload with explicit count
5815         of bytes.
5816         * unittests/rsp-low-selftests.c (test_hex2str): New function.
5817         (_initialize_rsp_low_selftests): Add test_hex2str test.
5818         * unittests/tracepoint-selftests.c
5819         (test_parse_static_tracepoint_marker_definition): Adjust to
5820         std::string.
5821
5822 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
5823
5824         * tracepoint.c (parse_static_tracepoint_marker_definition):
5825         Consider case where the definition is followed by more
5826         definitions.
5827         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5828         tracepoint-selftests.c.
5829         * unittests/tracepoint-selftests.c: New.
5830
5831 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5832
5833         * MAINTAINERS (Write After Approval): Add Pedro Franco de
5834         Carvalho.
5835
5836 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
5837
5838         * symtab.c (find_pc_sect_line): fixed indentation.
5839
5840 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
5841
5842         * symtab.c (find_pc_sect_line): now uses binary search.
5843
5844 2018-03-19  Tom Tromey  <tom@tromey.com>
5845
5846         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
5847         "IDENT" production.
5848
5849 2018-03-19  Pedro Alves  <palves@redhat.com>
5850             Tom Tromey  <tom@tromey.com>
5851
5852         * unittests/observable-selftests.c: New file.
5853         * common/observable.h: New file.
5854         * observable.h: New file.
5855         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
5856         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
5857         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
5858         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
5859         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
5860         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
5861         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
5862         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
5863         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
5864         python/py-breakpoint.c, python/py-finishbreakpoint.c,
5865         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
5866         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
5867         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
5868         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
5869         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
5870         tui/tui-interp.c, valops.c: Update all users.
5871         * tui/tui-hooks.c (tui_bp_created_observer)
5872         (tui_bp_deleted_observer, tui_bp_modified_observer)
5873         (tui_inferior_exit_observer, tui_before_prompt_observer)
5874         (tui_normal_stop_observer, tui_register_changed_observer):
5875         Remove.
5876         (tui_observers_token): New global.
5877         (attach_or_detach, tui_attach_detach_observers): New functions.
5878         (tui_install_hooks, tui_remove_hooks): Use
5879         tui_attach_detach_observers.
5880         * record-btrace.c (record_btrace_thread_observer): Remove.
5881         (record_btrace_thread_observer_token): New global.
5882         * observer.sh: Remove.
5883         * observer.c: Rename to observable.c.
5884         * observable.c (namespace gdb_observers): Define new objects.
5885         (observer_debug): Move into gdb_observers namespace.
5886         (struct observer, struct observer_list, xalloc_observer_list_node)
5887         (xfree_observer_list_node, generic_observer_attach)
5888         (generic_observer_detach, generic_observer_notify): Remove.
5889         (_initialize_observer): Update.
5890         Don't include observer.inc.
5891         * Makefile.in (generated_files): Remove observer.h, observer.inc.
5892         (clean mostlyclean): Likewise.
5893         (observer.h, observer.inc): Remove targets.
5894         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
5895         (COMMON_SFILES): Use observable.c, not observer.c.
5896         * .gitignore: Remove observer.h.
5897
5898 2018-03-18  Tom Tromey  <tom@tromey.com>
5899
5900         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
5901         gdb::def_vector.
5902         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
5903
5904 2018-03-17  Tom Tromey  <tom@tromey.com>
5905
5906         * auto-load.c (auto_load_objfile_script_1): Use std::string.
5907
5908 2018-03-17  Tom Tromey  <tom@tromey.com>
5909
5910         * target.c (class scoped_target_fd): New.
5911         (target_fileio_close_cleanup): Remove.
5912         (target_fileio_read_alloc_1): Use scoped_target_fd.
5913
5914 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
5915
5916         * silent-rules.mk: New.
5917         * Makefile.in: Include silent-rules.mk
5918         (srcdir, VPATH, top_srcdir): Move up.
5919         (COMPILE): Add ECHO_CXX.
5920         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
5921         (init.c): Add ECHO_INIT_C.
5922         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5923         (version.c): Add ECHO_GEN.
5924         (printcmd.o): Add ECHO_CXX.
5925         (target-float.o): Add ECHO_CXX.
5926         (ada-exp.o): Add ECHO_CXX.
5927         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
5928         (insight$(EXEEXT)): Add ECHO_CXXLD.
5929         * gnulib/configure.ac: Add AM_SILENT_RULES.
5930         * gnulib/aclocal.m4: Re-generate.
5931         * gnulib/configure: Re-generate.
5932         * gnulib/import/Makefile.in: Re-generate.
5933
5934 2018-03-16  Tom Tromey  <tom@tromey.com>
5935
5936         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
5937         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
5938         * utils.c (do_free_section_addr_info)
5939         (make_cleanup_free_section_addr_info): Remove.
5940         * symfile.h (struct other_sections): Add constructor.
5941         (struct section_addr_info): Remove.
5942         (section_addr_info): New typedef.
5943         (struct sym_fns) <sym_offsets>: Change type of parameter.
5944         (build_section_addr_info_from_objfile)
5945         (relative_addr_info_to_section_offsets, addr_info_make_relative)
5946         (default_symfile_offsets, symbol_file_add)
5947         (symbol_file_add_from_bfd)
5948         (build_section_addr_info_from_section_table): Update.
5949         (alloc_section_addr_info, free_section_addr_info): Don't declare.
5950         * symfile.c (alloc_section_addr_info): Remove.
5951         (build_section_addr_info_from_section_table): Change return type.
5952         Update.
5953         (build_section_addr_info_from_bfd)
5954         (build_section_addr_info_from_objfile): Likewise.
5955         (free_section_addr_info): Remove.
5956         (relative_addr_info_to_section_offsets): Change type of "addrs".
5957         (addrs_section_compar): Now a std::sort comparator.
5958         (addrs_section_sort): Change return type.
5959         (addr_info_make_relative): Change type of "addrs".  Update.
5960         (default_symfile_offsets, syms_from_objfile_1)
5961         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
5962         (symbol_file_add_separate): Update.
5963         (symbol_file_add): Change type of "addrs".  Update.
5964         (add_symbol_file_command): Update.  Remove cleanups.
5965         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
5966         cleanups.
5967         * symfile-debug.c (debug_sym_offsets): Change type of "info".
5968         * solib.c (solib_read_symbols): Update.
5969         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
5970         * machoread.c (macho_symfile_offsets): Update.
5971         * jit.c (jit_bfd_try_read_symtab): Update.
5972
5973 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
5974
5975         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5976         unittests/utils-selftests.c.
5977         * unittests/utils-selftests.c: New file.
5978
5979 2018-03-14  Tom Tromey  <tom@tromey.com>
5980
5981         PR cli/14977:
5982         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
5983         for NULL.
5984
5985 2018-03-14  Tom Tromey  <tom@tromey.com>
5986
5987         PR cli/19918:
5988         * printcmd.c (printf_pointer): Allow "-" in format.
5989
5990 2018-03-14  Tom Tromey  <tom@tromey.com>
5991
5992         * printcmd.c (_initialize_printcmd): Add usage to printf.
5993
5994 2018-03-14  Yao Qi  <qiyao@sourceware.org>
5995
5996         * MAINTAINERS: Update my email address.
5997
5998 2018-03-13  Tom Tromey  <tom@tromey.com>
5999
6000         * machoread.c (macho_check_dsym): Change filenamep to a
6001         std::string*.
6002         (macho_symfile_read): Update.
6003         * symfile.c (load_command): Use std::string.
6004
6005 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6006
6007         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
6008         to error message string.
6009         (riscv_register_name): Use xsnprintf instead of sprintf.
6010         (riscv_insn::fetch_instruction): Use gdb_assert instead of
6011         internal_error.
6012         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
6013         error.
6014         (riscv_push_dummy_call): Likewise.
6015
6016 2018-03-12  Tom Tromey  <tom@tromey.com>
6017
6018         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
6019         Use gdb::byte_vector.
6020         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
6021
6022 2018-03-12  Yao Qi  <yao.qi@linaro.org>
6023
6024         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
6025         parameter type to readable_regcache.
6026         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
6027         the declaration.
6028
6029 2018-03-11  Tom Tromey  <tom@tromey.com>
6030
6031         * dwarf2read.c (struct nextfield): Add initializers.
6032         (struct nextfnfield): Remove.
6033         (struct fnfieldlist): Add initializers.  Remove "length" and
6034         "head", use std::vector.
6035         (struct decl_field_list): Remove.
6036         (struct field_info): Add initializers.
6037         <fields, baseclasses>: Now std::vector.
6038         <nbaseclasses, nfnfields, typedef_field_list_count,
6039         nested_types_list_count>: Remove.
6040         (dwarf2_add_field, dwarf2_add_type_defn)
6041         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
6042         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
6043         (process_structure_scope): Update.
6044
6045 2018-03-11  Tom Tromey  <tom@tromey.com>
6046
6047         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
6048         for use by std::sort.
6049         (build_type_psymtabs_1): Use std::vector.
6050
6051 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
6052
6053         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
6054         and LIBMPFR in the printed configuration.
6055
6056 2018-03-08  Tom Tromey  <tom@tromey.com>
6057
6058         * source.c (get_filename_and_charpos): Use scoped_fd.
6059         * nto-procfs.c (procfs_open_1): Use scoped_fd.
6060         (procfs_pidlist): Likewise.
6061         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
6062         (iterate_over_mappings): Likewise.
6063
6064 2018-03-08  Tom Tromey  <tom@tromey.com>
6065
6066         * infcall.c (struct call_return_meta_info)
6067         <stack_temporaries_enabled>: Remove.
6068         (get_call_return_value, call_function_by_hand_dummy): Update.
6069         * thread.c (disable_thread_stack_temporaries): Remove.
6070         (enable_thread_stack_temporaries): Remove.
6071         (thread_stack_temporaries_enabled_p): Return bool.
6072         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
6073         (get_last_thread_stack_temporary): Update.
6074         * eval.c (evaluate_subexp): Update.
6075         * gdbthread.h (class enable_thread_stack_temporaries): Now a
6076         class, not a function.
6077         (value_ptr, value_vec): Remove typedefs.
6078         (class thread_info) <stack_temporaries_enabled>: Now bool.
6079         <stack_temporaries>: Now a std::vector.
6080         (thread_stack_temporaries_enabled_p)
6081         (value_in_thread_stack_temporaries): Return bool.
6082
6083 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
6084
6085         * remote.c (putpkt_binary): Fix omitted bytes reporting.
6086         (getpkt_or_notif_sane_1): Likewise.
6087
6088 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
6089
6090         * build-id.c (build_id_to_debug_bfd): Use std::string.
6091
6092 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
6093
6094         * build-id.c (find_separate_debug_file_by_buildid): Return
6095         std::string.
6096         * build-id.h (find_separate_debug_file_by_buildid): Return
6097         std::string.
6098         * coffread.c (coff_symfile_read): Adjust to std::string.
6099         * elfread.c (elf_symfile_read): Adjust to std::string.
6100         * symfile.c (separate_debug_file_exists): Change parameter to
6101         std::string.
6102         (find_separate_debug_file): Return std::string.
6103         (find_separate_debug_file_by_debuglink): Return std::string.
6104         * symfile.h (find_separate_debug_file_by_debuglink): Return
6105         std::string.
6106
6107 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
6108
6109         * common/xml-utils.c (xml_escape_text): Move code to...
6110         (xml_escape_text_append): ... this new function.
6111         * common/xml-utils.h (xml_escape_text_append): New declaration.
6112         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
6113         New function.
6114         (_initialize_xml_utils): register test_xml_escape_text_append as
6115         a selftest.
6116
6117 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
6118
6119         * defs.h: Remove MAX_REGISTER_SIZE.
6120         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
6121         asserts.
6122         * python/py-unwind.c (pyuw_sniffer): Likewise.
6123
6124 2018-03-07  Tom Tromey  <tom@tromey.com>
6125
6126         * linux-tdep.c (linux_info_proc): Update.
6127         * target.h (struct target_ops) <to_fileio_readlink>: Return
6128         optional<string>.
6129         (target_fileio_readlink): Return optional<string>.
6130         * remote.c (remote_hostio_readlink): Return optional<string>.
6131         * inf-child.c (inf_child_fileio_readlink): Return
6132         optional<string>.
6133         * target.c (target_fileio_readlink): Return optional<string>.
6134
6135 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
6136
6137         * regcache.c (cooked_read_test): Add riscv to the list of
6138         architectures that have a save_reggroup.
6139
6140 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6141
6142         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
6143         value is not a dynamic class object.
6144
6145 2018-03-06  Tom Tromey  <tom@tromey.com>
6146
6147         * rust-exp.y: Formatting fixes.
6148
6149 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
6150
6151         * riscv-tdep.c (riscv_register_name): Remove target description
6152         support.
6153         (riscv_gdbarch_init): Remove target description check.
6154
6155 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
6156
6157         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
6158         comment.
6159         * riscv-tdep.h: Likewise.
6160
6161 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
6162
6163         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
6164         (riscv_pseudo_register_write): Delete.
6165         (riscv_gdbarch_init): Remove all use of pseudo registers.
6166
6167 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
6168
6169         * record-btrace.c (btrace_print_lines): Replace cleanup
6170         parameter with RAII equivalents.
6171         (btrace_insn_history): Replace cleanup with RAII equivalents.
6172         * ui-out.h (make_cleanup_ui_out_list_begin_end,
6173         make_cleanup_ui_out_tuple_begin_end): Remove.
6174         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
6175         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
6176         make_cleanup_ui_out_list_begin_end): Remove.
6177
6178 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
6179
6180         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
6181         parameter types to std::vector.  Use bool.
6182         (record_btrace_wait): Replace VEC(tp_t) with
6183         std::vector<thread_info *>.
6184         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
6185
6186 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
6187
6188         * record-btrace.c (record_btrace_disable_callback): Remove.
6189         (struct scoped_btrace_disable): New.
6190         (record_btrace_open): Use scoped_btrace_disable.
6191
6192 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
6193
6194         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
6195         reading values from registers.
6196
6197 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
6198
6199         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
6200         where appropriate.
6201
6202 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
6203
6204         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
6205         change parameter type.  Use GDB's print functions, and use
6206         core_addr_to_string where appropriate.
6207         (riscv_push_dummy_call): Use core_addr_to_string where
6208         appropriate, update call to riscv_print_arg_location, and reindent
6209         a few lines.
6210         (riscv_return_value): Update call to riscv_print_arg_location.
6211
6212 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
6213             Tim Newsome <tim@sifive.com>
6214             Albert Ou <a0u@eecs.berkeley.edu>
6215             Darius Rad <darius@bluespec.com>
6216
6217         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
6218         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
6219         (ALLDEPFILES): Add riscv-tdep.c
6220         * configure.tgt: Add riscv support.
6221         * riscv-tdep.c: New file.
6222         * riscv-tdep.h: New file.
6223         * NEWS: Mention new target.
6224         * MAINTAINERS: Add entry for riscv.
6225
6226 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
6227
6228         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
6229         fields within aggregates.
6230
6231 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
6232
6233         * record-btrace.c (btrace_print_lines): Change type of flags to
6234         gdb_disassembly_flags.
6235
6236 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
6237
6238         * fbsd-nat.c: Include "inf-ptrace.h".
6239         (USE_SIGTRAP_SIGINFO): Conditionally define.
6240         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
6241         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
6242         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
6243         function.
6244         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
6245         Likewise.
6246         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
6247         Likewise.
6248         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
6249         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
6250         "supports_stopped_by_hw_breakpoint" target methods.
6251
6252 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
6253
6254         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
6255         * fbsd-nat.c (debug_fbsd_nat): New variable.
6256         (show_fbsd_nat_debug): New function.
6257         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
6258         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
6259
6260 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
6261
6262         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
6263         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
6264         prototype.
6265         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
6266         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
6267         method.
6268
6269 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
6270
6271         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
6272         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
6273
6274 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
6275
6276         * charset.c (struct charset_vector): New.
6277         (charsets): Change type to charset_vector.
6278         (find_charset_names): Adjust.
6279         (add_one): Adjust.
6280         (_initialize_charset): Adjust.
6281
6282 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
6283
6284         * progspace.h (struct program_space) <deleted_solibs>: Change
6285         type to std::vector<std::string>.
6286         * progspace.c (clear_program_space_solib_cache): Adjust.
6287         * breakpoint.c (print_solib_event): Adjust.
6288         (check_status_catch_solib): Adjust.
6289         * solib.c (update_solib_list): Adjust.
6290         * ui-out.h (class ui_out) <field_string>: New overload.
6291         * ui-out.c (ui_out::field_string): New overload.
6292
6293 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
6294
6295         * progspace.h (struct program_space): Add constructor and
6296         destructor, initialize fields.
6297         (add_program_space): Remove.
6298         * progspace.c (add_program_space): Rename to...
6299         (program_space::program_space): ... this.
6300         (release_program_space): Rename to...
6301         (program_space::~program_space): ... this.
6302         (delete_program_space): Use delete to delete program_space.
6303         (initialize_progspace): Use new to allocate program_space.
6304         * inferior.c (add_inferior_with_spaces): Likewise.
6305         (clone_inferior_command): Likewise.
6306         * infrun.c (follow_fork_inferior): Likewise.
6307         (handle_vfork_child_exec_or_exit): Likewise.
6308
6309 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
6310
6311         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
6312         (delim_string_to_char_ptr_vec): Return std::vector of
6313         gdb::unique_xmalloc_ptr.
6314         (dirnames_to_char_ptr_vec_append): Take std::vector of
6315         gdb::unique_xmalloc_ptr.
6316         (dirnames_to_char_ptr_vec): Return std::vector of
6317         gdb::unique_xmalloc_ptr.
6318         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
6319         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
6320         (delim_string_to_char_ptr_vec): Return an std::vector of
6321         gdb::unique_xmalloc_ptr, adjust the code.
6322         (dirnames_to_char_ptr_vec_append): Take an std::vector of
6323         gdb::unique_xmalloc_ptr, adjust the code.
6324         (dirnames_to_char_ptr_vec): Return an std::vector of
6325         gdb::unique_xmalloc_ptr, adjust the code.
6326         * auto-load.c (auto_load_safe_path_vec): Change type to
6327         std::vector of gdb::unique_xmalloc_ptr.
6328         (auto_load_expand_dir_vars): Return an std::vector of
6329         gdb::unique_xmalloc_ptr, adjust the code.
6330         (auto_load_safe_path_vec_update): Adjust.
6331         (filename_is_in_auto_load_safe_path_vec): Adjust.
6332         (auto_load_objfile_script_1): Adjust.
6333         * build-id.c (build_id_to_debug_bfd): Adjust.
6334         * linux-thread-db.c (thread_db_load_search): Adjust.
6335         * source.c (add_path): Adjust.
6336         (openp): Adjust.
6337         * symfile.c (find_separate_debug_file): Adjust.
6338         * utils.c (do_free_char_ptr_vec): Remove.
6339         (make_cleanup_free_char_ptr_vec): Remove.
6340
6341 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
6342
6343         PR gdb/22907
6344         * common/pathstuff.c: Conditionally include "<windows.h>".
6345
6346 2018-03-01  Georg Sauthoff  <mail@georg.so>
6347
6348         PR gdb/22888
6349         * gcore.in: Quote variables and switch interpreter to bash.
6350
6351 2018-03-01  Tom Tromey  <tom@tromey.com>
6352
6353         * dwarf2read.c (alloc_discriminant_info): Fix default_index
6354         assertion.  Add assertion for discriminant_index.
6355         (quirk_rust_enum): Use correct base type name in univariant case.
6356
6357 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
6358
6359         * record.c (get_call_history_modifiers): Return a
6360         record_print_flags.
6361         (cmd_record_call_history): Adjust.
6362         * record-btrace.c (record_btrace_call_history): Adjust.
6363         (record_btrace_call_history_range): Adjust.
6364         (record_btrace_call_history_from): Adjust.
6365         * target-debug.h (target_debug_print_record_print_flags): New.
6366         * target-delegates.c: Re-generate.
6367         * target.c (target_call_history): Change flags type.
6368         (target_call_history_from): Likewise.
6369         (target_call_history_range): Likewise.
6370         * target.h (struct target_ops) <target_call_history>: Likewise.
6371         (target_call_history_from): Likewise.
6372         (target_call_history_range): Likewise.
6373
6374 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
6375             Simon Marchi  <simon.marchi@polymtl.ca>
6376
6377         * common/common-utils.c: Include "sys/stat.h".
6378         (is_regular_file): Move here from "source.c"; change return
6379         type to "bool".
6380         * common/common-utils.h (is_regular_file): New prototype.
6381         * common/pathstuff.c (contains_dir_separator): New function.
6382         * common/pathstuff.h (contains_dir_separator): New prototype.
6383         * source.c: Don't include "sys/stat.h".
6384         (is_regular_file): Move to "common/common-utils.c".
6385
6386 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
6387
6388         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
6389         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
6390         * auto-load.c: Include "common/pathstuff.h".
6391         * common/common-def.h (current_directory): Move here.
6392         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
6393         function.
6394         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
6395         prototype.
6396         * common/pathstuff.c: New file.
6397         * common/pathstuff.h: New file.
6398         * compile/compile.c: Include "common/pathstuff.h".
6399         * defs.h (current_directory): Move to "common/common-defs.h".
6400         * dwarf2read.c: Include "common/pathstuff.h".
6401         * exec.c: Likewise.
6402         * guile/scm-safe-call.c: Likewise.
6403         * linux-thread-db.c: Likewise.
6404         * main.c: Likewise.
6405         * nto-tdep.c: Likewise.
6406         * objfiles.c: Likewise.
6407         * source.c: Likewise.
6408         * symtab.c: Likewise.
6409         * utils.c: Include "common/pathstuff.h".
6410         (gdb_realpath): Move to "common/pathstuff.c".
6411         (gdb_realpath_keepfile): Likewise.
6412         (gdb_abspath): Likewise.
6413         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
6414         (gdb_realpath_keepfile): Likewise.
6415         (gdb_abspath): Likewise.
6416
6417 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
6418
6419         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
6420         wildcard process pid for super_resume for kernels with a
6421         specific bug.
6422
6423 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
6424
6425         * compile/compile.c (get_args): Add additional comments
6426         explaining function.
6427
6428 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
6429             Tom Tromey  <tom@tromey.com>
6430
6431         * target.h (memory_write_request_s): Remove typedef.  Don't define
6432         VEC.
6433         (target_write_memory_blocks): Change argument to std::vector.
6434         (struct memory_write_request): Add constructor.
6435         * target-memory.c (compare_block_starting_address): Return bool.
6436         Change argument types.
6437         (claim_memory): Change arguments to use std::vector.
6438         (split_regular_and_flash_blocks, blocks_to_erase)
6439         (compute_garbled_blocks): Likewise.
6440         (cleanup_request_data, cleanup_write_requests_vector): Remove.
6441         (target_write_memory_blocks): Change argument to std::vector.
6442         * symfile.c (struct load_section_data): Add constructor and
6443         destructor.  Use std::vector for "requests".
6444         (struct load_progress_data): Add initializers.
6445         (load_section_callback): Update.  Use "new".
6446         (clear_memory_write_data): Remove.
6447         (generic_load): Update.
6448
6449 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
6450
6451         * arch/aarch64.h: Use common/tdesc.h.
6452
6453 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
6454
6455         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
6456         architecture with a 64-bit ABI.
6457
6458 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
6459
6460         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
6461         ahead of target description loading.
6462
6463 2018-02-26  Tom Tromey  <tom@tromey.com>
6464
6465         * stack.c (backtrace_command_1): Update.
6466         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
6467         of "flags".
6468         * python/py-framefilter.c (py_print_frame)
6469         (gdbpy_apply_frame_filter): Change type of "flags".
6470         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
6471         of "flags".
6472         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
6473         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
6474         * extension.h (enum frame_filter_flag): Rename from
6475         frame_filter_flags.
6476         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
6477         (apply_ext_lang_frame_filter): Change type of "flags".
6478         * extension.c (apply_ext_lang_frame_filter): Change type of
6479         "flags".
6480         * extension-priv.h (struct extension_language_ops)
6481         <apply_frame_filter>: Change type of "flags".
6482
6483 2018-02-26  Tom Tromey  <tom@tromey.com>
6484
6485         PR python/16497:
6486         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
6487         off-by-one in py_end computation.
6488         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
6489         PRINT_MORE_FRAMES.
6490         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
6491         constant.
6492
6493 2018-02-26  Tom Tromey  <tom@tromey.com>
6494
6495         * dwarf2read.c (struct variant_field): New.
6496         (struct nextfield) <variant>: New field.
6497         (dwarf2_add_field): Handle DW_TAG_variant_part.
6498         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
6499         discriminated union.
6500         (read_structure_type): Handle DW_TAG_variant_part.
6501         (handle_struct_member_die): New function, extracted from
6502         process_structure_scope.  Handle DW_TAG_variant.
6503         (process_structure_scope): Handle discriminated unions.  Call
6504         handle_struct_member_die.
6505
6506 2018-02-26  Tom Tromey  <tom@tromey.com>
6507
6508         * rust-lang.h (rust_last_path_segment): Declare.
6509         * rust-lang.c (rust_last_path_segment): Now public.  Change
6510         contract.
6511         (struct disr_info): Remove.
6512         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
6513         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
6514         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
6515         (rust_enum_p, rust_enum_variant): New function.
6516         (rust_underscore_fields): Remove "offset" parameter.
6517         (rust_print_enum): New function.
6518         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
6519         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
6520         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
6521         enums.
6522         (rust_internal_print_type): New function, from rust_print_type.
6523         Remove enum code.
6524         (rust_print_type): Call rust_internal_print_type.
6525         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
6526         Update enum handling.
6527         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
6528         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
6529         (rust_union_quirks): New functions.
6530         (process_full_comp_unit, process_full_type_unit): Call
6531         rust_union_quirks.
6532         (process_structure_scope): Update rust_unions if necessary.
6533
6534 2018-02-26  Tom Tromey  <tom@tromey.com>
6535
6536         * value.h (value_union_variant): Declare.
6537         * valops.c (value_union_variant): New function.
6538         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
6539         (struct discriminant_info): New.
6540         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
6541         enumerator.
6542         (struct main_type) <flag_discriminated_union>: New field.
6543
6544 2018-02-26  Tom Tromey  <tom@tromey.com>
6545
6546         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6547         unittests/unpack-selftests.c.
6548         * unittests/unpack-selftests.c: New file.
6549         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
6550
6551 2018-02-26  Yao Qi  <yao.qi@linaro.org>
6552
6553         * dwarf2read.c (struct partial_die_info) <read>: New method.
6554         (read_partial_die): Remove the declaration.
6555         (load_partial_dies): Update.
6556         (partial_die_info::partial_die_info):
6557         (read_partial_die): Change it to partial_die_info::read.
6558
6559 2018-02-26  Yao Qi  <yao.qi@linaro.org>
6560
6561         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
6562         (fixup_partial_die): Remove declaration.
6563         (scan_partial_symbols): Update.
6564         (partial_die_parent_scope): Likewise.
6565         (partial_die_full_name): Likewise.
6566         (fixup_partial_die): Change it to partial_die_info::fixup.
6567
6568 2018-02-26  Yao Qi  <yao.qi@linaro.org>
6569
6570         * dwarf2read.c (read_partial_die): Update the declaration.
6571         (load_partial_dies): Caller update.
6572         (read_partial_die): Remove one argument abbrev_len.
6573
6574 2018-02-26  Yao Qi  <yao.qi@linaro.org>
6575
6576         * dwarf2read.c (struct partial_die_info): Add ctor, delete
6577         assignment operator.
6578         (load_partial_dies): Use ctor and copy ctor.
6579         (read_partial_die): Update.
6580         (dwarf2_cu::find_partial_die): Use ctor.
6581
6582 2018-02-26  Yao Qi  <yao.qi@linaro.org>
6583
6584         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
6585         (find_partial_die_in_comp_unit): Change it to
6586         dwarf2_cu::find_partial_die.
6587         (find_partial_die): Update.
6588
6589 2018-02-26  Yao Qi  <yao.qi@linaro.org>
6590
6591         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
6592         is NULL.
6593
6594 2018-02-26  Yao Qi  <yao.qi@linaro.org>
6595
6596         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
6597
6598 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
6599
6600         * arch/amd64.h: Use common/tdesc.h.
6601         * arch/i386.c: Likewise.
6602         * arch/i386.h: Likewise.
6603         * arch/tic6x.c: Likewise.
6604         * arch/tdesc.h: Move file from here...
6605         * common/tdesc.h: ...to here.
6606         * features/aarch64-core.c: Regenerate.
6607         * features/aarch64-fpu.c: Regenerate.
6608         * features/i386/32bit-avx.c: Regenerate.
6609         * features/i386/32bit-avx512.c: Regenerate.
6610         * features/i386/32bit-core.c: Regenerate.
6611         * features/i386/32bit-linux.c: Regenerate.
6612         * features/i386/32bit-mpx.c: Regenerate.
6613         * features/i386/32bit-pkeys.c: Regenerate.
6614         * features/i386/32bit-sse.c: Regenerate.
6615         * features/i386/64bit-avx.c: Regenerate.
6616         * features/i386/64bit-avx512.c: Regenerate.
6617         * features/i386/64bit-core.c: Regenerate.
6618         * features/i386/64bit-linux.c: Regenerate.
6619         * features/i386/64bit-mpx.c: Regenerate.
6620         * features/i386/64bit-pkeys.c: Regenerate.
6621         * features/i386/64bit-segments.c: Regenerate.
6622         * features/i386/64bit-sse.c: Regenerate.
6623         * features/i386/x32-core.c: Regenerate.
6624         * features/tic6x-c6xp.c: Regenerate.
6625         * features/tic6x-core.c: Regenerate.
6626         * features/tic6x-gp.c: Regenerate.
6627         * target-descriptions.c: Use common/tdesc.h.
6628         * target-descriptions.h: Likewise.
6629
6630 2018-02-24  Tom Tromey  <tom@tromey.com>
6631
6632         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
6633         (try_thread_db_load_from_dir, thread_db_load_search): Use
6634         std::string.
6635         (info_auto_load_libthread_db_compare): Return bool.  Change
6636         argument types.
6637         (info_auto_load_libthread_db): Use std::vector, std::string.
6638         Remove cleanups.
6639
6640 2018-02-24  Tom Tromey  <tom@tromey.com>
6641
6642         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
6643         std::string.
6644         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
6645         std::string*.
6646         * gdbarch.c: Rebuild.
6647         * gdbarch.h: Rebuild.
6648         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
6649         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
6650         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
6651         std::string*.
6652
6653 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
6654
6655         * gdbtypes.h (sect_offset): Change type to uint64_t.
6656         (sect_offset_str): New function.
6657         * dwarf2read.c (create_addrmap_from_aranges): Use
6658         sect_offset_str.
6659         (error_check_comp_unit_head): Likewise.
6660         (create_debug_type_hash_table): Likewise.
6661         (read_cutu_die_from_dwo): Likewise.
6662         (init_cutu_and_read_dies): Likewise.
6663         (init_cutu_and_read_dies_no_follow): Likewise.
6664         (process_psymtab_comp_unit_reader): Likewise.
6665         (partial_die_parent_scope): Likewise.
6666         (peek_die_abbrev): Likewise.
6667         (process_queue): Likewise.
6668         (dwarf2_physname): Likewise.
6669         (read_namespace_alias): Likewise.
6670         (read_import_statement): Likewise.
6671         (create_dwo_cu_reader): Likewise.
6672         (create_cus_hash_table): Likewise.
6673         (lookup_dwo_cutu): Likewise.
6674         (inherit_abstract_dies): Likewise.
6675         (read_func_scope): Likewise.
6676         (read_call_site_scope): Likewise.
6677         (dwarf2_add_member_fn): Likewise.
6678         (read_common_block): Likewise.
6679         (read_module_type): Likewise.
6680         (read_typedef): Likewise.
6681         (read_subrange_type): Likewise.
6682         (load_partial_dies): Likewise.
6683         (read_partial_die): Likewise.
6684         (find_partial_die): Likewise.
6685         (read_str_index): Likewise.
6686         (dwarf2_string_attr): Likewise.
6687         (build_error_marker_type): Likewise.
6688         (lookup_die_type): Likewise.
6689         (dump_die_shallow): Likewise.
6690         (follow_die_ref): Likewise.
6691         (dwarf2_fetch_die_loc_sect_off): Likewise.
6692         (dwarf2_fetch_constant_bytes): Likewise.
6693         (follow_die_sig): Likewise.
6694         (get_signatured_type): Likewise.
6695         (get_DW_AT_signature_type): Likewise.
6696         (dwarf2_find_containing_comp_unit): Likewise.
6697         (set_die_type): Likewise.
6698
6699 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
6700
6701         * arch/aarch64.c: Include "common-defs.h".
6702         * arch/amd64.c: Likewise.
6703         * arch/i386.c: Likewise.
6704
6705 2018-02-21  Tom Tromey  <tom@tromey.com>
6706
6707         * value.h: (extract_field_op): Update.
6708         * eval.c (extract_field_op): Return a const char *.
6709         * expression.h (parse_expression_for_completion): Update.
6710         * completer.c (complete_expression): Update.
6711         (add_struct_fields): Make fieldname const.
6712         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
6713         (mark_completion_tag, parse_exp_in_context_1): Update.
6714         (parse_expression_for_completion): Change "name" to
6715         unique_xmalloc_ptr*.
6716
6717 2018-02-21  Tom Tromey  <tom@tromey.com>
6718
6719         * infcall.c (call_function_by_hand_dummy): Use std::vector.
6720
6721 2018-02-21  Yao Qi  <yao.qi@linaro.org>
6722
6723         * avr-tdep.c (avr_read_pc): Change parameter type to
6724         readable_regcache.
6725         * gdbarch.sh (read_pc): Likewise.
6726         * gdbarch.c: Re-generated.
6727         * gdbarch.h: Re-generated.
6728         * hppa-tdep.c (hppa_read_pc): Change parameter type to
6729         readable_regcache.
6730         * ia64-tdep.c (ia64_read_pc): Likewise.
6731         * mips-tdep.c (mips_read_pc): Likewise.
6732         * spu-tdep.c (spu_read_pc): Likewise.
6733
6734 2018-02-21  Yao Qi  <yao.qi@linaro.org>
6735
6736         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
6737         * regcache-dump.c: New file.
6738         * regcache.c: Move register_dump to regcache-dump.c.
6739         (maintenance_print_registers): Likewise.
6740         (maintenance_print_raw_registers): Likewise.
6741         (maintenance_print_cooked_registers): Likewise.
6742         (maintenance_print_register_groups): Likewise.
6743         (maintenance_print_remote_registers): Likewise.
6744         (_initialize_regcache): Likewise.
6745         * regcache.h (register_dump): Moved from regcache.c.
6746
6747 2018-02-21  Yao Qi  <yao.qi@linaro.org>
6748
6749         * regcache.c (regcache::regcache): Update.
6750         (regcache::invalidate): Move it to detached_regcache::invalidate.
6751         (get_thread_arch_aspace_regcache): Update.
6752         (regcache::raw_update): Update.
6753         (regcache::cooked_read): Remove some code.
6754         (regcache::cooked_read_value): Likewise.
6755         (regcache::raw_write): Remove assert on m_readonly_p.
6756         (regcache::raw_supply_integer): Move it to
6757         detached_regcache::raw_supply_integer.
6758         (regcache::raw_supply_zeroed): Likewise.
6759         * regcache.h (detached_regcache) <raw_supply_integer>: New
6760         declaration.
6761         <raw_supply_zeroed, invalidate>: Likewise.
6762         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
6763         <invalidate>: Likewise.
6764         <m_readonly_p>: Removed.
6765
6766 2018-02-21  Yao Qi  <yao.qi@linaro.org>
6767
6768         * infcmd.c (get_return_value): Let stop_regs point to
6769         get_current_regcache.
6770         * regcache.c (regcache::regcache): Remove.
6771         (register_dump_reg_buffer): New class.
6772         (regcache_print): Adjust.
6773         * regcache.h (regcache): Remove constructors.
6774
6775 2018-02-21  Yao Qi  <yao.qi@linaro.org>
6776
6777         * regcache.c (class register_dump): New class.
6778         (register_dump_regcache, register_dump_none): New class.
6779         (register_dump_remote, register_dump_groups): New class.
6780         (regcache_print): Update.
6781         * regcache.h (regcache_dump_what): Move it to regcache.c.
6782         (regcache) <dump>: Remove.
6783
6784 2018-02-21  Yao Qi  <yao.qi@linaro.org>
6785
6786         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
6787          reg_buffer_rw *.
6788         (jit_unwind_reg_set_impl): Call raw_supply.
6789         (jit_frame_sniffer): Use reg_buffer_rw.
6790         * record-full.c (record_full_core_regbuf): Change its type.
6791         (record_full_core_open_1): Use reg_buffer_rw.
6792         (record_full_close): Likewise.
6793         (record_full_core_fetch_registers): Use regcache->raw_supply.
6794         (record_full_core_store_registers): Likewise.
6795         * regcache.c (regcache::get_register_status): Move it to
6796         reg_buffer.
6797         (regcache_raw_set_cached_value): Remove.
6798         (regcache::raw_set_cached_value): Remove.
6799         (regcache::raw_write): Call raw_supply.
6800         (regcache::raw_supply): Move it to reg_buffer_rw.
6801         * regcache.h (regcache_raw_set_cached_value): Remove.
6802         (reg_buffer_rw): New class.
6803
6804 2018-02-21  Yao Qi  <yao.qi@linaro.org>
6805
6806         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
6807         readonly_detached_regcache.
6808         (dummy_frame_prev_register): Use regcache->cooked_read.
6809         * frame.c (frame_save_as_regcache): Change return type.
6810         (frame_pop): Update.
6811         * frame.h (frame_save_as_regcache): Update declaration.
6812         * inferior.h (get_infcall_suspend_state_regcache): Update
6813         declaration.
6814         * infrun.c (infcall_suspend_state) <registers>: use
6815         readonly_detached_regcache.
6816         (save_infcall_suspend_state): Don't use regcache_dup.
6817         (get_infcall_suspend_state_regcache): Change return type.
6818         * linux-fork.c (struct fork_info) <savedregs>: Change to
6819         readonly_detached_regcache.
6820         <pc>: New field.
6821         (fork_save_infrun_state): Don't use regcache_dup.
6822         (info_checkpoints_command): Adjust.
6823         * mi/mi-main.c (register_changed_p): Update declaration.
6824         (mi_cmd_data_list_changed_registers): Use
6825         readonly_detached_regcache.
6826         (register_changed_p): Change parameter type to
6827         readonly_detached_regcache.
6828         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
6829         readonly_detached_regcache.
6830         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
6831         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
6832         New.
6833         (regcache::save): Move it to reg_buffer.
6834         (regcache::restore): Change parameter type.
6835         (regcache_dup): Remove.
6836         * regcache.h (reg_buffer) <save>: New method.
6837         (readonly_detached_regcache): New class.
6838         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
6839         readonly_detached_regcache.
6840         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
6841
6842 2018-02-21  Yao Qi  <yao.qi@linaro.org>
6843
6844         * frame.c (frame_save_as_regcache): Use regcache method save.
6845         (frame_pop): Use regcache method restore.
6846         * infrun.c (restore_infcall_suspend_state): Likewise.
6847         * linux-fork.c (fork_load_infrun_state): Likewise.
6848         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
6849         save.
6850         * regcache.c (regcache_save): Remove.
6851         (regcache::restore): More asserts.
6852         (regcache_cpy): Remove.
6853         * regcache.h (regcache_save): Remove the declaration.
6854         (regcache::restore): Move from private to public.
6855         Remove the friend declaration of regcache_cpy.
6856         (regcache_cpy): Remove declaration.
6857
6858 2018-02-21  Yao Qi  <yao.qi@linaro.org>
6859
6860         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
6861         parameter type to 'readable_regcache *'.
6862         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6863         * arm-tdep.c (arm_neon_quad_read): Likewise.
6864         (arm_pseudo_read): Likewise.
6865         * avr-tdep.c (avr_pseudo_register_read): Likewise.
6866         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6867         * frv-tdep.c (frv_pseudo_register_read): Likewise.
6868         * gdbarch.c: Re-generated.
6869         * gdbarch.h: Re-generated.
6870         * gdbarch.sh (pseudo_register_read): Change parameter type to
6871         'readable_regcache *'.
6872         (pseudo_register_read_value): Likewise.
6873         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
6874         (h8300_pseudo_register_read): Likewise.
6875         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
6876         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6877         (i386_pseudo_register_read_into_value): Likewise.
6878         (i386_pseudo_register_read_value): Likewise.
6879         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
6880         declaration.
6881         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
6882         * m32c-tdep.c (m32c_raw_read): Likewise.
6883         (m32c_read_flg): Likewise.
6884         (m32c_banked_register): Likewise.
6885         (m32c_banked_read): Likewise.
6886         (m32c_sb_read): Likewise.
6887         (m32c_part_read): Likewise.
6888         (m32c_cat_read): Likewise.
6889         (m32c_r3r2r1r0_read): Likewise.
6890         (m32c_pseudo_register_read): Likewise.
6891         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6892         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6893         (mep_pseudo_cr64_read): Likewise.
6894         (mep_pseudo_register_read): Likewise.
6895         * mips-tdep.c (mips_pseudo_register_read): Likewise.
6896         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6897         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6898         * regcache.c (regcache::raw_read): Move it to readable_regcache.
6899         (regcache::cooked_read): Likewise.
6900         (regcache::cooked_read_value): Likewise.
6901         (regcache_cooked_read_signed):
6902         (regcache::cooked_read): Likewise.
6903         * regcache.h (readable_regcache): New class.
6904         (regcache): Inherit readable_regcache.  Move some methods to
6905         readable_regcache.
6906         * rl78-tdep.c (rl78_pseudo_register_read): Change
6907         parameter type to 'readable_regcache *'.
6908         * rs6000-tdep.c (do_regcache_raw_read): Remove.
6909         (e500_pseudo_register_read): Change parameter type to
6910         'readable_regcache *'.
6911         (dfp_pseudo_register_read): Likewise.
6912         (vsx_pseudo_register_read): Likewise.
6913         (efpr_pseudo_register_read): Likewise.
6914         * s390-tdep.c (s390_pseudo_register_read): Likewise.
6915         * sh-tdep.c (sh_pseudo_register_read): Likewise.
6916         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
6917         (sh64_pseudo_register_read): Likewise.
6918         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
6919         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6920         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
6921         (spu_pseudo_register_read): Likewise.
6922         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6923         (xtensa_pseudo_register_read): Likewise.
6924
6925 2018-02-21  Yao Qi  <yao.qi@linaro.org>
6926
6927         * regcache.c (regcache::regcache): Call reg_buffer ctor.
6928         (regcache::arch): Move it to reg_buffer::arch.
6929         (regcache::register_buffer): Likewise.
6930         (regcache::assert_regnum): Likewise.
6931         (regcache::num_raw_registers): Likewise.
6932         * regcache.h (reg_buffer): New class.
6933         (regcache): Inherit reg_buffer.
6934
6935 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
6936
6937         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
6938         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
6939
6940 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
6941
6942         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
6943
6944 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
6945
6946         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
6947         (SFILES): Remove common/*.c files.
6948         (COMMON_OBS): Remove some *.o files built from common/*.c files.
6949         * common/common.host: Add common reference.
6950         * configure.ac: Likewise.
6951         * configure: Regenerate.
6952
6953 2018-02-16  Yao Qi  <yao.qi@linaro.org>
6954
6955         * block.c (block_namespace_info): Inherit allocate_on_obstack.
6956         (block_initialize_namespace): Use new.
6957         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
6958         (dwarf2_free_objfile): Use delete.
6959         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
6960         (copy_type_recursive): Use new.
6961         * gdb_obstack.h (allocate_on_obstack): New.
6962
6963 2018-02-15  Yao Qi  <yao.qi@linaro.org>
6964
6965         PR gdb/22849
6966         * inferior.c (exit_inferior_1): Reset inf->control.
6967
6968 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
6969
6970         * ada-lang.c (ada_to_fixed_value_create): Delete advance
6971         declaration.
6972
6973 2018-02-14  Pedro Alves  <palves@redhat.com>
6974
6975         * frame-unwind.c (frame_unwind_try_unwinder): Always call
6976         frame_cleanup_after_sniffer on exception.
6977
6978 2018-02-14  Tom Tromey  <tom@tromey.com>
6979
6980         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
6981         const.
6982         (solib_bfd_open): Make pathname const.
6983         * solib.c (solib_bfd_open): Make pathname const.
6984         * solib-spu.c (spu_bfd_fopen): Make name const.
6985         (spu_bfd_open): Make pathname const.
6986         * solib-darwin.c (darwin_bfd_open): Make pathname const.
6987         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
6988
6989 2018-02-14  Tom Tromey  <tom@tromey.com>
6990
6991         * symfile.c (symfile_bfd_open): Update.
6992         * source.h (openp, source_full_path_of, find_and_open_source):
6993         Change argument type to unique_xmalloc_ptr.
6994         * source.c (openp): Take a unique_xmalloc_ptr.
6995         (source_full_path_of, find_and_open_source): Likewise.
6996         (open_source_file, symtab_to_fullname): Update.
6997         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
6998         unique_xmalloc_ptr.
6999         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
7000         (exec_file_find): Update.
7001         * psymtab.c (psymtab_to_fullname): Update.
7002         * nto-tdep.h (nto_find_and_open_solib): Update.
7003         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
7004         unique_xmalloc_ptr.
7005         * exec.c (exec_file_attach): Update.
7006         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
7007         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
7008
7009 2018-02-14  Tom Tromey  <tom@tromey.com>
7010
7011         * solib.c: Include source.h.
7012         * nto-tdep.c: Include source.h.
7013         * mi/mi-cmd-env.c: Include source.h.
7014         * infcmd.c: Include source.h.
7015         * exec.c: Include source.h.
7016         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
7017         (add_path, directory_switch, source_path, init_source_path): Move
7018         declarations...
7019         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
7020         (add_path, directory_switch, source_path, init_source_path):
7021         ...here.
7022
7023 2018-02-14  Tom Tromey  <tom@tromey.com>
7024
7025         * solist.h (exec_file_find, solib_find): Return
7026         unique_xmalloc_ptr.
7027         (solib_bfd_fopen): Take a const char *.
7028         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
7029         (exec_file_find, solib_find): Likewise.
7030         (solib_bfd_fopen): Do not take ownership of "pathname".
7031         (solib_bfd_open): Use unique_xmalloc_ptr.
7032         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
7033         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
7034         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
7035         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
7036
7037 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
7038
7039         * ada-lang.c (name_match_type_from_name): Remove reference to
7040         ada_name_for_lookup in function's documentation.
7041         * ada-lang.h (ada_name_for_lookup): Delete declaration.
7042
7043 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
7044
7045         * defs.h (enum openp_flags): New enum.
7046         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
7047         Move to enum openp_flags.
7048         (openp_flags): New enum flags.
7049         (openp): Change parameter type to openp_flags.
7050         * source.c (openp): Change parameter type to openp_flags.
7051         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
7052         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
7053
7054 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
7055
7056         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
7057         per-command.
7058
7059 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7060
7061         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
7062         into...
7063         (class dwarf2_queue_guard): ...the destructor of this new class.
7064         (dw2_do_instantiate_symtab): Create instance of the new class
7065         dwarf2_queue_guard, remove cleanup.
7066
7067 2018-02-09  Tom Tromey  <tom@tromey.com>
7068
7069         * source.c (find_source_lines): Don't reference past the end of
7070         the vector.
7071
7072 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
7073
7074         * remote.c (remote_btrace_maybe_reopen): Change error message.
7075         * btrace.c (btrace_enable): Likewise.
7076         (parse_xml_btrace): Likewise.
7077         (parse_xml_btrace_conf): Likewise.
7078
7079 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
7080
7081         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
7082         (linux_enable_pt, linux_enable_bts): Call
7083         diagnose_perf_event_open_fail.
7084
7085 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
7086
7087         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
7088         Remove parameter and change return type.  Update callers.  Move it.
7089         (linux_enable_bts, linux_enable_pt): Improve error message.
7090         (linux_enable_pt): Remove zero buffer size check.
7091         (linux_enable_btrace): Improve error messages.  Remove NULL return
7092         check.
7093
7094 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
7095
7096         * btrace.c (btrace_enable): Remove target_supports_btrace call.
7097         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
7098         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
7099         (linux_supports_pt, linux_supports_btrace): Remove.
7100         (linux_enable_bts): Call cpu_supports_bts.
7101         * nat/linux-btrace.h (linux_supports_btrace): Remove.
7102         * remote.c (remote_supports_btrace): Remove.
7103         (init_remote_ops): Remove remote_supports_btrace.
7104         * target-delegates.c: Regenerated.
7105         * target.c (target_supports_btrace): Remove.
7106         * target.h (target_ops) <to_supports_btrace>: Remove
7107         (target_supports_btrace): Remove.
7108         * x86-linux-nat.c (x86_linux_create_target): Remove
7109         linux_supports_btrace.
7110
7111 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
7112
7113         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
7114         btrace failed.
7115         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
7116         exception and use message in own exception.
7117
7118 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
7119
7120         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
7121         (perf_event_pt_event_type): Use gdb_file_up.
7122         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
7123         scoped_fd, and scoped_mmap.
7124
7125 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
7126
7127         * common/scoped_mmap.h: New.
7128         * unittests/scoped_mmap-selftest.c: New.
7129         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7130         unittests/scoped_mmap-selftest.c.
7131
7132 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
7133
7134         * common/scoped_fd.h: New.
7135         * unittests/scoped_fd-selftest.c: New.
7136         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7137         unittests/scoped_fd-selftest.c.
7138
7139 2018-02-09  Tom Tromey  <tom@tromey.com>
7140
7141         * auto-load.c (auto_load_section_scripts): Use
7142         gdb::unique_xmalloc_ptr.
7143
7144 2018-02-09  Tom Tromey  <tom@tromey.com>
7145
7146         * auto-load.c (execute_script_contents): Use std::string.
7147
7148 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
7149
7150         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
7151         Python function, rather than a new command.
7152
7153 2018-02-08  Tom Tromey  <tom@tromey.com>
7154
7155         * solib.c (solib_find_1): Use std::string.
7156         (solib_bfd_fopen): Use unique_xmalloc_ptr.
7157
7158 2018-02-08  Tom Tromey  <tom@tromey.com>
7159
7160         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
7161
7162 2018-02-08  Tom Tromey  <tom@tromey.com>
7163
7164         * source.c (find_source_lines): Use gdb::def_vector.
7165
7166 2018-02-08  Tom Tromey  <tom@tromey.com>
7167
7168         * macrocmd.c (struct temporary_macro_definition): New.
7169         (macro_define_command): Use temporary_macro_definition.  Remove
7170         cleanups.
7171         (free_macro_definition_ptr): Remove.
7172
7173 2018-02-08  Tom Tromey  <tom@tromey.com>
7174
7175         * macroexp.c (maybe_expand): Use std::string.
7176
7177 2018-02-08  Tom Tromey  <tom@tromey.com>
7178
7179         * macroexp.c (struct macro_buffer): Add initializers for some
7180         members.
7181         (init_buffer, init_shared_buffer, free_buffer)
7182         (free_buffer_return_text): Remove.
7183         (macro_buffer): New constructors.
7184         (~macro_buffer): New destructor.
7185         (macro_buffer::set_shared): New method.
7186         (macro_buffer::resize_buffer, macro_buffer::appendc)
7187         (macro_buffer::appendmem): Now methods, not free functions.
7188         (set_token, append_tokens_without_splicing, stringify)
7189         (macro_stringify): Update.
7190         (gather_arguments): Change return type.  Remove argc_p argument,
7191         add args_ptr argument.  Use std::vector.
7192         (substitute_args): Remove argc argument.  Accept std::vector.
7193         (expand): Update.  Use std::vector.
7194         (scan, macro_expand, macro_expand_next): Update.
7195
7196 2018-02-08  Tom Tromey  <tom@tromey.com>
7197
7198         * symtab.c (default_collect_symbol_completion_matches_break_on):
7199         Use unique_xmalloc_ptr.
7200         * macroscope.h: (sal_macro_scope, user_macro_scope)
7201         (default_macro_scope): Return unique_xmalloc_ptr.
7202         * macroscope.c (sal_macro_scope, user_macro_scope)
7203         (default_macro_scope): Return unique_xmalloc_ptr.
7204         * macroexp.h (macro_expand, macro_expand_once): Return
7205         unique_xmalloc_ptr.
7206         * macroexp.c (macro_expand, macro_expand_once): Return
7207         unique_xmalloc_ptr.
7208         * macrocmd.c (macro_expand_command, macro_expand_once_command)
7209         (info_macro_command, info_macros_command): Use
7210         unique_xmalloc_ptr.
7211         * compile/compile-c-support.c (write_macro_definitions): Use
7212         unique_xmalloc_ptr.
7213         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
7214
7215 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
7216
7217         * value.c (value_static_field): Assign field type instead of
7218         containing type when returning an optimized out value.
7219
7220 2018-02-06  Yao Qi  <yao.qi@linaro.org>
7221
7222         * ft32-tdep.c (ft32_read_pc): Remove.
7223         (ft32_write_pc): Remove.
7224         (ft32_gdbarch_init): Update.
7225         * m32r-tdep.c (m32r_read_pc): Remove.
7226         (m32r_gdbarch_init): Update.
7227         * mep-tdep.c (mep_read_pc): Remove.
7228         (mep_gdbarch_init): Update.
7229         * microblaze-tdep.c (microblaze_write_pc): Remove.
7230         (microblaze_gdbarch_init): Update.
7231         * mn10300-tdep.c (mn10300_read_pc): Remove.
7232         (mn10300_write_pc): Remove.
7233         (mn10300_gdbarch_init): Update.
7234         * moxie-tdep.c (moxie_read_pc): Remove.
7235         (moxie_write_pc): Remove.
7236         (moxie_gdbarch_init): Update.
7237
7238 2018-02-06  Yao Qi  <yao.qi@linaro.org>
7239
7240         * expprint.c (print_subexp_standard): Handle
7241         OP_F77_UNDETERMINED_ARGLIST.
7242         (dump_subexp_body_standard): Likewise.
7243
7244 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
7245
7246         * target-descriptions.c (tdesc_element_visitor) Add empty
7247         implementations.
7248         (tdesc_type): Move make_gdb_type from here.
7249         (tdesc_type_builtin): Likewise.
7250         (tdesc_type_vector): Likewise.
7251         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
7252         (make_gdb_type_struct): Move from tdesc_type_with_fields.
7253         (make_gdb_type_union): Likewise.
7254         (make_gdb_type_flags): Likewise.
7255         (make_gdb_type_enum): Likewise.
7256         (make_gdb_type): New function.
7257         (tdesc_register_type): Use static make_gdb_type.
7258
7259 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
7260
7261         * infcmd.c (default_print_one_register_info): Align natural-format
7262         column values consistently one under another.
7263         (pad_to_column): New function.
7264
7265 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
7266
7267         * dwarf2read.c (dwarf2_physname): Move commment.
7268
7269 2018-02-01  Leszek Swirski  <leszeks@google.com>
7270
7271         * varobj.c (varobj_formatted_print_options): Allow recursive
7272         pretty printing if pretty printing is enabled.
7273
7274 2018-02-01  Leszek Swirski  <leszeks@google.com>
7275
7276         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
7277         names after a structop as a filename.
7278
7279 2018-02-01  Yao Qi  <yao.qi@linaro.org>
7280
7281         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
7282         (arm_record_coproc_data_proc): Likewise.
7283
7284 2018-02-01  Yao Qi  <yao.qi@linaro.org>
7285
7286         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
7287
7288 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
7289
7290         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
7291         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
7292
7293 2018-01-31  Pedro Alves  <palves@redhat.com>
7294
7295         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
7296         * inflow.c (child_terminal_save_inferior): Wrap reference to
7297         tcgetpgrp in HAVE_TERMIOS_H.
7298         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
7299         _WIN32.
7300         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
7301         always iterate over all inferiors.
7302         (gdbsim_cntrl_c): Adjust.
7303         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
7304
7305 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
7306
7307         * gdbtypes.c (lookup_array_range_type): Make sure the array's
7308         index type is objfile-owned if the element type is as well.
7309
7310 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
7311
7312         GDB 8.1 released.
7313
7314 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7315
7316         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
7317         "features/s390x-linux64.c".
7318         (_initialize_s390_linux_tdep): Remove initialization of tdescs
7319         s390_linux32 and s390x_linux64.
7320         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
7321         default tdesc.
7322         * s390-tdep.c: Include "features/s390-linux32.c" and
7323         "features/s390x-linux64.c".
7324         (s390_tdesc_valid): Add check for tdesc_has_registers.
7325         (s390_gdbarch_init): Make sure there is always a valid tdesc.
7326         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
7327         tdesc_s390x_linux64.
7328         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
7329         tdesc_s390x_linux64 to...
7330         * s390-tdep.h: ...here.
7331
7332 2018-01-30  Pedro Alves  <palves@redhat.com>
7333
7334         PR gdb/13211
7335         * config.in, configure: Regenerate.
7336         * configure.ac: Check for getpgid.
7337         * go32-nat.c (go32_pass_ctrlc): New.
7338         (go32_target): Install it.
7339         * inf-child.c (inf_child_target): Install
7340         child_terminal_save_inferior, child_pass_ctrlc and
7341         child_interrupt.
7342         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
7343         (inf_ptrace_target): No longer install it.
7344         * infcmd.c (interrupt_target_1): Adjust.
7345         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
7346         (child_interrupt): Declare.
7347         (inferior::terminal_state): New.
7348         * inflow.c (struct terminal_info): Update comments.
7349         (inferior_process_group): Delete.
7350         (terminal_is_ours): Delete.
7351         (gdb_tty_state): New.
7352         (child_terminal_init): Adjust.
7353         (is_gdb_terminal, sharing_input_terminal_1)
7354         (sharing_input_terminal): New functions.
7355         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
7356         Set the process's actual process group in the foreground if
7357         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
7358         mark terminal as the inferior's if not sharing GDB's terminal.
7359         Don't check attach_flag.
7360         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
7361         pass down a target_terminal_state.
7362         (child_terminal_save_inferior): New, factored out from ...
7363         (child_terminal_ours_1): ... this.  Handle
7364         target_terminal_state::is_ours_for_output.
7365         (child_interrupt, child_pass_ctrlc): New.
7366         (inflow_inferior_exit): Clear the inferior's terminal_state.
7367         (copy_terminal_info): Copy the inferior's terminal state.
7368         (_initialize_inflow): Remove reference to terminal_is_ours.
7369         * inflow.h (inferior_process_group): Delete.
7370         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
7371         * procfs.c (procfs_target): Don't install procfs_interrupt.
7372         (procfs_interrupt): Delete.
7373         * remote.c (remote_serial_quit_handler): Adjust.
7374         (remote_interrupt): Remove ptid parameter.  Adjust.
7375         * target-delegates.c: Regenerate.
7376         * target.c: Include "terminal.h".
7377         (target_terminal::terminal_state): Rename to ...
7378         (target_terminal::m_terminal_state): ... this.
7379         (target_terminal::init): Adjust.
7380         (target_terminal::inferior): Adjust to per-inferior
7381         terminal_state.
7382         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
7383         (target_terminal::ours, target_terminal::ours_for_output): Use
7384         target_terminal_is_ours_kind.
7385         (target_interrupt): Remove ptid parameter.  Adjust.
7386         (default_target_pass_ctrlc): Adjust.
7387         * target.h (target_ops::to_terminal_save_inferior): New field.
7388         (target_ops::to_interrupt): Remove ptid_t parameter.
7389         (target_interrupt): Remove ptid_t parameter.  Update comment.
7390         (target_pass_ctrlc): Update comment.
7391         * target/target.h (target_terminal_state): New scoped enum,
7392         factored out of ...
7393         (target_terminal::terminal_state): ... here.
7394         (target_terminal::inferior): Update comments.
7395         (target_terminal::restore_inferior): New.
7396         (target_terminal::is_inferior, target_terminal::is_ours)
7397         (target_terminal::is_ours_for_output): Adjust.
7398         (target_terminal::scoped_restore_terminal_state): Adjust to
7399         rename, and call restore_inferior() instead of inferior().
7400         (target_terminal::scoped_restore_terminal_state::m_state): Change
7401         type.
7402         (target_terminal::terminal_state): Rename to ...
7403         (target_terminal::m_terminal_state): ... this and change type.
7404
7405 2018-01-30  Pedro Alves  <palves@redhat.com>
7406
7407         * linux-nat.c (wait_for_signal): New function.
7408         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
7409         directly.
7410         (async_terminal_is_ours)
7411         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
7412         (linux_nat_add_target): Don't override
7413         to_terminal_inferior/to_terminal_ours.
7414
7415 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
7416
7417         * remote.c (remote_follow_fork): Don't call "detach_inferior".
7418
7419 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
7420
7421         * dwarf2read.c (free_dwo_files): Add forward-declaration.
7422         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
7423         dwarf2_per_objfile_free here.
7424         (dwarf2_per_objfile_free): Remove.
7425         (_initialize_dwarf2_read): Don't register
7426         dwarf2_per_objfile_free as a registry cleanup.
7427
7428 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
7429
7430         Avoid compilation errors in MinGW native builds
7431
7432         The error is triggered by including python-internal.h, and the
7433         error message is:
7434
7435              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
7436                       from build-gnulib/import/math.h:27,
7437                       from d:/usr/Python26/include/pyport.h:235,
7438                       from d:/usr/Python26/include/Python.h:58,
7439                       from python/python-internal.h:94,
7440                       from python/py-arch.c:24:
7441              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
7442         using ::hypot;
7443                 ^~~~~
7444
7445         This happens because Python headers define 'hypot' to expand t
7446         '_hypot' in the Windows builds.
7447         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
7448         'hypoth'.  This avoids a compilation error.
7449
7450 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
7451
7452         * MAINTAINERS (Write After Approval): Fix ordering.
7453
7454 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
7455
7456         * MAINTAINERS (Write After Approval): Add Alan Hayward.
7457
7458 2018-01-26  Alan Modra  <amodra@gmail.com>
7459
7460         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
7461         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
7462         Remove nop.  Make const.  Comment.
7463         (powerpc32_plt_stub_so_2): New.
7464         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
7465         Correct count.  Update uses.
7466         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
7467         Move common code reading PLT entry word.  Correct
7468         powerpc32_plt_stub PLT address calculation.
7469         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
7470         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
7471         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
7472         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
7473         (ppc64_standard_linkage8): Likewise.
7474         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
7475         Correct insns description.
7476         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
7477
7478 2018-01-24  Pedro Alves  <palves@redhat.com>
7479
7480         GCC PR libstdc++/83906
7481         * gdbtypes.c (operator==(const dynamic_prop &,
7482         const dynamic_prop &)): New.
7483         (operator==(const range_bounds &, const range_bounds &)): New.
7484         (check_types_equal): Use them instead of memcmp.
7485         * gdbtypes.h (operator==(const dynamic_prop &,
7486         const dynamic_prop &)): Declare.
7487         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
7488         (operator==(const range_bounds &, const range_bounds &)): Declare.
7489         (operator!=(const range_bounds &, const range_bounds &)): Declare.
7490
7491 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7492
7493         * s390-linux-tdep.c (s390_record_address_mask)
7494         (s390_record_calc_disp_common, s390_record_calc_disp)
7495         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
7496         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
7497         (s390_process_record): Move to s390-tdep.c.
7498         (s390_linux_init_abi_any): Adjust.
7499         * s390-tdep.c (s390_record_address_mask)
7500         (s390_record_calc_disp_common, s390_record_calc_disp)
7501         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
7502         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
7503         (s390_process_record): Moved from s390-linux-tdep.c
7504         (s390_gdbarch_init): Adjust.
7505
7506 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7507
7508         * s390-linux-nat.c (s390-tdep.h): New include.
7509         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
7510         (HFILES_NO_SRCDIR): Add s390-tdep.h.
7511         (ALLDEPFILES): Add s390-tdep.c.
7512         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
7513         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
7514         * s390-tdep.h: ...this.  New file.
7515         * s390-linux-tdep.c (s390-tdep.h): New include.
7516         (_initialize_s390_tdep): Rename to...
7517         (_initialize_s390_linux_tdep): ...this and adjust.
7518         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
7519         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
7520         s390-tdep.h.
7521         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
7522         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
7523         (s390_is_partial_instruction, s390_software_single_step)
7524         (is_non_branch_ril, s390_displaced_step_copy_insn)
7525         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
7526         (s390_prologue_data, s390_addr, s390_store, s390_load)
7527         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
7528         (s390_register_call_saved, s390_guess_tracepoint_registers)
7529         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
7530         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
7531         (s390_pseudo_register_name, s390_pseudo_register_type)
7532         (s390_pseudo_register_read, s390_pseudo_register_write)
7533         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
7534         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
7535         (s390_addr_bits_remove, s390_address_class_type_flags)
7536         (s390_address_class_type_flags_to_name)
7537         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
7538         (s390_function_arg_float, s390_function_arg_vector)
7539         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
7540         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
7541         (s390_frame_align, s390_register_return_value, s390_return_value)
7542         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
7543         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
7544         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
7545         (s390_trad_frame_prev_register, s390_unwind_cache)
7546         (s390_prologue_frame_unwind_cache)
7547         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
7548         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
7549         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
7550         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
7551         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
7552         (s390_frame_base_address, s390_local_base_address)
7553         (s390_frame_base, s390_gcc_target_options)
7554         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
7555         (s390_validate_reg_range, s390_tdesc_valid)
7556         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
7557         * s390-tdep.c: ...this.  New file.
7558
7559 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7560
7561         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
7562         (s390_process_record, s390_gdbarch_tdep_alloc)
7563         (s390_linux_init_abi_any): Use/set new hook.
7564
7565 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7566
7567         * s390-linux-tdep.c (osabi.h): New include.
7568         (s390_linux_init_abi_31, s390_linux_init_abi_64)
7569         (s390_linux_init_abi_any): New functions.
7570         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
7571
7572 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7573
7574         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
7575         tdesc_has_registers check
7576
7577 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7578
7579         * s390-linux-tdep.c (s390_tdesc_valid): New function.
7580         (s390_validate_reg_range): New macro.
7581         (s390_gdbarch_init): Adjust.
7582
7583 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7584
7585         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
7586         (s390_gdbarch_tdep_alloc): Adjust.
7587         (s390_gdbarch_init): Adjust.
7588
7589 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7590
7591         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
7592         <have_tdb>: Change type to bool.
7593         (s390_gdbarch_tdep_alloc): Adjust.
7594         (s390_gdbarch_init): Adjust.
7595
7596 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7597
7598         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
7599         (gdbarch_tdep) <have_upper, have_vx>: New fields.
7600         (s390_gdbarch_tdep_alloc): New function.
7601         (s390_gdbarch_init): Allocate tdep at start and use its fields
7602         instead of separate variables.
7603
7604 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7605
7606         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
7607         when looking for cached gdbarch and add comment for remaining.
7608
7609 2018-01-22  Pedro Alves  <palves@redhat.com>
7610             Sergio Durigan Junior  <sergiodj@redhat.com>
7611
7612         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
7613         case.
7614
7615 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
7616
7617         * MAINTAINERS: Update my company e-mail address.
7618
7619 2018-01-22  Yao Qi  <yao.qi@linaro.org>
7620
7621         * regcache.c (cooked_write_test): New function.
7622         (_initialize_regcache): Register the test.
7623
7624 2018-01-22  Yao Qi  <yao.qi@linaro.org>
7625
7626         * ia64-tdep.c (ia64_pseudo_register_read): Call
7627         regcache->cooked_read instead of regcache_cooked_read_unsigned.
7628         * m32c-tdep.c (m32c_cat_read): Likewise.
7629         (m32c_r3r2r1r0_read): Likewise.
7630         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7631         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7632
7633 2018-01-22  Yao Qi  <yao.qi@linaro.org>
7634
7635         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
7636         method raw_read instead of regcache_raw_read.
7637         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7638         * arm-tdep.c (arm_neon_quad_read): Likewise.
7639         * avr-tdep.c (avr_pseudo_register_read): Likewise.
7640         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7641         * frv-tdep.c (frv_pseudo_register_read): Likewise.
7642         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
7643         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7644         (i386_pseudo_register_read_into_value): Likewise.
7645         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7646         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7647         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7648         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
7649         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
7650         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
7651         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7652         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
7653         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
7654
7655 2018-01-22  Yao Qi  <yao.qi@linaro.org>
7656
7657         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
7658         * configure.tgt: Remove target mt.
7659         * mt-tdep.c: Remove.
7660         * regcache.c (cooked_read_test): Remove the check for mt.
7661
7662 2018-01-22  Yao Qi  <yao.qi@linaro.org>
7663
7664         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
7665         instead of gdbarch_pseudo_register_read_value.
7666
7667 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
7668
7669         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
7670         language is Ada.
7671
7672 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
7673
7674         * linespec.c (create_sals_line_offset): Remove code that preserved
7675         the symtab_and_line's line number.
7676
7677 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
7678
7679         * varobj.c (varobj_create): Don't set valid_block when creating a
7680         floating varobj.
7681
7682 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
7683
7684         * varobj.c (varobj_create): Remove out of date comment.
7685
7686 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
7687
7688         PR mi/20395
7689         * ada-exp.y (write_var_from_sym): Pass extra parameter when
7690         updating innermost block.
7691         * parse.c (innermost_block_tracker::update): Take extra type
7692         parameter, and check types match before updating innermost block.
7693         (write_dollar_variable): Update innermost block for registers.
7694         * parser-defs.h (enum innermost_block_tracker_type): New enum.
7695         (innermost_block_tracker::innermost_block_tracker): Initialise
7696         m_types member.
7697         (innermost_block_tracker::reset): Take type parameter.
7698         (innermost_block_tracker::update): Take type parameter, and pass
7699         type through as needed.
7700         (innermost_block_tracker::m_types): New member.
7701         * varobj.c (varobj_create): Pass type when reseting innermost
7702         block.
7703
7704 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
7705
7706         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
7707         * ada-lang.c (resolve_subexp): Likewise.
7708         * breakpoint.c (set_breakpoint_condition) Likewise.
7709         (watch_command_1) Likewise.
7710         * c-exp.y (variable): Likewise.
7711         * d-exp.y (PrimaryExpression): Likewise.
7712         * f-exp.y (variable): Likewise.
7713         * go-exp.y (variable): Likewise.
7714         * m2-exp.y (variable): Likewise.
7715         * objfiles.c (objfile::~objfile): Likewise.
7716         * p-exp.y (variable): Likewise.
7717         * parse.c (innermost_block): Change type.
7718         * parser-defs.h (class innermost_block_tracker): New.
7719         (innermost_block): Change to innermost_block_tracker.
7720         * printcmd.c (display_command): Switch to innermost_block API.
7721         (do_one_display): Likewise.
7722         * rust-exp.y (do_one_display): Likewise.
7723         * symfile.c (clear_symtab_users): Likewise.
7724         * varobj.c (varobj_create): Switch to innermost_block API, replace
7725         use of innermost_block with block stored on varobj object.
7726
7727 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
7728
7729         * expression.h (innermost_block): Remove declaration.
7730         * varobj.c: Add 'parser-defs.h' include.
7731
7732 2018-01-19  Tom Tromey  <tom@tromey.com>
7733
7734         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
7735         symbols in the static and global blocks.
7736
7737 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
7738
7739         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
7740         gdb_ptrace.h, and move including gdb_wait.h ...
7741         * nat/linux-ptrace.h: ... to here.
7742
7743 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
7744
7745         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
7746         inf_ptrace_detach_success.
7747         (inf_ptrace_detach_success): Add inferior parameter, use it
7748         instead of inferior_ptid, pass it to detach_inferior.
7749         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
7750         parameter.
7751         * inferior.c (detach_inferior): Add overload that takes an
7752         inferior object.
7753         * inferior.h (detach_inferior): Likewise.
7754         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
7755         use inferior_ptid, adjust call to inf_ptrace_detach_success.
7756         * linux-thread-db.c (thread_db_detach): Use inf parameter.
7757
7758 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
7759
7760         * target.h (struct target_ops) <to_detach>: Add inferior
7761         parameter.
7762         (target_detach): Likewise.
7763         * target.c (dispose_inferior): Pass inferior down.
7764         (target_detach): Pass inferior down.  Assert that it is equal to
7765         the current inferior.
7766         * aix-thread.c (aix_thread_detach): Pass inferior down.
7767         * corefile.c (core_file_command): Pass current_inferior() down.
7768         * corelow.c (core_detach): Add inferior parameter.
7769         * darwin-nat.c (darwin_detach): Likewise.
7770         * gnu-nat.c (gnu_detach): Likewise.
7771         * inf-ptrace.c (inf_ptrace_detach): Likewise.
7772         * infcmd.c (detach_command): Pass current_inferior() down to
7773         target_detach.
7774         * infrun.c (follow_fork_inferior): Pass parent_inf to
7775         target_detach.
7776         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
7777         target_detach.
7778         * linux-nat.c (linux_nat_detach): Add inferior parameter.
7779         * linux-thread-db.c (thread_db_detach): Likewise.
7780         * nto-procfs.c (procfs_detach): Likewise.
7781         * procfs.c (procfs_detach): Likewise.
7782         * record.c (record_detach): Likewise.
7783         * record.h (struct inferior): Forward-declare.
7784         (record_detach): Add inferior parameter.
7785         * remote-sim.c (gdbsim_detach): Likewise.
7786         * remote.c (remote_detach_1): Likewise.
7787         (remote_detach): Likewise.
7788         (extended_remote_detach): Likewise.
7789         * sol-thread.c (sol_thread_detach): Likewise.
7790         * target-debug.h (target_debug_print_inferior_p): New macro.
7791         * target-delegates.c: Re-generate.
7792         * top.c (kill_or_detach): Pass inferior down to target_detach.
7793         * windows-nat.c (windows_detach): Add inferior parameter.
7794
7795 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
7796
7797         * target.h (struct target_ops) <to_detach>: Remove args
7798         parameter.
7799         (target_detach): Likewise.
7800         * target.c (dispose_inferior): Adjust.
7801         (target_detach): Remove args parameter, adjust.
7802         * aix-thread.c (aix_thread_detach): Adjust.
7803         * corefile.c (core_file_command): Adjust.
7804         * corelow.c (core_detach): Adjust.
7805         * darwin-nat.c (darwin_detach): Adjust.
7806         * gnu-nat.c (gnu_detach): Adjust.
7807         * inf-ptrace.c (inf_ptrace_detach): Adjust.
7808         * infcmd.c (detach_command): Adjust
7809         * infrun.c (follow_fork_inferior): Adjust.
7810         (handle_vfork_child_exec_or_exit): Adjust.
7811         * linux-fork.c (linux_fork_detach): Remove args parameter.
7812         * linux-fork.h (linux_fork_detach): Likewise.
7813         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
7814         * linux-thread-db.c (thread_db_detach): Likewise.
7815         * nto-procfs.c (procfs_detach): Likewise.
7816         * procfs.c (procfs_detach): Likewise.
7817         (do_detach): Remove signo parameter.
7818         * record.c (record_detach): Remove args parameter.
7819         * record.h (record_detach): Likewise.
7820         * remote-sim.c (gdbsim_detach): Likewise.
7821         * remote.c (remote_detach_1): Likewise.
7822         (remote_detach): Likewise.
7823         (extended_remote_detach): Likewise.
7824         * sol-thread.c (sol_thread_detach): Likewise.
7825         * target-delegates.c: Re-generate.
7826         * top.c (struct qt_args) <args>: Remove field.
7827         (kill_or_detach): Don't pass args.
7828         (quit_force): Don't set args.
7829         * windows-nat.c (windows_detach): Remove args parameter.
7830
7831 2018-01-19  Yao Qi  <yao.qi@linaro.org>
7832
7833         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
7834         (arm_linux_init_abi): Install it.
7835
7836 2018-01-19  Yao Qi  <yao.qi@linaro.org>
7837
7838         * osabi.c (gdb_osabi_names): Extend the regexp for
7839         arm-linux-gnueabihf.
7840
7841 2018-01-18  Yao Qi  <yao.qi@linaro.org>
7842
7843         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
7844         m_abbrevs.
7845         (abbrev_table::add_abbrev): Update.
7846         (abbrev_table::lookup_abbrev): Update.
7847
7848 2018-01-18  Yao Qi  <yao.qi@linaro.org>
7849
7850         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
7851
7852 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
7853
7854         * compile/compile.c (compile_to_object): Convert "triplet_rx"
7855         to "std::string".
7856
7857 2018-01-17  Tom Tromey  <tom@tromey.com>
7858
7859         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
7860
7861 2018-01-17  Tom Tromey  <tom@tromey.com>
7862
7863         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
7864         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
7865         (create_array_type_with_stride): Update.
7866         * dwarf2read.c (set_die_type): Update.
7867
7868 2018-01-17  Tom Tromey  <tom@tromey.com>
7869
7870         * dwarf2read.c (delayed_method_info): Remove typedef.
7871         (dwarf2_cu::method_info): Now a std::vector.
7872         (add_to_method_list): Update.
7873         (free_delayed_list): Remove.
7874         (compute_delayed_physnames): Update.
7875         (process_full_comp_unit, process_full_type_unit): Clear the method
7876         list.  Remove cleanups.
7877         (psymtab_include_file_name): Add name_holder parameter.  Use
7878         unique_xmalloc_ptr.
7879         (dwarf_decode_lines): Update.
7880
7881 2018-01-17  Tom Tromey  <tom@tromey.com>
7882             Simon Marchi  <simon.marchi@ericsson.com>
7883
7884         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
7885         (dwarf2_per_objfile::free_cached_comp_units)
7886         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7887         (init_cutu_and_read_dies_no_follow): Update.
7888         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
7889         (dwarf2_cu::~dwarf2_cu): New.
7890         (free_heap_comp_unit, free_stack_comp_unit): Remove.
7891         (age_cached_comp_units, free_one_cached_comp_unit): Update.
7892
7893 2018-01-17  Tom Tromey  <tom@tromey.com>
7894             Simon Marchi  <simon.marchi@ericsson.com>
7895
7896         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
7897         (struct die_reader_specs) <abbrev_table>: New member.
7898         (struct abbrev_table): Add constructor.
7899         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
7900         <abbrev_obstack>: Now an auto_obstack.
7901         (abbrev_table_up): New typedef.
7902         (init_cu_die_reader): Add abbrev_table parameter.
7903         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
7904         Add result_dwo_abbrev_table.
7905         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7906         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
7907         Update.
7908         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
7909         parameter.
7910         (skip_children): Update.
7911         (abbrev_table::alloc_abbrev): Rename from
7912         abbrev_table_alloc_abbrev.
7913         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
7914         (abbrev_table::lookup_abbrev): Rename from
7915         abbrev_table_lookup_abbrev.
7916         (abbrev_table_read_table): Return abbrev_table_up.
7917         (abbrev_table_free, abbrev_table_free_cleanup)
7918         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
7919         (load_partial_dies): Update.
7920
7921 2018-01-17  Tom Tromey  <tom@tromey.com>
7922
7923         * dwarf2read.c (dwarf2_compute_name): Update comment.
7924         (read_func_scope, read_variable): Update.
7925         (new_symbol): Remove.
7926         (new_symbol_full): Rename to new_symbol.
7927
7928 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
7929
7930         PR gdb/16577
7931         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
7932         a warning instead of throwing an error, set section size to 0 and return
7933         NULL.
7934         * gdb_bfd.h (gdb_bfd_map_section): Update description.
7935
7936 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
7937
7938         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
7939         std::string.
7940         (linux_ptrace_attach_fail_reason_string): Likewise.
7941         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
7942         Likewise.
7943         (linux_ptrace_attach_fail_reason_string): Likewise.
7944         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
7945
7946 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
7947
7948         * linux-nat.c (linux_nat_attach): Remove xstrdup.
7949
7950 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
7951
7952         PR gdb/21559
7953         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
7954         checking for fs_base/gs_base fields in struct user_regs_struct.
7955         * configure: Regenerate.
7956
7957 2018-01-17  Yao Qi  <yao.qi@linaro.org>
7958
7959         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
7960         function.
7961         (aarch64_linux_init_abi): Install it to gdbarch hook
7962         gcc_target_options.
7963
7964 2018-01-15  Pedro Alves  <palves@redhat.com>
7965
7966         * common/signals-state-save-restore.c
7967         (save_original_signals_state): Fix typos.
7968
7969 2017-01-12  Tom Tromey  <tom@tromey.com>
7970             Sergio Durigan Junior  <sergiodj@redhat.com>
7971
7972         * Makefile.in (install-only): Install gdb-add-index.
7973
7974 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
7975
7976         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
7977
7978 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7979
7980         * infrun.c (keep_going_pass_signal): Clear step-over info when
7981         insert_breakpoints fails.
7982
7983 2018-01-11  Pedro Alves  <palves@redhat.com>
7984
7985         PR gdb/22583
7986         * infrun.c (resume): Rename to ...
7987         (resume_1): ... this.
7988         (resume): Reimplement as wrapper around resume_1.
7989
7990 2018-01-11  Pedro Alves  <palves@redhat.com>
7991
7992         PR remote/22597
7993         * remote.c (remote_parse_stop_reply): Default to the last-set
7994         general thread instead of to 'magic_null_ptid'.
7995
7996 2018-01-10  Pedro Alves  <palves@redhat.com>
7997
7998         * language.h (language_get_symbol_name_matcher): Rename ...
7999         (get_symbol_name_matcher): ... this.
8000         * language.c (language_get_symbol_name_matcher): Ditto.
8001         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
8002         callers adjusted.
8003
8004 2018-01-10  Pedro Alves  <palves@redhat.com>
8005
8006         PR gdb/22670
8007         * dwarf2read.c
8008         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
8009         Adjust to use language_get_symbol_name_matcher instead of
8010         language_defn::la_get_symbol_name_matcher.
8011         * language.c (language_get_symbol_name_matcher): If in Ada mode
8012         and the lookup name is a verbatim match, return Ada's matcher.
8013         * language.h (language_get_symbol_name_matcher): Adjust comment.
8014         (ada_lookup_name_info::verbatim_p):: New method.
8015
8016 2018-01-10  Pedro Alves  <palves@redhat.com>
8017
8018         PR gdb/22670
8019         * ada-lang.c (ada_collect_symbol_completion_matches): If the
8020         minsym's language is language_auto or language_cplus, pass down
8021         language_ada instead.
8022         * symtab.c (compare_symbol_name): Don't frob symbol language here.
8023
8024 2018-01-10  Pedro Alves  <palves@redhat.com>
8025
8026         PR gdb/22670
8027         * minsyms.c (linkage_name_str): New function.
8028         (iterate_over_minimal_symbols): Use it.
8029
8030 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
8031
8032         * NEWS: Document that 'info proc' now works on FreeBSD.
8033
8034 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
8035
8036         * configure.ac: Check for kinfo_getfile in libutil.
8037         * configure: Regenerate.
8038         * config.in: Regenerate.
8039         * fbsd-nat.c: Include "fbsd-tdep.h".
8040         (fbsd_fetch_cmdline): New.
8041         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
8042         rather than calling error.
8043         (fbsd_info_proc): New.
8044         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
8045         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
8046         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
8047
8048 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
8049
8050         * fbsd-nat.c (struct free_deleter): Remove.
8051         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
8052
8053 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
8054
8055         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
8056         NULL for an empty pathname.
8057
8058 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
8059
8060         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
8061         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
8062         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
8063         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
8064         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
8065         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
8066         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
8067         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
8068         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
8069         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
8070         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
8071         (fbsd_core_fetch_timeval, fbsd_print_sigset)
8072         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
8073         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
8074         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
8075
8076 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
8077
8078         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
8079         (gnu_xfer_auxv): New function.
8080         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
8081         TARGET_OBJECT_AUXV.
8082
8083 2018-01-08  Yao Qi  <yao.qi@linaro.org>
8084             Simon Marchi  <simon.marchi@ericsson.com>
8085
8086         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
8087         common/selftest.c.
8088         (COMMON_OBS): Remove selftest.o.
8089         * configure.ac: Append selftest-arch.c and common/selftest.c to
8090         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
8091         * configure: Re-generated.
8092         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
8093         GDB_SELF_TEST.
8094         (maintenance_info_selftests): Likewise.
8095
8096 2018-01-08  Xavier Roirand  <roirand@adacore.com>
8097
8098         * ada-valprint.c (val_print_packed_array_elements): Use
8099         proper number of elements when printing an array indexed
8100         by an enumeration type.
8101
8102 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
8103
8104         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
8105         (dw2_get_file_names_reader): Adjust.
8106         (lookup_dwo_signatured_type): Adjust.
8107         (lookup_dwp_signatured_type): Adjust.
8108         (lookup_signatured_type): Adjust.
8109         (create_type_unit_group): Adjust.
8110         (get_type_unit_group): Adjust.
8111         (process_psymtab_comp_unit_reader): Adjust.
8112         (build_type_psymtabs_reader): Adjust.
8113         (scan_partial_symbols): Adjust.
8114         (add_partial_symbol): Adjust.
8115         (add_partial_subprogram): Adjust.
8116         (peek_die_abbrev): Adjust.
8117         (fixup_go_packaging): Adjust.
8118         (process_imported_unit_die): Adjust.
8119         (dwarf2_compute_name): Adjust.
8120         (dwarf2_physname): Adjust.
8121         (read_import_statement): Adjust.
8122         (handle_DW_AT_stmt_list): Adjust.
8123         (read_file_scope): Adjust.
8124         (read_func_scope): Adjust.
8125         (read_lexical_block_scope): Adjust.
8126         (read_call_site_scope): Adjust.
8127         (read_variable): Adjust.
8128         (dwarf2_rnglists_process): Adjust.
8129         (dwarf2_ranges_process): Adjust.
8130         (dwarf2_ranges_read): Adjust.
8131         (dwarf2_get_pc_bounds): Adjust.
8132         (dwarf2_record_block_ranges): Adjust.
8133         (dwarf2_add_field): Adjust.
8134         (dwarf2_add_member_fn): Adjust.
8135         (read_structure_type): Adjust.
8136         (process_structure_scope): Adjust.
8137         (read_enumeration_type): Adjust.
8138         (read_array_type): Adjust.
8139         (mark_common_block_symbol_computed): Adjust.
8140         (read_common_block): Adjust.
8141         (read_namespace_type): Adjust.
8142         (read_namespace): Adjust.
8143         (read_module_type): Adjust.
8144         (read_tag_pointer_type): Adjust.
8145         (read_tag_ptr_to_member_type): Adjust.
8146         (read_tag_string_type): Adjust.
8147         (read_subroutine_type): Adjust.
8148         (read_typedef): Adjust.
8149         (read_base_type): Adjust.
8150         (attr_to_dynamic_prop): Adjust.
8151         (read_subrange_type): Adjust.
8152         (read_unspecified_type): Adjust.
8153         (dwarf2_read_abbrevs): Adjust.
8154         (load_partial_dies): Adjust.
8155         (read_partial_die): Adjust.
8156         (find_partial_die): Adjust.
8157         (guess_partial_die_structure_name): Adjust.
8158         (fixup_partial_die): Adjust.
8159         (read_attribute_value): Adjust.
8160         (read_addr_index): Adjust.
8161         (read_addr_index_from_leb128): Adjust.
8162         (read_str_index): Adjust.
8163         (dwarf2_string_attr): Adjust.
8164         (get_debug_line_section): Adjust.
8165         (dwarf_decode_line_header): Adjust.
8166         (lnp_state_machine::check_line_address): Adjust.
8167         (dwarf_decode_lines_1): Adjust.
8168         (dwarf_decode_lines): Adjust.
8169         (dwarf2_start_symtab): Adjust.
8170         (var_decode_location): Adjust.
8171         (new_symbol_full): Adjust.
8172         (dwarf2_const_value_data): Adjust.
8173         (dwarf2_const_value_attr): Adjust.
8174         (dwarf2_const_value): Adjust.
8175         (die_type): Adjust.
8176         (die_containing_type): Adjust.
8177         (build_error_marker_type): Adjust.
8178         (lookup_die_type): Adjust.
8179         (guess_full_die_structure_name): Adjust.
8180         (anonymous_struct_prefix): Adjust.
8181         (determine_prefix): Adjust.
8182         (dwarf2_name): Adjust.
8183         (follow_die_ref_or_sig): Adjust.
8184         (follow_die_offset): Adjust.
8185         (follow_die_ref): Adjust.
8186         (follow_die_sig_1): Adjust.
8187         (follow_die_sig): Adjust.
8188         (get_signatured_type): Adjust.
8189         (get_DW_AT_signature_type): Adjust.
8190         (decode_locdesc): Adjust.
8191         (dwarf_decode_macros): Adjust.
8192         (cu_debug_loc_section): Adjust.
8193         (fill_in_loclist_baton): Adjust.
8194         (dwarf2_symbol_mark_computed): Adjust.
8195         (init_one_comp_unit): Don't assign
8196         dwarf2_cu::dwarf2_per_objfile.
8197         (set_die_type): Adjust.
8198
8199 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
8200
8201         * dwarf2read.c (struct mapped_debug_names): Add constructor.
8202         <dwarf2_per_objfile>: New field.
8203         (dwarf2_per_objfile): Remove global.
8204         (get_dwarf2_per_objfile): New function.
8205         (set_dwarf2_per_objfile): New function.
8206         (dwarf2_build_psymtabs_hard): Change objfile parameter to
8207         dwarf2_per_objfile.
8208         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8209         (read_abbrev_offset): Likewise.
8210         (read_indirect_string): Likewise.
8211         (read_indirect_line_string): Likewise.
8212         (read_indirect_string_at_offset): Likewise.
8213         (read_indirect_string_from_dwz): Likewise.
8214         (dwarf2_find_containing_comp_unit): Change objfile parameter to
8215         dwarf2_per_objfile.
8216         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8217         (create_all_comp_units): Change objfile parameter to
8218         dwarf2_per_objfile.
8219         (create_all_type_units): Likewise.
8220         (process_queue): Add dwarf2_per_objfile parameter.
8221         (read_and_check_comp_unit_head): Likewise.
8222         (lookup_dwo_unit_in_dwp): Likewise.
8223         (get_dwp_file): Likewise.
8224         (process_cu_includes): Likewise.
8225         (struct free_dwo_file_cleanup_data): New struct.
8226         (dwarf2_has_info): Use get_dwarf2_per_objfile and
8227         set_dwarf2_per_objfile.
8228         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
8229         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
8230         context, adjust calls.
8231         (dw2_instantiate_symtab): Likewise.
8232         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
8233         (dw2_get_cu): Likewise.
8234         (create_cu_from_index_list): Change objfile parameter to
8235         dwarf2_per_objfile.
8236         (create_cus_from_index_list): Get dwarf2_per_objfile from
8237         context, adjust calls.
8238         (create_cus_from_index): Likewise.
8239         (create_signatured_type_table_from_index): Change objfile
8240         parameter to dwarf2_per_objfile.
8241         (create_signatured_type_table_from_debug_names): Change objfile
8242         parameter to dwarf2_per_objfile.
8243         (create_addrmap_from_index): Likewise.
8244         (create_addrmap_from_aranges): Likewise.
8245         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
8246         (dw2_setup): Remove.
8247         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
8248         context.
8249         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
8250         get_dwarf2_per_objfile.
8251         (dw2_forget_cached_source_info): Likewise.
8252         (dw2_map_symtabs_matching_filename): Likewise.
8253         (struct dw2_symtab_iterator) <index>: Remove.
8254         <dwarf2_per_objfile>: New field.
8255         (dw2_symtab_iter_init): Replace index parameter with
8256         dwarf2_per_objfile.
8257         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
8258         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
8259         (dw2_print_stats): Likewise.
8260         (dw2_dump): Likewise.
8261         (dw2_expand_symtabs_for_function): Likewise.
8262         (dw2_expand_all_symtabs): Likewise.
8263         (dw2_expand_symtabs_with_fullname): Likewise.
8264         (dw2_expand_marked_cus): Replace index and objfile parameters
8265         with dwarf2_per_objfile.
8266         (dw_expand_symtabs_matching_file_matcher): Add
8267         dwarf2_per_objfile parameter and adjust calls.
8268         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
8269         adjust calls.
8270         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
8271         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
8272         adjust calls.
8273         (create_cus_from_debug_names_list): Replace objfile parameter
8274         with dwarf2_per_objfile and adjust calls.
8275         (create_cus_from_debug_names): Likewise.
8276         (dwarf2_read_debug_names): Likewise.
8277         (mapped_debug_names::namei_to_name): Adjust call.
8278         (dw2_debug_names_iterator::next): Likewise.
8279         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
8280         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
8281         (dw2_debug_names_dump): Likewise.
8282         (dw2_debug_names_expand_symtabs_for_function): Likewise.
8283         (dw2_debug_names_expand_symtabs_matching): Likewise.
8284         (dwarf2_initialize_objfile): Likewise.
8285         (dwarf2_build_psymtabs): Likewise.
8286         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
8287         this_cu.
8288         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
8289         (read_and_check_comp_unit_head): Likewise.
8290         (read_abbrev_offset): Likewise.
8291         (create_debug_type_hash_table): Likewise.
8292         (create_debug_types_hash_table): Likewise.
8293         (create_all_type_units): Replace objfile parameter with
8294         dwarf2_per_objfile.
8295         (add_type_unit): Add dwarf2_per_objfile parameter.
8296         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
8297         with dwarf2_per_objfile.
8298         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
8299         (lookup_dwp_signatured_type): Likewise.
8300         (lookup_signatured_type): Likewise.
8301         (read_cutu_die_from_dwo): Likewise.
8302         (init_tu_and_read_dwo_dies): Likewise.
8303         (init_cutu_and_read_dies): Likewise.
8304         (init_cutu_and_read_dies_no_follow): Likewise.
8305         (allocate_type_unit_groups_table): Add objfile parameter.
8306         (create_type_unit_group): Use dwarf2_per_objfile from cu.
8307         (get_type_unit_group): Likewise.
8308         (process_psymtab_comp_unit): Update call.
8309         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
8310         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
8311         (print_tu_stats): Likewise.
8312         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
8313         in void* parameter.
8314         (build_type_psymtabs): Change objfile parameter to
8315         dwarf2_per_objfile.
8316         (process_skeletonless_type_unit): Use dwarf2_per_objfile
8317         passed in void* parameter.
8318         (process_skeletonless_type_units): Change objfile parameter to
8319         dwarf2_per_objfile.
8320         (set_partial_user): Likewise.
8321         (dwarf2_build_psymtabs_hard): Likewise.
8322         (read_comp_units_from_section): Likewise.
8323         (create_all_comp_units): Likewise.
8324         (scan_partial_symbols): Update calls.
8325         (add_partial_symbol): Likewise.
8326         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
8327         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
8328         (process_queue): Add dwarf2_per_objfile parameter.
8329         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
8330         (compute_compunit_symtab_includes): Likewise.
8331         (process_cu_includes): Add dwarf2_per_objfile parameter.
8332         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
8333         (process_full_type_unit): Likewise.
8334         (process_imported_unit_die): Update call.
8335         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
8336         (read_file_scope): Likewise.
8337         (allocate_dwo_file_hash_table): Add objfile parameter.
8338         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
8339         (create_cus_hash_table): Likewise.
8340         (create_dwp_hash_table): Likewise.
8341         (create_dwo_unit_in_dwp_v1): Likewise.
8342         (create_dwp_v2_section): Likewise.
8343         (create_dwo_unit_in_dwp_v2): Likewise.
8344         (lookup_dwo_unit_in_dwp): Likewise.
8345         (try_open_dwop_file): Likewise.
8346         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
8347         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
8348         cleanup to include a reference to dwarf2_per_objfile.
8349         (open_dwp_file): Add dwarf2_per_objfile parameter.
8350         (open_and_init_dwp_file): Likewise.
8351         (get_dwp_file): Likewise.
8352         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
8353         (queue_and_load_all_dwo_tus): Update call.
8354         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
8355         data.
8356         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
8357         (dwarf2_ranges_process): Likewise.
8358         (dwarf2_get_pc_bounds): Likewise.
8359         (mark_common_block_symbol_computed): Likewise.
8360         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8361         (dwarf2_read_abbrevs): Update call.
8362         (read_partial_die): Use dwarf2_per_objfile from cu.
8363         (find_partial_die): Likewise.
8364         (fixup_partial_die): Likewise.
8365         (read_attribute_value): Likewise.
8366         (read_indirect_string_at_offset_from): Add objfile parameter.
8367         (read_indirect_string_at_offset): Add dwarf2_per_objfile
8368         parameter.
8369         (read_indirect_string_from_dwz): Add objfile parameter.
8370         (read_indirect_string): Add objfile parameter.
8371         (read_addr_index_1): Add dwarf2_per_objfile parameter.
8372         (read_addr_index): Use dwarf2_per_objfile from cu.
8373         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
8374         call dw2_setup.
8375         (read_str_index): Use dwarf2_per_objfile from cu.
8376         (get_debug_line_section): Likewise.
8377         (read_formatted_entries): Add dwarf2_per_objfile parameter.
8378         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
8379         (new_symbol_full): Use dwarf2_per_objfile from cu.
8380         (build_error_marker_type): Likewise.
8381         (lookup_die_type): Likewise.
8382         (determine_prefix): Likewise.
8383         (follow_die_offset): Likewise.
8384         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
8385         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
8386         (dwarf2_fetch_die_type_sect_off): Likewise.
8387         (dwarf2_get_die_type): Likewise.
8388         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
8389         (get_signatured_type): Likewise.
8390         (get_DW_AT_signature_type): Likewise.
8391         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
8392         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
8393         (cu_debug_loc_section): Likewise.
8394         (fill_in_loclist_baton): Likewise.
8395         (dwarf2_symbol_mark_computed): Likewise.
8396         (dwarf2_find_containing_comp_unit): Change objfile parameter to
8397         dwarf2_per_objfile.
8398         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
8399         parameter.
8400         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8401         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
8402         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
8403         (set_die_type): Use dwarf2_free_objfile from cu.
8404         (get_die_type_at_offset): Likewise.
8405         (dwarf2_per_objfile_free): Don't assign global variable.
8406         (debug_names) <constructor>: Add dwarf2_per_objfile
8407         parameter, update m_debugstrlookup construction.
8408         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
8409         parameter.
8410         <m_dwarf2_per_objfile>: New field.
8411         <lookup>: Use m_dwarf2_per_objfile.
8412         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
8413         (psyms_seen_size): Likewise.
8414         (write_gdbindex): Replace objfile parameter with
8415         dwarf2_per_objfile.
8416         (write_debug_names): Likewise.
8417         (write_psymtabs_to_index): Likewise.
8418         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
8419         calls.
8420
8421 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
8422
8423         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
8424         <dwarf2_per_objfile>: New field.
8425         (struct dwarf2_per_cu_data) <objfile>: Remove.
8426         <dwarf2_per_objfile>: New field.
8427         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
8428         of objfile.
8429         (create_signatured_type_table_from_index): Likewise.
8430         (create_debug_type_hash_table): Likewise.
8431         (fill_in_sig_entry_from_dwo_entry): Likewise.
8432         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
8433         (create_type_unit_group): Assign dwarf2_per_objfile instead of
8434         objfile.
8435         (create_partial_symtab): Access objfile through
8436         dwarf2_per_objfile.
8437         (process_psymtab_comp_unit_reader): Likewise.
8438         (read_comp_units_from_section): Likewise.
8439         (scan_partial_symbols): Likewise.
8440         (add_partial_symbol): Likewise.
8441         (add_partial_subprogram): Likewise.
8442         (peek_die_abbrev): Likewise.
8443         (fixup_go_packaging): Likewise.
8444         (process_full_comp_unit): Likewise.
8445         (process_full_type_unit): Likewise.
8446         (process_imported_unit_die): Likewise.
8447         (dwarf2_compute_name): Likewise.
8448         (dwarf2_physname): Likewise.
8449         (read_import_statement): Likewise.
8450         (create_cus_hash_table): Assign dwarf2_physname instead of
8451         objfile.
8452         (read_func_scope): Access objfile through dwarf2_per_objfile.
8453         (read_lexical_block_scope): Likewise.
8454         (read_call_site_scope): Likewise.
8455         (read_variable): Likewise.
8456         (dwarf2_rnglists_process): Likewise.
8457         (dwarf2_ranges_process): Likewise.
8458         (dwarf2_ranges_read): Likewise.
8459         (dwarf2_record_block_ranges): Likewise.
8460         (dwarf2_add_field): Likewise.
8461         (dwarf2_add_member_fn): Likewise.
8462         (read_structure_type): Likewise.
8463         (process_structure_scope): Likewise.
8464         (read_enumeration_type): Likewise.
8465         (read_array_type): Likewise.
8466         (read_common_block): Likewise.
8467         (read_namespace_type): Likewise.
8468         (read_namespace): Likewise.
8469         (read_module_type): Likewise.
8470         (read_tag_pointer_type): Likewise.
8471         (read_tag_ptr_to_member_type): Likewise.
8472         (read_tag_string_type): Likewise.
8473         (read_subroutine_type): Likewise.
8474         (read_typedef): Likewise.
8475         (read_base_type): Likewise.
8476         (attr_to_dynamic_prop): Likewise.
8477         (read_subrange_type): Likewise.
8478         (read_unspecified_type): Likewise.
8479         (load_partial_dies): Likewise.
8480         (read_partial_die): Likewise.
8481         (find_partial_die): Likewise.
8482         (guess_partial_die_structure_name): Likewise.
8483         (fixup_partial_die): Likewise.
8484         (read_attribute_value): Likewise.
8485         (read_addr_index_from_leb128): Likewise.
8486         (dwarf2_read_addr_index): Likewise.
8487         (dwarf2_string_attr): Likewise.
8488         (lnp_state_machine::check_line_address): Likewise.
8489         (dwarf_decode_lines_1): Likewise.
8490         (dwarf_decode_lines): Likewise.
8491         (dwarf2_start_symtab): Likewise.
8492         (var_decode_location): Likewise.
8493         (new_symbol_full): Likewise.
8494         (dwarf2_const_value_data): Likewise.
8495         (dwarf2_const_value_attr): Likewise.
8496         (dwarf2_const_value): Likewise.
8497         (die_type): Likewise.
8498         (die_containing_type): Likewise.
8499         (lookup_die_type): Likewise.
8500         (guess_full_die_structure_name): Likewise.
8501         (anonymous_struct_prefix): Likewise.
8502         (dwarf2_name): Likewise.
8503         (follow_die_ref_or_sig): Likewise.
8504         (follow_die_offset): Likewise.
8505         (follow_die_ref): Likewise.
8506         (dwarf2_fetch_die_loc_sect_off): Likewise.
8507         (dwarf2_fetch_constant_bytes): Likewise.
8508         (dwarf2_fetch_die_type_sect_off): Likewise.
8509         (dwarf2_get_die_type): Likewise.
8510         (follow_die_sig): Likewise.
8511         (decode_locdesc): Likewise.
8512         (dwarf2_per_cu_objfile): Likewise.
8513         (dwarf2_per_cu_text_offset): Likewise.
8514         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
8515         objfile.
8516         (set_die_type): Access objfile through
8517         dwarf2_per_objfile.
8518
8519 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
8520
8521         * valprint.c (converted_character_d): Remove typedef.
8522         (DEF_VEC_O (converted_character_d)): Remove.
8523         (count_next_character): Use std::vector.
8524         (print_converted_chars_to_obstack): Likewise.
8525         (generic_printstr): Likewise.
8526
8527 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
8528
8529         * xml-support.h (struct gdb_xml_value): Add constructor.
8530         <value>: Change type to unique_xmalloc_ptr.
8531         (gdb_xml_value_s): Remove typedef.
8532         (DEF_VEC_O (gdb_xml_value_s)): Remove.
8533         (gdb_xml_element_start_handler): Change parameter type to
8534         std::vector.
8535         (xml_find_attribute): Likewise.
8536         * xml-support.c (xml_find_attribute): Change parameter type to
8537         std::vector and adjust.
8538         (gdb_xml_values_cleanup): Remove.
8539         (gdb_xml_parser::start_element): Adjust to std::vector.
8540         (xinclude_start_include): Change paraeter type to std::vector
8541         and adjust.
8542         * btrace.c (check_xml_btrace_version): Likewise.
8543         (parse_xml_btrace_block): Likewise.
8544         (parse_xml_btrace_pt_config_cpu): Likewise.
8545         (parse_xml_btrace_pt): Likewise.
8546         (parse_xml_btrace_conf_bts): Likewise.
8547         (parse_xml_btrace_conf_pt): Likewise.
8548         * memory-map.c (memory_map_start_memory): Likewise.
8549         (memory_map_start_property): Likewise.
8550         * osdata.c (osdata_start_osdata): Likewise.
8551         (osdata_start_item): Likewise.
8552         (osdata_start_column): Likewise.
8553         * remote.c (start_thread): Likewise.
8554         * solib-aix.c (library_list_start_library): Likewise.
8555         (library_list_start_list): Likewise.
8556         * solib-svr4.c (library_list_start_library): Likewise.
8557         (svr4_library_list_start_list): Likewise.
8558         * solib-target.c (library_list_start_segment): Likewise.
8559         (library_list_start_section): Likewise.
8560         (library_list_start_library): Likewise.
8561         (library_list_start_list): Likewise.
8562         * tracepoint.c (traceframe_info_start_memory): Likewise.
8563         (traceframe_info_start_tvar): Likewise.
8564         * xml-syscall.c (syscall_start_syscall): Likewise.
8565         * xml-tdesc.c (tdesc_start_target): Likewise.
8566         (tdesc_start_feature): Likewise.
8567         (tdesc_start_reg): Likewise.
8568         (tdesc_start_union): Likewise.
8569         (tdesc_start_struct): Likewise.
8570         (tdesc_start_flags): Likewise.
8571         (tdesc_start_enum): Likewise.
8572         (tdesc_start_field): Likewise.
8573         (tdesc_start_enum_value): Likewise.
8574         (tdesc_start_vector): Likewise.
8575
8576 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
8577
8578         * extension.h (struct xmethod_worker) <clone>: Remove.
8579         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
8580         Remove.
8581         (python_xmethod_worker::clone): Remove.
8582         * valops.c (find_overload_match): Use std::move instead of
8583         clone.
8584
8585 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
8586
8587         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
8588         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
8589         <free_xmethod_worker_data>: Remove.
8590         <get_matching_xmethod_workers>: Chance VEC to std::vector.
8591         <get_xmethod_arg_types>: Remove.
8592         <get_xmethod_result_type>: Remove.
8593         <invoke_xmethod>: Remove.
8594         * extension.c (new_xmethod_worker): Remove.
8595         (clone_xmethod_worker): Remove.
8596         (get_matching_xmethod_workers): Return void, pass std::vector by
8597         pointer.
8598         (get_xmethod_arg_types): Rename to...
8599         (xmethod_worker::get_arg_types): ... this, and adjust.
8600         (get_xmethod_result_type): Rename to...
8601         (xmethod_worker::get_result_type): ... this, and adjust.
8602         (invoke_xmethod): Remove.
8603         (free_xmethod_worker): Remove.
8604         (free_xmethod_worker_vec): Remove.
8605         * extension.h (enum ext_lang_rc): Move here from
8606         extension-priv.h.
8607         (struct xmethod_worker): Add constructor and destructor.
8608         <data>: Remove.
8609         <value>: Remove.
8610         <invoke, clone, do_get_result_type, do_get_arg_types>: New
8611         virtual pure methods.
8612         <get_arg_types, get_result_type>: New methods.
8613         (xmethod_worker_ptr): Remove typedef.
8614         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
8615         (xmethod_worker_vec): Remove typedef.
8616         (xmethod_worker_up): New typedef.
8617         (invoke_xmethod): Remove.
8618         (clone_xmethod_worker): Remove.
8619         (free_xmethod_worker): Remove.
8620         (free_xmethod_worker_vec): Remove.
8621         (get_xmethod_arg_types): Remove.
8622         (get_xmethod_result_type): Remove.
8623         * valops.c (find_method_list): Use std::vector, don't use
8624         intermediate vector.
8625         (value_find_oload_method_list): Use std::vector.
8626         (find_overload_match): Use std::vector.
8627         (find_oload_champ): Use std::vector.
8628         * value.c (value_free): Use operator delete.
8629         (value_of_xmethod): Rename to...
8630         (value_from_xmethod): ... this.  Don't assign
8631         xmethod_worker::value, take rvalue-reference.
8632         (result_type_of_xmethod): Adjust.
8633         (call_xmethod): Adjust.
8634         * value.h: Include extension.h.
8635         (struct xmethod_worker): Don't forward-declare.
8636         (value_of_xmethod): Rename to...
8637         (value_from_xmethod): ... this, take rvalue-reference.
8638         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
8639         (struct python_xmethod_worker): ... this, add constructor and
8640         destructor.
8641         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
8642         (gdbpy_free_xmethod_worker_data): Rename to...
8643         (python_xmethod_worker::~python_xmethod_worker): ... this and
8644         adjust.
8645         (gdbpy_clone_xmethod_worker_data): Rename to...
8646         (python_xmethod_worker::clone): ... this and adjust.
8647         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
8648         temporary vector.
8649         (gdbpy_get_xmethod_arg_types): Rename to...
8650         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
8651         (gdbpy_get_xmethod_result_type): Rename to...
8652         (python_xmethod_worker::do_get_result_type): ... this and
8653         adjust.
8654         (gdbpy_invoke_xmethod): Rename to...
8655         (python_xmethod_worker::invoke): ... this and adjust.
8656         (new_python_xmethod_worker): Rename to...
8657         (python_xmethod_worker::python_xmethod_worker): ... this and
8658         adjust.
8659         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
8660         Remove.
8661         (gdbpy_free_xmethod_worker_data): Remove.
8662         (gdbpy_get_matching_xmethod_workers): Use std::vector.
8663         (gdbpy_get_xmethod_arg_types): Remove.
8664         (gdbpy_get_xmethod_result_type): Remove.
8665         (gdbpy_invoke_xmethod): Remove.
8666         * python/python.c (python_extension_ops): Remove obsolete
8667         callbacks.
8668
8669 2018-01-05  Pedro Alves  <palves@redhat.com>
8670
8671         PR gdb/18653
8672         * common/signals-state-save-restore.c
8673         (save_original_signals_state): New parameter 'quiet'.  Warn if we
8674         find a custom handler preinstalled, instead of internal erroring.
8675         But only warn if !quiet.
8676         * common/signals-state-save-restore.h
8677         (save_original_signals_state): New parameter 'quiet'.
8678         * main.c (captured_main_1): Move save_original_signals_state call
8679         after option handling, and pass QUIET.
8680
8681 2018-01-05  Pedro Alves  <palves@redhat.com>
8682
8683         * spu-tdep.c (spu_catch_start): Pass
8684         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
8685
8686 2018-01-05  Pedro Alves  <palves@redhat.com>
8687
8688         PR gdb/22670
8689         * ada-lang.c (literal_symbol_name_matcher): New function.
8690         (ada_get_symbol_name_matcher): Use it for
8691         symbol_name_match_type::SEARCH_NAME.
8692         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
8693         it down instead of assuming symbol_name_match_type::FULL.
8694         * block.h (block_lookup_symbol): New parameter 'match_type'.
8695         * c-valprint.c (print_unpacked_pointer): Use
8696         lookup_symbol_search_name instead of lookup_symbol.
8697         * compile/compile-object-load.c (get_out_value_type): Pass down
8698         symbol_name_match_type::SEARCH_NAME.
8699         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
8700         symbol_name_match_type::FULL.
8701         * cp-support.c (cp_get_symbol_name_matcher): Handle
8702         symbol_name_match_type::SEARCH_NAME.
8703         * infrun.c (insert_exception_resume_breakpoint): Use
8704         lookup_symbol_search_name.
8705         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
8706         * psymtab.c (maintenance_check_psymtabs): Use
8707         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
8708         * stack.c (print_frame_args): Use lookup_symbol_search_name and
8709         SYMBOL_SEARCH_NAME.
8710         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
8711         if symbol_name_match_type::SEARCH_NAME.
8712         (lookup_symbol_in_language): Pass down
8713         symbol_name_match_type::FULL.
8714         (lookup_symbol_search_name): New.
8715         (lookup_language_this): Pass down
8716         symbol_name_match_type::SEARCH_NAME.
8717         (lookup_symbol_aux, lookup_local_symbol): New parameter
8718         'match_type'.  Pass it down.
8719         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
8720         (lookup_symbol_search_name): New declaration.
8721         (lookup_symbol_in_block): New 'match_type' parameter.
8722
8723 2018-01-05  Pedro Alves  <palves@redhat.com>
8724
8725         PR gdb/22670
8726         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
8727         ada_lookup_symbol.
8728         (ada_lookup_symbol): Reimplement in terms of
8729         ada_lookup_symbol_list, bits factored out from
8730         ada_lookup_encoded_symbol.
8731
8732 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
8733
8734         * ada-exp.y (write_object_renaming): When subscripting an array
8735         using a symbol as the index, pass the block in call to
8736         ada_lookup_encoded_symbol when looking that symbol up.
8737
8738 2018-01-05  Jerome Guitton  <guitton@adacore.com>
8739
8740         * ada-lang.c (ada_array_length): Use ada_index_type instead of
8741         TYPE_INDEX_TYPE.
8742
8743 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
8744
8745         * ada-lang.c (ada_to_fixed_value_create): Add handling of
8746         the case where VALUE_LVAL (val0) is not lval_memory.
8747
8748 2018-01-05  Xavier Roirand  <roirand@adacore.com>
8749
8750         * ada-valprint.c (print_optional_low_bound): Handle
8751         character-indexed array printing like boolean-indexed array
8752         printing.
8753
8754 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
8755
8756         * NEWS: Create a new section for the next release branch.
8757         Rename the section of the current branch, now that it has
8758         been cut.
8759
8760 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
8761
8762         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
8763         * version.in: Bump version to 8.1.50.DATE-git.
8764
8765 2018-01-03  Xavier Roirand  <roirand@adacore.com>
8766
8767         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
8768         Add field.
8769         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
8770         Add field.
8771         (default_exception_support_info) <catch_handlers_sym>: Add field.
8772         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
8773         (ada_exception_name_addr_1): Add "catch handlers" handling.
8774         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
8775         Update all callers.
8776         (create_excep_cond_exprs) <ex>: Add parameter.
8777         (re_set_exception): Update create_excep_cond_exprs call.
8778         (print_it_exception, print_one_exception, print_mention_exception)
8779         (print_recreate_exception): Add "catch handler" handling.
8780         (allocate_location_catch_handlers, re_set_catch_handlers)
8781         (check_status_catch_handlers, print_it_catch_handlers)
8782         (print_one_catch_handlers, print_mention_catch_handlers)
8783         (print_recreate_catch_handlers): New function.
8784         (catch_handlers_breakpoint_ops): New variable.
8785         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
8786         Add parameter.  Add "catch handler" handling.
8787         (ada_exception_sym_name, ada_exception_breakpoint_ops):
8788         Add "catch handler" handling.
8789         (ada_exception_catchpoint_cond_string): Add "catch handler"
8790         handling.
8791         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
8792         call.
8793         (catch_ada_handlers_command): New function.
8794         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
8795         operations structure.
8796         (_initialize_ada_language): Add "catch handlers" command entry.
8797         * NEWS: Document "catch handlers" feature.
8798
8799 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
8800
8801         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
8802         account when creating the array type of the slice.
8803         (ada_value_slice): Likewise.
8804
8805 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
8806
8807         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
8808         New enum value.
8809         (create_array_type_with_stride): Add byte_stride_prop parameter.
8810         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
8811         New parameter.  Update all callers in this file.
8812         (array_type_has_dynamic_stride): New function.
8813         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
8814         of arrays with dynamic byte strides.
8815         * dwarf2read.c (read_array_type): Add support for dynamic
8816         DW_AT_byte_stride attributes.
8817
8818 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
8819
8820         * dwarf2read.c (read_unspecified_type): Treat
8821         DW_TAG_enumeration_type DIEs from Ada units as stubs.
8822
8823 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
8824
8825         Update copyright year range in all GDB files.
8826
8827 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
8828
8829         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
8830         and gdb/testsuite/gdb.base/step-line.c.
8831
8832 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
8833
8834         * copyright.py (main): Dump the contents of
8835         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
8836         even if BY_HAND is empty.
8837
8838 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
8839
8840         * top.c (print_gdb_version): Update Copyright year in version
8841         message.
8842
8843 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
8844
8845         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
8846
8847 For older changes see ChangeLog-2017.
8848 \f
8849 Local Variables:
8850 mode: change-log
8851 left-margin: 8
8852 fill-column: 74
8853 version-control: never
8854 coding: utf-8
8855 End: