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