Fix indentation in remote_target::download_tracepoint
[external/binutils.git] / gdb / ChangeLog
1 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2
3         * remote.c (remote_target::download_tracepoint): Fix indentation
4         in for block.
5
6 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7
8         * proc-api.c (_initialize_proc_api): Remove c, unused.
9         * procfs.c (procfs_init_inferior): Remove signals, unused.
10         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
11         unused.
12
13 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
14             Andrew Burgess  <andrew.burgess@embecosm.com>
15
16         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
17         'W_STOPCODE (0)' as this could be ambiguous.
18
19 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
20
21         * ser-tcp.c (net_open): Fix thinko when deciding whether to
22         disable TCP's Nagle algorithm (use "ai_protocol" instead of
23         "ai_socktype").
24
25 2018-08-02  Tom Tromey  <tom@tromey.com>
26
27         PR symtab/16842.
28         * dwarf2read.c (read_func_scope): Set symtab on template parameter
29         symbols.
30         (process_structure_scope): Likewise.
31
32 2018-08-02  Xavier Roirand  <roirand@adacore.com>
33
34         PR gdb/22629:
35         * darwin-nat.c (darwin_kill_inferior): Fix handling of
36         kill inferior.
37
38 2018-08-02  Tom Tromey  <tom@tromey.com>
39
40         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
41         (darwin_suspend_inferior, darwin_resume_inferior)
42         (darwin_decode_notify_message, darwin_resume_inferior_threads)
43         (darwin_check_new_threads): Check result of get_darwin_inferior.
44
45 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
46
47         GDB 8.1.1 released.
48
49 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
50
51         * varobj.c (varobj_get_path_expr_parent): Report an error if
52         parent is a dynamic varobj.
53
54 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
55
56         * gnulib/aclocal.m4: Re-generate.
57         * gnulib/config.in: Re-generate.
58         * gnulib/configure: Re-generate.
59         * gnulib/import/Makefile.in: Re-generate.
60         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
61         * gnulib/import/m4/onceonly.m4: Re-generate.
62
63 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
64
65         * target-descriptions.c (struct xml_test_tdesc): New.
66         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
67         (record_xml_tdesc): Update.
68         (maintenance_check_xml_descriptions): Update.
69         * target-descriptions.h (record_xml_tdesc): Update comment.
70
71 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
72
73         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
74         checking array bounds are defined.
75
76 2018-07-30  Tom Tromey  <tom@tromey.com>
77
78         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
79         irreflexivity violation.
80
81 2018-07-30  Tom Tromey  <tom@tromey.com>
82
83         * cli/cli-decode.c (lookup_cmd): Remove lint code.
84         * value.c (unpack_long): Remove lint code.
85         * valops.c (value_ind): Remove lint code.
86         * valarith.c (value_x_binop, value_x_unop, value_equal)
87         (value_pos): Remove lint code.
88
89 2018-07-28  Tom de Vries  <tdevries@suse.de>
90
91         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
92         with undefined upper bound as <optimized out>.
93
94 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
95
96         * gcore.in: Rename variable "name" to "prefix".  Expand
97         "usage" text.
98
99 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
100
101         * windows-nat.c (windows_nat_target::create_inferior): Update to
102         call close() in global namespace.
103
104 2018-07-26  Tom Tromey  <tom@tromey.com>
105
106         * dwarf-index-write.c (add_address_entry): Don't add objfile
107         offsets.
108         * dbxread.c (find_stab_function): Rename from
109         find_stab_function_addr.  Return a bound_minimal_symbol.
110         (read_dbx_symtab): Use raw_text_low, raw_text_high.
111         Don't add objfile offsets.
112         (end_psymtab): Use raw_text_low, raw_text_high,
113         MSYMBOL_VALUE_RAW_ADDRESS.
114         (read_ofile_symtab): Update.
115         (process_one_symbol): Update.
116         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
117         offsets.
118         (dw2_relocate): Remove.
119         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
120         searching addrmap.
121         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
122         Update.
123         (process_psymtab_comp_unit_reader, add_partial_symbol)
124         (add_partial_subprogram, dwarf2_ranges_read): Update.
125         (load_partial_dies): Update.
126         (add_address_entry): Don't add objfile offsets.
127         (dwarf2_build_include_psymtabs): Update.
128         (create_addrmap_from_aranges): Don't add objfile offsets.
129         (dw2_find_pc_sect_compunit_symtab): Update.
130         * mdebugread.c (parse_symbol): Don't add objfile offsets.
131         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
132         Update.
133         (parse_partial_symbols): Don't add objfile offsets.  Use
134         raw_text_low, raw_text_high.  Update.
135         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
136         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
137         or call 'relocate' quick function.  Clear psymbol_map.
138         * psympriv.h (struct partial_symbol) <address>: Add section
139         offset.
140         <set_unrelocated_address>: Rename from set_address.
141         <raw_text_low, raw_text_high>: New methods.
142         <text_low, text_high>: Add objfile parameter.
143         (add_psymbol_to_bcache): Add 'section' parameter.  Call
144         set_unrelocated_address.
145         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
146         (find_pc_psymbol): Update.
147         (fixup_psymbol_section, relocate_psymtabs): Remove.
148         (dump_psymtab, psym_functions): Update.
149         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
150         parameter.
151         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
152         (start_psymtab_common): Update.
153         * symfile-debug.c (debug_qf_relocate): Remove.
154         (debug_sym_quick_functions): Update.
155         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
156         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
157         Update.
158
159 2018-07-26  Tom Tromey  <tromey@redhat.com>
160
161         * dbxread.c (end_psymtab): Use text_high_valid and
162         text_low_valid.
163         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
164         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
165         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
166         Update comment.
167         <text_low_valid, text_high_valid>: New fields.
168         <set_text_low, set_text_high>: Update.
169         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
170
171 2018-07-26  Tom Tromey  <tom@tromey.com>
172
173         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
174         Update.
175         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
176         textlow and texthigh fields.
177         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
178         Update.
179         * mdebugread.c (parse_lines, parse_partial_symbols)
180         (psymtab_to_symtab_1): Update.
181         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
182         Rename fields.  Update comment.  Now private.
183         <text_low, text_high, set_text_low, set_text_high>: New methods.
184         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
185         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
186         (start_psymtab_common, maintenance_info_psymtabs)
187         (maintenance_check_psymtabs): Update.
188         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
189         texthigh fields.
190         (scan_xcoff_symtab): Update.
191
192 2018-07-26  Tom Tromey  <tromey@redhat.com>
193
194         * psympriv.h (struct partial_symbol) <unrelocated_address,
195         address, set_address>: New methods.
196         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
197         (fixup_psymbol_section, relocate_psymtabs): Update.
198         (print_partial_symbols): Add 'objfile' parameter.  Update.
199         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
200         Update.
201
202 2018-07-26  Tom Tromey  <tom@tromey.com>
203
204         * dwarf-index-write.c (write_psymbols, debug_names::insert)
205         (debug_names::write_psymbols): Update.
206         * psympriv.h (struct partial_symbol): Derive from
207         general_symbol_info.
208         <obj_section>: New method.
209         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
210         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
211         (find_pc_sect_psymbol, fixup_psymbol_section)
212         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
213         (print_partial_symbols, recursively_search_psymtabs)
214         (compare_psymbols, psymbol_hash, psymbol_compare)
215         (add_psymbol_to_bcache, maintenance_check_psymtabs)
216         (psymbol_name_matches, psym_fill_psymbol_map): Update.
217
218 2018-07-26  Tom Tromey  <tromey@redhat.com>
219
220         * dbxread.c (end_psymtab): Remove dead code.
221
222 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
223
224         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
225         DWARF unwinders are disabled.
226         * dwarf2-frame.c: Add dwarf2read.h include.
227         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
228         disabled.
229         (dwarf2_frame_unwinders_enabled_p): Define.
230         (show_dwarf_unwinders_enabled_p): New function.
231         (_initialize_dwarf2_frame): Register switch to control DWARF
232         unwinder use.
233         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
234         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
235         (show_dwarf_cmdlist): Remove static keyword.
236         * dwarf2read.h (set_dwarf_cmdlist): Declare.
237         (show_dwarf_cmdlist): Declare.
238         * NEWS: Document new feature.
239
240 2018-07-26  Tom de Vries  <tdevries@suse.de>
241
242         PR breakpoints/23366
243         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
244
245 2018-07-26  Tom de Vries  <tdevries@suse.de>
246
247         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
248         DW_AT_count can't be translated to a dynamic prop.
249
250 2018-07-25  Tom de Vries  <tdevries@suse.de>
251
252         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
253         try/catch.
254
255 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
256
257         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
258
259 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
260
261         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
262
263 2018-07-24  Keith Seitz  <keiths@redhat.comt
264
265         PR symtab/23010
266         * dwarf2read.c (dw2_add_symbol_to_list): New function.
267         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
268         instead of add_symbol_to_list.
269         (read_file_scope): Call prepare_one_comp_unit before reading
270         any other DIEs.
271
272 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
273
274         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
275
276 2018-07-24  Tom Tromey  <tom@tromey.com>
277
278         * utils.c (malloc, realloc, free): Don't declare.
279         * configure, config.in: Rebuild.
280         * configure.ac: Don't check for declarations of free, malloc, or
281         realloc.
282
283 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
284
285         * aarch64-linux-nat.c
286         (aarch64_linux_nat_target::stopped_data_address): Remove unused
287         variable.
288         * arm-linux-nat.c (fetch_regs): Likewise.
289         (store_regs): Likewise.
290         (fetch_vfp_regs): Likewise.
291         (store_vfp_regs): Likewise.
292         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
293         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
294         (arm_linux_nat_target::insert_watchpoint): Likewise.
295         (arm_linux_nat_target::remove_watchpoint): Likewise.
296         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
297         Likewise.
298         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
299         Likewise.
300         * ppc-linux-nat.c (fetch_register): Likewise.
301         (fetch_all_gp_regs): Likewise.
302         (fetch_ppc_registers): Likewise.
303         (store_all_gp_regs): Likewise.
304         (store_ppc_registers): Likewise.
305         (hwdebug_insert_point): Likewise.
306         (can_use_watchpoint_cond_accel): Likewise.
307         * remote-sim.c (gdb_os_write_stdout): Likewise.
308
309 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
310             Tom Tromey  <tom@tromey.com>
311
312         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
313         test for it.
314         * configure: Rebuild.
315
316 2018-07-22  Tom Tromey  <tom@tromey.com>
317
318         * regformats/regdat.sh: Define xmltarget_${name} inside
319         #ifndef IN_PROCESS_AGENT.
320
321 2018-07-22  Tom Tromey  <tom@tromey.com>
322
323         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
324
325 2018-07-22  Tom Tromey  <tom@tromey.com>
326
327         * symfile.c (reread_symbols): Notify iter, not objfile.
328
329 2018-07-22  Tom Tromey  <tom@tromey.com>
330
331         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
332         Use arch_ops.
333         (ravenscar_thread_target::prepare_to_store): Likewise.
334
335 2018-07-22  Tom Tromey  <tom@tromey.com>
336
337         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
338         unused variable.  Call value_fetch_lazy when needed.
339         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
340         Remove unused variable.  Call value_fetch_lazy when needed.
341
342 2018-07-22  Tom Tromey  <tom@tromey.com>
343
344         * m32c-tdep.c (mark_dma): Return void.
345         (make_regs): Remove unused declarations.
346
347 2018-07-22  Tom Tromey  <tom@tromey.com>
348
349         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
350         cmdscm_get_valid_command_smob_arg_unsafe for effect.
351         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
352         bkscm_get_valid_block_smob_arg_unsafe for effect.
353
354 2018-07-22  Tom Tromey  <tom@tromey.com>
355
356         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
357         value_type.
358
359 2018-07-22  Tom Tromey  <tom@tromey.com>
360
361         * windows-nat.c (saved_context): Conditionally define.
362         * remote.c (remote_target::remote_btrace_maybe_reopen):
363         Conditionally declare "warned".
364         * inflow.c (sigquit_ours): Conditionally define.
365         (new_tty): Move "tty" declaration inside #if.
366         * guile/guile.c (guile_datadir): Conditionally define.
367         * charset.c (set_be_le_names): Move some declarations inside #if.
368         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
369         #if.
370         (parse_xml_btrace_conf): Likewise.
371
372 2018-07-22  Tom Tromey  <tom@tromey.com>
373
374         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
375
376 2018-07-22  Tom Tromey  <tom@tromey.com>
377
378         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
379         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
380         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
381         * buildsym-legacy.c (get_macro_table): Remove unused variable.
382         * stack.c (frame_apply_level_command): Remove unused variable.
383         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
384         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
385         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
386         unused variable.
387         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
388         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
389         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
390         variable.
391         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
392         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
393         variable.
394         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
395         Remove unused variable.
396         * cli/cli-script.c (recurse_read_control_structure): Remove unused
397         variable.
398         * common/tdesc.c (print_xml_feature::visit): Remove unused
399         variable.
400         * compile/compile-object-load.c (store_regs): Remove unused
401         variables.
402         * complaints.c (clear_complaints): Remove unused variable.
403         * corelow.c (core_target_open): Remove unused variable.
404         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
405         variable.
406         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
407         variable.
408         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
409         variable.
410         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
411         variable.
412         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
413         variable.
414         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
415         variable.
416         * ia64-tdep.c (examine_prologue): Remove unused variable.
417         * infcall.c (run_inferior_call): Remove unused variable.
418         * inferior.c (exit_inferior): Remove unused variable.
419         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
420         * linespec.c (decode_line_2): Remove unused variable.
421         * linux-nat.c (super_close): Remove.
422         * linux-tdep.c (linux_info_proc): Remove unused variable.
423         * mi/mi-main.c (mi_execute_command): Remove unused variable.
424         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
425         Remove unused variable.
426         * parse.c (find_minsym_type_and_address): Remove unused variable.
427         * printcmd.c (info_symbol_command, printf_floating): Remove unused
428         variable.
429         * python/py-breakpoint.c (bppy_set_commands): Remove unused
430         variable.
431         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
432         variables.
433         * record-btrace.c (record_btrace_target::store_registers): Remove
434         unused variable.
435         (cmd_show_record_btrace_cpu): Remove unused variable.
436         * riscv-tdep.c (riscv_register_reggroup_p)
437         (riscv_push_dummy_call, riscv_return_value): Remove unused
438         variable.
439         * rust-exp.y (literal): Remove unused variable.
440         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
441         unused variable.
442         <STRUCTOP_ANONYMOUS>: Likewise.
443         * s390-linux-tdep.c (s390_linux_init_abi_31)
444         (s390_linux_init_abi_64): Remove unused variable.
445         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
446         (file_select_thread, net_windows_open, _initialize_ser_windows):
447         Remove unused variables.
448         * symtab.c (find_pc_sect_line): Remove unused variable.
449         * target-memory.c (compute_garbled_blocks): Remove unused
450         variable.
451         (target_write_memory_blocks): Remove unused variable.
452         * target.c (target_stack::unpush): Remove unused variables.
453         * tracepoint.c (start_tracing, all_tracepoint_actions)
454         (merge_uploaded_trace_state_variables)
455         (print_one_static_tracepoint_marker): Remove unused variable.
456         * unittests/basic_string_view/element_access/char/1.cc (test01):
457         Remove unused variable.
458         * windows-nat.c (windows_continue, windows_add_all_dlls)
459         (do_initial_windows_stuff, windows_nat_target::create_inferior):
460         Remove unused variables.
461
462 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
463
464         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
465         attr_profile in HAVE_ELF.
466         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
467         HAVE_ELF.
468
469 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
470
471         * frame.c (frame_register_unwind): Change parameter name.
472         (frame_unwind_register): Likewise.
473         (frame_unwind_register_value): Likewise.
474         (frame_unwind_register_signed): Likewise.
475         (frame_unwind_register_unsigned): Likewise.
476         * frame.h (frame_register_unwind): Likewise.
477         (frame_unwind_register): Likewise.
478         (frame_unwind_register_value): Likewise.
479         (frame_unwind_register_signed): Likewise.
480         (frame_unwind_register_unsigned): Likewise.
481         (frame_unwind_arch): Likewise.
482
483 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
484
485         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
486         ISA maintenance.
487
488 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
489
490         * mips-linux-nat.c (mips_linux_nat_target::read_description):
491         Call `get_ptrace_pid' rather than extracting the ptrace PID by
492         hand.
493
494 2018-07-20  Keith Seitz  <keiths@redhat.com>
495
496         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
497         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
498         m_compunit_symtab, m_language>: Add "m_" prefix.
499         Update all uses.
500         * buildsym.c: Update all uses.
501
502 2018-07-20  Tom Tromey  <tom@tromey.com>
503
504         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
505         * buildsym.h (record_line_ftype): Remove typedef.
506
507 2018-07-20  Tom Tromey  <tom@tromey.com>
508
509         * buildsym-legacy.h (augment_type_symtab): Don't declare.
510         (end_expandable_symtab): Likewise.
511         (end_symtab_get_static_block): Likewise.
512         (end_symtab_from_static_block): Likewise.
513         * buildsym-legacy.c (augment_type_symtab): Remove.
514         (end_expandable_symtab): Remove.
515         (end_symtab_get_static_block): Remove.
516         (end_symtab_from_static_block): Remove.
517
518 2018-07-20  Tom Tromey  <tom@tromey.com>
519
520         * dwarf2read.c: Include buildsym.h.
521         (struct dwarf2_cu) <builder>: New method.
522         (fixup_go_packaging): Update.
523         (process_full_comp_unit, process_full_type_unit): Update.  Don't
524         use scoped_free_pendings.
525         (using_directives): Add "cu" parameter, remove "language".
526         (read_import_statement, setup_type_unit_groups, )
527         (read_func_scope, read_lexical_block_scope)
528         (dwarf2_record_block_ranges, read_namespace): Update.
529         (lnp_state_machine::lnp_state_machine): Add cu parameter.
530         (lnp_state_machine::handle_end_sequence): Update.
531         (class lnp_state_machine) <m_cu>: New member.
532         <m_record_line_callback>: Remove.
533         <m_currently_recording_lines>: New member.
534         (lnp_state_machine::handle_set_file): Update.
535         (noop_record_line): Remove.
536         (dwarf_record_line_p): Add cu parameter.
537         (dwarf_record_line_1, dwarf_finish_line): Likewise.
538         (lnp_state_machine::record_line)
539         (lnp_state_machine::lnp_state_machine)
540         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
541         (dwarf_decode_lines): Update.
542         (dwarf2_start_subfile): Add cu parameter.
543         (dwarf2_start_symtab, new_symbol): Update.
544         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
545         Remove dwarf2_per_objfile parameter.
546         (dwarf_decode_macros): Update.
547
548 2018-07-20  Tom Tromey  <tom@tromey.com>
549
550         * stabsread.c (define_symbol): Update.
551         * buildsym-legacy.h (get_buildsym_compunit): Declare.
552         * dwarf2read.c (new_symbol): Update.
553         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
554         * cp-namespace.c: Include buildsym.h.
555         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
556         * buildsym-legacy.c (get_buildsym_compunit): New function.
557
558 2018-07-20  Tom Tromey  <tom@tromey.com>
559
560         * xcoffread.c: Include buildsym-legacy.h.
561         * windows-nat.c: Include buildsym-legacy.h.
562         * stabsread.c: Include buildsym-legacy.h.
563         * mdebugread.c: Include buildsym-legacy.h.
564         * buildsym-legacy.h: New file.
565         * buildsym-legacy.c: New file, from buildsym.c.
566         * go32-nat.c: Include buildsym-legacy.h.
567         * dwarf2read.c: Include buildsym-legacy.h.
568         * dbxread.c: Include buildsym-legacy.h.
569         * cp-namespace.c: Include buildsym-legacy.h.
570         * coffread.c: Include buildsym-legacy.h.
571         * buildsym.h: Move some contents to buildsym-legacy.h.
572         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
573         buildsym-legacy.c.
574         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
575
576 2018-07-20  Tom Tromey  <tom@tromey.com>
577
578         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
579         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
580         (buildsym_compunit::buildsym_compunit)
581         (buildsym_compunit::~buildsym_compunit)
582         (buildsym_compunit::get_macro_table): Define.
583
584 2018-07-20  Tom Tromey  <tom@tromey.com>
585
586         * buildsym.c (reset_symtab_globals): Remove.
587         (buildsym_compunit::end_symtab_from_static_block): Update.
588         (buildsym_compunit::augment_type_symtab): Update.
589         (end_symtab_from_static_block): Call free_buildsym_compunit.
590         (augment_type_symtab, end_symtab, end_expandable_symtab):
591         Likewise.
592
593 2018-07-20  Tom Tromey  <tom@tromey.com>
594
595         * arch-utils.c: Do not include buildsym.h.
596         * mipsread.c: Do not include buildsym.h.
597         * machoread.c: Do not include buildsym.h.
598         * elfread.c: Do not include buildsym.h.
599
600 2018-07-20  Tom Tromey  <tom@tromey.com>
601
602         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
603         initialization.
604         (buildsym_compunit): Add new constructor.
605         (struct buildsym_compunit) <get_last_source_file, finish_block,
606         record_block_range, start_subfile, patch_subfile_names,
607         push_subfile, pop_subfile, record_line, get_compunit_symtab,
608         set_last_source_start_addr, get_last_source_start_addr,
609         get_local_using_directives, set_local_using_directives,
610         get_global_using_directives, outermost_context_p,
611         get_current_context_stack, get_context_stack_depth,
612         get_current_subfile, get_local_symbols, get_file_symbols,
613         get_global_symbols, record_debugformat, record_producer,
614         push_context, pop_context, end_symtab_get_static_block,
615         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
616         New public methods.
617         <record_pending_block, finish_block_internal, make_blockvector,
618         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
619         private methods.
620         Update all users.
621
622 2018-05-22  Tom Tromey  <tom@tromey.com>
623
624         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
625         parameter.
626         (finish_block_internal): Update.
627
628 2018-07-20  Tom Tromey  <tom@tromey.com>
629
630         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
631         parameter.
632         (finish_block_internal): Update.
633
634 2018-07-20  Tom Tromey  <tom@tromey.com>
635
636         * buildsym.h (EXTERN): Don't define or undef.
637         * buildsym.c (EXTERN): Don't define.
638
639 2018-07-20  Tom Tromey  <tom@tromey.com>
640
641         * buildsym.c: Remove TODO comment.
642
643 2018-07-20  Tom Tromey  <tom@tromey.com>
644
645         * coffread.c (coff_symtab_read): Update.
646         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
647         (xcoff_new_init): Update.
648         * mipsread.c (mipscoff_new_init): Update.
649         * mdebugread.c (mdebug_build_psymtabs): Update.
650         * elfread.c (elf_new_init): Update.
651         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
652         Update.
653         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
654         (coffstab_build_psymtabs, elfstab_build_psymtabs)
655         (stabsect_build_psymtabs): Update.
656         * buildsym.h (buildsym_init): Don't declare.
657         * buildsym.c: Update comment.
658         (prepare_for_building): Remove.
659         (start_symtab, restart_symtab): Update.
660         (reset_symtab_globals): Update comment.
661         (buildsym_init): Remove.
662
663 2018-07-20  Tom Tromey  <tom@tromey.com>
664
665         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
666         * stabsread.c (patch_block_stabs, define_symbol, read_type)
667         (read_enum_type, common_block_start, common_block_end)
668         (cleanup_undefined_types_1, finish_global_stabs): Update.
669         * mdebugread.c (psymtab_to_symtab_1): Update.
670         * dwarf2read.c (fixup_go_packaging, read_func_scope)
671         (read_lexical_block_scope, new_symbol): Update.
672         * dbxread.c (process_one_symbol): Update.
673         * coffread.c (coff_symtab_read, process_coff_symbol)
674         (coff_read_enum_type): Update.
675         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
676         declare.
677         (get_local_symbols, get_file_symbols, get_global_symbols): New
678         functions.
679         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
680         m_global_symbols.
681         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
682         (~scoped_free_pendings): Update.
683         (finish_block, prepare_for_building, reset_symtab_globals)
684         (end_symtab_get_static_block, end_symtab_with_blockvector)
685         (augment_type_symtab, push_context): Update.
686         (get_local_symbols, get_file_symbols, get_global_symbols): New
687         functions.
688         (buildsym_init): Update.
689
690 2018-07-20  Tom Tromey  <tom@tromey.com>
691
692         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
693         (process_full_type_unit): Likewise.
694         (dwarf2_start_symtab): Set list_in_scope.
695
696 2018-07-20  Tom Tromey  <tom@tromey.com>
697
698         * dwarf2read.c (process_psymtab_comp_unit_reader)
699         (build_type_psymtabs_reader): Do not set list_in_scope.
700
701 2018-07-20  Tom Tromey  <tom@tromey.com>
702
703         * buildsym.c (free_pendings): Remove.
704         (add_symbol_to_list, scoped_free_pendings)
705         (finish_block_internal, buildsym_init): Update.
706
707 2018-07-20  Tom Tromey  <tom@tromey.com>
708
709         * xcoffread.c (read_xcoff_symtab): Update.
710         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
711         Update.
712         * dbxread.c (process_one_symbol): Update.
713         * coffread.c (coff_symtab_read): Update.
714         * buildsym.h (finish_block): Update.
715         * buildsym.c (finish_block): Remove "listhead" argument.
716         (end_symtab_get_static_block): Update.
717
718 2018-07-20  Tom Tromey  <tom@tromey.com>
719
720         * buildsym.h (class scoped_free_pendings): Remove constructor.
721         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
722         method.
723         <m_pending_block_obstack, m_pending_blocks>: New members.
724         (pending_block_obstack, pending_blocks): Remove.
725         (scoped_free_pendings::scoped_free_pendings): Default.
726         (~scoped_free_pendings): Update.
727         (free_pending_blocks): Remove.
728         (finish_block_internal, record_pending_block, make_blockvector)
729         (end_symtab_get_static_block, augment_type_symtab, push_context)
730         (buildsym_init): Update.
731
732 2018-07-20  Tom Tromey  <tom@tromey.com>
733
734         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
735         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
736         members.
737         (pending_addrmap, pending_addrmap_obstack)
738         (pending_addrmap_interesting): Remove.
739         (scoped_free_pendings, record_block_range, make_blockvector)
740         (prepare_for_building, reset_symtab_globals, buildsym_init):
741         Update.
742
743 2018-07-20  Tom Tromey  <tom@tromey.com>
744
745         * xcoffread.c (process_linenos): Update.
746         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
747         * mdebugread.c (psymtab_to_symtab_1): Update.
748         * dwarf2read.c (setup_type_unit_groups)
749         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
750         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
751         * dbxread.c (process_one_symbol): Update.
752         * coffread.c (coff_symtab_read, enter_linenos)
753         (process_coff_symbol): Update.
754         * buildsym.h (current_subfile): Don't declare.
755         (get_current_subfile): Declare.
756         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
757         member.
758         (start_subfile, free_buildsym_compunit, push_subfile)
759         (prepare_for_building, start_symtab): Update.
760         (get_current_subfile): New function.
761
762 2018-07-20  Tom Tromey  <tom@tromey.com>
763
764         * coffread.c (coff_symtab_read): Update.
765         * xcoffread.c (read_xcoff_symtab): Update.
766         * dwarf2read.c (new_symbol): Update.
767         (read_func_scope, read_lexical_block_scope): Update.
768         * dbxread.c (process_one_symbol): Update.
769         * buildsym.h (context_stack, context_stack_depth): Don't declare.
770         (outermost_context_p): Remove macro.
771         (outermost_context_p, get_current_context_stack)
772         (get_context_stack_depth): Declare.
773         (pop_context): Return struct context_stack.
774         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
775         member.
776         (context_stack_size): Remove.
777         (INITIAL_CONTEXT_STACK_SIZE): Remove.
778         (prepare_for_building, end_symtab_get_static_block)
779         (augment_type_symtab, push_context): Update.
780         (pop_context): Return struct context_stack.
781         (outermost_context_p, get_current_context_stack)
782         (get_context_stack_depth): New functions.
783         (buildsym_init): Update.
784
785 2018-07-20  Tom Tromey  <tom@tromey.com>
786
787         * rust-exp.y: Now a pure parser.  Update all rules.
788         (%union): Move earlier.
789         (current_parser, work_obstack): Remove globals.
790         (rust_parser, ~rust_parser): Update.
791         (class rust_parser) <copy_name, concat3, crate_name, super_name,
792         lex_character, lex_number, lex_string, lex_identifier,
793         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
794         convert_name, convert_params_to_expression,
795         convert_ast_to_expression, ast_basic_type, ast_operation,
796         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
797         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
798         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
799         ast_array_type, ast_slice_type, ast_reference_type,
800         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
801         (rust_parse): Update.
802         (rustyyerror, rustyylex): Add parser parameter.
803         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
804         (rust_lex_stringish_test, rust_lex_test_sequence)
805         (rust_lex_test_trailing_dot, rust_lex_test_completion)
806         (rust_lex_test_push_back, rust_lex_tests): Update.
807
808 2018-07-19  Pedro Alves  <palves@redhat.com>
809
810         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
811         gdb::unique_xmalloc_ptr.
812         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
813         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
814         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
815         copy-initialization.
816         * guile/scm-pretty-print.c (ppscm_print_children): Use
817         gdb::unique_xmalloc_ptr instead of cleanups.
818         (gdbscm_apply_val_pretty_printer): Remove cleanups.
819         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
820         gdb::unique_xmalloc_ptr.
821         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
822         Adjust to use gdb::unique_xmalloc_ptr.
823         * guile/scm-utils.c (extract_arg): Adjust.
824         * guile/scm-value.c (gdbscm_value_field): Adjust to use
825         gdb::unique_xmalloc_ptr instead of a cleanup.
826
827 2018-07-19  Tom Tromey  <tom@tromey.com>
828
829         * utils.c (do_value_free_to_mark)
830         (make_cleanup_value_free_to_mark): Remove.
831         * utils.h (make_cleanup_value_free_to_mark): Remove.
832
833 2018-07-19  Pedro Alves  <palves@redhat.com>
834
835         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
836         forwarding reference.
837
838 2018-07-18  Pedro Alves  <palves@redhat.com>
839
840         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
841         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
842         cleanup.
843
844 2018-07-18  Pedro Alves  <palves@redhat.com>
845
846         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
847         exceptions.
848         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
849         (gdbscm_wrap): New.
850         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
851         directly instead of a cleanup.
852         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
853         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
854         (vlscm_binop_gdbthrow): New, factored out from ...
855         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
856         (vlscm_rich_compare): Use gdbscm_wrap.
857         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
858         instead of a cleanup.
859         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
860         cleanup.
861         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
862         Use xfree directly instead of a cleanup.
863         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
864         Adjust to use gdbscm_wrap and scoped_value_mark.
865         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
866         (gdbscm_value_address, gdbscm_value_dereference)
867         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
868         scoped_value_mark.
869         (gdbscm_value_dynamic_type): Use scoped_value_mark.
870         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
871         scoped_value_mark.
872         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
873         gdbscm_wrap and scoped_value_mark.
874         (gdbscm_value_to_string): Use xfree directly instead of a
875         cleanup.  Move 'buffer' unique_ptr to TRY scope.
876         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
877         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
878         scoped_value_mark.
879         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
880         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
881         scoped_value_mark.
882         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
883         gdbscm_wrap.
884
885 2018-07-18  Tom de Vries  <tdevries@suse.de>
886
887         * findvar.c (default_read_var_value): Also resolve dynamic type for
888         LOC_OPTIMIZED_OUT vars.
889
890 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
891
892         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
893         decoding.
894
895 2018-07-17  Tom Tromey  <tom@tromey.com>
896
897         * guile/scm-param.c (pascm_set_func, pascm_show_func)
898         (compute_enum_list, pascm_set_param_value_x)
899         (gdbscm_parameter_value): Update.
900         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
901         (gdbscm_scm_to_host_string): Update.
902         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
903         Update.
904         * guile/scm-cmd.c (cmdscm_add_completion): Update.
905         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
906         * guile/scm-string.c (gdbscm_scm_to_string): Return
907         unique_xmalloc_ptr.
908         (gdbscm_scm_to_host_string): Likewise.
909
910 2018-07-17  Tom Tromey  <tom@tromey.com>
911
912         * guile/guile.c (gdbscm_eval_from_control_command): Update.
913         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
914         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
915         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
916         unique_xmalloc_ptr.
917
918 2018-07-17  Tom Tromey  <tom@tromey.com>
919
920         * guile/scm-param.c (pascm_signal_setshow_error): Update.
921         * guile/guile-internal.h (gdbscm_exception_message_to_string):
922         Update.
923         * guile/scm-cmd.c (cmdscm_function): Update.
924         * guile/scm-pretty-print.c
925         (ppscm_print_exception_unless_memory_error): Update.
926         * guile/scm-exception.c (gdbscm_exception_message_to_string):
927         Return unique_xmalloc_ptr.
928
929 2018-07-17  Tom Tromey  <tom@tromey.com>
930
931         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
932         Use string_printf.
933
934 2018-07-17  Jim Wilson  <jimw@sifive.com>
935
936         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
937         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
938         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
939         unecessary braces after EF_RISCV_RVC test.  Delete call to
940         set_gdbarch_decr_pc_after_break.
941
942         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
943         RISCV_LAST_FP_REGNUM + 1.
944         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
945
946 2018-07-17  Tom Tromey  <tom@tromey.com>
947
948         * configure.ac: Remove --disable-gdbcli.
949         * configure: Rebuild.
950         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
951         (SUBDIR_CLI_CFLAGS): Remove.
952         (SFILES): Use SUBDIR_CLI_SRCS.
953         (COMMON_OBS): Use SUBDIR_CLI_OBS.
954
955 2018-07-17  Tom Tromey  <tom@tromey.com>
956
957         PR gdb/18624:
958         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
959
960 2018-07-16  Jim Wilson  <jimw@sifive.com>
961
962         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
963
964 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
965
966         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
967         variable.
968         (libunwind_frame_sniffer): Likewise.
969         (libunwind_frame_prev_register): Likewise.
970         (libunwind_sigtramp_frame_sniffer): Likewise.
971         * ia64-tdep.c (ia64_access_reg): Likewise.
972         (ia64_access_rse_reg): Likewise.
973         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
974         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
975
976 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
977
978         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
979
980 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
981
982         * remote-sim.c (gdbsim_target::close,
983         gdbsim_target::mourn_inferior): Remove unused variables.
984
985 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
986
987         * ia64-tdep.c (ktab_buf): New global.
988         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
989         (get_kernel_table): Adjust.
990
991 2018-07-16  Tom Tromey  <tom@tromey.com>
992
993         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
994         * dwarf2read.c (using_directives, new_symbol): Use
995         outermost_context_p.
996         * dbxread.c (process_one_symbol): Use outermost_context_p.
997         * coffread.c (coff_symtab_read): Use outermost_context_p.
998
999 2018-07-16  Tom Tromey  <tom@tromey.com>
1000
1001         * dwarf2read.c (using_directives, read_func_scope)
1002         (read_lexical_block_scope): Update.
1003         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1004         * buildsym.h (local_using_directives, global_using_directives):
1005         Don't declare.
1006         (get_local_using_directives, set_local_using_directives)
1007         (get_global_using_directives): Declare.
1008         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1009         m_global_using_directives>: New members.
1010         (finish_block_internal, prepare_for_building)
1011         (reset_symtab_globals, end_symtab_get_static_block)
1012         (push_context): Update.
1013         (get_local_using_directives, set_local_using_directives)
1014         (get_global_using_directives): New functions.
1015         (buildsym_init): Update.
1016
1017 2018-07-16  Tom Tromey  <tom@tromey.com>
1018
1019         * xcoffread.c (xcoff_initial_scan): Don't call
1020         free_pending_blocks.
1021         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1022         * buildsym.h (class scoped_free_pendings): Add constructor.
1023         (free_pending_blocks): Don't declare.
1024         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1025         (free_pending_blocks): Now static.
1026
1027 2018-07-16  Tom Tromey  <tom@tromey.com>
1028
1029         * buildsym.h (push_subfile, pop_subfile): Update declarations.
1030         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1031         member.
1032         (struct subfile_stack): Remove.
1033         (subfile_stack): Remove.
1034         (push_subfile, pop_subfile, buildsym_init): Update.
1035
1036 2018-07-16  Tom Tromey  <tom@tromey.com>
1037
1038         * buildsym.c (push_subfile): Use gdb_assert.
1039         (pop_subfile): Use gdb_assert.
1040
1041 2018-07-16  Tom Tromey  <tom@tromey.com>
1042
1043         * buildsym.h (merge_symbol_lists): Remove.
1044         * buildsym.c (merge_symbol_lists): Remove.
1045
1046 2018-07-16  Tom Tromey  <tom@tromey.com>
1047
1048         * stabsread.c (scan_file_globals): Update comment.
1049         * stabsread.h (scan_file_globals): Move from buildsym.h.
1050         * buildsym.h (scan_file_globals): Move to stabsread.h.
1051
1052 2018-07-16  Tom Tromey  <tom@tromey.com>
1053
1054         * xcoffread.c (xcoff_new_init): Update.
1055         * mipsread.c (mipscoff_new_init): Update.
1056         * mdebugread.c (mdebug_build_psymtabs): Update.
1057         * elfread.c (elf_new_init): Update.
1058         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1059         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1060         * buildsym.h (buildsym_new_init): Don't declare.
1061         * buildsym.c (buildsym_new_init): Remove.
1062
1063 2018-07-16  Tom Tromey  <tom@tromey.com>
1064
1065         * stabsread.h (within_function): Move from buildsym.h.
1066         * stabsread.c (start_stabs): Clear within_function.
1067         * coffread.c (coff_start_symtab): Clear within_function.
1068         * buildsym.h (within_function): Move to stabsread.h.
1069         * buildsym.c (prepare_for_building): Update.
1070
1071 2018-07-16  Tom Tromey  <tom@tromey.com>
1072
1073         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1074         * dwarf2read.c (dwarf2_start_symtab): Don't set
1075         processing_gcc_compilation.
1076         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1077
1078 2018-07-16  Tom Tromey  <tom@tromey.com>
1079
1080         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1081         (next_symbol_text_func): Move from buildsym.h.
1082         * stabsread.c (hashname): Move from buildsym.c.
1083         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1084         (next_symbol_text_func, hashname): Move to stabsread.h.
1085         * buildsym.c: Don't include bcache.h
1086         (hashname): Move to stasbread.c.
1087
1088 2018-07-16  Tom Tromey  <tom@tromey.com>
1089
1090         * buildsym.h (context_stack_size): Don't declare.
1091         * buildsym.c (context_stack_size): New global.
1092
1093 2018-07-16  Tom Tromey  <tom@tromey.com>
1094
1095         * dbxread.c (processing_acc_compilation): New global.
1096         * buildsym.h (processing_acc_compilation): Don't declare.
1097
1098 2018-07-16  Tom Tromey  <tom@tromey.com>
1099
1100         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1101         * dbxread.c (read_ofile_symtab): Update.
1102         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1103         * buildsym.h (last_source_start_addr): Remove.
1104         (set_last_source_start_addr, get_last_source_start_addr):
1105         Declare.
1106         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1107         parameter.
1108         (struct buildsym_compunit) <m_last_source_start_addr>: New
1109         member.
1110         (prepare_for_building): Remove start_addr parameter.
1111         (start_symtab, restart_symtab, end_symtab_get_static_block)
1112         (end_symtab_with_blockvector): Update.
1113         (set_last_source_start_addr, get_last_source_start_addr): New
1114         functions.
1115
1116 2018-07-16  Tom Tromey  <tom@tromey.com>
1117
1118         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1119         member.
1120         (have_line_numbers): Remove.
1121         (record_line, prepare_for_building, end_symtab_get_static_block)
1122         (augment_type_symtab): Update.
1123
1124 2018-07-16  Tom Tromey  <tom@tromey.com>
1125
1126         * buildsym.c (~buildsym_compunit): Free the macro table.
1127         (struct buildsym_compunit) <get_macro_table, release_macros>: New
1128         methods.
1129         <m_pending_macros>: New member.
1130         (pending_macros): Remove.
1131         (~scoped_free_pendings, get_macro_table, prepare_for_building)
1132         (reset_symtab_globals, end_symtab_get_static_block)
1133         (end_symtab_with_blockvector, augment_type_symtab)
1134         (buildsym_init): Update.
1135
1136 2018-07-16  Tom Tromey  <tom@tromey.com>
1137
1138         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1139         parameter.
1140         (buildsym_compunit::set_last_source_file): New method.
1141         <m_last_source_file>: New member.
1142         (prepare_for_building): Remove "name" parameter.
1143         (start_symtab, restart_symtab, reset_symtab_globals): Update.
1144         (last_source_file): Remove.
1145         (set_last_source_file, get_last_source_file): Update.
1146
1147 2018-07-16  Tom Tromey  <tom@tromey.com>
1148
1149         * buildsym.c (prepare_for_building): Add assert.
1150
1151 2018-07-16  Tom Tromey  <tom@tromey.com>
1152
1153         * buildsym.c (~buildsym_compunit): Update.
1154         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1155         (start_subfile, patch_subfile_names)
1156         (end_symtab_with_blockvector): Update.
1157
1158 2018-07-16  Tom Tromey  <tom@tromey.com>
1159
1160         * buildsym.c (struct buildsym_compunit): Add constructor,
1161         destructor, initializers.
1162         (start_buildsym_compunit): Remove.
1163         (free_buildsym_compunit): Use "delete".
1164         (start_symtab, restart_symtab): Use "new".
1165
1166 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
1167
1168         * symfile.c (set_objfile_default_section_offset): Remove struct
1169         keyword.
1170
1171 2018-07-14  Stafford Horne  <shorne@gmail.com>
1172
1173         * (Responsible Maintainers): Add myself as or1k maintainer.
1174
1175 2018-07-13  Tom Tromey  <tom@tromey.com>
1176
1177         * symfile.c (set_objfile_default_section_offset): Use extra braces
1178         around initializer.
1179
1180 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1181
1182         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1183         non-branching basr.
1184
1185 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1186
1187         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1188         unittests/cli-utils-selftests.c
1189         * unittests/cli-utils-selftests.c: New file.
1190
1191 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1192
1193         * NEWS: Mention new commands. Mention change to 'thread apply'.
1194
1195 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1196
1197         * thread.c (thr_try_catch_cmd): New function.
1198         (thread_apply_all_command): Handle qcs flags.
1199         (thread_apply_command): Handle qcs flags.
1200         (taas_command): New function.
1201         (tfaas_command): New function.
1202         (_initialize_thread): Update to setup the new commands 'taas
1203         and 'tfaas'. Change doc string for 'thread apply'.
1204
1205 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1206
1207         * stack.c: (trailing_outermost_frame): New function, mostly
1208         extracted from backtrace_command_1.
1209         (leading_innermost_frame): New function.
1210         (backtrace_command_1): Update to call trailing_outermost_frame.
1211         (frame_apply_command_count): New function.
1212         (frame_apply_level_command): New function.
1213         (frame_apply_all_command): New function.
1214         (frame_apply_command): New function.
1215         (faas_command): New function.
1216         (frame_cmd_list): New variable.
1217         (_initialize_stack): Update to setup the new commands 'frame apply'
1218         and 'faas'.
1219
1220 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1221
1222         * cli-utils.c (number_or_range_parser::get_number): Only handle
1223         numbers or convenience var as numbers.
1224         (parse_flags): New function.
1225         (parse_flags_qcs): New function.
1226         (number_or_range_parser::finished): Ensure parsing end is detected
1227         before end of string.
1228         * cli-utils.h (parse_flags): New function.
1229         (parse_flags_qcs): New function.
1230         (number_or_range_parser): Remove m_finished bool.
1231         (number_or_range_parser::skip_range): Set m_in_range to false.
1232
1233 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1234
1235         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1236         on Windows.
1237
1238 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1239             Jan Kratochvil  <jan.kratochvil@redhat.com>
1240             Paul Fertser  <fercerpav@gmail.com>
1241             Tsutomu Seki  <sekiriki@gmail.com>
1242             Pedro Alves  <palves@redhat.com>
1243
1244         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1245         'unittests/parse-connection-spec-selftests.c'.
1246         (COMMON_SFILES): Add 'common/netstuff.c'.
1247         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1248         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1249         * common/netstuff.c: New file.
1250         * common/netstuff.h: New file.
1251         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1252         (wait_for_connect): Update comment.  New parameter
1253         'gdb::optional<int> sock' instead of 'struct serial *scb'.
1254         Use 'sock' directly instead of 'scb->fd'.
1255         (try_connect): New function, with code from 'net_open'.
1256         (net_open): Rewrite main loop to deal with multiple
1257         sockets/addresses.  Handle IPv6-style hostnames; implement
1258         support for IPv6 connections.
1259         * unittests/parse-connection-spec-selftests.c: New file.
1260
1261 2018-07-11  Pedro Alves  <palves@redhat.com>
1262
1263         PR gdb/23377
1264         * remote.c (remote_target::remote_detach_pid): Call
1265         set_current_process.
1266
1267 2018-07-11  Pedro Alves  <palves@redhat.com>
1268
1269         * h8300-tdep.c (h8300_gdbarch_init): Remove
1270         set_gdbarch_ecoff_reg_to_regnum calls.
1271
1272 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1273
1274         PR c++/23373
1275         * c-typeprint.c (c_type_print_base_struct_union): Don't print
1276         offsets/sizes for static members of a class/struct.
1277
1278 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
1279
1280         * target-descriptions.c (tdesc_register_bitsize): Rename.
1281         * target-descriptions.h (tdesc_register_bitsize): Likewise.
1282         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1283         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1284
1285 2018-07-10  Tom Tromey  <tom@tromey.com>
1286
1287         * breakpoint.c (moribund_locations): Now static and a
1288         std::vector.
1289         (breakpoint_init_inferior, moribund_breakpoint_here_p)
1290         (build_bpstat_chain, update_global_location_list)
1291         (breakpoint_retire_moribund): Update.
1292         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
1293         VEC.
1294
1295 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1296
1297         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1298         (riscv_register_reggroup_p): Use new function, remove unneeded
1299         parenthesis.
1300         (riscv_push_dummy_call): Extend assert to compare against xlen or
1301         flen based on register type.
1302
1303 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1304
1305         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1306
1307 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1308
1309         * remote.c (show_hardware_watchpoint_limit): New function.
1310         (show_hardware_watchpoint_length_limit): New function.
1311         (show_hardware_breakpoint_limit): New function.
1312         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1313         where appropriate, update help text.
1314
1315 2018-07-09  Tom Tromey  <tom@tromey.com>
1316
1317         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1318         (CLIBS): Don't mention NAT_CLIBS.
1319
1320 2018-07-09  Tom Tromey  <tom@tromey.com>
1321
1322         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1323         (LIBGDB_OBS, clean mostlyclean): Update.
1324         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1325
1326 2018-07-09  Tom Tromey  <tom@tromey.com>
1327
1328         * Makefile.in (%.c: %.y): Use ECHO_YACC.
1329         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
1330         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1331
1332 2018-07-09  Tom Tromey  <tom@tromey.com>
1333
1334         * Makefile.in (ALLDEPFILES): Remove exec.c.
1335         (COMMON_OBS): Remove exec.o.
1336         (COMMON_SFILES): Add exec.c.
1337
1338 2018-07-09  Tom Tromey  <tom@tromey.com>
1339
1340         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1341
1342 2018-07-09  Tom Tromey  <tom@tromey.com>
1343
1344         * Makefile.in (clean mostlyclean): Remove stamp-version.
1345         (version.c): Depend on stamp-version.
1346         (stamp-version): New rule, from version.c rule.
1347
1348 2018-07-09  Tom Tromey  <tom@tromey.com>
1349
1350         * Makefile.in (init.c): Depend on stamp-init.
1351         (stamp-init): New rule, from init.c rule.
1352         (clean mostlyclean): Remove stamp-init.
1353
1354 2018-07-09  Tom Tromey  <tom@tromey.com>
1355
1356         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1357         SUBDIR_GCC_COMPILE_SRCS.
1358
1359 2018-07-09  Tom Tromey  <tom@tromey.com>
1360
1361         * Makefile.in (init.c): Remove some unused sed rules.
1362
1363 2018-07-09  Tom Tromey  <tom@tromey.com>
1364
1365         * Makefile.in (TSOBS): Remove.
1366         (INIT_FILES): Update.
1367         (LIBGDB_OBS): Update.
1368         (COMMON_SFILES): Add inflow.c.
1369         (SFILES): Remove inflow.c.
1370
1371 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1372
1373         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1374
1375 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
1376
1377         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1378         get_saveloc_name, is_signal_frame_name, step_name,
1379         init_remote_name, create_addr_space_name,
1380         destroy_addr_space_name, search_unwind_table_name,
1381         find_dyn_list_name): Constify.
1382
1383 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
1384
1385         * darwin-nat.c (darwin_pthread_kill): New function.
1386         (darwin_resume_thread): Use darwin_pthread_kill.
1387
1388 2018-07-05  Tom de Vries  <tdevries@suse.de>
1389
1390         * macroexp.c (macro_buffer) <operator=>: New member function.
1391
1392 2018-07-04  Tom Tromey  <tom@tromey.com>
1393
1394         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1395
1396 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
1397
1398         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1399         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1400         * maint.c: Likewise.
1401         * top.c: Likewise.
1402
1403 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1404
1405         * NEWS: Create a new section for the next release branch.
1406         Rename the section of the current branch, now that it has
1407         been cut.
1408
1409 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1410
1411         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1412         * version.in: Bump version to 8.2.50.DATE-git.
1413
1414 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
1415             Pedro Alves  <palves@redhat.com>
1416
1417         * linux-nat.c (linux_init_ptrace): Rename to ...
1418         (linux_init_ptrace_procfs): ... this.  Call
1419         linux_proc_init_warnings.
1420         (linux_nat_target::post_attach)
1421         (linux_nat_target::post_startup_inferior): Adjust.
1422         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1423         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1424
1425 2018-07-04  Tom de Vries  <tdevries@suse.de>
1426
1427         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1428         check ...
1429         (read_comp_unit_head): ... here.
1430
1431 2018-07-03  Tom Tromey  <tom@tromey.com>
1432
1433         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1434         (stop_tracing, tstatus_command)
1435         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1436         (print_one_static_tracepoint_marker): Update.
1437         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1438         std::vector.
1439         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
1440         VEC.
1441         (all_tracepoints, static_tracepoints_here): Return std::vector.
1442
1443 2018-07-03  Tom Tromey  <tom@tromey.com>
1444
1445         * common/ptid.c (ptid_equal): Remove.
1446         * common/ptid.h (ptid_equal): Don't declare.
1447         * ada-tasks.c: Update.
1448         * breakpoint.c: Update.
1449         * common/agent.c: Update.
1450         * corelow.c: Update.
1451         * darwin-nat-info.c: Update.
1452         * darwin-nat.c: Update.
1453         * dcache.c: Update.
1454         * dtrace-probe.c: Update.
1455         * dummy-frame.c: Update.
1456         * fbsd-nat.c: Update.
1457         * frame.c: Update.
1458         * gdbthread.h: Update.
1459         * gnu-nat.c: Update.
1460         * go32-nat.c: Update.
1461         * inf-loop.c: Update.
1462         * inf-ptrace.c: Update.
1463         * infcall.c: Update.
1464         * infcmd.c: Update.
1465         * inflow.c: Update.
1466         * infrun.c: Update.
1467         * linux-fork.c: Update.
1468         * linux-nat.c: Update.
1469         * linux-thread-db.c: Update.
1470         * mi/mi-cmd-var.c: Update.
1471         * mi/mi-interp.c: Update.
1472         * mi/mi-main.c: Update.
1473         * nto-procfs.c: Update.
1474         * ppc-linux-tdep.c: Update.
1475         * procfs.c: Update.
1476         * python/py-inferior.c: Update.
1477         * python/py-record-btrace.c: Update.
1478         * python/py-record.c: Update.
1479         * ravenscar-thread.c: Update.
1480         * regcache.c: Update.
1481         * remote-sim.c: Update.
1482         * remote.c: Update.
1483         * sol-thread.c: Update.
1484         * solib.c: Update.
1485         * target.c: Update.
1486         * tui/tui-stack.c: Update.
1487         * varobj.c: Update.
1488         * windows-nat.c: Update.
1489         * windows-tdep.c: Update.
1490
1491 2018-07-03  Tom Tromey  <tom@tromey.com>
1492
1493         * common/ptid.c (ptid_match): Remove.
1494         * common/ptid.h (ptid_match): Don't declare.
1495         * fbsd-nat.c: Update.
1496         * infcmd.c: Update.
1497         * infrun.c: Update.
1498         * linux-nat.c: Update.
1499         * record-btrace.c: Update.
1500         * regcache.c: Update.
1501         * remote.c: Update.
1502
1503 2018-07-03  Tom Tromey  <tom@tromey.com>
1504
1505         * common/ptid.c (ptid_tid_p): Remove.
1506         * common/ptid.h (ptid_tid_p): Don't declare.
1507         * sol-thread.c: Update.
1508
1509 2018-07-03  Tom Tromey  <tom@tromey.com>
1510
1511         * common/ptid.c (ptid_lwp_p): Remove.
1512         * common/ptid.h (ptid_lwp_p): Don't declare.
1513         * fbsd-nat.c: Update.
1514         * linux-nat.c: Update.
1515         * nat/linux-procfs.c: Update.
1516         * nat/x86-linux-dregs.c: Update.
1517         * sol-thread.c: Update.
1518
1519 2018-07-03  Tom Tromey  <tom@tromey.com>
1520
1521         * common/ptid.c (ptid_is_pid): Remove.
1522         * common/ptid.h (ptid_is_pid): Don't declare.
1523         * infrun.c: Update.
1524         * linux-nat.c: Update.
1525         * mi/mi-interp.c: Update.
1526         * remote.c: Update.
1527         * thread.c: Update.
1528
1529 2018-07-03  Tom Tromey  <tom@tromey.com>
1530
1531         * common/ptid.c (ptid_get_tid): Remove.
1532         * common/ptid.h (ptid_get_tid): Don't declare.
1533         * ada-tasks.c: Update.
1534         * aix-thread.c: Update.
1535         * bsd-uthread.c: Update.
1536         * darwin-nat.c: Update.
1537         * fbsd-nat.c: Update.
1538         * i386-darwin-nat.c: Update.
1539         * infrun.c: Update.
1540         * linux-tdep.c: Update.
1541         * nto-procfs.c: Update.
1542         * ppc-ravenscar-thread.c: Update.
1543         * python/py-infthread.c: Update.
1544         * ravenscar-thread.c: Update.
1545         * sol-thread.c: Update.
1546         * sparc-ravenscar-thread.c: Update.
1547         * windows-nat.c: Update.
1548
1549 2018-07-03  Tom Tromey  <tom@tromey.com>
1550
1551         * common/ptid.c (ptid_get_lwp): Remove.
1552         * common/ptid.h (ptid_get_lwp): Don't declare.
1553         * aarch64-linux-nat.c: Update.
1554         * ada-tasks.c: Update.
1555         * aix-thread.c: Update.
1556         * amd64-linux-nat.c: Update.
1557         * arm-linux-nat.c: Update.
1558         * corelow.c: Update.
1559         * fbsd-nat.c: Update.
1560         * fbsd-tdep.c: Update.
1561         * gnu-nat.c: Update.
1562         * i386-cygwin-tdep.c: Update.
1563         * i386-gnu-nat.c: Update.
1564         * i386-linux-nat.c: Update.
1565         * ia64-linux-nat.c: Update.
1566         * inf-ptrace.c: Update.
1567         * infrun.c: Update.
1568         * linux-fork.c: Update.
1569         * linux-nat.c: Update.
1570         * linux-tdep.c: Update.
1571         * linux-thread-db.c: Update.
1572         * mips-linux-nat.c: Update.
1573         * nat/aarch64-linux-hw-point.c: Update.
1574         * nat/aarch64-linux.c: Update.
1575         * nat/linux-btrace.c: Update.
1576         * nat/linux-osdata.c: Update.
1577         * nat/linux-procfs.c: Update.
1578         * nat/x86-linux-dregs.c: Update.
1579         * obsd-nat.c: Update.
1580         * ppc-fbsd-nat.c: Update.
1581         * ppc-linux-nat.c: Update.
1582         * procfs.c: Update.
1583         * python/py-infthread.c: Update.
1584         * ravenscar-thread.c: Update.
1585         * remote.c: Update.
1586         * s390-linux-nat.c: Update.
1587         * sol-thread.c: Update.
1588         * sol2-tdep.c: Update.
1589         * spu-linux-nat.c: Update.
1590         * x86-linux-nat.c: Update.
1591         * xtensa-linux-nat.c: Update.
1592
1593 2018-07-03  Tom Tromey  <tom@tromey.com>
1594
1595         * common/ptid.c (ptid_get_pid): Remove.
1596         * common/ptid.h (ptid_get_pid): Don't declare.
1597         * aarch64-linux-nat.c: Update.
1598         * ada-lang.c: Update.
1599         * aix-thread.c: Update.
1600         * alpha-bsd-nat.c: Update.
1601         * amd64-fbsd-nat.c: Update.
1602         * amd64-linux-nat.c: Update.
1603         * arm-linux-nat.c: Update.
1604         * arm-nbsd-nat.c: Update.
1605         * auxv.c: Update.
1606         * break-catch-syscall.c: Update.
1607         * breakpoint.c: Update.
1608         * bsd-uthread.c: Update.
1609         * corelow.c: Update.
1610         * ctf.c: Update.
1611         * darwin-nat.c: Update.
1612         * fbsd-nat.c: Update.
1613         * fbsd-tdep.c: Update.
1614         * gcore.c: Update.
1615         * gnu-nat.c: Update.
1616         * hppa-nbsd-nat.c: Update.
1617         * hppa-obsd-nat.c: Update.
1618         * i386-fbsd-nat.c: Update.
1619         * ia64-linux-nat.c: Update.
1620         * inf-ptrace.c: Update.
1621         * infcmd.c: Update.
1622         * inferior.c: Update.
1623         * inferior.h: Update.
1624         * inflow.c: Update.
1625         * infrun.c: Update.
1626         * linux-fork.c: Update.
1627         * linux-nat.c: Update.
1628         * linux-tdep.c: Update.
1629         * linux-thread-db.c: Update.
1630         * m68k-bsd-nat.c: Update.
1631         * mi/mi-interp.c: Update.
1632         * mi/mi-main.c: Update.
1633         * mips-linux-nat.c: Update.
1634         * mips-nbsd-nat.c: Update.
1635         * mips64-obsd-nat.c: Update.
1636         * nat/aarch64-linux-hw-point.c: Update.
1637         * nat/aarch64-linux.c: Update.
1638         * nat/linux-btrace.c: Update.
1639         * nat/linux-osdata.c: Update.
1640         * nat/linux-procfs.c: Update.
1641         * nat/x86-linux-dregs.c: Update.
1642         * nto-procfs.c: Update.
1643         * obsd-nat.c: Update.
1644         * ppc-linux-nat.c: Update.
1645         * ppc-nbsd-nat.c: Update.
1646         * ppc-obsd-nat.c: Update.
1647         * proc-service.c: Update.
1648         * procfs.c: Update.
1649         * python/py-inferior.c: Update.
1650         * python/py-infthread.c: Update.
1651         * ravenscar-thread.c: Update.
1652         * record.c: Update.
1653         * remote-sim.c: Update.
1654         * remote.c: Update.
1655         * rs6000-nat.c: Update.
1656         * s390-linux-nat.c: Update.
1657         * sh-nbsd-nat.c: Update.
1658         * sol-thread.c: Update.
1659         * sparc-nat.c: Update.
1660         * sparc64-tdep.c: Update.
1661         * spu-linux-nat.c: Update.
1662         * spu-tdep.c: Update.
1663         * target-debug.h: Update.
1664         * target.c: Update.
1665         * thread.c: Update.
1666         * tid-parse.c: Update.
1667         * tracefile-tfile.c: Update.
1668         * vax-bsd-nat.c: Update.
1669         * windows-nat.c: Update.
1670         * x86-linux-nat.c: Update.
1671         * x86-nat.c: Update.
1672
1673 2018-07-03  Tom Tromey  <tom@tromey.com>
1674
1675         * common/ptid.c (pid_to_ptid): Remove.
1676         * common/ptid.h (pid_to_ptid): Don't declare.
1677         * aix-thread.c: Update.
1678         * arm-linux-nat.c: Update.
1679         * common/ptid.c: Update.
1680         * common/ptid.h: Update.
1681         * corelow.c: Update.
1682         * ctf.c: Update.
1683         * darwin-nat.c: Update.
1684         * fbsd-nat.c: Update.
1685         * fork-child.c: Update.
1686         * gnu-nat.c: Update.
1687         * go32-nat.c: Update.
1688         * inf-ptrace.c: Update.
1689         * infcmd.c: Update.
1690         * inferior.c: Update.
1691         * infrun.c: Update.
1692         * linux-fork.c: Update.
1693         * linux-nat.c: Update.
1694         * nat/aarch64-linux-hw-point.c: Update.
1695         * nat/fork-inferior.c: Update.
1696         * nat/x86-linux-dregs.c: Update.
1697         * nto-procfs.c: Update.
1698         * obsd-nat.c: Update.
1699         * procfs.c: Update.
1700         * progspace.c: Update.
1701         * remote.c: Update.
1702         * rs6000-nat.c: Update.
1703         * s390-linux-nat.c: Update.
1704         * sol-thread.c: Update.
1705         * spu-linux-nat.c: Update.
1706         * target.c: Update.
1707         * top.c: Update.
1708         * tracefile-tfile.c: Update.
1709         * windows-nat.c: Update.
1710
1711 2018-07-03  Tom Tromey  <tom@tromey.com>
1712
1713         * common/ptid.h (ptid_build): Don't declare.
1714         * common/ptid.c (ptid_build): Remove.
1715         * aix-thread.c: Update.
1716         * bsd-kvm.c: Update.
1717         * bsd-uthread.c: Update.
1718         * common/agent.c: Update.
1719         * common/ptid.c: Update.
1720         * common/ptid.h: Update.
1721         * corelow.c: Update.
1722         * darwin-nat.c: Update.
1723         * fbsd-nat.c: Update.
1724         * gnu-nat.c: Update.
1725         * linux-fork.c: Update.
1726         * linux-nat.c: Update.
1727         * linux-thread-db.c: Update.
1728         * nat/linux-osdata.c: Update.
1729         * nat/linux-procfs.c: Update.
1730         * nto-procfs.c: Update.
1731         * obsd-nat.c: Update.
1732         * proc-service.c: Update.
1733         * procfs.c: Update.
1734         * ravenscar-thread.c: Update.
1735         * remote-sim.c: Update.
1736         * remote.c: Update.
1737         * sol-thread.c: Update.
1738         * target.c: Update.
1739         * windows-nat.c: Update.
1740
1741 2018-07-03  Tom Tromey  <tom@tromey.com>
1742
1743         * infrun.c (follow_exec): Use exit_inferior_silent.
1744         * inferior.c (exit_inferior_num_silent): Remove.
1745         * inferior.h (exit_inferior_num_silent): Don't declare.
1746
1747 2018-07-03  Tom Tromey  <tom@tromey.com>
1748
1749         PR cli/23340:
1750         * darwin-nat.c (darwin_attach_pid): Reset inferior and
1751         inferior_ptid on error.
1752
1753 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
1754             Simon Marchi  <simon.marchi@polymtl.ca>
1755
1756         PR tdep/8282
1757         * disasm.h (gdb_disassembler): Add
1758         `m_disassembler_options_holder'. member
1759         * disasm.c (get_all_disassembler_options): New function.
1760         (gdb_disassembler::gdb_disassembler): Use it.
1761         (gdb_buffered_insn_length_init_dis): Likewise.
1762         (gdb_buffered_insn_length): Adjust accordingly.
1763         (set_disassembler_options): Handle options with arguments.
1764         (show_disassembler_options_sfunc): Likewise.  Add a leading new
1765         line if showing options with descriptions.
1766         (disassembler_options_completer): Adapt to using the
1767         `disasm_options_and_args_t' structure.
1768         * mips-tdep.c (mips_disassembler_options): New variable.
1769         (mips_disassembler_options_o32): Likewise.
1770         (mips_disassembler_options_n32): Likewise.
1771         (mips_disassembler_options_n64): Likewise.
1772         (gdb_print_insn_mips): Don't set `disassembler_options'.
1773         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1774         functions.
1775         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1776         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
1777         `gdbarch_disassembler_options_implicit' and
1778         `gdbarch_valid_disassembler_options'.
1779         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1780         `disasm_options_and_args_t' structure.
1781         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1782         method.
1783         (valid_disassembler_options): Switch from `disasm_options_t' to
1784         the `disasm_options_and_args_t' structure.
1785         * NEWS: Document `set disassembler-options' support for the MIPS
1786         target.
1787         * gdbarch.h: Regenerate.
1788         * gdbarch.c: Regenerate.
1789
1790 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1791
1792         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1793
1794 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
1795
1796         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1797         parameter in call to amd64_target_description.
1798         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1799         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1800         (amd64fbsd_init_abi): Likewise.
1801         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1802         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1803         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1804         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1805
1806 2018-06-29  Pedro Alves  <palves@redhat.com>
1807
1808         * gdb/amd64-tdep.h (amd64_create_target_description): Add
1809         "segments" parameter.
1810         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1811         (_initialize_amd64_tdep): Update call to
1812         amd64_create_target_description.
1813         (amd64_target_description): Add "segments" parameter.  Adjust
1814         the implementation to use it.
1815         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1816         call to amd64_create_target_description.
1817         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1818         * gdb/arch/amd64.h (amd64_create_target_description): Add
1819         "segments" register.
1820         * gdb/arch/amd64.c (amd64_create_target_description): Add
1821         "segments" parameter.  Call create_feature_i386_64bit_segments
1822         only if SEGMENTS is true.
1823         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1824         call to amd64_create_target_description.
1825
1826 2018-06-29  Pedro Alves  <palves@redhat.com>
1827
1828         * thread.c (thread_target_id_str): New, factored out from ...
1829         (print_thread_info_1): ... here.  Use it to compute the max
1830         "Target Id" column width.
1831
1832 2018-06-29  Pedro Alves  <palves@redhat.com>
1833
1834         * remote.c (remote_target::extra_thread_info): Delete
1835         'display_buf' and 'n' locals.  from the cache, regardless of
1836         packet mechanims is in use.  Use cache for qThreadExtra and qP
1837         methods too.
1838
1839 2018-06-29  Pedro Alves  <palves@redhat.com>
1840
1841         * blockframe.c (find_pc_sect_containing_function): New function.
1842         * breakpoint.c (print_breakpoint_location): Don't call
1843         find_pc_sect_function.
1844         * linespec.c (create_sals_line_offset): Record the location's
1845         symbol in the sal.
1846         * linespec.c (convert_address_location_to_sals): Fill in sal's
1847         symbol with find_pc_sect_containing_function.
1848         * symtab.c (find_function_start_sal): Rename to ...
1849         (find_function_start_sal_1): ... this.
1850         (find_function_start_sal): Reimplement as wrapper around
1851         find_function_start_sal_1, and use
1852         find_pc_sect_containing_function to fill in the sal's symbol.
1853         (find_function_start_sal(symbol*, bool)): Adjust.
1854         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1855         comments.
1856         (find_pc_sect_containing_function): Declare.
1857
1858 2018-06-29  Pedro Alves  <palves@redhat.com>
1859
1860         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1861         true if the the location has no symbol.
1862
1863 2018-06-28  Tom Tromey  <tom@tromey.com>
1864
1865         * NEWS: Mention --enable-codesign.
1866         * silent-rules.mk (ECHO_SIGN): New variable.
1867         * configure.ac: Add --enable-codesign.
1868         * configure: Rebuild.
1869         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1870         (gdb$(EXEEXT)): Optionally invoke codesign.
1871
1872 2018-06-28  Pedro Alves  <palves@redhat.com>
1873
1874         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1875         comments.
1876         (switch_to_thread_no_regs): Adjust comment.
1877         * infcmd.c (stop_pc): Delete.
1878         (post_create_inferior, info_program_command): Replace references
1879         to stop_pc with references to thread_info->suspend.stop_pc.
1880         * inferior.h (stop_pc): Delete declaration.
1881         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1882         (handle_inferior_event_1, handle_signal_stop)
1883         (process_event_stop_test, keep_going_stepped_thread)
1884         (handle_step_into_function, handle_step_into_function_backward)
1885         (print_stop_location): Replace references to stop_pc with
1886         references to thread_info->suspend.stop_pc.
1887         (struct infcall_suspend_state) <stop_pc>: Delete field.
1888         (save_infcall_suspend_state, restore_infcall_suspend_state):
1889         Remove references to inf_stat->stop_pc.
1890         * linux-fork.c (fork_load_infrun_state): Likewise.
1891         * record-btrace.c (record_btrace_set_replay): Likewise.
1892         * record-full.c (record_full_goto_entry): Likewise.
1893         * remote.c (print_one_stopped_thread): Likewise.
1894         * target.c (target_resume): Extend comment.
1895         * thread.c (set_executing_thread): New.
1896         (set_executing): Use it.
1897         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1898         Remove references to stop_pc.
1899
1900 2018-06-28  Pedro Alves  <palves@redhat.com>
1901
1902         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1903         Moving fetching stop_pc until after ecs->event_thread is refreshed.
1904
1905 2018-06-28  Tom Tromey  <tom@tromey.com>
1906
1907         * coffread.c (coff_symfile_finish): Update.
1908         * xcoffread.c (xcoff_symfile_finish): Update.
1909         * elfread.c (elf_symfile_finish): Update.
1910         * symfile.h (dwarf2_free_objfile): Don't declare.
1911         * dwarf2read.c (_initialize_dwarf2_read): Use
1912         register_objfile_data_with_cleanup.
1913         (dwarf2_free_objfile): Now static.  Change signature.
1914
1915 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1916
1917         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1918         option "-o" to add-symbol-file-load to add an offset to each
1919         section's load address.
1920         * symfile.c (set_objfile_default_section_offset): New function.
1921
1922 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1923
1924         * symfile.c (add_symbol_file_command): Make sure that sections
1925         with the same name are sorted in the same order.
1926
1927 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1928
1929         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1930         require the second argument.  If omitted, load sections at the
1931         addresses specified in the file.
1932
1933 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1934
1935         * symfile.c (symbol_file_command, symbol_file_add_main_1)
1936         (_initialize_symfile): Add option "-o" to symbol-file to add an
1937         offset to each section of the symbol file.
1938
1939 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1940
1941         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1942
1943 2018-06-27  Tom Tromey  <tom@tromey.com>
1944
1945         * stack.c (_initialize_stack): Update "func" help text.
1946
1947 2018-06-27  Tom Tromey  <tom@tromey.com>
1948
1949         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1950         std::vector.
1951         (unwind_infopy_str, pyuw_create_unwind_info)
1952         (unwind_infopy_add_saved_register, pyuw_sniffer)
1953         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1954         Update.
1955         (struct saved_reg): Add constructor.
1956         <value>: Now a gdbpy_ref<>.
1957
1958 2018-06-27  Tom Tromey  <tom@tromey.com>
1959
1960         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1961
1962 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1963
1964         * gdb-gdb.py.in: Format using autopep8.
1965
1966 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1967
1968         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1969         (type_lookup_function): Recognize CORE_ADDR values.
1970
1971 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1972
1973         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1974         print tag_name.
1975
1976 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1977
1978         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1979         <__lt__>: Add.
1980
1981 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1982
1983         * gdb-gdb.py: Move to...
1984         * gdb-gdb.py.in: ... here.
1985         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1986         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1987         dependencies.
1988         (distclean): Remove gdb-gdb.py when cleaning.
1989         (gdb-gdb.py, gdb-gdb.gdb): New rules.
1990         * configure: Re-generate.
1991
1992 2018-06-27  Pedro Alves  <palves@redhat.com>
1993
1994         * proc-service.c (get_ps_regcache): New.
1995         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1996         (ps_lsetfpregs): Use it.
1997
1998 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
1999
2000         PR gdb/21695
2001         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2002         (dwarf_decode_lines_1): Adjust.
2003
2004 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2005
2006         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2007         override.
2008         <info_proc>: Likewise.
2009
2010 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
2011
2012         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2013         to windows_fetch_one_register, and only handle the case of
2014         fetching one register.  Move the code that reloads the context
2015         and iterates over all registers if R is negative to...
2016         (windows_nat_target::fetch_registers): ... here.
2017         (do_windows_store_inferior_registers): Rename to
2018         windows_store_one_register, and only handle the case of storing
2019         one register.  Move the code that handles the case where r is
2020         negative to...
2021         (windows_nat_target::store_registers) ... here.
2022
2023 2018-06-26  Tom Tromey  <tom@tromey.com>
2024
2025         PR rust/22574:
2026         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2027         * rust-lang.c (rust_print_struct_def): Add podata parameter.
2028         Update.
2029         (rust_internal_print_type): Add podata parameter.
2030         (rust_print_type): Update.
2031
2032 2018-06-26  Tom Tromey  <tom@tromey.com>
2033
2034         * typeprint.h (struct print_offset_data) <update, finish,
2035         maybe_print_hole>: New methods.
2036         <indentation>: New constant.
2037         * typeprint.c (print_offset_data::indentation): Define.
2038         (print_offset_data::maybe_print_hole, print_offset_data::update)
2039         (print_offset_data::finish): Move from c-typeprint.c and rename.
2040         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2041         (print_spaces_filtered_with_print_options): Update.
2042         (c_print_type_union_field_offset, maybe_print_hole)
2043         (c_print_type_struct_field_offset): Move to typeprint.c and
2044         rename.
2045         (c_type_print_base_struct_union): Update.
2046
2047 2018-06-25  Pedro Alves  <palves@redhat.com>
2048
2049         * gdbthread.h (thread_info_ref, delete_thread)
2050         (delete_thread_silent, first_thread_of_inferior)
2051         (any_thread_of_inferior, switch_to_thread)
2052         (enable_thread_stack_temporaries)
2053         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2054         (get_last_thread_stack_temporary)
2055         (value_in_thread_stack_temporaries, can_access_registers_thread):
2056         Spell out "struct thread_info" instead of just "thread_info".
2057         * inferior.h (notice_new_inferior): Likewise.
2058
2059 2018-06-25  Pedro Alves  <palves@redhat.com>
2060
2061         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2062         pass thread_info pointer to delete_thread.
2063         (windows_nat_target::detach): Pass inferior pointer to
2064         detach_inferior.
2065         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2066         delete_thread.
2067         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2068         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2069         and pass a thread_info pointer to delete_thread.
2070         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2071         pass thread_info pointer to delete_thread.
2072         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2073         delete_thread_silent call.
2074         * procfs.c (procfs_target::detach): Pass inferior pointer to
2075         detach_inferior.
2076         (procfs_target::wait): Pass thread_info pointer to delete_thread.
2077         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2078         delete_thread_silent call.
2079         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2080         pass thread_info pointer to delete_thread.
2081         (windows_nat_target::detach): Pass inferior pointer to
2082         delete_inferior.
2083
2084 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2085
2086         * regcache.c (readable_regcache::read_part): Fix asserts.
2087         (reg_buffer::raw_collect_part): New function.
2088         (regcache::write_part): Fix asserts.
2089         (reg_buffer::raw_supply_part): New function.
2090         (regcache::transfer_regset_register): New helper function.
2091         (regcache::transfer_regset): Call new functions.
2092         (regcache_supply_regset): Use gdb_byte*.
2093         (regcache::supply_regset): Likewise.
2094         (regcache_collect_regset): Likewise.
2095         (regcache::collect_regset): Likewise.
2096         * regcache.h (reg_buffer::raw_collect_part): New declaration.
2097         (reg_buffer::raw_supply_part): Likewise.
2098         (regcache::transfer_regset_register): Likewise.
2099         (regcache::transfer_regset): Use gdb_byte*.
2100
2101 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2102
2103         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2104
2105 2018-06-21  Pedro Alves  <palves@redhat.com>
2106
2107         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2108         instead of a ptid_t.  All callers adjusted.
2109         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
2110         adjusted.
2111         (print_ada_task_info, display_current_task_id, task_command_1):
2112         Adjust.
2113         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2114         inferior_thread.
2115         (breakpoint_kind): Adjust.
2116         (remove_breakpoints_pid): Rename to ...
2117         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
2118         pointer.  All callers adjusted.
2119         (bpstat_clear_actions): Use inferior_thread.
2120         (get_bpstat_thread): New.
2121         (bpstat_do_actions): Use it.
2122         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2123         to take a thread_info pointer.  All callers adjusted.
2124         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2125         (breakpoint_re_set_thread): Use inferior_thread.
2126         * breakpoint.h (struct inferior): Forward declare.
2127         (bpstat_stop_status): Update.
2128         (remove_breakpoints_pid): Delete.
2129         (remove_breakpoints_inf): New.
2130         * bsd-uthread.c (bsd_uthread_target::wait)
2131         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2132         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2133         (maint_btrace_packet_history_cmd)
2134         (maint_btrace_clear_packet_history_cmd): Adjust.
2135         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2136         inferior_thread.
2137         * cli/cli-interp.c: Include "inferior.h".
2138         * common/refcounted-object.h (struct
2139         refcounted_object_ref_policy): New.
2140         * compile/compile-object-load.c: Include gdbthread.h.
2141         (store_regs): Use inferior_thread.
2142         * corelow.c (core_target::close): Use current_inferior.
2143         (core_target_open): Adjust to use first_thread_of_inferior and use
2144         the current inferior.
2145         * ctf.c (ctf_target::close): Adjust to use current_inferior.
2146         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2147         <thread>: ... this new field.  All references adjusted.
2148         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2149         Take a thread_info pointer instead of a ptid_t.
2150         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2151         (dummy_frame_discard, register_dummy_frame_dtor): Take a
2152         thread_info pointer instead of a ptid_t.
2153         * elfread.c: Include "inferior.h".
2154         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2155         Use inferior_thread.
2156         * eval.c (evaluate_subexp): Likewise.
2157         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2158         inferior_thread.
2159         * gdb_proc_service.h (struct thread_info): Forward declare.
2160         (struct ps_prochandle) <ptid>: Delete, replaced by ...
2161         <thread>: ... this new field.  All references adjusted.
2162         * gdbarch.h, gdbarch.c: Regenerate.
2163         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2164         'thread' parameter.  All implementations and callers adjusted.
2165         * gdbthread.h (thread_info) <set_running>: New method.
2166         (delete_thread, delete_thread_silent): Take a thread_info pointer
2167         instead of a ptid.
2168         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2169         (first_thread_of_process): Delete, replaced by ...
2170         (first_thread_of_inferior): ... this new function.  All callers
2171         adjusted.
2172         (any_live_thread_of_process): Delete, replaced by ...
2173         (any_live_thread_of_inferior): ... this new function.  All callers
2174         adjusted.
2175         (switch_to_thread, switch_to_no_thread): Declare.
2176         (is_executing): Delete.
2177         (enable_thread_stack_temporaries): Update comment.
2178         <enable_thread_stack_temporaries>: Take a thread_info pointer
2179         instead of a ptid_t.  Incref the thread.
2180         <~enable_thread_stack_temporaries>: Decref the thread.
2181         <m_ptid>: Delete
2182         <m_thr>: New.
2183         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2184         (get_last_thread_stack_temporary)
2185         (value_in_thread_stack_temporaries, can_access_registers_thread):
2186         Take a thread_info pointer instead of a ptid_t.  All callers
2187         adjusted.
2188         * infcall.c (get_call_return_value): Use inferior_thread.
2189         (run_inferior_call): Work with thread pointers instead of ptid_t.
2190         (call_function_by_hand_dummy): Work with thread pointers instead
2191         of ptid_t.  Use thread_info_ref.
2192         * infcmd.c (proceed_thread_callback): Access thread's state
2193         directly.
2194         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2195         access thread's state directly.
2196         (continue_command): Use inferior_thread.
2197         (info_program_command): Use find_thread_ptid and access thread
2198         state directly.
2199         (proceed_after_attach_callback): Use thread state directly.
2200         (notice_new_inferior): Take a thread_info pointer instead of a
2201         ptid_t.  All callers adjusted.
2202         (exit_inferior): Take an inferior pointer instead of a pid.  All
2203         callers adjusted.
2204         (exit_inferior_silent): New.
2205         (detach_inferior): Delete.
2206         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2207         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2208         (detach_inferior_command, kill_inferior_command): Use
2209         find_inferior_id instead of valid_gdb_inferior_id and
2210         gdb_inferior_id_to_pid.
2211         (inferior_command): Use inferior and thread pointers.
2212         * inferior.h (struct thread_info): Forward declare.
2213         (notice_new_inferior): Take a thread_info pointer instead of a
2214         ptid_t.  All callers adjusted.
2215         (detach_inferior): Delete declaration.
2216         (exit_inferior, exit_inferior_silent): Take an inferior pointer
2217         instead of a pid.  All callers adjusted.
2218         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2219         (valid_gdb_inferior_id): Delete.
2220         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2221         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2222         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2223         ...
2224         <inf>: ... this new field.
2225         <step_ptid>: Delete, replaced by ...
2226         <step_thread>: ... this new field.
2227         (get_displaced_stepping_state): Take an inferior pointer instead
2228         of a pid.  All callers adjusted.
2229         (displaced_step_in_progress_any_inferior): Adjust.
2230         (displaced_step_in_progress_thread): Take a thread pointer instead
2231         of a ptid_t.  All callers adjusted.
2232         (displaced_step_in_progress, add_displaced_stepping_state): Take
2233         an inferior pointer instead of a pid.  All callers adjusted.
2234         (get_displaced_step_closure_by_addr): Adjust.
2235         (remove_displaced_stepping_state): Take an inferior pointer
2236         instead of a pid.  All callers adjusted.
2237         (displaced_step_prepare_throw, displaced_step_prepare)
2238         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2239         All callers adjusted.
2240         (start_step_over): Adjust.
2241         (infrun_thread_ptid_changed): Remove bit updating ptids in the
2242         displaced step queue.
2243         (do_target_resume): Adjust.
2244         (fetch_inferior_event): Use inferior_thread.
2245         (context_switch, get_inferior_stop_soon): Take an
2246         execution_control_state pointer instead of a ptid_t.  All callers
2247         adjusted.
2248         (switch_to_thread_cleanup): Delete.
2249         (stop_all_threads): Use scoped_restore_current_thread.
2250         * inline-frame.c: Include "gdbthread.h".
2251         (inline_state) <inline_state>: Take a thread pointer instead of a
2252         ptid_t.  All callers adjusted.
2253         <ptid>: Delete, replaced by ...
2254         <thread>: ... this new field.
2255         (find_inline_frame_state): Take a thread pointer instead of a
2256         ptid_t.  All callers adjusted.
2257         (skip_inline_frames, step_into_inline_frame)
2258         (inline_skipped_frames, inline_skipped_symbol): Take a thread
2259         pointer instead of a ptid_t.  All callers adjusted.
2260         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2261         (inline_skipped_frames, inline_skipped_symbol): Likewise.
2262         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2263         pointers directly.
2264         * linux-nat.c (get_detach_signal): Likewise.
2265         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2266         (thread_db_notice_clone): Adjust.
2267         (thread_db_find_new_threads_silently)
2268         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2269         a thread pointer instead of a ptid_t.  All callers adjusted.
2270         * mi/mi-cmd-var.c: Include "inferior.h".
2271         (mi_cmd_var_update_iter): Update to use thread pointers.
2272         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2273         inferior directly.
2274         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2275         out to ...
2276         (mi_output_running): ... this new function.
2277         (mi_on_resume_1): Adjust to use it.
2278         (mi_user_selected_context_changed): Adjust to use inferior_thread.
2279         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2280         directly.
2281         (interrupt_thread_callback): : Adjust to use thread and inferior
2282         pointers.
2283         * proc-service.c: Include "gdbthread.h".
2284         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2285         * progspace-and-thread.c: Include "inferior.h".
2286         * progspace.c: Include "inferior.h".
2287         * python/py-exitedevent.c (create_exited_event_object): Adjust to
2288         hold a reference to an inferior_object.
2289         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2290         inferior_thread.
2291         * python/py-inferior.c (struct inferior_object): Give the type a
2292         tag name instead of a typedef.
2293         (python_on_normal_stop): No need to check if the current thread is
2294         listed.
2295         (inferior_to_inferior_object): Change return type to
2296         inferior_object.  All callers adjusted.
2297         (find_thread_object): Delete, bits factored out to ...
2298         (thread_to_thread_object): ... this new function.
2299         * python/py-infthread.c (create_thread_object): Use
2300         inferior_to_inferior_object.
2301         (thpy_is_stopped): Use thread pointer directly.
2302         (gdbpy_selected_thread): Use inferior_thread.
2303         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2304         field, replaced with ...
2305         <thread>: ... this new field.  All users adjusted.
2306         (btpy_insn_or_gap_new): Drop const.
2307         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
2308         callers adjusted.
2309         * python/py-record.c: Include "gdbthread.h".
2310         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2311         a ptid_t.  All callers adjusted.
2312         (gdbpy_current_recording): Use inferior_thread.
2313         * python/py-record.h (recpy_record_object) <ptid>: Delete
2314         field, replaced with ...
2315         <thread>: ... this new field.  All users adjusted.
2316         (recpy_element_object) <ptid>: Delete
2317         field, replaced with ...
2318         <thread>: ... this new field.  All users adjusted.
2319         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2320         a ptid_t.  All callers adjusted.
2321         * python/py-threadevent.c: Include "gdbthread.h".
2322         (get_event_thread): Use thread_to_thread_object.
2323         * python/python-internal.h (struct inferior_object): Forward
2324         declare.
2325         (find_thread_object, find_inferior_object): Delete declarations.
2326         (thread_to_thread_object, inferior_to_inferior_object): New
2327         declarations.
2328         * record-btrace.c: Include "inferior.h".
2329         (require_btrace_thread): Use inferior_thread.
2330         (record_btrace_frame_sniffer)
2331         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2332         (get_thread_current_frame): Use scoped_restore_current_thread and
2333         switch_to_thread.
2334         (get_thread_current_frame): Use thread pointer directly.
2335         (record_btrace_replay_at_breakpoint): Use thread's inferior
2336         pointer directly.
2337         * record-full.c: Include "inferior.h".
2338         * regcache.c: Include "gdbthread.h".
2339         (get_thread_arch_regcache): Use the inferior's address space
2340         directly.
2341         (get_thread_regcache, registers_changed_thread): New.
2342         * regcache.h (get_thread_regcache(thread_info *thread)): New
2343         overload.
2344         (registers_changed_thread): New.
2345         (remote_target) <remote_detach_1>: Swap order of parameters.
2346         (remote_add_thread): <remote_add_thread>: Return the new thread.
2347         (get_remote_thread_info(ptid_t)): New overload.
2348         (remote_target::remote_notice_new_inferior): Use thread pointers
2349         directly.
2350         (remote_target::process_initial_stop_replies): Use
2351         thread_info::set_running.
2352         (remote_target::remote_detach_1, remote_target::detach)
2353         (extended_remote_target::detach): Adjust.
2354         * stack.c (frame_show_address): Use inferior_thread.
2355         * target-debug.h (target_debug_print_thread_info_pp): New.
2356         * target-delegates.c: Regenerate.
2357         * target.c (default_thread_address_space): Delete.
2358         (memory_xfer_partial_1): Use current_inferior.
2359         (target_detach): Use current_inferior.
2360         (target_thread_address_space): Delete.
2361         (generic_mourn_inferior): Use current_inferior.
2362         * target.h (struct target_ops) <thread_address_space>: Delete.
2363         (target_thread_address_space): Delete.
2364         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
2365         pointers directly.
2366         (delete_thread_1, delete_thread, delete_thread_silent): Take a
2367         thread pointer instead of a ptid_t.  Adjust all callers.
2368         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2369         (first_thread_of_process): Delete, replaced by ...
2370         (first_thread_of_inferior): ... this new function.  All callers
2371         adjusted.
2372         (any_thread_of_process): Rename to ...
2373         (any_thread_of_inferior): ... this, and take an inferior pointer.
2374         (any_live_thread_of_process): Rename to ...
2375         (any_live_thread_of_inferior): ... this, and take an inferior
2376         pointer.
2377         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2378         (value_in_thread_stack_temporaries)
2379         (get_last_thread_stack_temporary): Take a thread pointer instead
2380         of a ptid_t.  Adjust all callers.
2381         (thread_info::set_running): New.
2382         (validate_registers_access): Use inferior_thread.
2383         (can_access_registers_ptid): Rename to ...
2384         (can_access_registers_thread): ... this, and take a thread
2385         pointer.
2386         (print_thread_info_1): Adjust to compare thread pointers instead
2387         of ptids.
2388         (switch_to_no_thread, switch_to_thread): Make extern.
2389         (scoped_restore_current_thread::~scoped_restore_current_thread):
2390         Use m_thread pointer directly.
2391         (scoped_restore_current_thread::scoped_restore_current_thread):
2392         Use inferior_thread.
2393         (thread_command): Use thread pointer directly.
2394         (thread_num_make_value_helper): Use inferior_thread.
2395         * top.c (execute_command): Use inferior_thread.
2396         * tui/tui-interp.c: Include "inferior.h".
2397         * varobj.c (varobj_create): Use inferior_thread.
2398         (value_of_root_1): Use find_thread_global_id instead of
2399         global_thread_id_to_ptid.
2400
2401 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
2402
2403         * regcache.c (readable_regcache::read_part): Avoid memcpy when
2404         possible.
2405         (regcache::write_part): Likewise.
2406         (readable_regcache::cooked_read_part): Update comment.
2407         (readable_regcache::cooked_write_part): Likewise.
2408         * regcache.h: (readable_regcache::read_part): Likewise.
2409         (regcache::write_part): Likewise.
2410
2411 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
2412             Dirk Schubert  <dirk.schubert@arm.com>
2413
2414         * aarch64-linux-nat.c (post_attach): New.
2415         (aarch64_linux_nat_target::post_attach): Override post_attach to
2416         record the number of hardware debug registers.
2417
2418 2018-06-20  Tom Tromey  <tom@tromey.com>
2419
2420         * python/py-param.c (add_setshow_generic): Make parameters const.
2421         (parmpy_init): Update.
2422
2423 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2424
2425         * regcache.h (regcache_cooked_read_ftype): Rename to...
2426         (register_read_ftype): ...this, change type to function_view.
2427         (class reg_buffer) <save>: Remove src parameter.
2428         (readonly_detached_regcache) <readonly_detached_regcache>: Make
2429         parameter non-const in first overload.  Remove src parameter in
2430         second overload.
2431         * regcache.c (do_cooked_read): Remove.
2432         (readonly_detached_regcache::readonly_detached_regcache): Make
2433         parameter non-const, adjust call to other constructor.
2434         (reg_buffer::save): Remove src parameter.
2435         * frame.c (do_frame_register_read): Remove.
2436         (frame_save_as_regcache): Use lambda function.
2437         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2438         parameter to ppu2spu_data *.
2439         (ppu2spu_sniffer): Use lambda function.
2440
2441 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2442
2443         * record-full.c (record_full_target::insert_breakpoint): Remove
2444         "struct" keyword, add const.
2445
2446 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
2447
2448         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2449         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2450         * configure.ac: Remove AC_PREREQ, add missing quoting.
2451         * gnulib/configure.ac: Modernize usage of
2452         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
2453         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2454         (AUTOMAKE_VERSION): Bump to 1.15.1.
2455         * configure: Re-generate.
2456         * config.in: Re-generate.
2457         * aclocal.m4: Re-generate.
2458         * gnulib/aclocal.m4: Re-generate.
2459         * gnulib/config.in: Re-generate.
2460         * gnulib/configure: Re-generate.
2461         * gnulib/import/Makefile.in: Re-generate.
2462
2463 2018-06-19  Pedro Alves  <palves@redhat.com>
2464
2465         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2466         (lookup_minimal_symbol_by_pc_section): ... here with
2467         gdb_assert_not_reached added.
2468
2469 2018-06-19  Pedro Alves  <palves@redhat.com>
2470
2471         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2472         parameter with a block parameter.  Compare location's block symbol
2473         with the frame's block instead of addresses.
2474         (skip_inline_frames): Pass the current block instead of the
2475         frame's address.  Break out as soon as we determine the frame
2476         should not be skipped.
2477
2478 2018-06-18  Tom Tromey  <tom@tromey.com>
2479
2480         * solib-aix.c (solib_aix_get_section_offsets): Return
2481         unique_xmalloc_ptr.
2482         (solib_aix_solib_create_inferior_hook): Update.
2483
2484 2018-06-18  Tom Tromey  <tom@tromey.com>
2485
2486         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2487
2488 2018-06-18  Tom Tromey  <tom@tromey.com>
2489
2490         * solib-frv.c (frv_relocate_main_executable): Use
2491         unique_xmalloc_ptr.
2492         * solib-dsbt.c (dsbt_relocate_main_executable): Use
2493         unique_xmalloc_ptr.
2494
2495 2018-06-18  Tom Tromey  <tom@tromey.com>
2496
2497         * objfiles.h (inhibit_section_map_updates): Update.
2498         (resume_section_map_updates, resume_section_map_updates_cleanup):
2499         Remove.
2500         * solib-svr4.c (svr4_handle_solib_event): Update.
2501         * objfiles.c (inhibit_section_map_updates): Return
2502         scoped_restore_tmpl<int>.
2503         (resume_section_map_updates, resume_section_map_updates_cleanup):
2504         Remove.
2505
2506 2018-06-18  Tom Tromey  <tom@tromey.com>
2507
2508         * valprint.h (read_string): Update.
2509         * valprint.c (read_string): Change type of "buffer".
2510         (val_print_string): Update.
2511         * python/py-value.c (valpy_string): Update.
2512         * language.h (struct language_defn) <la_get_string>: Change
2513         type of "buffer".
2514         (default_get_string, c_get_string): Update.
2515         * language.c (default_get_string): Change type of "buffer".
2516         * guile/scm-value.c (gdbscm_value_to_string): Update.
2517         * c-lang.c (c_get_string): Change type of "buffer".
2518
2519 2018-06-18  Tom Tromey  <tom@tromey.com>
2520
2521         * ser-mingw.c (struct pipe_state_destroyer): New.
2522         (pipe_state_up): New typedef.
2523         (cleanup_pipe_state): Remove.
2524         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
2525
2526 2018-06-18  Tom Tromey  <tom@tromey.com>
2527
2528         * rust-lang.h (rust_yyerror): Don't declare.
2529         * rust-lang.c (rust_language_defn): Update.
2530         * rust-exp.y (yyerror): Now static.
2531         * parse.c (parse_exp_in_context_1): Update.
2532         * p-lang.h (p_yyerror): Don't declare.
2533         * p-lang.c (p_language_defn): Update.
2534         * p-exp.y (yyerror): Now static.
2535         * opencl-lang.c (opencl_language_defn): Update.
2536         * objc-lang.c (objc_language_defn): Update.
2537         * m2-lang.h (m2_yyerror): Don't declare.
2538         * m2-lang.c (m2_language_defn): Update.
2539         * m2-exp.y (yyerror): Now static.
2540         * language.h (struct language_defn) <la_error>: Remove.
2541         * language.c (unk_lang_error): Remove.
2542         (unknown_language_defn, auto_language_defn): Remove.
2543         * go-lang.h (go_yyerror): Don't declare.
2544         * go-lang.c (go_language_defn): Update.
2545         * go-exp.y (yyerror): Now static.
2546         * f-lang.h (f_yyerror): Don't declare.
2547         * f-lang.c (f_language_defn): Update.
2548         * f-exp.y (yyerror): Now static.
2549         * d-lang.h (d_yyerror): Don't declare.
2550         * d-lang.c (d_language_defn): Update.
2551         * d-exp.y (yyerror): Now static.
2552         * c-lang.h (c_yyerror): Don't declare.
2553         * c-lang.c (c_language_defn, cplus_language_defn)
2554         (asm_language_defn, minimal_language_defn): Update.
2555         * c-exp.y (yyerror): Now static.
2556         * ada-lang.h (ada_yyerror): Don't declare.
2557         * ada-lang.c (ada_language_defn): Update.
2558         * ada-exp.y (yyerror): Now static.
2559
2560 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2561
2562         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2563         (store_sveregs_to_thread): Likewise.
2564         (aarch64_linux_fetch_inferior_registers): Check for SVE.
2565         (aarch64_linux_store_inferior_registers): Likewise.
2566         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2567         function.
2568         (aarch64_sve_regs_copy_to_regcache): Likewise.
2569         (aarch64_sve_regs_copy_from_regcache): Likewise.
2570         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2571         declaration.
2572         (aarch64_sve_regs_copy_to_regcache): Likewise.
2573         (aarch64_sve_regs_copy_from_regcache): Likewise.
2574         (sve_context): Structure from Linux headers.
2575         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2576         (SVE_SIG_ZREG_SIZE): Likewise.
2577         (SVE_SIG_PREG_SIZE): Likewise.
2578         (SVE_SIG_FFR_SIZE): Likewise.
2579         (SVE_SIG_REGS_OFFSET): Likewise.
2580         (SVE_SIG_ZREGS_OFFSET): Likewise.
2581         (SVE_SIG_ZREG_OFFSET): Likewise.
2582         (SVE_SIG_ZREGS_SIZE): Likewise.
2583         (SVE_SIG_PREGS_OFFSET): Likewise.
2584         (SVE_SIG_PREG_OFFSET): Likewise.
2585         (SVE_SIG_PREGS_SIZE): Likewise.
2586         (SVE_SIG_FFR_OFFSET): Likewise.
2587         (SVE_SIG_REGS_SIZE): Likewise.
2588         (SVE_SIG_CONTEXT_SIZE): Likewise.
2589         (SVE_PT_REGS_MASK): Likewise.
2590         (SVE_PT_REGS_FPSIMD): Likewise.
2591         (SVE_PT_REGS_SVE): Likewise.
2592         (SVE_PT_VL_INHERIT): Likewise.
2593         (SVE_PT_VL_ONEXEC): Likewise.
2594         (SVE_PT_REGS_OFFSET): Likewise.
2595         (SVE_PT_FPSIMD_OFFSET): Likewise.
2596         (SVE_PT_FPSIMD_SIZE): Likewise.
2597         (SVE_PT_SVE_ZREG_SIZE): Likewise.
2598         (SVE_PT_SVE_PREG_SIZE): Likewise.
2599         (SVE_PT_SVE_FFR_SIZE): Likewise.
2600         (SVE_PT_SVE_FPSR_SIZE): Likewise.
2601         (SVE_PT_SVE_FPCR_SIZE): Likewise.
2602         (__SVE_SIG_TO_PT): Likewise.
2603         (SVE_PT_SVE_OFFSET): Likewise.
2604         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2605         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2606         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2607         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2608         (SVE_PT_SVE_PREG_OFFSET): Likewise.
2609         (SVE_PT_SVE_PREGS_SIZE): Likewise.
2610         (SVE_PT_SVE_FFR_OFFSET): Likewise.
2611         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2612         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2613         (SVE_PT_SVE_SIZE): Likewise.
2614         (SVE_PT_SIZE): Likewise.
2615         (HAS_SVE_STATE): New define.
2616
2617 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2618
2619         * nat/aarch64-sve-linux-sigcontext.h: New file.
2620         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2621         new files.
2622         (SVE_VQ_MIN): Likewise.
2623         (SVE_VQ_MAX): Likewise.
2624         (SVE_VL_MIN): Likewise.
2625         (SVE_VL_MAX): Likewise.
2626         (SVE_NUM_ZREGS): Likewise.
2627         (SVE_NUM_PREGS): Likewise.
2628         (sve_vl_valid): Likewise.
2629         (struct user_sve_header): Likewise.
2630
2631 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
2632             Richard Bunt <Richard.Bunt@arm.com>
2633
2634         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2635         was requested by GDB.
2636
2637 2018-06-15  Tom de Vries  <tdevries@suse.de>
2638
2639         * MAINTAINERS (Write After Approval): Add Tom de Vries.
2640
2641 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
2642
2643         * gnulib/update-gnulib.sh: Print expected versions of
2644         autoconf/aclocal.
2645
2646 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
2647
2648         * arch-utils.c (default_type_align): Use type_length_units.
2649         * gdbtypes.c (type_align): Use type_length_units.
2650
2651 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2652
2653         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2654         of 'define' command.
2655
2656 2018-06-14  Tom de Vries  <tdevries@suse.de>
2657
2658         PR cli/22573
2659         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2660         get_no_prettyformat_print_options.
2661
2662 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
2663
2664         * sparc-nat.h: Include target.h.
2665         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2666         <fetch_registers>: Remove this argument in function call.
2667         <store_registers>: Remove this argument in function call, remove
2668         extra semicolon.
2669         <low_forget_process>: Call sparc64_forget_process instead of
2670         sparc_forget_process.
2671
2672 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2673
2674         * procfs.c (_initialize_procfs): Use add_inf_child_target.
2675         (procfs_target::make_corefile_notes): Adjust to new
2676         target_read_alloc return type.
2677
2678 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2679             Stephen Roberts  <stephen.roberts@arm.com>
2680
2681         PR gdb/22882
2682         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2683         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2684         Move should_notify_stop local into more inner scope.
2685
2686 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2687             Stephen Roberts  <stephen.roberts@arm.com>
2688
2689         PR gdb/22882
2690         * infrun.c (resume_1): Add call to mark_async_event_handler.
2691
2692 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2693
2694         * infrun.c (do_target_wait): Change old version of $pc printed.
2695
2696 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
2697
2698         * dwarf2read.c (read_index_from_section): Rename to...
2699         (read_gdb_index_from_section): ... this, update all callers.
2700         (dwarf2_read_index): Rename to...
2701         (dwarf2_read_gdb_index): ... this, update all callers.
2702
2703 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
2704
2705         * gdb/hppa-linux-nat.c
2706         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2707         hppa_linux_nat_target::fetch_registers.
2708
2709 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2710
2711         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2712         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2713         (AARCH64_DWARF_SVE_FFR): Likewise.
2714         (AARCH64_DWARF_SVE_P0): Likewise.
2715         (AARCH64_DWARF_SVE_Z0): Likewise.
2716
2717 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2718
2719         * common/common-regcache.h (raw_compare): New function.
2720         * regcache.c (regcache::raw_compare): Likewise.
2721         * regcache.h (regcache::raw_compare): New declaration.
2722
2723 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2724
2725         * common/common-regcache.h (reg_buffer_common): New structure.
2726         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2727         (reg_buffer::raw_supply): Likewise.
2728         (reg_buffer::raw_supply_integer): Likewise.
2729         (reg_buffer::raw_supply_zeroed): Likewise.
2730         (reg_buffer::raw_collect): Likewise.
2731         (reg_buffer::raw_collect_integer): Likewise.
2732         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2733         (reg_buffer::raw_supply): Likewise.
2734         (reg_buffer::raw_supply_integer): Likewise.
2735         (reg_buffer::raw_supply_zeroed): Likewise.
2736         (reg_buffer::raw_collect): Likewise.
2737         (reg_buffer::raw_collect_integer): Likewise.
2738
2739 2018-06-10  Tom Tromey  <tom@tromey.com>
2740
2741         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
2742         (class remote_state) <stop_reply_queue>: Now std::vector.
2743         (remote_state::~remote_state)
2744         (remote_target::stop_reply_queue_length): Update.
2745         (struct queue_iter_param, remove_child_of_pending_fork)
2746         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2747         (check_pending_event_prevents_wildcard_vcont_callback)
2748         (remove_stop_reply_for_inferior)
2749         (remove_stop_reply_of_remote_state)
2750         (remote_notif_remove_once_on_match)
2751         (stop_reply_match_ptid_and_ws)
2752         (remote_kill_child_of_pending_fork): Remove.
2753         (remote_target::remove_new_fork_children)
2754         (remote_target::check_pending_events_prevent_wildcard_vcont)
2755         (remote_target::discard_pending_stop_replies)
2756         (remote_target::discard_pending_stop_replies_in_queue)
2757         (remote_target::remote_notif_remove_queued_reply)
2758         (remote_target::queued_stop_reply)
2759         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2760         (remote_target::wait, remote_target::kill_new_fork_children)
2761         (remote_target::async): Update.
2762
2763 2018-06-10  Tom Tromey  <tom@tromey.com>
2764
2765         * record-full.c (record_full_arch_list_cleanups): Remove.
2766         (record_full_message): Use try/catch.
2767         (record_full_wait_cleanups): Remove.
2768         (record_full_wait_1): Use try/catch.
2769         (record_full_restore): Likewise.
2770
2771 2018-06-10  Tom Tromey  <tom@tromey.com>
2772
2773         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
2774         declare VEC.  Add constructor.
2775         <in_target_beneath>: Now bool.
2776         (record_full_breakpoints): Now a std::vector, static.
2777         (record_full_sync_record_breakpoints)
2778         (record_full_init_record_breakpoints)
2779         (record_full_target::insert_breakpoint)
2780         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
2781
2782 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
2783
2784         * dwarf2read.c (process_cu_includes): Remove struct keyword.
2785         * serial.c (serial_interface_lookup): Remove struct keyword.
2786
2787 2018-06-10  Tom Tromey  <tom@tromey.com>
2788
2789         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2790         method.
2791         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2792         a method.
2793         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2794         method.
2795         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2796         "beneath" as a method.
2797         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2798         Use "beneath" as a method.
2799
2800 2018-06-10  Tom Tromey  <tom@tromey.com>
2801
2802         * tracefile.c (struct trace_file_writer_deleter): New.
2803         <operator()>: Rename from trace_file_writer_xfree.
2804         (trace_file_writer_up): New typedef.
2805         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2806
2807 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
2808
2809         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2810         <m_registers, m_register_status>: Change type to
2811         std::unique_ptr.
2812         * regcache.c (reg_buffer::reg_buffer): Use new instead of
2813         XCNEWVEC.
2814
2815 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
2816
2817         * common/common-regcache.h (enum register_status): Add
2818         underlying type "signed char".
2819         * regcache.h (reg_buffer) <m_register_status>: Change type to
2820         register_status *.
2821         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2822         register_status instead of signed char.
2823         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2824         (reg_buffer::get_register_status): Remove cast.
2825         (readable_regcache::raw_read): Remove cast.
2826         (readable_regcache::cooked_read): Remove cast.
2827
2828 2018-06-09  Tom Tromey  <tom@tromey.com>
2829
2830         * source.c (reverse_search_command, forward_search_command): Use
2831         scoped_fd.
2832
2833 2018-06-09  Tom Tromey  <tom@tromey.com>
2834
2835         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
2836         (serial_ops_list): Now static, std::vector.
2837         (serial_interface_lookup, serial_add_interface): Update.
2838
2839 2018-06-09  Tom Tromey  <tom@tromey.com>
2840
2841         * dwarf2read.c (process_cu_includes): Update.
2842         (process_full_comp_unit): Update.
2843         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2844         std::vector.
2845
2846 2018-06-08  Paul Koning  <paul_koning@dell.com>
2847
2848         PR gdb/23252
2849
2850         * python/python.c (do_start_initialization):
2851         Avoid call to internal Python API.
2852         (init__gdb_module): New function.
2853
2854 2018-06-08  Gary Benson <gbenson@redhat.com>
2855
2856         * linux-thread-db.c (valprint.h): New include.
2857         (struct check_thread_db_info): New structure.
2858         (check_thread_db_on_load, tdb_testinfo): New static globals.
2859         (check_thread_db, check_thread_db_callback): New functions.
2860         (try_thread_db_load_1): Run integrity checks if requested.
2861         (maintenance_check_libthread_db): New function.
2862         (_initialize_thread_db): Register "maint check libthread-db"
2863         and "maint set/show check-libthread-db".
2864         * NEWS: Mention the above new commands.
2865
2866 2018-06-08  Tom Tromey  <tom@tromey.com>
2867
2868         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2869         now a method.
2870
2871 2018-06-08  Tom Tromey  <tom@tromey.com>
2872
2873         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2874
2875 2018-06-08  Tom Tromey  <tom@tromey.com>
2876
2877         * common/btrace-common.h (struct btrace_data): Add constructor,
2878         destructor, move assignment operator.
2879         <empty, clear, fini>: New methods.
2880         <format>: Initialize.
2881         (btrace_data_init, btrace_data_fini, btrace_data_clear)
2882         (btrace_data_empty): Don't declare.
2883         * common/btrace-common.c (btrace_data_init): Remove.
2884         (btrace_data::fini): Rename from btrace_data_fini.
2885         (btrace_data::empty): Rename from btrace_data_empty.
2886         (btrace_data::clear): Rename from btrace_data_clear.  Return
2887         bool.
2888         * btrace.h (make_cleanup_btrace_data): Don't declare.
2889         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2890         (parse_xml_btrace): Update.
2891         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2892         (maint_btrace_clear_packet_history_cmd): Update.
2893
2894 2018-06-07  Pedro Alves  <palves@redhat.com>
2895
2896         * target.h (target_ops) <beneath>: Now a method.  All references
2897         updated.
2898         (class target_stack): New.
2899         * target.c (g_target_stack): New.
2900         (g_current_top_target): Delete.
2901         (current_top_target): Get the top target out of g_target_stack.
2902         (target_stack::push, target_stack::unpush): New.
2903         (push_target, unpush_target): Reimplement.
2904         (target_is_pushed): Reimplement in terms of g_target_stack.
2905         (target_ops::beneath, target_stack::find_beneath): New.
2906
2907 2018-06-07  Pedro Alves  <palves@redhat.com>
2908
2909         * target.h (find_target_beneath): Delete declaration.
2910         * target.c (find_target_beneath): Delete definition.
2911         * aix-thread.c: All callers of find_target_beneath adjusted to
2912         call target_ops::beneath instead.
2913         * bsd-uthread.c: Likewise.
2914         * linux-thread-db.c: Likewise.
2915         * ravenscar-thread.c: Likewise.
2916         * sol-thread.c: Likewise.
2917         * spu-multiarch.c: Likewise.
2918
2919 2018-06-07  Pedro Alves  <palves@redhat.com>
2920
2921         * target.h (target_ops) <beneath>: Now a method.  All references
2922         updated.
2923         (target_ops) <m_beneath>: New.
2924         * target.c (target_ops::beneath): New.
2925         * corelow.c: Adjust all references to target_ops::beneath.
2926         * linux-thread-db.c: Likewise.
2927         * make-target-delegates: Likewise.
2928         * record-btrace.c: Likewise.
2929         * record-full.c: Likewise.
2930         * remote.c: Likewise.
2931         * target.c: Likewise.
2932         * target-delegates.c: Regenerate.
2933
2934 2018-06-07  Pedro Alves  <palves@redhat.com>
2935
2936         * target.h (target_stack): Delete.
2937         (current_top_target): Declare function.
2938         * target.c (target_stack): Delete.
2939         (g_current_top_target): New.
2940         (current_top_target): New function.
2941         * auxv.c: Use current_top_target instead of target_stack
2942         throughout.
2943         * avr-tdep.c: Likewise.
2944         * breakpoint.c: Likewise.
2945         * corefile.c: Likewise.
2946         * elfread.c: Likewise.
2947         * eval.c: Likewise.
2948         * exceptions.c: Likewise.
2949         * frame.c: Likewise.
2950         * gdbarch-selftests.c: Likewise.
2951         * gnu-v3-abi.c: Likewise.
2952         * ia64-tdep.c: Likewise.
2953         * ia64-vms-tdep.c: Likewise.
2954         * infcall.c: Likewise.
2955         * infcmd.c: Likewise.
2956         * infrun.c: Likewise.
2957         * linespec.c: Likewise.
2958         * linux-tdep.c: Likewise.
2959         * minsyms.c: Likewise.
2960         * ppc-linux-nat.c: Likewise.
2961         * ppc-linux-tdep.c: Likewise.
2962         * procfs.c: Likewise.
2963         * regcache.c: Likewise.
2964         * remote.c: Likewise.
2965         * rs6000-tdep.c: Likewise.
2966         * s390-linux-nat.c: Likewise.
2967         * s390-tdep.c: Likewise.
2968         * solib-aix.c: Likewise.
2969         * solib-darwin.c: Likewise.
2970         * solib-dsbt.c: Likewise.
2971         * solib-spu.c: Likewise.
2972         * solib-svr4.c: Likewise.
2973         * solib-target.c: Likewise.
2974         * sparc-tdep.c: Likewise.
2975         * sparc64-tdep.c: Likewise.
2976         * spu-tdep.c: Likewise.
2977         * symfile.c: Likewise.
2978         * symtab.c: Likewise.
2979         * target-descriptions.c: Likewise.
2980         * target-memory.c: Likewise.
2981         * target.c: Likewise.
2982         * target.h: Likewise.
2983         * tracefile-tfile.c: Likewise.
2984         * tracepoint.c: Likewise.
2985         * valops.c: Likewise.
2986         * valprint.c: Likewise.
2987         * value.c: Likewise.
2988         * windows-tdep.c: Likewise.
2989         * mi/mi-main.c: Likewise.
2990
2991 2018-06-07  Tom Tromey  <tom@tromey.com>
2992
2993         * valprint.h (build_address_symbolic): Declare.
2994         * printcmd.c (print_address_symbolic): Update.
2995         (build_address_symbolic): Change "name" and "filename" to
2996         std::string.
2997         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2998         Update.
2999         * defs.h (build_address_symbolic): Remove declaration.
3000
3001 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
3002
3003         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3004         (aarch64_vnv_type): Add function.
3005         (aarch64_pseudo_register_name): Add V regs for SVE.
3006         (aarch64_pseudo_register_type): Likewise.
3007         (aarch64_pseudo_register_reggroup_p): Likewise.
3008         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3009         (aarch64_pseudo_read_value): Add V regs for SVE.
3010         (aarch64_pseudo_write_2): Use V0 offset for SVE
3011         (aarch64_pseudo_write): Add V regs for SVE.
3012         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3013
3014 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
3015
3016         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3017         (sve_vl_from_vq): Likewise.
3018
3019 2018-06-05  Tom Tromey  <tom@tromey.com>
3020
3021         * cli/cli-cmds.c (show_version): Update.
3022         * top.c (print_gdb_version): Add "interactive" parameter.
3023         Update.
3024         * main.c (captured_main_1): Update.
3025         * top.h (print_gdb_version): Add "interactive" parameter and a
3026         comment.
3027
3028 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
3029
3030         * common/enum-flags.h: Add trailing semicolon to example in
3031         comment.
3032
3033 2018-06-05  Tom Tromey  <tom@tromey.com>
3034
3035         PR cli/12326:
3036         * NEWS: Add entry about pager.
3037         * utils.c (pagination_disabled_for_command): New global.
3038         (prompt_for_continue): Allow "c" response to prompt.
3039         (reinitialize_more_filter): Clear
3040         pagination_disabled_for_command.
3041         (fputs_maybe_filtered): Check pagination_disabled_for_command.
3042
3043 2018-06-04  Tom Tromey  <tom@tromey.com>
3044
3045         * ada-lang.h (ada_lookup_symbol_list): Update.
3046         * ada-lang.c (resolve_subexp): Update.
3047         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
3048         parameter.
3049         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3050         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3051         results parameter to std::vector.
3052         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3053         Update.
3054         * ada-exp.y (block_lookup): Update.
3055         (select_possible_type_sym): Change type of syms.  Remove nsyms
3056         parameter.
3057         (write_var_or_type, write_name_assoc): Update.
3058
3059 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
3060
3061         * windows-nat.c (windows_nat_target::xfer_partial): Return
3062         TARGET_XFER_E_IO if we need to delegate to the target beneath
3063         but BENEATH is NULL.
3064
3065 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
3066
3067         * Makefile.in (config.status): Add configure.nat as a
3068         dependency.
3069
3070 2018-06-04  Tom Tromey  <tom@tromey.com>
3071
3072         * cp-name-parser.y (cpname_state): Add method declarations.
3073         (HANDLE_QUAL): Update.
3074         (cpname_state::d_grab, cpname_state::fill_comp)
3075         (cpname_state::make_operator, cpname_state::make_dtor)
3076         (cpname_state::make_builtin_type, cpname_state::make_name)
3077         (cpname_state::d_qualify, cpname_state::d_int_type)
3078         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3079         (%union): Move earlier.
3080
3081 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3082
3083         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3084
3085 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3086
3087         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3088         (aarch64_pseudo_write_1): Likewise.
3089         (aarch64_pseudo_read_value): Use helper.
3090         (aarch64_pseudo_write): Likewise.
3091
3092 2018-06-04  Pedro Alves  <palves@redhat.com>
3093
3094         * darwin-nat.c (darwin_ops): Delete.
3095         (darwin_attach_pid): Use get_native_target.
3096
3097 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3098
3099         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3100         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3101
3102 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3103
3104         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3105         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3106         (aarch64_gdbarch_init): Check for SVE.
3107         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3108
3109 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3110
3111         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3112         * aarch64-tdep.h (aarch64_read_description): Likewise.
3113         * arch/aarch64.c (aarch64_create_target_description): Likewise.
3114         * arch/aarch64.h (aarch64_create_target_description): Likewise.
3115         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3116         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3117         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3118
3119 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
3120
3121         * value.c (value_fetch_lazy_bitfield): New.
3122         (value_fetch_lazy_memory): New.
3123         (value_fetch_lazy_register): New.
3124         (value_fetch_lazy): Factor out to smaller functions.
3125
3126 2018-06-01  Tom Tromey  <tom@tromey.com>
3127
3128         * cp-name-parser.y (backslashable, represented): Now const.
3129
3130 2018-06-01  Tom Tromey  <tom@tromey.com>
3131
3132         * cp-name-parser.y: Include parser-defs.h.
3133         (parser_fprintf): Remove declaration.
3134
3135 2018-06-01  Tom Tromey  <tom@tromey.com>
3136
3137         * cp-name-parser.y: Use %pure-parser, %lex-param, and
3138         %parse-param.
3139         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3140         (global_result): Remove globals.
3141         (struct cpname_state): New.
3142         (yyparse): Don't declare.
3143         (yylex, yyerror): Move declarations after %union.
3144         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3145         (make_name): Add state parameter.
3146         Update all callers.
3147         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3148         parameter.
3149         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3150         Update.
3151         (yylex): Add lvalp, state parameters.
3152         (yyerror): Add state parameter.
3153         (cp_demangled_name_to_comp): Update.
3154
3155 2018-06-01  Tom Tromey  <tom@tromey.com>
3156
3157         * cp-name-parser.y (parser_fprintf): Declare.
3158         (GDB_YY_REMAP_PREFIX): Define.
3159         Include yy-remap.h.  Don't redefine yy* identifiers.
3160
3161 2018-06-01  Tom Tromey  <tom@tromey.com>
3162
3163         * python/py-type.c (typy_legacy_template_argument): Update.
3164         * cp-support.h (cp_demangled_name_to_comp): Update.
3165         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3166         parameter to be a "std::string *".
3167         (main): Update.
3168
3169 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
3170
3171         * ada-lex.l: Include "diagnostics.h" instead of
3172         "common/diagnostics.h".
3173         * unittests/environ-selftests.c: Likewise.
3174         * common/diagnostics.h: Moved to ../include.
3175
3176 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
3177
3178         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3179         to language_mode_manual while calling breakpoint_re_set_one.
3180
3181 2018-06-01  Tom Tromey  <tom@tromey.com>
3182
3183         * valops.c (value_cast_structs, destructor_name_p): Update.
3184         * symtab.c (gdb_mangle_name): Update.
3185         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3186         Update.
3187         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3188         (pascal_object_print_value_fields, pascal_object_print_value):
3189         Update.
3190         * p-typeprint.c (pascal_type_print_derivation_info): Update.
3191         * linespec.c (find_methods): Update.
3192         * gdbtypes.h (type_name_no_tag): Remove.
3193         (type_name_or_error): Rename from type_name_no_tag_or_error.
3194         * gdbtypes.c (type_name_no_tag): Remove.
3195         (type_name_or_error): Rename from type_name_no_tag_or_error.
3196         (lookup_struct_elt_type, check_typedef): Update.
3197         * expprint.c (print_subexp_standard): Update.
3198         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3199         * d-namespace.c (d_lookup_nested_symbol): Update.
3200         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3201         (cp_print_class_member): Update.
3202         * cp-namespace.c (cp_lookup_nested_symbol): Update.
3203         * completer.c (add_struct_fields): Update.
3204         * c-typeprint.c (cp_type_print_derivation_info)
3205         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3206         Update.
3207         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3208         (ada_prefer_type, ada_is_exception_sym): Update.
3209
3210 2018-06-01  Tom Tromey  <tom@tromey.com>
3211
3212         * valops.c (enum_constant_from_type, value_namespace_elt)
3213         (value_maybe_namespace_elt): Update.
3214         * valarith.c (find_size_for_pointer_math): Update.
3215         * target-descriptions.c (make_gdb_type): Update.
3216         * symmisc.c (print_symbol): Update.
3217         * stabsread.c (define_symbol, read_type)
3218         (complain_about_struct_wipeout, add_undefined_type)
3219         (cleanup_undefined_types_1): Update.
3220         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3221         (rust_range_type_p, val_print_struct, rust_print_struct_def)
3222         (rust_internal_print_type, rust_composite_type)
3223         (rust_evaluate_funcall, rust_evaluate_subexp)
3224         (rust_inclusive_range_type_p): Update.
3225         * python/py-type.c (typy_get_tag): Update.
3226         * p-typeprint.c (pascal_type_print_base): Update.
3227         * mdebugread.c (parse_symbol, parse_type): Update.
3228         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3229         Update.
3230         * guile/scm-type.c (gdbscm_type_tag): Update.
3231         * go-lang.c (sixg_string_p): Update.
3232         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3233         Update.
3234         * gdbtypes.h (struct main_type) <tag_name>: Remove.
3235         (TYPE_TAG_NAME): Remove.
3236         * gdbtypes.c (type_name_no_tag): Simplify.
3237         (check_typedef, check_types_equal, recursive_dump_type)
3238         (copy_type_recursive, arch_composite_type): Update.
3239         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
3240         in summary mode when needed.
3241         * eval.c (evaluate_funcall): Update.
3242         * dwarf2read.c (fixup_go_packaging, read_structure_type)
3243         (process_structure_scope, read_enumeration_type)
3244         (read_namespace_type, read_module_type, determine_prefix): Update.
3245         * cp-support.c (inspect_type): Update.
3246         * coffread.c (process_coff_symbol, decode_base_type): Update.
3247         * c-varobj.c (c_is_path_expr_parent): Update.
3248         * c-typeprint.c (c_type_print_base_struct_union): Update.
3249         (c_type_print_base_1): Update.  Print struct/class/union/enum in
3250         summary when using C language.
3251         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3252         (gen_maybe_namespace_elt): Update.
3253         * ada-lang.c (ada_type_name): Simplify.
3254         (empty_record, ada_template_to_fixed_record_type_1)
3255         (template_to_static_fixed_type)
3256         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3257
3258 2018-06-01  Tom Tromey  <tom@tromey.com>
3259
3260         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3261         c_print_type.
3262         * c-typeprint.c (c_print_type_1): Add "language" parameter.
3263         (c_print_type): Update.
3264         (c_print_type): New overload.
3265         (c_type_print_varspec_prefix, c_type_print_args)
3266         (c_type_print_varspec_suffix, c_print_type_no_offsets)
3267         (c_type_print_base_struct_union, c_type_print_base_1)
3268         (cp_type_print_method_args): Add "language" parameter.
3269         (c_type_print_base): Update.
3270         * c-lang.h (c_print_type): Add new overload.
3271
3272 2018-06-01  Tom Tromey  <tom@tromey.com>
3273
3274         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3275         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3276
3277 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
3278
3279         * aarch64-tdep.c (aarch64_sve_register_names): New const
3280         var.
3281         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3282         (AARCH64_SVE_Z_REGS_NUM): New define.
3283         (AARCH64_SVE_P_REGS_NUM): Likewise.
3284         (AARCH64_SVE_NUM_REGS): Likewise.
3285
3286 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3287
3288         * nat/linux-ptrace.h [__alpha__]
3289         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3290         definitions.
3291
3292 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
3293
3294         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3295         the endianness selected.
3296         * NEWS: Document `set endian auto' mode operation update.
3297
3298 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3299
3300         * Makefile.in: Add new header.
3301         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3302         (sve_vl_from_vg): Likewise.
3303         (sve_vq_from_vl): Likewise.
3304         (sve_vl_from_vq): Likewise.
3305         (sve_vq_from_vg): Likewise.
3306         (sve_vg_from_vq): Likewise.
3307         * configure.nat: Add new c file.
3308         * nat/aarch64-sve-linux-ptrace.c: New file.
3309         * nat/aarch64-sve-linux-ptrace.h: New file.
3310
3311 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3312
3313         * aarch64-linux-nat.c (aarch64_linux_read_description):
3314         Add parmeter zero.
3315         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3316         Likewise.
3317         * aarch64-tdep.c (tdesc_aarch64_list): Add.
3318         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3319         (aarch64_gdbarch_init): Add parmeter zero.
3320         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3321         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3322         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3323         parmeter.
3324         * doc/gdb.texinfo: Describe SVE feature
3325         * features/aarch64-sve.c: New file.
3326
3327 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
3328
3329         PR gdb/23210
3330         * gdbarch.sh (significant_addr_bit): Default to zero when
3331         not set by target architecture.
3332         * gdbarch.c: Re-generated.
3333         * utils.c (address_significant): Update.
3334
3335 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
3336
3337         * stack.c (func_command): Remove trailing newline in call to error.
3338
3339 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3340
3341         * regcache.h (regcache_raw_collect): Remove, update callers to
3342         use regcache::raw_collect.
3343         * regcache.c (regcache_raw_collect): Remove.
3344
3345 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3346
3347         * regcache.h (regcache_raw_supply): Remove, update callers to
3348         use detached_regcache::raw_supply.
3349         * regcache.c (regcache_raw_supply): Remove.
3350
3351 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3352
3353         * regcache.h (regcache_cooked_write_part): Remove, update
3354         callers to use regcache::cooked_write_part.
3355         * regcache.c (regcache_cooked_write_part): Remove.
3356
3357 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3358
3359         * regcache.h (regcache_cooked_read_part): Remove, update callers
3360         to use readable_regcache::cooked_read_part.
3361         * regcache.c (regcache_cooked_read_part): Remove.
3362
3363 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3364
3365         * regcache.h (regcache_cooked_read_value): Remove, update
3366         callers to use readable_regcache::cooked_read_value.
3367         * regcache.c (regcache_cooked_read_value): Remove.
3368
3369 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3370
3371         * regcache.h (regcache_cooked_write): Remove, update callers to
3372         use regcache::cooked_write.
3373         * regcache.c (regcache_cooked_write): Remove.
3374
3375 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3376
3377         * regcache.h (regcache_invalidate): Remove, update callers to
3378         use detached_regcache::invalidate instead.
3379         * regcache.c (regcache_invalidate): Remove.
3380
3381 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3382
3383         * regcache.h (regcache_raw_write_part): Remove, update callers
3384         to use regcache::raw_write_part instead.
3385         * regcache.c (regcache_raw_write_part): Remove.
3386
3387 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3388
3389         * regcache.h (regcache_raw_read_part): Remove, update callers to
3390         use readable_regcache::raw_read_part instead.
3391         * regcache.c (regcache_raw_read_part): Remove.
3392
3393 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3394
3395         * regcache.h (regcache_cooked_read): Remove, update callers to
3396         use readable_regcache::cooked_read instead.
3397         * regcache.c (regcache_cooked_read): Remove.
3398
3399 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3400
3401         * regcache.h (regcache_raw_write): Remove, update callers to use
3402         regcache::raw_write instead.
3403         * regcache.c (regcache_raw_write): Remove.
3404
3405 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3406
3407         * regcache.h (regcache_raw_read): Remove, update callers to use
3408         readable_regcache::raw_read instead.
3409         * regcache.c (regcache_raw_read): Remove.
3410
3411 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3412
3413         * regcache.h (regcache_raw_update): Remove, update callers to
3414         use readable_regcache::raw_update instead.
3415         * regcache.c (regcache_raw_update): Remove.
3416
3417 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3418
3419         * regcache.h (regcache_register_status): Remove, update callers
3420         to use reg_buffer::get_register_status directly instead.
3421         * regcache.c (regcache_register_status): Remove.
3422
3423 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3424
3425         * regcache.h (regcache_get_ptid): Remove, update all callers to
3426         call regcache::ptid instead.
3427         * regcache.c (regcache_get_ptid): Remove.
3428
3429 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3430
3431         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3432
3433 2018-05-30  Pedro Alves  <palves@redhat.com>
3434
3435         * common/common-exceptions.h (exception_rethrow): Use
3436         ATTRIBUTE_NORETURN.
3437
3438 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
3439
3440         * breakpoint.c (print_solib_event, check_status_catch_solib):
3441         Remove struct keyword in range-based for loops.
3442         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3443         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3444         Likewise.
3445         * linespec.c (find_superclass_methods, search_minsyms_for_name):
3446         Likewise.
3447         * symfile.c (addr_info_make_relative): Likewise.
3448         * thread.c (value_in_thread_stack_temporaries): Likewise.
3449
3450 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
3451
3452         PR gdb/16841
3453         * valops.c (value_struct_elt_for_reference): Call check_typedef on
3454         aggregate type to get its real type before accessing it.
3455
3456 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
3457
3458         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3459         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3460         * coff-pe-read.c (add_pe_forwarded_sym): Replace
3461         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3462         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3463         * jit.c (jit_breakpoint_re_set_internal): Likewise.
3464         * printcmd.c (info_address_command): Likewise.
3465
3466 2018-05-29  Tom Tromey  <tom@tromey.com>
3467
3468         * windows-nat.c (handle_exception): Update fall-through comment.
3469
3470 2018-05-29  Tom Tromey  <tom@tromey.com>
3471
3472         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
3473         (struct program_space) <added_solibs>: Now a std::vector.
3474         * breakpoint.c (print_solib_event): Update.
3475         (check_status_catch_solib): Update.
3476         * progspace.c (clear_program_space_solib_cache): Update.
3477         * solib.c (update_solib_list): Update.
3478
3479 2018-05-29  Tom Tromey  <tom@tromey.com>
3480
3481         * python/py-type.c (typy_richcompare): Update.
3482         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3483         * gdbtypes.h (types_deeply_equal): Return bool.
3484         (types_equal): Likewise.
3485         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
3486         declare VEC.
3487         (check_types_equal): Change worklist to std::vector.  Return
3488         bool.
3489         (struct type_equality_entry): Add constructor.
3490         (compare_maybe_null_strings): Return bool.
3491         (check_types_worklist): Return bool.  Change worklist to
3492         std::vector.
3493         (types_deeply_equal): Use std::vector.
3494         (types_equal): Return bool.
3495         (compare_maybe_null_strings): Simplify.
3496
3497 2018-05-29  Tom Tromey  <tom@tromey.com>
3498
3499         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
3500
3501 2018-05-29  Tom Tromey  <tom@tromey.com>
3502
3503         * objc-lang.h: Don't include cp-support.h.
3504         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
3505         declare VEC.
3506
3507 2018-05-27  Tom Tromey  <tom@tromey.com>
3508
3509         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3510
3511 2018-05-25  Tom Tromey  <tom@tromey.com>
3512
3513         * value.c (value::location): Initialize.
3514
3515 2018-05-25  Tom Tromey  <tom@tromey.com>
3516
3517         * dbxread.c (init_bincl_list): Remove.
3518         (bincl_list): Now a std::vector.
3519         (bincls_allocated, next_bincl): Remove.
3520         (free_bincl_list, do_free_bincl_list_cleanup)
3521         (make_cleanup_free_bincl_list): Remove.
3522         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3523         unique_xmalloc_ptr.
3524         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3525         (struct header_file_location): Add constructor.
3526         (add_bincl_to_list): Remove.
3527
3528 2018-05-25  Tom Tromey  <tom@tromey.com>
3529
3530         * tui/tui.c (tui_enable): Update.
3531         * mi/mi-interp.c (mi_interp::init): Update.
3532         * interps.h (class interp) <name>: New method.
3533         <m_name>: Rename from name.
3534         (~scoped_restore_interp): Update.
3535         * interps.c (interp::interp): Update.
3536         (interp_add, interp_set, interp_lookup_existing)
3537         (current_interp_named_p): Update.
3538
3539 2018-05-25  Tom Tromey  <tom@tromey.com>
3540
3541         * interps.c (interp_name): Remove.
3542         * mi/mi-interp.c (mi_interp::init): Update.
3543         * interps.h (interp_name): Remove.
3544         (~scoped_restore_interp): Update.
3545         * tui/tui.c (tui_enable): Update.
3546
3547 2018-05-25  Tom Tromey  <tom@tromey.com>
3548
3549         * utils.c (fputs_maybe_filtered): Update.
3550         * linespec.c (decode_line_full): Update.
3551         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3552         (mi_print_breakpoint_for_event, mi_solib_loaded)
3553         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3554         (mi_user_selected_context_changed): Update.
3555         * mi/mi-main.c (mi_execute_command): Update.
3556         * cli/cli-script.c (execute_control_command): Update.
3557         * python/python.c (execute_gdb_command): Update.
3558         * solib.c (info_sharedlibrary_command): Update.
3559         * interps.c (interp_ui_out): Remove.
3560         * interps.h (interp_ui_out): Remove.
3561
3562 2018-05-25  Tom Tromey  <tom@tromey.com>
3563
3564         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3565         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3566         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3567
3568 2018-05-25  Tom Tromey  <tom@tromey.com>
3569
3570         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3571         * interps.c (interp_exec): Use scoped_restore.
3572
3573 2018-05-25  Tom Tromey  <tom@tromey.com>
3574
3575         * remote.c (remote_target::remote_file_get): Use
3576         gdb::byte_vector.
3577         (remote_target::remote_file_put): Likewise.
3578
3579 2018-05-25  Tom Tromey  <tom@tromey.com>
3580
3581         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3582         a std::string.
3583         (get_pe_section_index, add_pe_exported_sym): Update.
3584         (read_pe_exported_syms): Use gdb::def_vector.
3585
3586 2018-05-25  Tom Tromey  <tom@tromey.com>
3587
3588         * frame.c (remove_prev_frame): Remove.
3589         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3590
3591 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
3592
3593         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3594         Remove prototypes.
3595         * mips-linux-nat.c (supply_fpregset): Always call
3596         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3597         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3598         `mips_fill_fpregset'.
3599         * mips-linux-tdep.c (mips_supply_fpregset)
3600         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3601         (mips_fill_fpregset_wrapper): Remove functions.
3602         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3603         (mips_linux_fpregset): Remove variable.
3604         (mips_linux_iterate_over_regset_sections): Use
3605         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3606         (mips_linux_o32_sigframe_init): Remove comment.
3607
3608 2018-05-25  Pedro Alves  <palves@redhat.com>
3609
3610         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3611         (struct readahead_cache, struct packet_reg, struct
3612         remote_arch_state, class remote_state): Move higher up in the
3613         file.
3614         (remote_target::m_remote_state): Now an object instead of a pointer.
3615         (remote_target::get_remote_state): Adjust.
3616
3617 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3618
3619         * stack.c (select_and_print_frame): Delete.
3620         (struct function_bounds): Move struct within function.
3621         (func_command): Most content moved into new function
3622         find_frame_for_function, use new function, print result, add
3623         function comment.
3624         (find_frame_for_function): New function, now returns a result.
3625
3626 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3627
3628         * stack.c (iterate_over_block_arg_vars): Fix comment.
3629         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3630
3631 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3632
3633         PR gdb/23203
3634         * frame.c
3635         (scoped_restore_selected_frame::scoped_restore_selected_frame):
3636         Define.
3637         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3638         Define.
3639         * frame.h (class scoped_restore_selected_frame): New class.
3640         * stack.c (print_frame_local_vars): Remove catching and rethrowing
3641         of any exception, use scoped_restore_selected_frame to restore the
3642         frame instead.
3643
3644 2018-05-24  Pedro Alves  <palves@redhat.com>
3645
3646         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3647         override.
3648
3649 2018-05-23  Tom Tromey  <tom@tromey.com>
3650
3651         * complaints.c (struct complaints): Remove.
3652         (symfile_complaint_book): Remove.
3653         (series): New global.
3654         (complaint_internal): Update.
3655         (clear_complaints): Update.
3656
3657 2018-05-23  Tom Tromey  <tom@tromey.com>
3658
3659         * complaints.c (counters): New global.
3660         (struct complain): Remove.
3661         (struct complaints) <root>: Remove.
3662         (complaint_sentinel): Remove.
3663         (symfile_complaint_book): Update.
3664         (find_complaint) Remove.
3665         (complaint_internal, clear_complaints): Update.
3666
3667 2018-05-23  Tom Tromey  <tom@tromey.com>
3668
3669         * complaints.c (struct complain) <file, line>: Remove.
3670         (find_complaint): Remove file, line parameters.
3671         (complaint_internal): Update.
3672
3673 2018-05-23  Tom Tromey  <tom@tromey.com>
3674
3675         * complaints.c (vcomplaint): Remove.
3676         (complaint_internal) Merge in contents of vcomplaint.
3677
3678 2018-05-23  Tom Tromey  <tom@tromey.com>
3679
3680         * complaints.c (struct complaints) <explanation>: Remove.
3681         (symfile_explanations): Remove.
3682         (symfile_complaint_book): Update.
3683         (vcomplaint): Update.
3684         (struct explanation): Remove.
3685
3686 2018-05-23  Tom Tromey  <tom@tromey.com>
3687
3688         * complaints.c (symfile_complaints): Remove.
3689         (complaint_internal): Remove "complaints" parameter.
3690         (clear_complaints, vcomplaint): Remove "c" parameter.
3691         (get_complaints): Remove.
3692         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3693         (dwarf2_debug_line_missing_file_complaint)
3694         (dwarf2_debug_line_missing_end_sequence_complaint)
3695         (dwarf2_complex_location_expr_complaint)
3696         (dwarf2_const_value_length_mismatch_complaint)
3697         (dwarf2_section_buffer_overflow_complaint)
3698         (dwarf2_macro_malformed_definition_complaint)
3699         (dwarf2_invalid_attrib_class_complaint)
3700         (create_addrmap_from_index, dw2_symtab_iter_next)
3701         (dw2_expand_marked_cus)
3702         (dw2_debug_names_iterator::find_vec_in_debug_names)
3703         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3704         (create_debug_type_hash_table, init_cutu_and_read_dies)
3705         (partial_die_parent_scope, add_partial_enumeration)
3706         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3707         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3708         (read_import_statement, read_file_scope, create_dwo_cu_reader)
3709         (create_cus_hash_table, create_dwp_hash_table)
3710         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3711         (dwarf2_rnglists_process, dwarf2_ranges_process)
3712         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3713         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3714         (handle_struct_member_die, process_structure_scope)
3715         (read_array_type, read_common_block, read_module_type)
3716         (read_tag_pointer_type, read_typedef, read_base_type)
3717         (read_subrange_type, load_partial_dies, partial_die_info::read)
3718         (partial_die_info::read, partial_die_info::read)
3719         (partial_die_info::read, read_checked_initial_length_and_offset)
3720         (dwarf2_string_attr, read_formatted_entries)
3721         (dwarf_decode_line_header)
3722         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3723         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3724         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3725         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3726         (get_signatured_type, get_DW_AT_signature_type)
3727         (decode_locdesc, file_file_name, consume_improper_spaces)
3728         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3729         (dwarf_decode_macro_bytes, dwarf_decode_macros)
3730         (dwarf2_symbol_mark_computed, set_die_type)
3731         (read_attribute_value): Update.
3732         * stap-probe.c (handle_stap_probe, get_stap_base_address):
3733         Update.
3734         * dbxread.c (unknown_symtype_complaint)
3735         (lbrac_mismatch_complaint, repeated_header_complaint)
3736         (set_namestring, function_outside_compilation_unit_complaint)
3737         (read_dbx_symtab, process_one_symbol): Update.
3738         * gdbtypes.c (stub_noname_complaint): Update.
3739         * windows-nat.c (handle_unload_dll): Update.
3740         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3741         (decode_base_type): Update.
3742         * xcoffread.c (bf_notfound_complaint, ef_complaint)
3743         (eb_complaint, record_include_begin, record_include_end)
3744         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3745         (process_xcoff_symbol, read_symbol)
3746         (function_outside_compilation_unit_complaint)
3747         (scan_xcoff_symtab): Update.
3748         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3749         * buildsym.c (finish_block_internal, make_blockvector)
3750         (end_symtab_get_static_block, augment_type_symtab): Update.
3751         * dtrace-probe.c (dtrace_process_dof)
3752         (dtrace_static_probe_ops::get_probes): Update.
3753         * complaints.h (struct complaint): Don't declare.
3754         (symfile_complaints): Remove.
3755         (complaint_internal): Remove "complaints" parameter.
3756         (complaint): Likewise.
3757         (clear_complaints): Likewise.
3758         * symfile.c (syms_from_objfile_1, finish_new_objfile)
3759         (reread_symbols): Update.
3760         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3761         (dwarf2_frame_cache, decode_frame_entry): Update.
3762         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3763         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3764         (info_selectors_command): Update.
3765         * macrotab.c (macro_include, check_for_redefinition)
3766         (macro_undef): Update.
3767         * objfiles.c (filter_overlapping_sections): Update.
3768         * stabsread.c (invalid_cpp_abbrev_complaint)
3769         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3770         (define_symbol, error_type, read_type, rs6000_builtin_type)
3771         (stabs_method_name_from_physname, read_member_functions)
3772         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3773         (attach_fields_to_type, complain_about_struct_wipeout)
3774         (read_range_type, read_args, common_block_start)
3775         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3776         Update.
3777         * mdebugread.c (index_complaint, unknown_ext_complaint)
3778         (basic_type_complaint, bad_tag_guess_complaint)
3779         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3780         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3781         (parse_procedure, parse_lines)
3782         (function_outside_compilation_unit_complaint)
3783         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3784         (bad_tag_guess_complaint, reg_value_complaint): Update.
3785         * cp-support.c (demangled_name_complaint): Update.
3786         * macroscope.c (sal_macro_scope): Update.
3787         * dwarf-index-write.c (class debug_names): Update.
3788
3789 2018-05-23  Tom Tromey  <tom@tromey.com>
3790
3791         * complaints.c (clear_complaints): Remove "noisy" parameter.
3792         * complaints.h (clear_complaints): Update.
3793         * symfile.c (syms_from_objfile_1, finish_new_objfile)
3794         (reread_symbols): Update.
3795
3796 2018-05-23  Tom Tromey  <tom@tromey.com>
3797
3798         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3799         SUBSEQUENT_MESSAGE.
3800         (vcomplaint, clear_complaints): Update.
3801         (symfile_explanations): Remove some messages.
3802
3803 2018-05-23  Tom Tromey  <tom@tromey.com>
3804
3805         * complaints.c (internal_complaint): Remove.
3806         * complaints.h (internal_complaint): Remove.
3807
3808 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
3809
3810         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3811
3812 2018-05-22  Pedro Alves  <palves@redhat.com>
3813
3814         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3815         (remote_fileio_badfd, remote_fileio_return_errno)
3816         (remote_fileio_return_success, remote_fileio_func_open)
3817         (remote_fileio_func_open, remote_fileio_func_close)
3818         (remote_fileio_func_read, remote_fileio_func_write)
3819         (remote_fileio_func_lseek, remote_fileio_func_rename)
3820         (remote_fileio_func_unlink, remote_fileio_func_stat)
3821         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3822         (remote_fileio_func_isatty, remote_fileio_func_system): Add
3823         remote_target parameter.
3824         (remote_fio_func_map) <func>: Add remote_target parameter.
3825         (do_remote_fileio_request, remote_fileio_request):
3826         * remote-fileio.h (remote_fileio_request):
3827         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3828         remote_target parameter.
3829         (remote_notif_process, handle_notification): Adjust to pass down
3830         the remote.
3831         (remote_notif_state_allocate): Add remote_target parameter.  Save
3832         it.
3833         * remote-notif.h (struct remote_target): Forward declare.
3834         (struct notif_client) <parse, ack, can_get_pending_events>: Add
3835         remote_target parameter.
3836         (struct remote_notif_state) <remote>: New field.
3837         (remote_notif_ack, remote_notif_parse): Add remote_target
3838         parameter.
3839         (remote_notif_state_allocate, remote_notif_state_allocate): Add
3840         remote_target parameter.
3841         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3842         (threads_listing_context, rmt_thread_action, protocol_feature)
3843         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3844         (packet_result, struct threads_listing_context, remote_state):
3845         Move definitions and declarations higher up.
3846         (remote_target) <~remote_target>: Declare.
3847         (remote_download_command_source, remote_file_put, remote_file_get)
3848         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3849         (remote_hostio_pread_vFile, remote_hostio_send_command)
3850         (remote_hostio_set_filesystem, remote_hostio_open)
3851         (remote_hostio_close, remote_hostio_unlink, remote_state)
3852         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3853         (get_memory_write_packet_size, get_memory_read_packet_size)
3854         (append_pending_thread_resumptions, remote_detach_1)
3855         (append_resumption, remote_resume_with_vcont)
3856         (add_current_inferior_and_thread, wait_ns, wait_as)
3857         (process_stop_reply, remote_notice_new_inferior)
3858         (process_initial_stop_replies, remote_add_thread)
3859         (btrace_sync_conf, remote_btrace_maybe_reopen)
3860         (remove_new_fork_children, kill_new_fork_children)
3861         (discard_pending_stop_replies, stop_reply_queue_length)
3862         (check_pending_events_prevent_wildcard_vcont)
3863         (discard_pending_stop_replies_in_queue, stop_reply)
3864         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3865         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3866         (remote_interrupt_as, remote_interrupt_ns)
3867         (remote_get_noisy_reply, remote_query_attached)
3868         (remote_add_inferior, remote_current_thread, get_current_thread)
3869         (set_thread, set_general_thread, set_continue_thread)
3870         (set_general_process, write_ptid)
3871         (remote_unpack_thread_info_response, remote_get_threadinfo)
3872         (parse_threadlist_response, remote_get_threadlist)
3873         (remote_threadlist_iterator, remote_get_threads_with_ql)
3874         (remote_get_threads_with_qxfer)
3875         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3876         (get_offsets, remote_check_symbols, remote_supported_packet)
3877         (remote_query_supported, remote_packet_size)
3878         (remote_serial_quit_handler, remote_detach_pid)
3879         (remote_vcont_probe, remote_resume_with_hc)
3880         (send_interrupt_sequence, interrupt_query)
3881         (remote_notif_get_pending_events, fetch_register_using_p)
3882         (send_g_packet, process_g_packet, fetch_registers_using_g)
3883         (store_register_using_P, store_registers_using_G)
3884         (set_remote_traceframe, check_binary_download)
3885         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3886         (remote_xfer_live_readonly_partial, remote_read_bytes)
3887         (remote_send_printf, remote_flash_write, readchar)
3888         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3889         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3890         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3891         (extended_remote_disable_randomization, extended_remote_run)
3892         (send_environment_packet, extended_remote_environment_support)
3893         (extended_remote_set_inferior_cwd, remote_write_qxfer)
3894         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3895         (packet_command): Now methods of ...
3896         (remote_target): ... this class.
3897         (m_remote_state) <remote_target>: New field.
3898         (struct remote_state) <stop_reply_queue,
3899         remote_async_inferior_event_token, wait_forever_enabled_p>: New
3900         fields.
3901         (remote_state::remote_state): Allocate stop_reply_queue.
3902         (remote_state): Delete global.
3903         (get_remote_state_raw): Delete.
3904         (remote_target::get_remote_state): Allocate m_remote_state on
3905         demand.
3906         (get_current_remote_target): New.
3907         (remote_ops, extended_remote_ops): Delete.
3908         (wait_forever_enabled_p, remote_async_inferior_event_token):
3909         Delete, moved to struct remote_state.
3910         (remote_target::close): Delete self.  Destruction bits split to
3911         ...
3912         (remote_target::~remote_target): ... this.
3913         (show_memory_packet_size): Adjust to use
3914         get_current_remote_target.
3915         (struct protocol_feature) <func>: Add remote_target parameter.
3916         All callers adjusted.
3917         (curr_quit_handler_target): New.
3918         (remote_serial_quit_handler): Reimplement.
3919         (remote_target::open_1): Adjust to use get_current_remote_target.
3920         Heap-allocate remote_target/extended_remote_target instances.
3921         (vcont_builder::vcont_builder): Add remote_target parameter, and
3922         save it in m_remote.  All callers adjusted.
3923         (vcont_builder::m_remote): New field.
3924         (vcont_builder::restart, vcont_builder::flush)
3925         (vcont_builder::push_action): Use it.
3926         (remote_target::commit_resume): Use it.
3927         (struct queue_iter_param) <remote>: New field.
3928         (remote_target::remove_new_fork_children): Fill in 'remote' field.
3929         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3930         (check_pending_event_prevents_wildcard_vcont_callback)
3931         (remote_target::check_pending_events_prevent_wildcard_vcont)
3932         (remote_target::discard_pending_stop_replies)
3933         (remote_target::discard_pending_stop_replies_in_queue)
3934         (remote_target::remote_notif_remove_queued_reply): Fill in
3935         'remote' field.
3936         (remote_notif_get_pending_events): New.
3937         (remote_target::readchar, remote_target::remote_serial_write):
3938         Save/restore curr_quit_handler_target.
3939         (putpkt): New.
3940         (kill_new_fork_children): Fill in 'remote' field.
3941         (packet_command): Use get_current_remote_target, defer to
3942         remote_target method of same name.
3943         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3944         parameter, and save it in m_remote.  All callers adjusted.
3945         (scoped_remote_fd::release): Use m_remote.
3946         (scoped_remote_fd::m_remote): New field.
3947         (remote_file_put, remote_file_get, remote_file_delete): Use
3948         get_current_remote_target, defer to remote_target method of same
3949         name.
3950         (remote_btrace_reset): Add remote_state paremeter.  Update all
3951         callers.
3952         (remote_async_inferior_event_handler). Pass down 'data'.
3953         (remote_new_objfile): Use get_current_remote_target.
3954         (remote_target::vcont_r_supported): New.
3955         (set_range_stepping): Use get_current_remote_target and
3956         remote_target::vcont_r_supported.
3957         (_initialize_remote): Don't allocate 'remote_state' and
3958         'stop_reply_queue' globals.
3959         * remote.h (struct remote_target): Forward declare.
3960         (getpkt, putpkt, remote_notif_get_pending_events): Add
3961         'remote_target' parameter.
3962
3963 2018-05-22  Pedro Alves  <palves@redhat.com>
3964
3965         * remote.c (vcont_builder): Now a class.  Make all data members
3966         private.
3967         (vcont_builder) <vcont_builder, restart, flush, push_action>:
3968         Declare methods.
3969         (vcont_builder_restart): Rename to ...
3970         (vcont_builder::restart): ... this.
3971         (vcont_builder_flush): Rename to ...
3972         (vcont_builder::flush): ... this.
3973         (vcont_builder_push_action): Rename to ...
3974         (vcont_builder::push_action): ... this.
3975         (remote_target::commit_resume): Adjust.
3976
3977 2018-05-22  Pedro Alves  <palves@redhat.com>
3978
3979         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3980         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3981         (get_fixed_memory_packet_size): New.
3982         (get_memory_packet_size): Use it.
3983         (set_memory_packet_size): Don't override the config size with
3984         DEFAULT_MAX_MEMORY_PACKET_SIZE.
3985         (show_memory_packet_size): Use get_fixed_memory_packet_size.
3986         Don't refer to get_memory_packet_size if not connected to a remote
3987         target.  Show "(default)" if configured size is 0.
3988
3989 2018-05-22  Pedro Alves  <palves@redhat.com>
3990
3991         * remote.c (remote_target::mourn_inferior): Move
3992         discard_pending_stop_replies call here from ...
3993         (_initialize_remote): ... here.
3994
3995 2018-05-22  Pedro Alves  <palves@redhat.com>
3996
3997         * remote.c (compare_section_command): Remove set_general_process
3998         call.
3999
4000 2018-05-22  Pedro Alves  <palves@redhat.com>
4001
4002         * remote.c (struct packet_reg, struct remote_arch_state):
4003         Move higher up in the file.
4004         (remote_state) <m_arch_states>: Store remote_arch_state values
4005         instead of remote_arch_state pointers.
4006         (remote_state::get_remote_arch_state): Adjust.
4007
4008 2018-05-22  Pedro Alves  <palves@redhat.com>
4009
4010         * remote.c: Include <unordered_map>.
4011         (remote_state): Now a class.
4012         (remote_state) <get_remote_arch_state>: Declare method.
4013         <get_remote_arch_state>: New field.
4014         (remote_arch_state) <remote_arch_state>: Declare ctor.
4015         <regs>: Now a unique_ptr.
4016         (remote_gdbarch_data_handle): Delete.
4017         (get_remote_arch_state): Delete.
4018         (remote_state::get_remote_arch_state): New.
4019         (get_remote_state): Adjust to call remote_state's
4020         get_remote_arch_state method.
4021         (init_remote_state): Delete, bits factored out to ...
4022         (remote_arch_state::remote_arch_state): ... this new method.
4023         (get_remote_packet_size, get_memory_packet_size)
4024         (process_g_packet, remote_target::fetch_registers)
4025         (remote_target::prepare_to_store, store_registers_using_G)
4026         (remote_target::store_registers, remote_target::get_trace_status):
4027         Adjust to call remote_state's method.
4028         (_initialize_remote): Remove reference to
4029         remote_gdbarch_data_handle.
4030
4031 2018-05-22  Pedro Alves  <palves@redhat.com>
4032
4033         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4034         pread>: New method declarations.
4035         (remote_target::open_1): Adjust.
4036         (readahead_cache_invalidate): Rename to ...
4037         (readahead_cache::invalidate): ... this, and adjust to be a class
4038         method.
4039         (readahead_cache_invalidate_fd): Rename to ...
4040         (readahead_cache::invalidate_fd): ... this, and adjust to be a
4041         class method.
4042         (remote_hostio_pwrite): Adjust.
4043         (remote_hostio_pread_from_cache): Rename to ...
4044         (readahead_cache::pread): ... this, and adjust to be a class
4045         method.
4046         (remote_hostio_close): Adjust.
4047
4048 2018-05-22  Pedro Alves  <palves@redhat.com>
4049
4050         * remote.c (remote_hostio_close_cleanup): Delete.
4051         (class scoped_remote_fd): New.
4052         (remote_file_put, remote_file_get): Use it.
4053
4054 2018-05-22  Pedro Alves  <palves@redhat.com>
4055
4056         (struct vCont_action_support): Use bool and initialize all fields.
4057         (struct readahead_cache): Initialize all fields.
4058         (remote_state): Use bool and initialize all fields.
4059         (remote_state::remote_state, remote_state::~remote_state): New.
4060         (new_remote_state): Delete.
4061         (_initialize_remote): Use new to allocate remote_state.
4062
4063 2018-05-22  Pedro Alves  <palves@redhat.com>
4064             張俊芝  <zjz@zjz.name>
4065
4066         PR gdb/22973
4067         * c-exp.y: Include "c-support.h".
4068         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4069         of tolower.  Use c_ident_is_alpha to scan names.
4070         * c-lang.c: Include "c-support.h".
4071         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4072         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4073         * c-support.h: New file, with bits factored out from ...
4074         * cp-name-parser.y: ... this file.
4075         Include "c-support.h".
4076         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4077         c-support.h and renamed.
4078         (symbol_end, yylex): Adjust.
4079
4080 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4081
4082         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4083         parameter type to CORE_ADDR.
4084         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4085         parameter type in declaration to CORE_ADDR.
4086         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4087         target_auxv_search to get AT_HWCAP and use the result to get the
4088         target description.
4089         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4090         to CORE_ADDR. Remove the cast of the return value to unsigned
4091         long. Fix error predicate of target_auxv_search.
4092         (ppc_linux_nat_target::read_description): Change the type of the
4093         hwcap variable to CORE_ADDR.
4094
4095 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4096
4097         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4098         if the size of fpscr is larger than 32 bits.
4099
4100 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4101
4102         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4103         (ppc32_linux_vsxregmap): New global.
4104         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4105         regcache_supply_regset, and regcache_collect_regset.
4106         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4107         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4108         (fetch_vsx_register, store_vsx_register): Remove.
4109         (fetch_vsx_registers): Add regno parameter. Get regset using
4110         ppc_linux_vsxregset. Use regset to supply registers.
4111         (store_vsx_registers): Add regno parameter. Get regset using
4112         ppc_linux_vsxregset. Use regset to collect registers.
4113         (fetch_register): Call fetch_vsx_registers instead of
4114         fetch_vsx_register.
4115         (store_register): Call store_vsx_registers instead of
4116         store_vsx_register.
4117         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4118         new regno parameter.
4119         (store_ppc_registers): Call store_vsx_registers with -1 for the
4120         new regno parameter.
4121         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4122         (ppc_collect_vsxregset): Remove.
4123
4124 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4125
4126         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4127         offset fields.
4128         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4129         for vector register offset fields.
4130         (ppc64_fbsd_reg_offsets): Likewise.
4131         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4132         to vector register offset fields.
4133         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4134         to vector register offset fields.
4135         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4136         vector register offset fields.
4137         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4138         initializers for vector register offset fields.
4139         (rs6000_aix64_reg_offsets): Likewise.
4140         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4141         (ppc_supply_vrregset): Remove.
4142         (ppc_collect_vrregset): Remove.
4143         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4144         (ppc_linux_vrregset) : New function.
4145         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4146         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4147         (ppc32_linux_vrregset): Remove.
4148         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4149         and use result instead of ppc32_linux_vrregset.
4150         (ppc32_linux_reg_offsets): Remove initializers for vector register
4151         offset fields.
4152         (ppc64_linux_reg_offsets): Likewise.
4153         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4154         * ppc-linux-nat.c: Include regset.h.
4155         (gdb_vrregset_t): Adjust comment to account for little-endian
4156         mode.
4157         (supply_vrregset, fill_vrregset): Remove.
4158         (fetch_altivec_register, store_altivec_register): Remove.
4159         (fetch_altivec_registers): Add regno parameter. Get regset using
4160         ppc_linux_vrregset. Use regset to supply registers.
4161         (store_altivec_registers): Add regno parameter. Get regset using
4162         ppc_linux_vrregset. Use regset to collect registers.
4163         (fetch_register): Call fetch_altivec_registers instead of
4164         fetch_altivec_register.
4165         (store_register): Call store_altivec_registers instead of
4166         store_altivec_register.
4167         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4168         the new regno parameter.
4169         (store_ppc_registers): Call store_altivec_registers with -1 for
4170         the new regno parameter.
4171
4172 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4173
4174         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4175         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4176         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4177         (gdb_vrregset_t): Change array type size to
4178         PPC_LINUX_SIZEOF_VRREGSET.
4179         (gdb_vsxregset_t): Change array type size to
4180         PPC_LINUX_SIZEOF_VSXREGSET.
4181         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4182         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4183         PPC_LINUX_SIZEOF_VSXREGSET.
4184
4185 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4186
4187         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4188         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4189         nat/ppc-linux.c.
4190         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4191         ppc_linux_target_wordsize with tid.
4192         (ppc_linux_nat_target::read_description): Call ppc_linux_target
4193         wordsize with tid.
4194         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4195         (ppc64_64bit_inferior_p): Add static and inline specifiers.
4196         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4197         tid parameter. Remove static specifier.
4198         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4199         (ppc_linux_target_wordsize): New declaration.
4200
4201 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4202
4203         * arch/ppc-linux-common.c: New file.
4204         * arch/ppc-linux-common.h: New file.
4205         * arch/ppc-linux-tdesc.h: New file.
4206         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4207         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4208         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4209         arch/ppc-linux-tdesc.h.
4210         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4211         arch/ppc-linux-tdesc.h.
4212         (ppc_linux_nat_target::read_description): Remove target
4213         description matching code. Fill a ppc_linux_features struct and
4214         call ppc_linux_match_description with it. Move comment about ISA
4215         2.05 to ppc-linux-common.c.
4216         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4217         arch/ppc-linux-tdesc.h.
4218         (ppc_linux_core_read_description): Remove target description
4219         matching code. Fill a ppc_linux_features struct and call
4220         ppc_linux_match_description with it.
4221         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4222         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4223         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4224         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4225         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4226         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4227         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4228         (tdesc_powerpc_e500l): Remove.
4229
4230 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
4231
4232         * ada-lang.c (catch_assert_command): Pass empty string instead
4233         of NULL for excep_string argument.
4234
4235 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4236
4237         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4238         the width of the requested register exceeds the width of the
4239         `ptrace' data type.
4240
4241 2018-05-21  Tom Tromey  <tom@tromey.com>
4242
4243         * printcmd.c (output_command): Remove.
4244         (output_command_const): Rename to output_command.
4245         * valprint.h (output_command): Rename from output_command_const.
4246         * tracepoint.c (trace_dump_actions): Call output_command.
4247
4248 2018-05-21  Tom Tromey  <tom@tromey.com>
4249
4250         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4251         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4252         * ada-lang.h (create_ada_exception_catchpoint): Update.
4253         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4254         std::string.
4255         (create_excep_cond_exprs, ~ada_catchpoint)
4256         (should_stop_exception, print_one_exception)
4257         (print_mention_exception, print_recreate_exception): Update.
4258         (ada_get_next_arg): Remove.
4259         (catch_ada_exception_command_split): Use std::string.  Change type
4260         of "excep_string", "cond_string".
4261         (catch_ada_exception_command): Update.
4262         (create_ada_exception_catchpoint): Change type of excep_string.
4263         (ada_exception_sal): Remove excep_string parameter.
4264         (~ada_catchpoint): Remove.
4265
4266 2018-05-21  Tom Tromey  <tom@tromey.com>
4267
4268         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4269         cleanup.
4270
4271 2018-05-21  Tom Tromey  <tom@tromey.com>
4272
4273         * ada-lang.c (ada_exception_message_1, ada_exception_message):
4274         Return unique_xmalloc_ptr.
4275         (print_it_exception): Update.
4276
4277 2018-05-21  Tom Tromey  <tom@tromey.com>
4278
4279         * tracepoint.c (trace_dump_actions): Use std::string.
4280
4281 2018-05-21  Tom Tromey  <tom@tromey.com>
4282
4283         * symfile.c (reread_symbols): Use std::string for original_name.
4284
4285 2018-05-21  Tom Tromey  <tom@tromey.com>
4286
4287         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4288         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
4289         constructor.
4290
4291 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
4292
4293         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4294         instance to...
4295         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4296         * objfiles.c (get_objfile_bfd_data): Allocate
4297         objfile_per_bfd_storage with obstack_new when allocating on
4298         obstack.
4299
4300 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4301
4302         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4303         OBSTACK_ZALLOC.
4304         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4305         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4306         * mdebugread.c (mdebug_build_psymtabs): Likewise.
4307         (add_pending): Likewise.
4308         (parse_symbol): Likewise.
4309         (parse_partial_symbols): Likewise.
4310         (psymtab_to_symtab_1): Likewise.
4311         (new_psymtab): Likewise.
4312         (elfmdebug_build_psymtabs): Likewise.
4313         * minsyms.c (terminate_minimal_symbol_table): Likewise.
4314         * objfiles.c (get_objfile_bfd_data): Likewise.
4315         (objfile_register_static_link): Likewise.
4316         * psymtab.c (allocate_psymtab): Likewise.
4317         * stabsread.c (read_member_functions): Likewise.
4318         * xcoffread.c (xcoff_end_psymtab): Likewise.
4319
4320 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4321
4322         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4323         compiler supports std::is_trivially_constructible.
4324         * common/poison.h: Include obstack.h.
4325         (IsMallocable): Define to is_trivially_constructible if the
4326         compiler supports it, define to true_type otherwise.
4327         (xobnew): New.
4328         (XOBNEW): Redefine.
4329         (xobnewvec): New.
4330         (XOBNEWVEC): Redefine.
4331         * gdb_obstack.h (obstack_zalloc): New.
4332         (OBSTACK_ZALLOC): Redefine.
4333         (obstack_calloc): New.
4334         (OBSTACK_CALLOC): Redefine.
4335         (obstack_new): New.
4336         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4337         (gdbarch_obstack): New declaration in gdbarch.h, definition in
4338         gdbarch.c.
4339         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4340         obstack_calloc/obstack_zalloc.
4341         (gdbarch_obstack_zalloc): Remove.
4342         * target-descriptions.c (tdesc_data_init): Use obstack_new.
4343
4344 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4345
4346         * stack.c (backtrace_command_1): Remove useless variable int i.
4347
4348 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4349
4350         * stack.c (print_frame_info): Fix comment.
4351
4352 2018-05-18  Tom Tromey  <tom@tromey.com>
4353
4354         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4355         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4356         (~dwarf2_per_objfile): Update
4357         (dwarf2_get_dwz_file): Use new.
4358         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4359         unique_ptr.
4360
4361 2018-05-18  Tom Tromey  <tom@tromey.com>
4362
4363         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4364         unique_ptr.
4365         * dwarf2read.c (struct dwp_file): Add constructor and
4366         initializers.
4367         (open_and_init_dwp_file): Return a unique_ptr.
4368         (dwarf2_per_objfile, create_dwp_hash_table)
4369         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4370         (lookup_dwo_unit_in_dwp): Update.
4371         (open_and_init_dwp_file, get_dwp_file): Update.
4372
4373 2018-05-18  Tom Tromey  <tom@tromey.com>
4374
4375         * dwarf2read.c (dwarf2_per_objfile): Update.
4376         (struct mapped_index): Add initializers.
4377         (dwarf2_read_index): Use new.
4378         (dw2_symtab_iter_init): Update.
4379         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4380         unique_ptr.
4381
4382 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4383
4384         * dwarf2read.c (mapped_index) <total_size>: Remove.
4385
4386 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4387
4388         * unittests/format_pieces-selftests.c (test_format_specifier):
4389         Add ARI comments.
4390
4391 2018-05-18  Tom Tromey  <tom@tromey.com>
4392
4393         * c-typeprint.c (maybe_print_hole): New function.
4394         (c_print_type_struct_field_offset): Update.
4395         (c_type_print_base_struct_union): Call maybe_print_hole.
4396
4397 2018-05-17  Keith Seitz  <keiths@redhat.com>
4398
4399         * breakpoint.c (build_bpstat_chain): New function, moved from
4400         bpstat_stop_status.
4401         (bpstat_stop_status): Add optional parameter, `stop_chain'.
4402         If no stop chain is passed, call build_bpstat_chain to build it.
4403         * breakpoint.h (build_bpstat_chain): Declare.
4404         (bpstat_stop_status): Move documentation here from breakpoint.c.
4405         * infrun.c (handle_signal_stop): Before eliding inlined frames,
4406         build the stop chain and pass it to skip_inline_frames.
4407         Pass this stop chain to bpstat_stop_status.
4408         * inline-frame.c: Include breakpoint.h.
4409         (stopped_by_user_bp_inline_frame): New function.
4410         (skip_inline_frames): Add parameter `stop_chain'.
4411         Move documention to inline-frame.h.
4412         If non-NULL, use stopped_by_user_bp_inline_frame to determine
4413         whether the frame should be elided.
4414         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4415         Add moved documentation and update for new parameter.
4416
4417 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4418
4419         PR cli/14975
4420         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4421         unittests/format_pieces-selftests.c.
4422         * common/format.h (format_piece) <operator==>: New.
4423         (format_pieces) <operator[]>: Remove.
4424         * common/format.c (format_pieces::format_pieces): Handle \e.
4425         * unittests/format_pieces-selftests.c: New.
4426
4427 2018-05-17  Tom Tromey  <tom@tromey.com>
4428
4429         PR symtab/23010:
4430         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4431         (dw2_instantiate_symtab): Add skip_partial parameter.
4432         (dw2_find_last_source_symtab, dw2_map_expand_apply)
4433         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4434         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4435         (dw2_expand_symtabs_matching_one)
4436         (dw2_find_pc_sect_compunit_symtab)
4437         (dw2_debug_names_lookup_symbol)
4438         (dw2_debug_names_expand_symtabs_for_function): Update.
4439         (init_cutu_and_read_dies): Add skip_partial parameter.
4440         (process_psymtab_comp_unit, build_type_psymtabs_1)
4441         (process_skeletonless_type_unit, load_partial_comp_unit)
4442         (psymtab_to_symtab_1): Update.
4443         (load_full_comp_unit): Add skip_partial parameter.
4444         (process_imported_unit_die, dwarf2_read_addr_index)
4445         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4446         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4447         (read_signatured_type): Update.
4448
4449 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4450
4451         * value.c (release_value): Remove unused variable.
4452         (record_latest_value): Likewise.
4453         (access_value_history): Likewise.
4454         (preserve_values): Likewise.
4455
4456 2018-05-17  Tom Tromey  <tom@tromey.com>
4457
4458         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4459         Initialize.
4460
4461 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
4462
4463         PR gdb/22286
4464         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4465         Also handle registers whose width is not a multiple of
4466         PTRACE_TYPE_RET.
4467         (linux_nat_trad_target::store_register): Likewise.
4468
4469 2018-05-16  Tom Tromey  <tom@tromey.com>
4470
4471         * gdbcore.h (core_bfd): Redefine.
4472         * corelow.c (core_target::close): Update.
4473         (core_target_open): Update.
4474         * progspace.h (struct program_space) <cbfd>: Now a
4475         gdb_bfd_ref_ptr.
4476
4477 2018-05-16  Tom Tromey  <tom@tromey.com>
4478
4479         PR cli/19551:
4480         * symfile-add-flags.h (enum symfile_add_flags)
4481         <SYMFILE_NOT_FILENAME>: New constant.
4482         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
4483         objfile name from BFD.
4484         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4485         * minidebug.c (find_separate_debug_file_in_section): Put
4486         ".gnu_debugdata" into BFD's file name.
4487
4488 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
4489
4490         * regcache.c (regcache_read_ftype, regcache_write_ftype):
4491         Remove.
4492
4493 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
4494
4495         PR binutils/21446
4496         * aarch64-tdep.c (aarch64_analyze_prologue,
4497         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4498         Indicate not interested in errors.
4499
4500 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4501
4502         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4503         Supply the MIPS_ZERO_REGNUM register.
4504
4505 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4506
4507         * mips-tdep.c (mask_address_var): Make variable static.
4508
4509 2018-05-14  Tom Tromey  <tom@tromey.com>
4510
4511         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4512
4513 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
4514
4515         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4516         FXSAVE_ADDR for the mxcsr register.
4517
4518 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
4519
4520         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4521
4522 2018-05-11  Pedro Alves  <palves@redhat.com>
4523
4524         * corelow.c (core_target) <core_target>: No longer inline.
4525         Initialize m_core_gdbarch, m_core_vec and build the section table
4526         here.
4527         <~core_target>: New.
4528         <core_gdbarch, get_core_register_section>: New methods.
4529         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4530         factored out from ...
4531         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4532         (core_ops): Delete.
4533         (sniff_core_bfd): Add gdbarch parameter.
4534         (core_close): Delete, merged into ...
4535         (core_target::close): ... here.  Delete self.
4536         (core_close_cleanup): Delete.
4537         (core_target_open): Allocate a core_target on the heap.  Use a
4538         unique_ptr instead of a cleanup.  Bits moved into the core_target
4539         ctor.  Adjust to use core_target methods instead of globals.
4540         (get_core_register_section): Rename to ...
4541         (core_target::get_core_register_section): ... this and adjust.
4542         (struct get_core_registers_cb_data): New.
4543         (get_core_registers_cb): Use it.  Use bool.
4544         (core_target::fetch_registers, core_target::files_info)
4545         (core_target::xfer_partial, core_target::read_description)
4546         (core_target::pid_to, core_target::thread_name): Adjust to
4547         reference class fields instead of globals.
4548         * target.h (struct target_ops_deleter, target_ops_up): New.
4549
4550 2018-05-11  Pedro Alves  <palves@redhat.com>
4551
4552         * corefile.c (core_file_command): Move to corelow.c.
4553         * corelow.c (the_core_target): Delete.
4554         (core_file_command): Moved from corefile.c.  Check exec_bfd
4555         instead of the_core_target.  Use target_detach instead of calling
4556         into the_core_target directly.
4557         (maybe_say_no_core_file_now): New.
4558         (core_target::detach): Use it.
4559         (_initialize_corelow): Remove references to the_core_target.
4560         * gdbcore.h (the_core_target): Delete.
4561
4562 2018-05-11  Tom Tromey  <tromey@redhat.com>
4563             Pedro Alves  <palves@redhat.com>
4564
4565         * corefile.c (core_bfd): Remove.
4566         * gdbcore.h (core_bfd): Now a macro.
4567         * progspace.h (struct program_space) <cbfd>: New field.
4568
4569 2018-05-11  Tom Tromey  <tom@tromey.com>
4570
4571         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4572         gdb::def_vector.
4573
4574 2018-05-10  Tom Tromey  <tom@tromey.com>
4575
4576         * configure: Rebuild.
4577         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4578
4579 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
4580
4581         PR server/23158:
4582         * regformats/regdat.sh: Adjust script, following the addition
4583         of the new expedite_regs parameter to init_target_desc.
4584
4585 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
4586     
4587         PR gdb/23127
4588         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4589         set_gdbarch_significant_addr_bit.
4590         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4591         set_gdbarch_significant_addr_bit.
4592         * utils.c (address_significant): Update to sign extend addr.
4593
4594 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
4595
4596         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4597         (xtensa_linux_init_abi): Limit tdep->num_regs by
4598         tdep->num_nopriv_regs.
4599         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4600         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4601         not initialized.
4602
4603 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
4604
4605         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4606
4607 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4608
4609         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4610         (I387_MXCSR_INIT_VAL): New constant.
4611         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4612         buffer if it was supplied by the inferior.
4613         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4614         (i387_xsave_get_clear_bv): New function.
4615         (i387_supply_xsave): Only read x87 control registers from the
4616         xsave buffer if the feature is enabled, and the state will have
4617         been written, otherwise, provide a suitable default.
4618         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4619         including x87 control registers.  Update control registers if they
4620         have changed from the default value, and mark features as enabled
4621         as required.
4622         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4623
4624 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
4625
4626         * spu-tdep.c (info_spu_event_command): Fix output formatting.
4627
4628 2018-05-07  Tom Tromey  <tom@tromey.com>
4629
4630         * configure: Rebuild.
4631         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4632
4633 2018-05-07  Tom Tromey  <tom@tromey.com>
4634
4635         PR tdep/20362:
4636         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4637         bit.  Use correct value for VDIV.
4638
4639 2018-05-04  Tom Tromey  <tom@tromey.com>
4640
4641         * configure: Rebuild.
4642         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4643
4644 2018-05-04  Tom Tromey  <tom@tromey.com>
4645
4646         * linux-record.c (record_linux_system_call) <case
4647         RECORD_SYS_RECVFROM>: Add "break".
4648
4649 2018-05-04  Tom Tromey  <tom@tromey.com>
4650
4651         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4652         Add missing "break".
4653         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4654         Add missing "break".
4655
4656 2018-05-04  Tom Tromey  <tom@tromey.com>
4657
4658         * rs6000-tdep.c (ppc_process_record_op4)
4659         (ppc_process_record_op63): Add fall-through comment.
4660
4661 2018-05-04  Tom Tromey  <tom@tromey.com>
4662
4663         * i386-tdep.c (i386_process_record): Add fall-through comment.
4664
4665 2018-05-04  Tom Tromey  <tom@tromey.com>
4666
4667         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4668         comment.
4669
4670 2018-05-04  Tom Tromey  <tom@tromey.com>
4671
4672         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4673         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4674         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4675         comment.
4676         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4677         comment.
4678         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4679         comment.
4680
4681 2018-05-04  Tom Tromey  <tom@tromey.com>
4682
4683         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4684
4685 2018-05-04  Tom Tromey  <tom@tromey.com>
4686
4687         * s390-tdep.c (s390_process_record): Fix fall-through comments.
4688         * xcoffread.c (scan_xcoff_symtab): Move comment later.
4689         * symfile.c (section_is_mapped): Fix fall-through comment.
4690         * stabsread.c (define_symbol, read_member_functions): Fix
4691         fall-through comment.
4692         * s390-linux-tdep.c (s390_process_record): Fix fall-through
4693         comment.
4694         * remote.c (remote_wait_as): Fix fall-through comment.
4695         * p-exp.y (yylex): Fix fall-through comment.
4696         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4697         comment.
4698         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4699         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4700         * jv-exp.y (yylex): Fix fall-through comment.
4701         * go-exp.y (lex_one_token): Fix fall-through comment.
4702         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4703         fall-through comment.
4704         * f-exp.y (yylex): Fix fall-through comment.
4705         * dwarf2read.c (process_die): Fix fall-through comments.
4706         * dbxread.c (process_one_symbol): Fix fall-through comment.
4707         * d-exp.y (lex_one_token): Fix fall-through comment.
4708         * cp-name-parser.y (yylex): Fix fall-through comment.
4709         * coffread.c (coff_symtab_read): Fix fall-through comment.
4710         * c-exp.y (lex_one_token): Fix fall-through comment.
4711         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4712         comment.
4713         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4714         comment.
4715
4716 2018-05-04  Tom Tromey  <tom@tromey.com>
4717
4718         PR python/22730:
4719         * NEWS: Mention gdb.execute change.
4720         * gdbcmd.h (execute_control_command): Don't declare.
4721         * python/python.c (execute_gdb_command): Use read_command_lines_1,
4722         execute_control_commands, execute_control_commands_to_string.
4723         * cli/cli-script.h (execute_control_commands)
4724         (execute_control_commands_to_string): Declare.
4725         (execute_control_command): Add from_tty parameter.
4726         * cli/cli-script.c (execute_control_commands)
4727         (execute_control_commands_to_string): New functions.
4728         (execute_user_command): Use execute_control_commands.
4729         (execute_control_command_1): Add "from_tty" parameter.  Update.
4730         (execute_control_command): Likewise.
4731
4732 2018-05-04  Tom Tromey  <tom@tromey.com>
4733
4734         PR python/22731:
4735         * NEWS: Mention that breakpoint commands are writable.
4736         * python/py-breakpoint.c (bppy_set_commands): New function.
4737         (breakpoint_object_getset) <"commands">: Use it.
4738
4739 2018-05-04  Tom Tromey  <tom@tromey.com>
4740
4741         * tracepoint.c (actions_command): Update.
4742         * mi/mi-cmd-break.c (mi_command_line_array)
4743         (mi_command_line_array_cnt, mi_command_line_array_ptr)
4744         (mi_read_next_line): Remove.
4745         (mi_cmd_break_commands): Update.
4746         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4747         function_view.
4748         * cli/cli-script.c (get_command_line): Update.
4749         (process_next_line): Use function_view.  Constify.
4750         (recurse_read_control_structure, read_command_lines)
4751         (read_command_lines_1): Change argument types to function_view.
4752         (do_define_command, document_command): Update.
4753         * breakpoint.h (check_tracepoint_command): Don't declare.
4754         * breakpoint.c (check_tracepoint_command): Remove.
4755         (commands_command_1, create_tracepoint_from_upload): Update.
4756
4757 2018-05-04  Tom Tromey  <tom@tromey.com>
4758
4759         PR gdb/11750:
4760         * cli/cli-script.h (enum command_control_type) <define_control>:
4761         New constant.
4762         * cli/cli-script.c (multi_line_command_p): Handle define_control.
4763         (build_command_line, execute_control_command_1)
4764         (process_next_line): Likewise.
4765         (do_define_command): New function, extracted from define_command.
4766         (define_command): Use it.
4767
4768 2018-05-04  Tom Tromey  <tom@tromey.com>
4769
4770         * tracepoint.c (actions_command): Update.
4771         * cli/cli-script.h (read_command_lines): Update.
4772         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4773         (MAX_TMPBUF): Remove define.
4774         (define_command): Use string_printf.
4775         (document_command): Likewise.
4776         * breakpoint.c (commands_command_1): Update.
4777
4778 2018-05-04  Tom Tromey  <tom@tromey.com>
4779
4780         * top.c (execute_command): Update.
4781         * cli/cli-script.h (print_command_lines): Now varargs.
4782         * cli/cli-script.c (print_command_lines): Now varargs.
4783         (execute_control_command_1) <case while_control, case if_control>:
4784         Update.
4785
4786 2018-05-04  Tom Tromey  <tom@tromey.com>
4787
4788         * tracepoint.c (all_tracepoint_actions): Rename from
4789         all_tracepoint_actions_and_cleanup.  Change return type.
4790         (actions_command, encode_actions_1, encode_actions)
4791         (trace_dump_actions, tdump_command): Update.
4792         * remote.c (remote_download_command_source): Update.
4793         * python/python.c (gdbpy_eval_from_control_command)
4794         (python_command, python_interactive_command): Update.
4795         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4796         * guile/guile.c (guile_command)
4797         (gdbscm_eval_from_control_command, guile_command): Update.
4798         * compile/compile.c (compile_code_command)
4799         (compile_print_command, compile_to_object): Update.
4800         * cli/cli-script.h (struct command_lines_deleter): New.
4801         (counted_command_line): New typedef.
4802         (struct command_line): Add constructor, destructor.
4803         <body_list>: Remove.
4804         <body_list_0, body_list_1>: New members.
4805         (command_line_up): Remove typedef.
4806         (read_command_lines, read_command_lines_1, get_command_line):
4807         Update.
4808         (copy_command_lines): Don't declare.
4809         * cli/cli-script.c (build_command_line): Use "new".
4810         (get_command_line): Return counted_command_line.
4811         (print_command_lines, execute_user_command)
4812         (execute_control_command_1, while_command, if_command): Update.
4813         (realloc_body_list): Remove.
4814         (process_next_line, recurse_read_control_structure): Update.
4815         (read_command_lines, read_command_lines_1): Return counted_command_line.
4816         (free_command_lines): Use "delete".
4817         (copy_command_lines): Remove.
4818         (define_command, document_command, show_user_1): Update.
4819         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4820         a counted_command_line.
4821         * breakpoint.h (counted_command_line): Remove typedef.
4822         (breakpoint_set_commands): Update.
4823         * breakpoint.c (check_no_tracepoint_commands)
4824         (validate_commands_for_breakpoint): Update.
4825         (breakpoint_set_commands): Change commands to be a
4826         counted_command_line.
4827         (commands_command_1, update_dprintf_command_list)
4828         (create_tracepoint_from_upload): Update.
4829
4830 2018-05-04  Tom Tromey  <tom@tromey.com>
4831
4832         * cli/cli-decode.h (cmd_list_element): New constructor.
4833         (~cmd_list_element): New destructor.
4834         (struct cmd_list_element): Add initializers.
4835         * cli/cli-decode.c (do_add_cmd): Use "new".
4836         (delete_cmd): Use "delete".
4837
4838 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
4839             Pedro Alves <palves@redhat.com>
4840
4841         PR breakpoints/19806 and support for PR external/20207.
4842         * NEWS: Mention Aarch64 watchpoint improvements.
4843         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4844         watchpoints and PR external/20207 watchpoints.
4845         * nat/aarch64-linux-hw-point.c
4846         (kernel_supports_any_contiguous_range): New.
4847         (aarch64_watchpoint_offset): New.
4848         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4849         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4850         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4851         (aarch64_align_watchpoint): New parameters aligned_offset_p and
4852         next_addr_orig_p.  Support PR external/20207 watchpoints.
4853         (aarch64_downgrade_regs): New.
4854         (aarch64_dr_state_insert_one_point): New parameters offset and
4855         addr_orig.
4856         (aarch64_dr_state_remove_one_point): Likewise.
4857         (aarch64_handle_breakpoint): Update caller.
4858         (aarch64_handle_aligned_watchpoint): Likewise.
4859         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4860         aligned_offset.
4861         (aarch64_linux_set_debug_regs): Remove const from state.  Call
4862         aarch64_downgrade_regs.
4863         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4864         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4865         (DR_CONTROL_MASK): ... this.
4866         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4867         (unsigned int aarch64_watchpoint_offset): New prototype.
4868         (aarch64_linux_set_debug_regs): Remove const from state.
4869         * utils.c (align_up, align_down): Move to ...
4870         * common/common-utils.c (align_up, align_down): ... here.
4871         * utils.h (align_up, align_down): Move to ...
4872         * common/common-utils.h (align_up, align_down): ... here.
4873
4874 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
4875
4876         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4877         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4878         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4879         Re-implement to match the ABI as summarized in GCC's
4880         gcc/config/sparc/sparc.c.  All callers updated.
4881         (sparc32_store_arguments): Remove assertion.
4882
4883 2018-05-04  Tom Tromey  <tom@tromey.com>
4884
4885         * printcmd.c: Don't include tui.h.
4886         (decode_format): Use skip_spaces.
4887
4888 2018-05-04  Tom Tromey  <tom@tromey.com>
4889
4890         PR gdb/22619:
4891         * printcmd.c (last_count): New global.
4892         (x_command): Use saved count when repeating.
4893
4894 2018-05-04  Tom Tromey  <tom@tromey.com>
4895
4896         * nto-procfs.c (do_closedir_cleanup): Remove.
4897         (procfs_pidlist): Use gdb_dir_up.
4898         * procfs.c (do_closedir_cleanup): Remove.
4899         (proc_update_threads): Use gdb_dir_up.
4900         * common/filestuff.h (struct gdb_dir_deleter): New.
4901         (gdb_dir_up): New typedef.
4902
4903 2018-05-04  Tom Tromey  <tom@tromey.com>
4904
4905         * ada-lang.c (print_mention_exception): Use std::string.
4906
4907 2018-05-04  Tom Tromey  <tom@tromey.com>
4908
4909         * ada-lang.c (create_excep_cond_exprs): Update.
4910         (ada_exception_catchpoint_cond_string): Use std::string.
4911
4912 2018-05-04  Tom Tromey  <tom@tromey.com>
4913
4914         * ada-lang.c (xget_renaming_scope): Return std::string.
4915         (old_renaming_is_invisible): Update.
4916
4917 2018-05-04  Tom Tromey  <tom@tromey.com>
4918
4919         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4920         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4921
4922 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
4923
4924         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4925
4926 2018-05-04  Tom Tromey  <tom@tromey.com>
4927
4928         * remote.c (remote_query_supported_append): Change type.
4929         (remote_check_symbols): Update.
4930
4931 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
4932
4933         PR gdb/11420
4934         * configure.ac: Prepend libpython.
4935         * python/python-config.py: Likewise.
4936         * configure: Regenerate.
4937
4938 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
4939
4940         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4941
4942 2018-05-03  Pedro Alves  <palves@redhat.com>
4943
4944         * s390-linux-nat.c
4945         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4946         override.  Write 'true' instead of '1'.
4947         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4948         declaration.
4949
4950 2018-05-02  Pedro Alves  <palves@redhat.com>
4951
4952         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4953         add_inf_child_target.
4954         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4955         add_inf_child_target.
4956         * aix-thread.c (aix_thread_target_info): New.
4957         (aix_thread_target) <shortname, longname, doc>: Delete.
4958         <info>: New.
4959         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4960         add_inf_child_target.
4961         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4962         add_inf_child_target.
4963         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4964         add_inf_child_target.
4965         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4966         add_inf_child_target.
4967         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4968         add_inf_child_target.
4969         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4970         add_inf_child_target.
4971         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4972         add_inf_child_target.
4973         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4974         add_inf_child_target.
4975         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4976         add_inf_child_target.
4977         * bfd-target.c (target_bfd_target_info): New.
4978         (target_bfd) <shortname, longname, doc>: Delete.
4979         <info>: New.
4980         * bsd-kvm.c (bsd_kvm_target_info): New.
4981         (bsd_kvm_target) <shortname, longname, doc>: Delete.
4982         <info>: New.
4983         (bsd_kvm_target::open): Rename to ...
4984         (bsd_kvm_target_open): ... this.  Adjust.
4985         * bsd-uthread.c (bsd_uthread_target_info): New.
4986         (bsd_uthread_target) <shortname, longname, doc>: Delete.
4987         <info>: New.
4988         * corefile.c (core_file_command): Adjust.
4989         * corelow.c (core_target_info): New.
4990         (core_target) <shortname, longname, doc>: Delete.
4991         <info>: New.
4992         (core_target::open): Rename to ...
4993         (core_target_open): ... this.  Adjust.
4994         * ctf.c (ctf_target_info): New.
4995         (ctf_target) <shortname, longname, doc>: Delete.
4996         <info>: New.
4997         (ctf_target::open): Rename to ...
4998         (ctf_target_open): ... this.
4999         (_initialize_ctf): Adjust.
5000         * exec.c (exec_target_info): New.
5001         (exec_target) <shortname, longname, doc>: Delete.
5002         <info>: New.
5003         (exec_target::open): Rename to ...
5004         (exec_target_open): ... this.
5005         * gdbcore.h (core_target_open): Declare.
5006         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5007         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5008         add_inf_child_target.
5009         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5010         add_inf_child_target.
5011         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5012         add_inf_child_target.
5013         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5014         add_inf_child_target.
5015         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5016         add_inf_child_target.
5017         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5018         add_inf_child_target.
5019         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5020         add_inf_child_target.
5021         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5022         add_inf_child_target.
5023         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5024         add_inf_child_target.
5025         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5026         add_inf_child_target.
5027         * inf-child.c (inf_child_target_info): New.
5028         (inf_child_target::info): New.
5029         (inf_child_open_target): Remove 'target' parameter.  Use
5030         get_native_target instead.
5031         (inf_child_target::open): Delete.
5032         (add_inf_child_target): New.
5033         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5034         Delete.
5035         <info>: New.
5036         (add_inf_child_target): Declare.
5037         (inf_child_open_target): Declare.
5038         * linux-thread-db.c (thread_db_target_info): New.
5039         (thread_db_target) <shortname, longname, doc>: Delete.
5040         <info>: New.
5041         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5042         add_inf_child_target.
5043         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5044         add_inf_child_target.
5045         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5046         add_inf_child_target.
5047         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5048         add_inf_child_target.
5049         * make-target-delegates (print_class): Adjust.
5050         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5051         add_inf_child_target.
5052         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5053         add_inf_child_target.
5054         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5055         add_inf_child_target.
5056         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5057         add_inf_child_target.
5058         * nto-procfs.c (nto_native_target_info): New.
5059         (nto_procfs_target_native) <shortname, longname, doc>:
5060         Delete.
5061         <info>: New.
5062         (nto_procfs_target_info): New.
5063         (nto_procfs_target_procfs) <shortname, longname, doc>:
5064         Delete.
5065         <info>: New.
5066         (init_procfs_targets): Adjust.
5067         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5068         add_inf_child_target.
5069         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5070         add_inf_child_target.
5071         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5072         add_inf_child_target.
5073         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5074         add_inf_child_target.
5075         * ravenscar-thread.c (ravenscar_target_info): New.
5076         (ravenscar_thread_target) <shortname, longname, doc>:
5077         Delete.
5078         <info>: New.
5079         * record-btrace.c (record_btrace_target_info):
5080         (record_btrace_target) <shortname, longname, doc>: Delete.
5081         <info>: New.
5082         (record_btrace_target::open): Rename to ...
5083         (record_btrace_target_open): ... this.  Adjust.
5084         * record-full.c (record_longname, record_doc): New.
5085         (record_full_base_target) <shortname, longname, doc>: Delete.
5086         <info>: New.
5087         (record_full_target_info): New.
5088         (record_full_target): <shortname>: Delete.
5089         <info>: New.
5090         (record_full_core_open_1, record_full_open_1): Update comments.
5091         (record_full_base_target::open): Rename to ...
5092         (record_full_open): ... this.
5093         (cmd_record_full_restore): Update.
5094         (_initialize_record_full): Update.
5095         * remote-sim.c (remote_sim_target_info): New.
5096         (gdbsim_target) <shortname, longname, doc>: Delete.
5097         <info>: New.
5098         (gdbsim_target::open): Rename to ...
5099         (gdbsim_target_open): ... this.
5100         (_initialize_remote_sim): Adjust.
5101         * remote.c (remote_doc): New.
5102         (remote_target_info): New.
5103         (remote_target) <shortname, longname, doc>: Delete.
5104         <info>: New.
5105         (extended_remote_target_info): New.
5106         (extended_remote_target) <shortname, longname, doc>: Delete.
5107         <info>: New.
5108         (remote_target::open_1): Make static.  Adjust.
5109         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5110         * s390-linux-nat.c (_initialize_s390_nat): Use
5111         add_inf_child_target.
5112         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5113         add_inf_child_target.
5114         * sol-thread.c (thread_db_target_info): New.
5115         (sol_thread_target) <shortname, longname, doc>: Delete.
5116         <info>: New.
5117         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5118         add_inf_child_target.
5119         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5120         add_inf_child_target.
5121         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5122         add_inf_child_target.
5123         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5124         add_inf_child_target.
5125         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5126         add_inf_child_target.
5127         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5128         add_inf_child_target.
5129         * spu-linux-nat.c (_initialize_spu_nat): Use
5130         add_inf_child_target.
5131         * spu-multiarch.c (spu_multiarch_target_info): New.
5132         (spu_multiarch_target) <shortname, longname, doc>: Delete.
5133         <info>: New.
5134         * target-delegates.c: Regenerate.
5135         * target.c: Include <unordered_map>.
5136         (target_ops_p): Delete.
5137         (DEF_VEC_P(target_ops_p)): Delete.
5138         (target_factories): New.
5139         (test_target_info): New.
5140         (test_target_ops::info): New.
5141         (open_target): Adjust to use target_factories.
5142         (add_target_with_completer): Rename to ...
5143         (add_target): ... this.  Change prototype.  Register target_info
5144         and open callback in target_factories.  Register target_info in
5145         command context instead of target_ops.
5146         (add_target): Delete old implementation.
5147         (add_deprecated_target_alias): Change prototype.  Adjust.
5148         (the_native_target): New.
5149         (set_native_target, get_native_target): New.
5150         (find_default_run_target): Use the_native_target.
5151         (find_attach_target, find_run_target): Simplify.
5152         (target_ops::open): Delete.
5153         (dummy_target_info): New.
5154         (dummy_target::shortname, dummy_target::longname)
5155         (dummy_target::doc): Delete.
5156         (dummy_target::info): New.
5157         (debug_target::shortname, debug_target::longname)
5158         (debug_target::doc): Delete.
5159         (debug_target::info): New.
5160         * target.h (struct target_info): New.
5161         (target_ops::~target_ops): Add comment.
5162         (target_ops::info): New.
5163         (target_ops::shortname, target_ops::longname, target_ops::doc): No
5164         longer virtual.  Implement in terms of target_info.
5165         (set_native_target, get_native_target): Declare.
5166         (target_open_ftype): New.
5167         (add_target, add_target_with_completer)
5168         (add_deprecated_target_alias): Change prototype.
5169         (test_target) <shortname, longname, doc>: Delete.
5170         <info>: New.
5171         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5172         add_inf_child_target.
5173         * tracefile-tfile.c (tfile_target_info): New.
5174         (tfile_target) <shortname, longname, doc>: Delete.
5175         <info>: New.
5176         (tfile_target::open): Rename to ...
5177         (tfile_target_open): ... this.
5178         (_initialize_tracefile_tfile): Adjust.
5179         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5180         add_inf_child_target.
5181         * windows-nat.c (_initialize_windows_nat): Use
5182         add_inf_child_target.
5183         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5184         add_inf_child_target.
5185
5186 2018-05-02  Pedro Alves  <palves@redhat.com>
5187
5188         * linux-nat.h (linux_nat_target) <low_new_thread,
5189         low_delete_thread, low_new_fork, low_forget_process,
5190         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5191         New virtual methods.
5192         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5193         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5194         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5195         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5196         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5197         Delete.
5198         * linux-fork.c (delete_fork): Adjust to call low method.
5199         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5200         (linux_nat_new_fork, linux_nat_forget_process_hook)
5201         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5202         (linux_nat_status_is_event):
5203         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5204         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5205         to call low method.
5206         (sigtrap_is_event): Rename to ...
5207         (linux_nat_target::low_status_is_event): ... this.
5208         (linux_nat_set_status_is_event): Delete.
5209         (save_stop_reason, linux_nat_wait_1)
5210         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5211         low methods.
5212         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5213         (linux_nat_set_new_fork, linux_nat_set_forget_process)
5214         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5215         (linux_nat_set_prepare_to_resume): Delete.
5216         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5217         low virtual methods.
5218         * amd64-linux-nat.c: Likewise.
5219         * arm-linux-nat.c: Likewise.
5220         * i386-linux-nat.c: Likewise.
5221         * ia64-linux-nat.c: Likewise.
5222         * mips-linux-nat.c: Likewise.
5223         * ppc-linux-nat.c: Likewise.
5224         * s390-linux-nat.c: Likewise.
5225         * sparc64-linux-nat.c: Likewise.
5226         * x86-linux-nat.c: Likewise.
5227         * x86-linux-nat.h: Include "nat/x86-linux.h".
5228         (x86_linux_nat_target) <low_new_fork, low_forget_process,
5229         low_prepare_to_resume, low_new_thread, low_delete_thread>:
5230         Override methods.
5231
5232 2018-05-02  Pedro Alves  <palves@redhat.com>
5233
5234         * target.h (target_ops)
5235         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5236         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5237         stopped_by_watchpoint, have_continuable_watchpoint,
5238         stopped_data_address, watchpoint_addr_within_range,
5239         can_accel_watchpoint_condition, can_run, thread_alive,
5240         has_all_memory, has_memory, has_stack, has_registers,
5241         has_execution, can_async_p, is_async_p, supports_non_stop,
5242         always_non_stop_p, can_execute_reverse, supports_multi_process,
5243         supports_enable_disable_tracepoint,
5244         supports_disable_randomization, supports_string_tracing,
5245         supports_evaluation_of_breakpoint_conditions,
5246         can_run_breakpoint_commands, filesystem_is_local,
5247         can_download_tracepoint, get_trace_state_variable_value,
5248         set_trace_notes, get_tib_address, use_agent, can_use_agent,
5249         record_is_replaying, record_will_replay,
5250         augmented_libraries_svr4_read>: Adjust to return bool.
5251         * aarch64-linux-nat.c: All implementations adjusted.
5252         * aix-thread.c: All implementations adjusted.
5253         * arm-linux-nat.c: All implementations adjusted.
5254         * breakpoint.c: All implementations adjusted.
5255         * bsd-kvm.c: All implementations adjusted.
5256         * bsd-uthread.c: All implementations adjusted.
5257         * corelow.c: All implementations adjusted.
5258         * ctf.c: All implementations adjusted.
5259         * darwin-nat.c: All implementations adjusted.
5260         * darwin-nat.h: All implementations adjusted.
5261         * exec.c: All implementations adjusted.
5262         * fbsd-nat.c: All implementations adjusted.
5263         * fbsd-nat.h: All implementations adjusted.
5264         * gnu-nat.c: All implementations adjusted.
5265         * gnu-nat.h: All implementations adjusted.
5266         * go32-nat.c: All implementations adjusted.
5267         * ia64-linux-nat.c: All implementations adjusted.
5268         * inf-child.c: All implementations adjusted.
5269         * inf-child.h: All implementations adjusted.
5270         * inf-ptrace.c: All implementations adjusted.
5271         * inf-ptrace.h: All implementations adjusted.
5272         * linux-nat.c: All implementations adjusted.
5273         * linux-nat.h: All implementations adjusted.
5274         * mips-linux-nat.c: All implementations adjusted.
5275         * nto-procfs.c: All implementations adjusted.
5276         * ppc-linux-nat.c: All implementations adjusted.
5277         * procfs.c: All implementations adjusted.
5278         * ravenscar-thread.c: All implementations adjusted.
5279         * record-btrace.c: All implementations adjusted.
5280         * record-full.c: All implementations adjusted.
5281         * remote-sim.c: All implementations adjusted.
5282         * remote.c: All implementations adjusted.
5283         * s390-linux-nat.c: All implementations adjusted.
5284         * sol-thread.c: All implementations adjusted.
5285         * spu-multiarch.c: All implementations adjusted.
5286         * target-delegates.c: All implementations adjusted.
5287         * target.c: All implementations adjusted.
5288         * target.h: All implementations adjusted.
5289         * tracefile-tfile.c: All implementations adjusted.
5290         * tracefile.c: All implementations adjusted.
5291         * tracefile.h: All implementations adjusted.
5292         * windows-nat.c: All implementations adjusted.
5293         * x86-linux-nat.h: All implementations adjusted.
5294         * x86-nat.h: All implementations adjusted.
5295
5296 2018-05-02  Pedro Alves  <palves@redhat.com>
5297
5298         * make-target-delegates (scan_target_h): Don't trim lines here.
5299         Replace sequences of tabs and/or whitespace with a single
5300         whitespace.
5301         (top level, parsing methods): Trim each line before processing it
5302         here.
5303
5304 2018-05-02  Pedro Alves  <palves@redhat.com>
5305             John Baldwin  <jhb@freebsd.org>
5306
5307         * target.h (enum strata) <debug_stratum>: New.
5308         (struct target_ops) <all delegation methods>: Replace by C++
5309         virtual methods, and drop "to_" prefix.  All references updated
5310         throughout.
5311         <to_shortname, to_longname, to_doc, to_data,
5312         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5313         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5314         virtual methods.  All references updated throughout.
5315         <can_attach, supports_terminal_ours, can_create_inferior,
5316         get_thread_control_capabilities, attach_no_wait>: New
5317         virtual methods.
5318         <insert_breakpoint, remove_breakpoint>: Now
5319         TARGET_DEFAULT_NORETURN methods.
5320         <info_proc>: Now returns bool.
5321         <to_magic>: Delete.
5322         (OPS_MAGIC): Delete.
5323         (current_target): Delete.  All references replaced by references
5324         to ...
5325         (target_stack): ... this.  New.
5326         (target_shortname, target_longname): Adjust.
5327         (target_can_run): Now a function declaration.
5328         (default_child_has_all_memory, default_child_has_memory)
5329         (default_child_has_stack, default_child_has_registers)
5330         (default_child_has_execution): Remove target_ops parameter.
5331         (complete_target_initialization): Delete.
5332         (memory_breakpoint_target): New template class.
5333         (test_target_ops): Refactor as a C++ class with virtual methods.
5334         * make-target-delegates (NAME_PART): Tighten.
5335         (POINTER_PART, CP_SYMBOL): New.
5336         (SIMPLE_RETURN_PART): Reimplement.
5337         (VEC_RETURN_PART): Expect less.
5338         (RETURN_PART, VIRTUAL_PART): New.
5339         (METHOD): Adjust to C++ virtual methods.
5340         (scan_target_h): Remove reference to C99.
5341         (dname): Output "target_ops::" prefix.
5342         (write_function_header): Adjust to output a C++ class method.
5343         (write_declaration): New.
5344         (write_delegator): Adjust to output a C++ class method.
5345         (tdname): Output "dummy_target::" prefix.
5346         (write_tdefault, write_debugmethod): Adjust to output a C++ class
5347         method.
5348         (tdefault_names, debug_names): Delete.
5349         (return_types, tdefaults, styles, argtypes_array): New.
5350         (top level): All methods are delegators.
5351         (print_class): New.
5352         (top level): Print dummy_target and debug_target classes.
5353         * target-delegates.c: Regenerate.
5354         * target-debug.h (target_debug_print_enum_info_proc_what)
5355         (target_debug_print_thread_control_capabilities)
5356         (target_debug_print_thread_info_p): New.
5357         * target.c (dummy_target): Delete.
5358         (the_dummy_target, the_debug_target): New.
5359         (target_stack): Now extern.
5360         (set_targetdebug): Push/unpush debug target.
5361         (default_child_has_all_memory, default_child_has_memory)
5362         (default_child_has_stack, default_child_has_registers)
5363         (default_child_has_execution): Remove target_ops parameter.
5364         (complete_target_initialization): Delete.
5365         (add_target_with_completer): No longer call
5366         complete_target_initialization.
5367         (target_supports_terminal_ours): Use regular delegation.
5368         (update_current_target): Delete.
5369         (push_target): No longer check magic number.  Don't call
5370         update_current_target.
5371         (unpush_target): Don't call update_current_target.
5372         (target_is_pushed): No longer check magic number.
5373         (target_require_runnable): Skip for all stratums over
5374         process_stratum.
5375         (target_ops::info_proc): New.
5376         (target_info_proc): Use find_target_at and
5377         find_default_run_target.
5378         (target_supports_disable_randomization): Use regular delegation.
5379         (target_get_osdata): Use find_target_at.
5380         (target_ops::open, target_ops::close, target_ops::can_attach)
5381         (target_ops::attach, target_ops::can_create_inferior)
5382         (target_ops::create_inferior, target_ops::can_run)
5383         (target_can_run): New.
5384         (default_fileio_target): Use regular delegation.
5385         (target_ops::fileio_open, target_ops::fileio_pwrite)
5386         (target_ops::fileio_pread, target_ops::fileio_fstat)
5387         (target_ops::fileio_close, target_ops::fileio_unlink)
5388         (target_ops::fileio_readlink): New.
5389         (target_fileio_open_1, target_fileio_unlink)
5390         (target_fileio_readlink): Always call the target method.  Handle
5391         FILEIO_ENOSYS.
5392         (return_zero, return_zero_has_execution): Delete.
5393         (init_dummy_target): Delete.
5394         (dummy_target::dummy_target, dummy_target::shortname)
5395         (dummy_target::longname, dummy_target::doc)
5396         (debug_target::debug_target, debug_target::shortname)
5397         (debug_target::longname, debug_target::doc): New.
5398         (target_supports_delete_record): Use regular delegation.
5399         (setup_target_debug): Delete.
5400         (maintenance_print_target_stack): Skip debug_stratum.
5401         (initialize_targets): Instantiate the_dummy_target and
5402         the_debug_target.
5403         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
5404         use target_stack.
5405         (target_auxv_search, fprint_target_auxv): Adjust.
5406         (info_auxv_command): Adjust to use target_stack.
5407         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5408         * exceptions.c (print_flush): Handle a NULL target_stack.
5409         * regcache.c (target_ops_no_register): Refactor as class with
5410         virtual methods.
5411
5412         * exec.c (exec_target): New class.
5413         (exec_ops): Now an exec_target.
5414         (exec_open, exec_close_1, exec_get_section_table)
5415         (exec_xfer_partial, exec_files_info, exec_has_memory)
5416         (exec_make_note_section): Refactor as exec_target methods.
5417         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5418         Delete.
5419         (exec_target::find_memory_regions): New.
5420         (_initialize_exec): Don't call init_exec_ops.
5421         * gdbcore.h (exec_file_clear): Delete.
5422
5423         * corefile.c (core_target): Delete.
5424         (core_file_command): Adjust.
5425         * corelow.c (core_target): New class.
5426         (the_core_target): New.
5427         (core_close): Remove target_ops parameter.
5428         (core_close_cleanup): Adjust.
5429         (core_target::close): New.
5430         (core_open, core_detach, get_core_registers, core_files_info)
5431         (core_xfer_partial, core_thread_alive, core_read_description)
5432         (core_pid_to_str, core_thread_name, core_has_memory)
5433         (core_has_stack, core_has_registers, core_info_proc): Rework as
5434         core_target methods.
5435         (ignore, core_remove_breakpoint, init_core_ops): Delete.
5436         (_initialize_corelow): Initialize the_core_target.
5437         * gdbcore.h (core_target): Delete.
5438         (the_core_target): New.
5439
5440         * ctf.c: (ctf_target): New class.
5441         (ctf_ops): Now a ctf_target.
5442         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5443         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5444         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5445         methods.
5446         (init_ctf_ops): Delete.
5447         (_initialize_ctf): Don't call it.
5448         * tracefile-tfile.c (tfile_target): New class.
5449         (tfile_ops): Now a tfile_target.
5450         (tfile_open, tfile_close, tfile_files_info)
5451         (tfile_get_tracepoint_status, tfile_trace_find)
5452         (tfile_fetch_registers, tfile_xfer_partial)
5453         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5454         Refactor as tfile_target methods.
5455         (tfile_xfer_partial_features): Remove target_ops parameter.
5456         (init_tfile_ops): Delete.
5457         (_initialize_tracefile_tfile): Don't call it.
5458         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5459         (tracefile_has_stack, tracefile_has_registers)
5460         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5461         tracefile_target methods.
5462         (init_tracefile_ops): Delete.
5463         (tracefile_target::tracefile_target): New.
5464         * tracefile.h: Include "target.h".
5465         (tracefile_target): New class.
5466         (init_tracefile_ops): Delete.
5467
5468         * spu-multiarch.c (spu_multiarch_target): New class.
5469         (spu_ops): Now a spu_multiarch_target.
5470         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5471         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5472         (spu_search_memory, spu_mourn_inferior): Refactor as
5473         spu_multiarch_target methods.
5474         (init_spu_ops): Delete.
5475         (_initialize_spu_multiarch): Remove references to init_spu_ops,
5476         complete_target_initialization.
5477
5478         * ravenscar-thread.c (ravenscar_thread_target): New class.
5479         (ravenscar_ops): Now a ravenscar_thread_target.
5480         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5481         (ravenscar_thread_alive, ravenscar_pid_to_str)
5482         (ravenscar_fetch_registers, ravenscar_store_registers)
5483         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5484         (ravenscar_stopped_by_hw_breakpoint)
5485         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5486         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5487         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5488         methods.
5489         (init_ravenscar_thread_ops): Delete.
5490         (_initialize_ravenscar): Remove references to
5491         init_ravenscar_thread_ops and complete_target_initialization.
5492
5493         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5494         (bsd_uthread_target): New class.
5495         (bsd_uthread_ops): Now a bsd_uthread_target.
5496         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5497         (bsd_uthread_close, bsd_uthread_mourn_inferior)
5498         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5499         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5500         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5501         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5502         (bsd_uthread_target): Delete function.
5503         (_initialize_bsd_uthread): Remove reference to
5504         complete_target_initialization.
5505
5506         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
5507         (target_bfd): ... this new class.
5508         (target_bfd_xfer_partial, target_bfd_get_section_table)
5509         (target_bfd_close): Refactor as target_bfd methods.
5510         (target_bfd::~target_bfd): New.
5511         (target_bfd_reopen): Adjust.
5512         (target_bfd::close): New.
5513
5514         * record-btrace.c (record_btrace_target): New class.
5515         (record_btrace_ops): Now a record_btrace_target.
5516         (record_btrace_open, record_btrace_stop_recording)
5517         (record_btrace_disconnect, record_btrace_close)
5518         (record_btrace_async, record_btrace_info)
5519         (record_btrace_insn_history, record_btrace_insn_history_range)
5520         (record_btrace_insn_history_from, record_btrace_call_history)
5521         (record_btrace_call_history_range)
5522         (record_btrace_call_history_from, record_btrace_record_method)
5523         (record_btrace_is_replaying, record_btrace_will_replay)
5524         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5525         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5526         (record_btrace_store_registers, record_btrace_prepare_to_store)
5527         (record_btrace_to_get_unwinder)
5528         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5529         (record_btrace_commit_resume, record_btrace_wait)
5530         (record_btrace_stop, record_btrace_can_execute_reverse)
5531         (record_btrace_stopped_by_sw_breakpoint)
5532         (record_btrace_supports_stopped_by_sw_breakpoint)
5533         (record_btrace_stopped_by_hw_breakpoint)
5534         (record_btrace_supports_stopped_by_hw_breakpoint)
5535         (record_btrace_update_thread_list, record_btrace_thread_alive)
5536         (record_btrace_goto_begin, record_btrace_goto_end)
5537         (record_btrace_goto, record_btrace_stop_replaying_all)
5538         (record_btrace_execution_direction)
5539         (record_btrace_prepare_to_generate_core)
5540         (record_btrace_done_generating_core): Refactor as
5541         record_btrace_target methods.
5542         (init_record_btrace_ops): Delete.
5543         (_initialize_record_btrace): Remove reference to
5544         init_record_btrace_ops.
5545         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5546         the execution_direction global.
5547         (record_full_base_target, record_full_target)
5548         (record_full_core_target): New classes.
5549         (record_full_ops): Now a record_full_target.
5550         (record_full_core_ops): Now a record_full_core_target.
5551         (record_full_target::detach, record_full_target::disconnect)
5552         (record_full_core_target::disconnect)
5553         (record_full_target::mourn_inferior, record_full_target::kill):
5554         New.
5555         (record_full_open, record_full_close, record_full_async): Refactor
5556         as methods of the record_full_base_target class.
5557         (record_full_resume, record_full_commit_resume): Refactor
5558         as methods of the record_full_target class.
5559         (record_full_wait, record_full_stopped_by_watchpoint)
5560         (record_full_stopped_data_address)
5561         (record_full_stopped_by_sw_breakpoint)
5562         (record_full_supports_stopped_by_sw_breakpoint)
5563         (record_full_stopped_by_hw_breakpoint)
5564         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5565         methods of the record_full_base_target class.
5566         (record_full_store_registers, record_full_xfer_partial)
5567         (record_full_insert_breakpoint, record_full_remove_breakpoint):
5568         Refactor as methods of the record_full_target class.
5569         (record_full_can_execute_reverse, record_full_get_bookmark)
5570         (record_full_goto_bookmark, record_full_execution_direction)
5571         (record_full_record_method, record_full_info, record_full_delete)
5572         (record_full_is_replaying, record_full_will_replay)
5573         (record_full_goto_begin, record_full_goto_end, record_full_goto)
5574         (record_full_stop_replaying): Refactor as methods of the
5575         record_full_base_target class.
5576         (record_full_core_resume, record_full_core_kill)
5577         (record_full_core_fetch_registers)
5578         (record_full_core_prepare_to_store)
5579         (record_full_core_store_registers, record_full_core_xfer_partial)
5580         (record_full_core_insert_breakpoint)
5581         (record_full_core_remove_breakpoint)
5582         (record_full_core_has_execution): Refactor
5583         as methods of the record_full_core_target class.
5584         (record_full_base_target::supports_delete_record): New.
5585         (init_record_full_ops): Delete.
5586         (init_record_full_core_ops): Delete.
5587         (record_full_save): Refactor as method of the
5588         record_full_base_target class.
5589         (_initialize_record_full): Remove references to
5590         init_record_full_ops and init_record_full_core_ops.
5591
5592         * remote.c (remote_target, extended_remote_target): New classes.
5593         (remote_ops): Now a remote_target.
5594         (extended_remote_ops): Now an extended_remote_target.
5595         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5596         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5597         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5598         (remote_pass_signals, remote_set_syscall_catchpoint)
5599         (remote_program_signals, )
5600         (remote_thread_always_alive): Remove target_ops parameter.
5601         (remote_thread_alive, remote_thread_name)
5602         (remote_update_thread_list, remote_threads_extra_info)
5603         (remote_static_tracepoint_marker_at)
5604         (remote_static_tracepoint_markers_by_strid)
5605         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5606         (remote_open): Refactor as methods of remote_target.
5607         (extended_remote_open, extended_remote_detach)
5608         (extended_remote_attach, extended_remote_post_attach):
5609         (extended_remote_supports_disable_randomization)
5610         (extended_remote_create_inferior): : Refactor as method of
5611         extended_remote_target.
5612         (remote_set_permissions, remote_open_1, remote_detach)
5613         (remote_follow_fork, remote_follow_exec, remote_disconnect)
5614         (remote_resume, remote_commit_resume, remote_stop)
5615         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5616         (remote_terminal_ours, remote_wait, remote_fetch_registers)
5617         (remote_prepare_to_store, remote_store_registers)
5618         (remote_flash_erase, remote_flash_done, remote_files_info)
5619         (remote_kill, remote_mourn, remote_insert_breakpoint)
5620         (remote_remove_breakpoint, remote_insert_watchpoint)
5621         (remote_watchpoint_addr_within_range)
5622         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5623         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5624         (remote_supports_stopped_by_sw_breakpoint)
5625         (remote_stopped_by_hw_breakpoint)
5626         (remote_supports_stopped_by_hw_breakpoint)
5627         (remote_stopped_by_watchpoint, remote_stopped_data_address)
5628         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5629         (remote_verify_memory): Refactor as methods of remote_target.
5630         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5631         parameter.
5632         (remote_xfer_partial, remote_get_memory_xfer_limit)
5633         (remote_search_memory, remote_rcmd, remote_memory_map)
5634         (remote_pid_to_str, remote_get_thread_local_address)
5635         (remote_get_tib_address, remote_read_description): Refactor as
5636         methods of remote_target.
5637         (remote_target::fileio_open, remote_target::fileio_pwrite)
5638         (remote_target::fileio_pread, remote_target::fileio_close): New.
5639         (remote_hostio_readlink, remote_hostio_fstat)
5640         (remote_filesystem_is_local, remote_can_execute_reverse)
5641         (remote_supports_non_stop, remote_supports_disable_randomization)
5642         (remote_supports_multi_process, remote_supports_cond_breakpoints)
5643         (remote_supports_enable_disable_tracepoint)
5644         (remote_supports_string_tracing)
5645         (remote_can_run_breakpoint_commands, remote_trace_init)
5646         (remote_download_tracepoint, remote_can_download_tracepoint)
5647         (remote_download_trace_state_variable, remote_enable_tracepoint)
5648         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5649         (remote_trace_start, remote_get_trace_status)
5650         (remote_get_tracepoint_status, remote_trace_stop)
5651         (remote_trace_find, remote_get_trace_state_variable_value)
5652         (remote_save_trace_data, remote_get_raw_trace_data)
5653         (remote_set_disconnected_tracing, remote_core_of_thread)
5654         (remote_set_circular_trace_buffer, remote_traceframe_info)
5655         (remote_get_min_fast_tracepoint_insn_len)
5656         (remote_set_trace_buffer_size, remote_set_trace_notes)
5657         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5658         (remote_disable_btrace, remote_teardown_btrace)
5659         (remote_read_btrace, remote_btrace_conf)
5660         (remote_augmented_libraries_svr4_read, remote_load)
5661         (remote_pid_to_exec_file, remote_can_do_single_step)
5662         (remote_execution_direction, remote_thread_handle_to_thread_info):
5663         Refactor as methods of remote_target.
5664         (init_remote_ops, init_extended_remote_ops): Delete.
5665         (remote_can_async_p, remote_is_async_p, remote_async)
5666         (remote_thread_events, remote_upload_tracepoints)
5667         (remote_upload_trace_state_variables): Refactor as methods of
5668         remote_target.
5669         (_initialize_remote): Remove references to init_remote_ops and
5670         init_extended_remote_ops.
5671
5672         * remote-sim.c (gdbsim_target): New class.
5673         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5674         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5675         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5676         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5677         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5678         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5679         Refactor as methods of gdbsim_target.
5680         (gdbsim_ops): Now a gdbsim_target.
5681         (init_gdbsim_ops): Delete.
5682         (gdbsim_cntrl_c): Adjust.
5683         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5684
5685         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5686         (the_amd64_linux_nat_target): New.
5687         (amd64_linux_fetch_inferior_registers)
5688         (amd64_linux_store_inferior_registers): Refactor as methods of
5689         amd64_linux_nat_target.
5690         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
5691         * i386-linux-nat.c: Don't include "linux-nat.h".
5692         (i386_linux_nat_target): New class.
5693         (the_i386_linux_nat_target): New.
5694         (i386_linux_fetch_inferior_registers)
5695         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5696         as methods of i386_linux_nat_target.
5697         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
5698         * inf-child.c (inf_child_ops): Delete.
5699         (inf_child_fetch_inferior_registers)
5700         (inf_child_store_inferior_registers): Delete.
5701         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5702         methods of inf_child_target.
5703         (inf_child_target::supports_terminal_ours)
5704         (inf_child_target::terminal_init)
5705         (inf_child_target::terminal_inferior)
5706         (inf_child_target::terminal_ours_for_output)
5707         (inf_child_target::terminal_ours, inf_child_target::interrupt)
5708         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5709         New.
5710         (inf_child_open, inf_child_disconnect, inf_child_close)
5711         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5712         (inf_child_post_startup_inferior, inf_child_can_run)
5713         (inf_child_pid_to_exec_file): Refactor as methods of
5714         inf_child_target.
5715         (inf_child_follow_fork): Delete.
5716         (inf_child_target::can_create_inferior)
5717         (inf_child_target::can_attach): New.
5718         (inf_child_target::has_all_memory, inf_child_target::has_memory)
5719         (inf_child_target::has_stack, inf_child_target::has_registers)
5720         (inf_child_target::has_execution): New.
5721         (inf_child_fileio_open, inf_child_fileio_pwrite)
5722         (inf_child_fileio_pread, inf_child_fileio_fstat)
5723         (inf_child_fileio_close, inf_child_fileio_unlink)
5724         (inf_child_fileio_readlink, inf_child_use_agent)
5725         (inf_child_can_use_agent): Refactor as methods of
5726         inf_child_target.
5727         (return_zero, inf_child_target): Delete.
5728         (inf_child_target::inf_child_target): New.
5729         * inf-child.h: Include "target.h".
5730         (inf_child_target): Delete function prototype.
5731         (inf_child_target): New class.
5732         (inf_child_open_target, inf_child_mourn_inferior)
5733         (inf_child_maybe_unpush_target): Delete.
5734         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5735         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5736         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5737         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5738         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5739         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5740         (inf_ptrace_wait, inf_ptrace_xfer_partial)
5741         (inf_ptrace_thread_alive, inf_ptrace_files_info)
5742         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5743         methods of inf_ptrace_target.
5744         (inf_ptrace_target): Delete function.
5745         * inf-ptrace.h: Include "inf-child.h".
5746         (inf_ptrace_target): Delete function declaration.
5747         (inf_ptrace_target): New class.
5748         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5749         * linux-nat.c (linux_target): New.
5750         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5751         (linux_nat_target::~linux_nat_target): New.
5752         (linux_child_post_attach, linux_child_post_startup_inferior)
5753         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5754         (linux_child_remove_fork_catchpoint)
5755         (linux_child_insert_vfork_catchpoint)
5756         (linux_child_remove_vfork_catchpoint)
5757         (linux_child_insert_exec_catchpoint)
5758         (linux_child_remove_exec_catchpoint)
5759         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5760         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5761         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5762         (linux_nat_stopped_data_address)
5763         (linux_nat_stopped_by_sw_breakpoint)
5764         (linux_nat_supports_stopped_by_sw_breakpoint)
5765         (linux_nat_stopped_by_hw_breakpoint)
5766         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5767         (linux_nat_kill, linux_nat_mourn_inferior)
5768         (linux_nat_xfer_partial, linux_nat_thread_alive)
5769         (linux_nat_update_thread_list, linux_nat_pid_to_str)
5770         (linux_nat_thread_name, linux_child_pid_to_exec_file)
5771         (linux_child_static_tracepoint_markers_by_strid)
5772         (linux_nat_is_async_p, linux_nat_can_async_p)
5773         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5774         (linux_nat_supports_multi_process)
5775         (linux_nat_supports_disable_randomization, linux_nat_async)
5776         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5777         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5778         (linux_nat_fileio_open, linux_nat_fileio_readlink)
5779         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5780         methods of linux_nat_target.
5781         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5782         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5783         parameter.
5784         (check_stopped_by_watchpoint): Adjust.
5785         (linux_xfer_partial): Delete.
5786         (linux_target_install_ops, linux_target, linux_nat_add_target):
5787         Delete.
5788         (linux_nat_target::linux_nat_target): New.
5789         * linux-nat.h: Include "inf-ptrace.h".
5790         (linux_nat_target): New.
5791         (linux_target, linux_target_install_ops, linux_nat_add_target):
5792         Delete function declarations.
5793         (linux_target): Declare global.
5794         * linux-thread-db.c (thread_db_target): New.
5795         (thread_db_target::thread_db_target): New.
5796         (thread_db_ops): Delete.
5797         (the_thread_db_target): New.
5798         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5799         (thread_db_update_thread_list, thread_db_pid_to_str)
5800         (thread_db_extra_thread_info)
5801         (thread_db_thread_handle_to_thread_info)
5802         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5803         (thread_db_resume): Refactor as methods of thread_db_target.
5804         (init_thread_db_ops): Delete.
5805         (_initialize_thread_db): Remove reference to init_thread_db_ops.
5806         * x86-linux-nat.c: Don't include "linux-nat.h".
5807         (super_post_startup_inferior): Delete.
5808         (x86_linux_nat_target::~x86_linux_nat_target): New.
5809         (x86_linux_child_post_startup_inferior)
5810         (x86_linux_read_description, x86_linux_enable_btrace)
5811         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5812         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5813         methods of x86_linux_nat_target.
5814         (x86_linux_create_target): Delete.  Bits folded ...
5815         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
5816         pointer.
5817         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5818         (x86_linux_nat_target): New class.
5819         (x86_linux_create_target): Delete.
5820         (x86_linux_add_target): Now takes a linux_nat_target pointer.
5821         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5822         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5823         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5824         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5825         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5826         make extern.
5827         (x86_use_watchpoints): Delete.
5828         * x86-nat.h: Include "breakpoint.h" and "target.h".
5829         (x86_use_watchpoints): Delete.
5830         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5831         (x86_stopped_by_watchpoint, x86_stopped_data_address)
5832         (x86_insert_watchpoint, x86_remove_watchpoint)
5833         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5834         (x86_stopped_by_hw_breakpoint): New declarations.
5835         (x86_nat_target): New template class.
5836
5837         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5838         (the_ppc_linux_nat_target): New.
5839         (ppc_linux_fetch_inferior_registers)
5840         (ppc_linux_can_use_hw_breakpoint)
5841         (ppc_linux_region_ok_for_hw_watchpoint)
5842         (ppc_linux_ranged_break_num_registers)
5843         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5844         (ppc_linux_insert_mask_watchpoint)
5845         (ppc_linux_remove_mask_watchpoint)
5846         (ppc_linux_can_accel_watchpoint_condition)
5847         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5848         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5849         (ppc_linux_watchpoint_addr_within_range)
5850         (ppc_linux_masked_watch_num_registers)
5851         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5852         (ppc_linux_read_description): Refactor as methods of
5853         ppc_linux_nat_target.
5854         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
5855
5856         * procfs.c (procfs_xfer_partial): Delete forward declaration.
5857         (procfs_target): New class.
5858         (the_procfs_target): New.
5859         (procfs_target): Delete function.
5860         (procfs_auxv_parse, procfs_attach, procfs_detach)
5861         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5862         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5863         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5864         (procfs_create_inferior, procfs_update_thread_list)
5865         (procfs_thread_alive, procfs_pid_to_str)
5866         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5867         (procfs_stopped_data_address, procfs_insert_watchpoint)
5868         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5869         (proc_find_memory_regions, procfs_info_proc)
5870         (procfs_make_note_section): Refactor as methods of procfs_target.
5871         (_initialize_procfs): Adjust.
5872         * sol-thread.c (sol_thread_target): New class.
5873         (sol_thread_ops): Now a sol_thread_target.
5874         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5875         (sol_thread_fetch_registers, sol_thread_store_registers)
5876         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5877         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5878         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5879         (init_sol_thread_ops): Delete.
5880         (_initialize_sol_thread): Adjust.  Remove references to
5881         init_sol_thread_ops and complete_target_initialization.
5882
5883         * windows-nat.c (windows_nat_target): New class.
5884         (windows_fetch_inferior_registers)
5885         (windows_store_inferior_registers, windows_resume, windows_wait)
5886         (windows_attach, windows_detach, windows_pid_to_exec_file)
5887         (windows_files_info, windows_create_inferior)
5888         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5889         (windows_close, windows_pid_to_str, windows_xfer_partial)
5890         (windows_get_tib_address, windows_get_ada_task_ptid)
5891         (windows_thread_name, windows_thread_alive): Refactor as
5892         windows_nat_target methods.
5893         (do_initial_windows_stuff): Adjust.
5894         (windows_target): Delete function.
5895         (_initialize_windows_nat): Adjust.
5896
5897         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5898         (darwin_mourn_inferior, darwin_kill_inferior)
5899         (darwin_create_inferior, darwin_attach, darwin_detach)
5900         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5901         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5902         (darwin_supports_multi_process): Refactor as darwin_nat_target
5903         methods.
5904         (darwin_resume_to, darwin_files_info): Delete.
5905         (_initialize_darwin_inferior): Rename to ...
5906         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
5907         * darwin-nat.h: Include "inf-child.h".
5908         (darwin_nat_target): New class.
5909         (darwin_complete_target): Delete.
5910         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5911         (darwin_target): New.
5912         (i386_darwin_fetch_inferior_registers)
5913         (i386_darwin_store_inferior_registers): Refactor as methods of
5914         darwin_nat_target.
5915         (darwin_complete_target): Delete, with ...
5916         (_initialize_i386_darwin_nat): ... bits factored out here.
5917
5918         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5919         (the_alpha_linux_nat_target): New.
5920         (alpha_linux_register_u_offset): Refactor as
5921         alpha_linux_nat_target method.
5922         (_initialize_alpha_linux_nat): Adjust.
5923         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5924         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5925         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5926         methods of linux_nat_trad_target.
5927         (linux_trad_target): Delete.
5928         * linux-nat-trad.h (linux_trad_target): Delete function.
5929         (linux_nat_trad_target): New class.
5930         * mips-linux-nat.c (mips_linux_nat_target): New class.
5931         (super_fetch_registers, super_store_registers, super_close):
5932         Delete.
5933         (the_mips_linux_nat_target): New.
5934         (mips64_linux_regsets_fetch_registers)
5935         (mips64_linux_regsets_store_registers)
5936         (mips64_linux_fetch_registers, mips64_linux_store_registers)
5937         (mips_linux_register_u_offset, mips_linux_read_description)
5938         (mips_linux_can_use_hw_breakpoint)
5939         (mips_linux_stopped_by_watchpoint)
5940         (mips_linux_stopped_data_address)
5941         (mips_linux_region_ok_for_hw_watchpoint)
5942         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5943         (mips_linux_close): Refactor as methods of mips_linux_nat.
5944         (_initialize_mips_linux_nat): Adjust to C++ification.
5945
5946         * aix-thread.c (aix_thread_target): New class.
5947         (aix_thread_ops): Now an aix_thread_target.
5948         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5949         (aix_thread_fetch_registers, aix_thread_store_registers)
5950         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5951         (aix_thread_thread_alive, aix_thread_pid_to_str)
5952         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5953         Refactor as methods of aix_thread_target.
5954         (init_aix_thread_ops): Delete.
5955         (_initialize_aix_thread): Remove references to init_aix_thread_ops
5956         and complete_target_initialization.
5957         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5958         (rs6000_nat_target): New class.
5959         (the_rs6000_nat_target): New.
5960         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5961         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5962         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5963         (super_create_inferior): Delete.
5964         (_initialize_rs6000_nat): Adjust to C++ification.
5965
5966         * arm-linux-nat.c (arm_linux_nat_target): New class.
5967         (the_arm_linux_nat_target): New.
5968         (arm_linux_fetch_inferior_registers)
5969         (arm_linux_store_inferior_registers, arm_linux_read_description)
5970         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5971         (arm_linux_remove_hw_breakpoint)
5972         (arm_linux_region_ok_for_hw_watchpoint)
5973         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5974         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5975         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5976         arm_linux_nat_target.
5977         (_initialize_arm_linux_nat): Adjust to C++ification.
5978
5979         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5980         (the_aarch64_linux_nat_target): New.
5981         (aarch64_linux_fetch_inferior_registers)
5982         (aarch64_linux_store_inferior_registers)
5983         (aarch64_linux_child_post_startup_inferior)
5984         (aarch64_linux_read_description)
5985         (aarch64_linux_can_use_hw_breakpoint)
5986         (aarch64_linux_insert_hw_breakpoint)
5987         (aarch64_linux_remove_hw_breakpoint)
5988         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5989         (aarch64_linux_region_ok_for_hw_watchpoint)
5990         (aarch64_linux_stopped_data_address)
5991         (aarch64_linux_stopped_by_watchpoint)
5992         (aarch64_linux_watchpoint_addr_within_range)
5993         (aarch64_linux_can_do_single_step): Refactor as methods of
5994         aarch64_linux_nat_target.
5995         (super_post_startup_inferior): Delete.
5996         (_initialize_aarch64_linux_nat): Adjust to C++ification.
5997
5998         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5999         (the_hppa_linux_nat_target): New.
6000         (hppa_linux_fetch_inferior_registers)
6001         (hppa_linux_store_inferior_registers): Refactor as methods of
6002         hppa_linux_nat_target.
6003         (_initialize_hppa_linux_nat): Adjust to C++ification.
6004
6005         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6006         (the_ia64_linux_nat_target): New.
6007         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6008         (ia64_linux_stopped_data_address)
6009         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6010         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6011         ia64_linux_nat_target methods.
6012         (super_xfer_partial): Delete.
6013         (_initialize_ia64_linux_nat): Adjust to C++ification.
6014
6015         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6016         (the_m32r_linux_nat_target): New.
6017         (m32r_linux_fetch_inferior_registers)
6018         (m32r_linux_store_inferior_registers): Refactor as
6019         m32r_linux_nat_target methods.
6020         (_initialize_m32r_linux_nat): Adjust to C++ification.
6021
6022         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6023         (the_m68k_linux_nat_target): New.
6024         (m68k_linux_fetch_inferior_registers)
6025         (m68k_linux_store_inferior_registers): Refactor as
6026         m68k_linux_nat_target methods.
6027         (_initialize_m68k_linux_nat): Adjust to C++ification.
6028
6029         * s390-linux-nat.c (s390_linux_nat_target): New class.
6030         (the_s390_linux_nat_target): New.
6031         (s390_linux_fetch_inferior_registers)
6032         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6033         (s390_insert_watchpoint, s390_remove_watchpoint)
6034         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6035         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6036         (s390_auxv_parse, s390_read_description): Refactor as methods of
6037         s390_linux_nat_target.
6038         (_initialize_s390_nat): Adjust to C++ification.
6039
6040         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6041         (the_sparc_linux_nat_target): New.
6042         (_initialize_sparc_linux_nat): Adjust to C++ification.
6043         * sparc-nat.c (sparc_fetch_inferior_registers)
6044         (sparc_store_inferior_registers): Remove target_ops parameter.
6045         * sparc-nat.h (sparc_fetch_inferior_registers)
6046         (sparc_store_inferior_registers): Remove target_ops parameter.
6047         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6048         (the_sparc64_linux_nat_target): New.
6049         (_initialize_sparc64_linux_nat): Adjust to C++ification.
6050
6051         * spu-linux-nat.c (spu_linux_nat_target): New class.
6052         (the_spu_linux_nat_target): New.
6053         (spu_child_post_startup_inferior, spu_child_post_attach)
6054         (spu_child_wait, spu_fetch_inferior_registers)
6055         (spu_store_inferior_registers, spu_xfer_partial)
6056         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6057         methods.
6058         (_initialize_spu_nat): Adjust to C++ification.
6059
6060         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6061         (the_tilegx_linux_nat_target): New.
6062         (fetch_inferior_registers, store_inferior_registers):
6063         Refactor as methods.
6064         (_initialize_tile_linux_nat): Adjust to C++ification.
6065
6066         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6067         (the_xtensa_linux_nat_target): New.
6068         (xtensa_linux_fetch_inferior_registers)
6069         (xtensa_linux_store_inferior_registers): Refactor as
6070         xtensa_linux_nat_target methods.
6071         (_initialize_xtensa_linux_nat): Adjust to C++ification.
6072
6073         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6074         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6075         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6076         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6077         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6078         (fbsd_stopped_by_sw_breakpoint)
6079         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6080         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6081         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6082         (fbsd_post_startup_inferior, fbsd_post_attach)
6083         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6084         (fbsd_set_syscall_catchpoint)
6085         (super_xfer_partial, super_resume, super_wait)
6086         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6087         (fbsd_handle_debug_trap): Remove target_ops parameter.
6088         (fbsd_nat_add_target): Delete.
6089         * fbsd-nat.h: Include "inf-ptrace.h".
6090         (fbsd_nat_add_target): Delete.
6091         (USE_SIGTRAP_SIGINFO): Define.
6092         (fbsd_nat_target): New class.
6093
6094         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6095         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6096         (amd64bsd_target): Delete.
6097         * amd64-bsd-nat.h: New file.
6098         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6099         "x86-bsd-nat.h".
6100         (amd64_fbsd_nat_target): New class.
6101         (the_amd64_fbsd_nat_target): New.
6102         (amd64fbsd_read_description): Refactor as method of
6103         amd64_fbsd_nat_target.
6104         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6105         (_initialize_amd64fbsd_nat): Adjust to C++ification.
6106         * amd64-nat.h (amd64bsd_target): Delete function declaration.
6107         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6108         (i386bsd_store_inferior_registers): Remove target_ops parameter.
6109         (i386bsd_target): Delete.
6110         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6111         (i386bsd_fetch_inferior_registers)
6112         (i386bsd_store_inferior_registers): Declare.
6113         (i386_bsd_nat_target): New class.
6114         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6115         (the_i386_fbsd_nat_target): New.
6116         (i386fbsd_resume, i386fbsd_read_description): Refactor as
6117         i386_fbsd_nat_target methods.
6118         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6119         (_initialize_i386fbsd_nat): Adjust to C++ification.
6120         * x86-bsd-nat.c (super_mourn_inferior): Delete.
6121         (x86bsd_mourn_inferior, x86bsd_target): Delete.
6122         (_initialize_x86_bsd_nat): Adjust to C++ification.
6123         * x86-bsd-nat.h: Include "x86-nat.h".
6124         (x86bsd_target): Delete declaration.
6125         (x86bsd_nat_target): New class.
6126
6127         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6128         (the_aarch64_fbsd_nat_target): New.
6129         (aarch64_fbsd_fetch_inferior_registers)
6130         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6131         aarch64_fbsd_nat_target.
6132         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6133         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6134         (the_alpha_bsd_nat_target): New.
6135         (alphabsd_fetch_inferior_registers)
6136         (alphabsd_store_inferior_registers): Refactor as
6137         alpha_bsd_nat_target methods.
6138         (_initialize_alphabsd_nat): Refactor as methods of
6139         alpha_bsd_nat_target.
6140         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6141         (the_amd64_nbsd_nat_target): New.
6142         (_initialize_amd64nbsd_nat): Adjust to C++ification.
6143         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6144         (the_amd64_obsd_nat_target): New.
6145         (_initialize_amd64obsd_nat): Adjust to C++ification.
6146         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6147         (the_arm_fbsd_nat_target): New.
6148         (arm_fbsd_fetch_inferior_registers)
6149         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6150         (_initialize_arm_fbsd_nat): Refactor as methods of
6151         arm_fbsd_nat_target.
6152         (_initialize_arm_fbsd_nat): Adjust to C++ification.
6153         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6154         (the_arm_netbsd_nat_target): New.
6155         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6156         arm_netbsd_nat_target.
6157         (_initialize_arm_netbsd_nat): Adjust to C++ification.
6158         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6159         (the_hppa_nbsd_nat_target): New.
6160         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6161         hppa_nbsd_nat_target methods.
6162         (_initialize_hppanbsd_nat): Adjust to C++ification.
6163         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6164         (the_hppa_obsd_nat_target): New.
6165         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6166         methods of hppa_obsd_nat_target.
6167         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
6168         add_target.
6169         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6170         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
6171         add_target.
6172         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6173         (_initialize_i386obsd_nat): Use add_target.
6174         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6175         (the_m68k_bsd_nat_target): New.
6176         (m68kbsd_fetch_inferior_registers)
6177         (m68kbsd_store_inferior_registers): Refactor as methods of
6178         m68k_bsd_nat_target.
6179         (_initialize_m68kbsd_nat): Adjust to C++ification.
6180         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6181         (the_mips_fbsd_nat_target): New.
6182         (mips_fbsd_fetch_inferior_registers)
6183         (mips_fbsd_store_inferior_registers): Refactor as methods of
6184         mips_fbsd_nat_target.
6185         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
6186         add_target.
6187         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6188         (the_mips_nbsd_nat_target): New.
6189         (mipsnbsd_fetch_inferior_registers)
6190         (mipsnbsd_store_inferior_registers): Refactor as methods of
6191         mips_nbsd_nat_target.
6192         (_initialize_mipsnbsd_nat): Adjust to C++ification.
6193         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6194         (the_mips64_obsd_nat_target): New.
6195         (mips64obsd_fetch_inferior_registers)
6196         (mips64obsd_store_inferior_registers): Refactor as methods of
6197         mips64_obsd_nat_target.
6198         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
6199         add_target.
6200         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6201         nbsd_nat_target.
6202         * nbsd-nat.h: Include "inf-ptrace.h".
6203         (nbsd_nat_target): New class.
6204         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6205         (obsd_wait): Refactor as methods of obsd_nat_target.
6206         (obsd_add_target): Delete.
6207         * obsd-nat.h: Include "inf-ptrace.h".
6208         (obsd_nat_target): New class.
6209         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6210         (the_ppc_fbsd_nat_target): New.
6211         (ppcfbsd_fetch_inferior_registers)
6212         (ppcfbsd_store_inferior_registers): Refactor as methods of
6213         ppc_fbsd_nat_target.
6214         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
6215         add_target.
6216         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6217         (the_ppc_nbsd_nat_target): New.
6218         (ppcnbsd_fetch_inferior_registers)
6219         (ppcnbsd_store_inferior_registers): Refactor as methods of
6220         ppc_nbsd_nat_target.
6221         (_initialize_ppcnbsd_nat): Adjust to C++ification.
6222         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6223         (the_ppc_obsd_nat_target): New.
6224         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6225         methods of ppc_obsd_nat_target.
6226         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
6227         add_target.
6228         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6229         (the_sh_nbsd_nat_target): New.
6230         (shnbsd_fetch_inferior_registers)
6231         (shnbsd_store_inferior_registers): Refactor as methods of
6232         sh_nbsd_nat_target.
6233         (_initialize_shnbsd_nat): Adjust to C++ification.
6234         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6235         (inf_ptrace_xfer_partial): Delete.
6236         (sparc_xfer_partial, sparc_target): Delete.
6237         * sparc-nat.h (sparc_fetch_inferior_registers)
6238         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6239         (sparc_target): Delete function declaration.
6240         (sparc_target): New template class.
6241         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6242         (_initialize_sparcnbsd_nat): Adjust to C++ification.
6243         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6244         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
6245         add_target.
6246         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6247         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6248         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6249         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
6250         add_target.
6251         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6252         (the_vax_bsd_nat_target): New.
6253         (vaxbsd_fetch_inferior_registers)
6254         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6255         methods.
6256         (_initialize_vaxbsd_nat): Adjust to C++ification.
6257
6258         * bsd-kvm.c (bsd_kvm_target): New class.
6259         (bsd_kvm_ops): Now a bsd_kvm_target.
6260         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6261         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6262         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6263         bsd_kvm_target.
6264         (bsd_kvm_return_one): Delete.
6265         (bsd_kvm_add_target): Adjust to C++ification.
6266
6267         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6268         (nto_procfs_target_procfs): New classes.
6269         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6270         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6271         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6272         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6273         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6274         (procfs_remove_hw_breakpoint, procfs_resume)
6275         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6276         (procfs_kill_inferior, procfs_store_registers)
6277         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6278         as methods of nto_procfs_target.
6279         (nto_procfs_ops): Now an nto_procfs_target_procfs.
6280         (nto_native_ops): Delete.
6281         (procfs_open, procfs_native_open): Delete.
6282         (nto_native_ops): Now an nto_procfs_target_native.
6283         (init_procfs_targets): Adjust to C++ification.
6284         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6285         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6286         Refactor as methods of nto_procfs_target.
6287
6288         * go32-nat.c (go32_nat_target): New class.
6289         (the_go32_nat_target): New.
6290         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6291         (go32_store_registers, go32_xfer_partial, go32_files_info)
6292         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6293         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6294         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6295         (go32_pid_to_str): Refactor as methods of go32_nat_target.
6296         (go32_target): Delete.
6297         (_initialize_go32_nat): Adjust to C++ification.
6298
6299         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6300         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6301         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6302         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6303         gnu_nat_target.
6304         (gnu_target): Delete.
6305         * gnu-nat.h (gnu_target): Delete.
6306         (gnu_nat_target): New class.
6307         * i386-gnu-nat.c (gnu_base_target): New.
6308         (i386_gnu_nat_target): New class.
6309         (the_i386_gnu_nat_target): New.
6310         (_initialize_i386gnu_nat): Adjust to C++ification.
6311
6312 2018-05-02  Pedro Alves  <palves@redhat.com>
6313
6314         * bfd-target.c (target_bfd_xclose): Rename to ...
6315         (target_bfd_close): ... this.
6316         (target_bfd_reopen): Adjust.
6317         * target.c (target_close): Remove references to to_xclose.
6318         * target.h (target_ops::to_xclose): Delete.
6319         (target_ops::to_close): Update comments.
6320
6321 2018-05-02  Pedro Alves  <palves@redhat.com>
6322
6323         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6324         "linux-nat.h".
6325         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6326         * inf-ptrace.c (inf_ptrace_register_u_offset)
6327         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6328         (inf_ptrace_store_register, inf_ptrace_store_registers)
6329         (inf_ptrace_trad_target): Move to ...
6330         * linux-nat-trad.c: ... this new file.
6331         * linux-nat-trad.h: New file.
6332         * linux-nat.c (linux_target_install_ops): Make extern.
6333         (linux_trad_target): Delete.
6334         * linux-nat.h (linux_trad_target): Delete declaration.
6335         (linux_target_install_ops): Declare.
6336         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6337         "linux-nat.h".
6338
6339 2018-05-02  Pedro Alves  <palves@redhat.com>
6340
6341         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6342         procfs_target/add_target here.
6343         * procfs.c (procfs_target): Make static.
6344         (_initialize_procfs): Call add_target here.
6345         * procfs.h (struct target_ops): Remove forward declaration.
6346         (procfs_target): Remove declaration.
6347         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6348
6349 2018-05-02  Pedro Alves  <palves@redhat.com>
6350
6351         * procfs.c (procfs_stopped_by_watchpoint)
6352         (procfs_insert_watchpoint, procfs_remove_watchpoint)
6353         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6354         Forward declare.
6355         (procfs_use_watchpoints): Delete, move contents...
6356         (procfs_target): ... here.
6357         * procfs.h (procfs_use_watchpoints): Delete declaration.
6358         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6359         procfs_use_watchpoints.
6360         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6361         procfs_use_watchpoints.
6362
6363 2018-05-02  Tom Tromey  <tom@tromey.com>
6364
6365         PR python/20084:
6366         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6367         and var_zuinteger_unlimited.
6368         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6369         and PARAM_ZUINTEGER_UNLIMITED.
6370         (set_parameter_value): Handle var_zuinteger and
6371         var_zuinteger_unlimited.
6372         (add_setshow_generic): Likewise.
6373         (parmpy_init): Likewise.
6374
6375 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
6376
6377         PR rust/23124
6378         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6379         pointer is not null before dereferencing it.
6380
6381 2018-04-30  Tom Tromey  <tom@tromey.com>
6382
6383         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6384         is_mi_like_p.
6385
6386 2018-04-30  Tom Tromey  <tom@tromey.com>
6387
6388         * breakpoint.c (mention): Remove use of is_mi_like_p.
6389         (print_mention_ranged_breakpoint): Likewise.
6390         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6391         of is_mi_like_p.
6392
6393 2018-04-30  Tom Tromey  <tom@tromey.com>
6394
6395         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6396
6397 2018-04-30  Tom Tromey  <tom@tromey.com>
6398
6399         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6400         (info_spu_event_command): Remove some uses of is_mi_like_p.
6401
6402 2018-04-30  Tom Tromey  <tom@tromey.com>
6403
6404         * python/py-framefilter.c (py_print_single_arg)
6405         (enumerate_locals, py_print_args, py_print_frame): Remove some
6406         uses of is_mi_like_p.
6407
6408 2018-04-30  Tom Tromey  <tom@tromey.com>
6409
6410         * ui-out.c: Update.
6411         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6412         * ui-out.h (ui_out::is_mi_like_p): Now const.
6413         (ui_out::do_is_mi_like_p): Now const.
6414         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6415
6416 2018-04-30  Tom Tromey  <tom@tromey.com>
6417
6418         * varobj.c (varobj_set_visualizer): Use new_reference.
6419         * python/python.c (gdbpy_decode_line): Use new_reference.
6420         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6421         new_reference.
6422
6423 2018-04-30  Tom Tromey  <tom@tromey.com>
6424
6425         * varobj.c (install_new_value): Use new_reference.
6426         * value.h (value_incref): Return void.  Swap intro comment with
6427         value_decref.
6428         * value.c (set_value_parent): Use new_reference.
6429         (value_incref): Return void.  Update intro comment.
6430         (release_value): Use new_reference.
6431         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6432
6433 2018-04-30  Tom Tromey  <tom@tromey.com>
6434
6435         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6436         * gdb_bfd.h (new_bfd_ref): Remove.
6437         (gdb_bfd_open): Update comment.
6438         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6439         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6440         (gdb_bfd_fdopenr): Use new_reference.
6441         * exec.c (exec_file_attach): Use new_reference.
6442
6443 2018-04-30  Tom Tromey  <tom@tromey.com>
6444
6445         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6446         method.
6447
6448 2018-04-30  Tom Tromey  <tom@tromey.com>
6449
6450         * jit.c (jit_read_code_entry): Use type_align.
6451         * i386-tdep.c (i386_gdbarch_init): Don't call
6452         set_gdbarch_long_long_align_bit.
6453         * gdbarch.sh: Remove long_long_align_bit.
6454         * gdbarch.c, gdbarch.h: Rebuild.
6455         * arc-tdep.c (arc_type_align): New function.
6456         (arc_gdbarch_init): Use arc_type_align.  Don't call
6457         set_gdbarch_long_long_align_bit.
6458
6459 2018-04-30  Tom Tromey  <tom@tromey.com>
6460
6461         * rust-lang.c (rust_type_alignment): Remove.
6462         (rust_composite_type): Use type_align.
6463
6464 2018-04-30  Tom Tromey  <tom@tromey.com>
6465
6466         * NEWS: Mention Type.align.
6467         * python/py-type.c (typy_get_alignof): New function.
6468         (type_object_getset): Add "alignof".
6469
6470 2018-04-30  Tom Tromey  <tom@tromey.com>
6471
6472         PR exp/17095:
6473         * NEWS: Update.
6474         * std-operator.def (UNOP_ALIGNOF): New operator.
6475         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6476         New.
6477         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6478         * c-lang.c (c_op_print_tab): Add alignof.
6479         * c-exp.y (ALIGNOF): New token.
6480         (exp): Add "ALIGNOF" production.
6481         (ident_tokens): Add _Alignof and alignof.
6482
6483 2018-04-30  Tom Tromey  <tom@tromey.com>
6484
6485         * i386-tdep.c (i386_type_align): New function.
6486         (i386_gdbarch_init): Update.
6487         * gdbarch.sh (type_align): New method.
6488         * gdbarch.c, gdbarch.h: Rebuild.
6489         * arch-utils.h (default_type_align): Declare.
6490         * arch-utils.c (default_type_align): New function.
6491         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6492         (struct type) <align_log2>: New field.
6493         <instance_flags>: Now a bitfield.
6494         (TYPE_RAW_ALIGN): New macro.
6495         (type_align, type_raw_align, set_type_align): Declare.
6496         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6497         functions.
6498         * dwarf2read.c (quirk_rust_enum): Set type alignment.
6499         (get_alignment, maybe_set_alignment): New functions.
6500         (read_structure_type, read_enumeration_type, read_array_type)
6501         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6502         (read_subrange_type, read_base_type): Set type alignment.
6503
6504 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
6505
6506         * dwarf2read.c (read_index_from_section): Use bool.
6507
6508 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
6509
6510         PR gdb/22950
6511         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6512         with #ifdef.
6513
6514 2018-04-29  John Reiser  <jreiser@BitWagon.com>
6515
6516         PR build/22873
6517         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6518         last step, and do it atomically.
6519
6520 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
6521
6522         * compile/compile-c-types.c (convert_int, convert_float):
6523         Update for C FE v1.
6524
6525 2018-04-27  Tom Tromey  <tom@tromey.com>
6526
6527         PR rust/22545:
6528         * rust-lang.c (rust_inclusive_range_type_p): New function.
6529         (rust_range): Handle inclusive ranges.
6530         (rust_compute_range): Likewise.
6531         * rust-exp.y (struct rust_op) <inclusive>: New field.
6532         (DOTDOTEQ): New constant.
6533         (range_expr): Add "..=" productions.
6534         (operator_tokens): Add "..=" token.
6535         (ast_range): Add "inclusive" parameter.
6536         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6537         ranges.
6538         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6539         bounds values.
6540         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6541         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6542         Update comments.
6543         * expprint.c (print_subexp_standard): Handle new bounds values.
6544         (dump_subexp_body_standard): Likewise.
6545
6546 2018-04-27  Tom Tromey  <tom@tromey.com>
6547
6548         * configure: Rebuild.
6549         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6550         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6551         "OVERRIDE".
6552         (class symbol_needs_eval_context): Likewise.
6553         * dwarf2read.c (mock_mapped_index::symbol_name_count)
6554         (mock_mapped_index::symbol_name_at): Use "override".  Remove
6555         "virtual".
6556         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6557         "override".
6558         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6559         * aarch64-tdep.c (instruction_reader::read): Use "override".
6560         (instruction_reader_test::read): Likewise.
6561         * arm-tdep.c (instruction_reader::read): Use "override".
6562         (instruction_reader_thumb::read): Likewise.
6563
6564 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
6565
6566         PR remote/9665
6567         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6568         instead of remote_send.
6569         (remote_send): Remove.
6570
6571 2018-04-26  Pedro Alves  <palves@redhat.com>
6572
6573         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6574         find_function_start_sal instead of find_pc_line.
6575
6576 2018-04-26  Pedro Alves  <palves@redhat.com>
6577
6578         * breakpoint.c (set_breakpoint_location_function): Handle
6579         mst_data_gnu_ifunc.
6580         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6581         * elfread.c (elf_symtab_read): Give data symbols with
6582         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6583         (elf_rel_plt_read): Update comment.
6584         * linespec.c (convert_linespec_to_sals): Handle
6585         mst_data_gnu_ifunc.
6586         (minsym_found): Handle mst_data_gnu_ifunc.
6587         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6588         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6589         * parse.c (find_minsym_type_and_address): Handle
6590         mst_data_gnu_ifunc.
6591         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6592         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6593         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6594         comment.
6595         <mst_data_gnu_ifunc>: New enumerator.
6596
6597 2018-04-26  Pedro Alves  <palves@redhat.com>
6598
6599         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6600         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
6601         'want_trampoline' parameter by a lookup_msym_prefer parameter.
6602         Handle it.
6603         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6604         (lookup_minimal_symbol_by_pc): Adjust.
6605         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6606         (lookup_solib_trampoline_symbol_by_pc): Adjust.
6607         * minsyms.h (lookup_msym_prefer): New enum.
6608         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6609         parameter by a lookup_msym_prefer parameter.
6610
6611 2018-04-26  Pedro Alves  <palves@redhat.com>
6612
6613         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6614         ends in "@plt" instead of looking at the symbol's section.
6615
6616 2018-04-26  Pedro Alves  <palves@redhat.com>
6617
6618         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
6619         all references.
6620         (find_pc_partial_function_gnu_ifunc): Rename to ...
6621         (find_pc_partial_function): ... this, and remove references to
6622         'is_gnu_ifunc_p'.
6623         (find_pc_partial_function): Delete old implementation.
6624         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6625
6626 2018-04-26  Pedro Alves  <palves@redhat.com>
6627
6628         * linespec.c (struct bound_minimal_symbol_search_key): New.
6629         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
6630         skip first line if we found a GNU ifunc minimal symbol by name.
6631         (compare_msymbols): Change parameters to work with a destructured
6632         lhs minsym.
6633         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6634         functions.
6635
6636 2018-04-26  Pedro Alves  <palves@redhat.com>
6637
6638         * breakpoint.c (set_breakpoint_location_function): Don't resolve
6639         ifunc targets here.  Instead, if we have an ifunc minsym, use its
6640         address/name.
6641         (add_location_to_breakpoint): Store the minsym and the objfile in
6642         the breakpoint location.
6643         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6644         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6645         Record the minsym in the sal.
6646         * symtab.h (symtab_and_line) <msymbol>: New field.
6647
6648 2018-04-26  Pedro Alves  <palves@redhat.com>
6649
6650         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6651         unless we actually resolved the ifunc.
6652
6653 2018-04-26  Pedro Alves  <palves@redhat.com>
6654
6655         * c-exp.y (variable production): Prefer ifunc minsyms over
6656         regular function symbols.
6657         * symtab.c (find_gnu_ifunc): New function.
6658         * minsyms.h (lookup_msym_prefer): New enum.
6659         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6660         parameter by a lookup_msym_prefer parameter.
6661         * symtab.h (find_gnu_ifunc): New declaration.
6662
6663 2018-04-26  Pedro Alves  <palves@redhat.com>
6664
6665         * blockframe.c (find_gnu_ifunc_target_type): New function.
6666         (find_function_type): New.
6667         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6668         return a value with a memory address.
6669         (eval_call): For calls to GNU ifunc functions, try to find the
6670         type of the target function from the type that the resolver
6671         returns.
6672         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6673         symbols.
6674         * infcall.c (find_function_return_type): Delete.
6675         (find_function_addr): Add 'function_type' parameter.  For calls to
6676         GNU ifunc functions, try to find the type of the target function
6677         from the type that the resolver returns, and return it via
6678         FUNCTION_TYPE.
6679         (call_function_by_hand_dummy): Adjust to use the function type
6680         returned by find_function_addr.
6681         (find_function_addr): Add 'function_type' parameter and move
6682         description here.
6683         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6684         declarations.
6685
6686 2018-04-26  Pedro Alves  <palves@redhat.com>
6687
6688         * c-exp.y (variable production): Skip finding an alias for ifunc
6689         symbols.
6690
6691 2018-04-26  Pedro Alves  <palves@redhat.com>
6692
6693         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6694
6695 2018-04-25  Pedro Alves  <palves@redhat.com>
6696
6697         * infcmd.c (kill_command): Print the pid as string, not the whole
6698         thread's ptid.  Add comment.  s/has been killed/killed/ in output
6699         message.
6700         * remote.c (remote_detach_1): Print the pid as string, not the
6701         whole thread's ptid.
6702
6703 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6704             Sergio Durigan Junior  <sergiodj@redhat.com>
6705             Pedro Alves  <palves@redhat.com>
6706
6707         * infcmd.c (kill_command): Print message when inferior has
6708         been killed.
6709         * inferior.c (print_inferior_events): Remove 'static'.  Set as
6710         '1'.
6711         (add_inferior): Improve message printed when
6712         'print_inferior_events' is on.
6713         (exit_inferior): Remove message printed when
6714         'print_inferior_events' is on.
6715         (detach_inferior): Improve message printed when
6716         'print_inferior_events' is on.
6717         (initialize_inferiors): Use 'add_inferior_silent' to set
6718         'current_inferior_'.
6719         * inferior.h (print_inferior_events): Declare here as
6720         'extern'.
6721         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6722         '[Detaching...]' messages when 'print_inferior_events' is on.
6723         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
6724         as prefix/suffix for messages.  Remove periods.  Fix erroneous
6725         'Detaching after fork from child...', replace it by '... from
6726         parent...'.
6727         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6728         prefix/suffix when printing 'Detaching...' messages.  Print
6729         them when 'print_inferior_events' is on.
6730         * remote.c (remote_detach_1): Print message when detaching
6731         from inferior and '!is_fork_parent'.
6732
6733 2018-04-24  Tom Tromey  <tom@tromey.com>
6734
6735         * cli-out.h: Reindent.
6736
6737 2018-04-24  Tom Tromey  <tom@tromey.com>
6738
6739         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6740         (cli_ui_out::do_field_string): Use fputs_filtered.
6741         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6742
6743 2018-04-23  Tom Tromey  <tom@tromey.com>
6744
6745         * guile/scm-frame.c (gdbscm_frame_read_var): Use
6746         gdb::unique_xmalloc_ptr.
6747
6748 2018-04-23  Tom Tromey  <tom@tromey.com>
6749
6750         * configure: Rebuild.
6751
6752 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
6753
6754         PR gdb/23095
6755         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6756         prepare_for_testing.  Set normal_bp to r_debug_state if target
6757         is bsd.
6758
6759 2018-04-21  Pedro Alves  <palves@redhat.com>
6760             Rajendra SY  <rajendra.sy@gmail.com>
6761
6762         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6763         * remote.c (extended_remote_attach): In all-stop mode, mark the
6764         thread as executing.
6765
6766 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6767
6768         * thread.c (thread_apply_all_command): Fix comment.
6769         (thread_command): Fix comment.
6770
6771 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
6772
6773         * common/tdesc.h (tdesc_create_feature): Remove xml filename
6774         parameter.
6775         * features/aarch64-core.c (create_feature_aarch64_core):
6776         Regenerate.
6777         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6778         Likewise.
6779         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6780         Likewise.
6781         * features/i386/32bit-avx512.c
6782         (create_feature_i386_32bit_avx512): Likewise.
6783         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6784         Likewise.
6785         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6786         Likewise.
6787         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6788         Likewise.
6789         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6790         Likewise.
6791         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6792         Likewise.
6793         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6794         Likewise.
6795         * features/i386/64bit-avx512.c
6796         (create_feature_i386_64bit_avx512): Likewise.
6797         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6798         Likewise.
6799         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6800         Likewise.
6801         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6802         Likewise.
6803         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6804         Likewise.
6805         * features/i386/64bit-segments.c
6806         (create_feature_i386_64bit_segments): Likewise.
6807         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6808         Likewise.
6809         * features/i386/x32-core.c
6810         (create_feature_i386_x32_core): Likewise.
6811         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6812         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6813         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6814         * target-descriptions.c: In generated code, don't pass xml
6815         filename.
6816
6817 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6818
6819         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6820         (print_xml_feature::visit_post): Likewise.
6821         (print_xml_feature::visit): Likewise.
6822         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6823         (print_xml_feature): Add new class.
6824         * regformats/regdat.sh: Null xmltarget on feature targets.
6825         * target-descriptions.c (struct target_desc): Add xmltarget.
6826         (maintenance_check_tdesc_xml_convert): Add unittest function.
6827         (tdesc_get_features_xml): Add function to get xml.
6828         (maintenance_check_xml_descriptions): Test xml generation.
6829         * xml-tdesc.c (string_read_description_xml): Add function.
6830         * xml-tdesc.h (string_read_description_xml): Add declaration.
6831
6832 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6833
6834         * features/Makefile: Add feature marker to targets with new style
6835         target descriptions.
6836         * regformats/aarch64.dat: Regenerate.
6837         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6838         * regformats/i386/amd64-avx-linux.dat: Likewise.
6839         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6840         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6841         * regformats/i386/amd64-linux.dat: Likewise.
6842         * regformats/i386/amd64-mpx-linux.dat: Likewise.
6843         * regformats/i386/amd64.dat: Likewise.
6844         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6845         * regformats/i386/i386-avx-linux.dat: Likewise.
6846         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6847         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6848         * regformats/i386/i386-linux.dat: Likewise.
6849         * regformats/i386/i386-mmx-linux.dat: Likewise.
6850         * regformats/i386/i386-mpx-linux.dat: Likewise.
6851         * regformats/i386/i386.dat: Likewise.
6852         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6853         * regformats/i386/x32-avx-linux.dat: Likewise.
6854         * regformats/i386/x32-linux.dat: Likewise.
6855         * regformats/tic6x-c62x-linux.dat: Likewise.
6856         * regformats/tic6x-c64x-linux.dat: Likewise.
6857         * regformats/tic6x-c64xp-linux.dat: Likewise.
6858         * regformats/regdat.sh: Parse feature marker.
6859
6860 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6861
6862         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6863         (tdesc_osabi_name): Likewise.
6864         * target-descriptions.c (tdesc_architecture_name): Add new
6865         function.
6866         (tdesc_osabi_name): Likewise.
6867
6868 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6869
6870         * common/tdesc.c (tdesc_predefined_type): Move to here.
6871         (tdesc_named_type): Likewise.
6872         (tdesc_create_vector): Likewise.
6873         (tdesc_create_struct): Likewise.
6874         (tdesc_set_struct_size): Likewise.
6875         (tdesc_create_union): Likewise.
6876         (tdesc_create_flags): Likewise.
6877         (tdesc_create_enum): Likewise.
6878         (tdesc_add_field): Likewise.
6879         (tdesc_add_typed_bitfield): Likewise.
6880         (tdesc_add_bitfield): Likewise.
6881         (tdesc_add_flag): Likewise.
6882         (tdesc_add_enum_value): Likewise.
6883         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6884         (struct tdesc_type_vector): Likewise.
6885         (struct tdesc_type_field): Likewise.
6886         (struct tdesc_type_with_fields): Likewise.
6887         (tdesc_create_enum): Add declaration.
6888         (tdesc_add_typed_bitfield): Likewise.
6889         (tdesc_add_enum_value): Likewise.
6890         * target-descriptions.c (tdesc_type_field): Move from here.
6891         (tdesc_type_builtin): Likewise.
6892         (tdesc_type_vector): Likewise.
6893         (tdesc_type_with_fields): Likewise.
6894         (tdesc_predefined_types): Likewise.
6895         (tdesc_named_type): Likewise.
6896         (tdesc_create_vector): Likewise.
6897         (tdesc_create_struct): Likewise.
6898         (tdesc_set_struct_size): Likewise.
6899         (tdesc_create_union): Likewise.
6900         (tdesc_create_flags): Likewise.
6901         (tdesc_create_enum): Likewise.
6902         (tdesc_add_field): Likewise.
6903         (tdesc_add_typed_bitfield): Likewise.
6904         (tdesc_add_bitfield): Likewise.
6905         (tdesc_add_flag): Likewise.
6906         (tdesc_add_enum_value): Likewise.
6907         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6908         (tdesc_add_typed_bitfield): Likewise.
6909         (tdesc_add_enum_value): Likewise.
6910
6911 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6912
6913         * common/tdesc.c (tdesc_feature::accept): Move to here.
6914         (tdesc_feature::operator==): Likewise.
6915         (tdesc_create_reg): Likewise.
6916         * common/tdesc.h (tdesc_type_kind): Likewise.
6917         (struct tdesc_type): Likewise.
6918         (struct tdesc_feature): Likewise.
6919         * regformats/regdat.sh: Create a feature.
6920         * target-descriptions.c (tdesc_type_kind): Move from here.
6921         (tdesc_type): Likewise.
6922         (tdesc_type_up): Likewise.
6923         (tdesc_feature): Likewise.
6924         (tdesc_create_reg): Likewise.
6925
6926 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6927
6928         * Makefile.in: Add arch/tdesc.c
6929         * common/tdesc.c: New file.
6930         * common/tdesc.h (tdesc_element_visitor): Move to here.
6931         (tdesc_element): Likewise.
6932         (tdesc_reg): Likewise.
6933         (tdesc_reg_up): Likewise.
6934         * regformats/regdef.h (reg): Add offset to constructors.
6935         * target-descriptions.c (tdesc_element_visitor): Move from here.
6936         (tdesc_element): Likewise.
6937         (tdesc_reg): Likewise.
6938         (tdesc_reg_up): Likewise.
6939
6940 2018-04-17  Tom Tromey  <tom@tromey.com>
6941
6942         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6943         discriminant field.
6944
6945 2018-04-17  Tom Tromey  <tom@tromey.com>
6946
6947         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6948
6949 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6950
6951         * symtab.c (print_symbol_info): Skip printing filename and line
6952         number when `last' is NULL.
6953         (symtab_symbol_info): Use empty string instead of NULL for first
6954         invocation of print_symbol_info.
6955         (rbreak_command): Pass NULL to `last' parameter of
6956         print_symbol_info.
6957
6958 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
6959
6960         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6961         instead of nullptr.
6962
6963 2018-04-16  Pedro Alves  <palves@redhat.com>
6964
6965         * MAINTAINERS (sh): Remove.
6966         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6967         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6968         (ALLDEPFILES): Remove sh64-tdep.c.
6969         * NEWS: Mentions that support for SH-5/SH64 is removed.
6970         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6971         (sh*-*-openbsd*): Ditto.
6972         (sh64-*-elf*): Remove.
6973         (sh*): Remove.
6974         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6975         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6976         * sh-tdep.c: No longer include "sh64-tdep.h".
6977         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6978         * sh64-tdep.c, sh64-tdep.h: Remove files.
6979
6980 2018-04-16  Pedro Alves  <palves@redhat.com>
6981
6982         * MAINTAINERS: Remove m88k.
6983         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6984         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6985         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6986         * NEWS: Mention that support for m88k was removed.
6987         * configure.host (m88*-*-*): Remove support.
6988         * configure.nat (m88k-*-*): Remove support.
6989         * configure.tgt (m88*-*-openbsd*): Remove.
6990         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6991
6992 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
6993
6994         * configure.tgt (x86_tobjs): New variable.
6995         (amd64_tobjs, i386_tobjs): Use it.
6996
6997 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6998
6999         * symtab.c (print_symbol_info): Precede the symbol definition by
7000         the line number when available.
7001         * NEWS: Advertise this enhancement.
7002
7003 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7004
7005         * NEWS (New options): announce set/show record btrace cpu.
7006         * btrace.c: Include record-btrace.h.
7007         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7008         the vendor is unknown.
7009         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
7010         Maybe overwrite the btrace configuration's cpu.
7011         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
7012         (btrace_fetch): Add cpu parameter.  Update callers.
7013         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7014         Maybe overwrite the btrace configuration's cpu.  Skip enabling
7015         errata workarounds if the vendor is unknown.
7016         * python/py-record-btrace.c: Include record-btrace.h.
7017         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7018         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7019         * record-btrace.c (record_btrace_cpu_state_kind): New.
7020         (record_btrace_cpu): New.
7021         (set_record_btrace_cpu_cmdlist): New.
7022         (record_btrace_get_cpu): New.
7023         (require_btrace_thread, record_btrace_info)
7024         (record_btrace_resume_thread): Call record_btrace_get_cpu.
7025         (cmd_set_record_btrace_cpu_none): New.
7026         (cmd_set_record_btrace_cpu_auto): New.
7027         (cmd_set_record_btrace_cpu): New.
7028         (cmd_show_record_btrace_cpu): New.
7029         (_initialize_record_btrace): Initialize set/show record btrace cpu
7030         commands.
7031         * record-btrace.h (record_btrace_get_cpu): New.
7032
7033 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7034
7035         * record.c (set_record_command): Fix typo in message.
7036
7037 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7038
7039         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7040
7041 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7042
7043         * infrun.c (process_event_stop_test): Call
7044         gdbarch_in_indirect_branch_thunk.
7045         * gdbarch.sh (in_indirect_branch_thunk): New.
7046         * gdbarch.c: Regenerated.
7047         * gdbarch.h: Regenerated.
7048         * x86-tdep.h: New.
7049         * x86-tdep.c: New.
7050         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7051         (HFILES_NO_SRCDIR): Add x86-tdep.h.
7052         (ALLDEPFILES): Add x86-tdep.c.
7053         * arch-utils.h (default_in_indirect_branch_thunk): New.
7054         * arch-utils.c (default_in_indirect_branch_thunk): New.
7055         * i386-tdep: Include x86-tdep.h.
7056         (i386_in_indirect_branch_thunk): New.
7057         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7058         function.
7059         * amd64-tdep: Include x86-tdep.h.
7060         (amd64_in_indirect_branch_thunk): New.
7061         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7062
7063 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7064
7065         PR gdb/23053
7066         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7067         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7068         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7069         regression.
7070
7071 2018-04-12  Tom Tromey  <tom@tromey.com>
7072
7073         * rust-lang.c (rust_print_struct_def): Remove univariant code.
7074         (rust_evaluate_subexp): Likewise.
7075
7076 2018-04-12  Pedro Alves  <palves@redhat.com>
7077
7078         * procfs.c (procfs_detach): Make forward declaration's prototype
7079         match definition's protototype.
7080         (proc_get_LDT_entry): Remove stale do_cleanups call.
7081
7082 2018-04-12  Pedro Alves  <palves@redhat.com>
7083
7084         * target.h (target_ops::to_has_exited): Delete.
7085         (target_has_exited): Delete.
7086         * target-delegates.c: Regenerate.
7087
7088 2018-04-11  Pedro Alves  <palves@redhat.com>
7089
7090         * target.c (fileio_fh_t::t): Add comment.
7091         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7092         (target_fileio_close): Handle a NULL target.
7093         (invalidate_fileio_fh): New.
7094         (target_close): Call it.
7095         * remote.c (remote_hostio_send_command): No longer check whether
7096         remote_desc is open.
7097
7098 2018-04-11  Pedro Alves  <palves@redhat.com>
7099
7100         * target.c (fileio_fh_t): Make it a named struct instead of a
7101         typedef.
7102         (fileio_fh_t::is_closed): New method.
7103         (DEF_VEC_O (fileio_fh_t)): Remove.
7104         (fileio_fhandles): Now a std::vector.
7105         (is_closed_fileio_fh): Delete.
7106         (acquire_fileio_fd): Adjust.  Rename parameters.
7107         (release_fileio_fd): Adjust.
7108         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7109         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7110         (target_fileio_close): Adjust.
7111
7112 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
7113
7114         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7115         index.
7116
7117 2018-04-10  Pedro Alves  <palves@redhat.com>
7118
7119         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7120         (scoped_finish_thread_state): New class.
7121         * infcmd.c (run_command_1): Use it instead of finish_thread_state
7122         cleanup.
7123         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7124         (fetch_inferior_event, normal_stop): Likewise.
7125         * thread.c (finish_thread_state_cleanup): Delete.
7126
7127 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7128             Pedro Alves  <palves@redhat.com>
7129
7130         * value.c: Include "selftest.h" and "common/array-view.h".
7131         (struct range) <operator ==>: New.
7132         (test_ranges_contain): New.
7133         (check_ranges_vector): New.
7134         (test_insert_into_bit_range_vector): New.
7135         (_initialize_values): Register selftests.
7136         * common/array-view.h (operator==, operator!=): New.
7137
7138 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7139
7140         * common/gdb_vecs.h (unordered_remove): Add overload that takes
7141         an iterator.
7142         * inline-frame.c: Include <algorithm>.
7143         (struct inline_state): Add constructor.
7144         (inline_state_s): Remove.
7145         (DEF_VEC_O(inline_state_s)): Remove.
7146         (inline_states): Change type to std::vector.
7147         (find_inline_frame_state): Adjust to std::vector.
7148         (allocate_inline_frame_state): Remove.
7149         (clear_inline_frame_state): Adjust to std::vector.
7150         (skip_inline_frames): Adjust to std::vector.
7151
7152 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7153
7154         * tracepoint.h (struct trace_state_variable): Add constructor.
7155         <name>: Change type to std::string.
7156         * tracepoint.c (tsv_s): Remove.
7157         (DEF_VEC_O(tsv_s)): Remove.
7158         (tvariables): Change to std::vector.
7159         (create_trace_state_variable): Adjust to std::vector.
7160         (find_trace_state_variable): Likewise.
7161         (find_trace_state_variable_by_number): Likewise.
7162         (delete_trace_state_variable): Likewise.
7163         (trace_variable_command): Adjust to std::string.
7164         (delete_trace_variable_command): Likewise.
7165         (tvariables_info_1): Adjust to std::vector.
7166         (save_trace_state_variables): Likewise.
7167         (start_tracing): Likewise.
7168         (merge_uploaded_trace_state_variables): Adjust to std::vector
7169         and std::string.
7170         * target.h (struct target_ops)
7171         <to_download_trace_state_variable>: Pass reference to
7172         trace_state_variable.
7173         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7174         * target-delegates.c: Re-generate.
7175         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7176         (mi_tsv_deleted): Likewise.
7177         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7178         * remote.c (remote_download_trace_state_variable): Change
7179         pointer to reference and adjust.
7180         * make-target-delegates (parse_argtypes): Handle references.
7181         (write_function_header): Likewise.
7182         (munge_type): Likewise.
7183
7184 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7185
7186         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7187         string_view-selftests.c.
7188         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7189         testsuite.
7190         * unittests/basic_string_view/cons/char/1.cc: Likewise.
7191         * unittests/basic_string_view/cons/char/2.cc: Likewise.
7192         * unittests/basic_string_view/cons/char/3.cc: Likewise.
7193         * unittests/basic_string_view/element_access/char/1.cc:
7194         Likewise.
7195         * unittests/basic_string_view/element_access/char/empty.cc:
7196         Likewise.
7197         * unittests/basic_string_view/element_access/char/front_back.cc:
7198         Likewise.
7199         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7200         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7201         Likewise.
7202         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7203         Likewise.
7204         * unittests/basic_string_view/modifiers/swap/char/1.cc:
7205         Likewise.
7206         * unittests/basic_string_view/operations/compare/char/1.cc:
7207         Likewise.
7208         * unittests/basic_string_view/operations/compare/char/13650.cc:
7209         Likewise.
7210         * unittests/basic_string_view/operations/copy/char/1.cc:
7211         Likewise.
7212         * unittests/basic_string_view/operations/data/char/1.cc:
7213         Likewise.
7214         * unittests/basic_string_view/operations/find/char/1.cc:
7215         Likewise.
7216         * unittests/basic_string_view/operations/find/char/2.cc:
7217         Likewise.
7218         * unittests/basic_string_view/operations/find/char/3.cc:
7219         Likewise.
7220         * unittests/basic_string_view/operations/find/char/4.cc:
7221         Likewise.
7222         * unittests/basic_string_view/operations/rfind/char/1.cc:
7223         Likewise.
7224         * unittests/basic_string_view/operations/rfind/char/2.cc:
7225         Likewise.
7226         * unittests/basic_string_view/operations/rfind/char/3.cc:
7227         Likewise.
7228         * unittests/basic_string_view/operations/substr/char/1.cc:
7229         Likewise.
7230         * unittests/basic_string_view/operators/char/2.cc: Likewise.
7231         * unittests/string_view-selftests.c: New file.
7232
7233 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7234
7235         * unittests/basic_string_view/capacity/1.cc: New file.
7236         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7237         * unittests/basic_string_view/cons/char/1.cc: New file.
7238         * unittests/basic_string_view/cons/char/2.cc: New file.
7239         * unittests/basic_string_view/cons/char/3.cc: New file.
7240         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7241         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7242         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7243         * unittests/basic_string_view/element_access/char/1.cc: New file.
7244         * unittests/basic_string_view/element_access/char/2.cc: New file.
7245         * unittests/basic_string_view/element_access/char/empty.cc: New file.
7246         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7247         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7248         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7249         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7250         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7251         * unittests/basic_string_view/include.cc: New file.
7252         * unittests/basic_string_view/inserters/char/1.cc: New file.
7253         * unittests/basic_string_view/inserters/char/2.cc: New file.
7254         * unittests/basic_string_view/inserters/char/3.cc: New file.
7255         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7256         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7257         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7258         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7259         * unittests/basic_string_view/literals/types.cc: New file.
7260         * unittests/basic_string_view/literals/values.cc: New file.
7261         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7262         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7263         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7264         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7265         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7266         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7267         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7268         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7269         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7270         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7271         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7272         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7273         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7274         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7275         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7276         * unittests/basic_string_view/operations/data/char/1.cc: New file.
7277         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7278         * unittests/basic_string_view/operations/find/char/1.cc: New file.
7279         * unittests/basic_string_view/operations/find/char/2.cc: New file.
7280         * unittests/basic_string_view/operations/find/char/3.cc: New file.
7281         * unittests/basic_string_view/operations/find/char/4.cc: New file.
7282         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7283         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7284         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7285         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7286         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7287         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7288         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7289         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7290         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7291         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7292         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7293         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7294         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7295         * unittests/basic_string_view/operators/char/2.cc: New file.
7296         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7297         * unittests/basic_string_view/range_access/char/1.cc: New file.
7298         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7299         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7300         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7301         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7302         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7303         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7304         * unittests/basic_string_view/requirements/typedefs.cc: New file.
7305         * unittests/basic_string_view/typedefs.cc: New file.
7306         * unittests/basic_string_view/types/1.cc: New file.
7307
7308 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7309
7310         * common/gdb_string_view.h: Remove libstdc++ implementation
7311         details, adjust to gdb reality.
7312         * common/gdb_string_view.tcc: Likewise.
7313         * cli/cli-script.c (struct string_view): Remove.
7314         (user_args) <m_args>: Change element type to gdb::string_view.
7315         (user_args::insert_args): Adjust.
7316
7317 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7318
7319         * common/gdb_string_view.h: New file.
7320         * common/gdb_string_view.tcc: New file.
7321
7322 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7323
7324         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7325         * configure: Re-generate.
7326
7327 2018-04-09  Pedro Alves  <palves@redhat.com>
7328
7329         * gdbarch.sh: Include "observable.h" instead of "observer.h".
7330         (set_target_gdbarch): Call
7331         gdb::observers::architecture_changed.notify instead of
7332         observer_notify_architecture_changed.
7333
7334 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7335
7336         * tracepoint.c (struct current_traceframe_cleanup): Remove.
7337         (do_restore_current_traceframe_cleanup): Remove.
7338         (restore_current_traceframe_cleanup_dtor): Remove.
7339         (make_cleanup_restore_current_traceframe): Remove.
7340         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7341         New.
7342         * tracepoint.h (struct scoped_restore_current_traceframe): New.
7343         * infrun.c (fetch_inferior_event): Use
7344         scoped_restore_current_traceframe.
7345
7346 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7347
7348         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7349         Remove.
7350         <n_allocated_type_units>: Remove.
7351         <all_type_units>: Change to std::vector.
7352         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7353         to std::vector change.
7354         (dwarf2_per_objfile::get_cutu): Likewise.
7355         (dwarf2_per_objfile::get_tu): Likewise.
7356         (create_signatured_type_table_from_index): Likewise.
7357         (create_signatured_type_table_from_debug_names): Likewise.
7358         (dw2_symtab_iter_next): Likewise.
7359         (dw2_print_stats): Likewise.
7360         (dw2_expand_all_symtabs): Likewise.
7361         (dw2_expand_marked_cus): Likewise.
7362         (dw2_debug_names_iterator::next): Likewise.
7363         (dwarf2_initialize_objfile): Likewise.
7364         (add_signatured_type_cu_to_table): Likewise.
7365         (create_all_type_units): Likewise.
7366         (add_type_unit): Likewise.
7367         (struct tu_abbrev_offset): Add constructor.
7368         (build_type_psymtabs_1): Adjust to std::vector change.
7369         (print_tu_stats): Likewise.
7370         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7371         (write_debug_names): Likewise.
7372
7373 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7374
7375         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7376         Make an std::vector.
7377         <n_comp_units>: Remove.
7378         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7379         to std::vector change.
7380         (dwarf2_per_objfile::get_cutu): Likewise.
7381         (dwarf2_per_objfile::get_cu): Likewise.
7382         (create_cus_from_index): Likewise.
7383         (create_addrmap_from_index): Likewise.
7384         (create_addrmap_from_aranges): Likewise.
7385         (dwarf2_read_index): Likewise.
7386         (dw2_find_last_source_symtab): Likewise.
7387         (dw2_map_symtabs_matching_filename): Likewise.
7388         (dw2_symtab_iter_next): Likewise.
7389         (dw2_print_stats): Likewise.
7390         (dw2_expand_all_symtabs): Likewise.
7391         (dw2_expand_symtabs_with_fullname): Likewise.
7392         (dw2_expand_marked_cus): Likewise.
7393         (dw2_map_symbol_filenames): Likewise.
7394         (create_cus_from_debug_names): Likewise.
7395         (dwarf2_read_debug_names): Likewise.
7396         (dw2_debug_names_iterator::next): Likewise.
7397         (dwarf2_initialize_objfile): Likewise.
7398         (set_partial_user): Likewise.
7399         (dwarf2_build_psymtabs_hard): Likewise.
7400         (read_comp_units_from_section): Remove arguments, adjust to
7401         std::vector change.
7402         (create_all_comp_units): Adjust to std::vector and
7403         read_comp_units_from_section changes.
7404         (dwarf2_find_containing_comp_unit): Adjust to std::vector
7405         change.
7406         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7407         (psyms_seen_size): Likewise.
7408         (write_gdbindex): Likewise.
7409         (write_debug_names): Likewise.
7410
7411 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7412
7413         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7414         with dwarf2_per_objfile.
7415         (create_cus_from_index): Likewise.
7416         (create_signatured_type_table_from_index): Likewise.
7417         (dwarf2_read_index): Likewise.
7418         (dwarf2_initialize_objfile): Likewise.
7419         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
7420         per_cu rather than get_dwarf2_per_objfile.
7421
7422 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7423
7424         * dwarf2read.h (struct signatured_type): Forward declare.
7425         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7426         New methods.
7427         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7428         (dw2_get_cutu): ...this.
7429         (dwarf2_per_objfile::get_cu): Rename from...
7430         (dw2_get_cu): ...this.
7431         (dwarf2_per_objfile::get_tu): New.
7432         (create_addrmap_from_index): Adjust.
7433         (create_addrmap_from_aranges): Adjust.
7434         (dw2_find_last_source_symtab): Adjust.
7435         (dw2_map_symtabs_matching_filename): Adjust.
7436         (dw2_symtab_iter_next): Adjust.
7437         (dw2_print_stats): Adjust.
7438         (dw2_expand_all_symtabs): Adjust.
7439         (dw2_expand_symtabs_with_fullname): Adjust.
7440         (dw2_expand_marked_cus): Adjust.
7441         (dw_expand_symtabs_matching_file_matcher): Adjust.
7442         (dw2_map_symbol_filenames): Adjust.
7443         (dw2_debug_names_iterator::next): Adjust.
7444         (dwarf2_initialize_objfile): Adjust.
7445         (set_partial_user): Adjust.
7446         (dwarf2_build_psymtabs_hard): Adjust.
7447
7448 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7449
7450         * dwarf2read.c (create_signatured_type_table_from_debug_names):
7451         Remove unused variables.
7452         (dw2_map_symtabs_matching_filename): Likewise.
7453         (dwarf2_record_block_ranges): Likewise.
7454         (dwarf2_read_addr_index): Likewise.
7455         (follow_die_offset): Likewise.
7456
7457 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7458
7459         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7460         to symbol_file_add_main.
7461
7462 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7463
7464         PR mi/22299
7465         * mi/mi-console.c (do_fputc_async_safe): New.
7466         (mi_console_file::write_async_safe): New.
7467         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7468         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7469         New.
7470         * ui-file.c (ui_file::putstrn): Adjust call to
7471         fputstrn_unfiltered.
7472         * utils.c (printchar): Replace do_fputs and do_fprintf
7473         parameters by do_fputc.
7474         (fputstr_filtered): Adjust call to printchar.
7475         (fputstr_unfiltered): Likewise.
7476         (fputstrn_filtered): Likewise.
7477         (fputstrn_unfiltered): Add do_fputc parameter, pass to
7478         printchar.
7479         * utils.h (do_fputc_ftype): New typedef.
7480         (fputstrn_unfiltered): Add do_fputc parameter.
7481
7482 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7483
7484         * regformats/i386/i386-avx.dat: Remove.
7485
7486 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7487
7488         PR gdb/22979
7489         * amd64-tdep.c (amd64_none_init_abi): New function.
7490         (amd64_x32_none_init_abi): New function.
7491         (_initialize_amd64_tdep): Register handlers for x86-64 and
7492         x64_32 with GDB_OSABI_NONE.
7493         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7494         GDB_OSABI_NONE osabi.
7495
7496 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7497
7498         PR gdb/22980
7499         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7500         GDB_OSABI_NONE.
7501         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7502         * osabi.c (gdb_osabi_names): Add "unknown" entry.
7503
7504 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7505
7506         * common/byte-vector.h (char_vector): New type.
7507         * target.h (target_read_alloc): Return
7508         gdb::optional<byte_vector>.
7509         (target_read_stralloc): Return gdb::optional<char_vector>.
7510         (target_get_osdata): Return gdb::optional<char_vector>.
7511         * target.c (target_read_alloc_1): Templatize.  Replacement
7512         manual memory management with vector.
7513         (target_read_alloc): Change return type, adjust.
7514         (target_read_stralloc): Change return type, adjust.
7515         (target_get_osdata): Change return type, adjust.
7516         * auxv.c (struct auxv_info) <length>: Remove.
7517         <data>: Change type to gdb::optional<byte_vector>.
7518         (auxv_inferior_data_cleanup): Free auxv_info with delete.
7519         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7520         (target_auxv_search): Adjust.
7521         (fprint_target_auxv): Adjust.
7522         * avr-tdep.c (avr_io_reg_read_command): Adjust.
7523         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7524         (linux_make_corefile_notes): Adjust.
7525         * osdata.c (get_osdata): Adjust.
7526         * remote.c (remote_get_threads_with_qxfer): Adjust.
7527         (remote_memory_map): Adjust.
7528         (remote_traceframe_info): Adjust.
7529         (btrace_read_config): Adjust.
7530         (remote_read_btrace): Adjust.
7531         (remote_pid_to_exec_file): Adjust.
7532         * solib-aix.c (solib_aix_get_library_list): Adjust.
7533         * solib-dsbt.c (decode_loadmap): Don't free buf.
7534         (dsbt_get_initial_loadmaps): Adjust.
7535         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7536         * solib-target.c (solib_target_current_sos): Adjust.
7537         * tracepoint.c (sdata_make_value): Adjust.
7538         * xml-support.c (xinclude_start_include): Adjust.
7539         (xml_fetch_content_from_file): Adjust.
7540         * xml-support.h (xml_fetch_another): Change return type.
7541         (xml_fetch_content_from_file): Change return type.
7542         * xml-syscall.c (xml_init_syscalls_info): Adjust.
7543         * xml-tdesc.c (file_read_description_xml): Adjust.
7544         (fetch_available_features_from_target): Change return type.
7545         (target_fetch_description_xml): Adjust.
7546         (target_read_description_xml): Adjust.
7547
7548 2018-04-06  Tom Tromey  <tom@tromey.com>
7549
7550         * value.c (~value): Update.
7551         (struct value) <contents>: Now unique_xmalloc_ptr.
7552         (value_contents_bits_eq, allocate_value_contents)
7553         (value_contents_raw, value_contents_all_raw)
7554         (value_contents_for_printing, value_contents_for_printing_const)
7555         (set_value_enclosing_type): Update.
7556
7557 2018-04-06  Tom Tromey  <tom@tromey.com>
7558
7559         * value.c (range_s): Remove typedef, VEC.
7560         (struct range): Add operator<.
7561         (range_lessthan): Remove.
7562         (ranges_contain): Change type.
7563         (~value): Update.
7564         (struct value) <unavailable, optimized_out>: Now std::vector.
7565         (value_entirely_available)
7566         (value_entirely_covered_by_range_vector)
7567         (value_entirely_unavailable, value_entirely_optimized_out):
7568         Update.
7569         (insert_into_bit_range_vector): Change argument type.
7570         (find_first_range_overlap): Likewise.
7571         (struct ranges_and_idx, value_contents_bits_eq)
7572         (require_not_optimized_out, require_available): Update.
7573         (ranges_copy_adjusted): Change argument types.
7574         (value_optimized_out, value_copy, value_fetch_lazy): Update.
7575
7576 2018-04-06  Tom Tromey  <tom@tromey.com>
7577
7578         * value.c (~value): Update.
7579         (struct value) <parent>: Now a value_ref_ptr.
7580         (value_parent, set_value_parent, value_address, value_copy):
7581         Update.
7582
7583 2018-04-06  Tom Tromey  <tom@tromey.com>
7584
7585         * value.c (struct value): Add constructor, destructor, and member
7586         initializers.
7587         (allocate_value_lazy, value_decref): Update.
7588
7589 2018-04-06  Tom Tromey  <tom@tromey.com>
7590
7591         * value.c (struct value) <released, next>: Remove.
7592         (all_values): Now a std::vector.
7593         (allocate_value_lazy): Update.
7594         (value_next): Remove.
7595         (value_mark, value_free_to_mark, release_value)
7596         (value_release_to_mark): Update.
7597
7598 2018-04-06  Tom Tromey  <tom@tromey.com>
7599
7600         * value.h (fetch_subexp_value, value_release_to_mark): Update.
7601         (free_value_chain): Remove.
7602         * value.c (free_value_chain): Remove.
7603         (value_release_to_mark): Return a std::vector.
7604         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7605         std::vector.
7606         (check_condition): Update.
7607         * eval.c (fetch_subexp_value): Change "val_chain" to a
7608         std::vector.
7609         * breakpoint.c (update_watchpoint): Update.
7610         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7611
7612 2018-04-06  Tom Tromey  <tom@tromey.com>
7613
7614         * value.h (free_all_values): Remove.
7615         * value.c (free_all_values): Remove.
7616
7617 2018-04-06  Tom Tromey  <tom@tromey.com>
7618
7619         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7620         (value_history_chain, value_history_count): Remove.
7621         (value_history): New global.
7622         (record_latest_value, access_value_history, show_values)
7623         (preserve_values): Update.
7624
7625 2018-04-06  Tom Tromey  <tom@tromey.com>
7626
7627         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7628         * varobj.c (varobj_set_display_format, varobj_set_value)
7629         (install_default_visualizer, construct_visualizer)
7630         (install_new_value, ~varobj, varobj_get_value_type)
7631         (my_value_of_variable, varobj_editable_p): Update.
7632         * c-varobj.c (c_describe_child, c_value_of_variable)
7633         (cplus_number_of_children, cplus_describe_child): Update.
7634         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7635         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7636         (ada_value_of_variable, ada_value_is_changeable_p): Update.
7637
7638 2018-04-06  Tom Tromey  <tom@tromey.com>
7639
7640         * printcmd.c (last_examine_address): Change type to
7641         value_ref_ptr.
7642         (do_examine, x_command): Update.
7643
7644 2018-04-06  Tom Tromey  <tom@tromey.com>
7645
7646         * value.c (release_value): Update.
7647         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7648         (struct bpstats) <val>: Now a value_ref_ptr.
7649         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7650         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7651         (~watchpoint, print_it_watchpoint, watch_command_1)
7652         (invalidate_bp_value_on_memory_change): Update.
7653
7654 2018-04-06  Tom Tromey  <tom@tromey.com>
7655
7656         * varobj.c (varobj_clear_saved_item)
7657         (update_dynamic_varobj_children, install_new_value, ~varobj):
7658         Update.
7659         * value.h (value_incref): Move declaration earlier.
7660         (value_decref): Rename from value_free.
7661         (struct value_ref_policy): New.
7662         (value_ref_ptr): New typedef.
7663         (struct value_deleter): Remove.
7664         (gdb_value_up): Remove typedef.
7665         (release_value): Change return type.
7666         (release_value_or_incref): Remove.
7667         * value.c (set_value_parent): Update.
7668         (value_incref): Change return type.
7669         (value_decref): Rename from value_free.
7670         (value_free_to_mark, free_all_values, free_value_chain): Update.
7671         (release_value): Return value_ref_ptr.
7672         (release_value_or_incref): Remove.
7673         (record_latest_value, set_internalvar, clear_internalvar):
7674         Update.
7675         * stack.c (info_frame_command): Don't call value_free.
7676         * python/py-value.c (valpy_dealloc, valpy_new)
7677         (value_to_value_object): Update.
7678         * printcmd.c (do_examine): Update.
7679         * opencl-lang.c (lval_func_free_closure): Update.
7680         * mi/mi-main.c (register_changed_p): Don't call value_free.
7681         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7682         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7683         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7684         value_free.
7685         * guile/scm-value.c (vlscm_free_value_smob)
7686         (vlscm_scm_from_value): Update.
7687         * frame.c (frame_register_unwind, frame_unwind_register_signed)
7688         (frame_unwind_register_unsigned, get_frame_register_bytes)
7689         (put_frame_register_bytes): Don't call value_free.
7690         * findvar.c (address_from_register): Don't call value_free.
7691         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7692         * dwarf2loc.c (entry_data_value_free_closure)
7693         (value_of_dwarf_reg_entry, free_pieced_value_closure)
7694         (dwarf2_evaluate_loc_desc_full): Update.
7695         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7696         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7697         (~watchpoint, watch_command_1)
7698         (invalidate_bp_value_on_memory_change): Update.
7699         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7700
7701 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
7702
7703         PR gdb/23022
7704         * warning.m4: Add -Wno-error=deprecated-register.
7705         * configure: Re-generate.
7706
7707 2018-04-05  Tom Tromey  <tom@tromey.com>
7708
7709         * linespec.h: Remove include of "vec.h".
7710
7711 2018-04-05  Tom Tromey  <tom@tromey.com>
7712
7713         * linespec.c (typep): Remove typedef.
7714         (find_methods, find_superclass_methods): Take a std::vector.
7715         (find_method): Use std::vector.
7716
7717 2018-04-05  Tom Tromey  <tom@tromey.com>
7718
7719         * utils.c (compare_strings): Remove.
7720         * utils.h (compare_strings): Remove.
7721         * objc-lang.h (find_imps): Update.
7722         * objc-lang.c (find_methods): Take a std::vector.
7723         (uniquify_strings, find_imps): Likewise.
7724         * linespec.c (find_methods): Take a std::vector.
7725         (decode_objc): Use std::vector.
7726         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7727         a std::vector.
7728         (find_method, find_function_symbols): Use std::vector.
7729
7730 2018-04-05  Tom Tromey  <tom@tromey.com>
7731
7732         * completer.c (completion_tracker::completion_tracker): Remove
7733         cast.
7734         (completion_tracker::discard_completions): Likewise.
7735         * breakpoint.c (ambiguous_names_p): Remove cast.
7736         * ada-lang.c (_initialize_ada_language): Remove cast.
7737         * utils.h (streq): Update.
7738         (streq_hash): Add new declaration.
7739         * utils.c (streq): Return bool.
7740         (streq_hash): New function.
7741
7742 2018-04-05  Tom Tromey  <tom@tromey.com>
7743
7744         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7745         Remove a string copy.
7746
7747 2018-04-05  Tom Tromey  <tom@tromey.com>
7748
7749         * linespec.c (filter_results): Use std::vector.
7750         (decode_line_2, decode_line_full): Update.
7751
7752 2018-04-05  Tom Tromey  <tom@tromey.com>
7753
7754         * linespec.c (canonical_to_fullform): Return std::string.
7755         (filter_results): Update.
7756         (struct decode_line_2_item): Add constructor.
7757         <fullform, displayform>: Now std::string.
7758         (decode_line_2_compare_items): Now a std::sort comparator.
7759         (decode_line_2): Update.
7760
7761 2018-04-05  Tom Tromey  <tom@tromey.com>
7762
7763         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7764         (unexpected_linespec_error): Update.
7765         (linespec_parse_basic, parse_linespec): Update.
7766
7767 2018-04-05  Tom Tromey  <tom@tromey.com>
7768
7769         * linespec.c (linespec_parse_basic): Reindent.
7770
7771 2018-04-05  Tom Tromey  <tom@tromey.com>
7772
7773         * minsyms.h (iterate_over_minimal_symbols): Update.
7774         * minsyms.c (iterate_over_minimal_symbols): Take a
7775         gdb::function_view.
7776         * linespec.c (struct collect_minsyms): Remove.
7777         (compare_msyms): Now a std::sort comparator.
7778         (add_minsym): Add parameters.
7779         (search_minsyms_for_name): Update.  Use std::vector.
7780
7781 2018-04-03  Tom Tromey  <tom@tromey.com>
7782
7783         * mipsread.c (read_alphacoff_dynamic_symtab): Use
7784         gdb::byte_vector.
7785
7786 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
7787
7788         * MAINTAINERS (Write After Approval): Add Weimin Pan.
7789
7790 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
7791
7792         PR gdb/16959
7793         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
7794         printing static type.
7795
7796 2018-04-01  Tom Tromey  <tom@tromey.com>
7797
7798         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7799         (rs6000_xfer_shared_libraries): Update.
7800
7801 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
7802
7803         * common/gdb_vecs.h (char_ptr): Remove.
7804         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7805
7806 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
7807
7808         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7809         with std::vector.
7810         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7811
7812 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
7813
7814         * tracepoint.h (struct uploaded_tp): Initialize fields.
7815         <actions, step_actions, cmd_strings>: Change type to
7816         std::vector<char *>.
7817         * tracepoint.c (get_uploaded_tp): Allocate with new.
7818         (free_uploaded_tps): Free with delete.
7819         (parse_tracepoint_definition): Adjust to std::vector change.
7820         * breakpoint.c (read_uploaded_action): Likewise.
7821         (create_tracepoint_from_upload): Likewise.
7822         * ctf.c (ctf_write_uploaded_tp): Likewise.
7823         (SET_ARRAY_FIELD): Likewise.
7824         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7825
7826 2018-03-30  Tom Tromey  <tom@tromey.com>
7827
7828         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
7829         std::unique_ptr.
7830         (svr4_keep_data_in_core): Update.
7831         (svr4_read_so_list): Update.
7832
7833 2018-03-30  Tom Tromey  <tom@tromey.com>
7834
7835         * windows-nat.c (handle_output_debug_string, handle_exception):
7836         Update.
7837         * target.h (target_read_string): Update.
7838         * target.c (target_read_string): Change "string" to
7839         unique_xmalloc_ptr.
7840         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7841         Update.
7842         * solib-frv.c (frv_current_sos): Update.
7843         * solib-dsbt.c (dsbt_current_sos): Update.
7844         * solib-darwin.c (darwin_current_sos): Update.
7845         * linux-thread-db.c (inferior_has_bug): Update.
7846         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7847         Update.  Remove alloca.
7848         * ada-lang.c (ada_main_name): Update.
7849
7850 2018-03-30  Tom Tromey  <tom@tromey.com>
7851
7852         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7853         (struct dwo_file_deleter): New.
7854         (dwo_file_up): New typedef.
7855         (open_and_init_dwo_file): Use dwo_file_up.
7856         (free_dwo_file_cleanup): Remove.
7857
7858 2018-03-30  Tom Tromey  <tom@tromey.com>
7859
7860         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7861         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7862
7863 2018-03-30  Tom Tromey  <tom@tromey.com>
7864
7865         * dwarf2read.c (class free_cached_comp_units): New class.
7866         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7867         (free_cached_comp_units): Remove function.
7868
7869 2018-03-30  Tom Tromey  <tom@tromey.com>
7870
7871         * utils.h (make_cleanup_unpush_target): Remove.
7872         * inf-ptrace.c (struct target_unpusher): New.
7873         (target_unpush_up) New typedef.
7874         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7875         target_unpush_up.
7876         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7877
7878 2018-03-27  Tom Tromey  <tom@tromey.com>
7879
7880         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7881
7882 2018-03-27  Pedro Alves  <palves@redhat.com>
7883             Tom Tromey  <tom@tromey.com>
7884
7885         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7886         destructor.  Now a class.
7887         (gdb_readline_wrapper_cleanup): Remove function.
7888         (gdb_readline_wrapper): Remove cleanups.
7889
7890 2018-03-27  Tom Tromey  <tom@tromey.com>
7891
7892         * typeprint.h (struct type_print_options) <local_typedefs,
7893         global_typedefs>: Remove "struct" keyword.
7894         (class typedef_hash_table): New class.
7895         (recursively_update_typedef_hash, add_template_parameters)
7896         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7897         (find_typedef_in_hash): Don't declare.
7898         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7899         (typedef_hash_table::recursively_update): Rename from
7900         recursively_update_typedef_hash.  Now a member.
7901         (typedef_hash_table::add_template_parameters): Rename from
7902         add_template_parameters.  Now a member.
7903         (typedef_hash_table::typedef_hash_table): Now a constructor;
7904         rename from create_typedef_hash.
7905         (typedef_hash_table::~typedef_hash_table): Now a destructor;
7906         rename from free_typedef_hash.
7907         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7908         (do_free_global_table): Remove.
7909         (typedef_hash_table::typedef_hash_table): New constructor; renamed
7910         from copy_type_recursive.
7911         (create_global_typedef_table): Remove.
7912         (typedef_hash_table::find_global_typedef): Now a member of
7913         typedef_hash_table.
7914         (typedef_hash_table::find_typedef): Rename from
7915         find_typedef_in_hash; now a member.
7916         (whatis_exp): Update.
7917         * extension.h (struct ext_lang_type_printers): Add constructor and
7918         destructor.
7919         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7920         declare.
7921         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7922         Now a constructor; rename from start_ext_lang_type_printers.
7923         (ext_lang_type_printers): Now a destructor; rename from
7924         free_ext_lang_type_printers.
7925         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7926         Update.
7927         (c_type_print_base_struct_union): Update.  Remove cleanups.
7928
7929 2018-03-27  Tom Tromey  <tom@tromey.com>
7930
7931         * dwarf-index-write.c: Include <cmath>.
7932
7933 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
7934
7935         * NEWS: Add entry describing new "set|show varsize-limit" command.
7936         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7937         command.
7938         * printcmd.c (_initialize_printcmd): Add "set var" alias of
7939         "set variable".
7940
7941 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
7942
7943         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7944         dwarf-index-write.c
7945         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7946         * dwarf-index-common.c: New file.
7947         * dwarf-index-common.h: New file.
7948         * dwarf-index-write.c: New file.
7949         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7950         (struct dwarf2_section_info): Move from here.
7951         (dwarf2_section_info_def): Likewise.
7952         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7953         (offset_type): Likewise.
7954         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7955         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7956         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7957         (byte_swap): Likewise.
7958         (MAYBE_SWAP): Likewise.
7959         (dwarf2_per_cu_ptr): Likewise.
7960         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7961         (struct tu_stats): Likewise.
7962         (struct dwarf2_per_objfile): Likewise.
7963         (struct dwarf2_per_cu_data): Likewise.
7964         (struct signatured_type): Likewise.
7965         (sig_type_ptr): Likewise.
7966         (DEF_VEC_P (sig_type_ptr)): Likewise.
7967         (INDEX4_SUFFIX): Likewise.
7968         (INDEX5_SUFFIX): Likewise.
7969         (DEBUG_STR_SUFFIX): Likewise.
7970         (dwarf2_read_section): Make non-static.
7971         (mapped_index_string_hash): Move from here.
7972         (dwarf5_djb_hash): Likewise.
7973         (file_write): Likewise.
7974         (class data_buf): Likewise.
7975         (struct symtab_index_entry): Likewise.
7976         (struct mapped_symtab): Likewise.
7977         (find_slot): Likewise.
7978         (hash_expand): Likewise.
7979         (add_index_entry): Likewise.
7980         (uniquify_cu_indices): Likewise.
7981         (class c_str_view): Likewise.
7982         (class c_str_view_hasher): Likewise.
7983         (class vector_hasher): Likewise.
7984         (write_hash_table): Likewise.
7985         (psym_index_map): Likewise.
7986         (struct addrmap_index_data): Likewise.
7987         (add_address_entry): Likewise.
7988         (add_address_entry_worker): Likewise.
7989         (write_address_map): Likewise.
7990         (symbol_kind): Likewise.
7991         (write_psymbols): Likewise.
7992         (struct signatured_type_index_data): Likewise.
7993         (write_one_signatured_type): Likewise.
7994         (recursively_count_psymbols): Likewise.
7995         (recursively_write_psymbols): Likewise.
7996         (class debug_names): Likewise.
7997         (check_dwarf64_offsets): Likewise.
7998         (psyms_seen_size): Likewise.
7999         (write_gdbindex): Likewise.
8000         (write_debug_names): Likewise.
8001         (assert_file_size): Likewise.
8002         (write_psymtabs_to_index): Likewise.
8003         (save_gdb_index_command): Likewise.
8004         (_initialize_dwarf2_read): Don't register the "save gdb-index"
8005         command.
8006         * dwarf2read.h: New file.
8007
8008 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8009
8010         PR gdb/22670
8011         * dwarf2read.c (dwarf2_physname): Do not return the demangled
8012         symbol name if the CU's language stores symbol names in linkage
8013         format.
8014         * language.h (struct language_defn)
8015         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
8016         all instances of this struct.
8017
8018 2018-03-26  Tom Tromey  <tom@tromey.com>
8019
8020         * stack.c (backtrace_command_1): Remove verbose code.
8021
8022 2018-03-26  Tom Tromey  <tom@tromey.com>
8023
8024         * python/py-framefilter.c (py_print_type): Don't catch
8025         exceptions.  Return void.
8026         (py_print_value): Likewise.
8027         (py_print_single_arg): Likewise.
8028         (enumerate_args): Don't catch exceptions.
8029         (py_print_args): Likewise.
8030         (py_print_frame): Likewise.
8031         (gdbpy_apply_frame_filter): Catch exceptions here.
8032
8033 2018-03-26  Tom Tromey  <tom@tromey.com>
8034
8035         * stack.c (_initialize_stack): Remove trailing newlines from help
8036         text.  Add "Usage" line to "backtrace" help.
8037
8038 2018-03-26  Tom Tromey  <tom@tromey.com>
8039
8040         PR python/16486:
8041         * python/py-framefilter.c (py_print_args): Call wrap_hint.
8042
8043 2018-03-26  Tom Tromey  <tom@tromey.com>
8044
8045         * python/py-framefilter.c (py_print_single_arg): Return
8046         EXT_LANG_BT_ERROR from catch.
8047
8048 2018-03-26  Tom Tromey  <tom@tromey.com>
8049
8050         PR backtrace/15584:
8051         * stack.c (backtrace_command_1): Move some code into no-filters
8052         "if".
8053
8054 2018-03-26  Tom Tromey  <tom@tromey.com>
8055
8056         * python/py-framefilter.c (throw_quit_or_print_exception): New
8057         function.
8058         (gdbpy_apply_frame_filter): Use it.
8059
8060 2018-03-26  Tom Tromey  <tom@tromey.com>
8061
8062         PR cli/17716:
8063         * python/py-framefilter.c (py_print_type, py_print_value)
8064         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8065         RETURN_MASK_ERROR.
8066
8067 2018-03-26  Tom Tromey  <tom@tromey.com>
8068
8069         * python/py-framefilter.c (enumerate_args): Use
8070         gdb::unique_xmalloc_ptr.
8071
8072 2018-03-26  Tom Tromey  <tom@tromey.com>
8073
8074         * python/py-framefilter.c (py_print_frame): Return
8075         EXT_LANG_BT_OK.
8076         (gdbpy_apply_frame_filter): Update comment.
8077         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8078         Remove.
8079         <EXT_LANG_BT_NO_FILTERS>: Change value.
8080
8081 2018-03-26  Tom Tromey  <tom@tromey.com>
8082
8083         PR backtrace/15582:
8084         * stack.c (backtrace_command): Parse "hide" argument.
8085         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8086         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8087         constant.
8088
8089 2018-03-26  Tom Tromey  <tom@tromey.com>
8090
8091         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8092         add "flags".
8093         (backtrace_command): Remove "fulltrace", add "flags".
8094
8095 2018-03-26  Tom Tromey  <tom@tromey.com>
8096
8097         * stack.c (backtrace_command): Rewrite command line parsing.
8098
8099 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8100
8101         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8102
8103 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8104
8105         * filename-seen-cache.h: Add include guard.
8106
8107 2018-03-26  Keith Seitz  <keiths@redhat.com>
8108
8109         * symfile.c (place_section): Remove "struct" from section_addr_info
8110         in comment.
8111         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8112         "struct" keyword from section_addr_info.
8113
8114 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
8115
8116         * regformats/regdef.h (reg): Add constructors.
8117
8118 2018-03-25  Pedro Alves  <palves@redhat.com>
8119
8120         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8121         if then/else bodies in var_func_name extraction.
8122
8123 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
8124
8125         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8126         lookup_minimal_symbol() to find symbol entry.
8127         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8128
8129 2018-03-23  Keith Seitz  <keiths@redhat.com>
8130
8131         PR c++/22968
8132         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8133         nested type definitions for C++, too.
8134
8135 2018-03-23  Tom Tromey  <tom@tromey.com>
8136
8137         * machoread.c (struct oso_el): Add a constructor.  Don't define as
8138         a typedef.
8139         (macho_register_oso): Remove.
8140         (macho_symtab_read): Take a std::vector.
8141         (oso_el_compare_name): Now a std::sort comparator.
8142         (macho_symfile_read_all_oso): Take a std::vector.
8143         (macho_symfile_read): Use std::vector.  Remove cleanups.
8144
8145 2018-03-22  Tom Tromey  <tom@tromey.com>
8146
8147         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8148         (record_full_goto_bookmark): Use std::string.
8149
8150 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8151
8152         PR tdep/18295
8153         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8154         a single mask.
8155
8156 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8157
8158         * rs6000-tdep.c (store_insn_p): New function.
8159         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8160         and cr_reg to their unshifted values. Use store_insn_p to
8161         match LR saves using either R1 or fdata->alloca_reg. Use
8162         store_insn_p to match CR saves. Set alloca_reg_offset
8163         when alloca_reg and framep are set. Remove lr_reg shift
8164         when assigning to fdata->lr_register.
8165
8166 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8167
8168         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8169         command line args instead of emitting a warning.
8170
8171 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8172
8173         * tracepoint.h (struct static_tracepoint_marker): Initialize
8174         fields, define default constructor, move constructor and move
8175         assignment, disable the rest.
8176         <str_id, extra>: Make std::string.
8177         (release_static_tracepoint_marker): Remove.
8178         (free_current_marker): Remove.
8179         * tracepoint.c (free_current_marker): Remove.
8180         (parse_static_tracepoint_marker_definition): Adjust to
8181         std::string, use new hex2str overload.
8182         (release_static_tracepoint_marker): Remove.
8183         (print_one_static_tracepoint_marker): Get marker by reference
8184         and adjust to std::string.
8185         (info_static_tracepoint_markers_command): Adjust to std::vector
8186         changes
8187         * target.h (static_tracepoint_marker_p): Remove typedef.
8188         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8189         (struct target_ops) <to_static_tracepoint_marker_at>: Return
8190         bool.
8191         <to_static_tracepoint_markers_by_strid>: Return std::vector.
8192         * target-debug.h
8193         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8194         (target_debug_print_std_vector_static_tracepoint_marker): New.
8195         (target_debug_print_struct_static_tracepoint_marker_p): Rename
8196         to...
8197         (target_debug_print_static_tracepoint_marker_p): ... this.
8198         * target-delegates.c: Re-generate.
8199         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8200         Make std::string.
8201         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8202         (decode_static_tracepoint_spec): Adjust to std::vector.
8203         (tracepoint_print_one_detail): Adjust to std::string.
8204         (strace_marker_decode_location): Adjust to std::string.
8205         (update_static_tracepoint): Adjust to std::string, remove call
8206         to release_static_tracepoint_marker.
8207         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8208         Adjust to std::vector.
8209         * remote.c (remote_static_tracepoint_marker_at): Return bool.
8210         (remote_static_tracepoint_markers_by_strid): Adjust to
8211         std::vector.
8212         * common/rsp-low.h (hex2str): New overload with explicit count
8213         of bytes.
8214         * common/rsp-low.c (hex2str): New overload with explicit count
8215         of bytes.
8216         * unittests/rsp-low-selftests.c (test_hex2str): New function.
8217         (_initialize_rsp_low_selftests): Add test_hex2str test.
8218         * unittests/tracepoint-selftests.c
8219         (test_parse_static_tracepoint_marker_definition): Adjust to
8220         std::string.
8221
8222 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8223
8224         * tracepoint.c (parse_static_tracepoint_marker_definition):
8225         Consider case where the definition is followed by more
8226         definitions.
8227         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8228         tracepoint-selftests.c.
8229         * unittests/tracepoint-selftests.c: New.
8230
8231 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8232
8233         * MAINTAINERS (Write After Approval): Add Pedro Franco de
8234         Carvalho.
8235
8236 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8237
8238         * symtab.c (find_pc_sect_line): fixed indentation.
8239
8240 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8241
8242         * symtab.c (find_pc_sect_line): now uses binary search.
8243
8244 2018-03-19  Tom Tromey  <tom@tromey.com>
8245
8246         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8247         "IDENT" production.
8248
8249 2018-03-19  Pedro Alves  <palves@redhat.com>
8250             Tom Tromey  <tom@tromey.com>
8251
8252         * unittests/observable-selftests.c: New file.
8253         * common/observable.h: New file.
8254         * observable.h: New file.
8255         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8256         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8257         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8258         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8259         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8260         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8261         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8262         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8263         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8264         python/py-breakpoint.c, python/py-finishbreakpoint.c,
8265         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8266         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8267         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8268         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8269         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8270         tui/tui-interp.c, valops.c: Update all users.
8271         * tui/tui-hooks.c (tui_bp_created_observer)
8272         (tui_bp_deleted_observer, tui_bp_modified_observer)
8273         (tui_inferior_exit_observer, tui_before_prompt_observer)
8274         (tui_normal_stop_observer, tui_register_changed_observer):
8275         Remove.
8276         (tui_observers_token): New global.
8277         (attach_or_detach, tui_attach_detach_observers): New functions.
8278         (tui_install_hooks, tui_remove_hooks): Use
8279         tui_attach_detach_observers.
8280         * record-btrace.c (record_btrace_thread_observer): Remove.
8281         (record_btrace_thread_observer_token): New global.
8282         * observer.sh: Remove.
8283         * observer.c: Rename to observable.c.
8284         * observable.c (namespace gdb_observers): Define new objects.
8285         (observer_debug): Move into gdb_observers namespace.
8286         (struct observer, struct observer_list, xalloc_observer_list_node)
8287         (xfree_observer_list_node, generic_observer_attach)
8288         (generic_observer_detach, generic_observer_notify): Remove.
8289         (_initialize_observer): Update.
8290         Don't include observer.inc.
8291         * Makefile.in (generated_files): Remove observer.h, observer.inc.
8292         (clean mostlyclean): Likewise.
8293         (observer.h, observer.inc): Remove targets.
8294         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8295         (COMMON_SFILES): Use observable.c, not observer.c.
8296         * .gitignore: Remove observer.h.
8297
8298 2018-03-18  Tom Tromey  <tom@tromey.com>
8299
8300         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8301         gdb::def_vector.
8302         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8303
8304 2018-03-17  Tom Tromey  <tom@tromey.com>
8305
8306         * auto-load.c (auto_load_objfile_script_1): Use std::string.
8307
8308 2018-03-17  Tom Tromey  <tom@tromey.com>
8309
8310         * target.c (class scoped_target_fd): New.
8311         (target_fileio_close_cleanup): Remove.
8312         (target_fileio_read_alloc_1): Use scoped_target_fd.
8313
8314 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
8315
8316         * silent-rules.mk: New.
8317         * Makefile.in: Include silent-rules.mk
8318         (srcdir, VPATH, top_srcdir): Move up.
8319         (COMPILE): Add ECHO_CXX.
8320         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8321         (init.c): Add ECHO_INIT_C.
8322         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8323         (version.c): Add ECHO_GEN.
8324         (printcmd.o): Add ECHO_CXX.
8325         (target-float.o): Add ECHO_CXX.
8326         (ada-exp.o): Add ECHO_CXX.
8327         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8328         (insight$(EXEEXT)): Add ECHO_CXXLD.
8329         * gnulib/configure.ac: Add AM_SILENT_RULES.
8330         * gnulib/aclocal.m4: Re-generate.
8331         * gnulib/configure: Re-generate.
8332         * gnulib/import/Makefile.in: Re-generate.
8333
8334 2018-03-16  Tom Tromey  <tom@tromey.com>
8335
8336         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8337         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8338         * utils.c (do_free_section_addr_info)
8339         (make_cleanup_free_section_addr_info): Remove.
8340         * symfile.h (struct other_sections): Add constructor.
8341         (struct section_addr_info): Remove.
8342         (section_addr_info): New typedef.
8343         (struct sym_fns) <sym_offsets>: Change type of parameter.
8344         (build_section_addr_info_from_objfile)
8345         (relative_addr_info_to_section_offsets, addr_info_make_relative)
8346         (default_symfile_offsets, symbol_file_add)
8347         (symbol_file_add_from_bfd)
8348         (build_section_addr_info_from_section_table): Update.
8349         (alloc_section_addr_info, free_section_addr_info): Don't declare.
8350         * symfile.c (alloc_section_addr_info): Remove.
8351         (build_section_addr_info_from_section_table): Change return type.
8352         Update.
8353         (build_section_addr_info_from_bfd)
8354         (build_section_addr_info_from_objfile): Likewise.
8355         (free_section_addr_info): Remove.
8356         (relative_addr_info_to_section_offsets): Change type of "addrs".
8357         (addrs_section_compar): Now a std::sort comparator.
8358         (addrs_section_sort): Change return type.
8359         (addr_info_make_relative): Change type of "addrs".  Update.
8360         (default_symfile_offsets, syms_from_objfile_1)
8361         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8362         (symbol_file_add_separate): Update.
8363         (symbol_file_add): Change type of "addrs".  Update.
8364         (add_symbol_file_command): Update.  Remove cleanups.
8365         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
8366         cleanups.
8367         * symfile-debug.c (debug_sym_offsets): Change type of "info".
8368         * solib.c (solib_read_symbols): Update.
8369         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
8370         * machoread.c (macho_symfile_offsets): Update.
8371         * jit.c (jit_bfd_try_read_symtab): Update.
8372
8373 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
8374
8375         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8376         unittests/utils-selftests.c.
8377         * unittests/utils-selftests.c: New file.
8378
8379 2018-03-14  Tom Tromey  <tom@tromey.com>
8380
8381         PR cli/14977:
8382         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8383         for NULL.
8384
8385 2018-03-14  Tom Tromey  <tom@tromey.com>
8386
8387         PR cli/19918:
8388         * printcmd.c (printf_pointer): Allow "-" in format.
8389
8390 2018-03-14  Tom Tromey  <tom@tromey.com>
8391
8392         * printcmd.c (_initialize_printcmd): Add usage to printf.
8393
8394 2018-03-14  Yao Qi  <qiyao@sourceware.org>
8395
8396         * MAINTAINERS: Update my email address.
8397
8398 2018-03-13  Tom Tromey  <tom@tromey.com>
8399
8400         * machoread.c (macho_check_dsym): Change filenamep to a
8401         std::string*.
8402         (macho_symfile_read): Update.
8403         * symfile.c (load_command): Use std::string.
8404
8405 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8406
8407         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8408         to error message string.
8409         (riscv_register_name): Use xsnprintf instead of sprintf.
8410         (riscv_insn::fetch_instruction): Use gdb_assert instead of
8411         internal_error.
8412         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8413         error.
8414         (riscv_push_dummy_call): Likewise.
8415
8416 2018-03-12  Tom Tromey  <tom@tromey.com>
8417
8418         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8419         Use gdb::byte_vector.
8420         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8421
8422 2018-03-12  Yao Qi  <yao.qi@linaro.org>
8423
8424         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8425         parameter type to readable_regcache.
8426         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8427         the declaration.
8428
8429 2018-03-11  Tom Tromey  <tom@tromey.com>
8430
8431         * dwarf2read.c (struct nextfield): Add initializers.
8432         (struct nextfnfield): Remove.
8433         (struct fnfieldlist): Add initializers.  Remove "length" and
8434         "head", use std::vector.
8435         (struct decl_field_list): Remove.
8436         (struct field_info): Add initializers.
8437         <fields, baseclasses>: Now std::vector.
8438         <nbaseclasses, nfnfields, typedef_field_list_count,
8439         nested_types_list_count>: Remove.
8440         (dwarf2_add_field, dwarf2_add_type_defn)
8441         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8442         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8443         (process_structure_scope): Update.
8444
8445 2018-03-11  Tom Tromey  <tom@tromey.com>
8446
8447         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8448         for use by std::sort.
8449         (build_type_psymtabs_1): Use std::vector.
8450
8451 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
8452
8453         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8454         and LIBMPFR in the printed configuration.
8455
8456 2018-03-08  Tom Tromey  <tom@tromey.com>
8457
8458         * source.c (get_filename_and_charpos): Use scoped_fd.
8459         * nto-procfs.c (procfs_open_1): Use scoped_fd.
8460         (procfs_pidlist): Likewise.
8461         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8462         (iterate_over_mappings): Likewise.
8463
8464 2018-03-08  Tom Tromey  <tom@tromey.com>
8465
8466         * infcall.c (struct call_return_meta_info)
8467         <stack_temporaries_enabled>: Remove.
8468         (get_call_return_value, call_function_by_hand_dummy): Update.
8469         * thread.c (disable_thread_stack_temporaries): Remove.
8470         (enable_thread_stack_temporaries): Remove.
8471         (thread_stack_temporaries_enabled_p): Return bool.
8472         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8473         (get_last_thread_stack_temporary): Update.
8474         * eval.c (evaluate_subexp): Update.
8475         * gdbthread.h (class enable_thread_stack_temporaries): Now a
8476         class, not a function.
8477         (value_ptr, value_vec): Remove typedefs.
8478         (class thread_info) <stack_temporaries_enabled>: Now bool.
8479         <stack_temporaries>: Now a std::vector.
8480         (thread_stack_temporaries_enabled_p)
8481         (value_in_thread_stack_temporaries): Return bool.
8482
8483 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
8484
8485         * remote.c (putpkt_binary): Fix omitted bytes reporting.
8486         (getpkt_or_notif_sane_1): Likewise.
8487
8488 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8489
8490         * build-id.c (build_id_to_debug_bfd): Use std::string.
8491
8492 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8493
8494         * build-id.c (find_separate_debug_file_by_buildid): Return
8495         std::string.
8496         * build-id.h (find_separate_debug_file_by_buildid): Return
8497         std::string.
8498         * coffread.c (coff_symfile_read): Adjust to std::string.
8499         * elfread.c (elf_symfile_read): Adjust to std::string.
8500         * symfile.c (separate_debug_file_exists): Change parameter to
8501         std::string.
8502         (find_separate_debug_file): Return std::string.
8503         (find_separate_debug_file_by_debuglink): Return std::string.
8504         * symfile.h (find_separate_debug_file_by_debuglink): Return
8505         std::string.
8506
8507 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8508
8509         * common/xml-utils.c (xml_escape_text): Move code to...
8510         (xml_escape_text_append): ... this new function.
8511         * common/xml-utils.h (xml_escape_text_append): New declaration.
8512         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8513         New function.
8514         (_initialize_xml_utils): register test_xml_escape_text_append as
8515         a selftest.
8516
8517 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
8518
8519         * defs.h: Remove MAX_REGISTER_SIZE.
8520         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8521         asserts.
8522         * python/py-unwind.c (pyuw_sniffer): Likewise.
8523
8524 2018-03-07  Tom Tromey  <tom@tromey.com>
8525
8526         * linux-tdep.c (linux_info_proc): Update.
8527         * target.h (struct target_ops) <to_fileio_readlink>: Return
8528         optional<string>.
8529         (target_fileio_readlink): Return optional<string>.
8530         * remote.c (remote_hostio_readlink): Return optional<string>.
8531         * inf-child.c (inf_child_fileio_readlink): Return
8532         optional<string>.
8533         * target.c (target_fileio_readlink): Return optional<string>.
8534
8535 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
8536
8537         * regcache.c (cooked_read_test): Add riscv to the list of
8538         architectures that have a save_reggroup.
8539
8540 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8541
8542         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8543         value is not a dynamic class object.
8544
8545 2018-03-06  Tom Tromey  <tom@tromey.com>
8546
8547         * rust-exp.y: Formatting fixes.
8548
8549 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8550
8551         * riscv-tdep.c (riscv_register_name): Remove target description
8552         support.
8553         (riscv_gdbarch_init): Remove target description check.
8554
8555 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8556
8557         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8558         comment.
8559         * riscv-tdep.h: Likewise.
8560
8561 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8562
8563         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8564         (riscv_pseudo_register_write): Delete.
8565         (riscv_gdbarch_init): Remove all use of pseudo registers.
8566
8567 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8568
8569         * record-btrace.c (btrace_print_lines): Replace cleanup
8570         parameter with RAII equivalents.
8571         (btrace_insn_history): Replace cleanup with RAII equivalents.
8572         * ui-out.h (make_cleanup_ui_out_list_begin_end,
8573         make_cleanup_ui_out_tuple_begin_end): Remove.
8574         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8575         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8576         make_cleanup_ui_out_list_begin_end): Remove.
8577
8578 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8579
8580         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8581         parameter types to std::vector.  Use bool.
8582         (record_btrace_wait): Replace VEC(tp_t) with
8583         std::vector<thread_info *>.
8584         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8585
8586 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8587
8588         * record-btrace.c (record_btrace_disable_callback): Remove.
8589         (struct scoped_btrace_disable): New.
8590         (record_btrace_open): Use scoped_btrace_disable.
8591
8592 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8593
8594         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8595         reading values from registers.
8596
8597 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8598
8599         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8600         where appropriate.
8601
8602 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8603
8604         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8605         change parameter type.  Use GDB's print functions, and use
8606         core_addr_to_string where appropriate.
8607         (riscv_push_dummy_call): Use core_addr_to_string where
8608         appropriate, update call to riscv_print_arg_location, and reindent
8609         a few lines.
8610         (riscv_return_value): Update call to riscv_print_arg_location.
8611
8612 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8613             Tim Newsome <tim@sifive.com>
8614             Albert Ou <a0u@eecs.berkeley.edu>
8615             Darius Rad <darius@bluespec.com>
8616
8617         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8618         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8619         (ALLDEPFILES): Add riscv-tdep.c
8620         * configure.tgt: Add riscv support.
8621         * riscv-tdep.c: New file.
8622         * riscv-tdep.h: New file.
8623         * NEWS: Mention new target.
8624         * MAINTAINERS: Add entry for riscv.
8625
8626 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8627
8628         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8629         fields within aggregates.
8630
8631 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
8632
8633         * record-btrace.c (btrace_print_lines): Change type of flags to
8634         gdb_disassembly_flags.
8635
8636 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8637
8638         * fbsd-nat.c: Include "inf-ptrace.h".
8639         (USE_SIGTRAP_SIGINFO): Conditionally define.
8640         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8641         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8642         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8643         function.
8644         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8645         Likewise.
8646         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8647         Likewise.
8648         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8649         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8650         "supports_stopped_by_hw_breakpoint" target methods.
8651
8652 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8653
8654         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8655         * fbsd-nat.c (debug_fbsd_nat): New variable.
8656         (show_fbsd_nat_debug): New function.
8657         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8658         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8659
8660 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8661
8662         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8663         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8664         prototype.
8665         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8666         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8667         method.
8668
8669 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8670
8671         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8672         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8673
8674 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8675
8676         * charset.c (struct charset_vector): New.
8677         (charsets): Change type to charset_vector.
8678         (find_charset_names): Adjust.
8679         (add_one): Adjust.
8680         (_initialize_charset): Adjust.
8681
8682 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8683
8684         * progspace.h (struct program_space) <deleted_solibs>: Change
8685         type to std::vector<std::string>.
8686         * progspace.c (clear_program_space_solib_cache): Adjust.
8687         * breakpoint.c (print_solib_event): Adjust.
8688         (check_status_catch_solib): Adjust.
8689         * solib.c (update_solib_list): Adjust.
8690         * ui-out.h (class ui_out) <field_string>: New overload.
8691         * ui-out.c (ui_out::field_string): New overload.
8692
8693 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8694
8695         * progspace.h (struct program_space): Add constructor and
8696         destructor, initialize fields.
8697         (add_program_space): Remove.
8698         * progspace.c (add_program_space): Rename to...
8699         (program_space::program_space): ... this.
8700         (release_program_space): Rename to...
8701         (program_space::~program_space): ... this.
8702         (delete_program_space): Use delete to delete program_space.
8703         (initialize_progspace): Use new to allocate program_space.
8704         * inferior.c (add_inferior_with_spaces): Likewise.
8705         (clone_inferior_command): Likewise.
8706         * infrun.c (follow_fork_inferior): Likewise.
8707         (handle_vfork_child_exec_or_exit): Likewise.
8708
8709 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8710
8711         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8712         (delim_string_to_char_ptr_vec): Return std::vector of
8713         gdb::unique_xmalloc_ptr.
8714         (dirnames_to_char_ptr_vec_append): Take std::vector of
8715         gdb::unique_xmalloc_ptr.
8716         (dirnames_to_char_ptr_vec): Return std::vector of
8717         gdb::unique_xmalloc_ptr.
8718         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8719         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8720         (delim_string_to_char_ptr_vec): Return an std::vector of
8721         gdb::unique_xmalloc_ptr, adjust the code.
8722         (dirnames_to_char_ptr_vec_append): Take an std::vector of
8723         gdb::unique_xmalloc_ptr, adjust the code.
8724         (dirnames_to_char_ptr_vec): Return an std::vector of
8725         gdb::unique_xmalloc_ptr, adjust the code.
8726         * auto-load.c (auto_load_safe_path_vec): Change type to
8727         std::vector of gdb::unique_xmalloc_ptr.
8728         (auto_load_expand_dir_vars): Return an std::vector of
8729         gdb::unique_xmalloc_ptr, adjust the code.
8730         (auto_load_safe_path_vec_update): Adjust.
8731         (filename_is_in_auto_load_safe_path_vec): Adjust.
8732         (auto_load_objfile_script_1): Adjust.
8733         * build-id.c (build_id_to_debug_bfd): Adjust.
8734         * linux-thread-db.c (thread_db_load_search): Adjust.
8735         * source.c (add_path): Adjust.
8736         (openp): Adjust.
8737         * symfile.c (find_separate_debug_file): Adjust.
8738         * utils.c (do_free_char_ptr_vec): Remove.
8739         (make_cleanup_free_char_ptr_vec): Remove.
8740
8741 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
8742
8743         PR gdb/22907
8744         * common/pathstuff.c: Conditionally include "<windows.h>".
8745
8746 2018-03-01  Georg Sauthoff  <mail@georg.so>
8747
8748         PR gdb/22888
8749         * gcore.in: Quote variables and switch interpreter to bash.
8750
8751 2018-03-01  Tom Tromey  <tom@tromey.com>
8752
8753         * dwarf2read.c (alloc_discriminant_info): Fix default_index
8754         assertion.  Add assertion for discriminant_index.
8755         (quirk_rust_enum): Use correct base type name in univariant case.
8756
8757 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
8758
8759         * record.c (get_call_history_modifiers): Return a
8760         record_print_flags.
8761         (cmd_record_call_history): Adjust.
8762         * record-btrace.c (record_btrace_call_history): Adjust.
8763         (record_btrace_call_history_range): Adjust.
8764         (record_btrace_call_history_from): Adjust.
8765         * target-debug.h (target_debug_print_record_print_flags): New.
8766         * target-delegates.c: Re-generate.
8767         * target.c (target_call_history): Change flags type.
8768         (target_call_history_from): Likewise.
8769         (target_call_history_range): Likewise.
8770         * target.h (struct target_ops) <target_call_history>: Likewise.
8771         (target_call_history_from): Likewise.
8772         (target_call_history_range): Likewise.
8773
8774 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
8775             Simon Marchi  <simon.marchi@polymtl.ca>
8776
8777         * common/common-utils.c: Include "sys/stat.h".
8778         (is_regular_file): Move here from "source.c"; change return
8779         type to "bool".
8780         * common/common-utils.h (is_regular_file): New prototype.
8781         * common/pathstuff.c (contains_dir_separator): New function.
8782         * common/pathstuff.h (contains_dir_separator): New prototype.
8783         * source.c: Don't include "sys/stat.h".
8784         (is_regular_file): Move to "common/common-utils.c".
8785
8786 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
8787
8788         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8789         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8790         * auto-load.c: Include "common/pathstuff.h".
8791         * common/common-def.h (current_directory): Move here.
8792         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8793         function.
8794         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8795         prototype.
8796         * common/pathstuff.c: New file.
8797         * common/pathstuff.h: New file.
8798         * compile/compile.c: Include "common/pathstuff.h".
8799         * defs.h (current_directory): Move to "common/common-defs.h".
8800         * dwarf2read.c: Include "common/pathstuff.h".
8801         * exec.c: Likewise.
8802         * guile/scm-safe-call.c: Likewise.
8803         * linux-thread-db.c: Likewise.
8804         * main.c: Likewise.
8805         * nto-tdep.c: Likewise.
8806         * objfiles.c: Likewise.
8807         * source.c: Likewise.
8808         * symtab.c: Likewise.
8809         * utils.c: Include "common/pathstuff.h".
8810         (gdb_realpath): Move to "common/pathstuff.c".
8811         (gdb_realpath_keepfile): Likewise.
8812         (gdb_abspath): Likewise.
8813         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8814         (gdb_realpath_keepfile): Likewise.
8815         (gdb_abspath): Likewise.
8816
8817 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
8818
8819         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8820         wildcard process pid for super_resume for kernels with a
8821         specific bug.
8822
8823 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
8824
8825         * compile/compile.c (get_args): Add additional comments
8826         explaining function.
8827
8828 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
8829             Tom Tromey  <tom@tromey.com>
8830
8831         * target.h (memory_write_request_s): Remove typedef.  Don't define
8832         VEC.
8833         (target_write_memory_blocks): Change argument to std::vector.
8834         (struct memory_write_request): Add constructor.
8835         * target-memory.c (compare_block_starting_address): Return bool.
8836         Change argument types.
8837         (claim_memory): Change arguments to use std::vector.
8838         (split_regular_and_flash_blocks, blocks_to_erase)
8839         (compute_garbled_blocks): Likewise.
8840         (cleanup_request_data, cleanup_write_requests_vector): Remove.
8841         (target_write_memory_blocks): Change argument to std::vector.
8842         * symfile.c (struct load_section_data): Add constructor and
8843         destructor.  Use std::vector for "requests".
8844         (struct load_progress_data): Add initializers.
8845         (load_section_callback): Update.  Use "new".
8846         (clear_memory_write_data): Remove.
8847         (generic_load): Update.
8848
8849 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
8850
8851         * arch/aarch64.h: Use common/tdesc.h.
8852
8853 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
8854
8855         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8856         architecture with a 64-bit ABI.
8857
8858 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
8859
8860         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8861         ahead of target description loading.
8862
8863 2018-02-26  Tom Tromey  <tom@tromey.com>
8864
8865         * stack.c (backtrace_command_1): Update.
8866         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8867         of "flags".
8868         * python/py-framefilter.c (py_print_frame)
8869         (gdbpy_apply_frame_filter): Change type of "flags".
8870         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8871         of "flags".
8872         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8873         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8874         * extension.h (enum frame_filter_flag): Rename from
8875         frame_filter_flags.
8876         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8877         (apply_ext_lang_frame_filter): Change type of "flags".
8878         * extension.c (apply_ext_lang_frame_filter): Change type of
8879         "flags".
8880         * extension-priv.h (struct extension_language_ops)
8881         <apply_frame_filter>: Change type of "flags".
8882
8883 2018-02-26  Tom Tromey  <tom@tromey.com>
8884
8885         PR python/16497:
8886         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
8887         off-by-one in py_end computation.
8888         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8889         PRINT_MORE_FRAMES.
8890         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8891         constant.
8892
8893 2018-02-26  Tom Tromey  <tom@tromey.com>
8894
8895         * dwarf2read.c (struct variant_field): New.
8896         (struct nextfield) <variant>: New field.
8897         (dwarf2_add_field): Handle DW_TAG_variant_part.
8898         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8899         discriminated union.
8900         (read_structure_type): Handle DW_TAG_variant_part.
8901         (handle_struct_member_die): New function, extracted from
8902         process_structure_scope.  Handle DW_TAG_variant.
8903         (process_structure_scope): Handle discriminated unions.  Call
8904         handle_struct_member_die.
8905
8906 2018-02-26  Tom Tromey  <tom@tromey.com>
8907
8908         * rust-lang.h (rust_last_path_segment): Declare.
8909         * rust-lang.c (rust_last_path_segment): Now public.  Change
8910         contract.
8911         (struct disr_info): Remove.
8912         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8913         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8914         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8915         (rust_enum_p, rust_enum_variant): New function.
8916         (rust_underscore_fields): Remove "offset" parameter.
8917         (rust_print_enum): New function.
8918         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8919         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8920         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
8921         enums.
8922         (rust_internal_print_type): New function, from rust_print_type.
8923         Remove enum code.
8924         (rust_print_type): Call rust_internal_print_type.
8925         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8926         Update enum handling.
8927         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8928         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8929         (rust_union_quirks): New functions.
8930         (process_full_comp_unit, process_full_type_unit): Call
8931         rust_union_quirks.
8932         (process_structure_scope): Update rust_unions if necessary.
8933
8934 2018-02-26  Tom Tromey  <tom@tromey.com>
8935
8936         * value.h (value_union_variant): Declare.
8937         * valops.c (value_union_variant): New function.
8938         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8939         (struct discriminant_info): New.
8940         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8941         enumerator.
8942         (struct main_type) <flag_discriminated_union>: New field.
8943
8944 2018-02-26  Tom Tromey  <tom@tromey.com>
8945
8946         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8947         unittests/unpack-selftests.c.
8948         * unittests/unpack-selftests.c: New file.
8949         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8950
8951 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8952
8953         * dwarf2read.c (struct partial_die_info) <read>: New method.
8954         (read_partial_die): Remove the declaration.
8955         (load_partial_dies): Update.
8956         (partial_die_info::partial_die_info):
8957         (read_partial_die): Change it to partial_die_info::read.
8958
8959 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8960
8961         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8962         (fixup_partial_die): Remove declaration.
8963         (scan_partial_symbols): Update.
8964         (partial_die_parent_scope): Likewise.
8965         (partial_die_full_name): Likewise.
8966         (fixup_partial_die): Change it to partial_die_info::fixup.
8967
8968 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8969
8970         * dwarf2read.c (read_partial_die): Update the declaration.
8971         (load_partial_dies): Caller update.
8972         (read_partial_die): Remove one argument abbrev_len.
8973
8974 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8975
8976         * dwarf2read.c (struct partial_die_info): Add ctor, delete
8977         assignment operator.
8978         (load_partial_dies): Use ctor and copy ctor.
8979         (read_partial_die): Update.
8980         (dwarf2_cu::find_partial_die): Use ctor.
8981
8982 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8983
8984         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8985         (find_partial_die_in_comp_unit): Change it to
8986         dwarf2_cu::find_partial_die.
8987         (find_partial_die): Update.
8988
8989 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8990
8991         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8992         is NULL.
8993
8994 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8995
8996         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8997
8998 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
8999
9000         * arch/amd64.h: Use common/tdesc.h.
9001         * arch/i386.c: Likewise.
9002         * arch/i386.h: Likewise.
9003         * arch/tic6x.c: Likewise.
9004         * arch/tdesc.h: Move file from here...
9005         * common/tdesc.h: ...to here.
9006         * features/aarch64-core.c: Regenerate.
9007         * features/aarch64-fpu.c: Regenerate.
9008         * features/i386/32bit-avx.c: Regenerate.
9009         * features/i386/32bit-avx512.c: Regenerate.
9010         * features/i386/32bit-core.c: Regenerate.
9011         * features/i386/32bit-linux.c: Regenerate.
9012         * features/i386/32bit-mpx.c: Regenerate.
9013         * features/i386/32bit-pkeys.c: Regenerate.
9014         * features/i386/32bit-sse.c: Regenerate.
9015         * features/i386/64bit-avx.c: Regenerate.
9016         * features/i386/64bit-avx512.c: Regenerate.
9017         * features/i386/64bit-core.c: Regenerate.
9018         * features/i386/64bit-linux.c: Regenerate.
9019         * features/i386/64bit-mpx.c: Regenerate.
9020         * features/i386/64bit-pkeys.c: Regenerate.
9021         * features/i386/64bit-segments.c: Regenerate.
9022         * features/i386/64bit-sse.c: Regenerate.
9023         * features/i386/x32-core.c: Regenerate.
9024         * features/tic6x-c6xp.c: Regenerate.
9025         * features/tic6x-core.c: Regenerate.
9026         * features/tic6x-gp.c: Regenerate.
9027         * target-descriptions.c: Use common/tdesc.h.
9028         * target-descriptions.h: Likewise.
9029
9030 2018-02-24  Tom Tromey  <tom@tromey.com>
9031
9032         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9033         (try_thread_db_load_from_dir, thread_db_load_search): Use
9034         std::string.
9035         (info_auto_load_libthread_db_compare): Return bool.  Change
9036         argument types.
9037         (info_auto_load_libthread_db): Use std::vector, std::string.
9038         Remove cleanups.
9039
9040 2018-02-24  Tom Tromey  <tom@tromey.com>
9041
9042         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9043         std::string.
9044         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9045         std::string*.
9046         * gdbarch.c: Rebuild.
9047         * gdbarch.h: Rebuild.
9048         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9049         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9050         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9051         std::string*.
9052
9053 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
9054
9055         * gdbtypes.h (sect_offset): Change type to uint64_t.
9056         (sect_offset_str): New function.
9057         * dwarf2read.c (create_addrmap_from_aranges): Use
9058         sect_offset_str.
9059         (error_check_comp_unit_head): Likewise.
9060         (create_debug_type_hash_table): Likewise.
9061         (read_cutu_die_from_dwo): Likewise.
9062         (init_cutu_and_read_dies): Likewise.
9063         (init_cutu_and_read_dies_no_follow): Likewise.
9064         (process_psymtab_comp_unit_reader): Likewise.
9065         (partial_die_parent_scope): Likewise.
9066         (peek_die_abbrev): Likewise.
9067         (process_queue): Likewise.
9068         (dwarf2_physname): Likewise.
9069         (read_namespace_alias): Likewise.
9070         (read_import_statement): Likewise.
9071         (create_dwo_cu_reader): Likewise.
9072         (create_cus_hash_table): Likewise.
9073         (lookup_dwo_cutu): Likewise.
9074         (inherit_abstract_dies): Likewise.
9075         (read_func_scope): Likewise.
9076         (read_call_site_scope): Likewise.
9077         (dwarf2_add_member_fn): Likewise.
9078         (read_common_block): Likewise.
9079         (read_module_type): Likewise.
9080         (read_typedef): Likewise.
9081         (read_subrange_type): Likewise.
9082         (load_partial_dies): Likewise.
9083         (read_partial_die): Likewise.
9084         (find_partial_die): Likewise.
9085         (read_str_index): Likewise.
9086         (dwarf2_string_attr): Likewise.
9087         (build_error_marker_type): Likewise.
9088         (lookup_die_type): Likewise.
9089         (dump_die_shallow): Likewise.
9090         (follow_die_ref): Likewise.
9091         (dwarf2_fetch_die_loc_sect_off): Likewise.
9092         (dwarf2_fetch_constant_bytes): Likewise.
9093         (follow_die_sig): Likewise.
9094         (get_signatured_type): Likewise.
9095         (get_DW_AT_signature_type): Likewise.
9096         (dwarf2_find_containing_comp_unit): Likewise.
9097         (set_die_type): Likewise.
9098
9099 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
9100
9101         * arch/aarch64.c: Include "common-defs.h".
9102         * arch/amd64.c: Likewise.
9103         * arch/i386.c: Likewise.
9104
9105 2018-02-21  Tom Tromey  <tom@tromey.com>
9106
9107         * value.h: (extract_field_op): Update.
9108         * eval.c (extract_field_op): Return a const char *.
9109         * expression.h (parse_expression_for_completion): Update.
9110         * completer.c (complete_expression): Update.
9111         (add_struct_fields): Make fieldname const.
9112         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9113         (mark_completion_tag, parse_exp_in_context_1): Update.
9114         (parse_expression_for_completion): Change "name" to
9115         unique_xmalloc_ptr*.
9116
9117 2018-02-21  Tom Tromey  <tom@tromey.com>
9118
9119         * infcall.c (call_function_by_hand_dummy): Use std::vector.
9120
9121 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9122
9123         * avr-tdep.c (avr_read_pc): Change parameter type to
9124         readable_regcache.
9125         * gdbarch.sh (read_pc): Likewise.
9126         * gdbarch.c: Re-generated.
9127         * gdbarch.h: Re-generated.
9128         * hppa-tdep.c (hppa_read_pc): Change parameter type to
9129         readable_regcache.
9130         * ia64-tdep.c (ia64_read_pc): Likewise.
9131         * mips-tdep.c (mips_read_pc): Likewise.
9132         * spu-tdep.c (spu_read_pc): Likewise.
9133
9134 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9135
9136         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9137         * regcache-dump.c: New file.
9138         * regcache.c: Move register_dump to regcache-dump.c.
9139         (maintenance_print_registers): Likewise.
9140         (maintenance_print_raw_registers): Likewise.
9141         (maintenance_print_cooked_registers): Likewise.
9142         (maintenance_print_register_groups): Likewise.
9143         (maintenance_print_remote_registers): Likewise.
9144         (_initialize_regcache): Likewise.
9145         * regcache.h (register_dump): Moved from regcache.c.
9146
9147 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9148
9149         * regcache.c (regcache::regcache): Update.
9150         (regcache::invalidate): Move it to detached_regcache::invalidate.
9151         (get_thread_arch_aspace_regcache): Update.
9152         (regcache::raw_update): Update.
9153         (regcache::cooked_read): Remove some code.
9154         (regcache::cooked_read_value): Likewise.
9155         (regcache::raw_write): Remove assert on m_readonly_p.
9156         (regcache::raw_supply_integer): Move it to
9157         detached_regcache::raw_supply_integer.
9158         (regcache::raw_supply_zeroed): Likewise.
9159         * regcache.h (detached_regcache) <raw_supply_integer>: New
9160         declaration.
9161         <raw_supply_zeroed, invalidate>: Likewise.
9162         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9163         <invalidate>: Likewise.
9164         <m_readonly_p>: Removed.
9165
9166 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9167
9168         * infcmd.c (get_return_value): Let stop_regs point to
9169         get_current_regcache.
9170         * regcache.c (regcache::regcache): Remove.
9171         (register_dump_reg_buffer): New class.
9172         (regcache_print): Adjust.
9173         * regcache.h (regcache): Remove constructors.
9174
9175 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9176
9177         * regcache.c (class register_dump): New class.
9178         (register_dump_regcache, register_dump_none): New class.
9179         (register_dump_remote, register_dump_groups): New class.
9180         (regcache_print): Update.
9181         * regcache.h (regcache_dump_what): Move it to regcache.c.
9182         (regcache) <dump>: Remove.
9183
9184 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9185
9186         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9187          reg_buffer_rw *.
9188         (jit_unwind_reg_set_impl): Call raw_supply.
9189         (jit_frame_sniffer): Use reg_buffer_rw.
9190         * record-full.c (record_full_core_regbuf): Change its type.
9191         (record_full_core_open_1): Use reg_buffer_rw.
9192         (record_full_close): Likewise.
9193         (record_full_core_fetch_registers): Use regcache->raw_supply.
9194         (record_full_core_store_registers): Likewise.
9195         * regcache.c (regcache::get_register_status): Move it to
9196         reg_buffer.
9197         (regcache_raw_set_cached_value): Remove.
9198         (regcache::raw_set_cached_value): Remove.
9199         (regcache::raw_write): Call raw_supply.
9200         (regcache::raw_supply): Move it to reg_buffer_rw.
9201         * regcache.h (regcache_raw_set_cached_value): Remove.
9202         (reg_buffer_rw): New class.
9203
9204 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9205
9206         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9207         readonly_detached_regcache.
9208         (dummy_frame_prev_register): Use regcache->cooked_read.
9209         * frame.c (frame_save_as_regcache): Change return type.
9210         (frame_pop): Update.
9211         * frame.h (frame_save_as_regcache): Update declaration.
9212         * inferior.h (get_infcall_suspend_state_regcache): Update
9213         declaration.
9214         * infrun.c (infcall_suspend_state) <registers>: use
9215         readonly_detached_regcache.
9216         (save_infcall_suspend_state): Don't use regcache_dup.
9217         (get_infcall_suspend_state_regcache): Change return type.
9218         * linux-fork.c (struct fork_info) <savedregs>: Change to
9219         readonly_detached_regcache.
9220         <pc>: New field.
9221         (fork_save_infrun_state): Don't use regcache_dup.
9222         (info_checkpoints_command): Adjust.
9223         * mi/mi-main.c (register_changed_p): Update declaration.
9224         (mi_cmd_data_list_changed_registers): Use
9225         readonly_detached_regcache.
9226         (register_changed_p): Change parameter type to
9227         readonly_detached_regcache.
9228         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9229         readonly_detached_regcache.
9230         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9231         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9232         New.
9233         (regcache::save): Move it to reg_buffer.
9234         (regcache::restore): Change parameter type.
9235         (regcache_dup): Remove.
9236         * regcache.h (reg_buffer) <save>: New method.
9237         (readonly_detached_regcache): New class.
9238         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9239         readonly_detached_regcache.
9240         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9241
9242 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9243
9244         * frame.c (frame_save_as_regcache): Use regcache method save.
9245         (frame_pop): Use regcache method restore.
9246         * infrun.c (restore_infcall_suspend_state): Likewise.
9247         * linux-fork.c (fork_load_infrun_state): Likewise.
9248         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9249         save.
9250         * regcache.c (regcache_save): Remove.
9251         (regcache::restore): More asserts.
9252         (regcache_cpy): Remove.
9253         * regcache.h (regcache_save): Remove the declaration.
9254         (regcache::restore): Move from private to public.
9255         Remove the friend declaration of regcache_cpy.
9256         (regcache_cpy): Remove declaration.
9257
9258 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9259
9260         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9261         parameter type to 'readable_regcache *'.
9262         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9263         * arm-tdep.c (arm_neon_quad_read): Likewise.
9264         (arm_pseudo_read): Likewise.
9265         * avr-tdep.c (avr_pseudo_register_read): Likewise.
9266         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9267         * frv-tdep.c (frv_pseudo_register_read): Likewise.
9268         * gdbarch.c: Re-generated.
9269         * gdbarch.h: Re-generated.
9270         * gdbarch.sh (pseudo_register_read): Change parameter type to
9271         'readable_regcache *'.
9272         (pseudo_register_read_value): Likewise.
9273         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9274         (h8300_pseudo_register_read): Likewise.
9275         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9276         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9277         (i386_pseudo_register_read_into_value): Likewise.
9278         (i386_pseudo_register_read_value): Likewise.
9279         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9280         declaration.
9281         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9282         * m32c-tdep.c (m32c_raw_read): Likewise.
9283         (m32c_read_flg): Likewise.
9284         (m32c_banked_register): Likewise.
9285         (m32c_banked_read): Likewise.
9286         (m32c_sb_read): Likewise.
9287         (m32c_part_read): Likewise.
9288         (m32c_cat_read): Likewise.
9289         (m32c_r3r2r1r0_read): Likewise.
9290         (m32c_pseudo_register_read): Likewise.
9291         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9292         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9293         (mep_pseudo_cr64_read): Likewise.
9294         (mep_pseudo_register_read): Likewise.
9295         * mips-tdep.c (mips_pseudo_register_read): Likewise.
9296         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9297         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9298         * regcache.c (regcache::raw_read): Move it to readable_regcache.
9299         (regcache::cooked_read): Likewise.
9300         (regcache::cooked_read_value): Likewise.
9301         (regcache_cooked_read_signed):
9302         (regcache::cooked_read): Likewise.
9303         * regcache.h (readable_regcache): New class.
9304         (regcache): Inherit readable_regcache.  Move some methods to
9305         readable_regcache.
9306         * rl78-tdep.c (rl78_pseudo_register_read): Change
9307         parameter type to 'readable_regcache *'.
9308         * rs6000-tdep.c (do_regcache_raw_read): Remove.
9309         (e500_pseudo_register_read): Change parameter type to
9310         'readable_regcache *'.
9311         (dfp_pseudo_register_read): Likewise.
9312         (vsx_pseudo_register_read): Likewise.
9313         (efpr_pseudo_register_read): Likewise.
9314         * s390-tdep.c (s390_pseudo_register_read): Likewise.
9315         * sh-tdep.c (sh_pseudo_register_read): Likewise.
9316         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9317         (sh64_pseudo_register_read): Likewise.
9318         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9319         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9320         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9321         (spu_pseudo_register_read): Likewise.
9322         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9323         (xtensa_pseudo_register_read): Likewise.
9324
9325 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9326
9327         * regcache.c (regcache::regcache): Call reg_buffer ctor.
9328         (regcache::arch): Move it to reg_buffer::arch.
9329         (regcache::register_buffer): Likewise.
9330         (regcache::assert_regnum): Likewise.
9331         (regcache::num_raw_registers): Likewise.
9332         * regcache.h (reg_buffer): New class.
9333         (regcache): Inherit reg_buffer.
9334
9335 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
9336
9337         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9338         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9339
9340 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
9341
9342         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9343
9344 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
9345
9346         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9347         (SFILES): Remove common/*.c files.
9348         (COMMON_OBS): Remove some *.o files built from common/*.c files.
9349         * common/common.host: Add common reference.
9350         * configure.ac: Likewise.
9351         * configure: Regenerate.
9352
9353 2018-02-16  Yao Qi  <yao.qi@linaro.org>
9354
9355         * block.c (block_namespace_info): Inherit allocate_on_obstack.
9356         (block_initialize_namespace): Use new.
9357         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9358         (dwarf2_free_objfile): Use delete.
9359         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9360         (copy_type_recursive): Use new.
9361         * gdb_obstack.h (allocate_on_obstack): New.
9362
9363 2018-02-15  Yao Qi  <yao.qi@linaro.org>
9364
9365         PR gdb/22849
9366         * inferior.c (exit_inferior_1): Reset inf->control.
9367
9368 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
9369
9370         * ada-lang.c (ada_to_fixed_value_create): Delete advance
9371         declaration.
9372
9373 2018-02-14  Pedro Alves  <palves@redhat.com>
9374
9375         * frame-unwind.c (frame_unwind_try_unwinder): Always call
9376         frame_cleanup_after_sniffer on exception.
9377
9378 2018-02-14  Tom Tromey  <tom@tromey.com>
9379
9380         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9381         const.
9382         (solib_bfd_open): Make pathname const.
9383         * solib.c (solib_bfd_open): Make pathname const.
9384         * solib-spu.c (spu_bfd_fopen): Make name const.
9385         (spu_bfd_open): Make pathname const.
9386         * solib-darwin.c (darwin_bfd_open): Make pathname const.
9387         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9388
9389 2018-02-14  Tom Tromey  <tom@tromey.com>
9390
9391         * symfile.c (symfile_bfd_open): Update.
9392         * source.h (openp, source_full_path_of, find_and_open_source):
9393         Change argument type to unique_xmalloc_ptr.
9394         * source.c (openp): Take a unique_xmalloc_ptr.
9395         (source_full_path_of, find_and_open_source): Likewise.
9396         (open_source_file, symtab_to_fullname): Update.
9397         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9398         unique_xmalloc_ptr.
9399         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9400         (exec_file_find): Update.
9401         * psymtab.c (psymtab_to_fullname): Update.
9402         * nto-tdep.h (nto_find_and_open_solib): Update.
9403         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9404         unique_xmalloc_ptr.
9405         * exec.c (exec_file_attach): Update.
9406         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9407         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9408
9409 2018-02-14  Tom Tromey  <tom@tromey.com>
9410
9411         * solib.c: Include source.h.
9412         * nto-tdep.c: Include source.h.
9413         * mi/mi-cmd-env.c: Include source.h.
9414         * infcmd.c: Include source.h.
9415         * exec.c: Include source.h.
9416         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9417         (add_path, directory_switch, source_path, init_source_path): Move
9418         declarations...
9419         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9420         (add_path, directory_switch, source_path, init_source_path):
9421         ...here.
9422
9423 2018-02-14  Tom Tromey  <tom@tromey.com>
9424
9425         * solist.h (exec_file_find, solib_find): Return
9426         unique_xmalloc_ptr.
9427         (solib_bfd_fopen): Take a const char *.
9428         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9429         (exec_file_find, solib_find): Likewise.
9430         (solib_bfd_fopen): Do not take ownership of "pathname".
9431         (solib_bfd_open): Use unique_xmalloc_ptr.
9432         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9433         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9434         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9435         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9436
9437 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
9438
9439         * ada-lang.c (name_match_type_from_name): Remove reference to
9440         ada_name_for_lookup in function's documentation.
9441         * ada-lang.h (ada_name_for_lookup): Delete declaration.
9442
9443 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9444
9445         * defs.h (enum openp_flags): New enum.
9446         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9447         Move to enum openp_flags.
9448         (openp_flags): New enum flags.
9449         (openp): Change parameter type to openp_flags.
9450         * source.c (openp): Change parameter type to openp_flags.
9451         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9452         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9453
9454 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9455
9456         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9457         per-command.
9458
9459 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9460
9461         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9462         into...
9463         (class dwarf2_queue_guard): ...the destructor of this new class.
9464         (dw2_do_instantiate_symtab): Create instance of the new class
9465         dwarf2_queue_guard, remove cleanup.
9466
9467 2018-02-09  Tom Tromey  <tom@tromey.com>
9468
9469         * source.c (find_source_lines): Don't reference past the end of
9470         the vector.
9471
9472 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9473
9474         * remote.c (remote_btrace_maybe_reopen): Change error message.
9475         * btrace.c (btrace_enable): Likewise.
9476         (parse_xml_btrace): Likewise.
9477         (parse_xml_btrace_conf): Likewise.
9478
9479 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9480
9481         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9482         (linux_enable_pt, linux_enable_bts): Call
9483         diagnose_perf_event_open_fail.
9484
9485 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9486
9487         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9488         Remove parameter and change return type.  Update callers.  Move it.
9489         (linux_enable_bts, linux_enable_pt): Improve error message.
9490         (linux_enable_pt): Remove zero buffer size check.
9491         (linux_enable_btrace): Improve error messages.  Remove NULL return
9492         check.
9493
9494 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9495
9496         * btrace.c (btrace_enable): Remove target_supports_btrace call.
9497         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9498         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9499         (linux_supports_pt, linux_supports_btrace): Remove.
9500         (linux_enable_bts): Call cpu_supports_bts.
9501         * nat/linux-btrace.h (linux_supports_btrace): Remove.
9502         * remote.c (remote_supports_btrace): Remove.
9503         (init_remote_ops): Remove remote_supports_btrace.
9504         * target-delegates.c: Regenerated.
9505         * target.c (target_supports_btrace): Remove.
9506         * target.h (target_ops) <to_supports_btrace>: Remove
9507         (target_supports_btrace): Remove.
9508         * x86-linux-nat.c (x86_linux_create_target): Remove
9509         linux_supports_btrace.
9510
9511 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9512
9513         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9514         btrace failed.
9515         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9516         exception and use message in own exception.
9517
9518 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9519
9520         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9521         (perf_event_pt_event_type): Use gdb_file_up.
9522         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9523         scoped_fd, and scoped_mmap.
9524
9525 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9526
9527         * common/scoped_mmap.h: New.
9528         * unittests/scoped_mmap-selftest.c: New.
9529         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9530         unittests/scoped_mmap-selftest.c.
9531
9532 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9533
9534         * common/scoped_fd.h: New.
9535         * unittests/scoped_fd-selftest.c: New.
9536         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9537         unittests/scoped_fd-selftest.c.
9538
9539 2018-02-09  Tom Tromey  <tom@tromey.com>
9540
9541         * auto-load.c (auto_load_section_scripts): Use
9542         gdb::unique_xmalloc_ptr.
9543
9544 2018-02-09  Tom Tromey  <tom@tromey.com>
9545
9546         * auto-load.c (execute_script_contents): Use std::string.
9547
9548 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
9549
9550         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9551         Python function, rather than a new command.
9552
9553 2018-02-08  Tom Tromey  <tom@tromey.com>
9554
9555         * solib.c (solib_find_1): Use std::string.
9556         (solib_bfd_fopen): Use unique_xmalloc_ptr.
9557
9558 2018-02-08  Tom Tromey  <tom@tromey.com>
9559
9560         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9561
9562 2018-02-08  Tom Tromey  <tom@tromey.com>
9563
9564         * source.c (find_source_lines): Use gdb::def_vector.
9565
9566 2018-02-08  Tom Tromey  <tom@tromey.com>
9567
9568         * macrocmd.c (struct temporary_macro_definition): New.
9569         (macro_define_command): Use temporary_macro_definition.  Remove
9570         cleanups.
9571         (free_macro_definition_ptr): Remove.
9572
9573 2018-02-08  Tom Tromey  <tom@tromey.com>
9574
9575         * macroexp.c (maybe_expand): Use std::string.
9576
9577 2018-02-08  Tom Tromey  <tom@tromey.com>
9578
9579         * macroexp.c (struct macro_buffer): Add initializers for some
9580         members.
9581         (init_buffer, init_shared_buffer, free_buffer)
9582         (free_buffer_return_text): Remove.
9583         (macro_buffer): New constructors.
9584         (~macro_buffer): New destructor.
9585         (macro_buffer::set_shared): New method.
9586         (macro_buffer::resize_buffer, macro_buffer::appendc)
9587         (macro_buffer::appendmem): Now methods, not free functions.
9588         (set_token, append_tokens_without_splicing, stringify)
9589         (macro_stringify): Update.
9590         (gather_arguments): Change return type.  Remove argc_p argument,
9591         add args_ptr argument.  Use std::vector.
9592         (substitute_args): Remove argc argument.  Accept std::vector.
9593         (expand): Update.  Use std::vector.
9594         (scan, macro_expand, macro_expand_next): Update.
9595
9596 2018-02-08  Tom Tromey  <tom@tromey.com>
9597
9598         * symtab.c (default_collect_symbol_completion_matches_break_on):
9599         Use unique_xmalloc_ptr.
9600         * macroscope.h: (sal_macro_scope, user_macro_scope)
9601         (default_macro_scope): Return unique_xmalloc_ptr.
9602         * macroscope.c (sal_macro_scope, user_macro_scope)
9603         (default_macro_scope): Return unique_xmalloc_ptr.
9604         * macroexp.h (macro_expand, macro_expand_once): Return
9605         unique_xmalloc_ptr.
9606         * macroexp.c (macro_expand, macro_expand_once): Return
9607         unique_xmalloc_ptr.
9608         * macrocmd.c (macro_expand_command, macro_expand_once_command)
9609         (info_macro_command, info_macros_command): Use
9610         unique_xmalloc_ptr.
9611         * compile/compile-c-support.c (write_macro_definitions): Use
9612         unique_xmalloc_ptr.
9613         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9614
9615 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
9616
9617         * value.c (value_static_field): Assign field type instead of
9618         containing type when returning an optimized out value.
9619
9620 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9621
9622         * ft32-tdep.c (ft32_read_pc): Remove.
9623         (ft32_write_pc): Remove.
9624         (ft32_gdbarch_init): Update.
9625         * m32r-tdep.c (m32r_read_pc): Remove.
9626         (m32r_gdbarch_init): Update.
9627         * mep-tdep.c (mep_read_pc): Remove.
9628         (mep_gdbarch_init): Update.
9629         * microblaze-tdep.c (microblaze_write_pc): Remove.
9630         (microblaze_gdbarch_init): Update.
9631         * mn10300-tdep.c (mn10300_read_pc): Remove.
9632         (mn10300_write_pc): Remove.
9633         (mn10300_gdbarch_init): Update.
9634         * moxie-tdep.c (moxie_read_pc): Remove.
9635         (moxie_write_pc): Remove.
9636         (moxie_gdbarch_init): Update.
9637
9638 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9639
9640         * expprint.c (print_subexp_standard): Handle
9641         OP_F77_UNDETERMINED_ARGLIST.
9642         (dump_subexp_body_standard): Likewise.
9643
9644 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
9645
9646         * target-descriptions.c (tdesc_element_visitor) Add empty
9647         implementations.
9648         (tdesc_type): Move make_gdb_type from here.
9649         (tdesc_type_builtin): Likewise.
9650         (tdesc_type_vector): Likewise.
9651         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9652         (make_gdb_type_struct): Move from tdesc_type_with_fields.
9653         (make_gdb_type_union): Likewise.
9654         (make_gdb_type_flags): Likewise.
9655         (make_gdb_type_enum): Likewise.
9656         (make_gdb_type): New function.
9657         (tdesc_register_type): Use static make_gdb_type.
9658
9659 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
9660
9661         * infcmd.c (default_print_one_register_info): Align natural-format
9662         column values consistently one under another.
9663         (pad_to_column): New function.
9664
9665 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
9666
9667         * dwarf2read.c (dwarf2_physname): Move commment.
9668
9669 2018-02-01  Leszek Swirski  <leszeks@google.com>
9670
9671         * varobj.c (varobj_formatted_print_options): Allow recursive
9672         pretty printing if pretty printing is enabled.
9673
9674 2018-02-01  Leszek Swirski  <leszeks@google.com>
9675
9676         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9677         names after a structop as a filename.
9678
9679 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9680
9681         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9682         (arm_record_coproc_data_proc): Likewise.
9683
9684 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9685
9686         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9687
9688 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
9689
9690         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9691         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9692
9693 2018-01-31  Pedro Alves  <palves@redhat.com>
9694
9695         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9696         * inflow.c (child_terminal_save_inferior): Wrap reference to
9697         tcgetpgrp in HAVE_TERMIOS_H.
9698         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9699         _WIN32.
9700         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9701         always iterate over all inferiors.
9702         (gdbsim_cntrl_c): Adjust.
9703         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9704
9705 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9706
9707         * gdbtypes.c (lookup_array_range_type): Make sure the array's
9708         index type is objfile-owned if the element type is as well.
9709
9710 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9711
9712         GDB 8.1 released.
9713
9714 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9715
9716         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9717         "features/s390x-linux64.c".
9718         (_initialize_s390_linux_tdep): Remove initialization of tdescs
9719         s390_linux32 and s390x_linux64.
9720         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9721         default tdesc.
9722         * s390-tdep.c: Include "features/s390-linux32.c" and
9723         "features/s390x-linux64.c".
9724         (s390_tdesc_valid): Add check for tdesc_has_registers.
9725         (s390_gdbarch_init): Make sure there is always a valid tdesc.
9726         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9727         tdesc_s390x_linux64.
9728         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9729         tdesc_s390x_linux64 to...
9730         * s390-tdep.h: ...here.
9731
9732 2018-01-30  Pedro Alves  <palves@redhat.com>
9733
9734         PR gdb/13211
9735         * config.in, configure: Regenerate.
9736         * configure.ac: Check for getpgid.
9737         * go32-nat.c (go32_pass_ctrlc): New.
9738         (go32_target): Install it.
9739         * inf-child.c (inf_child_target): Install
9740         child_terminal_save_inferior, child_pass_ctrlc and
9741         child_interrupt.
9742         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9743         (inf_ptrace_target): No longer install it.
9744         * infcmd.c (interrupt_target_1): Adjust.
9745         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9746         (child_interrupt): Declare.
9747         (inferior::terminal_state): New.
9748         * inflow.c (struct terminal_info): Update comments.
9749         (inferior_process_group): Delete.
9750         (terminal_is_ours): Delete.
9751         (gdb_tty_state): New.
9752         (child_terminal_init): Adjust.
9753         (is_gdb_terminal, sharing_input_terminal_1)
9754         (sharing_input_terminal): New functions.
9755         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
9756         Set the process's actual process group in the foreground if
9757         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
9758         mark terminal as the inferior's if not sharing GDB's terminal.
9759         Don't check attach_flag.
9760         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9761         pass down a target_terminal_state.
9762         (child_terminal_save_inferior): New, factored out from ...
9763         (child_terminal_ours_1): ... this.  Handle
9764         target_terminal_state::is_ours_for_output.
9765         (child_interrupt, child_pass_ctrlc): New.
9766         (inflow_inferior_exit): Clear the inferior's terminal_state.
9767         (copy_terminal_info): Copy the inferior's terminal state.
9768         (_initialize_inflow): Remove reference to terminal_is_ours.
9769         * inflow.h (inferior_process_group): Delete.
9770         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9771         * procfs.c (procfs_target): Don't install procfs_interrupt.
9772         (procfs_interrupt): Delete.
9773         * remote.c (remote_serial_quit_handler): Adjust.
9774         (remote_interrupt): Remove ptid parameter.  Adjust.
9775         * target-delegates.c: Regenerate.
9776         * target.c: Include "terminal.h".
9777         (target_terminal::terminal_state): Rename to ...
9778         (target_terminal::m_terminal_state): ... this.
9779         (target_terminal::init): Adjust.
9780         (target_terminal::inferior): Adjust to per-inferior
9781         terminal_state.
9782         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9783         (target_terminal::ours, target_terminal::ours_for_output): Use
9784         target_terminal_is_ours_kind.
9785         (target_interrupt): Remove ptid parameter.  Adjust.
9786         (default_target_pass_ctrlc): Adjust.
9787         * target.h (target_ops::to_terminal_save_inferior): New field.
9788         (target_ops::to_interrupt): Remove ptid_t parameter.
9789         (target_interrupt): Remove ptid_t parameter.  Update comment.
9790         (target_pass_ctrlc): Update comment.
9791         * target/target.h (target_terminal_state): New scoped enum,
9792         factored out of ...
9793         (target_terminal::terminal_state): ... here.
9794         (target_terminal::inferior): Update comments.
9795         (target_terminal::restore_inferior): New.
9796         (target_terminal::is_inferior, target_terminal::is_ours)
9797         (target_terminal::is_ours_for_output): Adjust.
9798         (target_terminal::scoped_restore_terminal_state): Adjust to
9799         rename, and call restore_inferior() instead of inferior().
9800         (target_terminal::scoped_restore_terminal_state::m_state): Change
9801         type.
9802         (target_terminal::terminal_state): Rename to ...
9803         (target_terminal::m_terminal_state): ... this and change type.
9804
9805 2018-01-30  Pedro Alves  <palves@redhat.com>
9806
9807         * linux-nat.c (wait_for_signal): New function.
9808         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9809         directly.
9810         (async_terminal_is_ours)
9811         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9812         (linux_nat_add_target): Don't override
9813         to_terminal_inferior/to_terminal_ours.
9814
9815 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
9816
9817         * remote.c (remote_follow_fork): Don't call "detach_inferior".
9818
9819 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
9820
9821         * dwarf2read.c (free_dwo_files): Add forward-declaration.
9822         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9823         dwarf2_per_objfile_free here.
9824         (dwarf2_per_objfile_free): Remove.
9825         (_initialize_dwarf2_read): Don't register
9826         dwarf2_per_objfile_free as a registry cleanup.
9827
9828 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
9829
9830         Avoid compilation errors in MinGW native builds
9831
9832         The error is triggered by including python-internal.h, and the
9833         error message is:
9834
9835              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9836                       from build-gnulib/import/math.h:27,
9837                       from d:/usr/Python26/include/pyport.h:235,
9838                       from d:/usr/Python26/include/Python.h:58,
9839                       from python/python-internal.h:94,
9840                       from python/py-arch.c:24:
9841              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9842         using ::hypot;
9843                 ^~~~~
9844
9845         This happens because Python headers define 'hypot' to expand t
9846         '_hypot' in the Windows builds.
9847         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9848         'hypoth'.  This avoids a compilation error.
9849
9850 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
9851
9852         * MAINTAINERS (Write After Approval): Fix ordering.
9853
9854 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
9855
9856         * MAINTAINERS (Write After Approval): Add Alan Hayward.
9857
9858 2018-01-26  Alan Modra  <amodra@gmail.com>
9859
9860         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9861         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9862         Remove nop.  Make const.  Comment.
9863         (powerpc32_plt_stub_so_2): New.
9864         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9865         Correct count.  Update uses.
9866         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9867         Move common code reading PLT entry word.  Correct
9868         powerpc32_plt_stub PLT address calculation.
9869         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9870         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9871         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9872         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9873         (ppc64_standard_linkage8): Likewise.
9874         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9875         Correct insns description.
9876         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9877
9878 2018-01-24  Pedro Alves  <palves@redhat.com>
9879
9880         GCC PR libstdc++/83906
9881         * gdbtypes.c (operator==(const dynamic_prop &,
9882         const dynamic_prop &)): New.
9883         (operator==(const range_bounds &, const range_bounds &)): New.
9884         (check_types_equal): Use them instead of memcmp.
9885         * gdbtypes.h (operator==(const dynamic_prop &,
9886         const dynamic_prop &)): Declare.
9887         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9888         (operator==(const range_bounds &, const range_bounds &)): Declare.
9889         (operator!=(const range_bounds &, const range_bounds &)): Declare.
9890
9891 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9892
9893         * s390-linux-tdep.c (s390_record_address_mask)
9894         (s390_record_calc_disp_common, s390_record_calc_disp)
9895         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9896         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9897         (s390_process_record): Move to s390-tdep.c.
9898         (s390_linux_init_abi_any): Adjust.
9899         * s390-tdep.c (s390_record_address_mask)
9900         (s390_record_calc_disp_common, s390_record_calc_disp)
9901         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9902         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9903         (s390_process_record): Moved from s390-linux-tdep.c
9904         (s390_gdbarch_init): Adjust.
9905
9906 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9907
9908         * s390-linux-nat.c (s390-tdep.h): New include.
9909         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9910         (HFILES_NO_SRCDIR): Add s390-tdep.h.
9911         (ALLDEPFILES): Add s390-tdep.c.
9912         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9913         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9914         * s390-tdep.h: ...this.  New file.
9915         * s390-linux-tdep.c (s390-tdep.h): New include.
9916         (_initialize_s390_tdep): Rename to...
9917         (_initialize_s390_linux_tdep): ...this and adjust.
9918         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9919         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9920         s390-tdep.h.
9921         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9922         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9923         (s390_is_partial_instruction, s390_software_single_step)
9924         (is_non_branch_ril, s390_displaced_step_copy_insn)
9925         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9926         (s390_prologue_data, s390_addr, s390_store, s390_load)
9927         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9928         (s390_register_call_saved, s390_guess_tracepoint_registers)
9929         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9930         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9931         (s390_pseudo_register_name, s390_pseudo_register_type)
9932         (s390_pseudo_register_read, s390_pseudo_register_write)
9933         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9934         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9935         (s390_addr_bits_remove, s390_address_class_type_flags)
9936         (s390_address_class_type_flags_to_name)
9937         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9938         (s390_function_arg_float, s390_function_arg_vector)
9939         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9940         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9941         (s390_frame_align, s390_register_return_value, s390_return_value)
9942         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9943         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9944         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9945         (s390_trad_frame_prev_register, s390_unwind_cache)
9946         (s390_prologue_frame_unwind_cache)
9947         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9948         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9949         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9950         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9951         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9952         (s390_frame_base_address, s390_local_base_address)
9953         (s390_frame_base, s390_gcc_target_options)
9954         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9955         (s390_validate_reg_range, s390_tdesc_valid)
9956         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9957         * s390-tdep.c: ...this.  New file.
9958
9959 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9960
9961         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9962         (s390_process_record, s390_gdbarch_tdep_alloc)
9963         (s390_linux_init_abi_any): Use/set new hook.
9964
9965 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9966
9967         * s390-linux-tdep.c (osabi.h): New include.
9968         (s390_linux_init_abi_31, s390_linux_init_abi_64)
9969         (s390_linux_init_abi_any): New functions.
9970         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9971
9972 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9973
9974         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9975         tdesc_has_registers check
9976
9977 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9978
9979         * s390-linux-tdep.c (s390_tdesc_valid): New function.
9980         (s390_validate_reg_range): New macro.
9981         (s390_gdbarch_init): Adjust.
9982
9983 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9984
9985         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9986         (s390_gdbarch_tdep_alloc): Adjust.
9987         (s390_gdbarch_init): Adjust.
9988
9989 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9990
9991         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9992         <have_tdb>: Change type to bool.
9993         (s390_gdbarch_tdep_alloc): Adjust.
9994         (s390_gdbarch_init): Adjust.
9995
9996 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9997
9998         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9999         (gdbarch_tdep) <have_upper, have_vx>: New fields.
10000         (s390_gdbarch_tdep_alloc): New function.
10001         (s390_gdbarch_init): Allocate tdep at start and use its fields
10002         instead of separate variables.
10003
10004 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10005
10006         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10007         when looking for cached gdbarch and add comment for remaining.
10008
10009 2018-01-22  Pedro Alves  <palves@redhat.com>
10010             Sergio Durigan Junior  <sergiodj@redhat.com>
10011
10012         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10013         case.
10014
10015 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
10016
10017         * MAINTAINERS: Update my company e-mail address.
10018
10019 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10020
10021         * regcache.c (cooked_write_test): New function.
10022         (_initialize_regcache): Register the test.
10023
10024 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10025
10026         * ia64-tdep.c (ia64_pseudo_register_read): Call
10027         regcache->cooked_read instead of regcache_cooked_read_unsigned.
10028         * m32c-tdep.c (m32c_cat_read): Likewise.
10029         (m32c_r3r2r1r0_read): Likewise.
10030         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10031         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10032
10033 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10034
10035         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10036         method raw_read instead of regcache_raw_read.
10037         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10038         * arm-tdep.c (arm_neon_quad_read): Likewise.
10039         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10040         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10041         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10042         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10043         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10044         (i386_pseudo_register_read_into_value): Likewise.
10045         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10046         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10047         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10048         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10049         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10050         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
10051         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10052         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
10053         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10054
10055 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10056
10057         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10058         * configure.tgt: Remove target mt.
10059         * mt-tdep.c: Remove.
10060         * regcache.c (cooked_read_test): Remove the check for mt.
10061
10062 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10063
10064         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10065         instead of gdbarch_pseudo_register_read_value.
10066
10067 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10068
10069         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10070         language is Ada.
10071
10072 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10073
10074         * linespec.c (create_sals_line_offset): Remove code that preserved
10075         the symtab_and_line's line number.
10076
10077 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10078
10079         * varobj.c (varobj_create): Don't set valid_block when creating a
10080         floating varobj.
10081
10082 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10083
10084         * varobj.c (varobj_create): Remove out of date comment.
10085
10086 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10087
10088         PR mi/20395
10089         * ada-exp.y (write_var_from_sym): Pass extra parameter when
10090         updating innermost block.
10091         * parse.c (innermost_block_tracker::update): Take extra type
10092         parameter, and check types match before updating innermost block.
10093         (write_dollar_variable): Update innermost block for registers.
10094         * parser-defs.h (enum innermost_block_tracker_type): New enum.
10095         (innermost_block_tracker::innermost_block_tracker): Initialise
10096         m_types member.
10097         (innermost_block_tracker::reset): Take type parameter.
10098         (innermost_block_tracker::update): Take type parameter, and pass
10099         type through as needed.
10100         (innermost_block_tracker::m_types): New member.
10101         * varobj.c (varobj_create): Pass type when reseting innermost
10102         block.
10103
10104 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10105
10106         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10107         * ada-lang.c (resolve_subexp): Likewise.
10108         * breakpoint.c (set_breakpoint_condition) Likewise.
10109         (watch_command_1) Likewise.
10110         * c-exp.y (variable): Likewise.
10111         * d-exp.y (PrimaryExpression): Likewise.
10112         * f-exp.y (variable): Likewise.
10113         * go-exp.y (variable): Likewise.
10114         * m2-exp.y (variable): Likewise.
10115         * objfiles.c (objfile::~objfile): Likewise.
10116         * p-exp.y (variable): Likewise.
10117         * parse.c (innermost_block): Change type.
10118         * parser-defs.h (class innermost_block_tracker): New.
10119         (innermost_block): Change to innermost_block_tracker.
10120         * printcmd.c (display_command): Switch to innermost_block API.
10121         (do_one_display): Likewise.
10122         * rust-exp.y (do_one_display): Likewise.
10123         * symfile.c (clear_symtab_users): Likewise.
10124         * varobj.c (varobj_create): Switch to innermost_block API, replace
10125         use of innermost_block with block stored on varobj object.
10126
10127 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10128
10129         * expression.h (innermost_block): Remove declaration.
10130         * varobj.c: Add 'parser-defs.h' include.
10131
10132 2018-01-19  Tom Tromey  <tom@tromey.com>
10133
10134         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10135         symbols in the static and global blocks.
10136
10137 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
10138
10139         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10140         gdb_ptrace.h, and move including gdb_wait.h ...
10141         * nat/linux-ptrace.h: ... to here.
10142
10143 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10144
10145         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10146         inf_ptrace_detach_success.
10147         (inf_ptrace_detach_success): Add inferior parameter, use it
10148         instead of inferior_ptid, pass it to detach_inferior.
10149         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10150         parameter.
10151         * inferior.c (detach_inferior): Add overload that takes an
10152         inferior object.
10153         * inferior.h (detach_inferior): Likewise.
10154         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10155         use inferior_ptid, adjust call to inf_ptrace_detach_success.
10156         * linux-thread-db.c (thread_db_detach): Use inf parameter.
10157
10158 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10159
10160         * target.h (struct target_ops) <to_detach>: Add inferior
10161         parameter.
10162         (target_detach): Likewise.
10163         * target.c (dispose_inferior): Pass inferior down.
10164         (target_detach): Pass inferior down.  Assert that it is equal to
10165         the current inferior.
10166         * aix-thread.c (aix_thread_detach): Pass inferior down.
10167         * corefile.c (core_file_command): Pass current_inferior() down.
10168         * corelow.c (core_detach): Add inferior parameter.
10169         * darwin-nat.c (darwin_detach): Likewise.
10170         * gnu-nat.c (gnu_detach): Likewise.
10171         * inf-ptrace.c (inf_ptrace_detach): Likewise.
10172         * infcmd.c (detach_command): Pass current_inferior() down to
10173         target_detach.
10174         * infrun.c (follow_fork_inferior): Pass parent_inf to
10175         target_detach.
10176         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10177         target_detach.
10178         * linux-nat.c (linux_nat_detach): Add inferior parameter.
10179         * linux-thread-db.c (thread_db_detach): Likewise.
10180         * nto-procfs.c (procfs_detach): Likewise.
10181         * procfs.c (procfs_detach): Likewise.
10182         * record.c (record_detach): Likewise.
10183         * record.h (struct inferior): Forward-declare.
10184         (record_detach): Add inferior parameter.
10185         * remote-sim.c (gdbsim_detach): Likewise.
10186         * remote.c (remote_detach_1): Likewise.
10187         (remote_detach): Likewise.
10188         (extended_remote_detach): Likewise.
10189         * sol-thread.c (sol_thread_detach): Likewise.
10190         * target-debug.h (target_debug_print_inferior_p): New macro.
10191         * target-delegates.c: Re-generate.
10192         * top.c (kill_or_detach): Pass inferior down to target_detach.
10193         * windows-nat.c (windows_detach): Add inferior parameter.
10194
10195 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10196
10197         * target.h (struct target_ops) <to_detach>: Remove args
10198         parameter.
10199         (target_detach): Likewise.
10200         * target.c (dispose_inferior): Adjust.
10201         (target_detach): Remove args parameter, adjust.
10202         * aix-thread.c (aix_thread_detach): Adjust.
10203         * corefile.c (core_file_command): Adjust.
10204         * corelow.c (core_detach): Adjust.
10205         * darwin-nat.c (darwin_detach): Adjust.
10206         * gnu-nat.c (gnu_detach): Adjust.
10207         * inf-ptrace.c (inf_ptrace_detach): Adjust.
10208         * infcmd.c (detach_command): Adjust
10209         * infrun.c (follow_fork_inferior): Adjust.
10210         (handle_vfork_child_exec_or_exit): Adjust.
10211         * linux-fork.c (linux_fork_detach): Remove args parameter.
10212         * linux-fork.h (linux_fork_detach): Likewise.
10213         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10214         * linux-thread-db.c (thread_db_detach): Likewise.
10215         * nto-procfs.c (procfs_detach): Likewise.
10216         * procfs.c (procfs_detach): Likewise.
10217         (do_detach): Remove signo parameter.
10218         * record.c (record_detach): Remove args parameter.
10219         * record.h (record_detach): Likewise.
10220         * remote-sim.c (gdbsim_detach): Likewise.
10221         * remote.c (remote_detach_1): Likewise.
10222         (remote_detach): Likewise.
10223         (extended_remote_detach): Likewise.
10224         * sol-thread.c (sol_thread_detach): Likewise.
10225         * target-delegates.c: Re-generate.
10226         * top.c (struct qt_args) <args>: Remove field.
10227         (kill_or_detach): Don't pass args.
10228         (quit_force): Don't set args.
10229         * windows-nat.c (windows_detach): Remove args parameter.
10230
10231 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10232
10233         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10234         (arm_linux_init_abi): Install it.
10235
10236 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10237
10238         * osabi.c (gdb_osabi_names): Extend the regexp for
10239         arm-linux-gnueabihf.
10240
10241 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10242
10243         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10244         m_abbrevs.
10245         (abbrev_table::add_abbrev): Update.
10246         (abbrev_table::lookup_abbrev): Update.
10247
10248 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10249
10250         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10251
10252 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
10253
10254         * compile/compile.c (compile_to_object): Convert "triplet_rx"
10255         to "std::string".
10256
10257 2018-01-17  Tom Tromey  <tom@tromey.com>
10258
10259         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
10260
10261 2018-01-17  Tom Tromey  <tom@tromey.com>
10262
10263         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10264         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10265         (create_array_type_with_stride): Update.
10266         * dwarf2read.c (set_die_type): Update.
10267
10268 2018-01-17  Tom Tromey  <tom@tromey.com>
10269
10270         * dwarf2read.c (delayed_method_info): Remove typedef.
10271         (dwarf2_cu::method_info): Now a std::vector.
10272         (add_to_method_list): Update.
10273         (free_delayed_list): Remove.
10274         (compute_delayed_physnames): Update.
10275         (process_full_comp_unit, process_full_type_unit): Clear the method
10276         list.  Remove cleanups.
10277         (psymtab_include_file_name): Add name_holder parameter.  Use
10278         unique_xmalloc_ptr.
10279         (dwarf_decode_lines): Update.
10280
10281 2018-01-17  Tom Tromey  <tom@tromey.com>
10282             Simon Marchi  <simon.marchi@ericsson.com>
10283
10284         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10285         (dwarf2_per_objfile::free_cached_comp_units)
10286         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10287         (init_cutu_and_read_dies_no_follow): Update.
10288         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10289         (dwarf2_cu::~dwarf2_cu): New.
10290         (free_heap_comp_unit, free_stack_comp_unit): Remove.
10291         (age_cached_comp_units, free_one_cached_comp_unit): Update.
10292
10293 2018-01-17  Tom Tromey  <tom@tromey.com>
10294             Simon Marchi  <simon.marchi@ericsson.com>
10295
10296         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10297         (struct die_reader_specs) <abbrev_table>: New member.
10298         (struct abbrev_table): Add constructor.
10299         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10300         <abbrev_obstack>: Now an auto_obstack.
10301         (abbrev_table_up): New typedef.
10302         (init_cu_die_reader): Add abbrev_table parameter.
10303         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10304         Add result_dwo_abbrev_table.
10305         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10306         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10307         Update.
10308         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10309         parameter.
10310         (skip_children): Update.
10311         (abbrev_table::alloc_abbrev): Rename from
10312         abbrev_table_alloc_abbrev.
10313         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10314         (abbrev_table::lookup_abbrev): Rename from
10315         abbrev_table_lookup_abbrev.
10316         (abbrev_table_read_table): Return abbrev_table_up.
10317         (abbrev_table_free, abbrev_table_free_cleanup)
10318         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10319         (load_partial_dies): Update.
10320
10321 2018-01-17  Tom Tromey  <tom@tromey.com>
10322
10323         * dwarf2read.c (dwarf2_compute_name): Update comment.
10324         (read_func_scope, read_variable): Update.
10325         (new_symbol): Remove.
10326         (new_symbol_full): Rename to new_symbol.
10327
10328 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
10329
10330         PR gdb/16577
10331         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10332         a warning instead of throwing an error, set section size to 0 and return
10333         NULL.
10334         * gdb_bfd.h (gdb_bfd_map_section): Update description.
10335
10336 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10337
10338         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10339         std::string.
10340         (linux_ptrace_attach_fail_reason_string): Likewise.
10341         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10342         Likewise.
10343         (linux_ptrace_attach_fail_reason_string): Likewise.
10344         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10345
10346 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10347
10348         * linux-nat.c (linux_nat_attach): Remove xstrdup.
10349
10350 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
10351
10352         PR gdb/21559
10353         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10354         checking for fs_base/gs_base fields in struct user_regs_struct.
10355         * configure: Regenerate.
10356
10357 2018-01-17  Yao Qi  <yao.qi@linaro.org>
10358
10359         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10360         function.
10361         (aarch64_linux_init_abi): Install it to gdbarch hook
10362         gcc_target_options.
10363
10364 2018-01-15  Pedro Alves  <palves@redhat.com>
10365
10366         * common/signals-state-save-restore.c
10367         (save_original_signals_state): Fix typos.
10368
10369 2017-01-12  Tom Tromey  <tom@tromey.com>
10370             Sergio Durigan Junior  <sergiodj@redhat.com>
10371
10372         * Makefile.in (install-only): Install gdb-add-index.
10373
10374 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
10375
10376         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10377
10378 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10379
10380         * infrun.c (keep_going_pass_signal): Clear step-over info when
10381         insert_breakpoints fails.
10382
10383 2018-01-11  Pedro Alves  <palves@redhat.com>
10384
10385         PR gdb/22583
10386         * infrun.c (resume): Rename to ...
10387         (resume_1): ... this.
10388         (resume): Reimplement as wrapper around resume_1.
10389
10390 2018-01-11  Pedro Alves  <palves@redhat.com>
10391
10392         PR remote/22597
10393         * remote.c (remote_parse_stop_reply): Default to the last-set
10394         general thread instead of to 'magic_null_ptid'.
10395
10396 2018-01-10  Pedro Alves  <palves@redhat.com>
10397
10398         * language.h (language_get_symbol_name_matcher): Rename ...
10399         (get_symbol_name_matcher): ... this.
10400         * language.c (language_get_symbol_name_matcher): Ditto.
10401         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10402         callers adjusted.
10403
10404 2018-01-10  Pedro Alves  <palves@redhat.com>
10405
10406         PR gdb/22670
10407         * dwarf2read.c
10408         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10409         Adjust to use language_get_symbol_name_matcher instead of
10410         language_defn::la_get_symbol_name_matcher.
10411         * language.c (language_get_symbol_name_matcher): If in Ada mode
10412         and the lookup name is a verbatim match, return Ada's matcher.
10413         * language.h (language_get_symbol_name_matcher): Adjust comment.
10414         (ada_lookup_name_info::verbatim_p):: New method.
10415
10416 2018-01-10  Pedro Alves  <palves@redhat.com>
10417
10418         PR gdb/22670
10419         * ada-lang.c (ada_collect_symbol_completion_matches): If the
10420         minsym's language is language_auto or language_cplus, pass down
10421         language_ada instead.
10422         * symtab.c (compare_symbol_name): Don't frob symbol language here.
10423
10424 2018-01-10  Pedro Alves  <palves@redhat.com>
10425
10426         PR gdb/22670
10427         * minsyms.c (linkage_name_str): New function.
10428         (iterate_over_minimal_symbols): Use it.
10429
10430 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10431
10432         * NEWS: Document that 'info proc' now works on FreeBSD.
10433
10434 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10435
10436         * configure.ac: Check for kinfo_getfile in libutil.
10437         * configure: Regenerate.
10438         * config.in: Regenerate.
10439         * fbsd-nat.c: Include "fbsd-tdep.h".
10440         (fbsd_fetch_cmdline): New.
10441         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10442         rather than calling error.
10443         (fbsd_info_proc): New.
10444         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10445         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10446         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10447
10448 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10449
10450         * fbsd-nat.c (struct free_deleter): Remove.
10451         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10452
10453 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10454
10455         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10456         NULL for an empty pathname.
10457
10458 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10459
10460         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10461         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10462         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10463         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10464         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10465         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10466         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10467         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10468         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10469         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10470         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10471         (fbsd_core_fetch_timeval, fbsd_print_sigset)
10472         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10473         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
10474         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10475
10476 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
10477
10478         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10479         (gnu_xfer_auxv): New function.
10480         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10481         TARGET_OBJECT_AUXV.
10482
10483 2018-01-08  Yao Qi  <yao.qi@linaro.org>
10484             Simon Marchi  <simon.marchi@ericsson.com>
10485
10486         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10487         common/selftest.c.
10488         (COMMON_OBS): Remove selftest.o.
10489         * configure.ac: Append selftest-arch.c and common/selftest.c to
10490         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
10491         * configure: Re-generated.
10492         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10493         GDB_SELF_TEST.
10494         (maintenance_info_selftests): Likewise.
10495
10496 2018-01-08  Xavier Roirand  <roirand@adacore.com>
10497
10498         * ada-valprint.c (val_print_packed_array_elements): Use
10499         proper number of elements when printing an array indexed
10500         by an enumeration type.
10501
10502 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10503
10504         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10505         (dw2_get_file_names_reader): Adjust.
10506         (lookup_dwo_signatured_type): Adjust.
10507         (lookup_dwp_signatured_type): Adjust.
10508         (lookup_signatured_type): Adjust.
10509         (create_type_unit_group): Adjust.
10510         (get_type_unit_group): Adjust.
10511         (process_psymtab_comp_unit_reader): Adjust.
10512         (build_type_psymtabs_reader): Adjust.
10513         (scan_partial_symbols): Adjust.
10514         (add_partial_symbol): Adjust.
10515         (add_partial_subprogram): Adjust.
10516         (peek_die_abbrev): Adjust.
10517         (fixup_go_packaging): Adjust.
10518         (process_imported_unit_die): Adjust.
10519         (dwarf2_compute_name): Adjust.
10520         (dwarf2_physname): Adjust.
10521         (read_import_statement): Adjust.
10522         (handle_DW_AT_stmt_list): Adjust.
10523         (read_file_scope): Adjust.
10524         (read_func_scope): Adjust.
10525         (read_lexical_block_scope): Adjust.
10526         (read_call_site_scope): Adjust.
10527         (read_variable): Adjust.
10528         (dwarf2_rnglists_process): Adjust.
10529         (dwarf2_ranges_process): Adjust.
10530         (dwarf2_ranges_read): Adjust.
10531         (dwarf2_get_pc_bounds): Adjust.
10532         (dwarf2_record_block_ranges): Adjust.
10533         (dwarf2_add_field): Adjust.
10534         (dwarf2_add_member_fn): Adjust.
10535         (read_structure_type): Adjust.
10536         (process_structure_scope): Adjust.
10537         (read_enumeration_type): Adjust.
10538         (read_array_type): Adjust.
10539         (mark_common_block_symbol_computed): Adjust.
10540         (read_common_block): Adjust.
10541         (read_namespace_type): Adjust.
10542         (read_namespace): Adjust.
10543         (read_module_type): Adjust.
10544         (read_tag_pointer_type): Adjust.
10545         (read_tag_ptr_to_member_type): Adjust.
10546         (read_tag_string_type): Adjust.
10547         (read_subroutine_type): Adjust.
10548         (read_typedef): Adjust.
10549         (read_base_type): Adjust.
10550         (attr_to_dynamic_prop): Adjust.
10551         (read_subrange_type): Adjust.
10552         (read_unspecified_type): Adjust.
10553         (dwarf2_read_abbrevs): Adjust.
10554         (load_partial_dies): Adjust.
10555         (read_partial_die): Adjust.
10556         (find_partial_die): Adjust.
10557         (guess_partial_die_structure_name): Adjust.
10558         (fixup_partial_die): Adjust.
10559         (read_attribute_value): Adjust.
10560         (read_addr_index): Adjust.
10561         (read_addr_index_from_leb128): Adjust.
10562         (read_str_index): Adjust.
10563         (dwarf2_string_attr): Adjust.
10564         (get_debug_line_section): Adjust.
10565         (dwarf_decode_line_header): Adjust.
10566         (lnp_state_machine::check_line_address): Adjust.
10567         (dwarf_decode_lines_1): Adjust.
10568         (dwarf_decode_lines): Adjust.
10569         (dwarf2_start_symtab): Adjust.
10570         (var_decode_location): Adjust.
10571         (new_symbol_full): Adjust.
10572         (dwarf2_const_value_data): Adjust.
10573         (dwarf2_const_value_attr): Adjust.
10574         (dwarf2_const_value): Adjust.
10575         (die_type): Adjust.
10576         (die_containing_type): Adjust.
10577         (build_error_marker_type): Adjust.
10578         (lookup_die_type): Adjust.
10579         (guess_full_die_structure_name): Adjust.
10580         (anonymous_struct_prefix): Adjust.
10581         (determine_prefix): Adjust.
10582         (dwarf2_name): Adjust.
10583         (follow_die_ref_or_sig): Adjust.
10584         (follow_die_offset): Adjust.
10585         (follow_die_ref): Adjust.
10586         (follow_die_sig_1): Adjust.
10587         (follow_die_sig): Adjust.
10588         (get_signatured_type): Adjust.
10589         (get_DW_AT_signature_type): Adjust.
10590         (decode_locdesc): Adjust.
10591         (dwarf_decode_macros): Adjust.
10592         (cu_debug_loc_section): Adjust.
10593         (fill_in_loclist_baton): Adjust.
10594         (dwarf2_symbol_mark_computed): Adjust.
10595         (init_one_comp_unit): Don't assign
10596         dwarf2_cu::dwarf2_per_objfile.
10597         (set_die_type): Adjust.
10598
10599 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10600
10601         * dwarf2read.c (struct mapped_debug_names): Add constructor.
10602         <dwarf2_per_objfile>: New field.
10603         (dwarf2_per_objfile): Remove global.
10604         (get_dwarf2_per_objfile): New function.
10605         (set_dwarf2_per_objfile): New function.
10606         (dwarf2_build_psymtabs_hard): Change objfile parameter to
10607         dwarf2_per_objfile.
10608         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10609         (read_abbrev_offset): Likewise.
10610         (read_indirect_string): Likewise.
10611         (read_indirect_line_string): Likewise.
10612         (read_indirect_string_at_offset): Likewise.
10613         (read_indirect_string_from_dwz): Likewise.
10614         (dwarf2_find_containing_comp_unit): Change objfile parameter to
10615         dwarf2_per_objfile.
10616         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10617         (create_all_comp_units): Change objfile parameter to
10618         dwarf2_per_objfile.
10619         (create_all_type_units): Likewise.
10620         (process_queue): Add dwarf2_per_objfile parameter.
10621         (read_and_check_comp_unit_head): Likewise.
10622         (lookup_dwo_unit_in_dwp): Likewise.
10623         (get_dwp_file): Likewise.
10624         (process_cu_includes): Likewise.
10625         (struct free_dwo_file_cleanup_data): New struct.
10626         (dwarf2_has_info): Use get_dwarf2_per_objfile and
10627         set_dwarf2_per_objfile.
10628         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10629         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10630         context, adjust calls.
10631         (dw2_instantiate_symtab): Likewise.
10632         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10633         (dw2_get_cu): Likewise.
10634         (create_cu_from_index_list): Change objfile parameter to
10635         dwarf2_per_objfile.
10636         (create_cus_from_index_list): Get dwarf2_per_objfile from
10637         context, adjust calls.
10638         (create_cus_from_index): Likewise.
10639         (create_signatured_type_table_from_index): Change objfile
10640         parameter to dwarf2_per_objfile.
10641         (create_signatured_type_table_from_debug_names): Change objfile
10642         parameter to dwarf2_per_objfile.
10643         (create_addrmap_from_index): Likewise.
10644         (create_addrmap_from_aranges): Likewise.
10645         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10646         (dw2_setup): Remove.
10647         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10648         context.
10649         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10650         get_dwarf2_per_objfile.
10651         (dw2_forget_cached_source_info): Likewise.
10652         (dw2_map_symtabs_matching_filename): Likewise.
10653         (struct dw2_symtab_iterator) <index>: Remove.
10654         <dwarf2_per_objfile>: New field.
10655         (dw2_symtab_iter_init): Replace index parameter with
10656         dwarf2_per_objfile.
10657         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10658         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10659         (dw2_print_stats): Likewise.
10660         (dw2_dump): Likewise.
10661         (dw2_expand_symtabs_for_function): Likewise.
10662         (dw2_expand_all_symtabs): Likewise.
10663         (dw2_expand_symtabs_with_fullname): Likewise.
10664         (dw2_expand_marked_cus): Replace index and objfile parameters
10665         with dwarf2_per_objfile.
10666         (dw_expand_symtabs_matching_file_matcher): Add
10667         dwarf2_per_objfile parameter and adjust calls.
10668         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10669         adjust calls.
10670         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10671         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10672         adjust calls.
10673         (create_cus_from_debug_names_list): Replace objfile parameter
10674         with dwarf2_per_objfile and adjust calls.
10675         (create_cus_from_debug_names): Likewise.
10676         (dwarf2_read_debug_names): Likewise.
10677         (mapped_debug_names::namei_to_name): Adjust call.
10678         (dw2_debug_names_iterator::next): Likewise.
10679         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10680         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10681         (dw2_debug_names_dump): Likewise.
10682         (dw2_debug_names_expand_symtabs_for_function): Likewise.
10683         (dw2_debug_names_expand_symtabs_matching): Likewise.
10684         (dwarf2_initialize_objfile): Likewise.
10685         (dwarf2_build_psymtabs): Likewise.
10686         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10687         this_cu.
10688         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10689         (read_and_check_comp_unit_head): Likewise.
10690         (read_abbrev_offset): Likewise.
10691         (create_debug_type_hash_table): Likewise.
10692         (create_debug_types_hash_table): Likewise.
10693         (create_all_type_units): Replace objfile parameter with
10694         dwarf2_per_objfile.
10695         (add_type_unit): Add dwarf2_per_objfile parameter.
10696         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10697         with dwarf2_per_objfile.
10698         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10699         (lookup_dwp_signatured_type): Likewise.
10700         (lookup_signatured_type): Likewise.
10701         (read_cutu_die_from_dwo): Likewise.
10702         (init_tu_and_read_dwo_dies): Likewise.
10703         (init_cutu_and_read_dies): Likewise.
10704         (init_cutu_and_read_dies_no_follow): Likewise.
10705         (allocate_type_unit_groups_table): Add objfile parameter.
10706         (create_type_unit_group): Use dwarf2_per_objfile from cu.
10707         (get_type_unit_group): Likewise.
10708         (process_psymtab_comp_unit): Update call.
10709         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10710         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10711         (print_tu_stats): Likewise.
10712         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10713         in void* parameter.
10714         (build_type_psymtabs): Change objfile parameter to
10715         dwarf2_per_objfile.
10716         (process_skeletonless_type_unit): Use dwarf2_per_objfile
10717         passed in void* parameter.
10718         (process_skeletonless_type_units): Change objfile parameter to
10719         dwarf2_per_objfile.
10720         (set_partial_user): Likewise.
10721         (dwarf2_build_psymtabs_hard): Likewise.
10722         (read_comp_units_from_section): Likewise.
10723         (create_all_comp_units): Likewise.
10724         (scan_partial_symbols): Update calls.
10725         (add_partial_symbol): Likewise.
10726         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10727         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10728         (process_queue): Add dwarf2_per_objfile parameter.
10729         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10730         (compute_compunit_symtab_includes): Likewise.
10731         (process_cu_includes): Add dwarf2_per_objfile parameter.
10732         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10733         (process_full_type_unit): Likewise.
10734         (process_imported_unit_die): Update call.
10735         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10736         (read_file_scope): Likewise.
10737         (allocate_dwo_file_hash_table): Add objfile parameter.
10738         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10739         (create_cus_hash_table): Likewise.
10740         (create_dwp_hash_table): Likewise.
10741         (create_dwo_unit_in_dwp_v1): Likewise.
10742         (create_dwp_v2_section): Likewise.
10743         (create_dwo_unit_in_dwp_v2): Likewise.
10744         (lookup_dwo_unit_in_dwp): Likewise.
10745         (try_open_dwop_file): Likewise.
10746         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10747         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10748         cleanup to include a reference to dwarf2_per_objfile.
10749         (open_dwp_file): Add dwarf2_per_objfile parameter.
10750         (open_and_init_dwp_file): Likewise.
10751         (get_dwp_file): Likewise.
10752         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10753         (queue_and_load_all_dwo_tus): Update call.
10754         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10755         data.
10756         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10757         (dwarf2_ranges_process): Likewise.
10758         (dwarf2_get_pc_bounds): Likewise.
10759         (mark_common_block_symbol_computed): Likewise.
10760         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10761         (dwarf2_read_abbrevs): Update call.
10762         (read_partial_die): Use dwarf2_per_objfile from cu.
10763         (find_partial_die): Likewise.
10764         (fixup_partial_die): Likewise.
10765         (read_attribute_value): Likewise.
10766         (read_indirect_string_at_offset_from): Add objfile parameter.
10767         (read_indirect_string_at_offset): Add dwarf2_per_objfile
10768         parameter.
10769         (read_indirect_string_from_dwz): Add objfile parameter.
10770         (read_indirect_string): Add objfile parameter.
10771         (read_addr_index_1): Add dwarf2_per_objfile parameter.
10772         (read_addr_index): Use dwarf2_per_objfile from cu.
10773         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10774         call dw2_setup.
10775         (read_str_index): Use dwarf2_per_objfile from cu.
10776         (get_debug_line_section): Likewise.
10777         (read_formatted_entries): Add dwarf2_per_objfile parameter.
10778         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10779         (new_symbol_full): Use dwarf2_per_objfile from cu.
10780         (build_error_marker_type): Likewise.
10781         (lookup_die_type): Likewise.
10782         (determine_prefix): Likewise.
10783         (follow_die_offset): Likewise.
10784         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10785         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10786         (dwarf2_fetch_die_type_sect_off): Likewise.
10787         (dwarf2_get_die_type): Likewise.
10788         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10789         (get_signatured_type): Likewise.
10790         (get_DW_AT_signature_type): Likewise.
10791         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10792         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10793         (cu_debug_loc_section): Likewise.
10794         (fill_in_loclist_baton): Likewise.
10795         (dwarf2_symbol_mark_computed): Likewise.
10796         (dwarf2_find_containing_comp_unit): Change objfile parameter to
10797         dwarf2_per_objfile.
10798         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10799         parameter.
10800         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10801         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10802         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10803         (set_die_type): Use dwarf2_free_objfile from cu.
10804         (get_die_type_at_offset): Likewise.
10805         (dwarf2_per_objfile_free): Don't assign global variable.
10806         (debug_names) <constructor>: Add dwarf2_per_objfile
10807         parameter, update m_debugstrlookup construction.
10808         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10809         parameter.
10810         <m_dwarf2_per_objfile>: New field.
10811         <lookup>: Use m_dwarf2_per_objfile.
10812         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10813         (psyms_seen_size): Likewise.
10814         (write_gdbindex): Replace objfile parameter with
10815         dwarf2_per_objfile.
10816         (write_debug_names): Likewise.
10817         (write_psymtabs_to_index): Likewise.
10818         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10819         calls.
10820
10821 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10822
10823         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10824         <dwarf2_per_objfile>: New field.
10825         (struct dwarf2_per_cu_data) <objfile>: Remove.
10826         <dwarf2_per_objfile>: New field.
10827         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10828         of objfile.
10829         (create_signatured_type_table_from_index): Likewise.
10830         (create_debug_type_hash_table): Likewise.
10831         (fill_in_sig_entry_from_dwo_entry): Likewise.
10832         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10833         (create_type_unit_group): Assign dwarf2_per_objfile instead of
10834         objfile.
10835         (create_partial_symtab): Access objfile through
10836         dwarf2_per_objfile.
10837         (process_psymtab_comp_unit_reader): Likewise.
10838         (read_comp_units_from_section): Likewise.
10839         (scan_partial_symbols): Likewise.
10840         (add_partial_symbol): Likewise.
10841         (add_partial_subprogram): Likewise.
10842         (peek_die_abbrev): Likewise.
10843         (fixup_go_packaging): Likewise.
10844         (process_full_comp_unit): Likewise.
10845         (process_full_type_unit): Likewise.
10846         (process_imported_unit_die): Likewise.
10847         (dwarf2_compute_name): Likewise.
10848         (dwarf2_physname): Likewise.
10849         (read_import_statement): Likewise.
10850         (create_cus_hash_table): Assign dwarf2_physname instead of
10851         objfile.
10852         (read_func_scope): Access objfile through dwarf2_per_objfile.
10853         (read_lexical_block_scope): Likewise.
10854         (read_call_site_scope): Likewise.
10855         (read_variable): Likewise.
10856         (dwarf2_rnglists_process): Likewise.
10857         (dwarf2_ranges_process): Likewise.
10858         (dwarf2_ranges_read): Likewise.
10859         (dwarf2_record_block_ranges): Likewise.
10860         (dwarf2_add_field): Likewise.
10861         (dwarf2_add_member_fn): Likewise.
10862         (read_structure_type): Likewise.
10863         (process_structure_scope): Likewise.
10864         (read_enumeration_type): Likewise.
10865         (read_array_type): Likewise.
10866         (read_common_block): Likewise.
10867         (read_namespace_type): Likewise.
10868         (read_namespace): Likewise.
10869         (read_module_type): Likewise.
10870         (read_tag_pointer_type): Likewise.
10871         (read_tag_ptr_to_member_type): Likewise.
10872         (read_tag_string_type): Likewise.
10873         (read_subroutine_type): Likewise.
10874         (read_typedef): Likewise.
10875         (read_base_type): Likewise.
10876         (attr_to_dynamic_prop): Likewise.
10877         (read_subrange_type): Likewise.
10878         (read_unspecified_type): Likewise.
10879         (load_partial_dies): Likewise.
10880         (read_partial_die): Likewise.
10881         (find_partial_die): Likewise.
10882         (guess_partial_die_structure_name): Likewise.
10883         (fixup_partial_die): Likewise.
10884         (read_attribute_value): Likewise.
10885         (read_addr_index_from_leb128): Likewise.
10886         (dwarf2_read_addr_index): Likewise.
10887         (dwarf2_string_attr): Likewise.
10888         (lnp_state_machine::check_line_address): Likewise.
10889         (dwarf_decode_lines_1): Likewise.
10890         (dwarf_decode_lines): Likewise.
10891         (dwarf2_start_symtab): Likewise.
10892         (var_decode_location): Likewise.
10893         (new_symbol_full): Likewise.
10894         (dwarf2_const_value_data): Likewise.
10895         (dwarf2_const_value_attr): Likewise.
10896         (dwarf2_const_value): Likewise.
10897         (die_type): Likewise.
10898         (die_containing_type): Likewise.
10899         (lookup_die_type): Likewise.
10900         (guess_full_die_structure_name): Likewise.
10901         (anonymous_struct_prefix): Likewise.
10902         (dwarf2_name): Likewise.
10903         (follow_die_ref_or_sig): Likewise.
10904         (follow_die_offset): Likewise.
10905         (follow_die_ref): Likewise.
10906         (dwarf2_fetch_die_loc_sect_off): Likewise.
10907         (dwarf2_fetch_constant_bytes): Likewise.
10908         (dwarf2_fetch_die_type_sect_off): Likewise.
10909         (dwarf2_get_die_type): Likewise.
10910         (follow_die_sig): Likewise.
10911         (decode_locdesc): Likewise.
10912         (dwarf2_per_cu_objfile): Likewise.
10913         (dwarf2_per_cu_text_offset): Likewise.
10914         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10915         objfile.
10916         (set_die_type): Access objfile through
10917         dwarf2_per_objfile.
10918
10919 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10920
10921         * valprint.c (converted_character_d): Remove typedef.
10922         (DEF_VEC_O (converted_character_d)): Remove.
10923         (count_next_character): Use std::vector.
10924         (print_converted_chars_to_obstack): Likewise.
10925         (generic_printstr): Likewise.
10926
10927 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10928
10929         * xml-support.h (struct gdb_xml_value): Add constructor.
10930         <value>: Change type to unique_xmalloc_ptr.
10931         (gdb_xml_value_s): Remove typedef.
10932         (DEF_VEC_O (gdb_xml_value_s)): Remove.
10933         (gdb_xml_element_start_handler): Change parameter type to
10934         std::vector.
10935         (xml_find_attribute): Likewise.
10936         * xml-support.c (xml_find_attribute): Change parameter type to
10937         std::vector and adjust.
10938         (gdb_xml_values_cleanup): Remove.
10939         (gdb_xml_parser::start_element): Adjust to std::vector.
10940         (xinclude_start_include): Change paraeter type to std::vector
10941         and adjust.
10942         * btrace.c (check_xml_btrace_version): Likewise.
10943         (parse_xml_btrace_block): Likewise.
10944         (parse_xml_btrace_pt_config_cpu): Likewise.
10945         (parse_xml_btrace_pt): Likewise.
10946         (parse_xml_btrace_conf_bts): Likewise.
10947         (parse_xml_btrace_conf_pt): Likewise.
10948         * memory-map.c (memory_map_start_memory): Likewise.
10949         (memory_map_start_property): Likewise.
10950         * osdata.c (osdata_start_osdata): Likewise.
10951         (osdata_start_item): Likewise.
10952         (osdata_start_column): Likewise.
10953         * remote.c (start_thread): Likewise.
10954         * solib-aix.c (library_list_start_library): Likewise.
10955         (library_list_start_list): Likewise.
10956         * solib-svr4.c (library_list_start_library): Likewise.
10957         (svr4_library_list_start_list): Likewise.
10958         * solib-target.c (library_list_start_segment): Likewise.
10959         (library_list_start_section): Likewise.
10960         (library_list_start_library): Likewise.
10961         (library_list_start_list): Likewise.
10962         * tracepoint.c (traceframe_info_start_memory): Likewise.
10963         (traceframe_info_start_tvar): Likewise.
10964         * xml-syscall.c (syscall_start_syscall): Likewise.
10965         * xml-tdesc.c (tdesc_start_target): Likewise.
10966         (tdesc_start_feature): Likewise.
10967         (tdesc_start_reg): Likewise.
10968         (tdesc_start_union): Likewise.
10969         (tdesc_start_struct): Likewise.
10970         (tdesc_start_flags): Likewise.
10971         (tdesc_start_enum): Likewise.
10972         (tdesc_start_field): Likewise.
10973         (tdesc_start_enum_value): Likewise.
10974         (tdesc_start_vector): Likewise.
10975
10976 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10977
10978         * extension.h (struct xmethod_worker) <clone>: Remove.
10979         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10980         Remove.
10981         (python_xmethod_worker::clone): Remove.
10982         * valops.c (find_overload_match): Use std::move instead of
10983         clone.
10984
10985 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10986
10987         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10988         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10989         <free_xmethod_worker_data>: Remove.
10990         <get_matching_xmethod_workers>: Chance VEC to std::vector.
10991         <get_xmethod_arg_types>: Remove.
10992         <get_xmethod_result_type>: Remove.
10993         <invoke_xmethod>: Remove.
10994         * extension.c (new_xmethod_worker): Remove.
10995         (clone_xmethod_worker): Remove.
10996         (get_matching_xmethod_workers): Return void, pass std::vector by
10997         pointer.
10998         (get_xmethod_arg_types): Rename to...
10999         (xmethod_worker::get_arg_types): ... this, and adjust.
11000         (get_xmethod_result_type): Rename to...
11001         (xmethod_worker::get_result_type): ... this, and adjust.
11002         (invoke_xmethod): Remove.
11003         (free_xmethod_worker): Remove.
11004         (free_xmethod_worker_vec): Remove.
11005         * extension.h (enum ext_lang_rc): Move here from
11006         extension-priv.h.
11007         (struct xmethod_worker): Add constructor and destructor.
11008         <data>: Remove.
11009         <value>: Remove.
11010         <invoke, clone, do_get_result_type, do_get_arg_types>: New
11011         virtual pure methods.
11012         <get_arg_types, get_result_type>: New methods.
11013         (xmethod_worker_ptr): Remove typedef.
11014         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11015         (xmethod_worker_vec): Remove typedef.
11016         (xmethod_worker_up): New typedef.
11017         (invoke_xmethod): Remove.
11018         (clone_xmethod_worker): Remove.
11019         (free_xmethod_worker): Remove.
11020         (free_xmethod_worker_vec): Remove.
11021         (get_xmethod_arg_types): Remove.
11022         (get_xmethod_result_type): Remove.
11023         * valops.c (find_method_list): Use std::vector, don't use
11024         intermediate vector.
11025         (value_find_oload_method_list): Use std::vector.
11026         (find_overload_match): Use std::vector.
11027         (find_oload_champ): Use std::vector.
11028         * value.c (value_free): Use operator delete.
11029         (value_of_xmethod): Rename to...
11030         (value_from_xmethod): ... this.  Don't assign
11031         xmethod_worker::value, take rvalue-reference.
11032         (result_type_of_xmethod): Adjust.
11033         (call_xmethod): Adjust.
11034         * value.h: Include extension.h.
11035         (struct xmethod_worker): Don't forward-declare.
11036         (value_of_xmethod): Rename to...
11037         (value_from_xmethod): ... this, take rvalue-reference.
11038         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11039         (struct python_xmethod_worker): ... this, add constructor and
11040         destructor.
11041         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11042         (gdbpy_free_xmethod_worker_data): Rename to...
11043         (python_xmethod_worker::~python_xmethod_worker): ... this and
11044         adjust.
11045         (gdbpy_clone_xmethod_worker_data): Rename to...
11046         (python_xmethod_worker::clone): ... this and adjust.
11047         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11048         temporary vector.
11049         (gdbpy_get_xmethod_arg_types): Rename to...
11050         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11051         (gdbpy_get_xmethod_result_type): Rename to...
11052         (python_xmethod_worker::do_get_result_type): ... this and
11053         adjust.
11054         (gdbpy_invoke_xmethod): Rename to...
11055         (python_xmethod_worker::invoke): ... this and adjust.
11056         (new_python_xmethod_worker): Rename to...
11057         (python_xmethod_worker::python_xmethod_worker): ... this and
11058         adjust.
11059         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11060         Remove.
11061         (gdbpy_free_xmethod_worker_data): Remove.
11062         (gdbpy_get_matching_xmethod_workers): Use std::vector.
11063         (gdbpy_get_xmethod_arg_types): Remove.
11064         (gdbpy_get_xmethod_result_type): Remove.
11065         (gdbpy_invoke_xmethod): Remove.
11066         * python/python.c (python_extension_ops): Remove obsolete
11067         callbacks.
11068
11069 2018-01-05  Pedro Alves  <palves@redhat.com>
11070
11071         PR gdb/18653
11072         * common/signals-state-save-restore.c
11073         (save_original_signals_state): New parameter 'quiet'.  Warn if we
11074         find a custom handler preinstalled, instead of internal erroring.
11075         But only warn if !quiet.
11076         * common/signals-state-save-restore.h
11077         (save_original_signals_state): New parameter 'quiet'.
11078         * main.c (captured_main_1): Move save_original_signals_state call
11079         after option handling, and pass QUIET.
11080
11081 2018-01-05  Pedro Alves  <palves@redhat.com>
11082
11083         * spu-tdep.c (spu_catch_start): Pass
11084         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11085
11086 2018-01-05  Pedro Alves  <palves@redhat.com>
11087
11088         PR gdb/22670
11089         * ada-lang.c (literal_symbol_name_matcher): New function.
11090         (ada_get_symbol_name_matcher): Use it for
11091         symbol_name_match_type::SEARCH_NAME.
11092         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
11093         it down instead of assuming symbol_name_match_type::FULL.
11094         * block.h (block_lookup_symbol): New parameter 'match_type'.
11095         * c-valprint.c (print_unpacked_pointer): Use
11096         lookup_symbol_search_name instead of lookup_symbol.
11097         * compile/compile-object-load.c (get_out_value_type): Pass down
11098         symbol_name_match_type::SEARCH_NAME.
11099         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11100         symbol_name_match_type::FULL.
11101         * cp-support.c (cp_get_symbol_name_matcher): Handle
11102         symbol_name_match_type::SEARCH_NAME.
11103         * infrun.c (insert_exception_resume_breakpoint): Use
11104         lookup_symbol_search_name.
11105         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11106         * psymtab.c (maintenance_check_psymtabs): Use
11107         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11108         * stack.c (print_frame_args): Use lookup_symbol_search_name and
11109         SYMBOL_SEARCH_NAME.
11110         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11111         if symbol_name_match_type::SEARCH_NAME.
11112         (lookup_symbol_in_language): Pass down
11113         symbol_name_match_type::FULL.
11114         (lookup_symbol_search_name): New.
11115         (lookup_language_this): Pass down
11116         symbol_name_match_type::SEARCH_NAME.
11117         (lookup_symbol_aux, lookup_local_symbol): New parameter
11118         'match_type'.  Pass it down.
11119         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11120         (lookup_symbol_search_name): New declaration.
11121         (lookup_symbol_in_block): New 'match_type' parameter.
11122
11123 2018-01-05  Pedro Alves  <palves@redhat.com>
11124
11125         PR gdb/22670
11126         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11127         ada_lookup_symbol.
11128         (ada_lookup_symbol): Reimplement in terms of
11129         ada_lookup_symbol_list, bits factored out from
11130         ada_lookup_encoded_symbol.
11131
11132 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11133
11134         * ada-exp.y (write_object_renaming): When subscripting an array
11135         using a symbol as the index, pass the block in call to
11136         ada_lookup_encoded_symbol when looking that symbol up.
11137
11138 2018-01-05  Jerome Guitton  <guitton@adacore.com>
11139
11140         * ada-lang.c (ada_array_length): Use ada_index_type instead of
11141         TYPE_INDEX_TYPE.
11142
11143 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11144
11145         * ada-lang.c (ada_to_fixed_value_create): Add handling of
11146         the case where VALUE_LVAL (val0) is not lval_memory.
11147
11148 2018-01-05  Xavier Roirand  <roirand@adacore.com>
11149
11150         * ada-valprint.c (print_optional_low_bound): Handle
11151         character-indexed array printing like boolean-indexed array
11152         printing.
11153
11154 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11155
11156         * NEWS: Create a new section for the next release branch.
11157         Rename the section of the current branch, now that it has
11158         been cut.
11159
11160 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11161
11162         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11163         * version.in: Bump version to 8.1.50.DATE-git.
11164
11165 2018-01-03  Xavier Roirand  <roirand@adacore.com>
11166
11167         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11168         Add field.
11169         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11170         Add field.
11171         (default_exception_support_info) <catch_handlers_sym>: Add field.
11172         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11173         (ada_exception_name_addr_1): Add "catch handlers" handling.
11174         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11175         Update all callers.
11176         (create_excep_cond_exprs) <ex>: Add parameter.
11177         (re_set_exception): Update create_excep_cond_exprs call.
11178         (print_it_exception, print_one_exception, print_mention_exception)
11179         (print_recreate_exception): Add "catch handler" handling.
11180         (allocate_location_catch_handlers, re_set_catch_handlers)
11181         (check_status_catch_handlers, print_it_catch_handlers)
11182         (print_one_catch_handlers, print_mention_catch_handlers)
11183         (print_recreate_catch_handlers): New function.
11184         (catch_handlers_breakpoint_ops): New variable.
11185         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11186         Add parameter.  Add "catch handler" handling.
11187         (ada_exception_sym_name, ada_exception_breakpoint_ops):
11188         Add "catch handler" handling.
11189         (ada_exception_catchpoint_cond_string): Add "catch handler"
11190         handling.
11191         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11192         call.
11193         (catch_ada_handlers_command): New function.
11194         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11195         operations structure.
11196         (_initialize_ada_language): Add "catch handlers" command entry.
11197         * NEWS: Document "catch handlers" feature.
11198
11199 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11200
11201         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11202         account when creating the array type of the slice.
11203         (ada_value_slice): Likewise.
11204
11205 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11206
11207         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11208         New enum value.
11209         (create_array_type_with_stride): Add byte_stride_prop parameter.
11210         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11211         New parameter.  Update all callers in this file.
11212         (array_type_has_dynamic_stride): New function.
11213         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11214         of arrays with dynamic byte strides.
11215         * dwarf2read.c (read_array_type): Add support for dynamic
11216         DW_AT_byte_stride attributes.
11217
11218 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11219
11220         * dwarf2read.c (read_unspecified_type): Treat
11221         DW_TAG_enumeration_type DIEs from Ada units as stubs.
11222
11223 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11224
11225         Update copyright year range in all GDB files.
11226
11227 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11228
11229         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11230         and gdb/testsuite/gdb.base/step-line.c.
11231
11232 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11233
11234         * copyright.py (main): Dump the contents of
11235         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11236         even if BY_HAND is empty.
11237
11238 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11239
11240         * top.c (print_gdb_version): Update Copyright year in version
11241         message.
11242
11243 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11244
11245         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11246
11247 For older changes see ChangeLog-2017.
11248 \f
11249 Local Variables:
11250 mode: change-log
11251 left-margin: 8
11252 fill-column: 74
11253 version-control: never
11254 coding: utf-8
11255 End: