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