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